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

tar references gzip out of the path. #13783

Closed
kevincox opened this issue Mar 9, 2016 · 7 comments
Closed

tar references gzip out of the path. #13783

kevincox opened this issue Mar 9, 2016 · 7 comments

Comments

@kevincox
Copy link
Contributor

kevincox commented Mar 9, 2016

If gzip isn't in your path tar -czf ... fails with "gzip: Cannot exec: No such file or directory"

@matthewbauer
Copy link
Member

gzip should be in "stdenv" I think. Are you able to build stdenv?

@kevincox
Copy link
Contributor Author

kevincox commented Mar 9, 2016

It is in stdenv, but sometimes if you build your own path it doesn't include stdenv. If the hope that it uses the gzip from stdenv on purpose it should probably reference /run/current-system/sw/bin explicitly although I guess that would break it on non-NixOS systems.

@peti
Copy link
Member

peti commented Mar 9, 2016

I think it's perfectly fine for tar to have optional dependencies on various compressors to be found at run-time. That's not a bug, IMHO.

@peti peti closed this as completed Mar 9, 2016
@kamilchm
Copy link
Member

kamilchm commented Oct 11, 2016

I found it to be inconsistent for mesos package.
It optionally need to extract different archives. I patched it some time ago to use full nix path for tar #17294
But now if it tries to extract tar.gz it needs gzip which can't be found in its path.
@peti how should I provide both tar and gzip to mesos-slave service?

@peti
Copy link
Member

peti commented Oct 11, 2016

@kamilchm, just put both tar and gzip into $PATH. I'm not sure whether I see the problem?

@kamilchm
Copy link
Member

kamilchm commented Oct 11, 2016

There are lot of substituteInPlace in https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/cluster/mesos/default.nix for programs like scp, gzip, tar, unzip ....
Do you suggest to replace all of substituteInPlace in sources and provide all referenced programs with $PATH?

@peti
Copy link
Member

peti commented Oct 11, 2016

Do you suggest to replace all of substituteInPlace in sources and provide all referenced programs with $PATH?

I believe that both approaches have their merits. A hard-coded path is fine, too. It doesn't seem like anyone would gain anything by replacing those path by reliance on $PATH instead.

@kamilchm kamilchm mentioned this issue Oct 17, 2016
7 tasks
@kamilchm kamilchm mentioned this issue Dec 28, 2016
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants