All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] libsolv: upgrade 0.7.6 -> 0.7.8
@ 2019-11-19 13:25 Alexander Kanavin
  2019-11-19 13:25 ` [PATCH 2/5] rpm: upgrade to 4.15.1 Alexander Kanavin
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-19 13:25 UTC (permalink / raw)
  To: openembedded-core

From: Anuj Mittal <anuj.mittal@intel.com>

(From OE-Core rev: a00c6f1a5c2c56882684c2cf053de658a02a721d)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../libsolv/{libsolv_0.7.6.bb => libsolv_0.7.8.bb}              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-extended/libsolv/{libsolv_0.7.6.bb => libsolv_0.7.8.bb} (93%)

diff --git a/meta/recipes-extended/libsolv/libsolv_0.7.6.bb b/meta/recipes-extended/libsolv/libsolv_0.7.8.bb
similarity index 93%
rename from meta/recipes-extended/libsolv/libsolv_0.7.6.bb
rename to meta/recipes-extended/libsolv/libsolv_0.7.8.bb
index 3df89930893..8fe9ae04699 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.7.6.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.7.8.bb
@@ -10,7 +10,7 @@ DEPENDS = "expat zlib"
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
 "
 
-SRCREV = "17ce4bc4fb52a0b32964f3b7d491c18177980be1"
+SRCREV = "5205c5683ce2c8b8288534059ba40a318a2a161d"
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/5] rpm: upgrade to 4.15.1
  2019-11-19 13:25 [PATCH 1/5] libsolv: upgrade 0.7.6 -> 0.7.8 Alexander Kanavin
@ 2019-11-19 13:25 ` Alexander Kanavin
  2019-11-23 17:47   ` Khem Raj
  2019-11-19 13:25 ` [PATCH 3/5] libdnf: upgrade 0.28.1 -> 0.38.1 Alexander Kanavin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-19 13:25 UTC (permalink / raw)
  To: openembedded-core

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:
https://github.com/rpm-software-management/rpm/issues/756

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...satisfiable-dependency-when-building.patch |  28 +-
 ...lib-rpm-as-the-installation-path-for.patch |  14 +-
 ...kage-building-into-a-separate-functi.patch |  84 -----
 ...es-requires-do-not-use-monodis-from-.patch |  58 ---
 ...-run-file-classification-in-parallel.patch |  65 ++++
 ...ry-package-creation-via-thread-pools.patch | 127 -------
 ...e-operations-over-string-pools-threa.patch | 207 -----------
 ...ove-static-local-variables-from-buil.patch | 336 ------------------
 .../rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}    |  13 +-
 9 files changed, 89 insertions(+), 843 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
 rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb} (91%)

diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
index 80e2f0fad70..4029233fb70 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
@@ -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 <alex.kanavin@gmail.com>
 Date: Mon, 9 Jan 2017 18:52:11 +0200
 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
@@ -9,25 +9,23 @@ hand produces rpms that way by design.
 
 Upstream-Status: Inappropriate [oe-core specific]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
 ---
  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
-
diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
index 82e7328757f..52440d68180 100644
--- a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
+++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
@@ -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 <alex.kanavin@gmail.com>
 Date: Mon, 27 Feb 2017 09:43:30 +0200
 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  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
  
@@ -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
@@ -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 @@
@@ -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
diff --git a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
deleted file mode 100644
index 6e44f0b7fc9..00000000000
--- a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 25 May 2017 18:15:27 +0300
-Subject: [PATCH 1/4] Split binary package building into a separate function
-
-So that it can be run as a thread pool task.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- build/pack.c | 33 +++++++++++++++++++++------------
- 1 file changed, 21 insertions(+), 12 deletions(-)
-
-diff --git a/build/pack.c b/build/pack.c
-index 518f4e92a..ccfd614cc 100644
---- a/build/pack.c
-+++ b/build/pack.c
-@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
-     return RPMRC_OK;
- }
- 
--rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
-+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
- {
--    rpmRC rc;
--    const char *errorString;
--    Package pkg;
--    char *pkglist = NULL;
--
--    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
--	char *fn;
-+	const char *errorString;
-+	rpmRC rc = RPMRC_OK;
- 
- 	if (pkg->fileList == NULL)
--	    continue;
-+	    return rc;
- 
- 	if ((rc = processScriptFiles(spec, pkg)))
- 	    return rc;
-@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
- 		     headerGetString(pkg->header, RPMTAG_NAME), errorString);
- 		return RPMRC_FAIL;
- 	    }
--	    fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
-+	    *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
- 	    if ((binDir = strchr(binRpm, '/')) != NULL) {
- 		struct stat st;
- 		char *dn;
-@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
- 	    free(binRpm);
- 	}
- 
--	rc = writeRPM(pkg, NULL, fn, NULL);
-+	rc = writeRPM(pkg, NULL, *filename, NULL);
- 	if (rc == RPMRC_OK) {
- 	    /* Do check each written package if enabled */
--	    char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
-+	    char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
- 	    if (pkgcheck[0] != ' ') {
- 		rc = checkPackages(pkgcheck);
- 	    }
- 	    free(pkgcheck);
-+	}
-+	return rc;
-+}
-+
-+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
-+{
-+    rpmRC rc;
-+    Package pkg;
-+    char *pkglist = NULL;
-+
-+    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
-+	char *fn = NULL;
-+	rc = packageBinary(spec, pkg, cookie, cheating, &fn);
-+	if (rc == RPMRC_OK) {
- 	    rstrcat(&pkglist, fn);
- 	    rstrcat(&pkglist, " ");
- 	}
--- 
-2.11.0
-
diff --git a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
deleted file mode 100644
index 24aa4c7ffff..00000000000
--- a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 27 Aug 2019 17:42:34 +0200
-Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host
-
-There was a host contamination issue here: if monodis was installed
-on the host, do_package would use that to resolve dependencies
-of mono libraries (and often fail in that). Without monodis,
-no dependencies are resolved, which is seemingly how things
-are supposed to work.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- scripts/mono-find-provides | 8 ++++----
- scripts/mono-find-requires | 8 ++++----
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
-index 9348457d3..b28872ffb 100644
---- a/scripts/mono-find-provides
-+++ b/scripts/mono-find-provides
-@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
- build_bindir="$2/usr/bin"
- build_libdir="$2$3"
- 
--if [ -x $build_bindir/monodis ]; then
--    monodis="$build_bindir/monodis"
-+if [ -x $build_bindir/monodis.bogus ]; then
-+    monodis="$build_bindir/monodis.bogus"
-     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
--elif [ -x /usr/bin/monodis ]; then
--    monodis="/usr/bin/monodis"
-+elif [ -x /usr/bin/monodis.bogus ]; then
-+    monodis="/usr/bin/monodis.bogus"
- else
-     exit 0;
- fi
-diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
-index ea58cae48..d270169e1 100644
---- a/scripts/mono-find-requires
-+++ b/scripts/mono-find-requires
-@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
- build_bindir="$2/usr/bin"
- build_libdir="$2$3"
- 
--if [ -x $build_bindir/monodis ]; then
--    monodis="$build_bindir/monodis"
-+if [ -x $build_bindir/monodis.bogus ]; then
-+    monodis="$build_bindir/monodis.bogus"
-     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
--elif [ -x /usr/bin/monodis ]; then
--    monodis="/usr/bin/monodis"
-+elif [ -x /usr/bin/monodis.bogus ]; then
-+    monodis="/usr/bin/monodis.bogus"
- else
-     exit 0;
- fi
diff --git a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
new file mode 100644
index 00000000000..9a5cd7c80dc
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
@@ -0,0 +1,65 @@
+From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+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: Inapppropriate [upstream wants a proper fix]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ 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 */
diff --git a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
deleted file mode 100644
index d10041c2e14..00000000000
--- a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 25 May 2017 19:30:20 +0300
-Subject: [PATCH 1/3] Run binary package creation via thread pools.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
- configure.ac |  3 +++
- 2 files changed, 70 insertions(+), 14 deletions(-)
-
-diff --git a/build/pack.c b/build/pack.c
-index ccfd614cc..ed5b9ab4e 100644
---- a/build/pack.c
-+++ b/build/pack.c
-@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
- 	return rc;
- }
- 
--rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
-+struct binaryPackageTaskData
- {
--    rpmRC rc;
-     Package pkg;
-+    char *filename;
-+    rpmRC result;
-+    struct binaryPackageTaskData *next;
-+};
-+
-+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
-+{
-+    struct binaryPackageTaskData *tasks = NULL;
-+    struct binaryPackageTaskData *task = NULL;
-+    struct binaryPackageTaskData *prev = NULL;
-+
-+    for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
-+        task = rcalloc(1, sizeof(*task));
-+        task->pkg = pkg;
-+        if (pkg == spec->packages) {
-+            // the first package needs to be processed ahead of others, as they copy
-+            // changelog data from it, and so otherwise data races would happen
-+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
-+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
-+            tasks = task;
-+        }
-+        if (prev != NULL) {
-+            prev->next = task;
-+        }
-+        prev = task;
-+    }
-+
-+    #pragma omp parallel
-+    #pragma omp single
-+    // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults
-+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
-+        if (task != tasks)
-+        #pragma omp task
-+        {
-+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
-+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
-+        }
-+    }
-+
-+    return tasks;
-+}
-+
-+static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
-+{
-+    while (tasks != NULL) {
-+        struct binaryPackageTaskData* next = tasks->next;
-+        rfree(tasks->filename);
-+        rfree(tasks);
-+        tasks = next;
-+    }
-+}
-+
-+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
-+{
-     char *pkglist = NULL;
- 
--    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
--	char *fn = NULL;
--	rc = packageBinary(spec, pkg, cookie, cheating, &fn);
--	if (rc == RPMRC_OK) {
--	    rstrcat(&pkglist, fn);
--	    rstrcat(&pkglist, " ");
--	}
--	free(fn);
--	if (rc != RPMRC_OK) {
--	    pkglist = _free(pkglist);
--	    return rc;
--	}
-+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
-+
-+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
-+        if (task->result == RPMRC_OK) {
-+            rstrcat(&pkglist, task->filename);
-+            rstrcat(&pkglist, " ");
-+        } else {
-+            _free(pkglist);
-+            freeBinaryPackageTasks(tasks);
-+            return RPMRC_FAIL;
-+        }
-     }
-+    freeBinaryPackageTasks(tasks);
- 
-     /* Now check the package set if enabled */
-     if (pkglist != NULL) {
-diff --git a/configure.ac b/configure.ac
-index a506ec819..59fa0acaf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
- 
- PKG_PROG_PKG_CONFIG
- 
-+AC_OPENMP
-+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
-+
- dnl Checks for programs.
- AC_PROG_CXX
- AC_PROG_AWK
--- 
-2.11.0
-
diff --git a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
deleted file mode 100644
index c348ae5330e..00000000000
--- a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Tue, 30 May 2017 13:58:30 +0300
-Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
- thread-safe
-
-Otherwise multithreaded rpm building explodes in various ways due
-to data races.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
- 1 file changed, 47 insertions(+), 9 deletions(-)
-
-diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
-index 30a57eb10..58ba95a02 100644
---- a/rpmio/rpmstrpool.c
-+++ b/rpmio/rpmstrpool.c
-@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
-     return ht;
- }
- 
-+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
-+
- static void poolHashResize(rpmstrPool pool, int numBuckets)
- {
-     poolHash ht = pool->hash;
-@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets)
- 
-     for (int i=0; i<ht->numBuckets; i++) {
-         if (!ht->buckets[i].keyid) continue;
--        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
-+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
-         for (unsigned int j=0;;j++) {
-             unsigned int hash = hashbucket(keyHash, j) % numBuckets;
-             if (!buckets[hash].keyid) {
-@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke
-             ht->buckets[hash].keyid = keyid;
-             ht->keyCount++;
-             break;
--        } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) {
-+        } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) {
-             return;
-         }
-     }
-@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
-     int maxcollisions = 0;
- 
-     for (i=0; i<ht->numBuckets; i++) {
--        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
-+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
-         for (unsigned int j=0;;j++) {
-             unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets;
-             if (hash==i) {
-@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
- 
-     pool->hash = poolHashCreate(sizehint);
-     for (int i = 1; i <= pool->offs_size; i++)
--	poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
-+	poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
- }
- 
- rpmstrPool rpmstrPoolCreate(void)
-@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
- 
- rpmstrPool rpmstrPoolFree(rpmstrPool pool)
- {
-+    #pragma omp critical(rpmstrpool)
-+    {
-     if (pool) {
- 	if (pool->nrefs > 1) {
- 	    pool->nrefs--;
-@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
- 	    free(pool);
- 	}
-     }
-+    }
-     return NULL;
- }
- 
- rpmstrPool rpmstrPoolLink(rpmstrPool pool)
- {
-+    #pragma omp critical(rpmstrpool)
-+    {
-     if (pool)
- 	pool->nrefs++;
-+    }
-     return pool;
- }
- 
- void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
- {
-+    #pragma omp critical(rpmstrpool)
-+    {
-     if (pool && !pool->frozen) {
- 	if (!keephash) {
- 	    pool->hash = poolHashFree(pool->hash);
-@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
- 			      pool->offs_alloced * sizeof(*pool->offs));
- 	pool->frozen = 1;
-     }
-+    }
- }
- 
- void rpmstrPoolUnfreeze(rpmstrPool pool)
- {
-+    #pragma omp critical(rpmstrpool)
-+    {
-     if (pool) {
- 	if (pool->hash == NULL) {
- 	    rpmstrPoolRehash(pool);
- 	}
- 	pool->frozen = 0;
-     }
-+    }
- }
- 
- static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash)
-@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen,
-             return 0;
-         }
- 
--	s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
-+	s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
- 	/* pool string could be longer than keylen, require exact matche */
- 	if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
- 	    return ht->buckets[hash].keyid;
-@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen,
- rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create)
- {
-     rpmsid sid = 0;
--
-+    #pragma omp critical(rpmstrpool)
-+    {
-     if (s != NULL) {
- 	unsigned int hash = rstrnhash(s, slen);
- 	sid = strn2id(pool, s, slen, hash, create);
-     }
-+    }
-     return sid;
- }
- 
- rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
- {
-     rpmsid sid = 0;
--
-+    #pragma omp critical(rpmstrpool)
-+    {
-     if (s != NULL) {
- 	size_t slen;
- 	unsigned int hash = rstrlenhash(s, &slen);
- 	sid = strn2id(pool, s, slen, hash, create);
-     }
-+    }
-     return sid;
- }
- 
--const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
-+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
- {
-     const char *s = NULL;
-     if (pool && sid > 0 && sid <= pool->offs_size)
-@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
-     return s;
- }
- 
-+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
-+{
-+    const char *s = NULL;
-+    #pragma omp critical(rpmstrpool)
-+    {
-+    s = rpmstrPoolStrNoLock(pool, sid);
-+    }
-+    return s;
-+}
-+
- size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
- {
-     size_t slen = 0;
-+    #pragma omp critical(rpmstrpool)
-+    {
-     if (pool && sid > 0 && sid <= pool->offs_size) {
- 	slen = strlen(pool->offs[sid]);
-     }
-+    }
-     return slen;
- }
- 
-@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
- 
- rpmsid rpmstrPoolNumStr(rpmstrPool pool)
- {
--    return (pool != NULL) ? pool->offs_size : 0;
-+    rpmsid id = 0;
-+    #pragma omp critical(rpmstrpool)
-+    {
-+    if (pool) {
-+	id = pool->offs_size;
-+    }
-+    }
-+    return id;
- }
--- 
-2.11.0
-
diff --git a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
deleted file mode 100644
index 652e30b3e4a..00000000000
--- a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
+++ /dev/null
@@ -1,336 +0,0 @@
-From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 8 Jun 2017 17:08:09 +0300
-Subject: [PATCH] build/pack.c: remove static local variables from buildHost()
- and getBuildTime()
-
-Their use is causing difficult to diagnoze data races when building multiple
-packages in parallel, and is a bad idea in general, as it also makes it more
-difficult to reason about code.
-
-Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- build/build.c             | 54 ++++++++++++++++++++++++++++--
- build/pack.c              | 84 +++++++++--------------------------------------
- build/rpmbuild_internal.h |  8 +++--
- 3 files changed, 74 insertions(+), 72 deletions(-)
-
-diff --git a/build/build.c b/build/build.c
-index 13c3df2..b154f08 100644
---- a/build/build.c
-+++ b/build/build.c
-@@ -6,6 +6,8 @@
- #include "system.h"
- 
- #include <errno.h>
-+#include <netdb.h>
-+#include <time.h>
- #include <sys/wait.h>
- 
- #include <rpm/rpmlog.h>
-@@ -16,6 +18,50 @@
- 
- #include "debug.h"
- 
-+static rpm_time_t getBuildTime(void)
-+{
-+    rpm_time_t buildTime = 0;
-+    char *srcdate;
-+    time_t epoch;
-+    char *endptr;
-+
-+    srcdate = getenv("SOURCE_DATE_EPOCH");
-+    if (srcdate) {
-+        errno = 0;
-+        epoch = strtol(srcdate, &endptr, 10);
-+        if (srcdate == endptr || *endptr || errno != 0)
-+            rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
-+        else
-+            buildTime = (int32_t) epoch;
-+    } else
-+        buildTime = (int32_t) time(NULL);
-+
-+    return buildTime;
-+}
-+
-+static char * buildHost(void)
-+{
-+    char* hostname;
-+    struct hostent *hbn;
-+    char *bhMacro;
-+
-+    bhMacro = rpmExpand("%{?_buildhost}", NULL);
-+    if (strcmp(bhMacro, "") != 0) {
-+        rasprintf(&hostname, "%s", bhMacro);
-+    } else {
-+        hostname = rcalloc(1024, sizeof(*hostname));
-+        (void) gethostname(hostname, 1024);
-+        hbn = gethostbyname(hostname);
-+        if (hbn)
-+            strcpy(hostname, hbn->h_name);
-+        else
-+            rpmlog(RPMLOG_WARNING,
-+                    _("Could not canonicalize hostname: %s\n"), hostname);
-+    }
-+    free(bhMacro);
-+    return(hostname);
-+}
-+
- /**
-  */
- static rpmRC doRmSource(rpmSpec spec)
-@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
-     rpmRC rc = RPMRC_OK;
-     int test = (what & RPMBUILD_NOBUILD);
-     char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
-+    const char* host = buildHost();
-+    rpm_time_t buildTime = getBuildTime();
-+
- 
-     if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
- 	getenv("SOURCE_DATE_EPOCH") == NULL) {
-@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
- 		goto exit;
- 
- 	if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
--	    (rc = packageSources(spec, &cookie)))
-+	    (rc = packageSources(spec, &cookie, buildTime, host)))
- 		goto exit;
- 
- 	if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
--	    (rc = packageBinaries(spec, cookie, (didBuild == 0))))
-+	    (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host)))
- 		goto exit;
- 	
- 	if ((what & RPMBUILD_CLEAN) &&
-@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
- 	(void) unlink(spec->specFile);
- 
- exit:
-+    free(host);
-     free(cookie);
-     spec->rootDir = NULL;
-     if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
-diff --git a/build/pack.c b/build/pack.c
-index df15876..17a4b09 100644
---- a/build/pack.c
-+++ b/build/pack.c
-@@ -6,8 +6,6 @@
- #include "system.h"
- 
- #include <errno.h>
--#include <netdb.h>
--#include <time.h>
- #include <sys/wait.h>
- 
- #include <rpm/rpmlib.h>			/* RPMSIGTAG*, rpmReadPackageFile */
-@@ -152,57 +150,6 @@ exit:
-     return rc;
- }
- 
--static rpm_time_t * getBuildTime(void)
--{
--    static rpm_time_t buildTime[1];
--    char *srcdate;
--    time_t epoch;
--    char *endptr;
--
--    if (buildTime[0] == 0) {
--        srcdate = getenv("SOURCE_DATE_EPOCH");
--        if (srcdate) {
--            errno = 0;
--            epoch = strtol(srcdate, &endptr, 10);
--            if (srcdate == endptr || *endptr || errno != 0)
--                rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
--            else
--                buildTime[0] = (int32_t) epoch;
--        } else
--            buildTime[0] = (int32_t) time(NULL);
--    }
--
--    return buildTime;
--}
--
--static const char * buildHost(void)
--{
--    static char hostname[1024];
--    static int oneshot = 0;
--    struct hostent *hbn;
--    char *bhMacro;
--
--    if (! oneshot) {
--        bhMacro = rpmExpand("%{?_buildhost}", NULL);
--        if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
--            strcpy(hostname, bhMacro);
--        } else {
--            if (strcmp(bhMacro, "") != 0)
--                rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n"));
--            (void) gethostname(hostname, sizeof(hostname));
--            hbn = gethostbyname(hostname);
--            if (hbn)
--                strcpy(hostname, hbn->h_name);
--            else
--                rpmlog(RPMLOG_WARNING,
--                        _("Could not canonicalize hostname: %s\n"), hostname);
--        }
--        free(bhMacro);
--        oneshot = 1;
--    }
--    return(hostname);
--}
--
- static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
- {
-     struct TriggerFileEntry *p;
-@@ -476,7 +423,8 @@ exit:
-  * order to how the RPM format is laid on disk.
-  */
- static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
--		      const char *fileName, char **cookie)
-+		      const char *fileName, char **cookie,
-+		      rpm_time_t buildTime, const char* buildHost)
- {
-     FD_t fd = NULL;
-     char * rpmio_flags = NULL;
-@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
- 
-     /* Create and add the cookie */
-     if (cookie) {
--	rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
-+	rasprintf(cookie, "%s %d", buildHost, buildTime);
- 	headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
-     }
- 
-@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
-     return RPMRC_OK;
- }
- 
--static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
-+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost)
- {
- 	const char *errorString;
- 	rpmRC rc = RPMRC_OK;
-@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
- 	headerCopyTags(spec->packages->header, pkg->header, copyTags);
- 	
- 	headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
--	headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
--	headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
-+	headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
-+	headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
- 
- 	if (spec->sourcePkgId != NULL) {
- 	    headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
-@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
- 	    free(binRpm);
- 	}
- 
--	rc = writeRPM(pkg, NULL, *filename, NULL);
-+	rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
- 	if (rc == RPMRC_OK) {
- 	    /* Do check each written package if enabled */
- 	    char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
-@@ -719,7 +667,7 @@ struct binaryPackageTaskData
-     struct binaryPackageTaskData *next;
- };
- 
--static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
-+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
- {
-     struct binaryPackageTaskData *tasks = NULL;
-     struct binaryPackageTaskData *task = NULL;
-@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
-         if (pkg == spec->packages) {
-             // the first package needs to be processed ahead of others, as they copy
-             // changelog data from it, and so otherwise data races would happen
--            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
-+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
-             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
-             tasks = task;
-         }
-@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
-         if (task != tasks)
-         #pragma omp task
-         {
--            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
-+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
-             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
-         }
-     }
-@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
-     }
- }
- 
--rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
-+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
- {
-     char *pkglist = NULL;
- 
--    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
-+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
- 
-     for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
-         if (task->result == RPMRC_OK) {
-@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
-     return RPMRC_OK;
- }
- 
--rpmRC packageSources(rpmSpec spec, char **cookie)
-+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost)
- {
-     Package sourcePkg = spec->sourcePackage;
-     rpmRC rc;
-@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
- 
-     /* Add some cruft */
-     headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
--    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
--    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
-+    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
-+    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
-     headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
- 
-     /* XXX this should be %_srpmdir */
-@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
- 	char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
- 
- 	spec->sourcePkgId = NULL;
--	rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
-+	rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost);
- 
- 	/* Do check SRPM package if enabled */
- 	if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
-diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
-index 439b7d3..07e8338 100644
---- a/build/rpmbuild_internal.h
-+++ b/build/rpmbuild_internal.h
-@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
-  * @param spec		spec file control structure
-  * @param cookie	build identifier "cookie" or NULL
-  * @param cheating	was build shortcircuited?
-+ * @param buildTime	the build timestamp that goes into packages
-+ * @param buildHost	the hostname where the build is happening
-  * @return		RPMRC_OK on success
-  */
- RPM_GNUC_INTERNAL
--rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
-+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost);
- 
- /** \ingroup rpmbuild
-  * Generate source package.
-  * @param spec		spec file control structure
-  * @retval cookie	build identifier "cookie" or NULL
-+ * @param buildTime	the build timestamp that goes into packages
-+ * @param buildHost	the hostname where the build is happening
-  * @return		RPMRC_OK on success
-  */
- RPM_GNUC_INTERNAL
--rpmRC packageSources(rpmSpec spec, char **cookie);
-+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost);
- 
- RPM_GNUC_INTERNAL
- int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
similarity index 91%
rename from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
rename to meta/recipes-devtools/rpm/rpm_4.15.1.bb
index c37330eb4c6..4fa2d764fb9 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
@@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
 LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
 
-SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
            file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
            file://0001-Do-not-read-config-files-from-HOME.patch \
            file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
@@ -34,18 +34,14 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
            file://0001-Fix-build-with-musl-C-library.patch \
            file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
            file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
-           file://0001-Split-binary-package-building-into-a-separate-functi.patch \
-           file://0002-Run-binary-package-creation-via-thread-pools.patch \
-           file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
-           file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
            file://0001-perl-disable-auto-reqs.patch \
            file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
            file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
-           file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
+           file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
            "
 
 PE = "1"
-SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
+SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
 
 S = "${WORKDIR}/git"
 
@@ -125,8 +121,7 @@ do_install_append () {
 	    ${D}/${libdir}/rpm/macros
 
 	sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
-	    ${D}${libdir}/rpm/pythondistdeps.py \
-	    ${D}${libdir}/rpm/python-macro-helper
+	    ${D}${libdir}/rpm/pythondistdeps.py
 }
 
 FILES_${PN} += "${libdir}/rpm-plugins/*.so \
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/5] libdnf: upgrade 0.28.1 -> 0.38.1
  2019-11-19 13:25 [PATCH 1/5] libsolv: upgrade 0.7.6 -> 0.7.8 Alexander Kanavin
  2019-11-19 13:25 ` [PATCH 2/5] rpm: upgrade to 4.15.1 Alexander Kanavin
@ 2019-11-19 13:25 ` Alexander Kanavin
  2019-11-19 13:25 ` [PATCH 4/5] dnf: upgrade 4.2.2 -> 4.2.16 Alexander Kanavin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-19 13:25 UTC (permalink / raw)
  To: openembedded-core

Add a patch that avoids hardcoded sphinx dependency.

Switch off a couple of new features (zchunk, html docs for
hawkey library via sphinx) that both require new dependencies.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 .../libdnf/0001-Add-WITH_TESTS-option.patch   | 12 +++---
 ...nly-if-documentation-is-actually-ena.patch | 42 +++++++++++++++++++
 .../{libdnf_0.28.1.bb => libdnf_0.38.1.bb}    |  5 ++-
 3 files changed, 52 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch
 rename meta/recipes-devtools/libdnf/{libdnf_0.28.1.bb => libdnf_0.38.1.bb} (84%)

diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
index 3c87d4d8b33..ac9400c48dc 100644
--- a/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch
@@ -1,4 +1,4 @@
-From e5a50db749b2b02e9e0cff9f7b639020e8ac76da Mon Sep 17 00:00:00 2001
+From 56fa2bbdbd29377a6ef0d0b7aadbac8b5ea8c95b Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 6 Nov 2018 13:54:43 +0100
 Subject: [PATCH] Add WITH_TESTS option
@@ -14,18 +14,18 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  2 files changed, 5 insertions(+)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ce88b9e3..7a99320a 100644
+index 881152a..965c992 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -32,6 +32,7 @@ option(WITH_HTML "Enables hawkey HTML generation" ON)
- option(WITH_MAN "Enables hawkey man page generation" ON)
+@@ -33,6 +33,7 @@ option(WITH_MAN "Enables hawkey man page generation" ON)
+ option(WITH_ZCHUNK "Build with zchunk support" ON)
  option(ENABLE_RHSM_SUPPORT "Build with Red Hat Subscription Manager support?" OFF)
  option(ENABLE_SOLV_URPMREORDER "Build with support for URPM-like solution reordering?" OFF)
 +option(WITH_TESTS "Enables unit tests" ON)
  
  
  # load pkg-config first; it's required by other modules
-@@ -158,8 +159,10 @@ endif()
+@@ -165,8 +166,10 @@ endif()
  
  
  # build tests
@@ -37,7 +37,7 @@ index ce88b9e3..7a99320a 100644
      add_subdirectory(python/hawkey)
  endif()
 diff --git a/python/hawkey/CMakeLists.txt b/python/hawkey/CMakeLists.txt
-index d9645346..84d17204 100644
+index d964534..84d1720 100644
 --- a/python/hawkey/CMakeLists.txt
 +++ b/python/hawkey/CMakeLists.txt
 @@ -50,4 +50,6 @@ target_link_libraries(_hawkeymodule ${PYTHON_LIBRARY})
diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch b/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch
new file mode 100644
index 00000000000..6dd7c71aae8
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch
@@ -0,0 +1,42 @@
+From b570c7f8bd089deec7da2b108aa789a27025a473 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 19 Nov 2019 13:46:09 +0100
+Subject: [PATCH] Look fo sphinx only if documentation is actually enabled
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ docs/hawkey/CMakeLists.txt | 20 +++++++++++---------
+ 1 file changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/docs/hawkey/CMakeLists.txt b/docs/hawkey/CMakeLists.txt
+index 52cc35c6..63c7672f 100644
+--- a/docs/hawkey/CMakeLists.txt
++++ b/docs/hawkey/CMakeLists.txt
+@@ -2,15 +2,17 @@
+ # tell sphinx-build to do them both in one go:
+ 
+ 
+-find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+-if(NOT EXISTS ${SPHINX_PROGRAM})
+-    find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR})
+-endif()
+-if(NOT EXISTS ${SPHINX_PROGRAM})
+-    find_program(SPHINX_PROGRAM NAMES sphinx-build)
+-endif()
+-if(NOT EXISTS ${SPHINX_PROGRAM})
+-    message(FATAL_ERROR "Sphinx program not found." )
++if (WITH_HTML OR WITH_MAN)
++    find_program(SPHINX_PROGRAM NAMES "sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
++    if(NOT EXISTS ${SPHINX_PROGRAM})
++        find_program(SPHINX_PROGRAM NAMES sphinx-build-${PYTHON_VERSION_MAJOR})
++    endif()
++    if(NOT EXISTS ${SPHINX_PROGRAM})
++        find_program(SPHINX_PROGRAM NAMES sphinx-build)
++    endif()
++    if(NOT EXISTS ${SPHINX_PROGRAM})
++        message(FATAL_ERROR "Sphinx program not found." )
++    endif()
+ endif()
+ 
+ if(WITH_HTML)
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.38.1.bb
similarity index 84%
rename from meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
rename to meta/recipes-devtools/libdnf/libdnf_0.38.1.bb
index 3f11e0231fa..50a747cb18a 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.38.1.bb
@@ -7,9 +7,10 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf \
            file://0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch \
            file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
            file://0001-Add-WITH_TESTS-option.patch \
+           file://0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch \
            "
 
-SRCREV = "751f89045b80d58c0d05800f74357cf78cdf7e77"
+SRCREV = "db4b61afdf65a2b791a58ad8e5c5be70a7fc123c"
 
 S = "${WORKDIR}/git"
 
@@ -20,6 +21,8 @@ inherit gtk-doc gobject-introspection cmake pkgconfig distutils3-base
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DWITH_MAN=OFF -DPYTHON_DESIRED=3 \
                   ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DWITH_GIR=ON', '-DWITH_GIR=OFF', d)} \
                   -DWITH_TESTS=OFF \
+                  -DWITH_ZCHUNK=OFF \
+                  -DWITH_HTML=OFF \
                 "
 EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/5] dnf: upgrade 4.2.2 -> 4.2.16
  2019-11-19 13:25 [PATCH 1/5] libsolv: upgrade 0.7.6 -> 0.7.8 Alexander Kanavin
  2019-11-19 13:25 ` [PATCH 2/5] rpm: upgrade to 4.15.1 Alexander Kanavin
  2019-11-19 13:25 ` [PATCH 3/5] libdnf: upgrade 0.28.1 -> 0.38.1 Alexander Kanavin
@ 2019-11-19 13:25 ` Alexander Kanavin
  2019-11-19 13:25 ` [PATCH 5/5] psmisc: remove a patch that is no longer necessary Alexander Kanavin
  2019-11-19 13:32 ` ✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more Patchwork
  4 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-19 13:25 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-devtools/dnf/{dnf_4.2.2.bb => dnf_4.2.16.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/dnf/{dnf_4.2.2.bb => dnf_4.2.16.bb} (98%)

diff --git a/meta/recipes-devtools/dnf/dnf_4.2.2.bb b/meta/recipes-devtools/dnf/dnf_4.2.16.bb
similarity index 98%
rename from meta/recipes-devtools/dnf/dnf_4.2.2.bb
rename to meta/recipes-devtools/dnf/dnf_4.2.16.bb
index f38167f1ad0..1373bccee23 100644
--- a/meta/recipes-devtools/dnf/dnf_4.2.2.bb
+++ b/meta/recipes-devtools/dnf/dnf_4.2.16.bb
@@ -15,7 +15,7 @@ SRC_URI = "git://github.com/rpm-software-management/dnf.git \
            file://0030-Run-python-scripts-using-env.patch \
            "
 
-SRCREV = "9947306a55271b8b7c9e2b6e3b7d582885b6045d"
+SRCREV = "4c74fe24c4232ce6bbde4b252f9715cdb29923f0"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
 S = "${WORKDIR}/git"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/5] psmisc: remove a patch that is no longer necessary
  2019-11-19 13:25 [PATCH 1/5] libsolv: upgrade 0.7.6 -> 0.7.8 Alexander Kanavin
                   ` (2 preceding siblings ...)
  2019-11-19 13:25 ` [PATCH 4/5] dnf: upgrade 4.2.2 -> 4.2.16 Alexander Kanavin
@ 2019-11-19 13:25 ` Alexander Kanavin
  2019-11-19 13:32 ` ✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more Patchwork
  4 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-19 13:25 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...te-src-directory-before-attempting-t.patch | 28 -------------------
 meta/recipes-extended/psmisc/psmisc_23.3.bb   |  1 -
 2 files changed, 29 deletions(-)
 delete mode 100644 meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch

diff --git a/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch b/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch
deleted file mode 100644
index 9451303dd7b..00000000000
--- a/meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From dac375f640fecd45e6254a8d870ee37ec8f41670 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 2 Nov 2017 16:21:22 +0200
-Subject: [PATCH] Makefile.am: create src directory before attempting to write
- there
-
-Otherwise out of tree builds will fail.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 441ae94..882969d 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -86,7 +86,7 @@ EXTRA_DIST = src/signames.c README.md misc/git-version-gen
- CLEANFILES = src/signames.h
- 
- src/signames.h: src/signames.c Makefile src/$(am__dirstamp)
--		export LC_ALL=C ; \
-+		export LC_ALL=C ; mkdir -p src ; \
- 		@CPP@ -dM $< |\
- 		tr -s '\t ' ' ' | sort -n -k 3 | sed \
- 	's:#define SIG\([A-Z][A-Z]*[0-9]*\) \([0-9][0-9]*\).*$\:{\ \2,"\1" },:p;d' | \
diff --git a/meta/recipes-extended/psmisc/psmisc_23.3.bb b/meta/recipes-extended/psmisc/psmisc_23.3.bb
index b3c3c7e5a84..e569f1074b6 100644
--- a/meta/recipes-extended/psmisc/psmisc_23.3.bb
+++ b/meta/recipes-extended/psmisc/psmisc_23.3.bb
@@ -4,7 +4,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
 
 SRC_URI = "git://gitlab.com/psmisc/psmisc.git;protocol=https \
            file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
-	   file://0001-Makefile.am-create-src-directory-before-attempting-t.patch \
            "
 SRCREV = "78bde849041e6c914a2a517ebe1255b86dc98772"
 S = "${WORKDIR}/git"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* ✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more
  2019-11-19 13:25 [PATCH 1/5] libsolv: upgrade 0.7.6 -> 0.7.8 Alexander Kanavin
                   ` (3 preceding siblings ...)
  2019-11-19 13:25 ` [PATCH 5/5] psmisc: remove a patch that is no longer necessary Alexander Kanavin
@ 2019-11-19 13:32 ` Patchwork
  2019-11-19 13:33   ` Alexander Kanavin
  4 siblings, 1 reply; 12+ messages in thread
From: Patchwork @ 2019-11-19 13:32 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

== Series Details ==

Series: "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/21215/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at dfb3b56641)

* Issue             Upstream-Status is in incorrect format [test_upstream_status_presence_format] 
  Suggested fix    Fix Upstream-Status format in 0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
  Current          Upstream-Status: Inapppropriate [upstream wants a proper fix]
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more
  2019-11-19 13:32 ` ✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more Patchwork
@ 2019-11-19 13:33   ` Alexander Kanavin
  0 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-19 13:33 UTC (permalink / raw)
  To: OE-core

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

On Tue, 19 Nov 2019 at 14:32, Patchwork <
patchwork@patchwork.openembedded.org> wrote:

> * Issue             Series does not apply on top of target branch
> [test_series_merge_on_head]
>   Suggested fix    Rebase your series on top of targeted branch
>   Targeted branch  master (currently at dfb3b56641)
>

This is intentional as psmisc patch is based on a previous patch that is in
master-next.


> * Issue             Upstream-Status is in incorrect format
> [test_upstream_status_presence_format]
>   Suggested fix    Fix Upstream-Status format in
> 0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>   Current          Upstream-Status: Inapppropriate [upstream wants a
> proper fix]
>   Standard format  Upstream-Status: <Valid status>
>   Valid status     Pending, Accepted, Backport, Denied, Inappropriate
> [reason], Submitted [where]
>

I will send a fixup patch for this.

Alex

[-- Attachment #2: Type: text/html, Size: 1451 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5] rpm: upgrade to 4.15.1
  2019-11-19 13:25 ` [PATCH 2/5] rpm: upgrade to 4.15.1 Alexander Kanavin
@ 2019-11-23 17:47   ` Khem Raj
  2019-11-25 15:19     ` Alexander Kanavin
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2019-11-23 17:47 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

breaks with needing openmp

http://errors.yoctoproject.org/Errors/Details/282827/

perhaps needs explicit dependency on libgomp now ?

On Tue, Nov 19, 2019 at 5:26 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> 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:
> https://github.com/rpm-software-management/rpm/issues/756
>
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>  ...satisfiable-dependency-when-building.patch |  28 +-
>  ...lib-rpm-as-the-installation-path-for.patch |  14 +-
>  ...kage-building-into-a-separate-functi.patch |  84 -----
>  ...es-requires-do-not-use-monodis-from-.patch |  58 ---
>  ...-run-file-classification-in-parallel.patch |  65 ++++
>  ...ry-package-creation-via-thread-pools.patch | 127 -------
>  ...e-operations-over-string-pools-threa.patch | 207 -----------
>  ...ove-static-local-variables-from-buil.patch | 336 ------------------
>  .../rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}    |  13 +-
>  9 files changed, 89 insertions(+), 843 deletions(-)
>  delete mode 100644 meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
>  delete mode 100644 meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
>  create mode 100644 meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>  delete mode 100644 meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
>  delete mode 100644 meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
>  delete mode 100644 meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
>  rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb} (91%)
>
> diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> index 80e2f0fad70..4029233fb70 100644
> --- a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> @@ -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 <alex.kanavin@gmail.com>
>  Date: Mon, 9 Jan 2017 18:52:11 +0200
>  Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
> @@ -9,25 +9,23 @@ hand produces rpms that way by design.
>
>  Upstream-Status: Inappropriate [oe-core specific]
>  Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +
>  ---
>   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
> -
> diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> index 82e7328757f..52440d68180 100644
> --- a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> @@ -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 <alex.kanavin@gmail.com>
>  Date: Mon, 27 Feb 2017 09:43:30 +0200
>  Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
> @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>   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
>
> @@ -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
> @@ -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 @@
> @@ -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
> diff --git a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> deleted file mode 100644
> index 6e44f0b7fc9..00000000000
> --- a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> +++ /dev/null
> @@ -1,84 +0,0 @@
> -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Thu, 25 May 2017 18:15:27 +0300
> -Subject: [PATCH 1/4] Split binary package building into a separate function
> -
> -So that it can be run as a thread pool task.
> -
> -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> -
> ----
> - build/pack.c | 33 +++++++++++++++++++++------------
> - 1 file changed, 21 insertions(+), 12 deletions(-)
> -
> -diff --git a/build/pack.c b/build/pack.c
> -index 518f4e92a..ccfd614cc 100644
> ---- a/build/pack.c
> -+++ b/build/pack.c
> -@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
> -     return RPMRC_OK;
> - }
> -
> --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
> - {
> --    rpmRC rc;
> --    const char *errorString;
> --    Package pkg;
> --    char *pkglist = NULL;
> --
> --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> --      char *fn;
> -+      const char *errorString;
> -+      rpmRC rc = RPMRC_OK;
> -
> -       if (pkg->fileList == NULL)
> --          continue;
> -+          return rc;
> -
> -       if ((rc = processScriptFiles(spec, pkg)))
> -           return rc;
> -@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -                    headerGetString(pkg->header, RPMTAG_NAME), errorString);
> -               return RPMRC_FAIL;
> -           }
> --          fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
> -+          *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
> -           if ((binDir = strchr(binRpm, '/')) != NULL) {
> -               struct stat st;
> -               char *dn;
> -@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -           free(binRpm);
> -       }
> -
> --      rc = writeRPM(pkg, NULL, fn, NULL);
> -+      rc = writeRPM(pkg, NULL, *filename, NULL);
> -       if (rc == RPMRC_OK) {
> -           /* Do check each written package if enabled */
> --          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
> -+          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
> -           if (pkgcheck[0] != ' ') {
> -               rc = checkPackages(pkgcheck);
> -           }
> -           free(pkgcheck);
> -+      }
> -+      return rc;
> -+}
> -+
> -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -+{
> -+    rpmRC rc;
> -+    Package pkg;
> -+    char *pkglist = NULL;
> -+
> -+    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> -+      char *fn = NULL;
> -+      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
> -+      if (rc == RPMRC_OK) {
> -           rstrcat(&pkglist, fn);
> -           rstrcat(&pkglist, " ");
> -       }
> ---
> -2.11.0
> -
> diff --git a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> deleted file mode 100644
> index 24aa4c7ffff..00000000000
> --- a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> +++ /dev/null
> @@ -1,58 +0,0 @@
> -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Tue, 27 Aug 2019 17:42:34 +0200
> -Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host
> -
> -There was a host contamination issue here: if monodis was installed
> -on the host, do_package would use that to resolve dependencies
> -of mono libraries (and often fail in that). Without monodis,
> -no dependencies are resolved, which is seemingly how things
> -are supposed to work.
> -
> -Upstream-Status: Inappropriate [oe-core specific]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ----
> - scripts/mono-find-provides | 8 ++++----
> - scripts/mono-find-requires | 8 ++++----
> - 2 files changed, 8 insertions(+), 8 deletions(-)
> -
> -diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
> -index 9348457d3..b28872ffb 100644
> ---- a/scripts/mono-find-provides
> -+++ b/scripts/mono-find-provides
> -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
> - build_bindir="$2/usr/bin"
> - build_libdir="$2$3"
> -
> --if [ -x $build_bindir/monodis ]; then
> --    monodis="$build_bindir/monodis"
> -+if [ -x $build_bindir/monodis.bogus ]; then
> -+    monodis="$build_bindir/monodis.bogus"
> -     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
> --elif [ -x /usr/bin/monodis ]; then
> --    monodis="/usr/bin/monodis"
> -+elif [ -x /usr/bin/monodis.bogus ]; then
> -+    monodis="/usr/bin/monodis.bogus"
> - else
> -     exit 0;
> - fi
> -diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
> -index ea58cae48..d270169e1 100644
> ---- a/scripts/mono-find-requires
> -+++ b/scripts/mono-find-requires
> -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
> - build_bindir="$2/usr/bin"
> - build_libdir="$2$3"
> -
> --if [ -x $build_bindir/monodis ]; then
> --    monodis="$build_bindir/monodis"
> -+if [ -x $build_bindir/monodis.bogus ]; then
> -+    monodis="$build_bindir/monodis.bogus"
> -     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
> --elif [ -x /usr/bin/monodis ]; then
> --    monodis="/usr/bin/monodis"
> -+elif [ -x /usr/bin/monodis.bogus ]; then
> -+    monodis="/usr/bin/monodis.bogus"
> - else
> -     exit 0;
> - fi
> diff --git a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> new file mode 100644
> index 00000000000..9a5cd7c80dc
> --- /dev/null
> +++ b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> @@ -0,0 +1,65 @@
> +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +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: Inapppropriate [upstream wants a proper fix]
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + 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 */
> diff --git a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> deleted file mode 100644
> index d10041c2e14..00000000000
> --- a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> +++ /dev/null
> @@ -1,127 +0,0 @@
> -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Thu, 25 May 2017 19:30:20 +0300
> -Subject: [PATCH 1/3] Run binary package creation via thread pools.
> -
> -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> -
> ----
> - build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
> - configure.ac |  3 +++
> - 2 files changed, 70 insertions(+), 14 deletions(-)
> -
> -diff --git a/build/pack.c b/build/pack.c
> -index ccfd614cc..ed5b9ab4e 100644
> ---- a/build/pack.c
> -+++ b/build/pack.c
> -@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
> -       return rc;
> - }
> -
> --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -+struct binaryPackageTaskData
> - {
> --    rpmRC rc;
> -     Package pkg;
> -+    char *filename;
> -+    rpmRC result;
> -+    struct binaryPackageTaskData *next;
> -+};
> -+
> -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
> -+{
> -+    struct binaryPackageTaskData *tasks = NULL;
> -+    struct binaryPackageTaskData *task = NULL;
> -+    struct binaryPackageTaskData *prev = NULL;
> -+
> -+    for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> -+        task = rcalloc(1, sizeof(*task));
> -+        task->pkg = pkg;
> -+        if (pkg == spec->packages) {
> -+            // the first package needs to be processed ahead of others, as they copy
> -+            // changelog data from it, and so otherwise data races would happen
> -+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
> -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
> -+            tasks = task;
> -+        }
> -+        if (prev != NULL) {
> -+            prev->next = task;
> -+        }
> -+        prev = task;
> -+    }
> -+
> -+    #pragma omp parallel
> -+    #pragma omp single
> -+    // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults
> -+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
> -+        if (task != tasks)
> -+        #pragma omp task
> -+        {
> -+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
> -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
> -+        }
> -+    }
> -+
> -+    return tasks;
> -+}
> -+
> -+static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
> -+{
> -+    while (tasks != NULL) {
> -+        struct binaryPackageTaskData* next = tasks->next;
> -+        rfree(tasks->filename);
> -+        rfree(tasks);
> -+        tasks = next;
> -+    }
> -+}
> -+
> -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -+{
> -     char *pkglist = NULL;
> -
> --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> --      char *fn = NULL;
> --      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
> --      if (rc == RPMRC_OK) {
> --          rstrcat(&pkglist, fn);
> --          rstrcat(&pkglist, " ");
> --      }
> --      free(fn);
> --      if (rc != RPMRC_OK) {
> --          pkglist = _free(pkglist);
> --          return rc;
> --      }
> -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
> -+
> -+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
> -+        if (task->result == RPMRC_OK) {
> -+            rstrcat(&pkglist, task->filename);
> -+            rstrcat(&pkglist, " ");
> -+        } else {
> -+            _free(pkglist);
> -+            freeBinaryPackageTasks(tasks);
> -+            return RPMRC_FAIL;
> -+        }
> -     }
> -+    freeBinaryPackageTasks(tasks);
> -
> -     /* Now check the package set if enabled */
> -     if (pkglist != NULL) {
> -diff --git a/configure.ac b/configure.ac
> -index a506ec819..59fa0acaf 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
> -
> - PKG_PROG_PKG_CONFIG
> -
> -+AC_OPENMP
> -+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
> -+
> - dnl Checks for programs.
> - AC_PROG_CXX
> - AC_PROG_AWK
> ---
> -2.11.0
> -
> diff --git a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> deleted file mode 100644
> index c348ae5330e..00000000000
> --- a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> +++ /dev/null
> @@ -1,207 +0,0 @@
> -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Tue, 30 May 2017 13:58:30 +0300
> -Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
> - thread-safe
> -
> -Otherwise multithreaded rpm building explodes in various ways due
> -to data races.
> -
> -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> -
> ----
> - rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
> - 1 file changed, 47 insertions(+), 9 deletions(-)
> -
> -diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
> -index 30a57eb10..58ba95a02 100644
> ---- a/rpmio/rpmstrpool.c
> -+++ b/rpmio/rpmstrpool.c
> -@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
> -     return ht;
> - }
> -
> -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
> -+
> - static void poolHashResize(rpmstrPool pool, int numBuckets)
> - {
> -     poolHash ht = pool->hash;
> -@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets)
> -
> -     for (int i=0; i<ht->numBuckets; i++) {
> -         if (!ht->buckets[i].keyid) continue;
> --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
> -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
> -         for (unsigned int j=0;;j++) {
> -             unsigned int hash = hashbucket(keyHash, j) % numBuckets;
> -             if (!buckets[hash].keyid) {
> -@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke
> -             ht->buckets[hash].keyid = keyid;
> -             ht->keyCount++;
> -             break;
> --        } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) {
> -+        } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) {
> -             return;
> -         }
> -     }
> -@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
> -     int maxcollisions = 0;
> -
> -     for (i=0; i<ht->numBuckets; i++) {
> --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
> -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
> -         for (unsigned int j=0;;j++) {
> -             unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets;
> -             if (hash==i) {
> -@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
> -
> -     pool->hash = poolHashCreate(sizehint);
> -     for (int i = 1; i <= pool->offs_size; i++)
> --      poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
> -+      poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
> - }
> -
> - rpmstrPool rpmstrPoolCreate(void)
> -@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
> -
> - rpmstrPool rpmstrPoolFree(rpmstrPool pool)
> - {
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -     if (pool) {
> -       if (pool->nrefs > 1) {
> -           pool->nrefs--;
> -@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
> -           free(pool);
> -       }
> -     }
> -+    }
> -     return NULL;
> - }
> -
> - rpmstrPool rpmstrPoolLink(rpmstrPool pool)
> - {
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -     if (pool)
> -       pool->nrefs++;
> -+    }
> -     return pool;
> - }
> -
> - void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
> - {
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -     if (pool && !pool->frozen) {
> -       if (!keephash) {
> -           pool->hash = poolHashFree(pool->hash);
> -@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
> -                             pool->offs_alloced * sizeof(*pool->offs));
> -       pool->frozen = 1;
> -     }
> -+    }
> - }
> -
> - void rpmstrPoolUnfreeze(rpmstrPool pool)
> - {
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -     if (pool) {
> -       if (pool->hash == NULL) {
> -           rpmstrPoolRehash(pool);
> -       }
> -       pool->frozen = 0;
> -     }
> -+    }
> - }
> -
> - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash)
> -@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen,
> -             return 0;
> -         }
> -
> --      s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
> -+      s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
> -       /* pool string could be longer than keylen, require exact matche */
> -       if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
> -           return ht->buckets[hash].keyid;
> -@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen,
> - rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create)
> - {
> -     rpmsid sid = 0;
> --
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -     if (s != NULL) {
> -       unsigned int hash = rstrnhash(s, slen);
> -       sid = strn2id(pool, s, slen, hash, create);
> -     }
> -+    }
> -     return sid;
> - }
> -
> - rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
> - {
> -     rpmsid sid = 0;
> --
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -     if (s != NULL) {
> -       size_t slen;
> -       unsigned int hash = rstrlenhash(s, &slen);
> -       sid = strn2id(pool, s, slen, hash, create);
> -     }
> -+    }
> -     return sid;
> - }
> -
> --const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
> -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
> - {
> -     const char *s = NULL;
> -     if (pool && sid > 0 && sid <= pool->offs_size)
> -@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
> -     return s;
> - }
> -
> -+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
> -+{
> -+    const char *s = NULL;
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -+    s = rpmstrPoolStrNoLock(pool, sid);
> -+    }
> -+    return s;
> -+}
> -+
> - size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
> - {
> -     size_t slen = 0;
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -     if (pool && sid > 0 && sid <= pool->offs_size) {
> -       slen = strlen(pool->offs[sid]);
> -     }
> -+    }
> -     return slen;
> - }
> -
> -@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
> -
> - rpmsid rpmstrPoolNumStr(rpmstrPool pool)
> - {
> --    return (pool != NULL) ? pool->offs_size : 0;
> -+    rpmsid id = 0;
> -+    #pragma omp critical(rpmstrpool)
> -+    {
> -+    if (pool) {
> -+      id = pool->offs_size;
> -+    }
> -+    }
> -+    return id;
> - }
> ---
> -2.11.0
> -
> diff --git a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> deleted file mode 100644
> index 652e30b3e4a..00000000000
> --- a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> +++ /dev/null
> @@ -1,336 +0,0 @@
> -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Thu, 8 Jun 2017 17:08:09 +0300
> -Subject: [PATCH] build/pack.c: remove static local variables from buildHost()
> - and getBuildTime()
> -
> -Their use is causing difficult to diagnoze data races when building multiple
> -packages in parallel, and is a bad idea in general, as it also makes it more
> -difficult to reason about code.
> -
> -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> -
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> -
> ----
> - build/build.c             | 54 ++++++++++++++++++++++++++++--
> - build/pack.c              | 84 +++++++++--------------------------------------
> - build/rpmbuild_internal.h |  8 +++--
> - 3 files changed, 74 insertions(+), 72 deletions(-)
> -
> -diff --git a/build/build.c b/build/build.c
> -index 13c3df2..b154f08 100644
> ---- a/build/build.c
> -+++ b/build/build.c
> -@@ -6,6 +6,8 @@
> - #include "system.h"
> -
> - #include <errno.h>
> -+#include <netdb.h>
> -+#include <time.h>
> - #include <sys/wait.h>
> -
> - #include <rpm/rpmlog.h>
> -@@ -16,6 +18,50 @@
> -
> - #include "debug.h"
> -
> -+static rpm_time_t getBuildTime(void)
> -+{
> -+    rpm_time_t buildTime = 0;
> -+    char *srcdate;
> -+    time_t epoch;
> -+    char *endptr;
> -+
> -+    srcdate = getenv("SOURCE_DATE_EPOCH");
> -+    if (srcdate) {
> -+        errno = 0;
> -+        epoch = strtol(srcdate, &endptr, 10);
> -+        if (srcdate == endptr || *endptr || errno != 0)
> -+            rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
> -+        else
> -+            buildTime = (int32_t) epoch;
> -+    } else
> -+        buildTime = (int32_t) time(NULL);
> -+
> -+    return buildTime;
> -+}
> -+
> -+static char * buildHost(void)
> -+{
> -+    char* hostname;
> -+    struct hostent *hbn;
> -+    char *bhMacro;
> -+
> -+    bhMacro = rpmExpand("%{?_buildhost}", NULL);
> -+    if (strcmp(bhMacro, "") != 0) {
> -+        rasprintf(&hostname, "%s", bhMacro);
> -+    } else {
> -+        hostname = rcalloc(1024, sizeof(*hostname));
> -+        (void) gethostname(hostname, 1024);
> -+        hbn = gethostbyname(hostname);
> -+        if (hbn)
> -+            strcpy(hostname, hbn->h_name);
> -+        else
> -+            rpmlog(RPMLOG_WARNING,
> -+                    _("Could not canonicalize hostname: %s\n"), hostname);
> -+    }
> -+    free(bhMacro);
> -+    return(hostname);
> -+}
> -+
> - /**
> -  */
> - static rpmRC doRmSource(rpmSpec spec)
> -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
> -     rpmRC rc = RPMRC_OK;
> -     int test = (what & RPMBUILD_NOBUILD);
> -     char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
> -+    const char* host = buildHost();
> -+    rpm_time_t buildTime = getBuildTime();
> -+
> -
> -     if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
> -       getenv("SOURCE_DATE_EPOCH") == NULL) {
> -@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
> -               goto exit;
> -
> -       if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
> --          (rc = packageSources(spec, &cookie)))
> -+          (rc = packageSources(spec, &cookie, buildTime, host)))
> -               goto exit;
> -
> -       if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
> --          (rc = packageBinaries(spec, cookie, (didBuild == 0))))
> -+          (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host)))
> -               goto exit;
> -
> -       if ((what & RPMBUILD_CLEAN) &&
> -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
> -       (void) unlink(spec->specFile);
> -
> - exit:
> -+    free(host);
> -     free(cookie);
> -     spec->rootDir = NULL;
> -     if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
> -diff --git a/build/pack.c b/build/pack.c
> -index df15876..17a4b09 100644
> ---- a/build/pack.c
> -+++ b/build/pack.c
> -@@ -6,8 +6,6 @@
> - #include "system.h"
> -
> - #include <errno.h>
> --#include <netdb.h>
> --#include <time.h>
> - #include <sys/wait.h>
> -
> - #include <rpm/rpmlib.h>                       /* RPMSIGTAG*, rpmReadPackageFile */
> -@@ -152,57 +150,6 @@ exit:
> -     return rc;
> - }
> -
> --static rpm_time_t * getBuildTime(void)
> --{
> --    static rpm_time_t buildTime[1];
> --    char *srcdate;
> --    time_t epoch;
> --    char *endptr;
> --
> --    if (buildTime[0] == 0) {
> --        srcdate = getenv("SOURCE_DATE_EPOCH");
> --        if (srcdate) {
> --            errno = 0;
> --            epoch = strtol(srcdate, &endptr, 10);
> --            if (srcdate == endptr || *endptr || errno != 0)
> --                rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
> --            else
> --                buildTime[0] = (int32_t) epoch;
> --        } else
> --            buildTime[0] = (int32_t) time(NULL);
> --    }
> --
> --    return buildTime;
> --}
> --
> --static const char * buildHost(void)
> --{
> --    static char hostname[1024];
> --    static int oneshot = 0;
> --    struct hostent *hbn;
> --    char *bhMacro;
> --
> --    if (! oneshot) {
> --        bhMacro = rpmExpand("%{?_buildhost}", NULL);
> --        if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
> --            strcpy(hostname, bhMacro);
> --        } else {
> --            if (strcmp(bhMacro, "") != 0)
> --                rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n"));
> --            (void) gethostname(hostname, sizeof(hostname));
> --            hbn = gethostbyname(hostname);
> --            if (hbn)
> --                strcpy(hostname, hbn->h_name);
> --            else
> --                rpmlog(RPMLOG_WARNING,
> --                        _("Could not canonicalize hostname: %s\n"), hostname);
> --        }
> --        free(bhMacro);
> --        oneshot = 1;
> --    }
> --    return(hostname);
> --}
> --
> - static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
> - {
> -     struct TriggerFileEntry *p;
> -@@ -476,7 +423,8 @@ exit:
> -  * order to how the RPM format is laid on disk.
> -  */
> - static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
> --                    const char *fileName, char **cookie)
> -+                    const char *fileName, char **cookie,
> -+                    rpm_time_t buildTime, const char* buildHost)
> - {
> -     FD_t fd = NULL;
> -     char * rpmio_flags = NULL;
> -@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
> -
> -     /* Create and add the cookie */
> -     if (cookie) {
> --      rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
> -+      rasprintf(cookie, "%s %d", buildHost, buildTime);
> -       headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
> -     }
> -
> -@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
> -     return RPMRC_OK;
> - }
> -
> --static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
> -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost)
> - {
> -       const char *errorString;
> -       rpmRC rc = RPMRC_OK;
> -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
> -       headerCopyTags(spec->packages->header, pkg->header, copyTags);
> -
> -       headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
> --      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
> --      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
> -+      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
> -+      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
> -
> -       if (spec->sourcePkgId != NULL) {
> -           headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
> -@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
> -           free(binRpm);
> -       }
> -
> --      rc = writeRPM(pkg, NULL, *filename, NULL);
> -+      rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
> -       if (rc == RPMRC_OK) {
> -           /* Do check each written package if enabled */
> -           char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
> -@@ -719,7 +667,7 @@ struct binaryPackageTaskData
> -     struct binaryPackageTaskData *next;
> - };
> -
> --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
> -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
> - {
> -     struct binaryPackageTaskData *tasks = NULL;
> -     struct binaryPackageTaskData *task = NULL;
> -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
> -         if (pkg == spec->packages) {
> -             // the first package needs to be processed ahead of others, as they copy
> -             // changelog data from it, and so otherwise data races would happen
> --            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
> -+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
> -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
> -             tasks = task;
> -         }
> -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
> -         if (task != tasks)
> -         #pragma omp task
> -         {
> --            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
> -+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
> -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
> -         }
> -     }
> -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
> -     }
> - }
> -
> --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
> - {
> -     char *pkglist = NULL;
> -
> --    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
> -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
> -
> -     for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
> -         if (task->result == RPMRC_OK) {
> -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> -     return RPMRC_OK;
> - }
> -
> --rpmRC packageSources(rpmSpec spec, char **cookie)
> -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost)
> - {
> -     Package sourcePkg = spec->sourcePackage;
> -     rpmRC rc;
> -@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
> -
> -     /* Add some cruft */
> -     headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
> --    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
> --    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
> -+    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
> -+    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
> -     headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
> -
> -     /* XXX this should be %_srpmdir */
> -@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
> -       char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
> -
> -       spec->sourcePkgId = NULL;
> --      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
> -+      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost);
> -
> -       /* Do check SRPM package if enabled */
> -       if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
> -diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
> -index 439b7d3..07e8338 100644
> ---- a/build/rpmbuild_internal.h
> -+++ b/build/rpmbuild_internal.h
> -@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
> -  * @param spec                spec file control structure
> -  * @param cookie      build identifier "cookie" or NULL
> -  * @param cheating    was build shortcircuited?
> -+ * @param buildTime   the build timestamp that goes into packages
> -+ * @param buildHost   the hostname where the build is happening
> -  * @return            RPMRC_OK on success
> -  */
> - RPM_GNUC_INTERNAL
> --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
> -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost);
> -
> - /** \ingroup rpmbuild
> -  * Generate source package.
> -  * @param spec                spec file control structure
> -  * @retval cookie     build identifier "cookie" or NULL
> -+ * @param buildTime   the build timestamp that goes into packages
> -+ * @param buildHost   the hostname where the build is happening
> -  * @return            RPMRC_OK on success
> -  */
> - RPM_GNUC_INTERNAL
> --rpmRC packageSources(rpmSpec spec, char **cookie);
> -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost);
> -
> - RPM_GNUC_INTERNAL
> - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
> diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
> similarity index 91%
> rename from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> rename to meta/recipes-devtools/rpm/rpm_4.15.1.bb
> index c37330eb4c6..4fa2d764fb9 100644
> --- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> +++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
> @@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
>  LICENSE = "GPL-2.0"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
>
> -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
> +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
>             file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
>             file://0001-Do-not-read-config-files-from-HOME.patch \
>             file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
> @@ -34,18 +34,14 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
>             file://0001-Fix-build-with-musl-C-library.patch \
>             file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
>             file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
> -           file://0001-Split-binary-package-building-into-a-separate-functi.patch \
> -           file://0002-Run-binary-package-creation-via-thread-pools.patch \
> -           file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
> -           file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
>             file://0001-perl-disable-auto-reqs.patch \
>             file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
>             file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
> -           file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
> +           file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
>             "
>
>  PE = "1"
> -SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
> +SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
>
>  S = "${WORKDIR}/git"
>
> @@ -125,8 +121,7 @@ do_install_append () {
>             ${D}/${libdir}/rpm/macros
>
>         sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
> -           ${D}${libdir}/rpm/pythondistdeps.py \
> -           ${D}${libdir}/rpm/python-macro-helper
> +           ${D}${libdir}/rpm/pythondistdeps.py
>  }
>
>  FILES_${PN} += "${libdir}/rpm-plugins/*.so \
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5] rpm: upgrade to 4.15.1
  2019-11-23 17:47   ` Khem Raj
@ 2019-11-25 15:19     ` Alexander Kanavin
  2019-11-25 15:50       ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-25 15:19 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 48610 bytes --]

omp.h is coming from gcc-runtime. Which compiler are you using? Probably an
override (specific for that compiler) is needed.

Alex

On Sat, 23 Nov 2019 at 18:48, Khem Raj <raj.khem@gmail.com> wrote:

> breaks with needing openmp
>
> http://errors.yoctoproject.org/Errors/Details/282827/
>
> perhaps needs explicit dependency on libgomp now ?
>
> On Tue, Nov 19, 2019 at 5:26 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > 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:
> > https://github.com/rpm-software-management/rpm/issues/756
> >
> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > ---
> >  ...satisfiable-dependency-when-building.patch |  28 +-
> >  ...lib-rpm-as-the-installation-path-for.patch |  14 +-
> >  ...kage-building-into-a-separate-functi.patch |  84 -----
> >  ...es-requires-do-not-use-monodis-from-.patch |  58 ---
> >  ...-run-file-classification-in-parallel.patch |  65 ++++
> >  ...ry-package-creation-via-thread-pools.patch | 127 -------
> >  ...e-operations-over-string-pools-threa.patch | 207 -----------
> >  ...ove-static-local-variables-from-buil.patch | 336 ------------------
> >  .../rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}    |  13 +-
> >  9 files changed, 89 insertions(+), 843 deletions(-)
> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> >  create mode 100644
> meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> >  rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}
> (91%)
> >
> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> > index 80e2f0fad70..4029233fb70 100644
> > ---
> a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> > +++
> b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> > @@ -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 <alex.kanavin@gmail.com>
> >  Date: Mon, 9 Jan 2017 18:52:11 +0200
> >  Subject: [PATCH] Do not add an unsatisfiable dependency when building
> rpms in
> > @@ -9,25 +9,23 @@ hand produces rpms that way by design.
> >
> >  Upstream-Status: Inappropriate [oe-core specific]
> >  Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > +
> >  ---
> >   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
> > -
> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> > index 82e7328757f..52440d68180 100644
> > ---
> a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> > +++
> b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> > @@ -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 <alex.kanavin@gmail.com>
> >  Date: Mon, 27 Feb 2017 09:43:30 +0200
> >  Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
> > @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <
> alex.kanavin@gmail.com>
> >   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
> >
> > @@ -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
> > @@ -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 @@
> > @@ -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
> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> > deleted file mode 100644
> > index 6e44f0b7fc9..00000000000
> > ---
> a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> > +++ /dev/null
> > @@ -1,84 +0,0 @@
> > -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> > -Date: Thu, 25 May 2017 18:15:27 +0300
> > -Subject: [PATCH 1/4] Split binary package building into a separate
> function
> > -
> > -So that it can be run as a thread pool task.
> > -
> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > -
> > ----
> > - build/pack.c | 33 +++++++++++++++++++++------------
> > - 1 file changed, 21 insertions(+), 12 deletions(-)
> > -
> > -diff --git a/build/pack.c b/build/pack.c
> > -index 518f4e92a..ccfd614cc 100644
> > ---- a/build/pack.c
> > -+++ b/build/pack.c
> > -@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
> > -     return RPMRC_OK;
> > - }
> > -
> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char
> *cookie, int cheating, char** filename)
> > - {
> > --    rpmRC rc;
> > --    const char *errorString;
> > --    Package pkg;
> > --    char *pkglist = NULL;
> > --
> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> > --      char *fn;
> > -+      const char *errorString;
> > -+      rpmRC rc = RPMRC_OK;
> > -
> > -       if (pkg->fileList == NULL)
> > --          continue;
> > -+          return rc;
> > -
> > -       if ((rc = processScriptFiles(spec, pkg)))
> > -           return rc;
> > -@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char
> *cookie, int cheating)
> > -                    headerGetString(pkg->header, RPMTAG_NAME),
> errorString);
> > -               return RPMRC_FAIL;
> > -           }
> > --          fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
> > -+          *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
> > -           if ((binDir = strchr(binRpm, '/')) != NULL) {
> > -               struct stat st;
> > -               char *dn;
> > -@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char
> *cookie, int cheating)
> > -           free(binRpm);
> > -       }
> > -
> > --      rc = writeRPM(pkg, NULL, fn, NULL);
> > -+      rc = writeRPM(pkg, NULL, *filename, NULL);
> > -       if (rc == RPMRC_OK) {
> > -           /* Do check each written package if enabled */
> > --          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
> > -+          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ",
> *filename, NULL);
> > -           if (pkgcheck[0] != ' ') {
> > -               rc = checkPackages(pkgcheck);
> > -           }
> > -           free(pkgcheck);
> > -+      }
> > -+      return rc;
> > -+}
> > -+
> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> > -+{
> > -+    rpmRC rc;
> > -+    Package pkg;
> > -+    char *pkglist = NULL;
> > -+
> > -+    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> > -+      char *fn = NULL;
> > -+      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
> > -+      if (rc == RPMRC_OK) {
> > -           rstrcat(&pkglist, fn);
> > -           rstrcat(&pkglist, " ");
> > -       }
> > ---
> > -2.11.0
> > -
> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> > deleted file mode 100644
> > index 24aa4c7ffff..00000000000
> > ---
> a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> > +++ /dev/null
> > @@ -1,58 +0,0 @@
> > -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> > -Date: Tue, 27 Aug 2019 17:42:34 +0200
> > -Subject: [PATCH] mono-find-provides/requires: do not use monodis from
> the host
> > -
> > -There was a host contamination issue here: if monodis was installed
> > -on the host, do_package would use that to resolve dependencies
> > -of mono libraries (and often fail in that). Without monodis,
> > -no dependencies are resolved, which is seemingly how things
> > -are supposed to work.
> > -
> > -Upstream-Status: Inappropriate [oe-core specific]
> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > ----
> > - scripts/mono-find-provides | 8 ++++----
> > - scripts/mono-find-requires | 8 ++++----
> > - 2 files changed, 8 insertions(+), 8 deletions(-)
> > -
> > -diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
> > -index 9348457d3..b28872ffb 100644
> > ---- a/scripts/mono-find-provides
> > -+++ b/scripts/mono-find-provides
> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep
> -E "\\.(exe|dll)\$"))
> > - build_bindir="$2/usr/bin"
> > - build_libdir="$2$3"
> > -
> > --if [ -x $build_bindir/monodis ]; then
> > --    monodis="$build_bindir/monodis"
> > -+if [ -x $build_bindir/monodis.bogus ]; then
> > -+    monodis="$build_bindir/monodis.bogus"
> > -     export
> LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
> > --elif [ -x /usr/bin/monodis ]; then
> > --    monodis="/usr/bin/monodis"
> > -+elif [ -x /usr/bin/monodis.bogus ]; then
> > -+    monodis="/usr/bin/monodis.bogus"
> > - else
> > -     exit 0;
> > - fi
> > -diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
> > -index ea58cae48..d270169e1 100644
> > ---- a/scripts/mono-find-requires
> > -+++ b/scripts/mono-find-requires
> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep
> -E "\\.(exe|dll)\$"))
> > - build_bindir="$2/usr/bin"
> > - build_libdir="$2$3"
> > -
> > --if [ -x $build_bindir/monodis ]; then
> > --    monodis="$build_bindir/monodis"
> > -+if [ -x $build_bindir/monodis.bogus ]; then
> > -+    monodis="$build_bindir/monodis.bogus"
> > -     export
> LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
> > --elif [ -x /usr/bin/monodis ]; then
> > --    monodis="/usr/bin/monodis"
> > -+elif [ -x /usr/bin/monodis.bogus ]; then
> > -+    monodis="/usr/bin/monodis.bogus"
> > - else
> > -     exit 0;
> > - fi
> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> > new file mode 100644
> > index 00000000000..9a5cd7c80dc
> > --- /dev/null
> > +++
> b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> > @@ -0,0 +1,65 @@
> > +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001
> > +From: Alexander Kanavin <alex.kanavin@gmail.com>
> > +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: Inapppropriate [upstream wants a proper fix]
> > +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > +---
> > + 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 */
> > diff --git
> a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> > deleted file mode 100644
> > index d10041c2e14..00000000000
> > ---
> a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> > +++ /dev/null
> > @@ -1,127 +0,0 @@
> > -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> > -Date: Thu, 25 May 2017 19:30:20 +0300
> > -Subject: [PATCH 1/3] Run binary package creation via thread pools.
> > -
> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > -
> > ----
> > - build/pack.c | 81
> +++++++++++++++++++++++++++++++++++++++++++++++++-----------
> > - configure.ac |  3 +++
> > - 2 files changed, 70 insertions(+), 14 deletions(-)
> > -
> > -diff --git a/build/pack.c b/build/pack.c
> > -index ccfd614cc..ed5b9ab4e 100644
> > ---- a/build/pack.c
> > -+++ b/build/pack.c
> > -@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package
> pkg, const char *cookie, int ch
> > -       return rc;
> > - }
> > -
> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> > -+struct binaryPackageTaskData
> > - {
> > --    rpmRC rc;
> > -     Package pkg;
> > -+    char *filename;
> > -+    rpmRC result;
> > -+    struct binaryPackageTaskData *next;
> > -+};
> > -+
> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec
> spec, const char *cookie, int cheating)
> > -+{
> > -+    struct binaryPackageTaskData *tasks = NULL;
> > -+    struct binaryPackageTaskData *task = NULL;
> > -+    struct binaryPackageTaskData *prev = NULL;
> > -+
> > -+    for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> > -+        task = rcalloc(1, sizeof(*task));
> > -+        task->pkg = pkg;
> > -+        if (pkg == spec->packages) {
> > -+            // the first package needs to be processed ahead of
> others, as they copy
> > -+            // changelog data from it, and so otherwise data races
> would happen
> > -+            task->result = packageBinary(spec, pkg, cookie, cheating,
> &(task->filename));
> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> > -+            tasks = task;
> > -+        }
> > -+        if (prev != NULL) {
> > -+            prev->next = task;
> > -+        }
> > -+        prev = task;
> > -+    }
> > -+
> > -+    #pragma omp parallel
> > -+    #pragma omp single
> > -+    // re-declaring task variable is necessary, or older gcc versions
> will produce code that segfaults
> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL;
> task = task->next) {
> > -+        if (task != tasks)
> > -+        #pragma omp task
> > -+        {
> > -+            task->result = packageBinary(spec, task->pkg, cookie,
> cheating, &(task->filename));
> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> > -+        }
> > -+    }
> > -+
> > -+    return tasks;
> > -+}
> > -+
> > -+static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
> > -+{
> > -+    while (tasks != NULL) {
> > -+        struct binaryPackageTaskData* next = tasks->next;
> > -+        rfree(tasks->filename);
> > -+        rfree(tasks);
> > -+        tasks = next;
> > -+    }
> > -+}
> > -+
> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> > -+{
> > -     char *pkglist = NULL;
> > -
> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> > --      char *fn = NULL;
> > --      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
> > --      if (rc == RPMRC_OK) {
> > --          rstrcat(&pkglist, fn);
> > --          rstrcat(&pkglist, " ");
> > --      }
> > --      free(fn);
> > --      if (rc != RPMRC_OK) {
> > --          pkglist = _free(pkglist);
> > --          return rc;
> > --      }
> > -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec,
> cookie, cheating);
> > -+
> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL;
> task = task->next) {
> > -+        if (task->result == RPMRC_OK) {
> > -+            rstrcat(&pkglist, task->filename);
> > -+            rstrcat(&pkglist, " ");
> > -+        } else {
> > -+            _free(pkglist);
> > -+            freeBinaryPackageTasks(tasks);
> > -+            return RPMRC_FAIL;
> > -+        }
> > -     }
> > -+    freeBinaryPackageTasks(tasks);
> > -
> > -     /* Now check the package set if enabled */
> > -     if (pkglist != NULL) {
> > -diff --git a/configure.ac b/configure.ac
> > -index a506ec819..59fa0acaf 100644
> > ---- a/configure.ac
> > -+++ b/configure.ac
> > -@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
> > -
> > - PKG_PROG_PKG_CONFIG
> > -
> > -+AC_OPENMP
> > -+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
> > -+
> > - dnl Checks for programs.
> > - AC_PROG_CXX
> > - AC_PROG_AWK
> > ---
> > -2.11.0
> > -
> > diff --git
> a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> > deleted file mode 100644
> > index c348ae5330e..00000000000
> > ---
> a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> > +++ /dev/null
> > @@ -1,207 +0,0 @@
> > -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> > -Date: Tue, 30 May 2017 13:58:30 +0300
> > -Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
> > - thread-safe
> > -
> > -Otherwise multithreaded rpm building explodes in various ways due
> > -to data races.
> > -
> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > -
> > ----
> > - rpmio/rpmstrpool.c | 56
> +++++++++++++++++++++++++++++++++++++++++++++---------
> > - 1 file changed, 47 insertions(+), 9 deletions(-)
> > -
> > -diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
> > -index 30a57eb10..58ba95a02 100644
> > ---- a/rpmio/rpmstrpool.c
> > -+++ b/rpmio/rpmstrpool.c
> > -@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
> > -     return ht;
> > - }
> > -
> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
> > -+
> > - static void poolHashResize(rpmstrPool pool, int numBuckets)
> > - {
> > -     poolHash ht = pool->hash;
> > -@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int
> numBuckets)
> > -
> > -     for (int i=0; i<ht->numBuckets; i++) {
> > -         if (!ht->buckets[i].keyid) continue;
> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool,
> ht->buckets[i].keyid));
> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,
> ht->buckets[i].keyid));
> > -         for (unsigned int j=0;;j++) {
> > -             unsigned int hash = hashbucket(keyHash, j) % numBuckets;
> > -             if (!buckets[hash].keyid) {
> > -@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool,
> const char * key, unsigned int ke
> > -             ht->buckets[hash].keyid = keyid;
> > -             ht->keyCount++;
> > -             break;
> > --        } else if (!strcmp(rpmstrPoolStr(pool,
> ht->buckets[hash].keyid), key)) {
> > -+        } else if (!strcmp(rpmstrPoolStrNoLock(pool,
> ht->buckets[hash].keyid), key)) {
> > -             return;
> > -         }
> > -     }
> > -@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
> > -     int maxcollisions = 0;
> > -
> > -     for (i=0; i<ht->numBuckets; i++) {
> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool,
> ht->buckets[i].keyid));
> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,
> ht->buckets[i].keyid));
> > -         for (unsigned int j=0;;j++) {
> > -             unsigned int hash = hashbucket(keyHash, i) %
> ht->numBuckets;
> > -             if (hash==i) {
> > -@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
> > -
> > -     pool->hash = poolHashCreate(sizehint);
> > -     for (int i = 1; i <= pool->offs_size; i++)
> > --      poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
> > -+      poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
> > - }
> > -
> > - rpmstrPool rpmstrPoolCreate(void)
> > -@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
> > -
> > - rpmstrPool rpmstrPoolFree(rpmstrPool pool)
> > - {
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -     if (pool) {
> > -       if (pool->nrefs > 1) {
> > -           pool->nrefs--;
> > -@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
> > -           free(pool);
> > -       }
> > -     }
> > -+    }
> > -     return NULL;
> > - }
> > -
> > - rpmstrPool rpmstrPoolLink(rpmstrPool pool)
> > - {
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -     if (pool)
> > -       pool->nrefs++;
> > -+    }
> > -     return pool;
> > - }
> > -
> > - void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
> > - {
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -     if (pool && !pool->frozen) {
> > -       if (!keephash) {
> > -           pool->hash = poolHashFree(pool->hash);
> > -@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int
> keephash)
> > -                             pool->offs_alloced * sizeof(*pool->offs));
> > -       pool->frozen = 1;
> > -     }
> > -+    }
> > - }
> > -
> > - void rpmstrPoolUnfreeze(rpmstrPool pool)
> > - {
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -     if (pool) {
> > -       if (pool->hash == NULL) {
> > -           rpmstrPoolRehash(pool);
> > -       }
> > -       pool->frozen = 0;
> > -     }
> > -+    }
> > - }
> > -
> > - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t
> slen, unsigned int hash)
> > -@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const
> char * key, size_t keylen,
> > -             return 0;
> > -         }
> > -
> > --      s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
> > -+      s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
> > -       /* pool string could be longer than keylen, require exact matche
> */
> > -       if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
> > -           return ht->buckets[hash].keyid;
> > -@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool,
> const char *s, size_t slen,
> > - rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int
> create)
> > - {
> > -     rpmsid sid = 0;
> > --
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -     if (s != NULL) {
> > -       unsigned int hash = rstrnhash(s, slen);
> > -       sid = strn2id(pool, s, slen, hash, create);
> > -     }
> > -+    }
> > -     return sid;
> > - }
> > -
> > - rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
> > - {
> > -     rpmsid sid = 0;
> > --
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -     if (s != NULL) {
> > -       size_t slen;
> > -       unsigned int hash = rstrlenhash(s, &slen);
> > -       sid = strn2id(pool, s, slen, hash, create);
> > -     }
> > -+    }
> > -     return sid;
> > - }
> > -
> > --const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
> > - {
> > -     const char *s = NULL;
> > -     if (pool && sid > 0 && sid <= pool->offs_size)
> > -@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool,
> rpmsid sid)
> > -     return s;
> > - }
> > -
> > -+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
> > -+{
> > -+    const char *s = NULL;
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -+    s = rpmstrPoolStrNoLock(pool, sid);
> > -+    }
> > -+    return s;
> > -+}
> > -+
> > - size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
> > - {
> > -     size_t slen = 0;
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -     if (pool && sid > 0 && sid <= pool->offs_size) {
> > -       slen = strlen(pool->offs[sid]);
> > -     }
> > -+    }
> > -     return slen;
> > - }
> > -
> > -@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
> > -
> > - rpmsid rpmstrPoolNumStr(rpmstrPool pool)
> > - {
> > --    return (pool != NULL) ? pool->offs_size : 0;
> > -+    rpmsid id = 0;
> > -+    #pragma omp critical(rpmstrpool)
> > -+    {
> > -+    if (pool) {
> > -+      id = pool->offs_size;
> > -+    }
> > -+    }
> > -+    return id;
> > - }
> > ---
> > -2.11.0
> > -
> > diff --git
> a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> > deleted file mode 100644
> > index 652e30b3e4a..00000000000
> > ---
> a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> > +++ /dev/null
> > @@ -1,336 +0,0 @@
> > -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001
> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> > -Date: Thu, 8 Jun 2017 17:08:09 +0300
> > -Subject: [PATCH] build/pack.c: remove static local variables from
> buildHost()
> > - and getBuildTime()
> > -
> > -Their use is causing difficult to diagnoze data races when building
> multiple
> > -packages in parallel, and is a bad idea in general, as it also makes it
> more
> > -difficult to reason about code.
> > -
> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > -
> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > -
> > ----
> > - build/build.c             | 54 ++++++++++++++++++++++++++++--
> > - build/pack.c              | 84
> +++++++++--------------------------------------
> > - build/rpmbuild_internal.h |  8 +++--
> > - 3 files changed, 74 insertions(+), 72 deletions(-)
> > -
> > -diff --git a/build/build.c b/build/build.c
> > -index 13c3df2..b154f08 100644
> > ---- a/build/build.c
> > -+++ b/build/build.c
> > -@@ -6,6 +6,8 @@
> > - #include "system.h"
> > -
> > - #include <errno.h>
> > -+#include <netdb.h>
> > -+#include <time.h>
> > - #include <sys/wait.h>
> > -
> > - #include <rpm/rpmlog.h>
> > -@@ -16,6 +18,50 @@
> > -
> > - #include "debug.h"
> > -
> > -+static rpm_time_t getBuildTime(void)
> > -+{
> > -+    rpm_time_t buildTime = 0;
> > -+    char *srcdate;
> > -+    time_t epoch;
> > -+    char *endptr;
> > -+
> > -+    srcdate = getenv("SOURCE_DATE_EPOCH");
> > -+    if (srcdate) {
> > -+        errno = 0;
> > -+        epoch = strtol(srcdate, &endptr, 10);
> > -+        if (srcdate == endptr || *endptr || errno != 0)
> > -+            rpmlog(RPMLOG_ERR, _("unable to parse
> SOURCE_DATE_EPOCH\n"));
> > -+        else
> > -+            buildTime = (int32_t) epoch;
> > -+    } else
> > -+        buildTime = (int32_t) time(NULL);
> > -+
> > -+    return buildTime;
> > -+}
> > -+
> > -+static char * buildHost(void)
> > -+{
> > -+    char* hostname;
> > -+    struct hostent *hbn;
> > -+    char *bhMacro;
> > -+
> > -+    bhMacro = rpmExpand("%{?_buildhost}", NULL);
> > -+    if (strcmp(bhMacro, "") != 0) {
> > -+        rasprintf(&hostname, "%s", bhMacro);
> > -+    } else {
> > -+        hostname = rcalloc(1024, sizeof(*hostname));
> > -+        (void) gethostname(hostname, 1024);
> > -+        hbn = gethostbyname(hostname);
> > -+        if (hbn)
> > -+            strcpy(hostname, hbn->h_name);
> > -+        else
> > -+            rpmlog(RPMLOG_WARNING,
> > -+                    _("Could not canonicalize hostname: %s\n"),
> hostname);
> > -+    }
> > -+    free(bhMacro);
> > -+    return(hostname);
> > -+}
> > -+
> > - /**
> > -  */
> > - static rpmRC doRmSource(rpmSpec spec)
> > -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec
> spec, int what)
> > -     rpmRC rc = RPMRC_OK;
> > -     int test = (what & RPMBUILD_NOBUILD);
> > -     char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) :
> NULL;
> > -+    const char* host = buildHost();
> > -+    rpm_time_t buildTime = getBuildTime();
> > -+
> > -
> > -     if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
> > -       getenv("SOURCE_DATE_EPOCH") == NULL) {
> > -@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec
> spec, int what)
> > -               goto exit;
> > -
> > -       if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
> > --          (rc = packageSources(spec, &cookie)))
> > -+          (rc = packageSources(spec, &cookie, buildTime, host)))
> > -               goto exit;
> > -
> > -       if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
> > --          (rc = packageBinaries(spec, cookie, (didBuild == 0))))
> > -+          (rc = packageBinaries(spec, cookie, (didBuild == 0),
> buildTime, host)))
> > -               goto exit;
> > -
> > -       if ((what & RPMBUILD_CLEAN) &&
> > -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec
> spec, int what)
> > -       (void) unlink(spec->specFile);
> > -
> > - exit:
> > -+    free(host);
> > -     free(cookie);
> > -     spec->rootDir = NULL;
> > -     if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
> > -diff --git a/build/pack.c b/build/pack.c
> > -index df15876..17a4b09 100644
> > ---- a/build/pack.c
> > -+++ b/build/pack.c
> > -@@ -6,8 +6,6 @@
> > - #include "system.h"
> > -
> > - #include <errno.h>
> > --#include <netdb.h>
> > --#include <time.h>
> > - #include <sys/wait.h>
> > -
> > - #include <rpm/rpmlib.h>                       /* RPMSIGTAG*,
> rpmReadPackageFile */
> > -@@ -152,57 +150,6 @@ exit:
> > -     return rc;
> > - }
> > -
> > --static rpm_time_t * getBuildTime(void)
> > --{
> > --    static rpm_time_t buildTime[1];
> > --    char *srcdate;
> > --    time_t epoch;
> > --    char *endptr;
> > --
> > --    if (buildTime[0] == 0) {
> > --        srcdate = getenv("SOURCE_DATE_EPOCH");
> > --        if (srcdate) {
> > --            errno = 0;
> > --            epoch = strtol(srcdate, &endptr, 10);
> > --            if (srcdate == endptr || *endptr || errno != 0)
> > --                rpmlog(RPMLOG_ERR, _("unable to parse
> SOURCE_DATE_EPOCH\n"));
> > --            else
> > --                buildTime[0] = (int32_t) epoch;
> > --        } else
> > --            buildTime[0] = (int32_t) time(NULL);
> > --    }
> > --
> > --    return buildTime;
> > --}
> > --
> > --static const char * buildHost(void)
> > --{
> > --    static char hostname[1024];
> > --    static int oneshot = 0;
> > --    struct hostent *hbn;
> > --    char *bhMacro;
> > --
> > --    if (! oneshot) {
> > --        bhMacro = rpmExpand("%{?_buildhost}", NULL);
> > --        if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
> > --            strcpy(hostname, bhMacro);
> > --        } else {
> > --            if (strcmp(bhMacro, "") != 0)
> > --                rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too
> long\n"));
> > --            (void) gethostname(hostname, sizeof(hostname));
> > --            hbn = gethostbyname(hostname);
> > --            if (hbn)
> > --                strcpy(hostname, hbn->h_name);
> > --            else
> > --                rpmlog(RPMLOG_WARNING,
> > --                        _("Could not canonicalize hostname: %s\n"),
> hostname);
> > --        }
> > --        free(bhMacro);
> > --        oneshot = 1;
> > --    }
> > --    return(hostname);
> > --}
> > --
> > - static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
> > - {
> > -     struct TriggerFileEntry *p;
> > -@@ -476,7 +423,8 @@ exit:
> > -  * order to how the RPM format is laid on disk.
> > -  */
> > - static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
> > --                    const char *fileName, char **cookie)
> > -+                    const char *fileName, char **cookie,
> > -+                    rpm_time_t buildTime, const char* buildHost)
> > - {
> > -     FD_t fd = NULL;
> > -     char * rpmio_flags = NULL;
> > -@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char **
> pkgidp,
> > -
> > -     /* Create and add the cookie */
> > -     if (cookie) {
> > --      rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
> > -+      rasprintf(cookie, "%s %d", buildHost, buildTime);
> > -       headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
> > -     }
> > -
> > -@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
> > -     return RPMRC_OK;
> > - }
> > -
> > --static rpmRC packageBinary(rpmSpec spec, Package pkg, const char
> *cookie, int cheating, char** filename)
> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char
> *cookie, int cheating, char** filename, rpm_time_t buildTime, const char*
> buildHost)
> > - {
> > -       const char *errorString;
> > -       rpmRC rc = RPMRC_OK;
> > -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package
> pkg, const char *cookie, int ch
> > -       headerCopyTags(spec->packages->header, pkg->header, copyTags);
> > -
> > -       headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
> > --      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
> > --      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(),
> 1);
> > -+      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
> > -+      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
> > -
> > -       if (spec->sourcePkgId != NULL) {
> > -           headerPutBin(pkg->header, RPMTAG_SOURCEPKGID,
> spec->sourcePkgId,16);
> > -@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package
> pkg, const char *cookie, int ch
> > -           free(binRpm);
> > -       }
> > -
> > --      rc = writeRPM(pkg, NULL, *filename, NULL);
> > -+      rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
> > -       if (rc == RPMRC_OK) {
> > -           /* Do check each written package if enabled */
> > -           char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ",
> *filename, NULL);
> > -@@ -719,7 +667,7 @@ struct binaryPackageTaskData
> > -     struct binaryPackageTaskData *next;
> > - };
> > -
> > --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec
> spec, const char *cookie, int cheating)
> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec
> spec, const char *cookie, int cheating, rpm_time_t buildTime, char*
> buildHost)
> > - {
> > -     struct binaryPackageTaskData *tasks = NULL;
> > -     struct binaryPackageTaskData *task = NULL;
> > -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData*
> runBinaryPackageTasks(rpmSpec spec, const c
> > -         if (pkg == spec->packages) {
> > -             // the first package needs to be processed ahead of
> others, as they copy
> > -             // changelog data from it, and so otherwise data races
> would happen
> > --            task->result = packageBinary(spec, pkg, cookie, cheating,
> &(task->filename));
> > -+            task->result = packageBinary(spec, pkg, cookie, cheating,
> &(task->filename), buildTime, buildHost);
> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> > -             tasks = task;
> > -         }
> > -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData*
> runBinaryPackageTasks(rpmSpec spec, const c
> > -         if (task != tasks)
> > -         #pragma omp task
> > -         {
> > --            task->result = packageBinary(spec, task->pkg, cookie,
> cheating, &(task->filename));
> > -+            task->result = packageBinary(spec, task->pkg, cookie,
> cheating, &(task->filename), buildTime, buildHost);
> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> > -         }
> > -     }
> > -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct
> binaryPackageTaskData* tasks)
> > -     }
> > - }
> > -
> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating,
> rpm_time_t buildTime, char* buildHost)
> > - {
> > -     char *pkglist = NULL;
> > -
> > --    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec,
> cookie, cheating);
> > -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec,
> cookie, cheating, buildTime, buildHost);
> > -
> > -     for (struct binaryPackageTaskData *task = tasks; task != NULL;
> task = task->next) {
> > -         if (task->result == RPMRC_OK) {
> > -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char
> *cookie, int cheating)
> > -     return RPMRC_OK;
> > - }
> > -
> > --rpmRC packageSources(rpmSpec spec, char **cookie)
> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t
> buildTime, char* buildHost)
> > - {
> > -     Package sourcePkg = spec->sourcePackage;
> > -     rpmRC rc;
> > -@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
> > -
> > -     /* Add some cruft */
> > -     headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
> > --    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
> > --    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME,
> getBuildTime(), 1);
> > -+    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
> > -+    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime,
> 1);
> > -     headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
> > -
> > -     /* XXX this should be %_srpmdir */
> > -@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
> > -       char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn,
> NULL);
> > -
> > -       spec->sourcePkgId = NULL;
> > --      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
> > -+      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie,
> buildTime, buildHost);
> > -
> > -       /* Do check SRPM package if enabled */
> > -       if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
> > -diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
> > -index 439b7d3..07e8338 100644
> > ---- a/build/rpmbuild_internal.h
> > -+++ b/build/rpmbuild_internal.h
> > -@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec,
> rpmBuildPkgFlags pkgFlags);
> > -  * @param spec                spec file control structure
> > -  * @param cookie      build identifier "cookie" or NULL
> > -  * @param cheating    was build shortcircuited?
> > -+ * @param buildTime   the build timestamp that goes into packages
> > -+ * @param buildHost   the hostname where the build is happening
> > -  * @return            RPMRC_OK on success
> > -  */
> > - RPM_GNUC_INTERNAL
> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating,
> rpm_time_t buildTime, char* buildHost);
> > -
> > - /** \ingroup rpmbuild
> > -  * Generate source package.
> > -  * @param spec                spec file control structure
> > -  * @retval cookie     build identifier "cookie" or NULL
> > -+ * @param buildTime   the build timestamp that goes into packages
> > -+ * @param buildHost   the hostname where the build is happening
> > -  * @return            RPMRC_OK on success
> > -  */
> > - RPM_GNUC_INTERNAL
> > --rpmRC packageSources(rpmSpec spec, char **cookie);
> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t
> buildTime, char* buildHost);
> > -
> > - RPM_GNUC_INTERNAL
> > - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
> > diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
> > similarity index 91%
> > rename from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> > rename to meta/recipes-devtools/rpm/rpm_4.15.1.bb
> > index c37330eb4c6..4fa2d764fb9 100644
> > --- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> > +++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
> > @@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
> >  LICENSE = "GPL-2.0"
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
> >
> > -SRC_URI = "git://
> github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
> > +SRC_URI = "git://
> github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
> >
>  file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
> >             file://0001-Do-not-read-config-files-from-HOME.patch \
> >
>  file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
> > @@ -34,18 +34,14 @@ SRC_URI = "git://
> github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
> >             file://0001-Fix-build-with-musl-C-library.patch \
> >
>  file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
> >
>  file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
> > -
>  file://0001-Split-binary-package-building-into-a-separate-functi.patch \
> > -
>  file://0002-Run-binary-package-creation-via-thread-pools.patch \
> > -
>  file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
> > -
>  file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
> >             file://0001-perl-disable-auto-reqs.patch \
> >
>  file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
> >
>  file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
> > -
>  file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
> > +
>  file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
> >             "
> >
> >  PE = "1"
> > -SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
> > +SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
> >
> >  S = "${WORKDIR}/git"
> >
> > @@ -125,8 +121,7 @@ do_install_append () {
> >             ${D}/${libdir}/rpm/macros
> >
> >         sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
> > -           ${D}${libdir}/rpm/pythondistdeps.py \
> > -           ${D}${libdir}/rpm/python-macro-helper
> > +           ${D}${libdir}/rpm/pythondistdeps.py
> >  }
> >
> >  FILES_${PN} += "${libdir}/rpm-plugins/*.so \
> > --
> > 2.17.1
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 62061 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5] rpm: upgrade to 4.15.1
  2019-11-25 15:19     ` Alexander Kanavin
@ 2019-11-25 15:50       ` Khem Raj
  2019-11-25 16:33         ` Alexander Kanavin
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2019-11-25 15:50 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

On Mon, Nov 25, 2019 at 7:19 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> omp.h is coming from gcc-runtime. Which compiler are you using? Probably an override (specific for that compiler) is needed.

if you looked into logs then you must have noticed its clang. I was
wonder is openMP a hard dependency
for rpm now, which might be interesting for architectures like mips and ppc.

>
> Alex
>
> On Sat, 23 Nov 2019 at 18:48, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> breaks with needing openmp
>>
>> http://errors.yoctoproject.org/Errors/Details/282827/
>>
>> perhaps needs explicit dependency on libgomp now ?
>>
>> On Tue, Nov 19, 2019 at 5:26 AM Alexander Kanavin
>> <alex.kanavin@gmail.com> wrote:
>> >
>> > 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:
>> > https://github.com/rpm-software-management/rpm/issues/756
>> >
>> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > ---
>> >  ...satisfiable-dependency-when-building.patch |  28 +-
>> >  ...lib-rpm-as-the-installation-path-for.patch |  14 +-
>> >  ...kage-building-into-a-separate-functi.patch |  84 -----
>> >  ...es-requires-do-not-use-monodis-from-.patch |  58 ---
>> >  ...-run-file-classification-in-parallel.patch |  65 ++++
>> >  ...ry-package-creation-via-thread-pools.patch | 127 -------
>> >  ...e-operations-over-string-pools-threa.patch | 207 -----------
>> >  ...ove-static-local-variables-from-buil.patch | 336 ------------------
>> >  .../rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}    |  13 +-
>> >  9 files changed, 89 insertions(+), 843 deletions(-)
>> >  delete mode 100644 meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
>> >  delete mode 100644 meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
>> >  create mode 100644 meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>> >  delete mode 100644 meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
>> >  delete mode 100644 meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
>> >  delete mode 100644 meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
>> >  rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb} (91%)
>> >
>> > diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
>> > index 80e2f0fad70..4029233fb70 100644
>> > --- a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
>> > +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
>> > @@ -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 <alex.kanavin@gmail.com>
>> >  Date: Mon, 9 Jan 2017 18:52:11 +0200
>> >  Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
>> > @@ -9,25 +9,23 @@ hand produces rpms that way by design.
>> >
>> >  Upstream-Status: Inappropriate [oe-core specific]
>> >  Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > +
>> >  ---
>> >   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
>> > -
>> > diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
>> > index 82e7328757f..52440d68180 100644
>> > --- a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
>> > +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
>> > @@ -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 <alex.kanavin@gmail.com>
>> >  Date: Mon, 27 Feb 2017 09:43:30 +0200
>> >  Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
>> > @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >   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
>> >
>> > @@ -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
>> > @@ -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 @@
>> > @@ -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
>> > diff --git a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
>> > deleted file mode 100644
>> > index 6e44f0b7fc9..00000000000
>> > --- a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
>> > +++ /dev/null
>> > @@ -1,84 +0,0 @@
>> > -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
>> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -Date: Thu, 25 May 2017 18:15:27 +0300
>> > -Subject: [PATCH 1/4] Split binary package building into a separate function
>> > -
>> > -So that it can be run as a thread pool task.
>> > -
>> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -
>> > ----
>> > - build/pack.c | 33 +++++++++++++++++++++------------
>> > - 1 file changed, 21 insertions(+), 12 deletions(-)
>> > -
>> > -diff --git a/build/pack.c b/build/pack.c
>> > -index 518f4e92a..ccfd614cc 100644
>> > ---- a/build/pack.c
>> > -+++ b/build/pack.c
>> > -@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
>> > -     return RPMRC_OK;
>> > - }
>> > -
>> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
>> > - {
>> > --    rpmRC rc;
>> > --    const char *errorString;
>> > --    Package pkg;
>> > --    char *pkglist = NULL;
>> > --
>> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> > --      char *fn;
>> > -+      const char *errorString;
>> > -+      rpmRC rc = RPMRC_OK;
>> > -
>> > -       if (pkg->fileList == NULL)
>> > --          continue;
>> > -+          return rc;
>> > -
>> > -       if ((rc = processScriptFiles(spec, pkg)))
>> > -           return rc;
>> > -@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -                    headerGetString(pkg->header, RPMTAG_NAME), errorString);
>> > -               return RPMRC_FAIL;
>> > -           }
>> > --          fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
>> > -+          *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
>> > -           if ((binDir = strchr(binRpm, '/')) != NULL) {
>> > -               struct stat st;
>> > -               char *dn;
>> > -@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -           free(binRpm);
>> > -       }
>> > -
>> > --      rc = writeRPM(pkg, NULL, fn, NULL);
>> > -+      rc = writeRPM(pkg, NULL, *filename, NULL);
>> > -       if (rc == RPMRC_OK) {
>> > -           /* Do check each written package if enabled */
>> > --          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
>> > -+          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
>> > -           if (pkgcheck[0] != ' ') {
>> > -               rc = checkPackages(pkgcheck);
>> > -           }
>> > -           free(pkgcheck);
>> > -+      }
>> > -+      return rc;
>> > -+}
>> > -+
>> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -+{
>> > -+    rpmRC rc;
>> > -+    Package pkg;
>> > -+    char *pkglist = NULL;
>> > -+
>> > -+    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> > -+      char *fn = NULL;
>> > -+      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
>> > -+      if (rc == RPMRC_OK) {
>> > -           rstrcat(&pkglist, fn);
>> > -           rstrcat(&pkglist, " ");
>> > -       }
>> > ---
>> > -2.11.0
>> > -
>> > diff --git a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
>> > deleted file mode 100644
>> > index 24aa4c7ffff..00000000000
>> > --- a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
>> > +++ /dev/null
>> > @@ -1,58 +0,0 @@
>> > -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
>> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -Date: Tue, 27 Aug 2019 17:42:34 +0200
>> > -Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host
>> > -
>> > -There was a host contamination issue here: if monodis was installed
>> > -on the host, do_package would use that to resolve dependencies
>> > -of mono libraries (and often fail in that). Without monodis,
>> > -no dependencies are resolved, which is seemingly how things
>> > -are supposed to work.
>> > -
>> > -Upstream-Status: Inappropriate [oe-core specific]
>> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > ----
>> > - scripts/mono-find-provides | 8 ++++----
>> > - scripts/mono-find-requires | 8 ++++----
>> > - 2 files changed, 8 insertions(+), 8 deletions(-)
>> > -
>> > -diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
>> > -index 9348457d3..b28872ffb 100644
>> > ---- a/scripts/mono-find-provides
>> > -+++ b/scripts/mono-find-provides
>> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
>> > - build_bindir="$2/usr/bin"
>> > - build_libdir="$2$3"
>> > -
>> > --if [ -x $build_bindir/monodis ]; then
>> > --    monodis="$build_bindir/monodis"
>> > -+if [ -x $build_bindir/monodis.bogus ]; then
>> > -+    monodis="$build_bindir/monodis.bogus"
>> > -     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
>> > --elif [ -x /usr/bin/monodis ]; then
>> > --    monodis="/usr/bin/monodis"
>> > -+elif [ -x /usr/bin/monodis.bogus ]; then
>> > -+    monodis="/usr/bin/monodis.bogus"
>> > - else
>> > -     exit 0;
>> > - fi
>> > -diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
>> > -index ea58cae48..d270169e1 100644
>> > ---- a/scripts/mono-find-requires
>> > -+++ b/scripts/mono-find-requires
>> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
>> > - build_bindir="$2/usr/bin"
>> > - build_libdir="$2$3"
>> > -
>> > --if [ -x $build_bindir/monodis ]; then
>> > --    monodis="$build_bindir/monodis"
>> > -+if [ -x $build_bindir/monodis.bogus ]; then
>> > -+    monodis="$build_bindir/monodis.bogus"
>> > -     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
>> > --elif [ -x /usr/bin/monodis ]; then
>> > --    monodis="/usr/bin/monodis"
>> > -+elif [ -x /usr/bin/monodis.bogus ]; then
>> > -+    monodis="/usr/bin/monodis.bogus"
>> > - else
>> > -     exit 0;
>> > - fi
>> > diff --git a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>> > new file mode 100644
>> > index 00000000000..9a5cd7c80dc
>> > --- /dev/null
>> > +++ b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>> > @@ -0,0 +1,65 @@
>> > +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001
>> > +From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > +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: Inapppropriate [upstream wants a proper fix]
>> > +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > +---
>> > + 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 */
>> > diff --git a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
>> > deleted file mode 100644
>> > index d10041c2e14..00000000000
>> > --- a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
>> > +++ /dev/null
>> > @@ -1,127 +0,0 @@
>> > -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
>> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -Date: Thu, 25 May 2017 19:30:20 +0300
>> > -Subject: [PATCH 1/3] Run binary package creation via thread pools.
>> > -
>> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -
>> > ----
>> > - build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
>> > - configure.ac |  3 +++
>> > - 2 files changed, 70 insertions(+), 14 deletions(-)
>> > -
>> > -diff --git a/build/pack.c b/build/pack.c
>> > -index ccfd614cc..ed5b9ab4e 100644
>> > ---- a/build/pack.c
>> > -+++ b/build/pack.c
>> > -@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
>> > -       return rc;
>> > - }
>> > -
>> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -+struct binaryPackageTaskData
>> > - {
>> > --    rpmRC rc;
>> > -     Package pkg;
>> > -+    char *filename;
>> > -+    rpmRC result;
>> > -+    struct binaryPackageTaskData *next;
>> > -+};
>> > -+
>> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
>> > -+{
>> > -+    struct binaryPackageTaskData *tasks = NULL;
>> > -+    struct binaryPackageTaskData *task = NULL;
>> > -+    struct binaryPackageTaskData *prev = NULL;
>> > -+
>> > -+    for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> > -+        task = rcalloc(1, sizeof(*task));
>> > -+        task->pkg = pkg;
>> > -+        if (pkg == spec->packages) {
>> > -+            // the first package needs to be processed ahead of others, as they copy
>> > -+            // changelog data from it, and so otherwise data races would happen
>> > -+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
>> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> > -+            tasks = task;
>> > -+        }
>> > -+        if (prev != NULL) {
>> > -+            prev->next = task;
>> > -+        }
>> > -+        prev = task;
>> > -+    }
>> > -+
>> > -+    #pragma omp parallel
>> > -+    #pragma omp single
>> > -+    // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults
>> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
>> > -+        if (task != tasks)
>> > -+        #pragma omp task
>> > -+        {
>> > -+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
>> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> > -+        }
>> > -+    }
>> > -+
>> > -+    return tasks;
>> > -+}
>> > -+
>> > -+static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
>> > -+{
>> > -+    while (tasks != NULL) {
>> > -+        struct binaryPackageTaskData* next = tasks->next;
>> > -+        rfree(tasks->filename);
>> > -+        rfree(tasks);
>> > -+        tasks = next;
>> > -+    }
>> > -+}
>> > -+
>> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -+{
>> > -     char *pkglist = NULL;
>> > -
>> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> > --      char *fn = NULL;
>> > --      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
>> > --      if (rc == RPMRC_OK) {
>> > --          rstrcat(&pkglist, fn);
>> > --          rstrcat(&pkglist, " ");
>> > --      }
>> > --      free(fn);
>> > --      if (rc != RPMRC_OK) {
>> > --          pkglist = _free(pkglist);
>> > --          return rc;
>> > --      }
>> > -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
>> > -+
>> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
>> > -+        if (task->result == RPMRC_OK) {
>> > -+            rstrcat(&pkglist, task->filename);
>> > -+            rstrcat(&pkglist, " ");
>> > -+        } else {
>> > -+            _free(pkglist);
>> > -+            freeBinaryPackageTasks(tasks);
>> > -+            return RPMRC_FAIL;
>> > -+        }
>> > -     }
>> > -+    freeBinaryPackageTasks(tasks);
>> > -
>> > -     /* Now check the package set if enabled */
>> > -     if (pkglist != NULL) {
>> > -diff --git a/configure.ac b/configure.ac
>> > -index a506ec819..59fa0acaf 100644
>> > ---- a/configure.ac
>> > -+++ b/configure.ac
>> > -@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
>> > -
>> > - PKG_PROG_PKG_CONFIG
>> > -
>> > -+AC_OPENMP
>> > -+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
>> > -+
>> > - dnl Checks for programs.
>> > - AC_PROG_CXX
>> > - AC_PROG_AWK
>> > ---
>> > -2.11.0
>> > -
>> > diff --git a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
>> > deleted file mode 100644
>> > index c348ae5330e..00000000000
>> > --- a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
>> > +++ /dev/null
>> > @@ -1,207 +0,0 @@
>> > -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
>> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -Date: Tue, 30 May 2017 13:58:30 +0300
>> > -Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
>> > - thread-safe
>> > -
>> > -Otherwise multithreaded rpm building explodes in various ways due
>> > -to data races.
>> > -
>> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -
>> > ----
>> > - rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
>> > - 1 file changed, 47 insertions(+), 9 deletions(-)
>> > -
>> > -diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
>> > -index 30a57eb10..58ba95a02 100644
>> > ---- a/rpmio/rpmstrpool.c
>> > -+++ b/rpmio/rpmstrpool.c
>> > -@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
>> > -     return ht;
>> > - }
>> > -
>> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
>> > -+
>> > - static void poolHashResize(rpmstrPool pool, int numBuckets)
>> > - {
>> > -     poolHash ht = pool->hash;
>> > -@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets)
>> > -
>> > -     for (int i=0; i<ht->numBuckets; i++) {
>> > -         if (!ht->buckets[i].keyid) continue;
>> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
>> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
>> > -         for (unsigned int j=0;;j++) {
>> > -             unsigned int hash = hashbucket(keyHash, j) % numBuckets;
>> > -             if (!buckets[hash].keyid) {
>> > -@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke
>> > -             ht->buckets[hash].keyid = keyid;
>> > -             ht->keyCount++;
>> > -             break;
>> > --        } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) {
>> > -+        } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) {
>> > -             return;
>> > -         }
>> > -     }
>> > -@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
>> > -     int maxcollisions = 0;
>> > -
>> > -     for (i=0; i<ht->numBuckets; i++) {
>> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
>> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
>> > -         for (unsigned int j=0;;j++) {
>> > -             unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets;
>> > -             if (hash==i) {
>> > -@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
>> > -
>> > -     pool->hash = poolHashCreate(sizehint);
>> > -     for (int i = 1; i <= pool->offs_size; i++)
>> > --      poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
>> > -+      poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
>> > - }
>> > -
>> > - rpmstrPool rpmstrPoolCreate(void)
>> > -@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
>> > -
>> > - rpmstrPool rpmstrPoolFree(rpmstrPool pool)
>> > - {
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -     if (pool) {
>> > -       if (pool->nrefs > 1) {
>> > -           pool->nrefs--;
>> > -@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
>> > -           free(pool);
>> > -       }
>> > -     }
>> > -+    }
>> > -     return NULL;
>> > - }
>> > -
>> > - rpmstrPool rpmstrPoolLink(rpmstrPool pool)
>> > - {
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -     if (pool)
>> > -       pool->nrefs++;
>> > -+    }
>> > -     return pool;
>> > - }
>> > -
>> > - void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
>> > - {
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -     if (pool && !pool->frozen) {
>> > -       if (!keephash) {
>> > -           pool->hash = poolHashFree(pool->hash);
>> > -@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
>> > -                             pool->offs_alloced * sizeof(*pool->offs));
>> > -       pool->frozen = 1;
>> > -     }
>> > -+    }
>> > - }
>> > -
>> > - void rpmstrPoolUnfreeze(rpmstrPool pool)
>> > - {
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -     if (pool) {
>> > -       if (pool->hash == NULL) {
>> > -           rpmstrPoolRehash(pool);
>> > -       }
>> > -       pool->frozen = 0;
>> > -     }
>> > -+    }
>> > - }
>> > -
>> > - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash)
>> > -@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen,
>> > -             return 0;
>> > -         }
>> > -
>> > --      s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
>> > -+      s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
>> > -       /* pool string could be longer than keylen, require exact matche */
>> > -       if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
>> > -           return ht->buckets[hash].keyid;
>> > -@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen,
>> > - rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create)
>> > - {
>> > -     rpmsid sid = 0;
>> > --
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -     if (s != NULL) {
>> > -       unsigned int hash = rstrnhash(s, slen);
>> > -       sid = strn2id(pool, s, slen, hash, create);
>> > -     }
>> > -+    }
>> > -     return sid;
>> > - }
>> > -
>> > - rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
>> > - {
>> > -     rpmsid sid = 0;
>> > --
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -     if (s != NULL) {
>> > -       size_t slen;
>> > -       unsigned int hash = rstrlenhash(s, &slen);
>> > -       sid = strn2id(pool, s, slen, hash, create);
>> > -     }
>> > -+    }
>> > -     return sid;
>> > - }
>> > -
>> > --const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
>> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
>> > - {
>> > -     const char *s = NULL;
>> > -     if (pool && sid > 0 && sid <= pool->offs_size)
>> > -@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
>> > -     return s;
>> > - }
>> > -
>> > -+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
>> > -+{
>> > -+    const char *s = NULL;
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -+    s = rpmstrPoolStrNoLock(pool, sid);
>> > -+    }
>> > -+    return s;
>> > -+}
>> > -+
>> > - size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
>> > - {
>> > -     size_t slen = 0;
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -     if (pool && sid > 0 && sid <= pool->offs_size) {
>> > -       slen = strlen(pool->offs[sid]);
>> > -     }
>> > -+    }
>> > -     return slen;
>> > - }
>> > -
>> > -@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
>> > -
>> > - rpmsid rpmstrPoolNumStr(rpmstrPool pool)
>> > - {
>> > --    return (pool != NULL) ? pool->offs_size : 0;
>> > -+    rpmsid id = 0;
>> > -+    #pragma omp critical(rpmstrpool)
>> > -+    {
>> > -+    if (pool) {
>> > -+      id = pool->offs_size;
>> > -+    }
>> > -+    }
>> > -+    return id;
>> > - }
>> > ---
>> > -2.11.0
>> > -
>> > diff --git a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
>> > deleted file mode 100644
>> > index 652e30b3e4a..00000000000
>> > --- a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
>> > +++ /dev/null
>> > @@ -1,336 +0,0 @@
>> > -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001
>> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -Date: Thu, 8 Jun 2017 17:08:09 +0300
>> > -Subject: [PATCH] build/pack.c: remove static local variables from buildHost()
>> > - and getBuildTime()
>> > -
>> > -Their use is causing difficult to diagnoze data races when building multiple
>> > -packages in parallel, and is a bad idea in general, as it also makes it more
>> > -difficult to reason about code.
>> > -
>> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -
>> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> > -
>> > ----
>> > - build/build.c             | 54 ++++++++++++++++++++++++++++--
>> > - build/pack.c              | 84 +++++++++--------------------------------------
>> > - build/rpmbuild_internal.h |  8 +++--
>> > - 3 files changed, 74 insertions(+), 72 deletions(-)
>> > -
>> > -diff --git a/build/build.c b/build/build.c
>> > -index 13c3df2..b154f08 100644
>> > ---- a/build/build.c
>> > -+++ b/build/build.c
>> > -@@ -6,6 +6,8 @@
>> > - #include "system.h"
>> > -
>> > - #include <errno.h>
>> > -+#include <netdb.h>
>> > -+#include <time.h>
>> > - #include <sys/wait.h>
>> > -
>> > - #include <rpm/rpmlog.h>
>> > -@@ -16,6 +18,50 @@
>> > -
>> > - #include "debug.h"
>> > -
>> > -+static rpm_time_t getBuildTime(void)
>> > -+{
>> > -+    rpm_time_t buildTime = 0;
>> > -+    char *srcdate;
>> > -+    time_t epoch;
>> > -+    char *endptr;
>> > -+
>> > -+    srcdate = getenv("SOURCE_DATE_EPOCH");
>> > -+    if (srcdate) {
>> > -+        errno = 0;
>> > -+        epoch = strtol(srcdate, &endptr, 10);
>> > -+        if (srcdate == endptr || *endptr || errno != 0)
>> > -+            rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
>> > -+        else
>> > -+            buildTime = (int32_t) epoch;
>> > -+    } else
>> > -+        buildTime = (int32_t) time(NULL);
>> > -+
>> > -+    return buildTime;
>> > -+}
>> > -+
>> > -+static char * buildHost(void)
>> > -+{
>> > -+    char* hostname;
>> > -+    struct hostent *hbn;
>> > -+    char *bhMacro;
>> > -+
>> > -+    bhMacro = rpmExpand("%{?_buildhost}", NULL);
>> > -+    if (strcmp(bhMacro, "") != 0) {
>> > -+        rasprintf(&hostname, "%s", bhMacro);
>> > -+    } else {
>> > -+        hostname = rcalloc(1024, sizeof(*hostname));
>> > -+        (void) gethostname(hostname, 1024);
>> > -+        hbn = gethostbyname(hostname);
>> > -+        if (hbn)
>> > -+            strcpy(hostname, hbn->h_name);
>> > -+        else
>> > -+            rpmlog(RPMLOG_WARNING,
>> > -+                    _("Could not canonicalize hostname: %s\n"), hostname);
>> > -+    }
>> > -+    free(bhMacro);
>> > -+    return(hostname);
>> > -+}
>> > -+
>> > - /**
>> > -  */
>> > - static rpmRC doRmSource(rpmSpec spec)
>> > -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
>> > -     rpmRC rc = RPMRC_OK;
>> > -     int test = (what & RPMBUILD_NOBUILD);
>> > -     char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
>> > -+    const char* host = buildHost();
>> > -+    rpm_time_t buildTime = getBuildTime();
>> > -+
>> > -
>> > -     if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
>> > -       getenv("SOURCE_DATE_EPOCH") == NULL) {
>> > -@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
>> > -               goto exit;
>> > -
>> > -       if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
>> > --          (rc = packageSources(spec, &cookie)))
>> > -+          (rc = packageSources(spec, &cookie, buildTime, host)))
>> > -               goto exit;
>> > -
>> > -       if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
>> > --          (rc = packageBinaries(spec, cookie, (didBuild == 0))))
>> > -+          (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host)))
>> > -               goto exit;
>> > -
>> > -       if ((what & RPMBUILD_CLEAN) &&
>> > -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
>> > -       (void) unlink(spec->specFile);
>> > -
>> > - exit:
>> > -+    free(host);
>> > -     free(cookie);
>> > -     spec->rootDir = NULL;
>> > -     if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
>> > -diff --git a/build/pack.c b/build/pack.c
>> > -index df15876..17a4b09 100644
>> > ---- a/build/pack.c
>> > -+++ b/build/pack.c
>> > -@@ -6,8 +6,6 @@
>> > - #include "system.h"
>> > -
>> > - #include <errno.h>
>> > --#include <netdb.h>
>> > --#include <time.h>
>> > - #include <sys/wait.h>
>> > -
>> > - #include <rpm/rpmlib.h>                       /* RPMSIGTAG*, rpmReadPackageFile */
>> > -@@ -152,57 +150,6 @@ exit:
>> > -     return rc;
>> > - }
>> > -
>> > --static rpm_time_t * getBuildTime(void)
>> > --{
>> > --    static rpm_time_t buildTime[1];
>> > --    char *srcdate;
>> > --    time_t epoch;
>> > --    char *endptr;
>> > --
>> > --    if (buildTime[0] == 0) {
>> > --        srcdate = getenv("SOURCE_DATE_EPOCH");
>> > --        if (srcdate) {
>> > --            errno = 0;
>> > --            epoch = strtol(srcdate, &endptr, 10);
>> > --            if (srcdate == endptr || *endptr || errno != 0)
>> > --                rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
>> > --            else
>> > --                buildTime[0] = (int32_t) epoch;
>> > --        } else
>> > --            buildTime[0] = (int32_t) time(NULL);
>> > --    }
>> > --
>> > --    return buildTime;
>> > --}
>> > --
>> > --static const char * buildHost(void)
>> > --{
>> > --    static char hostname[1024];
>> > --    static int oneshot = 0;
>> > --    struct hostent *hbn;
>> > --    char *bhMacro;
>> > --
>> > --    if (! oneshot) {
>> > --        bhMacro = rpmExpand("%{?_buildhost}", NULL);
>> > --        if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
>> > --            strcpy(hostname, bhMacro);
>> > --        } else {
>> > --            if (strcmp(bhMacro, "") != 0)
>> > --                rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n"));
>> > --            (void) gethostname(hostname, sizeof(hostname));
>> > --            hbn = gethostbyname(hostname);
>> > --            if (hbn)
>> > --                strcpy(hostname, hbn->h_name);
>> > --            else
>> > --                rpmlog(RPMLOG_WARNING,
>> > --                        _("Could not canonicalize hostname: %s\n"), hostname);
>> > --        }
>> > --        free(bhMacro);
>> > --        oneshot = 1;
>> > --    }
>> > --    return(hostname);
>> > --}
>> > --
>> > - static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
>> > - {
>> > -     struct TriggerFileEntry *p;
>> > -@@ -476,7 +423,8 @@ exit:
>> > -  * order to how the RPM format is laid on disk.
>> > -  */
>> > - static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
>> > --                    const char *fileName, char **cookie)
>> > -+                    const char *fileName, char **cookie,
>> > -+                    rpm_time_t buildTime, const char* buildHost)
>> > - {
>> > -     FD_t fd = NULL;
>> > -     char * rpmio_flags = NULL;
>> > -@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
>> > -
>> > -     /* Create and add the cookie */
>> > -     if (cookie) {
>> > --      rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
>> > -+      rasprintf(cookie, "%s %d", buildHost, buildTime);
>> > -       headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
>> > -     }
>> > -
>> > -@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
>> > -     return RPMRC_OK;
>> > - }
>> > -
>> > --static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
>> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost)
>> > - {
>> > -       const char *errorString;
>> > -       rpmRC rc = RPMRC_OK;
>> > -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
>> > -       headerCopyTags(spec->packages->header, pkg->header, copyTags);
>> > -
>> > -       headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
>> > --      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
>> > --      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
>> > -+      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
>> > -+      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
>> > -
>> > -       if (spec->sourcePkgId != NULL) {
>> > -           headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
>> > -@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
>> > -           free(binRpm);
>> > -       }
>> > -
>> > --      rc = writeRPM(pkg, NULL, *filename, NULL);
>> > -+      rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
>> > -       if (rc == RPMRC_OK) {
>> > -           /* Do check each written package if enabled */
>> > -           char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
>> > -@@ -719,7 +667,7 @@ struct binaryPackageTaskData
>> > -     struct binaryPackageTaskData *next;
>> > - };
>> > -
>> > --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
>> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
>> > - {
>> > -     struct binaryPackageTaskData *tasks = NULL;
>> > -     struct binaryPackageTaskData *task = NULL;
>> > -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
>> > -         if (pkg == spec->packages) {
>> > -             // the first package needs to be processed ahead of others, as they copy
>> > -             // changelog data from it, and so otherwise data races would happen
>> > --            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
>> > -+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
>> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> > -             tasks = task;
>> > -         }
>> > -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
>> > -         if (task != tasks)
>> > -         #pragma omp task
>> > -         {
>> > --            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
>> > -+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
>> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> > -         }
>> > -     }
>> > -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
>> > -     }
>> > - }
>> > -
>> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
>> > - {
>> > -     char *pkglist = NULL;
>> > -
>> > --    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
>> > -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
>> > -
>> > -     for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
>> > -         if (task->result == RPMRC_OK) {
>> > -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> > -     return RPMRC_OK;
>> > - }
>> > -
>> > --rpmRC packageSources(rpmSpec spec, char **cookie)
>> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost)
>> > - {
>> > -     Package sourcePkg = spec->sourcePackage;
>> > -     rpmRC rc;
>> > -@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
>> > -
>> > -     /* Add some cruft */
>> > -     headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
>> > --    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
>> > --    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
>> > -+    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
>> > -+    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
>> > -     headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
>> > -
>> > -     /* XXX this should be %_srpmdir */
>> > -@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
>> > -       char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
>> > -
>> > -       spec->sourcePkgId = NULL;
>> > --      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
>> > -+      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost);
>> > -
>> > -       /* Do check SRPM package if enabled */
>> > -       if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
>> > -diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
>> > -index 439b7d3..07e8338 100644
>> > ---- a/build/rpmbuild_internal.h
>> > -+++ b/build/rpmbuild_internal.h
>> > -@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
>> > -  * @param spec                spec file control structure
>> > -  * @param cookie      build identifier "cookie" or NULL
>> > -  * @param cheating    was build shortcircuited?
>> > -+ * @param buildTime   the build timestamp that goes into packages
>> > -+ * @param buildHost   the hostname where the build is happening
>> > -  * @return            RPMRC_OK on success
>> > -  */
>> > - RPM_GNUC_INTERNAL
>> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
>> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost);
>> > -
>> > - /** \ingroup rpmbuild
>> > -  * Generate source package.
>> > -  * @param spec                spec file control structure
>> > -  * @retval cookie     build identifier "cookie" or NULL
>> > -+ * @param buildTime   the build timestamp that goes into packages
>> > -+ * @param buildHost   the hostname where the build is happening
>> > -  * @return            RPMRC_OK on success
>> > -  */
>> > - RPM_GNUC_INTERNAL
>> > --rpmRC packageSources(rpmSpec spec, char **cookie);
>> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost);
>> > -
>> > - RPM_GNUC_INTERNAL
>> > - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
>> > diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
>> > similarity index 91%
>> > rename from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
>> > rename to meta/recipes-devtools/rpm/rpm_4.15.1.bb
>> > index c37330eb4c6..4fa2d764fb9 100644
>> > --- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
>> > +++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
>> > @@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
>> >  LICENSE = "GPL-2.0"
>> >  LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
>> >
>> > -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
>> > +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
>> >             file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
>> >             file://0001-Do-not-read-config-files-from-HOME.patch \
>> >             file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
>> > @@ -34,18 +34,14 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
>> >             file://0001-Fix-build-with-musl-C-library.patch \
>> >             file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
>> >             file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
>> > -           file://0001-Split-binary-package-building-into-a-separate-functi.patch \
>> > -           file://0002-Run-binary-package-creation-via-thread-pools.patch \
>> > -           file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
>> > -           file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
>> >             file://0001-perl-disable-auto-reqs.patch \
>> >             file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
>> >             file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
>> > -           file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
>> > +           file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
>> >             "
>> >
>> >  PE = "1"
>> > -SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
>> > +SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
>> >
>> >  S = "${WORKDIR}/git"
>> >
>> > @@ -125,8 +121,7 @@ do_install_append () {
>> >             ${D}/${libdir}/rpm/macros
>> >
>> >         sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
>> > -           ${D}${libdir}/rpm/pythondistdeps.py \
>> > -           ${D}${libdir}/rpm/python-macro-helper
>> > +           ${D}${libdir}/rpm/pythondistdeps.py
>> >  }
>> >
>> >  FILES_${PN} += "${libdir}/rpm-plugins/*.so \
>> > --
>> > 2.17.1
>> >
>> > --
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5] rpm: upgrade to 4.15.1
  2019-11-25 15:50       ` Khem Raj
@ 2019-11-25 16:33         ` Alexander Kanavin
  2019-11-25 18:22           ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2019-11-25 16:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 52790 bytes --]

I have reproduced it with gcc and musl. The omp.h is in a non-standard
location in recipe-sysroot/usr/lib, which works ok with glibc, but breaks
with musl. How gcc is able to find it (or not) is too arcane for my
knowledge :(

I added --disable-openmp for musl; the major use for openmp is to speed up
native rpm packaging. On target it matters less hopefully.

Alex

On Mon, 25 Nov 2019 at 16:50, Khem Raj <raj.khem@gmail.com> wrote:

> On Mon, Nov 25, 2019 at 7:19 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > omp.h is coming from gcc-runtime. Which compiler are you using? Probably
> an override (specific for that compiler) is needed.
>
> if you looked into logs then you must have noticed its clang. I was
> wonder is openMP a hard dependency
> for rpm now, which might be interesting for architectures like mips and
> ppc.
>
> >
> > Alex
> >
> > On Sat, 23 Nov 2019 at 18:48, Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> breaks with needing openmp
> >>
> >> http://errors.yoctoproject.org/Errors/Details/282827/
> >>
> >> perhaps needs explicit dependency on libgomp now ?
> >>
> >> On Tue, Nov 19, 2019 at 5:26 AM Alexander Kanavin
> >> <alex.kanavin@gmail.com> wrote:
> >> >
> >> > 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:
> >> > https://github.com/rpm-software-management/rpm/issues/756
> >> >
> >> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > ---
> >> >  ...satisfiable-dependency-when-building.patch |  28 +-
> >> >  ...lib-rpm-as-the-installation-path-for.patch |  14 +-
> >> >  ...kage-building-into-a-separate-functi.patch |  84 -----
> >> >  ...es-requires-do-not-use-monodis-from-.patch |  58 ---
> >> >  ...-run-file-classification-in-parallel.patch |  65 ++++
> >> >  ...ry-package-creation-via-thread-pools.patch | 127 -------
> >> >  ...e-operations-over-string-pools-threa.patch | 207 -----------
> >> >  ...ove-static-local-variables-from-buil.patch | 336
> ------------------
> >> >  .../rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}    |  13 +-
> >> >  9 files changed, 89 insertions(+), 843 deletions(-)
> >> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> >> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> >> >  create mode 100644
> meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> >> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> >> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> >> >  delete mode 100644
> meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> >> >  rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}
> (91%)
> >> >
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> >> > index 80e2f0fad70..4029233fb70 100644
> >> > ---
> a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> >> > +++
> b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
> >> > @@ -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 <alex.kanavin@gmail.com>
> >> >  Date: Mon, 9 Jan 2017 18:52:11 +0200
> >> >  Subject: [PATCH] Do not add an unsatisfiable dependency when
> building rpms in
> >> > @@ -9,25 +9,23 @@ hand produces rpms that way by design.
> >> >
> >> >  Upstream-Status: Inappropriate [oe-core specific]
> >> >  Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > +
> >> >  ---
> >> >   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
> >> > -
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> >> > index 82e7328757f..52440d68180 100644
> >> > ---
> a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> >> > +++
> b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
> >> > @@ -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 <alex.kanavin@gmail.com>
> >> >  Date: Mon, 27 Feb 2017 09:43:30 +0200
> >> >  Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path
> for
> >> > @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <
> alex.kanavin@gmail.com>
> >> >   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
> >> >
> >> > @@ -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
> >> > @@ -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 @@
> >> > @@ -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
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> >> > deleted file mode 100644
> >> > index 6e44f0b7fc9..00000000000
> >> > ---
> a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
> >> > +++ /dev/null
> >> > @@ -1,84 +0,0 @@
> >> > -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00
> 2001
> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -Date: Thu, 25 May 2017 18:15:27 +0300
> >> > -Subject: [PATCH 1/4] Split binary package building into a separate
> function
> >> > -
> >> > -So that it can be run as a thread pool task.
> >> > -
> >> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -
> >> > ----
> >> > - build/pack.c | 33 +++++++++++++++++++++------------
> >> > - 1 file changed, 21 insertions(+), 12 deletions(-)
> >> > -
> >> > -diff --git a/build/pack.c b/build/pack.c
> >> > -index 518f4e92a..ccfd614cc 100644
> >> > ---- a/build/pack.c
> >> > -+++ b/build/pack.c
> >> > -@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
> >> > -     return RPMRC_OK;
> >> > - }
> >> > -
> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating)
> >> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char
> *cookie, int cheating, char** filename)
> >> > - {
> >> > --    rpmRC rc;
> >> > --    const char *errorString;
> >> > --    Package pkg;
> >> > --    char *pkglist = NULL;
> >> > --
> >> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> >> > --      char *fn;
> >> > -+      const char *errorString;
> >> > -+      rpmRC rc = RPMRC_OK;
> >> > -
> >> > -       if (pkg->fileList == NULL)
> >> > --          continue;
> >> > -+          return rc;
> >> > -
> >> > -       if ((rc = processScriptFiles(spec, pkg)))
> >> > -           return rc;
> >> > -@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char
> *cookie, int cheating)
> >> > -                    headerGetString(pkg->header, RPMTAG_NAME),
> errorString);
> >> > -               return RPMRC_FAIL;
> >> > -           }
> >> > --          fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
> >> > -+          *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
> >> > -           if ((binDir = strchr(binRpm, '/')) != NULL) {
> >> > -               struct stat st;
> >> > -               char *dn;
> >> > -@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char
> *cookie, int cheating)
> >> > -           free(binRpm);
> >> > -       }
> >> > -
> >> > --      rc = writeRPM(pkg, NULL, fn, NULL);
> >> > -+      rc = writeRPM(pkg, NULL, *filename, NULL);
> >> > -       if (rc == RPMRC_OK) {
> >> > -           /* Do check each written package if enabled */
> >> > --          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn,
> NULL);
> >> > -+          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ",
> *filename, NULL);
> >> > -           if (pkgcheck[0] != ' ') {
> >> > -               rc = checkPackages(pkgcheck);
> >> > -           }
> >> > -           free(pkgcheck);
> >> > -+      }
> >> > -+      return rc;
> >> > -+}
> >> > -+
> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating)
> >> > -+{
> >> > -+    rpmRC rc;
> >> > -+    Package pkg;
> >> > -+    char *pkglist = NULL;
> >> > -+
> >> > -+    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> >> > -+      char *fn = NULL;
> >> > -+      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
> >> > -+      if (rc == RPMRC_OK) {
> >> > -           rstrcat(&pkglist, fn);
> >> > -           rstrcat(&pkglist, " ");
> >> > -       }
> >> > ---
> >> > -2.11.0
> >> > -
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> >> > deleted file mode 100644
> >> > index 24aa4c7ffff..00000000000
> >> > ---
> a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> >> > +++ /dev/null
> >> > @@ -1,58 +0,0 @@
> >> > -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00
> 2001
> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -Date: Tue, 27 Aug 2019 17:42:34 +0200
> >> > -Subject: [PATCH] mono-find-provides/requires: do not use monodis
> from the host
> >> > -
> >> > -There was a host contamination issue here: if monodis was installed
> >> > -on the host, do_package would use that to resolve dependencies
> >> > -of mono libraries (and often fail in that). Without monodis,
> >> > -no dependencies are resolved, which is seemingly how things
> >> > -are supposed to work.
> >> > -
> >> > -Upstream-Status: Inappropriate [oe-core specific]
> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > ----
> >> > - scripts/mono-find-provides | 8 ++++----
> >> > - scripts/mono-find-requires | 8 ++++----
> >> > - 2 files changed, 8 insertions(+), 8 deletions(-)
> >> > -
> >> > -diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
> >> > -index 9348457d3..b28872ffb 100644
> >> > ---- a/scripts/mono-find-provides
> >> > -+++ b/scripts/mono-find-provides
> >> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" |
> grep -E "\\.(exe|dll)\$"))
> >> > - build_bindir="$2/usr/bin"
> >> > - build_libdir="$2$3"
> >> > -
> >> > --if [ -x $build_bindir/monodis ]; then
> >> > --    monodis="$build_bindir/monodis"
> >> > -+if [ -x $build_bindir/monodis.bogus ]; then
> >> > -+    monodis="$build_bindir/monodis.bogus"
> >> > -     export
> LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
> >> > --elif [ -x /usr/bin/monodis ]; then
> >> > --    monodis="/usr/bin/monodis"
> >> > -+elif [ -x /usr/bin/monodis.bogus ]; then
> >> > -+    monodis="/usr/bin/monodis.bogus"
> >> > - else
> >> > -     exit 0;
> >> > - fi
> >> > -diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
> >> > -index ea58cae48..d270169e1 100644
> >> > ---- a/scripts/mono-find-requires
> >> > -+++ b/scripts/mono-find-requires
> >> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" |
> grep -E "\\.(exe|dll)\$"))
> >> > - build_bindir="$2/usr/bin"
> >> > - build_libdir="$2$3"
> >> > -
> >> > --if [ -x $build_bindir/monodis ]; then
> >> > --    monodis="$build_bindir/monodis"
> >> > -+if [ -x $build_bindir/monodis.bogus ]; then
> >> > -+    monodis="$build_bindir/monodis.bogus"
> >> > -     export
> LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
> >> > --elif [ -x /usr/bin/monodis ]; then
> >> > --    monodis="/usr/bin/monodis"
> >> > -+elif [ -x /usr/bin/monodis.bogus ]; then
> >> > -+    monodis="/usr/bin/monodis.bogus"
> >> > - else
> >> > -     exit 0;
> >> > - fi
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> >> > new file mode 100644
> >> > index 00000000000..9a5cd7c80dc
> >> > --- /dev/null
> >> > +++
> b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> >> > @@ -0,0 +1,65 @@
> >> > +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00
> 2001
> >> > +From: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > +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: Inapppropriate [upstream wants a proper fix]
> >> > +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > +---
> >> > + 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 */
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> >> > deleted file mode 100644
> >> > index d10041c2e14..00000000000
> >> > ---
> a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
> >> > +++ /dev/null
> >> > @@ -1,127 +0,0 @@
> >> > -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00
> 2001
> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -Date: Thu, 25 May 2017 19:30:20 +0300
> >> > -Subject: [PATCH 1/3] Run binary package creation via thread pools.
> >> > -
> >> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -
> >> > ----
> >> > - build/pack.c | 81
> +++++++++++++++++++++++++++++++++++++++++++++++++-----------
> >> > - configure.ac |  3 +++
> >> > - 2 files changed, 70 insertions(+), 14 deletions(-)
> >> > -
> >> > -diff --git a/build/pack.c b/build/pack.c
> >> > -index ccfd614cc..ed5b9ab4e 100644
> >> > ---- a/build/pack.c
> >> > -+++ b/build/pack.c
> >> > -@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec,
> Package pkg, const char *cookie, int ch
> >> > -       return rc;
> >> > - }
> >> > -
> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating)
> >> > -+struct binaryPackageTaskData
> >> > - {
> >> > --    rpmRC rc;
> >> > -     Package pkg;
> >> > -+    char *filename;
> >> > -+    rpmRC result;
> >> > -+    struct binaryPackageTaskData *next;
> >> > -+};
> >> > -+
> >> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec
> spec, const char *cookie, int cheating)
> >> > -+{
> >> > -+    struct binaryPackageTaskData *tasks = NULL;
> >> > -+    struct binaryPackageTaskData *task = NULL;
> >> > -+    struct binaryPackageTaskData *prev = NULL;
> >> > -+
> >> > -+    for (Package pkg = spec->packages; pkg != NULL; pkg =
> pkg->next) {
> >> > -+        task = rcalloc(1, sizeof(*task));
> >> > -+        task->pkg = pkg;
> >> > -+        if (pkg == spec->packages) {
> >> > -+            // the first package needs to be processed ahead of
> others, as they copy
> >> > -+            // changelog data from it, and so otherwise data races
> would happen
> >> > -+            task->result = packageBinary(spec, pkg, cookie,
> cheating, &(task->filename));
> >> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> >> > -+            tasks = task;
> >> > -+        }
> >> > -+        if (prev != NULL) {
> >> > -+            prev->next = task;
> >> > -+        }
> >> > -+        prev = task;
> >> > -+    }
> >> > -+
> >> > -+    #pragma omp parallel
> >> > -+    #pragma omp single
> >> > -+    // re-declaring task variable is necessary, or older gcc
> versions will produce code that segfaults
> >> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL;
> task = task->next) {
> >> > -+        if (task != tasks)
> >> > -+        #pragma omp task
> >> > -+        {
> >> > -+            task->result = packageBinary(spec, task->pkg, cookie,
> cheating, &(task->filename));
> >> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> >> > -+        }
> >> > -+    }
> >> > -+
> >> > -+    return tasks;
> >> > -+}
> >> > -+
> >> > -+static void freeBinaryPackageTasks(struct binaryPackageTaskData*
> tasks)
> >> > -+{
> >> > -+    while (tasks != NULL) {
> >> > -+        struct binaryPackageTaskData* next = tasks->next;
> >> > -+        rfree(tasks->filename);
> >> > -+        rfree(tasks);
> >> > -+        tasks = next;
> >> > -+    }
> >> > -+}
> >> > -+
> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating)
> >> > -+{
> >> > -     char *pkglist = NULL;
> >> > -
> >> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
> >> > --      char *fn = NULL;
> >> > --      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
> >> > --      if (rc == RPMRC_OK) {
> >> > --          rstrcat(&pkglist, fn);
> >> > --          rstrcat(&pkglist, " ");
> >> > --      }
> >> > --      free(fn);
> >> > --      if (rc != RPMRC_OK) {
> >> > --          pkglist = _free(pkglist);
> >> > --          return rc;
> >> > --      }
> >> > -+    struct binaryPackageTaskData *tasks =
> runBinaryPackageTasks(spec, cookie, cheating);
> >> > -+
> >> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL;
> task = task->next) {
> >> > -+        if (task->result == RPMRC_OK) {
> >> > -+            rstrcat(&pkglist, task->filename);
> >> > -+            rstrcat(&pkglist, " ");
> >> > -+        } else {
> >> > -+            _free(pkglist);
> >> > -+            freeBinaryPackageTasks(tasks);
> >> > -+            return RPMRC_FAIL;
> >> > -+        }
> >> > -     }
> >> > -+    freeBinaryPackageTasks(tasks);
> >> > -
> >> > -     /* Now check the package set if enabled */
> >> > -     if (pkglist != NULL) {
> >> > -diff --git a/configure.ac b/configure.ac
> >> > -index a506ec819..59fa0acaf 100644
> >> > ---- a/configure.ac
> >> > -+++ b/configure.ac
> >> > -@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
> >> > -
> >> > - PKG_PROG_PKG_CONFIG
> >> > -
> >> > -+AC_OPENMP
> >> > -+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
> >> > -+
> >> > - dnl Checks for programs.
> >> > - AC_PROG_CXX
> >> > - AC_PROG_AWK
> >> > ---
> >> > -2.11.0
> >> > -
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> >> > deleted file mode 100644
> >> > index c348ae5330e..00000000000
> >> > ---
> a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
> >> > +++ /dev/null
> >> > @@ -1,207 +0,0 @@
> >> > -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00
> 2001
> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -Date: Tue, 30 May 2017 13:58:30 +0300
> >> > -Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
> >> > - thread-safe
> >> > -
> >> > -Otherwise multithreaded rpm building explodes in various ways due
> >> > -to data races.
> >> > -
> >> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -
> >> > ----
> >> > - rpmio/rpmstrpool.c | 56
> +++++++++++++++++++++++++++++++++++++++++++++---------
> >> > - 1 file changed, 47 insertions(+), 9 deletions(-)
> >> > -
> >> > -diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
> >> > -index 30a57eb10..58ba95a02 100644
> >> > ---- a/rpmio/rpmstrpool.c
> >> > -+++ b/rpmio/rpmstrpool.c
> >> > -@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
> >> > -     return ht;
> >> > - }
> >> > -
> >> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid
> sid);
> >> > -+
> >> > - static void poolHashResize(rpmstrPool pool, int numBuckets)
> >> > - {
> >> > -     poolHash ht = pool->hash;
> >> > -@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int
> numBuckets)
> >> > -
> >> > -     for (int i=0; i<ht->numBuckets; i++) {
> >> > -         if (!ht->buckets[i].keyid) continue;
> >> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool,
> ht->buckets[i].keyid));
> >> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,
> ht->buckets[i].keyid));
> >> > -         for (unsigned int j=0;;j++) {
> >> > -             unsigned int hash = hashbucket(keyHash, j) % numBuckets;
> >> > -             if (!buckets[hash].keyid) {
> >> > -@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool,
> const char * key, unsigned int ke
> >> > -             ht->buckets[hash].keyid = keyid;
> >> > -             ht->keyCount++;
> >> > -             break;
> >> > --        } else if (!strcmp(rpmstrPoolStr(pool,
> ht->buckets[hash].keyid), key)) {
> >> > -+        } else if (!strcmp(rpmstrPoolStrNoLock(pool,
> ht->buckets[hash].keyid), key)) {
> >> > -             return;
> >> > -         }
> >> > -     }
> >> > -@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
> >> > -     int maxcollisions = 0;
> >> > -
> >> > -     for (i=0; i<ht->numBuckets; i++) {
> >> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool,
> ht->buckets[i].keyid));
> >> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,
> ht->buckets[i].keyid));
> >> > -         for (unsigned int j=0;;j++) {
> >> > -             unsigned int hash = hashbucket(keyHash, i) %
> ht->numBuckets;
> >> > -             if (hash==i) {
> >> > -@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
> >> > -
> >> > -     pool->hash = poolHashCreate(sizehint);
> >> > -     for (int i = 1; i <= pool->offs_size; i++)
> >> > --      poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
> >> > -+      poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
> >> > - }
> >> > -
> >> > - rpmstrPool rpmstrPoolCreate(void)
> >> > -@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
> >> > -
> >> > - rpmstrPool rpmstrPoolFree(rpmstrPool pool)
> >> > - {
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -     if (pool) {
> >> > -       if (pool->nrefs > 1) {
> >> > -           pool->nrefs--;
> >> > -@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
> >> > -           free(pool);
> >> > -       }
> >> > -     }
> >> > -+    }
> >> > -     return NULL;
> >> > - }
> >> > -
> >> > - rpmstrPool rpmstrPoolLink(rpmstrPool pool)
> >> > - {
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -     if (pool)
> >> > -       pool->nrefs++;
> >> > -+    }
> >> > -     return pool;
> >> > - }
> >> > -
> >> > - void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
> >> > - {
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -     if (pool && !pool->frozen) {
> >> > -       if (!keephash) {
> >> > -           pool->hash = poolHashFree(pool->hash);
> >> > -@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int
> keephash)
> >> > -                             pool->offs_alloced *
> sizeof(*pool->offs));
> >> > -       pool->frozen = 1;
> >> > -     }
> >> > -+    }
> >> > - }
> >> > -
> >> > - void rpmstrPoolUnfreeze(rpmstrPool pool)
> >> > - {
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -     if (pool) {
> >> > -       if (pool->hash == NULL) {
> >> > -           rpmstrPoolRehash(pool);
> >> > -       }
> >> > -       pool->frozen = 0;
> >> > -     }
> >> > -+    }
> >> > - }
> >> > -
> >> > - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t
> slen, unsigned int hash)
> >> > -@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool,
> const char * key, size_t keylen,
> >> > -             return 0;
> >> > -         }
> >> > -
> >> > --      s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
> >> > -+      s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
> >> > -       /* pool string could be longer than keylen, require exact
> matche */
> >> > -       if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
> >> > -           return ht->buckets[hash].keyid;
> >> > -@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool,
> const char *s, size_t slen,
> >> > - rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen,
> int create)
> >> > - {
> >> > -     rpmsid sid = 0;
> >> > --
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -     if (s != NULL) {
> >> > -       unsigned int hash = rstrnhash(s, slen);
> >> > -       sid = strn2id(pool, s, slen, hash, create);
> >> > -     }
> >> > -+    }
> >> > -     return sid;
> >> > - }
> >> > -
> >> > - rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
> >> > - {
> >> > -     rpmsid sid = 0;
> >> > --
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -     if (s != NULL) {
> >> > -       size_t slen;
> >> > -       unsigned int hash = rstrlenhash(s, &slen);
> >> > -       sid = strn2id(pool, s, slen, hash, create);
> >> > -     }
> >> > -+    }
> >> > -     return sid;
> >> > - }
> >> > -
> >> > --const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
> >> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
> >> > - {
> >> > -     const char *s = NULL;
> >> > -     if (pool && sid > 0 && sid <= pool->offs_size)
> >> > -@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool,
> rpmsid sid)
> >> > -     return s;
> >> > - }
> >> > -
> >> > -+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
> >> > -+{
> >> > -+    const char *s = NULL;
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -+    s = rpmstrPoolStrNoLock(pool, sid);
> >> > -+    }
> >> > -+    return s;
> >> > -+}
> >> > -+
> >> > - size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
> >> > - {
> >> > -     size_t slen = 0;
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -     if (pool && sid > 0 && sid <= pool->offs_size) {
> >> > -       slen = strlen(pool->offs[sid]);
> >> > -     }
> >> > -+    }
> >> > -     return slen;
> >> > - }
> >> > -
> >> > -@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid
> sidA,
> >> > -
> >> > - rpmsid rpmstrPoolNumStr(rpmstrPool pool)
> >> > - {
> >> > --    return (pool != NULL) ? pool->offs_size : 0;
> >> > -+    rpmsid id = 0;
> >> > -+    #pragma omp critical(rpmstrpool)
> >> > -+    {
> >> > -+    if (pool) {
> >> > -+      id = pool->offs_size;
> >> > -+    }
> >> > -+    }
> >> > -+    return id;
> >> > - }
> >> > ---
> >> > -2.11.0
> >> > -
> >> > diff --git
> a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> >> > deleted file mode 100644
> >> > index 652e30b3e4a..00000000000
> >> > ---
> a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
> >> > +++ /dev/null
> >> > @@ -1,336 +0,0 @@
> >> > -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00
> 2001
> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -Date: Thu, 8 Jun 2017 17:08:09 +0300
> >> > -Subject: [PATCH] build/pack.c: remove static local variables from
> buildHost()
> >> > - and getBuildTime()
> >> > -
> >> > -Their use is causing difficult to diagnoze data races when building
> multiple
> >> > -packages in parallel, and is a bad idea in general, as it also makes
> it more
> >> > -difficult to reason about code.
> >> > -
> >> > -Upstream-Status: Submitted [
> https://github.com/rpm-software-management/rpm/pull/226]
> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -
> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> >> > -
> >> > ----
> >> > - build/build.c             | 54 ++++++++++++++++++++++++++++--
> >> > - build/pack.c              | 84
> +++++++++--------------------------------------
> >> > - build/rpmbuild_internal.h |  8 +++--
> >> > - 3 files changed, 74 insertions(+), 72 deletions(-)
> >> > -
> >> > -diff --git a/build/build.c b/build/build.c
> >> > -index 13c3df2..b154f08 100644
> >> > ---- a/build/build.c
> >> > -+++ b/build/build.c
> >> > -@@ -6,6 +6,8 @@
> >> > - #include "system.h"
> >> > -
> >> > - #include <errno.h>
> >> > -+#include <netdb.h>
> >> > -+#include <time.h>
> >> > - #include <sys/wait.h>
> >> > -
> >> > - #include <rpm/rpmlog.h>
> >> > -@@ -16,6 +18,50 @@
> >> > -
> >> > - #include "debug.h"
> >> > -
> >> > -+static rpm_time_t getBuildTime(void)
> >> > -+{
> >> > -+    rpm_time_t buildTime = 0;
> >> > -+    char *srcdate;
> >> > -+    time_t epoch;
> >> > -+    char *endptr;
> >> > -+
> >> > -+    srcdate = getenv("SOURCE_DATE_EPOCH");
> >> > -+    if (srcdate) {
> >> > -+        errno = 0;
> >> > -+        epoch = strtol(srcdate, &endptr, 10);
> >> > -+        if (srcdate == endptr || *endptr || errno != 0)
> >> > -+            rpmlog(RPMLOG_ERR, _("unable to parse
> SOURCE_DATE_EPOCH\n"));
> >> > -+        else
> >> > -+            buildTime = (int32_t) epoch;
> >> > -+    } else
> >> > -+        buildTime = (int32_t) time(NULL);
> >> > -+
> >> > -+    return buildTime;
> >> > -+}
> >> > -+
> >> > -+static char * buildHost(void)
> >> > -+{
> >> > -+    char* hostname;
> >> > -+    struct hostent *hbn;
> >> > -+    char *bhMacro;
> >> > -+
> >> > -+    bhMacro = rpmExpand("%{?_buildhost}", NULL);
> >> > -+    if (strcmp(bhMacro, "") != 0) {
> >> > -+        rasprintf(&hostname, "%s", bhMacro);
> >> > -+    } else {
> >> > -+        hostname = rcalloc(1024, sizeof(*hostname));
> >> > -+        (void) gethostname(hostname, 1024);
> >> > -+        hbn = gethostbyname(hostname);
> >> > -+        if (hbn)
> >> > -+            strcpy(hostname, hbn->h_name);
> >> > -+        else
> >> > -+            rpmlog(RPMLOG_WARNING,
> >> > -+                    _("Could not canonicalize hostname: %s\n"),
> hostname);
> >> > -+    }
> >> > -+    free(bhMacro);
> >> > -+    return(hostname);
> >> > -+}
> >> > -+
> >> > - /**
> >> > -  */
> >> > - static rpmRC doRmSource(rpmSpec spec)
> >> > -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec
> spec, int what)
> >> > -     rpmRC rc = RPMRC_OK;
> >> > -     int test = (what & RPMBUILD_NOBUILD);
> >> > -     char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) :
> NULL;
> >> > -+    const char* host = buildHost();
> >> > -+    rpm_time_t buildTime = getBuildTime();
> >> > -+
> >> > -
> >> > -     if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
> >> > -       getenv("SOURCE_DATE_EPOCH") == NULL) {
> >> > -@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs,
> rpmSpec spec, int what)
> >> > -               goto exit;
> >> > -
> >> > -       if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
> >> > --          (rc = packageSources(spec, &cookie)))
> >> > -+          (rc = packageSources(spec, &cookie, buildTime, host)))
> >> > -               goto exit;
> >> > -
> >> > -       if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
> >> > --          (rc = packageBinaries(spec, cookie, (didBuild == 0))))
> >> > -+          (rc = packageBinaries(spec, cookie, (didBuild == 0),
> buildTime, host)))
> >> > -               goto exit;
> >> > -
> >> > -       if ((what & RPMBUILD_CLEAN) &&
> >> > -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec
> spec, int what)
> >> > -       (void) unlink(spec->specFile);
> >> > -
> >> > - exit:
> >> > -+    free(host);
> >> > -     free(cookie);
> >> > -     spec->rootDir = NULL;
> >> > -     if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
> >> > -diff --git a/build/pack.c b/build/pack.c
> >> > -index df15876..17a4b09 100644
> >> > ---- a/build/pack.c
> >> > -+++ b/build/pack.c
> >> > -@@ -6,8 +6,6 @@
> >> > - #include "system.h"
> >> > -
> >> > - #include <errno.h>
> >> > --#include <netdb.h>
> >> > --#include <time.h>
> >> > - #include <sys/wait.h>
> >> > -
> >> > - #include <rpm/rpmlib.h>                       /* RPMSIGTAG*,
> rpmReadPackageFile */
> >> > -@@ -152,57 +150,6 @@ exit:
> >> > -     return rc;
> >> > - }
> >> > -
> >> > --static rpm_time_t * getBuildTime(void)
> >> > --{
> >> > --    static rpm_time_t buildTime[1];
> >> > --    char *srcdate;
> >> > --    time_t epoch;
> >> > --    char *endptr;
> >> > --
> >> > --    if (buildTime[0] == 0) {
> >> > --        srcdate = getenv("SOURCE_DATE_EPOCH");
> >> > --        if (srcdate) {
> >> > --            errno = 0;
> >> > --            epoch = strtol(srcdate, &endptr, 10);
> >> > --            if (srcdate == endptr || *endptr || errno != 0)
> >> > --                rpmlog(RPMLOG_ERR, _("unable to parse
> SOURCE_DATE_EPOCH\n"));
> >> > --            else
> >> > --                buildTime[0] = (int32_t) epoch;
> >> > --        } else
> >> > --            buildTime[0] = (int32_t) time(NULL);
> >> > --    }
> >> > --
> >> > --    return buildTime;
> >> > --}
> >> > --
> >> > --static const char * buildHost(void)
> >> > --{
> >> > --    static char hostname[1024];
> >> > --    static int oneshot = 0;
> >> > --    struct hostent *hbn;
> >> > --    char *bhMacro;
> >> > --
> >> > --    if (! oneshot) {
> >> > --        bhMacro = rpmExpand("%{?_buildhost}", NULL);
> >> > --        if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
> >> > --            strcpy(hostname, bhMacro);
> >> > --        } else {
> >> > --            if (strcmp(bhMacro, "") != 0)
> >> > --                rpmlog(RPMLOG_WARNING, _("The _buildhost macro is
> too long\n"));
> >> > --            (void) gethostname(hostname, sizeof(hostname));
> >> > --            hbn = gethostbyname(hostname);
> >> > --            if (hbn)
> >> > --                strcpy(hostname, hbn->h_name);
> >> > --            else
> >> > --                rpmlog(RPMLOG_WARNING,
> >> > --                        _("Could not canonicalize hostname: %s\n"),
> hostname);
> >> > --        }
> >> > --        free(bhMacro);
> >> > --        oneshot = 1;
> >> > --    }
> >> > --    return(hostname);
> >> > --}
> >> > --
> >> > - static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
> >> > - {
> >> > -     struct TriggerFileEntry *p;
> >> > -@@ -476,7 +423,8 @@ exit:
> >> > -  * order to how the RPM format is laid on disk.
> >> > -  */
> >> > - static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
> >> > --                    const char *fileName, char **cookie)
> >> > -+                    const char *fileName, char **cookie,
> >> > -+                    rpm_time_t buildTime, const char* buildHost)
> >> > - {
> >> > -     FD_t fd = NULL;
> >> > -     char * rpmio_flags = NULL;
> >> > -@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char
> ** pkgidp,
> >> > -
> >> > -     /* Create and add the cookie */
> >> > -     if (cookie) {
> >> > --      rasprintf(cookie, "%s %d", buildHost(), (int)
> (*getBuildTime()));
> >> > -+      rasprintf(cookie, "%s %d", buildHost, buildTime);
> >> > -       headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
> >> > -     }
> >> > -
> >> > -@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
> >> > -     return RPMRC_OK;
> >> > - }
> >> > -
> >> > --static rpmRC packageBinary(rpmSpec spec, Package pkg, const char
> *cookie, int cheating, char** filename)
> >> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char
> *cookie, int cheating, char** filename, rpm_time_t buildTime, const char*
> buildHost)
> >> > - {
> >> > -       const char *errorString;
> >> > -       rpmRC rc = RPMRC_OK;
> >> > -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package
> pkg, const char *cookie, int ch
> >> > -       headerCopyTags(spec->packages->header, pkg->header, copyTags);
> >> > -
> >> > -       headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
> >> > --      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
> >> > --      headerPutUint32(pkg->header, RPMTAG_BUILDTIME,
> getBuildTime(), 1);
> >> > -+      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
> >> > -+      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
> >> > -
> >> > -       if (spec->sourcePkgId != NULL) {
> >> > -           headerPutBin(pkg->header, RPMTAG_SOURCEPKGID,
> spec->sourcePkgId,16);
> >> > -@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package
> pkg, const char *cookie, int ch
> >> > -           free(binRpm);
> >> > -       }
> >> > -
> >> > --      rc = writeRPM(pkg, NULL, *filename, NULL);
> >> > -+      rc = writeRPM(pkg, NULL, *filename, NULL, buildTime,
> buildHost);
> >> > -       if (rc == RPMRC_OK) {
> >> > -           /* Do check each written package if enabled */
> >> > -           char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ",
> *filename, NULL);
> >> > -@@ -719,7 +667,7 @@ struct binaryPackageTaskData
> >> > -     struct binaryPackageTaskData *next;
> >> > - };
> >> > -
> >> > --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec
> spec, const char *cookie, int cheating)
> >> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec
> spec, const char *cookie, int cheating, rpm_time_t buildTime, char*
> buildHost)
> >> > - {
> >> > -     struct binaryPackageTaskData *tasks = NULL;
> >> > -     struct binaryPackageTaskData *task = NULL;
> >> > -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData*
> runBinaryPackageTasks(rpmSpec spec, const c
> >> > -         if (pkg == spec->packages) {
> >> > -             // the first package needs to be processed ahead of
> others, as they copy
> >> > -             // changelog data from it, and so otherwise data races
> would happen
> >> > --            task->result = packageBinary(spec, pkg, cookie,
> cheating, &(task->filename));
> >> > -+            task->result = packageBinary(spec, pkg, cookie,
> cheating, &(task->filename), buildTime, buildHost);
> >> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> >> > -             tasks = task;
> >> > -         }
> >> > -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData*
> runBinaryPackageTasks(rpmSpec spec, const c
> >> > -         if (task != tasks)
> >> > -         #pragma omp task
> >> > -         {
> >> > --            task->result = packageBinary(spec, task->pkg, cookie,
> cheating, &(task->filename));
> >> > -+            task->result = packageBinary(spec, task->pkg, cookie,
> cheating, &(task->filename), buildTime, buildHost);
> >> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job,
> result %d, filename %s\n"), task->result, task->filename);
> >> > -         }
> >> > -     }
> >> > -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct
> binaryPackageTaskData* tasks)
> >> > -     }
> >> > - }
> >> > -
> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating)
> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating, rpm_time_t buildTime, char* buildHost)
> >> > - {
> >> > -     char *pkglist = NULL;
> >> > -
> >> > --    struct binaryPackageTaskData *tasks =
> runBinaryPackageTasks(spec, cookie, cheating);
> >> > -+    struct binaryPackageTaskData *tasks =
> runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
> >> > -
> >> > -     for (struct binaryPackageTaskData *task = tasks; task != NULL;
> task = task->next) {
> >> > -         if (task->result == RPMRC_OK) {
> >> > -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char
> *cookie, int cheating)
> >> > -     return RPMRC_OK;
> >> > - }
> >> > -
> >> > --rpmRC packageSources(rpmSpec spec, char **cookie)
> >> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t
> buildTime, char* buildHost)
> >> > - {
> >> > -     Package sourcePkg = spec->sourcePackage;
> >> > -     rpmRC rc;
> >> > -@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
> >> > -
> >> > -     /* Add some cruft */
> >> > -     headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
> >> > --    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST,
> buildHost());
> >> > --    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME,
> getBuildTime(), 1);
> >> > -+    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
> >> > -+    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME,
> &buildTime, 1);
> >> > -     headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one,
> 1);
> >> > -
> >> > -     /* XXX this should be %_srpmdir */
> >> > -@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
> >> > -       char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn,
> NULL);
> >> > -
> >> > -       spec->sourcePkgId = NULL;
> >> > --      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
> >> > -+      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie,
> buildTime, buildHost);
> >> > -
> >> > -       /* Do check SRPM package if enabled */
> >> > -       if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
> >> > -diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
> >> > -index 439b7d3..07e8338 100644
> >> > ---- a/build/rpmbuild_internal.h
> >> > -+++ b/build/rpmbuild_internal.h
> >> > -@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec,
> rpmBuildPkgFlags pkgFlags);
> >> > -  * @param spec                spec file control structure
> >> > -  * @param cookie      build identifier "cookie" or NULL
> >> > -  * @param cheating    was build shortcircuited?
> >> > -+ * @param buildTime   the build timestamp that goes into packages
> >> > -+ * @param buildHost   the hostname where the build is happening
> >> > -  * @return            RPMRC_OK on success
> >> > -  */
> >> > - RPM_GNUC_INTERNAL
> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating);
> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int
> cheating, rpm_time_t buildTime, char* buildHost);
> >> > -
> >> > - /** \ingroup rpmbuild
> >> > -  * Generate source package.
> >> > -  * @param spec                spec file control structure
> >> > -  * @retval cookie     build identifier "cookie" or NULL
> >> > -+ * @param buildTime   the build timestamp that goes into packages
> >> > -+ * @param buildHost   the hostname where the build is happening
> >> > -  * @return            RPMRC_OK on success
> >> > -  */
> >> > - RPM_GNUC_INTERNAL
> >> > --rpmRC packageSources(rpmSpec spec, char **cookie);
> >> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t
> buildTime, char* buildHost);
> >> > -
> >> > - RPM_GNUC_INTERNAL
> >> > - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
> >> > diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
> >> > similarity index 91%
> >> > rename from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> >> > rename to meta/recipes-devtools/rpm/rpm_4.15.1.bb
> >> > index c37330eb4c6..4fa2d764fb9 100644
> >> > --- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> >> > +++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
> >> > @@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
> >> >  LICENSE = "GPL-2.0"
> >> >  LIC_FILES_CHKSUM =
> "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
> >> >
> >> > -SRC_URI = "git://
> github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
> >> > +SRC_URI = "git://
> github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
> >> >
>  file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
> >> >             file://0001-Do-not-read-config-files-from-HOME.patch \
> >> >
>  file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
> >> > @@ -34,18 +34,14 @@ SRC_URI = "git://
> github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
> >> >             file://0001-Fix-build-with-musl-C-library.patch \
> >> >
>  file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
> >> >
>  file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
> >> > -
>  file://0001-Split-binary-package-building-into-a-separate-functi.patch \
> >> > -
>  file://0002-Run-binary-package-creation-via-thread-pools.patch \
> >> > -
>  file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
> >> > -
>  file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
> >> >             file://0001-perl-disable-auto-reqs.patch \
> >> >
>  file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
> >> >
>  file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
> >> > -
>  file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
> >> > +
>  file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
> >> >             "
> >> >
> >> >  PE = "1"
> >> > -SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
> >> > +SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
> >> >
> >> >  S = "${WORKDIR}/git"
> >> >
> >> > @@ -125,8 +121,7 @@ do_install_append () {
> >> >             ${D}/${libdir}/rpm/macros
> >> >
> >> >         sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|'
> \
> >> > -           ${D}${libdir}/rpm/pythondistdeps.py \
> >> > -           ${D}${libdir}/rpm/python-macro-helper
> >> > +           ${D}${libdir}/rpm/pythondistdeps.py
> >> >  }
> >> >
> >> >  FILES_${PN} += "${libdir}/rpm-plugins/*.so \
> >> > --
> >> > 2.17.1
> >> >
> >> > --
> >> > _______________________________________________
> >> > Openembedded-core mailing list
> >> > Openembedded-core@lists.openembedded.org
> >> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 73003 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5] rpm: upgrade to 4.15.1
  2019-11-25 16:33         ` Alexander Kanavin
@ 2019-11-25 18:22           ` Khem Raj
  0 siblings, 0 replies; 12+ messages in thread
From: Khem Raj @ 2019-11-25 18:22 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

On Mon, Nov 25, 2019 at 8:33 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> I have reproduced it with gcc and musl. The omp.h is in a non-standard location in recipe-sysroot/usr/lib, which works ok with glibc, but breaks with musl. How gcc is able to find it (or not) is too arcane for my knowledge :(
>
> I added --disable-openmp for musl; the major use for openmp is to speed up native rpm packaging. On target it matters less hopefully.
>
right then lets not make it musl specific rather, disable it for
class-target and keep it on for native alone and may be nativesdk

> Alex
>
> On Mon, 25 Nov 2019 at 16:50, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> On Mon, Nov 25, 2019 at 7:19 AM Alexander Kanavin
>> <alex.kanavin@gmail.com> wrote:
>> >
>> > omp.h is coming from gcc-runtime. Which compiler are you using? Probably an override (specific for that compiler) is needed.
>>
>> if you looked into logs then you must have noticed its clang. I was
>> wonder is openMP a hard dependency
>> for rpm now, which might be interesting for architectures like mips and ppc.
>>
>> >
>> > Alex
>> >
>> > On Sat, 23 Nov 2019 at 18:48, Khem Raj <raj.khem@gmail.com> wrote:
>> >>
>> >> breaks with needing openmp
>> >>
>> >> http://errors.yoctoproject.org/Errors/Details/282827/
>> >>
>> >> perhaps needs explicit dependency on libgomp now ?
>> >>
>> >> On Tue, Nov 19, 2019 at 5:26 AM Alexander Kanavin
>> >> <alex.kanavin@gmail.com> wrote:
>> >> >
>> >> > 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:
>> >> > https://github.com/rpm-software-management/rpm/issues/756
>> >> >
>> >> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > ---
>> >> >  ...satisfiable-dependency-when-building.patch |  28 +-
>> >> >  ...lib-rpm-as-the-installation-path-for.patch |  14 +-
>> >> >  ...kage-building-into-a-separate-functi.patch |  84 -----
>> >> >  ...es-requires-do-not-use-monodis-from-.patch |  58 ---
>> >> >  ...-run-file-classification-in-parallel.patch |  65 ++++
>> >> >  ...ry-package-creation-via-thread-pools.patch | 127 -------
>> >> >  ...e-operations-over-string-pools-threa.patch | 207 -----------
>> >> >  ...ove-static-local-variables-from-buil.patch | 336 ------------------
>> >> >  .../rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}    |  13 +-
>> >> >  9 files changed, 89 insertions(+), 843 deletions(-)
>> >> >  delete mode 100644 meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
>> >> >  delete mode 100644 meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
>> >> >  create mode 100644 meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>> >> >  delete mode 100644 meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
>> >> >  delete mode 100644 meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
>> >> >  delete mode 100644 meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
>> >> >  rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb} (91%)
>> >> >
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
>> >> > index 80e2f0fad70..4029233fb70 100644
>> >> > --- a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
>> >> > +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
>> >> > @@ -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 <alex.kanavin@gmail.com>
>> >> >  Date: Mon, 9 Jan 2017 18:52:11 +0200
>> >> >  Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
>> >> > @@ -9,25 +9,23 @@ hand produces rpms that way by design.
>> >> >
>> >> >  Upstream-Status: Inappropriate [oe-core specific]
>> >> >  Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > +
>> >> >  ---
>> >> >   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
>> >> > -
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
>> >> > index 82e7328757f..52440d68180 100644
>> >> > --- a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
>> >> > +++ b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
>> >> > @@ -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 <alex.kanavin@gmail.com>
>> >> >  Date: Mon, 27 Feb 2017 09:43:30 +0200
>> >> >  Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
>> >> > @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> >   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
>> >> >
>> >> > @@ -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
>> >> > @@ -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 @@
>> >> > @@ -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
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch b/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
>> >> > deleted file mode 100644
>> >> > index 6e44f0b7fc9..00000000000
>> >> > --- a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
>> >> > +++ /dev/null
>> >> > @@ -1,84 +0,0 @@
>> >> > -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001
>> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -Date: Thu, 25 May 2017 18:15:27 +0300
>> >> > -Subject: [PATCH 1/4] Split binary package building into a separate function
>> >> > -
>> >> > -So that it can be run as a thread pool task.
>> >> > -
>> >> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -
>> >> > ----
>> >> > - build/pack.c | 33 +++++++++++++++++++++------------
>> >> > - 1 file changed, 21 insertions(+), 12 deletions(-)
>> >> > -
>> >> > -diff --git a/build/pack.c b/build/pack.c
>> >> > -index 518f4e92a..ccfd614cc 100644
>> >> > ---- a/build/pack.c
>> >> > -+++ b/build/pack.c
>> >> > -@@ -546,18 +546,13 @@ static rpmRC checkPackages(char *pkgcheck)
>> >> > -     return RPMRC_OK;
>> >> > - }
>> >> > -
>> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
>> >> > - {
>> >> > --    rpmRC rc;
>> >> > --    const char *errorString;
>> >> > --    Package pkg;
>> >> > --    char *pkglist = NULL;
>> >> > --
>> >> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> >> > --      char *fn;
>> >> > -+      const char *errorString;
>> >> > -+      rpmRC rc = RPMRC_OK;
>> >> > -
>> >> > -       if (pkg->fileList == NULL)
>> >> > --          continue;
>> >> > -+          return rc;
>> >> > -
>> >> > -       if ((rc = processScriptFiles(spec, pkg)))
>> >> > -           return rc;
>> >> > -@@ -587,7 +582,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -                    headerGetString(pkg->header, RPMTAG_NAME), errorString);
>> >> > -               return RPMRC_FAIL;
>> >> > -           }
>> >> > --          fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
>> >> > -+          *filename = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
>> >> > -           if ((binDir = strchr(binRpm, '/')) != NULL) {
>> >> > -               struct stat st;
>> >> > -               char *dn;
>> >> > -@@ -609,14 +604,28 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -           free(binRpm);
>> >> > -       }
>> >> > -
>> >> > --      rc = writeRPM(pkg, NULL, fn, NULL);
>> >> > -+      rc = writeRPM(pkg, NULL, *filename, NULL);
>> >> > -       if (rc == RPMRC_OK) {
>> >> > -           /* Do check each written package if enabled */
>> >> > --          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", fn, NULL);
>> >> > -+          char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
>> >> > -           if (pkgcheck[0] != ' ') {
>> >> > -               rc = checkPackages(pkgcheck);
>> >> > -           }
>> >> > -           free(pkgcheck);
>> >> > -+      }
>> >> > -+      return rc;
>> >> > -+}
>> >> > -+
>> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -+{
>> >> > -+    rpmRC rc;
>> >> > -+    Package pkg;
>> >> > -+    char *pkglist = NULL;
>> >> > -+
>> >> > -+    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> >> > -+      char *fn = NULL;
>> >> > -+      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
>> >> > -+      if (rc == RPMRC_OK) {
>> >> > -           rstrcat(&pkglist, fn);
>> >> > -           rstrcat(&pkglist, " ");
>> >> > -       }
>> >> > ---
>> >> > -2.11.0
>> >> > -
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch b/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
>> >> > deleted file mode 100644
>> >> > index 24aa4c7ffff..00000000000
>> >> > --- a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
>> >> > +++ /dev/null
>> >> > @@ -1,58 +0,0 @@
>> >> > -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
>> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -Date: Tue, 27 Aug 2019 17:42:34 +0200
>> >> > -Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host
>> >> > -
>> >> > -There was a host contamination issue here: if monodis was installed
>> >> > -on the host, do_package would use that to resolve dependencies
>> >> > -of mono libraries (and often fail in that). Without monodis,
>> >> > -no dependencies are resolved, which is seemingly how things
>> >> > -are supposed to work.
>> >> > -
>> >> > -Upstream-Status: Inappropriate [oe-core specific]
>> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > ----
>> >> > - scripts/mono-find-provides | 8 ++++----
>> >> > - scripts/mono-find-requires | 8 ++++----
>> >> > - 2 files changed, 8 insertions(+), 8 deletions(-)
>> >> > -
>> >> > -diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
>> >> > -index 9348457d3..b28872ffb 100644
>> >> > ---- a/scripts/mono-find-provides
>> >> > -+++ b/scripts/mono-find-provides
>> >> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
>> >> > - build_bindir="$2/usr/bin"
>> >> > - build_libdir="$2$3"
>> >> > -
>> >> > --if [ -x $build_bindir/monodis ]; then
>> >> > --    monodis="$build_bindir/monodis"
>> >> > -+if [ -x $build_bindir/monodis.bogus ]; then
>> >> > -+    monodis="$build_bindir/monodis.bogus"
>> >> > -     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
>> >> > --elif [ -x /usr/bin/monodis ]; then
>> >> > --    monodis="/usr/bin/monodis"
>> >> > -+elif [ -x /usr/bin/monodis.bogus ]; then
>> >> > -+    monodis="/usr/bin/monodis.bogus"
>> >> > - else
>> >> > -     exit 0;
>> >> > - fi
>> >> > -diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
>> >> > -index ea58cae48..d270169e1 100644
>> >> > ---- a/scripts/mono-find-requires
>> >> > -+++ b/scripts/mono-find-requires
>> >> > -@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
>> >> > - build_bindir="$2/usr/bin"
>> >> > - build_libdir="$2$3"
>> >> > -
>> >> > --if [ -x $build_bindir/monodis ]; then
>> >> > --    monodis="$build_bindir/monodis"
>> >> > -+if [ -x $build_bindir/monodis.bogus ]; then
>> >> > -+    monodis="$build_bindir/monodis.bogus"
>> >> > -     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
>> >> > --elif [ -x /usr/bin/monodis ]; then
>> >> > --    monodis="/usr/bin/monodis"
>> >> > -+elif [ -x /usr/bin/monodis.bogus ]; then
>> >> > -+    monodis="/usr/bin/monodis.bogus"
>> >> > - else
>> >> > -     exit 0;
>> >> > - fi
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>> >> > new file mode 100644
>> >> > index 00000000000..9a5cd7c80dc
>> >> > --- /dev/null
>> >> > +++ b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
>> >> > @@ -0,0 +1,65 @@
>> >> > +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001
>> >> > +From: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > +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: Inapppropriate [upstream wants a proper fix]
>> >> > +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > +---
>> >> > + 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 */
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch b/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
>> >> > deleted file mode 100644
>> >> > index d10041c2e14..00000000000
>> >> > --- a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
>> >> > +++ /dev/null
>> >> > @@ -1,127 +0,0 @@
>> >> > -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001
>> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -Date: Thu, 25 May 2017 19:30:20 +0300
>> >> > -Subject: [PATCH 1/3] Run binary package creation via thread pools.
>> >> > -
>> >> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -
>> >> > ----
>> >> > - build/pack.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
>> >> > - configure.ac |  3 +++
>> >> > - 2 files changed, 70 insertions(+), 14 deletions(-)
>> >> > -
>> >> > -diff --git a/build/pack.c b/build/pack.c
>> >> > -index ccfd614cc..ed5b9ab4e 100644
>> >> > ---- a/build/pack.c
>> >> > -+++ b/build/pack.c
>> >> > -@@ -616,25 +616,78 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
>> >> > -       return rc;
>> >> > - }
>> >> > -
>> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -+struct binaryPackageTaskData
>> >> > - {
>> >> > --    rpmRC rc;
>> >> > -     Package pkg;
>> >> > -+    char *filename;
>> >> > -+    rpmRC result;
>> >> > -+    struct binaryPackageTaskData *next;
>> >> > -+};
>> >> > -+
>> >> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
>> >> > -+{
>> >> > -+    struct binaryPackageTaskData *tasks = NULL;
>> >> > -+    struct binaryPackageTaskData *task = NULL;
>> >> > -+    struct binaryPackageTaskData *prev = NULL;
>> >> > -+
>> >> > -+    for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> >> > -+        task = rcalloc(1, sizeof(*task));
>> >> > -+        task->pkg = pkg;
>> >> > -+        if (pkg == spec->packages) {
>> >> > -+            // the first package needs to be processed ahead of others, as they copy
>> >> > -+            // changelog data from it, and so otherwise data races would happen
>> >> > -+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
>> >> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> >> > -+            tasks = task;
>> >> > -+        }
>> >> > -+        if (prev != NULL) {
>> >> > -+            prev->next = task;
>> >> > -+        }
>> >> > -+        prev = task;
>> >> > -+    }
>> >> > -+
>> >> > -+    #pragma omp parallel
>> >> > -+    #pragma omp single
>> >> > -+    // re-declaring task variable is necessary, or older gcc versions will produce code that segfaults
>> >> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
>> >> > -+        if (task != tasks)
>> >> > -+        #pragma omp task
>> >> > -+        {
>> >> > -+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
>> >> > -+            rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> >> > -+        }
>> >> > -+    }
>> >> > -+
>> >> > -+    return tasks;
>> >> > -+}
>> >> > -+
>> >> > -+static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
>> >> > -+{
>> >> > -+    while (tasks != NULL) {
>> >> > -+        struct binaryPackageTaskData* next = tasks->next;
>> >> > -+        rfree(tasks->filename);
>> >> > -+        rfree(tasks);
>> >> > -+        tasks = next;
>> >> > -+    }
>> >> > -+}
>> >> > -+
>> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -+{
>> >> > -     char *pkglist = NULL;
>> >> > -
>> >> > --    for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
>> >> > --      char *fn = NULL;
>> >> > --      rc = packageBinary(spec, pkg, cookie, cheating, &fn);
>> >> > --      if (rc == RPMRC_OK) {
>> >> > --          rstrcat(&pkglist, fn);
>> >> > --          rstrcat(&pkglist, " ");
>> >> > --      }
>> >> > --      free(fn);
>> >> > --      if (rc != RPMRC_OK) {
>> >> > --          pkglist = _free(pkglist);
>> >> > --          return rc;
>> >> > --      }
>> >> > -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
>> >> > -+
>> >> > -+    for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
>> >> > -+        if (task->result == RPMRC_OK) {
>> >> > -+            rstrcat(&pkglist, task->filename);
>> >> > -+            rstrcat(&pkglist, " ");
>> >> > -+        } else {
>> >> > -+            _free(pkglist);
>> >> > -+            freeBinaryPackageTasks(tasks);
>> >> > -+            return RPMRC_FAIL;
>> >> > -+        }
>> >> > -     }
>> >> > -+    freeBinaryPackageTasks(tasks);
>> >> > -
>> >> > -     /* Now check the package set if enabled */
>> >> > -     if (pkglist != NULL) {
>> >> > -diff --git a/configure.ac b/configure.ac
>> >> > -index a506ec819..59fa0acaf 100644
>> >> > ---- a/configure.ac
>> >> > -+++ b/configure.ac
>> >> > -@@ -17,6 +17,9 @@ AC_DISABLE_STATIC
>> >> > -
>> >> > - PKG_PROG_PKG_CONFIG
>> >> > -
>> >> > -+AC_OPENMP
>> >> > -+RPMCFLAGS="$OPENMP_CFLAGS $RPMCFLAGS"
>> >> > -+
>> >> > - dnl Checks for programs.
>> >> > - AC_PROG_CXX
>> >> > - AC_PROG_AWK
>> >> > ---
>> >> > -2.11.0
>> >> > -
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch b/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
>> >> > deleted file mode 100644
>> >> > index c348ae5330e..00000000000
>> >> > --- a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
>> >> > +++ /dev/null
>> >> > @@ -1,207 +0,0 @@
>> >> > -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001
>> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -Date: Tue, 30 May 2017 13:58:30 +0300
>> >> > -Subject: [PATCH 3/4] rpmstrpool.c: make operations over string pools
>> >> > - thread-safe
>> >> > -
>> >> > -Otherwise multithreaded rpm building explodes in various ways due
>> >> > -to data races.
>> >> > -
>> >> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -
>> >> > ----
>> >> > - rpmio/rpmstrpool.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
>> >> > - 1 file changed, 47 insertions(+), 9 deletions(-)
>> >> > -
>> >> > -diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c
>> >> > -index 30a57eb10..58ba95a02 100644
>> >> > ---- a/rpmio/rpmstrpool.c
>> >> > -+++ b/rpmio/rpmstrpool.c
>> >> > -@@ -113,6 +113,8 @@ static poolHash poolHashCreate(int numBuckets)
>> >> > -     return ht;
>> >> > - }
>> >> > -
>> >> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid);
>> >> > -+
>> >> > - static void poolHashResize(rpmstrPool pool, int numBuckets)
>> >> > - {
>> >> > -     poolHash ht = pool->hash;
>> >> > -@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, int numBuckets)
>> >> > -
>> >> > -     for (int i=0; i<ht->numBuckets; i++) {
>> >> > -         if (!ht->buckets[i].keyid) continue;
>> >> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
>> >> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
>> >> > -         for (unsigned int j=0;;j++) {
>> >> > -             unsigned int hash = hashbucket(keyHash, j) % numBuckets;
>> >> > -             if (!buckets[hash].keyid) {
>> >> > -@@ -149,7 +151,7 @@ static void poolHashAddHEntry(rpmstrPool pool, const char * key, unsigned int ke
>> >> > -             ht->buckets[hash].keyid = keyid;
>> >> > -             ht->keyCount++;
>> >> > -             break;
>> >> > --        } else if (!strcmp(rpmstrPoolStr(pool, ht->buckets[hash].keyid), key)) {
>> >> > -+        } else if (!strcmp(rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid), key)) {
>> >> > -             return;
>> >> > -         }
>> >> > -     }
>> >> > -@@ -191,7 +193,7 @@ static void poolHashPrintStats(rpmstrPool pool)
>> >> > -     int maxcollisions = 0;
>> >> > -
>> >> > -     for (i=0; i<ht->numBuckets; i++) {
>> >> > --        unsigned int keyHash = rstrhash(rpmstrPoolStr(pool, ht->buckets[i].keyid));
>> >> > -+        unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool, ht->buckets[i].keyid));
>> >> > -         for (unsigned int j=0;;j++) {
>> >> > -             unsigned int hash = hashbucket(keyHash, i) % ht->numBuckets;
>> >> > -             if (hash==i) {
>> >> > -@@ -221,7 +223,7 @@ static void rpmstrPoolRehash(rpmstrPool pool)
>> >> > -
>> >> > -     pool->hash = poolHashCreate(sizehint);
>> >> > -     for (int i = 1; i <= pool->offs_size; i++)
>> >> > --      poolHashAddEntry(pool, rpmstrPoolStr(pool, i), i);
>> >> > -+      poolHashAddEntry(pool, rpmstrPoolStrNoLock(pool, i), i);
>> >> > - }
>> >> > -
>> >> > - rpmstrPool rpmstrPoolCreate(void)
>> >> > -@@ -245,6 +247,8 @@ rpmstrPool rpmstrPoolCreate(void)
>> >> > -
>> >> > - rpmstrPool rpmstrPoolFree(rpmstrPool pool)
>> >> > - {
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -     if (pool) {
>> >> > -       if (pool->nrefs > 1) {
>> >> > -           pool->nrefs--;
>> >> > -@@ -260,18 +264,24 @@ rpmstrPool rpmstrPoolFree(rpmstrPool pool)
>> >> > -           free(pool);
>> >> > -       }
>> >> > -     }
>> >> > -+    }
>> >> > -     return NULL;
>> >> > - }
>> >> > -
>> >> > - rpmstrPool rpmstrPoolLink(rpmstrPool pool)
>> >> > - {
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -     if (pool)
>> >> > -       pool->nrefs++;
>> >> > -+    }
>> >> > -     return pool;
>> >> > - }
>> >> > -
>> >> > - void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
>> >> > - {
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -     if (pool && !pool->frozen) {
>> >> > -       if (!keephash) {
>> >> > -           pool->hash = poolHashFree(pool->hash);
>> >> > -@@ -281,16 +291,20 @@ void rpmstrPoolFreeze(rpmstrPool pool, int keephash)
>> >> > -                             pool->offs_alloced * sizeof(*pool->offs));
>> >> > -       pool->frozen = 1;
>> >> > -     }
>> >> > -+    }
>> >> > - }
>> >> > -
>> >> > - void rpmstrPoolUnfreeze(rpmstrPool pool)
>> >> > - {
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -     if (pool) {
>> >> > -       if (pool->hash == NULL) {
>> >> > -           rpmstrPoolRehash(pool);
>> >> > -       }
>> >> > -       pool->frozen = 0;
>> >> > -     }
>> >> > -+    }
>> >> > - }
>> >> > -
>> >> > - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_t slen, unsigned int hash)
>> >> > -@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, const char * key, size_t keylen,
>> >> > -             return 0;
>> >> > -         }
>> >> > -
>> >> > --      s = rpmstrPoolStr(pool, ht->buckets[hash].keyid);
>> >> > -+      s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid);
>> >> > -       /* pool string could be longer than keylen, require exact matche */
>> >> > -       if (strncmp(s, key, keylen) == 0 && s[keylen] == '\0')
>> >> > -           return ht->buckets[hash].keyid;
>> >> > -@@ -373,27 +387,31 @@ static inline rpmsid strn2id(rpmstrPool pool, const char *s, size_t slen,
>> >> > - rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, int create)
>> >> > - {
>> >> > -     rpmsid sid = 0;
>> >> > --
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -     if (s != NULL) {
>> >> > -       unsigned int hash = rstrnhash(s, slen);
>> >> > -       sid = strn2id(pool, s, slen, hash, create);
>> >> > -     }
>> >> > -+    }
>> >> > -     return sid;
>> >> > - }
>> >> > -
>> >> > - rpmsid rpmstrPoolId(rpmstrPool pool, const char *s, int create)
>> >> > - {
>> >> > -     rpmsid sid = 0;
>> >> > --
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -     if (s != NULL) {
>> >> > -       size_t slen;
>> >> > -       unsigned int hash = rstrlenhash(s, &slen);
>> >> > -       sid = strn2id(pool, s, slen, hash, create);
>> >> > -     }
>> >> > -+    }
>> >> > -     return sid;
>> >> > - }
>> >> > -
>> >> > --const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
>> >> > -+static const char * rpmstrPoolStrNoLock(rpmstrPool pool, rpmsid sid)
>> >> > - {
>> >> > -     const char *s = NULL;
>> >> > -     if (pool && sid > 0 && sid <= pool->offs_size)
>> >> > -@@ -401,12 +419,25 @@ const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
>> >> > -     return s;
>> >> > - }
>> >> > -
>> >> > -+const char * rpmstrPoolStr(rpmstrPool pool, rpmsid sid)
>> >> > -+{
>> >> > -+    const char *s = NULL;
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -+    s = rpmstrPoolStrNoLock(pool, sid);
>> >> > -+    }
>> >> > -+    return s;
>> >> > -+}
>> >> > -+
>> >> > - size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid)
>> >> > - {
>> >> > -     size_t slen = 0;
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -     if (pool && sid > 0 && sid <= pool->offs_size) {
>> >> > -       slen = strlen(pool->offs[sid]);
>> >> > -     }
>> >> > -+    }
>> >> > -     return slen;
>> >> > - }
>> >> > -
>> >> > -@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
>> >> > -
>> >> > - rpmsid rpmstrPoolNumStr(rpmstrPool pool)
>> >> > - {
>> >> > --    return (pool != NULL) ? pool->offs_size : 0;
>> >> > -+    rpmsid id = 0;
>> >> > -+    #pragma omp critical(rpmstrpool)
>> >> > -+    {
>> >> > -+    if (pool) {
>> >> > -+      id = pool->offs_size;
>> >> > -+    }
>> >> > -+    }
>> >> > -+    return id;
>> >> > - }
>> >> > ---
>> >> > -2.11.0
>> >> > -
>> >> > diff --git a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch b/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
>> >> > deleted file mode 100644
>> >> > index 652e30b3e4a..00000000000
>> >> > --- a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
>> >> > +++ /dev/null
>> >> > @@ -1,336 +0,0 @@
>> >> > -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001
>> >> > -From: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -Date: Thu, 8 Jun 2017 17:08:09 +0300
>> >> > -Subject: [PATCH] build/pack.c: remove static local variables from buildHost()
>> >> > - and getBuildTime()
>> >> > -
>> >> > -Their use is causing difficult to diagnoze data races when building multiple
>> >> > -packages in parallel, and is a bad idea in general, as it also makes it more
>> >> > -difficult to reason about code.
>> >> > -
>> >> > -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
>> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -
>> >> > -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> >> > -
>> >> > ----
>> >> > - build/build.c             | 54 ++++++++++++++++++++++++++++--
>> >> > - build/pack.c              | 84 +++++++++--------------------------------------
>> >> > - build/rpmbuild_internal.h |  8 +++--
>> >> > - 3 files changed, 74 insertions(+), 72 deletions(-)
>> >> > -
>> >> > -diff --git a/build/build.c b/build/build.c
>> >> > -index 13c3df2..b154f08 100644
>> >> > ---- a/build/build.c
>> >> > -+++ b/build/build.c
>> >> > -@@ -6,6 +6,8 @@
>> >> > - #include "system.h"
>> >> > -
>> >> > - #include <errno.h>
>> >> > -+#include <netdb.h>
>> >> > -+#include <time.h>
>> >> > - #include <sys/wait.h>
>> >> > -
>> >> > - #include <rpm/rpmlog.h>
>> >> > -@@ -16,6 +18,50 @@
>> >> > -
>> >> > - #include "debug.h"
>> >> > -
>> >> > -+static rpm_time_t getBuildTime(void)
>> >> > -+{
>> >> > -+    rpm_time_t buildTime = 0;
>> >> > -+    char *srcdate;
>> >> > -+    time_t epoch;
>> >> > -+    char *endptr;
>> >> > -+
>> >> > -+    srcdate = getenv("SOURCE_DATE_EPOCH");
>> >> > -+    if (srcdate) {
>> >> > -+        errno = 0;
>> >> > -+        epoch = strtol(srcdate, &endptr, 10);
>> >> > -+        if (srcdate == endptr || *endptr || errno != 0)
>> >> > -+            rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
>> >> > -+        else
>> >> > -+            buildTime = (int32_t) epoch;
>> >> > -+    } else
>> >> > -+        buildTime = (int32_t) time(NULL);
>> >> > -+
>> >> > -+    return buildTime;
>> >> > -+}
>> >> > -+
>> >> > -+static char * buildHost(void)
>> >> > -+{
>> >> > -+    char* hostname;
>> >> > -+    struct hostent *hbn;
>> >> > -+    char *bhMacro;
>> >> > -+
>> >> > -+    bhMacro = rpmExpand("%{?_buildhost}", NULL);
>> >> > -+    if (strcmp(bhMacro, "") != 0) {
>> >> > -+        rasprintf(&hostname, "%s", bhMacro);
>> >> > -+    } else {
>> >> > -+        hostname = rcalloc(1024, sizeof(*hostname));
>> >> > -+        (void) gethostname(hostname, 1024);
>> >> > -+        hbn = gethostbyname(hostname);
>> >> > -+        if (hbn)
>> >> > -+            strcpy(hostname, hbn->h_name);
>> >> > -+        else
>> >> > -+            rpmlog(RPMLOG_WARNING,
>> >> > -+                    _("Could not canonicalize hostname: %s\n"), hostname);
>> >> > -+    }
>> >> > -+    free(bhMacro);
>> >> > -+    return(hostname);
>> >> > -+}
>> >> > -+
>> >> > - /**
>> >> > -  */
>> >> > - static rpmRC doRmSource(rpmSpec spec)
>> >> > -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
>> >> > -     rpmRC rc = RPMRC_OK;
>> >> > -     int test = (what & RPMBUILD_NOBUILD);
>> >> > -     char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) : NULL;
>> >> > -+    const char* host = buildHost();
>> >> > -+    rpm_time_t buildTime = getBuildTime();
>> >> > -+
>> >> > -
>> >> > -     if (rpmExpandNumeric("%{?source_date_epoch_from_changelog}") &&
>> >> > -       getenv("SOURCE_DATE_EPOCH") == NULL) {
>> >> > -@@ -269,11 +318,11 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
>> >> > -               goto exit;
>> >> > -
>> >> > -       if (((what & RPMBUILD_PACKAGESOURCE) && !test) &&
>> >> > --          (rc = packageSources(spec, &cookie)))
>> >> > -+          (rc = packageSources(spec, &cookie, buildTime, host)))
>> >> > -               goto exit;
>> >> > -
>> >> > -       if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
>> >> > --          (rc = packageBinaries(spec, cookie, (didBuild == 0))))
>> >> > -+          (rc = packageBinaries(spec, cookie, (didBuild == 0), buildTime, host)))
>> >> > -               goto exit;
>> >> > -
>> >> > -       if ((what & RPMBUILD_CLEAN) &&
>> >> > -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpec spec, int what)
>> >> > -       (void) unlink(spec->specFile);
>> >> > -
>> >> > - exit:
>> >> > -+    free(host);
>> >> > -     free(cookie);
>> >> > -     spec->rootDir = NULL;
>> >> > -     if (rc != RPMRC_OK && rpmlogGetNrecs() > 0) {
>> >> > -diff --git a/build/pack.c b/build/pack.c
>> >> > -index df15876..17a4b09 100644
>> >> > ---- a/build/pack.c
>> >> > -+++ b/build/pack.c
>> >> > -@@ -6,8 +6,6 @@
>> >> > - #include "system.h"
>> >> > -
>> >> > - #include <errno.h>
>> >> > --#include <netdb.h>
>> >> > --#include <time.h>
>> >> > - #include <sys/wait.h>
>> >> > -
>> >> > - #include <rpm/rpmlib.h>                       /* RPMSIGTAG*, rpmReadPackageFile */
>> >> > -@@ -152,57 +150,6 @@ exit:
>> >> > -     return rc;
>> >> > - }
>> >> > -
>> >> > --static rpm_time_t * getBuildTime(void)
>> >> > --{
>> >> > --    static rpm_time_t buildTime[1];
>> >> > --    char *srcdate;
>> >> > --    time_t epoch;
>> >> > --    char *endptr;
>> >> > --
>> >> > --    if (buildTime[0] == 0) {
>> >> > --        srcdate = getenv("SOURCE_DATE_EPOCH");
>> >> > --        if (srcdate) {
>> >> > --            errno = 0;
>> >> > --            epoch = strtol(srcdate, &endptr, 10);
>> >> > --            if (srcdate == endptr || *endptr || errno != 0)
>> >> > --                rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n"));
>> >> > --            else
>> >> > --                buildTime[0] = (int32_t) epoch;
>> >> > --        } else
>> >> > --            buildTime[0] = (int32_t) time(NULL);
>> >> > --    }
>> >> > --
>> >> > --    return buildTime;
>> >> > --}
>> >> > --
>> >> > --static const char * buildHost(void)
>> >> > --{
>> >> > --    static char hostname[1024];
>> >> > --    static int oneshot = 0;
>> >> > --    struct hostent *hbn;
>> >> > --    char *bhMacro;
>> >> > --
>> >> > --    if (! oneshot) {
>> >> > --        bhMacro = rpmExpand("%{?_buildhost}", NULL);
>> >> > --        if (strcmp(bhMacro, "") != 0 && strlen(bhMacro) < 1024) {
>> >> > --            strcpy(hostname, bhMacro);
>> >> > --        } else {
>> >> > --            if (strcmp(bhMacro, "") != 0)
>> >> > --                rpmlog(RPMLOG_WARNING, _("The _buildhost macro is too long\n"));
>> >> > --            (void) gethostname(hostname, sizeof(hostname));
>> >> > --            hbn = gethostbyname(hostname);
>> >> > --            if (hbn)
>> >> > --                strcpy(hostname, hbn->h_name);
>> >> > --            else
>> >> > --                rpmlog(RPMLOG_WARNING,
>> >> > --                        _("Could not canonicalize hostname: %s\n"), hostname);
>> >> > --        }
>> >> > --        free(bhMacro);
>> >> > --        oneshot = 1;
>> >> > --    }
>> >> > --    return(hostname);
>> >> > --}
>> >> > --
>> >> > - static rpmRC processScriptFiles(rpmSpec spec, Package pkg)
>> >> > - {
>> >> > -     struct TriggerFileEntry *p;
>> >> > -@@ -476,7 +423,8 @@ exit:
>> >> > -  * order to how the RPM format is laid on disk.
>> >> > -  */
>> >> > - static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
>> >> > --                    const char *fileName, char **cookie)
>> >> > -+                    const char *fileName, char **cookie,
>> >> > -+                    rpm_time_t buildTime, const char* buildHost)
>> >> > - {
>> >> > -     FD_t fd = NULL;
>> >> > -     char * rpmio_flags = NULL;
>> >> > -@@ -500,7 +448,7 @@ static rpmRC writeRPM(Package pkg, unsigned char ** pkgidp,
>> >> > -
>> >> > -     /* Create and add the cookie */
>> >> > -     if (cookie) {
>> >> > --      rasprintf(cookie, "%s %d", buildHost(), (int) (*getBuildTime()));
>> >> > -+      rasprintf(cookie, "%s %d", buildHost, buildTime);
>> >> > -       headerPutString(pkg->header, RPMTAG_COOKIE, *cookie);
>> >> > -     }
>> >> > -
>> >> > -@@ -641,7 +589,7 @@ static rpmRC checkPackages(char *pkgcheck)
>> >> > -     return RPMRC_OK;
>> >> > - }
>> >> > -
>> >> > --static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename)
>> >> > -+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename, rpm_time_t buildTime, const char* buildHost)
>> >> > - {
>> >> > -       const char *errorString;
>> >> > -       rpmRC rc = RPMRC_OK;
>> >> > -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
>> >> > -       headerCopyTags(spec->packages->header, pkg->header, copyTags);
>> >> > -
>> >> > -       headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);
>> >> > --      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost());
>> >> > --      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
>> >> > -+      headerPutString(pkg->header, RPMTAG_BUILDHOST, buildHost);
>> >> > -+      headerPutUint32(pkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
>> >> > -
>> >> > -       if (spec->sourcePkgId != NULL) {
>> >> > -           headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
>> >> > -@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch
>> >> > -           free(binRpm);
>> >> > -       }
>> >> > -
>> >> > --      rc = writeRPM(pkg, NULL, *filename, NULL);
>> >> > -+      rc = writeRPM(pkg, NULL, *filename, NULL, buildTime, buildHost);
>> >> > -       if (rc == RPMRC_OK) {
>> >> > -           /* Do check each written package if enabled */
>> >> > -           char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ", *filename, NULL);
>> >> > -@@ -719,7 +667,7 @@ struct binaryPackageTaskData
>> >> > -     struct binaryPackageTaskData *next;
>> >> > - };
>> >> > -
>> >> > --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating)
>> >> > -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
>> >> > - {
>> >> > -     struct binaryPackageTaskData *tasks = NULL;
>> >> > -     struct binaryPackageTaskData *task = NULL;
>> >> > -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
>> >> > -         if (pkg == spec->packages) {
>> >> > -             // the first package needs to be processed ahead of others, as they copy
>> >> > -             // changelog data from it, and so otherwise data races would happen
>> >> > --            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename));
>> >> > -+            task->result = packageBinary(spec, pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
>> >> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> >> > -             tasks = task;
>> >> > -         }
>> >> > -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpec spec, const c
>> >> > -         if (task != tasks)
>> >> > -         #pragma omp task
>> >> > -         {
>> >> > --            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename));
>> >> > -+            task->result = packageBinary(spec, task->pkg, cookie, cheating, &(task->filename), buildTime, buildHost);
>> >> > -             rpmlog(RPMLOG_NOTICE, _("Finished binary package job, result %d, filename %s\n"), task->result, task->filename);
>> >> > -         }
>> >> > -     }
>> >> > -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(struct binaryPackageTaskData* tasks)
>> >> > -     }
>> >> > - }
>> >> > -
>> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost)
>> >> > - {
>> >> > -     char *pkglist = NULL;
>> >> > -
>> >> > --    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating);
>> >> > -+    struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);
>> >> > -
>> >> > -     for (struct binaryPackageTaskData *task = tasks; task != NULL; task = task->next) {
>> >> > -         if (task->result == RPMRC_OK) {
>> >> > -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)
>> >> > -     return RPMRC_OK;
>> >> > - }
>> >> > -
>> >> > --rpmRC packageSources(rpmSpec spec, char **cookie)
>> >> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost)
>> >> > - {
>> >> > -     Package sourcePkg = spec->sourcePackage;
>> >> > -     rpmRC rc;
>> >> > -@@ -805,8 +753,8 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
>> >> > -
>> >> > -     /* Add some cruft */
>> >> > -     headerPutString(sourcePkg->header, RPMTAG_RPMVERSION, VERSION);
>> >> > --    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost());
>> >> > --    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, getBuildTime(), 1);
>> >> > -+    headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost);
>> >> > -+    headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime, 1);
>> >> > -     headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one, 1);
>> >> > -
>> >> > -     /* XXX this should be %_srpmdir */
>> >> > -@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie)
>> >> > -       char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn, NULL);
>> >> > -
>> >> > -       spec->sourcePkgId = NULL;
>> >> > --      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie);
>> >> > -+      rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie, buildTime, buildHost);
>> >> > -
>> >> > -       /* Do check SRPM package if enabled */
>> >> > -       if (rc == RPMRC_OK && pkgcheck[0] != ' ') {
>> >> > -diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
>> >> > -index 439b7d3..07e8338 100644
>> >> > ---- a/build/rpmbuild_internal.h
>> >> > -+++ b/build/rpmbuild_internal.h
>> >> > -@@ -427,19 +427,23 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags);
>> >> > -  * @param spec                spec file control structure
>> >> > -  * @param cookie      build identifier "cookie" or NULL
>> >> > -  * @param cheating    was build shortcircuited?
>> >> > -+ * @param buildTime   the build timestamp that goes into packages
>> >> > -+ * @param buildHost   the hostname where the build is happening
>> >> > -  * @return            RPMRC_OK on success
>> >> > -  */
>> >> > - RPM_GNUC_INTERNAL
>> >> > --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating);
>> >> > -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating, rpm_time_t buildTime, char* buildHost);
>> >> > -
>> >> > - /** \ingroup rpmbuild
>> >> > -  * Generate source package.
>> >> > -  * @param spec                spec file control structure
>> >> > -  * @retval cookie     build identifier "cookie" or NULL
>> >> > -+ * @param buildTime   the build timestamp that goes into packages
>> >> > -+ * @param buildHost   the hostname where the build is happening
>> >> > -  * @return            RPMRC_OK on success
>> >> > -  */
>> >> > - RPM_GNUC_INTERNAL
>> >> > --rpmRC packageSources(rpmSpec spec, char **cookie);
>> >> > -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_t buildTime, char* buildHost);
>> >> > -
>> >> > - RPM_GNUC_INTERNAL
>> >> > - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,
>> >> > diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
>> >> > similarity index 91%
>> >> > rename from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
>> >> > rename to meta/recipes-devtools/rpm/rpm_4.15.1.bb
>> >> > index c37330eb4c6..4fa2d764fb9 100644
>> >> > --- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
>> >> > +++ b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
>> >> > @@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
>> >> >  LICENSE = "GPL-2.0"
>> >> >  LIC_FILES_CHKSUM = "file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
>> >> >
>> >> > -SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
>> >> > +SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
>> >> >             file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
>> >> >             file://0001-Do-not-read-config-files-from-HOME.patch \
>> >> >             file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
>> >> > @@ -34,18 +34,14 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
>> >> >             file://0001-Fix-build-with-musl-C-library.patch \
>> >> >             file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
>> >> >             file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
>> >> > -           file://0001-Split-binary-package-building-into-a-separate-functi.patch \
>> >> > -           file://0002-Run-binary-package-creation-via-thread-pools.patch \
>> >> > -           file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
>> >> > -           file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
>> >> >             file://0001-perl-disable-auto-reqs.patch \
>> >> >             file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
>> >> >             file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
>> >> > -           file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
>> >> > +           file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
>> >> >             "
>> >> >
>> >> >  PE = "1"
>> >> > -SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa"
>> >> > +SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"
>> >> >
>> >> >  S = "${WORKDIR}/git"
>> >> >
>> >> > @@ -125,8 +121,7 @@ do_install_append () {
>> >> >             ${D}/${libdir}/rpm/macros
>> >> >
>> >> >         sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
>> >> > -           ${D}${libdir}/rpm/pythondistdeps.py \
>> >> > -           ${D}${libdir}/rpm/python-macro-helper
>> >> > +           ${D}${libdir}/rpm/pythondistdeps.py
>> >> >  }
>> >> >
>> >> >  FILES_${PN} += "${libdir}/rpm-plugins/*.so \
>> >> > --
>> >> > 2.17.1
>> >> >
>> >> > --
>> >> > _______________________________________________
>> >> > Openembedded-core mailing list
>> >> > Openembedded-core@lists.openembedded.org
>> >> > http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-11-25 18:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 13:25 [PATCH 1/5] libsolv: upgrade 0.7.6 -> 0.7.8 Alexander Kanavin
2019-11-19 13:25 ` [PATCH 2/5] rpm: upgrade to 4.15.1 Alexander Kanavin
2019-11-23 17:47   ` Khem Raj
2019-11-25 15:19     ` Alexander Kanavin
2019-11-25 15:50       ` Khem Raj
2019-11-25 16:33         ` Alexander Kanavin
2019-11-25 18:22           ` Khem Raj
2019-11-19 13:25 ` [PATCH 3/5] libdnf: upgrade 0.28.1 -> 0.38.1 Alexander Kanavin
2019-11-19 13:25 ` [PATCH 4/5] dnf: upgrade 4.2.2 -> 4.2.16 Alexander Kanavin
2019-11-19 13:25 ` [PATCH 5/5] psmisc: remove a patch that is no longer necessary Alexander Kanavin
2019-11-19 13:32 ` ✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more Patchwork
2019-11-19 13:33   ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.