diff --git a/_service b/_service new file mode 100644 index 0000000..a0a1255 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + git + https://github.com/hreinecke/sg3_utils.git + + sg3_utils + 1.43 + master + + + *sg3_utils*.tar + xz + + diff --git a/add-lunsearch-filter-to-searchexisting.patch b/add-lunsearch-filter-to-searchexisting.patch new file mode 100644 index 0000000..6cd88b0 --- /dev/null +++ b/add-lunsearch-filter-to-searchexisting.patch @@ -0,0 +1,44 @@ +From: Sebastian Parschauer +Date: Wed, 31 Aug 2016 15:34:23 +0200 +Subject: [PATCH] rescan-scsi-bus.sh: Add lunsearch filter to searchexisting() +References: bnc#981452 +Patch-Mainline: not yet, sent but waiting for upstream response + +A user has reported that `rescan-scsi-bus.sh --luns=` prints +all existing LUNs and scans all new LUNs instead of only the ones +specified. The problem is that searchexisting() always calls +doreportlun() and is missing the lunsearch filter e.g. used in +dosearch(). +So add the required lunsearch filter from dosearch() to +searchexisting(). + +Signed-off-by: Sebastian Parschauer +--- + scripts/rescan-scsi-bus.sh | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh +index fad4868..5bc4a95 100755 +--- a/scripts/rescan-scsi-bus.sh ++++ b/scripts/rescan-scsi-bus.sh +@@ -711,7 +711,16 @@ searchexisting() + else + match=1 + fi +- test $match -eq 1 && doreportlun ++ ++ test $match -eq 0 && continue ++ ++ if [ -z "$lunsearch" ] ; then ++ doreportlun ++ else ++ for lun in $lunsearch ; do ++ dolunscan ++ done ++ fi + done + } + +-- +2.6.6 + diff --git a/sg3_utils-1.42.tar.xz b/sg3_utils-1.42.tar.xz deleted file mode 100644 index a0d7042..0000000 --- a/sg3_utils-1.42.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:97aeed65894feb2add896b4adfa4cf343966c8a61c7d206795ed0507640ee7b9 -size 768876 diff --git a/sg3_utils-1.43.tar.xz b/sg3_utils-1.43.tar.xz new file mode 100644 index 0000000..775d11b --- /dev/null +++ b/sg3_utils-1.43.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f45e8775989b2249294c5fcfbddb763adec8c9da431e0a657fcd8c0e483c85e7 +size 788776 diff --git a/sg3_utils.changes b/sg3_utils.changes index 7064d19..662478a 100644 --- a/sg3_utils.changes +++ b/sg3_utils.changes @@ -1,3 +1,59 @@ +------------------------------------------------------------------- +Wed Sep 7 16:26:26 CEST 2016 - sparschauer@suse.de + +- using "--lun" now works correctly (bsc#981452), adding patch: + * add-lunsearch-filter-to-searchexisting.patch + +------------------------------------------------------------------- +Fri Apr 29 09:13:41 CEST 2016 - hare@suse.de + +- Update to new upstream release 1.43: + * sg_senddiag: add --timeout=SEC option + * sg_sanitize: add --timeout=SEC option + * sg_format: add --timeout=SEC option + * sg_decode sense: add --cdb option + * sg_ses: handle 2 bit EIIOE field in aes dpage + - expand join handling of SAS connectors and others + - expand join debug code + * sg_logs: fix volume statistics lpage when subpage + is zero (ssc5r02a); decode mount history log parameter + - decode Requested recovery, TapeAlert response, and + Service buffer information lpages for tape + - add '--pdt=DT' option + * sg_inq: fix potential unbounded loop in --export + - update version descriptor list to 20160420 + * sg_inq+sg_vpd: update Extended inquiry data vpd + page (spc5r09) + - add --force option to bypass checking supported + vpd pages page and fetch requested page directly + * sg_reassign+sg_write_same: fix ULONG_MAX problem + * sg_turs+sg_requests: make both accept '--num=NUM' + and '--number=NUM' for mutual compatibility + * sg_zone: fix debug cdb naming + * sg_opcode: add '--enumerate' and '--pdt=' options + * sg_raw: add '--enumerate' option + * sg_lib: add SSC maintenance in/out sa names + - add read buffer(16) command mode names + - add sg_decode_transportid_str() + * sg_lib_data: sync asc/ascq codes with T10 20160425 + * rescan-scsi-bus.sh: harden code + * clang --analyze static checker clean ups + * shellcheck cleanup on scripts + * automake: add AM_PROG_AR to configure.ac + - upgrade to version 1.15 +- Include patches from upstream: + * sg_inq+sg_vpd: add --force option to bypass checking + of supported vpd pages + * sg_lib_data: add Bind and Unbind to service action out(16) +- Remove 0001-sg_vpd-sg_inq-Safe-VPD-page-access.patch; merged + with upstream. + +------------------------------------------------------------------- +Thu Apr 28 14:38:24 CEST 2016 - hare@suse.de + +- sg_inq,sg_vpd: Safe VPD page access (bsc#945094) + * Add 0001-sg_vpd-sg_inq-Safe-VPD-page-access.patch + ------------------------------------------------------------------- Thu Feb 18 09:41:03 CET 2016 - hare@suse.de diff --git a/sg3_utils.spec b/sg3_utils.spec index bb779d2..ac4de22 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -17,17 +17,18 @@ Name: sg3_utils -%define lname libsgutils2-1_42-2 -Version: 1.42 +%define lname libsgutils2-1_43-2 +Version: 1.43 Release: 0 Summary: A collection of tools that send SCSI commands to devices License: GPL-2.0+ and BSD-3-Clause Group: Hardware/Other Url: http://sg.danny.cz/sg/sg3_utils.html -Source: http://sg.danny.cz/sg/p/%name-%version.tar.xz +Source: sg3_utils-%{version}.tar.xz Source1: 40-usb-blacklist.rules Patch1: sgut-libversioning.diff +Patch2: add-lunsearch-filter-to-searchexisting.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libtool BuildRequires: udev @@ -84,6 +85,7 @@ applications that want to make use of libsgutils. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build autoreconf -fi