From: Michael Prokop Date: Tue, 18 Sep 2007 17:36:14 +0000 (+0200) Subject: Depend on fai >=3.2, implement the suite handling for conffiles, update docs, improve... X-Git-Tag: 0.0.1~15 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=18599825c2c04fab49b5b36f5da9404a88b5e0b2 Depend on fai >=3.2, implement the suite handling for conffiles, update docs, improve conffile documentation --- diff --git a/debian/control b/debian/control index 7fb4d12..03b8ca0 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ XS-Vcs-Browser: http://hg.grml.org/grml-live/ Package: grml-live Architecture: all -Depends: fai-client, fai-server, memtest86+ [i386], mkisofs, squashfs-tools, syslinux [i386], wget +Depends: fai-client (>= 3.2), fai-server (>= 3.2), memtest86+ [i386], mkisofs, squashfs-tools, syslinux [i386], wget Suggests: fai-doc Description: build system for creating a grml (based) live-cd This package provides the build system for creating diff --git a/docs/grml-live.txt b/docs/grml-live.txt index d8061a1..52b7d2d 100644 --- a/docs/grml-live.txt +++ b/docs/grml-live.txt @@ -255,12 +255,6 @@ as possiblbe) Known TODOs ----------- -* make sure the suite-target adjusts the mirror definitions according (working -also vice versa!) and you can define the mirror more central (without having to -deal with /etc/grml/grml-live.conf, /etc/grml/fai/make-fai-nfsroot.conf and -/etc/grml/fai/apt/sources.list; debootstrap [FAI_DEBOOTSTRAP] vs. apt inside -chroot [sources.list] as well) - * document the available classes in more detail * make sure $TARGET is mounted rw,suid,dev @@ -271,7 +265,7 @@ chroot [sources.list] as well) that are arch specific so we have a clean package list in all classes) * support different grml-flavours through classes right out-of-the-box (being: -grml, grml64, grml-small (in progress) for at least x86, amd64 and ppc) +grml, grml64, grml-small (done) for at least x86, amd64 and ppc) * support signed apt repositories (currently it's deactivated via FAI's FAI_ALLOW_UNSIGNED=1 for some packages in the toolchain) @@ -281,7 +275,9 @@ FAI_ALLOW_UNSIGNED=1 for some packages in the toolchain) * support setting stuff like ISO name, version,... on-the-fly (especially for stuff inside boot/isolinux/*) -* support "final builds" (including stuff like generating md5sums, gpg,...) +* support "final builds" (including stuff like generating md5sums, gpg,... - +create something like grml_release including all the details about the build +like dpkg selection, logs,...) * the grml-live class(es) should send output as used inside FAI as well (so it's not as verbose unless you specify it, make it configurable) @@ -292,8 +288,6 @@ build...) * support hooks to allow further customisation of the build process -* test the package on non-grml systems (and maybe even non-Debian) as well - Debian package -------------- diff --git a/etc/grml/grml-live.conf b/etc/grml/grml-live.conf index a71391b..1c776e6 100644 --- a/etc/grml/grml-live.conf +++ b/etc/grml/grml-live.conf @@ -18,20 +18,37 @@ BUILD_TARGET="$TARGET/grml_cd" # where do you want to find the final ISO? ISO_TARGET="$TARGET/grml_isos" -# which architecture want to build for now? -# defaults to output of 'dpkg --print-architecture' -# ARCH="i386" - -# which Debian suite to you want to use? -# unless set it defaults to "etch" -# support values: stable, testing, unstable, etch, lenny, sid +# which Debian suite to you want to use? unless set it defaults to "etch" +# supported values: stable, testing, unstable, etch, lenny, sid # SUITE="sid" # which FAI classes do you want to use by default? -# notice: GRMLBASE is recommended in any case unless you -# *really* know what you are doing +# notice: GRMLBASE is recommended in any case unless you *really* +# know what you are doing; class I386 provides the kernel CLASSES="GRMLBASE,I386" +## Which mirrors do you want to use? Please set GRML_LIVE_SOURCES *and* +## *FAI_DEBOOTSTRAP* according! + +# Do you want to generate /etc/grml/fai/apt/sources.list on-the-fly via grml-live? +# If so then activate the according mirrors using GRML_LIVE_SOURCES=... +# If you do *not* set GRML_LIVE_SOURCES then grml-live will just take what +# /etc/grml/fai/apt/sources.list provides by default +# Usage: like your /etc/apt/sources.list looks like +#GRML_LIVE_SOURCES=" +#deb http://192.168.1.112/debian etch main contrib non-free +#deb http://deb.grml.org/ grml-stable main +#deb http://deb.grml.org/ grml-testing main +#deb http://ftp.de.debian.org/debian etch main contrib non-free +#" + +# Which Debian flavour and which mirror do you want to use for basic debootstrapping? +# Unless specified the default from /etc/grml/fai/make-fai-nfsroot.conf will be +# taken. If you specify a value then the file /etc/grml/fai/make-fai-nfsroot.conf +# will be updated by grml-live on-the-fly. +# Usage: +# FAI_DEBOOTSTRAP="etch http://ftp.de.debian.org/debian" + # directory of configuration files for grml-live's FAI: GRML_FAI_CONFIG=/etc/grml/fai @@ -42,24 +59,11 @@ HOSTNAME=grml USERNAME=grml # do you want to pass any additional arguments to FAI? -FAI_ARGS="" - -# do you want to generate /etc/grml/fai/apt/sources.list on-the-fly via grml-live? -# otherwise just take what /etc/grml/fai/apt/sources.list provides by default -# GRML_LIVE_SOURCES has to look like a usual /etc/apt/sources.list entry -#GRML_LIVE_SOURCES=" -#deb http://192.168.1.112/debian etch main contrib non-free -#deb http://deb.grml.org/ grml-stable main -#deb http://deb.grml.org/ grml-testing main -#deb http://ftp.de.debian.org/debian etch main contrib non-free -#" +# FAI_ARGS="" -# Which Debian flavour and which mirror do you want to use for debootstrapping? -# Unless specified the default from /etc/grml/fai/make-fai-nfsroot.conf will be -# taken. If you specify a value then the file -# /etc/grml/fai/make-fai-nfsroot.conf will be updated by grml-live on-the-fly. -# usage: -# FAI_DEBOOTSTRAP="etch http://ftp.de.debian.org/debian" +# which architecture do you want to build? +# defaults to output of 'dpkg --print-architecture' +# ARCH="i386" # do you want to download pageant, plink, pscp, psftp, putty and puttygen # to store it inside $BUILD_TARGET/windows/? diff --git a/grml-live b/grml-live index 2734ae2..91a929d 100755 --- a/grml-live +++ b/grml-live @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Tue Sep 18 09:11:50 CEST 2007 [mika] +# Latest change: Tue Sep 18 19:29:33 CEST 2007 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -26,7 +26,8 @@ VERBOSE='' FORCE='' # source main configuration file: -. /etc/grml/grml-live.conf +LIVE_CONF=/etc/grml/grml-live.conf +. $LIVE_CONF PN=$(basename $0) # TMPFILE=$(mktemp) @@ -47,7 +48,7 @@ trap bailout 1 2 3 15 [ -n "$HOSTNAME" ] || HOSTNAME=grml [ -n "$USERNAME" ] || USERNAME=grml [ -n "$CLASSES" ] || CLASSES="GRML,I386" -[ -n "$TARGET" ] || bailout 1 "${PN}: \$TARGET not specified. Please adjust /etc/grml/grml-live.conf. Exiting." +[ -n "$TARGET" ] || bailout 1 "${PN}: \$TARGET not specified. Please adjust $LIVE_CONF. Exiting." # }}} # usage information {{{ @@ -98,9 +99,9 @@ shift $(($OPTIND - 1)) # set ARGV to the first not parsed commandline parameter # }}} # some misc checks before executing FAI {{{ -[ -n "$CLASSES" ] || bailout 1 "Error: \$CLASSES unset, please set it in /etc/grml/grml-live.conf or +[ -n "$CLASSES" ] || bailout 1 "Error: \$CLASSES unset, please set it in $LIVE_CONF or specify it on the command line using the -c|--classes option." -[ -n "$TARGET" ] || bailout 1 "Error: \$TARGET unset, please set it in /etc/grml/grml-live.conf or +[ -n "$TARGET" ] || bailout 1 "Error: \$TARGET unset, please set it in $LIVE_CONF or specify it on the command line using the -t|--target option." # }}} @@ -132,17 +133,21 @@ if [ -n "$GRML_LIVE_SOURCES" ] ; then echo "$GRML_LIVE_SOURCES" > /etc/grml/fai/apt/sources.list fi -# this heuristic is broken as it works exactly *once* by default :-/ -# TODO / FIXME -if [ -n "$SUITE" ] ; then - sed -i "s#etch #$SUITE #" /etc/grml/fai/make-fai-nfsroot.conf - sed -i "s#etch #$SUITE #" /etc/grml/grml-live.conf - sed -i "s# etch # $SUITE #" /etc/grml/grml-live.conf - sed -i "s# etch # $SUITE #" /etc/grml/fai/apt/sources.list +if [ -n "$FAI_DEBOOTSTRAP" ] ; then + sed -i "s#^FAI_DEBOOTSTRAP=.*#FAI_DEBOOTSTRAP=\"$FAI_DEBOOTSTRAP\"#" /etc/grml/fai/make-fai-nfsroot.conf fi -if [ -n "$FAI_DEBOOTSTRAP" ] ; then - sed -i "s#^FAI_DEBOOTSTRAP#FAI_DEBOOTSTRAP=$FAI_DEBOOTSTRAP#" /etc/grml/fai/make-fai-nfsroot.conf +# does this suck? YES! +if [ -n "$SUITE" ] ; then + sed -ie "s/SUITE=.*/SUITE=\"$SUITE\"/" $LIVE_CONF + + DIST="\|\ etch\ \|\ stable\ \|\ lenny\ \|\ testing\ \|\ sid\ \|\ unstable\ " + sed -ie "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" $LIVE_CONF + sed -ie "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" /etc/grml/fai/apt/sources.list + + DIST='\"etch\|=\"stable=\"lenny=\"testing=\"sid=\"unstable' + sed -ie "s#FAI_DEBOOTSTRAP=$DIST#FAI_DEBOOTSTRAP=\"$SUITE#" $LIVE_CONF + sed -ie "s#FAI_DEBOOTSTRAP=$DIST#FAI_DEBOOTSTRAP=\"$SUITE#" /etc/grml/fai/make-fai-nfsroot.conf fi # }}}