* add support for ppc?
-* check out how FAI_DEBMIRROR of /etc/grml/fai/fai.conf could be merged with our
- MIRROR_DIRECTORY and MIRROR_SOURCES feature of /etc/grml/grml-live.conf
-
* support multiple kernel versions installed in one single live-system
* Provide different interfaces for easy and common use of grml-live:
Can I use my own (local) Debian mirror?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Sure. Just adjust the variables GRML_LIVE_SOURCES and FAI_DEBOOTSTRAP (if not
-already using NFSROOT's base.tgz) inside /etc/grml/grml-live.conf according to
-your needs. Please don't forget that you should use the grml servers as well
-(see default configuration) so all the grml packages can be downloaded as well.
+Yes. Set up an according sources.list configuration as class file in
+${GRML_FAI_CONFIG}/config/files/etc/apt/sources.list.d/ and adjust the variable
+FAI_DEBOOTSTRAP (if not already using NFSROOT's base.tgz) inside
+/etc/grml/grml-live.conf[.local]. If you're setting up your own class file don't
+forget to include the class name in the class list (grml-live -c ...).
-If you want to use a local (for example NFS mount) mirror additionally, just
-adjust MIRROR_DIRECTORY and MIRROR_SOURCES inside /etc/grml/grml-live.conf as
-well.
-
-Unless you specify GRML_LIVE_SOURCES and/or FAI_DEBOOTSTRAP the default from
-${GRML_FAI_CONFIG}/apt/sources.list and ${GRML_FAI_CONFIG}/make-fai-nfsroot.conf will be
-taken. If you customise the variables in /etc/grml/grml-live.conf then the two
-files will be adjusted during runtime automatically.
-
-If MIRROR_DIRECTORY and MIRROR_SOURCES are specified the local mirror will be
-taken as first entry in the generated sources.list so it's preferred over
-non-local mirrors. Using a fallback mirror (via providing several mirrors in
-GRML_LIVE_SOURCES as used by default) is a recommended setting.
+If you want to use a local (for example NFS mount) mirror additionally then
+adjust MIRROR_DIRECTORY in /etc/grml/grml-live.conf[.local] as well.
If you want to use a HTTP Proxy (like apt-cacher-ng), set APT_PROXY. Example:
-APT_PROXY="http://localhost:3142/"
+
+ APT_PROXY="http://localhost:3142/"
[[add-additional-debian-packages]]
How do I add additional Debian package(s) to my CD/ISO?
fi
# install all apt related files
-fcopy -v /etc/apt/grml.key
-fcopy -v /etc/apt/preferences
-fcopy -v /etc/apt/apt.conf.d/20pdiffs
-fcopy -v /etc/apt/apt.conf.d/15grml-live
-
-# this is the auto-generated sources.list file by grml-live,
-# will be overriden by $GRML_FAI_CONFIG/scripts/GRMLBASE/33-aptsetup
-fcopy -v -c GRML_LIVE_SOURCES_LIST /etc/apt/sources.list
+fcopy -v -r /etc/apt
# install Grml gpg key:
$ROOTCMD apt-key add /etc/apt/grml.key
# architecture (I386 for x86; AMD64 for x86_64)
# CLASSES="GRMLBASE,GRML_MEDIUM,I386"
-## Which mirrors do you want to use? Please set GRML_LIVE_SOURCES *and*
-## *FAI_DEBOOTSTRAP* accordingly. To use a local directory (like an NFS mount)
-## check out MIRROR_DIRECTORY and MIRROR_SOURCES as well.
-
-# Which Debian mirror do you want to use for main packages (after debootstrapping
-# has been finished)?
-# If you do *not* set GRML_LIVE_SOURCES here then grml-live will just take what
-# ${GRML_FAI_CONFIG}/apt/sources.list provides by default. But please do *not*
-# manually edit ${GRML_FAI_CONFIG}/apt/sources.list but instead use $GRML_LIVE_SOURCES.
-# Use the variable as your /etc/apt/sources.list looks like.
-# GRML_LIVE_SOURCES="
-#deb http://deb.grml.org/ grml-stable main
-#deb http://deb.grml.org/ grml-testing main
-#deb http://192.168.1.112/debian lenny main contrib non-free
-#deb http://cdn.debian.net/debian etch main contrib non-free
-#"
-
# HTTP Proxy to use for APT
# APT_PROXY="http://localhost:3142/"
# Usage: "<suite> <mirror>"
# FAI_DEBOOTSTRAP="squeeze http://cdn.debian.net/debian"
-# Do you want to use a local mirror (like NFS) as well?
+# Do you want to use a local mirror (like NFS)?
# If so specify the directory where debian/ is available:
# MIRROR_DIRECTORY="/mnt/mirror"
-# ... and the sources.list entry for the directory:
-# MIRROR_SOURCES="deb file:///mnt/mirror/debian sid main contrib non-free"
+# ... and then set up an according class file in
+# ${GRML_FAI_CONFIG}/config/files/etc/apt/sources.list.d/
+# containing something like:
+# deb file:///mnt/mirror/debian sid main contrib non-free
# Version number of ISO:
# VERSION="0.0-1"
else
LOCAL_CONFIG=''
fi
+
+if [ -n "${GRML_LIVE_SOURCES:-}" ] ; then
+ eerror "Config variable \$GRML_LIVE_SOURCES is set. This variable has been deprecated."
+ ewarn "Please set up ${GRML_FAI_CONFIG}/config/files/etc/apt/sources.list.d/* instead."
+ bailout 1
+fi
# }}}
# command line parsing {{{
[ -n "$HYBRID_METHOD" ] || HYBRID_METHOD='manifold'
[ -n "$NFSROOT_CONF" ] || NFSROOT_CONF="${GRML_FAI_CONFIG}/make-fai-nfsroot.conf"
[ -n "$RELEASENAME" ] || RELEASENAME='grml-live rocks'
-[ -n "$SOURCES_LIST_OUTPUT" ] || SOURCES_LIST_OUTPUT="${GRML_FAI_CONFIG}/config/files/etc/apt/sources.list/GRML_LIVE_SOURCES_LIST"
[ -n "$SQUASHFS_EXCLUDES_FILE" ] || SQUASHFS_EXCLUDES_FILE="${GRML_FAI_CONFIG}/config/grml/squashfs-excludes"
[ -n "$SUITE" ] || SUITE='squeeze'
[ -n "$TEMPLATE_DIRECTORY" ] || TEMPLATE_DIRECTORY='/usr/share/grml-live/templates'
# }}}
# on-the-fly configuration {{{
-mkdir -p "$(dirname $SOURCES_LIST_OUTPUT)" # might not be present in -D config space
-
-cat > "$SOURCES_LIST_OUTPUT" << EOF
-# NOTE: This file is *NOT* meant for manual customisation! This file is
-# installed temporarily only by grml-live and will be overriden in the
-# installation and configuration process then.
-EOF
-
-if [ -n "$MIRROR_DIRECTORY" ] ; then
- if ! [ -d "$MIRROR_DIRECTORY/debian" ] ; then
- log "Error: $MIRROR_DIRECTORY/debian does not seem to exist. Exiting. [$(date)]"
- eerror "Error: $MIRROR_DIRECTORY/debian does not seem to exist. Exiting." ; eend 1
- bailout 1
- fi
- echo "$MIRROR_SOURCES" >> "$SOURCES_LIST_OUTPUT"
-fi
-
if [ -n "$FAI_DEBOOTSTRAP" ] ; then
sed "s#^FAI_DEBOOTSTRAP=.*#FAI_DEBOOTSTRAP=\"$FAI_DEBOOTSTRAP\"#" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF"
fi
# does this suck? YES!
# /usr/share/debootstrap/scripts/unstable does not exist, instead use 'sid':
case $SUITE in
- unstable) SUITE='sid' ;;
- # make sure that we *NEVER* write any broken suite name to sources.list,
- # otherwise we won't be able to adjust it one next (correct) execution
- stable) ;;
- testing) ;;
- etch) ;;
- lenny) ;;
- squeeze) ;;
- wheezy) ;;
- sid) ;;
- *) echo "Sorry, $SUITE is not a valid Debian suite, exiting.">&2; bailout 1 ;;
+ unstable) SUITE='sid' ; CLASSES="DEBIAN_UNSTABLE,$CLASSES" ;;
+ *) CLASSES="DEBIAN_$(echo $SUITE | tr 'a-z' 'A-Z'),$CLASSES";;
esac
export SUITE # make sure it's available in FAI scripts
-if [ -n "${GRML_LIVE_SOURCES:-}" ] ; then
- DIST=" etch\| stable\| lenny\| squeeze\| wheezy\| testing\| sid\| unstable"
- echo "# generated based on \$GRML_LIVE_SOURCES by grml-live
-$GRML_LIVE_SOURCES" | \
- sed -e "s/\(^deb .\+\)\([ \t]*\)\($DIST\)\([ \t]*\)\(main \)/\1 \2$SUITE\4\5/;
- s/\(^deb-src .\+\)\([ \t]*\)\($DIST\)\([ \t]*\)\(main \)/\1 \2$SUITE\4\5/" >> "$SOURCES_LIST_OUTPUT"
-else
- cat >> "$SOURCES_LIST_OUTPUT" << EOF
-# generated by grml-live
-deb http://deb.grml.org/ grml-stable main
-deb-src http://deb.grml.org/ grml-stable main
-
-deb http://deb.grml.org/ grml-testing main
-deb-src http://deb.grml.org/ grml-testing main
-
-deb http://cdn.debian.net/debian $SUITE main contrib non-free
-deb-src http://cdn.debian.net/debian $SUITE main contrib non-free
-EOF
-fi
-
-# notice: activate grml-live pool when building against unstable or testing:
-if grep -qwe unstable -qwe sid -qwe testing -qwe wheezy "$SOURCES_LIST_OUTPUT" ; then
- grep -q 'grml-live.*main' "$SOURCES_LIST_OUTPUT" || \
- grep grml-stable "$SOURCES_LIST_OUTPUT" | \
- sed 's/grml-stable/grml-live/' >> "$SOURCES_LIST_OUTPUT"
-else
- grep -q 'grml-live.*main' "$SOURCES_LIST_OUTPUT" && \
- sed -i 's/.*grml-live.*main/# removed grml-live repository/' "$SOURCES_LIST_OUTPUT"
-fi
-
for file in "$LIVE_CONF" "$CONFIG" "$LOCAL_CONFIG" "$NFSROOT_CONF" ; do
if [ -n "$file" ] ; then
sed "s|^FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" "$file" | sponge "$file"