Skip to content

pam_ssh_agent_auth: fix build with gcc14 - #368612

Merged
adamcstephens merged 1 commit into
NixOS:masterfrom
mrene:fix/pam_ssh_agent_auth
Dec 28, 2024
Merged

adamcstephens merged 1 commit into
NixOS:masterfrom
mrene:fix/pam_ssh_agent_auth

Conversation

@mrene

@mrene mrene commented Dec 27, 2024

Copy link
Copy Markdown
Contributor

Fixes #368603

Things done

  • Built on platform(s)
    • x86_64-linux
    • 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
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 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.

@github-actions github-actions Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 27, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm. At the very least, this could use a comment explaining it, and a link to the upstream issue.

Debian has also created a patch that fixes the specific code that causes the error, which is probably better than disabling the errors globally.

https://sources.debian.org/src/pam-ssh-agent-auth/0.10.3-11/debian/patches/1000-gcc-14.patch/

I won't personally try to block anyone on switching approaches but in either approach it would be good to link to the upstream issue so that it will be understood in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the pointer. Do you know if these patch urls are stable enough to fetch them, or is it customary to copy them over?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like it is stable enough, there are already a handful of packages with Debian patches being pulled in:

https://github.com/search?q=repo%3ANixOS%2Fnixpkgs+sources.debian.org&type=code

In August of last year, someone added a helper for fetching Debian patches, fetchDebianPatch[docs]:

{ lib, fetchpatch }:
lib.makeOverridable (
{
pname,
version,
debianRevision ? null,
area ? "main",
patch,
name ? patch,
hash,
}:
let
inherit (lib.strings) hasPrefix substring;
prefix = substring 0 (if hasPrefix "lib" pname then 4 else 1) pname;
versionString = if debianRevision == null then version else "${version}-${debianRevision}";
in
fetchpatch {
inherit name hash;
url =
"https://sources.debian.org/data/${area}/${prefix}/"
+ "${pname}/${versionString}/debian/patches/${patch}";
}
)

It is less-utilized than just fetching directly from sources.debian.org, but is probably the cleaner way to go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Alright I've updated it to use fetchDebianPatch and got rid of the CFLAGS

@ofborg ofborg Bot added the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 27, 2024
@mrene
mrene force-pushed the fix/pam_ssh_agent_auth branch from a2b383c to 777cd45 Compare December 27, 2024 21:32
@github-actions github-actions Bot removed the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 27, 2024
@ofborg ofborg Bot added the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 28, 2024
@jchv

jchv commented Dec 28, 2024

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368612


x86_64-linux

✅ 1 package built:
  • pam_ssh_agent_auth

@jchv jchv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@nixos-discourse

Copy link
Copy Markdown

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

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

@adamcstephens

Copy link
Copy Markdown
Contributor

Built fine on aarch64-linux
/nix/store/sya2bbqafg8l7nwrx1k7dj6q3wyzsr52-pam_ssh_agent_auth-0.10.4

@adamcstephens
adamcstephens merged commit d68604a into NixOS:master Dec 28, 2024
@Sigmanificient Sigmanificient mentioned this pull request Mar 8, 2025
27 of 28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: pam_ssh_agent_auth

4 participants