[OE-core] issue with file-ownership in images

Andreas Müller schnitzeltony at googlemail.com
Mon Apr 21 10:35:20 UTC 2014


On Thu, Apr 17, 2014 at 7:08 PM, Andreas Müller
<schnitzeltony at googlemail.com> wrote:
> On Thu, Apr 17, 2014 at 1:53 PM, Andreas Müller
> <schnitzeltony at googlemail.com> wrote:
> OK I did a test with current git master.
>
> Good news:
>
> the sequence of running preinst-script and unpacking is correct now:
>
> | NOTE: Performing useradd with [--root
> /home/a.mueller/tmp/oe-core-eglibc/work/overo-angstrom-linux-gnueabi/xfce4-tiny-image/1.0-r0/rootfs
> --system --no-create-home --user-group --home-dir /etc/polkit-1
> polkitd] and 10 times of retry
> ...
> ...
> | Installing polkit (0.112-r0) on root.
> | Downloading file:/home/a.mueller/tmp/oe-core-eglibc/deploy/ipk/armv7at2hf-vfp-neon/polkit_0.112-r0_armv7at2hf-vfp-neon.ipk.
> ...
>
> Bad news:
>
> gid/uid are still identical to those with opkg 2.01 (based on same ipks created)
>
> I think what happens is that opkg simply uses the ids which were found
> during installation.
>
> So now with the sequence looking solved, I understand better what you suggested:
>> It would certainly be possible to add options to the
>> next version of opkg to lookup uids & gids from a given passwd & group
>> file (which could be those from the sysroot). Is that something that
>> would be useful in the future?
> Yes this would solve this issue (nit: replace 'sysroot' by rootfs or image).
I think it would be better to translate user/group names to IDs
generally and error out if that fails. As seen with polkit: using IDs
used during install/packing as fallback causes strange effects - or in
other words: If environment where a package is installed has not
prepared the required users/groups, something is wrong and the package
will not work as expected.

Andreas



More information about the Openembedded-core mailing list