open-iscsi-vl.spec 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. %define majver 2.0
  2. %define subver 870.3
  3. Summary: iSCSI daemon and utility programs
  4. Summary(ja): iSCSI デーモンおよびユーティリティプログラム
  5. #Name: iscsi-initiator-utils
  6. Name: open-iscsi
  7. Version: %{majver}.%{subver}
  8. Release: 3%{?_dist_release}
  9. Source0: http://www.open-iscsi.org/bits/open-iscsi-%{majver}-%{subver}.tar.gz
  10. Source1: iscsid.init
  11. Source2: iscsidevs.init
  12. Patch0: iscsi-initiator-utils-update-initscripts-and-docs.patch
  13. Patch1: iscsi-initiator-utils-use-var-for-config.patch
  14. Group: System Environment/Daemons
  15. License: GPL
  16. URL: http://www.open-iscsi.org/
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  18. BuildRequires: openssl-devel
  19. BuildRequires: glibc-static
  20. PreReq: chkconfig initscripts
  21. ExcludeArch: s390 s390x
  22. # to avoid conflicts with Fedora's iscsi-initiator-utils package
  23. Obsoletes: iscsi-initiator-utils
  24. Conflicts: iscsi-initiator-utils
  25. %description
  26. The iscsi package provides the server daemon for the iSCSI protocol,
  27. as well as the utility programs used to manage it. iSCSI is a protocol
  28. for distributed disk access using SCSI commands sent over Internet
  29. Protocol networks.
  30. %prep
  31. %setup -q -n %{name}-%{majver}-%{subver}
  32. %patch0 -p1 -b .update-initscripts-and-docs
  33. %patch1 -p1 -b .use-var-for-config
  34. %build
  35. make OPTFLAGS="%{optflags}" -C utils/fwparam_ibft
  36. make OPTFLAGS="%{optflags}" -C usr
  37. make OPTFLAGS="%{optflags}" -C utils
  38. %install
  39. rm -rf $RPM_BUILD_ROOT
  40. mkdir -p $RPM_BUILD_ROOT/sbin
  41. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
  42. mkdir -p $RPM_BUILD_ROOT%{_initrddir}
  43. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/iscsi
  44. mkdir -p $RPM_BUILD_ROOT%{_var}/lib/iscsi
  45. mkdir -p $RPM_BUILD_ROOT%{_var}/lib/iscsi/nodes
  46. mkdir -p $RPM_BUILD_ROOT%{_var}/lib/iscsi/send_targets
  47. mkdir -p $RPM_BUILD_ROOT%{_var}/lock/iscsi
  48. install -p -m 755 usr/iscsid usr/iscsiadm utils/iscsi-iname usr/iscsistart $RPM_BUILD_ROOT/sbin
  49. install -p -m 644 doc/iscsiadm.8 $RPM_BUILD_ROOT/%{_mandir}/man8
  50. install -p -m 644 doc/iscsid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
  51. install -p -m 644 etc/iscsid.conf $RPM_BUILD_ROOT%{_sysconfdir}/iscsi
  52. install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/iscsid
  53. install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/iscsi
  54. %clean
  55. rm -rf $RPM_BUILD_ROOT
  56. %post
  57. if [ "$1" -eq "1" ]; then
  58. if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ]; then
  59. echo "InitiatorName=`/sbin/iscsi-iname`" > %{_sysconfdir}/iscsi/initiatorname.iscsi
  60. fi
  61. /sbin/chkconfig --add iscsid
  62. /sbin/chkconfig --add iscsi
  63. fi
  64. %preun
  65. if [ "$1" = "0" ]; then
  66. # stop iscsi
  67. /sbin/service iscsi stop > /dev/null 2>&1
  68. # delete service
  69. /sbin/chkconfig --del iscsi
  70. # stop iscsid
  71. /sbin/service iscsid stop > /dev/null 2>&1
  72. # delete service
  73. /sbin/chkconfig --del iscsid
  74. fi
  75. %files
  76. %defattr(-,root,root)
  77. %doc README
  78. %dir %{_var}/lib/iscsi
  79. %dir %{_var}/lib/iscsi/nodes
  80. %dir %{_var}/lib/iscsi/send_targets
  81. %dir %{_var}/lock/iscsi
  82. %{_initrddir}/iscsi
  83. %{_initrddir}/iscsid
  84. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
  85. /sbin/*
  86. %{_mandir}/man8/*
  87. %changelog
  88. * Mon Apr 18 2011 Shu KONNO <owa@bg.wakwak.com> 2.0.870.3-3
  89. - added BR: glibc-static
  90. * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 2.0.870.3-2
  91. - rebuilt with rpm-4.8.1-3
  92. * Sat Jun 13 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.870.3-1
  93. - new upstream release
  94. - new versioning policy
  95. * Wed Dec 05 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.0.865.15-0vl1
  96. - initial package for VineSeed
  97. - derived from Fedora8 6.2.0.865-0.2
  98. - package name changed to open-iscsi
  99. - updated to 2.0-865.15
  100. * Fri Oct 5 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.865-0.2
  101. - Rebase to upstream's bug fix release.
  102. - Revert init script startup changes from 225915 which reviewers did
  103. not like.
  104. * Mon Jun 20 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.1
  105. - 225915 From Adrian Reber - Fix up spec and init files for rpmlint.
  106. * Tue Feb 6 2007 Mike Christie <mchristie@redhat.com> - 6.2.0.754-0.0
  107. - Rebase to upstream.
  108. - Add back --map functionality but in session mode to match RHEL5 fixes
  109. - Break up iscsi init script into two, so iscsid can be started early for root
  110. * Tue Nov 28 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.747-0.0
  111. - Fix several bugs in actor.c (iscsi scheduling). This should result
  112. - in better dm-multipath intergation and fix bugs where time outs
  113. - or requests were missed or dropped.
  114. - Set default noop timeout correctly.
  115. * Sat Nov 25 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.742-0.0
  116. - Don't flood targets with nop-outs.
  117. * Fri Nov 24 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.737-0.0
  118. - Add commands missing from RHEL4/RHEL3 and document iscsid.conf.
  119. - Fixup README.
  120. * Mon Nov 7 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.8
  121. - Rebase to upstream open-iscsi-2.0-730.
  122. * Tue Oct 17 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.7
  123. - Change period to colon in default name
  124. * Thu Oct 5 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.6
  125. - BZ 209523 make sure the network is not going to get shutdown so
  126. iscsi devices (include iscsi root and dm/md over iscsi) get syncd.
  127. - BZ 209415 have package create iscsi var dirs
  128. * Tue Oct 3 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.5
  129. - BZ 208864 move /etc/iscsi/nodes and send_targets to /var/lib/iscsi
  130. * Mon Oct 1 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.4
  131. - BZ 208548 move /etc/iscsi/lock to /var/lock/iscsi/lock
  132. * Wed Sep 27 2006 Jeremy Katz <katzj@redhat.com> - 6.2.0.695-0.3
  133. - Add fix for initscript with pid file moved
  134. * Tue Sep 26 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.2
  135. - BZ 208050 - change default initiator name to reflect redhat
  136. - Move pid from /etc/iscsi to /var/run/iscsid.pid
  137. * Fri Sep 15 2006 Mike Christie <mchristie@redhat.com> - 6.2.0.695-0.1
  138. - Add compat with FC kernel so iscsid will pass startup checks and run.
  139. - Fix bug when using hw iscsi and software iscsi and iscsid is restarted.
  140. - Fix session matching bug when hw and software iscsi is both running
  141. * Tue Sep 5 2006 Jeremy Katz <katzj@redhat.com> - 6.1.1.685-0.1
  142. - Fix service startup
  143. - Fix another case where cflags weren't being used
  144. * Mon Aug 28 2006 Mike Christie <mchristie@redhat.com> - 6.1.1.685
  145. - Rebase to upstream to bring in many bug fixes and rm db.
  146. - iscsi uses /etc/iscsi instead of just etc now
  147. * Fri Jul 21 2006 Jeremy Katz <katzj@redhat.com> - 6.1.1.645-1
  148. - fix shutdown with root on iscsi
  149. * Thu Jul 13 2006 Mike Christie <mchristie@redhat.com> - 6.1.1.645
  150. - update to upstream 1.1.645
  151. - Note DB and interface changed so you must update kernel, tools and DB
  152. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 6.0.5.595-2.1.1
  153. - rebuild
  154. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 6.0.5.595-2.1
  155. - rebuild
  156. * Wed Jun 21 2006 Mike Christie <mchristi@redhat.com> - 6.0.5.595-2
  157. - add PatM's statics.c file. This is needed for boot since
  158. there is no getpwuid static available at that time.
  159. * Tue Jun 20 2006 Jeremy Katz <katzj@redhat.com> - 6.0.5.595-1
  160. - ensure that we respect %%{optflags}
  161. - cleaned up initscript to make use of standard functions, return right
  162. values and start by default
  163. - build iscsistart as a static binary for use in initrds
  164. * Tue May 30 2006 Mike Christie <mchristi@redhat.com>
  165. - rebase package to svn rev 595 to fix several bugs
  166. NOTE!!!!!!!! This is not compatible with the older open-iscsi modules
  167. and tools. You must upgrade.
  168. * Thu May 18 2006 Mike Christie <mchristi@redhat.com>
  169. - update package to open-iscsi svn rev 571
  170. NOTE!!!!!!!! This is not compatible with the older open-iscsi modules
  171. and tools. You must upgrade.
  172. * Fri Apr 7 2006 Mike Christie <mchristi@redhat.com>
  173. - From Andy Henson <andy@zexia.co.uk>:
  174. Autogenerate /etc/initiatorname.iscsi during install if not already present
  175. - Remove code to autogenerate /etc/initiatorname.iscsi from initscript
  176. - From dan.y.roche@gmail.com:
  177. add touch and rm lock code
  178. - update README
  179. - update default iscsid.conf. "cnx" was not supported. The correct
  180. id was "conn".
  181. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 5.0.5.476-0.1
  182. - bump again for double-long bug on ppc(64)
  183. * Mon Jan 23 2006 Mike Christie <mchristi@redhat.com>
  184. - rebase package to bring in ppc64 unsigned long vs unsigned
  185. long long fix and iscsadm return value fix. Also drop rdma patch
  186. becuase it is now upstream.
  187. * Wed Dec 14 2005 Mike Christie <mchristi@redhat.com>
  188. - initial packaging