FS#73702 - [systemd] initcpio script tries to include obsolete libnss_files lib

Attached to Project: Arch Linux
Opened by Vladimir (_v_l) - Thursday, 10 February 2022, 00:11 GMT
Last edited by Christian Hesse (eworm) - Thursday, 10 February 2022, 07:13 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Christian Hesse (eworm)
Giancarlo Razzolini (grazzolini)
freswa (frederik)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

glibc in core (2.33-5) has following `libnss_files*` in /usr/lib:

$ LANG=en_US.UTF-8 ls -lA /usr/lib/libnss_files*
-rwxr-xr-x 1 root root 51376 May 13 2021 /usr/lib/libnss_files-2.33.so
lrwxrwxrwx 1 root root 17 May 13 2021 /usr/lib/libnss_files.so -> libnss_files.so.2
lrwxrwxrwx 1 root root 20 May 13 2021 /usr/lib/libnss_files.so.2 -> libnss_files-2.33.so

but glibc in testing (2.35) only the following:

$ LANG=en_US.UTF-8 ls -lA /usr/lib/libnss_files*
-rwxr-xr-x 1 root root 15192 Feb 10 01:29 /usr/lib/libnss_files.so.2

The missing 'libnss_files.so' leads to error when initramfs is generated by `mkinitcpio -p linux`.

Workaround: manually create `libnss_files.so` link in `/usr/lib`.
This task depends upon

Closed by  Christian Hesse (eworm)
Thursday, 10 February 2022, 07:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  systemd 250.3-4
Comment by Doug Newgard (Scimmia) - Thursday, 10 February 2022, 00:36 GMT
What error, exactly?
Comment by Vladimir (_v_l) - Thursday, 10 February 2022, 01:09 GMT
Good point:

$ sudo mkinitcpio -p linux

==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.16.8-arch1-2
-> Running build hook: [base]
-> Running build hook: [systemd]
==> ERROR: file not found: `/usr/lib/libnss_files.so'
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
-> Running build hook: [sd-vconsole]
==> Generating module dependencies
==> Creating xz-compressed initcpio image: /boot/initramfs-linux.img
==> WARNING: errors were encountered during the build. The image may not be complete.
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.16.8-arch1-2
-> Running build hook: [base]
-> Running build hook: [systemd]
==> ERROR: file not found: `/usr/lib/libnss_files.so'
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
-> Running build hook: [sd-vconsole]
==> Generating module dependencies
==> Creating xz-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> WARNING: errors were encountered during the build. The image may not be complete.

$ grep -v '^#'
MODULES=()

BINARIES=()

FILES=()

HOOKS=(base systemd autodetect modconf block filesystems keyboard fsck sd-vconsole)

COMPRESSION="xz"

May be this is not `glibc` fault, may be `systemd` should be rebuild vs new `glibc`?
Comment by Allan McRae (Allan) - Thursday, 10 February 2022, 01:32 GMT Comment by Allan McRae (Allan) - Thursday, 10 February 2022, 01:34 GMT
In more detail... nss code was moved into libc proper:
https://sourceware.org/git/?p=glibc.git;a=commit;h=6212bb67f4695962748a5981e1b9fea105af74f6

This fixes static-only NSS support.
Comment by freswa (frederik) - Thursday, 10 February 2022, 01:39 GMT Comment by Jonathon (jonathon) - Thursday, 10 February 2022, 02:17 GMT
To work around until there's a fix, is it better to temporarily symlink or edit `/usr/lib/initcpio/install/systemd` to remove the line?
Comment by loqs (loqs) - Thursday, 10 February 2022, 05:06 GMT
@jonathon no need to do anything, as Allan noted the code was moved to libc which is already included in the initrd.
Comment by Christian Hesse (eworm) - Thursday, 10 February 2022, 07:03 GMT
So I can drop the file from install hook completely, right?

On the other hand... That breaks current glibc. I guess we should keep compatibility for now.

Loading...