From e97a5d7afe24d326bae906fe1637e2f0cfd09065 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 21 Feb 2009 15:21:18 +0100 Subject: [PATCH] Install all files from /etc/grml/fai/files/etc/apt; move /etc/grml/fai/apt/preferences to /etc/grml/fai/files/etc/apt/ --- debian/changelog | 10 ++++++-- etc/grml/fai/config/hooks/instsoft.GRMLBASE | 36 +++++++++++++++------------- etc/grml/fai/{ => files/etc}/apt/preferences | 0 3 files changed, 27 insertions(+), 19 deletions(-) rename etc/grml/fai/{ => files/etc}/apt/preferences (100%) diff --git a/debian/changelog b/debian/changelog index a5d1fe2..a7fd733 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,8 +34,14 @@ grml-live (0.9.9) unstable; urgency=low via /etc/grml/fai/files/etc/apt/*.key * isolinux.cfg/syslinux.cfg: Drop duplicated 'MENU DEFAULT'. Thanks to Thomas Lehmann for the bugreport! - - -- Michael Prokop Sat, 21 Feb 2009 14:50:23 +0100 + * Move /etc/grml/fai/apt/preferences to /etc/grml/fai/files/etc/apt/. + This simplifies the directory layout a bit. Clarify its usage + in /etc/grml/fai/apt/important_note.txt + * Install all files from /etc/grml/fai/files/etc/apt. This supports + usage of directories like /etc/apt/apt.conf.d. Thanks for the + hint to Thomas Lehmann. [Closes: issue632] + + -- Michael Prokop Sat, 21 Feb 2009 15:20:44 +0100 grml-live (0.9.8) unstable; urgency=low diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index de5055c..d0a09f7 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -33,11 +33,6 @@ if [ "$FAI_ACTION" = "softupdate" ] ; then sed -i "s/EXITSTATUS=.*/EXITSTATUS='101'/" $target/etc/policy-rc.d.conf fi - # make sure we prefer grml repository: - if [ -r /etc/grml/fai/apt/preferences ] ; then - cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences - fi - # we definitely don't want to fail running fai sofupdate just # because of some well known bugs: [ -d $target/etc/apt/apt.conf.d ] || mkdir $target/etc/apt/apt.conf.d @@ -84,20 +79,17 @@ EOF else # no softupdate but fresh installation -# work around http://trac.lighttpd.net/trac/ticket/657 -# should be removed later on: -echo "Acquire::http::Pipeline-Depth "0"; // added by grml-live" >> $target/etc/apt/apt.conf - -# Recommends just pull in way tooooo much packages, so disable it: -echo "APT::Install-Recommends "false"; // added by grml-live" >> $target/etc/apt/apt.conf -# Notice: deprecated since aptitude (0.4.11-1): -echo "Aptitude::Recommends-Important "false"; // added by grml-live" >> $target/etc/apt/apt.conf +# 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/ +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)" - cp $file $target/etc/apt/"$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 @@ -107,9 +99,19 @@ else $ROOTCMD apt-key add /etc/apt/grml.key fi -# make sure we prefer grml repository: -if [ -r /etc/grml/fai/files/etc/apt/preferences ] ; then - cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences +# work around http://trac.lighttpd.net/trac/ticket/657 +if ! grep -q 'Acquire::http::Pipeline-Depth.*0' $target/etc/apt/apt.conf ; then + echo "Acquire::http::Pipeline-Depth 0; // added by grml-live" >> $target/etc/apt/apt.conf +fi + +# Recommends just pull in way tooooo much packages, so disable it: +if ! grep -q 'APT::Install-Recommends.*false' $target/etc/apt/apt.conf ; then + echo "APT::Install-Recommends false; // added by grml-live" >> $target/etc/apt/apt.conf +fi + +# Notice: deprecated with aptitude (0.4.11-1): +if ! grep -q 'Aptitude::Recommends-Important.*false' $target/etc/apt/apt.conf ; then + echo "Aptitude::Recommends-Important false; // added by grml-live" >> $target/etc/apt/apt.conf fi # make sure we have file-rc available before diff --git a/etc/grml/fai/apt/preferences b/etc/grml/fai/files/etc/apt/preferences similarity index 100% rename from etc/grml/fai/apt/preferences rename to etc/grml/fai/files/etc/apt/preferences -- 2.1.4