aboutsummaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2011-03-13 17:15:31 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2011-03-13 17:15:31 +0000
commitb70047d4136285ce8e5046c379143f4813228855 (patch)
treee050ebfe9446385afdf6f90f9cc4724871bc6978 /release
parent47dfe02052175ef4fe56d0d487e7af7c8f994cb3 (diff)
downloadsrc-b70047d4136285ce8e5046c379143f4813228855.tar.gz
src-b70047d4136285ce8e5046c379143f4813228855.zip
Add generation of an installation manifest containing SHA256 checksums as
well as package descriptions and add code in the installer to check the checksums.
Notes
Notes: svn path=/head/; revision=219615
Diffstat (limited to 'release')
-rw-r--r--release/Makefile.bsdinstall8
-rwxr-xr-xrelease/scripts/make-manifest.sh25
2 files changed, 30 insertions, 3 deletions
diff --git a/release/Makefile.bsdinstall b/release/Makefile.bsdinstall
index a2d350f9f61a..bda97a4e0545 100644
--- a/release/Makefile.bsdinstall
+++ b/release/Makefile.bsdinstall
@@ -112,7 +112,8 @@ system: packagesystem
-rm ${.OBJDIR}/release/boot/kernel/*.symbols
# Copy distfiles
mkdir ${.OBJDIR}/release/usr/freebsd-dist
- cp ${.OBJDIR}/*.txz ${.OBJDIR}/release/usr/freebsd-dist
+ cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST \
+ ${.OBJDIR}/release/usr/freebsd-dist
# Copy documentation, if generated
.if !defined(NODOC)
cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release
@@ -134,13 +135,14 @@ memstick: system
sh ${.CURDIR}/${TARGET}/make-memstick.sh ${.OBJDIR}/release ${.OBJDIR}/memstick
packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
+ sh ${.CURDIR}/${TARGET}/make-manifest.sh ${DISTDIR}/*.txz > ${.OBJDIR}/MANIFEST
touch ${.OBJDIR}/${.TARGET}
cdrom: release.iso
ftp: packagesystem
rm -rf ${.OBJDIR}/ftp
mkdir ${.OBJDIR}/ftp
- cp ${.OBJDIR}/*.txz ${.OBJDIR}/ftp
+ cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST ${.OBJDIR}/ftp
release: ${RELEASE_TARGETS}
@@ -148,7 +150,7 @@ clean:
chflags -R noschg ${.OBJDIR}
rm -rf ${.OBJDIR}/dist ${.OBJDIR}/ftp
rm -f packagesystem
- rm -f ${.OBJDIR}/*.txz
+ rm -f ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST
rm -f system
rm -rf ${.OBJDIR}/release
rm -f ${.OBJDIR}/release.iso ${.OBJDIR}/memstick
diff --git a/release/scripts/make-manifest.sh b/release/scripts/make-manifest.sh
new file mode 100755
index 000000000000..352d27aa5a51
--- /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
+