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

gnupg: fix cross compilation #298001

Merged
merged 1 commit into from
Mar 25, 2024
Merged

gnupg: fix cross compilation #298001

merged 1 commit into from
Mar 25, 2024

Conversation

uninsane
Copy link
Contributor

when npth upgraded 1.6 -> 1.7, the npth-config binary it previously provided was removed, and functionality folded into gpgrt-config. see: https://github.com/gpg/npth/blob/417abd56fd7bf45cd4948414050615cb1ad59134/NEWS#L8

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux (for .#pkgsCross.aarch64-multiplatform.gnupg)
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
    • not all dependents, but successfully built a sway+gtk desktop with this patch.
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

when `npth` upgraded 1.6 -> 1.7, the `npth-config` binary it previously
provided was removed, and functionality folded into `gpgrt-config`. see:
<https://github.com/gpg/npth/blob/417abd56fd7bf45cd4948414050615cb1ad59134/NEWS#L8>
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Mar 22, 2024
@ofborg ofborg bot requested review from fpletz and vrthra March 22, 2024 10:12
@danielbarter
Copy link
Contributor

danielbarter commented Mar 24, 2024

Tested using
nix-build -E 'with import /path/to/nixpkgs {}; pkgsCross.aarch64-multiplatform.gnupg.override { enableMinimal = true;}'
and everything looks good.

Copy link
Contributor

@tpwrules tpwrules left a comment

Choose a reason for hiding this comment

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

Ran into this issue too. gnupg was able to find gpgrt-config in a native scenario because it was on $PATH, being supplied as a buildInput. Specifying it directly in this way allows it to be found in a cross scenario as well.

Tested native x86_64-linux, aarch64-linux, and x86_64-linux -> aarch64-linux.

@Mindavi
Copy link
Contributor

Mindavi commented Mar 25, 2024

If possible it may also be a good idea to enable strictDeps. But make sure to verify native compilation for that.

@tpwrules tpwrules mentioned this pull request Mar 25, 2024
13 tasks
@Mic92 Mic92 merged commit 5b130e5 into NixOS:staging Mar 25, 2024
29 checks passed
@colemickens
Copy link
Member

colemickens commented Apr 7, 2024

Is anyone running with this PR, and uses an openpgp smartcard or yubikey? I can't tell quite what's going on but gpg --card-status is hanging for me, regardless of if the card is inserted...

EDIT: I don't have any idea what was going on but I have no issues after rebooting into the same generation.

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/why-does-nixos-rebuild-want-me-to-install-a-library/43733/14

@matt-martin matt-martin mentioned this pull request Jun 23, 2024
13 tasks
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

8 participants