${INSTALL_DATA} problems

Mathieu Arnold mat at FreeBSD.org
Thu Sep 8 12:47:26 UTC 2016


Le 08/09/2016 à 14:27, Aristedes Maniatis a écrit :
> I'm trying to create a port with a command like this:
>
> do-install:
>         ${MKDIR} ${STAGEDIR}${SOLR_HOME}
>         ${INSTALL_DATA} ${WRKSRC}/dist ${STAGEDIR}${SOLR_HOME}
>
> However the output is
>
> /bin/mkdir -p /var/poudriere/ports/default/textproc/apache-solr/work/stage/usr/local/solr
> install  -m 0644 /var/poudriere/ports/default/textproc/apache-solr/work/solr-5.5.2/dist /var/poudriere/ports/default/textproc/apache-solr/work/stage/usr/local/solr
> install: /var/poudriere/ports/default/textproc/apache-solr/work/solr-5.5.2/dist: Inappropriate file type or format
> *** Error code 71
>
> {CP} works fine, but I want to use {INSTALL_DATA} so I can also add the -o flag.
>
>
> What am I doing wrong?


Like Matthew said, INSTALL_DATA is for installing one file, not a
directory hierarchy, this is done using COPYTREE_SHARE. As a side not,
we never use CP -R to install files.

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

--
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/20160908/ee46d9e7/attachment.sig>


More information about the freebsd-ports mailing list