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