From 9e5f2af896e3bea9030a1222eb5763f0913fff5a Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 10 Jul 2023 13:20:54 +0200 Subject: [PATCH 1/3] - updated to 1.47 --- sg3_utils.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sg3_utils.spec b/sg3_utils.spec index 61f9a6a..b343a26 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -1,12 +1,12 @@ 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.47 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: c9e95d3b0e106514aefaae17f58a30f9 URL: http://sg.danny.cz/sg/sg3_utils.html BuildRequires: tar >= 1:1.22 BuildRequires: xz -- 2.44.0 From cd35ce233cc4fd097e82c022d417a88b04fb6aab Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 25 Apr 2024 01:37:09 +0200 Subject: [PATCH 2/3] - merged 1.48 from PLD --- sg3_utils.spec | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sg3_utils.spec b/sg3_utils.spec index b343a26..8f8d140 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -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.47 +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: c9e95d3b0e106514aefaae17f58a30f9 +# 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 -- 2.44.0 From 3fc054f67ef3ec90c0c45fb513e18d89b43a1a38 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 25 Apr 2024 01:50:16 +0200 Subject: [PATCH 3/3] - missing patch --- sg3_utils-rescan-scsi-bus.sh.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sg3_utils-rescan-scsi-bus.sh.patch diff --git a/sg3_utils-rescan-scsi-bus.sh.patch b/sg3_utils-rescan-scsi-bus.sh.patch new file mode 100644 index 0000000..1a0da7f --- /dev/null +++ b/sg3_utils-rescan-scsi-bus.sh.patch @@ -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 -- 2.44.0