Bug 1647239 - Missing execute permissions node-gyp
Summary: Missing execute permissions node-gyp
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nodejs
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: NodeJS Packaging SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-06 23:22 UTC by Andrew Stiegmann
Modified: 2020-11-05 10:35 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-04-10 02:55:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew Stiegmann 2018-11-06 23:22:13 UTC
Description of problem:
Script files in the bin directories are missing execute permissions, which in turn causes build failures on some packages that require some building (like unix-dgram).  The following need to be made executable for things to work again:

/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp
/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js


Version-Release number of selected component (if applicable):
6.4.1

How reproducible:
100%

Steps to Reproduce:
1. Try and install unix-dgram with factor NPM
2. Notice it fails to compile because these scripts 

Actual results:
% npm install

> unix-dgram.2 install /home/stieg/Devel/airfordable/test/node_modules/unix-dgram
> node-gyp rebuild

sh: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: Permission denied
npm WARN test.0 No repository field.


Expected results:
DGram builds as expected

Workaround:
$ sudo chmod 755 /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js

Comment 1 Michael Riss 2018-11-29 18:10:19 UTC
I opened a pull request, I hope it will help:

https://src.fedoraproject.org/rpms/nodejs/pull-request/3

Comment 2 Stephen Gallagher 2018-11-29 18:17:29 UTC
(In reply to Michael Riss from comment #1)
> I opened a pull request, I hope it will help:
> 
> https://src.fedoraproject.org/rpms/nodejs/pull-request/3

So, I've been hesitating about fixing this because I really have no clear idea which of the binaries embedded in npm are actually needed for it to function.

I don't mind enabling these two since they depend only on Node.js itself, but there have been others that were clearly unnecessary that were causing the package to pull in Python 2 and other things that were definitely overkill. That said, your proposed patch isn't going to work, because you put it in the specfile *before* the scripts that remove permissions. I'll rework it when I build the latest Node.js releases today.

Comment 3 Stephen Gallagher 2019-04-10 02:55:23 UTC
This has been fixed for months, but the BZ didn't get closed.


Note You need to log in before you can comment on or make changes to this bug.