oe-selftest: extend virgl gtk test to also check the SDL option
PATCH 1/14 oe-selftest: extend virgl gtk test to also check the SDL option
--- meta/lib/oeqa/selftest/cases/runtime_test.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +13 -4
@@ -166,9 +166,9 @@ class TestImage(OESelftestTestCase): bitbake('core-image-full-cmdline socat') bitbake('-c testimage core-image-full-cmdline') - def test_testimage_virgl_gtk(self): + def test_testimage_virgl_gtk_sdl(self): """ - Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk frontend + Summary: Check host-assisted accelerate OpenGL functionality in qemu with gtk and SDL frontends Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled 2. Check that kmscube demo runs without crashing. Product: oe-core
@@ -183,18 +183,27 @@ class TestImage(OESelftestTestCase): self.skipTest('virgl isn\'t working with Centos 7') qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native') + sdl_packageconfig = get_bb_var('PACKAGECONFIG', 'libsdl2-native') features = 'INHERIT += "testimage"\n' if 'gtk+' not in qemu_packageconfig: features += 'PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"\n' + if 'sdl' not in qemu_packageconfig: + features += 'PACKAGECONFIG_append_pn-qemu-system-native = " sdl"\n' if 'virglrenderer' not in qemu_packageconfig: features += 'PACKAGECONFIG_append_pn-qemu-system-native = " virglrenderer"\n' if 'glx' not in qemu_packageconfig: features += 'PACKAGECONFIG_append_pn-qemu-system-native = " glx"\n' + if 'opengl' not in sdl_packageconfig: + features += 'PACKAGECONFIG_append_pn-libsdl2-native = " opengl"\n' features += 'TEST_SUITES = "ping ssh virgl"\n' features += 'IMAGE_FEATURES_append = " ssh-server-dropbear"\n' features += 'IMAGE_INSTALL_append = " kmscube"\n' - features += 'TEST_RUNQEMUPARAMS = "gtk gl"\n' - self.write_config(features) + features_gtk = features + 'TEST_RUNQEMUPARAMS = "gtk gl"\n' + self.write_config(features_gtk) + bitbake('core-image-minimal') + bitbake('-c testimage core-image-minimal') + features_sdl = features + 'TEST_RUNQEMUPARAMS = "sdl gl"\n' + self.write_config(features_sdl) bitbake('core-image-minimal') bitbake('-c testimage core-image-minimal')
Signature · 1 line
2.17.1
PATCH 2/14 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} | 15 +-
9 files changed, 90 insertions(+), 844 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} (90%)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 +5 -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"
@@ -59,7 +55,7 @@ export PYTHON_ABI EXTRA_AUTORECONF_append = " --exclude=gnu-configize" EXTRA_OECONF_append = " --without-lua --enable-python" -EXTRA_OECONF_append_libc-musl = " --disable-nls" +EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp" # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs #
@@ -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 02/14] rpm: upgrade to 4.15.1
Quoted 10 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/756
Failed on ab selftest
https://errors.yoctoproject.org/Errors/Details/288828/
Quoted 1,089 lines
Signed-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} | 15 +- 9 files changed, 90 insertions(+), 844 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} (90%)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 +5
-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"@@ -59,7 +55,7 @@ export PYTHON_ABI EXTRA_AUTORECONF_append = " --exclude=gnu-configize" EXTRA_OECONF_append = " --without-lua --enable-python" -EXTRA_OECONF_append_libc-musl = " --disable-nls" +EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp" # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs #@@ -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 \
Re: [PATCH 02/14] rpm: upgrade to 4.15.1
I believe RP has a patch queued in master-next for this.
Alex
Quoted 1,263 lines · On Thu, 28 Nov 2019 at 16:22, akuster808 <[email protected]> wrote:
Quoted 10 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/756Failed on ab selftest
https://errors.yoctoproject.org/Errors/Details/288828/
Quoted 14 lines
Signed-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} | 15 +- 9 files changed, 90 insertions(+), 844 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}(90%)
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)Quoted 6 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +6
-0+ if (ms == NULL) { + rpmlog(RPMLOG_ERR, _("magic_open(0x%x) failed: %s\n"), + msflags, strerror(errno)); +- #pragma omp cancel parallel + } +meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
Quoted 10 lines
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch new file +10
-0+ 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)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 9 lines
meta/recipes-devtools/rpm/files/0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch deleted +0
-9- 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_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 10 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-10- 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);
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 9 lines
meta/recipes-devtools/rpm/files/0004-build-pack.c-remove-static-local-variables-from-buil.patch deleted +0
-9- 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);
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 90%
rename from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb rename to meta/recipes-devtools/rpm/rpm_4.15.1.bb indexc37330eb4c6..5896e78e734100644meta/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 9 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" S = "${WORKDIR}/git"meta/recipes-devtools/rpm/rpm_4.15.1.bb export PYTHON_ABI · line 60
Quoted 7 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1
-1@@ -59,7 +55,7 @@ export PYTHON_ABI EXTRA_AUTORECONF_append = " --exclude=gnu-configize" EXTRA_OECONF_append = " --without-lua --enable-python" -EXTRA_OECONF_append_libc-musl = " --disable-nls" +EXTRA_OECONF_append_libc-musl = " --disable-nls --disable-openmp" # --sysconfdir prevents rpm from attempting to access machine-specificconfiguration in sysroot/etc; we need to have it in rootfs
Quoted 11 lines
meta/recipes-devtools/rpm/rpm_4.15.1.bb renamed from meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1
-2#@@ -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 \
PATCH 3/14 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/14 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/14 rpm: fix spelling in one of the patches' Upstream-Status
In reply to Alexander Kanavin--- ...001-rpmfc.c-do-not-run-file-classification-in-parallel.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch +1 -1
@@ -6,7 +6,7 @@ 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] +Upstream-Status: Inappropriate [upstream wants a proper fix] Signed-off-by: Alexander Kanavin <[email protected]> --- build/rpmfc.c | 8 --------
Signature · 1 line
2.17.1
PATCH 6/14 dummy-sdk-package.inc: do not include files into RREPLACES
In reply to Alexander Kanavinrpm 4.15 no longer allows it, which makes sense.
--- meta/recipes-core/meta/dummy-sdk-package.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/meta/dummy-sdk-package.inc +2 -1
@@ -16,11 +16,12 @@ python() { ALLOW_EMPTY_${PN} = "1" PR[vardeps] += "DUMMYPROVIDES" +PR[vardeps] += "DUMMYPROVIDES_PACKAGES" python populate_packages_prepend() { p = d.getVar("PN") d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}") d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}") - d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}") + d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES_PACKAGES}") }
Signature · 1 line
2.17.1
Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
Quoted 3 lines · Alexander Kanavin
rpm 4.15 no longer allows it, which makes sense.
Signed-off-by Alexander Kanavin <[email protected]>
Hi Alex,
I tried this patch with rpm 4.15 and it fails to run task populate_sdk when multilib is enabled and lib32-perl is installed.
IMAGE_INSTALL_append = " lib32-perl "
It fails with:
No module defaults found
--> Starting dependency resolution
--> Finished dependency resolution
Error:
Problem: package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with lib32-perl provided by lib32-perl-5.30.1-r0.i586
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with lib32-perl-module-strict provided by lib32-perl-5.30.1-r0.i586
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with lib32-perl-module-warnings provided by lib32-perl-5.30.1-r0.i586
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with lib32-perl-module-vars provided by lib32-perl-5.30.1-r0.i586
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with lib32-perl-module-config provided by lib32-perl-5.30.1-r0.i586
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with lib32-perl-module-warnings-register provided by lib32-perl-5.30.1-r0.i586
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with /usr/bin/perl provided by lib32-perl-5.30.1-r0.i586
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with libperl.so.5 provided by lib32-perl-5.30.1-r0.i586
- conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Any suggestion about it, please?
Regards,
Kai
Quoted 22 lines
--- meta/recipes-core/meta/dummy-sdk-package.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/recipes-core/meta/dummy-sdk-package.inc +2
-1@@ -16,11 +16,12 @@ python() { ALLOW_EMPTY_${PN} = "1" PR[vardeps] += "DUMMYPROVIDES" +PR[vardeps] += "DUMMYPROVIDES_PACKAGES" python populate_packages_prepend() { p = d.getVar("PN") d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}") d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}") - d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}") + d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES_PACKAGES}") }
Signature · 1 line
Kai Kang
Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
Quoted 12 lines · Kang Kai
Quoted 3 lines · Alexander Kanavin
rpm 4.15 no longer allows it, which makes sense.
Signed-off-by Alexander Kanavin <[email protected]>Hi Alex,
I tried this patch with rpm 4.15 and it fails to run task
populate_sdkwhen multilib is enabled and lib32-perl is installed.
IMAGE_INSTALL_append= " lib32-perl "
I believe this is due to DUMMYPROVIDES_PACKAGES needing the same multilib expansion as:
DUMMYPROVIDES += "${@' '.join([multilib_pkg_extend(d, pkg) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}"
So that RREPLACES has all the multilib variants included.
However, there is also a different issue, that looks similar, but actually pre-dates this patch, and rpm 4.15 update:
if you doIMAGE_INSTALL_append = " perl "
(with multilib enabled), a similar error will happen:
Problem: package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-strict provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-warnings provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-vars provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-config provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-warnings-register provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with /usr/bin/perl provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with libperl.so.5 provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
obsoletes perl provided by perl-5.30.1-r0.core2_32
- cannot install the best candidate for the job
- conflicting requests
Inspecting /home/alexander/development/poky/build-multilib/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/sdk/image/opt/poky/3.0/sysroots/core2-32-poky-linux/etc/dnf/vars/arch, I see:
core2_32:i686:i586:x86:sdk_provides_dummy_target:qemux86:x86_64
Even though sdk_provides_dummy_target should be up-front, rather than in the middle (so that it takes priority over other architectures).
I could not figure out a good way to fix this, but I think this issue should be addressed first, and then we can fix the lib32/64-perl issue.
Alex
Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
Quoted 42 lines · Alexander Kanavin
On Thu, 2 Jan 2020 at 11:18, Kang Kai <[email protected] <mailto:[email protected]>> wrote:
On 2019/11/28 上午12:39, Alexander Kanavin wrote:
> rpm 4.15 no longer allows it, which makes sense. >
> Signed-off-by: Alexander Kanavin <[email protected] <mailto:[email protected]>>Hi Alex,
I tried this patch with rpm 4.15 and it fails to run task
populate_sdk
when multilib is enabled and lib32-perl is installed.
IMAGE_INSTALL_append= " lib32-perl "I believe this is due to
DUMMYPROVIDES_PACKAGESneeding the same multilib expansion as:DUMMYPROVIDES += "${@' '.join([multilib_pkg_extend(d, pkg) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}"
So that RREPLACES has all the multilib variants included.
However, there is also a different issue, that looks similar, but actually pre-dates this patch, and rpm 4.15 update:
if you do
IMAGE_INSTALL_append= " perl "(with multilib enabled), a similar error will happen:
Problem: package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-strict provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-warnings provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-vars provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-config provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-warnings-register provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with/usr/bin/perlprovided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with libperl.so.5 provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target obsoletes perl provided by perl-5.30.1-r0.core2_32
- cannot install the best candidate for the job
- conflicting requests
Quoted 7 lines
Inspecting
/home/alexander/development/poky/build-multilib/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/sdk/image/opt/poky/3.0/sysroots/core2-32-poky-linux/etc/dnf/vars/arch, I see:core2_32:i686:i586:x86:sdk_provides_dummy_target:qemux86:x86_64
Even though
sdk_provides_dummy_targetshould be up-front, rather than in the middle (so that it takes priority over other architectures).I could not figure out a good way to fix this, but I think this issue should be addressed first, and then we can fix the lib32/64-perl issue.
Thanks for your detailed reply. I'll try to figure a way out.
Regards,
Kai
Quoted 3 lines
Alex
Signature · 1 line
Kai Kang
Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
I made a couple of patches for this, they seem to fix the issues. Please test:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=a695bd5a8951b640add0cbc3e8171da7f58982b6
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=6574516432dec7e5a716ff7c17c1bcaea06a3fb7
Alex
Quoted 84 lines · Kang Kai
On 2020/1/3 上午2:06, Alexander Kanavin wrote:
Quoted 12 lines · Kang Kai
Quoted 3 lines · Alexander Kanavin
rpm 4.15 no longer allows it, which makes sense.
Signed-off-by Alexander Kanavin <[email protected]>Hi Alex,
I tried this patch with rpm 4.15 and it fails to run task
populate_sdkwhen multilib is enabled and lib32-perl is installed.
IMAGE_INSTALL_append= " lib32-perl "I believe this is due to
DUMMYPROVIDES_PACKAGESneeding the same multilib expansion as:DUMMYPROVIDES += "${@' '.join([multilib_pkg_extend(d, pkg) for pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}" <$%7B@''.join([multilib_pkg_extend(d,pkg)forpkgind.getVar('DUMMYPROVIDES_PACKAGES').split()])%7D>
So that RREPLACES has all the multilib variants included.
However, there is also a different issue, that looks similar, but actually pre-dates this patch, and rpm 4.15 update:
if you do
IMAGE_INSTALL_append= " perl "(with multilib enabled), a similar error will happen:
Problem: package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-strict provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-warnings provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-vars provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-config provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with perl-module-warnings-register provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with/usr/bin/perlprovided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
conflicts with libperl.so.5 provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target
obsoletes perl provided by perl-5.30.1-r0.core2_32
- cannot install the best candidate for the job
- conflicting requestsInspecting
/home/alexander/development/poky/build-multilib/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/sdk/image/opt/poky/3.0/sysroots/core2-32-poky-linux/etc/dnf/vars/arch, I see:core2_32:i686:i586:x86:sdk_provides_dummy_target:qemux86:x86_64
Even though
sdk_provides_dummy_targetshould be up-front, rather than in the middle (so that it takes priority over other architectures).I could not figure out a good way to fix this, but I think this issue should be addressed first, and then we can fix the lib32/64-perl issue.
Thanks for your detailed reply. I'll try to figure a way out.
Regards,
KaiAlex
--
Kai Kang
Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
Quoted 3 lines · Alexander Kanavin
I made a couple of patches for this, they seem to fix the issues. Please test:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=a695bd5a8951b640add0cbc3e8171da7f58982b6
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=akanavin/package-version-updates&id=6574516432dec7e5a716ff7c17c1bcaea06a3fb7
It works to run populate_sdk tasks with these 2 patches. Thanks.
Kai
Quoted 101 lines
Alex
On Fri, 3 Jan 2020 at 01:49, Kang Kai <[email protected] <mailto:[email protected]>> wrote:
On 2020/1/3 上午2:06, Alexander Kanavin wrote:Quoted 73 lines
On Thu, 2 Jan 2020 at 11:18, Kang Kai <[email protected] <mailto:[email protected]>> wrote:
On 2019/11/28 上午12:39, Alexander Kanavin wrote:
> rpm 4.15 no longer allows it, which makes sense. >
> Signed-off-by: Alexander Kanavin <[email protected] <mailto:[email protected]>>Hi Alex,
I tried this patch with rpm 4.15 and it fails to run task
populate_sdk
when multilib is enabled and lib32-perl is installed.
IMAGE_INSTALL_append= " lib32-perl "I believe this is due to
DUMMYPROVIDES_PACKAGESneeding the same multilib expansion as:DUMMYPROVIDES += "${@' '.join([multilib_pkg_extend(d, pkg) for
pkg in d.getVar('DUMMYPROVIDES_PACKAGES').split()])}" <mailto:$%7B@''.join([multilib_pkg_extend(d,pkg)forpkgind.getVar('DUMMYPROVIDES_PACKAGES').split()])%7D>So that RREPLACES has all the multilib variants included.
However, there is also a different issue, that looks similar, but actually pre-dates this patch, and rpm 4.15 update:
if you do
IMAGE_INSTALL_append= " perl "(with multilib enabled), a similar error will happen:
Problem: package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-strict provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-warnings provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-vars provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-config provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with perl-module-warnings-register provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with/usr/bin/perlprovided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target conflicts with libperl.so.5 provided by perl-5.30.1-r0.core2_32
- package target-sdk-provides-dummy-1.0-r0.sdk_provides_dummy_target obsoletes perl provided by perl-5.30.1-r0.core2_32
- cannot install the best candidate for the job
- conflicting requestsInspecting
/home/alexander/development/poky/build-multilib/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/sdk/image/opt/poky/3.0/sysroots/core2-32-poky-linux/etc/dnf/vars/arch, I see:core2_32:i686:i586:x86:sdk_provides_dummy_target:qemux86:x86_64
Quoted 7 lines
Even though
sdk_provides_dummy_targetshould be up-front, rather than in the middle (so that it takes priority over other architectures).I could not figure out a good way to fix this, but I think this issue should be addressed first, and then we can fix the lib32/64-perl issue.
Thanks for your detailed reply. I'll try to figure a way out.
Regards,
KaiQuoted 3 lines
Alex
-- Kai Kang
Signature · 1 line
Kai Kang
PATCH 7/14 gettext-minimal-native: update to 0.20.1
In reply to Alexander KanavinRather than update a tarball, I took m4 files directly from an install of 0.20.1.
The patch is dropped as guile has long been removed from oe-core.
---
...H-Disable-the-test-to-convert-euc-jp.patch | 38 -
.../gettext-minimal-0.19.8.1/aclocal.tgz | Bin 40014 -> 0 bytes
.../COPYING | 0
.../Makefile.in.in | 124 +--
.../gettext-minimal-0.20.1/aclocal/gettext.m4 | 386 +++++++++
.../aclocal/host-cpu-c-abi.m4 | 644 +++++++++++++++
.../gettext-minimal-0.20.1/aclocal/iconv.m4 | 288 +++++++
.../aclocal/intlmacosx.m4 | 72 ++
.../gettext-minimal-0.20.1/aclocal/lib-ld.m4 | 168 ++++
.../aclocal/lib-link.m4 | 774 ++++++++++++++++++
.../aclocal/lib-prefix.m4 | 249 ++++++
.../gettext-minimal-0.20.1/aclocal/nls.m4 | 32 +
.../gettext-minimal-0.20.1/aclocal/po.m4 | 450 ++++++++++
.../aclocal/progtest.m4 | 91 ++
.../config.rpath | 2 +-
.../remove-potcdate.sin | 8 +-
....1.bb => gettext-minimal-native_0.20.1.bb} | 5 +-
17 files changed, 3236 insertions(+), 95 deletions(-)
delete mode 100644 meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch
delete mode 100644 meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgz
rename meta/recipes-core/gettext/{gettext-minimal-0.19.8.1 => gettext-minimal-0.20.1}/COPYING (100%)
rename meta/recipes-core/gettext/{gettext-minimal-0.19.8.1 => gettext-minimal-0.20.1}/Makefile.in.in (78%)
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/gettext.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/host-cpu-c-abi.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/iconv.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/intlmacosx.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-ld.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-link.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-prefix.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/nls.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/po.m4
create mode 100644 meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/progtest.m4
rename meta/recipes-core/gettext/{gettext-minimal-0.19.8.1 => gettext-minimal-0.20.1}/config.rpath (99%)
rename meta/recipes-core/gettext/{gettext-minimal-0.19.8.1 => gettext-minimal-0.20.1}/remove-potcdate.sin (50%)
rename meta/recipes-core/gettext/{gettext-minimal-native_0.19.8.1.bb => gettext-minimal-native_0.20.1.bb} (86%)meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch deleted +0 -38
@@ -1,38 +0,0 @@ -[PATCH] Disable the test to convert euc-jp - -Remove the test "Test against HP-UX 11.11 bug: -No converter from EUC-JP to UTF-8 is provided" -since we don't support HP-UX and if the euc-jp is not -installed on the host, the dependence will be built without -iconv support and will cause guile-native building fail. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Roy Li <[email protected]> ---- - iconv.m4 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/iconv.m4 b/iconv.m4 -index 4e37363..35f54bd 100644 ---- a/iconv.m4 -+++ b/iconv.m4 -@@ -165,6 +165,7 @@ AC_DEFUN([AM_ICONV_LINK], - } - } - #endif -+#if 0 - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ -@@ -176,6 +177,7 @@ AC_DEFUN([AM_ICONV_LINK], - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; -+#endif - return result; - ]])], - [am_cv_func_iconv_works=yes], , --- -2.0.1 -
meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgz deleted binary +0 -0
meta/recipes-core/gettext/gettext-minimal-0.20.1/COPYING renamed from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/COPYING +0 -0
meta/recipes-core/gettext/gettext-minimal-0.20.1/Makefile.in.in renamed from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in +72 -52
244 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/gettext.m4 new file +386 -0
386 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/host-cpu-c-abi.m4 new file +644 -0
644 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/iconv.m4 new file +288 -0
288 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/intlmacosx.m4 new file +72 -0
72 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-ld.m4 new file +168 -0
168 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-link.m4 new file +774 -0
774 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-prefix.m4 new file +249 -0
249 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/nls.m4 new file +32 -0
@@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019 Free Software +dnl Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper <[email protected]>, 1995-2000. +dnl Bruno Haible <[email protected]>, 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +])
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/po.m4 new file +450 -0
105 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/progtest.m4 new file +91 -0
91 lines not on this page · raw message
meta/recipes-core/gettext/gettext-minimal-0.20.1/config.rpath renamed from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath +1 -1
Lines of this file are not shown. View the raw message.
meta/recipes-core/gettext/gettext-minimal-0.20.1/remove-potcdate.sin renamed from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/remove-potcdate.sin +7 -1
Lines of this file are not shown. View the raw message.
meta/recipes-core/gettext/gettext-minimal-native_0.20.1.bb renamed from meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb +2 -3
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 8/14 gettext: update to 0.20.1
In reply to Alexander KanavinLicense-Update: URLs changed from http to https
---
.../gettext-0.19.8.1/fix-CVE-2018-18751.patch | 141 ----
.../gettext/gettext-0.19.8.1/parallel.patch | 23 -
.../gettext-0.19.8.1/use-pkgconfig.patch | 321 --------
.../add-with-bisonlocaledir.patch | 0
...nt.c-timsort.h-fix-formatting-issues.patch | 30 +-
.../gettext/gettext-0.20.1/parallel.patch | 32 +
.../run-ptest | 0
.../serial-tests-config.patch | 26 +-
.../gettext-0.20.1/use-pkgconfig.patch | 713 ++++++++++++++++++
...{gettext_0.19.8.1.bb => gettext_0.20.1.bb} | 23 +-
10 files changed, 775 insertions(+), 534 deletions(-)
delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/add-with-bisonlocaledir.patch (100%)
rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/cr-statement.c-timsort.h-fix-formatting-issues.patch (68%)
create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/run-ptest (100%)
rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/serial-tests-config.patch (75%)
create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
rename meta/recipes-core/gettext/{gettext_0.19.8.1.bb => gettext_0.20.1.bb} (94%)meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0 -141
@@ -1,141 +0,0 @@ -Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=dce3a16] -CVE: CVE-2018-18751 - -Signed-off-by: Kai Kang <[email protected]> - -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 -From: Daiki Ueno <[email protected]> -Date: Thu, 15 Sep 2016 13:57:24 +0200 -Subject: [PATCH] xgettext: Fix crash with *.po file input - -When xgettext was given two *.po files with the same msgid_plural, it -crashed with double-free. Problem reported by Davlet Panech in: -http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html -* gettext-tools/src/po-gram-gen.y: Don't free msgid_pluralform after -calling do_callback_message, assuming that it takes ownership. -* gettext-tools/src/read-catalog.c (default_add_message): Free -msgid_plural after calling message_alloc. -* gettext-tools/tests/xgettext-po-2: New file. -* gettext-tools/tests/Makefile.am (TESTS): Add new test. ---- - gettext-tools/src/po-gram-gen.y | 13 ++++----- - gettext-tools/src/read-catalog.c | 2 ++ - gettext-tools/tests/Makefile.am | 2 +- - gettext-tools/tests/xgettext-po-2 | 55 +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 63 insertions(+), 9 deletions(-) - create mode 100755 gettext-tools/tests/xgettext-po-2 - -diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y -index becf5e6..4428e77 100644 ---- a/gettext-tools/src/po-gram-gen.y -+++ b/gettext-tools/src/po-gram-gen.y -@@ -221,14 +221,11 @@ message - check_obsolete ($1, $3); - check_obsolete ($1, $4); - if (!$1.obsolete || pass_obsolete_entries) -- { -- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -- $1.prev_ctxt, -- $1.prev_id, $1.prev_id_plural, -- $1.obsolete); -- free ($3.string); -- } -+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -+ $1.prev_ctxt, -+ $1.prev_id, $1.prev_id_plural, -+ $1.obsolete); - else - { - free_message_intro ($1); -diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c -index 571d18e..6af6d20 100644 ---- a/gettext-tools/src/read-catalog.c -+++ b/gettext-tools/src/read-catalog.c -@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this, - appropriate. */ - mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len, - msgstr_pos); -+ if (msgid_plural != NULL) -+ free (msgid_plural); - mp->prev_msgctxt = prev_msgctxt; - mp->prev_msgid = prev_msgid; - mp->prev_msgid_plural = prev_msgid_plural; -diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am -index 23b09b1..0dfb4d8 100644 ---- a/gettext-tools/tests/Makefile.am -+++ b/gettext-tools/tests/Makefile.am -@@ -95,7 +95,7 @@ TESTS = gettext-1 gettext-2 gettext-3 gettext-4 gettext-5 gettext-6 gettext-7 \ - xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \ - xgettext-perl-5 xgettext-perl-6 xgettext-perl-7 xgettext-perl-8 \ - xgettext-php-1 xgettext-php-2 xgettext-php-3 xgettext-php-4 \ -- xgettext-po-1 \ -+ xgettext-po-1 xgettext-po-2 \ - xgettext-properties-1 \ - xgettext-python-1 xgettext-python-2 xgettext-python-3 \ - xgettext-python-4 \ -diff --git a/gettext-tools/tests/xgettext-po-2 b/gettext-tools/tests/xgettext-po-2 -new file mode 100755 -index 0000000..c4bd9d0 ---- /dev/null -+++ b/gettext-tools/tests/xgettext-po-2 -@@ -0,0 +1,55 @@ -+#! /bin/sh -+. "${srcdir=.}/init.sh"; path_prepend_ . ../src -+ -+# Test PO extractors with multiple input files. -+ -+cat <<EOF > xg-po-2-1.po -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+cat <<EOF > xg-po-2-2.po -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${XGETTEXT=xgettext} -+${XGETTEXT} --omit-header xg-po-2-1.po xg-po-2-2.po -o xg-po-2.tmp.po || Exit 1 -+LC_ALL=C tr -d '\r' < xg-po-2.tmp.po > xg-po-2.po || Exit 1 -+ -+cat <<EOF > xg-po-2.ok -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${DIFF=diff} -+${DIFF} xg-po-2.ok xg-po-2.po -+result=$? -+ -+exit $result --- -1.9.1 -
meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch deleted +0 -23
@@ -1,23 +0,0 @@ -instal libgettextlib.a before removing it - -In a multiple job build, Makefile can simultaneously -be installing and removing libgettextlib.a. We serialize -the operations. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater <[email protected]> - ---- a/gettext-tools/gnulib-lib/Makefile.am -+++ b/gettext-tools/gnulib-lib/Makefile.am -@@ -57,6 +57,10 @@ endif - # Rules generated and collected by gnulib-tool. - include Makefile.gnulib - -+# defined in Makefile.gnulib but missing this dependency -+# -+install-exec-clean: install-libLTLIBRARIES -+ - # Which classes to export from the shared library. - MOOPPFLAGS += --dllexport=styled_ostream -
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0 -321
321 lines not on this page · raw message
meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch +0 -0
meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch +7 -23
@@ -1,4 +1,4 @@ -From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001 +From f6245ef5530fc37a6243e798df34162fbbeab6f0 Mon Sep 17 00:00:00 2001 From: Robert Yang <[email protected]> Date: Sun, 19 Feb 2017 23:32:46 -0800 Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues
@@ -15,15 +15,15 @@ gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects Upstream-Status: Pending Signed-off-by: Robert Yang <[email protected]> + --- - gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++----- - gettext-tools/gnulib-lib/libxml/timsort.h | 2 +- - 2 files changed, 6 insertions(+), 6 deletions(-) + libtextstyle/lib/libcroco/cr-statement.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c +diff --git a/libtextstyle/lib/libcroco/cr-statement.c b/libtextstyle/lib/libcroco/cr-statement.c index 617520f..100104b 100644 ---- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c -+++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c +--- a/libtextstyle/lib/libcroco/cr-statement.c ++++ b/libtextstyle/lib/libcroco/cr-statement.c @@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent) g_return_if_fail (a_fp && a_this); str = cr_statement_ruleset_to_string (a_this, a_indent);
@@ -69,19 +69,3 @@ index 617520f..100104b 100644 g_free (str) ; str = NULL ; } -diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h -index 795f272..443918a 100644 ---- a/gettext-tools/gnulib-lib/libxml/timsort.h -+++ b/gettext-tools/gnulib-lib/libxml/timsort.h -@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size) - SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE)); - if (tempstore == NULL) - { -- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); -+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size); - exit(1); - } - store->storage = tempstore; --- -2.10.2 -
meta/recipes-core/gettext/gettext-0.20.1/parallel.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001 +From: Joe Slater <[email protected]> +Date: Thu, 7 Jun 2012 16:37:01 -0700 +Subject: [PATCH] instal libgettextlib.a before removing it + +In a multiple job build, Makefile can simultaneously +be installing and removing libgettextlib.a. We serialize +the operations. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <[email protected]> + +--- + gettext-tools/gnulib-lib/Makefile.am | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gettext-tools/gnulib-lib/Makefile.am b/gettext-tools/gnulib-lib/Makefile.am +index 2126699..d2dd7e4 100644 +--- a/gettext-tools/gnulib-lib/Makefile.am ++++ b/gettext-tools/gnulib-lib/Makefile.am +@@ -58,6 +58,10 @@ endif + # Rules generated and collected by gnulib-tool. + include Makefile.gnulib + ++# defined in Makefile.gnulib but missing this dependency ++# ++install-exec-clean: install-libLTLIBRARIES ++ + # OS/2 does not support a DLL name longer than 8 characters. + if OS2 + libgettextlib_la_LDFLAGS += -os2dllname gtlib
meta/recipes-core/gettext/gettext-0.20.1/run-ptest renamed from meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest +0 -0
meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch +12 -14
@@ -1,4 +1,4 @@ -From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001 +From ed64a5724ef7d6eb4e9a876f817ea266a536e195 Mon Sep 17 00:00:00 2001 From: "Hongjun.Yang" <[email protected]> Date: Thu, 28 Jul 2016 12:36:15 +0800 Subject: [PATCH] fix for ptest
@@ -8,6 +8,7 @@ Add serial-tests support, ptest need it Upstream-Status: Inappropriate [oe specific] Signed-off-by: Changqing Li <[email protected]> + --- configure.ac | 2 +- gettext-runtime/configure.ac | 2 +-
@@ -15,24 +16,24 @@ Signed-off-by: Changqing Li <[email protected]> 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index 5e996fa..880581f 100644 +index 38db6fd..f019ae0 100644 --- a/configure.ac +++ b/configure.ac -@@ -23,7 +23,7 @@ AC_INIT([gettext], - [[email protected]]) +@@ -22,7 +22,7 @@ AC_INIT([gettext], + [[email protected]]) AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) AC_CONFIG_AUX_DIR([build-aux]) --AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip]) -+AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip]) +-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar]) ++AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests tar-ustar]) dnl Override automake's tar command used for creating distributions. - am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"' + am__tar='${AMTAR} chf - --format=ustar --owner=root --group=root "$$tardir"' diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac -index e9299b6..d4f5528 100644 +index de203e7..138a07f 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], - [[email protected]]) + [[email protected]]) AC_CONFIG_SRCDIR([intl/dcigettext.c]) AC_CONFIG_AUX_DIR([../build-aux]) -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
@@ -41,11 +42,11 @@ index e9299b6..d4f5528 100644 dnl Installation directories. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac -index 920eeb6..c507434 100644 +index cf1dd73..b544d6d 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -22,7 +22,7 @@ AC_INIT([gettext-tools], - [[email protected]]) + [[email protected]]) AC_CONFIG_SRCDIR([src/msgfmt.c]) AC_CONFIG_AUX_DIR([../build-aux]) -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])
@@ -53,6 +54,3 @@ index 920eeb6..c507434 100644 AC_CONFIG_HEADERS([config.h]) dnl Installation directories. --- -2.1.4 -
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +713 -0
713 lines not on this page · raw message
meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +11 -12
@@ -6,7 +6,7 @@ a few stand-alone programs to massage in various ways the sets of translatable a HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" SECTION = "libs" LICENSE = "GPLv3+ & LGPL-2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" # Because po-gram-gen.y has been modified by fix-CVE-2018-18751.patch, # it requires yacc which provided by bison-native
@@ -17,17 +17,16 @@ PROVIDES = "virtual/libintl virtual/gettext" PROVIDES_class-native = "virtual/gettext-native" RCONFLICTS_${PN} = "proxy-libintl" SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ - file://parallel.patch \ - file://add-with-bisonlocaledir.patch \ - file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ - file://use-pkgconfig.patch \ - file://fix-CVE-2018-18751.patch \ - file://run-ptest \ - file://serial-tests-config.patch \ -" + file://parallel.patch \ + file://add-with-bisonlocaledir.patch \ + file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ + file://use-pkgconfig.patch \ + file://run-ptest \ + file://serial-tests-config.patch \ + " -SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" -SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43" +SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2" +SRC_URI[sha256sum] = "66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c" inherit autotools texinfo pkgconfig ptest
@@ -127,7 +126,7 @@ do_install_append_class-native () { rm ${D}${datadir}/gettext/po/remove-potcdate.sin create_wrapper ${D}${bindir}/msgfmt \ - GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.19.8/" + GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.20/" }
Signature · 1 line
2.17.1
Re: [PATCH 08/14] gettext: update to 0.20.1
Quoted 2 lines · Alexander Kanavin
License-Update: URLs changed from http to https
Signed-off-by Alexander Kanavin <[email protected]>
This failed on the AB
https://errors.yoctoproject.org/Errors/Details/288797/
an for meta-mingw bbappend.
https://errors.yoctoproject.org/Errors/Details/284185/
Quoted 1,473 lines
--- .../gettext-0.19.8.1/fix-CVE-2018-18751.patch | 141 ---- .../gettext/gettext-0.19.8.1/parallel.patch | 23 - .../gettext-0.19.8.1/use-pkgconfig.patch | 321 -------- .../add-with-bisonlocaledir.patch | 0 ...nt.c-timsort.h-fix-formatting-issues.patch | 30 +- .../gettext/gettext-0.20.1/parallel.patch | 32 + .../run-ptest | 0 .../serial-tests-config.patch | 26 +- .../gettext-0.20.1/use-pkgconfig.patch | 713 ++++++++++++++++++ ...{gettext_0.19.8.1.bb => gettext_0.20.1.bb} | 23 +- 10 files changed, 775 insertions(+), 534 deletions(-) delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch delete mode 100644 meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/add-with-bisonlocaledir.patch (100%) rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/cr-statement.c-timsort.h-fix-formatting-issues.patch (68%) create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/parallel.patch rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/run-ptest (100%) rename meta/recipes-core/gettext/{gettext-0.19.8.1 => gettext-0.20.1}/serial-tests-config.patch (75%) create mode 100644 meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch rename meta/recipes-core/gettext/{gettext_0.19.8.1.bb => gettext_0.20.1.bb} (94%)meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-141@@ -1,141 +0,0 @@ -Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=dce3a16] -CVE: CVE-2018-18751 - -Signed-off-by: Kai Kang <[email protected]> - -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 -From: Daiki Ueno <[email protected]> -Date: Thu, 15 Sep 2016 13:57:24 +0200 -Subject: [PATCH] xgettext: Fix crash with *.po file input - -When xgettext was given two *.po files with the same msgid_plural, it -crashed with double-free. Problem reported by Davlet Panech in: -http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html -* gettext-tools/src/po-gram-gen.y: Don't free msgid_pluralform after -calling do_callback_message, assuming that it takes ownership. -* gettext-tools/src/read-catalog.c (default_add_message): Free -msgid_plural after calling message_alloc. -* gettext-tools/tests/xgettext-po-2: New file. -* gettext-tools/tests/Makefile.am (TESTS): Add new test. ---- - gettext-tools/src/po-gram-gen.y | 13 ++++----- - gettext-tools/src/read-catalog.c | 2 ++ - gettext-tools/tests/Makefile.am | 2 +- - gettext-tools/tests/xgettext-po-2 | 55 +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 63 insertions(+), 9 deletions(-) - create mode 100755 gettext-tools/tests/xgettext-po-2 - -diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y -index becf5e6..4428e77 100644 ---- a/gettext-tools/src/po-gram-gen.y -+++ b/gettext-tools/src/po-gram-gen.y -@@ -221,14 +221,11 @@ message - check_obsolete ($1, $3); - check_obsolete ($1, $4); - if (!$1.obsolete || pass_obsolete_entries) -- { -- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -- $1.prev_ctxt, -- $1.prev_id, $1.prev_id_plural, -- $1.obsolete); -- free ($3.string); -- } -+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string, -+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos, -+ $1.prev_ctxt, -+ $1.prev_id, $1.prev_id_plural, -+ $1.obsolete); - else - { - free_message_intro ($1); -diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c -index 571d18e..6af6d20 100644 ---- a/gettext-tools/src/read-catalog.c -+++ b/gettext-tools/src/read-catalog.c -@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this, - appropriate. */ - mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len, - msgstr_pos); -+ if (msgid_plural != NULL) -+ free (msgid_plural); - mp->prev_msgctxt = prev_msgctxt; - mp->prev_msgid = prev_msgid; - mp->prev_msgid_plural = prev_msgid_plural; -diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am -index 23b09b1..0dfb4d8 100644 ---- a/gettext-tools/tests/Makefile.am -+++ b/gettext-tools/tests/Makefile.am -@@ -95,7 +95,7 @@ TESTS = gettext-1 gettext-2 gettext-3 gettext-4 gettext-5 gettext-6 gettext-7 \ - xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \ - xgettext-perl-5 xgettext-perl-6 xgettext-perl-7 xgettext-perl-8 \ - xgettext-php-1 xgettext-php-2 xgettext-php-3 xgettext-php-4 \ -- xgettext-po-1 \ -+ xgettext-po-1 xgettext-po-2 \ - xgettext-properties-1 \ - xgettext-python-1 xgettext-python-2 xgettext-python-3 \ - xgettext-python-4 \ -diff --git a/gettext-tools/tests/xgettext-po-2 b/gettext-tools/tests/xgettext-po-2 -new file mode 100755 -index 0000000..c4bd9d0 ---- /dev/null -+++ b/gettext-tools/tests/xgettext-po-2 -@@ -0,0 +1,55 @@ -+#! /bin/sh -+. "${srcdir=.}/init.sh"; path_prepend_ . ../src -+ -+# Test PO extractors with multiple input files. -+ -+cat <<EOF > xg-po-2-1.po -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+cat <<EOF > xg-po-2-2.po -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${XGETTEXT=xgettext} -+${XGETTEXT} --omit-header xg-po-2-1.po xg-po-2-2.po -o xg-po-2.tmp.po || Exit 1 -+LC_ALL=C tr -d '\r' < xg-po-2.tmp.po > xg-po-2.po || Exit 1 -+ -+cat <<EOF > xg-po-2.ok -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${DIFF=diff} -+${DIFF} xg-po-2.ok xg-po-2.po -+result=$? -+ -+exit $result --- -1.9.1 -meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch deleted +0
-23@@ -1,23 +0,0 @@ -instal libgettextlib.a before removing it - -In a multiple job build, Makefile can simultaneously -be installing and removing libgettextlib.a. We serialize -the operations. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater <[email protected]> - ---- a/gettext-tools/gnulib-lib/Makefile.am -+++ b/gettext-tools/gnulib-lib/Makefile.am -@@ -57,6 +57,10 @@ endif - # Rules generated and collected by gnulib-tool. - include Makefile.gnulib - -+# defined in Makefile.gnulib but missing this dependency -+# -+install-exec-clean: install-libLTLIBRARIES -+ - # Which classes to export from the shared library. - MOOPPFLAGS += --dllexport=styled_ostream -meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-321@@ -1,321 +0,0 @@ -For reasons which I just can't fathom gnulib doesn't use the expected tools to -find libraries but badly reinvents the wheel. This will trivially lead to host -contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad -canonicalisation resulting in relative paths). - -Simply delete all the crazy, and replace with a single call to pkg-config. - -Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config) -Signed-off-by: Ross Burton <[email protected]> - -diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4 -index f79ea82f1..1f67274db 100644 ---- a/gettext-tools/gnulib-m4/libcroco.m4 -+++ b/gettext-tools/gnulib-m4/libcroco.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBCROCO], - [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - dnl libcroco depends on libglib. - AC_REQUIRE([gl_LIBGLIB]) - -@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO], - LTLIBCROCO= - INCCROCO= - if test "$gl_cv_libcroco_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to -- dnl use the included one. -- AC_CACHE_VAL([gl_cv_libcroco], [ -- gl_cv_libcroco=no -- gl_cv_LIBCROCO= -- gl_cv_LTLIBCROCO= -- gl_cv_INCCROCO= -- gl_save_LIBS="$LIBS" -- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and -- dnl INCCROCO_0_6 accordingly. -- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when -- dnl cross-compiling or when the C compiler in use is different from the -- dnl one that built the library. -- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) -- LIBS="$gl_save_LIBS $LIBCROCO_0_6" -- AC_TRY_LINK([#include <libcroco-config.h>], -- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- ]) -- if test "$gl_cv_libcroco" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" -- AC_TRY_LINK([#include <libcroco-config.h>], -- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- gl_cv_INCCROCO="$INCCROCO_0_6" -- ]) -- if test "$gl_cv_libcroco" != yes; then -- dnl Often the include files are installed in -- dnl /usr/include/libcroco-0.6/libcroco. -- AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>], -- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) -- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` -- if test -d "$libcroco_include_dir"; then -- gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- gl_cv_INCCROCO="-I$libcroco_include_dir" -- fi -- ]) -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for libcroco]) -- AC_MSG_RESULT([$gl_cv_libcroco]) -- if test $gl_cv_libcroco = yes; then -- LIBCROCO="$gl_cv_LIBCROCO" -- LTLIBCROCO="$gl_cv_LTLIBCROCO" -- INCCROCO="$gl_cv_INCCROCO" -- else -- gl_cv_libcroco_use_included=yes -- fi -+ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) -+ LIBCROCO=$CROCO_LIBS -+ LTLIBCROCO=$CROCO_LIBS -+ INCCROCO=$CROCO_CFLAGS - fi - AC_SUBST([LIBCROCO]) - AC_SUBST([LTLIBCROCO]) -diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4 -index 42e55e6fd..ab25a5b22 100644 ---- a/gettext-tools/gnulib-m4/libglib.m4 -+++ b/gettext-tools/gnulib-m4/libglib.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBGLIB], - [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_MSG_CHECKING([whether included glib is requested]) - AC_ARG_WITH([included-glib], - [ --with-included-glib use the glib2 included here], -@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB], - LTLIBGLIB= - INCGLIB= - if test "$gl_cv_libglib_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use -- dnl the included one. -- AC_CACHE_VAL([gl_cv_libglib], [ -- gl_cv_libglib=no -- gl_cv_LIBGLIB= -- gl_cv_LTLIBGLIB= -- gl_cv_INCGLIB= -- gl_save_LIBS="$LIBS" -- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and -- dnl INCGLIB_2_0 accordingly. -- dnl Don't use glib-config nor pkg-config, since it doesn't work when -- dnl cross-compiling or when the C compiler in use is different from the -- dnl one that built the library. -- AC_LIB_LINKFLAGS_BODY([glib-2.0]) -- LIBS="$gl_save_LIBS $LIBGLIB_2_0" -- AC_TRY_LINK([#include <glib.h> --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- ]) -- if test "$gl_cv_libglib" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" -- AC_TRY_LINK([#include <glib.h> --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- gl_cv_INCGLIB="$INCGLIB_2_0" -- ]) -- if test "$gl_cv_libglib" != yes; then -- dnl Often the include files are installed in /usr/include/glib-2.0 -- dnl and /usr/lib/glib-2.0/include. -- if test -n "$LIBGLIB_2_0_PREFIX"; then -- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" -- AC_TRY_LINK([#include <glib.h> --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" -- ]) -- fi -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for glib]) -- AC_MSG_RESULT([$gl_cv_libglib]) -- if test $gl_cv_libglib = yes; then -- LIBGLIB="$gl_cv_LIBGLIB" -- LTLIBGLIB="$gl_cv_LTLIBGLIB" -- INCGLIB="$gl_cv_INCGLIB" -- else -- gl_cv_libglib_use_included=yes -- fi -+ PKG_CHECK_MODULES([GLIB], [glib-2.0]) -+ LIBGLIB="$GLIB_LIBS" -+ LTLIBGLIB="$GLIB_LIBS" -+ INCGLIB="$GLIB_CFLAGS" - fi - AC_SUBST([LIBGLIB]) - AC_SUBST([LTLIBGLIB]) -diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4 -index 480c700d2..cb39309d5 100644 ---- a/gettext-tools/gnulib-m4/libxml.m4 -+++ b/gettext-tools/gnulib-m4/libxml.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBXML], - [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_REQUIRE([AM_ICONV_LINK]) - - AC_MSG_CHECKING([whether included libxml is requested]) -@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML], - LTLIBXML= - INCXML= - if test "$gl_cv_libxml_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libxml2, or have to use -- dnl the included one. -- AC_CACHE_VAL([gl_cv_libxml], [ -- gl_cv_libxml=no -- gl_cv_LIBXML= -- gl_cv_LTLIBXML= -- gl_cv_INCXML= -- gl_save_LIBS="$LIBS" -- LIBS="$LIBS $LIBICONV" -- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2 -- dnl accordingly. -- dnl Don't use xml2-config nor pkg-config, since it doesn't work when -- dnl cross-compiling or when the C compiler in use is different from the -- dnl one that built the library. -- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x, -- dnl libxml2 is built in such a way that uses of xmlFree work fine with -- dnl -Wl,--enable-auto-import but lead to a link error with -- dnl -Wl,--disable-auto-import. -- AC_LIB_LINKFLAGS_BODY([xml2]) -- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" -- AC_TRY_LINK([#include <libxml/xmlversion.h> -- #include <libxml/xmlmemory.h> -- #include <libxml/xpath.h> -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- ]) -- if test "$gl_cv_libxml" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCXML2" -- AC_TRY_LINK([#include <libxml/xmlversion.h> -- #include <libxml/xmlmemory.h> -- #include <libxml/xpath.h> -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- gl_cv_INCXML="$INCXML2" -- ]) -- if test "$gl_cv_libxml" != yes; then -- dnl Often the include files are installed in /usr/include/libxml2. -- dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained. -- dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is -- dnl self-contained. -- libxml2_include_dir= -- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>], -- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) -- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'` -- ]) -- if test -z "$libxml2_include_dir"; then -- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>], -- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) -- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'` -- ]) -- fi -- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then -- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" -- AC_TRY_LINK([#include <libxml/xmlversion.h> -- #include <libxml/xmlmemory.h> -- #include <libxml/xpath.h> -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- gl_cv_INCXML="-I$libxml2_include_dir" -- ]) -- fi -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for libxml]) -- AC_MSG_RESULT([$gl_cv_libxml]) -- if test $gl_cv_libxml = yes; then -- LIBXML="$gl_cv_LIBXML" -- LTLIBXML="$gl_cv_LTLIBXML" -- INCXML="$gl_cv_INCXML" -- else -- gl_cv_libxml_use_included=yes -- fi -+ PKG_CHECK_MODULES([XML], [libxml-2.0]) -+ LIBXML=$XML_LIBS -+ LTLIBXML=$XML_LIBS -+ INCXML=$XML_CFLAGS - fi - AC_SUBST([LIBXML]) - AC_SUBST([LTLIBXML]) -diff --git a/gnulib-local/lib/term-styled-ostream.oo.c b/gnulib-local/lib/term-styled-ostream.oo.c -index 81a407467..218565329 100644 ---- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c -+++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c -@@ -25,4 +25,4 @@ --#include <cr-om-parser.h> --#include <cr-sel-eng.h> --#include <cr-style.h> --#include <cr-rgb.h> -+#include <libcroco/cr-om-parser.h> -+#include <libcroco/cr-sel-eng.h> -+#include <libcroco/cr-style.h> -+#include <libcroco/cr-rgb.h> -@@ -31 +31 @@ --# include <cr-fonts.h> -+# include <libcroco/cr-fonts.h> -@@ -33 +33 @@ --#include <cr-string.h> -+#include <libcroco/cr-string.h>meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch +0
-0meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch +7
-23@@ -1,4 +1,4 @@ -From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001 +From f6245ef5530fc37a6243e798df34162fbbeab6f0 Mon Sep 17 00:00:00 2001 From: Robert Yang <[email protected]> Date: Sun, 19 Feb 2017 23:32:46 -0800 Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues@@ -15,15 +15,15 @@ gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects Upstream-Status: Pending Signed-off-by: Robert Yang <[email protected]> + --- - gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++----- - gettext-tools/gnulib-lib/libxml/timsort.h | 2 +- - 2 files changed, 6 insertions(+), 6 deletions(-) + libtextstyle/lib/libcroco/cr-statement.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c +diff --git a/libtextstyle/lib/libcroco/cr-statement.c b/libtextstyle/lib/libcroco/cr-statement.c index 617520f..100104b 100644 ---- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c -+++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c +--- a/libtextstyle/lib/libcroco/cr-statement.c ++++ b/libtextstyle/lib/libcroco/cr-statement.c @@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent) g_return_if_fail (a_fp && a_this); str = cr_statement_ruleset_to_string (a_this, a_indent);@@ -69,19 +69,3 @@ index 617520f..100104b 100644 g_free (str) ; str = NULL ; } -diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h -index 795f272..443918a 100644 ---- a/gettext-tools/gnulib-lib/libxml/timsort.h -+++ b/gettext-tools/gnulib-lib/libxml/timsort.h -@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size) - SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE)); - if (tempstore == NULL) - { -- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); -+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size); - exit(1); - } - store->storage = tempstore; --- -2.10.2 -meta/recipes-core/gettext/gettext-0.20.1/parallel.patch new file +32
-0@@ -0,0 +1,32 @@ +From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001 +From: Joe Slater <[email protected]> +Date: Thu, 7 Jun 2012 16:37:01 -0700 +Subject: [PATCH] instal libgettextlib.a before removing it + +In a multiple job build, Makefile can simultaneously +be installing and removing libgettextlib.a. We serialize +the operations. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <[email protected]> + +--- + gettext-tools/gnulib-lib/Makefile.am | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gettext-tools/gnulib-lib/Makefile.am b/gettext-tools/gnulib-lib/Makefile.am +index 2126699..d2dd7e4 100644 +--- a/gettext-tools/gnulib-lib/Makefile.am ++++ b/gettext-tools/gnulib-lib/Makefile.am +@@ -58,6 +58,10 @@ endif + # Rules generated and collected by gnulib-tool. + include Makefile.gnulib + ++# defined in Makefile.gnulib but missing this dependency ++# ++install-exec-clean: install-libLTLIBRARIES ++ + # OS/2 does not support a DLL name longer than 8 characters. + if OS2 + libgettextlib_la_LDFLAGS += -os2dllname gtlibmeta/recipes-core/gettext/gettext-0.20.1/run-ptest renamed from meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest +0
-0meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch +12
-14@@ -1,4 +1,4 @@ -From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001 +From ed64a5724ef7d6eb4e9a876f817ea266a536e195 Mon Sep 17 00:00:00 2001 From: "Hongjun.Yang" <[email protected]> Date: Thu, 28 Jul 2016 12:36:15 +0800 Subject: [PATCH] fix for ptest@@ -8,6 +8,7 @@ Add serial-tests support, ptest need it Upstream-Status: Inappropriate [oe specific] Signed-off-by: Changqing Li <[email protected]> + --- configure.ac | 2 +- gettext-runtime/configure.ac | 2 +-@@ -15,24 +16,24 @@ Signed-off-by: Changqing Li <[email protected]> 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index 5e996fa..880581f 100644 +index 38db6fd..f019ae0 100644 --- a/configure.ac +++ b/configure.ac -@@ -23,7 +23,7 @@ AC_INIT([gettext], - [[email protected]]) +@@ -22,7 +22,7 @@ AC_INIT([gettext], + [[email protected]]) AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) AC_CONFIG_AUX_DIR([build-aux]) --AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip]) -+AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip]) +-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar]) ++AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests tar-ustar]) dnl Override automake's tar command used for creating distributions. - am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"' + am__tar='${AMTAR} chf - --format=ustar --owner=root --group=root "$$tardir"' diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac -index e9299b6..d4f5528 100644 +index de203e7..138a07f 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], - [[email protected]]) + [[email protected]]) AC_CONFIG_SRCDIR([intl/dcigettext.c]) AC_CONFIG_AUX_DIR([../build-aux]) -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])@@ -41,11 +42,11 @@ index e9299b6..d4f5528 100644 dnl Installation directories. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac -index 920eeb6..c507434 100644 +index cf1dd73..b544d6d 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -22,7 +22,7 @@ AC_INIT([gettext-tools], - [[email protected]]) + [[email protected]]) AC_CONFIG_SRCDIR([src/msgfmt.c]) AC_CONFIG_AUX_DIR([../build-aux]) -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])@@ -53,6 +54,3 @@ index 920eeb6..c507434 100644 AC_CONFIG_HEADERS([config.h]) dnl Installation directories. --- -2.1.4 -meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +713
-0@@ -0,0 +1,713 @@ +From ef414b06be80c6f605731abc9e674e396b80ec9e Mon Sep 17 00:00:00 2001 +From: Ross Burton <[email protected]> +Date: Tue, 23 Jan 2018 00:54:13 +0000 +Subject: [PATCH] gettext: beat library detection into shape + +For reasons which I just can't fathom gnulib doesn't use the expected tools to +find libraries but badly reinvents the wheel. This will trivially lead to host +contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad +canonicalisation resulting in relative paths). + +Simply delete all the crazy, and replace with a single call to pkg-config. + +Upstream-Status: Inappropriate (upstream still refuse to consider pkg-config) +Signed-off-by: Ross Burton <[email protected]> + +--- + gettext-tools/gnulib-m4/libxml.m4 | 99 +---------------- + .../gnulib-local/lib/term-styled-ostream.oo.c | 12 +- + libtextstyle/gnulib-local/m4/libcroco.m4 | 99 +++-------------- + libtextstyle/gnulib-local/m4/libglib.m4 | 104 +++--------------- + libtextstyle/gnulib-m4/libcroco.m4 | 99 +++-------------- + libtextstyle/gnulib-m4/libglib.m4 | 104 +++--------------- + libtextstyle/lib/term-styled-ostream.c | 12 +- + libtextstyle/lib/term-styled-ostream.oo.c | 12 +- + 8 files changed, 87 insertions(+), 454 deletions(-) + +diff --git a/gettext-tools/gnulib-m4/libxml.m4 b/gettext-tools/gnulib-m4/libxml.m4 +index 05b9550..031ee65 100644 +--- a/gettext-tools/gnulib-m4/libxml.m4 ++++ b/gettext-tools/gnulib-m4/libxml.m4 +@@ -13,6 +13,7 @@ dnl gl_LIBXML(FORCE-INCLUDED) + dnl forces the use of the included or an external libxml. + AC_DEFUN([gl_LIBXML], + [ ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_REQUIRE([AM_ICONV_LINK]) + + ifelse([$1], , [ +@@ -30,100 +31,10 @@ AC_DEFUN([gl_LIBXML], + INCXML= + ifelse([$1], [yes], , [ + if test "$gl_cv_libxml_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libxml2, or have to use +- dnl the included one. +- AC_CACHE_VAL([gl_cv_libxml], [ +- gl_cv_libxml=no +- gl_cv_LIBXML= +- gl_cv_LTLIBXML= +- gl_cv_INCXML= +- gl_save_LIBS="$LIBS" +- LIBS="$LIBS $LIBICONV" +- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2 +- dnl accordingly. +- dnl Don't use xml2-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x, +- dnl libxml2 is built in such a way that uses of xmlFree work fine with +- dnl -Wl,--enable-auto-import but lead to a link error with +- dnl -Wl,--disable-auto-import. +- AC_LIB_LINKFLAGS_BODY([xml2]) +- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" +- AC_TRY_LINK([#include <libxml/xmlversion.h> +- #include <libxml/xmlmemory.h> +- #include <libxml/xpath.h> +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- ]) +- if test "$gl_cv_libxml" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCXML2" +- AC_TRY_LINK([#include <libxml/xmlversion.h> +- #include <libxml/xmlmemory.h> +- #include <libxml/xpath.h> +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- gl_cv_INCXML="$INCXML2" +- ]) +- if test "$gl_cv_libxml" != yes; then +- dnl Often the include files are installed in /usr/include/libxml2. +- dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained. +- dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is +- dnl self-contained. +- libxml2_include_dir= +- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>], +- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) +- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'` +- ]) +- if test -z "$libxml2_include_dir"; then +- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>], +- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) +- libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'` +- ]) +- fi +- if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then +- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" +- AC_TRY_LINK([#include <libxml/xmlversion.h> +- #include <libxml/xmlmemory.h> +- #include <libxml/xpath.h> +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- gl_cv_INCXML="-I$libxml2_include_dir" +- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libxml]) +- AC_MSG_RESULT([$gl_cv_libxml]) +- if test $gl_cv_libxml = yes; then +- LIBXML="$gl_cv_LIBXML" +- LTLIBXML="$gl_cv_LTLIBXML" +- INCXML="$gl_cv_INCXML" +- else +- gl_cv_libxml_use_included=yes +- fi ++ PKG_CHECK_MODULES([XML], [libxml-2.0]) ++ LIBXML=$XML_LIBS ++ LTLIBXML=$XML_LIBS ++ INCXML=$XML_CFLAGS + fi + ]) + AC_SUBST([LIBXML]) +diff --git a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c +index 2cfd4a8..d42c8b4 100644 +--- a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c ++++ b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c +@@ -22,15 +22,15 @@ + + #include <stdlib.h> + +-#include <cr-om-parser.h> +-#include <cr-sel-eng.h> +-#include <cr-style.h> +-#include <cr-rgb.h> ++#include <libcroco/cr-om-parser.h> ++#include <libcroco/cr-sel-eng.h> ++#include <libcroco/cr-style.h> ++#include <libcroco/cr-rgb.h> + /* <cr-fonts.h> has a broken double-inclusion guard in libcroco-0.6.1. */ + #ifndef __CR_FONTS_H__ +-# include <cr-fonts.h> ++# include <libcroco/cr-fonts.h> + #endif +-#include <cr-string.h> ++#include <libcroco/cr-string.h> + + #include "term-ostream.h" + #include "hash.h" +diff --git a/libtextstyle/gnulib-local/m4/libcroco.m4 b/libtextstyle/gnulib-local/m4/libcroco.m4 +index bc53cc6..10b2455 100644 +--- a/libtextstyle/gnulib-local/m4/libcroco.m4 ++++ b/libtextstyle/gnulib-local/m4/libcroco.m4 +@@ -1,99 +1,34 @@ +-# libcroco.m4 serial 3 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libcroco.m4 serial 2 (gettext-0.17) ++dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBCROCO +-dnl gives the user the option to decide whether to use the included or +-dnl an external libcroco. +-dnl gl_LIBCROCO(FORCE-INCLUDED) +-dnl forces the use of the included or an external libcroco. + AC_DEFUN([gl_LIBCROCO], + [ +- ifelse([$1], [yes], , [ +- dnl libcroco depends on libglib. +- AC_REQUIRE([gl_LIBGLIB]) +- ]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ dnl libcroco depends on libglib. ++ AC_REQUIRE([gl_LIBGLIB]) + +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included libcroco is requested]) +- AC_ARG_WITH([included-libcroco], +- [ --with-included-libcroco use the libcroco included here], +- [gl_cv_libcroco_force_included=$withval], +- [gl_cv_libcroco_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libcroco_force_included]) +- ], [gl_cv_libcroco_force_included=$1]) ++ AC_MSG_CHECKING([whether included libcroco is requested]) ++ AC_ARG_WITH([included-libcroco], ++ [ --with-included-libcroco use the libcroco included here], ++ [gl_cv_libcroco_force_included=$withval], ++ [gl_cv_libcroco_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libcroco_force_included]) + + gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" + LIBCROCO= + LTLIBCROCO= + INCCROCO= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libcroco_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to +- dnl use the included one. +- AC_CACHE_VAL([gl_cv_libcroco], [ +- gl_cv_libcroco=no +- gl_cv_LIBCROCO= +- gl_cv_LTLIBCROCO= +- gl_cv_INCCROCO= +- gl_save_LIBS="$LIBS" +- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and +- dnl INCCROCO_0_6 accordingly. +- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) +- LIBS="$gl_save_LIBS $LIBCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="$INCCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- dnl Often the include files are installed in +- dnl /usr/include/libcroco-0.6/libcroco. +- AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) +- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` +- if test -d "$libcroco_include_dir"; then +- gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="-I$libcroco_include_dir" +- fi +- ]) +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libcroco]) +- AC_MSG_RESULT([$gl_cv_libcroco]) +- if test $gl_cv_libcroco = yes; then +- LIBCROCO="$gl_cv_LIBCROCO" +- LTLIBCROCO="$gl_cv_LTLIBCROCO" +- INCCROCO="$gl_cv_INCCROCO" +- else +- gl_cv_libcroco_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libcroco_use_included" != yes; then ++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) ++ LIBCROCO=$CROCO_LIBS ++ LTLIBCROCO=$CROCO_LIBS ++ INCCROCO=$CROCO_CFLAGS ++ fi + AC_SUBST([LIBCROCO]) + AC_SUBST([LTLIBCROCO]) + AC_SUBST([INCCROCO]) +diff --git a/libtextstyle/gnulib-local/m4/libglib.m4 b/libtextstyle/gnulib-local/m4/libglib.m4 +index bef6fa3..8841755 100644 +--- a/libtextstyle/gnulib-local/m4/libglib.m4 ++++ b/libtextstyle/gnulib-local/m4/libglib.m4 +@@ -1,105 +1,31 @@ +-# libglib.m4 serial 4 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libglib.m4 serial 3 (gettext-0.17) ++dnl Copyright (C) 2006-2007, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBGLIB +-dnl gives the user the option to decide whether to use the included or +-dnl an external libglib. +-dnl gl_LIBGLIB(FORCE-INCLUDED) +-dnl forces the use of the included or an external libglib. + AC_DEFUN([gl_LIBGLIB], + [ +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included glib is requested]) +- AC_ARG_WITH([included-glib], +- [ --with-included-glib use the glib2 included here], +- [gl_cv_libglib_force_included=$withval], +- [gl_cv_libglib_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libglib_force_included]) +- ], [gl_cv_libglib_force_included=$1]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ AC_MSG_CHECKING([whether included glib is requested]) ++ AC_ARG_WITH([included-glib], ++ [ --with-included-glib use the glib2 included here], ++ [gl_cv_libglib_force_included=$withval], ++ [gl_cv_libglib_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libglib_force_included]) + + gl_cv_libglib_use_included="$gl_cv_libglib_force_included" + LIBGLIB= + LTLIBGLIB= + INCGLIB= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libglib_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use +- dnl the included one. +- AC_CACHE_VAL([gl_cv_libglib], [ +- gl_cv_libglib=no +- gl_cv_LIBGLIB= +- gl_cv_LTLIBGLIB= +- gl_cv_INCGLIB= +- gl_save_LIBS="$LIBS" +- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and +- dnl INCGLIB_2_0 accordingly. +- dnl Don't use glib-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([glib-2.0]) +- LIBS="$gl_save_LIBS $LIBGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="$INCGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- dnl Often the include files are installed in /usr/include/glib-2.0 +- dnl and /usr/lib/glib-2.0/include. +- if test -n "$LIBGLIB_2_0_PREFIX"; then +- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for glib]) +- AC_MSG_RESULT([$gl_cv_libglib]) +- if test $gl_cv_libglib = yes; then +- LIBGLIB="$gl_cv_LIBGLIB" +- LTLIBGLIB="$gl_cv_LTLIBGLIB" +- INCGLIB="$gl_cv_INCGLIB" +- else +- gl_cv_libglib_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libglib_use_included" != yes; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0]) ++ LIBGLIB="$GLIB_LIBS" ++ LTLIBGLIB="$GLIB_LIBS" ++ INCGLIB="$GLIB_CFLAGS" ++ fi + AC_SUBST([LIBGLIB]) + AC_SUBST([LTLIBGLIB]) + AC_SUBST([INCGLIB]) +diff --git a/libtextstyle/gnulib-m4/libcroco.m4 b/libtextstyle/gnulib-m4/libcroco.m4 +index bc53cc6..10b2455 100644 +--- a/libtextstyle/gnulib-m4/libcroco.m4 ++++ b/libtextstyle/gnulib-m4/libcroco.m4 +@@ -1,99 +1,34 @@ +-# libcroco.m4 serial 3 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libcroco.m4 serial 2 (gettext-0.17) ++dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBCROCO +-dnl gives the user the option to decide whether to use the included or +-dnl an external libcroco. +-dnl gl_LIBCROCO(FORCE-INCLUDED) +-dnl forces the use of the included or an external libcroco. + AC_DEFUN([gl_LIBCROCO], + [ +- ifelse([$1], [yes], , [ +- dnl libcroco depends on libglib. +- AC_REQUIRE([gl_LIBGLIB]) +- ]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ dnl libcroco depends on libglib. ++ AC_REQUIRE([gl_LIBGLIB]) + +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included libcroco is requested]) +- AC_ARG_WITH([included-libcroco], +- [ --with-included-libcroco use the libcroco included here], +- [gl_cv_libcroco_force_included=$withval], +- [gl_cv_libcroco_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libcroco_force_included]) +- ], [gl_cv_libcroco_force_included=$1]) ++ AC_MSG_CHECKING([whether included libcroco is requested]) ++ AC_ARG_WITH([included-libcroco], ++ [ --with-included-libcroco use the libcroco included here], ++ [gl_cv_libcroco_force_included=$withval], ++ [gl_cv_libcroco_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libcroco_force_included]) + + gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" + LIBCROCO= + LTLIBCROCO= + INCCROCO= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libcroco_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to +- dnl use the included one. +- AC_CACHE_VAL([gl_cv_libcroco], [ +- gl_cv_libcroco=no +- gl_cv_LIBCROCO= +- gl_cv_LTLIBCROCO= +- gl_cv_INCCROCO= +- gl_save_LIBS="$LIBS" +- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and +- dnl INCCROCO_0_6 accordingly. +- dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) +- LIBS="$gl_save_LIBS $LIBCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="$INCCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- dnl Often the include files are installed in +- dnl /usr/include/libcroco-0.6/libcroco. +- AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) +- libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` +- if test -d "$libcroco_include_dir"; then +- gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="-I$libcroco_include_dir" +- fi +- ]) +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libcroco]) +- AC_MSG_RESULT([$gl_cv_libcroco]) +- if test $gl_cv_libcroco = yes; then +- LIBCROCO="$gl_cv_LIBCROCO" +- LTLIBCROCO="$gl_cv_LTLIBCROCO" +- INCCROCO="$gl_cv_INCCROCO" +- else +- gl_cv_libcroco_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libcroco_use_included" != yes; then ++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) ++ LIBCROCO=$CROCO_LIBS ++ LTLIBCROCO=$CROCO_LIBS ++ INCCROCO=$CROCO_CFLAGS ++ fi + AC_SUBST([LIBCROCO]) + AC_SUBST([LTLIBCROCO]) + AC_SUBST([INCCROCO]) +diff --git a/libtextstyle/gnulib-m4/libglib.m4 b/libtextstyle/gnulib-m4/libglib.m4 +index bef6fa3..8841755 100644 +--- a/libtextstyle/gnulib-m4/libglib.m4 ++++ b/libtextstyle/gnulib-m4/libglib.m4 +@@ -1,105 +1,31 @@ +-# libglib.m4 serial 4 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. ++# libglib.m4 serial 3 (gettext-0.17) ++dnl Copyright (C) 2006-2007, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBGLIB +-dnl gives the user the option to decide whether to use the included or +-dnl an external libglib. +-dnl gl_LIBGLIB(FORCE-INCLUDED) +-dnl forces the use of the included or an external libglib. + AC_DEFUN([gl_LIBGLIB], + [ +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included glib is requested]) +- AC_ARG_WITH([included-glib], +- [ --with-included-glib use the glib2 included here], +- [gl_cv_libglib_force_included=$withval], +- [gl_cv_libglib_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libglib_force_included]) +- ], [gl_cv_libglib_force_included=$1]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ AC_MSG_CHECKING([whether included glib is requested]) ++ AC_ARG_WITH([included-glib], ++ [ --with-included-glib use the glib2 included here], ++ [gl_cv_libglib_force_included=$withval], ++ [gl_cv_libglib_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libglib_force_included]) + + gl_cv_libglib_use_included="$gl_cv_libglib_force_included" + LIBGLIB= + LTLIBGLIB= + INCGLIB= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libglib_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use +- dnl the included one. +- AC_CACHE_VAL([gl_cv_libglib], [ +- gl_cv_libglib=no +- gl_cv_LIBGLIB= +- gl_cv_LTLIBGLIB= +- gl_cv_INCGLIB= +- gl_save_LIBS="$LIBS" +- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and +- dnl INCGLIB_2_0 accordingly. +- dnl Don't use glib-config nor pkg-config, since it doesn't work when +- dnl cross-compiling or when the C compiler in use is different from the +- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([glib-2.0]) +- LIBS="$gl_save_LIBS $LIBGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="$INCGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- dnl Often the include files are installed in /usr/include/glib-2.0 +- dnl and /usr/lib/glib-2.0/include. +- if test -n "$LIBGLIB_2_0_PREFIX"; then +- CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" +- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for glib]) +- AC_MSG_RESULT([$gl_cv_libglib]) +- if test $gl_cv_libglib = yes; then +- LIBGLIB="$gl_cv_LIBGLIB" +- LTLIBGLIB="$gl_cv_LTLIBGLIB" +- INCGLIB="$gl_cv_INCGLIB" +- else +- gl_cv_libglib_use_included=yes +- fi +- fi +- ]) ++ if test "$gl_cv_libglib_use_included" != yes; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0]) ++ LIBGLIB="$GLIB_LIBS" ++ LTLIBGLIB="$GLIB_LIBS" ++ INCGLIB="$GLIB_CFLAGS" ++ fi + AC_SUBST([LIBGLIB]) + AC_SUBST([LTLIBGLIB]) + AC_SUBST([INCGLIB]) +diff --git a/libtextstyle/lib/term-styled-ostream.c b/libtextstyle/lib/term-styled-ostream.c +index 3675b5f..811e546 100644 +--- a/libtextstyle/lib/term-styled-ostream.c ++++ b/libtextstyle/lib/term-styled-ostream.c +@@ -28,15 +28,15 @@ + + #include <stdlib.h> + +-#include <cr-om-parser.h> +-#include <cr-sel-eng.h> +-#include <cr-style.h> +-#include <cr-rgb.h> ++#include <libcroco/cr-om-parser.h> ++#include <libcroco/cr-sel-eng.h> ++#include <libcroco/cr-style.h> ++#include <libcroco/cr-rgb.h> + /* <cr-fonts.h> has a broken double-inclusion guard in libcroco-0.6.1. */ + #ifndef __CR_FONTS_H__ +-# include <cr-fonts.h> ++# include <libcroco/cr-fonts.h> + #endif +-#include <cr-string.h> ++#include <libcroco/cr-string.h> + + #include "term-ostream.h" + #include "hash.h" +diff --git a/libtextstyle/lib/term-styled-ostream.oo.c b/libtextstyle/lib/term-styled-ostream.oo.c +index 2cfd4a8..d42c8b4 100644 +--- a/libtextstyle/lib/term-styled-ostream.oo.c ++++ b/libtextstyle/lib/term-styled-ostream.oo.c +@@ -22,15 +22,15 @@ + + #include <stdlib.h> + +-#include <cr-om-parser.h> +-#include <cr-sel-eng.h> +-#include <cr-style.h> +-#include <cr-rgb.h> ++#include <libcroco/cr-om-parser.h> ++#include <libcroco/cr-sel-eng.h> ++#include <libcroco/cr-style.h> ++#include <libcroco/cr-rgb.h> + /* <cr-fonts.h> has a broken double-inclusion guard in libcroco-0.6.1. */ + #ifndef __CR_FONTS_H__ +-# include <cr-fonts.h> ++# include <libcroco/cr-fonts.h> + #endif +-#include <cr-string.h> ++#include <libcroco/cr-string.h> + + #include "term-ostream.h" + #include "hash.h"meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +11
-12@@ -6,7 +6,7 @@ a few stand-alone programs to massage in various ways the sets of translatable a HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" SECTION = "libs" LICENSE = "GPLv3+ & LGPL-2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" # Because po-gram-gen.y has been modified by fix-CVE-2018-18751.patch, # it requires yacc which provided by bison-native@@ -17,17 +17,16 @@ PROVIDES = "virtual/libintl virtual/gettext" PROVIDES_class-native = "virtual/gettext-native" RCONFLICTS_${PN} = "proxy-libintl" SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ - file://parallel.patch \ - file://add-with-bisonlocaledir.patch \ - file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ - file://use-pkgconfig.patch \ - file://fix-CVE-2018-18751.patch \ - file://run-ptest \ - file://serial-tests-config.patch \ -" + file://parallel.patch \ + file://add-with-bisonlocaledir.patch \ + file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ + file://use-pkgconfig.patch \ + file://run-ptest \ + file://serial-tests-config.patch \ + " -SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" -SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43" +SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2" +SRC_URI[sha256sum] = "66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c" inherit autotools texinfo pkgconfig ptest@@ -127,7 +126,7 @@ do_install_append_class-native () { rm ${D}${datadir}/gettext/po/remove-potcdate.sin create_wrapper ${D}${bindir}/msgfmt \ - GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.19.8/" + GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.20/" }
Re: [PATCH 08/14] gettext: update to 0.20.1
Quoted 10 lines · On Thu, 28 Nov 2019 at 16:19, akuster808 <[email protected]> wrote:
Quoted 2 lines · Alexander Kanavin
License-Update: URLs changed from http to https
Signed-off-by Alexander Kanavin <[email protected]>This failed on the AB
Weird this didn't fail locally for my world builds, I queued a patch to fix this.
Quoted 4 lines
an for meta-mingw bbappend.
Patch sent.
Quoted 1,641 lines
Quoted 5 lines
--- .../gettext-0.19.8.1/fix-CVE-2018-18751.patch | 141 ---- .../gettext/gettext-0.19.8.1/parallel.patch | 23 - .../gettext-0.19.8.1/use-pkgconfig.patch | 321 -------- .../add-with-bisonlocaledir.patch | 0Quoted 8 lines
...nt.c-timsort.h-fix-formatting-issues.patch | 30 +- .../gettext/gettext-0.20.1/parallel.patch | 32 + .../run-ptest | 0 .../serial-tests-config.patch | 26 +- .../gettext-0.20.1/use-pkgconfig.patch | 713 ++++++++++++++++++ ...{gettext_0.19.8.1.bb => gettext_0.20.1.bb} | 23 +- 10 files changed, 775 insertions(+), 534 deletions(-) delete mode 100644
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patchQuoted 1 line
delete mode 100644
meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patchQuoted 1 line
delete mode 100644
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patchQuoted 1 line
rename meta/recipes-core/gettext/{gettext-0.19.8.1 =>
gettext-0.20.1}/add-with-bisonlocaledir.patch(100%)Quoted 1 line
rename meta/recipes-core/gettext/{gettext-0.19.8.1 =>
gettext-0.20.1}/cr-statement.c-timsort.h-fix-formatting-issues.patch(68%)Quoted 1 line
create mode 100644
meta/recipes-core/gettext/gettext-0.20.1/parallel.patchQuoted 1 line
rename meta/recipes-core/gettext/{gettext-0.19.8.1 =>gettext-0.20.1}/run-ptest (100%)
Quoted 1 line
rename meta/recipes-core/gettext/{gettext-0.19.8.1 =>
gettext-0.20.1}/serial-tests-config.patch(75%)Quoted 1 line
create mode 100644
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patchQuoted 1 line
rename meta/recipes-core/gettext/{gettext_0.19.8.1.bb =>gettext_0.20.1.bb} (94%)
Quoted 2 lines
diff --git
a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patchb/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patchmeta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch line 1
Quoted 6 lines
deleted file mode 100644
index 6dfe200d654..00000000000meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-1@@ -1,141 +0,0 @@ -Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=dce3a16]
Quoted 13 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-13-CVE: CVE-2018-18751 - -Signed-off-by: Kai Kang <[email protected]> - -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001 -From: Daiki Ueno <[email protected]> -Date: Thu, 15 Sep 2016 13:57:24 +0200 -Subject: [PATCH] xgettext: Fix crash with *.po file input - -When xgettext was given two *.po files with the same msgid_plural, it -crashed with double-free. Problem reported by Davlet Panech in: -http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html -* gettext-tools/src/po-gram-gen.y: Don't free msgid_pluralform aftermeta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-10-calling do_callback_message, assuming that it takes ownership. -* gettext-tools/src/read-catalog.c (default_add_message): Free -msgid_plural after calling message_alloc. -* gettext-tools/tests/xgettext-po-2: New file. -* gettext-tools/tests/Makefile.am (TESTS): Add new test. ---- - gettext-tools/src/po-gram-gen.y | 13 ++++----- - gettext-tools/src/read-catalog.c | 2 ++ - gettext-tools/tests/Makefile.am | 2 +- - gettext-tools/tests/xgettext-po-2 | 55+++++++++++++++++++++++++++++++++++++++
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-4- 4 files changed, 63 insertions(+), 9 deletions(-) - create mode 100755 gettext-tools/tests/xgettext-po-2 - -diff --git a/gettext-tools/src/po-gram-gen.yb/gettext-tools/src/po-gram-gen.y
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 9 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-9-index becf5e6..4428e77 100644 ---- a/gettext-tools/src/po-gram-gen.y -+++ b/gettext-tools/src/po-gram-gen.y -@@ -221,14 +221,11 @@ message - check_obsolete ($1, $3); - check_obsolete ($1, $4); - if (!$1.obsolete || pass_obsolete_entries) -- { -- do_callback_message ($1.ctxt, string2, &$1.pos,$3.string,
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch line 38
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-1-- $4.rhs.msgstr,$4.rhs.msgstr_len, &$4.pos,
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch line 40
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-2-- $1.prev_ctxt, -- $1.prev_id,$1.prev_id_plural,
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-4-- $1.obsolete); -- free ($3.string); -- } -+ do_callback_message ($1.ctxt, string2, &$1.pos,$3.string,
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch line 45
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-1-+ $4.rhs.msgstr,$4.rhs.msgstr_len, &$4.pos,
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 7 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-7-+ $1.prev_ctxt, -+ $1.prev_id, $1.prev_id_plural, -+ $1.obsolete); - else - { - free_message_intro ($1); -diff --git a/gettext-tools/src/read-catalog.c
b/gettext-tools/src/read-catalog.cmeta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-4-index 571d18e..6af6d20 100644 ---- a/gettext-tools/src/read-catalog.c -+++ b/gettext-tools/src/read-catalog.c -@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty*this,
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch line 58
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-2- appropriate. */ - mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr,
msgstr_len,meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 7 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-7- msgstr_pos); -+ if (msgid_plural != NULL) -+ free (msgid_plural); - mp->prev_msgctxt = prev_msgctxt; - mp->prev_msgid = prev_msgid; - mp->prev_msgid_plural = prev_msgid_plural; -diff --git a/gettext-tools/tests/Makefile.amb/gettext-tools/tests/Makefile.am
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-4-index 23b09b1..0dfb4d8 100644 ---- a/gettext-tools/tests/Makefile.am -+++ b/gettext-tools/tests/Makefile.am -@@ -95,7 +95,7 @@ TESTS = gettext-1 gettext-2 gettext-3 gettext-4gettext-5 gettext-6 gettext-7 \
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 9 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-9- xgettext-perl-1 xgettext-perl-2 xgettext-perl-3 xgettext-perl-4 \ - xgettext-perl-5 xgettext-perl-6 xgettext-perl-7 xgettext-perl-8 \ - xgettext-php-1 xgettext-php-2 xgettext-php-3 xgettext-php-4 \ -- xgettext-po-1 \ -+ xgettext-po-1 xgettext-po-2 \ - xgettext-properties-1 \ - xgettext-python-1 xgettext-python-2 xgettext-python-3 \ - xgettext-python-4 \ -diff --git a/gettext-tools/tests/xgettext-po-2b/gettext-tools/tests/xgettext-po-2
Quoted 26 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-26-new file mode 100755 -index 0000000..c4bd9d0 ---- /dev/null -+++ b/gettext-tools/tests/xgettext-po-2 -@@ -0,0 +1,55 @@ -+#! /bin/sh -+. "${srcdir=.}/init.sh"; path_prepend_ . ../src -+ -+# Test PO extractors with multiple input files. -+ -+cat <<EOF > xg-po-2-1.po -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+cat <<EOF > xg-po-2-2.po -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] ""meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-10-+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${XGETTEXT=xgettext} -+${XGETTEXT} --omit-header xg-po-2-1.po xg-po-2-2.po -o xg-po-2.tmp.po|| Exit 1 > -+LC_ALL=C tr -d '\r' < xg-po-2.tmp.po > xg-po-2.po || Exit 1Review
Quoted 27 lines
meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch deleted +0
-26-+ -+cat <<EOF > xg-po-2.ok -+msgid "first msgid" -+msgid_plural "first msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "second msgid" -+msgid_plural "second msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+ -+msgid "third msgid" -+msgid_plural "third msgid (plural)" -+msgstr[0] "" -+msgstr[1] "" -+EOF -+ -+: ${DIFF=diff} -+${DIFF} xg-po-2.ok xg-po-2.po -+result=$? -+ -+exit $result --- -1.9.1 -(quoted diff) +0
-0
b/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patchQuoted 28 lines
deleted file mode 100644
index c8e2c94af0e..00000000000meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch deleted +0
-23@@ -1,23 +0,0 @@ -instal libgettextlib.a before removing it - -In a multiple job build, Makefile can simultaneously -be installing and removing libgettextlib.a. We serialize -the operations. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater <[email protected]> - ---- a/gettext-tools/gnulib-lib/Makefile.am -+++ b/gettext-tools/gnulib-lib/Makefile.am -@@ -57,6 +57,10 @@ endif - # Rules generated and collected by gnulib-tool. - include Makefile.gnulib - -+# defined in Makefile.gnulib but missing this dependency -+# -+install-exec-clean: install-libLTLIBRARIES -+ - # Which classes to export from the shared library. - MOOPPFLAGS += --dllexport=styled_ostream -Quoted 1 line
diff --git
a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patchb/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patchmeta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 1
Quoted 6 lines
deleted file mode 100644
index 6156a153f74..00000000000meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1@@ -1,321 +0,0 @@ -For reasons which I just can't fathom gnulib doesn't use the expectedtools to
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 2
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1-find libraries but badly reinvents the wheel. This will trivially leadto host
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-4-contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad -canonicalisation resulting in relative paths). - -Simply delete all the crazy, and replace with a single call topkg-config.
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 8
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-2- -Upstream-Status: Inappropriate (upstream still refuse to considerpkg-config)
Quoted 9 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-9-Signed-off-by: Ross Burton <[email protected]> - -diff --git a/gnulib-local/m4/libcroco.m4 b/gnulib-local/m4/libcroco.m4 -index f79ea82f1..1f67274db 100644 ---- a/gettext-tools/gnulib-m4/libcroco.m4 -+++ b/gettext-tools/gnulib-m4/libcroco.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBCROCO],meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10- [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - dnl libcroco depends on libglib. - AC_REQUIRE([gl_LIBGLIB]) - -@@ -23,65 +24,10 @@ AC_DEFUN([gl_LIBCROCO], - LTLIBCROCO= - INCCROCO= - if test "$gl_cv_libcroco_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libcroco-0.6, orhave to
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 8 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-8-- dnl use the included one. -- AC_CACHE_VAL([gl_cv_libcroco], [ -- gl_cv_libcroco=no -- gl_cv_LIBCROCO= -- gl_cv_LTLIBCROCO= -- gl_cv_INCCROCO= -- gl_save_LIBS="$LIBS" -- dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6and
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 37
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-2-- dnl INCCROCO_0_6 accordingly. -- dnl Don't use croco-0.6-config nor pkg-config, since it doesn'twork when
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 38
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1-- dnl cross-compiling or when the C compiler in use is differentfrom the
Quoted 13 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-13-- dnl one that built the library. -- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) -- LIBS="$gl_save_LIBS $LIBCROCO_0_6" -- AC_TRY_LINK([#include <libcroco-config.h>], -- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- ]) -- if test "$gl_cv_libcroco" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" -- AC_TRY_LINK([#include <libcroco-config.h>],meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10-- [const char *version = LIBCROCO_VERSION; return !version;], -- [gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- gl_cv_INCCROCO="$INCCROCO_0_6" -- ]) -- if test "$gl_cv_libcroco" != yes; then -- dnl Often the include files are installed in -- dnl /usr/include/libcroco-0.6/libcroco. -- AC_TRY_LINK([#include<
libcroco-0.6/libcroco/libcroco-config.h>],meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 63
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-2-- [const char *version = LIBCROCO_VERSION; return !version;], --[
gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 64
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1-- libcroco_include_dir=`echo"$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
Quoted 35 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-35-- if test -d "$libcroco_include_dir"; then -- gl_cv_libcroco=yes -- gl_cv_LIBCROCO="$LIBCROCO_0_6" -- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" -- gl_cv_INCCROCO="-I$libcroco_include_dir" -- fi -- ]) -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for libcroco]) -- AC_MSG_RESULT([$gl_cv_libcroco]) -- if test $gl_cv_libcroco = yes; then -- LIBCROCO="$gl_cv_LIBCROCO" -- LTLIBCROCO="$gl_cv_LTLIBCROCO" -- INCCROCO="$gl_cv_INCCROCO" -- else -- gl_cv_libcroco_use_included=yes -- fi -+ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) -+ LIBCROCO=$CROCO_LIBS -+ LTLIBCROCO=$CROCO_LIBS -+ INCCROCO=$CROCO_CFLAGS - fi - AC_SUBST([LIBCROCO]) - AC_SUBST([LTLIBCROCO]) -diff --git a/gnulib-local/m4/libglib.m4 b/gnulib-local/m4/libglib.m4 -index 42e55e6fd..ab25a5b22 100644 ---- a/gettext-tools/gnulib-m4/libglib.m4 -+++ b/gettext-tools/gnulib-m4/libglib.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBGLIB],meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10- [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_MSG_CHECKING([whether included glib is requested]) - AC_ARG_WITH([included-glib], - [ --with-included-glib use the glib2 included here], -@@ -20,76 +21,10 @@ AC_DEFUN([gl_LIBGLIB], - LTLIBGLIB= - INCGLIB= - if test "$gl_cv_libglib_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libglib-2.0, orhave to use
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10-- dnl the included one. -- AC_CACHE_VAL([gl_cv_libglib], [ -- gl_cv_libglib=no -- gl_cv_LIBGLIB= -- gl_cv_LTLIBGLIB= -- gl_cv_INCGLIB= -- gl_save_LIBS="$LIBS" -- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and -- dnl INCGLIB_2_0 accordingly. -- dnl Don't use glib-config nor pkg-config, since it doesn't workwhen
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 120
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1-- dnl cross-compiling or when the C compiler in use is differentfrom the
Quoted 19 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-19-- dnl one that built the library. -- AC_LIB_LINKFLAGS_BODY([glib-2.0]) -- LIBS="$gl_save_LIBS $LIBGLIB_2_0" -- AC_TRY_LINK([#include <glib.h> --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- ]) -- if test "$gl_cv_libglib" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" -- AC_TRY_LINK([#include <glib.h> --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.xmeta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10--#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- gl_cv_INCGLIB="$INCGLIB_2_0" -- ]) -- if test "$gl_cv_libglib" != yes; then -- dnl Often the include files are installed in
/usr/include/glib-2.0Quoted 3 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-3-- dnl and /usr/lib/glib-2.0/include. -- if test -n "$LIBGLIB_2_0_PREFIX"; then -- CPPFLAGS="$gl_save_CPPFLAGS(quoted diff) +0
-2-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10-- AC_TRY_LINK([#include <glib.h> --#ifndef G_BEGIN_DECLS --error this glib.h includes a glibconfig.h from a glib version 1.x --#endif --], -- [g_string_new ("foo");], -- [gl_cv_libglib=yes -- gl_cv_LIBGLIB="$LIBGLIB_2_0" -- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" -- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0-I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
Quoted 30 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-30-- ]) -- fi -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for glib]) -- AC_MSG_RESULT([$gl_cv_libglib]) -- if test $gl_cv_libglib = yes; then -- LIBGLIB="$gl_cv_LIBGLIB" -- LTLIBGLIB="$gl_cv_LTLIBGLIB" -- INCGLIB="$gl_cv_INCGLIB" -- else -- gl_cv_libglib_use_included=yes -- fi -+ PKG_CHECK_MODULES([GLIB], [glib-2.0]) -+ LIBGLIB="$GLIB_LIBS" -+ LTLIBGLIB="$GLIB_LIBS" -+ INCGLIB="$GLIB_CFLAGS" - fi - AC_SUBST([LIBGLIB]) - AC_SUBST([LTLIBGLIB]) -diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4 -index 480c700d2..cb39309d5 100644 ---- a/gettext-tools/gnulib-m4/libxml.m4 -+++ b/gettext-tools/gnulib-m4/libxml.m4 -@@ -8,6 +8,7 @@ dnl From Bruno Haible. - - AC_DEFUN([gl_LIBXML],meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10- [ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_REQUIRE([AM_ICONV_LINK]) - - AC_MSG_CHECKING([whether included libxml is requested]) -@@ -22,100 +22,10 @@ AC_DEFUN([gl_LIBXML], - LTLIBXML= - INCXML= - if test "$gl_cv_libxml_use_included" != yes; then -- dnl Figure out whether we can use a preinstalled libxml2, or haveto use
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 11 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-11-- dnl the included one. -- AC_CACHE_VAL([gl_cv_libxml], [ -- gl_cv_libxml=no -- gl_cv_LIBXML= -- gl_cv_LTLIBXML= -- gl_cv_INCXML= -- gl_save_LIBS="$LIBS" -- LIBS="$LIBS $LIBICONV" -- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2 -- dnl accordingly. -- dnl Don't use xml2-config nor pkg-config, since it doesn't workwhen
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 214
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1-- dnl cross-compiling or when the C compiler in use is differentfrom the
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 216
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-2-- dnl one that built the library. -- dnl Use a test program that tries to invoke xmlFree. On Cygwin1.7.x,
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 217
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1-- dnl libxml2 is built in such a way that uses of xmlFree workfine with
Quoted 24 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-24-- dnl -Wl,--enable-auto-import but lead to a link error with -- dnl -Wl,--disable-auto-import. -- AC_LIB_LINKFLAGS_BODY([xml2]) -- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" -- AC_TRY_LINK([#include <libxml/xmlversion.h> -- #include <libxml/xmlmemory.h> -- #include <libxml/xpath.h> -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- ]) -- if test "$gl_cv_libxml" != yes; then -- gl_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="$CPPFLAGS $INCXML2" -- AC_TRY_LINK([#include <libxml/xmlversion.h> -- #include <libxml/xmlmemory.h> -- #include <libxml/xpath.h> -- ], -- [xmlCheckVersion (0);meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10-- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- gl_cv_INCXML="$INCXML2" -- ]) -- if test "$gl_cv_libxml" != yes; then -- dnl Often the include files are installed in
/usr/include/libxml2.meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch line 253
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-2-- dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained. -- dnl In libxml2-2.6, it includes <libxml/xmlexports.h> whichis
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 5 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-5-- dnl self-contained. -- libxml2_include_dir= -- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>], -- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) -- libxml2_include_dir=`echo"$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 5 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-5-- ]) -- if test -z "$libxml2_include_dir"; then -- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>], -- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) -- libxml2_include_dir=`echo"$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 3 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-3-- ]) -- fi -- if test -n "$libxml2_include_dir" && test -d"$libxml2_include_dir"; then
Quoted 27 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-27-- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" -- AC_TRY_LINK([#include <libxml/xmlversion.h> -- #include <libxml/xmlmemory.h> -- #include <libxml/xpath.h> -- ], -- [xmlCheckVersion (0); -- xmlFree ((void *) 0); -- xmlXPathSetContextNode ((void *)0, (void *)0); -- ], -- [gl_cv_libxml=yes -- gl_cv_LIBXML="$LIBXML2 $LIBICONV" -- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- gl_cv_INCXML="-I$libxml2_include_dir" -- ]) -- fi -- fi -- CPPFLAGS="$gl_save_CPPFLAGS" -- fi -- LIBS="$gl_save_LIBS" -- ]) -- AC_MSG_CHECKING([for libxml]) -- AC_MSG_RESULT([$gl_cv_libxml]) -- if test $gl_cv_libxml = yes; then -- LIBXML="$gl_cv_LIBXML" -- LTLIBXML="$gl_cv_LTLIBXML" -- INCXML="$gl_cv_INCXML" -- elsemeta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-10-- gl_cv_libxml_use_included=yes -- fi -+ PKG_CHECK_MODULES([XML], [libxml-2.0]) -+ LIBXML=$XML_LIBS -+ LTLIBXML=$XML_LIBS -+ INCXML=$XML_CFLAGS - fi - AC_SUBST([LIBXML]) - AC_SUBST([LTLIBXML]) -diff --git a/gnulib-local/lib/term-styled-ostream.oo.c
b/gnulib-local/lib/term-styled-ostream.oo.cQuoted 18 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-18-index 81a407467..218565329 100644 ---- a/gettext-tools/gnulib-lib/term-styled-ostream.oo.c -+++ b/gettext-tools/gnulib-lib/term-styled-ostream.oo.c -@@ -25,4 +25,4 @@ --#include <cr-om-parser.h> --#include <cr-sel-eng.h> --#include <cr-style.h> --#include <cr-rgb.h> -+#include <libcroco/cr-om-parser.h> -+#include <libcroco/cr-sel-eng.h> -+#include <libcroco/cr-style.h> -+#include <libcroco/cr-rgb.h> -@@ -31 +31 @@ --# include <cr-fonts.h> -+# include <libcroco/cr-fonts.h> -@@ -33 +33 @@ --#include <cr-string.h> -+#include <libcroco/cr-string.h>Quoted 1 line
diff --git
a/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patchb/meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patchQuoted 2 lines
similarity index 100%
rename from
meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patchQuoted 1 line
rename to
meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patchQuoted 1 line
diff --git
a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patchb/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patchQuoted 2 lines
similarity index 68%
rename from
meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patchQuoted 1 line
rename to
meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patchQuoted 2 lines
index
6af16041987..0561ed7d32c100644
---
a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patchQuoted 1 line
+++
b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patchmeta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch gettext-tools/gnulib-lib/libxml/timsort.h:326:80:
Quoted 7 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +1
-1@@ -1,4 +1,4 @@ -From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001 +From f6245ef5530fc37a6243e798df34162fbbeab6f0 Mon Sep 17 00:00:00 2001 From: Robert Yang <[email protected]> Date: Sun, 19 Feb 2017 23:32:46 -0800 Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues@@ -15,15 +15,15 @@ gettext-tools/gnulib-lib/libxml/timsort.h:326:80:warning: format '%lu' expects
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch gettext-tools/gnulib-lib/libxml/timsort.h:326:80: · line 23
Quoted 12 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +3
-4Upstream-Status: Pending Signed-off-by: Robert Yang <[email protected]> + --- - gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++----- - gettext-tools/gnulib-lib/libxml/timsort.h | 2 +- - 2 files changed, 6 insertions(+), 6 deletions(-) + libtextstyle/lib/libcroco/cr-statement.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c
b/gettext-tools/gnulib-lib/libcroco/cr-statement.cmeta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch gettext-tools/gnulib-lib/libxml/timsort.h:326:80: · line 23
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +1
-0+diff --git a/libtextstyle/lib/libcroco/cr-statement.c
b/libtextstyle/lib/libcroco/cr-statement.cmeta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch gettext-tools/gnulib-lib/libxml/timsort.h:326:80: · line 27
Quoted 6 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +2
-2index 617520f..100104b 100644 ---- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c -+++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c +--- a/libtextstyle/lib/libcroco/cr-statement.c ++++ b/libtextstyle/lib/libcroco/cr-statement.c @@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this,FILE *
a_fp, glonga_indent)meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch index 617520f..100104b 100644 · line 72
Quoted 7 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1g_return_if_fail (a_fp && a_this); str = cr_statement_ruleset_to_string (a_this, a_indent);@@ -69,19 +69,3 @@ index 617520f..100104b 100644 g_free (str) ; str = NULL ; } -diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h
b/gettext-tools/gnulib-lib/libxml/timsort.hmeta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch index 617520f..100104b 100644 · line 76
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-4-index 795f272..443918a 100644 ---- a/gettext-tools/gnulib-lib/libxml/timsort.h -+++ b/gettext-tools/gnulib-lib/libxml/timsort.h -@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store,const
size_tnew_size)meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch index 617520f..100104b 100644 · line 77
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1- SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage,
new_size*sizeof(SORT_TYPE));meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch index 617520f..100104b 100644 · line 80
Quoted 3 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-3- if (tempstore == NULL) - { -- fprintf(stderr, "Error allocating temporary storage for timsort: need %lu bytes",
sizeof(SORT_TYPE)*new_size);meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch index 617520f..100104b 100644 · line 81
Quoted 1 line
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-1-+ fprintf(stderr, "Error allocating temporary storage for timsort: need %zu bytes",
sizeof(SORT_TYPE)*new_size);Review
Quoted 7 lines
meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch deleted +0
-6- exit(1); - } - store->storage = tempstore; --- -2.10.2 -(quoted diff) +0
-0
b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patchQuoted 13 lines
new file mode 100644
index 00000000000..d96a376b7d1meta/recipes-core/gettext/gettext-0.20.1/parallel.patch new file +8
-0@@ -0,0 +1,32 @@ +From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001 +From: Joe Slater <[email protected]> +Date: Thu, 7 Jun 2012 16:37:01 -0700 +Subject: [PATCH] instal libgettextlib.a before removing it + +In a multiple job build, Makefile can simultaneously +be installing and removing libgettextlib.a. We serialize +the operations.meta/recipes-core/gettext/gettext-0.20.1/parallel.patch line 18
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/parallel.patch new file +10
-0+ +Upstream-Status: Pending + +Signed-off-by: Joe Slater <[email protected]> + +--- + gettext-tools/gnulib-lib/Makefile.am | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gettext-tools/gnulib-lib/Makefile.amb/gettext-tools/gnulib-lib/Makefile.am
Review
Quoted 15 lines
meta/recipes-core/gettext/gettext-0.20.1/parallel.patch new file +14
-0+index 2126699..d2dd7e4 100644 +--- a/gettext-tools/gnulib-lib/Makefile.am ++++ b/gettext-tools/gnulib-lib/Makefile.am +@@ -58,6 +58,10 @@ endif + # Rules generated and collected by gnulib-tool. + include Makefile.gnulib + ++# defined in Makefile.gnulib but missing this dependency ++# ++install-exec-clean: install-libLTLIBRARIES ++ + # OS/2 does not support a DLL name longer than 8 characters. + if OS2 + libgettextlib_la_LDFLAGS += -os2dllname gtlib(quoted diff) +0
-0b/meta/recipes-core/gettext/gettext-0.20.1/run-ptest
Quoted 4 lines
similarity index 100%
rename from meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest rename to meta/recipes-core/gettext/gettext-0.20.1/run-ptest diff --git
a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patchb/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patchQuoted 2 lines
similarity index 75%
rename from
meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patchQuoted 1 line
rename to
meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patchQuoted 2 lines
index
31ff9138a91..93f7c03334a100644
---
a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patchmeta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch Signed-off-by: Changqing Li <
Quoted 16 lines
+++
b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patchmeta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch +2
-1@@ -1,4 +1,4 @@ -From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001 +From ed64a5724ef7d6eb4e9a876f817ea266a536e195 Mon Sep 17 00:00:00 2001 From: "Hongjun.Yang" <[email protected]> Date: Thu, 28 Jul 2016 12:36:15 +0800 Subject: [PATCH] fix for ptest@@ -8,6 +8,7 @@ Add serial-tests support, ptest need it Upstream-Status: Inappropriate [oe specific] Signed-off-by: Changqing Li <[email protected]> + --- configure.ac | 2 +- gettext-runtime/configure.ac | 2 +-@@ -15,24 +16,24 @@ Signed-off-by: Changqing Li <Quoted 11 lines
meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch +3
-33 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index 5e996fa..880581f 100644 +index 38db6fd..f019ae0 100644 --- a/configure.ac +++ b/configure.ac -@@ -23,7 +23,7 @@ AC_INIT([gettext], - [[email protected]]) +@@ -22,7 +22,7 @@ AC_INIT([gettext], + [[email protected]])meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch Signed-off-by: Changqing Li <[email protected]>
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch +3
-3AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) AC_CONFIG_AUX_DIR([build-aux]) --AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip]) -+AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip]) +-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar]) ++AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests tar-ustar]) dnl Override automake's tar command used for creating distributions. - am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"' + am__tar='${AMTAR} chf - --format=ustar --owner=root --group=root"$$tardir"'
Review Signed-off-by: Changqing Li < · line 31
Quoted 1 line
(quoted diff) +0
-0diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac
Quoted 31 lines
meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch renamed from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch +4
-7-index e9299b6..d4f5528 100644 +index de203e7..138a07f 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], - [[email protected]]) + [[email protected]]) AC_CONFIG_SRCDIR([intl/dcigettext.c]) AC_CONFIG_AUX_DIR([../build-aux]) -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])@@ -41,11 +42,11 @@ index e9299b6..d4f5528 100644 dnl Installation directories. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac -index 920eeb6..c507434 100644 +index cf1dd73..b544d6d 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -22,7 +22,7 @@ AC_INIT([gettext-tools], - [[email protected]]) + [[email protected]]) AC_CONFIG_SRCDIR([src/msgfmt.c]) AC_CONFIG_AUX_DIR([../build-aux]) -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests])@@ -53,6 +54,3 @@ index 920eeb6..c507434 100644 AC_CONFIG_HEADERS([config.h]) dnl Installation directories. --- -2.1.4 -Quoted 1 line
diff --git
a/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patchb/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patchmeta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 6
Quoted 11 lines
new file mode 100644
index 00000000000..d1b2603779bmeta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0@@ -0,0 +1,713 @@ +From ef414b06be80c6f605731abc9e674e396b80ec9e Mon Sep 17 00:00:00 2001 +From: Ross Burton <[email protected]> +Date: Tue, 23 Jan 2018 00:54:13 +0000 +Subject: [PATCH] gettext: beat library detection into shape + +For reasons which I just can't fathom gnulib doesn't use the expectedtools to
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 7
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+find libraries but badly reinvents the wheel. This will trivially leadto host
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +4
-0+contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad +canonicalisation resulting in relative paths). + +Simply delete all the crazy, and replace with a single call topkg-config.
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 13
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +2
-0+ +Upstream-Status: Inappropriate (upstream still refuse to considerpkg-config)
Quoted 4 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +4
-0+Signed-off-by: Ross Burton <[email protected]> + +--- + gettext-tools/gnulib-m4/libxml.m4 | 99 +----------------meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+ .../gnulib-local/lib/term-styled-ostream.oo.c | 12 +- + libtextstyle/gnulib-local/m4/libcroco.m4 | 99 +++-------------- + libtextstyle/gnulib-local/m4/libglib.m4 | 104 +++--------------- + libtextstyle/gnulib-m4/libcroco.m4 | 99 +++-------------- + libtextstyle/gnulib-m4/libglib.m4 | 104 +++--------------- + libtextstyle/lib/term-styled-ostream.c | 12 +- + libtextstyle/lib/term-styled-ostream.oo.c | 12 +- + 8 files changed, 87 insertions(+), 454 deletions(-) + +diff --git a/gettext-tools/gnulib-m4/libxml.m4b/gettext-tools/gnulib-m4/libxml.m4
Quoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index 05b9550..031ee65 100644 +--- a/gettext-tools/gnulib-m4/libxml.m4 ++++ b/gettext-tools/gnulib-m4/libxml.m4 +@@ -13,6 +13,7 @@ dnl gl_LIBXML(FORCE-INCLUDED) + dnl forces the use of the included or an external libxml. + AC_DEFUN([gl_LIBXML],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+ [ ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_REQUIRE([AM_ICONV_LINK]) + + ifelse([$1], , [ +@@ -30,100 +31,10 @@ AC_DEFUN([gl_LIBXML], + INCXML= + ifelse([$1], [yes], , [ + if test "$gl_cv_libxml_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libxml2, orhave to use
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 9 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +9
-0+- dnl the included one. +- AC_CACHE_VAL([gl_cv_libxml], [ +- gl_cv_libxml=no +- gl_cv_LIBXML= +- gl_cv_LTLIBXML= +- gl_cv_INCXML= +- gl_save_LIBS="$LIBS" +- LIBS="$LIBS $LIBICONV" +- dnl Search for libxml2 and define LIBXML2, LTLIBXML2 andINCXML2
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 54
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +2
-0+- dnl accordingly. +- dnl Don't use xml2-config nor pkg-config, since it doesn'twork when
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 55
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl cross-compiling or when the C compiler in use is differentfrom the
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 57
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +2
-0+- dnl one that built the library. +- dnl Use a test program that tries to invoke xmlFree. On Cygwin1.7.x,
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 58
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl libxml2 is built in such a way that uses of xmlFree workfine with
Quoted 24 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +24
-0+- dnl -Wl,--enable-auto-import but lead to a link error with +- dnl -Wl,--disable-auto-import. +- AC_LIB_LINKFLAGS_BODY([xml2]) +- LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" +- AC_TRY_LINK([#include <libxml/xmlversion.h> +- #include <libxml/xmlmemory.h> +- #include <libxml/xpath.h> +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- ]) +- if test "$gl_cv_libxml" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCXML2" +- AC_TRY_LINK([#include <libxml/xmlversion.h> +- #include <libxml/xmlmemory.h> +- #include <libxml/xpath.h> +- ], +- [xmlCheckVersion (0);meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- gl_cv_INCXML="$INCXML2" +- ]) +- if test "$gl_cv_libxml" != yes; then +- dnl Often the include files are installed in
/usr/include/libxml2.meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 93
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl In libxml2-2.5, <libxml/xmlversion.h> isself-contained.
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 94
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl In libxml2-2.6, it includes <libxml/xmlexports.h>which is
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 5 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +5
-0+- dnl self-contained. +- libxml2_include_dir= +- AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>], +- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) +- libxml2_include_dir=`echo"$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'`
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 5 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +5
-0+- ]) +- if test -z "$libxml2_include_dir"; then +- AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>], +- [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) +- libxml2_include_dir=`echo"$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'`
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 3 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +3
-0+- ]) +- fi +- if test -n "$libxml2_include_dir" && test -d"$libxml2_include_dir"; then
Quoted 27 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +27
-0+- CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" +- AC_TRY_LINK([#include <libxml/xmlversion.h> +- #include <libxml/xmlmemory.h> +- #include <libxml/xpath.h> +- ], +- [xmlCheckVersion (0); +- xmlFree ((void *) 0); +- xmlXPathSetContextNode ((void *)0, (void *)0); +- ], +- [gl_cv_libxml=yes +- gl_cv_LIBXML="$LIBXML2 $LIBICONV" +- gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" +- gl_cv_INCXML="-I$libxml2_include_dir" +- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libxml]) +- AC_MSG_RESULT([$gl_cv_libxml]) +- if test $gl_cv_libxml = yes; then +- LIBXML="$gl_cv_LIBXML" +- LTLIBXML="$gl_cv_LTLIBXML" +- INCXML="$gl_cv_INCXML" +- elsemeta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+- gl_cv_libxml_use_included=yes +- fi ++ PKG_CHECK_MODULES([XML], [libxml-2.0]) ++ LIBXML=$XML_LIBS ++ LTLIBXML=$XML_LIBS ++ INCXML=$XML_CFLAGS + fi + ]) + AC_SUBST([LIBXML]) +diff --git a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c
b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.cQuoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index 2cfd4a8..d42c8b4 100644 +--- a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c ++++ b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c +@@ -22,15 +22,15 @@ + + #include <stdlib.h>meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+ +-#include <cr-om-parser.h> +-#include <cr-sel-eng.h> +-#include <cr-style.h> +-#include <cr-rgb.h> ++#include <libcroco/cr-om-parser.h> ++#include <libcroco/cr-sel-eng.h> ++#include <libcroco/cr-style.h> ++#include <libcroco/cr-rgb.h> + /* <cr-fonts.h> has a broken double-inclusion guard inlibcroco-0.6.1. */
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+ #ifndef __CR_FONTS_H__ +-# include <cr-fonts.h> ++# include <libcroco/cr-fonts.h> + #endif +-#include <cr-string.h> ++#include <libcroco/cr-string.h> + + #include "term-ostream.h" + #include "hash.h" +diff --git a/libtextstyle/gnulib-local/m4/libcroco.m4b/libtextstyle/gnulib-local/m4/libcroco.m4
Quoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index bc53cc6..10b2455 100644 +--- a/libtextstyle/gnulib-local/m4/libcroco.m4 ++++ b/libtextstyle/gnulib-local/m4/libcroco.m4 +@@ -1,99 +1,34 @@ +-# libcroco.m4 serial 3 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc.meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++# libcroco.m4 serial 2 (gettext-0.17) ++dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBCROCO +-dnl gives the user the option to decide whether to use the includedor
Quoted 25 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +25
-0+-dnl an external libcroco. +-dnl gl_LIBCROCO(FORCE-INCLUDED) +-dnl forces the use of the included or an external libcroco. + AC_DEFUN([gl_LIBCROCO], + [ +- ifelse([$1], [yes], , [ +- dnl libcroco depends on libglib. +- AC_REQUIRE([gl_LIBGLIB]) +- ]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ dnl libcroco depends on libglib. ++ AC_REQUIRE([gl_LIBGLIB]) + +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included libcroco is requested]) +- AC_ARG_WITH([included-libcroco], +- [ --with-included-libcroco use the libcroco included here], +- [gl_cv_libcroco_force_included=$withval], +- [gl_cv_libcroco_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libcroco_force_included]) +- ], [gl_cv_libcroco_force_included=$1]) ++ AC_MSG_CHECKING([whether included libcroco is requested]) ++ AC_ARG_WITH([included-libcroco], ++ [ --with-included-libcroco use the libcroco included here], ++ [gl_cv_libcroco_force_included=$withval],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ [gl_cv_libcroco_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libcroco_force_included]) + + gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" + LIBCROCO= + LTLIBCROCO= + INCCROCO= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libcroco_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libcroco-0.6,or have to
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 8 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +8
-0+- dnl use the included one. +- AC_CACHE_VAL([gl_cv_libcroco], [ +- gl_cv_libcroco=no +- gl_cv_LIBCROCO= +- gl_cv_LTLIBCROCO= +- gl_cv_INCCROCO= +- gl_save_LIBS="$LIBS" +- dnl Search for libcroco and define LIBCROCO_0_6,
LTLIBCROCO_0_6andmeta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 231
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +2
-0+- dnl INCCROCO_0_6 accordingly. +- dnl Don't use croco-0.6-config nor pkg-config, since itdoesn't work when
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 232
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl cross-compiling or when the C compiler in use is differentfrom the
Quoted 13 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +13
-0+- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) +- LIBS="$gl_save_LIBS $LIBCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="$INCCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- dnl Often the include files are installed in +- dnl /usr/include/libcroco-0.6/libcroco. +- AC_TRY_LINK([#include<
libcroco-0.6/libcroco/libcroco-config.h>],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 256
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- [const char *version = LIBCROCO_VERSION; return!version;],
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 257
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+-[
gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 258
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- libcroco_include_dir=`echo"$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
Quoted 23 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +23
-0+- if test -d "$libcroco_include_dir"; then +- gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="-I$libcroco_include_dir" +- fi +- ]) +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libcroco]) +- AC_MSG_RESULT([$gl_cv_libcroco]) +- if test $gl_cv_libcroco = yes; then +- LIBCROCO="$gl_cv_LIBCROCO" +- LTLIBCROCO="$gl_cv_LTLIBCROCO" +- INCCROCO="$gl_cv_INCCROCO" +- else +- gl_cv_libcroco_use_included=yes +- fi +- fi +- ])meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ if test "$gl_cv_libcroco_use_included" != yes; then ++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) ++ LIBCROCO=$CROCO_LIBS ++ LTLIBCROCO=$CROCO_LIBS ++ INCCROCO=$CROCO_CFLAGS ++ fi + AC_SUBST([LIBCROCO]) + AC_SUBST([LTLIBCROCO]) + AC_SUBST([INCCROCO]) +diff --git a/libtextstyle/gnulib-local/m4/libglib.m4b/libtextstyle/gnulib-local/m4/libglib.m4
Quoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index bef6fa3..8841755 100644 +--- a/libtextstyle/gnulib-local/m4/libglib.m4 ++++ b/libtextstyle/gnulib-local/m4/libglib.m4 +@@ -1,105 +1,31 @@ +-# libglib.m4 serial 4 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc.meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++# libglib.m4 serial 3 (gettext-0.17) ++dnl Copyright (C) 2006-2007, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBGLIB +-dnl gives the user the option to decide whether to use the includedor
Quoted 18 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +18
-0+-dnl an external libglib. +-dnl gl_LIBGLIB(FORCE-INCLUDED) +-dnl forces the use of the included or an external libglib. + AC_DEFUN([gl_LIBGLIB], + [ +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included glib is requested]) +- AC_ARG_WITH([included-glib], +- [ --with-included-glib use the glib2 included here], +- [gl_cv_libglib_force_included=$withval], +- [gl_cv_libglib_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libglib_force_included]) +- ], [gl_cv_libglib_force_included=$1]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ AC_MSG_CHECKING([whether included glib is requested]) ++ AC_ARG_WITH([included-glib], ++ [ --with-included-glib use the glib2 included here], ++ [gl_cv_libglib_force_included=$withval],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ [gl_cv_libglib_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libglib_force_included]) + + gl_cv_libglib_use_included="$gl_cv_libglib_force_included" + LIBGLIB= + LTLIBGLIB= + INCGLIB= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libglib_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libglib-2.0, orhave to use
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 8 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +8
-0+- dnl the included one. +- AC_CACHE_VAL([gl_cv_libglib], [ +- gl_cv_libglib=no +- gl_cv_LIBGLIB= +- gl_cv_LTLIBGLIB= +- gl_cv_INCGLIB= +- gl_save_LIBS="$LIBS" +- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0and
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 345
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +2
-0+- dnl INCGLIB_2_0 accordingly. +- dnl Don't use glib-config nor pkg-config, since it doesn'twork when
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 346
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl cross-compiling or when the C compiler in use is differentfrom the
Quoted 19 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +19
-0+- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([glib-2.0]) +- LIBS="$gl_save_LIBS $LIBGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.xmeta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="$INCGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- dnl Often the include files are installed in
/usr/include/glib-2.0Quoted 3 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +3
-0+- dnl and /usr/lib/glib-2.0/include. +- if test -n "$LIBGLIB_2_0_PREFIX"; then +- CPPFLAGS="$gl_save_CPPFLAGS(quoted diff) +0
-2-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0-I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
Quoted 18 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +18
-0+- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for glib]) +- AC_MSG_RESULT([$gl_cv_libglib]) +- if test $gl_cv_libglib = yes; then +- LIBGLIB="$gl_cv_LIBGLIB" +- LTLIBGLIB="$gl_cv_LTLIBGLIB" +- INCGLIB="$gl_cv_INCGLIB" +- else +- gl_cv_libglib_use_included=yes +- fi +- fi +- ])meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ if test "$gl_cv_libglib_use_included" != yes; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0]) ++ LIBGLIB="$GLIB_LIBS" ++ LTLIBGLIB="$GLIB_LIBS" ++ INCGLIB="$GLIB_CFLAGS" ++ fi + AC_SUBST([LIBGLIB]) + AC_SUBST([LTLIBGLIB]) + AC_SUBST([INCGLIB]) +diff --git a/libtextstyle/gnulib-m4/libcroco.m4b/libtextstyle/gnulib-m4/libcroco.m4
Quoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index bc53cc6..10b2455 100644 +--- a/libtextstyle/gnulib-m4/libcroco.m4 ++++ b/libtextstyle/gnulib-m4/libcroco.m4 +@@ -1,99 +1,34 @@ +-# libcroco.m4 serial 3 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc.meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++# libcroco.m4 serial 2 (gettext-0.17) ++dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBCROCO +-dnl gives the user the option to decide whether to use the includedor
Quoted 25 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +25
-0+-dnl an external libcroco. +-dnl gl_LIBCROCO(FORCE-INCLUDED) +-dnl forces the use of the included or an external libcroco. + AC_DEFUN([gl_LIBCROCO], + [ +- ifelse([$1], [yes], , [ +- dnl libcroco depends on libglib. +- AC_REQUIRE([gl_LIBGLIB]) +- ]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ dnl libcroco depends on libglib. ++ AC_REQUIRE([gl_LIBGLIB]) + +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included libcroco is requested]) +- AC_ARG_WITH([included-libcroco], +- [ --with-included-libcroco use the libcroco included here], +- [gl_cv_libcroco_force_included=$withval], +- [gl_cv_libcroco_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libcroco_force_included]) +- ], [gl_cv_libcroco_force_included=$1]) ++ AC_MSG_CHECKING([whether included libcroco is requested]) ++ AC_ARG_WITH([included-libcroco], ++ [ --with-included-libcroco use the libcroco included here], ++ [gl_cv_libcroco_force_included=$withval],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ [gl_cv_libcroco_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libcroco_force_included]) + + gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" + LIBCROCO= + LTLIBCROCO= + INCCROCO= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libcroco_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libcroco-0.6,or have to
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 8 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +8
-0+- dnl use the included one. +- AC_CACHE_VAL([gl_cv_libcroco], [ +- gl_cv_libcroco=no +- gl_cv_LIBCROCO= +- gl_cv_LTLIBCROCO= +- gl_cv_INCCROCO= +- gl_save_LIBS="$LIBS" +- dnl Search for libcroco and define LIBCROCO_0_6,
LTLIBCROCO_0_6andmeta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 477
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +2
-0+- dnl INCCROCO_0_6 accordingly. +- dnl Don't use croco-0.6-config nor pkg-config, since itdoesn't work when
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 478
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl cross-compiling or when the C compiler in use is differentfrom the
Quoted 13 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +13
-0+- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) +- LIBS="$gl_save_LIBS $LIBCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>], +- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" +- AC_TRY_LINK([#include <libcroco-config.h>],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+- [const char *version = LIBCROCO_VERSION; return !version;], +- [gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="$INCCROCO_0_6" +- ]) +- if test "$gl_cv_libcroco" != yes; then +- dnl Often the include files are installed in +- dnl /usr/include/libcroco-0.6/libcroco. +- AC_TRY_LINK([#include<
libcroco-0.6/libcroco/libcroco-config.h>],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 502
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- [const char *version = LIBCROCO_VERSION; return!version;],
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 503
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+-[
gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h])meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 504
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- libcroco_include_dir=`echo"$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'`
Quoted 23 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +23
-0+- if test -d "$libcroco_include_dir"; then +- gl_cv_libcroco=yes +- gl_cv_LIBCROCO="$LIBCROCO_0_6" +- gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" +- gl_cv_INCCROCO="-I$libcroco_include_dir" +- fi +- ]) +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for libcroco]) +- AC_MSG_RESULT([$gl_cv_libcroco]) +- if test $gl_cv_libcroco = yes; then +- LIBCROCO="$gl_cv_LIBCROCO" +- LTLIBCROCO="$gl_cv_LTLIBCROCO" +- INCCROCO="$gl_cv_INCCROCO" +- else +- gl_cv_libcroco_use_included=yes +- fi +- fi +- ])meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ if test "$gl_cv_libcroco_use_included" != yes; then ++ PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) ++ LIBCROCO=$CROCO_LIBS ++ LTLIBCROCO=$CROCO_LIBS ++ INCCROCO=$CROCO_CFLAGS ++ fi + AC_SUBST([LIBCROCO]) + AC_SUBST([LTLIBCROCO]) + AC_SUBST([INCCROCO]) +diff --git a/libtextstyle/gnulib-m4/libglib.m4b/libtextstyle/gnulib-m4/libglib.m4
Quoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index bef6fa3..8841755 100644 +--- a/libtextstyle/gnulib-m4/libglib.m4 ++++ b/libtextstyle/gnulib-m4/libglib.m4 +@@ -1,105 +1,31 @@ +-# libglib.m4 serial 4 +-dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc.meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++# libglib.m4 serial 3 (gettext-0.17) ++dnl Copyright (C) 2006-2007, 2015-2016 Free Software Foundation, Inc. + dnl This file is free software; the Free Software Foundation + dnl gives unlimited permission to copy and/or distribute it, + dnl with or without modifications, as long as this notice is preserved. + + dnl From Bruno Haible. + +-dnl gl_LIBGLIB +-dnl gives the user the option to decide whether to use the includedor
Quoted 18 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +18
-0+-dnl an external libglib. +-dnl gl_LIBGLIB(FORCE-INCLUDED) +-dnl forces the use of the included or an external libglib. + AC_DEFUN([gl_LIBGLIB], + [ +- ifelse([$1], , [ +- AC_MSG_CHECKING([whether included glib is requested]) +- AC_ARG_WITH([included-glib], +- [ --with-included-glib use the glib2 included here], +- [gl_cv_libglib_force_included=$withval], +- [gl_cv_libglib_force_included=no]) +- AC_MSG_RESULT([$gl_cv_libglib_force_included]) +- ], [gl_cv_libglib_force_included=$1]) ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++ AC_MSG_CHECKING([whether included glib is requested]) ++ AC_ARG_WITH([included-glib], ++ [ --with-included-glib use the glib2 included here], ++ [gl_cv_libglib_force_included=$withval],meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ [gl_cv_libglib_force_included=no]) ++ AC_MSG_RESULT([$gl_cv_libglib_force_included]) + + gl_cv_libglib_use_included="$gl_cv_libglib_force_included" + LIBGLIB= + LTLIBGLIB= + INCGLIB= +- ifelse([$1], [yes], , [ +- if test "$gl_cv_libglib_use_included" != yes; then +- dnl Figure out whether we can use a preinstalled libglib-2.0, orhave to use
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 8 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +8
-0+- dnl the included one. +- AC_CACHE_VAL([gl_cv_libglib], [ +- gl_cv_libglib=no +- gl_cv_LIBGLIB= +- gl_cv_LTLIBGLIB= +- gl_cv_INCGLIB= +- gl_save_LIBS="$LIBS" +- dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0and
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 591
Quoted 2 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +2
-0+- dnl INCGLIB_2_0 accordingly. +- dnl Don't use glib-config nor pkg-config, since it doesn'twork when
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch line 592
Quoted 1 line
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +1
-0+- dnl cross-compiling or when the C compiler in use is differentfrom the
Quoted 19 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +19
-0+- dnl one that built the library. +- AC_LIB_LINKFLAGS_BODY([glib-2.0]) +- LIBS="$gl_save_LIBS $LIBGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" +- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.xmeta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="$INCGLIB_2_0" +- ]) +- if test "$gl_cv_libglib" != yes; then +- dnl Often the include files are installed in
/usr/include/glib-2.0Quoted 3 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +3
-0+- dnl and /usr/lib/glib-2.0/include. +- if test -n "$LIBGLIB_2_0_PREFIX"; then +- CPPFLAGS="$gl_save_CPPFLAGS(quoted diff) +0
-2-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+- AC_TRY_LINK([#include <glib.h> +-#ifndef G_BEGIN_DECLS +-error this glib.h includes a glibconfig.h from a glib version 1.x +-#endif +-], +- [g_string_new ("foo");], +- [gl_cv_libglib=yes +- gl_cv_LIBGLIB="$LIBGLIB_2_0" +- gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" +- gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0-I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include"
Quoted 18 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +18
-0+- ]) +- fi +- fi +- CPPFLAGS="$gl_save_CPPFLAGS" +- fi +- LIBS="$gl_save_LIBS" +- ]) +- AC_MSG_CHECKING([for glib]) +- AC_MSG_RESULT([$gl_cv_libglib]) +- if test $gl_cv_libglib = yes; then +- LIBGLIB="$gl_cv_LIBGLIB" +- LTLIBGLIB="$gl_cv_LTLIBGLIB" +- INCGLIB="$gl_cv_INCGLIB" +- else +- gl_cv_libglib_use_included=yes +- fi +- fi +- ])meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0++ if test "$gl_cv_libglib_use_included" != yes; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0]) ++ LIBGLIB="$GLIB_LIBS" ++ LTLIBGLIB="$GLIB_LIBS" ++ INCGLIB="$GLIB_CFLAGS" ++ fi + AC_SUBST([LIBGLIB]) + AC_SUBST([LTLIBGLIB]) + AC_SUBST([INCGLIB]) +diff --git a/libtextstyle/lib/term-styled-ostream.c
b/libtextstyle/lib/term-styled-ostream.cQuoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index 3675b5f..811e546 100644 +--- a/libtextstyle/lib/term-styled-ostream.c ++++ b/libtextstyle/lib/term-styled-ostream.c +@@ -28,15 +28,15 @@ + + #include <stdlib.h>meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+ +-#include <cr-om-parser.h> +-#include <cr-sel-eng.h> +-#include <cr-style.h> +-#include <cr-rgb.h> ++#include <libcroco/cr-om-parser.h> ++#include <libcroco/cr-sel-eng.h> ++#include <libcroco/cr-style.h> ++#include <libcroco/cr-rgb.h> + /* <cr-fonts.h> has a broken double-inclusion guard inlibcroco-0.6.1. */
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+ #ifndef __CR_FONTS_H__ +-# include <cr-fonts.h> ++# include <libcroco/cr-fonts.h> + #endif +-#include <cr-string.h> ++#include <libcroco/cr-string.h> + + #include "term-ostream.h" + #include "hash.h" +diff --git a/libtextstyle/lib/term-styled-ostream.oo.c
b/libtextstyle/lib/term-styled-ostream.oo.cQuoted 6 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +6
-0+index 2cfd4a8..d42c8b4 100644 +--- a/libtextstyle/lib/term-styled-ostream.oo.c ++++ b/libtextstyle/lib/term-styled-ostream.oo.c +@@ -22,15 +22,15 @@ + + #include <stdlib.h>meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +10
-0+ +-#include <cr-om-parser.h> +-#include <cr-sel-eng.h> +-#include <cr-style.h> +-#include <cr-rgb.h> ++#include <libcroco/cr-om-parser.h> ++#include <libcroco/cr-sel-eng.h> ++#include <libcroco/cr-style.h> ++#include <libcroco/cr-rgb.h> + /* <cr-fonts.h> has a broken double-inclusion guard inlibcroco-0.6.1. */
Review
Quoted 10 lines
meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch new file +9
-0+ #ifndef __CR_FONTS_H__ +-# include <cr-fonts.h> ++# include <libcroco/cr-fonts.h> + #endif +-#include <cr-string.h> ++#include <libcroco/cr-string.h> + + #include "term-ostream.h" + #include "hash.h"(quoted diff) +0
-0b/meta/recipes-core/gettext/gettext_0.20.1.bb
meta/recipes-core/gettext/gettext_0.20.1.bb a few stand-alone programs to massage in various ways
Quoted 7 lines
similarity index 94%
rename from meta/recipes-core/gettext/gettext_0.19.8.1.bb rename to meta/recipes-core/gettext/gettext_0.20.1.bb index30121ad23e1..fc05ef2e0a3100644meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +0
-0@@ -6,7 +6,7 @@ a few stand-alone programs to massage in various waysthe sets of translatable a
Quoted 20 lines
meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +1
-9HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html" SECTION = "libs" LICENSE = "GPLv3+ & LGPL-2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e" # Because po-gram-gen.y has been modified by fix-CVE-2018-18751.patch, # it requires yacc which provided by bison-native@@ -17,17 +17,16 @@ PROVIDES = "virtual/libintl virtual/gettext" PROVIDES_class-native = "virtual/gettext-native" RCONFLICTS_${PN} = "proxy-libintl" SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ - file://parallel.patch \ - file://add-with-bisonlocaledir.patch \ - file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ - file://use-pkgconfig.patch \ - file://fix-CVE-2018-18751.patch \ - file://run-ptest \ - file://serial-tests-config.patch \ -"meta/recipes-core/gettext/gettext_0.20.1.bb PROVIDES = "virtual/libintl virtual/gettext" · line 30
Quoted 10 lines
meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +7
-2+ file://parallel.patch \ + file://add-with-bisonlocaledir.patch \ + file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ + file://use-pkgconfig.patch \ + file://run-ptest \ + file://serial-tests-config.patch \ + " -SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" -SRC_URI[sha256sum] ="
ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"meta/recipes-core/gettext/gettext_0.20.1.bb PROVIDES = "virtual/libintl virtual/gettext" · line 29
Quoted 2 lines
meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +2
-0+SRC_URI[md5sum] = "bb5b0c0caa028105f3ca1905ddc306e2" +SRC_URI[sha256sum] ="
66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c"meta/recipes-core/gettext/gettext_0.20.1.bb do_install_append_class-native () { · line 130
Quoted 8 lines
meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +0
-1inherit autotools texinfo pkgconfig ptest@@ -127,7 +126,7 @@ do_install_append_class-native () { rm ${D}${datadir}/gettext/po/remove-potcdate.sin create_wrapper ${D}${bindir}/msgfmt \ -GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.19.8/"
Quoted 4 lines
meta/recipes-core/gettext/gettext_0.20.1.bb renamed from meta/recipes-core/gettext/gettext_0.19.8.1.bb +1
-0+ GETTEXTDATADIR="${STAGING_DATADIR_NATIVE}/gettext-0.20/" }
PATCH 9/14 lrzsz: fix issues with newer versions of gettext
In reply to Alexander Kanavin--- ...-issues-with-recent-gettext-versions.patch | 42 +++++++++++++++++++ meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 11 ++--- 2 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0009-Fix-issues-with-recent-gettext-versions.patch
meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0009-Fix-issues-with-recent-gettext-versions.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 245c104267363c13f2ba83eca4409c673ee99fcf Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Thu, 21 Nov 2019 12:34:56 +0100 +Subject: [PATCH] Fix issues with recent gettext versions + +[external] is required by recent gettext versions, +USE_INCLUDED_LIBINTL is no longer defined by the gettext m4 +macro and was never documented anyway. + +Upstream-Status: Inappropriate [upstream is dead] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + configure.in | 2 +- + intl/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index aa20263..4bde433 100644 +--- a/configure.in ++++ b/configure.in +@@ -256,7 +256,7 @@ AC_SUBST(CFLAGS) + AC_SUBST(LDFLAGS) + AC_SUBST(LIBS) + +-AM_GNU_GETTEXT ++AM_GNU_GETTEXT([external]) + + AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME",[locale directory]) + +diff --git a/intl/Makefile.in b/intl/Makefile.in +index bbac1d5..7629a94 100644 +--- a/intl/Makefile.in ++++ b/intl/Makefile.in +@@ -138,7 +138,7 @@ libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc + DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ + COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h + +-all: all-@USE_INCLUDED_LIBINTL@ ++all: all-no-no + all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed + all-no: all-no-@BUILD_INCLUDED_LIBINTL@ + all-no-yes: libgnuintl.$la
meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb +6 -5
@@ -13,14 +13,15 @@ DEPENDS = "" PR = "r6" SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \ - file://autotools.patch \ - file://makefile.patch \ - file://gettext.patch \ - file://acdefine.patch \ - file://lrzsz_fix_for_automake-1.12.patch \ + file://autotools.patch \ + file://makefile.patch \ + file://gettext.patch \ + file://acdefine.patch \ + file://lrzsz_fix_for_automake-1.12.patch \ file://lrzsz-check-locale.h.patch \ file://cve-2018-10195.patch \ file://include.patch \ + file://0009-Fix-issues-with-recent-gettext-versions.patch \ " SRC_URI[md5sum] = "b5ce6a74abc9b9eb2af94dffdfd372a4"
Signature · 1 line
2.17.1
PATCH 10/14 p11-kit: convert to meson
In reply to Alexander Kanavin--- .../p11-kit/p11-kit_0.23.18.1.bb | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-)
meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb +6 -24
@@ -2,38 +2,20 @@ SUMMARY = "Provides a way to load and enumerate PKCS#11 modules" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50" -inherit autotools gettext pkgconfig gtk-doc +inherit meson gettext pkgconfig gtk-doc DEPENDS = "libtasn1 libffi" +DEPENDS_append = "${@' glib-2.0' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}" + SRC_URI = "git://github.com/p11-glue/p11-kit" SRCREV = "b0ebe7555c291808db29377ba79cb8326301f0a6" S = "${WORKDIR}/git" -AUTOTOOLS_AUXDIR = "${S}/build/litter" - PACKAGECONFIG ??= "" -PACKAGECONFIG[trust-paths] = "--with-trust-paths=/etc/ssl/certs/ca-certificates.crt,--without-trust-paths,,ca-certificates" - -# This recipe does not use the standard gtk-doc m4 macros, and so the ./configure flags -# that control gtk-doc build are non-standard -EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-doc --enable-doc-html --disable-doc-pdf', \ - '--disable-doc', d)} " - -# When building native recipes, disable gtkdoc, as it is not necessary, -# pulls in additional dependencies, and makes build times longer -EXTRA_OECONF_prepend_class-native = "--disable-doc " -EXTRA_OECONF_prepend_class-nativesdk = "--disable-doc " - -UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-gtk-doc-html --disable-gtk-doc-pdf --enable-gtk-doc --disable-gtk-doc" - -# p11-kit relies on these two being copied from source tree -# instead of being regenerated by gtkdoc-scan, but doesn't setup -# dependencies correctly when there is a parallel build. Let's pre-copy -# them instead. -do_compile_prepend () { - cp ${S}/doc/manual/p11-kit-overrides.txt ${S}/doc/manual/p11-kit-sections.txt ${B}/doc/manual/ -} +PACKAGECONFIG[trust-paths] = "-Dtrust_paths=/etc/ssl/certs/ca-certificates.crt,,,ca-certificates" + +GTKDOC_MESON_OPTION = 'gtk_doc' FILES_${PN} += " \ ${libdir}/p11-kit-proxy.so \
Signature · 1 line
2.17.1
PATCH 11/14 sed: upgrade to 4.7
In reply to Alexander KanavinDrop both patches as they are no longer necessary.
Rewrite ptest support as it has been refactored upstream.
Ptest results:
TOTAL: 67
PASS: 59
SKIP: 8 (due to missing valgrind)
--- ...charset_alias-when-building-for-musl.patch | 33 ---------- meta/recipes-extended/sed/sed-4.2.2/run-ptest | 3 - .../sed/sed-4.2.2/sed-add-ptest.patch | 66 ------------------- meta/recipes-extended/sed/sed/run-ptest | 5 ++ meta/recipes-extended/sed/sed_4.2.2.bb | 53 --------------- meta/recipes-extended/sed/sed_4.7.bb | 61 +++++++++++++++++ 6 files changed, 66 insertions(+), 155 deletions(-) delete mode 100644 meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch delete mode 100644 meta/recipes-extended/sed/sed-4.2.2/run-ptest delete mode 100644 meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch create mode 100644 meta/recipes-extended/sed/sed/run-ptest delete mode 100644 meta/recipes-extended/sed/sed_4.2.2.bb create mode 100644 meta/recipes-extended/sed/sed_4.7.bb
meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 13 Apr 2015 17:02:13 -0700 -Subject: [PATCH] Unset need_charset_alias when building for musl - -localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 -which actually shoudl be fixed in gnulib and then all downstream -projects will get it eventually. For now we apply the fix to -coreutils - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <[email protected]> ---- - lib/gnulib.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/gnulib.mk b/lib/gnulib.mk -index e1d74db..c0e92dd 100644 ---- a/lib/gnulib.mk -+++ b/lib/gnulib.mk -@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ --- -2.1.4 -
meta/recipes-extended/sed/sed-4.2.2/run-ptest deleted +0 -3
@@ -1,3 +0,0 @@ -#!/bin/sh - -make -C testsuite -k runtest-TESTS
meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch deleted +0 -66
66 lines not on this page · raw message
meta/recipes-extended/sed/sed/run-ptest new file +5 -0
@@ -0,0 +1,5 @@ +#!/bin/sh + +chown nobody testsuite +chown nobody ../ptest +su nobody -c "make test-suite.log"
meta/recipes-extended/sed/sed_4.2.2.bb deleted +0 -53
53 lines not on this page · raw message
meta/recipes-extended/sed/sed_4.7.bb new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 12/14 bind: update 9.11.5-P4 -> 9.11.13
In reply to Alexander KanavinDrop backports.
Drop 0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch and 0001-lib-dns-gen.c-fix-too-long-error.patch as problem is fixed upstream.
---
.../bind/0001-bind-fix-CVE-2019-6471.patch | 64 --
....in-remove-useless-L-use_openssl-lib.patch | 18 +-
...01-fix-enforcement-of-tcp-clients-v1.patch | 60 --
...c-extend-DIRNAMESIZE-from-256-to-512.patch | 22 -
...001-lib-dns-gen.c-fix-too-long-error.patch | 31 -
...p-clients-could-still-be-exceeded-v2.patch | 670 -------------
...rence-counter-for-pipeline-groups-v3.patch | 278 ------
...accounting-and-client-mortality-chec.patch | 512 ----------
...a-and-pipeline-refs-allow-special-ca.patch | 911 ------------------
...allowance-for-tcp-clients-interfaces.patch | 80 --
...perations-in-bin-named-client.c-with.patch | 140 ---
...ching-for-json-headers-searches-sysr.patch | 15 +-
.../{bind_9.11.5-P4.bb => bind_9.11.13.bb} | 18 +-
13 files changed, 20 insertions(+), 2799 deletions(-)
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
delete mode 100644 meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
rename meta/recipes-connectivity/bind/{bind_9.11.5-P4.bb => bind_9.11.13.bb} (86%)meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch deleted +0 -64
@@ -1,64 +0,0 @@ -Backport patch to fix CVE-2019-6471. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2019-6471 - -CVE: CVE-2019-6471 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/3a9c7bb] - -Signed-off-by: Kai Kang <[email protected]> - -From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001 -From: Mark Andrews <[email protected]> -Date: Tue, 19 Mar 2019 14:14:21 +1100 -Subject: [PATCH] move item_out test inside lock in dns_dispatch_getnext() - -(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712) ---- - lib/dns/dispatch.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c -index 408beda367..3278db4a07 100644 ---- a/lib/dns/dispatch.c -+++ b/lib/dns/dispatch.c -@@ -134,7 +134,7 @@ struct dns_dispentry { - isc_task_t *task; - isc_taskaction_t action; - void *arg; -- bool item_out; -+ bool item_out; - dispsocket_t *dispsocket; - ISC_LIST(dns_dispatchevent_t) items; - ISC_LINK(dns_dispentry_t) link; -@@ -3422,13 +3422,14 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) { - disp = resp->disp; - REQUIRE(VALID_DISPATCH(disp)); - -- REQUIRE(resp->item_out == true); -- resp->item_out = false; -- - ev = *sockevent; - *sockevent = NULL; - - LOCK(&disp->lock); -+ -+ REQUIRE(resp->item_out == true); -+ resp->item_out = false; -+ - if (ev->buffer.base != NULL) - free_buffer(disp, ev->buffer.base, ev->buffer.length); - free_devent(disp, ev); -@@ -3573,6 +3574,9 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp, - isc_task_send(disp->task[0], &disp->ctlevent); - } - -+/* -+ * disp must be locked. -+ */ - static void - do_cancel(dns_dispatch_t *disp) { - dns_dispatchevent_t *ev; --- -2.20.1 -
meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch +8 -10
@@ -1,4 +1,4 @@ -From 950867d9fd3f690e271c8c807b6eed144b2935b2 Mon Sep 17 00:00:00 2001 +From 2325a92f1896a2a7f586611686801b41fbc91b50 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 27 Aug 2018 15:00:51 +0800 Subject: [PATCH] configure.in: remove useless `-L$use_openssl/lib'
@@ -10,15 +10,16 @@ and helpful for clean up host build path in isc-config.sh Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Hongxu Jia <[email protected]> + --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.in b/configure.in -index 54efc55..76ac0eb 100644 ---- a/configure.in -+++ b/configure.in -@@ -1691,7 +1691,7 @@ If you don't want OpenSSL, use --without-openssl]) +diff --git a/configure.ac b/configure.ac +index e85a5c6..2bbfc58 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1631,7 +1631,7 @@ If you don't want OpenSSL, use --without-openssl]) fi ;; *)
@@ -27,6 +28,3 @@ index 54efc55..76ac0eb 100644 ;; esac fi --- -2.7.4 -
meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch deleted +0 -60
60 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch deleted +0 -22
@@ -1,22 +0,0 @@ -Upstream-Status: Pending - -Subject: gen.c: extend DIRNAMESIZE from 256 to 512 - -Signed-off-by: Chen Qi <[email protected]> ---- - lib/dns/gen.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: bind-9.11.3/lib/dns/gen.c -=================================================================== ---- bind-9.11.3.orig/lib/dns/gen.c -+++ bind-9.11.3/lib/dns/gen.c -@@ -130,7 +130,7 @@ static const char copyright[] = - #define TYPECLASSBUF (TYPECLASSLEN + 1) - #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d" - #define ATTRIBUTESIZE 256 --#define DIRNAMESIZE 256 -+#define DIRNAMESIZE 512 - - static struct cc { - struct cc *next;
meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 5bc3167a8b714ec0c4a3f1c7f3b9411296ec0a23 Mon Sep 17 00:00:00 2001 -From: Robert Yang <[email protected]> -Date: Wed, 16 Sep 2015 20:23:47 -0700 -Subject: [PATCH] lib/dns/gen.c: fix too long error - -The 512 is a little short when build in deep dir, and cause "too long" -error, use PATH_MAX if defined. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <[email protected]> ---- - lib/dns/gen.c | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: bind-9.11.3/lib/dns/gen.c -=================================================================== ---- bind-9.11.3.orig/lib/dns/gen.c -+++ bind-9.11.3/lib/dns/gen.c -@@ -130,7 +130,11 @@ static const char copyright[] = - #define TYPECLASSBUF (TYPECLASSLEN + 1) - #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d" - #define ATTRIBUTESIZE 256 -+#ifdef PATH_MAX -+#define DIRNAMESIZE PATH_MAX -+#else - #define DIRNAMESIZE 512 -+#endif - - static struct cc { - struct cc *next;
meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch deleted +0 -670
670 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch deleted +0 -278
278 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch deleted +0 -512
512 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch deleted +0 -911
911 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch deleted +0 -80
80 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch deleted +0 -140
140 lines not on this page · raw message
meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch +8 -7
@@ -1,4 +1,4 @@ -From 9473d29843579802e96b0293a3e953fed93de82c Mon Sep 17 00:00:00 2001 +From edda20fb5a6e88548f85e39d34d6c074306e15bc Mon Sep 17 00:00:00 2001 From: Paul Gortmaker <[email protected]> Date: Tue, 9 Jun 2015 11:22:00 -0400 Subject: [PATCH] bind: ensure searching for json headers searches sysroot
@@ -27,15 +27,16 @@ to make use of the combination some day. Upstream-Status: Inappropriate [OE Specific] Signed-off-by: Paul Gortmaker <[email protected]> + --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: bind-9.11.3/configure.in -=================================================================== ---- bind-9.11.3.orig/configure.in -+++ bind-9.11.3/configure.in -@@ -2574,7 +2574,7 @@ case "$use_libjson" in +diff --git a/configure.ac b/configure.ac +index 17392fd..e85a5c6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2449,7 +2449,7 @@ case "$use_libjson" in libjson_libs="" ;; auto|yes)
meta/recipes-connectivity/bind/bind_9.11.13.bb renamed from meta/recipes-connectivity/bind/bind_9.11.5-P4.bb +4 -14
@@ -15,23 +15,13 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://make-etc-initd-bind-stop-work.patch \ file://init.d-add-support-for-read-only-rootfs.patch \ file://bind-ensure-searching-for-json-headers-searches-sysr.patch \ - file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \ - file://0001-lib-dns-gen.c-fix-too-long-error.patch \ file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \ file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ file://0001-avoid-start-failure-with-bind-user.patch \ - file://0001-bind-fix-CVE-2019-6471.patch \ - file://0001-fix-enforcement-of-tcp-clients-v1.patch \ - file://0002-tcp-clients-could-still-be-exceeded-v2.patch \ - file://0003-use-reference-counter-for-pipeline-groups-v3.patch \ - file://0004-better-tcpquota-accounting-and-client-mortality-chec.patch \ - file://0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch \ - file://0006-restore-allowance-for-tcp-clients-interfaces.patch \ - file://0007-Replace-atomic-operations-in-bin-named-client.c-with.patch \ -" - -SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960" -SRC_URI[sha256sum] = "7e8c08192bcbaeb6e9f2391a70e67583b027b90e8c4bc1605da6eb126edde434" + " + +SRC_URI[md5sum] = "17de0d024ab1eac377f1c2854dc25057" +SRC_URI[sha256sum] = "fd3f3cc9fcfcdaa752db35eb24598afa1fdcc2509d3227fc90a8631b7b400f7d" UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4
Signature · 1 line
2.17.1
Re: [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13
Quoted 4 lines · Alexander Kanavin
Drop backports.
Drop 0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch and 0001-lib-dns-gen.c-fix-too-long-error.patch as problem is fixed
Bug fix only?
-armin
Quoted 2,966 lines
upstream.
Signed-off-by Alexander Kanavin <[email protected]>--- .../bind/0001-bind-fix-CVE-2019-6471.patch | 64 -- ....in-remove-useless-L-use_openssl-lib.patch | 18 +- ...01-fix-enforcement-of-tcp-clients-v1.patch | 60 -- ...c-extend-DIRNAMESIZE-from-256-to-512.patch | 22 - ...001-lib-dns-gen.c-fix-too-long-error.patch | 31 - ...p-clients-could-still-be-exceeded-v2.patch | 670 ------------- ...rence-counter-for-pipeline-groups-v3.patch | 278 ------ ...accounting-and-client-mortality-chec.patch | 512 ---------- ...a-and-pipeline-refs-allow-special-ca.patch | 911 ------------------ ...allowance-for-tcp-clients-interfaces.patch | 80 -- ...perations-in-bin-named-client.c-with.patch | 140 --- ...ching-for-json-headers-searches-sysr.patch | 15 +- .../{bind_9.11.5-P4.bb => bind_9.11.13.bb} | 18 +- 13 files changed, 20 insertions(+), 2799 deletions(-) delete mode 100644 meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch delete mode 100644 meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch rename meta/recipes-connectivity/bind/{bind_9.11.5-P4.bb => bind_9.11.13.bb} (86%)meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch deleted +0
-64@@ -1,64 +0,0 @@ -Backport patch to fix CVE-2019-6471. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2019-6471 - -CVE: CVE-2019-6471 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/3a9c7bb] - -Signed-off-by: Kai Kang <[email protected]> - -From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001 -From: Mark Andrews <[email protected]> -Date: Tue, 19 Mar 2019 14:14:21 +1100 -Subject: [PATCH] move item_out test inside lock in dns_dispatch_getnext() - -(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712) ---- - lib/dns/dispatch.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/lib/dns/dispatch.c b/lib/dns/dispatch.c -index 408beda367..3278db4a07 100644 ---- a/lib/dns/dispatch.c -+++ b/lib/dns/dispatch.c -@@ -134,7 +134,7 @@ struct dns_dispentry { - isc_task_t *task; - isc_taskaction_t action; - void *arg; -- bool item_out; -+ bool item_out; - dispsocket_t *dispsocket; - ISC_LIST(dns_dispatchevent_t) items; - ISC_LINK(dns_dispentry_t) link; -@@ -3422,13 +3422,14 @@ dns_dispatch_getnext(dns_dispentry_t *resp, dns_dispatchevent_t **sockevent) { - disp = resp->disp; - REQUIRE(VALID_DISPATCH(disp)); - -- REQUIRE(resp->item_out == true); -- resp->item_out = false; -- - ev = *sockevent; - *sockevent = NULL; - - LOCK(&disp->lock); -+ -+ REQUIRE(resp->item_out == true); -+ resp->item_out = false; -+ - if (ev->buffer.base != NULL) - free_buffer(disp, ev->buffer.base, ev->buffer.length); - free_devent(disp, ev); -@@ -3573,6 +3574,9 @@ dns_dispatch_removeresponse(dns_dispentry_t **resp, - isc_task_send(disp->task[0], &disp->ctlevent); - } - -+/* -+ * disp must be locked. -+ */ - static void - do_cancel(dns_dispatch_t *disp) { - dns_dispatchevent_t *ev; --- -2.20.1 -meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch +8
-10@@ -1,4 +1,4 @@ -From 950867d9fd3f690e271c8c807b6eed144b2935b2 Mon Sep 17 00:00:00 2001 +From 2325a92f1896a2a7f586611686801b41fbc91b50 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Mon, 27 Aug 2018 15:00:51 +0800 Subject: [PATCH] configure.in: remove useless `-L$use_openssl/lib'@@ -10,15 +10,16 @@ and helpful for clean up host build path in isc-config.sh Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Hongxu Jia <[email protected]> + --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.in b/configure.in -index 54efc55..76ac0eb 100644 ---- a/configure.in -+++ b/configure.in -@@ -1691,7 +1691,7 @@ If you don't want OpenSSL, use --without-openssl]) +diff --git a/configure.ac b/configure.ac +index e85a5c6..2bbfc58 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1631,7 +1631,7 @@ If you don't want OpenSSL, use --without-openssl]) fi ;; *)@@ -27,6 +28,3 @@ index 54efc55..76ac0eb 100644 ;; esac fi --- -2.7.4 -meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch deleted +0
-60@@ -1,60 +0,0 @@ -Backport patch to fix CVE-2018-5743. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2018-5743 - -CVE: CVE-2018-5743 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/ec2d50d] - -Signed-off-by: Kai Kang <[email protected]> - -From ec2d50da8d81814640e28593d912f4b96c7efece Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <[email protected]> -Date: Thu, 3 Jan 2019 14:17:43 +0100 -Subject: [PATCH 1/6] fix enforcement of tcp-clients (v1) - -tcp-clients settings could be exceeded in some cases by -creating more and more active TCP clients that are over -the set quota limit, which in the end could lead to a -DoS attack by e.g. exhaustion of file descriptors. - -If TCP client we're closing went over the quota (so it's -not attached to a quota) mark it as mortal - so that it -will be destroyed and not set up to listen for new -connections - unless it's the last client for a specific -interface. - -(cherry picked from commit f97131d21b97381cef72b971b157345c1f9b4115) -(cherry picked from commit 9689ffc485df8f971f0ad81ab8ab1f5389493776) ---- - bin/named/client.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/bin/named/client.c b/bin/named/client.c -index d482da7121..0739dd48af 100644 ---- a/bin/named/client.c -+++ b/bin/named/client.c -@@ -421,8 +421,19 @@ exit_check(ns_client_t *client) { - isc_socket_detach(&client->tcpsocket); - } - -- if (client->tcpquota != NULL) -+ if (client->tcpquota != NULL) { - isc_quota_detach(&client->tcpquota); -+ } else { -+ /* -+ * We went over quota with this client, we don't -+ * want to restart listening unless this is the -+ * last client on this interface, which is -+ * checked later. -+ */ -+ if (TCP_CLIENT(client)) { -+ client->mortal = true; -+ } -+ } - - if (client->timerset) { - (void)isc_timer_reset(client->timer, --- -2.20.1 -meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch deleted +0
-22@@ -1,22 +0,0 @@ -Upstream-Status: Pending - -Subject: gen.c: extend DIRNAMESIZE from 256 to 512 - -Signed-off-by: Chen Qi <[email protected]> ---- - lib/dns/gen.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: bind-9.11.3/lib/dns/gen.c -=================================================================== ---- bind-9.11.3.orig/lib/dns/gen.c -+++ bind-9.11.3/lib/dns/gen.c -@@ -130,7 +130,7 @@ static const char copyright[] = - #define TYPECLASSBUF (TYPECLASSLEN + 1) - #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d" - #define ATTRIBUTESIZE 256 --#define DIRNAMESIZE 256 -+#define DIRNAMESIZE 512 - - static struct cc { - struct cc *next;meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch deleted +0
-31@@ -1,31 +0,0 @@ -From 5bc3167a8b714ec0c4a3f1c7f3b9411296ec0a23 Mon Sep 17 00:00:00 2001 -From: Robert Yang <[email protected]> -Date: Wed, 16 Sep 2015 20:23:47 -0700 -Subject: [PATCH] lib/dns/gen.c: fix too long error - -The 512 is a little short when build in deep dir, and cause "too long" -error, use PATH_MAX if defined. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <[email protected]> ---- - lib/dns/gen.c | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: bind-9.11.3/lib/dns/gen.c -=================================================================== ---- bind-9.11.3.orig/lib/dns/gen.c -+++ bind-9.11.3/lib/dns/gen.c -@@ -130,7 +130,11 @@ static const char copyright[] = - #define TYPECLASSBUF (TYPECLASSLEN + 1) - #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d" - #define ATTRIBUTESIZE 256 -+#ifdef PATH_MAX -+#define DIRNAMESIZE PATH_MAX -+#else - #define DIRNAMESIZE 512 -+#endif - - static struct cc { - struct cc *next;meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch deleted +0
-670@@ -1,670 +0,0 @@ -Backport patch to fix CVE-2018-5743. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2018-5743 - -CVE: CVE-2018-5743 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/719f604] - -Signed-off-by: Kai Kang <[email protected]> - -From 719f604e3fad5b7479bd14e2fa0ef4413f0a8fdc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <[email protected]> -Date: Fri, 4 Jan 2019 12:50:51 +0100 -Subject: [PATCH 2/6] tcp-clients could still be exceeded (v2) - -the TCP client quota could still be ineffective under some -circumstances. this change: - -- improves quota accounting to ensure that TCP clients are - properly limited, while still guaranteeing that at least one client - is always available to serve TCP connections on each interface. -- uses more descriptive names and removes one (ntcptarget) that - was no longer needed -- adds comments - -(cherry picked from commit 924651f1d5e605cd186d03f4f7340bcc54d77cc2) -(cherry picked from commit 55a7a458e30e47874d34bdf1079eb863a0512396) ---- - bin/named/client.c | 311 ++++++++++++++++++++----- - bin/named/include/named/client.h | 14 +- - bin/named/include/named/interfacemgr.h | 11 +- - bin/named/interfacemgr.c | 8 +- - 4 files changed, 267 insertions(+), 77 deletions(-) - -diff --git a/bin/named/client.c b/bin/named/client.c -index 0739dd48af..a7b49a0f71 100644 ---- a/bin/named/client.c -+++ b/bin/named/client.c -@@ -246,10 +246,11 @@ static void ns_client_dumpmessage(ns_client_t *client, const char *reason); - static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, - dns_dispatch_t *disp, bool tcp); - static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, -- isc_socket_t *sock); -+ isc_socket_t *sock, ns_client_t *oldclient); - static inline bool --allowed(isc_netaddr_t *addr, dns_name_t *signer, isc_netaddr_t *ecs_addr, -- uint8_t ecs_addrlen, uint8_t *ecs_scope, dns_acl_t *acl); -+allowed(isc_netaddr_t *addr, dns_name_t *signer, -+ isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen, -+ uint8_t *ecs_scope, dns_acl_t *acl) - static void compute_cookie(ns_client_t *client, uint32_t when, - uint32_t nonce, const unsigned char *secret, - isc_buffer_t *buf); -@@ -405,8 +406,11 @@ exit_check(ns_client_t *client) { - */ - INSIST(client->recursionquota == NULL); - INSIST(client->newstate <= NS_CLIENTSTATE_READY); -- if (client->nreads > 0) -+ -+ if (client->nreads > 0) { - dns_tcpmsg_cancelread(&client->tcpmsg); -+ } -+ - if (client->nreads != 0) { - /* Still waiting for read cancel completion. */ - return (true); -@@ -416,25 +420,58 @@ exit_check(ns_client_t *client) { - dns_tcpmsg_invalidate(&client->tcpmsg); - client->tcpmsg_valid = false; - } -+ - if (client->tcpsocket != NULL) { - CTRACE("closetcp"); - isc_socket_detach(&client->tcpsocket); -+ -+ if (client->tcpactive) { -+ LOCK(&client->interface->lock); -+ INSIST(client->interface->ntcpactive > 0); -+ client->interface->ntcpactive--; -+ UNLOCK(&client->interface->lock); -+ client->tcpactive = false; -+ } - } - - if (client->tcpquota != NULL) { -- isc_quota_detach(&client->tcpquota); -- } else { - /* -- * We went over quota with this client, we don't -- * want to restart listening unless this is the -- * last client on this interface, which is -- * checked later. -+ * If we are not in a pipeline group, or -+ * we are the last client in the group, detach from -+ * tcpquota; otherwise, transfer the quota to -+ * another client in the same group. - */ -- if (TCP_CLIENT(client)) { -- client->mortal = true; -+ if (!ISC_LINK_LINKED(client, glink) || -+ (client->glink.next == NULL && -+ client->glink.prev == NULL)) -+ { -+ isc_quota_detach(&client->tcpquota); -+ } else if (client->glink.next != NULL) { -+ INSIST(client->glink.next->tcpquota == NULL); -+ client->glink.next->tcpquota = client->tcpquota; -+ client->tcpquota = NULL; -+ } else { -+ INSIST(client->glink.prev->tcpquota == NULL); -+ client->glink.prev->tcpquota = client->tcpquota; -+ client->tcpquota = NULL; - } - } - -+ /* -+ * Unlink from pipeline group. -+ */ -+ if (ISC_LINK_LINKED(client, glink)) { -+ if (client->glink.next != NULL) { -+ client->glink.next->glink.prev = -+ client->glink.prev; -+ } -+ if (client->glink.prev != NULL) { -+ client->glink.prev->glink.next = -+ client->glink.next; -+ } -+ ISC_LINK_INIT(client, glink); -+ } -+ - if (client->timerset) { - (void)isc_timer_reset(client->timer, - isc_timertype_inactive, -@@ -455,15 +492,16 @@ exit_check(ns_client_t *client) { - * that already. Check whether this client needs to remain - * active and force it to go inactive if not. - * -- * UDP clients go inactive at this point, but TCP clients -- * may remain active if we have fewer active TCP client -- * objects than desired due to an earlier quota exhaustion. -+ * UDP clients go inactive at this point, but a TCP client -+ * will needs to remain active if no other clients are -+ * listening for TCP requests on this interface, to -+ * prevent this interface from going nonresponsive. - */ - if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) { - LOCK(&client->interface->lock); -- if (client->interface->ntcpcurrent < -- client->interface->ntcptarget) -+ if (client->interface->ntcpaccepting == 0) { - client->mortal = false; -+ } - UNLOCK(&client->interface->lock); - } - -@@ -472,15 +510,17 @@ exit_check(ns_client_t *client) { - * queue for recycling. - */ - if (client->mortal) { -- if (client->newstate > NS_CLIENTSTATE_INACTIVE) -+ if (client->newstate > NS_CLIENTSTATE_INACTIVE) { - client->newstate = NS_CLIENTSTATE_INACTIVE; -+ } - } - - if (NS_CLIENTSTATE_READY == client->newstate) { - if (TCP_CLIENT(client)) { - client_accept(client); -- } else -+ } else { - client_udprecv(client); -+ } - client->newstate = NS_CLIENTSTATE_MAX; - return (true); - } -@@ -492,41 +532,57 @@ exit_check(ns_client_t *client) { - /* - * We are trying to enter the inactive state. - */ -- if (client->naccepts > 0) -+ if (client->naccepts > 0) { - isc_socket_cancel(client->tcplistener, client->task, - ISC_SOCKCANCEL_ACCEPT); -+ } - - /* Still waiting for accept cancel completion. */ -- if (! (client->naccepts == 0)) -+ if (! (client->naccepts == 0)) { - return (true); -+ } - - /* Accept cancel is complete. */ -- if (client->nrecvs > 0) -+ if (client->nrecvs > 0) { - isc_socket_cancel(client->udpsocket, client->task, - ISC_SOCKCANCEL_RECV); -+ } - - /* Still waiting for recv cancel completion. */ -- if (! (client->nrecvs == 0)) -+ if (! (client->nrecvs == 0)) { - return (true); -+ } - - /* Still waiting for control event to be delivered */ -- if (client->nctls > 0) -+ if (client->nctls > 0) { - return (true); -- -- /* Deactivate the client. */ -- if (client->interface) -- ns_interface_detach(&client->interface); -+ } - - INSIST(client->naccepts == 0); - INSIST(client->recursionquota == NULL); -- if (client->tcplistener != NULL) -+ if (client->tcplistener != NULL) { - isc_socket_detach(&client->tcplistener); - -- if (client->udpsocket != NULL) -+ if (client->tcpactive) { -+ LOCK(&client->interface->lock); -+ INSIST(client->interface->ntcpactive > 0); -+ client->interface->ntcpactive--; -+ UNLOCK(&client->interface->lock); -+ client->tcpactive = false; -+ } -+ } -+ if (client->udpsocket != NULL) { - isc_socket_detach(&client->udpsocket); -+ } - -- if (client->dispatch != NULL) -+ /* Deactivate the client. */ -+ if (client->interface != NULL) { -+ ns_interface_detach(&client->interface); -+ } -+ -+ if (client->dispatch != NULL) { - dns_dispatch_detach(&client->dispatch); -+ } - - client->attributes = 0; - client->mortal = false; -@@ -551,10 +607,13 @@ exit_check(ns_client_t *client) { - client->newstate = NS_CLIENTSTATE_MAX; - if (!ns_g_clienttest && manager != NULL && - !manager->exiting) -+ { - ISC_QUEUE_PUSH(manager->inactive, client, - ilink); -- if (client->needshutdown) -+ } -+ if (client->needshutdown) { - isc_task_shutdown(client->task); -+ } - return (true); - } - } -@@ -675,7 +734,6 @@ client_start(isc_task_t *task, isc_event_t *event) { - } - } - -- - /*% - * The client's task has received a shutdown event. - */ -@@ -2507,17 +2565,12 @@ client_request(isc_task_t *task, isc_event_t *event) { - /* - * Pipeline TCP query processing. - */ -- if (client->message->opcode != dns_opcode_query) -+ if (client->message->opcode != dns_opcode_query) { - client->pipelined = false; -+ } - if (TCP_CLIENT(client) && client->pipelined) { -- result = isc_quota_reserve(&ns_g_server->tcpquota); -- if (result == ISC_R_SUCCESS) -- result = ns_client_replace(client); -+ result = ns_client_replace(client); - if (result != ISC_R_SUCCESS) { -- ns_client_log(client, NS_LOGCATEGORY_CLIENT, -- NS_LOGMODULE_CLIENT, ISC_LOG_WARNING, -- "no more TCP clients(read): %s", -- isc_result_totext(result)); - client->pipelined = false; - } - } -@@ -3087,6 +3140,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { - client->filter_aaaa = dns_aaaa_ok; - #endif - client->needshutdown = ns_g_clienttest; -+ client->tcpactive = false; - - ISC_EVENT_INIT(&client->ctlevent, sizeof(client->ctlevent), 0, NULL, - NS_EVENT_CLIENTCONTROL, client_start, client, client, -@@ -3100,6 +3154,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { - client->formerrcache.id = 0; - ISC_LINK_INIT(client, link); - ISC_LINK_INIT(client, rlink); -+ ISC_LINK_INIT(client, glink); - ISC_QLINK_INIT(client, ilink); - client->keytag = NULL; - client->keytag_len = 0; -@@ -3193,12 +3248,19 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - - INSIST(client->state == NS_CLIENTSTATE_READY); - -+ /* -+ * The accept() was successful and we're now establishing a new -+ * connection. We need to make note of it in the client and -+ * interface objects so client objects can do the right thing -+ * when going inactive in exit_check() (see comments in -+ * client_accept() for details). -+ */ - INSIST(client->naccepts == 1); - client->naccepts--; - - LOCK(&client->interface->lock); -- INSIST(client->interface->ntcpcurrent > 0); -- client->interface->ntcpcurrent--; -+ INSIST(client->interface->ntcpaccepting > 0); -+ client->interface->ntcpaccepting--; - UNLOCK(&client->interface->lock); - - /* -@@ -3232,6 +3294,9 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3), - "accept failed: %s", - isc_result_totext(nevent->result)); -+ if (client->tcpquota != NULL) { -+ isc_quota_detach(&client->tcpquota); -+ } - } - - if (exit_check(client)) -@@ -3270,18 +3335,12 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - * deny service to legitimate TCP clients. - */ - client->pipelined = false; -- result = isc_quota_attach(&ns_g_server->tcpquota, -- &client->tcpquota); -- if (result == ISC_R_SUCCESS) -- result = ns_client_replace(client); -- if (result != ISC_R_SUCCESS) { -- ns_client_log(client, NS_LOGCATEGORY_CLIENT, -- NS_LOGMODULE_CLIENT, ISC_LOG_WARNING, -- "no more TCP clients(accept): %s", -- isc_result_totext(result)); -- } else if (ns_g_server->keepresporder == NULL || -- !allowed(&netaddr, NULL, NULL, 0, NULL, -- ns_g_server->keepresporder)) { -+ result = ns_client_replace(client); -+ if (result == ISC_R_SUCCESS && -+ (client->sctx->keepresporder == NULL || -+ !allowed(&netaddr, NULL, NULL, 0, NULL, -+ ns_g_server->keepresporder))) -+ { - client->pipelined = true; - } - -@@ -3298,12 +3357,80 @@ client_accept(ns_client_t *client) { - - CTRACE("accept"); - -+ /* -+ * The tcpquota object can only be simultaneously referenced a -+ * pre-defined number of times; this is configured by 'tcp-clients' -+ * in named.conf. If we can't attach to it here, that means the TCP -+ * client quota has been exceeded. -+ */ -+ result = isc_quota_attach(&client->sctx->tcpquota, -+ &client->tcpquota); -+ if (result != ISC_R_SUCCESS) { -+ bool exit; -+ -+ ns_client_log(client, NS_LOGCATEGORY_CLIENT, -+ NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1), -+ "no more TCP clients: %s", -+ isc_result_totext(result)); -+ -+ /* -+ * We have exceeded the system-wide TCP client -+ * quota. But, we can't just block this accept -+ * in all cases, because if we did, a heavy TCP -+ * load on other interfaces might cause this -+ * interface to be starved, with no clients able -+ * to accept new connections. -+ * -+ * So, we check here to see if any other client -+ * is already servicing TCP queries on this -+ * interface (whether accepting, reading, or -+ * processing). -+ * -+ * If so, then it's okay *not* to call -+ * accept - we can let this client to go inactive -+ * and the other one handle the next connection -+ * when it's ready. -+ * -+ * But if not, then we need to be a little bit -+ * flexible about the quota. We allow *one* extra -+ * TCP client through, to ensure we're listening on -+ * every interface. -+ * -+ * (Note: In practice this means that the *real* -+ * TCP client quota is tcp-clients plus the number -+ * of interfaces.) -+ */ -+ LOCK(&client->interface->lock); -+ exit = (client->interface->ntcpactive > 0); -+ UNLOCK(&client->interface->lock); -+ -+ if (exit) { -+ client->newstate = NS_CLIENTSTATE_INACTIVE; -+ (void)exit_check(client); -+ return; -+ } -+ } -+ -+ /* -+ * By incrementing the interface's ntcpactive counter we signal -+ * that there is at least one client servicing TCP queries for the -+ * interface. -+ * -+ * We also make note of the fact in the client itself with the -+ * tcpactive flag. This ensures proper accounting by preventing -+ * us from accidentally incrementing or decrementing ntcpactive -+ * more than once per client object. -+ */ -+ if (!client->tcpactive) { -+ LOCK(&client->interface->lock); -+ client->interface->ntcpactive++; -+ UNLOCK(&client->interface->lock); -+ client->tcpactive = true; -+ } -+ - result = isc_socket_accept(client->tcplistener, client->task, - client_newconn, client); - if (result != ISC_R_SUCCESS) { -- UNEXPECTED_ERROR(__FILE__, __LINE__, -- "isc_socket_accept() failed: %s", -- isc_result_totext(result)); - /* - * XXXRTH What should we do? We're trying to accept but - * it didn't work. If we just give up, then TCP -@@ -3311,12 +3438,39 @@ client_accept(ns_client_t *client) { - * - * For now, we just go idle. - */ -+ UNEXPECTED_ERROR(__FILE__, __LINE__, -+ "isc_socket_accept() failed: %s", -+ isc_result_totext(result)); -+ if (client->tcpquota != NULL) { -+ isc_quota_detach(&client->tcpquota); -+ } - return; - } -+ -+ /* -+ * The client's 'naccepts' counter indicates that this client has -+ * called accept() and is waiting for a new connection. It should -+ * never exceed 1. -+ */ - INSIST(client->naccepts == 0); - client->naccepts++; -+ -+ /* -+ * The interface's 'ntcpaccepting' counter is incremented when -+ * any client calls accept(), and decremented in client_newconn() -+ * once the connection is established. -+ * -+ * When the client object is shutting down after handling a TCP -+ * request (see exit_check()), it looks to see whether this value is -+ * non-zero. If so, that means another client has already called -+ * accept() and is waiting to establish the next connection, which -+ * means the first client is free to go inactive. Otherwise, -+ * the first client must come back and call accept() again; this -+ * guarantees there will always be at least one client listening -+ * for new TCP connections on each interface. -+ */ - LOCK(&client->interface->lock); -- client->interface->ntcpcurrent++; -+ client->interface->ntcpaccepting++; - UNLOCK(&client->interface->lock); - } - -@@ -3390,13 +3544,14 @@ ns_client_replace(ns_client_t *client) { - tcp = TCP_CLIENT(client); - if (tcp && client->pipelined) { - result = get_worker(client->manager, client->interface, -- client->tcpsocket); -+ client->tcpsocket, client); - } else { - result = get_client(client->manager, client->interface, - client->dispatch, tcp); - } -- if (result != ISC_R_SUCCESS) -+ if (result != ISC_R_SUCCESS) { - return (result); -+ } - - /* - * The responsibility for listening for new requests is hereby -@@ -3585,6 +3740,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, - client->attributes |= NS_CLIENTATTR_TCP; - isc_socket_attach(ifp->tcpsocket, - &client->tcplistener); -+ - } else { - isc_socket_t *sock; - -@@ -3602,7 +3758,8 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, - } - - static isc_result_t --get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) -+get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, -+ ns_client_t *oldclient) - { - isc_result_t result = ISC_R_SUCCESS; - isc_event_t *ev; -@@ -3610,6 +3767,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) - MTRACE("get worker"); - - REQUIRE(manager != NULL); -+ REQUIRE(oldclient != NULL); - - if (manager->exiting) - return (ISC_R_SHUTTINGDOWN); -@@ -3642,7 +3800,28 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) - ns_interface_attach(ifp, &client->interface); - client->newstate = client->state = NS_CLIENTSTATE_WORKING; - INSIST(client->recursionquota == NULL); -- client->tcpquota = &ns_g_server->tcpquota; -+ -+ /* -+ * Transfer TCP quota to the new client. -+ */ -+ INSIST(client->tcpquota == NULL); -+ INSIST(oldclient->tcpquota != NULL); -+ client->tcpquota = oldclient->tcpquota; -+ oldclient->tcpquota = NULL; -+ -+ /* -+ * Link to a pipeline group, creating it if needed. -+ */ -+ if (!ISC_LINK_LINKED(oldclient, glink)) { -+ oldclient->glink.next = NULL; -+ oldclient->glink.prev = NULL; -+ } -+ client->glink.next = oldclient->glink.next; -+ client->glink.prev = oldclient; -+ if (oldclient->glink.next != NULL) { -+ oldclient->glink.next->glink.prev = client; -+ } -+ oldclient->glink.next = client; - - client->dscp = ifp->dscp; - -@@ -3656,6 +3835,12 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) - (void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr); - client->peeraddr_valid = true; - -+ LOCK(&client->interface->lock); -+ client->interface->ntcpactive++; -+ UNLOCK(&client->interface->lock); -+ -+ client->tcpactive = true; -+ - INSIST(client->tcpmsg_valid == false); - dns_tcpmsg_init(client->mctx, client->tcpsocket, &client->tcpmsg); - client->tcpmsg_valid = true; -diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h -index b23a7b191d..1f7973f9c5 100644 ---- a/bin/named/include/named/client.h -+++ b/bin/named/include/named/client.h -@@ -94,7 +94,8 @@ struct ns_client { - int nupdates; - int nctls; - int references; -- bool needshutdown; /* -+ bool tcpactive; -+ bool needshutdown; /* - * Used by clienttest to get - * the client to go from - * inactive to free state -@@ -130,9 +131,9 @@ struct ns_client { - isc_stdtime_t now; - isc_time_t tnow; - dns_name_t signername; /*%< [T]SIG key name */ -- dns_name_t * signer; /*%< NULL if not valid sig */ -- bool mortal; /*%< Die after handling request */ -- bool pipelined; /*%< TCP queries not in sequence */ -+ dns_name_t *signer; /*%< NULL if not valid sig */ -+ bool mortal; /*%< Die after handling request */ -+ bool pipelined; /*%< TCP queries not in sequence */ - isc_quota_t *tcpquota; - isc_quota_t *recursionquota; - ns_interface_t *interface; -@@ -143,8 +144,8 @@ struct ns_client { - isc_sockaddr_t destsockaddr; - - isc_netaddr_t ecs_addr; /*%< EDNS client subnet */ -- uint8_t ecs_addrlen; -- uint8_t ecs_scope; -+ uint8_t ecs_addrlen; -+ uint8_t ecs_scope; - - struct in6_pktinfo pktinfo; - isc_dscp_t dscp; -@@ -166,6 +167,7 @@ struct ns_client { - - ISC_LINK(ns_client_t) link; - ISC_LINK(ns_client_t) rlink; -+ ISC_LINK(ns_client_t) glink; - ISC_QLINK(ns_client_t) ilink; - unsigned char cookie[8]; - uint32_t expire; -diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h -index 7d1883e1e8..61b08826a6 100644 ---- a/bin/named/include/named/interfacemgr.h -+++ b/bin/named/include/named/interfacemgr.h -@@ -77,9 +77,14 @@ struct ns_interface { - /*%< UDP dispatchers. */ - isc_socket_t * tcpsocket; /*%< TCP socket. */ - isc_dscp_t dscp; /*%< "listen-on" DSCP value */ -- int ntcptarget; /*%< Desired number of concurrent -- TCP accepts */ -- int ntcpcurrent; /*%< Current ditto, locked */ -+ int ntcpaccepting; /*%< Number of clients -+ ready to accept new -+ TCP connections on this -+ interface */ -+ int ntcpactive; /*%< Number of clients -+ servicing TCP queries -+ (whether accepting or -+ connected) */ - int nudpdispatch; /*%< Number of UDP dispatches */ - ns_clientmgr_t * clientmgr; /*%< Client manager. */ - ISC_LINK(ns_interface_t) link; -diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c -index 419927bf54..955096ef47 100644 ---- a/bin/named/interfacemgr.c -+++ b/bin/named/interfacemgr.c -@@ -386,8 +386,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, - * connections will be handled in parallel even though there is - * only one client initially. - */ -- ifp->ntcptarget = 1; -- ifp->ntcpcurrent = 0; -+ ifp->ntcpaccepting = 0; -+ ifp->ntcpactive = 0; - ifp->nudpdispatch = 0; - - ifp->dscp = -1; -@@ -522,9 +522,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) { - */ - (void)isc_socket_filter(ifp->tcpsocket, "dataready"); - -- result = ns_clientmgr_createclients(ifp->clientmgr, -- ifp->ntcptarget, ifp, -- true); -+ result = ns_clientmgr_createclients(ifp->clientmgr, 1, ifp, true); - if (result != ISC_R_SUCCESS) { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "TCP ns_clientmgr_createclients(): %s", --- -2.20.1 -meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch deleted +0
-278@@ -1,278 +0,0 @@ -Backport patch to fix CVE-2018-5743. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2018-5743 - -CVE: CVE-2018-5743 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/366b4e1] - -Signed-off-by: Kai Kang <[email protected]> - -From 366b4e1ede8aed690e981e07137cb1cb77879c36 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <[email protected]> -Date: Thu, 17 Jan 2019 15:53:38 +0100 -Subject: [PATCH 3/6] use reference counter for pipeline groups (v3) - -Track pipeline groups using a shared reference counter -instead of a linked list. - -(cherry picked from commit 513afd33eb17d5dc41a3f0d2d38204ef8c5f6f91) -(cherry picked from commit 9446629b730c59c4215f08d37fbaf810282fbccb) ---- - bin/named/client.c | 171 ++++++++++++++++++++----------- - bin/named/include/named/client.h | 2 +- - 2 files changed, 110 insertions(+), 63 deletions(-) - -diff --git a/bin/named/client.c b/bin/named/client.c -index a7b49a0f71..277656cef0 100644 ---- a/bin/named/client.c -+++ b/bin/named/client.c -@@ -299,6 +299,75 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) { - } - } - -+/*% -+ * Allocate a reference counter that will track the number of client structures -+ * using the TCP connection that 'client' called accept() for. This counter -+ * will be shared between all client structures associated with this TCP -+ * connection. -+ */ -+static void -+pipeline_init(ns_client_t *client) { -+ isc_refcount_t *refs; -+ -+ REQUIRE(client->pipeline_refs == NULL); -+ -+ /* -+ * A global memory context is used for the allocation as different -+ * client structures may have different memory contexts assigned and a -+ * reference counter allocated here might need to be freed by a -+ * different client. The performance impact caused by memory context -+ * contention here is expected to be negligible, given that this code -+ * is only executed for TCP connections. -+ */ -+ refs = isc_mem_allocate(client->sctx->mctx, sizeof(*refs)); -+ isc_refcount_init(refs, 1); -+ client->pipeline_refs = refs; -+} -+ -+/*% -+ * Increase the count of client structures using the TCP connection that -+ * 'source' is associated with and put a pointer to that count in 'target', -+ * thus associating it with the same TCP connection. -+ */ -+static void -+pipeline_attach(ns_client_t *source, ns_client_t *target) { -+ int old_refs; -+ -+ REQUIRE(source->pipeline_refs != NULL); -+ REQUIRE(target->pipeline_refs == NULL); -+ -+ old_refs = isc_refcount_increment(source->pipeline_refs); -+ INSIST(old_refs > 0); -+ target->pipeline_refs = source->pipeline_refs; -+} -+ -+/*% -+ * Decrease the count of client structures using the TCP connection that -+ * 'client' is associated with. If this is the last client using this TCP -+ * connection, free the reference counter and return true; otherwise, return -+ * false. -+ */ -+static bool -+pipeline_detach(ns_client_t *client) { -+ isc_refcount_t *refs; -+ int old_refs; -+ -+ REQUIRE(client->pipeline_refs != NULL); -+ -+ refs = client->pipeline_refs; -+ client->pipeline_refs = NULL; -+ -+ old_refs = isc_refcount_decrement(refs); -+ INSIST(old_refs > 0); -+ -+ if (old_refs == 1) { -+ isc_mem_free(client->sctx->mctx, refs); -+ return (true); -+ } -+ -+ return (false); -+} -+ - /*% - * Check for a deactivation or shutdown request and take appropriate - * action. Returns true if either is in progress; in this case -@@ -421,6 +490,40 @@ exit_check(ns_client_t *client) { - client->tcpmsg_valid = false; - } - -+ if (client->tcpquota != NULL) { -+ if (client->pipeline_refs == NULL || -+ pipeline_detach(client)) -+ { -+ /* -+ * Only detach from the TCP client quota if -+ * there are no more client structures using -+ * this TCP connection. -+ * -+ * Note that we check 'pipeline_refs' and not -+ * 'pipelined' because in some cases (e.g. -+ * after receiving a request with an opcode -+ * different than QUERY) 'pipelined' is set to -+ * false after the reference counter gets -+ * allocated in pipeline_init() and we must -+ * still drop our reference as failing to do so -+ * would prevent the reference counter itself -+ * from being freed. -+ */ -+ isc_quota_detach(&client->tcpquota); -+ } else { -+ /* -+ * There are other client structures using this -+ * TCP connection, so we cannot detach from the -+ * TCP client quota to prevent excess TCP -+ * connections from being accepted. However, -+ * this client structure might later be reused -+ * for accepting new connections and thus must -+ * have its 'tcpquota' field set to NULL. -+ */ -+ client->tcpquota = NULL; -+ } -+ } -+ - if (client->tcpsocket != NULL) { - CTRACE("closetcp"); - isc_socket_detach(&client->tcpsocket); -@@ -434,44 +537,6 @@ exit_check(ns_client_t *client) { - } - } - -- if (client->tcpquota != NULL) { -- /* -- * If we are not in a pipeline group, or -- * we are the last client in the group, detach from -- * tcpquota; otherwise, transfer the quota to -- * another client in the same group. -- */ -- if (!ISC_LINK_LINKED(client, glink) || -- (client->glink.next == NULL && -- client->glink.prev == NULL)) -- { -- isc_quota_detach(&client->tcpquota); -- } else if (client->glink.next != NULL) { -- INSIST(client->glink.next->tcpquota == NULL); -- client->glink.next->tcpquota = client->tcpquota; -- client->tcpquota = NULL; -- } else { -- INSIST(client->glink.prev->tcpquota == NULL); -- client->glink.prev->tcpquota = client->tcpquota; -- client->tcpquota = NULL; -- } -- } -- -- /* -- * Unlink from pipeline group. -- */ -- if (ISC_LINK_LINKED(client, glink)) { -- if (client->glink.next != NULL) { -- client->glink.next->glink.prev = -- client->glink.prev; -- } -- if (client->glink.prev != NULL) { -- client->glink.prev->glink.next = -- client->glink.next; -- } -- ISC_LINK_INIT(client, glink); -- } -- - if (client->timerset) { - (void)isc_timer_reset(client->timer, - isc_timertype_inactive, -@@ -3130,6 +3195,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { - dns_name_init(&client->signername, NULL); - client->mortal = false; - client->pipelined = false; -+ client->pipeline_refs = NULL; - client->tcpquota = NULL; - client->recursionquota = NULL; - client->interface = NULL; -@@ -3154,7 +3220,6 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { - client->formerrcache.id = 0; - ISC_LINK_INIT(client, link); - ISC_LINK_INIT(client, rlink); -- ISC_LINK_INIT(client, glink); - ISC_QLINK_INIT(client, ilink); - client->keytag = NULL; - client->keytag_len = 0; -@@ -3341,6 +3406,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - !allowed(&netaddr, NULL, NULL, 0, NULL, - ns_g_server->keepresporder))) - { -+ pipeline_init(client); - client->pipelined = true; - } - -@@ -3800,35 +3866,16 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, - ns_interface_attach(ifp, &client->interface); - client->newstate = client->state = NS_CLIENTSTATE_WORKING; - INSIST(client->recursionquota == NULL); -- -- /* -- * Transfer TCP quota to the new client. -- */ -- INSIST(client->tcpquota == NULL); -- INSIST(oldclient->tcpquota != NULL); -- client->tcpquota = oldclient->tcpquota; -- oldclient->tcpquota = NULL; -- -- /* -- * Link to a pipeline group, creating it if needed. -- */ -- if (!ISC_LINK_LINKED(oldclient, glink)) { -- oldclient->glink.next = NULL; -- oldclient->glink.prev = NULL; -- } -- client->glink.next = oldclient->glink.next; -- client->glink.prev = oldclient; -- if (oldclient->glink.next != NULL) { -- oldclient->glink.next->glink.prev = client; -- } -- oldclient->glink.next = client; -+ client->tcpquota = &client->sctx->tcpquota; - - client->dscp = ifp->dscp; - - client->attributes |= NS_CLIENTATTR_TCP; -- client->pipelined = true; - client->mortal = true; - -+ pipeline_attach(oldclient, client); -+ client->pipelined = true; -+ - isc_socket_attach(ifp->tcpsocket, &client->tcplistener); - isc_socket_attach(sock, &client->tcpsocket); - isc_socket_setname(client->tcpsocket, "worker-tcp", NULL); -diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h -index 1f7973f9c5..aeed9ccdda 100644 ---- a/bin/named/include/named/client.h -+++ b/bin/named/include/named/client.h -@@ -134,6 +134,7 @@ struct ns_client { - dns_name_t *signer; /*%< NULL if not valid sig */ - bool mortal; /*%< Die after handling request */ - bool pipelined; /*%< TCP queries not in sequence */ -+ isc_refcount_t *pipeline_refs; - isc_quota_t *tcpquota; - isc_quota_t *recursionquota; - ns_interface_t *interface; -@@ -167,7 +168,6 @@ struct ns_client { - - ISC_LINK(ns_client_t) link; - ISC_LINK(ns_client_t) rlink; -- ISC_LINK(ns_client_t) glink; - ISC_QLINK(ns_client_t) ilink; - unsigned char cookie[8]; - uint32_t expire; --- -2.20.1 -meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch deleted +0
-512@@ -1,512 +0,0 @@ -Backport patch to fix CVE-2018-5743. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2018-5743 - -CVE: CVE-2018-5743 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/2ab8a08] - -Signed-off-by: Kai Kang <[email protected]> - -From 2ab8a085b3c666f28f1f9229bd6ecb59915b26c3 Mon Sep 17 00:00:00 2001 -From: Evan Hunt <[email protected]> -Date: Fri, 5 Apr 2019 16:12:18 -0700 -Subject: [PATCH 4/6] better tcpquota accounting and client mortality checks - -- ensure that tcpactive is cleaned up correctly when accept() fails. -- set 'client->tcpattached' when the client is attached to the tcpquota. - carry this value on to new clients sharing the same pipeline group. - don't call isc_quota_detach() on the tcpquota unless tcpattached is - set. this way clients that were allowed to accept TCP connections - despite being over quota (and therefore, were never attached to the - quota) will not inadvertently detach from it and mess up the - accounting. -- simplify the code for tcpquota disconnection by using a new function - tcpquota_disconnect(). -- before deciding whether to reject a new connection due to quota - exhaustion, check to see whether there are at least two active - clients. previously, this was "at least one", but that could be - insufficient if there was one other client in READING state (waiting - for messages on an open connection) but none in READY (listening - for new connections). -- before deciding whether a TCP client object can to go inactive, we - must ensure there are enough other clients to maintain service - afterward -- both accepting new connections and reading/processing new - queries. A TCP client can't shut down unless at least one - client is accepting new connections and (in the case of pipelined - clients) at least one additional client is waiting to read. - -(cherry picked from commit c7394738b2445c16f728a88394864dd61baad900) -(cherry picked from commit e965d5f11d3d0f6d59704e614fceca2093cb1856) -(cherry picked from commit 87d431161450777ea093821212abfb52d51b36e3) ---- - bin/named/client.c | 244 +++++++++++++++++++------------ - bin/named/include/named/client.h | 3 +- - 2 files changed, 152 insertions(+), 95 deletions(-) - -diff --git a/bin/named/client.c b/bin/named/client.c -index 277656cef0..61e96dd28c 100644 ---- a/bin/named/client.c -+++ b/bin/named/client.c -@@ -244,13 +244,14 @@ static void client_start(isc_task_t *task, isc_event_t *event); - static void client_request(isc_task_t *task, isc_event_t *event); - static void ns_client_dumpmessage(ns_client_t *client, const char *reason); - static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, -- dns_dispatch_t *disp, bool tcp); -+ dns_dispatch_t *disp, ns_client_t *oldclient, -+ bool tcp); - static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, - isc_socket_t *sock, ns_client_t *oldclient); - static inline bool - allowed(isc_netaddr_t *addr, dns_name_t *signer, - isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen, -- uint8_t *ecs_scope, dns_acl_t *acl) -+ uint8_t *ecs_scope, dns_acl_t *acl); - static void compute_cookie(ns_client_t *client, uint32_t when, - uint32_t nonce, const unsigned char *secret, - isc_buffer_t *buf); -@@ -319,7 +320,7 @@ pipeline_init(ns_client_t *client) { - * contention here is expected to be negligible, given that this code - * is only executed for TCP connections. - */ -- refs = isc_mem_allocate(client->sctx->mctx, sizeof(*refs)); -+ refs = isc_mem_allocate(ns_g_mctx, sizeof(*refs)); - isc_refcount_init(refs, 1); - client->pipeline_refs = refs; - } -@@ -331,13 +332,13 @@ pipeline_init(ns_client_t *client) { - */ - static void - pipeline_attach(ns_client_t *source, ns_client_t *target) { -- int old_refs; -+ int refs; - - REQUIRE(source->pipeline_refs != NULL); - REQUIRE(target->pipeline_refs == NULL); - -- old_refs = isc_refcount_increment(source->pipeline_refs); -- INSIST(old_refs > 0); -+ isc_refcount_increment(source->pipeline_refs, &refs); -+ INSIST(refs > 1); - target->pipeline_refs = source->pipeline_refs; - } - -@@ -349,25 +350,51 @@ pipeline_attach(ns_client_t *source, ns_client_t *target) { - */ - static bool - pipeline_detach(ns_client_t *client) { -- isc_refcount_t *refs; -- int old_refs; -+ isc_refcount_t *refcount; -+ int refs; - - REQUIRE(client->pipeline_refs != NULL); - -- refs = client->pipeline_refs; -+ refcount = client->pipeline_refs; - client->pipeline_refs = NULL; - -- old_refs = isc_refcount_decrement(refs); -- INSIST(old_refs > 0); -+ isc_refcount_decrement(refcount, refs); - -- if (old_refs == 1) { -- isc_mem_free(client->sctx->mctx, refs); -+ if (refs == 0) { -+ isc_mem_free(ns_g_mctx, refs); - return (true); - } - - return (false); - } - -+/* -+ * Detach a client from the TCP client quota if appropriate, and set -+ * the quota pointer to NULL. -+ * -+ * Sometimes when the TCP client quota is exhausted but there are no other -+ * clients servicing the interface, a client will be allowed to continue -+ * running despite not having been attached to the quota. In this event, -+ * the TCP quota was never attached to the client, so when the client (or -+ * associated pipeline group) shuts down, the quota must NOT be detached. -+ * -+ * Otherwise, if the quota pointer is set, it should be detached. If not -+ * set at all, we just return without doing anything. -+ */ -+static void -+tcpquota_disconnect(ns_client_t *client) { -+ if (client->tcpquota == NULL) { -+ return; -+ } -+ -+ if (client->tcpattached) { -+ isc_quota_detach(&client->tcpquota); -+ client->tcpattached = false; -+ } else { -+ client->tcpquota = NULL; -+ } -+} -+ - /*% - * Check for a deactivation or shutdown request and take appropriate - * action. Returns true if either is in progress; in this case -@@ -490,38 +517,31 @@ exit_check(ns_client_t *client) { - client->tcpmsg_valid = false; - } - -- if (client->tcpquota != NULL) { -- if (client->pipeline_refs == NULL || -- pipeline_detach(client)) -- { -- /* -- * Only detach from the TCP client quota if -- * there are no more client structures using -- * this TCP connection. -- * -- * Note that we check 'pipeline_refs' and not -- * 'pipelined' because in some cases (e.g. -- * after receiving a request with an opcode -- * different than QUERY) 'pipelined' is set to -- * false after the reference counter gets -- * allocated in pipeline_init() and we must -- * still drop our reference as failing to do so -- * would prevent the reference counter itself -- * from being freed. -- */ -- isc_quota_detach(&client->tcpquota); -- } else { -- /* -- * There are other client structures using this -- * TCP connection, so we cannot detach from the -- * TCP client quota to prevent excess TCP -- * connections from being accepted. However, -- * this client structure might later be reused -- * for accepting new connections and thus must -- * have its 'tcpquota' field set to NULL. -- */ -- client->tcpquota = NULL; -- } -+ /* -+ * Detach from pipeline group and from TCP client quota, -+ * if appropriate. -+ * -+ * - If no pipeline group is active, attempt to -+ * detach from the TCP client quota. -+ * -+ * - If a pipeline group is active, detach from it; -+ * if the return code indicates that there no more -+ * clients left if this pipeline group, we also detach -+ * from the TCP client quota. -+ * -+ * - Otherwise we don't try to detach, we just set the -+ * TCP quota pointer to NULL if it wasn't NULL already. -+ * -+ * tcpquota_disconnect() will set tcpquota to NULL, either -+ * by detaching it or by assignment, depending on the -+ * needs of the client. See the comments on that function -+ * for further information. -+ */ -+ if (client->pipeline_refs == NULL || pipeline_detach(client)) { -+ tcpquota_disconnect(client); -+ } else { -+ client->tcpquota = NULL; -+ client->tcpattached = false; - } - - if (client->tcpsocket != NULL) { -@@ -544,8 +564,6 @@ exit_check(ns_client_t *client) { - client->timerset = false; - } - -- client->pipelined = false; -- - client->peeraddr_valid = false; - - client->state = NS_CLIENTSTATE_READY; -@@ -558,18 +576,27 @@ exit_check(ns_client_t *client) { - * active and force it to go inactive if not. - * - * UDP clients go inactive at this point, but a TCP client -- * will needs to remain active if no other clients are -- * listening for TCP requests on this interface, to -- * prevent this interface from going nonresponsive. -+ * may need to remain active and go into ready state if -+ * no other clients are available to listen for TCP -+ * requests on this interface or (in the case of pipelined -+ * clients) to read for additional messages on the current -+ * connection. - */ - if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) { - LOCK(&client->interface->lock); -- if (client->interface->ntcpaccepting == 0) { -+ if ((client->interface->ntcpaccepting == 0 || -+ (client->pipelined && -+ client->interface->ntcpactive < 2)) && -+ client->newstate != NS_CLIENTSTATE_FREED) -+ { - client->mortal = false; -+ client->newstate = NS_CLIENTSTATE_READY; - } - UNLOCK(&client->interface->lock); - } - -+ client->pipelined = false; -+ - /* - * We don't need the client; send it to the inactive - * queue for recycling. -@@ -2634,6 +2661,18 @@ client_request(isc_task_t *task, isc_event_t *event) { - client->pipelined = false; - } - if (TCP_CLIENT(client) && client->pipelined) { -+ /* -+ * We're pipelining. Replace the client; the -+ * the replacement can read the TCP socket looking -+ * for new messages and this client can process the -+ * current message asynchronously. -+ * -+ * There are now at least three clients using this -+ * TCP socket - one accepting new connections, -+ * one reading an existing connection to get new -+ * messages, and one answering the message already -+ * received. -+ */ - result = ns_client_replace(client); - if (result != ISC_R_SUCCESS) { - client->pipelined = false; -@@ -3197,6 +3236,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { - client->pipelined = false; - client->pipeline_refs = NULL; - client->tcpquota = NULL; -+ client->tcpattached = false; - client->recursionquota = NULL; - client->interface = NULL; - client->peeraddr_valid = false; -@@ -3359,9 +3399,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3), - "accept failed: %s", - isc_result_totext(nevent->result)); -- if (client->tcpquota != NULL) { -- isc_quota_detach(&client->tcpquota); -- } -+ tcpquota_disconnect(client); - } - - if (exit_check(client)) -@@ -3402,7 +3440,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - client->pipelined = false; - result = ns_client_replace(client); - if (result == ISC_R_SUCCESS && -- (client->sctx->keepresporder == NULL || -+ (ns_g_server->keepresporder == NULL || - !allowed(&netaddr, NULL, NULL, 0, NULL, - ns_g_server->keepresporder))) - { -@@ -3429,7 +3467,7 @@ client_accept(ns_client_t *client) { - * in named.conf. If we can't attach to it here, that means the TCP - * client quota has been exceeded. - */ -- result = isc_quota_attach(&client->sctx->tcpquota, -+ result = isc_quota_attach(&ns_g_server->tcpquota, - &client->tcpquota); - if (result != ISC_R_SUCCESS) { - bool exit; -@@ -3447,27 +3485,27 @@ client_accept(ns_client_t *client) { - * interface to be starved, with no clients able - * to accept new connections. - * -- * So, we check here to see if any other client -- * is already servicing TCP queries on this -+ * So, we check here to see if any other clients -+ * are already servicing TCP queries on this - * interface (whether accepting, reading, or -- * processing). -- * -- * If so, then it's okay *not* to call -- * accept - we can let this client to go inactive -- * and the other one handle the next connection -- * when it's ready. -+ * processing). If there are at least two -+ * (one reading and one processing a request) -+ * then it's okay *not* to call accept - we -+ * can let this client go inactive and another -+ * one will resume accepting when it's done. - * -- * But if not, then we need to be a little bit -- * flexible about the quota. We allow *one* extra -- * TCP client through, to ensure we're listening on -- * every interface. -+ * If there aren't enough active clients on the -+ * interface, then we can be a little bit -+ * flexible about the quota. We'll allow *one* -+ * extra client through to ensure we're listening -+ * on every interface. - * -- * (Note: In practice this means that the *real* -- * TCP client quota is tcp-clients plus the number -- * of interfaces.) -+ * (Note: In practice this means that the real -+ * TCP client quota is tcp-clients plus the -+ * number of listening interfaces plus 2.) - */ - LOCK(&client->interface->lock); -- exit = (client->interface->ntcpactive > 0); -+ exit = (client->interface->ntcpactive > 1); - UNLOCK(&client->interface->lock); - - if (exit) { -@@ -3475,6 +3513,9 @@ client_accept(ns_client_t *client) { - (void)exit_check(client); - return; - } -+ -+ } else { -+ client->tcpattached = true; - } - - /* -@@ -3507,9 +3548,16 @@ client_accept(ns_client_t *client) { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "isc_socket_accept() failed: %s", - isc_result_totext(result)); -- if (client->tcpquota != NULL) { -- isc_quota_detach(&client->tcpquota); -+ -+ tcpquota_disconnect(client); -+ -+ if (client->tcpactive) { -+ LOCK(&client->interface->lock); -+ client->interface->ntcpactive--; -+ UNLOCK(&client->interface->lock); -+ client->tcpactive = false; - } -+ - return; - } - -@@ -3527,13 +3575,12 @@ client_accept(ns_client_t *client) { - * once the connection is established. - * - * When the client object is shutting down after handling a TCP -- * request (see exit_check()), it looks to see whether this value is -- * non-zero. If so, that means another client has already called -- * accept() and is waiting to establish the next connection, which -- * means the first client is free to go inactive. Otherwise, -- * the first client must come back and call accept() again; this -- * guarantees there will always be at least one client listening -- * for new TCP connections on each interface. -+ * request (see exit_check()), if this value is at least one, that -+ * means another client has called accept() and is waiting to -+ * establish the next connection. That means the client may be -+ * be free to become inactive; otherwise it may need to start -+ * listening for connections itself to prevent the interface -+ * going dead. - */ - LOCK(&client->interface->lock); - client->interface->ntcpaccepting++; -@@ -3613,19 +3660,19 @@ ns_client_replace(ns_client_t *client) { - client->tcpsocket, client); - } else { - result = get_client(client->manager, client->interface, -- client->dispatch, tcp); -+ client->dispatch, client, tcp); -+ -+ /* -+ * The responsibility for listening for new requests is hereby -+ * transferred to the new client. Therefore, the old client -+ * should refrain from listening for any more requests. -+ */ -+ client->mortal = true; - } - if (result != ISC_R_SUCCESS) { - return (result); - } - -- /* -- * The responsibility for listening for new requests is hereby -- * transferred to the new client. Therefore, the old client -- * should refrain from listening for any more requests. -- */ -- client->mortal = true; -- - return (ISC_R_SUCCESS); - } - -@@ -3759,7 +3806,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) { - - static isc_result_t - get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, -- dns_dispatch_t *disp, bool tcp) -+ dns_dispatch_t *disp, ns_client_t *oldclient, bool tcp) - { - isc_result_t result = ISC_R_SUCCESS; - isc_event_t *ev; -@@ -3803,6 +3850,16 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, - client->dscp = ifp->dscp; - - if (tcp) { -+ client->tcpattached = false; -+ if (oldclient != NULL) { -+ client->tcpattached = oldclient->tcpattached; -+ } -+ -+ LOCK(&client->interface->lock); -+ client->interface->ntcpactive++; -+ UNLOCK(&client->interface->lock); -+ client->tcpactive = true; -+ - client->attributes |= NS_CLIENTATTR_TCP; - isc_socket_attach(ifp->tcpsocket, - &client->tcplistener); -@@ -3866,7 +3923,8 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, - ns_interface_attach(ifp, &client->interface); - client->newstate = client->state = NS_CLIENTSTATE_WORKING; - INSIST(client->recursionquota == NULL); -- client->tcpquota = &client->sctx->tcpquota; -+ client->tcpquota = &ns_g_server->tcpquota; -+ client->tcpattached = oldclient->tcpattached; - - client->dscp = ifp->dscp; - -@@ -3885,7 +3943,6 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, - LOCK(&client->interface->lock); - client->interface->ntcpactive++; - UNLOCK(&client->interface->lock); -- - client->tcpactive = true; - - INSIST(client->tcpmsg_valid == false); -@@ -3913,7 +3970,8 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n, - MTRACE("createclients"); - - for (disp = 0; disp < n; disp++) { -- result = get_client(manager, ifp, ifp->udpdispatch[disp], tcp); -+ result = get_client(manager, ifp, ifp->udpdispatch[disp], -+ NULL, tcp); - if (result != ISC_R_SUCCESS) - break; - } -diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h -index aeed9ccdda..e2c40acd28 100644 ---- a/bin/named/include/named/client.h -+++ b/bin/named/include/named/client.h -@@ -9,8 +9,6 @@ - * information regarding copyright ownership. - */ - --/* $Id: client.h,v 1.96 2012/01/31 23:47:31 tbox Exp $ */ -- - #ifndef NAMED_CLIENT_H - #define NAMED_CLIENT_H 1 - -@@ -136,6 +134,7 @@ struct ns_client { - bool pipelined; /*%< TCP queries not in sequence */ - isc_refcount_t *pipeline_refs; - isc_quota_t *tcpquota; -+ bool tcpattached; - isc_quota_t *recursionquota; - ns_interface_t *interface; - --- -2.20.1 -meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch deleted +0
-911@@ -1,911 +0,0 @@ -Backport patch to fix CVE-2018-5743. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2018-5743 - -CVE: CVE-2018-5743 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/c47ccf6] - -Signed-off-by: Kai Kang <[email protected]> - -From c47ccf630f147378568b33e8fdb7b754f228c346 Mon Sep 17 00:00:00 2001 -From: Evan Hunt <[email protected]> -Date: Fri, 5 Apr 2019 16:26:05 -0700 -Subject: [PATCH 5/6] refactor tcpquota and pipeline refs; allow special-case - overrun in isc_quota - -- if the TCP quota has been exceeded but there are no clients listening - for new connections on the interface, we can now force attachment to the - quota using isc_quota_force(), instead of carrying on with the quota not - attached. -- the TCP client quota is now referenced via a reference-counted - 'ns_tcpconn' object, one of which is created whenever a client begins - listening for new connections, and attached to by members of that - client's pipeline group. when the last reference to the tcpconn - object is detached, it is freed and the TCP quota slot is released. -- reduce code duplication by adding mark_tcp_active() function. -- convert counters to atomic. - -(cherry picked from commit 7e8222378ca24f1302a0c1c638565050ab04681b) -(cherry picked from commit 4939451275722bfda490ea86ca13e84f6bc71e46) -(cherry picked from commit 13f7c918b8720d890408f678bd73c20e634539d9) ---- - bin/named/client.c | 444 +++++++++++-------------- - bin/named/include/named/client.h | 12 +- - bin/named/include/named/interfacemgr.h | 6 +- - bin/named/interfacemgr.c | 1 + - lib/isc/include/isc/quota.h | 7 + - lib/isc/quota.c | 33 +- - lib/isc/win32/libisc.def.in | 1 + - 7 files changed, 236 insertions(+), 268 deletions(-) - -diff --git a/bin/named/client.c b/bin/named/client.c -index 61e96dd28c..d826ab32bf 100644 ---- a/bin/named/client.c -+++ b/bin/named/client.c -@@ -244,8 +244,7 @@ static void client_start(isc_task_t *task, isc_event_t *event); - static void client_request(isc_task_t *task, isc_event_t *event); - static void ns_client_dumpmessage(ns_client_t *client, const char *reason); - static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, -- dns_dispatch_t *disp, ns_client_t *oldclient, -- bool tcp); -+ dns_dispatch_t *disp, bool tcp); - static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, - isc_socket_t *sock, ns_client_t *oldclient); - static inline bool -@@ -301,16 +300,32 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) { - } - - /*% -- * Allocate a reference counter that will track the number of client structures -- * using the TCP connection that 'client' called accept() for. This counter -- * will be shared between all client structures associated with this TCP -- * connection. -+ * Allocate a reference-counted object that will maintain a single pointer to -+ * the (also reference-counted) TCP client quota, shared between all the -+ * clients processing queries on a single TCP connection, so that all -+ * clients sharing the one socket will together consume only one slot in -+ * the 'tcp-clients' quota. - */ --static void --pipeline_init(ns_client_t *client) { -- isc_refcount_t *refs; -+static isc_result_t -+tcpconn_init(ns_client_t *client, bool force) { -+ isc_result_t result; -+ isc_quota_t *quota = NULL; -+ ns_tcpconn_t *tconn = NULL; - -- REQUIRE(client->pipeline_refs == NULL); -+ REQUIRE(client->tcpconn == NULL); -+ -+ /* -+ * Try to attach to the quota first, so we won't pointlessly -+ * allocate memory for a tcpconn object if we can't get one. -+ */ -+ if (force) { -+ result = isc_quota_force(&ns_g_server->tcpquota, "a); -+ } else { -+ result = isc_quota_attach(&ns_g_server->tcpquota, "a); -+ } -+ if (result != ISC_R_SUCCESS) { -+ return (result); -+ } - - /* - * A global memory context is used for the allocation as different -@@ -320,78 +335,80 @@ pipeline_init(ns_client_t *client) { - * contention here is expected to be negligible, given that this code - * is only executed for TCP connections. - */ -- refs = isc_mem_allocate(ns_g_mctx, sizeof(*refs)); -- isc_refcount_init(refs, 1); -- client->pipeline_refs = refs; -+ tconn = isc_mem_allocate(ns_g_mctx, sizeof(*tconn)); -+ -+ isc_refcount_init(&tconn->refs, 1); -+ tconn->tcpquota = quota; -+ quota = NULL; -+ tconn->pipelined = false; -+ -+ client->tcpconn = tconn; -+ -+ return (ISC_R_SUCCESS); - } - - /*% -- * Increase the count of client structures using the TCP connection that -- * 'source' is associated with and put a pointer to that count in 'target', -- * thus associating it with the same TCP connection. -+ * Increase the count of client structures sharing the TCP connection -+ * that 'source' is associated with; add a pointer to the same tcpconn -+ * to 'target', thus associating it with the same TCP connection. - */ - static void --pipeline_attach(ns_client_t *source, ns_client_t *target) { -+tcpconn_attach(ns_client_t *source, ns_client_t *target) { - int refs; - -- REQUIRE(source->pipeline_refs != NULL); -- REQUIRE(target->pipeline_refs == NULL); -+ REQUIRE(source->tcpconn != NULL); -+ REQUIRE(target->tcpconn == NULL); -+ REQUIRE(source->tcpconn->pipelined); - -- isc_refcount_increment(source->pipeline_refs, &refs); -+ isc_refcount_increment(&source->tcpconn->refs, &refs); - INSIST(refs > 1); -- target->pipeline_refs = source->pipeline_refs; -+ target->tcpconn = source->tcpconn; - } - - /*% -- * Decrease the count of client structures using the TCP connection that -+ * Decrease the count of client structures sharing the TCP connection that - * 'client' is associated with. If this is the last client using this TCP -- * connection, free the reference counter and return true; otherwise, return -- * false. -+ * connection, we detach from the TCP quota and free the tcpconn -+ * object. Either way, client->tcpconn is set to NULL. - */ --static bool --pipeline_detach(ns_client_t *client) { -- isc_refcount_t *refcount; -+static void -+tcpconn_detach(ns_client_t *client) { -+ ns_tcpconn_t *tconn = NULL; - int refs; - -- REQUIRE(client->pipeline_refs != NULL); -- -- refcount = client->pipeline_refs; -- client->pipeline_refs = NULL; -+ REQUIRE(client->tcpconn != NULL); - -- isc_refcount_decrement(refcount, refs); -+ tconn = client->tcpconn; -+ client->tcpconn = NULL; - -+ isc_refcount_decrement(&tconn->refs, &refs); - if (refs == 0) { -- isc_mem_free(ns_g_mctx, refs); -- return (true); -+ isc_quota_detach(&tconn->tcpquota); -+ isc_mem_free(ns_g_mctx, tconn); - } -- -- return (false); - } - --/* -- * Detach a client from the TCP client quota if appropriate, and set -- * the quota pointer to NULL. -- * -- * Sometimes when the TCP client quota is exhausted but there are no other -- * clients servicing the interface, a client will be allowed to continue -- * running despite not having been attached to the quota. In this event, -- * the TCP quota was never attached to the client, so when the client (or -- * associated pipeline group) shuts down, the quota must NOT be detached. -+/*% -+ * Mark a client as active and increment the interface's 'ntcpactive' -+ * counter, as a signal that there is at least one client servicing -+ * TCP queries for the interface. If we reach the TCP client quota at -+ * some point, this will be used to determine whether a quota overrun -+ * should be permitted. - * -- * Otherwise, if the quota pointer is set, it should be detached. If not -- * set at all, we just return without doing anything. -+ * Marking the client active with the 'tcpactive' flag ensures proper -+ * accounting, by preventing us from incrementing or decrementing -+ * 'ntcpactive' more than once per client. - */ - static void --tcpquota_disconnect(ns_client_t *client) { -- if (client->tcpquota == NULL) { -- return; -- } -- -- if (client->tcpattached) { -- isc_quota_detach(&client->tcpquota); -- client->tcpattached = false; -- } else { -- client->tcpquota = NULL; -+mark_tcp_active(ns_client_t *client, bool active) { -+ if (active && !client->tcpactive) { -+ isc_atomic_xadd(&client->interface->ntcpactive, 1); -+ client->tcpactive = active; -+ } else if (!active && client->tcpactive) { -+ uint32_t old = -+ isc_atomic_xadd(&client->interface->ntcpactive, -1); -+ INSIST(old > 0); -+ client->tcpactive = active; - } - } - -@@ -484,7 +501,8 @@ exit_check(ns_client_t *client) { - INSIST(client->recursionquota == NULL); - - if (NS_CLIENTSTATE_READING == client->newstate) { -- if (!client->pipelined) { -+ INSIST(client->tcpconn != NULL); -+ if (!client->tcpconn->pipelined) { - client_read(client); - client->newstate = NS_CLIENTSTATE_MAX; - return (true); /* We're done. */ -@@ -507,8 +525,8 @@ exit_check(ns_client_t *client) { - dns_tcpmsg_cancelread(&client->tcpmsg); - } - -- if (client->nreads != 0) { -- /* Still waiting for read cancel completion. */ -+ /* Still waiting for read cancel completion. */ -+ if (client->nreads > 0) { - return (true); - } - -@@ -518,43 +536,45 @@ exit_check(ns_client_t *client) { - } - - /* -- * Detach from pipeline group and from TCP client quota, -- * if appropriate. -+ * Soon the client will be ready to accept a new TCP -+ * connection or UDP request, but we may have enough -+ * clients doing that already. Check whether this client -+ * needs to remain active and allow it go inactive if -+ * not. - * -- * - If no pipeline group is active, attempt to -- * detach from the TCP client quota. -+ * UDP clients always go inactive at this point, but a TCP -+ * client may need to stay active and return to READY -+ * state if no other clients are available to listen -+ * for TCP requests on this interface. - * -- * - If a pipeline group is active, detach from it; -- * if the return code indicates that there no more -- * clients left if this pipeline group, we also detach -- * from the TCP client quota. -- * -- * - Otherwise we don't try to detach, we just set the -- * TCP quota pointer to NULL if it wasn't NULL already. -- * -- * tcpquota_disconnect() will set tcpquota to NULL, either -- * by detaching it or by assignment, depending on the -- * needs of the client. See the comments on that function -- * for further information. -+ * Regardless, if we're going to FREED state, that means -+ * the system is shutting down and we don't need to -+ * retain clients. - */ -- if (client->pipeline_refs == NULL || pipeline_detach(client)) { -- tcpquota_disconnect(client); -- } else { -- client->tcpquota = NULL; -- client->tcpattached = false; -+ if (client->mortal && TCP_CLIENT(client) && -+ client->newstate != NS_CLIENTSTATE_FREED && -+ !ns_g_clienttest && -+ isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0) -+ { -+ /* Nobody else is accepting */ -+ client->mortal = false; -+ client->newstate = NS_CLIENTSTATE_READY; -+ } -+ -+ /* -+ * Detach from TCP connection and TCP client quota, -+ * if appropriate. If this is the last reference to -+ * the TCP connection in our pipeline group, the -+ * TCP quota slot will be released. -+ */ -+ if (client->tcpconn) { -+ tcpconn_detach(client); - } - - if (client->tcpsocket != NULL) { - CTRACE("closetcp"); - isc_socket_detach(&client->tcpsocket); -- -- if (client->tcpactive) { -- LOCK(&client->interface->lock); -- INSIST(client->interface->ntcpactive > 0); -- client->interface->ntcpactive--; -- UNLOCK(&client->interface->lock); -- client->tcpactive = false; -- } -+ mark_tcp_active(client, false); - } - - if (client->timerset) { -@@ -567,35 +587,6 @@ exit_check(ns_client_t *client) { - client->peeraddr_valid = false; - - client->state = NS_CLIENTSTATE_READY; -- INSIST(client->recursionquota == NULL); -- -- /* -- * Now the client is ready to accept a new TCP connection -- * or UDP request, but we may have enough clients doing -- * that already. Check whether this client needs to remain -- * active and force it to go inactive if not. -- * -- * UDP clients go inactive at this point, but a TCP client -- * may need to remain active and go into ready state if -- * no other clients are available to listen for TCP -- * requests on this interface or (in the case of pipelined -- * clients) to read for additional messages on the current -- * connection. -- */ -- if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) { -- LOCK(&client->interface->lock); -- if ((client->interface->ntcpaccepting == 0 || -- (client->pipelined && -- client->interface->ntcpactive < 2)) && -- client->newstate != NS_CLIENTSTATE_FREED) -- { -- client->mortal = false; -- client->newstate = NS_CLIENTSTATE_READY; -- } -- UNLOCK(&client->interface->lock); -- } -- -- client->pipelined = false; - - /* - * We don't need the client; send it to the inactive -@@ -630,7 +621,7 @@ exit_check(ns_client_t *client) { - } - - /* Still waiting for accept cancel completion. */ -- if (! (client->naccepts == 0)) { -+ if (client->naccepts > 0) { - return (true); - } - -@@ -641,7 +632,7 @@ exit_check(ns_client_t *client) { - } - - /* Still waiting for recv cancel completion. */ -- if (! (client->nrecvs == 0)) { -+ if (client->nrecvs > 0) { - return (true); - } - -@@ -654,14 +645,7 @@ exit_check(ns_client_t *client) { - INSIST(client->recursionquota == NULL); - if (client->tcplistener != NULL) { - isc_socket_detach(&client->tcplistener); -- -- if (client->tcpactive) { -- LOCK(&client->interface->lock); -- INSIST(client->interface->ntcpactive > 0); -- client->interface->ntcpactive--; -- UNLOCK(&client->interface->lock); -- client->tcpactive = false; -- } -+ mark_tcp_active(client, false); - } - if (client->udpsocket != NULL) { - isc_socket_detach(&client->udpsocket); -@@ -816,7 +800,7 @@ client_start(isc_task_t *task, isc_event_t *event) { - return; - - if (TCP_CLIENT(client)) { -- if (client->pipelined) { -+ if (client->tcpconn != NULL) { - client_read(client); - } else { - client_accept(client); -@@ -2470,6 +2454,7 @@ client_request(isc_task_t *task, isc_event_t *event) { - client->nrecvs--; - } else { - INSIST(TCP_CLIENT(client)); -+ INSIST(client->tcpconn != NULL); - REQUIRE(event->ev_type == DNS_EVENT_TCPMSG); - REQUIRE(event->ev_sender == &client->tcpmsg); - buffer = &client->tcpmsg.buffer; -@@ -2657,17 +2642,19 @@ client_request(isc_task_t *task, isc_event_t *event) { - /* - * Pipeline TCP query processing. - */ -- if (client->message->opcode != dns_opcode_query) { -- client->pipelined = false; -+ if (TCP_CLIENT(client) && -+ client->message->opcode != dns_opcode_query) -+ { -+ client->tcpconn->pipelined = false; - } -- if (TCP_CLIENT(client) && client->pipelined) { -+ if (TCP_CLIENT(client) && client->tcpconn->pipelined) { - /* - * We're pipelining. Replace the client; the -- * the replacement can read the TCP socket looking -- * for new messages and this client can process the -+ * replacement can read the TCP socket looking -+ * for new messages and this one can process the - * current message asynchronously. - * -- * There are now at least three clients using this -+ * There will now be at least three clients using this - * TCP socket - one accepting new connections, - * one reading an existing connection to get new - * messages, and one answering the message already -@@ -2675,7 +2662,7 @@ client_request(isc_task_t *task, isc_event_t *event) { - */ - result = ns_client_replace(client); - if (result != ISC_R_SUCCESS) { -- client->pipelined = false; -+ client->tcpconn->pipelined = false; - } - } - -@@ -3233,10 +3220,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) { - client->signer = NULL; - dns_name_init(&client->signername, NULL); - client->mortal = false; -- client->pipelined = false; -- client->pipeline_refs = NULL; -- client->tcpquota = NULL; -- client->tcpattached = false; -+ client->tcpconn = NULL; - client->recursionquota = NULL; - client->interface = NULL; - client->peeraddr_valid = false; -@@ -3341,9 +3325,10 @@ client_read(ns_client_t *client) { - - static void - client_newconn(isc_task_t *task, isc_event_t *event) { -+ isc_result_t result; - ns_client_t *client = event->ev_arg; - isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event; -- isc_result_t result; -+ uint32_t old; - - REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN); - REQUIRE(NS_CLIENT_VALID(client)); -@@ -3363,10 +3348,8 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - INSIST(client->naccepts == 1); - client->naccepts--; - -- LOCK(&client->interface->lock); -- INSIST(client->interface->ntcpaccepting > 0); -- client->interface->ntcpaccepting--; -- UNLOCK(&client->interface->lock); -+ old = isc_atomic_xadd(&client->interface->ntcpaccepting, -1); -+ INSIST(old > 0); - - /* - * We must take ownership of the new socket before the exit -@@ -3399,7 +3382,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3), - "accept failed: %s", - isc_result_totext(nevent->result)); -- tcpquota_disconnect(client); -+ tcpconn_detach(client); - } - - if (exit_check(client)) -@@ -3437,15 +3420,13 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - * telnetting to port 53 (once per CPU) will - * deny service to legitimate TCP clients. - */ -- client->pipelined = false; - result = ns_client_replace(client); - if (result == ISC_R_SUCCESS && - (ns_g_server->keepresporder == NULL || - !allowed(&netaddr, NULL, NULL, 0, NULL, - ns_g_server->keepresporder))) - { -- pipeline_init(client); -- client->pipelined = true; -+ client->tcpconn->pipelined = true; - } - - client_read(client); -@@ -3462,78 +3443,59 @@ client_accept(ns_client_t *client) { - CTRACE("accept"); - - /* -- * The tcpquota object can only be simultaneously referenced a -- * pre-defined number of times; this is configured by 'tcp-clients' -- * in named.conf. If we can't attach to it here, that means the TCP -- * client quota has been exceeded. -+ * Set up a new TCP connection. This means try to attach to the -+ * TCP client quota (tcp-clients), but fail if we're over quota. - */ -- result = isc_quota_attach(&ns_g_server->tcpquota, -- &client->tcpquota); -+ result = tcpconn_init(client, false); - if (result != ISC_R_SUCCESS) { -- bool exit; -+ bool exit; - -- ns_client_log(client, NS_LOGCATEGORY_CLIENT, -- NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1), -- "no more TCP clients: %s", -- isc_result_totext(result)); -- -- /* -- * We have exceeded the system-wide TCP client -- * quota. But, we can't just block this accept -- * in all cases, because if we did, a heavy TCP -- * load on other interfaces might cause this -- * interface to be starved, with no clients able -- * to accept new connections. -- * -- * So, we check here to see if any other clients -- * are already servicing TCP queries on this -- * interface (whether accepting, reading, or -- * processing). If there are at least two -- * (one reading and one processing a request) -- * then it's okay *not* to call accept - we -- * can let this client go inactive and another -- * one will resume accepting when it's done. -- * -- * If there aren't enough active clients on the -- * interface, then we can be a little bit -- * flexible about the quota. We'll allow *one* -- * extra client through to ensure we're listening -- * on every interface. -- * -- * (Note: In practice this means that the real -- * TCP client quota is tcp-clients plus the -- * number of listening interfaces plus 2.) -- */ -- LOCK(&client->interface->lock); -- exit = (client->interface->ntcpactive > 1); -- UNLOCK(&client->interface->lock); -+ ns_client_log(client, NS_LOGCATEGORY_CLIENT, -+ NS_LOGMODULE_CLIENT, ISC_LOG_WARNING, -+ "TCP client quota reached: %s", -+ isc_result_totext(result)); - -- if (exit) { -- client->newstate = NS_CLIENTSTATE_INACTIVE; -- (void)exit_check(client); -- return; -- } -+ /* -+ * We have exceeded the system-wide TCP client quota. But, -+ * we can't just block this accept in all cases, because if -+ * we did, a heavy TCP load on other interfaces might cause -+ * this interface to be starved, with no clients able to -+ * accept new connections. -+ * -+ * So, we check here to see if any other clients are -+ * already servicing TCP queries on this interface (whether -+ * accepting, reading, or processing). If we find at least -+ * one, then it's okay *not* to call accept - we can let this -+ * client go inactive and another will take over when it's -+ * done. -+ * -+ * If there aren't enough active clients on the interface, -+ * then we can be a little bit flexible about the quota. -+ * We'll allow *one* extra client through to ensure we're -+ * listening on every interface; we do this by setting the -+ * 'force' option to tcpconn_init(). -+ * -+ * (Note: In practice this means that the real TCP client -+ * quota is tcp-clients plus the number of listening -+ * interfaces plus 1.) -+ */ -+ exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > 0); -+ if (exit) { -+ client->newstate = NS_CLIENTSTATE_INACTIVE; -+ (void)exit_check(client); -+ return; -+ } - -- } else { -- client->tcpattached = true; -+ result = tcpconn_init(client, true); -+ RUNTIME_CHECK(result == ISC_R_SUCCESS); - } - - /* -- * By incrementing the interface's ntcpactive counter we signal -- * that there is at least one client servicing TCP queries for the -- * interface. -- * -- * We also make note of the fact in the client itself with the -- * tcpactive flag. This ensures proper accounting by preventing -- * us from accidentally incrementing or decrementing ntcpactive -- * more than once per client object. -+ * If this client was set up using get_client() or get_worker(), -+ * then TCP is already marked active. However, if it was restarted -+ * from exit_check(), it might not be, so we take care of it now. - */ -- if (!client->tcpactive) { -- LOCK(&client->interface->lock); -- client->interface->ntcpactive++; -- UNLOCK(&client->interface->lock); -- client->tcpactive = true; -- } -+ mark_tcp_active(client, true); - - result = isc_socket_accept(client->tcplistener, client->task, - client_newconn, client); -@@ -3549,15 +3511,8 @@ client_accept(ns_client_t *client) { - "isc_socket_accept() failed: %s", - isc_result_totext(result)); - -- tcpquota_disconnect(client); -- -- if (client->tcpactive) { -- LOCK(&client->interface->lock); -- client->interface->ntcpactive--; -- UNLOCK(&client->interface->lock); -- client->tcpactive = false; -- } -- -+ tcpconn_detach(client); -+ mark_tcp_active(client, false); - return; - } - -@@ -3582,9 +3537,7 @@ client_accept(ns_client_t *client) { - * listening for connections itself to prevent the interface - * going dead. - */ -- LOCK(&client->interface->lock); -- client->interface->ntcpaccepting++; -- UNLOCK(&client->interface->lock); -+ isc_atomic_xadd(&client->interface->ntcpaccepting, 1); - } - - static void -@@ -3655,24 +3608,25 @@ ns_client_replace(ns_client_t *client) { - REQUIRE(client->manager != NULL); - - tcp = TCP_CLIENT(client); -- if (tcp && client->pipelined) { -+ if (tcp && client->tcpconn != NULL && client->tcpconn->pipelined) { - result = get_worker(client->manager, client->interface, - client->tcpsocket, client); - } else { - result = get_client(client->manager, client->interface, -- client->dispatch, client, tcp); -+ client->dispatch, tcp); - -- /* -- * The responsibility for listening for new requests is hereby -- * transferred to the new client. Therefore, the old client -- * should refrain from listening for any more requests. -- */ -- client->mortal = true; - } - if (result != ISC_R_SUCCESS) { - return (result); - } - -+ /* -+ * The responsibility for listening for new requests is hereby -+ * transferred to the new client. Therefore, the old client -+ * should refrain from listening for any more requests. -+ */ -+ client->mortal = true; -+ - return (ISC_R_SUCCESS); - } - -@@ -3806,7 +3760,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) { - - static isc_result_t - get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, -- dns_dispatch_t *disp, ns_client_t *oldclient, bool tcp) -+ dns_dispatch_t *disp, bool tcp) - { - isc_result_t result = ISC_R_SUCCESS; - isc_event_t *ev; -@@ -3850,15 +3804,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp, - client->dscp = ifp->dscp; - - if (tcp) { -- client->tcpattached = false; -- if (oldclient != NULL) { -- client->tcpattached = oldclient->tcpattached; -- } -- -- LOCK(&client->interface->lock); -- client->interface->ntcpactive++; -- UNLOCK(&client->interface->lock); -- client->tcpactive = true; -+ mark_tcp_active(client, true); - - client->attributes |= NS_CLIENTATTR_TCP; - isc_socket_attach(ifp->tcpsocket, -@@ -3923,16 +3869,14 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, - ns_interface_attach(ifp, &client->interface); - client->newstate = client->state = NS_CLIENTSTATE_WORKING; - INSIST(client->recursionquota == NULL); -- client->tcpquota = &ns_g_server->tcpquota; -- client->tcpattached = oldclient->tcpattached; - - client->dscp = ifp->dscp; - - client->attributes |= NS_CLIENTATTR_TCP; - client->mortal = true; - -- pipeline_attach(oldclient, client); -- client->pipelined = true; -+ tcpconn_attach(oldclient, client); -+ mark_tcp_active(client, true); - - isc_socket_attach(ifp->tcpsocket, &client->tcplistener); - isc_socket_attach(sock, &client->tcpsocket); -@@ -3940,11 +3884,6 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock, - (void)isc_socket_getpeername(client->tcpsocket, &client->peeraddr); - client->peeraddr_valid = true; - -- LOCK(&client->interface->lock); -- client->interface->ntcpactive++; -- UNLOCK(&client->interface->lock); -- client->tcpactive = true; -- - INSIST(client->tcpmsg_valid == false); - dns_tcpmsg_init(client->mctx, client->tcpsocket, &client->tcpmsg); - client->tcpmsg_valid = true; -@@ -3970,8 +3909,7 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n, - MTRACE("createclients"); - - for (disp = 0; disp < n; disp++) { -- result = get_client(manager, ifp, ifp->udpdispatch[disp], -- NULL, tcp); -+ result = get_client(manager, ifp, ifp->udpdispatch[disp], tcp); - if (result != ISC_R_SUCCESS) - break; - } -diff --git a/bin/named/include/named/client.h b/bin/named/include/named/client.h -index e2c40acd28..969ee4c08f 100644 ---- a/bin/named/include/named/client.h -+++ b/bin/named/include/named/client.h -@@ -78,6 +78,13 @@ - *** Types - ***/ - -+/*% reference-counted TCP connection object */ -+typedef struct ns_tcpconn { -+ isc_refcount_t refs; -+ isc_quota_t *tcpquota; -+ bool pipelined; -+} ns_tcpconn_t; -+ - /*% nameserver client structure */ - struct ns_client { - unsigned int magic; -@@ -131,10 +138,7 @@ struct ns_client { - dns_name_t signername; /*%< [T]SIG key name */ - dns_name_t *signer; /*%< NULL if not valid sig */ - bool mortal; /*%< Die after handling request */ -- bool pipelined; /*%< TCP queries not in sequence */ -- isc_refcount_t *pipeline_refs; -- isc_quota_t *tcpquota; -- bool tcpattached; -+ ns_tcpconn_t *tcpconn; - isc_quota_t *recursionquota; - ns_interface_t *interface; - -diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h -index 61b08826a6..3535ef22a8 100644 ---- a/bin/named/include/named/interfacemgr.h -+++ b/bin/named/include/named/interfacemgr.h -@@ -9,8 +9,6 @@ - * information regarding copyright ownership. - */ - --/* $Id: interfacemgr.h,v 1.35 2011/07/28 23:47:58 tbox Exp $ */ -- - #ifndef NAMED_INTERFACEMGR_H - #define NAMED_INTERFACEMGR_H 1 - -@@ -77,11 +75,11 @@ struct ns_interface { - /*%< UDP dispatchers. */ - isc_socket_t * tcpsocket; /*%< TCP socket. */ - isc_dscp_t dscp; /*%< "listen-on" DSCP value */ -- int ntcpaccepting; /*%< Number of clients -+ int32_t ntcpaccepting; /*%< Number of clients - ready to accept new - TCP connections on this - interface */ -- int ntcpactive; /*%< Number of clients -+ int32_t ntcpactive; /*%< Number of clients - servicing TCP queries - (whether accepting or - connected) */ -diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c -index 955096ef47..d9f6df5802 100644 ---- a/bin/named/interfacemgr.c -+++ b/bin/named/interfacemgr.c -@@ -388,6 +388,7 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, - */ - ifp->ntcpaccepting = 0; - ifp->ntcpactive = 0; -+ - ifp->nudpdispatch = 0; - - ifp->dscp = -1; -diff --git a/lib/isc/include/isc/quota.h b/lib/isc/include/isc/quota.h -index b9bf59877a..36c5830242 100644 ---- a/lib/isc/include/isc/quota.h -+++ b/lib/isc/include/isc/quota.h -@@ -100,6 +100,13 @@ isc_quota_attach(isc_quota_t *quota, isc_quota_t **p); - * quota if successful (ISC_R_SUCCESS or ISC_R_SOFTQUOTA). - */ - -+isc_result_t -+isc_quota_force(isc_quota_t *quota, isc_quota_t **p); -+/*%< -+ * Like isc_quota_attach, but will attach '*p' to the quota -+ * even if the hard quota has been exceeded. -+ */ -+ - void - isc_quota_detach(isc_quota_t **p); - /*%< -diff --git a/lib/isc/quota.c b/lib/isc/quota.c -index 3ddff0d875..556a61f21d 100644 ---- a/lib/isc/quota.c -+++ b/lib/isc/quota.c -@@ -74,20 +74,39 @@ isc_quota_release(isc_quota_t *quota) { - UNLOCK("a->lock); - } - --isc_result_t --isc_quota_attach(isc_quota_t *quota, isc_quota_t **p) --{ -+static isc_result_t -+doattach(isc_quota_t *quota, isc_quota_t **p, bool force) { - isc_result_t result; -- INSIST(p != NULL && *p == NULL); -+ REQUIRE(p != NULL && *p == NULL); -+ - result = isc_quota_reserve(quota); -- if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) -+ if (result == ISC_R_SUCCESS || result == ISC_R_SOFTQUOTA) { -+ *p = quota; -+ } else if (result == ISC_R_QUOTA && force) { -+ /* attach anyway */ -+ LOCK("a->lock); -+ quota->used++; -+ UNLOCK("a->lock); -+ - *p = quota; -+ result = ISC_R_SUCCESS; -+ } -+ - return (result); - } - -+isc_result_t -+isc_quota_attach(isc_quota_t *quota, isc_quota_t **p) { -+ return (doattach(quota, p, false)); -+} -+ -+isc_result_t -+isc_quota_force(isc_quota_t *quota, isc_quota_t **p) { -+ return (doattach(quota, p, true)); -+} -+ - void --isc_quota_detach(isc_quota_t **p) --{ -+isc_quota_detach(isc_quota_t **p) { - INSIST(p != NULL && *p != NULL); - isc_quota_release(*p); - *p = NULL; -diff --git a/lib/isc/win32/libisc.def.in b/lib/isc/win32/libisc.def.in -index a82facec0f..7b9f23d776 100644 ---- a/lib/isc/win32/libisc.def.in -+++ b/lib/isc/win32/libisc.def.in -@@ -519,6 +519,7 @@ isc_portset_removerange - isc_quota_attach - isc_quota_destroy - isc_quota_detach -+isc_quota_force - isc_quota_init - isc_quota_max - isc_quota_release --- -2.20.1 -meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch deleted +0
-80@@ -1,80 +0,0 @@ -Backport patch to fix CVE-2018-5743. - -Ref: -https://security-tracker.debian.org/tracker/CVE-2018-5743 - -CVE: CVE-2018-5743 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/59434b9] - -Signed-off-by: Kai Kang <[email protected]> - -From 59434b987e8eb436b08c24e559ee094c4e939daa Mon Sep 17 00:00:00 2001 -From: Evan Hunt <[email protected]> -Date: Fri, 5 Apr 2019 16:26:19 -0700 -Subject: [PATCH 6/6] restore allowance for tcp-clients < interfaces - -in the "refactor tcpquota and pipeline refs" commit, the counting -of active interfaces was tightened in such a way that named could -fail to listen on an interface if there were more interfaces than -tcp-clients. when checking the quota to start accepting on an -interface, if the number of active clients was above zero, then -it was presumed that some other client was able to handle accepting -new connections. this, however, ignored the fact that the current client -could be included in that count, so if the quota was already exceeded -before all the interfaces were listening, some interfaces would never -listen. - -we now check whether the current client has been marked active; if so, -then the number of active clients on the interface must be greater -than 1, not 0. - -(cherry picked from commit 0b4e2cd4c3192ba88569dd344f542a8cc43742b5) -(cherry picked from commit d01023aaac35543daffbdf48464e320150235d41) ---- - bin/named/client.c | 8 +++++--- - doc/arm/Bv9ARM-book.xml | 3 ++- - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/bin/named/client.c b/bin/named/client.c -index d826ab32bf..845326abc0 100644 ---- a/bin/named/client.c -+++ b/bin/named/client.c -@@ -3464,8 +3464,9 @@ client_accept(ns_client_t *client) { - * - * So, we check here to see if any other clients are - * already servicing TCP queries on this interface (whether -- * accepting, reading, or processing). If we find at least -- * one, then it's okay *not* to call accept - we can let this -+ * accepting, reading, or processing). If we find that at -+ * least one client other than this one is active, then -+ * it's okay *not* to call accept - we can let this - * client go inactive and another will take over when it's - * done. - * -@@ -3479,7 +3480,8 @@ client_accept(ns_client_t *client) { - * quota is tcp-clients plus the number of listening - * interfaces plus 1.) - */ -- exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > 0); -+ exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > -+ (client->tcpactive ? 1 : 0)); - if (exit) { - client->newstate = NS_CLIENTSTATE_INACTIVE; - (void)exit_check(client); -diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml -index 381768d540..9c76d3cd6f 100644 ---- a/doc/arm/Bv9ARM-book.xml -+++ b/doc/arm/Bv9ARM-book.xml -@@ -8493,7 +8493,8 @@ avoid-v6-udp-ports { 40000; range 50000 60000; }; - <para> - The number of file descriptors reserved for TCP, stdio, - etc. This needs to be big enough to cover the number of -- interfaces <command>named</command> listens on, <command>tcp-clients</command> as well as -+ interfaces <command>named</command> listens on plus -+ <command>tcp-clients</command>, as well as - to provide room for outgoing TCP queries and incoming zone - transfers. The default is <literal>512</literal>. - The minimum value is <literal>128</literal> and the --- -2.20.1 -meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch deleted +0
-140@@ -1,140 +0,0 @@ -Backport commit to fix compile error on arm caused by commits which are -to fix CVE-2018-5743. - -CVE: CVE-2018-5743 -Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/commit/ef49780] - -Signed-off-by: Kai Kang <[email protected]> - -From ef49780d30d3ddc5735cfc32561b678a634fa72f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <[email protected]> -Date: Wed, 17 Apr 2019 15:22:27 +0200 -Subject: [PATCH] Replace atomic operations in bin/named/client.c with - isc_refcount reference counting - ---- - bin/named/client.c | 18 +++++++----------- - bin/named/include/named/interfacemgr.h | 5 +++-- - bin/named/interfacemgr.c | 7 +++++-- - 3 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/bin/named/client.c b/bin/named/client.c -index 845326abc0..29fecadca8 100644 ---- a/bin/named/client.c -+++ b/bin/named/client.c -@@ -402,12 +402,10 @@ tcpconn_detach(ns_client_t *client) { - static void - mark_tcp_active(ns_client_t *client, bool active) { - if (active && !client->tcpactive) { -- isc_atomic_xadd(&client->interface->ntcpactive, 1); -+ isc_refcount_increment0(&client->interface->ntcpactive, NULL); - client->tcpactive = active; - } else if (!active && client->tcpactive) { -- uint32_t old = -- isc_atomic_xadd(&client->interface->ntcpactive, -1); -- INSIST(old > 0); -+ isc_refcount_decrement(&client->interface->ntcpactive, NULL); - client->tcpactive = active; - } - } -@@ -554,7 +552,7 @@ exit_check(ns_client_t *client) { - if (client->mortal && TCP_CLIENT(client) && - client->newstate != NS_CLIENTSTATE_FREED && - !ns_g_clienttest && -- isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0) -+ isc_refcount_current(&client->interface->ntcpaccepting) == 0) - { - /* Nobody else is accepting */ - client->mortal = false; -@@ -3328,7 +3326,6 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - isc_result_t result; - ns_client_t *client = event->ev_arg; - isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event; -- uint32_t old; - - REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN); - REQUIRE(NS_CLIENT_VALID(client)); -@@ -3348,8 +3345,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) { - INSIST(client->naccepts == 1); - client->naccepts--; - -- old = isc_atomic_xadd(&client->interface->ntcpaccepting, -1); -- INSIST(old > 0); -+ isc_refcount_decrement(&client->interface->ntcpaccepting, NULL); - - /* - * We must take ownership of the new socket before the exit -@@ -3480,8 +3476,8 @@ client_accept(ns_client_t *client) { - * quota is tcp-clients plus the number of listening - * interfaces plus 1.) - */ -- exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > -- (client->tcpactive ? 1 : 0)); -+ exit = (isc_refcount_current(&client->interface->ntcpactive) > -+ (client->tcpactive ? 1U : 0U)); - if (exit) { - client->newstate = NS_CLIENTSTATE_INACTIVE; - (void)exit_check(client); -@@ -3539,7 +3535,7 @@ client_accept(ns_client_t *client) { - * listening for connections itself to prevent the interface - * going dead. - */ -- isc_atomic_xadd(&client->interface->ntcpaccepting, 1); -+ isc_refcount_increment0(&client->interface->ntcpaccepting, NULL); - } - - static void -diff --git a/bin/named/include/named/interfacemgr.h b/bin/named/include/named/interfacemgr.h -index 3535ef22a8..6e10f210fd 100644 ---- a/bin/named/include/named/interfacemgr.h -+++ b/bin/named/include/named/interfacemgr.h -@@ -45,6 +45,7 @@ - #include <isc/magic.h> - #include <isc/mem.h> - #include <isc/socket.h> -+#include <isc/refcount.h> - - #include <dns/result.h> - -@@ -75,11 +76,11 @@ struct ns_interface { - /*%< UDP dispatchers. */ - isc_socket_t * tcpsocket; /*%< TCP socket. */ - isc_dscp_t dscp; /*%< "listen-on" DSCP value */ -- int32_t ntcpaccepting; /*%< Number of clients -+ isc_refcount_t ntcpaccepting; /*%< Number of clients - ready to accept new - TCP connections on this - interface */ -- int32_t ntcpactive; /*%< Number of clients -+ isc_refcount_t ntcpactive; /*%< Number of clients - servicing TCP queries - (whether accepting or - connected) */ -diff --git a/bin/named/interfacemgr.c b/bin/named/interfacemgr.c -index d9f6df5802..135533be6b 100644 ---- a/bin/named/interfacemgr.c -+++ b/bin/named/interfacemgr.c -@@ -386,8 +386,8 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr, - * connections will be handled in parallel even though there is - * only one client initially. - */ -- ifp->ntcpaccepting = 0; -- ifp->ntcpactive = 0; -+ isc_refcount_init(&ifp->ntcpaccepting, 0); -+ isc_refcount_init(&ifp->ntcpactive, 0); - - ifp->nudpdispatch = 0; - -@@ -618,6 +618,9 @@ ns_interface_destroy(ns_interface_t *ifp) { - - ns_interfacemgr_detach(&ifp->mgr); - -+ isc_refcount_destroy(&ifp->ntcpactive); -+ isc_refcount_destroy(&ifp->ntcpaccepting); -+ - ifp->magic = 0; - isc_mem_put(mctx, ifp, sizeof(*ifp)); - } --- -2.20.1 -meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch +8
-7@@ -1,4 +1,4 @@ -From 9473d29843579802e96b0293a3e953fed93de82c Mon Sep 17 00:00:00 2001 +From edda20fb5a6e88548f85e39d34d6c074306e15bc Mon Sep 17 00:00:00 2001 From: Paul Gortmaker <[email protected]> Date: Tue, 9 Jun 2015 11:22:00 -0400 Subject: [PATCH] bind: ensure searching for json headers searches sysroot@@ -27,15 +27,16 @@ to make use of the combination some day. Upstream-Status: Inappropriate [OE Specific] Signed-off-by: Paul Gortmaker <[email protected]> + --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: bind-9.11.3/configure.in -=================================================================== ---- bind-9.11.3.orig/configure.in -+++ bind-9.11.3/configure.in -@@ -2574,7 +2574,7 @@ case "$use_libjson" in +diff --git a/configure.ac b/configure.ac +index 17392fd..e85a5c6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2449,7 +2449,7 @@ case "$use_libjson" in libjson_libs="" ;; auto|yes)meta/recipes-connectivity/bind/bind_9.11.13.bb renamed from meta/recipes-connectivity/bind/bind_9.11.5-P4.bb +4
-14@@ -15,23 +15,13 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://make-etc-initd-bind-stop-work.patch \ file://init.d-add-support-for-read-only-rootfs.patch \ file://bind-ensure-searching-for-json-headers-searches-sysr.patch \ - file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \ - file://0001-lib-dns-gen.c-fix-too-long-error.patch \ file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \ file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ file://0001-avoid-start-failure-with-bind-user.patch \ - file://0001-bind-fix-CVE-2019-6471.patch \ - file://0001-fix-enforcement-of-tcp-clients-v1.patch \ - file://0002-tcp-clients-could-still-be-exceeded-v2.patch \ - file://0003-use-reference-counter-for-pipeline-groups-v3.patch \ - file://0004-better-tcpquota-accounting-and-client-mortality-chec.patch \ - file://0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch \ - file://0006-restore-allowance-for-tcp-clients-interfaces.patch \ - file://0007-Replace-atomic-operations-in-bin-named-client.c-with.patch \ -" - -SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960" -SRC_URI[sha256sum] = "7e8c08192bcbaeb6e9f2391a70e67583b027b90e8c4bc1605da6eb126edde434" + " + +SRC_URI[md5sum] = "17de0d024ab1eac377f1c2854dc25057" +SRC_URI[sha256sum] = "fd3f3cc9fcfcdaa752db35eb24598afa1fdcc2509d3227fc90a8631b7b400f7d" UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4