Do not include vmlinuz and initrd when building grml-small, initial support for SQUAS...
authorMichael Prokop <devnull@localhost>
Mon, 29 Sep 2008 12:43:48 +0000 (14:43 +0200)
committerMichael Prokop <devnull@localhost>
Mon, 29 Sep 2008 12:43:48 +0000 (14:43 +0200)
debian/changelog
etc/grml/grml-live.conf
grml-live

index 6d2b195..85341e2 100644 (file)
@@ -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 <mika@grml.org>  Mon, 29 Sep 2008 13:29:18 +0200
+ -- Michael Prokop <mika@grml.org>  Mon, 29 Sep 2008 14:43:11 +0200
 
 grml-live (0.9.3) unstable; urgency=low
 
index ed2933f..16b02ed 100644 (file)
@@ -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.
index 07c1bd8..fcb62c7 100755 (executable)
--- 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 \