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

use standard cp arguments #571

Closed
bradain opened this issue Feb 2, 2015 · 16 comments · Fixed by #831
Closed

use standard cp arguments #571

bradain opened this issue Feb 2, 2015 · 16 comments · Fixed by #831

Comments

@bradain
Copy link

bradain commented Feb 2, 2015

The cp command takes an argument -a as a shortcut for -pPR.
While this works on most Linux distributions, it is not available on certain other operating systems such as OpenBSD, while the standard -pPR always works.
Would you consider replacing cp -af with the functionally equivalent cp -fpPR to improve OS support?

@Fishrock123 Fishrock123 self-assigned this Aug 23, 2015
@drook
Copy link

drook commented Aug 28, 2015

Same stuff on Solaris.

@Fishrock123
Copy link
Member

Huh. I thought I commented on this.

cp resides in gyp itself here, so I'm not sure if we can do that? cc @TooTallNate, do we still ever get upstream updates from gyp?

Should we just have a nodejs/gyp that both node and node-gyp can use?

@alexijs
Copy link

alexijs commented Oct 17, 2015

Same stuff on Oracle Solaris 11.2

@TooTallNate
Copy link
Contributor

@Fishrock123 Historically I've just updated gyp here when node.js/io.js updated its own copy of gyp (probably behind at this point!)

@alexijs
Copy link

alexijs commented Oct 18, 2015

Is there a way to resolve this issue by changing cp flags? Deployment of all packages via node-gyp fails on Oracle Solaris 11.2 because Oracle doesn't support GNU flag -a.

I found a workaround by compiling package locally, creating a package structure, and moving *.node, package.json, and corresponding js files there.
However, it defeats a purpose of autobuilder and too cumbersome because I have to compile package after package.

Also, it looks like running Demeteorizer is not enough and I have to write custom builder that would replace packages from my dev (OS X Maverics) with those locally compiled on Solaris.

Im trying to deploy my Meteor app on Solaris via Demeteorizer and have problems with fibers and bcrypt.

Any help would be appreciated.

@GeorgeBailey: I wonder if you experience the same problems on your system.


Manual builds of c++ node modules via node-gyp, and manual injection them works (I was able to run a Meteor app on Sol 11.2)
Autobuilding via npm install doensn't work....

@drook
Copy link

drook commented Oct 18, 2015

You could also play with Makefile (or, if I don't remember correctly, with any other template issuing "cp -r").

@bnoordhuis
Copy link
Member

Little known fact but you can override the cp command: make cmd_copy='ln -f $< $@ || cp -PRfp $< $@'

If someone sends a patch to the upstream gyp project, I'll be happy to land it here (assuming it's accepted upstream, of course.) Grep for copy_archive_args in pylib/gyp/generator/make.py.

@mhdawson
Copy link
Member

As an FYI we just did a similar change for AIX here https://codereview.chromium.org/1368133002/

@bnoordhuis
Copy link
Member

@mhdawson You can make that part of #753 if you want.

@GeorgeBailey
Copy link

@GeorgeBailey: I wonder if you experience the same problems on your system.

@alexijs, Not thus far. Perhaps it is because all the npm modules I tried so far were JS-only. (I hope I correctly understand the purpose of node-gyp)

@Fishrock123
Copy link
Member

See nodejs/node#3487

@mhdawson
Copy link
Member

FYI - Imran is working on a PR for the same update to gyp as in nodejs/node#3487 but for node-gyp. Should be submitted soon.

@mhdawson
Copy link
Member

The PR mentioned above #781

@TomFreudenberg
Copy link

On OpenBSD 5.7 I patched the files:

(changing cp -af into cp -pPRf)

node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch:+cmd_copy = rm -rf "$@" && cp -pPRf "$<" "$@"
node-gyp/0003-gyp-don-t-use-links-at-all-just-copy-the-files-inste.patch:+      command='rm -rf $out && cp -pPRf $in $out')
node-gyp/gyp/pylib/gyp/generator/make.py:cmd_copy = rm -rf "$@" && cp -pPRf "$<" "$@"
node-gyp/gyp/pylib/gyp/generator/ninja.py:      command='rm -rf $out && cp -pPRf $in $out')

That works successfully

It would be great if the PR would be applied to reduce the pain on OpenBSD and others.

Thanks, Tom

@bnoordhuis
Copy link
Member

I filed https://codereview.chromium.org/1483473002/ to fix cp on OpenBSD.

@bnoordhuis
Copy link
Member

Fixed (on OpenBSD anyway) in v3.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants