Skip to contentSkip to conversation

libsolv: fix a kernel-devsrc installation issue

PATCH New [email protected] 1 participant 2 messages Oct 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsolv: fix a kernel-devsrc installation issue

From: Ming Liu <[email protected]>

This patch aims to fix a kernel-devsrc rpm installation failure on target, I had sent the patch to libsolv upstream, but its maintainers rejected it with the reason:
...
we probably want to sync these values with RPM code...
...

I am not a rpm expert, would somebody please comment on this? Is this a issue also should be addressed in rpm?

Ming Liu (1):
libsolv: fix a kernel-devsrc installation issue

 ....c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch | 35 ++++++++++++++++++++++
 meta/recipes-extended/libsolv/libsolv_0.6.28.bb    |  3 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 libsolv: fix a kernel-devsrc installation issue

From: Ming Liu <[email protected]>

We encountered a problem when installing kernel-devsrc package on a intel-x86 target, as follows:

$ dnf install kernel-devsrc
| Installing : kernel-devsrc-1.0-r0.0.intel_corei7_64 1/1
| failed loading RPMDB
| The downloaded packages were saved in cache until the next successful transaction.
| You can remove cached packages by executing 'dnf clean packages'.

It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE in libsolv per test.

---
 ....c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch | 35 ++++++++++++++++++++++
 meta/recipes-extended/libsolv/libsolv_0.6.28.bb    |  3 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch
meta/recipes-extended/libsolv/libsolv/0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch new file +35 -0
new file mode 100644
index 0000000..4a4e5cb
@@ -0,0 +1,35 @@
+From 1c4c935cb73ac1ccb9693df1a51ba218a22e8ca8 Mon Sep 17 00:00:00 2001
+From: Ming Liu <[email protected]>
+Date: Sat, 30 Sep 2017 11:15:16 +0800
+Subject: [PATCH] repo_rpmdb.c: increase MAX_HDR_CNT and MAX_HDR_DSIZE
+
+Upstream-Status: Submitted [https://github.com/openSUSE/libsolv/pull/230]
+
+We encountered 'corrupt rpm' issues when installing extreme big RPM
+packages like the kernel-devsrc package of Yocto project.
+
+It can be fixed by increasing MAX_HDR_CNT and MAX_HDR_DSIZE per test.
+
+Signed-off-by: Ming Liu <[email protected]>
+---
+ ext/repo_rpmdb.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
+index c7000a9..7000835 100644
+--- a/ext/repo_rpmdb.c
++++ b/ext/repo_rpmdb.c
+@@ -170,8 +170,8 @@
+ #define MAX_SIG_CNT		0x100000
+ #define MAX_SIG_DSIZE		0x100000
+ 
+-#define MAX_HDR_CNT		0x100000
+-#define MAX_HDR_DSIZE		0x2000000
++#define MAX_HDR_CNT		0x200000
++#define MAX_HDR_DSIZE		0x4000000
+ 
+ typedef struct rpmhead {
+   int cnt;
+-- 
+2.7.4
+
meta/recipes-extended/libsolv/libsolv_0.6.28.bb +2 -1
index 3a48f22..6c8f7fc 100644
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 DEPENDS = "expat zlib rpm"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
-           "
+           file://0001-repo_rpmdb.c-increase-MAX_HDR_CNT-and-MAX_HDR_DSIZE.patch \
+          "
 SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch \
                              file://0002-Fixes-to-internal-fopencookie-implementation.patch \
                            "
Signature · 1 line
2.7.4