From 298ffcb056f2b88af5d5795bf0477ea3ff5e057d Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Jan 29 2014 09:22:08 +0000 Subject: - fix various man pages (#948463) - add man page for the rescan-scsi-bus.sh script --- diff --git a/rescan-scsi-bus.sh.8 b/rescan-scsi-bus.sh.8 new file mode 100644 index 0000000..8e70092 --- /dev/null +++ b/rescan-scsi-bus.sh.8 @@ -0,0 +1,90 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. +.TH RESCAN-SCSI-BUS.SH "1" "leden 2014" "rescan-scsi-bus.sh 1.57" "User Commands" +.SH NAME +rescan-scsi-bus.sh \- script for adding and removing SCSI devices without rebooting +.SH SYNOPSIS +.B rescan-scsi-bus.sh +[\fIoptions\fR] [\fIhost \fR[\fIhost \fR...]] +.SH OPTIONS +.TP +\fB\-a\fR, \fB\-\-alltargets\fR +scan all targets, not just currently existing [default: disabled] +.TP +\fB\-d\fR +enable debug [default: 0] +.TP +\fB\-l\fR +activates scanning for LUNs 0\-\-7 [default: 0] +.TP +\fB\-L\fR NUM +activates scanning for LUNs 0\-\-NUM [default: 0] +.TP +\fB\-w\fR, \fB\-\-wide\fR +scan for target device IDs 0\-\-15 [default: 0\-\-7] +.TP +\fB\-c\fR +enables scanning of channels 0 1 [default: 0 / all detected ones] +.TP +\fB\-r\fR, \fB\-\-remove\fR +enables removing of devices [default: disabled] +.TP +\fB\-f\fR, \fB\-\-flush\fR +flush failed multipath devices [default: disabled] +.TP +\fB\-i\fR, \fB\-\-issue\-lip\fR +issue a FibreChannel LIP reset [default: disabled] +.TP +\fB\-u\fR, \fB\-\-update\fR +look for existing disks that have been remapped +.TP +\fB\-s\fR, \fB\-\-resize\fR +look for resized disks and reload associated multipath devices, if applicable +.TP +\fB\-\-forcerescan\fR +rescan existing devices +.TP +\fB\-\-forceremove\fR +remove and readd every device (DANGEROUS) +.TP +\fB\-\-nooptscan\fR +don't stop looking for LUNs is 0 is not found +.TP +\fB\-\-color\fR +use coloured prefixes OLD/NEW/DEL +.TP +\fB\-\-hosts\fR=\fILIST\fR +scan only host(s) in \fILIST\fR +.TP +\fB\-\-channels\fR=\fILIST\fR +scan only channel(s) in \fILIST\fR +.TP +\fB\-\-ids\fR=\fILIST\fR +scan only target ID(s) in \fILIST\fR +.TP +\fB\-\-luns\fR=\fILIST\fR +scan only lun(s) in \fILIST\fR +.TP +\fB\-\-sync\fR, \fB\-\-nosync\fR +issue a sync / no sync [default: sync if remove] +.TP +\fB\-\-attachpq3\fR +tell kernel to attach sg to LUN 0 that reports PQ=3 +.TP +\fB\-\-reportlun2\fR +tell kernel to try REPORT_LUN even on SCSI2 devices +.TP +\fB\-\-largelun\fR +tell kernel to support LUNs > 7 even on SCSI2 devs +.TP +\fB\-\-sparselun\fR +tell kernel to support sparse LUN numbering +.IP +Host numbers may thus be specified either directly on cmd line (deprecated) or +or with the \fB\-\-hosts\fR=\fILIST\fR parameter (recommended). +.PP +\fILIST\fR: A[\-B][,C[\-D]]... is a comma separated list of single values and ranges +(No spaces allowed.) +.SH SEE ALSO +\fBrescan-scsi-bus.sh\fR Homepage: \fBhttp://www.garloff.de/kurt/linux/#rescan-scsi\fR +.PP +\fBsg3_utils\fR Homepage: \fBhttp://sg.danny.cz/sg\fR diff --git a/scsi-rescan.8 b/scsi-rescan.8 new file mode 100644 index 0000000..7252653 --- /dev/null +++ b/scsi-rescan.8 @@ -0,0 +1 @@ +.so man8/rescan-scsi-bus.sh.8 diff --git a/sg3_utils-1.37-man-pages-fix.patch b/sg3_utils-1.37-man-pages-fix.patch new file mode 100644 index 0000000..3c7ca36 --- /dev/null +++ b/sg3_utils-1.37-man-pages-fix.patch @@ -0,0 +1,95 @@ +From 1653f314de9f0a0415259f2182bf65a745537f33 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Tue, 28 Jan 2014 14:15:56 +0100 +Subject: [PATCH] remove duplicit words in man pages + +--- + doc/sg3_utils.8 | 2 +- + doc/sg_format.8 | 2 +- + doc/sg_get_lba_status.8 | 2 +- + doc/sg_ses.8 | 2 +- + doc/sg_stpg.8 | 2 +- + doc/sginfo.8 | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8 +index ae9b181..d295eeb 100644 +--- a/doc/sg3_utils.8 ++++ b/doc/sg3_utils.8 +@@ -146,7 +146,7 @@ drives and "cd" for SCSI CD/DVD/BD drives. Each SCSI device has a + corresponding pass\-through device name of the form /dev/pass + where is an integer starting at zero. The "camcontrol devlist" + command may be useful for finding out which SCSI device names are +-available and the correspondence between between class and pass\-through ++available and the correspondence between class and pass\-through + names. + .SH SOLARIS DEVICE NAMING + SCSI device names below the /dev directory have a form like: c5t4d3s2 +diff --git a/doc/sg_format.8 b/doc/sg_format.8 +index 4cf4e82..055ff04 100644 +--- a/doc/sg_format.8 ++++ b/doc/sg_format.8 +@@ -265,7 +265,7 @@ protection type of a disk can be found in the "P_TYPE" and "PROT_EN" + fields in the response of a READ CAPACITY (16) command (e.g. with + the 'sg_readcap \-\-long' utility). + .PP +-Given that a device supports a particular protection type, a user can then ++Given that a device supports a particular protection type, a user can + then choose to format that disk with that protection type by setting + the "FMTPINFO" and "Protection Field Usage" fields in the FORMAT UNIT + command. Those fields correspond to the \fI\-\-fmtpinfo=FPI\fR and the +diff --git a/doc/sg_get_lba_status.8 b/doc/sg_get_lba_status.8 +index ab8269c..bbb0c09 100644 +--- a/doc/sg_get_lba_status.8 ++++ b/doc/sg_get_lba_status.8 +@@ -28,7 +28,7 @@ when use once then one LBA status descriptor per line is output to stdout. + Each line has this + format: "0x 0x ". So the + descriptor LBA and blocks are output in hex and the provisioning status +-in decimal. When used twice (e.g. '\-bb' or '\-\-brief \-\-brief') the ++in decimal. When used twice (e.g. '\-bb' or '\-\-brief \-\-brief') + the provisioning status of the given \fILBA\fR (or LBA 0 if the + \fI\-\-lba\fR option is not given) is output to stdout. A check is made + that the given \fILBA\fR lies on the range of the first returned LBA +diff --git a/doc/sg_ses.8 b/doc/sg_ses.8 +index 1cd71c5..a94fe48 100644 +--- a/doc/sg_ses.8 ++++ b/doc/sg_ses.8 +@@ -237,7 +237,7 @@ given. + .PP + One of two command lines variants can be used to specify indexes: + \fI\-\-index=TIA,II\fR where \fITIA\fR is either an type header index (TI) +-or an Element type abbreviation (A) (e.g. "ps" or "ps1"). \fIII\fR is ++or an Element type abbreviation (A) (e.g. "ps" or "ps1"). \fIII\fR + is either an individual index or "\-1" to specify the overall element. The + second variant is \fI\-\-index=IIA\fR where \fIIIA\fR is either an individual + index (II) or an Element type abbreviation (A). When \fIIIA\fR is an +diff --git a/doc/sg_stpg.8 b/doc/sg_stpg.8 +index f93f029..8ab6b1a 100644 +--- a/doc/sg_stpg.8 ++++ b/doc/sg_stpg.8 +@@ -104,7 +104,7 @@ identifier (i.e. acts on one or more target ports). + When \fI\-\-tp=\fR is given then the same number of elements should be + given to the \fI\-\-state=\fR option. If more than one list element is + given to \fI\-\-tp=\fR and an equal number of elements is _not_ given +-to the the \fI\-\-state=\fR option, then if only one state is specified ++to the \fI\-\-state=\fR option, then if only one state is specified + then it is repeated. + .SH EXIT STATUS + The exit status of sg_stpg is 0 when it is successful. Otherwise see +diff --git a/doc/sginfo.8 b/doc/sginfo.8 +index 8d570b1..7abff65 100644 +--- a/doc/sginfo.8 ++++ b/doc/sginfo.8 +@@ -287,7 +287,7 @@ hex (mode page index in the first column and the corresponding byte + value in the second column) use "\-u 0xa". Mode pages (subpage code == 0) + start at index position 2 while subpages start at index position 4. + If the "\-Xu ..." option is used then a list a hex values each value +-prefixed by "@" is output. Mode (sub)page values can then be modified with ++prefixed by "@" is output. Mode (sub)page values can then be modified + with the "\-RXu ..." option. + .PP + .SH RESTRICTIONS +-- +1.8.1.4 + diff --git a/sg3_utils.spec b/sg3_utils.spec index 0edfce7..b5e9bca 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -3,12 +3,16 @@ Summary: Utilities for devices that use SCSI command sets Name: sg3_utils Version: 1.37 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ and BSD Group: Applications/System Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tgz +Source1: rescan-scsi-bus.sh.8 +Source2: scsi-rescan.8 # https://bugzilla.redhat.com/show_bug.cgi?id=920687 Patch0: sg3_utils-1.37-dont-open-dev-snapshot.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=948463 +Patch1: sg3_utils-1.37-man-pages-fix.patch URL: http://sg.danny.cz/sg/sg3_utils.html Requires: %{name}-libs = %{version}-%{release} @@ -47,6 +51,7 @@ developing applications. %prep %setup -q %patch0 -p1 -b .dev-snapshot +%patch1 -p1 -b .man-fixes %build @@ -66,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir} ( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf %{rescan_script} scsi-rescan ) +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man8 +install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8 + %post libs -p /sbin/ldconfig @@ -87,6 +95,10 @@ install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir} %changelog +* Wed Jan 29 2014 Dan Horák - 1.37-3 +- fix various man pages (#948463) +- add man page for the rescan-scsi-bus.sh script + * Fri Oct 18 2013 Dan Horák - 1.37-2 - include fix for #920687