pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PKG_DESTDIR_SUPPORT=destdir problem?



Hauke Fath <hf%spg.tu-darmstadt.de@localhost> writes:

> On 2019-09-03 14:29, Greg Troxel wrote:
>> Hauke Fath <hf%spg.tu-darmstadt.de@localhost> writes:
>>> [INN] installs a swath of files with custom ownership and
>>> permissions. After dumping all that into work/.destdir, it drops root
>>> privilege, and then surprisingly is not able to package some of the
>>> files.
>>>
>>> Is this something the package needs to fix, or has the destdir support
>>> bit-rotted?
>>
>> I wonder if you can get it to use nbinstall writing METALOG, so that it
>> can produce the package without root.  
>
> Sounds lovely. Do you have an example package that I could look at?

The basic concept is that NetBSD's install has an argument -M (see the
man page) and that instead of setting the uid/gid, writes metadat into
that file instead and then pax has an option to read that log and create
an archive with the modified uid/gid.  THe NetBSD build system does this
to allow unprivileged builds.

After reading a few minutes, I'm no longer sure this mechanism is used
in pkgsrc.  But there's something sort of like this happening.

Somehow, binary packages created with the normal destdir process (which
does not use root) end up with files labeled as being owned by root,
even  though the destdir files are owned by the user doing the build.

There is the variable SPECIAL_PERMISSIONS; it might be adequate to use
that and similar and remove the special stuff from the makefiles.


Home | Main Index | Thread Index | Old Index