Conversation
|
Building docs is super painful |
7093f80 to
849ce72
Compare
|
I was able to build the docs with the following patch: Detailsdiff --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 |
There was a problem hiding this comment.
Should we file a ticket for this?
There was a problem hiding this comment.
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.
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)
SuperSandro2000
left a comment
There was a problem hiding this comment.
just a small side node
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
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.
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.
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.
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; # failsThere was a problem hiding this comment.
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.
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 <[email protected]>
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, thensystemdMinimalwas used as logind lib.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.