From b68164e384f6c7d682212995fc96ab919a2677f0 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 16 Dec 2007 19:01:13 +0100 Subject: [PATCH] Integrated grml_cleanup_chroot.deborphan --- etc/grml/fai/config/hooks/instsoft.GRMLBASE | 3 ++- etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot | 11 ++++++++++- etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build | 7 ++++--- etc/grml/fai/grml/grml_cleanup_chroot.deborphan | 15 +++++++++++++++ 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100755 etc/grml/fai/grml/grml_cleanup_chroot.deborphan diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index ecf6772..b5ac237 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Sun Nov 25 18:28:54 CET 2007 [mika] +# Latest change: Sun Dec 16 18:31:59 CET 2007 [mika] ################################################################################ set -u @@ -87,6 +87,7 @@ echo "Acquire::http::Pipeline-Depth "0"; // added by grml-live" >> $target/etc/a # 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 +echo "Aptitude::Recommends-Important "false"; // added by grml-live" >> $target/etc/apt/apt.conf # install grml keys: gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 || \ diff --git a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot index 18b5d61..4627529 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Sun Dec 09 18:46:19 CET 2007 [mika] +# Latest change: Sun Dec 16 17:37:09 CET 2007 [mika] ################################################################################ set -e @@ -30,6 +30,15 @@ if ifclass REMOVE_DOCS ; then rm $target/root/grml_cleanup_chroot.remove_docs fi +# drop unnecessary software: +if ifclass GRML_SMALL || ifclass DEBORPHAN ; then + if [ -f /etc/grml/fai/grml/grml_cleanup_chroot.deborphan ] ; then + cp /etc/grml/fai/grml/grml_cleanup_chroot.deborphan $target/root/ + $ROOTCMD /root/grml_cleanup_chroot.deborphan + rm $target/root/grml_cleanup_chroot.deborphan + fi +fi + # misc cleanup: if [ -f /etc/grml/fai/grml/grml_cleanup_chroot ] ; then cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/ diff --git a/etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build b/etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build index 9f0ae40..33d9b73 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build +++ b/etc/grml/fai/config/scripts/GRMLBASE/99-finish-grml-build @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Mon Nov 12 11:15:56 CET 2007 [mika] +# Latest change: Sun Dec 16 18:33:15 CET 2007 [mika] ################################################################################ set -u @@ -13,8 +13,9 @@ set -e # Restore usual Debian behaviour which has been changed # for FAI via /etc/grml/fai/config/hooks/instsoft.GRMLBASE if [ -r $target/etc/apt/apt.conf ] ; then - sed -i "s#^Acquire::http::Pipeline-Depth.*#// &#" $target/etc/apt/apt.conf - sed -i "s#^APT::Install-Recommends.*#// &#" $target/etc/apt/apt.conf + sed -i "s#^Acquire::http::Pipeline-Depth.*#// &#" $target/etc/apt/apt.conf + sed -i "s#^APT::Install-Recommends.*#// &#" $target/etc/apt/apt.conf + sed -i "s#^Aptitude::Recommends-Important.*#// &#" $target/etc/apt/apt.conf fi # Restore original state from softupdate: diff --git a/etc/grml/fai/grml/grml_cleanup_chroot.deborphan b/etc/grml/fai/grml/grml_cleanup_chroot.deborphan new file mode 100755 index 0000000..bee2917 --- /dev/null +++ b/etc/grml/fai/grml/grml_cleanup_chroot.deborphan @@ -0,0 +1,15 @@ +#!/bin/bash +# Filename: /etc/grml/fai/grml/grml_cleanup_chroot.deborphan +# Purpose: drop as many packages from grml as possible +# Authors: (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2. +# Latest change: Sun Dec 16 18:34:08 CET 2007 [mika] +################################################################################ + +apt-get -y --purge remove aptitude +apt-get -y --purge remove $(deborphan) +apt-get -y --purge autoremove +apt-get -y --purge remove $(deborphan) + +## END OF FILE ################################################################# -- 2.1.4