From 8896954ef271f3fafbeba850686964aa2931379a Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 29 Jul 2017 10:12:20 +0200 Subject: [PATCH] Update latest patches from merged versions Signed-off-by: Igor Gnatenko --- 0001-remove-duplicated-call-to-strlen.patch | 24 ------------------- ...=> 0063-store-path-of-excluded-files.patch | 8 ++++--- ...ve-debug-files-for-files-which-are-e.patch | 21 ++++++---------- ...0065-store-mapping-for-renamed-files.patch | 20 +++++++++------- ...-debug-files-whenever-RemovePathPost.patch | 12 ++++++---- rpm.spec | 17 +++++++------ 6 files changed, 41 insertions(+), 61 deletions(-) delete mode 100644 0001-remove-duplicated-call-to-strlen.patch rename 0002-store-path-of-excluded-files.patch => 0063-store-path-of-excluded-files.patch (88%) rename 0003-exclude-respective-debug-files-for-files-which-are-e.patch => 0064-exclude-respective-debug-files-for-files-which-are-e.patch (65%) rename 0004-store-mapping-for-renamed-files.patch => 0065-store-mapping-for-renamed-files.patch (87%) rename 0005-reference-proper-debug-files-whenever-RemovePathPost.patch => 0066-reference-proper-debug-files-whenever-RemovePathPost.patch (75%) 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 -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 ---- - 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/0063-store-path-of-excluded-files.patch similarity index 88% rename from 0002-store-path-of-excluded-files.patch rename to 0063-store-path-of-excluded-files.patch index fca1b27..37668b7 100644 --- a/0002-store-path-of-excluded-files.patch +++ b/0063-store-path-of-excluded-files.patch @@ -1,4 +1,4 @@ -From 90007b550cf585c9cb9427e1fd0b2d8f56c9c2b5 Mon Sep 17 00:00:00 2001 +From e7ce266784e2b122df03c8023c16ec18ec8209e7 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 28 Jul 2017 14:33:29 +0200 Subject: [PATCH] store path of excluded files @@ -6,7 +6,9 @@ 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 Signed-off-by: Igor Gnatenko +(cherry picked from commit b5c2deffd4cb1b19782e11d1537a4a0ba8a52b60) --- build/files.c | 6 +++++- build/rpmbuild_internal.h | 1 + @@ -14,7 +16,7 @@ Signed-off-by: Igor Gnatenko 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build/files.c b/build/files.c -index 2238c2453..988b3b315 100644 +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) @@ -24,7 +26,7 @@ index 2238c2453..988b3b315 100644 - if (flp->flags & RPMFILE_EXCLUDE) continue; + if (flp->flags & RPMFILE_EXCLUDE) + { -+ argvAdd(&pkg->fileExcludeList, flp->diskPath); ++ argvAdd(&pkg->fileExcludeList, flp->cpioPath); + continue; + } diff --git a/0003-exclude-respective-debug-files-for-files-which-are-e.patch b/0064-exclude-respective-debug-files-for-files-which-are-e.patch similarity index 65% rename from 0003-exclude-respective-debug-files-for-files-which-are-e.patch rename to 0064-exclude-respective-debug-files-for-files-which-are-e.patch index ef90f73..33a0ab1 100644 --- a/0003-exclude-respective-debug-files-for-files-which-are-e.patch +++ b/0064-exclude-respective-debug-files-for-files-which-are-e.patch @@ -1,28 +1,21 @@ -From 651d9355f6db9f4d1305c25af5a953289dc8ef47 Mon Sep 17 00:00:00 2001 +From daf5b95c2b2a9c2e869520240651f4b3c673da38 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko 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 Signed-off-by: Igor Gnatenko +(cherry picked from commit 1e7d3c58fc7c55e2dd20b5ca459f36a1cd2a3d8e) --- - build/files.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) + build/files.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) diff --git a/build/files.c b/build/files.c -index 988b3b315..a29730998 100644 +index b9716b4d8..36e1ed5ea 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, +@@ -2803,6 +2803,21 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg, } path = _free(path); } diff --git a/0004-store-mapping-for-renamed-files.patch b/0065-store-mapping-for-renamed-files.patch similarity index 87% rename from 0004-store-mapping-for-renamed-files.patch rename to 0065-store-mapping-for-renamed-files.patch index 6350fcf..b8048d1 100644 --- a/0004-store-mapping-for-renamed-files.patch +++ b/0065-store-mapping-for-renamed-files.patch @@ -1,4 +1,4 @@ -From f1e03904fc7173c772cb5795f6df30591f790b01 Mon Sep 17 00:00:00 2001 +From bcc54f828865ea5ba8b99acb2b6882f6e32190b0 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 28 Jul 2017 18:30:37 +0200 Subject: [PATCH] store mapping for renamed files @@ -6,15 +6,17 @@ 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 Signed-off-by: Igor Gnatenko +(cherry picked from commit cc8a682c386bf28540dc3fa5dbbb66c57bca5ec5) --- - build/files.c | 40 +++++++++++++++++++++++++++++----------- + build/files.c | 42 +++++++++++++++++++++++++++++++----------- build/rpmbuild_internal.h | 12 ++++++++++++ build/spec.c | 2 ++ - 3 files changed, 43 insertions(+), 11 deletions(-) + 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/build/files.c b/build/files.c -index a29730998..2387a2e5b 100644 +index 36e1ed5ea..42709a549 100644 --- a/build/files.c +++ b/build/files.c @@ -50,6 +50,17 @@ @@ -26,7 +28,7 @@ index a29730998..2387a2e5b 100644 +#undef HTDATATYPE +#define HASHTYPE fileRenameHash +#define HTKEYTYPE const char * -+#define HTDATATYPE char * ++#define HTDATATYPE const char * +#include "lib/rpmhash.C" +#undef HASHTYPE +#undef HTKEYTYPE @@ -35,7 +37,7 @@ index a29730998..2387a2e5b 100644 /** */ enum specfFlags_e { -@@ -982,19 +993,26 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) +@@ -982,19 +993,28 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) } /* Adjust paths if needed */ @@ -70,11 +72,13 @@ index a29730998..2387a2e5b 100644 } + 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..b4247ae61 100644 +index 5978a6d32..5dd0a5b83 100644 --- a/build/rpmbuild_internal.h +++ b/build/rpmbuild_internal.h @@ -6,6 +6,17 @@ @@ -86,7 +90,7 @@ index 5978a6d32..b4247ae61 100644 +#undef HTDATATYPE +#define HASHTYPE fileRenameHash +#define HTKEYTYPE const char * -+#define HTDATATYPE char * ++#define HTDATATYPE const char * +#include "lib/rpmhash.H" +#undef HASHTYPE +#undef HTKEYTYPE diff --git a/0005-reference-proper-debug-files-whenever-RemovePathPost.patch b/0066-reference-proper-debug-files-whenever-RemovePathPost.patch similarity index 75% rename from 0005-reference-proper-debug-files-whenever-RemovePathPost.patch rename to 0066-reference-proper-debug-files-whenever-RemovePathPost.patch index d6dbb52..c2b3ff8 100644 --- a/0005-reference-proper-debug-files-whenever-RemovePathPost.patch +++ b/0066-reference-proper-debug-files-whenever-RemovePathPost.patch @@ -1,27 +1,29 @@ -From d145899932ed040cdaaed70a7ce2ea0f11757ab6 Mon Sep 17 00:00:00 2001 +From 1cd1d45798a30b95bd5535463002c148bf04e7e2 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko 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 Signed-off-by: Igor Gnatenko +(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 2387a2e5b..a4b5cd6e8 100644 +index 42709a549..3b93ac559 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 */ +@@ -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) { -+ char **names = NULL; ++ const char **names = NULL; + int namec = 0; + fileRenameHashGetEntry(pkg->fileRenameMap, name, &names, &namec, NULL); + if (namec) { 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 - 4.13.0.1-40 +- Update latest patches from merged versions + * Fri Jul 28 2017 Igor Gnatenko - 4.13.0.1-39 - Backport fixes for debuginfo subpackages