-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
linux-pam: 1.6.1 -> 1.7.1 #418255
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
linux-pam: 1.6.1 -> 1.7.1 #418255
Conversation
Building docs is super painful |
7093f80
to
849ce72
Compare
I was able to build the docs with the following patch: diff --git a/pkgs/by-name/li/linux-pam/package.nix b/pkgs/by-name/li/linux-pam/package.nix
index ddd7a6db0d..6c00e445e1 100644
--- a/pkgs/by-name/li/linux-pam/package.nix
+++ b/pkgs/by-name/li/linux-pam/package.nix
@@ -16,6 +16,12 @@
meson,
pkg-config,
systemdMinimal,
+ libxslt,
+ libxml2,
+ docbook_xsl_ns,
+ docbook5,
+ findXMLCatalogs,
+ w3m-batch,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -43,8 +49,8 @@
outputs = [
"out"
- # "doc"
- # "man"
+ "doc"
+ "man"
# "modules"
];
@@ -57,6 +63,13 @@
ninja
pkg-config
gettext
+
+ libxslt
+ libxml2
+ w3m-batch
+ findXMLCatalogs
+ docbook_xsl_ns
+ docbook5
];
buildInputs = [
@@ -71,6 +84,7 @@
enableParallelBuilding = true;
+ mesonAutoFeatures = "auto";
mesonFlags = [
(lib.mesonEnable "logind" stdenv.buildPlatform.isLinux)
(lib.mesonEnable "audit" stdenv.buildPlatform.isLinux)
@@ -81,7 +95,6 @@
(lib.mesonEnable "elogind" false)
(lib.mesonEnable "selinux" false)
(lib.mesonEnable "nis" false)
- (lib.mesonEnable "docs" false)
(lib.mesonBool "xtests" false)
(lib.mesonBool "examples" false)
]; |
Damn, nice work! I'll see to getting that patch in here and rebasing to solve the merge conflicts. |
2d84a35
to
8370c0c
Compare
feb2692
to
494abac
Compare
All the tests pass on aarch64, and at least the build passes on x86_64 |
mesonFlags = [ | ||
(lib.mesonEnable "logind" stdenv.buildPlatform.isLinux) | ||
(lib.mesonEnable "audit" stdenv.buildPlatform.isLinux) | ||
(lib.mesonEnable "pam_lastlog" true) # TODO: switch to pam_lastlog2 |
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.
Should we file a ticket for this?
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.
The switch to lastlog2 was planned for a while, just, noone actually did it yet because that needs module changes. I can file a ticket, sure. But the old lastlog and lastlog2 are not mutually exclusive, so if we do that switch we don't immediately need to disable old lastlog. Maybe TODO: remove after switch to lastlog2
would have been a better comment...
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.
We had work on lastlog2
in #282337, and it seems our util-linux
is new enough to now contain the lastlog2
code (i have not checked whether we enable the build though). I can try how far i get with that, but that is an orthogonal change (should not block this PAM update)
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.
I opened #429075
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.
just a small side node
@@ -205,6 +205,8 @@ let | |||
# $ curl -s https://api.github.com/repos/systemd/systemd/releases/latest | \ | |||
# jq '.created_at|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime' | |||
releaseTimestamp = "1734643670"; | |||
|
|||
kbd' = if withPam then kbd else kbd.override { withVlock = false; }; |
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.
kbd' = if withPam then kbd else kbd.override { withVlock = false; }; | |
kbd' = kbd.override { withVlock = !withPam; }; |
Also: I just realized |
494abac
to
f05ce3c
Compare
Okay, no more inf rec on musl. Required disabling That said: the patches to make nspawn optional can be removed for systemd 258. Considering we will do a 25.05 staging next, there is no rush and #427968 should probably be merged first. |
|
||
# add nspawn build option flag | ||
# required to disable nspawn for systemdLibs to avoid dependency on getent | ||
# https://github.com/systemd/systemd/pull/36876, remove for systemd 258 | ||
(fetchpatch { | ||
# required for the actual patch to apply | ||
url = "https://github.com/systemd/systemd/commit/b1fb2d971c810e0bdf9ff0ae567a1c6c230e4e5d.patch"; | ||
hash = "sha256-JBheazg1OFkx8vUl2l8+34BoEPVURBQJHxqntOBYB60="; | ||
includes = [ "src/nspawn/meson.build" ]; | ||
}) | ||
(fetchpatch { | ||
url = "https://github.com/systemd/systemd/commit/d95818f5221d9b9b19648cffa0cb2407f023b27e.patch"; | ||
hash = "sha256-FTpWGec5ivlkyEEDMCPaLE+BH91e7JI0kH8pS88bBDY="; | ||
excludes = [ "test/fuzz/meson.build" ]; | ||
}) |
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.
TODO: wait for #427968
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.
Does anyone even care about linux-pam on musl? Seems like a pretty esoteric use-case to me. I'd want to avoid waiting for the next systemd release (which will takes weeks if not months to land) as the rest of the PR is ready.
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.
Maybe we just disable the logind support for now in pam on musl on since that wasn't present before either and re-enable it once we have the new systemd version.
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.
thats not the issue. Even if things don't work they should still build. systemd
is still required on musl, after all.
The patches exist and seem to work fine, so if the conclusion is not to wait then probably this is ready as-is.
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.
I hesitate to say it's a good idea to add patches to systemd to disable something so that some other software can build on a platform systemd doesn't even support.
What I'm thinking is basically something like this to make it build on musl:
index 13e8f55b1f39..21bc5114e38d 100644
--- i/pkgs/by-name/li/linux-pam/package.nix
+++ w/pkgs/by-name/li/linux-pam/package.nix
@@ -66,16 +66,19 @@ stdenv.mkDerivation (finalAttrs: {
db4
libxcrypt
]
- ++ lib.optionals stdenv.buildPlatform.isLinux [
- audit
- systemdLibs
- ];
+ ++ lib.optionals stdenv.buildPlatform.isLinux (
+ [
+ audit
+ ]
+ ++ lib.optionals (!stdenv.hostPlatform.isMusl) [
+ systemdLibs
+ ]
+ );
enableParallelBuilding = true;
mesonAutoFeatures = "auto";
mesonFlags = [
- (lib.mesonEnable "logind" stdenv.buildPlatform.isLinux)
(lib.mesonEnable "audit" stdenv.buildPlatform.isLinux)
(lib.mesonEnable "pam_lastlog" (!stdenv.hostPlatform.isMusl)) # TODO: switch to pam_lastlog2, pam_lastlog is deprecated and broken on ml
(lib.mesonEnable "pam_unix" true)
@@ -87,6 +90,9 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonEnable "nis" false)
(lib.mesonBool "xtests" false)
(lib.mesonBool "examples" false)
+ ]
+ ++ lib.optionals (!stdenv.hostPlatform.isMusl) [
+ (lib.mesonEnable "logind" stdenv.buildPlatform.isLinux)
];
doCheck = false; # fails
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.
I'd say we could even get away with not enabling logind at all (for any hostPlatform) because we didn't enable it before and it wasn't even introduced in this release. It was in linux-pam for a while (at least since 1.5.3, see this PR). In a way, you enabling logind here has nothing to do with upgrading the package.
I'm happy with waiting to enable logind support until the next systemd version. But we should get this package bumped asap. This would also allow us to avoid the dance with kbd and systemd entirely.
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.
utmp has to die, and if logind is the replacement, we should enable it. pam was/is unmaintained in nixpkgs, it was long overdue someone actually took a look at it. As it stands, this PR is a full "lets do it properly" PR.
I also don't see the issue with patching in the nspawn toggle: our systemdLibs
does not install nspawn anyways, so we might as well not build it either. This does not actually change anything in the package output, so i am not sure what the fuss is about.
Hmm, seems musl still fails (this time not inf rec): Not sure how to fix this now. We might have to just disable |
c6c2c99
to
4644447
Compare
pr fail seems to be rate-limit issue, i'll try to restart that |
Did this ever work? https://www.openwall.com/lists/musl/2013/12/04/11 seems to suggest this has been an issue for more than a decade. |
#404169 |
4644447
to
cf9a7e8
Compare
PAM switched to meson build upstream, which requires some care: - build with logind support - reenable lastlog - clean up autotools remnants - disable debug as it slows down test making it fail
Co-Authored-by: Marcin Serwin <marcin@serwin.dev>
cf9a7e8
to
868e7c1
Compare
PAM now uses meson to build, so the package needed to essentially be rewritten.
PAM also now uses logind for login limits. To not get infinite recursion, PAM was first stripped from
systemdMinimal
, thensystemdMinimal
was used as logind lib.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.