ec23797
%define rescan_version 1.35
be43488
%define rescan_script rescan-scsi-bus.sh
32e805b
22ebdb4
Summary: Utilities for devices that use SCSI command sets
cvsdist 2385bc1
Name: sg3_utils
ffece2d
Version: 1.29
651fa3c
Release: 3%{?dist}
f9348da
License: GPLv2+ and BSD
5d41669
Group: Applications/System
32e805b
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tgz
be43488
Source1: http://www.garloff.de/kurt/linux/%{rescan_script}-%{rescan_version}
be43488
Patch100: rescan-scsi-bus-fixes.patch
32e805b
URL: http://sg.danny.cz/sg/sg3_utils.html
94c4a2b
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
912640b
Requires: %{name}-libs = %{version}-%{release}
cvsdist 2385bc1
32e805b
cvsdist 2385bc1
%description
c1bfd9e
Collection of Linux utilities for devices that use the SCSI command set.
c1bfd9e
Includes utilities to copy data based on "dd" syntax and semantics (called
c1bfd9e
sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check
c1bfd9e
mode and log pages (sginfo, sg_modes and sg_logs); spin up and down
c1bfd9e
disks (sg_start); do self tests (sg_senddiag); and various other functions.
c1bfd9e
See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4
c1bfd9e
series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0)
c1bfd9e
must be used. In the 2.6 series other device names may be used as
c1bfd9e
well (e.g. /dev/sda).
c1bfd9e
c1bfd9e
Warning: Some of these tools access the internals of your system
c1bfd9e
and the incorrect usage of them may render your system inoperable.
c1bfd9e
c1bfd9e
%package libs
c1bfd9e
Summary: Shared library for %{name}
5d41669
Group: System Environment/Libraries
c1bfd9e
c1bfd9e
%description libs
c1bfd9e
This package contains the shared library for %{name}.
c1bfd9e
c1bfd9e
%package devel
5d41669
Summary: Development library and header files for the sg3_utils library
9957650
Group: Development/Libraries
c1bfd9e
Requires: %{name}-libs = %{version}-%{release}
9957650
Requires: glibc-headers
c1bfd9e
c1bfd9e
%description devel
5d41669
This package contains the %{name} library and its header files for
c1bfd9e
developing applications.
cvsdist 2385bc1
cvsdist 2385bc1
%prep
c1bfd9e
%setup -q
cvsdist 2385bc1
be43488
# rescan-scsi-bus.sh
be43488
cp -p %{SOURCE1} %{rescan_script}
be43488
%patch100 -p1 -b .orig
be43488
32e805b
cvsdist 2385bc1
%build
67a9d65
%configure --disable-static
9957650
9957650
# Don't use rpath!
9957650
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
9957650
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
9957650
d1300dc
make %{?_smp_mflags}
cvsdist 2385bc1
32e805b
cvsdist 2385bc1
%install
d1300dc
make install DESTDIR=$RPM_BUILD_ROOT
5d41669
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
cvsdist 2385bc1
be43488
install -p -m 755 %{rescan_script} $RPM_BUILD_ROOT%{_bindir}
be43488
( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf %{rescan_script} scsi-rescan )
32e805b
32e805b
cvsdist 2385bc1
%clean
cvsdist 2385bc1
rm -rf $RPM_BUILD_ROOT
cvsdist 2385bc1
32e805b
5d41669
%post libs -p /sbin/ldconfig
5d41669
5d41669
%postun libs -p /sbin/ldconfig
5d41669
32e805b
cvsdist 2385bc1
%files
cvsdist 2385bc1
%defattr(-,root,root)
d1300dc
%doc ChangeLog COVERAGE CREDITS INSTALL README README.sg_start
c1bfd9e
%attr(755,root,root) %{_bindir}/*
c1bfd9e
%{_mandir}/man8/*
cvsdist 2385bc1
c1bfd9e
%files libs
c1bfd9e
%defattr(-,root,root)
9560637
%doc BSD_LICENSE COPYING
c1bfd9e
%{_libdir}/*.so.*
c1bfd9e
c1bfd9e
%files devel
c1bfd9e
%defattr(-,root,root)
c1bfd9e
%{_includedir}/scsi/*.h
c1bfd9e
%{_libdir}/*.so
32e805b
be43488
cvsdist 2385bc1
%changelog
651fa3c
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.29-3
651fa3c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
651fa3c
9560637
* Thu Jul  8 2010 Dan Horák <dan@danny.cz> - 1.29-2
9560637
- added license texts into -libs subpackage
9560637
ffece2d
* Mon Apr 12 2010 Dan Horák <dan@danny.cz> - 1.29-1
ffece2d
- update to version 1.29
ffece2d
ec23797
* Thu Jan 14 2010 Dan Horák <dan@danny.cz> - 1.28-2
ec23797
- include rescan-scsi-bus script 1.35
ec23797
- rebase patches and add fix for issue mentioned in #538787
ec23797
be43488
* Thu Oct 22 2009 Dan Horák <dan@danny.cz> - 1.28-1
be43488
- update to version 1.28
be43488
- added fixes from RHEL to rescan-scsi-bus.sh
be43488
- added scsi-rescan symlink to the rescan-scsi-bus.sh script
be43488
f8dd63d
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.27-2
f8dd63d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f8dd63d
d0e992c
* Tue Apr 28 2009 Dan Horák <dan@danny.cz> - 1.27-1
d0e992c
- update to version 1.27
d0e992c
- changelog: http://sg.danny.cz/sg/p/sg3_utils.ChangeLog
d0e992c
912640b
* Tue Mar 31 2009 Dan Horák <dan@danny.cz> - 1.26-4
912640b
- add dependency between the libs subpackage and the main package (#492921)
912640b
a4f502d
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26-3
a4f502d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
a4f502d
32e805b
* Mon Nov  3 2008 Dan Horák <dan@danny.cz> - 1.26-2
32e805b
- update URL
32e805b
- include rescan-scsi-bus script 1.29
32e805b
32e805b
* Mon Jun 30 2008 Dan Horák <dan@danny.cz> - 1.26-1
9957650
- update to upstream version 1.26
9957650
67a9d65
* Fri Mar 28 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-4
67a9d65
- Dropped really unnecessary Provides of sg_utils (#226414)
67a9d65
- Use --disable-static in configure (#226414)
67a9d65
5d41669
* Thu Mar 27 2008 Phil Knirsch <pknirsch@redhat.com> - 1.25-3
5d41669
- Specfile cleanup, removal of static development libraries (#226414)
5d41669
d776f33
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.25-2
d776f33
- Autorebuild for GCC 4.3
d776f33
d1300dc
* Mon Oct 22 2007 Phil Knirsch <pknirsch@redhat.com> - 1.25-1
d1300dc
- Fixed URLs
d1300dc
- Updated to sg3_utils-1.25
d1300dc
f9348da
* Thu Aug 16 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-2
f9348da
- License review and update
f9348da
22ebdb4
* Fri Feb 02 2007 Phil Knirsch <pknirsch@redhat.com> - 1.23-1
22ebdb4
- Update to sg3_utils-1.23
22ebdb4
- Updated summary
22ebdb4
94c4a2b
* Mon Nov 13 2006 Phil Knirsch <pknirsch@redhat.com> - 1.22-1
94c4a2b
- Update to sg3_utils-1.22
94c4a2b
dc1c08f
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.20-2.1
dc1c08f
- rebuild
dc1c08f
6d71681
* Wed Jun 07 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-2
6d71681
- Fixed rebuild problem on latest toolchain
9854b04
- Added missing buildprereqs
6d71681
2c01f9e
* Fri May 19 2006 Phil Knirsch <pknirsch@redhat.com> - 1.20-1
2c01f9e
- Update to sg3_utils-1.20.
2c01f9e
6a1546e
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.19-1.1
6a1546e
- bump again for double-long bug on ppc(64)
6a1546e
e584f67
* Fri Feb 10 2006 Phil Knirsch <pknirsch@redhat.com> - 1.19-1
6e6d120
- Update to sg3_utils-1.19.
6e6d120
- Fixed rebuild problem on 64bit archs.
e584f67
c01e4d0
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.17-1.1
c01e4d0
- rebuilt for new gcc4.1 snapshot and glibc changes
c01e4d0
c1bfd9e
* Mon Nov 07 2005 Phil Knirsch <pknirsch@redhat.com> 1.17-1
c1bfd9e
- Update to sg3-utils-1.17
c1bfd9e
- Split package up into 3 subpackages: sg3_utils, devel and libs
c1bfd9e
- Some minor updates to the specfile
c1bfd9e
7a5c925
* Wed Mar 02 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-5
7a5c925
- bump release and rebuild with gcc 4
7a5c925
dd498e3
* Fri Feb 18 2005 Phil Knirsch <pknirsch@redhat.com> 1.06-4
dd498e3
- rebuilt
dd498e3
cvsdist 00404d8
* Tue Aug 03 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-3
cvsdist 00404d8
- rebuilt
cvsdist 00404d8
cvsdist 2385bc1
* Thu Mar 11 2004 Tim Powers <timp@redhat.com> 1.06-2
cvsdist 2385bc1
- rebuild
cvsdist 2385bc1
cvsdist 2385bc1
* Wed Feb 18 2004 Phil Knirsch <pknirsch@redhat.com> 1.06-1
cvsdist 2385bc1
- Initial version for RHEL3 U2.
cvsdist 2385bc1
cvsdist 2385bc1
* Fri Jan 09 2004 - dgilbert@interlog.com
cvsdist 2385bc1
- sg3_utils.spec for mandrake; more sginfo work, sg_scan, sg_logs
cvsdist 2385bc1
  * sg3_utils-1.06
cvsdist 2385bc1
cvsdist 2385bc1
* Wed Nov 12 2003 - dgilbert@interlog.com
cvsdist 2385bc1
- sg_readcap: sizes; sg_logs: double fetch; sg_map 256 sg devices; sginfo
cvsdist 2385bc1
  * sg3_utils-1.05
cvsdist 2385bc1
cvsdist 2385bc1
* Tue May 13 2003 - dgilbert@interlog.com
cvsdist 2385bc1
- default sg_turs '-n=' to 1, sg_logs gets '-t' for temperature, CREDITS
cvsdist 2385bc1
  * sg3_utils-1.04
cvsdist 2385bc1
cvsdist 2385bc1
* Wed Apr 02 2003 - dgilbert@interlog.com
cvsdist 2385bc1
- 6 byte CDBs for sg_modes, sg_start on block devs, sg_senddiag, man pages
cvsdist 2385bc1
  * sg3_utils-1.03
cvsdist 2385bc1
cvsdist 2385bc1
* Wed Jan 01 2003 - dgilbert@interlog.com
cvsdist 2385bc1
- interwork with block SG_IO, fix in sginfo, '-t' for sg_turs
cvsdist 2385bc1
  * sg3_utils-1.02
cvsdist 2385bc1
cvsdist 2385bc1
* Wed Aug 14 2002 - dgilbert@interlog.com
cvsdist 2385bc1
- raw switch in sg_inq
cvsdist 2385bc1
  * sg3_utils-1.01
cvsdist 2385bc1
cvsdist 2385bc1
* Sun Jul 28 2002 - dgilbert@interlog.com
cvsdist 2385bc1
- decode sg_logs pages, add dio to sgm_dd, drop "gen=1" arg, "of=/dev/null"
cvsdist 2385bc1
  * sg3_utils-1.00
cvsdist 2385bc1
cvsdist 2385bc1
* Sun Mar 17 2002 - dgilbert@interlog.com
cvsdist 2385bc1
- add sg_modes+sg_logs for sense pages, expand sg_inq, add fua+sync to sg_dd++
cvsdist 2385bc1
  * sg3_utils-0.99
cvsdist 2385bc1
cvsdist 2385bc1
* Sat Feb 16 2002 - dgilbert@interlog.com
cvsdist 2385bc1
- resurrect sg_reset; snprintf cleanup, time,gen+cdbsz args to sg_dd++
cvsdist 2385bc1
  * sg3_utils-0.98
cvsdist 2385bc1
cvsdist 2385bc1
* Sun Dec 23 2001 - dgilbert@interlog.com
cvsdist 2385bc1
- move isosize to archive directory; now found in util-linux-2.10s and later
cvsdist 2385bc1
  * sg3_utils-0.97
cvsdist 2385bc1
cvsdist 2385bc1
* Fri Dec 21 2001 - dgilbert@interlog.com
cvsdist 2385bc1
- add sgm_dd, sg_read, sg_simple4 and sg_simple16 [add mmap-ed IO support]
cvsdist 2385bc1
  * sg3_utils-0.96
cvsdist 2385bc1
cvsdist 2385bc1
* Sun Sep 15 2001 - dgilbert@interlog.com
cvsdist 2385bc1
- sg_map can do inquiry; sg_dd, sgp_dd + sgq_dd dio help
cvsdist 2385bc1
  * sg3_utils-0.95
cvsdist 2385bc1
cvsdist 2385bc1
* Sun Apr 19 2001 - dgilbert@interlog.com
cvsdist 2385bc1
- add sg_start, improve sginfo and sg_map [Kurt Garloff]
cvsdist 2385bc1
  * sg3_utils-0.94
cvsdist 2385bc1
cvsdist 2385bc1
* Sun Mar 5 2001 - dgilbert@interlog.com
cvsdist 2385bc1
- add scsi_devfs_scan, add sg_include.h, 'coe' more general in sgp_dd
cvsdist 2385bc1
  * sg3_utils-0.93
cvsdist 2385bc1
cvsdist 2385bc1
* Tue Jan 16 2001 - dgilbert@interlog.com
cvsdist 2385bc1
- clean sg_err.h include dependencies, bug fixes, Makefile in archive directory
cvsdist 2385bc1
  * sg3_utils-0.92
cvsdist 2385bc1
cvsdist 2385bc1
* Mon Dec 21 2000 - dgilbert@interlog.com
cvsdist 2385bc1
- signals for sg_dd, man pages and additions for sg_rbuf and isosize
cvsdist 2385bc1
  * sg3_utils-0.91
cvsdist 2385bc1
cvsdist 2385bc1
* Mon Dec 11 2000 - dgilbert@interlog.com
cvsdist 2385bc1
- Initial creation of package, containing
cvsdist 2385bc1
  * sg3_utils-0.90