Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/rpm.git#7bcd4c2489663481cf6d68a583b2d8d30ccf0e75
This commit is contained in:
parent
29244e0a7e
commit
d7a6449e3d
@ -0,0 +1,29 @@
|
|||||||
|
From fd054a40b2ba005571455d749de0423975e77651 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <fd054a40b2ba005571455d749de0423975e77651.1606726599.git.pmatilai@redhat.com>
|
||||||
|
From: Panu Matilainen <pmatilai@redhat.com>
|
||||||
|
Date: Wed, 18 Nov 2020 13:56:14 +0200
|
||||||
|
Subject: [PATCH 1/2] Stop on first failure when trying to open a database
|
||||||
|
(RhBug:1898301)
|
||||||
|
|
||||||
|
If an index open fails there's no point trying to go on, things are
|
||||||
|
not going to work and at least BDB will segfault in some cases...
|
||||||
|
---
|
||||||
|
lib/rpmdb.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
|
||||||
|
index 874f07911..41da9da71 100644
|
||||||
|
--- a/lib/rpmdb.c
|
||||||
|
+++ b/lib/rpmdb.c
|
||||||
|
@@ -355,7 +355,7 @@ static int doOpen(rpmdb db, int justPkgs)
|
||||||
|
{
|
||||||
|
int rc = pkgdbOpen(db, db->db_flags, NULL);
|
||||||
|
if (!justPkgs) {
|
||||||
|
- for (int dbix = 0; dbix < db->db_ndbi; dbix++) {
|
||||||
|
+ for (int dbix = 0; rc == 0 && dbix < db->db_ndbi; dbix++) {
|
||||||
|
rc += indexOpen(db, db->db_tags[dbix], db->db_flags, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From 3cb955b77f07c70ba01d765aa6377908847608f5 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <3cb955b77f07c70ba01d765aa6377908847608f5.1606726599.git.pmatilai@redhat.com>
|
||||||
|
In-Reply-To: <fd054a40b2ba005571455d749de0423975e77651.1606726599.git.pmatilai@redhat.com>
|
||||||
|
References: <fd054a40b2ba005571455d749de0423975e77651.1606726599.git.pmatilai@redhat.com>
|
||||||
|
From: Panu Matilainen <pmatilai@redhat.com>
|
||||||
|
Date: Mon, 23 Nov 2020 13:46:14 +0200
|
||||||
|
Subject: [PATCH 2/2] Only attempt loading the keyring once the rpmdb is open
|
||||||
|
|
||||||
|
When we do lazy rpmdb open in rpmtsInitIterator(), we also do a lazy
|
||||||
|
keyring open. Except that since the keyring typically lives in the rpmdb,
|
||||||
|
we PROBABLY should try open the database first. One of those "WTF I've
|
||||||
|
been smoking" moments, lol.
|
||||||
|
|
||||||
|
Prevents an ugly if mostly harmless double error anything we can't open
|
||||||
|
the database for one reason or another.
|
||||||
|
---
|
||||||
|
lib/rpmts.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/rpmts.c b/lib/rpmts.c
|
||||||
|
index 9fa9cb0e2..8c8ae420a 100644
|
||||||
|
--- a/lib/rpmts.c
|
||||||
|
+++ b/lib/rpmts.c
|
||||||
|
@@ -177,12 +177,12 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag,
|
||||||
|
if (ts == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
- if (ts && ts->keyring == NULL)
|
||||||
|
- loadKeyring(ts);
|
||||||
|
-
|
||||||
|
if (ts->rdb == NULL && rpmtsOpenDB(ts, ts->dbmode))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
+ if (ts->keyring == NULL)
|
||||||
|
+ loadKeyring(ts);
|
||||||
|
+
|
||||||
|
/* Parse out "N(EVR)" tokens from a label key if present */
|
||||||
|
if (rpmtag == RPMDBI_LABEL && keyp != NULL && strchr(keyp, '(')) {
|
||||||
|
const char *se, *s = keyp;
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
8
rpm.spec
8
rpm.spec
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
%global rpmver 4.16.0
|
%global rpmver 4.16.0
|
||||||
#global snapver rc1
|
#global snapver rc1
|
||||||
%global rel 3
|
%global rel 4
|
||||||
|
|
||||||
%global srcver %{rpmver}%{?snapver:-%{snapver}}
|
%global srcver %{rpmver}%{?snapver:-%{snapver}}
|
||||||
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
|
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
|
||||||
@ -60,6 +60,8 @@ Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
|||||||
Patch7: 0001-Issue-deprecation-warning-when-creating-BDB-database.patch
|
Patch7: 0001-Issue-deprecation-warning-when-creating-BDB-database.patch
|
||||||
|
|
||||||
# Patches already upstream:
|
# Patches already upstream:
|
||||||
|
Patch100: 0001-Stop-on-first-failure-when-trying-to-open-a-database.patch
|
||||||
|
Patch101: 0002-Only-attempt-loading-the-keyring-once-the-rpmdb-is-o.patch
|
||||||
|
|
||||||
# These are not yet upstream
|
# These are not yet upstream
|
||||||
Patch906: rpm-4.7.1-geode-i686.patch
|
Patch906: rpm-4.7.1-geode-i686.patch
|
||||||
@ -553,6 +555,10 @@ fi
|
|||||||
%doc doc/librpm/html/*
|
%doc doc/librpm/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 30 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-4
|
||||||
|
- Fix BDB crashing on failed open attempts (#1902395, #1898299, #1900407)
|
||||||
|
- Fix unnecessary double failure on lazy keyring open
|
||||||
|
|
||||||
* Wed Oct 28 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-3
|
* Wed Oct 28 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-3
|
||||||
- Issue deprecation warning when creating BDB databases (#1787311)
|
- Issue deprecation warning when creating BDB databases (#1787311)
|
||||||
- Temporarily disable test-suite due to massive fakechroot breakage
|
- Temporarily disable test-suite due to massive fakechroot breakage
|
||||||
|
Loading…
Reference in New Issue
Block a user