sg3_utils-vl.spec 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. %global rescan_script rescan-scsi-bus.sh
  2. %global _udevrulesdir /lib/udev/rules.d
  3. Summary: Utilities for devices that use SCSI command sets
  4. Summary(ja): SCSIコマンドセットを利用するデバイスのためのユーティリティ
  5. Name: sg3_utils
  6. Version: 1.45
  7. Group: admin-tools
  8. Release: 1%{?_dist_release}
  9. Vendor: Project Vine
  10. Distribution: Vine Linux
  11. License: GPLv2+ and BSD
  12. URL: http://sg.danny.cz/sg/
  13. Source0: http://sg.danny.cz/sg/p/%{name}-%{version}.tar.xz
  14. Source2: scsi-rescan.8
  15. Source10: 40-usb-blacklist.rules
  16. Source11: 59-fc-wwpn-id.rules
  17. # https://bugzilla.redhat.com/show_bug.cgi?id=1683343
  18. # sg_turs: improper usage show
  19. Patch1: sg_turs-help.patch
  20. # https://bugzilla.redhat.com/show_bug.cgi?id=1627657
  21. # sg_raw -V fail
  22. Patch2: sg_raw-version.patch
  23. # https://bugzilla.redhat.com/show_bug.cgi?id=1760847
  24. # FC_TARGET_LUN attribute assigned for non FC device
  25. Patch3: fc_wwpn_id-non_FC-devices.patch
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  27. Requires: %{name}-libs = %{version}-%{release}
  28. %description
  29. Collection of Linux utilities for devices that use the SCSI command set.
  30. Includes utilities to copy data based on "dd" syntax and semantics (called
  31. sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check
  32. mode and log pages (sginfo, sg_modes and sg_logs); spin up and down
  33. disks (sg_start); do self tests (sg_senddiag); and various other functions.
  34. See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4
  35. series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0)
  36. must be used. In the 2.6 series other device names may be used as
  37. well (e.g. /dev/sda).
  38. Warning: Some of these tools access the internals of your system
  39. and the incorrect usage of them may render your system inoperable.
  40. %package libs
  41. Summary: Shared library for %{name}
  42. Summary(ja): %{name} の共有ライブラリ
  43. Group: system
  44. %description libs
  45. This package contains the shared library for %{name}.
  46. %package devel
  47. Summary: Development library and header files for the sg3_utils library
  48. Summary(ja): %{name} ライブラリの開発ファイル
  49. Group: programming
  50. Requires: %{name}-libs = %{version}-%{release}
  51. Requires: glibc-headers
  52. %description devel
  53. This package contains the %{name} library and its header files for
  54. developing applications.
  55. %prep
  56. %setup -q
  57. %autosetup -p 1
  58. %build
  59. %configure --disable-static
  60. # Don't use rpath!
  61. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  62. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  63. make %{?_smp_mflags}
  64. %install
  65. rm -rf $RPM_BUILD_ROOT
  66. make install DESTDIR=$RPM_BUILD_ROOT
  67. rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
  68. install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir}
  69. ( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf %{rescan_script} scsi-rescan )
  70. install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8
  71. # install all extra udev rules
  72. mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir}
  73. mkdir -p $RPM_BUILD_ROOT/lib/udev
  74. # need to run after 60-persistent-storage.rules
  75. install -p -m 644 scripts/55-scsi-sg3_id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/61-scsi-sg3_id.rules
  76. # need to run after 62-multipath.rules
  77. install -p -m 644 scripts/58-scsi-sg3_symlink.rules $RPM_BUILD_ROOT%{_udevrulesdir}/63-scsi-sg3_symlink.rules
  78. install -p -m 644 scripts/59-scsi-cciss_id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/65-scsi-cciss_id.rules
  79. install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_udevrulesdir}
  80. install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_udevrulesdir}/63-fc-wwpn-id.rules
  81. install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/lib/udev/
  82. %clean
  83. rm -rf $RPM_BUILD_ROOT
  84. %post libs -p /sbin/ldconfig
  85. %postun libs -p /sbin/ldconfig
  86. %files
  87. %defattr(-,root,root)
  88. %license COPYING
  89. %doc ChangeLog COVERAGE CREDITS INSTALL README README.iscsi README.sg_start
  90. %attr(755,root,root) %{_bindir}/*
  91. %{_bindir}/*
  92. %{_mandir}/man8/*
  93. %{_udevrulesdir}/61-scsi-sg3_id.rules
  94. %{_udevrulesdir}/63-scsi-sg3_symlink.rules
  95. %{_udevrulesdir}/63-fc-wwpn-id.rules
  96. %{_udevrulesdir}/65-scsi-cciss_id.rules
  97. %{_udevrulesdir}/40-usb-blacklist.rules
  98. /lib/udev/fc_wwpn_id
  99. %files libs
  100. %defattr(-,root,root)
  101. %{_libdir}/*.so.*
  102. %files devel
  103. %defattr(-,root,root)
  104. %{_includedir}/scsi/*.h
  105. %{_libdir}/*.so
  106. %changelog
  107. * Mon Aug 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.45-1
  108. - new upstream release.
  109. * Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.37-1
  110. - update to 1.37
  111. * Fri May 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.27-2
  112. - rebuild for Vine 6
  113. * Mon Oct 19 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.27-1
  114. - initial build for Vine Linux
  115. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.27-2
  116. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  117. * Tue Apr 28 2009 Dan Horák <dan@danny.cz> - 1.27-1
  118. - update to version 1.27
  119. - changelog: http://sg.danny.cz/sg/p/sg3_utils.ChangeLog
  120. * Tue Mar 31 2009 Dan Horák <dan@danny.cz> - 1.26-4
  121. - add dependency between the libs subpackage and the main package (#492921)
  122. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26-3
  123. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  124. * Mon Nov 3 2008 Dan Horák <dan@danny.cz> - 1.26-2
  125. - update URL
  126. - include rescan-scsi-bus script 1.29
  127. * Mon Jun 30 2008 Dan Horák <dan@danny.cz> - 1.26-1
  128. - update to upstream version 1.26
  129. * Fri Mar 28 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-4
  130. - Dropped really unnecessary Provides of sg_utils (#226414)
  131. - Use --disable-static in configure (#226414)
  132. * Thu Mar 27 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-3
  133. - Specfile cleanup, removal of static development libraries (#226414)
  134. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.25-2
  135. - Autorebuild for GCC 4.3
  136. * Mon Oct 22 2007 Phil Knirsch <pknirsch@redhat.com> - 1.25-1
  137. - Fixed URLs
  138. - Updated to sg3_utils-1.25
  139. * Thu Aug 16 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-2
  140. - License review and update
  141. * Fri Feb 02 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-1
  142. - Update to sg3_utils-1.23
  143. - Updated summary
  144. * Mon Nov 13 2006 Phil Knirsch <pknirsch@redhat.com> - 1.22-1
  145. - Update to sg3_utils-1.22
  146. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.20-2.1
  147. - rebuild
  148. * Wed Jun 07 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-2
  149. - Fixed rebuild problem on latest toolchain
  150. - Added missing buildprereqs
  151. * Fri May 19 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-1
  152. - Update to sg3_utils-1.20.
  153. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.19-1.1
  154. - bump again for double-long bug on ppc(64)
  155. * Fri Feb 10 2006 Phil Knirsch <pknirsch@redhat.com> - 1.19-1
  156. - Update to sg3_utils-1.19.
  157. - Fixed rebuild problem on 64bit archs.
  158. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.17-1.1
  159. - rebuilt for new gcc4.1 snapshot and glibc changes
  160. * Mon Nov 07 2005 Phil Knirsch <pknirsch@redhat.com> 1.17-1
  161. - Update to sg3-utils-1.17
  162. - Split package up into 3 subpackages: sg3_utils, devel and libs
  163. - Some minor updates to the specfile
  164. * Wed Mar 02 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-5
  165. - bump release and rebuild with gcc 4
  166. * Fri Feb 18 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-4
  167. - rebuilt
  168. * Tue Aug 03 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-3
  169. - rebuilt
  170. * Thu Mar 11 2004 Tim Powers <timp@redhat.com> 1.06-2
  171. - rebuild
  172. * Wed Feb 18 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-1
  173. - Initial version for RHEL3 U2.
  174. * Fri Jan 09 2004 - dgilbert@interlog.com
  175. - sg3_utils.spec for mandrake; more sginfo work, sg_scan, sg_logs
  176. * sg3_utils-1.06
  177. * Wed Nov 12 2003 - dgilbert@interlog.com
  178. - sg_readcap: sizes; sg_logs: double fetch; sg_map 256 sg devices; sginfo
  179. * sg3_utils-1.05
  180. * Tue May 13 2003 - dgilbert@interlog.com
  181. - default sg_turs '-n=' to 1, sg_logs gets '-t' for temperature, CREDITS
  182. * sg3_utils-1.04
  183. * Wed Apr 02 2003 - dgilbert@interlog.com
  184. - 6 byte CDBs for sg_modes, sg_start on block devs, sg_senddiag, man pages
  185. * sg3_utils-1.03
  186. * Wed Jan 01 2003 - dgilbert@interlog.com
  187. - interwork with block SG_IO, fix in sginfo, '-t' for sg_turs
  188. * sg3_utils-1.02
  189. * Wed Aug 14 2002 - dgilbert@interlog.com
  190. - raw switch in sg_inq
  191. * sg3_utils-1.01
  192. * Sun Jul 28 2002 - dgilbert@interlog.com
  193. - decode sg_logs pages, add dio to sgm_dd, drop "gen=1" arg, "of=/dev/null"
  194. * sg3_utils-1.00
  195. * Sun Mar 17 2002 - dgilbert@interlog.com
  196. - add sg_modes+sg_logs for sense pages, expand sg_inq, add fua+sync to sg_dd++
  197. * sg3_utils-0.99
  198. * Sat Feb 16 2002 - dgilbert@interlog.com
  199. - resurrect sg_reset; snprintf cleanup, time,gen+cdbsz args to sg_dd++
  200. * sg3_utils-0.98
  201. * Sun Dec 23 2001 - dgilbert@interlog.com
  202. - move isosize to archive directory; now found in util-linux-2.10s and later
  203. * sg3_utils-0.97
  204. * Fri Dec 21 2001 - dgilbert@interlog.com
  205. - add sgm_dd, sg_read, sg_simple4 and sg_simple16 [add mmap-ed IO support]
  206. * sg3_utils-0.96
  207. * Sat Sep 15 2001 - dgilbert@interlog.com
  208. - sg_map can do inquiry; sg_dd, sgp_dd + sgq_dd dio help
  209. * sg3_utils-0.95
  210. * Thu Apr 19 2001 - dgilbert@interlog.com
  211. - add sg_start, improve sginfo and sg_map [Kurt Garloff]
  212. * sg3_utils-0.94
  213. * Mon Mar 5 2001 - dgilbert@interlog.com
  214. - add scsi_devfs_scan, add sg_include.h, 'coe' more general in sgp_dd
  215. * sg3_utils-0.93
  216. * Tue Jan 16 2001 - dgilbert@interlog.com
  217. - clean sg_err.h include dependencies, bug fixes, Makefile in archive directory
  218. * sg3_utils-0.92
  219. * Thu Dec 21 2000 - dgilbert@interlog.com
  220. - signals for sg_dd, man pages and additions for sg_rbuf and isosize
  221. * sg3_utils-0.91
  222. * Mon Dec 11 2000 - dgilbert@interlog.com
  223. - Initial creation of package, containing
  224. * sg3_utils-0.90