${INSTALL_DATA} problems

Mathieu Arnold mat at FreeBSD.org
Sat Sep 10 12:18:28 UTC 2016


Le 10/09/2016 à 05:32, Aristedes Maniatis a écrit :
> On 8/09/2016 10:47pm, Mathieu Arnold wrote:
>> Now, I'm seeing something else that is a bad idea, it is using the -o
>> flag.  Ports must build as a regular user.  A regular user will not be
>> able to change the owner of the files.  This must be done in the
>> pkg-plist file, using @owner/@group as described in the Porter's
>> Handbook:
>> https://www.freebsd.org/doc/en/books/porters-handbook/plist-keywords.html
>
> I've just tried this but ran into some difficulty. Specifically I have a plist which is many hundreds of lines long. There is no way this will be maintained into the future without mistake.

The plist can be generated automatically with "make makeplist" there is
no way it is hard to do, or maintain.

> I really only want one folder installed with the correct permissions, but do I need to move my chmod code into the rc.d startup script instead and tying it into the pkg install?

If it is an empty folder, or you just want the folder itself to have the
permissions, do:

@dir(%%owner%%,%%group%%,optional mode) the/dir

like described in the page I sent you to.

If you also need to files, add a:

@owner %%owner%%
@group %%group%%

block before the files of that directory, and add:

@owner
@group

after it.


-- 
Mathieu Arnold


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160910/1d1634f0/attachment.sig>


More information about the freebsd-ports mailing list