Update latest patches from merged versions

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2017-07-29 10:12:20 +02:00
parent 53960f5052
commit 8896954ef2
6 changed files with 41 additions and 61 deletions

View File

@ -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;

View File

@ -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 <i.gnatenko.brain@gmail.com> From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Fri, 28 Jul 2017 14:33:29 +0200 Date: Fri, 28 Jul 2017 14:33:29 +0200
Subject: [PATCH] store path of excluded files 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 We will need this in next commit so we know which files
were excluded and we will exclude respective debug 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> Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
(cherry picked from commit b5c2deffd4cb1b19782e11d1537a4a0ba8a52b60)
--- ---
build/files.c | 6 +++++- build/files.c | 6 +++++-
build/rpmbuild_internal.h | 1 + build/rpmbuild_internal.h | 1 +
@ -14,7 +16,7 @@ Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
3 files changed, 8 insertions(+), 1 deletion(-) 3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/build/files.c b/build/files.c diff --git a/build/files.c b/build/files.c
index 2238c2453..988b3b315 100644 index 9b1d2cd98..b9716b4d8 100644
--- a/build/files.c --- a/build/files.c
+++ b/build/files.c +++ b/build/files.c
@@ -1060,7 +1060,11 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) @@ -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) continue;
+ if (flp->flags & RPMFILE_EXCLUDE) + if (flp->flags & RPMFILE_EXCLUDE)
+ { + {
+ argvAdd(&pkg->fileExcludeList, flp->diskPath); + argvAdd(&pkg->fileExcludeList, flp->cpioPath);
+ continue; + continue;
+ } + }

View File

@ -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 <i.gnatenko.brain@gmail.com> From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Fri, 28 Jul 2017 15:21:00 +0200 Date: Fri, 28 Jul 2017 15:21:00 +0200
Subject: [PATCH] exclude respective debug files for files which are excluded Subject: [PATCH] exclude respective debug files for files which are excluded
Closes: https://github.com/rpm-software-management/rpm/issues/284 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> Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
(cherry picked from commit 1e7d3c58fc7c55e2dd20b5ca459f36a1cd2a3d8e)
--- ---
build/files.c | 17 ++++++++++++++++- build/files.c | 15 +++++++++++++++
1 file changed, 16 insertions(+), 1 deletion(-) 1 file changed, 15 insertions(+)
diff --git a/build/files.c b/build/files.c diff --git a/build/files.c b/build/files.c
index 988b3b315..a29730998 100644 index b9716b4d8..36e1ed5ea 100644
--- a/build/files.c --- a/build/files.c
+++ b/build/files.c +++ b/build/files.c
@@ -1062,7 +1062,7 @@ static void genCpioListAndHeader(FileList fl, Package pkg, int isSrc) @@ -2803,6 +2803,21 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
/* 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); path = _free(path);
} }

View File

@ -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 <i.gnatenko.brain@gmail.com> From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Fri, 28 Jul 2017 18:30:37 +0200 Date: Fri, 28 Jul 2017 18:30:37 +0200
Subject: [PATCH] store mapping for renamed files 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 We will need this in next commit so we know which original name
files had, so we can reference appropriate debug file. 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> Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
(cherry picked from commit cc8a682c386bf28540dc3fa5dbbb66c57bca5ec5)
--- ---
build/files.c | 40 +++++++++++++++++++++++++++++----------- build/files.c | 42 +++++++++++++++++++++++++++++++-----------
build/rpmbuild_internal.h | 12 ++++++++++++ build/rpmbuild_internal.h | 12 ++++++++++++
build/spec.c | 2 ++ 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 diff --git a/build/files.c b/build/files.c
index a29730998..2387a2e5b 100644 index 36e1ed5ea..42709a549 100644
--- a/build/files.c --- a/build/files.c
+++ b/build/files.c +++ b/build/files.c
@@ -50,6 +50,17 @@ @@ -50,6 +50,17 @@
@ -26,7 +28,7 @@ index a29730998..2387a2e5b 100644
+#undef HTDATATYPE +#undef HTDATATYPE
+#define HASHTYPE fileRenameHash +#define HASHTYPE fileRenameHash
+#define HTKEYTYPE const char * +#define HTKEYTYPE const char *
+#define HTDATATYPE char * +#define HTDATATYPE const char *
+#include "lib/rpmhash.C" +#include "lib/rpmhash.C"
+#undef HASHTYPE +#undef HASHTYPE
+#undef HTKEYTYPE +#undef HTKEYTYPE
@ -35,7 +37,7 @@ index a29730998..2387a2e5b 100644
/** /**
*/ */
enum specfFlags_e { 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 */ /* Adjust paths if needed */
@ -70,11 +72,13 @@ index a29730998..2387a2e5b 100644
} }
+ if (strcmp(cpiopath_orig, cpiopath)) + if (strcmp(cpiopath_orig, cpiopath))
+ fileRenameHashAddEntry(pkg->fileRenameMap, xstrdup(cpiopath), cpiopath_orig); + fileRenameHashAddEntry(pkg->fileRenameMap, xstrdup(cpiopath), cpiopath_orig);
+ else
+ _free(cpiopath_orig);
} }
} }
diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h 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 --- a/build/rpmbuild_internal.h
+++ b/build/rpmbuild_internal.h +++ b/build/rpmbuild_internal.h
@@ -6,6 +6,17 @@ @@ -6,6 +6,17 @@
@ -86,7 +90,7 @@ index 5978a6d32..b4247ae61 100644
+#undef HTDATATYPE +#undef HTDATATYPE
+#define HASHTYPE fileRenameHash +#define HASHTYPE fileRenameHash
+#define HTKEYTYPE const char * +#define HTKEYTYPE const char *
+#define HTDATATYPE char * +#define HTDATATYPE const char *
+#include "lib/rpmhash.H" +#include "lib/rpmhash.H"
+#undef HASHTYPE +#undef HASHTYPE
+#undef HTKEYTYPE +#undef HTKEYTYPE

View File

@ -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 <i.gnatenko.brain@gmail.com> From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Fri, 28 Jul 2017 18:32:06 +0200 Date: Fri, 28 Jul 2017 18:32:06 +0200
Subject: [PATCH] reference proper debug files whenever RemovePathPostfixes is Subject: [PATCH] reference proper debug files whenever RemovePathPostfixes is
used used
Closes: https://github.com/rpm-software-management/rpm/issues/280 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> Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
(cherry picked from commit 98efb7f6dc222ed175516298a34e807053d125f4)
--- ---
build/files.c | 13 +++++++++++++ build/files.c | 13 +++++++++++++
1 file changed, 13 insertions(+) 1 file changed, 13 insertions(+)
diff --git a/build/files.c b/build/files.c diff --git a/build/files.c b/build/files.c
index 2387a2e5b..a4b5cd6e8 100644 index 42709a549..3b93ac559 100644
--- a/build/files.c --- a/build/files.c
+++ b/build/files.c +++ b/build/files.c
@@ -2788,6 +2788,19 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg, @@ -2791,6 +2791,19 @@ static void filterDebuginfoPackage(rpmSpec spec, Package pkg,
/* strip trailing .debug like in find-debuginfo.sh */ namel = strlen(name);
if (namel > 6 && !strcmp(name + namel - 6, ".debug")) if (namel > 6 && !strcmp(name + namel - 6, ".debug"))
namel -= 6; namel -= 6;
+ +
+ /* fileRenameMap doesn't necessarily have to be initialized */ + /* fileRenameMap doesn't necessarily have to be initialized */
+ if (pkg->fileRenameMap) { + if (pkg->fileRenameMap) {
+ char **names = NULL; + const char **names = NULL;
+ int namec = 0; + int namec = 0;
+ fileRenameHashGetEntry(pkg->fileRenameMap, name, &names, &namec, NULL); + fileRenameHashGetEntry(pkg->fileRenameMap, name, &names, &namec, NULL);
+ if (namec) { + if (namec) {

View File

@ -29,7 +29,7 @@
Summary: The RPM package management system Summary: The RPM package management system
Name: rpm Name: rpm
Version: %{rpmver} Version: %{rpmver}
Release: %{?snapver:0.%{snapver}.}39%{?dist} Release: %{?snapver:0.%{snapver}.}40%{?dist}
Group: System Environment/Base Group: System Environment/Base
Url: http://www.rpm.org/ Url: http://www.rpm.org/
Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2 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 # Trivial improvement for RemovePathPostfixes
Patch342: 0062-Avoid-redundant-processing-for-RemovePathPostfixes.patch 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 # These are not yet upstream
# Enable debugsource and debuginfo subpackages by default # Enable debugsource and debuginfo subpackages by default
Patch900: 0001-macros-enable-debugsource-and-debuginfo-subpkgs-by-d.patch 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 Patch906: rpm-4.7.1-geode-i686.patch
# Probably to be upstreamed in slightly different form # Probably to be upstreamed in slightly different form
Patch907: rpm-4.13.90-ldflags.patch Patch907: rpm-4.13.90-ldflags.patch
@ -667,6 +667,9 @@ exit 0
%doc doc/librpm/html/* %doc doc/librpm/html/*
%changelog %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 * Fri Jul 28 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.13.0.1-39
- Backport fixes for debuginfo subpackages - Backport fixes for debuginfo subpackages