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 +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 - 4.9.0-0.beta1.2 +- permit queries from rpmdb on read-only media (#671200) + * Tue Jan 18 2011 Panu Matilainen - 4.9.0-0.beta1.1 - rpm 4.9.0-beta1 (http://rpm.org/wiki/Releases/4.9.0) - drop no longer needed patches