public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Update latest patches from merged versions
@ 2026-11-23 9:31 Igor Gnatenko
0 siblings, 0 replies; only message in thread
From: Igor Gnatenko @ 2026-11-23 9:31 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 8896954ef271f3fafbeba850686964aa2931379a
Author : Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date : 2017-07-29T10:12:20+02:00
Stats : +282/-302 in 10 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/8896954ef271f3fafbeba850686964aa2931379a?branch=pmatilai-v6
Log:
Update latest patches from merged versions
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
---
diff --git a/0001-remove-duplicated-call-to-strlen.patch b/0001-remove-duplicated-call-to-strlen.patch
deleted file mode 100644
index 0eb8dab..0000000
--- a/0001-remove-duplicated-call-to-strlen.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 726e2bb66c16e3a70664185b246de910dc5b9010 Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
-Date: Fri, 28 Jul 2017 14:32:20 +0200
-Subject: [PATCH] remove duplicated call to strlen()
-
-It is already done few lines above.
-
-Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
----
- build/files.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/build/files.c b/build/files.c
-index 9b1d2cd98..2238c2453 100644
---- a/build/files.c
-+++ b/build/files.c
-@@ -2764,7 +2764,6 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
- int namel = strlen(name);
-
- /* strip trailing .debug like in find-debuginfo.sh */
-- namel = strlen(name);
- if (namel > 6 && !strcmp(name + namel - 6, ".debug"))
- namel -= 6;
-
diff --git a/0002-store-path-of-excluded-files.patch b/0002-store-path-of-excluded-files.patch
deleted file mode 100644
index fca1b27..0000000
--- a/0002-store-path-of-excluded-files.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 90007b550cf585c9cb9427e1fd0b2d8f56c9c2b5 Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
-Date: Fri, 28 Jul 2017 14:33:29 +0200
-Subject: [PATCH] store path of excluded files
-
-We will need this in next commit so we know which files
-were excluded and we will exclude respective debug files.
-
-Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
----
- build/files.c | 6 +++++-
- build/rpmbuild_internal.h | 1 +
- build/spec.c | 2 ++
- 3 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/build/files.c b/build/files.c
-index 2238c2453..988b3b315 100644
---- a/build/files.c
-+++ b/build/files.c
-@@ -1060,7 +1060,11 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc)
- }
-
- /* Skip files that were marked with %exclude. */
-- if (flp->flags & RPMFILE_EXCLUDE) continue;
-+ if (flp->flags & RPMFILE_EXCLUDE)
-+ {
-+ argvAdd(&pkg->fileExcludeList, flp->diskPath);
-+ continue;
-+ }
-
- /* Collect on-disk paths for archive creation */
- pkg->dpaths[npaths++] = xstrdup(flp->diskPath);
-diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
-index 1c3332faf..5978a6d32 100644
---- a/build/rpmbuild_internal.h
-+++ b/build/rpmbuild_internal.h
-@@ -118,6 +118,7 @@ struct Package_s {
-
- ARGV_t fileFile;
- ARGV_t fileList; /* If NULL, package will not be written */
-+ ARGV_t fileExcludeList;
- ARGV_t removePostfixes;
- ARGV_t policyList;
-
-diff --git a/build/spec.c b/build/spec.c
-index 7cb264abd..c33cde7eb 100644
---- a/build/spec.c
-+++ b/build/spec.c
-@@ -101,6 +101,7 @@ Package newPackage(const char *name, rpmstrPool pool, Package *pkglist)
- p->autoProv = 1;
- p->autoReq = 1;
- p->fileList = NULL;
-+ p->fileExcludeList = NULL;
- p->fileFile = NULL;
- p->policyList = NULL;
- p->pool = rpmstrPoolLink(pool);
-@@ -143,6 +144,7 @@ static Package freePackage(Package pkg)
- }
-
- pkg->fileList = argvFree(pkg->fileList);
-+ pkg->fileExcludeList = argvFree(pkg->fileExcludeList);
- pkg->fileFile = argvFree(pkg->fileFile);
- pkg->policyList = argvFree(pkg->policyList);
- pkg->removePostfixes = argvFree(pkg->removePostfixes);
diff --git a/0003-exclude-respective-debug-files-for-files-which-are-e.patch b/0003-exclude-respective-debug-files-for-files-which-are-e.patch
deleted file mode 100644
index ef90f73..0000000
--- a/0003-exclude-respective-debug-files-for-files-which-are-e.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 651d9355f6db9f4d1305c25af5a953289dc8ef47 Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
-Date: Fri, 28 Jul 2017 15:21:00 +0200
-Subject: [PATCH] exclude respective debug files for files which are excluded
-
-Closes: https://github.com/rpm-software-management/rpm/issues/284
-Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
----
- build/files.c | 17 ++++++++++++++++-
- 1 file changed, 16 insertions(+), 1 deletion(-)
-
-diff --git a/build/files.c b/build/files.c
-index 988b3b315..a29730998 100644
---- a/build/files.c
-+++ b/build/files.c
-@@ -1062,7 +1062,7 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc)
- /* Skip files that were marked with %exclude. */
- if (flp->flags & RPMFILE_EXCLUDE)
- {
-- argvAdd(&pkg->fileExcludeList, flp->diskPath);
-+ argvAdd(&pkg->fileExcludeList, flp->cpioPath);
- continue;
- }
-
-@@ -2802,6 +2802,21 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
- }
- path = _free(path);
- }
-+ /* Exclude debug files for files which were excluded in respective non-debug package */
-+ for (ARGV_const_t excl = pkg->fileExcludeList; excl && *excl; excl++) {
-+ const char *name = *excl;
-+
-+ /* generate path */
-+ rasprintf(&path, "%s%s%s%s.debug", buildroot, DEBUG_LIB_DIR, name, uniquearch);
-+ /* Exclude only debuginfo files which actually exist */
-+ if (access(path, F_OK) == 0) {
-+ char *line = NULL;
-+ rasprintf(&line, "%%exclude %s", path + buildrootlen);
-+ argvAdd(&files, line);
-+ _free(line);
-+ }
-+ path = _free(path);
-+ }
-
- /* add collected directories to file list */
- if (dirs) {
diff --git a/0004-store-mapping-for-renamed-files.patch b/0004-store-mapping-for-renamed-files.patch
deleted file mode 100644
index 6350fcf..0000000
--- a/0004-store-mapping-for-renamed-files.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From f1e03904fc7173c772cb5795f6df30591f790b01 Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
-Date: Fri, 28 Jul 2017 18:30:37 +0200
-Subject: [PATCH] store mapping for renamed files
-
-We will need this in next commit so we know which original name
-files had, so we can reference appropriate debug file.
-
-Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
----
- build/files.c | 40 +++++++++++++++++++++++++++++-----------
- build/rpmbuild_internal.h | 12 ++++++++++++
- build/spec.c | 2 ++
- 3 files changed, 43 insertions(+), 11 deletions(-)
-
-diff --git a/build/files.c b/build/files.c
-index a29730998..2387a2e5b 100644
---- a/build/files.c
-+++ b/build/files.c
-@@ -50,6 +50,17 @@
- #define DEBUG_ID_DIR "/usr/lib/debug/.build-id"
- #define DEBUG_DWZ_DIR "/usr/lib/debug/.dwz"
-
-+#undef HASHTYPE
-+#undef HTKEYTYPE
-+#undef HTDATATYPE
-+#define HASHTYPE fileRenameHash
-+#define HTKEYTYPE const char *
-+#define HTDATATYPE char *
-+#include "lib/rpmhash.C"
-+#undef HASHTYPE
-+#undef HTKEYTYPE
-+#undef HTDATATYPE
-+
- /**
- */
- enum specfFlags_e {
-@@ -982,19 +993,26 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc)
- }
-
- /* Adjust paths if needed */
-- if (!isSrc && pkg->removePostfixes)
-- for (i = 0, flp = fl->files.recs; i < fl->files.used; i++, flp++) {
-- char * cpiopath = flp->cpioPath;
--
-- for (ARGV_const_t postfix_p = pkg->removePostfixes; *postfix_p; postfix_p++) {
-- int len = strlen(*postfix_p);
-- int plen = strlen(cpiopath);
-- if (len <= plen && !strncmp(cpiopath+plen-len, *postfix_p, len)) {
-- cpiopath[plen-len] = '\0';
-- if (plen-len > 0 && cpiopath[plen-len-1] == '/') {
-- cpiopath[plen-len-1] = '\0';
-+ if (!isSrc && pkg->removePostfixes) {
-+ pkg->fileRenameMap = fileRenameHashCreate(fl->files.used,
-+ rstrhash, strcmp,
-+ (fileRenameHashFreeKey)rfree, (fileRenameHashFreeData)rfree);
-+ for (i = 0, flp = fl->files.recs; i < fl->files.used; i++, flp++) {
-+ char * cpiopath = flp->cpioPath;
-+ char * cpiopath_orig = xstrdup(cpiopath);
-+
-+ for (ARGV_const_t postfix_p = pkg->removePostfixes; *postfix_p; postfix_p++) {
-+ int len = strlen(*postfix_p);
-+ int plen = strlen(cpiopath);
-+ if (len <= plen && !strncmp(cpiopath+plen-len, *postfix_p, len)) {
-+ cpiopath[plen-len] = '\0';
-+ if (plen-len > 0 && cpiopath[plen-len-1] == '/') {
-+ cpiopath[plen-len-1] = '\0';
-+ }
- }
- }
-+ if (strcmp(cpiopath_orig, cpiopath))
-+ fileRenameHashAddEntry(pkg->fileRenameMap, xstrdup(cpiopath), cpiopath_orig);
- }
- }
-
-diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
-index 5978a6d32..b4247ae61 100644
---- a/build/rpmbuild_internal.h
-+++ b/build/rpmbuild_internal.h
-@@ -6,6 +6,17 @@
- #include <rpm/rpmstrpool.h>
- #include "build/rpmbuild_misc.h"
-
-+#undef HASHTYPE
-+#undef HTKEYTYPE
-+#undef HTDATATYPE
-+#define HASHTYPE fileRenameHash
-+#define HTKEYTYPE const char *
-+#define HTDATATYPE char *
-+#include "lib/rpmhash.H"
-+#undef HASHTYPE
-+#undef HTKEYTYPE
-+#undef HTDATATYPE
-+
- struct TriggerFileEntry {
- int index;
- char * fileName;
-@@ -120,6 +131,7 @@ struct Package_s {
- ARGV_t fileList; /* If NULL, package will not be written */
- ARGV_t fileExcludeList;
- ARGV_t removePostfixes;
-+ fileRenameHash fileRenameMap;
- ARGV_t policyList;
-
- Package next;
-diff --git a/build/spec.c b/build/spec.c
-index c33cde7eb..eaa5dce61 100644
---- a/build/spec.c
-+++ b/build/spec.c
-@@ -104,6 +104,7 @@ Package newPackage(const char *name, rpmstrPool pool, Package *pkglist)
- p->fileExcludeList = NULL;
- p->fileFile = NULL;
- p->policyList = NULL;
-+ p->fileRenameMap = NULL;
- p->pool = rpmstrPoolLink(pool);
- p->dpaths = NULL;
-
-@@ -148,6 +149,7 @@ static Package freePackage(Package pkg)
- pkg->fileFile = argvFree(pkg->fileFile);
- pkg->policyList = argvFree(pkg->policyList);
- pkg->removePostfixes = argvFree(pkg->removePostfixes);
-+ pkg->fileRenameMap = fileRenameHashFree(pkg->fileRenameMap);
- pkg->cpioList = rpmfilesFree(pkg->cpioList);
- pkg->dpaths = argvFree(pkg->dpaths);
-
diff --git a/0005-reference-proper-debug-files-whenever-RemovePathPost.patch b/0005-reference-proper-debug-files-whenever-RemovePathPost.patch
deleted file mode 100644
index d6dbb52..0000000
--- a/0005-reference-proper-debug-files-whenever-RemovePathPost.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d145899932ed040cdaaed70a7ce2ea0f11757ab6 Mon Sep 17 00:00:00 2001
-From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
-Date: Fri, 28 Jul 2017 18:32:06 +0200
-Subject: [PATCH] reference proper debug files whenever RemovePathPostfixes is
- used
-
-Closes: https://github.com/rpm-software-management/rpm/issues/280
-Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
----
- build/files.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/build/files.c b/build/files.c
-index 2387a2e5b..a4b5cd6e8 100644
---- a/build/files.c
-+++ b/build/files.c
-@@ -2788,6 +2788,19 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
- /* strip trailing .debug like in find-debuginfo.sh */
- if (namel > 6 && !strcmp(name + namel - 6, ".debug"))
- namel -= 6;
-+
-+ /* fileRenameMap doesn't necessarily have to be initialized */
-+ if (pkg->fileRenameMap) {
-+ char **names = NULL;
-+ int namec = 0;
-+ fileRenameHashGetEntry(pkg->fileRenameMap, name, &names, &namec, NULL);
-+ if (namec) {
-+ if (namec > 1)
-+ rpmlog(RPMLOG_WARNING, _("%s was mapped to multiple filenames"), name);
-+ name = *names;
-+ namel = strlen(name);
-+ }
-+ }
-
- /* generate path */
- rasprintf(&path, "%s%s%.*s%s.debug", buildroot, DEBUG_LIB_DIR, namel, name, uniquearch);
diff --git a/0063-store-path-of-excluded-files.patch b/0063-store-path-of-excluded-files.patch
new file mode 100644
index 0000000..37668b7
--- /dev/null
+++ b/0063-store-path-of-excluded-files.patch
@@ -0,0 +1,66 @@
+From e7ce266784e2b122df03c8023c16ec18ec8209e7 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+Date: Fri, 28 Jul 2017 14:33:29 +0200
+Subject: [PATCH] store path of excluded files
+
+We will need this in next commit so we know which files
+were excluded and we will exclude respective debug files.
+
+Reviewed-by: Mark Wielaard <mark@klomp.org>
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+(cherry picked from commit b5c2deffd4cb1b19782e11d1537a4a0ba8a52b60)
+---
+ build/files.c | 6 +++++-
+ build/rpmbuild_internal.h | 1 +
+ build/spec.c | 2 ++
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/build/files.c b/build/files.c
+index 9b1d2cd98..b9716b4d8 100644
+--- a/build/files.c
++++ b/build/files.c
+@@ -1060,7 +1060,11 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc)
+ }
+
+ /* Skip files that were marked with %exclude. */
+- if (flp->flags & RPMFILE_EXCLUDE) continue;
++ if (flp->flags & RPMFILE_EXCLUDE)
++ {
++ argvAdd(&pkg->fileExcludeList, flp->cpioPath);
++ continue;
++ }
+
+ /* Collect on-disk paths for archive creation */
+ pkg->dpaths[npaths++] = xstrdup(flp->diskPath);
+diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
+index 1c3332faf..5978a6d32 100644
+--- a/build/rpmbuild_internal.h
++++ b/build/rpmbuild_internal.h
+@@ -118,6 +118,7 @@ struct Package_s {
+
+ ARGV_t fileFile;
+ ARGV_t fileList; /* If NULL, package will not be written */
++ ARGV_t fileExcludeList;
+ ARGV_t removePostfixes;
+ ARGV_t policyList;
+
+diff --git a/build/spec.c b/build/spec.c
+index 7cb264abd..c33cde7eb 100644
+--- a/build/spec.c
++++ b/build/spec.c
+@@ -101,6 +101,7 @@ Package newPackage(const char *name, rpmstrPool pool, Package *pkglist)
+ p->autoProv = 1;
+ p->autoReq = 1;
+ p->fileList = NULL;
++ p->fileExcludeList = NULL;
+ p->fileFile = NULL;
+ p->policyList = NULL;
+ p->pool = rpmstrPoolLink(pool);
+@@ -143,6 +144,7 @@ static Package freePackage(Package pkg)
+ }
+
+ pkg->fileList = argvFree(pkg->fileList);
++ pkg->fileExcludeList = argvFree(pkg->fileExcludeList);
+ pkg->fileFile = argvFree(pkg->fileFile);
+ pkg->policyList = argvFree(pkg->policyList);
+ pkg->removePostfixes = argvFree(pkg->removePostfixes);
diff --git a/0064-exclude-respective-debug-files-for-files-which-are-e.patch b/0064-exclude-respective-debug-files-for-files-which-are-e.patch
new file mode 100644
index 0000000..33a0ab1
--- /dev/null
+++ b/0064-exclude-respective-debug-files-for-files-which-are-e.patch
@@ -0,0 +1,39 @@
+From daf5b95c2b2a9c2e869520240651f4b3c673da38 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+Date: Fri, 28 Jul 2017 15:21:00 +0200
+Subject: [PATCH] exclude respective debug files for files which are excluded
+
+Closes: https://github.com/rpm-software-management/rpm/issues/284
+Reviewed-by: Mark Wielaard <mark@klomp.org>
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+(cherry picked from commit 1e7d3c58fc7c55e2dd20b5ca459f36a1cd2a3d8e)
+---
+ build/files.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/build/files.c b/build/files.c
+index b9716b4d8..36e1ed5ea 100644
+--- a/build/files.c
++++ b/build/files.c
+@@ -2803,6 +2803,21 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
+ }
+ path = _free(path);
+ }
++ /* Exclude debug files for files which were excluded in respective non-debug package */
++ for (ARGV_const_t excl = pkg->fileExcludeList; excl && *excl; excl++) {
++ const char *name = *excl;
++
++ /* generate path */
++ rasprintf(&path, "%s%s%s%s.debug", buildroot, DEBUG_LIB_DIR, name, uniquearch);
++ /* Exclude only debuginfo files which actually exist */
++ if (access(path, F_OK) == 0) {
++ char *line = NULL;
++ rasprintf(&line, "%%exclude %s", path + buildrootlen);
++ argvAdd(&files, line);
++ _free(line);
++ }
++ path = _free(path);
++ }
+
+ /* add collected directories to file list */
+ if (dirs) {
diff --git a/0065-store-mapping-for-renamed-files.patch b/0065-store-mapping-for-renamed-files.patch
new file mode 100644
index 0000000..b8048d1
--- /dev/null
+++ b/0065-store-mapping-for-renamed-files.patch
@@ -0,0 +1,129 @@
+From bcc54f828865ea5ba8b99acb2b6882f6e32190b0 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+Date: Fri, 28 Jul 2017 18:30:37 +0200
+Subject: [PATCH] store mapping for renamed files
+
+We will need this in next commit so we know which original name
+files had, so we can reference appropriate debug file.
+
+Reviewed-by: Mark Wielaard <mark@klomp.org>
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+(cherry picked from commit cc8a682c386bf28540dc3fa5dbbb66c57bca5ec5)
+---
+ build/files.c | 42 +++++++++++++++++++++++++++++++-----------
+ build/rpmbuild_internal.h | 12 ++++++++++++
+ build/spec.c | 2 ++
+ 3 files changed, 45 insertions(+), 11 deletions(-)
+
+diff --git a/build/files.c b/build/files.c
+index 36e1ed5ea..42709a549 100644
+--- a/build/files.c
++++ b/build/files.c
+@@ -50,6 +50,17 @@
+ #define DEBUG_ID_DIR "/usr/lib/debug/.build-id"
+ #define DEBUG_DWZ_DIR "/usr/lib/debug/.dwz"
+
++#undef HASHTYPE
++#undef HTKEYTYPE
++#undef HTDATATYPE
++#define HASHTYPE fileRenameHash
++#define HTKEYTYPE const char *
++#define HTDATATYPE const char *
++#include "lib/rpmhash.C"
++#undef HASHTYPE
++#undef HTKEYTYPE
++#undef HTDATATYPE
++
+ /**
+ */
+ enum specfFlags_e {
+@@ -982,19 +993,28 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc)
+ }
+
+ /* Adjust paths if needed */
+- if (!isSrc && pkg->removePostfixes)
+- for (i = 0, flp = fl->files.recs; i < fl->files.used; i++, flp++) {
+- char * cpiopath = flp->cpioPath;
+-
+- for (ARGV_const_t postfix_p = pkg->removePostfixes; *postfix_p; postfix_p++) {
+- int len = strlen(*postfix_p);
+- int plen = strlen(cpiopath);
+- if (len <= plen && !strncmp(cpiopath+plen-len, *postfix_p, len)) {
+- cpiopath[plen-len] = '\0';
+- if (plen-len > 0 && cpiopath[plen-len-1] == '/') {
+- cpiopath[plen-len-1] = '\0';
++ if (!isSrc && pkg->removePostfixes) {
++ pkg->fileRenameMap = fileRenameHashCreate(fl->files.used,
++ rstrhash, strcmp,
++ (fileRenameHashFreeKey)rfree, (fileRenameHashFreeData)rfree);
++ for (i = 0, flp = fl->files.recs; i < fl->files.used; i++, flp++) {
++ char * cpiopath = flp->cpioPath;
++ char * cpiopath_orig = xstrdup(cpiopath);
++
++ for (ARGV_const_t postfix_p = pkg->removePostfixes; *postfix_p; postfix_p++) {
++ int len = strlen(*postfix_p);
++ int plen = strlen(cpiopath);
++ if (len <= plen && !strncmp(cpiopath+plen-len, *postfix_p, len)) {
++ cpiopath[plen-len] = '\0';
++ if (plen-len > 0 && cpiopath[plen-len-1] == '/') {
++ cpiopath[plen-len-1] = '\0';
++ }
+ }
+ }
++ if (strcmp(cpiopath_orig, cpiopath))
++ fileRenameHashAddEntry(pkg->fileRenameMap, xstrdup(cpiopath), cpiopath_orig);
++ else
++ _free(cpiopath_orig);
+ }
+ }
+
+diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
+index 5978a6d32..5dd0a5b83 100644
+--- a/build/rpmbuild_internal.h
++++ b/build/rpmbuild_internal.h
+@@ -6,6 +6,17 @@
+ #include <rpm/rpmstrpool.h>
+ #include "build/rpmbuild_misc.h"
+
++#undef HASHTYPE
++#undef HTKEYTYPE
++#undef HTDATATYPE
++#define HASHTYPE fileRenameHash
++#define HTKEYTYPE const char *
++#define HTDATATYPE const char *
++#include "lib/rpmhash.H"
++#undef HASHTYPE
++#undef HTKEYTYPE
++#undef HTDATATYPE
++
+ struct TriggerFileEntry {
+ int index;
+ char * fileName;
+@@ -120,6 +131,7 @@ struct Package_s {
+ ARGV_t fileList; /* If NULL, package will not be written */
+ ARGV_t fileExcludeList;
+ ARGV_t removePostfixes;
++ fileRenameHash fileRenameMap;
+ ARGV_t policyList;
+
+ Package next;
+diff --git a/build/spec.c b/build/spec.c
+index c33cde7eb..eaa5dce61 100644
+--- a/build/spec.c
++++ b/build/spec.c
+@@ -104,6 +104,7 @@ Package newPackage(const char *name, rpmstrPool pool, Package *pkglist)
+ p->fileExcludeList = NULL;
+ p->fileFile = NULL;
+ p->policyList = NULL;
++ p->fileRenameMap = NULL;
+ p->pool = rpmstrPoolLink(pool);
+ p->dpaths = NULL;
+
+@@ -148,6 +149,7 @@ static Package freePackage(Package pkg)
+ pkg->fileFile = argvFree(pkg->fileFile);
+ pkg->policyList = argvFree(pkg->policyList);
+ pkg->removePostfixes = argvFree(pkg->removePostfixes);
++ pkg->fileRenameMap = fileRenameHashFree(pkg->fileRenameMap);
+ pkg->cpioList = rpmfilesFree(pkg->cpioList);
+ pkg->dpaths = argvFree(pkg->dpaths);
+
diff --git a/0066-reference-proper-debug-files-whenever-RemovePathPost.patch b/0066-reference-proper-debug-files-whenever-RemovePathPost.patch
new file mode 100644
index 0000000..c2b3ff8
--- /dev/null
+++ b/0066-reference-proper-debug-files-whenever-RemovePathPost.patch
@@ -0,0 +1,38 @@
+From 1cd1d45798a30b95bd5535463002c148bf04e7e2 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+Date: Fri, 28 Jul 2017 18:32:06 +0200
+Subject: [PATCH] reference proper debug files whenever RemovePathPostfixes is
+ used
+
+Closes: https://github.com/rpm-software-management/rpm/issues/280
+Reviewed-by: Mark Wielaard <mark@klomp.org>
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
+(cherry picked from commit 98efb7f6dc222ed175516298a34e807053d125f4)
+---
+ build/files.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/build/files.c b/build/files.c
+index 42709a549..3b93ac559 100644
+--- a/build/files.c
++++ b/build/files.c
+@@ -2791,6 +2791,19 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
+ namel = strlen(name);
+ if (namel > 6 && !strcmp(name + namel - 6, ".debug"))
+ namel -= 6;
++
++ /* fileRenameMap doesn't necessarily have to be initialized */
++ if (pkg->fileRenameMap) {
++ const char **names = NULL;
++ int namec = 0;
++ fileRenameHashGetEntry(pkg->fileRenameMap, name, &names, &namec, NULL);
++ if (namec) {
++ if (namec > 1)
++ rpmlog(RPMLOG_WARNING, _("%s was mapped to multiple filenames"), name);
++ name = *names;
++ namel = strlen(name);
++ }
++ }
+
+ /* generate path */
+ rasprintf(&path, "%s%s%.*s%s.debug", buildroot, DEBUG_LIB_DIR, namel, name, uniquearch);
diff --git a/rpm.spec b/rpm.spec
index 56af5fa..1662950 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -29,7 +29,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}39%{?dist}
+Release: %{?snapver:0.%{snapver}.}40%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2
@@ -161,15 +161,15 @@ Patch341: 0061-find-debuginfo.sh-make-sure-that-debugsourcefiles.li.patch
# Trivial improvement for RemovePathPostfixes
Patch342: 0062-Avoid-redundant-processing-for-RemovePathPostfixes.patch
+# debuginfo_subpackages fixes
+Patch343: 0063-store-path-of-excluded-files.patch
+Patch344: 0064-exclude-respective-debug-files-for-files-which-are-e.patch
+Patch345: 0065-store-mapping-for-renamed-files.patch
+Patch346: 0066-reference-proper-debug-files-whenever-RemovePathPost.patch
+
# These are not yet upstream
# Enable debugsource and debuginfo subpackages by default
Patch900: 0001-macros-enable-debugsource-and-debuginfo-subpkgs-by-d.patch
-# debuginfo_subpackages fixes
-Patch901: 0001-remove-duplicated-call-to-strlen.patch
-Patch902: 0002-store-path-of-excluded-files.patch
-Patch903: 0003-exclude-respective-debug-files-for-files-which-are-e.patch
-Patch904: 0004-store-mapping-for-renamed-files.patch
-Patch905: 0005-reference-proper-debug-files-whenever-RemovePathPost.patch
Patch906: rpm-4.7.1-geode-i686.patch
# Probably to be upstreamed in slightly different form
Patch907: rpm-4.13.90-ldflags.patch
@@ -667,6 +667,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Sat Jul 29 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.13.0.1-40
+- Update latest patches from merged versions
+
* Fri Jul 28 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.13.0.1-39
- Backport fixes for debuginfo subpackages
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:31 [rpms/rpm] pmatilai-v6: Update latest patches from merged versions Igor Gnatenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox