From owner-freebsd-ports@freebsd.org Thu Sep 8 12:47:26 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ABD1BD1147 for ; Thu, 8 Sep 2016 12:47:26 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from prod2.absolight.net (prod2.absolight.net [79.143.243.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "plouf.absolight.net", Issuer "CAcert Class 3 Root" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DD989A2 for ; Thu, 8 Sep 2016 12:47:25 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from prod2.absolight.net (localhost [127.0.0.1]) by prod2.absolight.net (Postfix) with ESMTP id 8E474BDCAD; Thu, 8 Sep 2016 14:47:23 +0200 (CEST) Received: from ogg.in.absolight.net (ogg.in.absolight.net [79.143.241.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by prod2.absolight.net (Postfix) with ESMTPSA id 63856BDCAC; Thu, 8 Sep 2016 14:47:23 +0200 (CEST) Subject: Re: ${INSTALL_DATA} problems To: Aristedes Maniatis , FreeBSD Mailing List References: From: Mathieu Arnold Organization: Absolight / The FreeBSD Foundation Message-ID: Date: Thu, 8 Sep 2016 14:47:21 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ESqWNJmS6wBPhExHhNDcNu0oCFUSKElrp" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 12:47:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ESqWNJmS6wBPhExHhNDcNu0oCFUSKElrp Content-Type: multipart/mixed; boundary="rfJxbKPUlFOMoK04prg0v6cV8KinsHaBr"; protected-headers="v1" From: Mathieu Arnold To: Aristedes Maniatis , FreeBSD Mailing List Message-ID: Subject: Re: ${INSTALL_DATA} problems References: In-Reply-To: --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--