summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1994-11-17 15:20:04 +0000
committerjkh <jkh@FreeBSD.org>1994-11-17 15:20:04 +0000
commit88b5df039d9f89b03678b7e88d7f1d78bec69cb6 (patch)
tree09cc7cb2074f308b4e71775e8a7fdfc713a35f82 /release
parentc33a64643062e818babe473de46a12aa6aa082d2 (diff)
downloadFreeBSD-src-88b5df039d9f89b03678b7e88d7f1d78bec69cb6.zip
FreeBSD-src-88b5df039d9f89b03678b7e88d7f1d78bec69cb6.tar.gz
Yow! Ok, distributions should now be fully auto-checksumming, provided
that Poul builds the rest of the dists properly. I'll run this over the XFree86 dist, but the rest will be up to him. Check bindist rule for the single line to add - it's trivial.
Diffstat (limited to 'release')
-rw-r--r--release/Makefile4
-rw-r--r--release/instdist.sh19
-rw-r--r--release/mkchecksums.sh22
3 files changed, 38 insertions, 7 deletions
diff --git a/release/Makefile b/release/Makefile
index 14ba0c3..f63c856 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.46 1994/11/17 07:11:30 jkh Exp $
+# $Id: Makefile,v 1.47 1994/11/17 14:18:00 jkh Exp $
#
# Evil floppies are, of course, 1.2MB floppies.
@@ -131,7 +131,7 @@ release20:
tar cf - . | \
${ZIPNSPLIT} ${RELEASEDIR}/tarballs/bindist/bin_tgz.)
cp ${.CURDIR}/extract.sh ${RELEASEDIR}/tarballs/bindist
- ( cd ${RELEASEDIR}/tarballs/bindist; cksum * > CKSUMS )
+ ( cd ${RELEASEDIR}/tarballs/bindist; ${.CURDIR}/mkchecksums.sh )
( cd ${.CURDIR} ; \
${MAKE} floppies )
foo:
diff --git a/release/instdist.sh b/release/instdist.sh
index b6a056d..01bdd3f 100644
--- a/release/instdist.sh
+++ b/release/instdist.sh
@@ -10,7 +10,7 @@
# putting your name on top after doing something trivial like reindenting
# it, just to make it look like you wrote it!).
#
-# $Id: instdist.sh,v 1.2 1994/11/17 11:53:13 jkh Exp $
+# $Id: instdist.sh,v 1.3 1994/11/17 14:18:02 jkh Exp $
if [ "$_INSTINST_SH_LOADED_" = "yes" ]; then
return 0
@@ -131,11 +131,20 @@ the files yourself.\n\n"; then return 1; fi
media_extract_dist()
{
- if [ -f extract.sh ]; then
- message "Extracting distribution.. Please wait!"
- sh ./extract.sh < /dev/ttyv1 > /dev/ttyv1 2>&1
+ if [ -f do_cksum.sh ]; then
+ message "Verifying checksums for distribution. Please wait!"
+ if sh ./do_cksum.sh; then
+ if [ -f extract.sh ]; then
+ message "Extracting distribution. Please wait!"
+ sh ./extract.sh < /dev/ttyv1 > /dev/ttyv1 2>&1
+ else
+ error "No installation script found!"
+ fi
+ else
+ error "Checksum error(s) found. Please check media!"
+ fi
else
- error "Improper distribution. No installation script found!"
+ error "Improper distribution. No checksum script found!"
fi
}
diff --git a/release/mkchecksums.sh b/release/mkchecksums.sh
new file mode 100644
index 0000000..bdfc8d8
--- /dev/null
+++ b/release/mkchecksums.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# mkchecksums.sh - generate interactive checksum-checking script.
+# Jordan Hubbard
+#
+# This script generates a cksum.sh script from a set of tarballs
+# and should not be run by anyone but the release coordinator (there
+# wouldn't be much point).
+#
+# Jordan
+# $Id$
+#
+
+# First generate the CKSUMS file for the benefit of those who wish to
+# use it in some other way. If we find out that folks aren't even using
+# it, we should consider eliminating it at some point. The interactive
+# stuff makes it somewhat superfluous.
+cksum * > CKSUMS
+
+# Now generate a script for actually verifying the checksums.
+awk 'BEGIN {print "rval=0"} { printf("if [ \"\`cksum %s%s%s\`\" != \"%s %s %s\" ]; then dialog --title Error --infobox \"Checksum error detected on %s!\" -1 -1; rval=1; fi\n", "\047", $3, "\047", $1, $2, $3, $3);} END {print "exit $rval"}' < CKSUMS > do_cksum.sh
+chmod +x do_cksum.sh
OpenPOWER on IntegriCloud