Unsupported host syscalls cause "failed to initialize alpm library"
I regularly build Docker images with specialty tooling to power remote CI jobs using Arch Linux as a base. As of the last couple days all builds on Docker Hub have started to fail. I was using a two week old base image tag but I just tried with the latest one and have the same problem. Local builds of the same Docker containers work fine.
I'm guessing (but not certain at this point) that systemd updates not liking Docker Hub's host environment have something to do with it again.
Here is the tail end of a build log showing the errors:
Step 7/26 : RUN pacman --needed --noconfirm -Syuq && yes | pacman -Sccq
---> Running in 20f78c0afb39
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
downloading alerque.db...
downloading alerque.db.sig...
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (12) curl-7.75.0-1 e2fsprogs-1.46.0-1 findutils-4.8.0-1 gcc-libs-10.2.0-6 glib2-2.66.6-1 glibc-2.33-3 libldap-2.4.57-1 linux-api-headers-5.10.13-1 pacman-mirrorlist-20210206-1 systemd-247.3-1 systemd-libs-247.3-1 systemd-sysvcompat-247.3-1
Total Download Size: 54.81 MiB
Total Installed Size: 249.56 MiB
Net Upgrade Size: 0.04 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
downloading linux-api-headers-5.10.13-1-any.pkg.tar.zst...
downloading glibc-2.33-3-x86_64.pkg.tar.zst...
downloading gcc-libs-10.2.0-6-x86_64.pkg.tar.zst...
downloading findutils-4.8.0-1-x86_64.pkg.tar.zst...
downloading e2fsprogs-1.46.0-1-x86_64.pkg.tar.zst...
downloading libldap-2.4.57-1-x86_64.pkg.tar.zst...
downloading systemd-libs-247.3-1-x86_64.pkg.tar.zst...
downloading curl-7.75.0-1-x86_64.pkg.tar.zst...
downloading glib2-2.66.6-1-x86_64.pkg.tar.zst...
downloading pacman-mirrorlist-20210206-1-any.pkg.tar.zst...
downloading systemd-247.3-1-x86_64.pkg.tar.zst...
downloading systemd-sysvcompat-247.3-1-x86_64.pkg.tar.zst...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
upgrading linux-api-headers...
upgrading glibc...
Generating locales...
en_US.UTF-8... done
Generation complete.
upgrading gcc-libs...
upgrading findutils...
upgrading e2fsprogs...
upgrading libldap...
upgrading systemd-libs...
upgrading curl...
upgrading glib2...
upgrading pacman-mirrorlist...
[91mwarning: /etc/pacman.d/mirrorlist installed as /etc/pacman.d/mirrorlist.pacnew
[0mupgrading systemd...
upgrading systemd-sysvcompat...
:: Running post-transaction hooks...
(1/9) Creating system user accounts...
(2/9) Updating journal message catalog...
(3/9) Reloading system manager configuration...
Skipped: Current root is not booted.
(4/9) Updating udev hardware database...
(5/9) Applying kernel sysctl settings...
Skipped: Current root is not booted.
(6/9) Creating temporary files...
/usr/lib/tmpfiles.d/journal-nocow.conf:26: Failed to resolve specifier: uninitialized /etc detected, skipping
All rules containing unresolvable specifiers will be skipped.
(7/9) Reloading device manager configuration...
Skipped: Device manager is not running.
(8/9) Arming ConditionNeedsUpdate...
(9/9) Reloading system bus configuration...
Skipped: Current root is not booted.
[91merror: failed to initialize alpm library
(could not find or read directory: /var/lib/pacman/)
[0mThe command '/bin/sh -c pacman --needed --noconfirm -Syuq && yes | pacman -Sccq' returned a non-zero code: 255
build hook failed! (255)