From 5137362a1dc84832c9ec2b3090ec9b64d3843fe0 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Tue, 30 Mar 2021 18:31:44 +0200 Subject: [PATCH] * Tue Mar 30 2021 Tomas Bzatek - 1.46-1 - update to version 1.46 --- .gitignore | 1 + 40-usb-blacklist.rules | 14 -------------- 59-fc-wwpn-id.rules | 17 ----------------- fc_wwpn_id-non_FC-devices.patch | 25 ------------------------- sg3_utils.spec | 22 +++++++--------------- sg_raw-version.patch | 28 ---------------------------- sg_turs-help.patch | 24 ------------------------ sources | 2 +- 8 files changed, 9 insertions(+), 124 deletions(-) delete mode 100644 40-usb-blacklist.rules delete mode 100644 59-fc-wwpn-id.rules delete mode 100644 fc_wwpn_id-non_FC-devices.patch delete mode 100644 sg_raw-version.patch delete mode 100644 sg_turs-help.patch diff --git a/.gitignore b/.gitignore index 32b525f..27f7c31 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ rescan-scsi-bus.sh-1.35 /sg3_utils-1.42.tar.xz /sg3_utils-1.44.tar.xz /sg3_utils-1.45.tar.xz +/sg3_utils-1.46.tar.xz diff --git a/40-usb-blacklist.rules b/40-usb-blacklist.rules deleted file mode 100644 index 6cce3e6..0000000 --- a/40-usb-blacklist.rules +++ /dev/null @@ -1,14 +0,0 @@ -# -# Blacklist specific USB devices -# -# don't inquire sn and di on broken devices (https://bugzilla.suse.com/show_bug.cgi?id=840054) - -ACTION!="add|change", GOTO="usb_blacklist_end" -KERNEL!="sd*[!0-9]|sr*", GOTO="usb_blacklist_end" - -# unkown device -ATTRS{idVendor}=="0aec", ATTRS{idProduct}=="3260", ENV{ID_SCSI_INQUIRY}="1" -# Sony/JMicron port replicator -ATTRS{idVendor}=="054c", ATTRS{idProduct}=="06a0", ENV{ID_SCSI_INQUIRY}="1" - -LABEL="usb_blacklist_end" diff --git a/59-fc-wwpn-id.rules b/59-fc-wwpn-id.rules deleted file mode 100644 index 5ad0a5c..0000000 --- a/59-fc-wwpn-id.rules +++ /dev/null @@ -1,17 +0,0 @@ -# -# FC WWPN-based by-path links -# - -ACTION!="add|change", GOTO="fc_wwpn_end" -KERNEL!="sd*", GOTO="fc_wwpn_end" - -ENV{DEVTYPE}=="disk", IMPORT{program}="fc_wwpn_id %p" -ENV{DEVTYPE}=="partition", IMPORT{parent}="FC_*" -ENV{FC_TARGET_WWPN}!="?*", GOTO="fc_wwpn_end" -ENV{FC_INITIATOR_WWPN}!="?*", GOTO="fc_wwpn_end" -ENV{FC_TARGET_LUN}!="?*", GOTO="fc_wwpn_end" - -ENV{DEVTYPE}=="disk", SYMLINK+="disk/by-path/fc-$env{FC_INITIATOR_WWPN}-$env{FC_TARGET_WWPN}-lun-$env{FC_TARGET_LUN}" -ENV{DEVTYPE}=="partition", SYMLINK+="disk/by-path/fc-$env{FC_INITIATOR_WWPN}-$env{FC_TARGET_WWPN}-lun-$env{FC_TARGET_LUN}-part%n" - -LABEL="fc_wwpn_end" diff --git a/fc_wwpn_id-non_FC-devices.patch b/fc_wwpn_id-non_FC-devices.patch deleted file mode 100644 index 6bff83a..0000000 --- a/fc_wwpn_id-non_FC-devices.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 37b8af8278bba0b116b579950218f2e610a2ab2b Mon Sep 17 00:00:00 2001 -From: jtpittman195 -Date: Fri, 4 Oct 2019 10:58:24 -0400 -Subject: [PATCH] fc_wwpn_id: add condition to FC_TARGET_LUN return - -If there is no relevant fc_remote_port or fc_host found, there is no need to return the target_lun number. Returning with no condition causes a FC_TARGET_LUN value to be present in the udev database for devices that are not fibre attached. Add condition to check. ---- - scripts/fc_wwpn_id | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/scripts/fc_wwpn_id b/scripts/fc_wwpn_id -index c8d0189..b05c5e8 100644 ---- a/scripts/fc_wwpn_id -+++ b/scripts/fc_wwpn_id -@@ -38,7 +38,9 @@ while [ -n "$d" ] ; do - esac - done - --echo "FC_TARGET_LUN=$target_lun" -+if [ -n "$rport_wwpn" ] || [ -n "$host_wwpn" ] ; then -+ echo "FC_TARGET_LUN=$target_lun" -+fi - - if [ -n "$rport_wwpn" ] ; then - echo "FC_TARGET_WWPN=$rport_wwpn" diff --git a/sg3_utils.spec b/sg3_utils.spec index a8d429d..1603e2b 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -2,22 +2,11 @@ Summary: Utilities for devices that use SCSI command sets Name: sg3_utils -Version: 1.45 -Release: 4%{?dist} +Version: 1.46 +Release: 1%{?dist} License: GPLv2+ and BSD Source0: http://sg.danny.cz/sg/p/sg3_utils-%{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 URL: http://sg.danny.cz/sg/sg3_utils.html Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -79,13 +68,13 @@ 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/usr/lib/udev +install -p -m 644 scripts/40-usb-blacklist.rules $RPM_BUILD_ROOT%{_udevrulesdir} # 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 644 scripts/59-fc-wwpn-id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/63-fc-wwpn-id.rules install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/usr/lib/udev %files @@ -109,6 +98,9 @@ install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/usr/lib/udev %changelog +* Tue Mar 30 2021 Tomas Bzatek - 1.46-1 +- update to version 1.46 + * Wed Jan 27 2021 Fedora Release Engineering - 1.45-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sg_raw-version.patch b/sg_raw-version.patch deleted file mode 100644 index ab5cb6a..0000000 --- a/sg_raw-version.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c683e6e2bc62b43c140934b919323d107b0a48cb Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Tue, 28 May 2019 16:06:06 +0200 -Subject: [PATCH] sg_raw: do not print error about device not specified on - version request - ---- - src/sg_raw.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/sg_raw.c b/src/sg_raw.c -index 33a85f7c..453ff42a 100644 ---- a/src/sg_raw.c -+++ b/src/sg_raw.c -@@ -440,6 +440,13 @@ parse_cmd_line(struct opts_t * op, int argc, char *argv[]) - } - } - -+ if (op->version_given -+#ifdef DEBUG -+ && ! op->verbose_given -+#endif -+ ) -+ return 0; -+ - if (optind >= argc) { - pr2serr("No device specified\n\n"); - return SG_LIB_SYNTAX_ERROR; diff --git a/sg_turs-help.patch b/sg_turs-help.patch deleted file mode 100644 index da7de09..0000000 --- a/sg_turs-help.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 116e665ddb7b38bb8f7065ddb08192bd3551897d Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Tue, 26 Feb 2019 16:45:59 +0100 -Subject: [PATCH] sg_turs: fix help invocation in the old mode - -In the old mode the usage was printed out twice when called -by `sg_turs -O -?`. ---- - src/sg_turs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/sg_turs.c b/src/sg_turs.c -index 8c6e3792..a318d22c 100644 ---- a/src/sg_turs.c -+++ b/src/sg_turs.c -@@ -252,7 +252,7 @@ old_parse_cmd_line(struct opts_t * op, int argc, char * argv[]) - op->version_given = true; - break; - case '?': -- usage_old(); -+ ++op->do_help; - return 0; - default: - jmp_out = true; diff --git a/sources b/sources index 16c3ed7..bea802b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sg3_utils-1.45.tar.xz) = fa25dedc447154d33937248a856af9a7ef380dda282a681d465a57d7dfc24b6c0409fa06aabf8cc28ba191e91db80fed0757b45212eddf713855574b48a97868 +SHA512 (sg3_utils-1.46.tar.xz) = 0b4caab97ccc11fb45e88219e460b37c6ff69b8f3c79e513279aef51783ff22399d141253abdbf55db198db0815bc39d30e9b1e3bd7dda5e15c5f4dae3fe89cf