Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2016 14:47:21 +0200
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        Aristedes Maniatis <amaniatis@apache.org>, FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: ${INSTALL_DATA} problems
Message-ID:  <cef2af10-89ce-e443-8bde-a7eb73d7a5bf@FreeBSD.org>
In-Reply-To: <cb59dad8-c6a0-ffc1-4705-9e8a66ca2679@apache.org>
References:  <cb59dad8-c6a0-ffc1-4705-9e8a66ca2679@apache.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--ESqWNJmS6wBPhExHhNDcNu0oCFUSKElrp
Content-Type: multipart/mixed; boundary="rfJxbKPUlFOMoK04prg0v6cV8KinsHaBr";
 protected-headers="v1"
From: Mathieu Arnold <mat@FreeBSD.org>
To: Aristedes Maniatis <amaniatis@apache.org>,
 FreeBSD Mailing List <freebsd-ports@freebsd.org>
Message-ID: <cef2af10-89ce-e443-8bde-a7eb73d7a5bf@FreeBSD.org>
Subject: Re: ${INSTALL_DATA} problems
References: <cb59dad8-c6a0-ffc1-4705-9e8a66ca2679@apache.org>
In-Reply-To: <cb59dad8-c6a0-ffc1-4705-9e8a66ca2679@apache.org>

--rfJxbKPUlFOMoK04prg0v6cV8KinsHaBr
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Le 08/09/2016 =C3=A0 14:27, Aristedes Maniatis a =C3=A9crit :
> 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/st=
age/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/s=
tage/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



--rfJxbKPUlFOMoK04prg0v6cV8KinsHaBr--

--ESqWNJmS6wBPhExHhNDcNu0oCFUSKElrp
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJX0V3aXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz
QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85I5YAP/2DXbyxKuKP9sVv5Ek3hmUDC
8/4nqGKYqFwjELa6LujbdQtuCgUjbVOhrU6iXrB0Se841l02ngwm102DofTqCW16
hJh1XoW/W0lKEh/8R1eQUyaGETKRaAMvVcim51FTo1WxYGeCugr4d5pAd6Tog1Le
Q1DcWeo4/MRE76IWHtts8ICrZ/LkkVQIJeZcMdS45Gr3sbjGC76Yz/HE2XXtz5Au
/CYApmyhcfCiJYkX1bquzz0e3GoN0rc06ty/i+3xlAt+ok+cD9DxC1tGMGWW836C
QfJszqtaOpUU92UHDa48cL/NmYg/2ViHgkmYdMv2TFu37TBHOHVYNJD4i8Rar4zc
oKc9Dq3xU+2RDqCCgrJ/WnFURiWwehwQb6cpPmdJBnjDgjDRyyR4d2AHcmb8Uu/Y
DmJYe+C+Uwm0eVC9cHS0Gm121wF0DF+lvhUjscMmfibtxDgPhsn7xZGZC8ph+CeC
nSBKj2p9RwHnyGYhKBibJXTpBMmMsoOmiijBl5OjaZtUWQvROxAUGYG3tN2hEz2x
aMqYO/KjFRJzkfuNAq9jpZZAcURQ4lvjiBFGXnX+hfkXsxuvFDdVrBU/lG3WNpnB
5bpHN1wZCTTs/Wdf5T3AsZ/KFmpCgbxKumA6mkC/6CmpJT+ozbGeC23pYTQVU7VC
oji7VB+3LyLaAOLaeTBl
=IpQs
-----END PGP SIGNATURE-----

--ESqWNJmS6wBPhExHhNDcNu0oCFUSKElrp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cef2af10-89ce-e443-8bde-a7eb73d7a5bf>