X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=0c27ce1d9b448bf88af60cb9e74e004ba76bbee1;hp=0055cc6982241b33e6575f7338bbd3c229b7e64e;hb=ae0db7b41fc17aaec906c7d00dc1661730a5d871;hpb=7741716c921420a1c8d8d63e9eadf0c80a3b3b51 diff --git a/grml-live b/grml-live index 0055cc6..0c27ce1 100755 --- a/grml-live +++ b/grml-live @@ -23,7 +23,7 @@ fi set -e # global variables -GRML_LIVE_VERSION='0.12.1' +GRML_LIVE_VERSION='0.14.0' PN="$(basename $0)" CMDLINE="$0 $@" SOURCES_LIST_FILE='/etc/grml/fai/apt/sources.list' @@ -59,7 +59,7 @@ Usage: $PN [options, see as follows] -u update existing chroot instead of rebuilding it from scratch -v specify version number of the release -V increase verbosity in the build process - -z use ZLIB instead of LZMA compression + -z use ZLIB instead of LZMA/XZ compression Usage examples: @@ -234,7 +234,7 @@ while getopts "a:C:c:d:g:i:I:o:r:s:t:v:bBFnquVz" opt; do F) FORCE=1 ;; u) UPDATE=1 ;; V) VERBOSE="-v" ;; - z) SQUASHFS_ZLIB="true" ;; + z) SQUASHFS_ZLIB=1 ;; ?) echo "invalid option -$OPTARG" >&2; bailout 1 ;; esac done @@ -253,10 +253,11 @@ shift $(($OPTIND - 1)) # set ARGV to the first not parsed commandline parameter [ -n "$GRML_FAI_CONFIG" ] || GRML_FAI_CONFIG='/etc/grml/fai' [ -n "$GRML_NAME" ] || GRML_NAME='grml' [ -n "$HOSTNAME" ] || HOSTNAME='grml' +[ -n "$HYBRID_METHOD" ] || HYBRID_METHOD='manifold' [ -n "$NFSROOT_CONF" ] || NFSROOT_CONF='/etc/grml/fai/make-fai-nfsroot.conf' [ -n "$RELEASENAME" ] || RELEASENAME='grml-live rocks' [ -n "$SQUASHFS_EXCLUDES_FILE " ] || SQUASHFS_EXCLUDES_FILE='/etc/grml/fai/squashfs-excludes' -[ -n "$SUITE" ] || SUITE='lenny' +[ -n "$SUITE" ] || SUITE='squeeze' [ -n "$TEMPLATE_DIRECTORY" ] || TEMPLATE_DIRECTORY='/usr/share/grml-live/templates' [ -n "$USERNAME" ] || USERNAME='grml' [ -n "$VERSION" ] || VERSION='0.0.1' @@ -313,6 +314,7 @@ if [ -z "$FORCE" ] ; then [ -n "$SUITE" ] && echo " Debian suite: $SUITE" [ -n "$ARCH" ] && echo " Architecture: $ARCH" [ -n "$BOOT_METHOD" ] && echo " Boot method: $BOOT_METHOD" + [ -n "$HYBRID_METHOD" ] && echo " Hybrid method: $HYBRID_METHOD" [ -n "$TEMPLATE_DIRECTORY" ] && echo " Template files: $TEMPLATE_DIRECTORY" [ -n "$CHROOT_INSTALL" ] && echo " Install files from directory to chroot: $CHROOT_INSTALL" [ -n "$BOOTID" ] && echo " Boot identifier: $BOOTID" @@ -320,7 +322,7 @@ if [ -z "$FORCE" ] ; then [ -n "$DEFAULT_BOOTOPTIONS" ] && echo " Adding default bootoptions: \"$DEFAULT_BOOTOPTIONS\"" [ -n "$FAI_ARGS" ] && echo " Additional arguments for FAI: $FAI_ARGS" [ -n "$LOGFILE" ] && echo " Logging to file: $LOGFILE" - [ -n "$SQUASHFS_ZLIB" ] && echo " Using ZLIB (instead of LZMA) compression." + [ -n "$SQUASHFS_ZLIB" ] && echo " Using ZLIB (instead of LZMA/XZ) compression." [ -n "$SQUASHFS_OPTIONS" ] && echo " Using SQUASHFS_OPTIONS ${SQUASHFS_OPTIONS}" [ -n "$VERBOSE" ] && echo " Using VERBOSE mode." [ -n "$UPDATE" ] && echo " Executing UPDATE instead of fresh installation." @@ -422,11 +424,12 @@ case $SUITE in etch) ;; lenny) ;; squeeze) ;; + wheezy) ;; sid) ;; *) echo "Sorry, $SUITE is not a valid Debian suite, exiting.">&2; bailout 1 ;; esac -DIST=" etch\| stable\| lenny\| squeeze\| testing\| sid\| unstable" +DIST=" etch\| stable\| lenny\| squeeze\| wheezy\| testing\| sid\| unstable" sed "s/\(^deb .\+\)\([ \t]*\)\($DIST\)\([ \t]*\)\(main \)/\1 \2$SUITE\4\5/" "$SOURCES_LIST_FILE" | sponge "$SOURCES_LIST_FILE" for file in "$LIVE_CONF" "$CONFIG" "$LOCAL_CONFIG" ; do if [ -n "$file" ] ; then @@ -507,8 +510,8 @@ else fi if [ -d "$CHROOT_OUTPUT/bin" -a -z "$UPDATE" -a -z "$BUILD_ONLY" ] ; then - log "Skiping stage 'fai dirinstall' as $CHROOT_OUTPUT exists already." - ewarn "Skiping stage 'fai dirinstall' as $CHROOT_OUTPUT exists already." ; eend 0 + log "Skipping stage 'fai dirinstall' as $CHROOT_OUTPUT exists already." + ewarn "Skipping stage 'fai dirinstall' as $CHROOT_OUTPUT exists already." ; eend 0 else mkdir -p "$CHROOT_OUTPUT" || bailout 5 "Problem with creating $CHROOT_OUTPUT for FAI" @@ -965,9 +968,11 @@ else # use blocksize 256k as this gives best result with regards to time + compression SQUASHFS_OPTIONS="-b 256k" - # set lzma compression by default, unless -z option has been specified on command line + # set lzma/xz compression by default, unless -z option has been specified on command line if [ -z "$SQUASHFS_ZLIB" ] ; then - SQUASHFS_OPTIONS="$SQUASHFS_OPTIONS -comp lzma" + SQUASHFS_OPTIONS="$SQUASHFS_OPTIONS -comp xz" + else + SQUASHFS_OPTIONS="$SQUASHFS_OPTIONS -comp gzip" fi fi @@ -986,14 +991,13 @@ else # informational stuff [ -n "$SQUASHFS_OPTIONS" ] && SQUASHFS_INFO_MSG="$SQUASHFS_OPTIONS" - [ -n "$SQUASHFS_ZLIB" ] && SQUASHFS_INFO_MSG="$SQUASHFS_INFO_MSG $SQUASHFS_ZLIB" [ -n "$SQUASHFS_INFO_MSG" ] && SQUASHFS_INFO_MSG="using options: $SQUASHFS_INFO_MSG" einfo "Squashfs build information: running binary $SQUASHFS_BINARY $SQUASHFS_INFO_MSG" - log "$SQUASHFS_BINARY $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB" + log "$SQUASHFS_BINARY $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/${GRML_NAME}.squashfs -noappend $SQUASHFS_OPTIONS" if $SQUASHFS_BINARY $CHROOT_OUTPUT/* $BUILD_OUTPUT/live/"${GRML_NAME}".squashfs \ - -noappend $SQUASHFS_OPTIONS $SQUASHFS_ZLIB 2>"${SQUASHFS_STDERR}" ; then + -noappend $SQUASHFS_OPTIONS 2>"${SQUASHFS_STDERR}" ; then echo "${GRML_NAME}.squashfs" > $BUILD_OUTPUT/live/filesystem.module log "Finished execution of stage 'squashfs' [$(date)]" einfo "Finished execution of stage 'squashfs'" ; eend 0 @@ -1026,6 +1030,15 @@ elif [ "$BOOT_METHOD" = "grub2" ] ; then BOOT_ARGS="-no-emul-boot -boot-load-size 4 -b boot/grub/toriboot.bin" fi +# Just until http://bts.grml.org/grml/issue945 has been resolved. +# HYBRID_METHOD defaults to manifold, so make sure the default works OOTB. +if [[ $BOOT_METHOD != isolinux && ($HYBRID_METHOD = isohybrid || $HYBRID_METHOD = manifold) ]]; then + log "Setting HYBRID_METHOD to grub2 as hybrid mode does not work with isohybrid yet." + ewarn "Setting HYBRID_METHOD to grub2 as hybrid mode does not work with isohybrid yet." + HYBRID_METHOD='grub2' + eend 0 +fi + if [ -f "${ISO_OUTPUT}/${ISO_NAME}" -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" -a "$FORCE_ISO_REBUILD" = "false" ] ; then log "Skipping stage 'iso build' as $ISO_OUTPUT/${ISO_NAME} exists already." ewarn "Skipping stage 'iso build' as $ISO_OUTPUT/${ISO_NAME} exists already." ; eend 0