head 1.19; access; symbols netbsd-11-0-RC6:1.19 netbsd-11-0-RC5:1.19 netbsd-11-0-RC4:1.19 netbsd-11-0-RC3:1.19 netbsd-11-0-RC2:1.19 netbsd-11-0-RC1:1.19 perseant-exfatfs-base-20250801:1.19 netbsd-11:1.19.0.4 netbsd-11-base:1.19 netbsd-10-1-RELEASE:1.17 perseant-exfatfs-base-20240630:1.19 perseant-exfatfs:1.19.0.2 perseant-exfatfs-base:1.19 netbsd-8-3-RELEASE:1.16 netbsd-9-4-RELEASE:1.17 netbsd-10-0-RELEASE:1.17 netbsd-10-0-RC6:1.17 netbsd-10-0-RC5:1.17 netbsd-10-0-RC4:1.17 netbsd-10-0-RC3:1.17 netbsd-10-0-RC2:1.17 netbsd-10-0-RC1:1.17 netbsd-10:1.17.0.10 netbsd-10-base:1.17 netbsd-9-3-RELEASE:1.17 cjep_sun2x-base1:1.17 cjep_sun2x:1.17.0.8 cjep_sun2x-base:1.17 cjep_staticlib_x-base1:1.17 netbsd-9-2-RELEASE:1.17 cjep_staticlib_x:1.17.0.6 cjep_staticlib_x-base:1.17 netbsd-9-1-RELEASE:1.17 phil-wifi-20200421:1.17 phil-wifi-20200411:1.17 is-mlppp:1.17.0.4 is-mlppp-base:1.17 phil-wifi-20200406:1.17 netbsd-8-2-RELEASE:1.16 netbsd-9-0-RELEASE:1.17 netbsd-9-0-RC2:1.17 netbsd-9-0-RC1:1.17 phil-wifi-20191119:1.17 netbsd-9:1.17.0.2 netbsd-9-base:1.17 phil-wifi-20190609:1.17 netbsd-8-1-RELEASE:1.16 netbsd-8-1-RC1:1.16 pgoyette-compat-merge-20190127:1.16.46.1 pgoyette-compat-20190127:1.17 pgoyette-compat-20190118:1.17 pgoyette-compat-1226:1.17 pgoyette-compat-1126:1.17 pgoyette-compat-1020:1.17 pgoyette-compat-0930:1.17 pgoyette-compat-0906:1.16 netbsd-7-2-RELEASE:1.16 pgoyette-compat-0728:1.16 netbsd-8-0-RELEASE:1.16 phil-wifi:1.16.0.48 phil-wifi-base:1.16 pgoyette-compat-0625:1.16 netbsd-8-0-RC2:1.16 pgoyette-compat-0521:1.16 pgoyette-compat-0502:1.16 pgoyette-compat-0422:1.16 netbsd-8-0-RC1:1.16 pgoyette-compat-0415:1.16 pgoyette-compat-0407:1.16 pgoyette-compat-0330:1.16 pgoyette-compat-0322:1.16 pgoyette-compat-0315:1.16 netbsd-7-1-2-RELEASE:1.16 pgoyette-compat:1.16.0.46 pgoyette-compat-base:1.16 netbsd-7-1-1-RELEASE:1.16 matt-nb8-mediatek:1.16.0.44 matt-nb8-mediatek-base:1.16 perseant-stdc-iso10646:1.16.0.42 perseant-stdc-iso10646-base:1.16 netbsd-8:1.16.0.40 netbsd-8-base:1.16 prg-localcount2-base3:1.16 prg-localcount2-base2:1.16 prg-localcount2-base1:1.16 prg-localcount2:1.16.0.38 prg-localcount2-base:1.16 pgoyette-localcount-20170426:1.16 bouyer-socketcan-base1:1.16 pgoyette-localcount-20170320:1.16 netbsd-7-1:1.16.0.36 netbsd-7-1-RELEASE:1.16 netbsd-7-1-RC2:1.16 netbsd-7-nhusb-base-20170116:1.16 bouyer-socketcan:1.16.0.34 bouyer-socketcan-base:1.16 pgoyette-localcount-20170107:1.16 netbsd-7-1-RC1:1.16 pgoyette-localcount-20161104:1.16 netbsd-7-0-2-RELEASE:1.16 localcount-20160914:1.16 netbsd-7-nhusb:1.16.0.32 netbsd-7-nhusb-base:1.16 pgoyette-localcount-20160806:1.16 pgoyette-localcount-20160726:1.16 pgoyette-localcount:1.16.0.30 pgoyette-localcount-base:1.16 netbsd-7-0-1-RELEASE:1.16 netbsd-7-0:1.16.0.28 netbsd-7-0-RELEASE:1.16 netbsd-7-0-RC3:1.16 netbsd-7-0-RC2:1.16 netbsd-7-0-RC1:1.16 netbsd-5-2-3-RELEASE:1.15.28.1 netbsd-5-1-5-RELEASE:1.15.28.1 netbsd-6-0-6-RELEASE:1.16 netbsd-6-1-5-RELEASE:1.16 netbsd-7:1.16.0.26 netbsd-7-base:1.16 yamt-pagecache-base9:1.16 yamt-pagecache-tag8:1.16 netbsd-6-1-4-RELEASE:1.16 netbsd-6-0-5-RELEASE:1.16 tls-earlyentropy:1.16.0.24 tls-earlyentropy-base:1.16 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.16 riastradh-drm2-base3:1.16 netbsd-6-1-3-RELEASE:1.16 netbsd-6-0-4-RELEASE:1.16 netbsd-5-2-2-RELEASE:1.15.28.1 netbsd-5-1-4-RELEASE:1.15.28.1 netbsd-6-1-2-RELEASE:1.16 netbsd-6-0-3-RELEASE:1.16 netbsd-5-2-1-RELEASE:1.15.28.1 netbsd-5-1-3-RELEASE:1.15.28.1 netbsd-6-1-1-RELEASE:1.16 riastradh-drm2-base2:1.16 riastradh-drm2-base1:1.16 riastradh-drm2:1.16.0.16 riastradh-drm2-base:1.16 netbsd-6-1:1.16.0.22 netbsd-6-0-2-RELEASE:1.16 netbsd-6-1-RELEASE:1.16 khorben-n900:1.16.0.20 netbsd-6-1-RC4:1.16 netbsd-6-1-RC3:1.16 agc-symver:1.16.0.18 agc-symver-base:1.16 netbsd-6-1-RC2:1.16 netbsd-6-1-RC1:1.16 yamt-pagecache-base8:1.16 netbsd-5-2:1.15.28.1.0.6 netbsd-6-0-1-RELEASE:1.16 yamt-pagecache-base7:1.16 netbsd-5-2-RELEASE:1.15.28.1 netbsd-5-2-RC1:1.15.28.1 matt-nb6-plus-nbase:1.16 yamt-pagecache-base6:1.16 netbsd-6-0:1.16.0.14 netbsd-6-0-RELEASE:1.16 netbsd-6-0-RC2:1.16 tls-maxphys:1.16.0.12 tls-maxphys-base:1.16 matt-nb6-plus:1.16.0.10 matt-nb6-plus-base:1.16 netbsd-6-0-RC1:1.16 yamt-pagecache-base5:1.16 yamt-pagecache-base4:1.16 netbsd-6:1.16.0.8 netbsd-6-base:1.16 netbsd-5-1-2-RELEASE:1.15.28.1 netbsd-5-1-1-RELEASE:1.15.28.1 yamt-pagecache-base3:1.16 yamt-pagecache-base2:1.16 yamt-pagecache:1.16.0.6 yamt-pagecache-base:1.16 cherry-xenmp:1.16.0.4 cherry-xenmp-base:1.16 bouyer-quota2-nbase:1.16 bouyer-quota2:1.16.0.2 bouyer-quota2-base:1.16 matt-mips64-premerge-20101231:1.16 matt-nb5-mips64-premerge-20101231:1.15.34.1 matt-nb5-pq3:1.15.28.1.0.4 matt-nb5-pq3-base:1.15.28.1 netbsd-5-1:1.15.28.1.0.2 netbsd-5-1-RELEASE:1.15.28.1 netbsd-5-1-RC4:1.15.28.1 matt-nb5-mips64-k15:1.15.34.1 netbsd-5-1-RC3:1.15.28.1 netbsd-5-1-RC2:1.15.28.1 netbsd-5-1-RC1:1.15.28.1 netbsd-5-0-2-RELEASE:1.15.32.1 matt-nb5-mips64-premerge-20091211:1.15 matt-premerge-20091211:1.16 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.15 matt-nb4-mips64-k7-u2a-k9b:1.15 matt-nb5-mips64-u1-k1-k5:1.15 matt-nb5-mips64:1.15.0.34 netbsd-5-0-1-RELEASE:1.15 jym-xensuspend-nbase:1.15 netbsd-5-0:1.15.0.32 netbsd-5-0-RELEASE:1.15 netbsd-5-0-RC4:1.15 netbsd-5-0-RC3:1.15 netbsd-5-0-RC2:1.15 jym-xensuspend:1.15.0.30 jym-xensuspend-base:1.15 netbsd-5-0-RC1:1.15 netbsd-5:1.15.0.28 netbsd-5-base:1.15 matt-mips64-base2:1.15 matt-mips64:1.15.0.26 netbsd-4-0-1-RELEASE:1.15 wrstuden-revivesa-base-3:1.15 wrstuden-revivesa-base-2:1.15 wrstuden-fixsa-newbase:1.15 wrstuden-revivesa-base-1:1.15 yamt-pf42-base4:1.15 yamt-pf42-base3:1.15 hpcarm-cleanup-nbase:1.15 yamt-pf42-baseX:1.15 yamt-pf42-base2:1.15 wrstuden-revivesa:1.15.0.24 wrstuden-revivesa-base:1.15 yamt-pf42:1.15.0.22 yamt-pf42-base:1.15 mjf-devfs2:1.15.0.20 mjf-devfs2-base:1.15 keiichi-mipv6:1.15.0.18 keiichi-mipv6-base:1.15 mjf-devfs:1.15.0.16 mjf-devfs-base:1.15 matt-armv6-nbase:1.15 matt-armv6-prevmlocking:1.15 wrstuden-fixsa-base-1:1.15 netbsd-4-0:1.15.0.14 netbsd-4-0-RELEASE:1.15 cube-autoconf:1.15.0.12 cube-autoconf-base:1.15 netbsd-4-0-RC5:1.15 netbsd-4-0-RC4:1.15 netbsd-4-0-RC3:1.15 netbsd-4-0-RC2:1.15 netbsd-4-0-RC1:1.15 matt-armv6:1.15.0.10 matt-armv6-base:1.15 matt-mips64-base:1.15 hpcarm-cleanup:1.15.0.8 hpcarm-cleanup-base:1.15 netbsd-3-1-1-RELEASE:1.7.2.2 netbsd-3-0-3-RELEASE:1.7.2.2 wrstuden-fixsa:1.15.0.6 wrstuden-fixsa-base:1.15 abandoned-netbsd-4-base:1.15 abandoned-netbsd-4:1.15.0.2 netbsd-3-1:1.7.2.2.0.4 netbsd-3-1-RELEASE:1.7.2.2 netbsd-3-0-2-RELEASE:1.7.2.2 netbsd-3-1-RC4:1.7.2.2 netbsd-3-1-RC3:1.7.2.2 netbsd-3-1-RC2:1.7.2.2 netbsd-3-1-RC1:1.7.2.2 netbsd-4:1.15.0.4 netbsd-4-base:1.15 netbsd-3-0-1-RELEASE:1.7.2.2 netbsd-3-0:1.7.2.2.0.2 netbsd-3-0-RELEASE:1.7.2.2 netbsd-3-0-RC6:1.7.2.1 netbsd-3-0-RC5:1.7.2.1 netbsd-3-0-RC4:1.7.2.1 netbsd-3-0-RC3:1.7.2.1 netbsd-3-0-RC2:1.7.2.1 netbsd-3-0-RC1:1.7.2.1 netbsd-2-0-3-RELEASE:1.6 netbsd-2-1:1.6.0.6 netbsd-2-1-RELEASE:1.6 netbsd-2-1-RC6:1.6 netbsd-2-1-RC5:1.6 netbsd-2-1-RC4:1.6 netbsd-2-1-RC3:1.6 netbsd-2-1-RC2:1.6 netbsd-2-1-RC1:1.6 netbsd-2-0-2-RELEASE:1.6 netbsd-3:1.7.0.2 netbsd-3-base:1.7 netbsd-2-0-1-RELEASE:1.6 netbsd-2:1.6.0.4 netbsd-2-base:1.6 netbsd-2-0-RELEASE:1.6 netbsd-2-0-RC5:1.6 netbsd-2-0-RC4:1.6 netbsd-2-0-RC3:1.6 netbsd-2-0-RC2:1.6 netbsd-2-0-RC1:1.6 netbsd-2-0:1.6.0.2 netbsd-2-0-base:1.6 netbsd-1-6-PATCH002-RELEASE:1.3.2.2 netbsd-1-6-PATCH002:1.3.2.2 netbsd-1-6-PATCH002-RC4:1.3.2.2 netbsd-1-6-PATCH002-RC3:1.3.2.2 netbsd-1-6-PATCH002-RC2:1.3.2.2 netbsd-1-6-PATCH002-RC1:1.3.2.2 netbsd-1-6-PATCH001:1.3.2.2 netbsd-1-6-PATCH001-RELEASE:1.3.2.2 netbsd-1-6-PATCH001-RC3:1.3.2.2 netbsd-1-6-PATCH001-RC2:1.3.2.2 netbsd-1-6-PATCH001-RC1:1.3.2.2 fvdl_fs64_base:1.5 netbsd-1-6-RELEASE:1.3.2.1 netbsd-1-6-RC3:1.3.2.1 netbsd-1-6-RC2:1.3.2.1 netbsd-1-6-RC1:1.3.2.1 netbsd-1-6:1.3.0.2 netbsd-1-6-base:1.3 netbsd-1-5-PATCH003:1.1.8.1 netbsd-1-5-PATCH002:1.1.8.1 netbsd-1-5-PATCH001:1.1.8.1 netbsd-1-5-RELEASE:1.1.8.1 netbsd-1-5-BETA2:1.1.8.1 netbsd-1-5-BETA:1.1.8.1 netbsd-1-4-PATCH003:1.1.10.3 netbsd-1-5-ALPHA2:1.1 netbsd-1-4:1.1.0.10 netbsd-1-5:1.1.0.8 netbsd-1-5-base:1.1 minoura-xpg4dl:1.1.0.6 minoura-xpg4dl-base:1.1 wrstuden-devbsize-19991221:1.1 wrstuden-devbsize:1.1.0.4 wrstuden-devbsize-base:1.1 comdex-fall-1999:1.1.0.2 comdex-fall-1999-base:1.1; locks; strict; comment @# @; 1.19 date 2023.11.08.13.02.47; author christos; state Exp; branches; next 1.18; commitid 7UaSTN7ng3fa6OLE; 1.18 date 2023.11.08.12.58.04; author christos; state Exp; branches; next 1.17; commitid seK1IAFAa3Kh4OLE; 1.17 date 2018.09.28.15.04.20; author martin; state Exp; branches; next 1.16; commitid A2ezIOQlAKwBMSTA; 1.16 date 2009.09.19.07.09.54; author snj; state Exp; branches 1.16.46.1 1.16.48.1; next 1.15; 1.15 date 2006.01.08.10.10.03; author apb; state Exp; branches 1.15.4.1 1.15.14.1 1.15.20.1 1.15.28.1 1.15.32.1 1.15.34.1; next 1.14; 1.14 date 2006.01.03.18.31.09; author apb; state Exp; branches; next 1.13; 1.13 date 2006.01.03.16.40.16; author apb; state Exp; branches; next 1.12; 1.12 date 2006.01.03.15.42.42; author apb; state Exp; branches; next 1.11; 1.11 date 2005.10.21.02.41.14; author jmc; state Exp; branches; next 1.10; 1.10 date 2005.10.07.17.21.36; author jmc; state Exp; branches; next 1.9; 1.9 date 2005.10.06.02.12.49; author jmc; state Exp; branches; next 1.8; 1.8 date 2005.09.13.16.38.01; author elad; state Exp; branches; next 1.7; 1.7 date 2004.04.20.05.37.15; author lukem; state Exp; branches 1.7.2.1; next 1.6; 1.6 date 2003.01.03.15.26.32; author lukem; state Exp; branches; next 1.5; 1.5 date 2002.09.15.09.47.42; author lukem; state Exp; branches; next 1.4; 1.4 date 2002.07.23.09.02.45; author lukem; state Exp; branches; next 1.3; 1.3 date 2002.03.31.15.17.58; author bjh21; state Exp; branches 1.3.2.1; next 1.2; 1.2 date 2000.08.20.08.29.59; author toddpw; state Exp; branches; next 1.1; 1.1 date 99.07.22.20.10.17; author is; state Exp; branches 1.1.8.1 1.1.10.1; next ; 1.16.46.1 date 2018.09.30.01.45.04; author pgoyette; state Exp; branches; next ; commitid SQ44grEPCeKPh4UA; 1.16.48.1 date 2019.06.10.21.42.29; author christos; state Exp; branches; next ; commitid jtc8rnCzWiEEHGqB; 1.15.4.1 date 2009.10.09.12.06.03; author sborrill; state Exp; branches; next ; 1.15.14.1 date 2009.10.10.08.06.28; author sborrill; state Exp; branches; next ; 1.15.20.1 date 2008.10.05.20.10.32; author mjf; state dead; branches; next ; 1.15.28.1 date 2009.10.04.11.48.39; author bouyer; state Exp; branches; next ; 1.15.32.1 date 2009.10.04.11.50.26; author bouyer; state Exp; branches; next ; 1.15.34.1 date 2010.04.21.05.20.40; author matt; state Exp; branches; next ; 1.7.2.1 date 2005.09.30.22.43.47; author tron; state Exp; branches; next 1.7.2.2; 1.7.2.2 date 2005.12.15.20.12.54; author tron; state Exp; branches; next ; 1.3.2.1 date 2002.07.23.09.16.20; author lukem; state Exp; branches; next 1.3.2.2; 1.3.2.2 date 2002.09.30.12.55.24; author lukem; state Exp; branches; next ; 1.1.8.1 date 2000.08.20.22.29.06; author toddpw; state Exp; branches; next ; 1.1.10.1 date 99.07.22.20.10.17; author he; state dead; branches; next 1.1.10.2; 1.1.10.2 date 2000.07.09.21.30.43; author he; state Exp; branches; next 1.1.10.3; 1.1.10.3 date 2000.08.20.22.30.43; author toddpw; state Exp; branches; next ; desc @@ 1.19 log @More conservative umask @ text @#!/bin/sh # # $NetBSD: makesums,v 1.18 2023/11/08 12:58:04 christos Exp $ # # Make checksum files for files in ``tardir''. Usage: # makesums [-a] [-t tardir] [setname [...]] # # If -t is omitted, RELEASEDIR must be set and not empty. # The ``setname'' arguments comprise a list of files to checksum, # and may be omitted (in which case ``*.tgz *.tar.xz'' is used). # If -A is given, then the checksum are appended to possibly existing files. # NOTE: Don't use this when running parallel jobs # If -a is given, then the list of sets is ignored, and ``*'' is used. # # 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 two # output files (MD5 and SHA512) are produced. # prog="${0##*/}" rundir="$(dirname "$0")" # ${0%/*} isn't good enough when there's no "/" . "${rundir}/sets.subr" # set defaults targetdir="${RELEASEDIR}" dash_all=no append=\> usage() { cat 1>&2 <\> ;; a) dash_all=yes ;; t) targetdir="${OPTARG}" ;; *) usage ;; esac done shift $((${OPTIND} - 1)) if [ -z "${targetdir}" ]; then echo >&2 "${prog}: \${RELEASEDIR} must be set or provided with -t" exit 1 fi cd "${targetdir}" pat="$*" if [ "${dash_all}" = yes ]; then pat='*' elif [ -z "${pat}" ]; then pat='*.tgz *.tar.xz' 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} -a md5 ${lists} ${append} MD5 eval ${CKSUM} -a sha512 ${lists} ${append} SHA512 fi @ 1.18 log @Set the file creation mask consistently because the files these scripts create can become part of an iso image. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.17 2018/09/28 15:04:20 martin Exp $ d43 1 a43 1 umask 002 @ 1.17 log @Prepare for .tar.xz sets @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.16 2009/09/19 07:09:54 snj Exp $ d43 1 @ 1.16 log @Only generate SHA512 and MD5 checksums for releases. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.15 2006/01/08 10:10:03 apb Exp $ d10 1 a10 1 # and may be omitted (in which case ``*.tgz'' is used). d38 1 a38 1 setname [...] sets to checksum [*.tgz] d72 1 a72 1 pat='*.tgz' @ 1.16.48.1 log @Sync with HEAD @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.17 2018/09/28 15:04:20 martin Exp $ d10 1 a10 1 # and may be omitted (in which case ``*.tgz *.tar.xz'' is used). d38 1 a38 1 setname [...] sets to checksum [*.tgz *.tar.xz] d72 1 a72 1 pat='*.tgz *.tar.xz' @ 1.16.46.1 log @Ssync with HEAD @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.17 2018/09/28 15:04:20 martin Exp $ d10 1 a10 1 # and may be omitted (in which case ``*.tgz *.tar.xz'' is used). d38 1 a38 1 setname [...] sets to checksum [*.tgz *.tar.xz] d72 1 a72 1 pat='*.tgz *.tar.xz' @ 1.15 log @When printing messages to stderr, always use echo >&2 "${prog}: ..." Approved by christos @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.14 2006/01/03 18:31:09 apb Exp $ d18 2 a19 2 # produced. Otherwise the resulting list of files are checksummed and five # output files (BSDSUM, CKSUM, MD5, SHA512, SYSVSUM) are produced. a76 2 eval ${CKSUM} -o1 ${lists} ${append} BSDSUM eval ${CKSUM} ${lists} ${append} CKSUM a77 1 eval ${CKSUM} -o2 ${lists} ${append} SYSVSUM @ 1.15.34.1 log @sync to netbsd-5 @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.15.28.1 2009/10/04 11:48:39 bouyer Exp $ d18 2 a19 2 # produced. Otherwise the resulting list of files are checksummed and two # output files (MD5 and SHA512) are produced. d77 2 d80 1 @ 1.15.14.1 log @Pull up the following revisions(s) (requested by snj in ticket #1365): share/man/man7/release7: revision 1.31 (via patch) distrib/cdrom/hide-hfs.lst: revision 1.5 distrib/mac68k/stand/Makefile: revision 1.6 (via patch) distrib/notes/common/main: revision 1.451 distrib/sets/Makefile: revision 1.70 distrib/sets/makesrctars: revision 1.37 distrib/sets/makesums: revision 1.16 Only generate SHA512 and MD5 checksums for releases. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.15 2006/01/08 10:10:03 apb Exp $ d18 2 a19 2 # produced. Otherwise the resulting list of files are checksummed and two # output files (MD5 and SHA512) are produced. d77 2 d80 1 @ 1.15.4.1 log @Pull up the following revisions(s) (requested by snj in ticket #1365): share/man/man7/release.7 revision 1.31 (via patch) distrib/cdrom/hide-hfs.lst revision 1.5 distrib/mac68k/stand/Makefile revision 1.6 (via patch) distrib/notes/common/main: revision 1.451 distrib/sets/Makefile: revision 1.70 distrib/sets/makesrctars: revision 1.37 distrib/sets/makesums: revision 1.16 Only generate SHA512 and MD5 checksums for releases. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.15 2006/01/08 10:10:03 apb Exp $ d18 2 a19 2 # produced. Otherwise the resulting list of files are checksummed and two # output files (MD5 and SHA512) are produced. d77 2 d80 1 @ 1.15.32.1 log @Pull up following revision(s) (requested by snj in ticket #1066): distrib/notes/common/main: revision 1.451 share/man/man7/release.7: revision 1.31 via patch distrib/mac68k/stand/Makefile: revision 1.6 distrib/sets/makesums: revision 1.16 distrib/sets/Makefile: revision 1.70 distrib/sets/makesrctars: revision 1.37 distrib/cdrom/hide-hfs.lst: revision 1.5 Sync release(7) with reality. Only generate SHA512 and MD5 checksums for releases. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.15 2006/01/08 10:10:03 apb Exp $ d18 2 a19 2 # produced. Otherwise the resulting list of files are checksummed and two # output files (MD5 and SHA512) are produced. d77 2 d80 1 @ 1.15.28.1 log @Pull up following revision(s) (requested by snj in ticket #1066): distrib/notes/common/main: revision 1.451 share/man/man7/release.7: revision 1.31 via patch distrib/mac68k/stand/Makefile: revision 1.6 distrib/sets/makesums: revision 1.16 distrib/sets/Makefile: revision 1.70 distrib/sets/makesrctars: revision 1.37 distrib/cdrom/hide-hfs.lst: revision 1.5 Sync release(7) with reality. Only generate SHA512 and MD5 checksums for releases. @ text @d3 1 a3 1 # $NetBSD$ d18 2 a19 2 # produced. Otherwise the resulting list of files are checksummed and two # output files (MD5 and SHA512) are produced. d77 2 d80 1 @ 1.15.20.1 log @Sync with HEAD. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.15 2006/01/08 10:10:03 apb Exp $ @ 1.14 log @Ensure that (almost) all shell variables in distrib/sets/* scripts are used with curly braces and quotes, as in "${var}". Also ensure that command substitution is quoted, as in "$(command)", and convert `command` to $(command). Reviewed by agc @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.13 2006/01/03 16:40:16 apb Exp $ d63 1 a63 1 echo 1>&2 '${RELEASEDIR} must be set or provided with -t' @ 1.13 log @Add shell variables defined in sets.subr for almost all commands used by scripts in distrib/sets/*. This is intended to be useful when cross building. Only trivial commands like echo, cat, and rm are excluded from this treatment. While I am here, make ${MTREE} and ${DB} follow the pattern used by most other such variables. Reviewed by agc. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.12 2006/01/03 15:42:42 apb Exp $ d22 1 a22 1 prog=${0##*/} d27 1 a27 1 targetdir=$RELEASEDIR d37 1 a37 1 -t targetdir \$RELEASEDIR [$targetdir] d53 1 a53 1 targetdir=${OPTARG} d62 2 a63 2 if [ -z "$targetdir" ]; then echo 1>&2 '$RELEASEDIR must be set or provided with -t' d67 1 a67 1 cd $targetdir d69 1 a69 1 if [ $dash_all = yes ]; then d71 1 a71 1 elif [ -z "$pat" ]; then d74 8 a81 8 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 @ 1.12 log @Move default values for several shell variables into sets.subr. Reviewed by agc @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.11 2005/10/21 02:41:14 jmc Exp $ d74 2 a75 1 lists=$(find $pat -prune \( -type f -o -type l \) \! -name '*SUM' \! -name MD5 \! -name SHA512 2>/dev/null) @ 1.11 log @Set default vars so blank and unset both end up w. a reasonable default @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.10 2005/10/07 17:21:36 jmc Exp $ d23 2 a26 1 : ${CKSUM:=cksum} @ 1.10 log @Add option to append to existing checksum files @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.9 2005/10/06 02:12:49 jmc Exp $ d25 1 a25 1 : ${CKSUM=cksum} @ 1.9 log @Correct comments to line up with SHA512 generation now @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.8 2005/09/13 16:38:01 elad Exp $ d11 2 d28 1 d33 2 a34 1 Usage: ${prog} [-a] [-t targetdir] [setname [...]] d43 1 a43 1 while getopts at: ch; do d45 3 d75 5 a79 5 ${CKSUM} -o1 $lists > BSDSUM ${CKSUM} $lists > CKSUM ${CKSUM} -a md5 $lists > MD5 ${CKSUM} -o2 $lists > SYSVSUM ${CKSUM} -a sha512 $lists > SHA512 @ 1.8 log @- cksum -m -> cksum -a md5. - Generate SHA512 checksums too. Is there any reason to still generate MD5 checksums? @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.7 2004/04/20 05:37:15 lukem Exp $ d14 1 a14 1 # output file names (of the form *SUM and MD5), non-existent files, and d16 2 a17 2 # produced. Otherwise the resulting list of files are checksummed and four # output files (BSDSUM, CKSUM, MD5, SYSVSUM) are produced. @ 1.7 log @clean up to operate similar to other scripts in this directory, including: * separate usage function * use getopts (replacing '-all' with '-a') @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.6 2003/01/03 15:26:32 lukem Exp $ d66 1 a66 1 lists=$(find $pat -prune \( -type f -o -type l \) \! -name '*SUM' \! -name MD5 2>/dev/null) d70 1 a70 1 ${CKSUM} -m $lists > MD5 d72 1 @ 1.7.2.1 log @Pull up following revision(s) (requested by elad in ticket #827): distrib/sets/makesums: revision 1.8 - cksum -m -> cksum -a md5. - Generate SHA512 checksums too. Is there any reason to still generate MD5 checksums? @ text @d3 1 a3 1 # $NetBSD$ d66 1 a66 1 lists=$(find $pat -prune \( -type f -o -type l \) \! -name '*SUM' \! -name MD5 \! -name SHA512 2>/dev/null) d70 1 a70 1 ${CKSUM} -a md5 $lists > MD5 a71 1 ${CKSUM} -a sha512 $lists > SHA512 @ 1.7.2.2 log @Pull up following revision(s) (requested by jmc in ticket #1049): distrib/sets/makesums: revision 1.9 Correct comments to line up with SHA512 generation now @ text @d14 1 a14 1 # output file names (of the form *SUM, SHA512 and MD5), non-existent files, and d16 2 a17 2 # produced. Otherwise the resulting list of files are checksummed and five # output files (BSDSUM, CKSUM, MD5, SHA512, SYSVSUM) are produced. @ 1.6 log @improve description of -t @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.5 2002/09/15 09:47:42 lukem Exp $ d6 1 a6 1 # makesums [-t tardir] [ -all ] [setname ...] d11 1 a11 1 # If -all is given, then the list of sets is ignored, and ``*'' is used. d20 2 d24 1 a24 1 tars=$RELEASEDIR d27 11 d39 3 a41 3 while : ; do case $1 in -all) a42 4 break ;; -t*) tars=$2; shift d44 2 a45 8 -*) cat 1>&2 </dev/null` @ 1.5 log @Also sum symlinks (as well as files) which match, as we often replace common sets with a symlink to a shared copy, and this change ensures that all the appropriate entries have sums generated. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.4 2002/07/23 09:02:45 lukem Exp $ d37 2 a38 2 Usage: $0 [-t tars] [-all] [setname ...] -t tars \$RELEASEDIR [$tars] @ 1.4 log @set MAKE="${MAKE:-make} -j 1" to prevent problems where the output of make -j N>1 would result in junk in various shell variables @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.3 2002/03/31 15:17:58 bjh21 Exp $ d63 1 a63 1 lists=`find $pat -prune -type f \! -name '*SUM' \! -name MD5 2>/dev/null` @ 1.3 log @Use ${CKSUM} rather than cksum if the former's defined. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.2 2000/08/20 08:29:59 toddpw Exp $ a21 1 : ${MAKE=make} # XXX: what purpose does this serve?? @ 1.3.2.1 log @Pull up revision 1.4 (requested by lukem): set MAKE="${MAKE:-make} -j 1" to prevent problems where the output of make -j N>1 would result in junk in various shell variables @ text @d3 1 a3 1 # $NetBSD$ d22 1 @ 1.3.2.2 log @Pull up revision 1.5 (requested by lukem in ticket #822): Also sum symlinks (as well as files) which match, as we often replace common sets with a symlink to a shared copy, and this change ensures that all the appropriate entries have sums generated. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.3.2.1 2002/07/23 09:16:20 lukem Exp $ d63 1 a63 1 lists=`find $pat -prune \( -type f -o -type l \) \! -name '*SUM' \! -name MD5 2>/dev/null` @ 1.2 log @Enhance script. Add -all option and improve intelligence about which files to sum (and whether to do sums at all!). Describe script in comments at the top. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.1 1999/07/22 20:10:17 is Exp $ d21 1 d66 4 a69 4 cksum -o1 $lists > BSDSUM cksum $lists > CKSUM cksum -m $lists > MD5 cksum -o2 $lists > SYSVSUM @ 1.1 log @Provide a script to compute the distribution set checksums. Make the Makefile use it, instead of calling cksum manually. @ text @d3 1 a3 1 # $NetBSD$ d5 13 a17 2 # Make checksum files. Usage: # makesums [-t tardir] [setname ...] d21 1 a21 1 : ${MAKE=make} d23 1 d28 4 d37 1 a37 1 Usage: $0 [-t tars] [setname ...] d40 1 a49 3 if [ -n "$*" ]; then lists="$*" fi d57 12 a68 2 if [ -z "$lists" ]; then lists=*.tgz a69 4 cksum -o1 $lists > BSDSUM cksum $lists > CKSUM cksum -m $lists > MD5 cksum -o2 $lists > SYSVSUM @ 1.1.10.1 log @file makesums was added on branch netbsd-1-4 on 2000-07-09 21:30:43 +0000 @ text @d1 49 @ 1.1.10.2 log @Pull up revision 1.1 (new, requested by he): Enhance the "make release" process: o Use a separate script to compute checksums @ text @a0 49 #!/bin/sh # # $NetBSD: makesums,v 1.1.10.1 2000/07/09 21:30:43 he Exp $ # # Make checksum files. Usage: # makesums [-t tardir] [setname ...] # # set defaults : ${MAKE=make} tars=$RELEASEDIR # handle args while : ; do case $1 in -t*) tars=$2; shift ;; -*) cat 1>&2 < BSDSUM cksum $lists > CKSUM cksum -m $lists > MD5 cksum -o2 $lists > SYSVSUM @ 1.1.10.3 log @Pull up version 1.2 (requested by toddpw), for use in building release snaps. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.1.10.2 2000/08/20 22:30:43 toddpw Exp $ d5 2 a6 13 # Make checksum files for files in ``tardir''. Usage: # makesums [-t tardir] [ -all ] [setname ...] # # If -t is omitted, RELEASEDIR must be set and not empty. # The ``setname'' arguments comprise a list of files to checksum, # and may be omitted (in which case ``*.tgz'' is used). # If -all is given, then the list of sets is ignored, and ``*'' is used. # # After shell glob expansion, the list of sets is filtered to remove known # output file names (of the form *SUM 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 four # output files (BSDSUM, CKSUM, MD5, SYSVSUM) are produced. d10 1 a10 1 : ${MAKE=make} # XXX: what purpose does this serve?? a11 1 dash_all=no a15 4 -all) dash_all=yes break ;; d21 1 a21 1 Usage: $0 [-t tars] [-all] [setname ...] a23 1 -all do all plain files instead of [setname ...] d33 3 d43 2 a44 12 pat="$*" if [ $dash_all = yes ]; then pat='*' elif [ -z "$pat" ]; then pat='*.tgz' fi lists=`find $pat -prune -type f \! -name '*SUM' \! -name MD5 2>/dev/null` if [ -n "$lists" ]; then cksum -o1 $lists > BSDSUM cksum $lists > CKSUM cksum -m $lists > MD5 cksum -o2 $lists > SYSVSUM d46 4 @ 1.1.8.1 log @Pull up version 1.2 (requested by toddpw), for use in building release snaps. @ text @d3 1 a3 1 # $NetBSD: makesums,v 1.2 2000/08/20 08:29:59 toddpw Exp $ d5 2 a6 13 # Make checksum files for files in ``tardir''. Usage: # makesums [-t tardir] [ -all ] [setname ...] # # If -t is omitted, RELEASEDIR must be set and not empty. # The ``setname'' arguments comprise a list of files to checksum, # and may be omitted (in which case ``*.tgz'' is used). # If -all is given, then the list of sets is ignored, and ``*'' is used. # # After shell glob expansion, the list of sets is filtered to remove known # output file names (of the form *SUM 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 four # output files (BSDSUM, CKSUM, MD5, SYSVSUM) are produced. d10 1 a10 1 : ${MAKE=make} # XXX: what purpose does this serve?? a11 1 dash_all=no a15 4 -all) dash_all=yes break ;; d21 1 a21 1 Usage: $0 [-t tars] [-all] [setname ...] a23 1 -all do all plain files instead of [setname ...] d33 3 d43 2 a44 12 pat="$*" if [ $dash_all = yes ]; then pat='*' elif [ -z "$pat" ]; then pat='*.tgz' fi lists=`find $pat -prune -type f \! -name '*SUM' \! -name MD5 2>/dev/null` if [ -n "$lists" ]; then cksum -o1 $lists > BSDSUM cksum $lists > CKSUM cksum -m $lists > MD5 cksum -o2 $lists > SYSVSUM d46 4 @