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

Armin K. krejzi at email.com
Mon Mar 6 17:44:45 UTC 2017


On 06.03.2017 18:25, Andrew Gregory wrote:
> On 03/06/17 at 06:06pm, Armin K. wrote:
>> On 06.03.2017 17:48, Andrew Gregory wrote:
>>> On 03/06/17 at 05:40pm, Armin K. wrote:
> 
> ...
> 
>>>> I've contacted libarchive devs and they suggested --numeric-owner bsdtar
>>>> option. It works just as I expect it to.
>>>
>>> pacman already only uses the numeric id's during extraction.
>>>
>>
>> It might be libarchive bug/feature. I've found archive_write_disk_set_standard_lookup()
>> which will force resolving uid/gid's if used. The trick is, version 3.3.0 I compiled
>> packman against, calls such function almost uncoditionally in archive_read_extract().
>>
>> https://github.com/libarchive/libarchive/blob/master/libarchive/archive_read_extract.c#L49
> 
> Aha, how nice of them.  Things like this are why I don't recommend
> using --root to manage chroot's.  I suppose I need to get around to
> finishing alpm's user handling.
> 
> apg
> 

A potential solution would be to port pacman to archive_read_extract2(), which
archive_read_extract() currently wraps.

I'll wait and see what's the libarchive upstream thought on this.


More information about the pacman-dev mailing list