public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/sg3_utils] rawhide: * Wed Sep 23 2026 Paul Evans <pevans@redhat.com> - 1.49-2
@ 2026-09-30 8:29 Paul Evans
0 siblings, 0 replies; only message in thread
From: Paul Evans @ 2026-09-30 8:29 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/sg3_utils
Branch : rawhide
Commit : 0c84c1e57a9078d75048e88178768723cfc36ff7
Author : Paul Evans <pevans@redhat.com>
Date : 2026-09-23T16:40:16+01:00
Stats : +353/-1 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/sg3_utils/c/0c84c1e57a9078d75048e88178768723cfc36ff7?branch=rawhide
Log:
* Wed Sep 23 2026 Paul Evans <pevans@redhat.com> - 1.49-2
- rescan-scsi-bus.sh.8 manpage links to external domain (RHEL-259877)
- sg_inq: avoid including NULL-bytes in SCSI name strings (RHEL-260341)
- sg_dd: --help argument emitting extra error lines (and bad exit code) (RHEL-261987)
- sg_inq: handle forward-slash in SCSI_VENDOR and SCSI_MODEL field on export (RHEL-266581)
---
diff --git a/RHEL-259877-1-rescan-scsi-bus.sh.8-add-description-and-examples.patch b/RHEL-259877-1-rescan-scsi-bus.sh.8-add-description-and-examples.patch
new file mode 100644
index 0000000..cd71832
--- /dev/null
+++ b/RHEL-259877-1-rescan-scsi-bus.sh.8-add-description-and-examples.patch
@@ -0,0 +1,109 @@
+From a75bbdb9330b3672a0f8bfd6c13e873dca5cc5fc Mon Sep 17 00:00:00 2001
+From: Paul Evans <pevans@redhat.com>
+Date: Mon, 14 Sep 2026 16:19:34 +0100
+Subject: [PATCH] rescan-scsi-bus.sh.8: add description and examples
+
+Add a DESCRIPTION section and an EXAMPLES section covering common
+invocations (default scan, -a, -d, -f, -s and -i) with representative
+output, so the man page is self-contained rather than relying on an
+external reference.
+
+Signed-off-by: Paul Evans <pevans@redhat.com>
+---
+ doc/rescan-scsi-bus.sh.8 | 71 +++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 67 insertions(+), 4 deletions(-)
+
+diff --git a/doc/rescan-scsi-bus.sh.8 b/doc/rescan-scsi-bus.sh.8
+index 6443c9c7..1f956204 100644
+--- a/doc/rescan-scsi-bus.sh.8
++++ b/doc/rescan-scsi-bus.sh.8
+@@ -11,10 +11,16 @@ rescan\-scsi\-bus.sh \- script to add and remove SCSI devices without rebooting
+ [\fI\-I SECS\fR] [\fI\-l\fR] [\fI\-L NUM\fR] [\fI\-\-largelun\fR]
+ [\fI\-\-luns=LLIST\fR] [\fI\-m\fR] [\fI\-\-multipath\fR]
+ [\fI\-\-no\-lip\-scan\fR] [\fI\-\-nooptscan\fR] [\fI\-\-nosync\fR]
+-[\fI\-\-remove\fR] [\fI\-\-removelun2\fR] [\fI\-\-resize\fR]
++[\fI\-\-remove\fR] [\fI\-\-reportlun2\fR] [\fI\-\-resize\fR]
+ [\fI\-\-sparselun\fR] [\fI\-\-sync\fR] [\fI\-\-timeout=SECS\fR]
+ [\fI\-\-update\fR] [\fI\-\-version\fR] [\fI\-\-wide\fR]
+ [\fIHOST1 \fR[\fIHOST2 \fR...]]
++.SH DESCRIPTION
++This script, which is part of the sg3_utils package, can automatically update
++the logical unit configuration of the host as needed (e.g. after a device has
++been added to, or removed from, the system) without the need for a reboot. On
++supported (e.g. FibreChannel) devices it can also perform an issue_lip (loop
++initialization primitive).
+ .SH OPTIONS
+ Option are ordered by their long name. Those without a long name are ordered
+ as if their single letter was a long name.
+@@ -128,8 +134,65 @@ form:
+ .PP
+ which is a comma separated list of single values and/or ranges (no spaces
+ allowed).
+-.SH SEE ALSO
+-There is a brief description here:
+-https://fibrevillage.com/storage/585\-rescan\-scsi\-bus\-sh\-script\-for\-adding\-and\-removing\-scsi\-devices\-without\-rebooting
++.SH EXAMPLES
++By default the script scans the SCSI subsystem for new devices:
++.PP
++.RS
++# rescan\-scsi\-bus.sh
++.RE
++.PP
++Typical output resembles the following (abridged):
++.PP
++.RS
++.nf
++Scanning SCSI subsystem for new devices
++Scanning host 0 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
++ Calling udevadm settle (can take a while)
++ Scanning for device 0 0 0 0 ...
++OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00
++ Vendor: ServeRA Model: 8k\-l Mirror Rev: V1.0
++ Type: Direct\-Access ANSI SCSI revision: 02
++ Scanning for device 0 1 0 0 ...
++NEW: Host: scsi0 Channel: 01 Id: 00 Lun: 00
++2 new or changed device(s) found.
++ [0:1:0:0]
++ [0:1:1:0]
++0 remapped or resized device(s) found.
++0 device(s) removed.
++.fi
++.RE
++.PP
++To scan all targets, not just those that currently exist, use the
++\fB\-\-alltargets\fR (\fB\-a\fR) option:
++.PP
++.RS
++# rescan\-scsi\-bus.sh \-a
++.RE
++.PP
++To enable debug (verbose) output, which is handy when diagnosing a SCSI
++subsystem problem, use the \fB\-d\fR option:
+ .PP
++.RS
++# rescan\-scsi\-bus.sh \-d
++.RE
++.PP
++To flush failed multipath devices, use the \fB\-\-flush\fR (\fB\-f\fR) option:
++.PP
++.RS
++# rescan\-scsi\-bus.sh \-f
++.RE
++.PP
++To look for resized disks, use the \fB\-\-resize\fR (\fB\-s\fR) option:
++.PP
++.RS
++# rescan\-scsi\-bus.sh \-s
++.RE
++.PP
++To issue a FibreChannel LIP reset, use the \fB\-\-issue\-lip\fR (\fB\-i\fR)
++option:
++.PP
++.RS
++# rescan\-scsi\-bus.sh \-i
++.RE
++.SH SEE ALSO
+ \fBsg3_utils\fR Homepage: \fBhttps://sg.danny.cz/sg\fR
+--
+2.55.0
+
diff --git a/RHEL-259877-2-doc-remove-external-links-from-man-pages-and-test-da.patch b/RHEL-259877-2-doc-remove-external-links-from-man-pages-and-test-da.patch
new file mode 100644
index 0000000..52c8c06
--- /dev/null
+++ b/RHEL-259877-2-doc-remove-external-links-from-man-pages-and-test-da.patch
@@ -0,0 +1,87 @@
+From 4eacb18e6a9424cb9604386a5fd74e4c33a68bc8 Mon Sep 17 00:00:00 2001
+From: Paul Evans <pevans@redhat.com>
+Date: Wed, 16 Sep 2026 20:15:13 +0100
+Subject: [PATCH] doc: remove external links from man pages and test data
+
+A further pass through the man pages, removing external links where
+appropriate.
+
+Signed-off-by: Paul Evans <pevans@redhat.com>
+---
+ doc/sg_dd.8 | 2 +-
+ doc/sg_safte.8 | 6 +-----
+ doc/sg_xcopy.8 | 7 ++-----
+ ttesting/sg_json_builder_test.c | 2 +-
+ 4 files changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/doc/sg_dd.8 b/doc/sg_dd.8
+index 0c047b64..83c60d13 100644
+--- a/doc/sg_dd.8
++++ b/doc/sg_dd.8
+@@ -663,7 +663,7 @@ The lmbench package contains
+ .B lmdd
+ which is also interesting. For moving data to and from tapes see
+ .B dt
+-which is found at https://www.scsifaq.org/RMiller_Tools/index.html
++(part of Robin Miller's RMiller_Tools).
+ .PP
+ To change mode parameters that effect a SCSI device's caching and error
+ recovery see
+diff --git a/doc/sg_safte.8 b/doc/sg_safte.8
+index 00a064f5..add1d80f 100644
+--- a/doc/sg_safte.8
++++ b/doc/sg_safte.8
+@@ -97,11 +97,7 @@ print the version string and then exit.
+ .SH NOTES
+ This implementation is based on the intermediate review document dated
+ 19970414 and named "SR041497.pdf". So it is quite old. Intel and nStor
+-are the authors. Intel have a zip archive containing this and related
+-documents in the "SAF\-TE: SCSI Accessed Fault Tolerant Enclosures
+-Interface Specification" section of this page:
+-.PP
+-https://www.intel.com/content/www/us/en/servers/ipmi/ipmi\-technical\-resources.html
++are the authors.
+ .PP
+ Similar functionality is provided by SPC\-4 SCSI Enclosure Services (SES)
+ devices (Peripheral device type 0xd), which can be queried with the
+diff --git a/doc/sg_xcopy.8 b/doc/sg_xcopy.8
+index 97a74390..fc033603 100644
+--- a/doc/sg_xcopy.8
++++ b/doc/sg_xcopy.8
+@@ -273,10 +273,7 @@ to overwrite the existing file (if it exists); this is the default.
+ See the 'append' flag.
+ .SH NOTES
+ Copying data behind an Operating System's back can cause problems. In the
+-case of Linux, users should look at this link:
+- https://linux\-mm.org/Drop_Caches
+-.PP
+-This command sequence may be useful:
++case of Linux, this command sequence may be useful:
+ sync; echo 3 > /proc/sys/vm/drop_caches
+ .PP
+ Various numeric arguments (e.g. \fISKIP\fR) may include multiplicative
+@@ -369,7 +366,7 @@ The lmbench package contains
+ .B lmdd
+ which is also interesting. For moving data to and from tapes see
+ .B dt
+-which is found at https://www.scsifaq.org/RMiller_Tools/index.html
++(part of Robin Miller's RMiller_Tools).
+ .PP
+ To change mode parameters that effect a SCSI device's caching and error
+ recovery see
+diff --git a/ttesting/sg_json_builder_test.c b/ttesting/sg_json_builder_test.c
+index 7b43d0de..774916fd 100644
+--- a/ttesting/sg_json_builder_test.c
++++ b/ttesting/sg_json_builder_test.c
+@@ -31,7 +31,7 @@ int main(int argc, char **argv)
+ jsonw_pretty(wr, true);
+ jsonw_name(wr, "Vyatta");
+ jsonw_start_object(wr);
+- jsonw_string_field(wr, "url", "http://vyatta.com");
++ jsonw_string_field(wr, "url", "http://example.com");
+ jsonw_uint_field(wr, "downloads", 2000000ul);
+ jsonw_float_field(wr, "stock", 8.16);
+
+--
+2.55.0
+
diff --git a/RHEL-260341-sg_inq-avoid-including-0-bytes-in-SCSI-name-strings.patch b/RHEL-260341-sg_inq-avoid-including-0-bytes-in-SCSI-name-strings.patch
new file mode 100644
index 0000000..7b06149
--- /dev/null
+++ b/RHEL-260341-sg_inq-avoid-including-0-bytes-in-SCSI-name-strings.patch
@@ -0,0 +1,35 @@
+From 361c15067134cf29a66b5fa975485126f55b9aa6 Mon Sep 17 00:00:00 2001
+From: Martin Wilck <mwilck@suse.com>
+Date: Wed, 2 Sep 2026 22:37:27 +0200
+Subject: [PATCH] sg_inq: avoid including 0-bytes in SCSI name strings
+
+If a SCSI name string designator is null-terminated and null-padded.
+
+According to the man page of strchr(): "The terminating null byte is considered
+part of the string, so that if c is specified as '\0', these functions return a
+pointer to the terminator.", I.e., sg_inq --export prints the NULL-bytes seen in
+vpd_pg83 before it prints the newline character.
+
+Fix it by properly handling the terminating null character.
+
+Reported-by: Paul Nieleck <paul.nieleck@fujitsu.com>
+Signed-off-by: Martin Wilck <mwilck@suse.com>
+Fixes: 2fe1452 ("sg_inq: --export output conformance for SCSI name string and ATA fields (github: PR #83); Apply udev-conforming character encoding to VPD 0x83 designator type 8 (SCSI name string) and the T10 vendor ID ATA subfield, matching the encoding already used by designator types 0 and 1 since commit 4d770f1")
+---
+ src/sg_inq.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sg_inq.c b/src/sg_inq.c
+index 4e338387..60bec32d 100644
+--- a/src/sg_inq.c
++++ b/src/sg_inq.c
+@@ -1723,7 +1723,7 @@ export_dev_ids(uint8_t * buff, int len, int verbose)
+ }
+
+ printf("SCSI_IDENT_%s_NAME=", assoc_str);
+- for (m = 0; m < i_len; ++m) {
++ for (m = 0; m < i_len && ip[m]; ++m) {
+ if ((ip[m] >= '0' && ip[m] <= '9') ||
+ (ip[m] >= 'A' && ip[m] <= 'Z') ||
+ (ip[m] >= 'a' && ip[m] <= 'z') ||
+
diff --git a/RHEL-261987-sg_dd-fix-help-continuing-into-main-copy-logic.patch b/RHEL-261987-sg_dd-fix-help-continuing-into-main-copy-logic.patch
new file mode 100644
index 0000000..729a707
--- /dev/null
+++ b/RHEL-261987-sg_dd-fix-help-continuing-into-main-copy-logic.patch
@@ -0,0 +1,34 @@
+From 7f4031d4ed0287d6f94b86e7549f1011b2f1d017 Mon Sep 17 00:00:00 2001
+From: Paul Evans <pevans@redhat.com>
+Date: Wed, 16 Sep 2026 17:04:20 +0100
+Subject: [PATCH] sg_dd: fix --help continuing into main copy logic
+
+The --help/-? handler in parse_cmd_line() returned 0, but main()
+only exits early when the parse result is > 0. As a result, after
+printing the usage text, main() kept running and emitted trailing
+error lines.
+
+Return SG_LIB_OK_FALSE instead, matching the -h short-option path,
+so main() exits cleanly with status 0 after showing help.
+
+Signed-off-by: Paul Evans <pevans@redhat.com>
+---
+ src/sg_dd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sg_dd.c b/src/sg_dd.c
+index fcc13943..031de372 100644
+--- a/src/sg_dd.c
++++ b/src/sg_dd.c
+@@ -2318,7 +2318,7 @@ parse_cmd_line(int argc, char * argv[], struct opts_t * op)
+ else if ((0 == strncmp(key, "--help", 6)) ||
+ (0 == strcmp(key, "-?"))) {
+ usage();
+- return 0;
++ return SG_LIB_OK_FALSE;;
+ } else if ((0 == strncmp(key, "--nc", 4)) ||
+ (0 == strncmp(key, "--nocopy", 8)))
+ op->nocopy = true;
+--
+2.55.0
+
diff --git a/RHEL-266581-sg_inq-escape-forward-slash-in-SCSI_MODEL-and-SCSI_VENDOR.patch b/RHEL-266581-sg_inq-escape-forward-slash-in-SCSI_MODEL-and-SCSI_VENDOR.patch
new file mode 100644
index 0000000..4d53680
--- /dev/null
+++ b/RHEL-266581-sg_inq-escape-forward-slash-in-SCSI_MODEL-and-SCSI_VENDOR.patch
@@ -0,0 +1,71 @@
+From c1e984208b0b9a28ae233b1947e4655829028e84 Mon Sep 17 00:00:00 2001
+From: Paul Evans <pevans@redhat.com>
+Date: Mon, 21 Sep 2026 20:29:22 +0100
+Subject: [PATCH] sg_inq: escape '/' in SCSI_MODEL and SCSI_VENDOR --export
+ output
+
+A SCSI product-identification (model) or vendor field may legally
+contain '/': per T10/SPC.
+
+Currently when a SCSI_MODEL (or SCSI_VENDOR) contains a '/', udev
+treats it as a path separator and creates a nested directory instead
+of a flat symlink node.
+
+Escape only '/' as its udev escape sequence \x2f (which udev decodes
+back to the byte) in the SCSI_MODEL and SCSI_VENDOR --export loops.
+
+Signed-off-by: Paul Evans <pevans@redhat.com>
+---
+ src/sg_inq.c | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/src/sg_inq.c b/src/sg_inq.c
+index 8adf38eb..a2418f1e 100644
+--- a/src/sg_inq.c
++++ b/src/sg_inq.c
+@@ -2051,7 +2051,7 @@ std_inq_decode(const uint8_t * rp, int len, struct opts_t * op,
+ sgj_pr_hr(jsp, " Inquiry response length=%d, no vendor, product "
+ "or revision data\n", len);
+ } else {
+- int i;
++ int i, m;
+
+ memcpy(xtra_buff, &rp[8], 8);
+ xtra_buff[8] = '\0';
+@@ -2062,7 +2062,16 @@ std_inq_decode(const uint8_t * rp, int len, struct opts_t * op,
+ if (op->do_export) {
+ int vlen = encode_whitespaces((uint8_t *)xtra_buff, 8);
+ if (vlen > 0) {
+- printf("SCSI_VENDOR=%s\n", xtra_buff);
++ printf("SCSI_VENDOR=");
++ /* escape '/' so it cannot be taken as a path separator when
++ * the value is used to build a /dev/disk/by-id symlink name */
++ for (m = 0; m < vlen; ++m) {
++ if ('/' == xtra_buff[m])
++ printf("\\x2f");
++ else
++ printf("%c", xtra_buff[m]);
++ }
++ printf("\n");
+ encode_string(xtra_buff, &rp[8], 8);
+ printf("SCSI_VENDOR_ENC=%s\n", xtra_buff);
+ }
+@@ -2077,7 +2086,16 @@ std_inq_decode(const uint8_t * rp, int len, struct opts_t * op,
+ if (op->do_export) {
+ int mlen = encode_whitespaces((uint8_t *)xtra_buff, 16);
+ if (mlen > 0) {
+- printf("SCSI_MODEL=%s\n", xtra_buff);
++ printf("SCSI_MODEL=");
++ /* escape '/' so it cannot be taken as a path separator when
++ * the value is used to build a /dev/disk/by-id symlink name */
++ for (m = 0; m < mlen; ++m) {
++ if ('/' == xtra_buff[m])
++ printf("\\x2f");
++ else
++ printf("%c", xtra_buff[m]);
++ }
++ printf("\n");
+ encode_string(xtra_buff, &rp[16], 16);
+ printf("SCSI_MODEL_ENC=%s\n", xtra_buff);
+ }
+
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 7fea483..aef8caf 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -4,11 +4,21 @@
Summary: Utilities for devices that use SCSI command sets
Name: sg3_utils
Version: 1.49
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPL-2.0-or-later AND BSD-2-Clause
URL: https://sg.danny.cz/sg/sg3_utils.html
Source0: https://sg.danny.cz/sg/p/sg3_utils-%{version}.tar.xz
+# https://redhat.atlassian.net/browse/RHEL-259877
+Patch0: RHEL-259877-1-rescan-scsi-bus.sh.8-add-description-and-examples.patch
+Patch1: RHEL-259877-2-doc-remove-external-links-from-man-pages-and-test-da.patch
+# https://redhat.atlassian.net/browse/RHEL-261987
+Patch2: RHEL-261987-sg_dd-fix-help-continuing-into-main-copy-logic.patch
+# https://redhat.atlassian.net/browse/RHEL-260341
+Patch3: RHEL-260341-sg_inq-avoid-including-0-bytes-in-SCSI-name-strings.patch
+# https://redhat.atlassian.net/browse/RHEL-266581
+Patch4: RHEL-266581-sg_inq-escape-forward-slash-in-SCSI_MODEL-and-SCSI_VENDOR.patch
+
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: make
BuildRequires: gcc
@@ -126,6 +136,12 @@ install -p -m 755 scripts/fc_wwpn_id %{buildroot}%{_udevlibdir}
%changelog
+* Wed Sep 23 2026 Paul Evans <pevans@redhat.com> - 1.49-2
+- rescan-scsi-bus.sh.8 manpage links to external domain (RHEL-259877)
+- sg_inq: avoid including NULL-bytes in SCSI name strings (RHEL-260341)
+- sg_dd: --help argument emitting extra error lines (and bad exit code) (RHEL-261987)
+- sg_inq: handle forward-slash in SCSI_VENDOR and SCSI_MODEL field on export (RHEL-266581)
+
* Wed Jul 22 2026 Paul Evans <pevans@redhat.com> - 1.49-1
- update to version 1.49 (rhbz#2502183)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-30 8:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30 8:29 [rpms/sg3_utils] rawhide: * Wed Sep 23 2026 Paul Evans <pevans@redhat.com> - 1.49-2 Paul Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox