-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
got: add openssh as input and fix path to the ssh(1) executable #297154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find @omar-polo!!
Happy to report that the proposed changes work and indeed use ssh from nixpkgs on my aarch64-darwin machine, even though macOS provides ssh at the got hard-coded path /usr/bin/ssh
.
Unfortunately I do not have a clear answer regarding your question about whether openssh
should be added to buildInputs
(or maybe propagatedBuildInputs
?) or not.
@vcunat, @wegank as folks who have contributed/committed to the got
or openssh
package could you provide some guidance here or involve folks you think would be able to offer advice?
In terms of build inputs, I'd leave this as it is. |
How about we replace |
Interesting approach, @wahjava. I'd like to recommend that any such patches would also be proposed upstream. If we wanted more flexibility with the actual ssh package being used I'd like to suggest a custom input on the got package that can be overridden, e.g.:
|
You can override it even if you keep the name as it is. Just I'm not sure about conventions around this in nixpkgs. Probably nothing restrictive. |
Thanks for chiming in, @vcunat, d'oh (to myself 🤦😅): of course you override |
The disadvantage of this approach is, creating unneeded explicit dependency between ssh, and got, which is not even present in the upstream sources itself either, so everytime ssh is bumped, this will also get rebuilt, and someone wanting to use a different SSH flavour have to override this themselves, and triggering a source rebuild. I agree that we should consider upstream's advice to this problem (aka their blessing) esp. if we go for the patching it downstream part, or just submit an bug report on their bug tracker. |
@wahjava I haven't realized that going with this approach got needs to be rebuilt every time openssh is, which is a bit annoying. So, should we go with changing the |
If we want to run all of the regression tests then we would need openssh as a build input. That said, I don't see checks being disabled and was quite curious why they were passing. According to the logs nothing is being tested! The regress directories are being entered by make, but no tests are ran. I'm unsure if this is expected or a issue with the got-portable port. (I also imagine it would not be very useful to drop in a different ssh implementation, since got is developed on openbsd and built with openssh in mind. Some of the features rely on openssh-specific behaviors and flags.) |
FYI: got 0.98.2 depends on libressl rather than openssl (see #307538) |
use a Boolean flag, |
@omar-polo is what @AndersonTorres suggested 👆 something you'd like to take on and add to this PR? |
@afh I think it could work, but I think it's outside of my nix comfort zone to add a flag to a derivation ^^" Do we really want to add a knob for this though? Is using a distributed version control without the ability to fetch/push useful? (ok, plain git:// and read-only https:// still works, but...) edit: in future versions of got-portable I believe the tests will be bundled, and those will also need openssh. |
I've created #322202 as a different approach, let me know if that works |
Closing in favor of merged PR #322600 |
Description of changes
got uses an hardcoded path
/usr/bin/ssh
, sogot clone
/send
/fetch
don't work, the other commands are fine.I'm not sure if openssh should be added to buildInputs too: got itself works without openssh,
ssh
is needed "only" for the network activity.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.