]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - makedist
Manage: zero metadata before adding to 'external' array.
[thirdparty/mdadm.git] / makedist
index 0f10f423626020f77d683733d9a4041de725de00..6b61eb97d34382a6452fefccd82ca8676cff84ba 100755 (executable)
--- a/makedist
+++ b/makedist
@@ -1,4 +1,6 @@
 #!/bin/sh
+# avoid silly sorting
+export LANG=C
 arg=$1
 target=~/public_html/source/mdadm
 if [ " $arg" = " test" ]
@@ -42,7 +44,7 @@ else { cat inventory ; echo ANNOUNCE-$version ; } | sort -o inventory
 fi
 
 echo version = $version
-base=mdadm-$version.tgz
+base=mdadm-$version.tar.gz
 if [ " $arg" != " diff" ]
 then
   if [ -f $target/$base ] 
@@ -51,7 +53,7 @@ then
     exit 1
   fi
   trap "rm $target/$base; exit" 1 2 3
-  ( cd .. ; ln -s mdadm.v2 mdadm-$version ; tar chvf - --exclude=.git --exclude="TAGS" --exclude='*~' --exclude=.patches --exclude='*,v' --exclude='*.o' --exclude mdadm --exclude=mdadm'.[^ch0-9]' --exclude=RCS mdadm-$version ; rm mdadm-$version ) | gzip --best > $target/$base
+  git archive --prefix=mdadm-$version/ HEAD | gzip --best > $target/$base
   chmod a+r $target/$base
   ls -l $target/$base
   if tar tzf $target/$base | sed 's,[^/]*/,,' | sort | diff -u inventory -
@@ -67,8 +69,18 @@ then
   cp ChangeLog $target/ChangeLog
   if [ " $arg" != " test" ]
   then
-    scp $target/$base master.kernel.org:/pub/linux/utils/raid/mdadm/mdadm-$version.tar.gz
-    scp $target/ANNOUNCE $target/ChangeLog master.kernel.org:/pub/linux/utils/raid/mdadm/
+    echo -n "Confirm signing this release? "
+    read a
+    if [ " $a" != " y" ]; then echo OK - bye. ; exit 1; fi
+    if zcat $target/$base | gpg -ba > $target/$base.sign && gpg -ba $target/ANNOUNCE
+    then
+      kup put $target/$base  $target/$base.sign \
+         /pub/linux/utils/raid/mdadm/mdadm-$version.tar.gz
+      kup put $target/ANNOUNCE $target/ANNOUNCE.asc /pub/linux/utils/raid/mdadm/ANNOUNCE
+    else
+      echo signing failed
+      exit 1
+    fi
   fi
 else
   if [ ! -f $target/$base ]