The DragonFly version poudriere sets up most of the jail as "read-only" which makes it obvious when ports are trying to install files outside of $LOCALBASE. In this case, www/npm is trying to write to /root and it fails at the install phase: ===> Installing for npm-1.2.12 ===> npm-1.2.12 depends on package: node>=0.8.0 - found ===> Generating temporary packing list ===> Checking if www/npm already installed node cli.js install -g -f npm WARN using --force I sure hope you know what you are doing. npm ERR! addLocal Could not install . npm ERR! Error: EROFS, mkdir '/root/.npm' npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com> npm ERR! System DragonFly 3.3-DEVELOPMENT npm ERR! command "node" "/wrkdirs/www/npm/work/npm-1.2.12/cli.js" "install" "-g" "-f" npm ERR! cwd /wrkdirs/www/npm/work/npm-1.2.12 npm ERR! node -v v0.10.0 npm ERR! npm -v 1.2.12 npm ERR! path /root/.npm npm ERR! code EROFS npm ERR! errno 56 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /wrkdirs/www/npm/work/npm-1.2.12/npm-debug.log npm ERR! not ok code 0 *** Error code 56 Stop. make: stopped in /wrkdirs/www/npm/work/npm-1.2.12 Fix: I suspect the makefile needs patching to prevent mkdir at $HOME
Responsible Changed From-To: freebsd-ports-bugs->sunpoet Over to maintainer (via the GNATS Auto Assign Tool)
This patch fixes the problem for me: http://www.bayofrum.net/~crees/patches/npm-dont-touch-base.diff John, can you confirm? Chris
I can confirm to the extent that I no longer have this error. The package still doesn't build, but it's not because it's attempting to install in /root. Thanks
Author: sunpoet Date: Thu Apr 18 16:32:40 2013 New Revision: 316049 URL: http://svnweb.freebsd.org/changeset/ports/316049 Log: - Change cache directory from ~/.npm to WRKSRC/tmp to avoid access on ~root/ PR: ports/177091 Submitted by: John Marino <draco@marino.st> Obtained from: crees Feature safe: yes Modified: head/www/npm/Makefile Modified: head/www/npm/Makefile ============================================================================== --- head/www/npm/Makefile Thu Apr 18 16:13:41 2013 (r316048) +++ head/www/npm/Makefile Thu Apr 18 16:32:40 2013 (r316049) @@ -44,6 +44,9 @@ RUN_DEPENDS+= node-devel>=0.8.0:${PORTSD RUN_DEPENDS+= node>=0.8.0:${PORTSDIR}/www/node .endif +post-patch: + @${REINPLACE_CMD} -e 's|node cli.js|& --cache ${WRKSRC}/tmp|' ${WRKSRC}/Makefile + # maintainer section: # require: bash, git, gmake, node _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed, with minor changes. Thanks!
# npm install -g still uses /root/.npm and /root/tmp and clutters / quite fast. I have a 1GB root UFS, and other than that it just feels wrong to me: I'd suggest to have something like this by default: # npm set cache=/var/cache/npm # npm set tmp=/tmp/npm