open-iscsi-vl.spec 8.0 KB

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