]> TLD Linux GIT Repositories - packages/sg3_utils.git/commitdiff
- missing patch master
authorMarcin Krol <hawk@tld-linux.org>
Wed, 24 Apr 2024 23:50:16 +0000 (01:50 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 24 Apr 2024 23:50:16 +0000 (01:50 +0200)
sg3_utils-rescan-scsi-bus.sh.patch [new file with mode: 0644]
sg3_utils.spec

diff --git a/sg3_utils-rescan-scsi-bus.sh.patch b/sg3_utils-rescan-scsi-bus.sh.patch
new file mode 100644 (file)
index 0000000..1a0da7f
--- /dev/null
@@ -0,0 +1,11 @@
+diff -ruNp sg3_utils-1.42.orig/scripts/rescan-scsi-bus.sh sg3_utils-1.42/scripts/rescan-scsi-bus.sh
+--- sg3_utils-1.42.orig/scripts/rescan-scsi-bus.sh     2016-02-02 05:21:27.000000000 +0100
++++ sg3_utils-1.42/scripts/rescan-scsi-bus.sh  2018-02-08 12:17:16.792117671 +0100
+@@ -241,6 +241,7 @@ testonline ()
+   sg_turs /dev/$SGDEV >/dev/null 2>&1
+   RC=$?
++  ctr=0
+   # Handle in progress of becoming ready and unit attention
+   while test $RC = 2 -o $RC = 6 && test $ctr -le 30; do
+     if test $RC = 2 -a "$RMB" != "1"; then echo -n "."; let LN+=1; sleep 1
index 61f9a6a3336d070c13579db59cd9a69918a10bef..8f8d1406c845fad8f66d8c59a5d1dab837e3e700 100644 (file)
@@ -1,21 +1,27 @@
+#
+# Conditional build:
+%bcond_without static_libs     # static library
+
 Summary:       Utilities and test programs for the Linux sg version 3 device driver
 Summary(pl.UTF-8):     Programy narzędziowe i testowe dla linuksowego sterownika sg w wersji 3
 Name:          sg3_utils
-Version:       1.45
+Version:       1.48
 Release:       1
 License:       GPL v2 (utilities), BSD (library)
 Group:         Applications/System
 Source0:       http://sg.danny.cz/sg/p/%{name}-%{version}.tar.xz
-# Source0-md5: 3a1ba25fe7b43577de4a5c1edb018526
+# Source0-md5: 0024393d2d2942cc081ce613d98db68a
+Patch0:                %{name}-rescan-scsi-bus.sh.patch
 URL:           http://sg.danny.cz/sg/sg3_utils.html
+BuildRequires: rpmbuild(macros) >= 1.527
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
 # see scripts/rescan-scsi-bus.sh /Id:
 Provides:      rescan-scsi-bus = 1.57
 Provides:      sg_utils
 Obsoletes:     rescan-scsi-bus < 1.57
-Obsoletes:     scsiutils
-Obsoletes:     sg_utils
+Obsoletes:     scsiutils < 1.8
+Obsoletes:     sg_utils < 1.03
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %undefine      __cxx
@@ -75,7 +81,8 @@ Reguły udev dla sg3_utils
 cp -p scripts/README README.scripts
 
 %build
-%configure
+%configure \
+       %{__enable_disable static_libs static}
 %{__make}
 
 %install
@@ -112,6 +119,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/rescan-scsi-bus.sh.8*
 %{_mandir}/man8/scsi_*.8*
 %{_mandir}/man8/sg3_utils.8*
+%{_mandir}/man8/sg3_utils_json.8*
 %{_mandir}/man8/sg_*.8*
 %{_mandir}/man8/sginfo.8*
 %{_mandir}/man8/sgm_dd.8*
@@ -122,12 +130,15 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libsgutils2.so
 %{_includedir}/scsi/sg_*.h
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libsgutils2.a
+%endif
 
 %files udev
 %defattr(644,root,root,755)
+/lib/udev/rules.d/00-scsi-sg3_config.rules
 /lib/udev/rules.d/40-usb-blacklist.rules
 /lib/udev/rules.d/54-before-scsi-sg3_id.rules
 /lib/udev/rules.d/55-scsi-sg3_id.rules