From a4b17e9e0ac5de3771ae935ae32d4391dbbf065c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 29 Sep 2008 14:43:48 +0200 Subject: [PATCH] Do not include vmlinuz and initrd when building grml-small, initial support for SQUASHFS_EXCLUDES_FILE --- debian/changelog | 6 ++++-- etc/grml/grml-live.conf | 4 ++++ grml-live | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6d2b195..85341e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,10 +21,12 @@ grml-live (0.9.4) unstable; urgency=low - remove nvi (see #490361) - remove ppoeconf (just too big with its dependencies) - remove prism54-firmware (for saving disk space) - * Support environment variable $NO_ADDONS to avoid usage of + * Support environment variable NO_ADDONS to avoid usage of addons directory. + * Initial support for SQUASHFS_EXCLUDES_FILE. + * Do not include vmlinuz and initrd when building grml-small. - -- Michael Prokop Mon, 29 Sep 2008 13:29:18 +0200 + -- Michael Prokop Mon, 29 Sep 2008 14:43:11 +0200 grml-live (0.9.3) unstable; urgency=low diff --git a/etc/grml/grml-live.conf b/etc/grml/grml-live.conf index ed2933f..16b02ed 100644 --- a/etc/grml/grml-live.conf +++ b/etc/grml/grml-live.conf @@ -113,6 +113,10 @@ GRML_FAI_CONFIG=/etc/grml/fai # likes the default directory [/usr/share/grml-live/templates] # TEMPLATE_DIRECTORY='/usr/share/grml-live/templates' +# exclude files from compressed squashfs file using the +# the mksquashfs option -ef: +# SQUASHFS_EXCLUDES_FILE="/etc/grml/fai/squashfs-excludes" + # Do you want to download pageant, plink, pscp, psftp, putty and puttygen # using wget to store it inside $BUILD_OUTPUT/windows/? # Just unset it do skip download via wget or modify the download URL. diff --git a/grml-live b/grml-live index 07c1bd8..fcb62c7 100755 --- a/grml-live +++ b/grml-live @@ -431,16 +431,6 @@ else # make sure new /etc/grml_version reaches the initramfs: chroot $CHROOT_OUTPUT update-initramfs -u -t eend $? - # get rid of unnecessary files when building grml-small for final release: - if echo "$CLASSES" | grep -q GRML_SMALL && \ - echo "$CLASSES" | grep -q RELEASE ; then - einfo "Removing initrd and vmlinuz files in $CHROOT_OUTPUT/boot" - rm -f "$CHROOT_OUTPUT"/boot/initrd.img-* - rm -f "$CHROOT_OUTPUT"/boot/vmlinuz-* - eend $? - ewarn "Notice: you have to rebuild grml-small from scratch on next run." - eend 0 - fi fi # Remove all FAI logs from chroot if class RELEASE is used: @@ -638,6 +628,16 @@ else fi fi + # support exclusion of files via exclude-file: + if [ -n "$SQUASHFS_EXCLUDES_FILE" -a "$SQUASHFS_EXCLUDES_FILE" ] ; then + SQUASHFS_OPTIONS="$SQUASHFS_OPTIONS -ef $SQUASHFS_EXCLUDES_FILE" + fi + + # get rid of unnecessary files when building grml-small for final release: + if echo "$CLASSES" | grep -q GRML_SMALL ; then + SQUASHFS_OPTIONS="$SQUASHFS_OUTPUT -e initrd.img* vmlinuz*" + fi + SQUASHFS_OUTPUT="$(mktemp -t grml-live.XXXXXX)" log "mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" if mksquashfs $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs \ -- 2.1.4