public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-sequoia-cert-store] epel10: Include proposed patch to restore compatibility with sqlite < 3.35
@ 2026-06-15 13:11 Fabio Valentini
  0 siblings, 0 replies; only message in thread
From: Fabio Valentini @ 2026-06-15 13:11 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rust-sequoia-cert-store
Branch : epel10
Commit : 1ca9caeceeae58d84ea32fadfa999a05921d705c
Author : Fabio Valentini <decathorpe@gmail.com>
Date   : 2024-04-09T18:39:10+02:00
Stats  : +40/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-sequoia-cert-store/c/1ca9caeceeae58d84ea32fadfa999a05921d705c?branch=epel10

Log:
Include proposed patch to restore compatibility with sqlite < 3.35

---
diff --git a/68.patch b/68.patch
new file mode 100644
index 0000000..0218521
--- /dev/null
+++ b/68.patch
@@ -0,0 +1,37 @@
+From 164dadf70036b6501f373aaa00b5a07ae770450a Mon Sep 17 00:00:00 2001
+From: "Neal H. Walfield" <neal@sequoia-pgp.org>
+Date: Tue, 9 Apr 2024 17:28:44 +0200
+Subject: [PATCH] Use simpler SQL.
+
+  - `INSERT .. ON CONFLICT DO UPDATE` is only supported by SQLite
+    3.35.0 or later.
+
+  - RHEL 9 has version 3.34.
+
+  - Use `INSERT OR REPLACE`, which is equivalent, and is supported by
+    earlier versions of SQLite.
+
+  - Fixes #23.
+---
+ src/store/certd.rs | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/store/certd.rs b/src/store/certd.rs
+index a93bd8b..1f78a4d 100644
+--- a/src/store/certd.rs
++++ b/src/store/certd.rs
+@@ -1732,9 +1732,8 @@ impl<'a> CertD<'a> {
+         // First, insert the cert and get its row id.
+         *commit = *commit && {
+             let mut stmt = tx.prepare_cached(
+-                "INSERT INTO certs (tag, keyid, fingerprint) \
+-                 VALUES (?1, ?2, ?3) \
+-                 ON CONFLICT DO UPDATE SET tag = ?1")?;
++                "INSERT OR REPLACE INTO certs (tag, keyid, fingerprint) \
++                 VALUES (?1, ?2, ?3)")?;
+             ignore_sqlite_busy(stmt.execute(params![
+                 tag2db(tag), keyid2db(&keyid), &cert_fp_db]))?
+         };
+-- 
+GitLab
+

diff --git a/rust-sequoia-cert-store.spec b/rust-sequoia-cert-store.spec
index 5697e25..c627896 100644
--- a/rust-sequoia-cert-store.spec
+++ b/rust-sequoia-cert-store.spec
@@ -18,6 +18,9 @@ Patch:          sequoia-cert-store-fix-metadata-auto.diff
 # * relax rusqlite dependency to allow building with version 0.28
 # * exclude integration tests, test data, and scripts from installed files
 Patch:          sequoia-cert-store-fix-metadata.diff
+# * include proposed patch to restore compatibility with sqlite < 3.35:
+#   https://gitlab.com/sequoia-pgp/sequoia-cert-store/-/merge_requests/68
+Patch:          https://gitlab.com/sequoia-pgp/sequoia-cert-store/-/merge_requests/68.patch
 
 BuildRequires:  cargo-rpm-macros >= 24
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-15 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 13:11 [rpms/rust-sequoia-cert-store] epel10: Include proposed patch to restore compatibility with sqlite < 3.35 Fabio Valentini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox