Created attachment 204719 [details] Patch I'm now making a port which uses www/npm's node-gyp module. When node-gyp is called by a root user (via poudriere) for the first time, it generates byte-compiled python files under the directory "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp". That leads to a filesystem violation error by poudriere like the following: =>> Checking for filesystem violations... done =>> Error: Filesystem touched during build: extra: usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.pyc extra: usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.pyc extra: usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.pyc extra: usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.pyc extra: usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.pyc extra: usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.pyc extra: usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.pyc The attached patch fixes this problem by installing byte-compiled files on package installation. --- Port changes: - Install byte-compiled files for node-gyp python module - Bump port revision QA: poudriere testport OK (releng/12.0 amd64)
@Hiroki Is the quarterly version of the port affected? Is the build-time dependency on python necessary if the compile takes place at post-install ?
(In reply to Kubilay Kocak from comment #1) > Is the quarterly version of the port affected? My comment was misleading. I'm "developing a port" not "building artifacts using a port". Sorry for the confusion. The port under development is here FYI: https://github.com/tagattie/FreeBSD-VSCode > Is the build-time dependency on python necessary if the compile takes place at post-install ? Thanks for pointing this out. Runtime dependency is sufficient. I will submit an updated version of the patch.
Created attachment 204735 [details] Updated patch
(In reply to Hiroki Tagato from comment #2) Apologies, I should have been clearer. Does the quarterly version of www/npm also create/build compiled python files at first run (by any user), files which are not packaged in the ports pkg-plist? If so, this bugfix should be merged to the quarterly branch
(In reply to Kubilay Kocak from comment #4) Thanks for the clarification. Now I understand. I tried with the 2019Q2 branch of the ports tree and got exactly the same filesystem violation error. So the quarterly version of www/npm port also create .pyc files at first run (and should be fixed).
A commit references this bug: Author: sunpoet Date: Sun Jun 9 16:53:09 UTC 2019 New revision: 503843 URL: https://svnweb.freebsd.org/changeset/ports/503843 Log: Compile and install .pyc files for node-gyp - Bump PORTREVISION for package change PR: 238243 Submitted by: Hiroki Tagato <tagattie@yandex.com> Changes: head/www/npm/Makefile head/www/npm/pkg-plist
Committed. Thanks!
A commit references this bug: Author: koobs Date: Mon Jul 1 07:02:27 UTC 2019 New revision: 505545 URL: https://svnweb.freebsd.org/changeset/ports/505545 Log: MFH: r502940 r503843 www/npm: Fix the python executable name PR: 238204 Reported by: run failure Approved by: portmgr (blanket: ports/framework (python) compliance) Compile and install .pyc files for node-gyp - Bump PORTREVISION for package change PR: 238243 Submitted by: Hiroki Tagato <tagattie@yandex.com> Approved by: ports-secteam (blanket(s): run/packaging fix, ports (python) compliance) Changes: _U branches/2019Q2/ branches/2019Q2/www/npm/Makefile branches/2019Q2/www/npm/files/patch-lib_node__modules_npm_node__modules_node-gyp_lib_configure.js branches/2019Q2/www/npm/pkg-plist
Merged to 2019Q2 (quarterly), where the port was also affected by this issue