]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
rpm: Set pkgverify_level to digest
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 21 Jan 2026 09:05:24 +0000 (10:05 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 22 Jan 2026 10:26:30 +0000 (11:26 +0100)
This was changed to all in rpm 6.0.0, which means that rpm is checking
for signatures from dnf/zypper repos that have gpgcheck=0. dnf5 was updated
to deal with this but for some reason the fix isn't working in Arch and zypper
doesn't deal with this at all, so revert back to the previous level until
package managers can actually deal with this.

mkosi/installer/rpm.py

index a7929f1d6eb5293e9b7df1fa322430aaca23046c..a90c59cdf743f90bd8404acbab5e402d69331a8e 100644 (file)
@@ -91,6 +91,10 @@ def setup_rpm(
     if dbbackend:
         (confdir / "macros.db_backend").write_text(f"%_db_backend {dbbackend}")
 
+    # TODO: Drop when zypper and dnf5 correctly disable signature checks for gpgcheck=0 repositories.
+    if not (confdir / "macros.pkgverify_level").exists():
+        (confdir / "macros.pkgverify_level").write_text("%_pkgverify_level digest")
+
     if context.config.distribution == Distribution.opensuse or (
         context.config.distribution.is_centos_variant() and context.config.release == "9"
     ):