/etc/grml/fai/config/hooks/updatebase.GRMLBASE: install apt configuration
authorMichael Prokop <mika@grml.org>
Mon, 3 Aug 2009 19:13:50 +0000 (21:13 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 3 Aug 2009 19:13:50 +0000 (21:13 +0200)
debian/changelog
etc/grml/fai/config/hooks/updatebase.GRMLBASE

index 6f5afe2..d4585f4 100644 (file)
@@ -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 <mika@grml.org>  Mon, 03 Aug 2009 15:05:26 +0200
+ -- Michael Prokop <mika@grml.org>  Mon, 03 Aug 2009 21:13:08 +0200
 
 grml-live (0.9.19) unstable; urgency=low
 
index 0c46d00..b04e0ba 100755 (executable)
@@ -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 #################################################################