OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
pacman-aur high occasional DISPUTE

Fix 'missing required signature' on repositories that do not sign their databases

archomarchyendeavouroscachyosmanjarodesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Mechanism confirmed in libalpm be_sync.c: download_signature = siglevel & ALPM_SIG_DATABASE and signature_optional = siglevel & ALPM_SIG_DATABASE_OPTIONAL. With database Required, a 404 on .db.sig is therefore a hard download error, and signing.c prints %s: missing required signature when the siglist is empty and not optional. HEAD requests on 2026-10-05: omarchy.db.sig on pkgs.omarchy.org, core.db.sig on stable-mirror.omarchy.org and on geo.mirror.pkgbuild.com all return 404, and cachyos.db.sig returns 200. On this machine, /etc/pacman.conf line 15 is SigLevel = Required DatabaseOptional, and pacman-conf -r <repo> SigLevel prints nothing for core, extra, multilib and omarchy. The three templates in /usr/share/omarchy/default/pacman carry the same line, and omarchy-refresh-pacman, which omarchy-channel-set calls, copies them over /etc/pacman.conf. Two errors. pacman.conf(5) says a repo SigLevel starts from the [options] value and later options supplement it, so SigLevel = PackageRequired under a repo leaves the database level at whatever the global line says. Under a hardened global Required, it fixes nothing. The fix now uses an explicit Required DatabaseOptional per repo. The danger says Optional and TrustAll turn off package signature checking, but pacman.conf(5) says Optional still checks signatures when present and TrustAll still requires the key in the keyring. Cause and danger rewritten. The pre-refresh-pacman hook (~/.config/omarchy/hooks/pre-refresh-pacman.d) is mentioned as the supported way to keep a custom pacman.conf. Not exercised: no sync was run.

The cause above was rewritten on 2026-10-05 to match this note; the fix was corrected by the audit itself.
RISK

Fix this by relaxing only the database level. Do not reach for SigLevel = Never on a repo, which turns off signature checking for its packages too. Optional still checks a signature that is present but accepts unsigned packages, and TrustAll accepts signatures from keys in the keyring that are not fully trusted. Both weaken package verification more than this problem needs. Do not follow a bare pacman -Sy after editing pacman.conf, because it is a partial upgrade.

Symptom

After hardening pacman's SigLevel, or after adding a third-party repository with a SigLevel line copied from somewhere, syncing fails:


error: failed retrieving file 'omarchy.db.sig' from pkgs.omarchy.org : The requested URL returned error: 404
error: failed to synchronize all databases (...)

or, when a database is already on disk without its signature:


error: omarchy: missing required signature
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

and later error: database 'core' is not valid (invalid or corrupted database (PGP signature)). Every repo can fail at once, including core and extra, and refreshing keyrings changes nothing.

Cause

SigLevel = Required means signatures are required on packages and on databases (pacman.conf(5)). Arch's official repositories sign packages but not databases, which is why the stock line is SigLevel = Required DatabaseOptional and why the Arch wiki says that if Required is set, DatabaseOptional should also be set. When the database level is required, libalpm downloads <repo>.db.sig as a mandatory file, so a 404 fails the sync. A database already on disk without its signature fails _alpm_check_pgp_helper with missing required signature, reported as invalid or corrupted database (PGP signature).

Checked on 2026-10-05 with HEAD requests: core.db.sig on an Arch mirror and on Omarchy's stable-mirror.omarchy.org, and omarchy.db.sig on pkgs.omarchy.org, all return 404, while CachyOS's cachyos.db.sig returns 200. On Omarchy 4 the [omarchy], [core], [extra] and [multilib] sections carry no SigLevel of their own (pacman-conf -r omarchy SigLevel prints nothing), so they all inherit the global line, and changing the global line to plain Required breaks all four. A SigLevel line in a repo section starts from the global value and then overrides it option by option, so a copied SigLevel = Required under one repo makes that repo's database required and breaks only that repo.

Fix

See what each repository is actually asked for:


pacman-conf SigLevel                       # the global level
for r in $(pacman-conf --repo-list); do echo "[$r] $(pacman-conf -r "$r" SigLevel | tr '\n' ' ')"; done

A repo listed with DatabaseRequired, or with nothing when the global level shows DatabaseRequired, is the one to fix. Restore the stock global line in /etc/pacman.conf:


[options]
SigLevel = Required DatabaseOptional

For a third-party repository that signs packages but not its database, spell out both levels in its section. A repo line starts from the global value, so naming only the package level would leave a hardened global database level in force:


[somerepo]
SigLevel = Required DatabaseOptional
Include = /etc/pacman.d/somerepo-mirrorlist

Then sync and upgrade together.

Omarchy 4:


omarchy update

Plain Arch:


sudo pacman -Syu

Omarchy 4 note: omarchy refresh pacman and omarchy channel set copy /usr/share/omarchy/default/pacman/pacman-<channel>.conf over /etc/pacman.conf (keeping the old file as /etc/pacman.conf.bak), and those templates ship SigLevel = Required DatabaseOptional. So a channel switch also undoes a hand-hardened SigLevel, along with any custom repositories. To re-apply your own changes automatically, put a script in ~/.config/omarchy/hooks/pre-refresh-pacman.d/, which runs after the copy and before the upgrade.

Verify

pacman-conf SigLevel shows DatabaseOptional. omarchy update (or sudo pacman -Syu) syncs every database with no missing required signature and no .db.sig 404.

Sources

database-signature-required-repo-publishes-none