From 30c3951925a21a32f1cb7bb5932e6195bc606659 Mon Sep 17 00:00:00 2001 From: Torxed Date: Mon, 19 May 2025 16:56:47 +0200 Subject: [PATCH 1/5] Added --skip-wkd to skip waiting for the arch linux keyring wkd sync --- archinstall/lib/args.py | 6 ++++++ archinstall/lib/installer.py | 15 +++++++------ docs/help/known_issues.rst | 42 ++++++++++++++++++++++++++++++++---- tests/test_args.py | 2 ++ 4 files changed, 54 insertions(+), 11 deletions(-) diff --git a/archinstall/lib/args.py b/archinstall/lib/args.py index fa2e44fd6b..761f7a5b9d 100644 --- a/archinstall/lib/args.py +++ b/archinstall/lib/args.py @@ -319,6 +319,12 @@ def _define_arguments(self) -> ArgumentParser: help="Disables NTP checks during installation", default=False, ) + parser.add_argument( + "--skip-wkd", + action="store_true", + help="Disables NTP checks during installation", + default=False, + ) parser.add_argument( "--debug", action="store_true", diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index dd90271dfb..d3f02480f0 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -196,14 +196,15 @@ def _verify_service_stop(self) -> None: # while self._service_state('pacman-init') not in ('dead', 'failed', 'exited'): # time.sleep(1) - info(tr("Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.")) - # Wait for the timer to kick in - while self._service_started("archlinux-keyring-wkd-sync.timer") is None: - time.sleep(1) + if not arch_config_handler.args.skip_wkd: + info(tr("Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete.")) + # Wait for the timer to kick in + while self._service_started("archlinux-keyring-wkd-sync.timer") is None: + time.sleep(1) - # Wait for the service to enter a finished state - while self._service_state("archlinux-keyring-wkd-sync.service") not in ("dead", "failed", "exited"): - time.sleep(1) + # Wait for the service to enter a finished state + while self._service_state("archlinux-keyring-wkd-sync.service") not in ("dead", "failed", "exited"): + time.sleep(1) def _verify_boot_part(self) -> None: """ diff --git a/docs/help/known_issues.rst b/docs/help/known_issues.rst index 450817eab4..cfba35f0a7 100644 --- a/docs/help/known_issues.rst +++ b/docs/help/known_issues.rst @@ -19,6 +19,39 @@ Restarting ``systemd-timesyncd.service`` might work but most often you need to c If you know your time is correct on the machine, you can run ``archinstall --skip-ntp`` to ignore time sync. +Waiting for Arch Linux keyring sync (archlinux-keyring-wkd-sync) to complete. `#2679`_ +------------------------------ + +The ``archlinux-keyring-wkd-sync.service`` or ``archlinux-keyring-wkd-sync.timer`` can hang "indefinitely" some times. +This is usually due to an inability to reach the key servers, or a slow connection towards key servers. + +The script ``/usr/bin/archlinux-keyring-wkd-sync`` can be run manually, to verify if it's executing slowly or not. + +If ``systemctl show --property=ActiveEnterTimestamp --no-pager archlinux-keyring-wkd-sync.timer`` shows nothing, it means the built-in sync never finished. Likewise ``systemctl show --no-pager -p SubState --value archlinux-keyring-wkd-sync.service`` most likely shows ``dead``, which means the service never completed. + +To fix this, try the following: + +.. code-block:: console + + # killall gpg-agent + # rm -rf /etc/pacman.d/gnupg + # pacman-key --init + # pacman-key --populate + # pacman -Sy archlinux-keyring + # systemctl restart archlinux-keyring-wkd-sync.timer + +.. note:: + + If you know the ISO is the latest, and that you have valid GPG keys, try ``archinstall --skip-wkd`` to ignore waiting for the sync. + + If you skip WKD sync, you might end up with: + + .. code-block:: console + + > error: celt: signature from "Anton Hvornum (Torxed) " is unknown trust + > :: File /var/cache/pacman/pkg/archinstall-1.2.3-4-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)). + > Do you want to delete it? [Y/n] + Missing Nvidia Proprietary Driver `#2002`_ ------------------------------------------ @@ -87,11 +120,12 @@ This means that feature requests like supporting filesystems such as `ZFS`_ can This will allow for unsupported usage of AUR during installation. -.. _#2213: https://github.com/archlinux/archinstall/issues/2213 -.. _#2185: https://github.com/archlinux/archinstall/issues/2185 -.. _#2144: https://github.com/archlinux/archinstall/issues/2144 -.. _#2002: https://github.com/archlinux/archinstall/issues/2002 .. _#1686: https://github.com/archlinux/archinstall/issues/1686 +.. _#2002: https://github.com/archlinux/archinstall/issues/2002 +.. _#2144: https://github.com/archlinux/archinstall/issues/2144 +.. _#2185: https://github.com/archlinux/archinstall/issues/2185 +.. _#2213: https://github.com/archlinux/archinstall/issues/2213 +.. _#2679: https://github.com/archlinux/archinstall/issues/2679 .. _linux-headers: https://archlinux.org/packages/core/x86_64/linux-headers/ .. _nvidia-dkms: https://archlinux.org/packages/extra/x86_64/nvidia-dkms/ .. _x86_64: https://wiki.archlinux.org/title/Frequently_asked_questions#What_architectures_does_Arch_support? diff --git a/tests/test_args.py b/tests/test_args.py index 650260f0fd..7904f932f9 100644 --- a/tests/test_args.py +++ b/tests/test_args.py @@ -34,6 +34,7 @@ def test_default_args(monkeypatch: MonkeyPatch) -> None: script="guided", mountpoint=Path("/mnt"), skip_ntp=False, + skip_wkd=False, debug=False, offline=False, no_pkg_lookups=False, @@ -87,6 +88,7 @@ def test_correct_parsing_args( script="execution_script", mountpoint=Path("/tmp"), skip_ntp=True, + skip_wkd=True, debug=True, offline=True, no_pkg_lookups=True, From 5c03bb4af802fa0ae8f65c8365f86fb2f3e4bf6a Mon Sep 17 00:00:00 2001 From: Torxed Date: Mon, 19 May 2025 17:54:08 +0200 Subject: [PATCH 2/5] Package spelling error --- docs/help/known_issues.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/help/known_issues.rst b/docs/help/known_issues.rst index cfba35f0a7..bf039dcbc4 100644 --- a/docs/help/known_issues.rst +++ b/docs/help/known_issues.rst @@ -48,7 +48,7 @@ To fix this, try the following: .. code-block:: console - > error: celt: signature from "Anton Hvornum (Torxed) " is unknown trust + > error: archinstall: signature from "Anton Hvornum (Torxed) " is unknown trust > :: File /var/cache/pacman/pkg/archinstall-1.2.3-4-x86_64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)). > Do you want to delete it? [Y/n] From 20c242488ce617f015a824f4eb95e574a60820eb Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 19 May 2025 18:42:23 +0200 Subject: [PATCH 3/5] Forgot to add argument to Arguments() --- archinstall/lib/args.py | 1 + 1 file changed, 1 insertion(+) diff --git a/archinstall/lib/args.py b/archinstall/lib/args.py index 761f7a5b9d..86720f3dd3 100644 --- a/archinstall/lib/args.py +++ b/archinstall/lib/args.py @@ -42,6 +42,7 @@ class Arguments: script: str = "guided" mountpoint: Path = Path("/mnt") skip_ntp: bool = False + skip_wkd: bool = False debug: bool = False offline: bool = False no_pkg_lookups: bool = False From 437261e95441417aeaad8a1bfbcb7fc6a808e9db Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 19 May 2025 18:48:15 +0200 Subject: [PATCH 4/5] Added missing --skip-wkd arg to arg tester --- tests/test_args.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_args.py b/tests/test_args.py index 7904f932f9..3467bd006e 100644 --- a/tests/test_args.py +++ b/tests/test_args.py @@ -64,6 +64,7 @@ def test_correct_parsing_args( "--mountpoint", "/tmp", "--skip-ntp", + "--skip-wkd", "--debug", "--offline", "--no-pkg-lookups", From 7910444a90f7b527ae3a74b72fb11b27d97a5da0 Mon Sep 17 00:00:00 2001 From: Torxed Date: Mon, 19 May 2025 22:37:03 +0200 Subject: [PATCH 5/5] Corrected help text for --skip-wkd --- archinstall/lib/args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archinstall/lib/args.py b/archinstall/lib/args.py index 86720f3dd3..aaa63fb448 100644 --- a/archinstall/lib/args.py +++ b/archinstall/lib/args.py @@ -323,7 +323,7 @@ def _define_arguments(self) -> ArgumentParser: parser.add_argument( "--skip-wkd", action="store_true", - help="Disables NTP checks during installation", + help="Disables checking if archlinux keyring wkd sync is complete.", default=False, ) parser.add_argument(