public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - permit queries from rpmdb on read-only media (#671200)
Date: Mon, 23 Nov 2026 09:26:51 GMT	[thread overview]
Message-ID: <179542601113.1.1350426603853269047.rpms-rpm-7528e0627e31@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 7528e0627e311b08aea2fc2bf7cef9ac63a0a9f3
Author : Panu Matilainen <pmatilai@redhat.com>
Date   : 2011-01-21T09:38:28+02:00
Stats  : +27/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/7528e0627e311b08aea2fc2bf7cef9ac63a0a9f3?branch=pmatilai-v6

Log:
- permit queries from rpmdb on read-only media (#671200)

---
diff --git a/rpm-4.9.0-beta1-rofs-rpmdb.patch b/rpm-4.9.0-beta1-rofs-rpmdb.patch
new file mode 100644
index 0000000..2e2c944
--- /dev/null
+++ b/rpm-4.9.0-beta1-rofs-rpmdb.patch
@@ -0,0 +1,20 @@
+commit f1f7b59dab0c09402790daa04441fac435f52e26
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date:   Fri Jan 21 09:32:58 2011 +0200
+
+    Permit queries from rpmdb on read-only media (RhBug:671200)
+    (cherry picked from commit a429c99e13fbe9926243f29b78df8d64222c4469)
+
+diff --git a/lib/backend/db3.c b/lib/backend/db3.c
+index 45b5363..365cd13 100644
+--- a/lib/backend/db3.c
++++ b/lib/backend/db3.c
+@@ -171,7 +171,7 @@ static int db_init(rpmdb rdb, const char * dbhome)
+ 	free(fstr);
+ 
+ 	rc = (dbenv->open)(dbenv, dbhome, eflags, rdb->db_perms);
+-	if (rc == EACCES) {
++	if (rc == EACCES || rc == EROFS) {
+ 	    eflags |= DB_PRIVATE;
+ 	    retry_open--;
+ 	} else {

diff --git a/rpm.spec b/rpm.spec
index bc373e0..7288bf3 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -22,7 +22,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}1%{?dist}
+Release: %{?snapver:0.%{snapver}.}2%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/rpm-4.8.x/%{name}-%{srcver}.tar.bz2
@@ -41,6 +41,7 @@ Patch3: rpm-4.8.0-no-man-dirs.patch
 Patch4: rpm-4.8.1-use-gpg2.patch
 
 # Patches already in upstream
+Patch100: rpm-4.9.0-beta1-rofs-rpmdb.patch
 
 # These are not yet upstream
 Patch301: rpm-4.6.0-niagara.patch
@@ -205,6 +206,8 @@ packages on a system.
 %patch3 -p1 -b .no-man-dirs
 %patch4 -p1 -b .use-gpg2
 
+%patch100 -p1 -b .rofs-rpmdb
+
 %patch301 -p1 -b .niagara
 %patch302 -p1 -b .geode
 
@@ -414,6 +417,9 @@ exit 0
 %doc COPYING doc/librpm/html/*
 
 %changelog
+* Fri Jan 21 2011 Panu Matilainen <pmatilai@redhat.com> - 4.9.0-0.beta1.2
+- permit queries from rpmdb on read-only media (#671200)
+
 * Tue Jan 18 2011 Panu Matilainen <pmatilai@redhat.com> - 4.9.0-0.beta1.1
 - rpm 4.9.0-beta1 (http://rpm.org/wiki/Releases/4.9.0)
   - drop no longer needed patches

                 reply	other threads:[~2026-11-23  9:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542601113.1.1350426603853269047.rpms-rpm-7528e0627e31@fedoraproject.org \
    --to=pmatilai@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox