[pacman-dev] Non-existing user/group ownership and chroot

Armin K. krejzi at email.com
Mon Mar 6 09:12:44 UTC 2017


On 06.03.2017 00:17, Armin K. wrote:
> On 06.03.2017 00:10, Allan McRae wrote:
>> On 06/03/17 09:04, Armin K. wrote:
>>> On 06.03.2017 00:00, Allan McRae wrote:
>>> Entries are alright in .MTREE (correct gid's). I don't suppose pacman
>>> does something odd there? Why doesn't it use those uid's/gid's?
>>>
>>> If you could point me to the part in the pacman code which does the
>>> extraction, I might be able to find a solution (at least for myself).
>>>
>>
>> Extraction is just taking files out of the tarball.  Note that the
>> tarball store files with UID/GID numbers and not names.
>>
>> A
>>
> 
> Oh my. Something else is at play here. Manually extracted tarball
> contains wrong permissions, .MTREE file reports correct permissions.
> 
> pkg/ directory is sadly only owned by the build user. I suppose
> something between package() and the tarball creation (or just
> the tarball creation) screws things up. Any ideas what it might be?
> 
> libarchive version is 3.3.0.
> fakeroot is 1.20.1.

This is indeed libarchive/bsdtar problem. The permissions are just fine
when extracted in chroot, but not when extracted from outside of it.

Looks like behaviour changed, and that tarball stores uid/gid isn't
true (anymore). Directory owned by a certain user is owned by the
same user in and outside of chroot, besides two of them having different
uids/gids.


More information about the pacman-dev mailing list