Only generate SHA512 and MD5 checksums for releases.

This commit is contained in:
snj 2009-09-19 07:09:53 +00:00
parent fd194ac3e5
commit f2a7edf211
6 changed files with 20 additions and 62 deletions

View File

@ -1,7 +1,5 @@
BSDSUM
CKSUM
MD5
SYSVSUM
SHA512
TRANS.TBL
INSTALL.more
./boot

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.5 2008/06/23 02:16:53 matt Exp $
# $NetBSD: Makefile,v 1.6 2009/09/19 07:09:53 snj Exp $
#
.include <bsd.own.mk>
@ -18,7 +18,7 @@ release: ${UUDECODE_FILES}
${RELEASE_INSTALL} ${DISTRIBDIR}/mac68k/stand/extensions.map \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc
rm -f \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/{BSDSUM,CKSUM,MD5,SYSVSUM}
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/{MD5,SHA512}
for i in BSD_Mac68k_Booter.bin Mkfs.sea.hqx Booter-HTML-manual-12.tar \
Mkfs_1.47.sea.bin Mkfs_1.47.sea.hqx Booter2.0.0.sea \
BooterManual.stxt.bin NetBSD_ROM.sit.hqx Installer.sea.hqx \
@ -30,32 +30,23 @@ release: ${UUDECODE_FILES}
${.CURDIR}/BooterManual.stxt.bin.uue ; \
do \
${RELEASE_INSTALL} $$i ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
${TOOL_CKSUM} -o1 `basename $$i` >> BSDSUM) ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
${TOOL_CKSUM} `basename $$i` >> CKSUM) ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
${TOOL_CKSUM} -a MD5 `basename $$i` >> MD5) ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
${TOOL_CKSUM} -o2 `basename $$i` >> SYSVSUM) ; \
${TOOL_CKSUM} -a SHA512 `basename $$i` >> SHA512) ; \
done
${INSTALL} -d ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src
rm -f \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/{BSDSUM,CKSUM,MD5}
rm -f ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/SYSVSUM
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/{MD5,SHA512}
for i in Booter2.0.0-src.sea Mkfs_1.47src.sea.hqx \
Installer_1.1g.src.sea.hqx Installer_1.1h.src.sea.hqx ; \
do \
${RELEASE_INSTALL} $$i \
${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
${TOOL_CKSUM} -o1 `basename $$i` >> BSDSUM) ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
${TOOL_CKSUM} `basename $$i` >> CKSUM) ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
${TOOL_CKSUM} -a MD5 `basename $$i` >> MD5) ; \
(cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
${TOOL_CKSUM} -o2 `basename $$i` >> SYSVSUM) ; \
${TOOL_CKSUM} -a SHA512 `basename $$i` >> SHA512) ; \
done
.include <bsd.files.mk>

View File

@ -1,4 +1,4 @@
.\" $NetBSD: main,v 1.450 2009/09/19 06:18:01 snj Exp $
.\" $NetBSD: main,v 1.451 2009/09/19 07:09:53 snj Exp $
.\"
.\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -600,46 +600,21 @@ with the command:
.Pp
In each of the source distribution set directories, there are
files which contain the checksums of the files in the directory:
.(tag SYSVSUM -offset indent
.It Li BSDSUM
Historic
.Bx
checksums for the various files
in that directory, in the format produced by the command:
.br
.Ic cksum -o 1 Ar file .
.It Li CKSUM
.Tn POSIX
checksums for the various files in that
directory, in the format produced by the command:
.br
.Ic cksum Ar file .
.(tag SHA512 -offset indent
.It Li MD5
.Tn MD5
digests for the various files in that
directory, in the format produced by the command:
digests in the format produced by the command:
.br
.Ic cksum -a MD5 Ar file .
.It Li SHA512
.Tn SHA512
digests for the various files in that
directory, in the format produced by the command:
digests in the format produced by the command:
.br
.Ic cksum -a SHA512 Ar file .
.It Li SYSVSUM
Historic AT\*[Am]T System V
.Ux
checksums for the various files in that directory, in the format produced by
the command:
.br
.Ic cksum -o 2 Ar file .
.tag)
.Pp
The SHA512 digest is the safest checksum, followed by the MD5 digest,
and finally the POSIX checksum.
The other two checksums are provided only to ensure
that the widest possible range of systems can check the integrity
of the release files.
The SHA512 digest is safer, but MD5 checksums are provided so that a wider
range of operating systems can check the integrity of the release files.
.\}
.el \{\
.Pp

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.69 2009/09/12 11:01:55 apb Exp $
# $NetBSD: Makefile,v 1.70 2009/09/19 07:09:54 snj Exp $
# The `all' target must appear before bsd.own.mk is pulled in.
all:
@ -161,7 +161,7 @@ maketarsetup: .EXEC
${MAKE} checkflist
.endif
mkdir -p ${TARDIR}
for i in BSDSUM CKSUM MD5 SHA512 SYSVSUM; do \
for i in MD5 SHA512; do \
rm -f ${TARDIR}/$$i ${TARDIR}/$$i.tmp; \
done
@ -190,7 +190,7 @@ makesrctars: .PRECIOUS .PHONY check_RELEASEDIR
makesums: .PRECIOUS .PHONY check_RELEASEDIR .WAIT \
${MAKETARSETS:@.TARS.@do-sum-${.TARS.}@}
for i in BSDSUM CKSUM MD5 SHA512 SYSVSUM; do \
for i in MD5 SHA512; do \
mv ${TARDIR}/$$i.tmp ${TARDIR}/$$i; \
done
@ -198,7 +198,7 @@ makesums: .PRECIOUS .PHONY check_RELEASEDIR .WAIT \
do-sum-${tar}: .PHONY do-${tar}
${_MKMSG_CREATE} "${tar} checksums"
${MAKESUMS} -t ${TARDIR} ${tar}.tgz
for i in BSDSUM CKSUM MD5 SHA512 SYSVSUM; do \
for i in MD5 SHA512; do \
${TOOL_CAT} ${TARDIR}/$$i >> ${TARDIR}/$$i.tmp; \
done
.endfor

View File

@ -1,6 +1,6 @@
#! /bin/sh
#
# $NetBSD: makesrctars,v 1.36 2009/04/11 15:09:32 apb Exp $
# $NetBSD: makesrctars,v 1.37 2009/09/19 07:09:54 snj Exp $
#
# makesrctars srcdir setdir
# Create source tarballs in setdir from the source under srcdir.
@ -134,10 +134,7 @@ fi
msg "Creating checksum files"
(cd "${setdir}"
${CKSUM} -o1 *.tgz > BSDSUM
${CKSUM} *.tgz > CKSUM
${CKSUM} -a md5 *.tgz > MD5
${CKSUM} -o2 *.tgz > SYSVSUM
${CKSUM} -a sha512 *.tgz > SHA512
)
exit 0

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $NetBSD: makesums,v 1.15 2006/01/08 10:10:03 apb Exp $
# $NetBSD: makesums,v 1.16 2009/09/19 07:09:54 snj Exp $
#
# Make checksum files for files in ``tardir''. Usage:
# makesums [-a] [-t tardir] [setname [...]]
@ -15,8 +15,8 @@
# After shell glob expansion, the list of sets is filtered to remove known
# output file names (of the form *SUM, SHA512 and MD5), non-existent files, and
# subdirectories. If this filtering leaves no files, then no output files are
# produced. Otherwise the resulting list of files are checksummed and five
# output files (BSDSUM, CKSUM, MD5, SHA512, SYSVSUM) are produced.
# produced. Otherwise the resulting list of files are checksummed and two
# output files (MD5 and SHA512) are produced.
#
prog="${0##*/}"
@ -74,9 +74,6 @@ fi
lists="$(${FIND} ${pat} -prune \( -type f -o -type l \) \
\! -name '*SUM' \! -name MD5 \! -name SHA512 2>/dev/null)"
if [ -n "${lists}" ]; then
eval ${CKSUM} -o1 ${lists} ${append} BSDSUM
eval ${CKSUM} ${lists} ${append} CKSUM
eval ${CKSUM} -a md5 ${lists} ${append} MD5
eval ${CKSUM} -o2 ${lists} ${append} SYSVSUM
eval ${CKSUM} -a sha512 ${lists} ${append} SHA512
fi