diff --git a/0001-Revert-Run-binary-package-generation-in-parallel-thr.patch b/0001-Revert-Run-binary-package-generation-in-parallel-thr.patch deleted file mode 100644 index 2753f4b..0000000 --- a/0001-Revert-Run-binary-package-generation-in-parallel-thr.patch +++ /dev/null @@ -1,44 +0,0 @@ -From cb9e874ba52d866a86164ae8675ab6f07a35845e Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Tue, 11 Jun 2019 00:07:49 +0200 -Subject: [PATCH] Revert "Run binary package generation in parallel threads" - -https://github.com/rpm-software-management/rpm/issues/742 - -This reverts commit 18c92e6fe76df334fed8d5f04b5f40b776daba8c. ---- - build/pack.c | 13 +------------ - 1 file changed, 1 insertion(+), 12 deletions(-) - -diff --git a/build/pack.c b/build/pack.c -index 447e3ec94..e8d4c220c 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -744,23 +744,12 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - rpmRC rc = RPMRC_OK; - Package pkg; - -- /* Run binary creation in parallel */ -- #pragma omp parallel -- #pragma omp single - for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -- #pragma omp task -- { - pkg->rc = packageBinary(spec, pkg, cookie, cheating, &pkg->filename); -- rpmlog(RPMLOG_DEBUG, -- _("Finished binary package job, result %d, filename %s\n"), -- pkg->rc, pkg->filename); - if (pkg->rc) { -- #pragma omp critical - rc = pkg->rc; -- } -- } /* omp task */ -- if (rc) - break; -+ } - } - - /* Now check the package set if enabled */ --- -2.22.0.rc3 - diff --git a/0001-build-Limit-copying-changelog-one-at-a-time.patch b/0001-build-Limit-copying-changelog-one-at-a-time.patch new file mode 100644 index 0000000..5d21694 --- /dev/null +++ b/0001-build-Limit-copying-changelog-one-at-a-time.patch @@ -0,0 +1,28 @@ +From 8aab33f69c9d78b6d4d4e79ba661ae01cd970f2b Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Tue, 11 Jun 2019 14:22:07 +0200 +Subject: [PATCH] build: Limit copying changelog one at a time + +Getting header content in multiple threads is causing problems since it +can (and apparently does) change internal state. + +Signed-off-by: Igor Gnatenko +--- + build/pack.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/build/pack.c b/build/pack.c +index ab72750be..e6cec1816 100644 +--- a/build/pack.c ++++ b/build/pack.c +@@ -713,6 +713,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + } + + /* Copy changelog from src rpm */ ++ #pragma omp critical + headerCopyTags(spec->sourcePackage->header, pkg->header, copyTags); + + headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION); +-- +2.22.0 + diff --git a/rpm.spec b/rpm.spec index ac2c4bc..c3416da 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ %global rpmver 4.14.90 %global snapver git14653 -%global rel 12 +%global rel 13 %global srcver %{version}%{?snapver:-%{snapver}} %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x} @@ -49,10 +49,10 @@ Patch3: rpm-4.9.90-no-man-dirs.patch Patch5: rpm-4.12.0-rpm2cpio-hack.patch # https://github.com/rpm-software-management/rpm/pull/473 Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch -# https://github.com/rpm-software-management/rpm/issues/742 -#Patch7: 0001-Revert-Run-binary-package-generation-in-parallel-thr.patch +# https://github.com/rpm-software-management/rpm/commit/526641ceeca12fbaa878401f8e65d17f240a9ae5 Patch7: 0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch -Patch8: test.diff +# https://github.com/rpm-software-management/rpm/pull/745 +Patch8: 0001-build-Limit-copying-changelog-one-at-a-time.patch # Patches already upstream: @@ -541,6 +541,9 @@ make check || (cat tests/rpmtests.log; exit 0) %doc doc/librpm/html/* %changelog +* Tue Jun 11 14:59:16 CEST 2019 Igor Gnatenko - 4.14.90-0.git14653.13 +- Fix build of binary packages in parallel + * Tue Jun 11 00:08:50 CEST 2019 Igor Gnatenko - 4.14.90-0.git14653.10 - Revert generation of binary packages in parallel diff --git a/test.diff b/test.diff deleted file mode 100644 index 137546e..0000000 --- a/test.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/build/pack.c b/build/pack.c -index ab72750be..e6cec1816 100644 ---- a/build/pack.c -+++ b/build/pack.c -@@ -713,6 +713,7 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch - } - - /* Copy changelog from src rpm */ -+ #pragma omp critical - headerCopyTags(spec->sourcePackage->header, pkg->header, copyTags); - - headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION);