Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 589900 - app-editors/atom - apm: sh: /usr/lib64/atom/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp: Permissão negada
Summary: app-editors/atom - apm: sh: /usr/lib64/atom/app/apm/node_modules/npm/bin/node...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Elvis Pranskevichus
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-28 09:19 UTC by Antonio Augusto Santos
Modified: 2016-09-20 13:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Augusto Santos 2016-07-28 09:19:45 UTC
After installing app-editors/atom and trying to install the hydrogen package (https://atom.io/packages/hydrogen):

```
PYTHON=python2.7 apm install hydrogen
```

 I get the following error (sniped for brevity):

```
Installing hydrogen to /home/mancha/.atom/packages REQUEST { url: 'https://atom.io/api/packages/hydrogen',
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/lib64/electron/node',
gyp verb cli   '/usr/lib64/atom/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'install',
gyp verb cli   '--target=0.36.8',
gyp verb cli   '--dist-url=https://atom.io/download/atom-shell',
gyp verb cli   '--arch=x64',
gyp verb cli   '--ensure',
gyp verb cli   '--verbose' ]
gyp info using node-gyp@2.0.2
gyp info using node@5.1.1 | linux | x64
gyp verb command install []
gyp verb install input version string "0.36.8"
gyp verb install installing version: 0.36.8
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
0.36.8
gyp info ok 

> zmq@2.15.3 install /tmp/apm-install-dir-116628-26924-1d1xtbq/node_modules/Hydrogen/node_modules/jmp/node_modules/zmq
> node-gyp rebuild

sh: /usr/lib64/atom/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp: Permissão negada
npm ERR! Linux 4.4.0-pf8
npm ERR! argv "/usr/lib64/electron/node" "/usr/lib64/atom/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/mancha/.atom/.apm/.apmrc" "--userconfig" "/home/mancha/.atom/.apmrc" "install" "/tmp/d-116628-26924-1kes9ch/package.tgz" "--target=0.36.8" "--arch=x64"
npm ERR! node v5.1.1
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE

npm ERR! zmq@2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the zmq@2.15.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-116628-26924-1d1xtbq/npm-debug.log
✗
```

The line that matters is saying that /usr/lib64/atom/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp is not executable (permission denied). After I give it executable permission (chmod +x) I get another error:

```
Installing hydrogen to /home/mancha/.atom/packages REQUEST { url: 'https://atom.io/api/packages/hydrogen',
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/lib64/electron/node',
gyp verb cli   '/usr/lib64/atom/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'install',
gyp verb cli   '--target=0.36.8',
gyp verb cli   '--dist-url=https://atom.io/download/atom-shell',
gyp verb cli   '--arch=x64',
gyp verb cli   '--ensure',
gyp verb cli   '--verbose' ]
gyp info using node-gyp@2.0.2
gyp info using node@5.1.1 | linux | x64
gyp verb command install []
gyp verb install input version string "0.36.8"
gyp verb install installing version: 0.36.8
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp info 0.36.8
ok 

> zmq@2.15.3 install /tmp/apm-install-dir-116628-26998-1r9ydsg/node_modules/Hydrogen/node_modules/jmp/node_modules/zmq
> node-gyp rebuild

/usr/lib64/atom/app/apm/node_modules/npm/bin/node-gyp-bin/node-gyp: line 3: node: comando não encontrado
npm ERR! Linux 4.4.0-pf8
npm ERR! argv "/usr/lib64/electron/node" "/usr/lib64/atom/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/mancha/.atom/.apm/.apmrc" "--userconfig" "/home/mancha/.atom/.apmrc" "install" "/tmp/d-116628-26998-t8mkcb/package.tgz" "--target=0.36.8" "--arch=x64"
npm ERR! node v5.1.1
npm ERR! npm  v2.13.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! zmq@2.15.3 install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the zmq@2.15.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-116628-26998-1r9ydsg/npm-debug.log
```

Complaining that it can't find ```node```. node (from node.js) is installed as a parte of atom, and is available at ```/usr/lib64/electron```.

After adding it to my path (export PATH=/usr/lib64/electron:$PATH) the installation finishes with success.


The first error (file permissions) is obviously an error. For the second one I'm not sure on how to proceed, since this version of node is (but should be?) internal to electron.
Maybe make an patch that put it in the path when atom/apm is called? Or make electron depend externally on nodejs?
Comment 1 Antonio Augusto Santos 2016-07-28 09:22:11 UTC
Forgot to add package versions:
dev-util/electron-0.36.12-r3 
app-editors/atom-1.8.0


$ emerge --info
Portage 2.2.28 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.22-r4, 4.4.0-pf8 x86_64)
=================================================================
System uname: Linux-4.4.0-pf8-x86_64-Intel-R-_Core-TM-_i5-4200U_CPU_@_1.60GHz-with-gentoo-2.2
KiB Mem:    12186188 total,   7947256 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Thu, 28 Jul 2016 08:30:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=native -mtune=native -fomit-frame-pointer"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -mtune=native -fomit-frame-pointer"
GENTOO_MIRRORS="http://gentoo.c3sl.ufpr.br/ http://www.las.ic.unicamp.br/pub/gentoo/ http://mirror.leaseweb.com/gentoo/"
LANG="pt_BR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cleartype cli consolekit corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv jpeg jpeg2k lapack lcms libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl number ogg opengl openmp pam pango pcre pdf png policykit ppds readline seccomp session smp spell sse sse2 ssl startup-notification svg tcpd threads tiff truetype type1 udev udisks unicode upower usb vaapi vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="synapticcs evdev" KERNEL="linux" L10N="en-US pt-BR" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US pt_BR" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" XFCE_PLUGINS="battery brightness clock power trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


---------------------
$ equery u dev-util/electron-0.36.12-r3 
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-util/electron-0.36.12-r3:
 U I
 + + cups               : Add support for CUPS (Common Unix Printing System)
 - - custom-cflags      : Build with user-specified CFLAGS (unsupported)
 - - gnome              : Add GNOME support
 - - gnome-keyring      : Enable support for storing passwords via gnome-keyring
 - - hidpi              : Enable support for high-resolution screens (high dots per inch)
 - - kerberos           : Add kerberos support
 - - linguas_am         : Amharic locale
 - - linguas_ar         : Arabic locale
 - - linguas_bg         : Bulgarian locale
 - - linguas_bn         : Bengali locale
 - - linguas_ca         : Catalan locale
 - - linguas_cs         : Czech locale
 - - linguas_da         : Danish locale
 - - linguas_de         : German locale
 - - linguas_el         : Greek locale
 - - linguas_en_GB      : English locale for Britain
 - - linguas_es         : Spanish locale
 - - linguas_es_419     : Latin American Spanish locale
 - - linguas_et         : Estonian locale
 - - linguas_fa         : Persian locale
 - - linguas_fi         : Finnish locale
 - - linguas_fil        : Filipino locale
 - - linguas_fr         : French locale
 - - linguas_gu         : Gujarati locale
 - - linguas_he         : Hebrew locale
 - - linguas_hi         : Hindi locale
 - - linguas_hr         : Croatian locale
 - - linguas_hu         : Hungarian locale
 - - linguas_id         : Indonesian locale
 - - linguas_it         : Italian locale
 - - linguas_ja         : Japanese locale
 - - linguas_kn         : Kannada locale
 - - linguas_ko         : Korean locale
 - - linguas_lt         : Lithuanian locale
 - - linguas_lv         : Latvian locale
 - - linguas_ml         : Malayalam locale
 - - linguas_mr         : Marathi locale
 - - linguas_ms         : Malay locale
 - - linguas_nb         : Norwegian (Bokmal) locale
 - - linguas_nl         : Dutch locale
 - - linguas_pl         : Polish locale
 + + linguas_pt_BR      : Portuguese locale for Brasil
 - - linguas_pt_PT      : Portuguese locale for Portugal
 - - linguas_ro         : Romanian locale
 - - linguas_ru         : Russian locale
 - - linguas_sk         : Slovak locale
 - - linguas_sl         : Slovenian locale
 - - linguas_sr         : Serbian locale
 - - linguas_sv         : Swedish locale
 - - linguas_sw         : Swahili locale
 - - linguas_ta         : Tamil locale
 - - linguas_te         : Telugu locale
 - - linguas_th         : Thai locale
 - - linguas_tr         : Turkish locale
 - - linguas_uk         : Ukrainian locale
 - - linguas_vi         : Vietnamese locale
 - - linguas_zh_CN      : Chinese locale for Peoples Republic of China
 - - linguas_zh_TW      : Chinese locale for Taiwan
 - - lto                : Build with link time optimization enabled
 - - pic                : Disable optimized assembly code that is not PIC friendly
 + + proprietary-codecs : Enable proprietary codecs like H.264, MP3
 - - pulseaudio         : Add support for PulseAudio sound server
 + + system-ffmpeg      : Use system ffmpeg instead of the bundled one
 + + tcmalloc           : Use bundled tcmalloc instead of system malloc
 - - test               : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in
                          make.conf/package.use anymore
Comment 2 Elvis Pranskevichus 2016-09-20 13:45:45 UTC
commit 44c6d933b15c5b677a4cc3c01cd6aaa6b14d4a18
Author:     Elvis Pranskevichus <elvis@magic.io>
AuthorDate: Thu Sep 15 09:31:15 2016 -0400
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: Tue Sep 20 14:12:22 2016 +0800

    app-editors/atom: Migrate to slotted electron, add atom-1.10.2, fixes
    
    Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=589900
    Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=593502
    Closes: https://github.com/gentoo/gentoo/pull/2336
    
    Package-Manager: portage-2.2.28
    
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 app-editors/atom/Manifest                          |   7 +-
 app-editors/atom/atom-1.10.2.ebuild                | 398 +++++++++++++++++++++
 .../{atom-1.8.0.ebuild => atom-1.7.4-r4.ebuild}    |  60 +++-
 .../{atom-1.7.4-r3.ebuild => atom-1.8.0-r1.ebuild} |  60 +++-
 .../atom/files/atom-unbundle-electron.patch        |   6 +-
 5 files changed, 505 insertions(+), 26 deletions(-)