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

Paul Barker paul at paulbarker.me.uk
Mon Apr 21 19:52:45 UTC 2014


On 21 April 2014 15:36, Paul Barker <paul at paulbarker.me.uk> wrote:
> On 21 April 2014 11:35, Andreas Müller <schnitzeltony at googlemail.com> wrote:
>> 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.
>
> Equally, non-OpenEmbedded users of opkg might want to use the
> uids/gids in packages without modification. I think the solution for
> opkg is to make things more configurable. I'll open an enhancement
> issue to that effect on the opkg bug tracker. Unsure how soon it will
> get solved as I'm very busy at the minute but I can at least write it
> down so it doesn't get forgotten.
>

http://code.google.com/p/opkg/issues/detail?id=129 has been opened to
track this for opkg.

-- 
Paul Barker

Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk



More information about the Openembedded-core mailing list