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

morph: add openssh to PATH #78107

Merged
merged 1 commit into from Jan 26, 2020
Merged

morph: add openssh to PATH #78107

merged 1 commit into from Jan 26, 2020

Conversation

1000101
Copy link
Member

@1000101 1000101 commented Jan 20, 2020

Motivation for this change

Fixes #78106

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@johanot johanot left a comment

Choose a reason for hiding this comment

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

openssh is not a build dependency of morph, thus this change will not fix the issue at hand. We either need to put openssh on morph' runtime PATH, or loosen the dependency check at morph startup (since openssh is really not needed at all for the morph build-subcommand.)

@flokli
Copy link
Contributor

flokli commented Jan 20, 2020

@johanot is right - and I think morph should work fine for actions not requiring ssh (like morph build), but complain if we try to deploy without the ssh binary in $PATH.

@1000101
Copy link
Member Author

1000101 commented Jan 20, 2020

@johanot is right - and I think morph should work fine for actions not requiring ssh (like morph build), but complain if we try to deploy without the ssh binary in $PATH.

Aaah, right, i'm closing this PR then. Sorry for the fuss!

Just for the reference: DBCDK/morph#102

@1000101 1000101 closed this Jan 20, 2020
@mmahut mmahut reopened this Jan 21, 2020
@mmahut
Copy link
Member

mmahut commented Jan 21, 2020

Until this is fixed upstream, we might want to add openssh as a runtime dependency.

@ofborg ofborg bot requested a review from johanot January 21, 2020 14:47
@1000101 1000101 changed the title morph: add openssh to buildInputs morph: add openssh to propagatedBuildInputs Jan 21, 2020
@flokli
Copy link
Contributor

flokli commented Jan 21, 2020

This won't magically add openssh to $PATH, though - the binary needs to be wrapped.

See how this is done with borgbackup.

@johanot
Copy link
Contributor

johanot commented Jan 21, 2020

Yeah well. We have to agree on what we are actually fixing though? #78106 gives the example of morph build (build subcommand) failing because of openssh missing. This is obviously wrong, since morph can build machine expressions just fine without ever needing ssh.

I kinda feel that morph shouldn't be nixpkgs-wrapped with openssh, since it is possible to use morph as a standalone build tool, without ssh. But i do agree that morph build should stop failing when openssh is missing on $PATH. See my proposed upstream PR regarding that issue: DBCDK/morph#103

@mmahut
Copy link
Member

mmahut commented Jan 21, 2020

If a program requires a dependency to work (in any use case), we as <nixpkgs> should ship it with that dependency.

If that dependency is too large, we can split it into different derivation (example that comes in mind is a server application with GUI support, such as bitcoin{,d}), but in case of morph the majority of use cases are going to use deploy anyway, so I feel it is okay to ship it with openssh as a dependency.

@andrew-d
Copy link
Contributor

FWIW, as someone that was trying out morph in a nix-shell --pure just now, I would expect that it'd be wrapped so that it "just worked" with SSH. A Go-based SSH implementation is neat, but makes e.g. using SSH keys on a smart card via the SSH agent more annoying, doesn't support everything in my ~/.ssh/config, etc.

Very +1 to wrapping the binary.

@1000101 1000101 changed the title morph: add openssh to propagatedBuildInputs morph: add openssh to PATH Jan 22, 2020
@mmahut
Copy link
Member

mmahut commented Jan 26, 2020

Right, we are using morph with Trezor to hold our ssh keys and I'm not sure if the gossh will support that.

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

Successfully merging this pull request may close these issues.

morph: deploy fails
5 participants