Blame SPECS/sg3_utils.spec

c00092
%global rescan_script rescan-scsi-bus.sh
c00092
c00092
Summary: Utilities for devices that use SCSI command sets
c00092
Name: sg3_utils
c00092
Version: 1.44
55640e
Release: 6%{?dist}
c00092
License: GPLv2+ and BSD
c00092
Group: Applications/System
c00092
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tar.xz
c00092
Source2: scsi-rescan.8
5c0e14
Source10: 40-usb-blacklist.rules
5c0e14
Source11: 59-fc-wwpn-id.rules
c00092
Patch0: BZ_1633235-sg3_utils-1.44-covscan-fix.patch
c61c24
# https://bugzilla.redhat.com/show_bug.cgi?id=1683343
c61c24
# sg_turs: improper usage show
c61c24
Patch1: sg_turs-help.patch
c61c24
# https://bugzilla.redhat.com/show_bug.cgi?id=1627657
c61c24
# sg_raw -V fail
c61c24
Patch2: sg_raw-version.patch
5c0e14
# https://bugzilla.redhat.com/show_bug.cgi?id=1760847
5c0e14
# FC_TARGET_LUN attribute assigned for non FC device
5c0e14
Patch3: fc_wwpn_id-non_FC-devices.patch
55640e
# https://bugzilla.redhat.com/show_bug.cgi?id=2078107
55640e
# sg_ses: --page= is incorrectly overridden when --control and --data= are also used
55640e
Patch4: sg_ses-1.45-page_control_data_args.patch
c00092
URL: http://sg.danny.cz/sg/sg3_utils.html
c00092
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
5c0e14
BuildRequires: systemd
5c0e14
c00092
c00092
c00092
%description
c00092
Collection of Linux utilities for devices that use the SCSI command set.
c00092
Includes utilities to copy data based on "dd" syntax and semantics (called
c00092
sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check
c00092
mode and log pages (sginfo, sg_modes and sg_logs); spin up and down
c00092
disks (sg_start); do self tests (sg_senddiag); and various other functions.
c00092
See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4
c00092
series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0)
c00092
must be used. In the 2.6 series other device names may be used as
c00092
well (e.g. /dev/sda).
c00092
c00092
Warning: Some of these tools access the internals of your system
c00092
and the incorrect usage of them may render your system inoperable.
c00092
c00092
%package libs
c00092
Summary: Shared library for %{name}
c00092
Group: System Environment/Libraries
c00092
c00092
%description libs
c00092
This package contains the shared library for %{name}.
c00092
c00092
%package devel
c00092
Summary: Development library and header files for the sg3_utils library
c00092
Group: Development/Libraries
c00092
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
c00092
c00092
%description devel
c00092
This package contains the %{name} library and its header files for
c00092
developing applications.
c00092
c00092
%prep
c00092
%autosetup -p 1
c00092
c00092
%build
c00092
%configure --disable-static
c00092
c00092
# Don't use rpath!
c00092
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
c00092
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
c00092
c00092
make %{?_smp_mflags}
c00092
c00092
c00092
%install
c00092
make install DESTDIR=$RPM_BUILD_ROOT
c00092
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
c00092
c00092
install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir}
c00092
( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf %{rescan_script} scsi-rescan )
c00092
c00092
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8
c00092
5c0e14
# install all extra udev rules
5c0e14
mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir}
5c0e14
mkdir -p $RPM_BUILD_ROOT/usr/lib/udev
5c0e14
install -p -m 644 scripts/55-scsi-sg3_id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/61-scsi-sg3_id.rules
5c0e14
install -p -m 644 scripts/58-scsi-sg3_symlink.rules $RPM_BUILD_ROOT%{_udevrulesdir}/63-scsi-sg3_symlink.rules
5c0e14
install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_udevrulesdir}
5c0e14
install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_udevrulesdir}/63-fc-wwpn-id.rules
5c0e14
install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/usr/lib/udev
5c0e14
c00092
c00092
%post libs -p /sbin/ldconfig
c00092
c00092
%postun libs -p /sbin/ldconfig
c00092
c00092
c00092
%files
c00092
%doc AUTHORS BSD_LICENSE COPYING COVERAGE CREDITS ChangeLog README README.sg_start
c00092
%{_bindir}/*
c00092
%{_mandir}/man8/*
5c0e14
%{_udevrulesdir}/61-scsi-sg3_id.rules
5c0e14
%{_udevrulesdir}/63-scsi-sg3_symlink.rules
5c0e14
%{_udevrulesdir}/63-fc-wwpn-id.rules
5c0e14
%{_udevrulesdir}/40-usb-blacklist.rules
5c0e14
/usr/lib/udev/*
c00092
c00092
%files libs
c00092
%doc BSD_LICENSE COPYING
c00092
%{_libdir}/*.so.*
c00092
c00092
%files devel
c00092
%{_includedir}/scsi/*.h
c00092
%{_libdir}/*.so
c00092
c00092
c00092
%changelog
55640e
* Wed Jun 08 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.44-6
55640e
- Fix sg_ses --page argument override when --control and --data are specified (#2078107)
55640e
5c0e14
* Thu Jan 02 2020 Tomas Bzatek <tbzatek@redhat.com> - 1.44-5
5c0e14
- Reorder the udev rules to run after 60-persistent-storage.rules (RHBZ #1785062)
5c0e14
5c0e14
* Tue Dec 10 2019 Tomas Bzatek <tbzatek@redhat.com> - 1.44-4
5c0e14
- Enable supplemental udev rules by default (RHBZ #1746414)
5c0e14
c61c24
* Tue May 28 2019 Tomas Bzatek <tbzatek@redhat.com> - 1.44-3
c61c24
- Fix sg_turs help invocation in an old mode (#1683343)
c61c24
- Fix sg_raw printing error about device not specified on version request (#1627657)
c61c24
c00092
* Fri Sep 28 2018 Gris Ge <fge@redhat.com> - 1.44-2
c00092
- Fix coverity scan warninings (RHBZ#1633235)
c00092
c00092
* Tue Sep 18 2018 Gris Ge <fge@redhat.com> - 1.44-1
c00092
- Upgrade to 1.44. (RHBZ#1631347)
c00092
c00092
* Fri Aug 10 2018 Gris Ge <fge@redhat.com> 1.43-0.beta785.1
c00092
- Upgrade to 1.43 beta r785.
c00092
c00092
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-4
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c00092
c00092
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-3
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c00092
c00092
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.42-2
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c00092
c00092
* Tue Feb 21 2017 Than Ngo <than@redhat.com> - 1.42-1
c00092
- bz#1306078, update to 1.42
c00092
- bz#1230493, dropped Requires glibc-headers
c00092
c00092
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.41-4
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c00092
c00092
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.41-3
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c00092
c00092
* Wed Jul 08 2015 David Sommerseth <davids@redhat.com> - 1.41-1
c00092
- updated to version 1.41
c00092
- Corrected day/date mismatches in the changelog
c00092
c00092
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.40-2
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c00092
c00092
* Sat Dec 06 2014 Dan Horák <dan@danny.cz> - 1.40-1
c00092
- update to version 1.40 (#1164172)
c00092
c00092
* Wed Sep 03 2014 Dan Horák <dan@danny.cz> - 1.39-1
c00092
- update to version 1.39 (#1111893)
c00092
c00092
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.38-3
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
c00092
c00092
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.38-2
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c00092
c00092
* Fri Apr 18 2014 Dan Horák <dan@danny.cz> - 1.38-1
c00092
- update to version 1.38 (#1083995)
c00092
- rebuild configure for ppc64le (#1079542)
c00092
c00092
* Wed Jan 29 2014 Dan Horák <dan@danny.cz> - 1.37-3
c00092
- fix various man pages (#948463)
c00092
- add man page for the rescan-scsi-bus.sh script
c00092
c00092
* Fri Oct 18 2013 Dan Horák <dan@danny.cz> - 1.37-2
c00092
- include fix for #920687
c00092
c00092
* Wed Oct 16 2013 Dan Horák <dan@danny.cz> - 1.37-1
c00092
- update to version 1.37
c00092
- switch to included rescan-scsi-bus script
c00092
c00092
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.36-2
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c00092
c00092
* Thu Jun 06 2013 Dan Horák <dan@danny.cz> - 1.36-1
c00092
- update to version 1.36
c00092
- modernize spec
c00092
c00092
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.35-2
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c00092
c00092
* Mon Jan 21 2013 Dan Horák <dan@danny.cz> - 1.35-1
c00092
- update to version 1.35
c00092
c00092
* Thu Oct 18 2012 Dan Horák <dan@danny.cz> - 1.34-1
c00092
- update to version 1.34
c00092
c00092
* Fri Sep 14 2012 Dan Horák <dan@danny.cz> - 1.33-4
c00092
- add fix for sg3_utils >= 1.32 to the rescan-scsi-bus script
c00092
c00092
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.33-3
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c00092
c00092
* Wed Apr  4 2012 Dan Horák <dan@danny.cz> - 1.33-2
c00092
- include rescan-scsi-bus script 1.56
c00092
c00092
* Tue Apr  3 2012 Dan Horák <dan@danny.cz> - 1.33-1
c00092
- update to version 1.33
c00092
c00092
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.31-2
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c00092
c00092
* Fri Feb 18 2011 Dan Horák <dan@danny.cz> - 1.31-1
c00092
- update to version 1.31
c00092
c00092
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.29-3
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c00092
c00092
* Thu Jul  8 2010 Dan Horák <dan@danny.cz> - 1.29-2
c00092
- added license texts into -libs subpackage
c00092
c00092
* Mon Apr 12 2010 Dan Horák <dan@danny.cz> - 1.29-1
c00092
- update to version 1.29
c00092
c00092
* Thu Jan 14 2010 Dan Horák <dan@danny.cz> - 1.28-2
c00092
- include rescan-scsi-bus script 1.35
c00092
- rebase patches and add fix for issue mentioned in #538787
c00092
c00092
* Thu Oct 22 2009 Dan Horák <dan@danny.cz> - 1.28-1
c00092
- update to version 1.28
c00092
- added fixes from RHEL to rescan-scsi-bus.sh
c00092
- added scsi-rescan symlink to the rescan-scsi-bus.sh script
c00092
c00092
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.27-2
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c00092
c00092
* Tue Apr 28 2009 Dan Horák <dan@danny.cz> - 1.27-1
c00092
- update to version 1.27
c00092
- changelog: http://sg.danny.cz/sg/p/sg3_utils.ChangeLog
c00092
c00092
* Tue Mar 31 2009 Dan Horák <dan@danny.cz> - 1.26-4
c00092
- add dependency between the libs subpackage and the main package (#492921)
c00092
c00092
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26-3
c00092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c00092
c00092
* Mon Nov  3 2008 Dan Horák <dan@danny.cz> - 1.26-2
c00092
- update URL
c00092
- include rescan-scsi-bus script 1.29
c00092
c00092
* Mon Jun 30 2008 Dan Horák <dan@danny.cz> - 1.26-1
c00092
- update to upstream version 1.26
c00092
c00092
* Fri Mar 28 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-4
c00092
- Dropped really unnecessary Provides of sg_utils (#226414)
c00092
- Use --disable-static in configure (#226414)
c00092
c00092
* Thu Mar 27 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-3
c00092
- Specfile cleanup, removal of static development libraries (#226414)
c00092
c00092
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.25-2
c00092
- Autorebuild for GCC 4.3
c00092
c00092
* Mon Oct 22 2007 Phil Knirsch <pknirsch@redhat.com> - 1.25-1
c00092
- Fixed URLs
c00092
- Updated to sg3_utils-1.25
c00092
c00092
* Thu Aug 16 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-2
c00092
- License review and update
c00092
c00092
* Fri Feb 02 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-1
c00092
- Update to sg3_utils-1.23
c00092
- Updated summary
c00092
c00092
* Mon Nov 13 2006 Phil Knirsch <pknirsch@redhat.com> - 1.22-1
c00092
- Update to sg3_utils-1.22
c00092
c00092
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.20-2.1
c00092
- rebuild
c00092
c00092
* Wed Jun 07 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-2
c00092
- Fixed rebuild problem on latest toolchain
c00092
- Added missing buildprereqs
c00092
c00092
* Fri May 19 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-1
c00092
- Update to sg3_utils-1.20.
c00092
c00092
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.19-1.1
c00092
- bump again for double-long bug on ppc(64)
c00092
c00092
* Fri Feb 10 2006 Phil Knirsch <pknirsch@redhat.com> - 1.19-1
c00092
- Update to sg3_utils-1.19.
c00092
- Fixed rebuild problem on 64bit archs.
c00092
c00092
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.17-1.1
c00092
- rebuilt for new gcc4.1 snapshot and glibc changes
c00092
c00092
* Mon Nov 07 2005 Phil Knirsch <pknirsch@redhat.com> 1.17-1
c00092
- Update to sg3-utils-1.17
c00092
- Split package up into 3 subpackages: sg3_utils, devel and libs
c00092
- Some minor updates to the specfile
c00092
c00092
* Wed Mar 02 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-5
c00092
- bump release and rebuild with gcc 4
c00092
c00092
* Fri Feb 18 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-4
c00092
- rebuilt
c00092
c00092
* Tue Aug 03 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-3
c00092
- rebuilt
c00092
c00092
* Thu Mar 11 2004 Tim Powers <timp@redhat.com> 1.06-2
c00092
- rebuild
c00092
c00092
* Wed Feb 18 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-1
c00092
- Initial version for RHEL3 U2.
c00092
c00092
* Fri Jan 09 2004 - dgilbert@interlog.com
c00092
- sg3_utils.spec for mandrake; more sginfo work, sg_scan, sg_logs
c00092
  * sg3_utils-1.06
c00092
c00092
* Wed Nov 12 2003 - dgilbert@interlog.com
c00092
- sg_readcap: sizes; sg_logs: double fetch; sg_map 256 sg devices; sginfo
c00092
  * sg3_utils-1.05
c00092
c00092
* Tue May 13 2003 - dgilbert@interlog.com
c00092
- default sg_turs '-n=' to 1, sg_logs gets '-t' for temperature, CREDITS
c00092
  * sg3_utils-1.04
c00092
c00092
* Wed Apr 02 2003 - dgilbert@interlog.com
c00092
- 6 byte CDBs for sg_modes, sg_start on block devs, sg_senddiag, man pages
c00092
  * sg3_utils-1.03
c00092
c00092
* Wed Jan 01 2003 - dgilbert@interlog.com
c00092
- interwork with block SG_IO, fix in sginfo, '-t' for sg_turs
c00092
  * sg3_utils-1.02
c00092
c00092
* Wed Aug 14 2002 - dgilbert@interlog.com
c00092
- raw switch in sg_inq
c00092
  * sg3_utils-1.01
c00092
c00092
* Sun Jul 28 2002 - dgilbert@interlog.com
c00092
- decode sg_logs pages, add dio to sgm_dd, drop "gen=1" arg, "of=/dev/null"
c00092
  * sg3_utils-1.00
c00092
c00092
* Sun Mar 17 2002 - dgilbert@interlog.com
c00092
- add sg_modes+sg_logs for sense pages, expand sg_inq, add fua+sync to sg_dd++
c00092
  * sg3_utils-0.99
c00092
c00092
* Sat Feb 16 2002 - dgilbert@interlog.com
c00092
- resurrect sg_reset; snprintf cleanup, time,gen+cdbsz args to sg_dd++
c00092
  * sg3_utils-0.98
c00092
c00092
* Sun Dec 23 2001 - dgilbert@interlog.com
c00092
- move isosize to archive directory; now found in util-linux-2.10s and later
c00092
  * sg3_utils-0.97
c00092
c00092
* Fri Dec 21 2001 - dgilbert@interlog.com
c00092
- add sgm_dd, sg_read, sg_simple4 and sg_simple16 [add mmap-ed IO support]
c00092
  * sg3_utils-0.96
c00092
c00092
* Sat Sep 15 2001 - dgilbert@interlog.com
c00092
- sg_map can do inquiry; sg_dd, sgp_dd + sgq_dd dio help
c00092
  * sg3_utils-0.95
c00092
c00092
* Thu Apr 19 2001 - dgilbert@interlog.com
c00092
- add sg_start, improve sginfo and sg_map [Kurt Garloff]
c00092
  * sg3_utils-0.94
c00092
c00092
* Mon Mar 5 2001 - dgilbert@interlog.com
c00092
- add scsi_devfs_scan, add sg_include.h, 'coe' more general in sgp_dd
c00092
  * sg3_utils-0.93
c00092
c00092
* Tue Jan 16 2001 - dgilbert@interlog.com
c00092
- clean sg_err.h include dependencies, bug fixes, Makefile in archive directory
c00092
  * sg3_utils-0.92
c00092
c00092
* Thu Dec 21 2000 - dgilbert@interlog.com
c00092
- signals for sg_dd, man pages and additions for sg_rbuf and isosize
c00092
  * sg3_utils-0.91
c00092
c00092
* Mon Dec 11 2000 - dgilbert@interlog.com
c00092
- Initial creation of package, containing
c00092
  * sg3_utils-0.90