Hello community, here is the log from the commit of package scsi checked in at Sun Jul 30 11:59:34 CEST 2006. -------- --- scsi/scsi.changes 2006-06-02 15:53:03.000000000 +0200 +++ scsi/scsi.changes 2006-07-29 14:19:48.000000000 +0200 @@ -1,0 +2,16 @@ +Sat Jul 29 14:02:23 CEST 2006 - garloff@suse.de + +- rescan-scsi-bus.sh: + * -L MAXLUN parameter to scan beyond SPI LUNs + * cope with missing generic symlink +- Update to lsscsi-0.18: + * cope with dropping of 'generic' symlink post lk 2.6.16 + * anticipate the future removal of 'tape' symlink +- Update to sg3_utils-1.22: + * cope with dropping 'generic' and 'tape' symlinks in sysfs + * more consistent use of sysfs + * New utils: sg_vpd, sg_rdac + * sg_utils.8 man page +- Update to sdparm-0.99 + +------------------------------------------------------------------- Old: ---- lsscsi-0.17.tgz sdparm-0.97.tgz sg3_utils-1.19.tgz sg3_utils-rdac-support.patch New: ---- lsscsi-0.18.tgz sdparm-0.99.tgz sg3_utils-1.22.tgz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ scsi.spec ++++++ --- /var/tmp/diff_new_pack.us6GgZ/_old 2006-07-30 11:59:26.000000000 +0200 +++ /var/tmp/diff_new_pack.us6GgZ/_new 2006-07-30 11:59:26.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package scsi (Version 1.7_2.36_1.19_0.17_0.97) +# spec file for package scsi (Version 1.7_2.36_1.22_0.18_0.99) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -14,22 +14,21 @@ BuildRequires: sysfsutils tk %define sinfover 1.7 %define sdevver 2.36 -%define sgutver 1.19 -%define lsscsiver 0.17 -%define sdparmver 0.97 +%define sgutver 1.22 +%define lsscsiver 0.18 +%define sdparmver 0.99 License: GPL Group: Hardware/Other Provides: scsiinfo sg_utils scsidev Autoreqprov: on -Version: 1.7_2.36_1.19_0.17_0.97 -Release: 12 +Version: 1.7_2.36_1.22_0.18_0.99 +Release: 1 Summary: SCSI Tools (Text Mode) Source: scsiinfo-%{sinfover}.tar.gz Patch: scsiinfo-%{sinfover}.diff Patch1: scsiinfo-%{sinfover}-scsifmt.diff Source2: http://www.garloff.de/kurt/linux/scsidev/scsidev-%{sdevver}.tar.gz Patch2: scsidev-%{sdevver}.diff -Patch3: sg3_utils-rdac-support.patch Source5: sysconfig.scsidev Source3: http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh Source4: http://www.torque.net/sg/p/sg3_utils-%{sgutver}.tgz @@ -106,25 +105,30 @@ %patch1 -p1 cd ../scsidev-%{sdevver} %patch2 -cd ../sg3_utils-%{sgutver} -%patch3 -p1 +#cd ../sg3_utils-%{sgutver} %build +# scsiinfo cd ../scsiinfo-%{sinfover} make clean make CFLAGS="$RPM_OPT_FLAGS -Wall -Wno-sign-compare -D_GNU_SOURCE" +# scsidev cd ../scsidev-%{sdevver} autoreconf CFLAGS="$RPM_OPT_FLAGS -Wall" ./configure --prefix=/usr --with-infodir=%{_infodir} --with-mandir=%{_mandir} make +# sg3_utils cd ../sg3_utils-%{sgutver} make CFLAGS="$RPM_OPT_FLAGS -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" PREFIX=/usr LIBDIR=%{_libdir} mv README README.sg +# NOTE: COuld compile some files from examples/ as well +# lsscsi cd ../lsscsi-%{lsscsiver} CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --mandir=%{_mandir} make mv README README.lsscsi mv ChangeLog ChangeLog.lsscsi +# sdparm cd ../sdparm-%{sdparmver} autoreconf CFLAGS="$RPM_OPT_FLAGS -Wall" ./configure --prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir} @@ -141,6 +145,7 @@ make install DESTDIR=$RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/etc/init.d/boot.d install -m 640 boot.scsidev $RPM_BUILD_ROOT/etc/init.d/boot.scsidev +# rescan-scsi-bus.sh install -d $RPM_BUILD_ROOT/bin install -m 755 $RPM_SOURCE_DIR/rescan-scsi-bus.sh $RPM_BUILD_ROOT/bin # sg3_utils @@ -148,6 +153,7 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTDIR=$RPM_BUILD_ROOT%{_bindir} \ MANDIR=$RPM_BUILD_ROOT%{_mandir} LIBDIR=$RPM_BUILD_ROOT%{_libdir} \ PREFIX=/usr +# NOTE: Could install some files from the examples dir as well # lsscsi cd ../lsscsi-%{lsscsiver} make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{_mandir} INSTDIR=$RPM_BUILD_ROOT/%{_bindir} @@ -218,6 +224,7 @@ %attr(755,root,root) %{_bindir}/sg_ident %attr(755,root,root) %{_bindir}/sg_map26 %attr(755,root,root) %{_bindir}/sg_rdac +%attr(755,root,root) %{_bindir}/sg_vpd %attr(755,root,root) %{_libdir}/libsgutils.a %attr(755,root,root) %{_libdir}/libsgutils.la %attr(755,root,root) %{_libdir}/libsgutils.so* @@ -225,6 +232,8 @@ %attr(644,root,root) /usr/include/scsi/sg_cmds.h %attr(644,root,root) /usr/include/scsi/sg_lib.h %attr(644,root,root) /usr/include/scsi/sg_pt.h +%attr(644,root,root) /usr/include/scsi/sg_io_linux.h +%attr(644,root,root) /usr/include/scsi/sg_linux_inc.h %doc %{_mandir}/man8/sg_dd.8.gz %doc %{_mandir}/man8/sgp_dd.8.gz %doc %{_mandir}/man8/sgm_dd.8.gz @@ -263,6 +272,8 @@ %doc %{_mandir}/man8/sg_ident.8.gz %doc %{_mandir}/man8/sg_map26.8.gz %doc %{_mandir}/man8/sg_rdac.8.gz +%doc %{_mandir}/man8/sg_vpd.8.gz +%doc %{_mandir}/man8/sg3_utils.8.gz # lsscsi %attr(755,root,root) %{_bindir}/lsscsi %doc %{_mandir}/man8/lsscsi.8.gz @@ -310,6 +321,19 @@ %{insserv_cleanup} %changelog -n scsi +* Sat Jul 29 2006 - garloff@suse.de +- rescan-scsi-bus.sh: + * -L MAXLUN parameter to scan beyond SPI LUNs + * cope with missing generic symlink +- Update to lsscsi-0.18: + * cope with dropping of 'generic' symlink post lk 2.6.16 + * anticipate the future removal of 'tape' symlink +- Update to sg3_utils-1.22: + * cope with dropping 'generic' and 'tape' symlinks in sysfs + * more consistent use of sysfs + * New utils: sg_vpd, sg_rdac + * sg_utils.8 man page +- Update to sdparm-0.99 * Fri Jun 02 2006 - hare@suse.de - Fixup rescan-scsi-bus.sh to not rely on obsolete /proc/scsi/scsi interface (176120) ++++++ lsscsi-0.17.tgz -> lsscsi-0.18.tgz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/ChangeLog new/lsscsi-0.18/ChangeLog --- old/lsscsi-0.17/ChangeLog 2006-02-06 08:15:36.000000000 +0100 +++ new/lsscsi-0.18/ChangeLog 2006-03-25 04:35:43.000000000 +0100 @@ -1,4 +1,8 @@ +Version 0.18 2006/3/24 + - cope with dropping of 'generic' symlink post lk 2.6.16 + - anticipate the future removal of 'tape' symlink + Version 0.17 2006/2/6 - fix disappearance of block device names in lk 2.6.16-rc1 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/Makefile.am new/lsscsi-0.18/Makefile.am --- old/lsscsi-0.17/Makefile.am 2005-10-18 10:21:16.000000000 +0200 +++ new/lsscsi-0.18/Makefile.am 2006-03-23 23:07:16.000000000 +0100 @@ -11,8 +11,8 @@ # INCLUDES = -I$(top_srcdir)/include -AM_CFLAGS = -Wall -W -# AM_CFLAGS = -Wall -W -pedantic -std=c99 +# AM_CFLAGS = -Wall -W +AM_CFLAGS = -Wall -W -pedantic -std=c99 lsscsi_SOURCES = lsscsi.c diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/Makefile.in new/lsscsi-0.18/Makefile.in --- old/lsscsi-0.17/Makefile.in 2006-02-06 07:52:29.000000000 +0100 +++ new/lsscsi-0.18/Makefile.in 2006-03-25 04:37:00.000000000 +0100 @@ -165,8 +165,9 @@ EXTRA_DIST = autogen.sh # INCLUDES = -I$(top_srcdir)/include -AM_CFLAGS = -Wall -W -# AM_CFLAGS = -Wall -W -pedantic -std=c99 + +# AM_CFLAGS = -Wall -W +AM_CFLAGS = -Wall -W -pedantic -std=c99 lsscsi_SOURCES = lsscsi.c all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/autom4te.cache/output.0 new/lsscsi-0.18/autom4te.cache/output.0 --- old/lsscsi-0.17/autom4te.cache/output.0 2006-01-14 05:20:48.000000000 +0100 +++ new/lsscsi-0.18/autom4te.cache/output.0 2006-03-01 22:15:06.000000000 +0100 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.59 for lsscsi 0.17. +@%:@ Generated by GNU Autoconf 2.59 for lsscsi 0.18. @%:@ @%:@ Report bugs to <dgilbert@interlog.com>. @%:@ @@ -269,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='lsscsi' PACKAGE_TARNAME='lsscsi' -PACKAGE_VERSION='0.17' -PACKAGE_STRING='lsscsi 0.17' +PACKAGE_VERSION='0.18' +PACKAGE_STRING='lsscsi 0.18' PACKAGE_BUGREPORT='dgilbert@interlog.com' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIB@&t@OBJS LTLIBOBJS' @@ -738,7 +738,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures lsscsi 0.17 to adapt to many kinds of systems. +\`configure' configures lsscsi 0.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -800,7 +800,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of lsscsi 0.17:";; + short | recursive ) echo "Configuration of lsscsi 0.18:";; esac cat <<\_ACEOF @@ -917,7 +917,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -lsscsi configure 0.17 +lsscsi configure 0.18 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -931,7 +931,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by lsscsi $as_me 0.17, which was +It was created by lsscsi $as_me 0.18, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1575,7 +1575,7 @@ # Define the identity of the package. PACKAGE='lsscsi' - VERSION='0.17' + VERSION='0.18' cat >>confdefs.h <<_ACEOF @@ -3269,7 +3269,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by lsscsi $as_me 0.17, which was +This file was extended by lsscsi $as_me 0.18, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3332,7 +3332,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -lsscsi config.status 0.17 +lsscsi config.status 0.18 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/autom4te.cache/output.1 new/lsscsi-0.18/autom4te.cache/output.1 --- old/lsscsi-0.17/autom4te.cache/output.1 2006-01-14 05:20:51.000000000 +0100 +++ new/lsscsi-0.18/autom4te.cache/output.1 2006-03-01 22:15:09.000000000 +0100 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.59 for lsscsi 0.17. +@%:@ Generated by GNU Autoconf 2.59 for lsscsi 0.18. @%:@ @%:@ Report bugs to <dgilbert@interlog.com>. @%:@ @@ -269,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='lsscsi' PACKAGE_TARNAME='lsscsi' -PACKAGE_VERSION='0.17' -PACKAGE_STRING='lsscsi 0.17' +PACKAGE_VERSION='0.18' +PACKAGE_STRING='lsscsi 0.18' PACKAGE_BUGREPORT='dgilbert@interlog.com' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIB@&t@OBJS LTLIBOBJS' @@ -738,7 +738,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures lsscsi 0.17 to adapt to many kinds of systems. +\`configure' configures lsscsi 0.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -800,7 +800,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of lsscsi 0.17:";; + short | recursive ) echo "Configuration of lsscsi 0.18:";; esac cat <<\_ACEOF @@ -917,7 +917,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -lsscsi configure 0.17 +lsscsi configure 0.18 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -931,7 +931,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by lsscsi $as_me 0.17, which was +It was created by lsscsi $as_me 0.18, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1575,7 +1575,7 @@ # Define the identity of the package. PACKAGE='lsscsi' - VERSION='0.17' + VERSION='0.18' cat >>confdefs.h <<_ACEOF @@ -3269,7 +3269,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by lsscsi $as_me 0.17, which was +This file was extended by lsscsi $as_me 0.18, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3332,7 +3332,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -lsscsi config.status 0.17 +lsscsi config.status 0.18 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/autom4te.cache/traces.0 new/lsscsi-0.18/autom4te.cache/traces.0 --- old/lsscsi-0.17/autom4te.cache/traces.0 2006-01-14 05:20:48.000000000 +0100 +++ new/lsscsi-0.18/autom4te.cache/traces.0 2006-03-01 22:15:06.000000000 +0100 @@ -484,7 +484,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) -m4trace:configure.ac:1: -1- AC_INIT([lsscsi], [0.17], [dgilbert@interlog.com]) +m4trace:configure.ac:1: -1- AC_INIT([lsscsi], [0.18], [dgilbert@interlog.com]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/autom4te.cache/traces.1 new/lsscsi-0.18/autom4te.cache/traces.1 --- old/lsscsi-0.17/autom4te.cache/traces.1 2006-01-14 05:20:51.000000000 +0100 +++ new/lsscsi-0.18/autom4te.cache/traces.1 2006-03-01 22:15:09.000000000 +0100 @@ -1,4 +1,4 @@ -m4trace:configure.ac:1: -1- AC_INIT([lsscsi], [0.17], [dgilbert@interlog.com]) +m4trace:configure.ac:1: -1- AC_INIT([lsscsi], [0.18], [dgilbert@interlog.com]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/configure new/lsscsi-0.18/configure --- old/lsscsi-0.17/configure 2006-01-14 05:20:51.000000000 +0100 +++ new/lsscsi-0.18/configure 2006-03-01 22:15:09.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for lsscsi 0.17. +# Generated by GNU Autoconf 2.59 for lsscsi 0.18. # # Report bugs to <dgilbert@interlog.com>. # @@ -269,8 +269,8 @@ # Identity of this package. PACKAGE_NAME='lsscsi' PACKAGE_TARNAME='lsscsi' -PACKAGE_VERSION='0.17' -PACKAGE_STRING='lsscsi 0.17' +PACKAGE_VERSION='0.18' +PACKAGE_STRING='lsscsi 0.18' PACKAGE_BUGREPORT='dgilbert@interlog.com' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIBOBJS LTLIBOBJS' @@ -738,7 +738,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures lsscsi 0.17 to adapt to many kinds of systems. +\`configure' configures lsscsi 0.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -800,7 +800,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of lsscsi 0.17:";; + short | recursive ) echo "Configuration of lsscsi 0.18:";; esac cat <<\_ACEOF @@ -917,7 +917,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -lsscsi configure 0.17 +lsscsi configure 0.18 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -931,7 +931,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by lsscsi $as_me 0.17, which was +It was created by lsscsi $as_me 0.18, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1575,7 +1575,7 @@ # Define the identity of the package. PACKAGE='lsscsi' - VERSION='0.17' + VERSION='0.18' cat >>confdefs.h <<_ACEOF @@ -3269,7 +3269,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by lsscsi $as_me 0.17, which was +This file was extended by lsscsi $as_me 0.18, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3332,7 +3332,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -lsscsi config.status 0.17 +lsscsi config.status 0.18 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/configure.ac new/lsscsi-0.18/configure.ac --- old/lsscsi-0.17/configure.ac 2006-01-14 05:17:17.000000000 +0100 +++ new/lsscsi-0.18/configure.ac 2006-03-01 22:13:55.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT(lsscsi, 0.17, dgilbert@interlog.com) +AC_INIT(lsscsi, 0.18, dgilbert@interlog.com) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/debian/changelog new/lsscsi-0.18/debian/changelog --- old/lsscsi-0.17/debian/changelog 2006-02-06 07:59:31.000000000 +0100 +++ new/lsscsi-0.18/debian/changelog 2006-03-25 04:36:26.000000000 +0100 @@ -1,3 +1,9 @@ +lsscsi (0.18-0.1) unstable; urgency=low + + * new upstream version + + -- Douglas Gilbert <dgilbert@interlog.org> Fri, 24 Mar 2006 22:00:00 +1000 + lsscsi (0.17-0.1) unstable; urgency=low * new upstream version diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/debian/control new/lsscsi-0.18/debian/control --- old/lsscsi-0.17/debian/control 2005-12-30 09:06:57.000000000 +0100 +++ new/lsscsi-0.18/debian/control 2006-03-25 04:35:09.000000000 +0100 @@ -2,7 +2,7 @@ Section: admin Priority: optional Maintainer: Matt Taggart <taggart@debian.org> -Build-Depends: debhelper (>= 4.0.0), autoconf +Build-Depends: debhelper (>= 4.0.0), autotools-dev Standards-Version: 3.6.2.1 Package: lsscsi diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/lsscsi.8 new/lsscsi-0.18/lsscsi.8 --- old/lsscsi-0.17/lsscsi.8 2005-12-30 14:28:02.000000000 +0100 +++ new/lsscsi-0.18/lsscsi.8 2006-03-23 16:51:30.000000000 +0100 @@ -1,4 +1,4 @@ -.TH lsscsi "8" "December 2005" "lsscsi-0.16" LSSCSI +.TH lsscsi "8" "March 2006" "lsscsi-0.18" LSSCSI .SH NAME lsscsi \- list SCSI devices (or hosts) and their attributes .SH SYNOPSIS @@ -9,7 +9,7 @@ .SH DESCRIPTION .\" Add any additional description here .PP -Uses information in sysfs (linux kernels 2.6.0 and later) to list +Uses information in sysfs (linux kernel series 2.6 and later) to list scsi devices (or hosts) currently attached to the system. Options can be used to control the amount and form of information provided for each device. @@ -45,14 +45,14 @@ .TP --generic | -g Output the scsi generic device file name. Note that if the sg driver -is a module it needs to be loaded otherwise '-' will appear +is a module it needs to be loaded otherwise '-' will appear. .TP --help | -h -Output the usage message and exit +Output the usage message and exit. .TP --hosts | -H List the SCSI hosts currently attached to the system. If this option is -not given then SCSI devices are listed +not given then SCSI devices are listed. .TP --kname | -k Use linux default algorithm for naming devices (e.g. block major 8, @@ -71,7 +71,7 @@ more output. .TP --version | -V -outputs version number information and exits +outputs version number information and exits. .PP Information for this command is derived from the the sysfs file system whose mount point is found by examining the contents of /proc/mounts . @@ -88,7 +88,7 @@ .SH "REPORTING BUGS" Report bugs to <dgilbert at interlog dot com>. .SH COPYRIGHT -Copyright \(co 2003-2005 Douglas Gilbert +Copyright \(co 2003-2006 Douglas Gilbert .br This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/lsscsi.c new/lsscsi-0.18/lsscsi.c --- old/lsscsi-0.17/lsscsi.c 2006-02-06 08:03:24.000000000 +0100 +++ new/lsscsi-0.18/lsscsi.c 2006-03-25 04:35:34.000000000 +0100 @@ -25,8 +25,12 @@ #include <time.h> #define NAME_LEN_MAX 260 +#define FT_OTHER 0 +#define FT_BLOCK 1 +#define FT_CHAR 2 -static const char * version_str = "0.17 2006/2/6"; + +static const char * version_str = "0.18 2006/3/24"; static char sysfsroot[NAME_LEN_MAX]; static const char * sysfs_name = "sysfs"; static const char * sysfs_test_dir = "/sys/class"; @@ -130,6 +134,16 @@ }; static struct dev_node_list* dev_node_listhead = NULL; +struct sg_item_t { + char name[NAME_LEN_MAX]; + int ft; +}; + +static struct sg_item_t non_sg; +static struct sg_item_t aa_sg; + + + static int cmp_hctl(const struct addr_hctl * le, const struct addr_hctl * ri) { if (le->h == ri->h) { @@ -181,6 +195,95 @@ "'- - - -' (all))\n"); } +static int non_sg_scandir_select(const struct dirent * s) +{ + int len; + + if (FT_OTHER != non_sg.ft) + return 0; + if (DT_LNK != s->d_type) + return 0; + if (0 == strncmp("scsi_changer", s->d_name, 12)) { + strncpy(non_sg.name, s->d_name, NAME_LEN_MAX); + non_sg.ft = FT_CHAR; + return 1; + } else if (0 == strncmp("block", s->d_name, 5)) { + strncpy(non_sg.name, s->d_name, NAME_LEN_MAX); + non_sg.ft = FT_BLOCK; + return 1; + } else if (0 == strcmp("tape", s->d_name)) { + strcpy(non_sg.name, s->d_name); + non_sg.ft = FT_CHAR; + return 1; + } else if (0 == strncmp("scsi_tape:st", s->d_name, 12)) { + len = strlen(s->d_name); + if (isdigit(s->d_name[len - 1])) { + /* want 'st<num>' symlink only */ + strcpy(non_sg.name, s->d_name); + non_sg.ft = FT_CHAR; + return 1; + } else + return 0; + } else if (0 == strncmp("onstream_tape:os", s->d_name, 16)) { + strcpy(non_sg.name, s->d_name); + non_sg.ft = FT_CHAR; + return 1; + } else + return 0; +} + +static int non_sg_scan(const char * dir_name, + const struct lsscsi_opt_coll * opts) +{ + char name[NAME_LEN_MAX]; + struct dirent ** namelist; + int num, k; + + non_sg.ft = FT_OTHER; + num = scandir(dir_name, &namelist, non_sg_scandir_select, NULL); + if (num < 0) { + if (opts->verbose > 0) { + snprintf(name, NAME_LEN_MAX, "scandir: %s", dir_name); + perror(name); + } + return -1; + } + for (k = 0; k < num; ++k) + free(namelist[k]); + free(namelist); + return num; +} + + +static int sg_scandir_select(const struct dirent * s) +{ + if (FT_OTHER != aa_sg.ft) + return 0; + if (DT_LNK != s->d_type) + return 0; + if (0 == strncmp("scsi_generic", s->d_name, 12)) { + strncpy(aa_sg.name, s->d_name, NAME_LEN_MAX); + aa_sg.ft = FT_CHAR; + return 1; + } else + return 0; +} + +static int sg_scan(const char * dir_name) +{ + struct dirent ** namelist; + int num, k; + + aa_sg.ft = FT_OTHER; + num = scandir(dir_name, &namelist, sg_scandir_select, NULL); + if (num < 0) + return -1; + for (k = 0; k < num; ++k) + free(namelist[k]); + free(namelist); + return num; +} + /* Return 1 if found (in /proc/mounts or /sys/class directory exists), else 0 if problems */ @@ -243,6 +346,37 @@ return 0; } +/* Return 1 if directory, else 0 */ +static int if_directory_ch2generic(const char * dir_name) +{ + char buff[NAME_LEN_MAX]; + struct stat a_stat; + const char * old_name = "generic"; + + strcpy(buff, dir_name); + strcat(buff, "/"); + strcat(buff, old_name); + if ((stat(buff, &a_stat) >= 0) && S_ISDIR(a_stat.st_mode)) { + if (chdir(buff) < 0) + return 0; + return 1; + } + /* No "generic", so now look for "scsi_generic:sg<n>" */ + if (1 != sg_scan(dir_name)) + return 0; + strcpy(buff, dir_name); + strcat(buff, "/"); + strcat(buff, aa_sg.name); + if (stat(buff, &a_stat) < 0) + return 0; + if (S_ISDIR(a_stat.st_mode)) { + if (chdir(buff) < 0) + return 0; + return 1; + } + return 0; +} + /* Return 1 if found, else 0 if problems */ static int get_value(const char * dir_name, const char * base_name, char * value, int max_value_len) @@ -602,7 +736,7 @@ printf("ANSI SCSI revision: %02x\n", (scsi_level - 1) ? scsi_level - 1 : 1); if (opts->generic) { - if (if_directory_chdir(buff, "generic")) { + if (if_directory_ch2generic(buff)) { char wd[NAME_LEN_MAX]; if (NULL == getcwd(wd, NAME_LEN_MAX)) @@ -628,65 +762,6 @@ printf(" dir: %s\n", buff); } -#define FT_OTHER 0 -#define FT_BLOCK 1 -#define FT_CHAR 2 - -struct non_sg_item { - char name[NAME_LEN_MAX]; - int ft; -}; - -static struct non_sg_item non_sg; - -static int non_sg_scandir_select(const struct dirent * s) -{ - if (FT_OTHER != non_sg.ft) - return 0; - if (DT_LNK != s->d_type) - return 0; - if (0 == strncmp("scsi_changer", s->d_name, 12)) { - strncpy(non_sg.name, s->d_name, NAME_LEN_MAX); - non_sg.ft = FT_CHAR; - return 1; - } else if (0 == strncmp("block", s->d_name, 5)) { - strncpy(non_sg.name, s->d_name, NAME_LEN_MAX); - non_sg.ft = FT_BLOCK; - return 1; - } else if (0 == strcmp("tape", s->d_name)) { - strcpy(non_sg.name, s->d_name); - non_sg.ft = FT_CHAR; - return 1; - } else if (0 == strncmp("onstream_tape:os", s->d_name, 16)) { - strcpy(non_sg.name, s->d_name); - non_sg.ft = FT_CHAR; - return 1; - } else - return 0; -} - -static int non_sg_scan(const char * dir_name, - const struct lsscsi_opt_coll * opts) -{ - char name[NAME_LEN_MAX]; - struct dirent ** namelist; - int num, k; - - non_sg.ft = FT_OTHER; - num = scandir(dir_name, &namelist, non_sg_scandir_select, NULL); - if (num < 0) { - if (opts->verbose > 0) { - snprintf(name, NAME_LEN_MAX, "scandir: %s", dir_name); - perror(name); - } - return -1; - } - for (k = 0; k < num; ++k) - free(namelist[k]); - free(namelist); - return num; -} - static void one_sdev_entry(const char * dir_name, const char * devname, const struct lsscsi_opt_coll * opts) { @@ -756,7 +831,7 @@ printf("- "); if (opts->generic) { - if (if_directory_chdir(buff, "generic")) { + if (if_directory_ch2generic(buff)) { char wd[NAME_LEN_MAX]; if (NULL == getcwd(wd, NAME_LEN_MAX)) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lsscsi-0.17/lsscsi.spec new/lsscsi-0.18/lsscsi.spec --- old/lsscsi-0.17/lsscsi.spec 2006-02-06 08:15:46.000000000 +0100 +++ new/lsscsi-0.18/lsscsi.spec 2006-03-25 04:35:59.000000000 +0100 @@ -1,5 +1,5 @@ %define name lsscsi -%define version 0.17 +%define version 0.18 %define release 1 Summary: List SCSI devices (or hosts) and associated information @@ -55,6 +55,9 @@ %changelog +* Fri Mar 24 2006 - dgilbert at interlog dot com +- cope with dropping of 'generic' symlink post lk 2.6.16 + * lsscsi-0.18 * Mon Feb 06 2006 - dgilbert at interlog dot com - fix disappearance of block device names in lk 2.6.16-rc1 * lsscsi-0.17 ++++++ rescan-scsi-bus.sh ++++++ --- scsi/rescan-scsi-bus.sh 2006-06-02 14:41:21.000000000 +0200 +++ scsi/rescan-scsi-bus.sh 2006-07-29 14:32:58.000000000 +0200 @@ -3,7 +3,7 @@ # scsi add-single-device mechanism # (w) 1998-03-19 Kurt Garloff <kurt@garloff.de> (c) GNU GPL # (w) 2003-07-16 Kurt Garloff <garloff@suse.de> (c) GNU GPL -# $Id: rescan-scsi-bus.sh,v 1.19 2005/10/08 23:59:46 garloff Exp $ +# $Id: rescan-scsi-bus.sh,v 1.22 2006/07/24 11:26:04 garloff Exp $ setcolor () { @@ -120,8 +120,18 @@ # Find sg device with 2.6 sysfs support sgdevice26 () { - SGDEV=`readlink /sys/class/scsi_device/$host\:$channel\:$id\:$lun/device/generic` - SGDEV=`basename $SGDEV` + if test -e /sys/class/scsi_device/$host\:$channel\:$id\:$lun/device/generic; then + SGDEV=`readlink /sys/class/scsi_device/$host\:$channel\:$id\:$lun/device/generic` + SGDEV=`basename $SGDEV` + else + for SGDEV in /sys/class/scsi_generic/sg*; do + DEV=`readlink $SGDEV/device` + if test "${DEV##*/}" = "$host:$channel:$id:$lun"; then + SGDEV=`basename $SGDEV`; return + fi + done + SGDEV="" + fi } # Find sg device with 2.4 report-devs extensions @@ -205,25 +215,37 @@ testexist if test ! -z "$remove" -a ! -z "$SCSISTR"; then # Device exists: Test whether it's still online + # (testonline returns 1 if it's gone or has changed) testonline if test $? = 1 -o ! -z "$forceremove"; then echo -en "\r\e[A\e[A\e[A${red}REM: " echo "$SCSISTR" | head -n1 echo -e "${norm}\e[B\e[B" - echo 1 > /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device/delete - echo "$channel $id $lun" >/sys/class/scsi_host/host${host}/scan - fi + if test -e /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device; then + echo 1 > /sys/class/scsi_device/${host}:${channel}:${id}:${lun}/device/delete + # Try readding, should fail if device is gone + echo "$channel $id $lun" > /sys/class/scsi_host/host${host}/scan + else + echo "scsi remove-single-device $devnr" > /proc/scsi/scsi + # Try readding, should fail if device is gone + echo "scsi add-single-device $devnr" > /proc/scsi/scsi + fi + fi printf "\r\x1b[A\x1b[A\x1b[A${yellow}OLD: $norm" testexist - if test -z "$SCSISTR"; then - printf "\r${red}DEL: $norm\r\n\n\n\n" - let rmvd+=1; + if test -z "$SCSISTR"; then + printf "\r${red}DEL: $norm\r\n\n\n\n" + let rmvd+=1; fi fi if test -z "$SCSISTR"; then # Device does not exist, try to add printf "\r${green}NEW: $norm" - echo "$channel $id $lun" >/sys/class/scsi_host/host${host}/scan + if test -e /sys/class/scsi_host/host${host}/scan; then + echo "$channel $id $lun" > /sys/class/scsi_host/host${host}/scan 2> /dev/null + else + echo "scsi add-single-device $devnr" > /proc/scsi/scsi + fi testexist if test -z "$SCSISTR"; then # Device not present @@ -245,12 +267,13 @@ if test @$1 = @--help -o @$1 = @-h -o @$1 = @-?; then echo "Usage: rescan-scsi-bus.sh [options] [host [host ...]]" echo "Options:" - echo " -l activates scanning for LUNs 0-7 [default: 0]" - echo " -w scan for target device IDs 0 .. 15 [default: 0-7]" - echo " -c enables scanning of channels 0 1 [default: 0]" - echo " -r enables removing of devices [default: disabled]" + echo " -l activates scanning for LUNs 0-7 [default: 0]" + echo " -L NUM activates scanning for LUNs 0--NUM [default: 0]" + echo " -w scan for target device IDs 0 .. 15 [default: 0-7]" + echo " -c enables scanning of channels 0 1 [default: 0]" + echo " -r enables removing of devices [default: disabled]" echo "--remove: same as -r" - echo "--forceremove: Remove and readd every device (dangerous)" + echo "--forceremove: Remove and readd every device (DANGEROUS)" echo "--nooptscan: don't stop looking for LUNs is 0 is not found" echo "--color: use coloured prefixes OLD/NEW/DEL" echo "--hosts=LIST: Scan only host(s) in LIST" @@ -290,6 +313,9 @@ exit 1 fi +# Make sure sg is there +modprobe sg >/dev/null 2>&1 + # defaults unsetcolor lunsearch="0" @@ -310,6 +336,7 @@ opt=${opt#-} case "$opt" in l) lunsearch=`seq 0 7` ;; + L) lunsearch=`seq 0 $2`; shift ;; w) idsearch=`seq 0 15` ;; c) channelsearch="0 1" ;; r) remove=1 ;; @@ -338,6 +365,9 @@ declare -i found=0 declare -i rmvd=0 for host in $hosts; do + # YOU MAY NEED TO UNCOMMENT THESE TO ALLOW FOR A RESCAN + #test -e /sys/class/fc_host/host$host/issue_lip && echo 1 > /sys/class/fc_host/host$host/issue_lip 2> /dev/null; + #echo "- - -" > /sys/class/scsi_host/host$host/scan 2> /dev/null; dosearch; done echo "$found new device(s) found. " ++++++ sdparm-0.97.tgz -> sdparm-0.99.tgz ++++++ ++++ 5686 lines of diff (skipped) ++++++ sg3_utils-1.19.tgz -> sg3_utils-1.22.tgz ++++++ ++++ 25296 lines of diff (skipped) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org
participants (1)
-
root@suse.de