pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/bulk Add bits to allow bulk-builders to generate ch...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8d12accf7cee
branches: trunk
changeset: 488031:8d12accf7cee
user: jschauma <jschauma%pkgsrc.org@localhost>
date: Mon Jan 24 03:41:34 2005 +0000
description:
Add bits to allow bulk-builders to generate checksums for the binary
packages they upload (by setting the optional variable MKSUMS=yes) and,
also optionally, PGP signing them (by setting SIGN_AS=username%NetBSD.org@localhost,
for example).
diffstat:
mk/bulk/upload | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 52 insertions(+), 1 deletions(-)
diffs (76 lines):
diff -r b43d528cd79c -r 8d12accf7cee mk/bulk/upload
--- a/mk/bulk/upload Mon Jan 24 03:06:56 2005 +0000
+++ b/mk/bulk/upload Mon Jan 24 03:41:34 2005 +0000
@@ -1,13 +1,23 @@
#!/bin/sh
-# $NetBSD: upload,v 1.19 2005/01/20 02:02:50 tv Exp $
+# $NetBSD: upload,v 1.20 2005/01/24 03:41:34 jschauma Exp $
#
# Upload non-restricted binary pkgs to ftp server
#
+CKSUM="cksum";
+MD5="digest md5";
+SHA1="digest sha1";
+BSDSUM="sum -o 1";
+SYSVSUM="sum -o 2";
+
opsys=`uname -s`
case "$opsys" in
NetBSD) BMAKE=make ;;
+IRIX*) BMAKE=bmake;
+ BSDSUM="sum -r";
+ SYSVSUM="sum";
+ ;;
*) BMAKE=bmake ;;
esac
@@ -98,6 +108,47 @@
failed=no
cd $packages
+if [ "${MKSUMS}" = "yes" -o "${MKSUMS}" = "YES" ]; then
+
+ SUMFILES="BSDSUM CKSUM MD5 SHA1 SYSVSUM"
+
+ rm -f ${SUMFILES}
+
+ if [ x"${SIGN_AS}" != x"" ]; then
+ ( cd ${pkgsrcdir}/security/gnupg; ${BMAKE} bulk-install )
+ for i in ${SUMFILES}; do
+ echo > $i
+ echo "This file is signed with ${SIGN_AS}'s PGP key." >> $i
+ echo >> $i
+ done
+ fi
+
+ ( cd ${pkgsrcdir}/pkgtools/digest; ${BMAKE} bulk-install )
+ for i in All/*; do
+ if ! grep -q $i $exf; then
+ ${BSDSUM} $i >> BSDSUM
+ ${CKSUM} $i >> CKSUM
+ ${MD5} $i >> MD5
+ ${SHA1} $i >> SHA1
+ ${SYSVSUM} $i >> SYSVSUM
+ fi
+ done
+
+ if [ x"${SIGN_AS}" != x"" ]; then
+ for i in ${SUMFILES}; do
+ echo "Signing $i"
+ gpg --clearsign $i && rm $i
+ done
+ SUMFILES="BSDSUM.asc CKSUM.asc MD5.asc SHA1.asc SYSVSUM.asc"
+ fi
+
+ for i in ${SUMFILES}; do
+ [ -s ${packages}/${i} ] && echo $i >> $osf
+ done
+
+fi
+
+
echo "#!/bin/sh" > $upload
echo "packages=$packages" >> $upload
echo "if ! cd $packages ; then" >> $upload
Home |
Main Index |
Thread Index |
Old Index