All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option
@ 2019-11-27 16:39 Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 02/14] rpm: upgrade to 4.15.1 Alexander Kanavin
                   ` (13 more replies)
  0 siblings, 14 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 4b56e5beca2..ccd2c40aa3f 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -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')
 
-- 
2.17.1



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

* [PATCH 02/14] rpm: upgrade to 4.15.1
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-28 15:22   ` akuster808
  2019-11-27 16:39 ` [PATCH 03/14] libdnf: upgrade 0.28.1 -> 0.38.1 Alexander Kanavin
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

Drop patches that were merged upstream.

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

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

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...satisfiable-dependency-when-building.patch |  28 +-
 ...lib-rpm-as-the-installation-path-for.patch |  14 +-
 ...kage-building-into-a-separate-functi.patch |  84 -----
 ...es-requires-do-not-use-monodis-from-.patch |  58 ---
 ...-run-file-classification-in-parallel.patch |  65 ++++
 ...ry-package-creation-via-thread-pools.patch | 127 -------
 ...e-operations-over-string-pools-threa.patch | 207 -----------
 ...ove-static-local-variables-from-buil.patch | 336 ------------------
 .../rpm/{rpm_4.14.2.1.bb => rpm_4.15.1.bb}    |  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%)

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



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

* [PATCH 03/14] libdnf: upgrade 0.28.1 -> 0.38.1
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 02/14] rpm: upgrade to 4.15.1 Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 04/14] dnf: upgrade 4.2.2 -> 4.2.16 Alexander Kanavin
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

Add a patch that avoids hardcoded sphinx dependency.

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

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

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



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

* [PATCH 04/14] dnf: upgrade 4.2.2 -> 4.2.16
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 02/14] rpm: upgrade to 4.15.1 Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 03/14] libdnf: upgrade 0.28.1 -> 0.38.1 Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 05/14] rpm: fix spelling in one of the patches' Upstream-Status Alexander Kanavin
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

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

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



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

* [PATCH 05/14] rpm: fix spelling in one of the patches' Upstream-Status
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (2 preceding siblings ...)
  2019-11-27 16:39 ` [PATCH 04/14] dnf: upgrade 4.2.2 -> 4.2.16 Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES Alexander Kanavin
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...001-rpmfc.c-do-not-run-file-classification-in-parallel.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
index 9a5cd7c80dc..d8d338792d3 100644
--- a/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
+++ b/meta/recipes-devtools/rpm/files/0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
@@ -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 <alex.kanavin@gmail.com>
 ---
  build/rpmfc.c | 8 --------
-- 
2.17.1



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

* [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (3 preceding siblings ...)
  2019-11-27 16:39 ` [PATCH 05/14] rpm: fix spelling in one of the patches' Upstream-Status Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2020-01-02 10:17   ` Kang Kai
  2019-11-27 16:39 ` [PATCH 07/14] gettext-minimal-native: update to 0.20.1 Alexander Kanavin
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

rpm 4.15 no longer allows it, which makes sense.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-core/meta/dummy-sdk-package.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc b/meta/recipes-core/meta/dummy-sdk-package.inc
index 4d653706b13..58b0482eca5 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -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}")
 }
 
-- 
2.17.1



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

* [PATCH 07/14] gettext-minimal-native: update to 0.20.1
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (4 preceding siblings ...)
  2019-11-27 16:39 ` [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 08/14] gettext: " Alexander Kanavin
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

Rather 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.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...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%)

diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch b/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch
deleted file mode 100644
index 29ef2a5a63d..00000000000
--- a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch
+++ /dev/null
@@ -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 <rongqing.li@windriver.com>
----
- 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
-
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgz
deleted file mode 100644
index 9b2d1f561d734df608c9c7a6e29e08131296a5fd..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 40014
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

diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/COPYING b/meta/recipes-core/gettext/gettext-minimal-0.20.1/COPYING
similarity index 100%
rename from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/COPYING
rename to meta/recipes-core/gettext/gettext-minimal-0.20.1/COPYING
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in b/meta/recipes-core/gettext/gettext-minimal-0.20.1/Makefile.in.in
similarity index 78%
rename from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in
rename to meta/recipes-core/gettext/gettext-minimal-0.20.1/Makefile.in.in
index 38c293d2ed2..fdb6ad35881 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/Makefile.in.in
@@ -1,13 +1,14 @@
 # Makefile for PO directory in any package using GNU gettext.
-# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2000-2019 Free Software Foundation, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
 # notice and this notice are preserved.  This file is offered as-is,
 # without any warranty.
 #
-# Origin: gettext-0.19.8
-GETTEXT_MACRO_VERSION = 0.19
+# Origin: gettext-0.20
+GETTEXT_MACRO_VERSION = 0.20
 
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
@@ -52,16 +53,13 @@ GMSGFMT_ = @GMSGFMT@
 GMSGFMT_no = @GMSGFMT@
 GMSGFMT_yes = @GMSGFMT_015@
 GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
-MSGFMT_ = @MSGFMT@
-MSGFMT_no = @MSGFMT@
-MSGFMT_yes = @MSGFMT_015@
-MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
 XGETTEXT_ = @XGETTEXT@
 XGETTEXT_no = @XGETTEXT@
 XGETTEXT_yes = @XGETTEXT_015@
 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
-MSGMERGE = msgmerge
+MSGMERGE = @MSGMERGE@
 MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
 MSGINIT = msginit
 MSGCONV = msgconv
 MSGFILTER = msgfilter
@@ -93,17 +91,32 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
 # Makevars gets inserted here. (Don't remove this line!)
 
 .SUFFIXES:
-.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
-
-.po.mo:
-	@echo "$(MSGFMT) -c -o $@ $<"; \
-	$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
-
-.po.gmo:
+.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
+
+# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs.
+# The GNU Coding Standards say in
+# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
+#   "GNU distributions usually contain some files which are not source files
+#    ... . Since these files normally appear in the source directory, they
+#    should always appear in the source directory, not in the build directory.
+#    So Makefile rules to update them should put the updated files in the
+#    source directory."
+# Therefore we put these files in the source directory, not the build directory.
+
+# During .po -> .gmo conversion, take into account the most recent changes to
+# the .pot file. This eliminates the need to update the .po files when the
+# .pot file has changed, which would be troublesome if the .po files are put
+# under version control.
+.po.gmo: $(srcdir)/$(DOMAIN).pot
 	@lang=`echo $* | sed -e 's,.*/,,'`; \
 	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
-	echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
-	cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+	echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
+	cd $(srcdir) && \
+	rm -f $${lang}.gmo && \
+	$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \
+	$(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \
+	mv t-$${lang}.gmo $${lang}.gmo && \
+	rm -f $${lang}.1po
 
 .sin.sed:
 	sed -e '/^#/d' $< > t-$@
@@ -112,7 +125,7 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
 
 all: all-@USE_NLS@
 
-all-yes: stamp-po
+all-yes: $(srcdir)/stamp-po
 all-no:
 
 # Ensure that the gettext macros and this Makefile.in.in are in sync.
@@ -126,24 +139,24 @@ CHECK_MACRO_VERSION = \
 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
 # we don't want to bother translators with empty POT files). We assume that
 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
-# In this case, stamp-po is a nop (i.e. a phony target).
-
-# stamp-po is a timestamp denoting the last time at which the CATALOGS have
-# been loosely updated. Its purpose is that when a developer or translator
-# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
-# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
-# invocations of "make" will do nothing. This timestamp would not be necessary
-# if updating the $(CATALOGS) would always touch them; however, the rule for
-# $(POFILES) has been designed to not touch files that don't need to be
-# changed.
-stamp-po: $(srcdir)/$(DOMAIN).pot
+# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target).
+
+# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS
+# have been loosely updated. Its purpose is that when a developer or translator
+# checks out the package from a version control system, and the $(DOMAIN).pot
+# file is not under version control, "make" will update the $(DOMAIN).pot and
+# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This
+# timestamp would not be necessary if updating the $(CATALOGS) would always
+# touch them; however, the rule for $(POFILES) has been designed to not touch
+# files that don't need to be changed.
+$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot
 	@$(CHECK_MACRO_VERSION)
 	test ! -f $(srcdir)/$(DOMAIN).pot || \
 	  test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
 	@test ! -f $(srcdir)/$(DOMAIN).pot || { \
-	  echo "touch stamp-po" && \
-	  echo timestamp > stamp-poT && \
-	  mv stamp-poT stamp-po; \
+	  echo "touch $(srcdir)/stamp-po" && \
+	  echo timestamp > $(srcdir)/stamp-poT && \
+	  mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \
 	}
 
 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
@@ -159,11 +172,9 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
 	package_gnu="$(PACKAGE_GNU)"; \
 	test -n "$$package_gnu" || { \
 	  if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
-		 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
-			       -size -10000000c -exec grep 'GNU @PACKAGE@' \
-			       /dev/null '{}' ';' 2>/dev/null; \
+	         LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
 	       else \
-		 LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+	         LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
 	       fi; \
 	     } | grep -v 'libtool:' >/dev/null; then \
 	     package_gnu=yes; \
@@ -184,26 +195,29 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
 	case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
 	  '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
 	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
-	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+	      --add-comments=TRANSLATORS: \
 	      --files-from=$(srcdir)/POTFILES.in \
 	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
 	      --msgid-bugs-address="$$msgid_bugs_address" \
+	      $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
 	    ;; \
 	  *) \
 	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
-	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+	      --add-comments=TRANSLATORS: \
 	      --files-from=$(srcdir)/POTFILES.in \
 	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
 	      --package-name="$${package_prefix}@PACKAGE@" \
 	      --package-version='@VERSION@' \
 	      --msgid-bugs-address="$$msgid_bugs_address" \
+	      $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
 	    ;; \
 	esac
 	test ! -f $(DOMAIN).po || { \
 	  if test -f $(srcdir)/$(DOMAIN).pot-header; then \
 	    sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
-	    cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
-	    rm -f $(DOMAIN).1po; \
+	    cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
+	    rm -f $(DOMAIN).1po \
+	    || exit 1; \
 	  fi; \
 	  if test -f $(srcdir)/$(DOMAIN).pot; then \
 	    sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
@@ -228,17 +242,19 @@ $(srcdir)/$(DOMAIN).pot:
 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
 # Note that a PO file is not touched if it doesn't need to be changed.
 $(POFILES): $(POFILESDEPS)
+	@test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
 	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
 	if test -f "$(srcdir)/$${lang}.po"; then \
-	  test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
 	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
-	  echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+	  echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
 	  cd $(srcdir) \
-	    && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
-	           '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+	    && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+	           '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
 	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+	           0.1[6-7] | 0.1[6-7].*) \
+	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
 	           *) \
-	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \
 	         esac; \
 	       }; \
 	else \
@@ -373,28 +389,30 @@ check: all
 
 info dvi ps pdf html tags TAGS ctags CTAGS ID:
 
+install-dvi install-ps install-pdf install-html:
+
 mostlyclean:
 	rm -f remove-potcdate.sed
-	rm -f stamp-poT
+	rm -f $(srcdir)/stamp-poT
 	rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 	rm -fr *.o
 
 clean: mostlyclean
 
 distclean: clean
-	rm -f Makefile Makefile.in POTFILES *.mo
+	rm -f Makefile Makefile.in POTFILES
 
 maintainer-clean: distclean
 	@echo "This command is intended for maintainers to use;"
 	@echo "it deletes files that may require special tools to rebuild."
-	rm -f stamp-po $(GMOFILES)
+	rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES)
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 dist distdir:
 	test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
 	@$(MAKE) dist2
 # This is a separate target because 'update-po' must be executed before.
-dist2: stamp-po $(DISTFILES)
+dist2: $(srcdir)/stamp-po $(DISTFILES)
 	dists="$(DISTFILES)"; \
 	if test "$(PACKAGE)" = "gettext-tools"; then \
 	  dists="$$dists Makevars.template"; \
@@ -439,13 +457,15 @@ update-po: Makefile
 	tmpdir=`pwd`; \
 	echo "$$lang:"; \
 	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
-	echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+	echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
 	cd $(srcdir); \
 	if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
-	       '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+	       '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
 	         $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+	       0.1[6-7] | 0.1[6-7].*) \
+	         $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
 	       *) \
-	         $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+	         $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
 	     esac; \
 	   }; then \
 	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/gettext.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/gettext.m4
new file mode 100644
index 00000000000..e7832418ea1
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/gettext.m4
@@ -0,0 +1,386 @@
+# gettext.m4 serial 70 (gettext-0.20)
+dnl Copyright (C) 1995-2014, 2016, 2018 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
+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 <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL must be one of 'external', 'use-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages other than GNU gettext, and
+dnl    'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED).
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value '$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])
+  ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+    [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported.
+])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external], [no], [yes]))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH([included-gettext],
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+         [AC_LINK_IFELSE(
+            [AC_LANG_PROGRAM(
+               [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+               ]],
+               [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+               ]])],
+            [eval "$gt_func_gnugettext_libc=yes"],
+            [eval "$gt_func_gnugettext_libc=no"])])
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            [$gt_func_gnugettext_libintl],
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_LINK_IFELSE(
+              [AC_LANG_PROGRAM(
+                 [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+                 ]],
+                 [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+                 ]])],
+              [eval "$gt_func_gnugettext_libintl=yes"],
+              [eval "$gt_func_gnugettext_libintl=no"])
+            dnl Now see whether libintl exists and depends on libiconv.
+            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_LINK_IFELSE(
+                [AC_LANG_PROGRAM(
+                   [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+                   ]],
+                   [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+                   ]])],
+                [LIBINTL="$LIBINTL $LIBICONV"
+                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                 eval "$gt_func_gnugettext_libintl=yes"
+                ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE([ENABLE_NLS], [1],
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE([HAVE_GETTEXT], [1],
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE([HAVE_DCGETTEXT], [1],
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes'
+    dnl because some of the testsuite requires it.
+    BUILD_INCLUDED_LIBINTL=yes
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST([BUILD_INCLUDED_LIBINTL])
+    AC_SUBST([USE_INCLUDED_LIBINTL])
+    AC_SUBST([CATOBJEXT])
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST([INTLLIBS])
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
+  AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+
+dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/host-cpu-c-abi.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/host-cpu-c-abi.m4
new file mode 100644
index 00000000000..4407296d084
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/host-cpu-c-abi.m4
@@ -0,0 +1,644 @@
+# host-cpu-c-abi.m4 serial 11
+dnl Copyright (C) 2002-2019 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 and Sam Steingold.
+
+dnl Sets the HOST_CPU variable to the canonical name of the CPU.
+dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its
+dnl C language ABI (application binary interface).
+dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in
+dnl config.h.
+dnl
+dnl This canonical name can be used to select a particular assembly language
+dnl source file that will interoperate with C code on the given host.
+dnl
+dnl For example:
+dnl * 'i386' and 'sparc' are different canonical names, because code for i386
+dnl   will not run on SPARC CPUs and vice versa. They have different
+dnl   instruction sets.
+dnl * 'sparc' and 'sparc64' are different canonical names, because code for
+dnl   'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code
+dnl   contains 32-bit instructions, whereas 'sparc64' code contains 64-bit
+dnl   instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit
+dnl   mode, but not both.
+dnl * 'mips' and 'mipsn32' are different canonical names, because they use
+dnl   different argument passing and return conventions for C functions, and
+dnl   although the instruction set of 'mips' is a large subset of the
+dnl   instruction set of 'mipsn32'.
+dnl * 'mipsn32' and 'mips64' are different canonical names, because they use
+dnl   different sizes for the C types like 'int' and 'void *', and although
+dnl   the instruction sets of 'mipsn32' and 'mips64' are the same.
+dnl * The same canonical name is used for different endiannesses. You can
+dnl   determine the endianness through preprocessor symbols:
+dnl   - 'arm': test __ARMEL__.
+dnl   - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
+dnl   - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
+dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
+dnl   (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
+dnl   - Instructions that do not exist on all of these CPUs (cmpxchg,
+dnl     MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your
+dnl     assembly language source files use such instructions, you will
+dnl     need to make the distinction.
+dnl   - Speed of execution of the common instruction set is reasonable across
+dnl     the entire family of CPUs. If you have assembly language source files
+dnl     that are optimized for particular CPU types (like GNU gmp has), you
+dnl     will need to make the distinction.
+dnl   See <https://en.wikipedia.org/wiki/X86_instruction_listings>.
+AC_DEFUN([gl_HOST_CPU_C_ABI],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_C_ASM])
+  AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi],
+    [case "$host_cpu" in
+
+changequote(,)dnl
+       i[4567]86 )
+changequote([,])dnl
+         gl_cv_host_cpu_c_abi=i386
+         ;;
+
+       x86_64 )
+         # On x86_64 systems, the C compiler may be generating code in one of
+         # these ABIs:
+         # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+         # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+         #   with native Windows (mingw, MSVC).
+         # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+         # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if (defined __x86_64__ || defined __amd64__ \
+                     || defined _M_X64 || defined _M_AMD64)
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [AC_COMPILE_IFELSE(
+              [AC_LANG_SOURCE(
+                 [[#if defined __ILP32__ || defined _ILP32
+                    int ok;
+                   #else
+                    error fail
+                   #endif
+                 ]])],
+              [gl_cv_host_cpu_c_abi=x86_64-x32],
+              [gl_cv_host_cpu_c_abi=x86_64])],
+           [gl_cv_host_cpu_c_abi=i386])
+         ;;
+
+changequote(,)dnl
+       alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
+changequote([,])dnl
+         gl_cv_host_cpu_c_abi=alpha
+         ;;
+
+       arm* | aarch64 )
+         # Assume arm with EABI.
+         # On arm64 systems, the C compiler may be generating code in one of
+         # these ABIs:
+         # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+         # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+         # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#ifdef __aarch64__
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [AC_COMPILE_IFELSE(
+              [AC_LANG_SOURCE(
+                [[#if defined __ILP32__ || defined _ILP32
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+              [gl_cv_host_cpu_c_abi=arm64-ilp32],
+              [gl_cv_host_cpu_c_abi=arm64])],
+           [# Don't distinguish little-endian and big-endian arm, since they
+            # don't require different machine code for simple operations and
+            # since the user can distinguish them through the preprocessor
+            # defines __ARMEL__ vs. __ARMEB__.
+            # But distinguish arm which passes floating-point arguments and
+            # return values in integer registers (r0, r1, ...) - this is
+            # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
+            # passes them in float registers (s0, s1, ...) and double registers
+            # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
+            # sets the preprocessor defines __ARM_PCS (for the first case) and
+            # __ARM_PCS_VFP (for the second case), but older GCC does not.
+            echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
+            # Look for a reference to the register d0 in the .s file.
+            AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+            if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
+              gl_cv_host_cpu_c_abi=armhf
+            else
+              gl_cv_host_cpu_c_abi=arm
+            fi
+            rm -f conftest*
+           ])
+         ;;
+
+       hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+         # On hppa, the C compiler may be generating 32-bit code or 64-bit
+         # code. In the latter case, it defines _LP64 and __LP64__.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#ifdef __LP64__
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [gl_cv_host_cpu_c_abi=hppa64],
+           [gl_cv_host_cpu_c_abi=hppa])
+         ;;
+
+       ia64* )
+         # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+         # 32-bit code. In the latter case, it defines _ILP32.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#ifdef _ILP32
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [gl_cv_host_cpu_c_abi=ia64-ilp32],
+           [gl_cv_host_cpu_c_abi=ia64])
+         ;;
+
+       mips* )
+         # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+         # at 32.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [gl_cv_host_cpu_c_abi=mips64],
+           [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
+            # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
+            # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
+            # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
+            AC_COMPILE_IFELSE(
+              [AC_LANG_SOURCE(
+                 [[#if (_MIPS_SIM == _ABIN32)
+                    int ok;
+                   #else
+                    error fail
+                   #endif
+                 ]])],
+              [gl_cv_host_cpu_c_abi=mipsn32],
+              [gl_cv_host_cpu_c_abi=mips])])
+         ;;
+
+       powerpc* )
+         # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+         # No need to distinguish them here; the caller may distinguish
+         # them based on the OS.
+         # On powerpc64 systems, the C compiler may still be generating
+         # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+         # be generating 64-bit code.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if defined __powerpc64__ || defined _ARCH_PPC64
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [# On powerpc64, there are two ABIs on Linux: The AIX compatible
+            # one and the ELFv2 one. The latter defines _CALL_ELF=2.
+            AC_COMPILE_IFELSE(
+              [AC_LANG_SOURCE(
+                 [[#if defined _CALL_ELF && _CALL_ELF == 2
+                    int ok;
+                   #else
+                    error fail
+                   #endif
+                 ]])],
+              [gl_cv_host_cpu_c_abi=powerpc64-elfv2],
+              [gl_cv_host_cpu_c_abi=powerpc64])
+           ],
+           [gl_cv_host_cpu_c_abi=powerpc])
+         ;;
+
+       rs6000 )
+         gl_cv_host_cpu_c_abi=powerpc
+         ;;
+
+       riscv32 | riscv64 )
+         # There are 2 architectures (with variants): rv32* and rv64*.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if __riscv_xlen == 64
+                  int ok;
+                #else
+                  error fail
+                #endif
+              ]])],
+           [cpu=riscv64],
+           [cpu=riscv32])
+         # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+         # Size of 'long' and 'void *':
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if defined __LP64__
+                  int ok;
+                #else
+                  error fail
+                #endif
+              ]])],
+           [main_abi=lp64],
+           [main_abi=ilp32])
+         # Float ABIs:
+         # __riscv_float_abi_double:
+         #   'float' and 'double' are passed in floating-point registers.
+         # __riscv_float_abi_single:
+         #   'float' are passed in floating-point registers.
+         # __riscv_float_abi_soft:
+         #   No values are passed in floating-point registers.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if defined __riscv_float_abi_double
+                  int ok;
+                #else
+                  error fail
+                #endif
+              ]])],
+           [float_abi=d],
+           [AC_COMPILE_IFELSE(
+              [AC_LANG_SOURCE(
+                 [[#if defined __riscv_float_abi_single
+                     int ok;
+                   #else
+                     error fail
+                   #endif
+                 ]])],
+              [float_abi=f],
+              [float_abi=''])
+           ])
+         gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
+         ;;
+
+       s390* )
+         # On s390x, the C compiler may be generating 64-bit (= s390x) code
+         # or 31-bit (= s390) code.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if defined __LP64__ || defined __s390x__
+                  int ok;
+                #else
+                  error fail
+                #endif
+              ]])],
+           [gl_cv_host_cpu_c_abi=s390x],
+           [gl_cv_host_cpu_c_abi=s390])
+         ;;
+
+       sparc | sparc64 )
+         # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+         # C compiler still generates 32-bit code.
+         AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#if defined __sparcv9 || defined __arch64__
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [gl_cv_host_cpu_c_abi=sparc64],
+           [gl_cv_host_cpu_c_abi=sparc])
+         ;;
+
+       *)
+         gl_cv_host_cpu_c_abi="$host_cpu"
+         ;;
+     esac
+    ])
+
+  dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same.
+  HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
+  HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
+  AC_SUBST([HOST_CPU])
+  AC_SUBST([HOST_CPU_C_ABI])
+
+  # This was
+  #   AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
+  #   AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
+  # earlier, but KAI C++ 3.2d doesn't like this.
+  sed -e 's/-/_/g' >> confdefs.h <<EOF
+#ifndef __${HOST_CPU}__
+#define __${HOST_CPU}__ 1
+#endif
+#ifndef __${HOST_CPU_C_ABI}__
+#define __${HOST_CPU_C_ABI}__ 1
+#endif
+EOF
+  AH_TOP([/* CPU and C ABI indicator */
+#ifndef __i386__
+#undef __i386__
+#endif
+#ifndef __x86_64_x32__
+#undef __x86_64_x32__
+#endif
+#ifndef __x86_64__
+#undef __x86_64__
+#endif
+#ifndef __alpha__
+#undef __alpha__
+#endif
+#ifndef __arm__
+#undef __arm__
+#endif
+#ifndef __armhf__
+#undef __armhf__
+#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
+#ifndef __arm64__
+#undef __arm64__
+#endif
+#ifndef __hppa__
+#undef __hppa__
+#endif
+#ifndef __hppa64__
+#undef __hppa64__
+#endif
+#ifndef __ia64_ilp32__
+#undef __ia64_ilp32__
+#endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
+#ifndef __m68k__
+#undef __m68k__
+#endif
+#ifndef __mips__
+#undef __mips__
+#endif
+#ifndef __mipsn32__
+#undef __mipsn32__
+#endif
+#ifndef __mips64__
+#undef __mips64__
+#endif
+#ifndef __powerpc__
+#undef __powerpc__
+#endif
+#ifndef __powerpc64__
+#undef __powerpc64__
+#endif
+#ifndef __powerpc64_elfv2__
+#undef __powerpc64_elfv2__
+#endif
+#ifndef __riscv32__
+#undef __riscv32__
+#endif
+#ifndef __riscv64__
+#undef __riscv64__
+#endif
+#ifndef __riscv32_ilp32__
+#undef __riscv32_ilp32__
+#endif
+#ifndef __riscv32_ilp32f__
+#undef __riscv32_ilp32f__
+#endif
+#ifndef __riscv32_ilp32d__
+#undef __riscv32_ilp32d__
+#endif
+#ifndef __riscv64_ilp32__
+#undef __riscv64_ilp32__
+#endif
+#ifndef __riscv64_ilp32f__
+#undef __riscv64_ilp32f__
+#endif
+#ifndef __riscv64_ilp32d__
+#undef __riscv64_ilp32d__
+#endif
+#ifndef __riscv64_lp64__
+#undef __riscv64_lp64__
+#endif
+#ifndef __riscv64_lp64f__
+#undef __riscv64_lp64f__
+#endif
+#ifndef __riscv64_lp64d__
+#undef __riscv64_lp64d__
+#endif
+#ifndef __s390__
+#undef __s390__
+#endif
+#ifndef __s390x__
+#undef __s390x__
+#endif
+#ifndef __sh__
+#undef __sh__
+#endif
+#ifndef __sparc__
+#undef __sparc__
+#endif
+#ifndef __sparc64__
+#undef __sparc64__
+#endif
+])
+
+])
+
+
+dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
+dnl (application binary interface) is a 32-bit one, or to 'no' otherwise.
+dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
+AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
+    [if test -n "$gl_cv_host_cpu_c_abi"; then
+       case "$gl_cv_host_cpu_c_abi" in
+         i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+           gl_cv_host_cpu_c_abi_32bit=yes ;;
+         *)
+           gl_cv_host_cpu_c_abi_32bit=no ;;
+       esac
+     else
+       case "$host_cpu" in
+
+changequote(,)dnl
+         i[4567]86 )
+changequote([,])dnl
+           gl_cv_host_cpu_c_abi_32bit=yes
+           ;;
+
+         x86_64 )
+           # On x86_64 systems, the C compiler may be generating code in one of
+           # these ABIs:
+           # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+           # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+           #   with native Windows (mingw, MSVC).
+           # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#if (defined __x86_64__ || defined __amd64__ \
+                       || defined _M_X64 || defined _M_AMD64) \
+                      && !(defined __ILP32__ || defined _ILP32)
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         arm* | aarch64 )
+           # Assume arm with EABI.
+           # On arm64 systems, the C compiler may be generating code in one of
+           # these ABIs:
+           # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+           # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+           # On hppa, the C compiler may be generating 32-bit code or 64-bit
+           # code. In the latter case, it defines _LP64 and __LP64__.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#ifdef __LP64__
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         ia64* )
+           # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+           # 32-bit code. In the latter case, it defines _ILP32.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#ifdef _ILP32
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=yes],
+             [gl_cv_host_cpu_c_abi_32bit=no])
+           ;;
+
+         mips* )
+           # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+           # at 32.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         powerpc* )
+           # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+           # No need to distinguish them here; the caller may distinguish
+           # them based on the OS.
+           # On powerpc64 systems, the C compiler may still be generating
+           # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+           # be generating 64-bit code.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#if defined __powerpc64__ || defined _ARCH_PPC64
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         rs6000 )
+           gl_cv_host_cpu_c_abi_32bit=yes
+           ;;
+
+         riscv32 | riscv64 )
+           # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+           # Size of 'long' and 'void *':
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#if defined __LP64__
+                    int ok;
+                  #else
+                    error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         s390* )
+           # On s390x, the C compiler may be generating 64-bit (= s390x) code
+           # or 31-bit (= s390) code.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#if defined __LP64__ || defined __s390x__
+                    int ok;
+                  #else
+                    error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         sparc | sparc64 )
+           # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+           # C compiler still generates 32-bit code.
+           AC_COMPILE_IFELSE(
+             [AC_LANG_SOURCE(
+                [[#if defined __sparcv9 || defined __arch64__
+                   int ok;
+                  #else
+                   error fail
+                  #endif
+                ]])],
+             [gl_cv_host_cpu_c_abi_32bit=no],
+             [gl_cv_host_cpu_c_abi_32bit=yes])
+           ;;
+
+         *)
+           gl_cv_host_cpu_c_abi_32bit=no
+           ;;
+       esac
+     fi
+    ])
+
+  HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/iconv.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/iconv.m4
new file mode 100644
index 00000000000..a285e9daa5e
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/iconv.m4
@@ -0,0 +1,288 @@
+# iconv.m4 serial 21
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2019 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[
+#include <stdlib.h>
+#include <iconv.h>
+         ]],
+         [[iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);]])],
+      [am_cv_func_iconv=yes])
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
+#include <stdlib.h>
+#include <iconv.h>
+           ]],
+           [[iconv_t cd = iconv_open("","");
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);]])],
+        [am_cv_lib_iconv=yes]
+        [am_cv_func_iconv=yes])
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+      dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
+      dnl Solaris 10.
+      am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      am_cv_func_iconv_works=no
+      for ac_iconv_const in '' 'const'; do
+        AC_RUN_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+             ]],
+             [[int result = 0;
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\263";
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
+      }
+  }
+  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304";
+        static char buf[2] = { (char)0xDE, (char)0xAD };
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = 1;
+        char *outptr = buf;
+        size_t outbytesleft = 1;
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  {
+    /* Try standardized names.  */
+    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+    /* Try IRIX, OSF/1 names.  */
+    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+    /* Try AIX names.  */
+    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+    /* Try HP-UX names.  */
+    iconv_t cd4 = iconv_open ("utf8", "eucJP");
+    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+      result |= 16;
+    if (cd1 != (iconv_t)(-1))
+      iconv_close (cd1);
+    if (cd2 != (iconv_t)(-1))
+      iconv_close (cd2);
+    if (cd3 != (iconv_t)(-1))
+      iconv_close (cd3);
+    if (cd4 != (iconv_t)(-1))
+      iconv_close (cd4);
+  }
+  return result;
+]])],
+          [am_cv_func_iconv_works=yes], ,
+          [case "$host_os" in
+             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+             *)            am_cv_func_iconv_works="guessing yes" ;;
+           esac])
+        test "$am_cv_func_iconv_works" = no || break
+      done
+      LIBS="$am_save_LIBS"
+    ])
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+    AC_DEFINE([HAVE_ICONV], [1],
+      [Define if you have the iconv() function and it works.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST([LIBICONV])
+  AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl   warnings.
+m4_define([gl_iconv_AC_DEFUN],
+  m4_version_prereq([2.64],
+    [[AC_DEFUN_ONCE(
+        [$1], [$2])]],
+    [m4_ifdef([gl_00GNULIB],
+       [[AC_DEFUN_ONCE(
+           [$1], [$2])]],
+       [[AC_DEFUN(
+           [$1], [$2])]])]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL([am_cv_proto_iconv], [
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+           ]],
+           [[]])],
+        [am_cv_proto_iconv_arg1=""],
+        [am_cv_proto_iconv_arg1="const"])
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([
+         $am_cv_proto_iconv])
+  else
+    dnl When compiling GNU libiconv on a system that does not have iconv yet,
+    dnl pick the POSIX compliant declaration without 'const'.
+    am_cv_proto_iconv_arg1=""
+  fi
+  AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+    [Define as const if the declaration of iconv() needs const.])
+  dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+  m4_ifdef([gl_ICONV_H_DEFAULTS],
+    [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+     if test -n "$am_cv_proto_iconv_arg1"; then
+       ICONV_CONST="const"
+     fi
+    ])
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/intlmacosx.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/intlmacosx.m4
new file mode 100644
index 00000000000..30e6f50e0ac
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/intlmacosx.m4
@@ -0,0 +1,72 @@
+# intlmacosx.m4 serial 6 (gettext-0.20)
+dnl Copyright (C) 2004-2014, 2016, 2019 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
+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 Checks for special options needed on Mac OS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+  dnl Check for API introduced in Mac OS X 10.4.
+  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+    [gt_cv_func_CFPreferencesCopyAppValue],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFPreferences.h>]],
+          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+       [gt_cv_func_CFPreferencesCopyAppValue=yes],
+       [gt_cv_func_CFPreferencesCopyAppValue=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+  fi
+  dnl Check for API introduced in Mac OS X 10.5.
+  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFLocale.h>]],
+          [[CFLocaleCopyCurrent();]])],
+       [gt_cv_func_CFLocaleCopyCurrent=yes],
+       [gt_cv_func_CFLocaleCopyCurrent=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+  fi
+  AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
+    [gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <CoreFoundation/CFLocale.h>]],
+          [[CFLocaleCopyPreferredLanguages();]])],
+       [gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
+       [gt_cv_func_CFLocaleCopyPreferredLanguages=no])
+     LIBS="$gt_save_LIBS"])
+  if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+    AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
+      [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+     || test $gt_cv_func_CFLocaleCopyCurrent = yes \
+     || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+  AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-ld.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-ld.m4
new file mode 100644
index 00000000000..a18719630d5
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-ld.m4
@@ -0,0 +1,168 @@
+# lib-ld.m4 serial 9
+dnl Copyright (C) 1996-2003, 2009-2019 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 Subroutines of libtool.m4,
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
+
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes
+  ;;
+*)
+  acl_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-2.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+        [assume the C compiler uses GNU ld [default=no]])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+if test -n "$LD"; then
+  AC_MSG_CHECKING([for ld])
+elif test "$GCC" = yes; then
+  AC_MSG_CHECKING([for ld used by $CC])
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+if test -n "$LD"; then
+  # Let the user override the test with a path.
+  :
+else
+  AC_CACHE_VAL([acl_cv_path_LD],
+  [
+    acl_cv_path_LD= # Final result of this test
+    ac_prog=ld # Program to search in $PATH
+    if test "$GCC" = yes; then
+      # Check if gcc -print-prog-name=ld gives a path.
+      case $host in
+        *-*-mingw*)
+          # gcc leaves a trailing carriage return which upsets mingw
+          acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+        *)
+          acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
+      esac
+      case $acl_output in
+        # Accept absolute paths.
+        [[\\/]]* | ?:[[\\/]]*)
+          re_direlt='/[[^/]][[^/]]*/\.\./'
+          # Canonicalize the pathname of ld
+          acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
+          while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
+            acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
+          done
+          # Got the pathname. No search in PATH is needed.
+          acl_cv_path_LD="$acl_output"
+          ac_prog=
+          ;;
+        "")
+          # If it fails, then pretend we aren't using GCC.
+          ;;
+        *)
+          # If it is relative, then search for the first ld in PATH.
+          with_gnu_ld=unknown
+          ;;
+      esac
+    fi
+    if test -n "$ac_prog"; then
+      # Search for $ac_prog in $PATH.
+      acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+      for ac_dir in $PATH; do
+        IFS="$acl_save_ifs"
+        test -z "$ac_dir" && ac_dir=.
+        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+          acl_cv_path_LD="$ac_dir/$ac_prog"
+          # Check to see if the program is GNU ld.  I'd rather use --version,
+          # but apparently some variants of GNU ld only accept -v.
+          # Break only if it was the GNU/non-GNU ld that we prefer.
+          case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+            *GNU* | *'with BFD'*)
+              test "$with_gnu_ld" != no && break
+              ;;
+            *)
+              test "$with_gnu_ld" != yes && break
+              ;;
+          esac
+        fi
+      done
+      IFS="$acl_save_ifs"
+    fi
+    case $host in
+      *-*-aix*)
+        AC_COMPILE_IFELSE(
+          [AC_LANG_SOURCE(
+             [[#if defined __powerpc64__ || defined _ARCH_PPC64
+                int ok;
+               #else
+                error fail
+               #endif
+             ]])],
+          [# The compiler produces 64-bit code. Add option '-b64' so that the
+           # linker groks 64-bit object files.
+           case "$acl_cv_path_LD " in
+             *" -b64 "*) ;;
+             *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+           esac
+          ], [])
+        ;;
+      sparc64-*-netbsd*)
+        AC_COMPILE_IFELSE(
+          [AC_LANG_SOURCE(
+             [[#if defined __sparcv9 || defined __arch64__
+                int ok;
+               #else
+                error fail
+               #endif
+             ]])],
+          [],
+          [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
+           # so that the linker groks 32-bit object files.
+           case "$acl_cv_path_LD " in
+             *" -m elf32_sparc "*) ;;
+             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+           esac
+          ])
+        ;;
+    esac
+  ])
+  LD="$acl_cv_path_LD"
+fi
+if test -n "$LD"; then
+  AC_MSG_RESULT([$LD])
+else
+  AC_MSG_RESULT([no])
+  AC_MSG_ERROR([no acceptable ld found in \$PATH])
+fi
+AC_LIB_PROG_LD_GNU
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-link.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-link.m4
new file mode 100644
index 00000000000..0ff10731fac
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-link.m4
@@ -0,0 +1,774 @@
+# lib-link.m4 serial 28
+dnl Copyright (C) 2001-2019 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.
+
+AC_PREREQ([2.61])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+    dnl because these -l options might require -L options that are present in
+    dnl LIBS. -l options benefit only from the -L options listed before it.
+    dnl Otherwise, add it to the front of LIBS, because it may be a static
+    dnl library that depends on another static library that is present in LIBS.
+    dnl Static libraries benefit only from the static libraries listed after
+    dnl it.
+    case " $LIB[]NAME" in
+      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+      *)       LIBS="$LIB[]NAME $LIBS" ;;
+    esac
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[$3]], [[$4]])],
+      [ac_cv_lib[]Name=yes],
+      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  popdef([NAME])
+  popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl   acl_libext,
+dnl   acl_shlibext,
+dnl   acl_libname_spec,
+dnl   acl_library_names_spec,
+dnl   acl_hardcode_libdir_flag_spec,
+dnl   acl_hardcode_libdir_separator,
+dnl   acl_hardcode_direct,
+dnl   acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Complain if config.rpath is missing.
+  AC_REQUIRE_AUX_FILE([config.rpath])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE([rpath],
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_frompackage_]NAME, [$2])
+  popdef([NAME])
+  pushdef([PACK],[$2])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_libsinpackage_]PACKUP,
+    m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+  popdef([PACKUP])
+  popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_ARG_WITH(PACK[-prefix],
+[[  --with-]]PACK[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
+  --without-]]PACK[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && test ! -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  LIB[]NAME[]_PREFIX=
+  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+  dnl computed. So it has to be reset here.
+  HAVE_LIB[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+            dnl The same code as in the loop below:
+            dnl First look for a shared library.
+            if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+            dnl Then look for a static library.
+            if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$acl_hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+  popdef([PACKLIBS])
+  popdef([PACKUP])
+  popdef([PACK])
+  popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem" \
+             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem" \
+                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$acl_hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-prefix.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-prefix.m4
new file mode 100644
index 00000000000..8adb17bb916
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/lib-prefix.m4
@@ -0,0 +1,249 @@
+# lib-prefix.m4 serial 14
+dnl Copyright (C) 2001-2005, 2008-2019 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 AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_ARG_WITH([lib-prefix],
+[[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir]],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl   "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl   "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64.
+  dnl On glibc systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+  dnl the compiler's default mode by looking at the compiler's library search
+  dnl path. If at least one of its elements ends in /lib64 or points to a
+  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+  dnl Otherwise we use the default, namely "lib".
+  dnl On Solaris systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
+
+  case "$host_os" in
+    solaris*)
+      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE(
+              [[#ifdef _LP64
+                 int ok;
+                #else
+                 error fail
+                #endif
+              ]])],
+           [gl_cv_solaris_64bit=yes],
+           [gl_cv_solaris_64bit=no])
+        ]);;
+  esac
+
+  dnl Allow the user to override the result by setting acl_cv_libdirstems.
+  AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
+    [acl_cv_libdirstems],
+    [acl_libdirstem=lib
+     acl_libdirstem2=
+     case "$host_os" in
+       solaris*)
+         dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+         dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
+         dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+         dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+         dnl symlink is missing, so we set acl_libdirstem2 too.
+         if test $gl_cv_solaris_64bit = yes; then
+           acl_libdirstem=lib/64
+           case "$host_cpu" in
+             sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+             i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+           esac
+         fi
+         ;;
+       *)
+         dnl If $CC generates code for a 32-bit ABI, the libraries are
+         dnl surely under $prefix/lib, not $prefix/lib64.
+         if test "$HOST_CPU_C_ABI_32BIT" != yes; then
+           dnl The result is a property of the system. However, non-system
+           dnl compilers sometimes have odd library search paths. Therefore
+           dnl prefer asking /usr/bin/gcc, if available, rather than $CC.
+           searchpath=`(if test -f /usr/bin/gcc \
+                           && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
+                          LC_ALL=C /usr/bin/gcc -print-search-dirs; \
+                        else \
+                          LC_ALL=C $CC -print-search-dirs; \
+                        fi) 2>/dev/null \
+                       | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+           if test -n "$searchpath"; then
+             acl_save_IFS="${IFS= 	}"; IFS=":"
+             for searchdir in $searchpath; do
+               if test -d "$searchdir"; then
+                 case "$searchdir" in
+                   */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+                   */../ | */.. )
+                     # Better ignore directories of this form. They are misleading.
+                     ;;
+                   *) searchdir=`cd "$searchdir" && pwd`
+                      case "$searchdir" in
+                        */lib64 ) acl_libdirstem=lib64 ;;
+                      esac ;;
+                 esac
+               fi
+             done
+             IFS="$acl_save_IFS"
+           fi
+         fi
+         ;;
+     esac
+     test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
+    ])
+  # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
+  acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/nls.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/nls.m4
new file mode 100644
index 00000000000..b62f6148570
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/nls.m4
@@ -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 <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 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])
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/po.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/po.m4
new file mode 100644
index 00000000000..143792dba56
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/po.m4
@@ -0,0 +1,450 @@
+# po.m4 serial 30 (gettext-0.20)
+dnl Copyright (C) 1995-2014, 2016, 2018-2019 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
+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 <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.60])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+  AC_REQUIRE([AC_PROG_SED])dnl
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Release version of the gettext macros. This is used to ensure that
+  dnl the gettext macros and po/Makefile.in.in are in sync.
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.20])
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl Test whether it is GNU msgmerge >= 0.20.
+  if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
+    MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
+  else
+    dnl Test whether it is GNU msgmerge >= 0.12.
+    if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
+      MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
+    else
+      dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is
+      dnl slow. But this is not a big problem, as such old gettext versions are
+      dnl hardly in use any more.
+      MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
+    fi
+  fi
+  AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION])
+
+  dnl Support for AM_XGETTEXT_OPTION.
+  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          gt_tab=`printf '\t'`
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
+    OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  tab=`printf '\t'`
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
+  # Seen the first line of the variable definition.
+  s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+  tab=`printf '\t'`
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+  XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/progtest.m4 b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/progtest.m4
new file mode 100644
index 00000000000..5f186b14909
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/aclocal/progtest.m4
@@ -0,0 +1,91 @@
+# progtest.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1996-2003, 2005, 2008-2019 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
+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 <drepper@cygnus.com>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$][$1])
+else
+  AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath b/meta/recipes-core/gettext/gettext-minimal-0.20.1/config.rpath
similarity index 99%
rename from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath
rename to meta/recipes-core/gettext/gettext-minimal-0.20.1/config.rpath
index 98183ff2f2e..be202c1a9e7 100755
--- a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/config.rpath
@@ -2,7 +2,7 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2016 Free Software Foundation, Inc.
+#   Copyright 1996-2019 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/remove-potcdate.sin b/meta/recipes-core/gettext/gettext-minimal-0.20.1/remove-potcdate.sin
similarity index 50%
rename from meta/recipes-core/gettext/gettext-minimal-0.19.8.1/remove-potcdate.sin
rename to meta/recipes-core/gettext/gettext-minimal-0.20.1/remove-potcdate.sin
index 2436c49e786..8c70dfbf148 100644
--- a/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/remove-potcdate.sin
+++ b/meta/recipes-core/gettext/gettext-minimal-0.20.1/remove-potcdate.sin
@@ -1,6 +1,12 @@
-# Sed script that remove the POT-Creation-Date line in the header entry
+# Sed script that removes the POT-Creation-Date line in the header entry
 # from a POT file.
 #
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.  This file is offered as-is,
+# without any warranty.
+#
 # The distinction between the first and the following occurrences of the
 # pattern is achieved by looking at the hold space.
 /^"POT-Creation-Date: .*"$/{
diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.20.1.bb
similarity index 86%
rename from meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb
rename to meta/recipes-core/gettext/gettext-minimal-native_0.20.1.bb
index 26ff19975d2..7a4dcbec57b 100644
--- a/meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb
+++ b/meta/recipes-core/gettext/gettext-minimal-native_0.20.1.bb
@@ -3,12 +3,11 @@ DESCRIPTION = "Contains the m4 macros sufficient to support building \
 autoconf/automake. This provides a significant build time speedup by \
 the removal of gettext-native from most dependency chains (now only \
 needed for gettext for the target)."
-SRC_URI = "file://aclocal.tgz \
+SRC_URI = "file://aclocal/ \
            file://config.rpath \
            file://Makefile.in.in \
            file://remove-potcdate.sin \
            file://COPYING \
-           file://0001-PATCH-Disable-the-test-to-convert-euc-jp.patch \
 "
 
 INHIBIT_DEFAULT_DEPS = "1"
@@ -23,7 +22,7 @@ S = "${WORKDIR}"
 
 do_install () {
 	install -d ${D}${datadir}/aclocal/
-	cp ${WORKDIR}/*.m4 ${D}${datadir}/aclocal/
+	cp ${WORKDIR}/aclocal/*.m4 ${D}${datadir}/aclocal/
 	install -d ${D}${datadir}/gettext/po/
 	cp ${WORKDIR}/config.rpath ${D}${datadir}/gettext/
 	cp ${WORKDIR}/Makefile.in.in ${D}${datadir}/gettext/po/
-- 
2.17.1



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

* [PATCH 08/14] gettext: update to 0.20.1
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (5 preceding siblings ...)
  2019-11-27 16:39 ` [PATCH 07/14] gettext-minimal-native: update to 0.20.1 Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-28 15:18   ` akuster808
  2019-11-27 16:39 ` [PATCH 09/14] lrzsz: fix issues with newer versions of gettext Alexander Kanavin
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

License-Update: URLs changed from http to https
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 .../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%)

diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
deleted file mode 100644
index 6dfe200d654..00000000000
--- a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
-From: Daiki Ueno <ueno@gnu.org>
-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
-
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
deleted file mode 100644
index c8e2c94af0e..00000000000
--- a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
+++ /dev/null
@@ -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 <jslater@windriver.com>
-
---- 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
- 
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
deleted file mode 100644
index 6156a153f74..00000000000
--- a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
+++ /dev/null
@@ -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 <ross.burton@intel.com>
-
-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>
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch b/meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch
similarity index 100%
rename from meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch
rename to meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
similarity index 68%
rename from meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
rename to meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
index 6af16041987..0561ed7d32c 100644
--- a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
+++ b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
@@ -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 <liezhi.yang@windriver.com>
 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 <liezhi.yang@windriver.com>
+
 ---
- 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
-
diff --git a/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
new file mode 100644
index 00000000000..d96a376b7d1
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
@@ -0,0 +1,32 @@
+From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001
+From: Joe Slater <jslater@windriver.com>
+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 <jslater@windriver.com>
+
+---
+ 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
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest b/meta/recipes-core/gettext/gettext-0.20.1/run-ptest
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.patch b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
similarity index 75%
rename from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
rename to meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
index 31ff9138a91..93f7c03334a 100644
--- a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
+++ b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
@@ -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" <hongjun.yang@windriver.com>
 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 <changqing.li@windriver.com>
+
 ---
  configure.ac                 | 2 +-
  gettext-runtime/configure.ac | 2 +-
@@ -15,24 +16,24 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
  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],
- 	[bug-gnu-gettext@gnu.org])
+@@ -22,7 +22,7 @@ AC_INIT([gettext],
+ 	[bug-gettext@gnu.org])
  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],
- 	[bug-gnu-gettext@gnu.org])
+ 	[bug-gettext@gnu.org])
  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],
- 	[bug-gnu-gettext@gnu.org])
+ 	[bug-gettext@gnu.org])
  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
-
diff --git a/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
new file mode 100644
index 00000000000..d1b2603779b
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
@@ -0,0 +1,713 @@
+From ef414b06be80c6f605731abc9e674e396b80ec9e Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+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 <ross.burton@intel.com>
+
+---
+ 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"
diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.20.1.bb
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
index 30121ad23e1..fc05ef2e0a3 100644
--- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.20.1.bb
@@ -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/"
 
 }
 
-- 
2.17.1



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

* [PATCH 09/14] lrzsz: fix issues with newer versions of gettext
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (6 preceding siblings ...)
  2019-11-27 16:39 ` [PATCH 08/14] gettext: " Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-27 16:39 ` [PATCH 10/14] p11-kit: convert to meson Alexander Kanavin
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...-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

diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0009-Fix-issues-with-recent-gettext-versions.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0009-Fix-issues-with-recent-gettext-versions.patch
new file mode 100644
index 00000000000..c8a05f3818b
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/0009-Fix-issues-with-recent-gettext-versions.patch
@@ -0,0 +1,42 @@
+From 245c104267363c13f2ba83eca4409c673ee99fcf Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+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 <alex.kanavin@gmail.com>
+---
+ 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
diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
index 34556b2c294..47962bcfffc 100644
--- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
+++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
@@ -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"
-- 
2.17.1



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

* [PATCH 10/14] p11-kit: convert to meson
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (7 preceding siblings ...)
  2019-11-27 16:39 ` [PATCH 09/14] lrzsz: fix issues with newer versions of gettext Alexander Kanavin
@ 2019-11-27 16:39 ` Alexander Kanavin
  2019-11-27 16:40 ` [PATCH 11/14] sed: upgrade to 4.7 Alexander Kanavin
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:39 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 .../p11-kit/p11-kit_0.23.18.1.bb              | 30 ++++---------------
 1 file changed, 6 insertions(+), 24 deletions(-)

diff --git a/meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb b/meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb
index 9193a06ea80..7037f6a639f 100644
--- a/meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb
+++ b/meta/recipes-support/p11-kit/p11-kit_0.23.18.1.bb
@@ -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 \
-- 
2.17.1



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

* [PATCH 11/14] sed: upgrade to 4.7
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (8 preceding siblings ...)
  2019-11-27 16:39 ` [PATCH 10/14] p11-kit: convert to meson Alexander Kanavin
@ 2019-11-27 16:40 ` Alexander Kanavin
  2019-11-27 16:40 ` [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13 Alexander Kanavin
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:40 UTC (permalink / raw)
  To: openembedded-core

Drop 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)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...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

diff --git a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c1..00000000000
--- a/meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-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 <raj.khem@gmail.com>
----
- 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
-
diff --git a/meta/recipes-extended/sed/sed-4.2.2/run-ptest b/meta/recipes-extended/sed/sed-4.2.2/run-ptest
deleted file mode 100644
index 7c0f62770e7..00000000000
--- a/meta/recipes-extended/sed/sed-4.2.2/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-make -C testsuite -k runtest-TESTS
diff --git a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch b/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
deleted file mode 100644
index 0293900fbf3..00000000000
--- a/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-sed: add ptest
-
-ptest needs buildtest-TESTS and runtest-TESTS targets.
-serial-tests is required to generate those targets.
-
-And fix following error after add serial-tests.
-
-[snip]
-help2man: can't get `--help' info from ../sed/sed
-make[2]: *** [sed.1] Error 2
-[snip]
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- configure.ac          |    2 +-
- doc/Makefile.am       |    2 +-
- testsuite/Makefile.am |    6 ++++++
- 3 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9d33ec9..4f0c532 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(build-aux)
- AC_CONFIG_SRCDIR([sed/sed.c])
- AM_CONFIG_HEADER(config.h:config_h.in)
- AC_PREREQ(2.60)
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([serial-tests])
- 
- SED_FEATURE_VERSION=4.2.2
- AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION",
-diff --git a/doc/Makefile.am b/doc/Makefile.am
-index af6975c..6fd8c9a 100644
---- a/doc/Makefile.am
-+++ b/doc/Makefile.am
-@@ -25,7 +25,7 @@ $(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
- 	fi
- 	echo stamp > $(srcdir)/s-texi
- 
--sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
-+_sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
- 	$(HELP2MAN) --name "stream editor for filtering and transforming text" \
- 	  -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED) 
- 
-diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
-index d80e72c..b05f01e 100644
---- a/testsuite/Makefile.am
-+++ b/testsuite/Makefile.am
-@@ -99,5 +99,11 @@ EXTRA_DIST = \
- # automake makes `check' depend on $(TESTS).  Declare
- # dummy targets for $(TESTS) so that make does not complain.
- 
-+install-ptest:
-+	cd $(BUILDDIR); tar -c --exclude=*.o $(TESTDIR) | ( cd $(DESTDIR) && tar -xf - )
-+	for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done
-+	sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile
-+	for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done
-+
- .PHONY: $(SEDTESTS)
- $(SEDTESTS):
--- 
-1.7.9.5
-
diff --git a/meta/recipes-extended/sed/sed/run-ptest b/meta/recipes-extended/sed/sed/run-ptest
new file mode 100644
index 00000000000..993d7d5d75e
--- /dev/null
+++ b/meta/recipes-extended/sed/sed/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+chown nobody testsuite
+chown nobody ../ptest
+su nobody -c "make test-suite.log"
diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb b/meta/recipes-extended/sed/sed_4.2.2.bb
deleted file mode 100644
index 8e436bad803..00000000000
--- a/meta/recipes-extended/sed/sed_4.2.2.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Stream EDitor (text filtering utility)"
-HOMEPAGE = "http://www.gnu.org/software/sed/"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
-                    file://sed/sed.h;beginline=1;endline=17;md5=767ab3a06d7584f6fd0469abaec4412f"
-SECTION = "console/utils"
-
-SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \
-           file://sed-add-ptest.patch \
-	   file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           file://run-ptest \
-"
-
-SRC_URI[md5sum] = "4111de4faa3b9848a0686b2f260c5056"
-SRC_URI[sha256sum] = "fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
-
-inherit autotools texinfo update-alternatives gettext ptest
-RDEPENDS_${PN}-ptest += "make"
-RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru"
-
-EXTRA_OECONF = "--disable-acl \
-                ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-regex-tests', '', d)}"
-
-do_install () {
-	autotools_do_install
-	install -d ${D}${base_bindir}
-	if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
-	    mv ${D}${bindir}/sed ${D}${base_bindir}/sed
-	    rmdir ${D}${bindir}/
-	fi
-}
-
-ALTERNATIVE_${PN} = "sed"
-ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
-ALTERNATIVE_PRIORITY = "100"
-
-TESTDIR = "testsuite"
-
-do_compile_ptest() {
-	oe_runmake -C ${TESTDIR} buildtest-TESTS
-}
-
-do_install_ptest() {
-	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-	sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
-	    -e 's|${DEBUG_PREFIX_MAP}||g' \
-	    -e 's:${HOSTTOOLS_DIR}/::g' \
-	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
-	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
-	    -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
-}
-
-RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}"
diff --git a/meta/recipes-extended/sed/sed_4.7.bb b/meta/recipes-extended/sed/sed_4.7.bb
new file mode 100644
index 00000000000..312f07f0479
--- /dev/null
+++ b/meta/recipes-extended/sed/sed_4.7.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Stream EDitor (text filtering utility)"
+HOMEPAGE = "http://www.gnu.org/software/sed/"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \
+                    file://sed/sed.h;beginline=1;endline=15;md5=e869c874e5472ba89f63f381b0e93475"
+SECTION = "console/utils"
+
+SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.xz \
+           file://run-ptest \
+"
+
+SRC_URI[md5sum] = "777ddfd9d71dd06711fe91f0925e1573"
+SRC_URI[sha256sum] = "2885768cd0a29ff8d58a6280a270ff161f6a3deb5690b2be6c49f46d4c67bd6a"
+
+inherit autotools texinfo update-alternatives gettext ptest
+RDEPENDS_${PN}-ptest += "make gawk perl perl-module-filehandle perl-module-file-compare perl-module-file-find perl-module-file-temp perl-module-file-stat"
+RRECOMMENDS_${PN}-ptest_append_libc-glibc = " locale-base-ru-ru locale-base-en-us locale-base-el-gr.iso-8859-7"
+
+EXTRA_OECONF = "--disable-acl \
+               "
+
+do_install () {
+	autotools_do_install
+	install -d ${D}${base_bindir}
+	if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
+	    mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+	    rmdir ${D}${bindir}/
+	fi
+}
+
+ALTERNATIVE_${PN} = "sed"
+ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
+ALTERNATIVE_PRIORITY = "100"
+
+do_compile_ptest() {
+	oe_runmake testsuite/get-mb-cur-max testsuite/test-mbrtowc
+}
+
+do_install_ptest() {
+        cp -rf ${S}/testsuite/ ${D}${PTEST_PATH}
+        cp -rf ${B}/testsuite/* ${D}${PTEST_PATH}/testsuite/
+        cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}/
+        cp ${B}/Makefile ${D}${PTEST_PATH}
+        cp ${S}/init.cfg ${D}${PTEST_PATH}
+
+        sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i ${D}${PTEST_PATH}/Makefile
+        for i in `grep -rl "sed/sed" ${D}${PTEST_PATH}`; do sed -e 's/..\/sed\/sed/sed/' -i $i; done
+
+	sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+	    -e 's|${DEBUG_PREFIX_MAP}||g' \
+	    -e 's:${HOSTTOOLS_DIR}/::g' \
+	    -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+	    -e 's:abs_top_builddir =.*:abs_top_builddir = ..:g' \
+	    -e 's:abs_top_srcdir =.*:abs_top_srcdir = ..:g' \
+	    -e 's:abs_srcdir =.*:abs_srcdir = ..:g' \
+	    -e 's:top_srcdir =.*:top_srcdir = ..:g' \
+	    -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+	    -i ${D}${PTEST_PATH}/Makefile
+}
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sed', '', d)}"
-- 
2.17.1



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

* [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (9 preceding siblings ...)
  2019-11-27 16:40 ` [PATCH 11/14] sed: upgrade to 4.7 Alexander Kanavin
@ 2019-11-27 16:40 ` Alexander Kanavin
  2019-11-27 20:25   ` akuster808
  2019-11-27 16:40 ` [PATCH 13/14] flex: update to 2.6.4 Alexander Kanavin
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:40 UTC (permalink / raw)
  To: openembedded-core

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
upstream.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 .../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%)

diff --git a/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch b/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
deleted file mode 100644
index 2fed99e1bba..00000000000
--- a/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001
-From: Mark Andrews <marka@isc.org>
-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
-
diff --git a/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
index 871bb2a5f6c..9d31b980807 100644
--- a/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
+++ b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
@@ -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 <hongxu.jia@windriver.com>
 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 <hongxu.jia@windriver.com>
+
 ---
- 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
-
diff --git a/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch b/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
deleted file mode 100644
index 48ae125f845..00000000000
--- a/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From ec2d50da8d81814640e28593d912f4b96c7efece Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
-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
-
diff --git a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch b/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
deleted file mode 100644
index a8d601dcaa7..00000000000
--- a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Pending
-
-Subject: gen.c: extend DIRNAMESIZE from 256 to 512
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- 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;
diff --git a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch b/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
deleted file mode 100644
index 01874a44076..00000000000
--- a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 5bc3167a8b714ec0c4a3f1c7f3b9411296ec0a23 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-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 <liezhi.yang@windriver.com>
----
- 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;
diff --git a/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch b/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
deleted file mode 100644
index ca4e8b1a662..00000000000
--- a/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From 719f604e3fad5b7479bd14e2fa0ef4413f0a8fdc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
-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
-
diff --git a/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch b/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
deleted file mode 100644
index 032cfb8c442..00000000000
--- a/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From 366b4e1ede8aed690e981e07137cb1cb77879c36 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <michal@isc.org>
-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
-
diff --git a/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch b/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
deleted file mode 100644
index 034ab13303b..00000000000
--- a/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From 2ab8a085b3c666f28f1f9229bd6ecb59915b26c3 Mon Sep 17 00:00:00 2001
-From: Evan Hunt <each@isc.org>
-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
-
diff --git a/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch b/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
deleted file mode 100644
index 987e75bc0ee..00000000000
--- a/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From c47ccf630f147378568b33e8fdb7b754f228c346 Mon Sep 17 00:00:00 2001
-From: Evan Hunt <each@isc.org>
-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, &quota);
-+	} else {
-+		result = isc_quota_attach(&ns_g_server->tcpquota, &quota);
-+	}
-+	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(&quota->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(&quota->lock);
-+		quota->used++;
-+		UNLOCK(&quota->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
-
diff --git a/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch b/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
deleted file mode 100644
index 3821d185012..00000000000
--- a/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From 59434b987e8eb436b08c24e559ee094c4e939daa Mon Sep 17 00:00:00 2001
-From: Evan Hunt <each@isc.org>
-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
-
diff --git a/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch b/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
deleted file mode 100644
index 1a84eca58a7..00000000000
--- a/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
+++ /dev/null
@@ -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 <kai.kang@windriver.com>
-
-From ef49780d30d3ddc5735cfc32561b678a634fa72f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org>
-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
-
diff --git a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
index 37e210e6da9..84559e5f378 100644
--- a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
+++ b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
@@ -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 <paul.gortmaker@windriver.com>
 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 <paul.gortmaker@windriver.com>
+
 ---
- 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)
diff --git a/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb b/meta/recipes-connectivity/bind/bind_9.11.13.bb
similarity index 86%
rename from meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
rename to meta/recipes-connectivity/bind/bind_9.11.13.bb
index 0897706346b..338d6c717a6 100644
--- a/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
+++ b/meta/recipes-connectivity/bind/bind_9.11.13.bb
@@ -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
-- 
2.17.1



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

* [PATCH 13/14] flex: update to 2.6.4
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (10 preceding siblings ...)
  2019-11-27 16:40 ` [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13 Alexander Kanavin
@ 2019-11-27 16:40 ` Alexander Kanavin
  2019-11-28 15:14   ` akuster808
  2019-11-27 16:40 ` [PATCH 14/14] gettext: fix failing ptests Alexander Kanavin
  2019-11-27 17:02 ` ✗ patchtest: failure for "oe-selftest: extend virgl gtk ..." and 13 more Patchwork
  13 siblings, 1 reply; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:40 UTC (permalink / raw)
  To: openembedded-core

Add a backport patch that addresses segfaults on newer glibc versions.

Remove:
CVE-2016-6354.patch (backport)
0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch (issue fixed upstream)
do_not_create_pdf_doc.patch (issue fixed upstream)

ptest pass rate is 100%.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...SE_SYSTEM_EXTENSIONS-in-configure.ac.patch | 32 ++++++++++
 ...-comments-in-c-code-fails-with-gcc-6.patch | 64 -------------------
 .../flex/flex/CVE-2016-6354.patch             | 59 -----------------
 .../flex/flex/do_not_create_pdf_doc.patch     | 17 -----
 meta/recipes-devtools/flex/flex/run-ptest     |  2 +-
 .../flex/{flex_2.6.0.bb => flex_2.6.4.bb}     | 10 ++-
 6 files changed, 37 insertions(+), 147 deletions(-)
 create mode 100644 meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
 delete mode 100644 meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
 delete mode 100644 meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
 delete mode 100644 meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
 rename meta/recipes-devtools/flex/{flex_2.6.0.bb => flex_2.6.4.bb} (86%)

diff --git a/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
new file mode 100644
index 00000000000..60bf7ce8cfd
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
@@ -0,0 +1,32 @@
+From ed1f7e9de0d6a1d5a9e581e02a63593d22cf1e52 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Mon, 4 Sep 2017 10:47:33 +0800
+Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac.
+
+This would, e.g. define _GNU_SOURCE in config.h, enabling the
+reallocarray() prototype in glibc 2.26+ on Linux systems with that
+version of glibc.
+
+Fixes #241.
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 55e774b..c879fe1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,8 +25,10 @@
+ # autoconf requirements and initialization
+ 
+ AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])
++AC_PREREQ([2.60])
+ AC_CONFIG_SRCDIR([src/scan.l])
+ AC_CONFIG_AUX_DIR([build-aux])
++AC_USE_SYSTEM_EXTENSIONS
+ LT_INIT
+ AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects])
+ AC_CONFIG_HEADER([src/config.h])
diff --git a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
deleted file mode 100644
index 438ca5f5276..00000000000
--- a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Tue, 30 Aug 2016 14:25:32 +0200
-Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-fixes:
-
-| error: C++ style comments are not allowed in ISO C90
-| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
-
-Upstream-Status: Pending
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- src/flex.skl | 2 +-
- src/scan.c   | 2 +-
- src/skel.c   | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/flex.skl b/src/flex.skl
-index 73a0b9e..ed71627 100644
---- a/src/flex.skl
-+++ b/src/flex.skl
-@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
- 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
- 		 * immediate realloc on the next call.
-          */
--		num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
-+		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
- 		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- 								(num_to_alloc * sizeof(struct yy_buffer_state*)
- 								M4_YY_CALL_LAST_ARG);
-diff --git a/src/scan.c b/src/scan.c
-index b55df2d..f1dce75 100644
---- a/src/scan.c
-+++ b/src/scan.c
-@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
- 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
- 		 * immediate realloc on the next call.
-          */
--		num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
-+		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/
- 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- 								(num_to_alloc * sizeof(struct yy_buffer_state*)
- 								);
-diff --git a/src/skel.c b/src/skel.c
-index ef657d3..26cc889 100644
---- a/src/skel.c
-+++ b/src/skel.c
-@@ -2561,7 +2561,7 @@ const char *skel[] = {
-   "		 * scanner will even need a stack. We use 2 instead of 1 to avoid an",
-   "		 * immediate realloc on the next call.",
-   "         */",
--  "		num_to_alloc = 1; // After all that talk, this was set to 1 anyways...",
-+  "		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */",
-   "		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
-   "								(num_to_alloc * sizeof(struct yy_buffer_state*)",
-   "								M4_YY_CALL_LAST_ARG);",
--- 
-2.5.5
-
diff --git a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch b/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
deleted file mode 100644
index 216ac7ae1c4..00000000000
--- a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 3939eccdff598f47e5b37b05d58bf1b44d3796e7 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 7 Oct 2016 14:15:38 +0300
-Subject: [PATCH] Prevent buffer overflow in yy_get_next_buffer
-
-This is upstream commit a5cbe929ac3255d371e698f62dc256afe7006466
-with some additional backporting to make binutils build again.
-
-Upstream-Status: Backport
-CVE: CVE-2016-6354
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- src/flex.skl | 2 +-
- src/scan.c   | 2 +-
- src/skel.c   | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/flex.skl b/src/flex.skl
-index ed71627..814d562 100644
---- a/src/flex.skl
-+++ b/src/flex.skl
-@@ -1718,7 +1718,7 @@ int yyFlexLexer::yy_get_next_buffer()
- 
- 	else
- 		{
--			yy_size_t num_to_read =
-+			int num_to_read =
- 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
- 
- 		while ( num_to_read <= 0 )
-diff --git a/src/scan.c b/src/scan.c
-index f1dce75..1949872 100644
---- a/src/scan.c
-+++ b/src/scan.c
-@@ -4181,7 +4181,7 @@ static int yy_get_next_buffer (void)
- 
- 	else
- 		{
--			yy_size_t num_to_read =
-+			int num_to_read =
- 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
- 
- 		while ( num_to_read <= 0 )
-diff --git a/src/skel.c b/src/skel.c
-index 26cc889..0344d18 100644
---- a/src/skel.c
-+++ b/src/skel.c
-@@ -1929,7 +1929,7 @@ const char *skel[] = {
-   "",
-   "	else",
-   "		{",
--  "			yy_size_t num_to_read =",
-+  "			int num_to_read =",
-   "			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;",
-   "",
-   "		while ( num_to_read <= 0 )",
--- 
-2.1.4
-
diff --git a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
deleted file mode 100644
index 29792efee87..00000000000
--- a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Upstream-Status: Inappropriate (embedded specific)
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-
-Index: flex-2.6.0/doc/Makefile.am
-===================================================================
---- flex-2.6.0.orig/doc/Makefile.am
-+++ flex-2.6.0/doc/Makefile.am
-@@ -2,7 +2,7 @@ help2man = @HELP2MAN@
- 
- info_TEXINFOS =	flex.texi
- dist_man_MANS = flex.1
--dist_doc_DATA= flex.pdf
-+EXTRA_DIST= flex.pdf
- 
- CLEANFILES = \
- 	flex.aux \
diff --git a/meta/recipes-devtools/flex/flex/run-ptest b/meta/recipes-devtools/flex/flex/run-ptest
index 19db3379002..037301c40fa 100755
--- a/meta/recipes-devtools/flex/flex/run-ptest
+++ b/meta/recipes-devtools/flex/flex/run-ptest
@@ -2,4 +2,4 @@
 
 # make would want to rebuild some files with a compiler otherwise :-/
 make FLEX=/usr/bin/flex -t check-TESTS || true
-make FLEX=/usr/bin/flex check-TESTS
+make FLEX=/usr/bin/flex abs_builddir=./ check-TESTS
diff --git a/meta/recipes-devtools/flex/flex_2.6.0.bb b/meta/recipes-devtools/flex/flex_2.6.4.bb
similarity index 86%
rename from meta/recipes-devtools/flex/flex_2.6.0.bb
rename to meta/recipes-devtools/flex/flex_2.6.4.bb
index 9bdd99c59f8..347018df1b7 100644
--- a/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/meta/recipes-devtools/flex/flex_2.6.4.bb
@@ -10,17 +10,15 @@ BBCLASSEXTEND = "native nativesdk"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
+SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.tar.gz \
            file://run-ptest \
-           file://do_not_create_pdf_doc.patch \
            file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
-           file://0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch \
-           file://CVE-2016-6354.patch \
            ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
+           file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
            "
 
-SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59"
-SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9"
+SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"
+SRC_URI[sha256sum] = "e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995"
 
 # Flex has moved to github from 2.6.1 onwards
 UPSTREAM_CHECK_URI = "https://github.com/westes/flex/releases"
-- 
2.17.1



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

* [PATCH 14/14] gettext: fix failing ptests
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (11 preceding siblings ...)
  2019-11-27 16:40 ` [PATCH 13/14] flex: update to 2.6.4 Alexander Kanavin
@ 2019-11-27 16:40 ` Alexander Kanavin
  2019-11-27 17:02 ` ✗ patchtest: failure for "oe-selftest: extend virgl gtk ..." and 13 more Patchwork
  13 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-27 16:40 UTC (permalink / raw)
  To: openembedded-core

Results:

pass 400
fail 0
skip 32

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-core/gettext/gettext_0.20.1.bb | 23 +++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/gettext/gettext_0.20.1.bb b/meta/recipes-core/gettext/gettext_0.20.1.bb
index fc05ef2e0a3..a6fc2195685 100644
--- a/meta/recipes-core/gettext/gettext_0.20.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.20.1.bb
@@ -44,6 +44,10 @@ EXTRA_OECONF += "--without-lispdir \
                 "
 EXTRA_OECONF_append_class-target = " \
                  --with-bisonlocaledir=${datadir}/locale \
+                 gt_cv_locale_fr_utf8=fr_FR \
+                 gt_cv_locale_fr=fr_FR.ISO-8859-1 \
+                 gt_cv_locale_de_utf8=de_DE \
+                 gt_cv_locale_de=de_DE.ISO-8859-1 \
 "
 
 PACKAGECONFIG ??= "croco glib libxml"
@@ -143,13 +147,17 @@ do_install_ptest() {
         mkdir -p                                        ${D}${PTEST_PATH}/src
         mkdir -p                                        ${D}${PTEST_PATH}/po
         mkdir -p                                        ${D}${PTEST_PATH}/misc
+        mkdir -p                                        ${D}${PTEST_PATH}/its
+        mkdir -p                                        ${D}${PTEST_PATH}/styles
+        cp -rf ${S}/gettext-tools/its/*                 ${D}${PTEST_PATH}/its
+        cp -rf ${S}/gettext-tools/styles/*              ${D}${PTEST_PATH}/styles
         cp -rf ${S}/gettext-tools/tests/*               ${D}${PTEST_PATH}/tests
         cp -rf ${B}/gettext-tools/tests/.libs/*         ${D}${PTEST_PATH}/tests
         cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8*         ${D}${libdir}/
         cp -rf ${B}/gettext-tools/tests/Makefile        ${D}${PTEST_PATH}/tests
+        cp -rf ${B}/gettext-tools/tests/init-env        ${D}${PTEST_PATH}/tests
         sed -i '/^Makefile:/c Makefile:'                ${D}${PTEST_PATH}/tests/Makefile
-        sed -i -e 's:CONFIG_SHELL=.*:& LOCALE_FR='fr_FR.iso88591' LOCALE_FR_UTF8='fr_FR.utf8' LOCALE_JA='ja_JP.eucjp':g' \
-            -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile
+        sed -i -e 's:lang-c lang-c++:lang-c++:g'        ${D}${PTEST_PATH}/tests/Makefile
         install ${S}/gettext-tools/src/msgunfmt.tcl     ${D}${PTEST_PATH}/src
         install ${S}/gettext-tools/src/project-id       ${D}${PTEST_PATH}/src
         install ${B}/gettext-runtime/src/gettext.sh     ${D}${PTEST_PATH}/src
@@ -177,8 +185,19 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = "\
     glibc-gconv-koi8-r \
     glibc-gconv-iso8859-2 \
     glibc-charmap-iso-8859-2 \
+    glibc-gconv-iso8859-1 \
+    glibc-charmap-iso-8859-1 \
     glibc-gconv-euc-kr \
     glibc-charmap-euc-kr \
+    glibc-gconv-euc-jp \
+    glibc-charmap-euc-jp \
+    locale-base-de-de \
+    locale-base-fr-fr \
+"
+
+RRECOMMENDS_${PN}-ptest_append_libc-glibc = "\
+    locale-base-de-de.iso-8859-1 \
+    locale-base-fr-fr.iso-8859-1 \
 "
 
 INSANE_SKIP_${PN}-ptest += "ldflags"
-- 
2.17.1



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

* ✗ patchtest: failure for "oe-selftest: extend virgl gtk ..." and 13 more
  2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
                   ` (12 preceding siblings ...)
  2019-11-27 16:40 ` [PATCH 14/14] gettext: fix failing ptests Alexander Kanavin
@ 2019-11-27 17:02 ` Patchwork
  13 siblings, 0 replies; 29+ messages in thread
From: Patchwork @ 2019-11-27 17:02 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

== Series Details ==

Series: "oe-selftest: extend virgl gtk ..." and 13 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/21385/
State : failure

== Summary ==


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



* Patch            [13/14] flex: update to 2.6.4
 Issue             Missing or incorrectly formatted CVE tag in included patch file [test_cve_tag_format] 
  Suggested fix    Correct or include the CVE tag on cve patch with format: "CVE: CVE-YYYY-XXXX"

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



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

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



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

* Re: [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13
  2019-11-27 16:40 ` [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13 Alexander Kanavin
@ 2019-11-27 20:25   ` akuster808
  2019-11-28 11:26     ` Alexander Kanavin
  0 siblings, 1 reply; 29+ messages in thread
From: akuster808 @ 2019-11-27 20:25 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core



On 11/27/19 8:40 AM, Alexander Kanavin wrote:
> 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
> upstream.
>
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>  .../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%)
>
> diff --git a/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch b/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
> deleted file mode 100644
> index 2fed99e1bba..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001
> -From: Mark Andrews <marka@isc.org>
> -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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
> index 871bb2a5f6c..9d31b980807 100644
> --- a/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
> +++ b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
> @@ -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 <hongxu.jia@windriver.com>
>  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 <hongxu.jia@windriver.com>
> +
>  ---
> - 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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch b/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
> deleted file mode 100644
> index 48ae125f845..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From ec2d50da8d81814640e28593d912f4b96c7efece Mon Sep 17 00:00:00 2001
> -From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
> -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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch b/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
> deleted file mode 100644
> index a8d601dcaa7..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -Upstream-Status: Pending
> -
> -Subject: gen.c: extend DIRNAMESIZE from 256 to 512
> -
> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ----
> - 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;
> diff --git a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch b/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
> deleted file mode 100644
> index 01874a44076..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -From 5bc3167a8b714ec0c4a3f1c7f3b9411296ec0a23 Mon Sep 17 00:00:00 2001
> -From: Robert Yang <liezhi.yang@windriver.com>
> -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 <liezhi.yang@windriver.com>
> ----
> - 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;
> diff --git a/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch b/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
> deleted file mode 100644
> index ca4e8b1a662..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From 719f604e3fad5b7479bd14e2fa0ef4413f0a8fdc Mon Sep 17 00:00:00 2001
> -From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
> -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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch b/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
> deleted file mode 100644
> index 032cfb8c442..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From 366b4e1ede8aed690e981e07137cb1cb77879c36 Mon Sep 17 00:00:00 2001
> -From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <michal@isc.org>
> -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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch b/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
> deleted file mode 100644
> index 034ab13303b..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From 2ab8a085b3c666f28f1f9229bd6ecb59915b26c3 Mon Sep 17 00:00:00 2001
> -From: Evan Hunt <each@isc.org>
> -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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch b/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
> deleted file mode 100644
> index 987e75bc0ee..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From c47ccf630f147378568b33e8fdb7b754f228c346 Mon Sep 17 00:00:00 2001
> -From: Evan Hunt <each@isc.org>
> -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, &quota);
> -+	} else {
> -+		result = isc_quota_attach(&ns_g_server->tcpquota, &quota);
> -+	}
> -+	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(&quota->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(&quota->lock);
> -+		quota->used++;
> -+		UNLOCK(&quota->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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch b/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
> deleted file mode 100644
> index 3821d185012..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From 59434b987e8eb436b08c24e559ee094c4e939daa Mon Sep 17 00:00:00 2001
> -From: Evan Hunt <each@isc.org>
> -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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch b/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
> deleted file mode 100644
> index 1a84eca58a7..00000000000
> --- a/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From ef49780d30d3ddc5735cfc32561b678a634fa72f Mon Sep 17 00:00:00 2001
> -From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org>
> -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
> -
> diff --git a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
> index 37e210e6da9..84559e5f378 100644
> --- a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
> +++ b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
> @@ -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 <paul.gortmaker@windriver.com>
>  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 <paul.gortmaker@windriver.com>
> +
>  ---
> - 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)
> diff --git a/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb b/meta/recipes-connectivity/bind/bind_9.11.13.bb
> similarity index 86%
> rename from meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
> rename to meta/recipes-connectivity/bind/bind_9.11.13.bb
> index 0897706346b..338d6c717a6 100644
> --- a/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
> +++ b/meta/recipes-connectivity/bind/bind_9.11.13.bb
> @@ -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



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

* Re: [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13
  2019-11-27 20:25   ` akuster808
@ 2019-11-28 11:26     ` Alexander Kanavin
  0 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-28 11:26 UTC (permalink / raw)
  To: akuster808; +Cc: OE-core

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

On Wed, 27 Nov 2019 at 21:25, akuster808 <akuster808@gmail.com> wrote:

>
>
> On 11/27/19 8:40 AM, Alexander Kanavin wrote:
> > 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?
>

I don't think so, there are some new features as well:
https://downloads.isc.org/isc/bind9/9.11.13/RELEASE-NOTES-bind-9.11.13.html

Alex




> -armin
> > upstream.
> >
> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > ---
> >  .../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%)
> >
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
> b/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
> > deleted file mode 100644
> > index 2fed99e1bba..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0001-bind-fix-CVE-2019-6471.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From 3a9c7bb80d4a609b86427406d9dd783199920b5b Mon Sep 17 00:00:00 2001
> > -From: Mark Andrews <marka@isc.org>
> > -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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
> b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
> > index 871bb2a5f6c..9d31b980807 100644
> > ---
> a/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
> > +++
> b/meta/recipes-connectivity/bind/bind/0001-configure.in-remove-useless-L-use_openssl-lib.patch
> > @@ -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 <hongxu.jia@windriver.com>
> >  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 <hongxu.jia@windriver.com>
> > +
> >  ---
> > - 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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
> b/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
> > deleted file mode 100644
> > index 48ae125f845..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0001-fix-enforcement-of-tcp-clients-v1.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From ec2d50da8d81814640e28593d912f4b96c7efece Mon Sep 17 00:00:00 2001
> > -From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
> > -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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
> b/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
> > deleted file mode 100644
> > index a8d601dcaa7..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch
> > +++ /dev/null
> > @@ -1,22 +0,0 @@
> > -Upstream-Status: Pending
> > -
> > -Subject: gen.c: extend DIRNAMESIZE from 256 to 512
> > -
> > -Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> > ----
> > - 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;
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
> b/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
> > deleted file mode 100644
> > index 01874a44076..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0001-lib-dns-gen.c-fix-too-long-error.patch
> > +++ /dev/null
> > @@ -1,31 +0,0 @@
> > -From 5bc3167a8b714ec0c4a3f1c7f3b9411296ec0a23 Mon Sep 17 00:00:00 2001
> > -From: Robert Yang <liezhi.yang@windriver.com>
> > -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 <liezhi.yang@windriver.com>
> > ----
> > - 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;
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
> b/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
> > deleted file mode 100644
> > index ca4e8b1a662..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0002-tcp-clients-could-still-be-exceeded-v2.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From 719f604e3fad5b7479bd14e2fa0ef4413f0a8fdc Mon Sep 17 00:00:00 2001
> > -From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
> > -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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
> b/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
> > deleted file mode 100644
> > index 032cfb8c442..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0003-use-reference-counter-for-pipeline-groups-v3.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From 366b4e1ede8aed690e981e07137cb1cb77879c36 Mon Sep 17 00:00:00 2001
> > -From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <michal@isc.org>
> > -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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
> b/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
> > deleted file mode 100644
> > index 034ab13303b..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0004-better-tcpquota-accounting-and-client-mortality-chec.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From 2ab8a085b3c666f28f1f9229bd6ecb59915b26c3 Mon Sep 17 00:00:00 2001
> > -From: Evan Hunt <each@isc.org>
> > -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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
> b/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
> > deleted file mode 100644
> > index 987e75bc0ee..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From c47ccf630f147378568b33e8fdb7b754f228c346 Mon Sep 17 00:00:00 2001
> > -From: Evan Hunt <each@isc.org>
> > -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, &quota);
> > -+    } else {
> > -+            result = isc_quota_attach(&ns_g_server->tcpquota, &quota);
> > -+    }
> > -+    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(&quota->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(&quota->lock);
> > -+            quota->used++;
> > -+            UNLOCK(&quota->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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
> b/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
> > deleted file mode 100644
> > index 3821d185012..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0006-restore-allowance-for-tcp-clients-interfaces.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From 59434b987e8eb436b08c24e559ee094c4e939daa Mon Sep 17 00:00:00 2001
> > -From: Evan Hunt <each@isc.org>
> > -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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
> b/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
> > deleted file mode 100644
> > index 1a84eca58a7..00000000000
> > ---
> a/meta/recipes-connectivity/bind/bind/0007-Replace-atomic-operations-in-bin-named-client.c-with.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From ef49780d30d3ddc5735cfc32561b678a634fa72f Mon Sep 17 00:00:00 2001
> > -From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org>
> > -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
> > -
> > diff --git
> a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
> b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
> > index 37e210e6da9..84559e5f378 100644
> > ---
> a/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
> > +++
> b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch
> > @@ -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 <paul.gortmaker@windriver.com>
> >  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 <paul.gortmaker@windriver.com>
> > +
> >  ---
> > - 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)
> > diff --git a/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
> b/meta/recipes-connectivity/bind/bind_9.11.13.bb
> > similarity index 86%
> > rename from meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
> > rename to meta/recipes-connectivity/bind/bind_9.11.13.bb
> > index 0897706346b..338d6c717a6 100644
> > --- a/meta/recipes-connectivity/bind/bind_9.11.5-P4.bb
> > +++ b/meta/recipes-connectivity/bind/bind_9.11.13.bb
> > @@ -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
>
>

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

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

* Re: [PATCH 13/14] flex: update to 2.6.4
  2019-11-27 16:40 ` [PATCH 13/14] flex: update to 2.6.4 Alexander Kanavin
@ 2019-11-28 15:14   ` akuster808
  2019-11-28 15:26     ` Khem Raj
  0 siblings, 1 reply; 29+ messages in thread
From: akuster808 @ 2019-11-28 15:14 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core



On 11/27/19 8:40 AM, Alexander Kanavin wrote:
> Add a backport patch that addresses segfaults on newer glibc versions.
>
> Remove:
> CVE-2016-6354.patch (backport)
> 0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch (issue fixed upstream)

This cause AB build failure

https://errors.yoctoproject.org/Errors/Details/288799/


>
> ptest pass rate is 100%.
>
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>  ...SE_SYSTEM_EXTENSIONS-in-configure.ac.patch | 32 ++++++++++
>  ...-comments-in-c-code-fails-with-gcc-6.patch | 64 -------------------
>  .../flex/flex/CVE-2016-6354.patch             | 59 -----------------
>  .../flex/flex/do_not_create_pdf_doc.patch     | 17 -----
>  meta/recipes-devtools/flex/flex/run-ptest     |  2 +-
>  .../flex/{flex_2.6.0.bb => flex_2.6.4.bb}     | 10 ++-
>  6 files changed, 37 insertions(+), 147 deletions(-)
>  create mode 100644 meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
>  delete mode 100644 meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
>  delete mode 100644 meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
>  delete mode 100644 meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
>  rename meta/recipes-devtools/flex/{flex_2.6.0.bb => flex_2.6.4.bb} (86%)
>
> diff --git a/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
> new file mode 100644
> index 00000000000..60bf7ce8cfd
> --- /dev/null
> +++ b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
> @@ -0,0 +1,32 @@
> +From ed1f7e9de0d6a1d5a9e581e02a63593d22cf1e52 Mon Sep 17 00:00:00 2001
> +From: Explorer09 <explorer09@gmail.com>
> +Date: Mon, 4 Sep 2017 10:47:33 +0800
> +Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac.
> +
> +This would, e.g. define _GNU_SOURCE in config.h, enabling the
> +reallocarray() prototype in glibc 2.26+ on Linux systems with that
> +version of glibc.
> +
> +Fixes #241.
> +
> +Upstream-Status: Backport
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + configure.ac | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 55e774b..c879fe1 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -25,8 +25,10 @@
> + # autoconf requirements and initialization
> + 
> + AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])
> ++AC_PREREQ([2.60])
> + AC_CONFIG_SRCDIR([src/scan.l])
> + AC_CONFIG_AUX_DIR([build-aux])
> ++AC_USE_SYSTEM_EXTENSIONS
> + LT_INIT
> + AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects])
> + AC_CONFIG_HEADER([src/config.h])
> diff --git a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> deleted file mode 100644
> index 438ca5f5276..00000000000
> --- a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> +++ /dev/null
> @@ -1,64 +0,0 @@
> -From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
> -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
> -Date: Tue, 30 Aug 2016 14:25:32 +0200
> -Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -fixes:
> -
> -| error: C++ style comments are not allowed in ISO C90
> -| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
> -
> -Upstream-Status: Pending
> -
> -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ----
> - src/flex.skl | 2 +-
> - src/scan.c   | 2 +-
> - src/skel.c   | 2 +-
> - 3 files changed, 3 insertions(+), 3 deletions(-)
> -
> -diff --git a/src/flex.skl b/src/flex.skl
> -index 73a0b9e..ed71627 100644
> ---- a/src/flex.skl
> -+++ b/src/flex.skl
> -@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
> - 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
> - 		 * immediate realloc on the next call.
> -          */
> --		num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
> -+		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
> - 		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
> - 								(num_to_alloc * sizeof(struct yy_buffer_state*)
> - 								M4_YY_CALL_LAST_ARG);
> -diff --git a/src/scan.c b/src/scan.c
> -index b55df2d..f1dce75 100644
> ---- a/src/scan.c
> -+++ b/src/scan.c
> -@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
> - 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
> - 		 * immediate realloc on the next call.
> -          */
> --		num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
> -+		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/
> - 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
> - 								(num_to_alloc * sizeof(struct yy_buffer_state*)
> - 								);
> -diff --git a/src/skel.c b/src/skel.c
> -index ef657d3..26cc889 100644
> ---- a/src/skel.c
> -+++ b/src/skel.c
> -@@ -2561,7 +2561,7 @@ const char *skel[] = {
> -   "		 * scanner will even need a stack. We use 2 instead of 1 to avoid an",
> -   "		 * immediate realloc on the next call.",
> -   "         */",
> --  "		num_to_alloc = 1; // After all that talk, this was set to 1 anyways...",
> -+  "		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */",
> -   "		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
> -   "								(num_to_alloc * sizeof(struct yy_buffer_state*)",
> -   "								M4_YY_CALL_LAST_ARG);",
> --- 
> -2.5.5
> -
> diff --git a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch b/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
> deleted file mode 100644
> index 216ac7ae1c4..00000000000
> --- a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
> +++ /dev/null
> @@ -1,59 +0,0 @@
> -From 3939eccdff598f47e5b37b05d58bf1b44d3796e7 Mon Sep 17 00:00:00 2001
> -From: Jussi Kukkonen <jussi.kukkonen@intel.com>
> -Date: Fri, 7 Oct 2016 14:15:38 +0300
> -Subject: [PATCH] Prevent buffer overflow in yy_get_next_buffer
> -
> -This is upstream commit a5cbe929ac3255d371e698f62dc256afe7006466
> -with some additional backporting to make binutils build again.
> -
> -Upstream-Status: Backport
> -CVE: CVE-2016-6354
> -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> ----
> - src/flex.skl | 2 +-
> - src/scan.c   | 2 +-
> - src/skel.c   | 2 +-
> - 3 files changed, 3 insertions(+), 3 deletions(-)
> -
> -diff --git a/src/flex.skl b/src/flex.skl
> -index ed71627..814d562 100644
> ---- a/src/flex.skl
> -+++ b/src/flex.skl
> -@@ -1718,7 +1718,7 @@ int yyFlexLexer::yy_get_next_buffer()
> - 
> - 	else
> - 		{
> --			yy_size_t num_to_read =
> -+			int num_to_read =
> - 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
> - 
> - 		while ( num_to_read <= 0 )
> -diff --git a/src/scan.c b/src/scan.c
> -index f1dce75..1949872 100644
> ---- a/src/scan.c
> -+++ b/src/scan.c
> -@@ -4181,7 +4181,7 @@ static int yy_get_next_buffer (void)
> - 
> - 	else
> - 		{
> --			yy_size_t num_to_read =
> -+			int num_to_read =
> - 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
> - 
> - 		while ( num_to_read <= 0 )
> -diff --git a/src/skel.c b/src/skel.c
> -index 26cc889..0344d18 100644
> ---- a/src/skel.c
> -+++ b/src/skel.c
> -@@ -1929,7 +1929,7 @@ const char *skel[] = {
> -   "",
> -   "	else",
> -   "		{",
> --  "			yy_size_t num_to_read =",
> -+  "			int num_to_read =",
> -   "			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;",
> -   "",
> -   "		while ( num_to_read <= 0 )",
> --- 
> -2.1.4
> -
> diff --git a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
> deleted file mode 100644
> index 29792efee87..00000000000
> --- a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -Upstream-Status: Inappropriate (embedded specific)
> -
> -Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> -
> -Index: flex-2.6.0/doc/Makefile.am
> -===================================================================
> ---- flex-2.6.0.orig/doc/Makefile.am
> -+++ flex-2.6.0/doc/Makefile.am
> -@@ -2,7 +2,7 @@ help2man = @HELP2MAN@
> - 
> - info_TEXINFOS =	flex.texi
> - dist_man_MANS = flex.1
> --dist_doc_DATA= flex.pdf
> -+EXTRA_DIST= flex.pdf
> - 
> - CLEANFILES = \
> - 	flex.aux \
> diff --git a/meta/recipes-devtools/flex/flex/run-ptest b/meta/recipes-devtools/flex/flex/run-ptest
> index 19db3379002..037301c40fa 100755
> --- a/meta/recipes-devtools/flex/flex/run-ptest
> +++ b/meta/recipes-devtools/flex/flex/run-ptest
> @@ -2,4 +2,4 @@
>  
>  # make would want to rebuild some files with a compiler otherwise :-/
>  make FLEX=/usr/bin/flex -t check-TESTS || true
> -make FLEX=/usr/bin/flex check-TESTS
> +make FLEX=/usr/bin/flex abs_builddir=./ check-TESTS
> diff --git a/meta/recipes-devtools/flex/flex_2.6.0.bb b/meta/recipes-devtools/flex/flex_2.6.4.bb
> similarity index 86%
> rename from meta/recipes-devtools/flex/flex_2.6.0.bb
> rename to meta/recipes-devtools/flex/flex_2.6.4.bb
> index 9bdd99c59f8..347018df1b7 100644
> --- a/meta/recipes-devtools/flex/flex_2.6.0.bb
> +++ b/meta/recipes-devtools/flex/flex_2.6.4.bb
> @@ -10,17 +10,15 @@ BBCLASSEXTEND = "native nativesdk"
>  
>  LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
>  
> -SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
> +SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.tar.gz \
>             file://run-ptest \
> -           file://do_not_create_pdf_doc.patch \
>             file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
> -           file://0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch \
> -           file://CVE-2016-6354.patch \
>             ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
> +           file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
>             "
>  
> -SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59"
> -SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9"
> +SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"
> +SRC_URI[sha256sum] = "e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995"
>  
>  # Flex has moved to github from 2.6.1 onwards
>  UPSTREAM_CHECK_URI = "https://github.com/westes/flex/releases"



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

* Re: [PATCH 08/14] gettext: update to 0.20.1
  2019-11-27 16:39 ` [PATCH 08/14] gettext: " Alexander Kanavin
@ 2019-11-28 15:18   ` akuster808
  2019-11-28 17:47     ` Alexander Kanavin
  0 siblings, 1 reply; 29+ messages in thread
From: akuster808 @ 2019-11-28 15:18 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core



On 11/27/19 8:39 AM, Alexander Kanavin wrote:
> License-Update: URLs changed from http to https
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>

This failed on the AB

https://errors.yoctoproject.org/Errors/Details/288797/

an for meta-mingw bbappend.

https://errors.yoctoproject.org/Errors/Details/284185/

> ---
>  .../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%)
>
> diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
> deleted file mode 100644
> index 6dfe200d654..00000000000
> --- a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
> +++ /dev/null
> @@ -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 <kai.kang@windriver.com>
> -
> -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
> -From: Daiki Ueno <ueno@gnu.org>
> -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
> -
> diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
> deleted file mode 100644
> index c8e2c94af0e..00000000000
> --- a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
> +++ /dev/null
> @@ -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 <jslater@windriver.com>
> -
> ---- 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
> - 
> diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
> deleted file mode 100644
> index 6156a153f74..00000000000
> --- a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
> +++ /dev/null
> @@ -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 <ross.burton@intel.com>
> -
> -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>
> diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch b/meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch
> similarity index 100%
> rename from meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch
> rename to meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch
> diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> similarity index 68%
> rename from meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> rename to meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> index 6af16041987..0561ed7d32c 100644
> --- a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> +++ b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> @@ -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 <liezhi.yang@windriver.com>
>  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 <liezhi.yang@windriver.com>
> +
>  ---
> - 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
> -
> diff --git a/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
> new file mode 100644
> index 00000000000..d96a376b7d1
> --- /dev/null
> +++ b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
> @@ -0,0 +1,32 @@
> +From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001
> +From: Joe Slater <jslater@windriver.com>
> +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 <jslater@windriver.com>
> +
> +---
> + 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
> diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest b/meta/recipes-core/gettext/gettext-0.20.1/run-ptest
> 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.patch b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
> similarity index 75%
> rename from meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
> rename to meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
> index 31ff9138a91..93f7c03334a 100644
> --- a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
> +++ b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
> @@ -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" <hongjun.yang@windriver.com>
>  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 <changqing.li@windriver.com>
> +
>  ---
>   configure.ac                 | 2 +-
>   gettext-runtime/configure.ac | 2 +-
> @@ -15,24 +16,24 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
>   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],
> - 	[bug-gnu-gettext@gnu.org])
> +@@ -22,7 +22,7 @@ AC_INIT([gettext],
> + 	[bug-gettext@gnu.org])
>   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],
> - 	[bug-gnu-gettext@gnu.org])
> + 	[bug-gettext@gnu.org])
>   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],
> - 	[bug-gnu-gettext@gnu.org])
> + 	[bug-gettext@gnu.org])
>   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
> -
> diff --git a/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
> new file mode 100644
> index 00000000000..d1b2603779b
> --- /dev/null
> +++ b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
> @@ -0,0 +1,713 @@
> +From ef414b06be80c6f605731abc9e674e396b80ec9e Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@intel.com>
> +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 <ross.burton@intel.com>
> +
> +---
> + 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"
> diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.20.1.bb
> 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
> index 30121ad23e1..fc05ef2e0a3 100644
> --- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
> +++ b/meta/recipes-core/gettext/gettext_0.20.1.bb
> @@ -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/"
>  
>  }
>  



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

* Re: [PATCH 02/14] rpm: upgrade to 4.15.1
  2019-11-27 16:39 ` [PATCH 02/14] rpm: upgrade to 4.15.1 Alexander Kanavin
@ 2019-11-28 15:22   ` akuster808
  2019-11-28 17:27     ` Alexander Kanavin
  0 siblings, 1 reply; 29+ messages in thread
From: akuster808 @ 2019-11-28 15:22 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core



On 11/27/19 8:39 AM, Alexander Kanavin wrote:
> Drop patches that were merged upstream.
>
> 0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
> modifies a file that was removed upstream.
>
> Add a 0001-rpmfc.c-do-not-run-file-classification-in-parallel.patch
> as unfortunately the new parallel file classification feature from
> upstream trips over somewhere in libmagic when inspected files are
> compressed:
> https://github.com/rpm-software-management/rpm/issues/756

Failed on ab selftest

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



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

* Re: [PATCH 13/14] flex: update to 2.6.4
  2019-11-28 15:14   ` akuster808
@ 2019-11-28 15:26     ` Khem Raj
  2019-11-28 15:53       ` Alexander Kanavin
  0 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2019-11-28 15:26 UTC (permalink / raw)
  To: akuster808; +Cc: Patches and discussions about the oe-core layer

On Thu, Nov 28, 2019 at 7:15 AM akuster808 <akuster808@gmail.com> wrote:
>
>
>
> On 11/27/19 8:40 AM, Alexander Kanavin wrote:
> > Add a backport patch that addresses segfaults on newer glibc versions.
> >
> > Remove:
> > CVE-2016-6354.patch (backport)
> > 0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch (issue fixed upstream)
>
> This cause AB build failure
>
> https://errors.yoctoproject.org/Errors/Details/288799/
>

mostly due to configure time confusion of detecting reallocarray since
the host is debian9 which
should be running glibc 2.24 which is older than when reallocarray was
introduced but actually
nativesdk package would use nativesdk-glibc that OE builds, one option
to explore is can be disable
use of this function. what do we lose if we do

>
> >
> > ptest pass rate is 100%.
> >
> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > ---
> >  ...SE_SYSTEM_EXTENSIONS-in-configure.ac.patch | 32 ++++++++++
> >  ...-comments-in-c-code-fails-with-gcc-6.patch | 64 -------------------
> >  .../flex/flex/CVE-2016-6354.patch             | 59 -----------------
> >  .../flex/flex/do_not_create_pdf_doc.patch     | 17 -----
> >  meta/recipes-devtools/flex/flex/run-ptest     |  2 +-
> >  .../flex/{flex_2.6.0.bb => flex_2.6.4.bb}     | 10 ++-
> >  6 files changed, 37 insertions(+), 147 deletions(-)
> >  create mode 100644 meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
> >  delete mode 100644 meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> >  delete mode 100644 meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
> >  delete mode 100644 meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
> >  rename meta/recipes-devtools/flex/{flex_2.6.0.bb => flex_2.6.4.bb} (86%)
> >
> > diff --git a/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
> > new file mode 100644
> > index 00000000000..60bf7ce8cfd
> > --- /dev/null
> > +++ b/meta/recipes-devtools/flex/flex/0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch
> > @@ -0,0 +1,32 @@
> > +From ed1f7e9de0d6a1d5a9e581e02a63593d22cf1e52 Mon Sep 17 00:00:00 2001
> > +From: Explorer09 <explorer09@gmail.com>
> > +Date: Mon, 4 Sep 2017 10:47:33 +0800
> > +Subject: [PATCH] build: AC_USE_SYSTEM_EXTENSIONS in configure.ac.
> > +
> > +This would, e.g. define _GNU_SOURCE in config.h, enabling the
> > +reallocarray() prototype in glibc 2.26+ on Linux systems with that
> > +version of glibc.
> > +
> > +Fixes #241.
> > +
> > +Upstream-Status: Backport
> > +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > +---
> > + configure.ac | 2 ++
> > + 1 file changed, 2 insertions(+)
> > +
> > +diff --git a/configure.ac b/configure.ac
> > +index 55e774b..c879fe1 100644
> > +--- a/configure.ac
> > ++++ b/configure.ac
> > +@@ -25,8 +25,10 @@
> > + # autoconf requirements and initialization
> > +
> > + AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])
> > ++AC_PREREQ([2.60])
> > + AC_CONFIG_SRCDIR([src/scan.l])
> > + AC_CONFIG_AUX_DIR([build-aux])
> > ++AC_USE_SYSTEM_EXTENSIONS
> > + LT_INIT
> > + AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects])
> > + AC_CONFIG_HEADER([src/config.h])
> > diff --git a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> > deleted file mode 100644
> > index 438ca5f5276..00000000000
> > --- a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> > +++ /dev/null
> > @@ -1,64 +0,0 @@
> > -From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
> > -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
> > -Date: Tue, 30 Aug 2016 14:25:32 +0200
> > -Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
> > -MIME-Version: 1.0
> > -Content-Type: text/plain; charset=UTF-8
> > -Content-Transfer-Encoding: 8bit
> > -
> > -fixes:
> > -
> > -| error: C++ style comments are not allowed in ISO C90
> > -| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
> > -
> > -Upstream-Status: Pending
> > -
> > -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> > ----
> > - src/flex.skl | 2 +-
> > - src/scan.c   | 2 +-
> > - src/skel.c   | 2 +-
> > - 3 files changed, 3 insertions(+), 3 deletions(-)
> > -
> > -diff --git a/src/flex.skl b/src/flex.skl
> > -index 73a0b9e..ed71627 100644
> > ---- a/src/flex.skl
> > -+++ b/src/flex.skl
> > -@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
> > -              * scanner will even need a stack. We use 2 instead of 1 to avoid an
> > -              * immediate realloc on the next call.
> > -          */
> > --            num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
> > -+            num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
> > -             YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
> > -                                                             (num_to_alloc * sizeof(struct yy_buffer_state*)
> > -                                                             M4_YY_CALL_LAST_ARG);
> > -diff --git a/src/scan.c b/src/scan.c
> > -index b55df2d..f1dce75 100644
> > ---- a/src/scan.c
> > -+++ b/src/scan.c
> > -@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
> > -              * scanner will even need a stack. We use 2 instead of 1 to avoid an
> > -              * immediate realloc on the next call.
> > -          */
> > --            num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
> > -+            num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/
> > -             (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
> > -                                                             (num_to_alloc * sizeof(struct yy_buffer_state*)
> > -                                                             );
> > -diff --git a/src/skel.c b/src/skel.c
> > -index ef657d3..26cc889 100644
> > ---- a/src/skel.c
> > -+++ b/src/skel.c
> > -@@ -2561,7 +2561,7 @@ const char *skel[] = {
> > -   "          * scanner will even need a stack. We use 2 instead of 1 to avoid an",
> > -   "          * immediate realloc on the next call.",
> > -   "         */",
> > --  "         num_to_alloc = 1; // After all that talk, this was set to 1 anyways...",
> > -+  "         num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */",
> > -   "         YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
> > -   "                                                         (num_to_alloc * sizeof(struct yy_buffer_state*)",
> > -   "                                                         M4_YY_CALL_LAST_ARG);",
> > ---
> > -2.5.5
> > -
> > diff --git a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch b/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
> > deleted file mode 100644
> > index 216ac7ae1c4..00000000000
> > --- a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
> > +++ /dev/null
> > @@ -1,59 +0,0 @@
> > -From 3939eccdff598f47e5b37b05d58bf1b44d3796e7 Mon Sep 17 00:00:00 2001
> > -From: Jussi Kukkonen <jussi.kukkonen@intel.com>
> > -Date: Fri, 7 Oct 2016 14:15:38 +0300
> > -Subject: [PATCH] Prevent buffer overflow in yy_get_next_buffer
> > -
> > -This is upstream commit a5cbe929ac3255d371e698f62dc256afe7006466
> > -with some additional backporting to make binutils build again.
> > -
> > -Upstream-Status: Backport
> > -CVE: CVE-2016-6354
> > -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> > ----
> > - src/flex.skl | 2 +-
> > - src/scan.c   | 2 +-
> > - src/skel.c   | 2 +-
> > - 3 files changed, 3 insertions(+), 3 deletions(-)
> > -
> > -diff --git a/src/flex.skl b/src/flex.skl
> > -index ed71627..814d562 100644
> > ---- a/src/flex.skl
> > -+++ b/src/flex.skl
> > -@@ -1718,7 +1718,7 @@ int yyFlexLexer::yy_get_next_buffer()
> > -
> > -     else
> > -             {
> > --                    yy_size_t num_to_read =
> > -+                    int num_to_read =
> > -                     YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
> > -
> > -             while ( num_to_read <= 0 )
> > -diff --git a/src/scan.c b/src/scan.c
> > -index f1dce75..1949872 100644
> > ---- a/src/scan.c
> > -+++ b/src/scan.c
> > -@@ -4181,7 +4181,7 @@ static int yy_get_next_buffer (void)
> > -
> > -     else
> > -             {
> > --                    yy_size_t num_to_read =
> > -+                    int num_to_read =
> > -                     YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
> > -
> > -             while ( num_to_read <= 0 )
> > -diff --git a/src/skel.c b/src/skel.c
> > -index 26cc889..0344d18 100644
> > ---- a/src/skel.c
> > -+++ b/src/skel.c
> > -@@ -1929,7 +1929,7 @@ const char *skel[] = {
> > -   "",
> > -   " else",
> > -   "         {",
> > --  "                 yy_size_t num_to_read =",
> > -+  "                 int num_to_read =",
> > -   "                 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;",
> > -   "",
> > -   "         while ( num_to_read <= 0 )",
> > ---
> > -2.1.4
> > -
> > diff --git a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
> > deleted file mode 100644
> > index 29792efee87..00000000000
> > --- a/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
> > +++ /dev/null
> > @@ -1,17 +0,0 @@
> > -Upstream-Status: Inappropriate (embedded specific)
> > -
> > -Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> > -
> > -Index: flex-2.6.0/doc/Makefile.am
> > -===================================================================
> > ---- flex-2.6.0.orig/doc/Makefile.am
> > -+++ flex-2.6.0/doc/Makefile.am
> > -@@ -2,7 +2,7 @@ help2man = @HELP2MAN@
> > -
> > - info_TEXINFOS =     flex.texi
> > - dist_man_MANS = flex.1
> > --dist_doc_DATA= flex.pdf
> > -+EXTRA_DIST= flex.pdf
> > -
> > - CLEANFILES = \
> > -     flex.aux \
> > diff --git a/meta/recipes-devtools/flex/flex/run-ptest b/meta/recipes-devtools/flex/flex/run-ptest
> > index 19db3379002..037301c40fa 100755
> > --- a/meta/recipes-devtools/flex/flex/run-ptest
> > +++ b/meta/recipes-devtools/flex/flex/run-ptest
> > @@ -2,4 +2,4 @@
> >
> >  # make would want to rebuild some files with a compiler otherwise :-/
> >  make FLEX=/usr/bin/flex -t check-TESTS || true
> > -make FLEX=/usr/bin/flex check-TESTS
> > +make FLEX=/usr/bin/flex abs_builddir=./ check-TESTS
> > diff --git a/meta/recipes-devtools/flex/flex_2.6.0.bb b/meta/recipes-devtools/flex/flex_2.6.4.bb
> > similarity index 86%
> > rename from meta/recipes-devtools/flex/flex_2.6.0.bb
> > rename to meta/recipes-devtools/flex/flex_2.6.4.bb
> > index 9bdd99c59f8..347018df1b7 100644
> > --- a/meta/recipes-devtools/flex/flex_2.6.0.bb
> > +++ b/meta/recipes-devtools/flex/flex_2.6.4.bb
> > @@ -10,17 +10,15 @@ BBCLASSEXTEND = "native nativesdk"
> >
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
> >
> > -SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
> > +SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.tar.gz \
> >             file://run-ptest \
> > -           file://do_not_create_pdf_doc.patch \
> >             file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
> > -           file://0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch \
> > -           file://CVE-2016-6354.patch \
> >             ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
> > +           file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
> >             "
> >
> > -SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59"
> > -SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9"
> > +SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"
> > +SRC_URI[sha256sum] = "e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995"
> >
> >  # Flex has moved to github from 2.6.1 onwards
> >  UPSTREAM_CHECK_URI = "https://github.com/westes/flex/releases"
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 13/14] flex: update to 2.6.4
  2019-11-28 15:26     ` Khem Raj
@ 2019-11-28 15:53       ` Alexander Kanavin
  0 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-28 15:53 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

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

On Thu, 28 Nov 2019 at 16:27, Khem Raj <raj.khem@gmail.com> wrote:

> mostly due to configure time confusion of detecting reallocarray since
> the host is debian9 which
> should be running glibc 2.24 which is older than when reallocarray was
> introduced but actually
> nativesdk package would use nativesdk-glibc that OE builds, one option
> to explore is can be disable
> use of this function. what do we lose if we do
>

It's slightly trickier, target flex builds a native binary (for the purpose
of running it during build), and that's where reallocarray detection breaks
down, because it was detected with a target compiler!

flex remains fully functional if it's disabled, so that's what I'll do.

Alex

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

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

* Re: [PATCH 02/14] rpm: upgrade to 4.15.1
  2019-11-28 15:22   ` akuster808
@ 2019-11-28 17:27     ` Alexander Kanavin
  0 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-28 17:27 UTC (permalink / raw)
  To: akuster808; +Cc: OE-core

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

I believe RP has a patch queued in master-next for this.

Alex

On Thu, 28 Nov 2019 at 16:22, akuster808 <akuster808@gmail.com> wrote:

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

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

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

* Re: [PATCH 08/14] gettext: update to 0.20.1
  2019-11-28 15:18   ` akuster808
@ 2019-11-28 17:47     ` Alexander Kanavin
  0 siblings, 0 replies; 29+ messages in thread
From: Alexander Kanavin @ 2019-11-28 17:47 UTC (permalink / raw)
  To: akuster808; +Cc: OE-core

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

On Thu, 28 Nov 2019 at 16:19, akuster808 <akuster808@gmail.com> wrote:

>
>
> On 11/27/19 8:39 AM, Alexander Kanavin wrote:
> > License-Update: URLs changed from http to https
> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>
> This failed on the AB
>
> https://errors.yoctoproject.org/Errors/Details/288797/
>

Weird this didn't fail locally for my world builds, I queued a patch to fix
this.



> an for meta-mingw bbappend.
>
> https://errors.yoctoproject.org/Errors/Details/284185/
>

Patch sent.


> > ---
> >  .../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%)
> >
> > diff --git
> a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
> b/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
> > deleted file mode 100644
> > index 6dfe200d654..00000000000
> > --- a/meta/recipes-core/gettext/gettext-0.19.8.1/fix-CVE-2018-18751.patch
> > +++ /dev/null
> > @@ -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 <kai.kang@windriver.com>
> > -
> > -From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
> > -From: Daiki Ueno <ueno@gnu.org>
> > -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
> > -
> > diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
> b/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
> > deleted file mode 100644
> > index c8e2c94af0e..00000000000
> > --- a/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
> > +++ /dev/null
> > @@ -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 <jslater@windriver.com>
> > -
> > ---- 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
> > -
> > diff --git
> a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
> b/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
> > deleted file mode 100644
> > index 6156a153f74..00000000000
> > --- a/meta/recipes-core/gettext/gettext-0.19.8.1/use-pkgconfig.patch
> > +++ /dev/null
> > @@ -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 <ross.burton@intel.com>
> > -
> > -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>
> > diff --git
> a/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch
> b/meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch
> > similarity index 100%
> > rename from
> meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch
> > rename to
> meta/recipes-core/gettext/gettext-0.20.1/add-with-bisonlocaledir.patch
> > diff --git
> a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> > similarity index 68%
> > rename from
> meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> > rename to
> meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> > index 6af16041987..0561ed7d32c 100644
> > ---
> a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> > +++
> b/meta/recipes-core/gettext/gettext-0.20.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
> > @@ -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 <liezhi.yang@windriver.com>
> >  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 <liezhi.yang@windriver.com>
> > +
> >  ---
> > - 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
> > -
> > diff --git a/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
> b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
> > new file mode 100644
> > index 00000000000..d96a376b7d1
> > --- /dev/null
> > +++ b/meta/recipes-core/gettext/gettext-0.20.1/parallel.patch
> > @@ -0,0 +1,32 @@
> > +From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001
> > +From: Joe Slater <jslater@windriver.com>
> > +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 <jslater@windriver.com>
> > +
> > +---
> > + 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
> > diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest
> b/meta/recipes-core/gettext/gettext-0.20.1/run-ptest
> > 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.patch
> b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
> > similarity index 75%
> > rename from
> meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
> > rename to
> meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
> > index 31ff9138a91..93f7c03334a 100644
> > ---
> a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch
> > +++ b/meta/recipes-core/gettext/gettext-0.20.1/serial-tests-config.patch
> > @@ -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" <hongjun.yang@windriver.com>
> >  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 <changqing.li@windriver.com>
> > +
> >  ---
> >   configure.ac                 | 2 +-
> >   gettext-runtime/configure.ac | 2 +-
> > @@ -15,24 +16,24 @@ Signed-off-by: Changqing Li <
> changqing.li@windriver.com>
> >   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],
> > -     [bug-gnu-gettext@gnu.org])
> > +@@ -22,7 +22,7 @@ AC_INIT([gettext],
> > +     [bug-gettext@gnu.org])
> >   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],
> > -     [bug-gnu-gettext@gnu.org])
> > +     [bug-gettext@gnu.org])
> >   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],
> > -     [bug-gnu-gettext@gnu.org])
> > +     [bug-gettext@gnu.org])
> >   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
> > -
> > diff --git
> a/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
> b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
> > new file mode 100644
> > index 00000000000..d1b2603779b
> > --- /dev/null
> > +++ b/meta/recipes-core/gettext/gettext-0.20.1/use-pkgconfig.patch
> > @@ -0,0 +1,713 @@
> > +From ef414b06be80c6f605731abc9e674e396b80ec9e Mon Sep 17 00:00:00 2001
> > +From: Ross Burton <ross.burton@intel.com>
> > +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 <ross.burton@intel.com>
> > +
> > +---
> > + 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"
> > diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
> b/meta/recipes-core/gettext/gettext_0.20.1.bb
> > 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
> > index 30121ad23e1..fc05ef2e0a3 100644
> > --- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
> > +++ b/meta/recipes-core/gettext/gettext_0.20.1.bb
> > @@ -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/"
> >
> >  }
> >
>
>

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

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

* Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
  2019-11-27 16:39 ` [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES Alexander Kanavin
@ 2020-01-02 10:17   ` Kang Kai
  2020-01-02 18:06     ` Alexander Kanavin
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2020-01-02 10:17 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

On 2019/11/28 上午12:39, Alexander Kanavin wrote:
> rpm 4.15 no longer allows it, which makes sense.
>
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>

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


> ---
>   meta/recipes-core/meta/dummy-sdk-package.inc | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc b/meta/recipes-core/meta/dummy-sdk-package.inc
> index 4d653706b13..58b0482eca5 100644
> --- a/meta/recipes-core/meta/dummy-sdk-package.inc
> +++ b/meta/recipes-core/meta/dummy-sdk-package.inc
> @@ -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}")
>   }
>   


-- 
Kai Kang



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

* Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
  2020-01-02 10:17   ` Kang Kai
@ 2020-01-02 18:06     ` Alexander Kanavin
  2020-01-03  0:48       ` Kang Kai
  0 siblings, 1 reply; 29+ messages in thread
From: Alexander Kanavin @ 2020-01-02 18:06 UTC (permalink / raw)
  To: Kang Kai; +Cc: OE-core

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

On Thu, 2 Jan 2020 at 11:18, Kang Kai <Kai.Kang@windriver.com> 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 <alex.kanavin@gmail.com>
>
> 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_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 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/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

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

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

* Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
  2020-01-02 18:06     ` Alexander Kanavin
@ 2020-01-03  0:48       ` Kang Kai
  2020-01-06 11:34         ` Alexander Kanavin
  0 siblings, 1 reply; 29+ messages in thread
From: Kang Kai @ 2020-01-03  0:48 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

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

On 2020/1/3 上午2:06, Alexander Kanavin wrote:
> On Thu, 2 Jan 2020 at 11:18, Kang Kai <Kai.Kang@windriver.com 
> <mailto:Kai.Kang@windriver.com>> 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 <alex.kanavin@gmail.com
>     <mailto:alex.kanavin@gmail.com>>
>
>     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_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 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/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.


Thanks for your detailed reply. I'll try to figure a way out.

Regards,
Kai

>
>
> Alex


-- 
Kai Kang


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

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

* Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
  2020-01-03  0:48       ` Kang Kai
@ 2020-01-06 11:34         ` Alexander Kanavin
  2020-01-09  2:23           ` Kang Kai
  0 siblings, 1 reply; 29+ messages in thread
From: Alexander Kanavin @ 2020-01-06 11:34 UTC (permalink / raw)
  To: Kang Kai; +Cc: OE-core

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

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

On Fri, 3 Jan 2020 at 01:49, Kang Kai <Kai.Kang@windriver.com> wrote:

> On 2020/1/3 上午2:06, Alexander Kanavin wrote:
>
> On Thu, 2 Jan 2020 at 11:18, Kang Kai <Kai.Kang@windriver.com> 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 <alex.kanavin@gmail.com>
>>
>> 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_PACKAGES needing 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/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.
>
>
> Thanks for your detailed reply. I'll try to figure a way out.
>
> Regards,
> Kai
>
>
>
> Alex
>
>
> --
> Kai Kang
>
>

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

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

* Re: [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES
  2020-01-06 11:34         ` Alexander Kanavin
@ 2020-01-09  2:23           ` Kang Kai
  0 siblings, 0 replies; 29+ messages in thread
From: Kang Kai @ 2020-01-09  2:23 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

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

On 2020/1/6 下午7:34, Alexander Kanavin wrote:
> 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


>
> Alex
>
> On Fri, 3 Jan 2020 at 01:49, Kang Kai <Kai.Kang@windriver.com 
> <mailto:Kai.Kang@windriver.com>> wrote:
>
>     On 2020/1/3 上午2:06, Alexander Kanavin wrote:
>>     On Thu, 2 Jan 2020 at 11:18, Kang Kai <Kai.Kang@windriver.com
>>     <mailto:Kai.Kang@windriver.com>> 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 <alex.kanavin@gmail.com
>>         <mailto:alex.kanavin@gmail.com>>
>>
>>         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_PACKAGES needing 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/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.
>
>
>     Thanks for your detailed reply. I'll try to figure a way out.
>
>     Regards,
>     Kai
>
>>
>>
>>     Alex
>
>
>     -- 
>     Kai Kang
>

-- 
Kai Kang


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

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

end of thread, other threads:[~2020-01-09  2:23 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 16:39 [PATCH 01/14] oe-selftest: extend virgl gtk test to also check the SDL option Alexander Kanavin
2019-11-27 16:39 ` [PATCH 02/14] rpm: upgrade to 4.15.1 Alexander Kanavin
2019-11-28 15:22   ` akuster808
2019-11-28 17:27     ` Alexander Kanavin
2019-11-27 16:39 ` [PATCH 03/14] libdnf: upgrade 0.28.1 -> 0.38.1 Alexander Kanavin
2019-11-27 16:39 ` [PATCH 04/14] dnf: upgrade 4.2.2 -> 4.2.16 Alexander Kanavin
2019-11-27 16:39 ` [PATCH 05/14] rpm: fix spelling in one of the patches' Upstream-Status Alexander Kanavin
2019-11-27 16:39 ` [PATCH 06/14] dummy-sdk-package.inc: do not include files into RREPLACES Alexander Kanavin
2020-01-02 10:17   ` Kang Kai
2020-01-02 18:06     ` Alexander Kanavin
2020-01-03  0:48       ` Kang Kai
2020-01-06 11:34         ` Alexander Kanavin
2020-01-09  2:23           ` Kang Kai
2019-11-27 16:39 ` [PATCH 07/14] gettext-minimal-native: update to 0.20.1 Alexander Kanavin
2019-11-27 16:39 ` [PATCH 08/14] gettext: " Alexander Kanavin
2019-11-28 15:18   ` akuster808
2019-11-28 17:47     ` Alexander Kanavin
2019-11-27 16:39 ` [PATCH 09/14] lrzsz: fix issues with newer versions of gettext Alexander Kanavin
2019-11-27 16:39 ` [PATCH 10/14] p11-kit: convert to meson Alexander Kanavin
2019-11-27 16:40 ` [PATCH 11/14] sed: upgrade to 4.7 Alexander Kanavin
2019-11-27 16:40 ` [PATCH 12/14] bind: update 9.11.5-P4 -> 9.11.13 Alexander Kanavin
2019-11-27 20:25   ` akuster808
2019-11-28 11:26     ` Alexander Kanavin
2019-11-27 16:40 ` [PATCH 13/14] flex: update to 2.6.4 Alexander Kanavin
2019-11-28 15:14   ` akuster808
2019-11-28 15:26     ` Khem Raj
2019-11-28 15:53       ` Alexander Kanavin
2019-11-27 16:40 ` [PATCH 14/14] gettext: fix failing ptests Alexander Kanavin
2019-11-27 17:02 ` ✗ patchtest: failure for "oe-selftest: extend virgl gtk ..." and 13 more Patchwork

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