initialise keyring earlier in the sandbox lifecycle#4203
initialise keyring earlier in the sandbox lifecycle#4203arcayr wants to merge 2 commits intosystemd:mainfrom
Conversation
|
simplest reproducer of the original problem can be found from ~bluca here, however the setup i had was adding cachyos repositories. while i can see why it's happening after the fact, i cannot replicate the build failure even on a completely fresh config, so i'll need to spend some time reverse-investigating to find a middle ground. |
|
This does not work because we need to sync the repository metadata to be able to download the Arch keyring using pacman if --repository-key-fetch= is enabled. |
|
posted on matrix but copying it here because it's easier to follow. i guess my core issue is that i need to call i patched my local to simply call i have a few alternatives in mind but all of them would require a bigger rework of the |
If the user brings their own keys and repositories, the keys will need to be registered in pacman's keyring prior to first sync.
|
alright double keyring calling it is. unsetting running |
|
Seems to solve it for me ! |
|
Hmm apparently I'm not having any problems any more without this patch either... |
#4093 moved the keyring initialisation later in the setup lifecycle as part of normalising arch/pacman setup. if any custom repositories are used, pacman requires the keys to exist for all configured repositories from the get-go or exits immediately. let's set this up earlier in the sandbox lifecycle to provide the requisite keys.
i haven't verified if this breaks any distro other than arch, but i couldn't find any rationale for moving it in the git commit logs so i don't know if it was moved intentionally or incidentally.
original cut of this simply had the pacman installer run
pacman-keytwice (once at setup, and once where it currently runs), but that's is basically begging for hysteresis and i couldn't find any other example of that sort of special casing in the codebase.marked as draft because i'll check other distributions this weekend. if i'm operating on a bad assumption here i can rework this as required.