[Fai-commit] r5258 - people/michael/experimental/patches

mt at alioth.debian.org mt at alioth.debian.org
Fri Feb 13 18:18:07 UTC 2009


Author: mt
Date: 2009-02-13 18:18:07 +0000 (Fri, 13 Feb 2009)
New Revision: 5258

Added:
   people/michael/experimental/patches/bugfix-439250
   people/michael/experimental/patches/bugfix-441436
   people/michael/experimental/patches/bugfix-456978
   people/michael/experimental/patches/bugfix-494431
   people/michael/experimental/patches/bugfix-504801
   people/michael/experimental/patches/bugfix-506459
   people/michael/experimental/patches/bugfix-513090
Modified:
   people/michael/experimental/patches/series
   people/michael/experimental/patches/setup-storage_crypto-bugfixes
Log:
Added several bugfixes (some of them from patches in the BTS, some have new
patches)


Added: people/michael/experimental/patches/bugfix-439250
===================================================================
--- people/michael/experimental/patches/bugfix-439250	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-439250	2009-02-13 18:18:07 UTC (rev 5258)
@@ -0,0 +1,17 @@
+2009-02-13  Michael Tautschnig  <mt at debian.org>
+
+	* lib/subroutines-linux: Don't rely on ' as a field separator when parsing
+		boot.log, use = and strip off any quotes (closes: #439250)
+Index: trunk/lib/subroutines-linux
+===================================================================
+--- trunk.orig/lib/subroutines-linux
++++ trunk/lib/subroutines-linux	
+@@ -288,7 +288,7 @@
+     local frsh
+     local doexit=0
+     local hostname=$(hostname)
+-    local ipaddr=$(grep IPADDR $LOGDIR/boot.log | cut -d\' -f2)
++    local ipaddr=$(grep IPADDR $LOGDIR/boot.log | cut -d'=' -f2 | sed "s/'//g")
+     local remotesh
+ 
+     case "$FAI_LOGPROTO" in

Added: people/michael/experimental/patches/bugfix-441436
===================================================================
--- people/michael/experimental/patches/bugfix-441436	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-441436	2009-02-13 18:18:07 UTC (rev 5258)
@@ -0,0 +1,44 @@
+2009-02-13  Michael Tautschnig  <mt at debian.org>
+
+	* lib/get-config-dir-svn: Make username in svn:// config url optional (thanks
+		Alexander Fisher) (closes: #441436)
+Index: trunk/lib/get-config-dir-svn
+===================================================================
+--- trunk.orig/lib/get-config-dir-svn
++++ trunk/lib/get-config-dir-svn	
+@@ -12,7 +12,11 @@
+ # matched string: "svn://user@host/svnpath"
+ protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
+ username=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^@]*\)@')
+-svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://[^@]\+@\([^[:space:]]\+\)')
++if [ -n "$username" ] ; then
++  svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://[^@]\+@\([^[:space:]]\+\)')
++else
++  svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^[:space:]]\+\)')
++fi
+ 
+ case $protocol in
+ 	svn)
+@@ -28,9 +32,11 @@
+ 		svnurl="https://$svnpath"
+ 		;;
+ 	svn+ssh)
+-		svnurl="svn+ssh://$username@$svnpath"
+-		# this is a bit hackish: if $username is empty, the path gets corrected below... 
+-		# explaination: svn co -username foo svn+ssh://bar doesnt work as svn co svn+ssh://foo@bar
++    if [ -n "$username" ] ; then
++		  svnurl="svn+ssh://$username@$svnpath"
++    else
++      svnurl=$FAI_CONFIG_SRC
++    fi
+ 		;;
+ 	*)
+ 		echo "get-config-dir-svn: protocol $protocol not implemented"
+@@ -39,7 +45,6 @@
+ esac
+ 		
+ [ -n "$username" ] && user="--username $username"
+-[ -z "$username" ] && svnurl=$FAI_CONFIG_SRC
+ 
+ if [ -d "$FAI/.svn" ] ; then
+    echo "Updating SVN in $FAI"

Added: people/michael/experimental/patches/bugfix-456978
===================================================================
--- people/michael/experimental/patches/bugfix-456978	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-456978	2009-02-13 18:18:07 UTC (rev 5258)
@@ -0,0 +1,57 @@
+2009-02-13  Michael Tautschnig  <mt at debian.org>
+
+	* bin/fai: Added -u|--hostname to usage info and enabled use of -u|--hostname
+    in all cases where $do_init_tasks != 1 (closes: #456978)
+Index: trunk/bin/fai
+===================================================================
+--- trunk.orig/bin/fai
++++ trunk/bin/fai	
+@@ -119,11 +119,12 @@
+ 	Usage: $0 [options] [action]
+        
+ 	Options:
+-	   -v|--verbose      display more information during the update
+-	   -h|--help         display this help message
+-	   -N|--new          renew list of classes
+-	   -c|--class        comma separated list of classes
+-	   -C|--cfdir CFDIR  Use CFDIR for  reading the config files
++	   -v|--verbose         display more information during the update
++	   -h|--help            display this help message
++	   -N|--new             renew list of classes
++	   -c|--class           comma separated list of classes
++	   -C|--cfdir CFDIR     use CFDIR for reading the config files
++	   -u|--hostname HNAME  set hostname to be used
+ 
+ EOF
+     exit 0
+@@ -266,15 +267,12 @@
+ [ -f /proc/version ] || mount -n -t proc proc /proc # ubuntu initrd does not mount /proc
+ export start_seconds=$(cut -d . -f 1 /proc/uptime)
+ 
+-if [ X$action = Xdirinstall -a -n "$newhostname" ]; then
+-    export HOSTNAME=$newhostname
+-fi
+-
+ if [ $do_init_tasks -eq 1 ]; then
+     # we are running an initial installation
+     export LOGDIR=/tmp/fai
+     mkdir -p $LOGDIR
+ else
++    [ -n "$newhostname" ] && export HOSTNAME=$newhostname
+     export fai_rundate=$(date +'%Y%m%d_%H%M%S')
+     export LOGDIR=/var/log/fai/$HOSTNAME/$action-$fai_rundate
+     mkdir -p $LOGDIR
+@@ -289,9 +287,12 @@
+ chmod 0750 $LOGDIR
+ 
+ fai_init
+-if [ X$action = Xdirinstall ]; then
++if [ $do_init_tasks -ne 1 ]; then
+     [ -n "$newhostname" ] && echo "Hostname set to $HOSTNAME" | tee -a $LOGDIR/fai.log
+     unset newhostname
++fi
++
++if [ X$action = Xdirinstall ]; then
+     skiptask confdir
+     export FAI=$FAI_CONFIGDIR
+     set -a

Added: people/michael/experimental/patches/bugfix-494431
===================================================================
--- people/michael/experimental/patches/bugfix-494431	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-494431	2009-02-13 18:18:07 UTC (rev 5258)
@@ -0,0 +1,53 @@
+2009-02-13  Michael Tautschnig  <mt at debian.org>
+
+	* bin/fai-mirror: Fixed mess of $qflag, $quiet, $verbose and $debug
+		(closes: #494431)
+Index: trunk/bin/fai-mirror
+===================================================================
+--- trunk.orig/bin/fai-mirror
++++ trunk/bin/fai-mirror	
+@@ -193,7 +193,7 @@
+     echo "Adding packages from base.tgz."
+     if [ -f $NFSROOT/var/tmp/base-pkgs.lis ]; then
+ 	plist=$(< $NFSROOT/var/tmp/base-pkgs.lis)
+-	apt-get $quiet $aptoptions update >/dev/null
++	apt-get $qflag $aptoptions update >/dev/null
+ 	apt-get $qflag -d $aptoptions -y --force-yes --fix-missing install $plist
+     else
+ 	echo "WARNING: $NFSROOT/var/tmp/base-pkgs.lis does not exists."
+@@ -249,7 +249,7 @@
+     echo "$cfdir is not a directory"
+     exit 6
+ fi
+-[ "$verbose" ] && echo "Using configuration files from $cfdir"
++[ "$verbose" -eq 1 ] && echo "Using configuration files from $cfdir"
+ . $cfdir/fai.conf
+ . $cfdir/make-fai-nfsroot.conf
+ export NFSROOT="$NFSROOT/live/filesystem.dir"
+@@ -258,8 +258,6 @@
+ [ -n "$NFSROOT_PACKAGES" ] && die "WARNING: The use of \$packages in make-fai-nfsroot.conf is now deprecated. Please include this information into $cfdir/NFSROOT."
+ 
+ [ -n "$exclasses" -a -n "$cclasses" ] && die 3 "Options -x and -c not allowed at the same time."
+-debug=0
+-[ $debug -eq 0 ] && quiet=-q
+ 
+ mirrordir=$1
+ if [ -z "$mirrordir" ]; then
+@@ -291,7 +289,7 @@
+ perl -p -e 's/file:/copy:/' $cfdir/apt/sources.list > $aptcache/etc/apt/sources.list
+ 
+ echo "Getting package information"
+-apt-get $quiet $aptoptions update >/dev/null
++apt-get $qflag $aptoptions update >/dev/null
+ 
+ set-classes
+ echo "Downloading packages for classes:" $classes
+@@ -314,7 +312,7 @@
+ CONTENTS=no
+ PKGCOMP='none gzip'
+ EOF
+-apt-move $quiet -c $aptmovefile update
++apt-move $qflag -c $aptmovefile update
+ # since Packages.gz from apt-move does not include packages from my
+ # repository, let's use apt-ftparchive for generiating correct index
+ # files

Added: people/michael/experimental/patches/bugfix-504801
===================================================================
--- people/michael/experimental/patches/bugfix-504801	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-504801	2009-02-13 18:18:07 UTC (rev 5258)
@@ -0,0 +1,20 @@
+2009-02-13  Michael Tautschnig  <mt at debian.org>
+
+	* bin/fai-setup: Do not unconditionally add $FAI_CONFIGDIR to exports(5)
+		(thanks Sebastian Harl) (closes: #504801)
+Index: trunk/bin/fai-setup
+===================================================================
+--- trunk.orig/bin/fai-setup
++++ trunk/bin/fai-setup	
+@@ -178,7 +178,10 @@
+ 
+     addr=$(LC_ALL=C ifconfig $SERVERINTERFACE | grep -v 127.0.0.1 | perl -ne '/addr:([\d.]+)/ && print"$1\n"'|head -1)
+     mask=$(LC_ALL=C ifconfig $SERVERINTERFACE | grep -v 127.0.0.1 | perl -ne '/Mask:([\d.]+)/ && print"$1\n"'|head -1)
+-    add_export_line $FAI_CONFIGDIR  "$addr/$mask(async,ro,no_subtree_check)"
++
++    if expr match "$FAI_CONFIG_SRC" 'nfs:\/\/' > /dev/null; then
++        add_export_line $FAI_CONFIGDIR  "$addr/$mask(async,ro,no_subtree_check)"
++    fi
+     add_export_line $NFSROOT  "$addr/$mask(async,ro,no_subtree_check,no_root_squash)"
+     if [ -z "$nfsserver" ]; then
+ 	echo "Could not find the type of your nfs server. Maybe"

Added: people/michael/experimental/patches/bugfix-506459
===================================================================
--- people/michael/experimental/patches/bugfix-506459	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-506459	2009-02-13 18:18:07 UTC (rev 5258)
@@ -0,0 +1,16 @@
+2009-02-13  Michael Tautschnig  <mt at debian.org>
+
+	* conf/NFSROOT: Added git-core (thanks Sebastian Harl) (closes: #506459)
+Index: trunk/conf/NFSROOT
+===================================================================
+--- trunk.orig/conf/NFSROOT
++++ trunk/conf/NFSROOT	
+@@ -7,7 +7,7 @@
+ dnsutils ntpdate dosfstools cvs jove xfsprogs xfsdump
+ procinfo dialog discover mdetect
+ console-tools console-common
+-expect iproute udev subversion liblinux-lvm-perl
++expect iproute udev subversion liblinux-lvm-perl git-core
+ 
+ # needed for the simple examples
+ cfengine2 libapt-pkg-perl

Added: people/michael/experimental/patches/bugfix-513090
===================================================================
--- people/michael/experimental/patches/bugfix-513090	                        (rev 0)
+++ people/michael/experimental/patches/bugfix-513090	2009-02-13 18:18:07 UTC (rev 5258)
@@ -0,0 +1,34 @@
+2009-02-13  Michael Tautschnig  <mt at debian.org>
+
+	* bin/faimond: Try to load Proc::Daemon only in case -d is given; if it fails,
+		print a helpful error message (closes: #513090)
+Index: trunk/bin/faimond
+===================================================================
+--- trunk.orig/bin/faimond
++++ trunk/bin/faimond	
+@@ -15,7 +15,6 @@
+ use strict;
+ use Socket;
+ use Getopt::Std;
+-use Proc::Daemon;
+ 
+ $| = 1;
+ my ($port, $timeout, $daemon, $timestamp);
+@@ -78,7 +77,7 @@
+       }
+       close(PIDFILE);
+     }
+-    Proc::Daemon::Init;
++    eval "Proc::Daemon::Init";
+     umask 022;
+ 
+     open(PIDFILE, '>', "$pidfile") or die "open $pidfile: $!";
+@@ -177,6 +176,8 @@
+ }
+ 
+ if (defined($opt_d)) {
++  (eval "require Proc::Daemon") or
++    die "Daemon mode not available, Proc::Daemon not found. Please install libproc-daemon-perl\n";
+   # If in daemon mode, use standard daemon log file
+   $logfile = $daemonlogfile;
+ }

Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2009-02-10 10:30:07 UTC (rev 5257)
+++ people/michael/experimental/patches/series	2009-02-13 18:18:07 UTC (rev 5258)
@@ -18,3 +18,10 @@
 setup-storage_crypto-for-all-mountspecs
 setup-storage_partition-too-large-for-disk-error
 setup-storage_command-dep-debugging
+bugfix-439250
+bugfix-504801
+bugfix-441436
+bugfix-506459
+bugfix-513090
+bugfix-494431
+bugfix-456978

Modified: people/michael/experimental/patches/setup-storage_crypto-bugfixes
===================================================================
--- people/michael/experimental/patches/setup-storage_crypto-bugfixes	2009-02-10 10:30:07 UTC (rev 5257)
+++ people/michael/experimental/patches/setup-storage_crypto-bugfixes	2009-02-13 18:18:07 UTC (rev 5258)
@@ -3,6 +3,7 @@
 	* lib/setup-storage/Fstab.pm: Proper perl text replace syntax
 	* lib/setup-storage/Commands.pm: ditto and additional random initialization of
 		partition
+  * Thanks William Famy for repeated testing
 Index: trunk/lib/setup-storage/Commands.pm
 ===================================================================
 --- trunk.orig/lib/setup-storage/Commands.pm




More information about the Fai-commit mailing list