On Sun, 25 Feb 2018, Marcin Cieslak wrote: > Hello, > > why is poudriere on 11.1-STABLE trying to build by custom port which has the > following > in the Makefile: > > post-fetch: > ${MKDIR} ${DISTDIR}/${PORTNAME} > ${MKDIR} ${NPM_CACHE} > ${CP} ${FILESDIR}/package-lock.json ${DISTDIR}/${PORTNAME} > ${CP} ${FILESDIR}/package.json ${DISTDIR}/${PORTNAME} > (cd ${DISTDIR}/${PORTNAME} && ${SETENV} NPM_CONFIG_CACHE=${NPM_CACHE} > npm install --ignore-scripts) > > ( complete port: > https://github.com/saper/ports-exp/tree/master/textproc/node-sass ) > > The results are those: > > ===> Returning to build of node-sass-4.7.2 > =========================================================================== > =======================<phase: fetch >============================ > ===> 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 > /bin/cp /usr/ports/textproc/node-sass/files/package-lock.json > /portdistfiles/node-sass > (cd /portdistfiles/node-sass && /usr/bin/env > NPM_CONFIG_CACHE=/portdistfiles/npm npm install --ignore-scripts) > npm WARN saveError ENOENT: no such file or directory, open > '/portdistfiles/node-sass/package.json' > npm WARN enoent ENOENT: no such file or directory, open > '/portdistfiles/node-sass/package.json' > npm WARN node-sass No description > npm WARN node-sass No repository field. > npm WARN node-sass No README data > npm WARN node-sass No license field. > > added 4 packages in 1.185s > =========================================================================== > =======================<phase: checksum >============================ > ===> 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 > /bin/cp /usr/ports/textproc/node-sass/files/package-lock.json > /portdistfiles/node-sass > (cd /portdistfiles/node-sass && /usr/bin/env > NPM_CONFIG_CACHE=/portdistfiles/npm npm install --ignore-scripts) > npm WARN saveError ENOENT: no such file or directory, open > '/portdistfiles/node-sass/package.json' > npm WARN enoent ENOENT: no such file or directory, open > '/portdistfiles/node-sass/package.json' > npm WARN node-sass No description > npm WARN node-sass No repository field. > npm WARN node-sass No README data > npm WARN node-sass No license field. > > up to date in 0.514s > => SHA256 Checksum OK for sass-node-sass-v4.7.2_GH0.tar.gz. > =========================================================================== > =======================<phase: extract-depends>============================ > =========================================================================== > =======================<phase: extract >============================ > ===> 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 > /bin/cp /usr/ports/textproc/node-sass/files/package-lock.json > /portdistfiles/node-sass > cp: /portdistfiles/node-sass/package-lock.json: Permission denied > *** Error code 1 > > Stop. > make: stopped in /usr/ports/textproc/node-sass >
For the archives: I have solved it (and some other related problem that occured later) by copying even more files to $WRKDIR like crazy: DIST_NPM_CACHE= ${DISTDIR}/npm BUILD_NPM_CACHE= ${WRKDIR}/npm .include <bsd.port.pre.mk> .if ${COMPILER_TYPE} == clang MAKE_ENV+= GYP_DEFINES=clang=1 .endif fetch-specials: ${MKDIR} ${DISTDIR}/${PORTNAME} ${MKDIR} ${DIST_NPM_CACHE} if [ ! -f ${DISTDIR}/${PORTNAME}/package-lock.json ]; then ${CP} ${FILESDIR}/package-lock.json ${DISTDIR}/${PORTNAME}; \ ${CP} ${FILESDIR}/package.json ${DISTDIR}/${PORTNAME}; \ (cd ${DISTDIR}/${PORTNAME} && ${SETENV} NPM_CONFIG_CACHE=${DIST_NPM_CACHE} npm install --ignore-scripts) \ fi post-extract: (cd ${DISTDIR}/${PORTNAME} && find node_modules | ${PAX} -rw ${WRKSRC}) ${MKDIR} ${BUILD_NPM_CACHE} (cd ${DIST_NPM_CACHE} && find . | ${PAX} -rw ${BUILD_NPM_CACHE}) do-build: (cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} NPM_CONFIG_CACHE=${BUILD_NPM_CACHE} npm install --nodedir=${LOCALBASE}) Those things I simpler with yarn. Maybe we could consider using yarn as a basis for some way to bring binary node packages into ports tree. Marcin
smime.p7s
Description: S/MIME Cryptographic Signature