[Fai-commit] r5971 - in branches/stable/3.4: bin debian man

Michael Prokop mika at alioth.debian.org
Tue Aug 17 12:52:43 UTC 2010


Author: mika
Date: 2010-08-17 12:52:41 +0000 (Tue, 17 Aug 2010)
New Revision: 5971

Modified:
   branches/stable/3.4/bin/make-fai-nfsroot
   branches/stable/3.4/debian/changelog
   branches/stable/3.4/man/make-fai-nfsroot.8
Log:
make-fai-nfsroot, make-fai-nfsroot.8: add option -B, (closes: #576092) (thanks to Mika Prokop for the patch)


Conflicts:

	debian/changelog

Signed-off-by: Michael Prokop <mika at grml.org>

Modified: branches/stable/3.4/bin/make-fai-nfsroot
===================================================================
--- branches/stable/3.4/bin/make-fai-nfsroot	2010-08-17 12:52:35 UTC (rev 5970)
+++ branches/stable/3.4/bin/make-fai-nfsroot	2010-08-17 12:52:41 UTC (rev 5971)
@@ -87,9 +87,10 @@
 fi
 
 # option e currently does nothing
-while getopts hervC:f:kKpU opt ; do
+while getopts hervC:B:f:kKpU opt ; do
     case "$opt" in
         C) cfdir=$OPTARG ;;
+        B) basetgz=$OPTARG ;;
         v) verbose=1 ; v=-v ;;
         r) recover=1 ;;
         f) die "Option -f is not supported any more. Use option -C instead" ;;
@@ -283,12 +284,31 @@
     fi
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+extract_base() {
+
+    if [ ! -r "$basetgz" ] ; then
+      die "Specified $basetgz could not be used."
+    else
+       if cd $NFSROOT ; then
+	 printf "Extracting $basetgz: "
+	 tar -C $NFSROOT -zxpf "$basetgz" || die "Error while extracting ${basetgz} in ${NFSROOT}."
+	 cp "$basetgz" $NFSROOT/var/tmp/base.tgz
+	 touch $NFSROOT/.THIS_IS_THE_FAI_NFSROOT
+	 echo done
+       fi
+    fi
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 create_nfsroot() {
 
     mkdir -p $NFSROOT/$FAI
     cd $NFSROOT || die "Can't cd to $NFSROOT"
 
-    call_with_stamp create_base
+    if [ -n "$basetgz" ] ; then
+      call_with_stamp extract_base
+    else
+      call_with_stamp create_base
+    fi
     # save the list of all packages in the base.tgz
     $ROOTCMD dpkg --get-selections | awk '/install$/ {print $1}' > var/tmp/base-pkgs.lis
 

Modified: branches/stable/3.4/debian/changelog
===================================================================
--- branches/stable/3.4/debian/changelog	2010-08-17 12:52:35 UTC (rev 5970)
+++ branches/stable/3.4/debian/changelog	2010-08-17 12:52:41 UTC (rev 5971)
@@ -6,8 +6,11 @@
   * ainsl: exit with 0 if line already exists in the file
   * sources.list: fix security.geo.debian.org domain entries
   * install_packages: Fix typo in info message (thanks Adrian Glaubitz)
+  * updatebase: remove pre-lenny code
+  * make-fai-nfsroot, make-fai-nfsroot.8: add option -B, (closes: #576092)
+    (thanks to Mika Prokop for the patch)
 
- -- Thomas Lange <lange at debian.org>  Mon, 31 May 2010 16:50:25 +0200
+ -- Thomas Lange <lange at debian.org>  Mon, 14 Jun 2010 20:26:25 +0200
 
 fai (3.3.5) unstable; urgency=high
 

Modified: branches/stable/3.4/man/make-fai-nfsroot.8
===================================================================
--- branches/stable/3.4/man/make-fai-nfsroot.8	2010-08-17 12:52:35 UTC (rev 5970)
+++ branches/stable/3.4/man/make-fai-nfsroot.8	2010-08-17 12:52:41 UTC (rev 5971)
@@ -1,7 +1,7 @@
 .\"                                      Hey, EMACS: -*- nroff -*-
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
-.TH make-fai-nfsroot 8 "19 april 2009" "FAI 3.2"
+.TH make-fai-nfsroot 8 "14 june 2010" "FAI 3"
 .de }1
 .ds ]X \&\\*(]B\\
 .nr )E 0
@@ -37,6 +37,10 @@
 successfully and >0 if an error occurs.
 .SH OPTIONS
 .TP
+.B \-B BASETGZ
+Use specified BASETGZ file as base.tgz for the nfsroot. This avoids
+calling debootstrap and therefore reduces the buildtime for the nfsroot.
+.TP
 .B \-C CFDIR
 Use CFDIR as configuration directory. Default is /etc/fai. You can
 also set the environment variable FAI_ETC_DIR.




More information about the Fai-commit mailing list