%global rescan_script rescan-scsi-bus.sh %global _udevrulesdir /lib/udev/rules.d Summary: Utilities for devices that use SCSI command sets Summary(ja): SCSIコマンドセットを利用するデバイスのためのユーティリティ Name: sg3_utils Version: 1.45 Group: admin-tools Release: 1%{?_dist_release} Vendor: Project Vine Distribution: Vine Linux License: GPLv2+ and BSD URL: http://sg.danny.cz/sg/ Source0: http://sg.danny.cz/sg/p/%{name}-%{version}.tar.xz Source2: scsi-rescan.8 Source10: 40-usb-blacklist.rules Source11: 59-fc-wwpn-id.rules # https://bugzilla.redhat.com/show_bug.cgi?id=1683343 # sg_turs: improper usage show Patch1: sg_turs-help.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1627657 # sg_raw -V fail Patch2: sg_raw-version.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1760847 # FC_TARGET_LUN attribute assigned for non FC device Patch3: fc_wwpn_id-non_FC-devices.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: %{name}-libs = %{version}-%{release} %description Collection of Linux utilities for devices that use the SCSI command set. Includes utilities to copy data based on "dd" syntax and semantics (called sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check mode and log pages (sginfo, sg_modes and sg_logs); spin up and down disks (sg_start); do self tests (sg_senddiag); and various other functions. See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4 series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0) must be used. In the 2.6 series other device names may be used as well (e.g. /dev/sda). Warning: Some of these tools access the internals of your system and the incorrect usage of them may render your system inoperable. %package libs Summary: Shared library for %{name} Summary(ja): %{name} の共有ライブラリ Group: system %description libs This package contains the shared library for %{name}. %package devel Summary: Development library and header files for the sg3_utils library Summary(ja): %{name} ライブラリの開発ファイル Group: programming Requires: %{name}-libs = %{version}-%{release} Requires: glibc-headers %description devel This package contains the %{name} library and its header files for developing applications. %prep %setup -q %autosetup -p 1 %build %configure --disable-static # Don't use rpath! sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir} ( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf %{rescan_script} scsi-rescan ) install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8 # install all extra udev rules mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir} mkdir -p $RPM_BUILD_ROOT/lib/udev # need to run after 60-persistent-storage.rules install -p -m 644 scripts/55-scsi-sg3_id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/61-scsi-sg3_id.rules # need to run after 62-multipath.rules install -p -m 644 scripts/58-scsi-sg3_symlink.rules $RPM_BUILD_ROOT%{_udevrulesdir}/63-scsi-sg3_symlink.rules install -p -m 644 scripts/59-scsi-cciss_id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/65-scsi-cciss_id.rules install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_udevrulesdir} install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_udevrulesdir}/63-fc-wwpn-id.rules install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/lib/udev/ %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-,root,root) %license COPYING %doc ChangeLog COVERAGE CREDITS INSTALL README README.iscsi README.sg_start %attr(755,root,root) %{_bindir}/* %{_bindir}/* %{_mandir}/man8/* %{_udevrulesdir}/61-scsi-sg3_id.rules %{_udevrulesdir}/63-scsi-sg3_symlink.rules %{_udevrulesdir}/63-fc-wwpn-id.rules %{_udevrulesdir}/65-scsi-cciss_id.rules %{_udevrulesdir}/40-usb-blacklist.rules /lib/udev/fc_wwpn_id %files libs %defattr(-,root,root) %{_libdir}/*.so.* %files devel %defattr(-,root,root) %{_includedir}/scsi/*.h %{_libdir}/*.so %changelog * Mon Aug 10 2020 Tomohiro "Tomo-p" KATO 1.45-1 - new upstream release. * Sat Jan 04 2014 Yoji TOYODA 1.37-1 - update to 1.37 * Fri May 27 2011 Daisuke SUZUKI 1.27-2 - rebuild for Vine 6 * Mon Oct 19 2009 Daisuke SUZUKI 1.27-1 - initial build for Vine Linux * Sun Jul 26 2009 Fedora Release Engineering - 1.27-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Apr 28 2009 Dan Horák - 1.27-1 - update to version 1.27 - changelog: http://sg.danny.cz/sg/p/sg3_utils.ChangeLog * Tue Mar 31 2009 Dan Horák - 1.26-4 - add dependency between the libs subpackage and the main package (#492921) * Wed Feb 25 2009 Fedora Release Engineering - 1.26-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Nov 3 2008 Dan Horák - 1.26-2 - update URL - include rescan-scsi-bus script 1.29 * Mon Jun 30 2008 Dan Horák - 1.26-1 - update to upstream version 1.26 * Fri Mar 28 2008 Phil Knirsch - 1.25-4 - Dropped really unnecessary Provides of sg_utils (#226414) - Use --disable-static in configure (#226414) * Thu Mar 27 2008 Phil Knirsch - 1.25-3 - Specfile cleanup, removal of static development libraries (#226414) * Tue Feb 19 2008 Fedora Release Engineering - 1.25-2 - Autorebuild for GCC 4.3 * Mon Oct 22 2007 Phil Knirsch - 1.25-1 - Fixed URLs - Updated to sg3_utils-1.25 * Thu Aug 16 2007 Phil Knirsch - 1.23-2 - License review and update * Fri Feb 02 2007 Phil Knirsch - 1.23-1 - Update to sg3_utils-1.23 - Updated summary * Mon Nov 13 2006 Phil Knirsch - 1.22-1 - Update to sg3_utils-1.22 * Wed Jul 12 2006 Jesse Keating - 1.20-2.1 - rebuild * Wed Jun 07 2006 Phil Knirsch - 1.20-2 - Fixed rebuild problem on latest toolchain - Added missing buildprereqs * Fri May 19 2006 Phil Knirsch - 1.20-1 - Update to sg3_utils-1.20. * Fri Feb 10 2006 Jesse Keating - 1.19-1.1 - bump again for double-long bug on ppc(64) * Fri Feb 10 2006 Phil Knirsch - 1.19-1 - Update to sg3_utils-1.19. - Fixed rebuild problem on 64bit archs. * Tue Feb 07 2006 Jesse Keating - 1.17-1.1 - rebuilt for new gcc4.1 snapshot and glibc changes * Mon Nov 07 2005 Phil Knirsch 1.17-1 - Update to sg3-utils-1.17 - Split package up into 3 subpackages: sg3_utils, devel and libs - Some minor updates to the specfile * Wed Mar 02 2005 Phil Knirsch 1.06-5 - bump release and rebuild with gcc 4 * Fri Feb 18 2005 Phil Knirsch 1.06-4 - rebuilt * Tue Aug 03 2004 Phil Knirsch 1.06-3 - rebuilt * Thu Mar 11 2004 Tim Powers 1.06-2 - rebuild * Wed Feb 18 2004 Phil Knirsch 1.06-1 - Initial version for RHEL3 U2. * Fri Jan 09 2004 - dgilbert@interlog.com - sg3_utils.spec for mandrake; more sginfo work, sg_scan, sg_logs * sg3_utils-1.06 * Wed Nov 12 2003 - dgilbert@interlog.com - sg_readcap: sizes; sg_logs: double fetch; sg_map 256 sg devices; sginfo * sg3_utils-1.05 * Tue May 13 2003 - dgilbert@interlog.com - default sg_turs '-n=' to 1, sg_logs gets '-t' for temperature, CREDITS * sg3_utils-1.04 * Wed Apr 02 2003 - dgilbert@interlog.com - 6 byte CDBs for sg_modes, sg_start on block devs, sg_senddiag, man pages * sg3_utils-1.03 * Wed Jan 01 2003 - dgilbert@interlog.com - interwork with block SG_IO, fix in sginfo, '-t' for sg_turs * sg3_utils-1.02 * Wed Aug 14 2002 - dgilbert@interlog.com - raw switch in sg_inq * sg3_utils-1.01 * Sun Jul 28 2002 - dgilbert@interlog.com - decode sg_logs pages, add dio to sgm_dd, drop "gen=1" arg, "of=/dev/null" * sg3_utils-1.00 * Sun Mar 17 2002 - dgilbert@interlog.com - add sg_modes+sg_logs for sense pages, expand sg_inq, add fua+sync to sg_dd++ * sg3_utils-0.99 * Sat Feb 16 2002 - dgilbert@interlog.com - resurrect sg_reset; snprintf cleanup, time,gen+cdbsz args to sg_dd++ * sg3_utils-0.98 * Sun Dec 23 2001 - dgilbert@interlog.com - move isosize to archive directory; now found in util-linux-2.10s and later * sg3_utils-0.97 * Fri Dec 21 2001 - dgilbert@interlog.com - add sgm_dd, sg_read, sg_simple4 and sg_simple16 [add mmap-ed IO support] * sg3_utils-0.96 * Sat Sep 15 2001 - dgilbert@interlog.com - sg_map can do inquiry; sg_dd, sgp_dd + sgq_dd dio help * sg3_utils-0.95 * Thu Apr 19 2001 - dgilbert@interlog.com - add sg_start, improve sginfo and sg_map [Kurt Garloff] * sg3_utils-0.94 * Mon Mar 5 2001 - dgilbert@interlog.com - add scsi_devfs_scan, add sg_include.h, 'coe' more general in sgp_dd * sg3_utils-0.93 * Tue Jan 16 2001 - dgilbert@interlog.com - clean sg_err.h include dependencies, bug fixes, Makefile in archive directory * sg3_utils-0.92 * Thu Dec 21 2000 - dgilbert@interlog.com - signals for sg_dd, man pages and additions for sg_rbuf and isosize * sg3_utils-0.91 * Mon Dec 11 2000 - dgilbert@interlog.com - Initial creation of package, containing * sg3_utils-0.90