since #402852 (and made unconditional in
41205c0e6c), we run autoreconf for
util-linux. this is because we needed to patch configure.ac. this is no
longer the case, as the patch for which we did this was accepted
upstream and we've had it since v2.42:
https://lore.kernel.org/util-linux/20250501075806.88759-1-hi@alyssa.is/.
accordingly, we can now remove this
if we still want to autoreconf for some reason, despite it not being
needed, we should at least unpin automake116x, as we have no reason to
require an old automake anymore.
Upstream's configure.ac only defaults sysconfdir to /etc when prefix is
unset or /usr. With a Nix store prefix it stays at $out/etc.
Until 2.42 this was harmless because every /etc path in pathnames.h was
a hardcoded literal. 2.42 rewrote agetty's issue-file lookup and now
derives the search root from _PATH_SYSCONFDIR.
So agetty now looks for out/etc/issue and never finds it.
Nothing is installed into ${sysconfdir}, so this does not write to /etc
during the build.
Fixes#514060
Seems like util-linux had a regression in `script`. Waiting for 2.41.1
to be tagged, but in the meantime, let's apply this patch:
https://lore.kernel.org/util-linux/adi3573O-5gr9m2q@per.namespace.at/T/#t
Since we're causing a mass rebuild anyway, ensure we also apply all the
final upstream versions of the last patches that we applied.
If we don't add this, we don't actually link with PAM; compare the
before and after of `lib/security/pam_lastlog2.so`.
```
Dynamic section at offset 0x2ce8 contains 31 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [liblastlog2.so.2]
0x0000000000000001 (NEEDED) Shared library: [libsqlite3.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [pam_lastlog2.so]
```
```
Dynamic section at offset 0x2cd8 contains 32 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libpam.so.0]
0x0000000000000001 (NEEDED) Shared library: [liblastlog2.so.2]
0x0000000000000001 (NEEDED) Shared library: [libsqlite3.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [pam_lastlog2.so]
```
This causes issues like https://github.com/NixOS/nixpkgs/issues/493934
where the library has trouble linking with PAM symbols because it is not
linked.
`util-linux.bin` is accidentally copying over a Makefile into its
`share/bash-completion/completions/` output directory, which leads to
these annoying error messages when opening a new shell:
```
-bash: /run/current-system/sw/share/bash-completion/completions/Makemodule.am: line 198: syntax error near unexpected token `else'
-bash: /run/current-system/sw/share/bash-completion/completions/Makemodule.am: line 198: `else'
```
We'll fix the issue by removing the `Makemodule.am` file before it gets
copied over.
This was applied conditionally on staging-next to avoid throwing away
Linux builds. It should have been changed to unconditional on
staging after that was merged, but I guess I forgot. We generally
avoid conditional patch application wherever possible as it makes it
far too easy to miss when a patch needs to be removed or updated.
Closes#409339. This API was intended to be a temporary hack to fix
Kubernetes and other consumers that relied on this specific util-linux
mount behavior. Now that util-linux is correctly patched, we can drop
this passthru.
TODO (#409339): Remove this hack. We had to add it to avoid a mass rebuild
for the 25.05 release to fix Kubernetes. Once the staging cycle referenced
in the above PR completes, this passthru and all consumers of it should go away.