Due to an influx of spam, we have had to temporarily disable account registrations. Please write an email to accountsupport@archlinux.org, with your desired username, if you want to get access. Sorry for the inconvenience.
In current archiso releases, pacman-init.service runs on boot, before system time is synced, and the initialized keys are copied to the newly installed system later. This unfortunately causes future archlinux-keyring updates and installing foreign keyring packages to result in failing to be locally signed when timezone is UTC+x. The culprit is that most of the users would have Windows installed on their system before installing Arch, so the system time is in local timezone. The only way to resolve this is to reset all the keys.
To avoid this, we should wait for NTP service to complete syncing before running pacman-key --init. For example, systemd provides systemd-time-wait-sync.service. Because NTP services require network connection, perhaps the service can be removed and we can let users do that manually instead.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
Activity
Sort or filter
Newest first
Oldest first
Show all activity
Show comments only
Show history only
Mike Yuanchanged the descriptionCompare with previous version
This unfortunately causes future archlinux-keyring updates and installing foreign keyring packages to result in failing to be locally signed when timezone is UTC+x.
Could you post the error message that indicates the failure.
To avoid this, we should wait for NTP service to complete syncing before running pacman-key --init.
According to systemd.special(7),
pacman-init.service would need After=time-sync.target and we'd need to enable systemd-timesyncd.service and systemd-time-wait-sync.service.
I don't really like the idea of automating and pre-configuring even more things.
Or maybe we can reinitialize the keys instead of copying them during pacstrap. Users following the Installation guide should have their system time synced by then.
This can probably solve another problem too—sometimes the shipped archlinux-keyring package in monthly released archiso becomes outdated and needs manual intervention because some of the core packages are signed using the new keys. While pacstrapping we can install the latest one first and initialize the keys in the new system.
pacstrap uses the host's pacman keyring even if it doesn't copy it to the target. If any package you're pacstrapping is signed with a key not in the host's pacman keyring, it will fail.
the initialized keys are copied to the newly installed system
This can be avoided with pacstrap's -G option. Though that may not be the nicest solution, since now you'd need to manually create the pacman keyring in the new system.
Mike Yuanchanged title from pacman-init.service should always run after time is synced to pacman keyrings should be initialized after time is synced
changed title from pacman-init.service should always run after time is synced to pacman keyrings should be initialized after time is synced
Since arch-boxes enable systemd-timesyncd.service, the solution for it would be to additionally enable systemd-time-wait-sync.service and add After=time-sync.target to arch-boxes' pacman-init.service.
With #191 (closed) going for a proper fix in pacman-key and thus decoupling it from this issue, the option of automating more (i.e. enabling systemd-timesyncd.service and systemd-time-wait-sync.service, and ordering pacman-init.service after time-sync.target) becomes viable here.
infrastructure@1ae3a815 says that waiting for systemd-time-wait-sync.service can take about 30 seconds. Hopefully the delay will not be that noticeable.