Blame SPECS/sg3_utils.spec

a6e0dd
%global rescan_script rescan-scsi-bus.sh
a6e0dd
a6e0dd
Summary: Utilities for devices that use SCSI command sets
a6e0dd
Name: sg3_utils
a6e0dd
Version: 1.37
a6e0dd
Release: 17%{?dist}
a6e0dd
License: GPLv2+ and BSD
a6e0dd
Group: Applications/System
a6e0dd
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tgz
a6e0dd
Source1: rescan-scsi-bus.sh.8
a6e0dd
Source2: scsi-rescan.8
a6e0dd
# https://bugzilla.redhat.com/show_bug.cgi?id=920687
a6e0dd
Patch0: sg3_utils-1.37-dont-open-dev-snapshot.patch
a6e0dd
# https://bugzilla.redhat.com/show_bug.cgi?id=948463
a6e0dd
Patch1: sg3_utils-1.37-man-pages-fix.patch
a6e0dd
Patch2: 0001-Fix-issues-with-multi-word-device-types.patch
a6e0dd
Patch3: 0001-Fix-dev-null-redirect-mistakes.patch
a6e0dd
Patch4: 0001-Fix-syntax-error-in-if-statement-related-to-mpath-fl.patch
a6e0dd
Patch5: 0001-Add-upstream-updates-to-sg_inq-sg_rdac-and-sg_vpd.patch
a6e0dd
Patch6: sg_rdac_additional_upstream_fixes.patch
a6e0dd
#fix typo in nooptscan option in rescan scsi bus script (#1353941)
a6e0dd
Patch7: sg3_utils-1.37-rescan-scsi-typo.patch
a6e0dd
#document -m/--multipath option in rescan-scsi-bus.sh script (#1357851)
a6e0dd
Patch8: sg3_utils-1.37-rescan-scsi-missingoption.patch
a6e0dd
Patch9: BZ_1380744-rescan-scsi-bus.sh-Add-lunsearch-filter-to-searchexi.patch
a6e0dd
Patch10: BZ_1360915-rescan-scsi-bus.sh-Fixup-help-text-for-forcerescan.patch
a6e0dd
Patch11: sg3_utils_manpage_and_cli_help_message_fixes.patch
a6e0dd
Patch12: BZ_1400491_rescan-scsi-bus.sh_ignore_rev_change.patch
a6e0dd
Patch13: BZ_1359274_sg_logs_fix_inline_help.patch
a6e0dd
Patch14: BZ_1359282_sg_requests_fix_manpage.patch
a6e0dd
Patch15: BZ_1359286_sg_senddiag_fix_help.patch
a6e0dd
Patch16: BZ_1359292_sg_write_buffer_fix_help.patch
a6e0dd
URL: http://sg.danny.cz/sg/sg3_utils.html
a6e0dd
Requires: %{name}-libs = %{version}-%{release}
a6e0dd
a6e0dd
a6e0dd
%description
a6e0dd
Collection of Linux utilities for devices that use the SCSI command set.
a6e0dd
Includes utilities to copy data based on "dd" syntax and semantics (called
a6e0dd
sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check
a6e0dd
mode and log pages (sginfo, sg_modes and sg_logs); spin up and down
a6e0dd
disks (sg_start); do self tests (sg_senddiag); and various other functions.
a6e0dd
See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4
a6e0dd
series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0)
a6e0dd
must be used. In the 2.6 series other device names may be used as
a6e0dd
well (e.g. /dev/sda).
a6e0dd
a6e0dd
Warning: Some of these tools access the internals of your system
a6e0dd
and the incorrect usage of them may render your system inoperable.
a6e0dd
a6e0dd
%package libs
a6e0dd
Summary: Shared library for %{name}
a6e0dd
Group: System Environment/Libraries
a6e0dd
a6e0dd
%description libs
a6e0dd
This package contains the shared library for %{name}.
a6e0dd
a6e0dd
%package devel
a6e0dd
Summary: Development library and header files for the sg3_utils library
a6e0dd
Group: Development/Libraries
a6e0dd
Requires: %{name}-libs = %{version}-%{release}
a6e0dd
Requires: glibc-headers
a6e0dd
a6e0dd
%description devel
a6e0dd
This package contains the %{name} library and its header files for
a6e0dd
developing applications.
a6e0dd
a6e0dd
%prep
a6e0dd
%setup -q
a6e0dd
%patch0 -p1 -b .dev-snapshot
a6e0dd
%patch1 -p1 -b .man-fixes
a6e0dd
%patch2 -p1 -b .mwdevtype
a6e0dd
%patch3 -p1 -b .rmdevnullfix
a6e0dd
%patch4 -p1 -b .mpathsyntaxerr
a6e0dd
%patch5 -p1 -b .upstream1
a6e0dd
%patch6 -p1 -b .upstream2
a6e0dd
%patch7 -p1 -b .typo
a6e0dd
%patch8 -p1 -b .missingopt
a6e0dd
%patch9 -p1 -b .rescan_all_lun
a6e0dd
%patch10 -p1 -b .help_forcerescan_forceremove
a6e0dd
%patch11 -p1 -b .help_and_man_fixes
a6e0dd
%patch12 -p1 -b .ignore_rev_change
a6e0dd
%patch13 -p1 -b .sg_log_inline_help
a6e0dd
%patch14 -p1 -b .sg_requests_man
a6e0dd
%patch15 -p1 -b .sg_senddiag_help
a6e0dd
%patch16 -p1 -b .sg_write_buffer_help
a6e0dd
a6e0dd
%build
a6e0dd
%configure --disable-static
a6e0dd
a6e0dd
# Don't use rpath!
a6e0dd
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
a6e0dd
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
a6e0dd
a6e0dd
make %{?_smp_mflags}
a6e0dd
a6e0dd
a6e0dd
%install
a6e0dd
make install DESTDIR=$RPM_BUILD_ROOT
a6e0dd
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
a6e0dd
a6e0dd
install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir}
a6e0dd
( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf %{rescan_script} scsi-rescan )
a6e0dd
a6e0dd
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man8
a6e0dd
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8
a6e0dd
a6e0dd
a6e0dd
%post libs -p /sbin/ldconfig
a6e0dd
a6e0dd
%postun libs -p /sbin/ldconfig
a6e0dd
a6e0dd
a6e0dd
%files
a6e0dd
%doc AUTHORS BSD_LICENSE COPYING COVERAGE CREDITS ChangeLog README README.sg_start
a6e0dd
%{_bindir}/*
a6e0dd
%{_mandir}/man8/*
a6e0dd
a6e0dd
%files libs
a6e0dd
%doc BSD_LICENSE COPYING
a6e0dd
%{_libdir}/*.so.*
a6e0dd
a6e0dd
%files devel
a6e0dd
%{_includedir}/scsi/*.h
a6e0dd
%{_libdir}/*.so
a6e0dd
a6e0dd
a6e0dd
%changelog
a6e0dd
* Tue Jul 17 2018 Gris Ge <fge@redhat.com> 1.37-17
a6e0dd
- Fix help documents of sg_requests, sg_senddiag and sg_write_buffer.
a6e0dd
  (RHBZ #1359282, #1359286, #1359292)
a6e0dd
a6e0dd
* Mon Jul 16 2018 Gris Ge <fge@redhat.com> 1.37-16
a6e0dd
- Fix inline help of sg_logs. (RHBZ #1359274)
a6e0dd
a6e0dd
* Tue Jun 19 2018 Gris Ge <fge@redhat.com> 1.37-15
a6e0dd
- Massive manapge and cli help message fixes.
a6e0dd
a6e0dd
* Tue Jun 12 2018 Gris Ge <fge@redhat.com> 1.37-14
a6e0dd
- Add '--ignore-rev` option to rescan-scsi-bus.sh.
a6e0dd
  (RHBZ #1400491)
a6e0dd
a6e0dd
* Tue Jun 12 2018 Gris Ge <fge@redhat.com> 1.37-13
a6e0dd
- Add missing short options of sg_test_rwbuf.
a6e0dd
  (RHBZ #1359289)
a6e0dd
a6e0dd
* Wed May 10 2017 Gris Ge <fge@redhat.com> 1.37-12
a6e0dd
- Fix the manpage of `forceremove` and `forcerescan` command.
a6e0dd
  (RHBZ #1360915)
a6e0dd
a6e0dd
* Tue Mar 14 2017 Gris Ge <fge@redhat.com> - 1.37-11
a6e0dd
- Fix the help message of `forceremove` and `forcerescan` command.
a6e0dd
  (RHBZ #1360915)
a6e0dd
a6e0dd
* Tue Mar 07 2017 Gris Ge <fge@redhat.com> - 1.37-10
a6e0dd
- Fix rescan-scsi-bus.sh for scan all luns. (RHBZ #1380744)
a6e0dd
a6e0dd
* Tue Jul 19 2016 Ondrej Vasik <ovasik@redhat.com> - 1.37-9
a6e0dd
- rescan-scsi-bus.sh: document -m/--multipath option (#1357851) 
a6e0dd
a6e0dd
* Thu Jul 14 2016 Josef Ridky <jridky@redhat.com> - 1.37-8
a6e0dd
- rescan-scsi-bus.sh: fix typo in help and man page (#1353941)
a6e0dd
a6e0dd
* Fri Apr 15 2016 David Sommerseth <davids@redhat.com> - 1.37-7
a6e0dd
- Avoid deletion of /dev/null (#1298737)
a6e0dd
- Fix syntax error in rescan-scsi-bus related to multipath flushing (#1255564)
a6e0dd
- Add upstream updates to sg_inq, sg_rdac and sg_vpd (#1170719)
a6e0dd
a6e0dd
* Fri Apr 15 2016 David Sommerseth <davids@redhat.com> - 1.37-6
a6e0dd
- Fix error appearing on device types described with multiple words (#1298739)
a6e0dd
a6e0dd
* Wed Jan 29 2014 Dan Horák <dan@danny.cz> - 1.37-5
a6e0dd
- fix various man pages (#948463)
a6e0dd
- add man page for the rescan-scsi-bus.sh script (#948463)
a6e0dd
- Resolves: #948463
a6e0dd
a6e0dd
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.37-4
a6e0dd
- Mass rebuild 2014-01-24
a6e0dd
a6e0dd
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.37-3
a6e0dd
- Mass rebuild 2013-12-27
a6e0dd
a6e0dd
* Fri Oct 18 2013 Dan Horák <dan@danny.cz> - 1.37-2
a6e0dd
- include fix for #920687
a6e0dd
a6e0dd
* Wed Oct 16 2013 Dan Horák <dan@danny.cz> - 1.37-1
a6e0dd
- update to version 1.37
a6e0dd
- switch to included rescan-scsi-bus script
a6e0dd
a6e0dd
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.36-2
a6e0dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a6e0dd
a6e0dd
* Thu Jun 06 2013 Dan Horák <dan@danny.cz> - 1.36-1
a6e0dd
- update to version 1.36
a6e0dd
- modernize spec
a6e0dd
a6e0dd
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.35-2
a6e0dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a6e0dd
a6e0dd
* Mon Jan 21 2013 Dan Horák <dan@danny.cz> - 1.35-1
a6e0dd
- update to version 1.35
a6e0dd
a6e0dd
* Thu Oct 18 2012 Dan Horák <dan@danny.cz> - 1.34-1
a6e0dd
- update to version 1.34
a6e0dd
a6e0dd
* Fri Sep 14 2012 Dan Horák <dan@danny.cz> - 1.33-4
a6e0dd
- add fix for sg3_utils >= 1.32 to the rescan-scsi-bus script
a6e0dd
a6e0dd
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.33-3
a6e0dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a6e0dd
a6e0dd
* Wed Apr  4 2012 Dan Horák <dan@danny.cz> - 1.33-2
a6e0dd
- include rescan-scsi-bus script 1.56
a6e0dd
a6e0dd
* Tue Apr  3 2012 Dan Horák <dan@danny.cz> - 1.33-1
a6e0dd
- update to version 1.33
a6e0dd
a6e0dd
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.31-2
a6e0dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a6e0dd
a6e0dd
* Fri Feb 18 2011 Dan Horák <dan@danny.cz> - 1.31-1
a6e0dd
- update to version 1.31
a6e0dd
a6e0dd
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.29-3
a6e0dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a6e0dd
a6e0dd
* Thu Jul  8 2010 Dan Horák <dan@danny.cz> - 1.29-2
a6e0dd
- added license texts into -libs subpackage
a6e0dd
a6e0dd
* Mon Apr 12 2010 Dan Horák <dan@danny.cz> - 1.29-1
a6e0dd
- update to version 1.29
a6e0dd
a6e0dd
* Thu Jan 14 2010 Dan Horák <dan@danny.cz> - 1.28-2
a6e0dd
- include rescan-scsi-bus script 1.35
a6e0dd
- rebase patches and add fix for issue mentioned in #538787
a6e0dd
a6e0dd
* Thu Oct 22 2009 Dan Horák <dan@danny.cz> - 1.28-1
a6e0dd
- update to version 1.28
a6e0dd
- added fixes from RHEL to rescan-scsi-bus.sh
a6e0dd
- added scsi-rescan symlink to the rescan-scsi-bus.sh script
a6e0dd
a6e0dd
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.27-2
a6e0dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a6e0dd
a6e0dd
* Tue Apr 28 2009 Dan Horák <dan@danny.cz> - 1.27-1
a6e0dd
- update to version 1.27
a6e0dd
- changelog: http://sg.danny.cz/sg/p/sg3_utils.ChangeLog
a6e0dd
a6e0dd
* Tue Mar 31 2009 Dan Horák <dan@danny.cz> - 1.26-4
a6e0dd
- add dependency between the libs subpackage and the main package (#492921)
a6e0dd
a6e0dd
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26-3
a6e0dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a6e0dd
a6e0dd
* Mon Nov  3 2008 Dan Horák <dan@danny.cz> - 1.26-2
a6e0dd
- update URL
a6e0dd
- include rescan-scsi-bus script 1.29
a6e0dd
a6e0dd
* Mon Jun 30 2008 Dan Horák <dan@danny.cz> - 1.26-1
a6e0dd
- update to upstream version 1.26
a6e0dd
a6e0dd
* Fri Mar 28 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-4
a6e0dd
- Dropped really unnecessary Provides of sg_utils (#226414)
a6e0dd
- Use --disable-static in configure (#226414)
a6e0dd
a6e0dd
* Thu Mar 27 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-3
a6e0dd
- Specfile cleanup, removal of static development libraries (#226414)
a6e0dd
a6e0dd
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.25-2
a6e0dd
- Autorebuild for GCC 4.3
a6e0dd
a6e0dd
* Mon Oct 22 2007 Phil Knirsch <pknirsch@redhat.com> - 1.25-1
a6e0dd
- Fixed URLs
a6e0dd
- Updated to sg3_utils-1.25
a6e0dd
a6e0dd
* Thu Aug 16 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-2
a6e0dd
- License review and update
a6e0dd
a6e0dd
* Fri Feb 02 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-1
a6e0dd
- Update to sg3_utils-1.23
a6e0dd
- Updated summary
a6e0dd
a6e0dd
* Mon Nov 13 2006 Phil Knirsch <pknirsch@redhat.com> - 1.22-1
a6e0dd
- Update to sg3_utils-1.22
a6e0dd
a6e0dd
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.20-2.1
a6e0dd
- rebuild
a6e0dd
a6e0dd
* Wed Jun 07 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-2
a6e0dd
- Fixed rebuild problem on latest toolchain
a6e0dd
- Added missing buildprereqs
a6e0dd
a6e0dd
* Fri May 19 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-1
a6e0dd
- Update to sg3_utils-1.20.
a6e0dd
a6e0dd
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.19-1.1
a6e0dd
- bump again for double-long bug on ppc(64)
a6e0dd
a6e0dd
* Fri Feb 10 2006 Phil Knirsch <pknirsch@redhat.com> - 1.19-1
a6e0dd
- Update to sg3_utils-1.19.
a6e0dd
- Fixed rebuild problem on 64bit archs.
a6e0dd
a6e0dd
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.17-1.1
a6e0dd
- rebuilt for new gcc4.1 snapshot and glibc changes
a6e0dd
a6e0dd
* Mon Nov 07 2005 Phil Knirsch <pknirsch@redhat.com> 1.17-1
a6e0dd
- Update to sg3-utils-1.17
a6e0dd
- Split package up into 3 subpackages: sg3_utils, devel and libs
a6e0dd
- Some minor updates to the specfile
a6e0dd
a6e0dd
* Wed Mar 02 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-5
a6e0dd
- bump release and rebuild with gcc 4
a6e0dd
a6e0dd
* Fri Feb 18 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-4
a6e0dd
- rebuilt
a6e0dd
a6e0dd
* Tue Aug 03 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-3
a6e0dd
- rebuilt
a6e0dd
a6e0dd
* Thu Mar 11 2004 Tim Powers <timp@redhat.com> 1.06-2
a6e0dd
- rebuild
a6e0dd
a6e0dd
* Wed Feb 18 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-1
a6e0dd
- Initial version for RHEL3 U2.
a6e0dd
a6e0dd
* Fri Jan 09 2004 - dgilbert@interlog.com
a6e0dd
- sg3_utils.spec for mandrake; more sginfo work, sg_scan, sg_logs
a6e0dd
  * sg3_utils-1.06
a6e0dd
a6e0dd
* Wed Nov 12 2003 - dgilbert@interlog.com
a6e0dd
- sg_readcap: sizes; sg_logs: double fetch; sg_map 256 sg devices; sginfo
a6e0dd
  * sg3_utils-1.05
a6e0dd
a6e0dd
* Tue May 13 2003 - dgilbert@interlog.com
a6e0dd
- default sg_turs '-n=' to 1, sg_logs gets '-t' for temperature, CREDITS
a6e0dd
  * sg3_utils-1.04
a6e0dd
a6e0dd
* Wed Apr 02 2003 - dgilbert@interlog.com
a6e0dd
- 6 byte CDBs for sg_modes, sg_start on block devs, sg_senddiag, man pages
a6e0dd
  * sg3_utils-1.03
a6e0dd
a6e0dd
* Wed Jan 01 2003 - dgilbert@interlog.com
a6e0dd
- interwork with block SG_IO, fix in sginfo, '-t' for sg_turs
a6e0dd
  * sg3_utils-1.02
a6e0dd
a6e0dd
* Wed Aug 14 2002 - dgilbert@interlog.com
a6e0dd
- raw switch in sg_inq
a6e0dd
  * sg3_utils-1.01
a6e0dd
a6e0dd
* Sun Jul 28 2002 - dgilbert@interlog.com
a6e0dd
- decode sg_logs pages, add dio to sgm_dd, drop "gen=1" arg, "of=/dev/null"
a6e0dd
  * sg3_utils-1.00
a6e0dd
a6e0dd
* Sun Mar 17 2002 - dgilbert@interlog.com
a6e0dd
- add sg_modes+sg_logs for sense pages, expand sg_inq, add fua+sync to sg_dd++
a6e0dd
  * sg3_utils-0.99
a6e0dd
a6e0dd
* Sat Feb 16 2002 - dgilbert@interlog.com
a6e0dd
- resurrect sg_reset; snprintf cleanup, time,gen+cdbsz args to sg_dd++
a6e0dd
  * sg3_utils-0.98
a6e0dd
a6e0dd
* Sun Dec 23 2001 - dgilbert@interlog.com
a6e0dd
- move isosize to archive directory; now found in util-linux-2.10s and later
a6e0dd
  * sg3_utils-0.97
a6e0dd
a6e0dd
* Fri Dec 21 2001 - dgilbert@interlog.com
a6e0dd
- add sgm_dd, sg_read, sg_simple4 and sg_simple16 [add mmap-ed IO support]
a6e0dd
  * sg3_utils-0.96
a6e0dd
a6e0dd
* Sat Sep 15 2001 - dgilbert@interlog.com
a6e0dd
- sg_map can do inquiry; sg_dd, sgp_dd + sgq_dd dio help
a6e0dd
  * sg3_utils-0.95
a6e0dd
a6e0dd
* Thu Apr 19 2001 - dgilbert@interlog.com
a6e0dd
- add sg_start, improve sginfo and sg_map [Kurt Garloff]
a6e0dd
  * sg3_utils-0.94
a6e0dd
a6e0dd
* Mon Mar 5 2001 - dgilbert@interlog.com
a6e0dd
- add scsi_devfs_scan, add sg_include.h, 'coe' more general in sgp_dd
a6e0dd
  * sg3_utils-0.93
a6e0dd
a6e0dd
* Tue Jan 16 2001 - dgilbert@interlog.com
a6e0dd
- clean sg_err.h include dependencies, bug fixes, Makefile in archive directory
a6e0dd
  * sg3_utils-0.92
a6e0dd
a6e0dd
* Thu Dec 21 2000 - dgilbert@interlog.com
a6e0dd
- signals for sg_dd, man pages and additions for sg_rbuf and isosize
a6e0dd
  * sg3_utils-0.91
a6e0dd
a6e0dd
* Mon Dec 11 2000 - dgilbert@interlog.com
a6e0dd
- Initial creation of package, containing
a6e0dd
  * sg3_utils-0.90