* Mon May 17 2021 Tomas Bzatek <tbzatek@redhat.com> - 1.47-1

- update to pre-release version 1.47 (svn: r900)

Resolves: #1950055
This commit is contained in:
Tomas Bzatek 2021-05-17 19:33:43 +02:00
parent 32359414c6
commit 3dc0d11139
8 changed files with 14 additions and 128 deletions

1
.gitignore vendored
View File

@ -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.47r900.tgz

View File

@ -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"

View File

@ -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"

View File

@ -1,25 +0,0 @@
From 37b8af8278bba0b116b579950218f2e610a2ab2b Mon Sep 17 00:00:00 2001
From: jtpittman195 <jpittman@redhat.com>
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"

View File

@ -1,23 +1,13 @@
%global rescan_script rescan-scsi-bus.sh
%global _udevlibdir %{_prefix}/lib/udev
Summary: Utilities for devices that use SCSI command sets
Name: sg3_utils
Version: 1.45
Release: 5%{?dist}
Version: 1.47
Release: 1%{?dist}
License: GPLv2+ and BSD
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tar.xz
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}r900.tgz
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}
@ -55,7 +45,7 @@ This package contains the %{name} library and its header files for
developing applications.
%prep
%autosetup -p 1
%autosetup -p 1 -n sg3_utils-%{version}r900
%build
%configure --disable-static
@ -79,14 +69,14 @@ 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 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/usr/lib/udev
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%{_udevlibdir}
%files
%doc AUTHORS BSD_LICENSE COPYING COVERAGE CREDITS ChangeLog README README.sg_start
@ -97,7 +87,7 @@ install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/usr/lib/udev
%{_udevrulesdir}/63-fc-wwpn-id.rules
%{_udevrulesdir}/65-scsi-cciss_id.rules
%{_udevrulesdir}/40-usb-blacklist.rules
/usr/lib/udev/fc_wwpn_id
%{_udevlibdir}/fc_wwpn_id
%files libs
%doc BSD_LICENSE COPYING
@ -109,6 +99,9 @@ install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/usr/lib/udev
%changelog
* Mon May 17 2021 Tomas Bzatek <tbzatek@redhat.com> - 1.47-1
- update to pre-release version 1.47 (svn: r900)
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.45-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937

View File

@ -1,28 +0,0 @@
From c683e6e2bc62b43c140934b919323d107b0a48cb Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
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;

View File

@ -1,24 +0,0 @@
From 116e665ddb7b38bb8f7065ddb08192bd3551897d Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
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;

View File

@ -1 +1 @@
SHA512 (sg3_utils-1.45.tar.xz) = fa25dedc447154d33937248a856af9a7ef380dda282a681d465a57d7dfc24b6c0409fa06aabf8cc28ba191e91db80fed0757b45212eddf713855574b48a97868
SHA512 (sg3_utils-1.47r900.tgz) = f4efad702ec423199270a060ec15fafd7d432f68adbf4af9261ae7a7f6dba0708377ae7c5ae667f3a34a51a967bbf5330810d850976816544c669d0c6ca66ff4