From owner-freebsd-ports@freebsd.org Sun Feb 25 13:37:58 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39FA5F2F09F for ; Sun, 25 Feb 2018 13:37:58 +0000 (UTC) (envelope-from saper@saper.info) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C84D57D7AF for ; Sun, 25 Feb 2018 13:37:57 +0000 (UTC) (envelope-from saper@saper.info) Received: by mailman.ysv.freebsd.org (Postfix) id 89660F2F09E; Sun, 25 Feb 2018 13:37:57 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CAC7F2F09D for ; Sun, 25 Feb 2018 13:37:57 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "saper.info", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDC2A7D7AE for ; Sun, 25 Feb 2018 13:37:56 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (saper@m.saper.info [IPv6:2a01:4f8:a0:7383::]) by m.saper.info (8.15.2/8.15.2) with ESMTPS id w1PDbo33066758 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Feb 2018 13:37:50 GMT (envelope-from saper@saper.info) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=saper.info; s=Sep2014; t=1519565870; bh=dVG/VMKvMxOOG06DtUiS8Ife7urIuhWzzpkruOOFVew=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=fRkVgCz5gG20vCFaEF+k/HME2vA0z2SS/U5BlLCvNr5vM3qMGrJI9M81S6ba6FgR4 T6BApnJNUe81m4RVkrNitEWZuSBVPCEZKlHBnk1T/0EycB+FYrBQUrsfzd/CDS60VR Nd9jK04QNJTF0IzKpNzGp6A+7Km/vefplIT7bDms= Received: from localhost (saper@localhost) by m.saper.info (8.15.2/8.15.2/Submit) with ESMTP id w1PDbosb066755; Sun, 25 Feb 2018 13:37:50 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Sun, 25 Feb 2018 13:37:49 +0000 From: Marcin Cieslak To: Adam Weinberger cc: ports@FreeBSD.org Subject: Re: poudriere: "Permission denied" in the extract phase? In-Reply-To: <371FB508-F90E-41E4-8B3D-85F7DA54FFAA@adamw.org> Message-ID: References: <371FB508-F90E-41E4-8B3D-85F7DA54FFAA@adamw.org> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="1563967779-541707789-1519565870=:2659" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2018 13:37:58 -0000 --1563967779-541707789-1519565870=:2659 Content-Type: text/plain; charset=US-ASCII On Sun, 25 Feb 2018, Adam Weinberger wrote: > > > (full log: > > > https://gist.github.com/saper/0be3f9b4e9eb819d3ec00f5273705517#file-node-sass-4-7-2-log > > > ) > > > > > > Why are /bin/mkdir -p and /bin/cp commands invoked again in the "extract" > > > phase? > > > > > > FreeBSD 11.1-STABLE #10 r321629 running poudriere-3.2.4 (I have updated > > > poudriere today) > > First of all, just so you know, npm module ports won't be added to the ports > tree. I just wanted to be clear in case you were planning on submitting it. > There were a couple threads about this a while back. > > With that out of the way, you're hitting errors for two reasons here. Yes, this is my private port that I am using to produce FreeBSD binaries for node-sass. Getting binary npm modules into our ports tree is another conversation. The problem here is that a whole thing worked for me before for months so I am aware of all those limitations for particular build phases (it took me long to figure out that). > The first problem is that npm needs network access, and poudriere prevents > ports from dialing out. You can work around this with the > ALLOW_NETWORKING_PACKAGES variable in poudriere.conf. > > The other problem you're hitting is that npm saves a cache, and for some > reason you're trying to run it from /usr/ports/distfiles/node-sass. Ports > themselves should never, ever have the ability to create files in > /usr/ports/distfiles. If you run 'npm install' from ${WRKSRC}, then you can > do: > cd ${WRKSRC} && ${SETENV} HOME=/tmp npm install Aren't ports allowed to write in /usr/ports/distfiles during the fetch phase? That would be new to me... This whole thing was working for me before (with older poudriere/bsd.port.mk maybe). I try to force npm to fetch everything (including dependent modules) in the fetch phase: 42 post-fetch: 43 ${MKDIR} ${DISTDIR}/${PORTNAME} 44 ${MKDIR} ${NPM_CACHE} 45 ${CP} ${FILESDIR}/package-lock.json ${DISTDIR}/${PORTNAME} 46 ${CP} ${FILESDIR}/package.json ${DISTDIR}/${PORTNAME} 47 (cd ${DISTDIR}/${PORTNAME} && ${SETENV} NPM_CONFIG_CACHE=${NPM_CACHE} npm install --ignore-scripts) I copy everything I need from distfiles to ${WRKSRC} in the extract phase: 49 post-extract: 50 (cd ${DISTDIR}/${PORTNAME} && ${FIND} node_modules | ${PAX} -rw ${WRKSRC}) 51 I build everything without touching the network: 52 do-build: 53 (cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} NPM_CONFIG_CACHE=${NPM_CACHE} npm instal l --nodedir=${LOCALBASE}) The problem in particular is that "post-fetch" target is invoked ALSO during the "extract" target, I don't know why: =================================================== ^^^^^^^^^^^^ ===> License MIT accepted by the user ===> Fetching all distfiles required by node-sass-4.7.2 for building ^^^^^^^^^^^^ /bin/mkdir -p /portdistfiles/node-sass /bin/mkdir -p /portdistfiles/npm It did that already in the fetch phase: =========================================================================== =================================================== ===> License MIT accepted by the user ===> Fetching all distfiles required by node-sass-4.7.2 for building /bin/mkdir -p /portdistfiles/node-sass /bin/mkdir -p /portdistfiles/npm and it tries that again in the checksum phase: =========================================================================== =================================================== ===> License MIT accepted by the user ===> Fetching all distfiles required by node-sass-4.7.2 for building /bin/mkdir -p /portdistfiles/node-sass /bin/mkdir -p /portdistfiles/npm Maybe there is an additional check for a successful fetch that I have missed. Marcin --1563967779-541707789-1519565870=:2659 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: BASE64 Content-Description: S/MIME Cryptographic Signature Content-Disposition: attachment; filename=smime.p7s MIIOSwYJKoZIhvcNAQcCoIIOPDCCDjgCAQExDzANBglghkgBZQMEAgEFADAL BgkqhkiG9w0BBwGgggqQMIIElzCCA3+gAwIBAgIOSBtqCKJEiNNcmz3JSA0w DQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENB IC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2JhbFNp Z24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQG EwJCRTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xv YmFsU2lnbiBQZXJzb25hbFNpZ24gMSBDQSAtIFNIQTI1NiAtIEczMIIBIjAN BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyrCba00KOKyGuwh9h+/MAcZm ZUF9OxGKA56AADHaDE08rB0WEbgm6J4XvJP3OGQ7cgHdVJu6XMZkRd6EcfjD yRrIwE6oAVWJe57co3gKk/XxvuubSZuUahrcOiv3D2qaHwva4zumubxQQI4f unEzRIJHPiNjaq0cCcZsMcp5pxsEz8aG0sr8Oh80sxKNnzPmuUETLESktfMC pQKHUGmWXLsG6sgCZOezUjDjKpPKW7l4PUt0TEBEyqLhifv9/YPn5C4o10PP daDazZPeKNif2PVQ5u0HRnkFrHh4wmmrMtY22Mse3eR01gD6rEEGWf+gdzuy EQE+ZVlNhCP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