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

gnupg1compat: fix compatibility with gnupg20 #47977

Merged
merged 2 commits into from Oct 10, 2018

Conversation

charles-dyfis-net
Copy link
Contributor

@charles-dyfis-net charles-dyfis-net commented Oct 6, 2018

Motivation for this change

Presently, gnupg1compat only works with gnupg22. Without this change, the error

error: attribute 'version' missing, at .../nixpkgs/pkgs/tools/security/gnupg/1compat.nix:4:26

is emitted when evaluating

pkgs.gnupg1compat.override { gnupg = pkgs.gnupg20; }'

Even with that done, 1compat after e34ce9d no longer actually created gpg->gpg2 or gpgv->gpgv2 symlinks at all, making it effectively a noop (and thus ineffective for the gnupg20 package, which -- unlike gnupg22 -- was not modified in the aforementioned commit to create gpg binaries itself).

The symlink-creation behavior is thus reintroduced, but if-and-only-if actually needed.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

Presently, gnupg1compat only works with gnupg22. Without this change, the error

```
error: attribute 'version' missing, at .../nixpkgs/pkgs/tools/security/gnupg/1compat.nix:4:26
```

is emitted when evaluating

```
pkgs.gnupg1compat.override { gnupg = pkgs.gnupg20; }'
```
@charles-dyfis-net
Copy link
Contributor Author

charles-dyfis-net commented Oct 6, 2018

While the original version of this PR allowed 1compat to build, it didn't actually work correctly with 2.0 (as it was completely rewritten to assume gpg rather than gpg2 as of e34ce9d).

ping: @lsix

@charles-dyfis-net charles-dyfis-net changed the title gnupg20: set version variable to fix gnupg1compat gnupg1compat: fix compatibility with gnupg20 Oct 6, 2018
@lsix lsix merged commit 20249ca into NixOS:master Oct 10, 2018
@charles-dyfis-net charles-dyfis-net deleted the gnupg20-1compat-fix branch October 10, 2018 13:44
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

3 participants