From: Michael Prokop Date: Sun, 16 Aug 2009 21:36:59 +0000 (+0200) Subject: Support installation of local files through $CHROOT_INSTALL X-Git-Tag: v0.9.21~19 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=18de83fa6503c91a261c71ff05a7d407892d63ce Support installation of local files through $CHROOT_INSTALL --- diff --git a/debian/changelog b/debian/changelog index 65c7211..4bd13c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,8 @@ grml-live (0.9.21) UNRELEASED; urgency=low executed with options '-q -B' and empty boot/isolinux works as well. * Introduce $NO_WINDOWS_BINARIES which replaces $WINDOWS_BINARIES so we can improve sanity checks and easify configuration. + * Support installation of local files (not being part of any Debian package) + through $CHROOT_INSTALL. * Software related changes: - Add git-email to GRML_FULL (thanks to Joerg Woelke for mentioning). - Add aesfix, aeskeyfind, bios-memimage, chaosreader, ext3grep, fatback, @@ -51,7 +53,7 @@ grml-live (0.9.21) UNRELEASED; urgency=low isolinux.cfg, syslinux.cfg with each other; provide a fallback way to boot MirOS bsd4grml from both GRUB versions using modules - -- Michael Prokop Sun, 16 Aug 2009 22:57:46 +0200 + -- Michael Prokop Sun, 16 Aug 2009 23:36:14 +0200 grml-live (0.9.20) unstable; urgency=low diff --git a/docs/grml-live.txt b/docs/grml-live.txt index a04746d..f5bfbd4 100644 --- a/docs/grml-live.txt +++ b/docs/grml-live.txt @@ -121,6 +121,12 @@ Display short usage information and exit. Specify name of ISO which will be available inside $OUTPUT_DIRECTORY/grml_isos by default. + -I **CHROOT_INSTALL**:: + +Specify name of source directory which provides files that should become part of +the chroot/ISO. Not enabled by default. Note: the files are installed under '/' +in the chroot so you have to create the rootfs structure on your own. + -o **OUTPUT_DIRECTORY**:: Main output directory of the build process of FAI. Some directories are created @@ -593,6 +599,8 @@ Instructions # consider using lzma only for space reasons (resulting in longer # build time but smaller ISO): SQUASHFS_OPTIONS="-nolzma" + # install local files into the chroot + CHROOT_INSTALL="/etc/grml/fai/chroot_install" ## adjust if necessary (defaults to /grml/grml-live): ## OUTPUT="/srv/grml-live" FAI_DEBOOTSTRAP="squeeze http://ftp.de.debian.org/debian/" @@ -654,6 +662,21 @@ If you need help with grml-live or would like to see new features as part of grml-live you can get commercial support via link:http://grml-solutions.com/[Grml Solutions]. +[[install-local-files]] +How to I install further files into the chroot/ISO? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Just point the configuration variable CHROOT_INSTALL to the directory which +provides the files you would like to install. Note that the files are installed +under '/' in the chroot - so you have to create the rootfs structure on your +own. Usage example: + + echo "CHROOT_INSTALL=\$GRML_FAI_CONFIG/chroot_install" >> /etc/grml/grml-live.local + mkdir -p /etc/grml/fai/chroot_install/usr/src/ + wget example.org/foo.tar.gz + mv foo.tar.gz /etc/grml/fai/chroot_install/usr/src/ + grml-live ... + [[local-debian-mirror]] Can I use my own (local) Debian mirror? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/grml/grml-live.conf b/etc/grml/grml-live.conf index c7c6ff8..e4af5c2 100644 --- a/etc/grml/grml-live.conf +++ b/etc/grml/grml-live.conf @@ -106,6 +106,12 @@ # Directory of configuration files for grml-live's FAI: # GRML_FAI_CONFIG=/etc/grml/fai +# Do you want to put any local files into the chroot? +# If so then point CHROOT_INSTALL to a directory providing the files. +# Note: the files are installed under '/' in the chroot - +# so you have to create the rootfs structure on your own. +# CHROOT_INSTALL="$GRML_FAI_CONFIG/chroot_install" + # Do you want to pass any additional arguments to FAI? # FAI_ARGS="" diff --git a/grml-live b/grml-live index a710bcf..9197b3e 100755 --- a/grml-live +++ b/grml-live @@ -47,6 +47,8 @@ Usage: $PN [options, see as follows] -g ] set the grml flavour name -h display short usage information and exit -i name of ISO + -I directory which provides files that should become + part of the chroot/ISO -o main output directory of the build process -q skip mksquashfs -r &2 -# unsuported: else + log 'Error: Unsupported ARCH, sorry. Want to support it? Contribute!' eerror 'Error: Unsupported ARCH, sorry. Want to support it? Contribute!' ; eend 1 fi +# support installation of local files into the chroot/ISO +if [ -n "$CHROOT_INSTALL" ] ; then + if ! [ -d "$CHROOT_INSTALL" ] ; then + log "Configuration variable \$CHROOT_INSTALL is set but not a directory; ignoring" + ewarn "Configuration variable \$CHROOT_INSTALL is set but not a directory; ignoring" + else + log "Copying local files to chroot as requested via \$CHROOT_INSTALL" + einfo "Copying local files to chroot as requested via \$CHROOT_INSTALL" + rsync -avz --inplace "$CHROOT_INSTALL"/ "$CHROOT_OUTPUT/" + eend $? + einfo "Make sure to run squashfs stage, otherwise your local files won't be part of the ISO." + fi +fi + if [ -f "$BUILD_OUTPUT"/live/${GRML_NAME}.squashfs -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" ] ; then log "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'" ewarn "$BUILD_OUTPUT/live exists already, skipping stage 'squashfs'" ; eend 0