summaryrefslogtreecommitdiffstats
path: root/release/scripts
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-03-13 17:15:31 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-03-13 17:15:31 +0000
commitda52594639ac9c096c58d385310db81b2d28dd13 (patch)
treee050ebfe9446385afdf6f90f9cc4724871bc6978 /release/scripts
parent93e771cdbb93cc6170679cdf90f4299919dbabb0 (diff)
downloadFreeBSD-src-da52594639ac9c096c58d385310db81b2d28dd13.zip
FreeBSD-src-da52594639ac9c096c58d385310db81b2d28dd13.tar.gz
Add generation of an installation manifest containing SHA256 checksums as
well as package descriptions and add code in the installer to check the checksums.
Diffstat (limited to 'release/scripts')
-rwxr-xr-xrelease/scripts/make-manifest.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/release/scripts/make-manifest.sh b/release/scripts/make-manifest.sh
new file mode 100755
index 0000000..352d27a
--- /dev/null
+++ b/release/scripts/make-manifest.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# make-manifest.sh: create checksums and package descriptions for the installer
+#
+# Usage: make-manifest.sh foo1.txz foo2.txz ...
+#
+# The output file looks like this (tab-delimited):
+# foo1.txz SHA256-checksu Number-of-files foo1 Description Install-by-default
+#
+# $FreeBSD$
+
+desc_base="Base system (MANDATORY)"
+desc_kernel="Kernel (MANDATORY)"
+desc_doc="Additional documentation"
+doc_default=off
+desc_games="Games (fortune, etc.)"
+desc_lib32="32-bit compatibility libraries"
+desc_ports="Ports tree"
+desc_src="System source code"
+src_default=off
+
+for i in $*; do
+ echo "`basename $i` `sha256 -q $i` `tar tvf $i | wc -l | tr -d ' '` `basename $i .txz` \"`eval echo \\\$desc_$(basename $i .txz)`\" `eval echo \\\${$(basename $i .txz)_default:-on}`"
+done
+
OpenPOWER on IntegriCloud