set -e
# global variables
-GRML_LIVE_VERSION='0.9.23-prerelease'
+GRML_LIVE_VERSION='0.9.24-pre1'
PN="$(basename $0)"
CMDLINE="$0 $@"
ISO_DATE="$(date +%Y-%m-%d)"
-c <classe[s]> classes to be used for building the ISO via FAI
-C <configfile> configuration file for grml-live
-F force execution without prompting
- -g <grml_name>] set the grml flavour name
+ -g <grml_name> set the grml flavour name
-h display short usage information and exit
-i <iso_name> name of ISO
-I <src_directory> directory which provides files that should become
-n skip generation of ISO
-o <output_directory> main output directory of the build process
-q skip mksquashfs
- -r <release_name< release name
+ -r <release_name> release name
-s <suite> Debian suite; values: etch, lenny, squeeze, sid
-t <template_directory> place of the templates
-u update existing chroot instead of rebuilding it from scratch
einfo "Finished execution of stage 'fai dirinstall'"
fi
- einfo "Find FAI build logs at $(readlink -f /var/log/fai/$HOSTNAME/last)."
- log "Find FAI build logs at $(readlink -f /var/log/fai/$HOSTNAME/last)."
+ einfo "Find FAI build logs at $(readlink -f /var/log/fai/$HOSTNAME/last)"
+ log "Find FAI build logs at $(readlink -f /var/log/fai/$HOSTNAME/last)"
eend 0
fi
fi # BUILD_DIRTY?
sed -i "s/%ARCH%/$ARCH/" "$BUILD_OUTPUT"/boot/isolinux/grml.cfg
fi
- sed -i "s/%VERSION%/$VERSION/" "$BUILD_OUTPUT"/boot/isolinux/grml.cfg
- sed -i "s/%GRML_LONG_NAME%/$GRML_NAME/" "$BUILD_OUTPUT"/boot/isolinux/grml.cfg
- sed -i "s/%GRML_NAME%/$SHORT_GRML_NAME/" "$BUILD_OUTPUT"/boot/isolinux/grml.cfg
- sed -i "s/%ARCH%/$ARCH/" "$BUILD_OUTPUT"/boot/isolinux/grml.cfg
+ for FILE in grml default ; do
+ sed -i "s/%VERSION%/$VERSION/" "$BUILD_OUTPUT"/boot/isolinux/${FILE}.cfg
+ sed -i "s/%GRML_LONG_NAME%/$GRML_NAME/" "$BUILD_OUTPUT"/boot/isolinux/${FILE}.cfg
+ sed -i "s/%GRML_NAME%/$SHORT_GRML_NAME/" "$BUILD_OUTPUT"/boot/isolinux/${FILE}.cfg
+ sed -i "s/%ARCH%/$ARCH/" "$BUILD_OUTPUT"/boot/isolinux/${FILE}.cfg
+ done
sed -i "s/%DISTRI_INFO%/$DISTRI_INFO/" "$BUILD_OUTPUT"/boot/isolinux/vesamenu.cfg
sed -i "s/%DISTRI_SPLASH%/$DISTRI_SPLASH/" "$BUILD_OUTPUT"/boot/isolinux/vesamenu.cfg
sed -i "s/%GRML_NAME_SQUASHFS%/$GRML_NAME_SQUASHFS/" "$BUILD_OUTPUT"/boot/isolinux/f5
if ! [ -r "${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg" ] || [ "$DISTRI_NAME" = "grml" ] ; then
- log "including grml.cfg in ${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
- echo "include grml.cfg" > "${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
- [ -n "$NO_ADDONS" ] || echo "include addons.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
+ log "including grmlmain.cfg in ${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
+ echo "include grmlmain.cfg" > "${BUILD_OUTPUT}/boot/isolinux/distri.cfg"
+ echo "include grml.cfg" > "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg"
+ echo "include options.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg"
+ if [ ! -n "$NO_ADDONS" ] ; then
+ echo "include addons.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg"
+ fi
+ echo "include hd.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg"
+ echo "include isoprompt.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg"
+ echo "include hidden.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/grmlmain.cfg"
else # assume we are building a custom distribution:
log "File ${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg found, using it."
einfo "File ${BUILD_OUTPUT}/boot/isolinux/${DISTRI_NAME}.cfg found, using it."
;;
esac
fi
+
+ # if we still want to use mksquashfs-lzma then let's choose
+ # blocksize 256k as this gives best result with regards to time + comopression
+ [[ "$SQUASHFS_BINARY" == "mksquashfs-lzma" ]] && SQUASHFS_OPTIONS="-b 256k -lzma"
fi
fi
# make sure to drop the -nolzma option if it's not available:
if echo "$SQUASHFS_OPTIONS" | grep -q -- "-nolzma" ; then
if ! $SQUASHFS_BINARY --help 2>&1 | grep -q -- '-nolzma' ; then
- log "$SQUASHFS_BINARY does NOT support the nolzma option, dropping it and using default mode."
- ewarn "$SQUASHFS_BINARY does NOT support the nolzma option, dropping it and using default mode."
+ log "The $SQUASHFS_BINARY binary does NOT support the nolzma option, dropping it and using default mode."
+ ewarn "The $SQUASHFS_BINARY binary does NOT support the nolzma option, dropping it and using default mode."
SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-nolzma//g')"
eend 0
fi
# make sure to drop the -lzma option if it's not available:
if echo "$SQUASHFS_OPTIONS" | grep -q -- "-lzma" ; then
if ! $SQUASHFS_BINARY --help 2>&1 | grep -q -- '-lzma' ; then
- log "$SQUASHFS_BINARY does NOT support the lzma option, dropping it and using default mode."
- ewarn "$SQUASHFS_BINARY does NOT support the lzma option, dropping it and using default mode."
+ log "The $SQUASHFS_BINARY binary does NOT support the lzma option, dropping it and using default mode."
+ ewarn "The $SQUASHFS_BINARY binary does NOT support the lzma option, dropping it and using default mode."
SQUASHFS_OPTIONS="$(echo $SQUASHFS_OPTIONS | sed 's/-lzma//g')"
eend 0
fi
else
mkdir -p "$ISO_OUTPUT" || bailout 6 "Problem with creating $ISO_OUTPUT for stage 'iso build'"
- if $FORCE_ISO_REBUILD ; then
+ if $FORCE_ISO_REBUILD && ! [ -f "${ISO_OUTPUT}/${ISO_NAME}" ] ; then
log "Forcing rebuild of ISO because files on ISO have been modified."
einfo "Forcing rebuild of ISO because files on ISO have been modified."
fi