[OE-core] [bitbake-devel] hashequiv, pseudo, and GIDs
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Wed Dec 11 16:25:42 UTC 2019
> -----Original Message-----
> From: bitbake-devel-bounces at lists.openembedded.org <bitbake-devel-
> bounces at lists.openembedded.org> On Behalf Of chris.laplante--- via
> bitbake-devel
> Sent: den 11 december 2019 16:17
> To: Joshua Watt <jpewhacker at gmail.com>
> Cc: bitbake-devel at lists.openembedded.org; Openembedded-
> core at lists.openembedded.org
> Subject: Re: [bitbake-devel] hashequiv, pseudo, and GIDs
>
> > > So why is the group name used in the hash, as opposed to the GID?
> > > (I also have the same question regarding user name vs UID). If
> > > the GID was used we wouldn't have this issue.
> >
> > That was done in response to this mailing list thread:
> > http://lists.openembedded.org/pipermail/openembedded-core/2019-January/277755.html
> >
> > Basically, the GID and UID aren't stable values across builds so the
> > suggestion was to use the names. My understanding was that this
> > corresponded to how the user and groups are dealt with in general.
>
> That doesn't make sense (intuitively) to me. If I have a file with owner
> GID 1000, and copy it to some system, then the group name is defined by
> whatever groups happen to exist on the system. If I copy it to a different
> system, the owner group name might be different, depending on /etc/group.
> In both cases, it is the GID of 1000 that is stable.
That depends on how you copy the files. E.g., if you use a `tar | ssh tar`
pipeline to copy the files between the systems, it will be the user/group
names that are used. If on the other hand you do it using an SD-card, then
it will be the UIDs/GIDs that are used.
> From a caching point of view, it seems incorrect to care about what the
> corresponding group name happened to be at the time when the cache was
> created.
On the contrary. For almost all practical use cases you care about what
user/group owns a file, not what UID/GID they happen to be. E.g., in the
recipe (or Makefile or whatever) you typically want to specify that a
file shall be owned by user foo, not UID 1234. Then, either you do not
care about the actual UIDs used, or if you do, you use statically assigned
UIDs/GIDs for all users/groups. This is typically necessary if you want
to be able to support upgrading your product, and it is very well
supported by the useradd-staticids.bbclass.
> Chris
//Peter
More information about the Openembedded-core
mailing list