[lxc-devel] Request for update Jenkins script for plamo images

TAMUKI Shoichi tamuki at linet.gr.jp
Sun Aug 31 08:17:50 UTC 2014


Hello Stephane,

From: Stephane Graber <stgraber at ubuntu.com>
Subject: Re: [lxc-devel] Request for update Jenkins script for plamo images
Date: Thu, 28 Aug 2014 09:57:09 -0400

> > Hmm, on Ubuntu environment, it seems that useradd creates both user
> > and group with the specified name.  So, you should do the following:
> > 
> >  ==> Executing: "for i in postfix pop wnn polkituser mysql ; do useradd $i ; done" in /
> >  ==> Executing: "for i in wheel postdrop telnetd cgred ; do groupadd $i ; done" in /
> 
> So instead of using that rather ugly workaround, wouldn't calling tar
> with --numeric-owner and --numeric-group solve that in a cleaner way?

Unfortunately, far from solving that, the result will be getting worse
when calling tar with --numeric-owner option.

As I wrote in my previous mail, the ordinary (w/o --numeric-owner) tar
behaviors about ownership are as follows:

  - When archiving, tar stores both user/group names and uid/gid.
  - When extracting, tar uses user/group names as priority.  If there
    are not same user/group names in the system, it uses uid/gid
    instead.

On the other hand, tar with --numeric-owner behaves as follows:

  - When archiving, tar stores only uid/gid.
  - When extracting, tar uses uid/gid regardless of presence/absence
    of the stored user/group names.

So, suppose installing rootfs does in the same way as tar with
--numeric-option, and calling tar with --numeric-owner when archiving
rootfs.tar.xz, the whole uid/gid are consistently unchanged.  However,
please just think about it.  The rootfs.tar.xz will be for a certain
distribution only.

I think that all pre-built rootfs images may work on any distributions
each other with right ownership for the system.  Therefore, we should
not calling tar with --numeric-owner option in the Jenkins script.

Regards,
TAMUKI Shoichi


More information about the lxc-devel mailing list