Hello community,

here is the log from the commit of package inst-source-utils for 
openSUSE:Factory
checked in at Mon May 9 10:43:02 CEST 2011.



--------
--- inst-source-utils/inst-source-utils.changes 2011-04-28 18:25:52.000000000 
+0200
+++ /mounts/work_src_done/STABLE/inst-source-utils/inst-source-utils.changes    
2011-05-05 12:26:20.000000000 +0200
@@ -1,0 +2,6 @@
+Thu May  5 12:20:17 CEST 2011 - [email protected]
+
+- create_sha1sum and create_sha1sums now understand option "-2"
+  to use/create sha256sum(s)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ inst-source-utils.spec ++++++
--- /var/tmp/diff_new_pack.8hRem6/_old  2011-05-09 10:41:48.000000000 +0200
+++ /var/tmp/diff_new_pack.8hRem6/_new  2011-05-09 10:41:48.000000000 +0200
@@ -19,7 +19,7 @@
 
 Name:           inst-source-utils
 Summary:        Utilities for creating customized installation sources
-Version:        2011.4.28
+Version:        2011.5.5
 Release:        1
 Url:            http://en.opensuse.org/Inst-source-utils
 License:        GPLv2+

++++++ inst-source-utils.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inst-source-utils/usr/bin/create_sha1sum 
new/inst-source-utils/usr/bin/create_sha1sum
--- old/inst-source-utils/usr/bin/create_sha1sum        2010-03-17 
14:28:14.000000000 +0100
+++ new/inst-source-utils/usr/bin/create_sha1sum        2011-05-05 
12:25:51.000000000 +0200
@@ -20,7 +20,7 @@
 # Boston, MA  02110-1301,
 # USA.
 #
-# $Id: create_sha1sum 110 2009-03-06 15:30:14Z lrupp $
+# $Id: create_sha1sum 421 2011-05-05 10:25:22Z ro $
 #
 
 function usage (){
@@ -41,13 +41,6 @@
        fi
 }
 
-if [ -z "$1" ]; then
-  usage 1;
-fi
-if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]] ; then
-  usage 0;
-fi
-
 unset LANGUAGE
 unset LANG
 export LC_ALL=POSIX
@@ -55,14 +48,21 @@
 
 CREATE_META=
 QUIET="no"
+CHECKSUM="sha1sum"
+CHECKSUM_F="SHA1SUMS"
 
-if test "x$1" = "x--meta"; then
-    CREATE_META=1
-    shift
-fi
-if test "x$1" = "x--quiet"; then
-       QUIET="yes"
-       shift
+while test -n "$1" ; do
+    case $1 in
+       --) shift ; break ;;
+        -h|--help) usage 0 ;;
+       -m|--meta) CREATE_META=1 ; shift ;;
+       -q|--quiet) QUIET="yes" ; shift ;;
+       -2) CHECKSUM="sha256sum" ; CHECKSUM_F="SHA256SUMS" ; shift ;;
+       *) break ;;
+    esac
+done
+if [ -z "$1" ]; then
+  usage 1;
 fi
 
 TMPFILE=$(mktemp /tmp/.create_sha1sums.XXXXXX)
@@ -100,7 +100,7 @@
                 test $IS_SKIP = true && continue
             }
             case "$FILE" in
-              (*.swp|SHA1SUMS*|MD5SUMS*)
+              (*.swp|SHA1SUMS*|SHA256SUMS*|MD5SUMS*)
                 continue
                 ;;
               (*)
@@ -109,25 +109,25 @@
             esac
           done
         if [ $NFILES -eq 0 ]; then
-            rm -f SHA1SUMS*
+            rm -f SHA1SUMS* SHA256SUMS*
         else
             echo -n > $TMPFILE
             for FILE in "${FILES[@]}"; do
-                   sha1sum "$FILE" >> $TMPFILE
+                   $CHECKSUM "$FILE" >> $TMPFILE
             done
-            test -e SHA1SUMS || touch SHA1SUMS
-               cmp -s $TMPFILE SHA1SUMS || {
-                mv $TMPFILE SHA1SUMS
-                               chmod 644 SHA1SUMS
-                output "INFO:   created SHA1SUMS in $DIR"
+            test -e $CHECKSUM_F || touch $CHECKSUM_F
+               cmp -s $TMPFILE $CHECKSUM_F || {
+                mv $TMPFILE $CHECKSUM_F
+                               chmod 644 $CHECKSUM_F
+                output "INFO:   created $CHECKSUM_F in $DIR"
                }
         if test -n "$CREATE_META"; then
-            test -e SHA1SUMS.meta || touch SHA1SUMS.meta
-            sha1sum SHA1SUMS > $TMPFILE
-            cmp -s $TMPFILE SHA1SUMS.meta || {
-                       mv $TMPFILE SHA1SUMS.meta
-                chmod 644 SHA1SUMS.meta
-                output "INFO:   created SHA1SUMS.meta in $DIR"
+            test -e $CHECKSUM_F.meta || touch $CHECKSUM_F.meta
+            $CHECKSUM $CHECKSUM_F > $TMPFILE
+            cmp -s $TMPFILE $CHECKSUM_F.meta || {
+                       mv $TMPFILE $CHECKSUM_F.meta
+                chmod 644 $CHECKSUM_F.meta
+                output "INFO:   created $CHECKSUM_F.meta in $DIR"
             }
            fi
             rm -f $TMPFILE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/inst-source-utils/usr/bin/create_sha1sums 
new/inst-source-utils/usr/bin/create_sha1sums
--- old/inst-source-utils/usr/bin/create_sha1sums       2010-03-17 
14:28:14.000000000 +0100
+++ new/inst-source-utils/usr/bin/create_sha1sums       2011-05-05 
12:25:51.000000000 +0200
@@ -19,13 +19,19 @@
 # Boston, MA  02110-1301,
 # USA.
 #
-# $Id: create_sha1sums,v 1.8 2009/10/12 21:13:11 lrupp Exp $
+# $Id: create_sha1sums 419 2011-05-05 10:13:45Z ro $
 #
 
 SIGN="yes"
 SIGN_OPTS=""
 INCLUDE_SHA1SUMS="no"
 EXTRA="no"
+
+CHECKSUM="sha1sum"
+CHECKSUM_T="SHA1"
+CHECKSUM_F="SHA1SUMS"
+CHECKSUM_O=""
+
 unset LANGUAGE
 unset LANG
 export LC_ALL=POSIX
@@ -33,11 +39,12 @@
 
 function usage() {
        echo "Usage: `basename $0` [OPTIONS] <CD-Rootdir>"
-    echo "       -n : don't re-sign the generated files"
-    echo "       -m : include SHA1SUMS files"
-    echo "       -x : add sha1sums for extra files"
-    echo
-       echo "       (re-)creates the SHA1SUM lines in the content file"
+       echo "       -n : don't re-sign the generated files"
+       echo "       -m : include SHA1SUMS files (or SHA256SUMS files for 
sha256)"
+       echo "       -2 : use sha256 instead of sha1"
+       echo "       -x : add sha1sums for extra files"
+       echo
+       echo "       (re-)creates the SHA*SUM lines in the content file"
        echo "       and signs the content and products file"
        exit $1
 }
@@ -50,18 +57,23 @@
        fi
 }
 
-while getopts 'hnmxs:' OPTION ; do
+while getopts 'hnmx2s:' OPTION ; do
        case $OPTION in
                h) usage 0
                ;;
-        m) INCLUDE_SHA1SUMS="yes"
-        ;;
+               m) INCLUDE_SHA1SUMS="yes"
+               ;;
                n) SIGN="no"
                ;;
                s) SIGN_OPTS=$OPTARG
                ;;
                x) EXTRA="yes"
                ;;
+               2)      CHECKSUM="sha256sum"
+                       CHECKSUM_T="SHA256"
+                       CHECKSUM_F="SHA256SUMS"
+                       CHECKSUM_O="-2"
+               ;;
        esac
 done
 shift $(( OPTIND - 1 ))
@@ -78,7 +90,7 @@
 
 # prepare content file
 CONTTMP=$(mktemp $CDS_PRIM/content-XXXXXX)
-grep -v "^META " $CDS_PRIM/content | grep -v "^KEY " | grep -v "^HASH SHA1" > 
$CONTTMP
+grep -v "^META " $CDS_PRIM/content | grep -v "^KEY " | grep -v "^HASH SHA" > 
$CONTTMP
 mv $CONTTMP $CDS_PRIM/content
 
 # add pattern and packages files to content file
@@ -89,18 +101,18 @@
 if test -d $CDS_PRIM/$DESCRDIR ; then
   pushd $CDS_PRIM/$DESCRDIR >/dev/null
   rm -f *.asc
-  sha1sum * 2>/dev/null | grep -v "MD5SUMS" | grep -v "directory.yast" | sed 
-e "s@^@META SHA1 @" >> $CDS_PRIM/content
+  $CHECKSUM * 2>/dev/null | grep -v "MD5SUMS" | grep -v "directory.yast" | sed 
-e "s@^@META $CHECKSUM_T @" >> $CDS_PRIM/content
   popd >/dev/null
 fi
 pushd $CDS_PRIM >/dev/null
 if [ "$EXTRA" = "yes" ] ; then
     for i in license.tar.gz control.xml installation.xml media.1/info.txt 
media.1/license.zip y2update.tgz driverupdate; do
         test -f $i || continue
-        sha1sum $i 2>/dev/null | sed -e "s@^@HASH SHA1 @" >> $CDS_PRIM/content
+        $CHECKSUM $i 2>/dev/null | sed -e "s@^@HASH $CHECKSUM_T @" >> 
$CDS_PRIM/content
     done
     for i in boot/*/* boot/*/loader/linux boot/*/loader/initrd 
boot/*/loader/*.spl docu/* images/* ; do
        test -f $i || continue
-        sha1sum $i 2>/dev/null | sed -e "s@^@HASH SHA1 @" >> $CDS_PRIM/content
+        $CHECKSUM $i 2>/dev/null | sed -e "s@^@HASH $CHECKSUM_T @" >> 
$CDS_PRIM/content
     done
        # check if we need to include additional files for > 11.0
        if grep -q CONTENTSTYLE $CDS_PRIM/content; then
@@ -109,23 +121,23 @@
                        SLIDESHOWDIR="$CDS_PRIM/$DATADIR/setup/slide"
                fi
                if test -n "$SLIDESHOWDIR" -a -d "$SLIDESHOWDIR" ; then
-                       /usr/bin/create_sha1sum --quiet "$SLIDESHOWDIR"
+                       /usr/bin/create_sha1sum $CHECKSUM_O --quiet 
"$SLIDESHOWDIR"
                fi
-               for sha1sumfile in $(find $SLIDESHOWDIR -name SHA1SUMS); do
+               for sha1sumfile in $(find $SLIDESHOWDIR -name $CHECKSUM_F); do
                        signit "$sha1sumfile"
                done
        fi
 
 fi
 if [ "$INCLUDE_SHA1SUMS" = "yes" ]; then
-    for i in $(find $CDS_PRIM/ -name SHA1SUMS | sed -e "s|./||"); do
+    for i in $(find $CDS_PRIM/ -name $CHECKSUM_F | sed -e "s|./||"); do
         test -f $i || continue
-        sha1sum $i 2>/dev/null | sed -e "s@^@HASH SHA1 @" >> $CDS_PRIM/content
+        $CHECKSUM $i 2>/dev/null | sed -e "s@^@HASH $CHECKSUM_T @" >> 
$CDS_PRIM/content
     done
 fi
 
 # add gpg-key files to content file
-sha1sum gpg-pubkey-* 2>/dev/null | sed -e "s@^@KEY SHA1  @" >> 
$CDS_PRIM/content
+$CHECKSUM gpg-pubkey-* 2>/dev/null | sed -e "s@^@KEY $CHECKSUM_T  @" >> 
$CDS_PRIM/content
 popd >/dev/null
 
 # signing part
@@ -152,7 +164,7 @@
                        cp -a $KEY_FILE $CDS_PRIM/$REPOFILE.key
                fi
         if [ -n "$SLIDESHOWDIR" ]; then
-            for sha1sumfile in $(find $SLIDESHOWDIR -name SHA1SUMS); do
+            for sha1sumfile in $(find $SLIDESHOWDIR -name $CHECKSUM_F); do
                 cp -a $KEY_FILE ${sha1sumfile}.key
                 # XXXX: check if this is needed
                 create_directory.yast $(dirname "$sha1sumfile")


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to