libsolv: upgrade 0.7.6 -> 0.7.8
PATCH 1/5 libsolv: upgrade 0.7.6 -> 0.7.8
From: Anuj Mittal <[email protected]>
(From OE-Core rev: a00c6f1a5c2c56882684c2cf053de658a02a721d)
---
.../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%)meta/recipes-extended/libsolv/libsolv_0.7.8.bb renamed from meta/recipes-extended/libsolv/libsolv_0.7.6.bb +1 -1
@@ -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+)+)"
Signature · 1 line
2.17.1
PATCH 2/5 rpm: upgrade to 4.15.1
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
---
...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%)meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +13 -15
@@ -1,4 +1,4 @@ -From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001 +From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
@@ -9,25 +9,23 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index 1261cdbba..bb2d6f4f6 100644 +index e6cec1816..810cd7351 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); - } +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); + } + +- if (cheating) { +- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); +- } +- + if ((rc = getPkgFilename(pkg->header, filename))) + return rc; -- if (cheating) { -- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); -- } -- - { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); - char *binRpm, *binDir; - binRpm = headerFormat(pkg->header, binFormat, &errorString); --- -2.11.0 -
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +7 -7
@@ -1,4 +1,4 @@ -From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001 +From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]> 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac -index 09af7c4..9bd6903 100644 +index d3aeab86e..1a1f3f91f 100644 --- a/configure.ac +++ b/configure.ac -@@ -1055,7 +1055,7 @@ else +@@ -1086,7 +1086,7 @@ else usrprefix=$prefix fi
@@ -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
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0 -84
84 lines not on this page · raw message
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0 -58
58 lines not on this page · raw message
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +65 -0
65 lines not on this page · raw message
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0 -127
127 lines not on this page · raw message
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0 -207
207 lines not on this page · raw message
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0 -336
336 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +4 -9
@@ -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 \
Signature · 1 line
2.17.1
Re: [PATCH 2/5] rpm: upgrade to 4.15.1
breaks with needing openmp
http://errors.yoctoproject.org/Errors/Details/282827/
perhaps needs explicit dependency on libgomp now ?
Quoted 1,099 lines · Alexander Kanavin
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/756Signed-off-by Alexander Kanavin <[email protected]>--- ...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%)meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +13
-15@@ -1,4 +1,4 @@ -From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001 +From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in@@ -9,25 +9,23 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index 1261cdbba..bb2d6f4f6 100644 +index e6cec1816..810cd7351 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); - } +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); + } + +- if (cheating) { +- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); +- } +- + if ((rc = getPkgFilename(pkg->header, filename))) + return rc; -- if (cheating) { -- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); -- } -- - { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); - char *binRpm, *binDir; - binRpm = headerFormat(pkg->header, binFormat, &errorString); --- -2.11.0 -meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +7
-7@@ -1,4 +1,4 @@ -From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001 +From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]> 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac -index 09af7c4..9bd6903 100644 +index d3aeab86e..1a1f3f91f 100644 --- a/configure.ac +++ b/configure.ac -@@ -1055,7 +1055,7 @@ else +@@ -1086,7 +1086,7 @@ else usrprefix=$prefix fi@@ -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:0meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-84@@ -1,84 +0,0 @@ -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-58@@ -1,58 +0,0 @@ -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> ---- - 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; - fimeta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +65
-0@@ -0,0 +1,65 @@ +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 18 Nov 2019 16:22:56 +0100 +Subject: [PATCH] rpmfc.c: do not run file classification in parallel + +This is causing freezes with libmagic when the file in question is compressed: +https://github.com/rpm-software-management/rpm/issues/756 + +Upstream-Status: Inapppropriate [upstream wants a proper fix] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + build/rpmfc.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index 3db7a9352..17afdd57a 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, const char *ftype, const char *ful + /* Add attributes on libmagic type & path pattern matches */ + if (matches(&(*attr)->incl, ftype, path, is_executable)) { + argvAddTokens(&fc->fattrs[ix], (*attr)->name); +- #pragma omp critical(fahash) + fattrHashAddEntry(fc->fahash, attr-fc->atypes, ix); + } + } +@@ -1105,7 +1104,6 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + /* Build (sorted) file class dictionary. */ + fc->cdict = rpmstrPoolCreate(); + +- #pragma omp parallel + { + /* libmagic is not thread-safe, each thread needs to a private handle */ + magic_t ms = magic_open(msflags); +@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + if (ms == NULL) { + rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"), + msflags, strerror(errno)); +- #pragma omp cancel parallel + } + + if (magic_load(ms, NULL) == -1) { + rpmlog(RPMLOG_ERR, _("magic_load failed: %s\n"), magic_error(ms)); +- #pragma omp cancel parallel + } + +- #pragma omp for ordered reduction(+:nerrors) + for (int ix = 0; ix < fc->nfiles; ix++) { + rpmsid ftypeId; + const char * ftype; +@@ -1185,14 +1180,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + fc->fcolor[ix] = fcolor; + + /* Add to file class dictionary and index array */ +- #pragma omp ordered + if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) { + ftypeId = rpmstrPoolId(fc->cdict, ftype, 1); +- #pragma omp atomic + fc->fknown++; + } else { + ftypeId = rpmstrPoolId(fc->cdict, "", 1); +- #pragma omp atomic + fc->fwhite++; + } + /* Pool id's start from 1, for headers we want it from 0 */meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-127@@ -1,127 +0,0 @@ -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-207@@ -1,207 +0,0 @@ -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-336@@ -1,336 +0,0 @@ -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - 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,meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +4
-10@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 2/5] rpm: upgrade to 4.15.1
omp.h is coming from gcc-runtime. Which compiler are you using? Probably an override (specific for that compiler) is needed.
Alex
Quoted 1,266 lines · Khem Raj
breaks with needing openmp
http://errors.yoctoproject.org/Errors/Details/282827/
perhaps needs explicit dependency on libgomp now ?
Quoted 13 lines · Alexander Kanavin
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/756Signed-off-by Alexander Kanavin <[email protected]>Quoted 12 lines
--- ...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.patchQuoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patchQuoted 1 line
create mode 100644
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patchQuoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patchQuoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patchQuoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchQuoted 1 line
rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}(91%)
Quoted 2 lines
diff --git
a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchb/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchQuoted 2 lines
index
80e2f0fad70..4029233fb70100644
---
a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchQuoted 1 line
+++
b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchmeta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch line 4
Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +1
-1@@ -1,4 +1,4 @@ -From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001 +From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when buildingrpms in
Quoted 5 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +1
-0@@ -9,25 +9,23 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> +meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch hand produces rpms that way by design. · line 20
Quoted 10 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +1
-2--- 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)
Review hand produces rpms that way by design. · line 21
Quoted 1 line
(quoted diff) +0
-1- headerPutBin(pkg->header, RPMTAG_SOURCEPKGID,spec->sourcePkgId,16);
Review hand produces rpms that way by design. · line 21
Quoted 2 lines
(quoted diff) +1
-1- } +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Packagepkg, const char *cookie, int ch
Review hand produces rpms that way by design. · line 22
Quoted 1 line
(quoted diff) +1
-0+ headerPutBin(pkg->header, RPMTAG_SOURCEPKGID,spec->sourcePkgId,16);
Quoted 19 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +8
-10+ } + +- 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 -Quoted 1 line
diff --git
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchb/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchQuoted 2 lines
index
82e7328757f..52440d68180100644
---
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchQuoted 1 line
+++
b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchmeta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch Signed-off-by: Alexander Kanavin <
Quoted 7 lines
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +1
-1@@ -1,4 +1,4 @@ -From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001 +From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <Quoted 40 lines
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +6
-63 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:0Quoted 1 line
diff --git
a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patchb/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patchQuoted 3 lines
deleted file mode 100644
index 6e44f0b7fc9..00000000000
---
a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patchmeta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch line 4
Quoted 6 lines
+++
/dev/nullmeta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4@@ -1,84 +0,0 @@ -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Thu, 25 May 2017 18:15:27 +0300 -Subject: [PATCH 1/4] Split binary package building into a separatefunction
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4- -So that it can be run as a thread pool task. - -Upstream-Status: Submitted [Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-6-Signed-off-by: Alexander Kanavin <[email protected]> - ---- - build/pack.c | 33 +++++++++++++++++++++------------ - 1 file changed, 21 insertions(+), 12 deletions(-) -meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-10-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)
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-8- { -- rpmRC rc; -- const char *errorString; -- Package pkg; -- char *pkglist = NULL; -- -- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { -- char *fn;meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-10-+ 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)
Review line 43
Quoted 1 line
(quoted diff) +0
-1- headerGetString(pkg->header, RPMTAG_NAME),errorString);
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-8- 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)
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-9- 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);
Quoted 24 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-24- 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 -Quoted 1 line
diff --git
a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patchb/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patchQuoted 3 lines
deleted file mode 100644
index 24aa4c7ffff..00000000000
---
a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patchmeta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch line 4
Quoted 6 lines
+++
/dev/nullmeta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-4@@ -1,58 +0,0 @@ -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Tue, 27 Aug 2019 17:42:34 +0200 -Subject: [PATCH] mono-find-provides/requires: do not use monodis fromthe host
Quoted 9 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-9- -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 <[email protected]>meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-10---- - 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)\$"))
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-8- 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" - exportLD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 12 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-12--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)\$"))
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-8- 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" - exportLD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-7--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; - fidiff --git
a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patchb/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patchQuoted 4 lines
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.patchmeta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch line 6
Quoted 7 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +6
-0@@ -0,0 +1,65 @@ +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 18 Nov 2019 16:22:56 +0100 +Subject: [PATCH] rpmfc.c: do not run file classification in parallel + +This is causing freezes with libmagic when the file in question iscompressed:
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 13 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +13
-0+https://github.com/rpm-software-management/rpm/issues/756 + +Upstream-Status: Inapppropriate [upstream wants a proper fix] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + build/rpmfc.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index 3db7a9352..17afdd57a 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, constchar *ftype, const char *ful
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +8
-0+ /* 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)meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +6
-0+ /* Build (sorted) file class dictionary. */ + fc->cdict = rpmstrPoolCreate(); + +- #pragma omp parallel + { + /* libmagic is not thread-safe, each thread needs to a privatehandle */
Review line 35
Quoted 2 lines
(quoted diff) +2
-0+ magic_t ms = magic_open(msflags); +@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv,
rpm_mode_t* fmode)meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +8
-0+ 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));meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +8
-0+- #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)Quoted 14 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +14
-0+ 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 */Quoted 1 line
diff --git
a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patchb/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patchQuoted 3 lines
deleted file mode 100644
index d10041c2e14..00000000000
---
a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patchmeta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch line 6
Quoted 8 lines
+++
/dev/nullmeta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-6@@ -1,127 +0,0 @@ -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Thu, 25 May 2017 19:30:20 +0300 -Subject: [PATCH 1/3] Run binary package creation via thread pools. - -Upstream-Status: Submitted [meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4-Signed-off-by: Alexander Kanavin <[email protected]> - ---- - build/pack.c | 81+++++++++++++++++++++++++++++++++++++++++++++++++-----------
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-8- 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, Packagepkg, const char *cookie, int ch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-4- return rc; - } - --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating)meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-10-+struct binaryPackageTaskData - { -- rpmRC rc; - Package pkg; -+ char *filename; -+ rpmRC result; -+ struct binaryPackageTaskData *next; -+}; -+ -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpecspec, const char *cookie, int cheating)
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-10-+{ -+ 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 ofothers, as they copy
Review line 43
Quoted 1 line
(quoted diff) +0
-1-+ // changelog data from it, and so otherwise data raceswould happen
Review line 44
Quoted 1 line
(quoted diff) +0
-1-+ task->result = packageBinary(spec, pkg, cookie, cheating,&(task->filename));
Review line 45
Quoted 1 line
(quoted diff) +0
-1-+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 11 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-11-+ 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 versionswill produce code that segfaults
Review line 57
Quoted 1 line
(quoted diff) +0
-1-+ for (struct binaryPackageTaskData *task = tasks; task != NULL;task =
task->next) {meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-4-+ if (task != tasks) -+ #pragma omp task -+ { -+ task->result = packageBinary(spec, task->pkg, cookie,cheating, &(task->filename));
Review line 62
Quoted 1 line
(quoted diff) +0
-1-+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);Quoted 23 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-23-+ } -+ } -+ -+ 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);meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-10-- 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);
Review line 97
Quoted 2 lines
(quoted diff) +0
-2-+ -+ for (struct binaryPackageTaskData *task = tasks; task != NULL;task =
task->next) {Quoted 30 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-30-+ 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 -Quoted 1 line
diff --git
a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patchb/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patchQuoted 3 lines
deleted file mode 100644
index c348ae5330e..00000000000
---
a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patchmeta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch line 10
Quoted 12 lines
+++
/dev/nullmeta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-10@@ -1,207 +0,0 @@ -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 [meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4-Signed-off-by: Alexander Kanavin <[email protected]> - ---- - rpmio/rpmstrpool.c | 56+++++++++++++++++++++++++++++++++++++++++++++---------
Quoted 6 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-6- 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.cmeta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-10-@@ -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, intnumBuckets)
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-4- - for (int i=0; i<ht->numBuckets; i++) { - if (!ht->buckets[i].keyid) continue; -- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool,ht->buckets[i].keyid));
Review line 35
Quoted 1 line
(quoted diff) +0
-1-+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,ht->buckets[i].keyid));
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-4- 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
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-4- ht->buckets[hash].keyid = keyid; - ht->keyCount++; - break; -- } else if (!strcmp(rpmstrPoolStr(pool,ht->buckets[hash].keyid), key)) {
Review line 44
Quoted 1 line
(quoted diff) +0
-1-+ } else if (!strcmp(rpmstrPoolStrNoLock(pool,ht->buckets[hash].keyid), key)) {
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-8- 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));
Review line 53
Quoted 1 line
(quoted diff) +0
-1-+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,ht->buckets[i].keyid));
Review line 55
Quoted 2 lines
(quoted diff) +0
-2- for (unsigned int j=0;;j++) { - unsigned int hash = hashbucket(keyHash, i) %
ht->numBuckets;Quoted 35 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-35- 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;meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-10- } - - 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, intkeephash)
Quoted 10 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-10- pool->offs_alloced * sizeof(*pool->offs)); - pool->frozen = 1; - } -+ } - } - - void rpmstrPoolUnfreeze(rpmstrPool pool) - { -+ #pragma omp critical(rpmstrpool) -+ {meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-10- if (pool) { - if (pool->hash == NULL) { - rpmstrPoolRehash(pool); - } - pool->frozen = 0; - } -+ } - } - - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_tslen, unsigned int hash)
Review line 121
Quoted 1 line
(quoted diff) +0
-1-@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool, constchar * key,
size_tkeylen,meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 6 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-6- 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*/
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-3- 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_tslen,Review line 131
Quoted 1 line
(quoted diff) +0
-1- rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen, intcreate)
Quoted 24 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-24- { - 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); - }meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-10-+ } - 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)
Quoted 42 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-42- 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 -Quoted 1 line
diff --git
a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchb/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchQuoted 3 lines
deleted file mode 100644
index 652e30b3e4a..00000000000
---
a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchmeta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch line 4
Quoted 6 lines
+++
/dev/nullmeta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4@@ -1,336 +0,0 @@ -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Thu, 8 Jun 2017 17:08:09 +0300 -Subject: [PATCH] build/pack.c: remove static local variables from
buildHost()meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- and getBuildTime() - -Their use is causing difficult to diagnoze data races when buildingmultiple
Review line 8
Quoted 1 line
(quoted diff) +0
-1-packages in parallel, and is a bad idea in general, as it also makes itmore
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3-difficult to reason about code. - -Upstream-Status: Submitted [meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-7-Signed-off-by: Alexander Kanavin <[email protected]> - -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - build/build.c | 54 ++++++++++++++++++++++++++++-- - build/pack.c | 84+++++++++--------------------------------------
Quoted 23 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-23- 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;meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10-+ 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 parseSOURCE_DATE_EPOCH\n"));
Quoted 16 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-16-+ 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) {meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10-+ 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);
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-9-+ } -+ free(bhMacro); -+ return(hostname); -+} -+ - /** - */ - static rpmRC doRmSource(rpmSpec spec) -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpecspec, int what)
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- rpmRC rc = RPMRC_OK; - int test = (what & RPMBUILD_NOBUILD); - char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) :NULL;
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-7-+ 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, rpmSpecspec, int what)
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10- 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)))
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- goto exit; - - if ((what & RPMBUILD_CLEAN) && -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpecspec, int what)
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10- (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.cmeta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10-+++ 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 */
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8-@@ -152,57 +150,6 @@ exit: - return rc; - } - --static rpm_time_t * getBuildTime(void) --{ -- static rpm_time_t buildTime[1]; -- char *srcdate;meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10-- 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 parseSOURCE_DATE_EPOCH\n"));
Quoted 13 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-13-- 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;meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10-- 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 toolong\n"));
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-7-- (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);
Quoted 11 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-11-- } -- free(bhMacro); -- oneshot = 1; -- } -- return(hostname); --} -- - static rpmRC processScriptFiles(rpmSpec spec, Package pkg) - { - struct TriggerFileEntry *p; -@@ -476,7 +423,8 @@ exit:meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10- * 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,
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 13 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-13- - /* 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)
Review line 213
Quoted 1 line
(quoted diff) +0
-1-+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char*cookie, int cheating, char** filename,
rpm_time_tbuildTime, const char* buildHost)meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- { - const char *errorString; - rpmRC rc = RPMRC_OK; -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Packagepkg, const char *cookie, int ch
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5- 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);
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5-+ 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);
Review line 228
Quoted 1 line
(quoted diff) +0
-1-@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Packagepkg, const char *cookie, int ch
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8- 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);
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5-@@ -719,7 +667,7 @@ struct binaryPackageTaskData - struct binaryPackageTaskData *next; - }; - --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpecspec, const char *cookie, int cheating)
Review line 242
Quoted 1 line
(quoted diff) +0
-1-+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpecspec, const char *cookie, int cheating,
rpm_time_tbuildTime, char* buildHost)meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- { - struct binaryPackageTaskData *tasks = NULL; - struct binaryPackageTaskData *task = NULL; -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData*runBinaryPackageTasks(rpmSpec spec, const c
Review line 248
Quoted 2 lines
(quoted diff) +0
-2- if (pkg == spec->packages) { - // the first package needs to be processed ahead ofothers, as they copy
Review line 249
Quoted 1 line
(quoted diff) +0
-1- // changelog data from it, and so otherwise data raceswould happen
Review line 250
Quoted 1 line
(quoted diff) +0
-1-- task->result = packageBinary(spec, pkg, cookie, cheating,&(task->filename));
Review line 251
Quoted 1 line
(quoted diff) +0
-1-+ task->result = packageBinary(spec, pkg, cookie, cheating,&(task->filename), buildTime, buildHost);
Review line 252
Quoted 1 line
(quoted diff) +0
-1- rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- tasks = task; - } -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData*runBinaryPackageTasks(rpmSpec spec, const c
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- if (task != tasks) - #pragma omp task - { -- task->result = packageBinary(spec, task->pkg, cookie,cheating, &(task->filename));
Review line 260
Quoted 1 line
(quoted diff) +0
-1-+ task->result = packageBinary(spec, task->pkg, cookie,cheating, &(task->filename), buildTime, buildHost);
Review line 261
Quoted 1 line
(quoted diff) +0
-1- rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-3- } - } -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(structbinaryPackageTaskData* tasks)
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5- } - } - --rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating,
rpm_time_tbuildTime, char* buildHost)meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-4- { - char *pkglist = NULL; - -- struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec,cookie, cheating);
Review line 274
Quoted 1 line
(quoted diff) +0
-1-+ struct binaryPackageTaskData *tasks = runBinaryPackageTasks(spec,cookie, cheating, buildTime, buildHost);
Review line 276
Quoted 2 lines
(quoted diff) +0
-2- - for (struct binaryPackageTaskData *task = tasks; task != NULL;task =
task->next) {Review line 278
Quoted 2 lines
(quoted diff) +0
-2- if (task->result == RPMRC_OK) { -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char*cookie, int cheating)
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5- return RPMRC_OK; - } - --rpmRC packageSources(rpmSpec spec, char **cookie) -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_tbuildTime, char* buildHost)
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-9- { - 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);Review line 294
Quoted 2 lines
(quoted diff) +0
-2-+ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost); -+ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME, &buildTime,1);
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5- 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);
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- - spec->sourcePkgId = NULL; -- rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie); -+ rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie,buildTime, buildHost);
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8- - /* 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);
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10- * @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_tbuildTime, char* buildHost);meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 12 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-12- - /** \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_tbuildTime, char* buildHost);
Review
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- - RPM_GNUC_INTERNAL - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,(quoted diff) +0
-0b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
meta/recipes-devtools/rpm/rpm_4.15.1.bb HOMEPAGE = "http://www.rpm.org" · line 27
Quoted 11 lines
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 indexc37330eb4c6..4fa2d764fb9100644meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-1@@ -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 \
meta/recipes-devtools/rpm/rpm_4.15.1.bb HOMEPAGE = "http://www.rpm.org" · line 27
Quoted 1 line
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1
-0+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
Quoted 1 line
file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
Quoted 2 lines
file://0001-Do-not-read-config-files-from-HOME.patch \file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
meta/recipes-devtools/rpm/rpm_4.15.1.bb SRC_URI = "git://
Quoted 1 line
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-0@@ -34,18 +34,14 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
meta/recipes-devtools/rpm/rpm_4.15.1.bb SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \ · line 42
Quoted 2 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-0file://0001-Fix-build-with-musl-C-library.patch \file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
Quoted 1 line
file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
Quoted 1 line
-
file://0001-Split-binary-package-building-into-a-separate-functi.patch \
Quoted 1 line
-
file://0002-Run-binary-package-creation-via-thread-pools.patch \
Quoted 1 line
-
file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
Quoted 1 line
-
file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
Quoted 2 lines
file://0001-perl-disable-auto-reqs.patch \file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
Quoted 1 line
file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
Quoted 1 line
-
file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
Quoted 1 line
+
file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
Quoted 26 lines
"PE = "1"
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +2
-4-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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 2/5] rpm: upgrade to 4.15.1
Quoted 2 lines · Alexander Kanavin
omp.his 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.
Quoted 1,112 lines
Alex
Quoted 1,108 lines · Khem Raj
breaks with needing openmp
http://errors.yoctoproject.org/Errors/Details/282827/
perhaps needs explicit dependency on libgomp now ?
Quoted 1,099 lines · Alexander Kanavin
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/756Signed-off-by Alexander Kanavin <[email protected]>--- ...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%)meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +13
-15@@ -1,4 +1,4 @@ -From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001 +From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in@@ -9,25 +9,23 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index 1261cdbba..bb2d6f4f6 100644 +index e6cec1816..810cd7351 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); - } +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); + } + +- if (cheating) { +- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); +- } +- + if ((rc = getPkgFilename(pkg->header, filename))) + return rc; -- if (cheating) { -- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); -- } -- - { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); - char *binRpm, *binDir; - binRpm = headerFormat(pkg->header, binFormat, &errorString); --- -2.11.0 -meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +7
-7@@ -1,4 +1,4 @@ -From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001 +From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]> 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac -index 09af7c4..9bd6903 100644 +index d3aeab86e..1a1f3f91f 100644 --- a/configure.ac +++ b/configure.ac -@@ -1055,7 +1055,7 @@ else +@@ -1086,7 +1086,7 @@ else usrprefix=$prefix fi@@ -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:0meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-84@@ -1,84 +0,0 @@ -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-58@@ -1,58 +0,0 @@ -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> ---- - 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; - fimeta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +65
-0@@ -0,0 +1,65 @@ +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 18 Nov 2019 16:22:56 +0100 +Subject: [PATCH] rpmfc.c: do not run file classification in parallel + +This is causing freezes with libmagic when the file in question is compressed: +https://github.com/rpm-software-management/rpm/issues/756 + +Upstream-Status: Inapppropriate [upstream wants a proper fix] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + build/rpmfc.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index 3db7a9352..17afdd57a 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, const char *ftype, const char *ful + /* Add attributes on libmagic type & path pattern matches */ + if (matches(&(*attr)->incl, ftype, path, is_executable)) { + argvAddTokens(&fc->fattrs[ix], (*attr)->name); +- #pragma omp critical(fahash) + fattrHashAddEntry(fc->fahash, attr-fc->atypes, ix); + } + } +@@ -1105,7 +1104,6 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + /* Build (sorted) file class dictionary. */ + fc->cdict = rpmstrPoolCreate(); + +- #pragma omp parallel + { + /* libmagic is not thread-safe, each thread needs to a private handle */ + magic_t ms = magic_open(msflags); +@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + if (ms == NULL) { + rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"), + msflags, strerror(errno)); +- #pragma omp cancel parallel + } + + if (magic_load(ms, NULL) == -1) { + rpmlog(RPMLOG_ERR, _("magic_load failed: %s\n"), magic_error(ms)); +- #pragma omp cancel parallel + } + +- #pragma omp for ordered reduction(+:nerrors) + for (int ix = 0; ix < fc->nfiles; ix++) { + rpmsid ftypeId; + const char * ftype; +@@ -1185,14 +1180,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + fc->fcolor[ix] = fcolor; + + /* Add to file class dictionary and index array */ +- #pragma omp ordered + if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) { + ftypeId = rpmstrPoolId(fc->cdict, ftype, 1); +- #pragma omp atomic + fc->fknown++; + } else { + ftypeId = rpmstrPoolId(fc->cdict, "", 1); +- #pragma omp atomic + fc->fwhite++; + } + /* Pool id's start from 1, for headers we want it from 0 */meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-127@@ -1,127 +0,0 @@ -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-207@@ -1,207 +0,0 @@ -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-336@@ -1,336 +0,0 @@ -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - 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,meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +4
-10@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 2/5] rpm: upgrade to 4.15.1
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
Quoted 1,314 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin
omp.his coming from gcc-runtime. Which compiler are you using? Probablyan 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.Quoted 35 lines
Alex
Quoted 31 lines · Khem Raj
breaks with needing openmp
http://errors.yoctoproject.org/Errors/Details/282827/
perhaps needs explicit dependency on libgomp now ?
Quoted 22 lines · Alexander Kanavin
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/756Signed-off-by Alexander Kanavin <[email protected]>--- ...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------------------
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
.../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.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
create mode 100644
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
delete mode 100644
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
rename meta/recipes-devtools/rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}(91%)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
diff --git
a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchb/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
index
80e2f0fad70..4029233fb70100644
---
a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
+++
b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patchQuoted 2 lines
Quoted 2 lines
Review line 1
Quoted 2 lines
(quoted diff) +0
-1@@ -1,4 +1,4 @@ -From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:002001
Quoted 1 line
Quoted 1 line
Review line 1
Quoted 1 line
(quoted diff) +1
-0+From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:002001
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +0
-0From: Alexander Kanavin <[email protected]> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency whenbuilding rpms in
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +1
-0@@ -9,25 +9,23 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-)Quoted 6 lines
Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch hand produces rpms that way by design.
Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +1
-2diff --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)
Quoted 1 line
Quoted 1 line
Review hand produces rpms that way by design. · line 21
Quoted 1 line
(quoted diff) +0
-1- headerPutBin(pkg->header, RPMTAG_SOURCEPKGID,spec->sourcePkgId,16);
Quoted 2 lines
Quoted 2 lines
Review hand produces rpms that way by design. · line 21
Quoted 2 lines
(quoted diff) +1
-1- } +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec,Package pkg, const char *cookie, int ch
Quoted 1 line
Quoted 1 line
Review hand produces rpms that way by design. · line 22
Quoted 1 line
(quoted diff) +1
-0+ headerPutBin(pkg->header, RPMTAG_SOURCEPKGID,spec->sourcePkgId,16);
Quoted 11 lines
Quoted 11 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch hand produces rpms that way by design.
Quoted 11 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +8
-2+ } + +- 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");
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch hand produces rpms that way by design.
Quoted 5 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +0
-5-- } -- - { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); - char *binRpm, *binDir; - binRpm = headerFormat(pkg->header, binFormat,&errorString);
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +0
-3--- -2.11.0 -diff --git
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchb/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
index
82e7328757f..52440d68180100644
---
a/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchQuoted 1 line
Quoted 1 line
Quoted 1 line
+++
b/meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patchQuoted 2 lines
Quoted 2 lines
Review line 1
Quoted 2 lines
(quoted diff) +0
-1@@ -1,4 +1,4 @@ -From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:002001
Quoted 1 line
Quoted 1 line
Review line 1
Quoted 1 line
(quoted diff) +1
-0+From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:002001
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +0
-0From: Alexander Kanavin <[email protected]> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation pathfor
Quoted 1 line
Quoted 1 line
Review Signed-off-by: Alexander Kanavin <
Quoted 1 line
(quoted diff) +0
-0@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <Quoted 37 lines
Quoted 37 lines
Quoted 37 lines
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +5
-53 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)/rpmQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +1
-1# Libtool version (current-revision-age) for all our libraries - rpm_version_info = 9:0:1 + rpm_version_info = 9:1:0diff --git
a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patchb/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patchQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
deleted file mode 100644
index 6e44f0b7fc9..00000000000
---
a/meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patchQuoted 3 lines
Quoted 3 lines
Review line 1
Quoted 3 lines
+++
/dev/null(quoted diff) +0
-1@@ -1,84 +0,0 @@ -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:002001
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-3-From: Alexander Kanavin <[email protected]> -Date: Thu, 25 May 2017 18:15:27 +0300 -Subject: [PATCH 1/4] Split binary package building into a separatefunction
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4- -So that it can be run as a thread pool task. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-7-Signed-off-by: Alexander Kanavin <[email protected]> - ---- - build/pack.c | 33 +++++++++++++++++++++------------ - 1 file changed, 21 insertions(+), 12 deletions(-) - -diff --git a/build/pack.c b/build/pack.cQuoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-8-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, intcheating)
Quoted 1 line
Quoted 1 line
Review line 24
Quoted 1 line
(quoted diff) +0
-1-+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char*cookie, int cheating, char** filename)
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-10- { -- 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;Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-8- - 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)
Quoted 1 line
Quoted 1 line
Review line 43
Quoted 1 line
(quoted diff) +0
-1- headerGetString(pkg->header, RPMTAG_NAME),errorString);
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-8- 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)
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-8- 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);
Quoted 1 line
Quoted 1 line
Review line 60
Quoted 1 line
(quoted diff) +0
-1-+ char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ",*filename, NULL);
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-9- if (pkgcheck[0] != ' ') { - rc = checkPackages(pkgcheck); - } - free(pkgcheck); -+ } -+ return rc; -+} -+ -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, intcheating)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-8-+{ -+ 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);Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-7-+ 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-.patchb/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patchQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
deleted file mode 100644
index 24aa4c7ffff..00000000000
---
a/meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patchQuoted 3 lines
Quoted 3 lines
Review line 1
Quoted 3 lines
+++
/dev/null(quoted diff) +0
-1@@ -1,58 +0,0 @@ -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:002001
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-3-From: Alexander Kanavin <[email protected]> -Date: Tue, 27 Aug 2019 17:42:34 +0200 -Subject: [PATCH] mono-find-provides/requires: do not use monodisfrom the host
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-11- -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 <[email protected]> ---- - scripts/mono-find-provides | 8 ++++----Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-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)\$"))
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-8- 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" - exportLD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-4--elif [ -x /usr/bin/monodis ]; then -- monodis="/usr/bin/monodis" -+elif [ -x /usr/bin/monodis.bogus ]; then -+ monodis="/usr/bin/monodis.bogus"Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-8- 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)\$"))
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-8- 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" - exportLD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-7--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; - fidiff --git
a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patchb/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patchQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
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.patchQuoted 2 lines
Quoted 2 lines
Review line 1
Quoted 2 lines
(quoted diff) +1
-0@@ -0,0 +1,65 @@ +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:002001
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +5
-0+From: Alexander Kanavin <[email protected]> +Date: Mon, 18 Nov 2019 16:22:56 +0100 +Subject: [PATCH] rpmfc.c: do not run file classification in parallel + +This is causing freezes with libmagic when the file in question iscompressed:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +5
-0+https://github.com/rpm-software-management/rpm/issues/756 + +Upstream-Status: Inapppropriate [upstream wants a proper fix] +Signed-off-by: Alexander Kanavin <[email protected]> +---Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +8
-0+ 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
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +8
-0+ /* 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)Quoted 6 lines
Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +6
-0+ /* Build (sorted) file class dictionary. */ + fc->cdict = rpmstrPoolCreate(); + +- #pragma omp parallel + { + /* libmagic is not thread-safe, each thread needs to a privatehandle */
Quoted 2 lines
Quoted 2 lines
Review line 35
Quoted 2 lines
(quoted diff) +2
-0+ magic_t ms = magic_open(msflags); +@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv,
rpm_mode_t* fmode)Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +8
-0+ 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));Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +8
-0+- #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)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +7
-0+ 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 atomicQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +7
-0+ 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.patchb/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patchQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
deleted file mode 100644
index d10041c2e14..00000000000
---
a/meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patchQuoted 3 lines
Quoted 3 lines
Review line 1
Quoted 3 lines
+++
/dev/null(quoted diff) +0
-1@@ -1,127 +0,0 @@ -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:002001
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-5-From: Alexander Kanavin <[email protected]> -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]
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4-Signed-off-by: Alexander Kanavin <[email protected]> - ---- - build/pack.c | 81+++++++++++++++++++++++++++++++++++++++++++++++++-----------
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-8- 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
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4- return rc; - } - --rpmRC packageBinaries(rpmSpec spec, const char *cookie, intcheating)
Quoted 10 lines
Quoted 10 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-10-+struct binaryPackageTaskData - { -- rpmRC rc; - Package pkg; -+ char *filename; -+ rpmRC result; -+ struct binaryPackageTaskData *next; -+}; -+ -+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpecspec, const char *cookie, int cheating)
Quoted 6 lines
Quoted 6 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 6 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-6-+{ -+ struct binaryPackageTaskData *tasks = NULL; -+ struct binaryPackageTaskData *task = NULL; -+ struct binaryPackageTaskData *prev = NULL; -+ -+ for (Package pkg = spec->packages; pkg != NULL; pkg =
pkg->next) {Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-4-+ task = rcalloc(1, sizeof(*task)); -+ task->pkg = pkg; -+ if (pkg == spec->packages) { -+ // the first package needs to be processed ahead ofothers, as they copy
Quoted 1 line
Quoted 1 line
Review line 43
Quoted 1 line
(quoted diff) +0
-1-+ // changelog data from it, and so otherwise data raceswould happen
Quoted 1 line
Quoted 1 line
Review line 44
Quoted 1 line
(quoted diff) +0
-1-+ task->result = packageBinary(spec, pkg, cookie,cheating, &(task->filename));
Quoted 1 line
Quoted 1 line
Review line 45
Quoted 1 line
(quoted diff) +0
-1-+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);Quoted 11 lines
Quoted 11 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 11 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-11-+ tasks = task; -+ } -+ if (prev != NULL) { -+ prev->next = task; -+ } -+ prev = task; -+ } -+ -+ #pragma omp parallel -+ #pragma omp single -+ // re-declaring task variable is necessary, or older gccversions will produce code that segfaults
Quoted 1 line
Quoted 1 line
Review line 57
Quoted 1 line
(quoted diff) +0
-1-+ for (struct binaryPackageTaskData *task = tasks; task != NULL;task =
task->next) {Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-4-+ if (task != tasks) -+ #pragma omp task -+ { -+ task->result = packageBinary(spec, task->pkg, cookie,cheating, &(task->filename));
Quoted 1 line
Quoted 1 line
Review line 62
Quoted 1 line
(quoted diff) +0
-1-+ rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);Quoted 7 lines
Quoted 7 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 7 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-7-+ } -+ } -+ -+ return tasks; -+} -+ -+static void freeBinaryPackageTasks(struct binaryPackageTaskData*tasks)
Quoted 10 lines
Quoted 10 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-10-+{ -+ while (tasks != NULL) { -+ struct binaryPackageTaskData* next = tasks->next; -+ rfree(tasks->filename); -+ rfree(tasks); -+ tasks = next; -+ } -+} -+ -+rpmRC packageBinaries(rpmSpec spec, const char *cookie, intcheating)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-8-+{ - 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);Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-8-- rstrcat(&pkglist, " "); -- } -- free(fn); -- if (rc != RPMRC_OK) { -- pkglist = _free(pkglist); -- return rc; -- } -+ struct binaryPackageTaskData *tasks =
runBinaryPackageTasks(spec, cookie, cheating);Quoted 2 lines
Quoted 2 lines
Review line 97
Quoted 2 lines
(quoted diff) +0
-2-+ -+ for (struct binaryPackageTaskData *task = tasks; task != NULL;task =
task->next) {Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-23-+ 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"Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-7-+ - 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.patchb/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patchQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
deleted file mode 100644
index c348ae5330e..00000000000
---
a/meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patchQuoted 3 lines
Quoted 3 lines
Review line 1
Quoted 3 lines
+++
/dev/null(quoted diff) +0
-1@@ -1,207 +0,0 @@ -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:002001
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-9-From: Alexander Kanavin <[email protected]> -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]
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4-Signed-off-by: Alexander Kanavin <[email protected]> - ---- - rpmio/rpmstrpool.c | 56+++++++++++++++++++++++++++++++++++++++++++++---------
Quoted 11 lines
Quoted 11 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 11 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-11- 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, rpmsidsid);
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-5-+ - static void poolHashResize(rpmstrPool pool, int numBuckets) - { - poolHash ht = pool->hash; -@@ -120,7 +122,7 @@ static void poolHashResize(rpmstrPool pool, intnumBuckets)
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-4- - for (int i=0; i<ht->numBuckets; i++) { - if (!ht->buckets[i].keyid) continue; -- unsigned int keyHash = rstrhash(rpmstrPoolStr(pool,ht->buckets[i].keyid));
Quoted 1 line
Quoted 1 line
Review line 35
Quoted 1 line
(quoted diff) +0
-1-+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,ht->buckets[i].keyid));
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-4- 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
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-4- ht->buckets[hash].keyid = keyid; - ht->keyCount++; - break; -- } else if (!strcmp(rpmstrPoolStr(pool,ht->buckets[hash].keyid), key)) {
Quoted 1 line
Quoted 1 line
Review line 44
Quoted 1 line
(quoted diff) +0
-1-+ } else if (!strcmp(rpmstrPoolStrNoLock(pool,ht->buckets[hash].keyid), key)) {
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-8- 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));
Quoted 1 line
Quoted 1 line
Review line 53
Quoted 1 line
(quoted diff) +0
-1-+ unsigned int keyHash = rstrhash(rpmstrPoolStrNoLock(pool,ht->buckets[i].keyid));
Quoted 2 lines
Quoted 2 lines
Review line 55
Quoted 2 lines
(quoted diff) +0
-2- for (unsigned int j=0;;j++) { - unsigned int hash = hashbucket(keyHash, i) %
ht->numBuckets;Quoted 37 lines
Quoted 37 lines
Quoted 37 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-37- 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; - } -Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-8- 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, intkeephash)
Quoted 1 line
Quoted 1 line
Review line 101
Quoted 1 line
(quoted diff) +0
-1- pool->offs_alloced *
sizeof(*pool->offs));Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-11- pool->frozen = 1; - } -+ } - } - - void rpmstrPoolUnfreeze(rpmstrPool pool) - { -+ #pragma omp critical(rpmstrpool) -+ { - if (pool) { - if (pool->hash == NULL) {Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-8- rpmstrPoolRehash(pool); - } - pool->frozen = 0; - } -+ } - } - - static rpmsid rpmstrPoolPut(rpmstrPool pool, const char *s, size_tslen, unsigned int hash)
Quoted 1 line
Quoted 1 line
Review line 121
Quoted 1 line
(quoted diff) +0
-1-@@ -350,7 +364,7 @@ static rpmsid rpmstrPoolGet(rpmstrPool pool,const char * key,
size_tkeylen,Quoted 6 lines
Quoted 6 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 6 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-6- return 0; - } - -- s = rpmstrPoolStr(pool, ht->buckets[hash].keyid); -+ s = rpmstrPoolStrNoLock(pool, ht->buckets[hash].keyid); - /* pool string could be longer than keylen, require exactmatche */
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-3- 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_tslen,Quoted 1 line
Quoted 1 line
Review line 131
Quoted 1 line
(quoted diff) +0
-1- rpmsid rpmstrPoolIdn(rpmstrPool pool, const char *s, size_t slen,int create)
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-26- { - 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;Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-8- } - --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)
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-18- 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) -+ {Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-8- if (pool && sid > 0 && sid <= pool->offs_size) { - slen = strlen(pool->offs[sid]); - } -+ } - return slen; - } - -@@ -421,5 +452,12 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsidsidA,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-9- - rpmsid rpmstrPoolNumStr(rpmstrPool pool) - { -- return (pool != NULL) ? pool->offs_size : 0; -+ rpmsid id = 0; -+ #pragma omp critical(rpmstrpool) -+ { -+ if (pool) { -+ id = pool->offs_size;Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-7-+ } -+ } -+ return id; - } --- -2.11.0 -diff --git
a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchb/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
deleted file mode 100644
index 652e30b3e4a..00000000000
---
a/meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patchQuoted 3 lines
Quoted 3 lines
Review line 1
Quoted 3 lines
+++
/dev/null(quoted diff) +0
-1@@ -1,336 +0,0 @@ -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:002001
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3-From: Alexander Kanavin <[email protected]> -Date: Thu, 8 Jun 2017 17:08:09 +0300 -Subject: [PATCH] build/pack.c: remove static local variables from
buildHost()Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- and getBuildTime() - -Their use is causing difficult to diagnoze data races when buildingmultiple
Quoted 1 line
Quoted 1 line
Review line 8
Quoted 1 line
(quoted diff) +0
-1-packages in parallel, and is a bad idea in general, as it also makesit more
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3-difficult to reason about code. - -Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/pull/226]
Quoted 7 lines
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-7-Signed-off-by: Alexander Kanavin <[email protected]> - -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - build/build.c | 54 ++++++++++++++++++++++++++++-- - build/pack.c | 84+++++++++--------------------------------------
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-25- 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;Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8-+ 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 parseSOURCE_DATE_EPOCH\n"));
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-18-+ 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 {Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8-+ 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);
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-9-+ } -+ free(bhMacro); -+ return(hostname); -+} -+ - /** - */ - static rpmRC doRmSource(rpmSpec spec) -@@ -201,6 +247,9 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpecspec, int what)
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- rpmRC rc = RPMRC_OK; - int test = (what & RPMBUILD_NOBUILD); - char *cookie = buildArgs->cookie ? xstrdup(buildArgs->cookie) :NULL;
Quoted 7 lines
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-7-+ 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)
Quoted 10 lines
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10- 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)))
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- goto exit; - - if ((what & RPMBUILD_CLEAN) && -@@ -293,6 +342,7 @@ static rpmRC buildSpec(BTA_t buildArgs, rpmSpecspec, int what)
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-12- (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 @@Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8- #include "system.h" - - #include <errno.h> --#include <netdb.h> --#include <time.h> - #include <sys/wait.h> - - #include <rpm/rpmlib.h> /* RPMSIGTAG*,rpmReadPackageFile */
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10-@@ -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;Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8-- -- 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 parseSOURCE_DATE_EPOCH\n"));
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-15-- 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;Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8-- -- 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 istoo long\n"));
Quoted 7 lines
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 7 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-7-- (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);
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-13-- } -- 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. - */Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8- 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,
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- - /* Create and add the cookie */ - if (cookie) { -- rasprintf(cookie, "%s %d", buildHost(), (int)(
*getBuildTime()));Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-9-+ 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)
Quoted 1 line
Quoted 1 line
Review line 213
Quoted 1 line
(quoted diff) +0
-1-+static rpmRC packageBinary(rpmSpec spec, Package pkg, const char*cookie, int cheating, char** filename,
rpm_time_tbuildTime, const char* buildHost)Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- { - const char *errorString; - rpmRC rc = RPMRC_OK; -@@ -660,8 +608,8 @@ static rpmRC packageBinary(rpmSpec spec, Packagepkg, const char *cookie, int ch
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5- 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);Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5-+ 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);
Quoted 1 line
Quoted 1 line
Review line 228
Quoted 1 line
(quoted diff) +0
-1-@@ -699,7 +647,7 @@ static rpmRC packageBinary(rpmSpec spec, Packagepkg, const char *cookie, int ch
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5- free(binRpm); - } - -- rc = writeRPM(pkg, NULL, *filename, NULL); -+ rc = writeRPM(pkg, NULL, *filename, NULL, buildTime,buildHost);
Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-3- if (rc == RPMRC_OK) { - /* Do check each written package if enabled */ - char *pkgcheck = rpmExpand("%{?_build_pkgcheck} ",*filename, NULL);
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5-@@ -719,7 +667,7 @@ struct binaryPackageTaskData - struct binaryPackageTaskData *next; - }; - --static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpecspec, const char *cookie, int cheating)
Quoted 1 line
Quoted 1 line
Review line 242
Quoted 1 line
(quoted diff) +0
-1-+static struct binaryPackageTaskData* runBinaryPackageTasks(rpmSpecspec, const char *cookie, int cheating,
rpm_time_tbuildTime, char* buildHost)Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- { - struct binaryPackageTaskData *tasks = NULL; - struct binaryPackageTaskData *task = NULL; -@@ -731,7 +679,7 @@ static struct binaryPackageTaskData*runBinaryPackageTasks(rpmSpec spec, const c
Quoted 2 lines
Quoted 2 lines
Review line 248
Quoted 2 lines
(quoted diff) +0
-2- if (pkg == spec->packages) { - // the first package needs to be processed ahead ofothers, as they copy
Quoted 1 line
Quoted 1 line
Review line 249
Quoted 1 line
(quoted diff) +0
-1- // changelog data from it, and so otherwise data raceswould happen
Quoted 1 line
Quoted 1 line
Review line 250
Quoted 1 line
(quoted diff) +0
-1-- task->result = packageBinary(spec, pkg, cookie,cheating, &(task->filename));
Quoted 1 line
Quoted 1 line
Review line 251
Quoted 1 line
(quoted diff) +0
-1-+ task->result = packageBinary(spec, pkg, cookie,cheating, &(task->filename), buildTime, buildHost);
Quoted 1 line
Quoted 1 line
Review line 252
Quoted 1 line
(quoted diff) +0
-1- rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- tasks = task; - } -@@ -748,7 +696,7 @@ static struct binaryPackageTaskData*runBinaryPackageTasks(rpmSpec spec, const c
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- if (task != tasks) - #pragma omp task - { -- task->result = packageBinary(spec, task->pkg, cookie,cheating, &(task->filename));
Quoted 1 line
Quoted 1 line
Review line 260
Quoted 1 line
(quoted diff) +0
-1-+ task->result = packageBinary(spec, task->pkg, cookie,cheating, &(task->filename), buildTime, buildHost);
Quoted 1 line
Quoted 1 line
Review line 261
Quoted 1 line
(quoted diff) +0
-1- rpmlog(RPMLOG_NOTICE, _("Finished binary package job,result %d, filename %s\n"),
task->result,task->filename);Quoted 3 lines
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 3 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-3- } - } -@@ -766,11 +714,11 @@ static void freeBinaryPackageTasks(structbinaryPackageTaskData* tasks)
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-4- } - } - --rpmRC packageBinaries(rpmSpec spec, const char *cookie, intcheating)
Quoted 1 line
Quoted 1 line
Review line 269
Quoted 1 line
(quoted diff) +0
-1-+rpmRC packageBinaries(rpmSpec spec, const char *cookie, intcheating,
rpm_time_tbuildTime, char* buildHost)Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-4- { - char *pkglist = NULL; - -- struct binaryPackageTaskData *tasks =
runBinaryPackageTasks(spec, cookie, cheating);Quoted 1 line
Quoted 1 line
Review line 274
Quoted 1 line
(quoted diff) +0
-1-+ struct binaryPackageTaskData *tasks =
runBinaryPackageTasks(spec, cookie, cheating, buildTime, buildHost);Quoted 2 lines
Quoted 2 lines
Review line 276
Quoted 2 lines
(quoted diff) +0
-2- - for (struct binaryPackageTaskData *task = tasks; task != NULL;task =
task->next) {Quoted 2 lines
Quoted 2 lines
Review line 278
Quoted 2 lines
(quoted diff) +0
-2- if (task->result == RPMRC_OK) { -@@ -797,7 +745,7 @@ rpmRC packageBinaries(rpmSpec spec, const char*cookie, int cheating)
Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 5 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-5- return RPMRC_OK; - } - --rpmRC packageSources(rpmSpec spec, char **cookie) -+rpmRC packageSources(rpmSpec spec, char **cookie, rpm_time_tbuildTime, char* buildHost)
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8- { - 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());Quoted 1 line
Quoted 1 line
Review line 292
Quoted 1 line
(quoted diff) +0
-1-- headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME,
getBuildTime(), 1);Quoted 2 lines
Quoted 2 lines
Review line 294
Quoted 2 lines
(quoted diff) +0
-2-+ headerPutString(sourcePkg->header, RPMTAG_BUILDHOST, buildHost); -+ headerPutUint32(sourcePkg->header, RPMTAG_BUILDTIME,&buildTime, 1);
Quoted 1 line
Quoted 1 line
Review line 295
Quoted 1 line
(quoted diff) +0
-1- headerPutUint32(sourcePkg->header, RPMTAG_SOURCEPACKAGE, &one,1);
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- - /* XXX this should be %_srpmdir */ -@@ -814,7 +762,7 @@ rpmRC packageSources(rpmSpec spec, char **cookie) - char *pkgcheck = rpmExpand("%{?_build_pkgcheck_srpm} ", fn,NULL);
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- - spec->sourcePkgId = NULL; -- rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie); -+ rc = writeRPM(sourcePkg, &spec->sourcePkgId, fn, cookie,buildTime, buildHost);
Quoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8- - /* 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);
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-9- * @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, intcheating);
Quoted 1 line
Quoted 1 line
Review line 321
Quoted 1 line
(quoted diff) +0
-1-+rpmRC packageBinaries(rpmSpec spec, const char *cookie, intcheating,
rpm_time_tbuildTime, char* buildHost);Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-4- - /** \ingroup rpmbuild - * Generate source package. - * @param spec spec file control structureQuoted 8 lines
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch
Quoted 8 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-8- * @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_tbuildTime, char* buildHost);
Quoted 4 lines
Quoted 4 lines
Review
Quoted 4 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-3- - RPM_GNUC_INTERNAL - int addLangTag(rpmSpec spec, Header h, rpmTagVal tag,(quoted diff) +0
-0b/meta/recipes-devtools/rpm/rpm_4.15.1.bb
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb HOMEPAGE = "http://www.rpm.org" · line 25
Quoted 9 lines
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 indexc37330eb4c6..4fa2d764fb9100644meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-0@@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM ="file://COPYING;md5=c0bf017c0fd1920e6158a333acabfd4a"
Quoted 2 lines
Quoted 2 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb HOMEPAGE = "http://www.rpm.org" · line 26
Quoted 2 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-1-SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
Quoted 1 line
Quoted 1 line
meta/recipes-devtools/rpm/rpm_4.15.1.bb HOMEPAGE = "http://www.rpm.org" · line 26
Quoted 1 line
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1
-0+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.15.x \
Quoted 1 line
Quoted 1 line
Quoted 1 line
file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
file://0001-Do-not-read-config-files-from-HOME.patch \file://0001-When-cross-installing-execute-package-scriptlets-wit.patch \
Quoted 1 line
Quoted 1 line
meta/recipes-devtools/rpm/rpm_4.15.1.bb SRC_URI = "git://
Quoted 1 line
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-0@@ -34,18 +34,14 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
Quoted 2 lines
Quoted 2 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \ · line 42
Quoted 2 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-0file://0001-Fix-build-with-musl-C-library.patch \file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
-
file://0001-Split-binary-package-building-into-a-separate-functi.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
-
file://0002-Run-binary-package-creation-via-thread-pools.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
-
file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
-
file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
file://0001-perl-disable-auto-reqs.patch \file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
-
file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
Quoted 1 line
Quoted 1 line
Quoted 1 line
+
file://0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch \
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
"PE = "1"
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1
-1-SRCREV = "4a9440006398646583f0d9ae1837dad2875013aa" +SRCREV = "ab2179452c5be276a6b96c591afded485c7e58c3"Quoted 6 lines
Quoted 6 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb do_install_append () { · line 123
Quoted 6 lines
S = "${WORKDIR}/git"
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +0
-0@@ -125,8 +121,7 @@ do_install_append () { ${D}/${libdir}/rpm/macros sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|'\
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1
-3- ${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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 2/5] rpm: upgrade to 4.15.1
Quoted 5 lines · Alexander Kanavin
I have reproduced it with gcc and musl. The
omp.his 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
Quoted 1,125 lines
Alex
Quoted 1,122 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin
omp.his 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.Quoted 1,112 lines
Alex
Quoted 1,108 lines · Khem Raj
breaks with needing openmp
http://errors.yoctoproject.org/Errors/Details/282827/
perhaps needs explicit dependency on libgomp now ?
Quoted 1,099 lines · Alexander Kanavin
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/756Signed-off-by Alexander Kanavin <[email protected]>--- ...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%)meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch +13
-15@@ -1,4 +1,4 @@ -From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001 +From f39c28eb52f12ae6e82db360ffd5a903ac8faca5 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 9 Jan 2017 18:52:11 +0200 Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in@@ -9,25 +9,23 @@ hand produces rpms that way by design. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> + --- build/pack.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/pack.c b/build/pack.c -index 1261cdbba..bb2d6f4f6 100644 +index e6cec1816..810cd7351 100644 --- a/build/pack.c +++ b/build/pack.c -@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, int cheating) - headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); - } +@@ -724,10 +724,6 @@ static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int ch + headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16); + } + +- if (cheating) { +- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); +- } +- + if ((rc = getPkgFilename(pkg->header, filename))) + return rc; -- if (cheating) { -- (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1"); -- } -- - { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL); - char *binRpm, *binDir; - binRpm = headerFormat(pkg->header, binFormat, &errorString); --- -2.11.0 -meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +7
-7@@ -1,4 +1,4 @@ -From bd08eb0ae1312f347f49949481daa7c923752df2 Mon Sep 17 00:00:00 2001 +From 2f3d1619b6510bc131c4375827caf912559f0fa2 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 27 Feb 2017 09:43:30 +0200 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]> 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac -index 09af7c4..9bd6903 100644 +index d3aeab86e..1a1f3f91f 100644 --- a/configure.ac +++ b/configure.ac -@@ -1055,7 +1055,7 @@ else +@@ -1086,7 +1086,7 @@ else usrprefix=$prefix fi@@ -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:0meta/recipes-devtools/rpm/files/0001-Split-binary-package-building-into-a-separate-functi.patch deleted +0
-84@@ -1,84 +0,0 @@ -From 721a660a507d6d062e7aecafad886c643970a5d5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch deleted +0
-58@@ -1,58 +0,0 @@ -From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> ---- - 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; - fimeta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +65
-0@@ -0,0 +1,65 @@ +From 93c3c7f043f62e96941274e957c4ad9432032af1 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 18 Nov 2019 16:22:56 +0100 +Subject: [PATCH] rpmfc.c: do not run file classification in parallel + +This is causing freezes with libmagic when the file in question is compressed: +https://github.com/rpm-software-management/rpm/issues/756 + +Upstream-Status: Inapppropriate [upstream wants a proper fix] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + build/rpmfc.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index 3db7a9352..17afdd57a 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -680,7 +680,6 @@ static void rpmfcAttributes(rpmfc fc, int ix, const char *ftype, const char *ful + /* Add attributes on libmagic type & path pattern matches */ + if (matches(&(*attr)->incl, ftype, path, is_executable)) { + argvAddTokens(&fc->fattrs[ix], (*attr)->name); +- #pragma omp critical(fahash) + fattrHashAddEntry(fc->fahash, attr-fc->atypes, ix); + } + } +@@ -1105,7 +1104,6 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + /* Build (sorted) file class dictionary. */ + fc->cdict = rpmstrPoolCreate(); + +- #pragma omp parallel + { + /* libmagic is not thread-safe, each thread needs to a private handle */ + magic_t ms = magic_open(msflags); +@@ -1113,15 +1111,12 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + if (ms == NULL) { + rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"), + msflags, strerror(errno)); +- #pragma omp cancel parallel + } + + if (magic_load(ms, NULL) == -1) { + rpmlog(RPMLOG_ERR, _("magic_load failed: %s\n"), magic_error(ms)); +- #pragma omp cancel parallel + } + +- #pragma omp for ordered reduction(+:nerrors) + for (int ix = 0; ix < fc->nfiles; ix++) { + rpmsid ftypeId; + const char * ftype; +@@ -1185,14 +1180,11 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + fc->fcolor[ix] = fcolor; + + /* Add to file class dictionary and index array */ +- #pragma omp ordered + if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) { + ftypeId = rpmstrPoolId(fc->cdict, ftype, 1); +- #pragma omp atomic + fc->fknown++; + } else { + ftypeId = rpmstrPoolId(fc->cdict, "", 1); +- #pragma omp atomic + fc->fwhite++; + } + /* Pool id's start from 1, for headers we want it from 0 */meta/recipes-devtools/rpm/files/0002-Run-binary-package-creation-via-thread-pools.patch deleted +0
-127@@ -1,127 +0,0 @@ -From 513200cf76758de4668312c628d6362bdabfaf4b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-207@@ -1,207 +0,0 @@ -From c80892f17e44331206c8318d53b63bb6a99554d0 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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 -meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-336@@ -1,336 +0,0 @@ -From 792693bb90768cfde4898e8dd31ee1b5de803d2f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - 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,meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +4
-10@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
PATCH 3/5 libdnf: upgrade 0.28.1 -> 0.38.1
In reply to Alexander KanavinAdd 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.
---
.../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%)meta/recipes-devtools/libdnf/libdnf/0001-Add-WITH_TESTS-option.patch +6 -6
@@ -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 <[email protected]> Date: Tue, 6 Nov 2018 13:54:43 +0100 Subject: [PATCH] Add WITH_TESTS option
@@ -14,18 +14,18 @@ Signed-off-by: Alexander Kanavin <[email protected]> 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})
meta/recipes-devtools/libdnf/libdnf/0001-Look-fo-sphinx-only-if-documentation-is-actually-ena.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-devtools/libdnf/libdnf_0.38.1.bb renamed from meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +4 -1
@@ -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"
Signature · 1 line
2.17.1
PATCH 4/5 dnf: upgrade 4.2.2 -> 4.2.16
In reply to Alexander Kanavin---
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%)meta/recipes-devtools/dnf/dnf_4.2.16.bb renamed from meta/recipes-devtools/dnf/dnf_4.2.2.bb +1 -1
@@ -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"
Signature · 1 line
2.17.1
PATCH 5/5 psmisc: remove a patch that is no longer necessary
In reply to Alexander Kanavin--- ...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
meta/recipes-extended/psmisc/psmisc/0001-Makefile.am-create-src-directory-before-attempting-t.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From dac375f640fecd45e6254a8d870ee37ec8f41670 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -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 <[email protected]> - ---- - 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' | \
meta/recipes-extended/psmisc/psmisc_23.3.bb +0 -1
@@ -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"
Signature · 1 line
2.17.1
✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more
In reply to Alexander Kanavin== 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 ([email protected]) 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
Re: ✗ patchtest: failure for "libsolv: upgrade 0.7.6 -> 0.7...." and 4 more
Quoted 5 lines · Patchwork
* 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 atdfb3b56641)
This is intentional as psmisc patch is based on a previous patch that is in master-next.
Quoted 10 lines
* 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