From de8923f8b22088ef5410b0e257b2dedc18f2b2aa Mon Sep 17 00:00:00 2001 From: nl6720 Date: Wed, 31 Aug 2022 15:53:23 +0300 Subject: [PATCH] Remove pacman-init.service from releng pacman-init.service causes more problems than it's worth. Due to archlinux-keyring bloat, it takes too long to finish making it possible to corrupt the keyring if pacman or pacstrap is used before pacman-init.service is done. If the timezone is in UTC+X, gpg as run by pacman-key will create and sign the keys with a future timestamp causing issues when updating the pacman keyring. The solutions were to either: * Automate more. Enable systemd-timesyncd.service and systemd-time-wait-sync.service. Order pacman-init.service after time-sync.target. * Automate less. Get rid of pacman-init.service entirely. "Automating more" just means more automagic that makes the releng profile differ from a newly installed system. Which in turn gives false expectations for those installing Arch. This change will require that users manually initialize the pacman keyring and populate the keys in the live environment. I.e. these commands will now need to be run manually: # pacman-key --init # pacman-key --populate Alternatively, using the latest Arch Linux keyring from the repos: # pacman-key --init # pacman -Sy archlinux-keyring Regardless of the chosen commands, they should be run after the system time is synced via NTP. Fixes #190 Fixes #191 --- .../multi-user.target.wants/pacman-init.service | 1 - .../airootfs/etc/systemd/system/pacman-init.service | 13 ------------- 2 files changed, 14 deletions(-) delete mode 120000 configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service delete mode 100644 configs/releng/airootfs/etc/systemd/system/pacman-init.service diff --git a/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service b/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service deleted file mode 120000 index d09eec6..0000000 --- a/configs/releng/airootfs/etc/systemd/system/multi-user.target.wants/pacman-init.service +++ /dev/null @@ -1 +0,0 @@ -../pacman-init.service \ No newline at end of file diff --git a/configs/releng/airootfs/etc/systemd/system/pacman-init.service b/configs/releng/airootfs/etc/systemd/system/pacman-init.service deleted file mode 100644 index b18f7f8..0000000 --- a/configs/releng/airootfs/etc/systemd/system/pacman-init.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Initializes Pacman keyring -Requires=etc-pacman.d-gnupg.mount -After=etc-pacman.d-gnupg.mount - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/pacman-key --init -ExecStart=/usr/bin/pacman-key --populate - -[Install] -WantedBy=multi-user.target