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
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
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)
* 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)
* 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
--------------
# 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: <flavour> <mirror>
+# FAI_DEBOOTSTRAP="etch http://ftp.de.debian.org/debian"
+
# directory of configuration files for grml-live's FAI:
GRML_FAI_CONFIG=/etc/grml/fai
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: <flavour> <mirror>
-# 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/?
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# 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 {{{
FORCE=''
# source main configuration file:
-. /etc/grml/grml-live.conf
+LIVE_CONF=/etc/grml/grml-live.conf
+. $LIVE_CONF
PN=$(basename $0)
# TMPFILE=$(mktemp)
[ -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 {{{
# }}}
# 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."
# }}}
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
# }}}