should extrbase & ftar use "--numeric-owner"?

andrew bezella abezella at archive.org
Wed Aug 20 02:25:14 CEST 2014


hello -

i recently ran into an issue while trying to deploy ubuntu 14.04 vms.
/var/log's group ownership has been changed to the syslog group. however, 
this group does not have a pre-defined gid.  the result is that in the 
dirinstall case /var/log comes out of fai w/its group owner set to the 
syslog gid of the host system (which may differ from that in the
tarball).

i'm using an older version of fai, but afaict from looking at 4.2.2 
this is the current behavior. fcopy appears to have hit a similar bump 
at some point, as it allows specifying uid/gid numerically.

the trivial patches below makes this change.  do any use cases come to
mind where this is not appropriate?  i'll go ahead and log a bug unless
there's feedback to the contrary...

thanks!

	andy

--- ./bin/ftar.orig     2014-08-19 17:17:11.536075508 -0700
+++ ./bin/ftar  2014-08-19 17:08:59.243310840 -0700
@@ -39,7 +39,7 @@
     local catname=$2
 
     echo "ftar: extracting $file to $target/$dir"
-    $catname $file | tar -C $target/$dir $vflag -xf -
+    $catname $file | tar -C $target/$dir $vflag --numeric-owner -xf -
     tardone=1
     # if option -1 is set, only one class will be used
     [ $single -eq 1 ] && exit 0

--- ./lib/subroutines.orig      2014-08-19 17:17:53.234448012 -0700
+++ ./lib/subroutines   2014-08-19 17:08:53.691528568 -0700
@@ -795,7 +795,7 @@
        if [ -f $basefile ]; then
            # extract the tar file which was the result of debootstrap
            echo "Extracting $basefile"
-           gzip -dc $basefile | tar -C $FAI_ROOT -xpf -
+           gzip -dc $basefile | tar -C $FAI_ROOT --numeric-owner -xpf -
        else
            echo "No base.tgz found. Calling debootstrap."
            [ -z "$FAI_DEBOOTSTRAP" ] && die "$FAI_DEBOOTSTRAP undefined. Aborting"

-- 
andrew bezella <abezella at archive.org>
Internet Archive




More information about the linux-fai mailing list