Skip to content

Commit

Permalink
rpm: upgrade to 4.15.1
Browse files Browse the repository at this point in the history
Drop patches that were merged upstream.

0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
modifies a file that was removed upstream.

Add a 0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
as unfortunately the new parallel file classification feature from
upstream trips over somewhere in libmagic when inspected files are
compressed:
rpm-software-management/rpm#756

Signed-off-by: Alexander Kanavin <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
  • Loading branch information
kanavin authored and kraj committed Jan 8, 2020
1 parent 3a3c07f commit a88c81b
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 844 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001
From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <[email protected]>
Date: Mon, 9 Jan 2017 18:52:11 +0200
Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
Expand All @@ -9,25 +9,23 @@ hand produces rpms that way by design.

Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <[email protected]>

---
build/pack.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/build/pack.c b/build/pack.c
index 1261cdbba..bb2d6f4f6 100644
index e6cec1816..810cd7351 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
}
@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
}

- if (cheating) {
- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
- }
-
if ((rc = getPkgFilename(pkg->header, filename)))
return rc;

- if (cheating) {
- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
- }
-
{ char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
char *binRpm, *binDir;
binRpm = headerFormat(pkg->header, binFormat, &errorString);
--
2.11.0

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001
From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <[email protected]>
Date: Mon, 27 Feb 2017 09:43:30 +0200
Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
Expand All @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]>
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 09af7c4..9bd6903 100644
index d3aeab86e..1a1f3f91f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1055,7 +1055,7 @@ else
@@ -1086,7 +1086,7 @@ else
usrprefix=$prefix
fi

Expand All @@ -27,10 +27,10 @@ index 09af7c4..9bd6903 100644

AC_SUBST(OBJDUMP)
diff --git a/macros.in b/macros.in
index a3aa7a9..62cee5c 100644
index fe9803aad..d128675bf 100644
--- a/macros.in
+++ b/macros.in
@@ -970,7 +970,7 @@ package or when debugging this package.\
@@ -985,7 +985,7 @@ package or when debugging this package.\
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
%_lib lib
Expand All @@ -40,7 +40,7 @@ index a3aa7a9..62cee5c 100644
%_infodir %{_datadir}/info
%_mandir %{_datadir}/man
diff --git a/rpm.am b/rpm.am
index 82c2d7c..6341b51 100644
index 40b4ec55f..3139ce8f6 100644
--- a/rpm.am
+++ b/rpm.am
@@ -1,10 +1,10 @@
Expand All @@ -55,4 +55,4 @@ index 82c2d7c..6341b51 100644
+rpmconfigdir = $(libdir)/rpm

# Libtool version (current-revision-age) for all our libraries
rpm_version_info = 9:0:1
rpm_version_info = 9:1:0

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <[email protected]>
Date: Mon, 18 Nov 2019 16:22:56 +0100
Subject: [PATCH] rpmfc.c: do not run file classification in parallel

This is causing freezes with libmagic when the file in question is compressed:
https://github.com/rpm-software-management/rpm/issues/756

Upstream-Status: Inappropriate [upstream wants a proper fix]
Signed-off-by: Alexander Kanavin <[email protected]>
---
build/rpmfc.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/build/rpmfc.c b/build/rpmfc.c
index 3db7a9352..17afdd57a 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, const char *ftype, const char *ful
/* Add attributes on libmagic type & path pattern matches */
if (matches(&(*attr)->incl, ftype, path, is_executable)) {
argvAddTokens(&fc->fattrs[ix], (*attr)->name);
- #pragma omp critical(fahash)
fattrHashAddEntry(fc->fahash, attr-fc->atypes, ix);
}
}
@@ -1105,7 +1104,6 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
/* Build (sorted) file class dictionary. */
fc->cdict = rpmstrPoolCreate();

- #pragma omp parallel
{
/* libmagic is not thread-safe, each thread needs to a private handle */
magic_t ms = magic_open(msflags);
@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
if (ms == NULL) {
rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"),
msflags, strerror(errno));
- #pragma omp cancel parallel
}

if (magic_load(ms, NULL) == -1) {
rpmlog(RPMLOG_ERR, _("magic_load failed: %s\n"), magic_error(ms));
- #pragma omp cancel parallel
}

- #pragma omp for ordered reduction(+:nerrors)
for (int ix = 0; ix < fc->nfiles; ix++) {
rpmsid ftypeId;
const char * ftype;
@@ -1185,14 +1180,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
fc->fcolor[ix] = fcolor;

/* Add to file class dictionary and index array */
- #pragma omp ordered
if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) {
ftypeId = rpmstrPoolId(fc->cdict, ftype, 1);
- #pragma omp atomic
fc->fknown++;
} else {
ftypeId = rpmstrPoolId(fc->cdict, "", 1);
- #pragma omp atomic
fc->fwhite++;
}
/* Pool id's start from 1, for headers we want it from 0 */
Loading

0 comments on commit a88c81b

Please sign in to comment.