From 343ab03f983902acf628aebff804da2f6085a272 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 3 Aug 2009 21:13:50 +0200 Subject: [PATCH] /etc/grml/fai/config/hooks/updatebase.GRMLBASE: install apt configuration --- debian/changelog | 5 ++++- etc/grml/fai/config/hooks/updatebase.GRMLBASE | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6f5afe2..d4585f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,8 +24,11 @@ grml-live (0.9.20) UNRELEASED; urgency=low * buildd: - add support for building squeeze based ISOs. - add cronjob based on what the grml team is using at daily.grml.org + * /etc/grml/fai/config/hooks/updatebase.GRMLBASE: install apt configuration + also when updating the chroot (this happens if we have a base.tgz available + on fresh installations). - -- Michael Prokop Mon, 03 Aug 2009 15:05:26 +0200 + -- Michael Prokop Mon, 03 Aug 2009 21:13:08 +0200 grml-live (0.9.19) unstable; urgency=low diff --git a/etc/grml/fai/config/hooks/updatebase.GRMLBASE b/etc/grml/fai/config/hooks/updatebase.GRMLBASE index 0c46d00..b04e0ba 100755 --- a/etc/grml/fai/config/hooks/updatebase.GRMLBASE +++ b/etc/grml/fai/config/hooks/updatebase.GRMLBASE @@ -24,6 +24,31 @@ EOF # skip the task if we want to build a new ISO only: [ -n "$BUILD_ONLY" ] && skiptask instsoft || /bin/true + +else # no softupdate but updating chroot based on /etc/grml/fai/config/basefiles/* + +# install all apt related files +if [ -r /etc/grml/fai/files/etc/apt ] ; then + cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/ + # remove grml-live's sources.list file from chroot: + grep -q GRML_LIVE_SOURCES $target/etc/apt/important_note.txt && rm $target/etc/apt/important_note.txt +fi + +# install all present (but at least the grml) gpg keys: +if [ -r /etc/grml/fai/files/etc/apt/grml.key ] ; then + for file in /etc/grml/fai/files/etc/apt/*.key ; do + FILE="$(basename $file)" + # installed via 'cp -a /etc/grml/fai/files/etc/apt/* $target/etc/apt/' above already + # cp $file $target/etc/apt/"$FILE" + $ROOTCMD apt-key add /etc/apt/"$FILE" + done +else + gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 || \ + gpg --keyserver blackhole.pca.dfn.de --recv-keys F61E2E7CECDEA787 + gpg --export F61E2E7CECDEA787 > $target/etc/apt/grml.key + $ROOTCMD apt-key add /etc/apt/grml.key +fi + fi ## END OF FILE ################################################################# -- 2.1.4