Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix node-gyp failing to build canvas #5202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix node-gyp failing to build canvas
So there is a commonly use node (npm) package called "canvas", which uses node-gyp to bind to cairo (2D canvas drawing library). And I assume this is useful outside of this particular case. node-gyp (run by `yarn install` or `npm install`) needs access to `/usr/share/pkgconfig` otherwise it fails to buold the native extensions.

So it's either this proposed change, or it can be move to `yarn.profile` or `npm.profile`. I'm not sure it will work when moved to `node-gyp.profile` as that one is invoked as a subprocess.

It can also, instead of including `build-systems-common.profile` just whitelist `/usr/share/pkgconfig`.
  • Loading branch information
skrat committed Jun 14, 2022
commit 2ae40641a5e4de2ae386029dbffb3d48b80887b5
1 change: 1 addition & 0 deletions etc/profile-m-z/nodejs-common.profile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ include disable-xdg.inc
whitelist /usr/share/doc/node
whitelist /usr/share/nvm
whitelist /usr/share/systemtap/tapset/node.stp
include build-systems-common.profile
Copy link
Collaborator

@rusty-snake rusty-snake Jun 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can also, instead of including build-systems-common.profile just whitelist /usr/share/pkgconfig.

Likely easier than the above.

include whitelist-runuser-common.inc
include whitelist-usr-share-common.inc
include whitelist-var-common.inc
Expand Down