Notice: the grml team is migrating from Mercurial to Git.
Please visit git.grml.org instead!
| author | Michael Prokop |
| Mon Oct 29 00:47:11 2007 +0100 (13 months ago) | |
| changeset 232 | f3094cf2b107 |
| manifest | f3094cf2b107 |
| parent 231 | 68737ad800fa |
| child 233 | e29530020afb |
--- a/debian/changelog Sun Oct 28 18:27:46 2007 +0100+++ b/debian/changelog Mon Oct 29 00:47:11 2007 +0100@@ -1,5 +1,10 @@ grml-live (0.0.7) unstable; urgency=lowgrml-live (0.0.7) unstable; urgency=low+ * Added FAI patches to /usr/share/grml-live/patches/ - it's+ recommended to apply the patches to FAI until they are accepted+ upstream. See Debian's BTS for more details: #444210, #447080+ and #448426.+ * Support option '-u' for updating system.* Reworked buildd concept.- Now we have a seperate/usr/share/grml-live/buildd/functions.sh for generic stuff
--- a/debian/rules Sun Oct 28 18:27:46 2007 +0100+++ b/debian/rules Mon Oct 29 00:47:11 2007 +0100@@ -38,6 +38,7 @@ install: buildcp -a examples debian/grml-live/usr/share/doc/grml-live/cp -a templates debian/grml-live/usr/share/grml-live/cp -a scripts debian/grml-live/usr/share/grml-live/+ cp -a patches debian/grml-live/usr/share/grml-live/cp -a buildd/*.sh debian/grml-live/usr/share/grml-live/buildd/install -o root -m 640 buildd/grml-buildd.conf debian/grml-live/etc/grml/grml-buildd.confinstall -o root -m 755 grml-live debian/grml-live/usr/sbin/grml-live
--- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE Sun Oct 28 18:27:46 2007 +0100+++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE Mon Oct 29 00:47:11 2007 +0100@@ -9,6 +9,24 @@set -uset -e++if [ "$FAI_ACTION" = "softupdate" ] ; then+ echo "Softupdate"+ # make sure we prefer grml repository:+ if [ -r /etc/grml/fai/apt/preferences ] ; then+ cp /etc/grml/fai/apt/preferences $target/etc/apt/preferences+ fi++ if [ -r /etc/grml/fai/apt/sources.list ] ; then+ if [ -L $target/etc/apt/sources.list ] ; then+ rm $target/etc/apt/sources.list+ fi+ cp /etc/grml/fai/apt/sources.list $target/etc/apt/sources.list+ fi++ $ROOTCMD apt-get update++else # no softupdate but fresh installation# work around http://trac.lighttpd.net/trac/ticket/657# should be removed later on:@@ -22,7 +40,7 @@ gpg --export F61E2E7CECDEA787 > $target/# make sure we prefer grml repository:if [ -r /etc/grml/fai/files/etc/apt/preferences ] ; then- cp /etc/grml/fai/apt//preferences $target/etc/apt/preferences+ cp /etc/grml/fai/apt/preferences $target/etc/apt/preferencesfi# make sure we have file-rc available before@@ -56,5 +74,7 @@ if [ -L "$target"/usr/sbin/invoke-rc.d ]$ROOTCMD dpkg-divert --package fai --rename --remove /usr/sbin/invoke-rc.dfi+fi # end of FAI_ACTION = softupdate+## END OF FILE ################################################################## vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
--- a/etc/grml/fai/fai.conf Sun Oct 28 18:27:46 2007 +0100+++ b/etc/grml/fai/fai.conf Mon Oct 29 00:47:11 2007 +0100@@ -26,6 +26,7 @@ FAI_CONFIGDIR=/etc/grml/fai/config# default if undefined here: nfs://`hostname`/$FAI_CONFIGDIR# supported URL-types: nfs, file, cvs, cvs+ssh, svn+file, svn+http,...#FAI_CONFIG_SRC=nfs://yourservername$FAI_CONFIGDIR+FAI_CONFIG_SRC=file:///etc/grml/fai# the following variables are read only for most users@@ -33,4 +34,5 @@ MNTPOINT=/media/mirrorMNTPOINT=/media/mirror# the local configuration directory on the install client-FAI=/var/lib/fai/config+#FAI=/var/lib/fai/config+FAI=/etc/grml/fai/config
--- a/grml-live Sun Oct 28 18:27:46 2007 +0100+++ b/grml-live Mon Oct 29 00:47:11 2007 +0100@@ -4,7 +4,7 @@# 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: Sun Oct 28 15:26:10 CET 2007 [mika]+# Latest change: Sun Oct 28 23:52:20 CET 2007 [mika]################################################################################# read configuration files, set some misc variables {{{@@ -31,9 +31,16 @@ if [ -r /var/run/fai/FAI_INSTALLATION_INexit 1fi+if [ -r /var/run/fai/fai_softupdate_is_running ] ; then+ echo "/usr/sbin/fai softupdate already running or was aborted before.">&2+ echo "You may remove /var/run/fai/fai_softupdate_is_running and try again.">&2+ exit 1+fi+# make sure they are not set by defaultVERBOSE=''FORCE=''+UPDATE=''if [ -r /etc/grml/lsb-functions ] ; then. /etc/grml/lsb-functions@@ -170,7 +177,7 @@ http://grml.org/bugs/# command line parsing {{{-while getopts "a:c:g:i:o:r:s:t:v:FhV" opt; do+while getopts "a:c:g:i:o:r:s:t:v:FhuV" opt; docase "$opt" ina) ARCH="$OPTARG" ;;c) CLASSES="$OPTARG" ;;@@ -187,6 +194,7 @@ while getopts "a:c:g:i:o:r:s:t:v:FhV" opv) VERSION="$OPTARG" ;;F) FORCE=1 ;;h) usage ; bailout 0 ;;+ u) UPDATE=1 ;;V) VERBOSE="-v" ;;?) echo "invalid option -$OPTARG" >&2; bailout 1 ;;esac@@ -221,6 +229,7 @@ if [ -z "$FORCE" ] ; then[ -n "$FAI_ARGS" ] && echo " additional arguments for FAI: $FAI_ARGS"[ -n "$LOGFILE" ] && echo " Logging to file: $LOGFILE"[ -n "$VERBOSE" ] && echo " Using VERBOSE mode."+ [ -n "$UPDATE" ] && echo " Executing UPDATE instead of fresh installation."echoecho -n "Is this ok for you? [y/N] "read a@@ -290,7 +299,13 @@ fi# CHROOT_OUTPUT - execute FAI {{{[ -n "$CHROOT_OUTPUT" ] || CHROOT_OUTPUT="$OUTPUT/grml_chroot"-if [ -d "$CHROOT_OUTPUT/bin" ] ; then+if [ -n "$UPDATE" ] ; then+ FAI_ACTION=softupdate+else+ FAI_ACTION=dirinstall+fi++if [ -d "$CHROOT_OUTPUT/bin" -a -z "$UPDATE" ] ; thenlog "$CHROOT_OUTPUT exists already, skipping stage 'fai dirinstall'"ewarn "$CHROOT_OUTPUT exists already, skipping stage 'fai dirinstall'" ; eend 0else@@ -299,7 +314,7 @@ elsemkdir -p "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}"mount --bind "${MIRROR_DIRECTORY}" "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}"fi- fai $VERBOSE -C "$GRML_FAI_CONFIG" -c"$CLASSES" -u "$HOSTNAME" dirinstall "$CHROOT_OUTPUT" $FAI_ARGS | tee -a $LOGFILE+ fai $VERBOSE -C "$GRML_FAI_CONFIG" -c"$CLASSES" -u "$HOSTNAME" $FAI_ACTION "$CHROOT_OUTPUT" $FAI_ARGS | tee -a $LOGFILElog "Setting /etc/grml_version to $GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]"echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$ISO_DATE]" > $CHROOT_OUTPUT/etc/grml_versionchmod 644 $CHROOT_OUTPUT/etc/grml_version@@ -312,6 +327,7 @@ elseif [ -r "/var/log/fai/dirinstall/$HOSTNAME/software.log" ] ; then# 1 errors during executing of commands# Unable to write mmap - msync (28 No space left on device)+ # 'No candidate version found for' [/var/log/fai/current/software.log]grep 'dpkg: error processing' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=1grep 'E: Method http has died unexpectedly!' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=2grep 'ERROR: chroot' /var/log/fai/dirinstall/$HOSTNAME/software.log >> $LOGFILE && ERROR=3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000+++ b/patches/fai_fix_debopts_vs_debopt.patch Mon Oct 29 00:47:11 2007 +0100@@ -0,0 +1,11 @@+--- /usr/sbin/fai 2007-10-17 21:20:47.000000000 +0000++++ /usr/sbin/fai 2007-10-17 21:20:50.000000000 +0000+@@ -223,7 +223,7 @@++ export NFSROOT=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo $NFSROOT)+ export FAI_DEBOOTSTRAP=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo $FAI_DEBOOTSTRAP)+- export FAI_DEBOOTSTRAP_OPT=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo $FAI_DEBOOTSTRAP_OPT)++ export FAI_DEBOOTSTRAP_OPTS=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo $FAI_DEBOOTSTRAP_OPTS)++ fi+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000+++ b/patches/fai_mention_debopts.patch Mon Oct 29 00:47:11 2007 +0100@@ -0,0 +1,11 @@+--- /usr/lib/fai/subroutines-linux 2007-10-17 21:21:11.000000000 +0000++++ /usr/lib/fai/subroutines-linux 2007-10-17 21:21:03.000000000 +0000+@@ -124,7 +124,7 @@++ local dversion=$(dpkg -l debootstrap | grep debootstrap | cut -f7 -d' ')+ echo "Creating base system using debootstrap version $dversion"+- echo "Calling debootstrap $1 $FAI_ROOT $2"++ echo "Calling debootstrap $1 $FAI_DEBOOTSTRAP_OPTS $FAI_ROOT $2"+ yes '' | LC_ALL=C debootstrap $FAI_DEBOOTSTRAP_OPTS $1 $FAI_ROOT $2+ }+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000+++ b/patches/fai_support_aptitude_in_updatebase Mon Oct 29 00:47:11 2007 +0100@@ -0,0 +1,14 @@+--- /usr/lib/fai/updatebase.orig 2007-10-29 00:12:49.000000000 +0100++++ /usr/lib/fai/updatebase 2007-10-29 00:13:27.000000000 +0100+@@ -31,7 +31,11 @@+ [ $? -ne 0 ] && yes '' | $ROOTCMD dpkg --configure -a+ # using the above value, causes an error: "dpkg need action"+ export aptopt=++if [ -x /usr/bin/aptitude ] ; then++$ROOTCMD aptitude $aptopt -f -y dist-upgrade </dev/null++else+ $ROOTCMD apt-get $aptopt -f -y dist-upgrade </dev/null++fi+ # update dpkg info which packages are available+ tmp=$($ROOTCMD mktemp)+ $ROOTCMD apt-cache dumpavail > $FAI_ROOT/$tmp
--- a/patches/README Sun Oct 28 18:27:46 2007 +0100+++ /dev/null Thu Jan 01 00:00:00 1970 +0000@@ -1,11 +0,0 @@-fai_dirupdate_[1234].diff:--Try to provide an "update chroot" action, like:-- # TARGET=/dev/shm/grml_chroot fai -C/etc/grml/fai -cGRMLBASE,I386 dirupdate--Needs work though...--fai_dirinstall_check.diff:--Make sure to exit in fai dirinstall if task instsoft wasn't successfull.
--- a/patches/fai_dirinstall_check.diff Sun Oct 28 18:27:46 2007 +0100+++ /dev/null Thu Jan 01 00:00:00 1970 +0000@@ -1,12 +0,0 @@---- /usr/lib/fai/subroutines.orig 2007-09-21 10:46:23.000000000 +0200-+++ /usr/lib/fai/subroutines 2007-09-21 19:36:34.000000000 +0200-@@ -476,6 +476,9 @@- task prepareapt- task updatebase- task instsoft-+ if grep -q 'E: Sub-process /usr/bin/dpkg returned an error code' $LOGDIR/software.log ; then-+ die "Error in software installation task."-+ fi- task configure- task finish-
--- a/patches/fai_dirupdate_1.diff Sun Oct 28 18:27:46 2007 +0100+++ /dev/null Thu Jan 01 00:00:00 1970 +0000@@ -1,42 +0,0 @@---- /usr/lib/fai/subroutines.orig 2007-09-21 10:04:05.000000000 +0200-+++ /usr/lib/fai/subroutines 2007-09-21 10:34:40.000000000 +0200-@@ -266,6 +266,9 @@- dirinstall)- task dirinstall- ;;-+ dirupdate)-+ task dirupdate-+ ;;- softupdate)- echo Performing FAI system update. All data may be overwritten!- task softupdate-@@ -491,6 +494,29 @@- fi- }- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --+task_dirupdate() {-+-+ > $stamp-+-+ mkdir -p $FAI_ROOT-+ FAI_ROOT=$(cd $FAI_ROOT;pwd)-+ echo "Updating directory $FAI_ROOT"-+ task configure-+ task updatechroot-+ task finish-+-+ rm -f $stamp-+ unset LOGUSER # so logfile are not saved to remote-+ task savelog-+-+ if [ -f $stamp ]; then-+ echo "Error while executing commands in subshell."-+ echo "$stamp was not removed."-+ sendmon "TASKERROR install 21"-+ die "Please look at the log files in $LOGDIR for errors."-+ fi-+}-+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- task_softupdate() {-- local stamp=/var/run/fai/fai_softupdate_is_running
--- a/patches/fai_dirupdate_2.diff Sun Oct 28 18:27:46 2007 +0100+++ /dev/null Thu Jan 01 00:00:00 1970 +0000@@ -1,14 +0,0 @@---- /usr/lib/fai/get-config-dir.orig 2007-09-21 10:13:24.000000000 +0200-+++ /usr/lib/fai/get-config-dir 2007-09-21 10:14:11.000000000 +0200-@@ -9,6 +9,11 @@- # Short-Description: get $FAI directory from $FAI_CONFIG_SRC- ### END SUBROUTINE INFO--+if [ -n "FAI_NO_CONFIG_SRC" ] ; then-+ echo "Notice: skipping get-dir-config as requested"-+ exit 0-+fi-+- if [ -z "$FAI_CONFIG_SRC" ]; then- sendmon "TASKERROR get_fai_dir 21"- echo "Error: Provide the URL to obtain the fai config storage in \$FAI_CONFIG_SRC"
--- a/patches/fai_dirupdate_3.diff Sun Oct 28 18:27:46 2007 +0100+++ /dev/null Thu Jan 01 00:00:00 1970 +0000@@ -1,11 +0,0 @@---- /usr/sbin/fai.orig 2007-09-21 10:45:21.000000000 +0200-+++ /usr/sbin/fai 2007-09-21 10:45:22.000000000 +0200-@@ -280,7 +280,7 @@- trap 'clean_exit' EXIT- fi---mkfifo $LOGDIR/logfifo-+[ -w $LOGDIR/logfifo ] || mkfifo $LOGDIR/logfifo- tee -a $LOGDIR/fai.log < $LOGDIR/logfifo &- # in bash &> redirect stdout and stderr to file- fstart &> $LOGDIR/logfifo
--- a/patches/fai_dirupdate_4.diff Sun Oct 28 18:27:46 2007 +0100+++ /dev/null Thu Jan 01 00:00:00 1970 +0000@@ -1,21 +0,0 @@---- /usr/lib/fai/subroutines-linux.orig 2007-09-21 10:47:35.000000000 +0200-+++ /usr/lib/fai/subroutines-linux 2007-09-21 10:49:09.000000000 +0200-@@ -229,6 +229,18 @@- updatebase- }- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --+task_updatechroot() {-+-+ # update the chroot-+ echo "Updating chroot"-+ if [ -z "$TARGET" ] ; then-+ echo "Error: \$TARGET not set, exiting.">&2-+ return 1-+ else-+ chroot $TARGET apt-get update-+ fi-+}-+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- task_instsoft() {-- echo "Installing software may take a while"