Package: release.debian.org User: release.debian....@packages.debian.org Usertags: unblock Severity: normal
fai 5.3.5 fixes some minor bugs. Most are in the doc package, which includes some examples scripts. Two bugs (#484666 #853856) in fcopy were fixed and a wrong patch in fai-make-nfsroot. In mk-basefile a chmod was missing and install_packages we added a pattern to match <package name>:<architecture>. Changes in control and Makefile are needed because we now use lchown.pm in fcopy. It would be nice to unblock the new fai version. >From the changelog: [ Manuel Hachtkemper ] * LAST/50-misc: ignore dmsetup errors * 40-parse-profiles.sh, 41-warning.sh: return with 0 [ Edgar Fuß] * fcopy: move code, Closes: #484666 * fcopy: add code for handling symlinks correctly, Closes: #853856 [ Jan Luca Naumann ] * fai-make-nfsroot: fix wrong path, Closes: #854550 [ Ian Kelling ] * mk-basefile: make sure root directory has mode 755, Closes: #854654 [ Thomas Lange ] * install_packages: add handling of packagename:arch, Closes: #855799 * control: fcopy needs libfile-lchown-perl * Makefile: fix build error because of missing lchown.pm diff -Nru fai-5.3.4/bin/fai-make-nfsroot fai-5.3.5/bin/fai-make-nfsroot --- fai-5.3.4/bin/fai-make-nfsroot 2017-01-04 21:18:01.000000000 +0100 +++ fai-5.3.5/bin/fai-make-nfsroot 2017-02-26 18:31:06.000000000 +0100 @@ -502,7 +502,7 @@ if [ -n "$FAI_DEBMIRROR" ]; then test -d $NFSROOT/$MNTPOINT && umount $NFSROOT/$MNTPOINT || true - rmdir $MNTPOINT || true + rmdir $NFSROOT/$MNTPOINT || true fi # show directories still mounted on nfsroot mount | grep " on $NFSROOT " || true diff -Nru fai-5.3.4/bin/fcopy fai-5.3.5/bin/fcopy --- fai-5.3.4/bin/fcopy 2017-01-04 21:18:01.000000000 +0100 +++ fai-5.3.5/bin/fcopy 2017-03-02 13:29:23.000000000 +0100 @@ -36,6 +36,7 @@ use File::Basename; use File::Spec; use File::Temp qw/tempfile/; +use File::lchown qw/lchown lutimes/; use Getopt::Std; # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -308,15 +309,21 @@ $stime = (stat("$sourcefile/$class"))[9]; } else { # get mtime,uid,gid,mode from source file - ($stime,@defmodes) = (stat("$sourcefile/$class"))[9,4,5,2]; + if ($opt_H) { + ($stime,@defmodes) = (lstat("$sourcefile/$class"))[9,4,5,2]; + } else { + ($stime,@defmodes) = (stat("$sourcefile/$class"))[9,4,5,2]; + } } # get mtime,uid,gid,mode from destination file - my ($dtime,@ddefmodes) = (stat("$destfile"))[9,4,5,2]; + my ($dtime,@ddefmodes); + if ($opt_H) { + ($dtime,@ddefmodes) = (lstat("$destfile"))[9,4,5,2]; + } else { + ($dtime,@ddefmodes) = (stat("$destfile"))[9,4,5,2]; + } # compare time,uid,gid and mode of source file and target file - # if different: change the values - return if ($stime == $dtime && (($ddefmodes[0] == $defmodes[0]) && - ($ddefmodes[1] == $defmodes[1]) && ($ddefmodes[2] == $defmodes[2]))); if ($modeset) { # use -m values ($owner,$group,$mode) = @opt_modes; @@ -326,13 +333,26 @@ ($owner,$group,$mode) = @defmodes; } + # if different: change the values + # setting modes on a symlink is not portable, so ignore it + my $issymlink = $opt_H && -l $destfile; + return if ($stime == $dtime && (($ddefmodes[0] == $owner) && + ($ddefmodes[1] == $group) && ($issymlink || ($ddefmodes[2] == $mode)))); + ($uid,$gid) = name2num($owner,$group); warn "chown/chmod u:$uid g:$gid m:$mode $destfile\n" if $debug; return if $dryrun; # do not execute if -n or FCOPY_DRYRUN was given - chown ($uid,$gid, $destfile) || ewarn("chown $owner $group $destfile failed. $!"); - chmod ($mode, $destfile) || ewarn("chmod $mode $destfile failed. $!"); - unless ($preinst) { + if ($issymlink) { + lchown ($uid,$gid, $destfile) || ewarn("lchown $owner $group $destfile failed. $!"); + unless ($preinst) { + lutimes ($stime,$stime, $destfile) || ewarn("lutimes for $destfile failed. $!"); + } + } else { + chown ($uid,$gid, $destfile) || ewarn("chown $owner $group $destfile failed. $!"); + chmod ($mode, $destfile) || ewarn("chmod $mode $destfile failed. $!"); + unless ($preinst) { utime ($stime,$stime, $destfile) || ewarn("utime for $destfile failed. $!"); + } } } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru fai-5.3.4/bin/install_packages fai-5.3.5/bin/install_packages --- fai-5.3.4/bin/install_packages 2017-01-04 21:18:01.000000000 +0100 +++ fai-5.3.5/bin/install_packages 2017-02-26 17:36:10.000000000 +0100 @@ -5,7 +5,7 @@ # install_packages -- read package config and install packages via apt-get # # This script is part of FAI (Fully Automatic Installation) -# (c) 2000-2016, Thomas Lange, la...@informatik.uni-koeln.de +# (c) 2000-2017, Thomas Lange, la...@informatik.uni-koeln.de # (c) 2003-2004, Henning Glawe, gla...@physik.fu-berlin.de # (c) 2004 , Jonas Hoffmann, jhoff...@physik.fu-berlin.de # PRELOAD feature from Thomas Gebhardt <gebha...@hrz.uni-marburg.de> @@ -542,6 +542,11 @@ insert_pkg($n, $pack, 1, "$n using $pack found") && next; } + # remove :arch from package name + if ( $pack =~ s/:\S+//) { + insert($n, $pack, 1, "$n using $pack found") && next; + } + # else package is unknown push @unknown, $n; } diff -Nru fai-5.3.4/debian/changelog fai-5.3.5/debian/changelog --- fai-5.3.4/debian/changelog 2017-01-24 13:54:01.000000000 +0100 +++ fai-5.3.5/debian/changelog 2017-03-22 20:17:17.000000000 +0100 @@ -1,3 +1,26 @@ +fai (5.3.5) unstable; urgency=low + + [ Manuel Hachtkemper ] + * LAST/50-misc: ignore dmsetup errors + * 40-parse-profiles.sh, 41-warning.sh: return with 0 + + [ Edgar Fuß] + * fcopy: move code, Closes: #484666 + * fcopy: add code for handling symlinks correctly, Closes: #853856 + + [ Jan Luca Naumann ] + * fai-make-nfsroot: fix wrong path, Closes: #854550 + + [ Ian Kelling ] + * mk-basefile: make sure root directory has mode 755, Closes: #854654 + + [ Thomas Lange ] + * install_packages: add handling of packagename:arch, Closes: #855799 + * control: fcopy needs libfile-lchown-perl + * Makefile: fix build error because of missing lchown.pm + + -- Thomas Lange <la...@debian.org> Wed, 22 Mar 2017 20:17:17 +0100 + fai (5.3.4) unstable; urgency=low * 30-interface: use new nic names also for the fixed IP setup, use CIDR diff -Nru fai-5.3.4/debian/control fai-5.3.5/debian/control --- fai-5.3.4/debian/control 2017-01-24 13:21:23.000000000 +0100 +++ fai-5.3.5/debian/control 2017-03-02 13:47:02.000000000 +0100 @@ -12,7 +12,7 @@ Package: fai-client Architecture: all -Depends: perl, file, libapt-pkg-perl, iproute2 | iproute, debconf-utils, ${misc:Depends} +Depends: perl, file, libapt-pkg-perl, libfile-lchown-perl, iproute2 | iproute, debconf-utils, ${misc:Depends} Recommends: libgraph-perl Suggests: logtail Breaks: fai-nfsroot (<< 5.2) diff -Nru fai-5.3.4/examples/simple/basefiles/mk-basefile fai-5.3.5/examples/simple/basefiles/mk-basefile --- fai-5.3.4/examples/simple/basefiles/mk-basefile 2017-01-04 21:18:01.000000000 +0100 +++ fai-5.3.5/examples/simple/basefiles/mk-basefile 2017-02-26 18:59:27.000000000 +0100 @@ -2,7 +2,7 @@ # mk-basefile, create basefiles for some distributions # -# Thomas Lange, Uni Koeln, 2011-2016 +# Thomas Lange, Uni Koeln, 2011-2017 # based on the Makefile implementation of Michael Goetze # Supported distributions (each i386/amd64): @@ -245,6 +245,7 @@ echo "mktemp failed. Aborting." exit 2 fi +chmod 755 $xtmp target=$1 # also the name of the output file diff -Nru fai-5.3.4/examples/simple/class/40-parse-profiles.sh fai-5.3.5/examples/simple/class/40-parse-profiles.sh --- fai-5.3.4/examples/simple/class/40-parse-profiles.sh 2017-01-04 21:18:01.000000000 +0100 +++ fai-5.3.5/examples/simple/class/40-parse-profiles.sh 2017-02-26 17:29:51.000000000 +0100 @@ -9,7 +9,7 @@ if [ X$FAI_ACTION = Xinstall -o X$FAI_ACTION = Xdirinstall -o X$FAI_ACTION = X ]; then : else - return + return 0 fi [ "$flag_menu" ] || return 0 diff -Nru fai-5.3.4/examples/simple/class/41-warning.sh fai-5.3.5/examples/simple/class/41-warning.sh --- fai-5.3.4/examples/simple/class/41-warning.sh 2017-01-04 21:18:01.000000000 +0100 +++ fai-5.3.5/examples/simple/class/41-warning.sh 2017-02-26 17:29:55.000000000 +0100 @@ -3,10 +3,10 @@ if [ X$FAI_ACTION = Xinstall -o X$FAI_ACTION = X ]; then : else - return + return 0 fi if [ X$action = Xdirinstall ]; then - return + return 0 fi grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0 diff -Nru fai-5.3.4/examples/simple/scripts/LAST/50-misc fai-5.3.5/examples/simple/scripts/LAST/50-misc --- fai-5.3.4/examples/simple/scripts/LAST/50-misc 2017-01-24 13:21:23.000000000 +0100 +++ fai-5.3.5/examples/simple/scripts/LAST/50-misc 2017-02-26 17:32:42.000000000 +0100 @@ -15,7 +15,7 @@ fi fi - usedm=$(dmsetup ls | egrep -v '^live-rw|^live-base|^No devices found' | wc -l) + usedm=$(dmsetup ls 2>/dev/null | egrep -v '^live-rw|^live-base|^No devices found' | wc -l) if [ $usedm -ne 0 ]; then if [ ! -d $target/etc/lvm ]; then echo ERROR: Found lvm devices, but the lvm2 package was not installed diff -Nru fai-5.3.4/Makefile fai-5.3.5/Makefile --- fai-5.3.4/Makefile 2017-01-04 21:18:01.000000000 +0100 +++ fai-5.3.5/Makefile 2017-03-17 13:40:51.000000000 +0100 @@ -53,8 +53,8 @@ perlcheck: @echo "Checking for perl syntax errors:"; \ - mkdir -p perl-dummy/Linux perl-dummy/Tk ; \ - for f in Linux/LVM.pm Tk.pm Tk/HList.pm Tk/ItemStyle.pm; do \ + mkdir -p perl-dummy/Linux perl-dummy/File perl-dummy/Tk ; \ + for f in File/lchown.pm Linux/LVM.pm Tk.pm Tk/HList.pm Tk/ItemStyle.pm; do \ echo '1;' > perl-dummy/$$f ; \ done; \ for SCRIPT in $(PERL_SCRIPTS); do \ -- regards Thomas