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

ssh-ident: switch to python3 interpreter #92912

Merged
merged 1 commit into from Aug 14, 2020

Conversation

freezeboy
Copy link
Contributor

@freezeboy freezeboy commented Jul 11, 2020

Motivation for this change

Python2 is obsolete, so why still depend on it for ssh-ident.
even though the code is pretty old it is working painlessly with python3

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.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/223

@ofborg ofborg bot requested a review from telotortium July 30, 2020 10:52
@freezeboy
Copy link
Contributor Author

hum pb, path should contain folders not executables ...

@FRidh
Copy link
Member

FRidh commented Jul 30, 2020

oh right, did not even think of that

@@ -10,12 +10,10 @@ stdenv.mkDerivation {
sha256 = "1jf19lz1gwn7cyp57j8d4zs5bq13iw3kw31m8nvr8h6sib2pf815";
};

buildInputs = [ makeWrapper ];
buildInputs = [ python3 ];
Copy link
Member

Choose a reason for hiding this comment

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

Does the executable of interest retain the dependency on the python3 executable? If not, wrapProgram is still needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like the patchShebang is doing the correct behavior

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

[nix-shell:/home/jon/.cache/nixpkgs-review/pr-92912]$ ./results//ssh-ident/bin/ssh-ident --help
ssh-ident found '/nix/store/qhhq7ijxplzzb1ridynqxj5ffphhgbn5-ssh-ident-2016-04-21/bin/ssh-ident' as the next command to run.
Based on argv[0] (./results//ssh-ident/bin/ssh-ident), it seems like this will create a
loop.

Please use BINARY_SSH, BINARY_DIR, or change the way
ssh-ident is invoked (eg, a different argv[0]) to make
it work correctly.

looks like wrapping needs to change

@freezeboy
Copy link
Contributor Author

Looks like the problem was there before, I re added the wrapper but for the moment I don't see how to fix the missing ssh-agent inside the nixpkgs-review shell, normally it simply looks up in the PATH

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM

just please squash the fix up commits

E.g.

git reset HEAD~4
git add pkgs/
git commit --amend --no-edit
git push .. .. --force

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/202

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

LGTM
shows usage

https://github.com/NixOS/nixpkgs/pull/92912
1 package built:
ssh-ident

@jonringer jonringer merged commit e092abb into NixOS:master Aug 14, 2020
@freezeboy freezeboy deleted the migrate-python-ssh-ident branch August 20, 2020 07:29
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.

None yet

5 participants