New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #31306 (closed enhancement: fixed)

Opened 20 months ago

Last modified 20 months ago

npm: don't build as root

Reported by: ryandesign@… Owned by: ciserlohn@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch Cc: ak.ml@…
Port: npm

Description

In r84119 npm was modified to build as root, because otherwise this happens:

--->  Building npm
make: Entering directory `/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30'
scripts/doc-build.sh doc/adduser.md man1/adduser.1
npm ERR! Error: EACCES, Permission denied '/Users/rschmidt/.npm'
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 9.4.0
npm ERR! command "node" "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30/cli.js" "install" "ronn"
npm ERR! cwd /opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.30
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30/npm-debug.log
npm not ok
make: *** [man1/adduser.1] Error 1

As we see npm is trying to write into my home directory. (Specifically, it is trying to install a couple node modules there that are used to build the manpages.)

Here is a patch to no longer build as root and no longer try to install the node modules to the user's home directory. (Instead, they're installed into the workpath.)

Attachments

npm.diff (351 bytes) - added by ryandesign@… 20 months ago.
proposed patch

Change History

Changed 20 months ago by ryandesign@…

proposed patch

comment:1 Changed 20 months ago by ak.ml@…

  • Cc ak.ml@… added

Cc Me!

comment:2 Changed 20 months ago by ryandesign@…

  • Status changed from new to closed
  • Resolution set to fixed

Committed in r84252 (maintainer timeout)

Note: See TracTickets for help on using tickets.