All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/26] meson: update 0.58.1 -> 0.59.1
@ 2021-09-08 18:01 Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 02/26] libcap: update 2.51 -> 2.54 Alexander Kanavin
                   ` (26 more replies)
  0 siblings, 27 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Drop 0003-native_bindir.patch: it doesn't seem to actually define
anything where the use_native parameter is set to true.

Also, the issue should be solved without invasive, custom patching
of the code: via meson.cross, custom .pc files for the items in
question or some other configuration mechanism.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-devtools/meson/meson.inc         |  4 +-
 .../0001-Make-CPU-family-warnings-fatal.patch | 20 ++--
 .../meson/meson/0003-native_bindir.patch      | 94 -------------------
 .../meson/meson/gi-target-dep.patch           | 41 --------
 .../{meson_0.58.1.bb => meson_0.59.1.bb}      |  0
 ...on_0.58.1.bb => nativesdk-meson_0.59.1.bb} |  0
 6 files changed, 10 insertions(+), 149 deletions(-)
 delete mode 100644 meta/recipes-devtools/meson/meson/0003-native_bindir.patch
 delete mode 100644 meta/recipes-devtools/meson/meson/gi-target-dep.patch
 rename meta/recipes-devtools/meson/{meson_0.58.1.bb => meson_0.59.1.bb} (100%)
 rename meta/recipes-devtools/meson/{nativesdk-meson_0.58.1.bb => nativesdk-meson_0.59.1.bb} (100%)

diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index f1746d2094..c83ea406f0 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -9,15 +9,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
 SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz \
            file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
-           file://0003-native_bindir.patch \
            file://0001-python-module-do-not-manipulate-the-environment-when.patch \
            file://disable-rpath-handling.patch \
            file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
-           file://gi-target-dep.patch \
            file://0001-Make-CPU-family-warnings-fatal.patch \
            file://0002-Support-building-allarch-recipes-again.patch \
            "
-SRC_URI[sha256sum] = "3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d"
+SRC_URI[sha256sum] = "db586a451650d46bbe10984a87b79d9bcdc1caebf38d8e189f8848f8d502356d"
 
 UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
 UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
index bcccfabd17..c5be526b10 100644
--- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
+++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
@@ -1,20 +1,21 @@
-From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
+From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Tue, 3 Jul 2018 13:59:09 +0100
-Subject: [PATCH 1/2] Make CPU family warnings fatal
+Subject: [PATCH] Make CPU family warnings fatal
 
 Upstream-Status: Inappropriate [OE specific]
 Signed-off-by: Ross Burton <ross.burton@intel.com>
+
 ---
  mesonbuild/envconfig.py   | 2 +-
  mesonbuild/environment.py | 4 +---
  2 files changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index c6a4df3..4d58c91 100644
+index 307aac3..66fb7ec 100644
 --- a/mesonbuild/envconfig.py
 +++ b/mesonbuild/envconfig.py
-@@ -266,7 +266,7 @@ class MachineInfo:
+@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
  
          cpu_family = literal['cpu_family']
          if cpu_family not in known_cpu_families:
@@ -24,20 +25,17 @@ index c6a4df3..4d58c91 100644
          endian = literal['endian']
          if endian not in ('little', 'big'):
 diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index fc9b703..eea8345 100644
+index 71286a5..179917e 100644
 --- a/mesonbuild/environment.py
 +++ b/mesonbuild/environment.py
-@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
+@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
              trial = 'ppc64'
  
      if trial not in known_cpu_families:
--        mlog.warning('Unknown CPU family {!r}, please report this at '
+-        mlog.warning(f'Unknown CPU family {trial!r}, please report this at '
 -                     'https://github.com/mesonbuild/meson/issues/new with the '
--                     'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial))
+-                     'output of `uname -a` and `cat /proc/cpuinfo`')
 +        raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)
  
      return trial
  
--- 
-2.24.0
-
diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
deleted file mode 100644
index 89257b9e05..0000000000
--- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
-From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Date: Wed, 15 Nov 2017 15:05:01 +0100
-Subject: [PATCH] native_bindir
-
-Some libraries, like QT, have pre-processors that convert their input
-files into something that the cross-compiler can process. We find the
-path of those pre-processors via pkg-config-native instead of
-pkg-config.
-
-This path forces the use of pkg-config-native for host_bins arguments.
-
-There are some discussions upstream to merge this patch, but I presonaly believe
-that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
-
-Upstream-Status: Inappropriate [OE specific]
-Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-
----
- mesonbuild/dependencies/base.py | 19 +++++++++++--------
- 1 file changed, 11 insertions(+), 8 deletions(-)
-
-diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
-index 14380d4..d0c443f 100644
---- a/mesonbuild/dependencies/base.py
-+++ b/mesonbuild/dependencies/base.py
-@@ -179,7 +179,7 @@ class Dependency:
-     def get_exe_args(self, compiler):
-         return []
- 
--    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
-+    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
-         raise DependencyException(f'{self.name!r} is not a pkgconfig dependency')
- 
-     def get_configtool_variable(self, variable_name):
-@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
-             return True
-         return any(d.is_built() for d in self.ext_deps)
- 
--    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
-+    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
-         raise DependencyException('Method "get_pkgconfig_variable()" is '
-                                   'invalid for an internal dependency')
- 
-@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
-         return s.format(self.__class__.__name__, self.name, self.is_found,
-                         self.version_reqs)
- 
--    def _call_pkgbin_real(self, args, env):
--        cmd = self.pkgbin.get_command() + args
-+    def _call_pkgbin_real(self, args, env, use_native=False):
-+        if use_native:
-+            cmd = [self.pkgbin.get_command()[0] + "-native"] + args
-+        else:
-+            cmd = self.pkgbin.get_command() + args
-         p, out, err = Popen_safe(cmd, env=env)
-         rc, out, err = p.returncode, out.strip(), err.strip()
-         call = ' '.join(cmd)
-@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
-             if key.startswith('PKG_'):
-                 mlog.debug(f'env[{key}]: {value}')
- 
--    def _call_pkgbin(self, args, env=None):
-+    def _call_pkgbin(self, args, env=None, use_native=False):
-         # Always copy the environment since we're going to modify it
-         # with pkg-config variables
-         if env is None:
-@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
-         targs = tuple(args)
-         cache = PkgConfigDependency.pkgbin_cache
-         if (self.pkgbin, targs, fenv) not in cache:
--            cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env)
-+            cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native)
-         return cache[(self.pkgbin, targs, fenv)]
- 
-     def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
-@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
-                                       (self.name, out_raw))
-         self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
- 
--    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
-+    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
-         options = ['--variable=' + variable_name, self.name]
- 
-         if 'define_variable' in kwargs:
-@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
- 
-             options = ['--define-variable=' + '='.join(definition)] + options
- 
--        ret, out, err = self._call_pkgbin(options)
-+        ret, out, err = self._call_pkgbin(options, use_native=use_native)
-         variable = ''
-         if ret != 0:
-             if self.required:
diff --git a/meta/recipes-devtools/meson/meson/gi-target-dep.patch b/meta/recipes-devtools/meson/meson/gi-target-dep.patch
deleted file mode 100644
index 29e164ccc7..0000000000
--- a/meta/recipes-devtools/meson/meson/gi-target-dep.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-When building gobject-introspection we want the *native* binaries (as they need
-to be executed) but *host* gobject-introspection libraries, as otherwise the
-native pkg-config can be used and the build will try to link native and host
-binaries together.
-
-Upstream-Status: Backport [589236226856f591c9e8daf0cb7aa1aef8862388]
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index f9660838e..2eefc3fc7 100644
---- a/mesonbuild/modules/gnome.py
-+++ b/mesonbuild/modules/gnome.py
-@@ -84,8 +84,8 @@ class GnomeModule(ExtensionModule):
-                      mlog.bold('https://github.com/mesonbuild/meson/issues/1387'),
-                      once=True)
- 
--    def _get_native_dep(self, state, depname, required=True):
--        kwargs = {'native': True, 'required': required}
-+    def _get_dep(self, state, depname, native=False, required=True):
-+        kwargs = {'native': native, 'required': required}
-         holder = self.interpreter.func_dependency(state.current_node, [depname], kwargs)
-         return holder.held_object
- 
-@@ -101,7 +101,7 @@ class GnomeModule(ExtensionModule):
-             return ExternalProgram.from_entry(name, prog)
- 
-         # Check if pkgconfig has a variable
--        dep = self._get_native_dep(state, depname, required=False)
-+        dep = self._get_dep(state, depname, native=True, required=False)
-         if dep.found() and dep.type_name == 'pkgconfig':
-             value = dep.get_pkgconfig_variable(varname, {})
-             if value:
-@@ -481,7 +481,7 @@ class GnomeModule(ExtensionModule):
- 
-     def _get_gir_dep(self, state):
-         if not self.gir_dep:
--            self.gir_dep = self._get_native_dep(state, 'gobject-introspection-1.0')
-+            self.gir_dep = self._get_dep(state, 'gobject-introspection-1.0')
-             self.giscanner = self._get_native_binary(state, 'g-ir-scanner', 'gobject-introspection-1.0', 'g_ir_scanner')
-             self.gicompiler = self._get_native_binary(state, 'g-ir-compiler', 'gobject-introspection-1.0', 'g_ir_compiler')
-         return self.gir_dep, self.giscanner, self.gicompiler
diff --git a/meta/recipes-devtools/meson/meson_0.58.1.bb b/meta/recipes-devtools/meson/meson_0.59.1.bb
similarity index 100%
rename from meta/recipes-devtools/meson/meson_0.58.1.bb
rename to meta/recipes-devtools/meson/meson_0.59.1.bb
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
similarity index 100%
rename from meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
rename to meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
-- 
2.31.1


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

* [PATCH 02/26] libcap: update 2.51 -> 2.54
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 03/26] lua: add a recipe from meta-oe Alexander Kanavin
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Rebase patches.

Delete 0001-tests-do-not-statically-link-a-test.patch as centos
builds are now using their own buildtools.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...-tests-do-not-statically-link-a-test.patch | 52 -------------------
 ...-tests-do-not-run-target-executables.patch | 10 ++--
 .../libcap/{libcap_2.51.bb => libcap_2.54.bb} |  4 +-
 3 files changed, 7 insertions(+), 59 deletions(-)
 delete mode 100644 meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
 rename meta/recipes-support/libcap/{libcap_2.51.bb => libcap_2.54.bb} (92%)

diff --git a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch b/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
deleted file mode 100644
index 55872aa8fa..0000000000
--- a/meta/recipes-support/libcap/files/0001-tests-do-not-statically-link-a-test.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 897900f3f9084c5542097851323bba3f2691df20 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 15 Jan 2020 17:16:28 +0100
-Subject: [PATCH] tests: do not statically link a test
-
-This fails on e.g. centos 7
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- progs/Makefile | 2 +-
- tests/Makefile | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/progs/Makefile b/progs/Makefile
-index 3e82862..48533f3 100644
---- a/progs/Makefile
-+++ b/progs/Makefile
-@@ -49,7 +49,7 @@ capsh: capsh.c capshdoc.h.cf $(DEPS)
- 	$(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
- 
- tcapsh-static: capsh.c capshdoc.h.cf $(DEPS)
--	$(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) --static
-+	$(CC) $(IPATH) $(CAPSH_SHELL) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS)
- 
- uns_test: ../tests/uns_test.c
- 	$(MAKE) -C ../tests uns_test
-diff --git a/tests/Makefile b/tests/Makefile
-index 4a5f2f9..4266d86 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -22,7 +22,7 @@ ifeq ($(PTHREADS),yes)
- DEPS += ../libcap/libpsx.so
- endif
- else
--LDFLAGS += --static
-+LDFLAGS +=
- DEPS=../libcap/libcap.a
- ifeq ($(PTHREADS),yes)
- DEPS +=  ../libcap/libpsx.a
-@@ -113,7 +113,7 @@ noexploit: exploit.o $(DEPS)
- 
- # This one runs in a chroot with no shared library files.
- noop: noop.c
--	$(CC) $(CFLAGS) $< -o $@ --static
-+	$(CC) $(CFLAGS) $< -o $@
- 
- clean:
- 	rm -f psx_test libcap_psx_test libcap_launch_test uns_test *~
--- 
-2.25.1
-
diff --git a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch b/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch
index 69287152eb..0fe7295a5f 100644
--- a/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch
+++ b/meta/recipes-support/libcap/files/0002-tests-do-not-run-target-executables.patch
@@ -1,4 +1,4 @@
-From 652071e430d5eea758965176b7648e79ad404daa Mon Sep 17 00:00:00 2001
+From cc97f84469ee7b266977a20d9cfa63c52f821384 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Fri, 20 Dec 2019 16:54:05 +0100
 Subject: [PATCH] tests: do not run target executables
@@ -11,20 +11,20 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  1 file changed, 2 deletions(-)
 
 diff --git a/tests/Makefile b/tests/Makefile
-index fc39fee..3431df9 100644
+index d9ed248..2864f77 100644
 --- a/tests/Makefile
 +++ b/tests/Makefile
-@@ -59,13 +59,11 @@ endif
+@@ -63,13 +63,11 @@ endif
  
  # unprivileged
  run_psx_test: psx_test
 -	./psx_test
  
  psx_test: psx_test.c $(DEPS)
- 	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
+ 	$(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBPSXLIB) $(LDFLAGS)
  
  run_libcap_psx_test: libcap_psx_test
 -	./libcap_psx_test
  
  libcap_psx_test: libcap_psx_test.c $(DEPS)
- 	$(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
+ 	$(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LINKEXTRA) $(LIBCAPLIB) $(LIBPSXLIB) $(LDFLAGS)
diff --git a/meta/recipes-support/libcap/libcap_2.51.bb b/meta/recipes-support/libcap/libcap_2.54.bb
similarity index 92%
rename from meta/recipes-support/libcap/libcap_2.51.bb
rename to meta/recipes-support/libcap/libcap_2.54.bb
index c9c30fb05f..04362e7032 100644
--- a/meta/recipes-support/libcap/libcap_2.51.bb
+++ b/meta/recipes-support/libcap/libcap_2.54.bb
@@ -12,9 +12,8 @@ DEPENDS = "hostperl-runtime-native gperf-native"
 SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
            file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
            file://0002-tests-do-not-run-target-executables.patch \
-           file://0001-tests-do-not-statically-link-a-test.patch \
            "
-SRC_URI[sha256sum] = "6609f3ab7aebcc8f9277f53a577c657d9f3056d1352ea623da7fd7c0f00890f9"
+SRC_URI[sha256sum] = "5091b24247999fd7a5e62bd9ac8bc761cda29f9baa0d1a2ca6a46f13891b4f0f"
 
 UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
 
@@ -42,6 +41,7 @@ do_compile() {
 		AR="${AR}" \
 		CC="${CC}" \
 		RANLIB="${RANLIB}" \
+                OBJCOPY="${OBJCOPY}" \
 		COPTS="${CFLAGS}" \
 		BUILD_COPTS="${BUILD_CFLAGS}"
 }
-- 
2.31.1


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

* [PATCH 03/26] lua: add a recipe from meta-oe
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 02/26] libcap: update 2.51 -> 2.54 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-09  5:11   ` [OE-core] " Khem Raj
  2021-09-08 18:01 ` [PATCH 04/26] lua: update 5.3.6 -> 5.4.3 Alexander Kanavin
                   ` (24 subsequent siblings)
  26 siblings, 1 reply; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Lua is a hard dependency in rpm 4.17.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/conf/distro/include/maintainers.inc      |   1 +
 .../distro/include/ptest-packagelists.inc     |   1 +
 ...ilding-lua-without-readline-on-Linux.patch |  59 +++++++
 ...rriers-cannot-be-active-during-sweep.patch |  90 ++++++++++
 .../lua/lua/CVE-2020-15888.patch              |  45 +++++
 .../lua/lua/CVE-2020-15945.patch              | 167 ++++++++++++++++++
 meta/recipes-devtools/lua/lua/lua.pc.in       |  10 ++
 meta/recipes-devtools/lua/lua/run-ptest       |  19 ++
 meta/recipes-devtools/lua/lua_5.3.6.bb        |  67 +++++++
 9 files changed, 459 insertions(+)
 create mode 100644 meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
 create mode 100644 meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
 create mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
 create mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
 create mode 100644 meta/recipes-devtools/lua/lua/lua.pc.in
 create mode 100644 meta/recipes-devtools/lua/lua/run-ptest
 create mode 100644 meta/recipes-devtools/lua/lua_5.3.6.bb

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 0e8185f4e3..d9d57459cf 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -467,6 +467,7 @@ RECIPE_MAINTAINER:pn-ltp = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER:pn-lttng-modules = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-lttng-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-lttng-ust = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER:pn-lua = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER:pn-lz4 = "Denys Dmytriyenko <denis@denix.org>"
 RECIPE_MAINTAINER:pn-lzo = "Denys Dmytriyenko <denis@denix.org>"
 RECIPE_MAINTAINER:pn-lzip = "Denys Dmytriyenko <denis@denix.org>"
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index e0ae1dd971..3709998f29 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -40,6 +40,7 @@ PTESTS_FAST = "\
     libxml-sax-base-perl-ptest \
     libxml-simple-perl-ptest \
     libxml2-ptest \
+    lua-ptest \
     lzo-ptest \
     m4-ptest \
     nettle-ptest \
diff --git a/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch b/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
new file mode 100644
index 0000000000..e767900864
--- /dev/null
+++ b/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
@@ -0,0 +1,59 @@
+From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 2 Oct 2019 17:54:15 +0200
+Subject: [PATCH] Allow building lua without readline on Linux
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile      | 2 +-
+ src/Makefile  | 3 +++
+ src/luaconf.h | 5 +++++
+ 3 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 119110d..9f6df45 100644
+--- a/Makefile
++++ b/Makefile
+@@ -36,7 +36,7 @@ RM= rm -f
+ # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
+ 
+ # Convenience platforms targets.
+-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
++PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris
+ 
+ # What to install.
+ TO_BIN= lua luac
+diff --git a/src/Makefile b/src/Makefile
+index 64c78f7..5c0428a 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -109,6 +109,9 @@ generic: $(ALL)
+ linux:
+ 	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
+ 
++linux-no-readline:
++	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl"
++
+ macosx:
+ 	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
+ 
+diff --git a/src/luaconf.h b/src/luaconf.h
+index 9eeeea6..d71ca25 100644
+--- a/src/luaconf.h
++++ b/src/luaconf.h
+@@ -64,6 +64,11 @@
+ #define LUA_USE_READLINE	/* needs some extra libraries */
+ #endif
+ 
++#if defined(LUA_USE_LINUX_NO_READLINE)
++#define LUA_USE_POSIX
++#define LUA_USE_DLOPEN		/* needs an extra library: -ldl */
++#endif
++
+ 
+ #if defined(LUA_USE_MACOSX)
+ #define LUA_USE_POSIX
+-- 
+2.17.1
+
diff --git a/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch b/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
new file mode 100644
index 0000000000..a302874d76
--- /dev/null
+++ b/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
@@ -0,0 +1,90 @@
+From 1e6df25ac28dcd89f0324177bb55019422404b44 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
+Date: Thu, 3 Sep 2020 15:32:17 +0800
+Subject: [PATCH] Fixed bug: barriers cannot be active during sweep
+
+Barriers cannot be active during sweep, even in generational mode.
+(Although gen. mode is not incremental, it can hit a barrier when
+deleting a thread and closing its upvalues.)  The colors of objects are
+being changed during sweep and, therefore, cannot be trusted.
+
+Upstream-Status: Backport [https://github.com/lua/lua/commit/a6da1472c0c5e05ff249325f979531ad51533110]
+CVE: CVE-2020-24371
+
+[Adjust code KGC_INC -> KGC_NORMAL, refer 69371c4b84becac09c445aae01d005b49658ef82]
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+---
+ src/lgc.c | 33 ++++++++++++++++++++++++---------
+ 1 file changed, 24 insertions(+), 9 deletions(-)
+
+diff --git a/src/lgc.c b/src/lgc.c
+index 973c269..7af23d5 100644
+--- a/src/lgc.c
++++ b/src/lgc.c
+@@ -142,10 +142,17 @@ static int iscleared (global_State *g, const TValue *o) {
+ 
+ 
+ /*
+-** barrier that moves collector forward, that is, mark the white object
+-** being pointed by a black object. (If in sweep phase, clear the black
+-** object to white [sweep it] to avoid other barrier calls for this
+-** same object.)
++** Barrier that moves collector forward, that is, marks the white object
++** 'v' being pointed by the black object 'o'.  In the generational
++** mode, 'v' must also become old, if 'o' is old; however, it cannot
++** be changed directly to OLD, because it may still point to non-old
++** objects. So, it is marked as OLD0. In the next cycle it will become
++** OLD1, and in the next it will finally become OLD (regular old). By
++** then, any object it points to will also be old.  If called in the
++** incremental sweep phase, it clears the black object to white (sweep
++** it) to avoid other barrier calls for this same object. (That cannot
++** be done is generational mode, as its sweep does not distinguish
++** whites from deads.)
+ */
+ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
+   global_State *g = G(L);
+@@ -154,7 +161,8 @@ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
+     reallymarkobject(g, v);  /* restore invariant */
+   else {  /* sweep phase */
+     lua_assert(issweepphase(g));
+-    makewhite(g, o);  /* mark main obj. as white to avoid other barriers */
++    if (g->gckind == KGC_NORMAL)  /* incremental mode? */
++      makewhite(g, o);  /* mark 'o' as white to avoid other barriers */
+   }
+ }
+ 
+@@ -299,10 +307,15 @@ static void markbeingfnz (global_State *g) {
+ 
+ 
+ /*
+-** Mark all values stored in marked open upvalues from non-marked threads.
+-** (Values from marked threads were already marked when traversing the
+-** thread.) Remove from the list threads that no longer have upvalues and
+-** not-marked threads.
++** For each non-marked thread, simulates a barrier between each open
++** upvalue and its value. (If the thread is collected, the value will be
++** assigned to the upvalue, but then it can be too late for the barrier
++** to act. The "barrier" does not need to check colors: A non-marked
++** thread must be young; upvalues cannot be older than their threads; so
++** any visited upvalue must be young too.) Also removes the thread from
++** the list, as it was already visited. Removes also threads with no
++** upvalues, as they have nothing to be checked. (If the thread gets an
++** upvalue later, it will be linked in the list again.)
+ */
+ static void remarkupvals (global_State *g) {
+   lua_State *thread;
+@@ -313,9 +326,11 @@ static void remarkupvals (global_State *g) {
+       p = &thread->twups;  /* keep marked thread with upvalues in the list */
+     else {  /* thread is not marked or without upvalues */
+       UpVal *uv;
++      lua_assert(!isold(thread) || thread->openupval == NULL);
+       *p = thread->twups;  /* remove thread from the list */
+       thread->twups = thread;  /* mark that it is out of list */
+       for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) {
++        lua_assert(getage(uv) <= getage(thread));
+         if (uv->u.open.touched) {
+           markvalue(g, uv->v);  /* remark upvalue's value */
+           uv->u.open.touched = 0;
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
new file mode 100644
index 0000000000..60a4125971
--- /dev/null
+++ b/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
@@ -0,0 +1,45 @@
+From 6298903e35217ab69c279056f925fb72900ce0b7 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
+Date: Mon, 6 Jul 2020 12:11:54 -0300
+Subject: [PATCH] Keep minimum size when shrinking a stack
+
+When shrinking a stack (during GC), do not make it smaller than the
+initial stack size.
+---
+ ldo.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+==== end of original header ====
+
+CVE: CVE-2020-15888
+
+Upstream-Status: backport [https://github.com/lua/lua.git]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+====
+diff --git a/ldo.c b/ldo.c
+index c563b1d9..a89ac010 100644
+--- a/src/ldo.c
++++ b/src/ldo.c
+@@ -220,7 +220,7 @@ static int stackinuse (lua_State *L) {
+ 
+ void luaD_shrinkstack (lua_State *L) {
+   int inuse = stackinuse(L);
+-  int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;
++  int goodsize = inuse + BASIC_STACK_SIZE;
+   if (goodsize > LUAI_MAXSTACK)
+     goodsize = LUAI_MAXSTACK;  /* respect stack limit */
+   if (L->stacksize > LUAI_MAXSTACK)  /* had been handling stack overflow? */
+@@ -229,8 +229,7 @@ void luaD_shrinkstack (lua_State *L) {
+     luaE_shrinkCI(L);  /* shrink list */
+   /* if thread is currently not handling a stack overflow and its
+      good size is smaller than current size, shrink its stack */
+-  if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&
+-      goodsize < L->stacksize)
++  if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize)
+     luaD_reallocstack(L, goodsize);
+   else  /* don't change stack */
+     condmovestack(L,{},{});  /* (change only for debugging) */
+-- 
+2.17.1
+
diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
new file mode 100644
index 0000000000..89ce491487
--- /dev/null
+++ b/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
@@ -0,0 +1,167 @@
+From d8d344365945a534f700c82c5dd26f704f89fef3 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
+Date: Wed, 5 Aug 2020 16:59:58 +0800
+Subject: [PATCH] Fixed bug: invalid 'oldpc' when returning to a function
+
+The field 'L->oldpc' is not always updated when control returns to a
+function; an invalid value can seg. fault when computing 'changedline'.
+(One example is an error in a finalizer; control can return to
+'luaV_execute' without executing 'luaD_poscall'.) Instead of trying to
+fix all possible corner cases, it seems safer to be resilient to invalid
+values for 'oldpc'. Valid but wrong values at most cause an extra call
+to a line hook.
+
+CVE: CVE-2020-15945
+
+[Adjust the code to be applicable to the tree]
+
+Upstream-Status: Backport [https://github.com/lua/lua/commit/a2195644d89812e5b157ce7bac35543e06db05e3]
+
+Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
+Signed-off-by: Joe Slater <joe.slater@@windriver.com>
+
+---
+ src/ldebug.c | 30 +++++++++++++++---------------
+ src/ldebug.h |  4 ++++
+ src/ldo.c    |  2 +-
+ src/lstate.c |  1 +
+ src/lstate.h |  2 +-
+ 5 files changed, 22 insertions(+), 17 deletions(-)
+
+diff --git a/src/ldebug.c b/src/ldebug.c
+index 239affb..832b16c 100644
+--- a/src/ldebug.c
++++ b/src/ldebug.c
+@@ -34,9 +34,8 @@
+ #define noLuaClosure(f)		((f) == NULL || (f)->c.tt == LUA_TCCL)
+ 
+ 
+-/* Active Lua function (given call info) */
+-#define ci_func(ci)		(clLvalue((ci)->func))
+-
++/* inverse of 'pcRel' */
++#define invpcRel(pc, p)                ((p)->code + (pc) + 1)
+ 
+ static const char *funcnamefromcode (lua_State *L, CallInfo *ci,
+                                     const char **name);
+@@ -71,20 +70,18 @@ static void swapextra (lua_State *L) {
+ 
+ /*
+ ** This function can be called asynchronously (e.g. during a signal).
+-** Fields 'oldpc', 'basehookcount', and 'hookcount' (set by
+-** 'resethookcount') are for debug only, and it is no problem if they
+-** get arbitrary values (causes at most one wrong hook call). 'hookmask'
+-** is an atomic value. We assume that pointers are atomic too (e.g., gcc
+-** ensures that for all platforms where it runs). Moreover, 'hook' is
+-** always checked before being called (see 'luaD_hook').
++** Fields 'basehookcount' and 'hookcount' (set by 'resethookcount')
++** are for debug only, and it is no problem if they get arbitrary
++** values (causes at most one wrong hook call). 'hookmask' is an atomic
++** value. We assume that pointers are atomic too (e.g., gcc ensures that
++** for all platforms where it runs). Moreover, 'hook' is always checked
++** before being called (see 'luaD_hook').
+ */
+ LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
+   if (func == NULL || mask == 0) {  /* turn off hooks? */
+     mask = 0;
+     func = NULL;
+   }
+-  if (isLua(L->ci))
+-    L->oldpc = L->ci->u.l.savedpc;
+   L->hook = func;
+   L->basehookcount = count;
+   resethookcount(L);
+@@ -665,7 +662,10 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
+ void luaG_traceexec (lua_State *L) {
+   CallInfo *ci = L->ci;
+   lu_byte mask = L->hookmask;
++  const Proto *p = ci_func(ci)->p;
+   int counthook = (--L->hookcount == 0 && (mask & LUA_MASKCOUNT));
++  /* 'L->oldpc' may be invalid; reset it in this case */
++  int oldpc = (L->oldpc < p->sizecode) ? L->oldpc : 0;
+   if (counthook)
+     resethookcount(L);  /* reset count */
+   else if (!(mask & LUA_MASKLINE))
+@@ -677,15 +677,15 @@ void luaG_traceexec (lua_State *L) {
+   if (counthook)
+     luaD_hook(L, LUA_HOOKCOUNT, -1);  /* call count hook */
+   if (mask & LUA_MASKLINE) {
+-    Proto *p = ci_func(ci)->p;
+     int npc = pcRel(ci->u.l.savedpc, p);
+     int newline = getfuncline(p, npc);
+     if (npc == 0 ||  /* call linehook when enter a new function, */
+-        ci->u.l.savedpc <= L->oldpc ||  /* when jump back (loop), or when */
+-        newline != getfuncline(p, pcRel(L->oldpc, p)))  /* enter a new line */
++        ci->u.l.savedpc <= invpcRel(oldpc, p) ||  /* when jump back (loop), or when */
++        newline != getfuncline(p, oldpc))  /* enter a new line */
+       luaD_hook(L, LUA_HOOKLINE, newline);  /* call line hook */
++
++    L->oldpc = npc;  /* 'pc' of last call to line hook */
+   }
+-  L->oldpc = ci->u.l.savedpc;
+   if (L->status == LUA_YIELD) {  /* did hook yield? */
+     if (counthook)
+       L->hookcount = 1;  /* undo decrement to zero */
+diff --git a/src/ldebug.h b/src/ldebug.h
+index 0e31546..c224cc4 100644
+--- a/src/ldebug.h
++++ b/src/ldebug.h
+@@ -13,6 +13,10 @@
+ 
+ #define pcRel(pc, p)	(cast(int, (pc) - (p)->code) - 1)
+ 
++/* Active Lua function (given call info) */
++#define ci_func(ci)            (clLvalue((ci)->func))
++
++
+ #define getfuncline(f,pc)	(((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
+ 
+ #define resethookcount(L)	(L->hookcount = L->basehookcount)
+diff --git a/src/ldo.c b/src/ldo.c
+index 90b695f..f66ac1a 100644
+--- a/src/ldo.c
++++ b/src/ldo.c
+@@ -382,7 +382,7 @@ int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) {
+       luaD_hook(L, LUA_HOOKRET, -1);
+       firstResult = restorestack(L, fr);
+     }
+-    L->oldpc = ci->previous->u.l.savedpc;  /* 'oldpc' for caller function */
++    L->oldpc = pcRel(ci->u.l.savedpc, ci_func(ci)->p);  /* 'oldpc' for caller function */
+   }
+   res = ci->func;  /* res == final position of 1st result */
+   L->ci = ci->previous;  /* back to caller */
+diff --git a/src/lstate.c b/src/lstate.c
+index 9194ac3..3573e36 100644
+--- a/src/lstate.c
++++ b/src/lstate.c
+@@ -236,6 +236,7 @@ static void preinit_thread (lua_State *L, global_State *g) {
+   L->nny = 1;
+   L->status = LUA_OK;
+   L->errfunc = 0;
++  L->oldpc = 0;
+ }
+ 
+ 
+diff --git a/src/lstate.h b/src/lstate.h
+index a469466..d75eadf 100644
+--- a/src/lstate.h
++++ b/src/lstate.h
+@@ -164,7 +164,6 @@ struct lua_State {
+   StkId top;  /* first free slot in the stack */
+   global_State *l_G;
+   CallInfo *ci;  /* call info for current function */
+-  const Instruction *oldpc;  /* last pc traced */
+   StkId stack_last;  /* last free slot in the stack */
+   StkId stack;  /* stack base */
+   UpVal *openupval;  /* list of open upvalues in this stack */
+@@ -174,6 +173,7 @@ struct lua_State {
+   CallInfo base_ci;  /* CallInfo for first level (C calling Lua) */
+   volatile lua_Hook hook;
+   ptrdiff_t errfunc;  /* current error handling function (stack index) */
++  int oldpc;  /* last pc traced */
+   int stacksize;
+   int basehookcount;
+   int hookcount;
+-- 
+2.13.3
+
diff --git a/meta/recipes-devtools/lua/lua/lua.pc.in b/meta/recipes-devtools/lua/lua/lua.pc.in
new file mode 100644
index 0000000000..c27e86e85d
--- /dev/null
+++ b/meta/recipes-devtools/lua/lua/lua.pc.in
@@ -0,0 +1,10 @@
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: Lua language engine
+Version: @VERSION@
+Requires:
+Libs: -L${libdir} -llua -lm -ldl
+Cflags: -I${includedir}
diff --git a/meta/recipes-devtools/lua/lua/run-ptest b/meta/recipes-devtools/lua/lua/run-ptest
new file mode 100644
index 0000000000..8e085e1af9
--- /dev/null
+++ b/meta/recipes-devtools/lua/lua/run-ptest
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+cd test
+lua -e"_U=true" all.lua > lua-test.tmp
+
+echo "--- test output ---"
+cat lua-test.tmp
+echo ""
+echo ""
+echo "--- ptest result ---"
+
+grep "final OK \!\!\!" lua-test.tmp > /dev/null
+if [ $? -eq 0 ]; then
+   echo "PASS: lua"
+else
+   echo "FAIL: lua"
+fi
+
+rm -f lua-test.tmp
diff --git a/meta/recipes-devtools/lua/lua_5.3.6.bb b/meta/recipes-devtools/lua/lua_5.3.6.bb
new file mode 100644
index 0000000000..f830e09259
--- /dev/null
+++ b/meta/recipes-devtools/lua/lua_5.3.6.bb
@@ -0,0 +1,67 @@
+DESCRIPTION = "Lua is a powerful light-weight programming language designed \
+for extending applications."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=f43d8ee6bc4df18ef8b276439cc4a153"
+HOMEPAGE = "http://www.lua.org/"
+
+SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
+           file://lua.pc.in \
+           file://0001-Allow-building-lua-without-readline-on-Linux.patch \
+           file://CVE-2020-15888.patch \
+           file://CVE-2020-15945.patch \
+           file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
+           "
+
+# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
+PV_testsuites = "5.3.4"
+
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
+           'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \
+            file://run-ptest \
+           ', '', d)}"
+
+SRC_URI[tarballsrc.md5sum] = "83f23dbd5230140a3770d5f54076948d"
+SRC_URI[tarballsrc.sha256sum] = "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60"
+SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3"
+SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f"
+
+inherit pkgconfig binconfig ptest
+
+PACKAGECONFIG ??= "readline"
+PACKAGECONFIG[readline] = ",,readline"
+
+TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
+EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'"
+
+do_configure:prepend() {
+    sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
+    sed -i -e s:lib/lua/:${baselib}/lua/:g src/luaconf.h
+}
+
+do_compile () {
+    oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)}
+}
+
+do_install () {
+    oe_runmake \
+        'INSTALL_TOP=${D}${prefix}' \
+        'INSTALL_BIN=${D}${bindir}' \
+        'INSTALL_INC=${D}${includedir}/' \
+        'INSTALL_MAN=${D}${mandir}/man1' \
+        'INSTALL_SHARE=${D}${datadir}/lua' \
+        'INSTALL_LIB=${D}${libdir}' \
+        'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
+        install
+    install -d ${D}${libdir}/pkgconfig
+
+    sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
+    install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
+    rmdir ${D}${datadir}/lua/5.3
+    rmdir ${D}${datadir}/lua
+}
+
+do_install_ptest () {
+        cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV_testsuites}-tests ${D}${PTEST_PATH}/test
+}
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.31.1


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

* [PATCH 04/26] lua: update 5.3.6 -> 5.4.3
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 02/26] libcap: update 2.51 -> 2.54 Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 03/26] lua: add a recipe from meta-oe Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 05/26] rpm: update 4.16.1.3 -> 4.17.0 Alexander Kanavin
                   ` (23 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Drop three backports and 0001-Allow-building-lua-without-readline-on-Linux.patch
(feature added upstream, adjust the recipe accordingly).

Adjust ar/ranlib flags for reproducibility on liblua.a.

License-Update: lines moved around, formatting
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...ilding-lua-without-readline-on-Linux.patch |  59 -------
 ...rriers-cannot-be-active-during-sweep.patch |  90 ----------
 .../lua/lua/CVE-2020-15888.patch              |  45 -----
 .../lua/lua/CVE-2020-15945.patch              | 167 ------------------
 .../lua/{lua_5.3.6.bb => lua_5.4.3.bb}        |  31 ++--
 5 files changed, 13 insertions(+), 379 deletions(-)
 delete mode 100644 meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
 delete mode 100644 meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
 delete mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
 delete mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
 rename meta/recipes-devtools/lua/{lua_5.3.6.bb => lua_5.4.3.bb} (58%)

diff --git a/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch b/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
deleted file mode 100644
index e767900864..0000000000
--- a/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 2 Oct 2019 17:54:15 +0200
-Subject: [PATCH] Allow building lua without readline on Linux
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Makefile      | 2 +-
- src/Makefile  | 3 +++
- src/luaconf.h | 5 +++++
- 3 files changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 119110d..9f6df45 100644
---- a/Makefile
-+++ b/Makefile
-@@ -36,7 +36,7 @@ RM= rm -f
- # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
- 
- # Convenience platforms targets.
--PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
-+PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris
- 
- # What to install.
- TO_BIN= lua luac
-diff --git a/src/Makefile b/src/Makefile
-index 64c78f7..5c0428a 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -109,6 +109,9 @@ generic: $(ALL)
- linux:
- 	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
- 
-+linux-no-readline:
-+	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl"
-+
- macosx:
- 	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
- 
-diff --git a/src/luaconf.h b/src/luaconf.h
-index 9eeeea6..d71ca25 100644
---- a/src/luaconf.h
-+++ b/src/luaconf.h
-@@ -64,6 +64,11 @@
- #define LUA_USE_READLINE	/* needs some extra libraries */
- #endif
- 
-+#if defined(LUA_USE_LINUX_NO_READLINE)
-+#define LUA_USE_POSIX
-+#define LUA_USE_DLOPEN		/* needs an extra library: -ldl */
-+#endif
-+
- 
- #if defined(LUA_USE_MACOSX)
- #define LUA_USE_POSIX
--- 
-2.17.1
-
diff --git a/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch b/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
deleted file mode 100644
index a302874d76..0000000000
--- a/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 1e6df25ac28dcd89f0324177bb55019422404b44 Mon Sep 17 00:00:00 2001
-From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
-Date: Thu, 3 Sep 2020 15:32:17 +0800
-Subject: [PATCH] Fixed bug: barriers cannot be active during sweep
-
-Barriers cannot be active during sweep, even in generational mode.
-(Although gen. mode is not incremental, it can hit a barrier when
-deleting a thread and closing its upvalues.)  The colors of objects are
-being changed during sweep and, therefore, cannot be trusted.
-
-Upstream-Status: Backport [https://github.com/lua/lua/commit/a6da1472c0c5e05ff249325f979531ad51533110]
-CVE: CVE-2020-24371
-
-[Adjust code KGC_INC -> KGC_NORMAL, refer 69371c4b84becac09c445aae01d005b49658ef82]
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
----
- src/lgc.c | 33 ++++++++++++++++++++++++---------
- 1 file changed, 24 insertions(+), 9 deletions(-)
-
-diff --git a/src/lgc.c b/src/lgc.c
-index 973c269..7af23d5 100644
---- a/src/lgc.c
-+++ b/src/lgc.c
-@@ -142,10 +142,17 @@ static int iscleared (global_State *g, const TValue *o) {
- 
- 
- /*
--** barrier that moves collector forward, that is, mark the white object
--** being pointed by a black object. (If in sweep phase, clear the black
--** object to white [sweep it] to avoid other barrier calls for this
--** same object.)
-+** Barrier that moves collector forward, that is, marks the white object
-+** 'v' being pointed by the black object 'o'.  In the generational
-+** mode, 'v' must also become old, if 'o' is old; however, it cannot
-+** be changed directly to OLD, because it may still point to non-old
-+** objects. So, it is marked as OLD0. In the next cycle it will become
-+** OLD1, and in the next it will finally become OLD (regular old). By
-+** then, any object it points to will also be old.  If called in the
-+** incremental sweep phase, it clears the black object to white (sweep
-+** it) to avoid other barrier calls for this same object. (That cannot
-+** be done is generational mode, as its sweep does not distinguish
-+** whites from deads.)
- */
- void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
-   global_State *g = G(L);
-@@ -154,7 +161,8 @@ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
-     reallymarkobject(g, v);  /* restore invariant */
-   else {  /* sweep phase */
-     lua_assert(issweepphase(g));
--    makewhite(g, o);  /* mark main obj. as white to avoid other barriers */
-+    if (g->gckind == KGC_NORMAL)  /* incremental mode? */
-+      makewhite(g, o);  /* mark 'o' as white to avoid other barriers */
-   }
- }
- 
-@@ -299,10 +307,15 @@ static void markbeingfnz (global_State *g) {
- 
- 
- /*
--** Mark all values stored in marked open upvalues from non-marked threads.
--** (Values from marked threads were already marked when traversing the
--** thread.) Remove from the list threads that no longer have upvalues and
--** not-marked threads.
-+** For each non-marked thread, simulates a barrier between each open
-+** upvalue and its value. (If the thread is collected, the value will be
-+** assigned to the upvalue, but then it can be too late for the barrier
-+** to act. The "barrier" does not need to check colors: A non-marked
-+** thread must be young; upvalues cannot be older than their threads; so
-+** any visited upvalue must be young too.) Also removes the thread from
-+** the list, as it was already visited. Removes also threads with no
-+** upvalues, as they have nothing to be checked. (If the thread gets an
-+** upvalue later, it will be linked in the list again.)
- */
- static void remarkupvals (global_State *g) {
-   lua_State *thread;
-@@ -313,9 +326,11 @@ static void remarkupvals (global_State *g) {
-       p = &thread->twups;  /* keep marked thread with upvalues in the list */
-     else {  /* thread is not marked or without upvalues */
-       UpVal *uv;
-+      lua_assert(!isold(thread) || thread->openupval == NULL);
-       *p = thread->twups;  /* remove thread from the list */
-       thread->twups = thread;  /* mark that it is out of list */
-       for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) {
-+        lua_assert(getage(uv) <= getage(thread));
-         if (uv->u.open.touched) {
-           markvalue(g, uv->v);  /* remark upvalue's value */
-           uv->u.open.touched = 0;
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
deleted file mode 100644
index 60a4125971..0000000000
--- a/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 6298903e35217ab69c279056f925fb72900ce0b7 Mon Sep 17 00:00:00 2001
-From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
-Date: Mon, 6 Jul 2020 12:11:54 -0300
-Subject: [PATCH] Keep minimum size when shrinking a stack
-
-When shrinking a stack (during GC), do not make it smaller than the
-initial stack size.
----
- ldo.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-==== end of original header ====
-
-CVE: CVE-2020-15888
-
-Upstream-Status: backport [https://github.com/lua/lua.git]
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
-====
-diff --git a/ldo.c b/ldo.c
-index c563b1d9..a89ac010 100644
---- a/src/ldo.c
-+++ b/src/ldo.c
-@@ -220,7 +220,7 @@ static int stackinuse (lua_State *L) {
- 
- void luaD_shrinkstack (lua_State *L) {
-   int inuse = stackinuse(L);
--  int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;
-+  int goodsize = inuse + BASIC_STACK_SIZE;
-   if (goodsize > LUAI_MAXSTACK)
-     goodsize = LUAI_MAXSTACK;  /* respect stack limit */
-   if (L->stacksize > LUAI_MAXSTACK)  /* had been handling stack overflow? */
-@@ -229,8 +229,7 @@ void luaD_shrinkstack (lua_State *L) {
-     luaE_shrinkCI(L);  /* shrink list */
-   /* if thread is currently not handling a stack overflow and its
-      good size is smaller than current size, shrink its stack */
--  if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&
--      goodsize < L->stacksize)
-+  if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize)
-     luaD_reallocstack(L, goodsize);
-   else  /* don't change stack */
-     condmovestack(L,{},{});  /* (change only for debugging) */
--- 
-2.17.1
-
diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
deleted file mode 100644
index 89ce491487..0000000000
--- a/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From d8d344365945a534f700c82c5dd26f704f89fef3 Mon Sep 17 00:00:00 2001
-From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
-Date: Wed, 5 Aug 2020 16:59:58 +0800
-Subject: [PATCH] Fixed bug: invalid 'oldpc' when returning to a function
-
-The field 'L->oldpc' is not always updated when control returns to a
-function; an invalid value can seg. fault when computing 'changedline'.
-(One example is an error in a finalizer; control can return to
-'luaV_execute' without executing 'luaD_poscall'.) Instead of trying to
-fix all possible corner cases, it seems safer to be resilient to invalid
-values for 'oldpc'. Valid but wrong values at most cause an extra call
-to a line hook.
-
-CVE: CVE-2020-15945
-
-[Adjust the code to be applicable to the tree]
-
-Upstream-Status: Backport [https://github.com/lua/lua/commit/a2195644d89812e5b157ce7bac35543e06db05e3]
-
-Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
-Signed-off-by: Joe Slater <joe.slater@@windriver.com>
-
----
- src/ldebug.c | 30 +++++++++++++++---------------
- src/ldebug.h |  4 ++++
- src/ldo.c    |  2 +-
- src/lstate.c |  1 +
- src/lstate.h |  2 +-
- 5 files changed, 22 insertions(+), 17 deletions(-)
-
-diff --git a/src/ldebug.c b/src/ldebug.c
-index 239affb..832b16c 100644
---- a/src/ldebug.c
-+++ b/src/ldebug.c
-@@ -34,9 +34,8 @@
- #define noLuaClosure(f)		((f) == NULL || (f)->c.tt == LUA_TCCL)
- 
- 
--/* Active Lua function (given call info) */
--#define ci_func(ci)		(clLvalue((ci)->func))
--
-+/* inverse of 'pcRel' */
-+#define invpcRel(pc, p)                ((p)->code + (pc) + 1)
- 
- static const char *funcnamefromcode (lua_State *L, CallInfo *ci,
-                                     const char **name);
-@@ -71,20 +70,18 @@ static void swapextra (lua_State *L) {
- 
- /*
- ** This function can be called asynchronously (e.g. during a signal).
--** Fields 'oldpc', 'basehookcount', and 'hookcount' (set by
--** 'resethookcount') are for debug only, and it is no problem if they
--** get arbitrary values (causes at most one wrong hook call). 'hookmask'
--** is an atomic value. We assume that pointers are atomic too (e.g., gcc
--** ensures that for all platforms where it runs). Moreover, 'hook' is
--** always checked before being called (see 'luaD_hook').
-+** Fields 'basehookcount' and 'hookcount' (set by 'resethookcount')
-+** are for debug only, and it is no problem if they get arbitrary
-+** values (causes at most one wrong hook call). 'hookmask' is an atomic
-+** value. We assume that pointers are atomic too (e.g., gcc ensures that
-+** for all platforms where it runs). Moreover, 'hook' is always checked
-+** before being called (see 'luaD_hook').
- */
- LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
-   if (func == NULL || mask == 0) {  /* turn off hooks? */
-     mask = 0;
-     func = NULL;
-   }
--  if (isLua(L->ci))
--    L->oldpc = L->ci->u.l.savedpc;
-   L->hook = func;
-   L->basehookcount = count;
-   resethookcount(L);
-@@ -665,7 +662,10 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
- void luaG_traceexec (lua_State *L) {
-   CallInfo *ci = L->ci;
-   lu_byte mask = L->hookmask;
-+  const Proto *p = ci_func(ci)->p;
-   int counthook = (--L->hookcount == 0 && (mask & LUA_MASKCOUNT));
-+  /* 'L->oldpc' may be invalid; reset it in this case */
-+  int oldpc = (L->oldpc < p->sizecode) ? L->oldpc : 0;
-   if (counthook)
-     resethookcount(L);  /* reset count */
-   else if (!(mask & LUA_MASKLINE))
-@@ -677,15 +677,15 @@ void luaG_traceexec (lua_State *L) {
-   if (counthook)
-     luaD_hook(L, LUA_HOOKCOUNT, -1);  /* call count hook */
-   if (mask & LUA_MASKLINE) {
--    Proto *p = ci_func(ci)->p;
-     int npc = pcRel(ci->u.l.savedpc, p);
-     int newline = getfuncline(p, npc);
-     if (npc == 0 ||  /* call linehook when enter a new function, */
--        ci->u.l.savedpc <= L->oldpc ||  /* when jump back (loop), or when */
--        newline != getfuncline(p, pcRel(L->oldpc, p)))  /* enter a new line */
-+        ci->u.l.savedpc <= invpcRel(oldpc, p) ||  /* when jump back (loop), or when */
-+        newline != getfuncline(p, oldpc))  /* enter a new line */
-       luaD_hook(L, LUA_HOOKLINE, newline);  /* call line hook */
-+
-+    L->oldpc = npc;  /* 'pc' of last call to line hook */
-   }
--  L->oldpc = ci->u.l.savedpc;
-   if (L->status == LUA_YIELD) {  /* did hook yield? */
-     if (counthook)
-       L->hookcount = 1;  /* undo decrement to zero */
-diff --git a/src/ldebug.h b/src/ldebug.h
-index 0e31546..c224cc4 100644
---- a/src/ldebug.h
-+++ b/src/ldebug.h
-@@ -13,6 +13,10 @@
- 
- #define pcRel(pc, p)	(cast(int, (pc) - (p)->code) - 1)
- 
-+/* Active Lua function (given call info) */
-+#define ci_func(ci)            (clLvalue((ci)->func))
-+
-+
- #define getfuncline(f,pc)	(((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
- 
- #define resethookcount(L)	(L->hookcount = L->basehookcount)
-diff --git a/src/ldo.c b/src/ldo.c
-index 90b695f..f66ac1a 100644
---- a/src/ldo.c
-+++ b/src/ldo.c
-@@ -382,7 +382,7 @@ int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) {
-       luaD_hook(L, LUA_HOOKRET, -1);
-       firstResult = restorestack(L, fr);
-     }
--    L->oldpc = ci->previous->u.l.savedpc;  /* 'oldpc' for caller function */
-+    L->oldpc = pcRel(ci->u.l.savedpc, ci_func(ci)->p);  /* 'oldpc' for caller function */
-   }
-   res = ci->func;  /* res == final position of 1st result */
-   L->ci = ci->previous;  /* back to caller */
-diff --git a/src/lstate.c b/src/lstate.c
-index 9194ac3..3573e36 100644
---- a/src/lstate.c
-+++ b/src/lstate.c
-@@ -236,6 +236,7 @@ static void preinit_thread (lua_State *L, global_State *g) {
-   L->nny = 1;
-   L->status = LUA_OK;
-   L->errfunc = 0;
-+  L->oldpc = 0;
- }
- 
- 
-diff --git a/src/lstate.h b/src/lstate.h
-index a469466..d75eadf 100644
---- a/src/lstate.h
-+++ b/src/lstate.h
-@@ -164,7 +164,6 @@ struct lua_State {
-   StkId top;  /* first free slot in the stack */
-   global_State *l_G;
-   CallInfo *ci;  /* call info for current function */
--  const Instruction *oldpc;  /* last pc traced */
-   StkId stack_last;  /* last free slot in the stack */
-   StkId stack;  /* stack base */
-   UpVal *openupval;  /* list of open upvalues in this stack */
-@@ -174,6 +173,7 @@ struct lua_State {
-   CallInfo base_ci;  /* CallInfo for first level (C calling Lua) */
-   volatile lua_Hook hook;
-   ptrdiff_t errfunc;  /* current error handling function (stack index) */
-+  int oldpc;  /* last pc traced */
-   int stacksize;
-   int basehookcount;
-   int hookcount;
--- 
-2.13.3
-
diff --git a/meta/recipes-devtools/lua/lua_5.3.6.bb b/meta/recipes-devtools/lua/lua_5.4.3.bb
similarity index 58%
rename from meta/recipes-devtools/lua/lua_5.3.6.bb
rename to meta/recipes-devtools/lua/lua_5.4.3.bb
index f830e09259..0224744fe7 100644
--- a/meta/recipes-devtools/lua/lua_5.3.6.bb
+++ b/meta/recipes-devtools/lua/lua_5.4.3.bb
@@ -1,29 +1,24 @@
 DESCRIPTION = "Lua is a powerful light-weight programming language designed \
 for extending applications."
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=f43d8ee6bc4df18ef8b276439cc4a153"
+LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=307;endline=330;md5=79c3f6b19ad05efe24c1681f025026bb"
 HOMEPAGE = "http://www.lua.org/"
 
 SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
            file://lua.pc.in \
-           file://0001-Allow-building-lua-without-readline-on-Linux.patch \
-           file://CVE-2020-15888.patch \
-           file://CVE-2020-15945.patch \
-           file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest file://run-ptest ', '', d)} \
            "
 
 # if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
-PV_testsuites = "5.3.4"
+PV_testsuites = "5.4.3"
 
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
-           'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \
-            file://run-ptest \
-           ', '', d)}"
+SRC_URI[tarballsrc.sha256sum] = "f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb"
+SRC_URI[tarballtest.sha256sum] = "5d29c3022897a8290f280ebe1c6853248dfa35a668e1fc02ba9c8cde4e7bf110"
 
-SRC_URI[tarballsrc.md5sum] = "83f23dbd5230140a3770d5f54076948d"
-SRC_URI[tarballsrc.sha256sum] = "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60"
-SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3"
-SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f"
+# remove at next version upgrade or when output changes
+# was added after intermittent repro failures poisoned the cache
+PR = "r1"
+HASHEQUIV_HASH_VERSION .= ".2"
 
 inherit pkgconfig binconfig ptest
 
@@ -31,7 +26,7 @@ PACKAGECONFIG ??= "readline"
 PACKAGECONFIG[readline] = ",,readline"
 
 TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
-EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'"
+EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}' 'AR=ar rcD' 'RANLIB=ranlib -D'"
 
 do_configure:prepend() {
     sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
@@ -39,7 +34,7 @@ do_configure:prepend() {
 }
 
 do_compile () {
-    oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)}
+    oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux-readline', 'linux', d)}
 }
 
 do_install () {
@@ -50,13 +45,13 @@ do_install () {
         'INSTALL_MAN=${D}${mandir}/man1' \
         'INSTALL_SHARE=${D}${datadir}/lua' \
         'INSTALL_LIB=${D}${libdir}' \
-        'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
+        'INSTALL_CMOD=${D}${libdir}/lua/5.4' \
         install
     install -d ${D}${libdir}/pkgconfig
 
     sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
     install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
-    rmdir ${D}${datadir}/lua/5.3
+    rmdir ${D}${datadir}/lua/5.4
     rmdir ${D}${datadir}/lua
 }
 
-- 
2.31.1


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

* [PATCH 05/26] rpm: update 4.16.1.3 -> 4.17.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (2 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 04/26] lua: update 5.3.6 -> 5.4.3 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-10-14 12:19   ` [OE-core] " Martin Jansa
  2021-09-08 18:01 ` [PATCH 06/26] libdnf: fix the rpm sqlite-only target setup Alexander Kanavin
                   ` (22 subsequent siblings)
  26 siblings, 1 reply; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

The flagship features are migration from bdb to sqlite and zstd support,
both are enabled and taken into use. The relationship and upstream preference
between sqlite and ndb formats isn't quite clear.

Lua is now a hard dependency.

Added packageconfig option for r/o support for bdb (that doesn't need bdb
itself), but not enabled it as upstream marks it EXPERIMENTAL in capital
letters.

Drop sed adjustment for a file that is not anymore installed.

Adjust oeqa test to check for sqlite database instead of bdb.

Drop
0001-Fix-build-with-musl-C-library.patch (nss support removed upstream)
0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch
(difficult to undersand and rebase; obsolete with the move to zstd)
0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
(upstream made the same change)

Portions of 0001-tools-Add-error.h-for-non-glibc-case.patch dropped
(upstream moved the files to a separate component).

Added 0001-docs-do-not-build-manpages-requires-pandoc.patch to avoid
pandoc dependency.

Added 0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
to restore reproducibility when compression thread amount varies between hosts.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/lib/oeqa/runtime/cases/rpm.py            |  6 +-
 ...lib-rpm-as-the-installation-path-for.patch | 14 ++--
 .../0001-Fix-build-with-musl-C-library.patch  | 22 -------
 ...not-insert-payloadflags-into-.rpm-me.patch | 28 ++++++++
 ...o-not-build-manpages-requires-pandoc.patch | 26 ++++++++
 ...rict-virtual-memory-usage-if-limit-s.patch | 65 -------------------
 ...tools-Add-error.h-for-non-glibc-case.patch | 59 ++---------------
 ...hat-ELF-binaries-are-executable-to-b.patch | 33 ----------
 .../rpm/{rpm_4.16.1.3.bb => rpm_4.17.0.bb}    | 22 +++----
 9 files changed, 81 insertions(+), 194 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
 rename meta/recipes-devtools/rpm/{rpm_4.16.1.3.bb => rpm_4.17.0.bb} (90%)

diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py
index 7a9d62c003..a4339116bf 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -116,12 +116,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
         Author:      Alexander Kanavin <alex.kanavin@gmail.com>
         AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
         """
-        db_files_cmd = 'ls /var/lib/rpm/__db.*'
+        db_files_cmd = 'ls /var/lib/rpm/rpmdb.sqlite*'
         check_log_cmd = "grep RPM /var/log/messages | wc -l"
 
-        # Make sure that some database files are under /var/lib/rpm as '__db.xxx'
+        # Make sure that some database files are under /var/lib/rpm as 'rpmdb.sqlite'
         status, output = self.target.run(db_files_cmd)
-        msg =  'Failed to find database files under /var/lib/rpm/ as __db.xxx'
+        msg =  'Failed to find database files under /var/lib/rpm/ as rpmdb.sqlite'
         self.assertEqual(0, status, msg=msg)
 
         self.tc.target.copyTo(self.test_file, self.dst)
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 d8fcc16729..6d236ac400 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 7b2dd83d8fcd06af8e583b53da79ed0033793d46 Mon Sep 17 00:00:00 2001
+From 8d013fe154a162305f76141151baf767dd04b598 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 fe35a90fa..b2faec6f3 100644
+index eb7d6941b..10a889b5d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -966,7 +966,7 @@ else
+@@ -871,7 +871,7 @@ else
      usrprefix=$prefix
  fi
  
@@ -27,10 +27,10 @@ index fe35a90fa..b2faec6f3 100644
  
  AC_SUBST(OBJDUMP)
 diff --git a/macros.in b/macros.in
-index 35c8cf9df..9d8b2825c 100644
+index a1f795e5f..689e784ef 100644
 --- a/macros.in
 +++ b/macros.in
-@@ -996,7 +996,7 @@ package or when debugging this package.\
+@@ -933,7 +933,7 @@ package or when debugging this package.\
  %_sharedstatedir	%{_prefix}/com
  %_localstatedir		%{_prefix}/var
  %_lib			lib
@@ -40,7 +40,7 @@ index 35c8cf9df..9d8b2825c 100644
  %_infodir		%{_datadir}/info
  %_mandir		%{_datadir}/man
 diff --git a/rpm.am b/rpm.am
-index 8e1dc2184..3d889ec86 100644
+index 7b57f433b..9bbb9ee96 100644
 --- a/rpm.am
 +++ b/rpm.am
 @@ -1,10 +1,10 @@
@@ -55,4 +55,4 @@ index 8e1dc2184..3d889ec86 100644
 +rpmconfigdir = $(libdir)/rpm
  
  # Libtool version (current-revision-age) for all our libraries
- rpm_version_info = 10:3:1
+ rpm_version_info = 11:0:2
diff --git a/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch b/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
deleted file mode 100644
index b960da6c31..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 27 Feb 2017 14:43:21 +0200
-Subject: [PATCH 1/9] Fix build with musl C library.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- configure.ac       | 3 ++-
- rpmio/digest_nss.c | 1 +
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
---- a/rpmio/digest_nss.c
-+++ b/rpmio/digest_nss.c
-@@ -1,5 +1,6 @@
- #include "system.h"
- 
-+#include <signal.h>
- #include <pthread.h>
- #include <nss.h>
- #include <sechash.h>
diff --git a/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch b/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
new file mode 100644
index 0000000000..79b168257e
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch
@@ -0,0 +1,28 @@
+From 2d351c666f09cc1b9e368422653fb42ac8b86249 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Tue, 31 Aug 2021 10:37:05 +0200
+Subject: [PATCH] build/pack.c: do not insert payloadflags into .rpm metadata
+
+The flags look like '19T56' where 19 is the compression level
+(deterministic), and 56 is the amount of threads (varies from one
+host to the next and breaks reproducibility for .rpm).
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ build/pack.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index 932cb213e..b45d0726f 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -328,7 +328,7 @@ static char *getIOFlags(Package pkg)
+ 	    headerPutString(pkg->header, RPMTAG_PAYLOADCOMPRESSOR, compr);
+ 	buf = xstrdup(rpmio_flags);
+ 	buf[s - rpmio_flags] = '\0';
+-	headerPutString(pkg->header, RPMTAG_PAYLOADFLAGS, buf+1);
++	headerPutString(pkg->header, RPMTAG_PAYLOADFLAGS, "");
+ 	free(buf);
+     }
+ exit:
diff --git a/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch b/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch
new file mode 100644
index 0000000000..ced52d1007
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch
@@ -0,0 +1,26 @@
+From 9bf1693092385eba9841614613313010221ca01f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 29 Jun 2021 20:11:26 +0200
+Subject: [PATCH] docs: do not build manpages (requires pandoc)
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ docs/Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/docs/Makefile.am b/docs/Makefile.am
+index 5a6bd203a..6257767fd 100644
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -1,7 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+-SUBDIRS = man
+-
+ EXTRA_DIST =
+ 
+ EXTRA_DIST += \
+-- 
+2.32.0
+
diff --git a/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch b/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch
deleted file mode 100644
index 6454785254..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 0066b862bb3a09f39295abd5d972a53ac8dc1555 Mon Sep 17 00:00:00 2001
-From: Peter Bergin <peter@berginkonsult.se>
-Date: Wed, 19 Sep 2018 15:12:31 +0200
-Subject: [PATCH] rpm/rpmio.c: restrict virtual memory usage if limit set
-
-A solution to avoid OOM situation when the virtual memory is restricted
-for a user (ulimit -v). As the lzopen_internal function is run in parallel
-one instance per CPU thread the available virtual memory is limited per
-CPU thread.
-
-Upstream-Status: Pending [merge of multithreading patches to upstream]
-
-Signed-off-by: Peter Bergin <peter@berginkonsult.se>
----
- rpmio/rpmio.c | 34 ++++++++++++++++++++++++++++++++++
- 1 file changed, 34 insertions(+)
-
-diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
-index e051c98..b3c56b6 100644
---- a/rpmio/rpmio.c
-+++ b/rpmio/rpmio.c
-@@ -845,6 +845,40 @@ static LZFILE *lzopen_internal(const char *mode, int fd, int xz)
- 		}
- #endif
- 
-+		struct rlimit virtual_memory;
-+		getrlimit(RLIMIT_AS, &virtual_memory);
-+		if (virtual_memory.rlim_cur != RLIM_INFINITY) {
-+			const uint64_t virtual_memlimit = virtual_memory.rlim_cur;
-+			const uint64_t virtual_memlimit_per_cpu_thread =
-+				virtual_memlimit / lzma_cputhreads();
-+			uint64_t memory_usage_virt;
-+			rpmlog(RPMLOG_NOTICE, "XZ: virtual memory restricted to %lu and "
-+			       "per CPU thread %lu\n", virtual_memlimit, virtual_memlimit_per_cpu_thread);
-+			/* keep reducing the number of compression threads until memory
-+			   usage falls below the limit per CPU thread*/
-+			while ((memory_usage_virt = lzma_stream_encoder_mt_memusage(&mt_options)) >
-+			       virtual_memlimit_per_cpu_thread) {
-+				/* If number of threads goes down to zero lzma_stream_encoder will
-+				 * will return UINT64_MAX. We must check here to avoid an infinite loop.
-+				 * If we get into situation that one thread requires more virtual memory
-+				 * than available we set one thread, print error message and try anyway. */
-+				if (--mt_options.threads == 0) {
-+					mt_options.threads = 1;
-+					rpmlog(RPMLOG_WARNING,
-+					       "XZ: Could not adjust number of threads to get below "
-+					       "virtual memory limit %lu. usage %lu\n",
-+					       virtual_memlimit_per_cpu_thread, memory_usage_virt);
-+					break;
-+				}
-+			}
-+			if (threads != (int)mt_options.threads)
-+				rpmlog(RPMLOG_NOTICE,
-+				       "XZ: Adjusted the number of threads from %d to %d to not "
-+				       "exceed the memory usage limit of %lu bytes\n",
-+				       threads, mt_options.threads, virtual_memlimit);
-+
-+		}
-+
- 		ret = lzma_stream_encoder_mt(&lzfile->strm, &mt_options);
- 	    }
- #endif
--- 
-2.7.4
-
diff --git a/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch b/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch
index e78514b814..9783396639 100644
--- a/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch
+++ b/meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch
@@ -1,4 +1,4 @@
-From b3952bd5e28f2a4d86c7377de239db8fa7237e14 Mon Sep 17 00:00:00 2001
+From 9b9d717f484ec913cdd3804e43489b3dc18bd77c Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sat, 31 Oct 2020 22:14:05 -0700
 Subject: [PATCH] tools: Add error.h for non-glibc case
@@ -9,40 +9,15 @@ upstream given that elfutils has been closely tied to glibc
 Upstream-Status: Inappropriate [workaround for musl]
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
 ---
- tools/debugedit.c      |  6 +++++-
- tools/elfdeps.c        |  6 +++++-
- tools/error.h          | 27 +++++++++++++++++++++++++++
- tools/sepdebugcrcfix.c |  6 +++++-
- 4 files changed, 42 insertions(+), 3 deletions(-)
+ tools/elfdeps.c |  6 +++++-
+ tools/error.h   | 27 +++++++++++++++++++++++++++
+ 2 files changed, 32 insertions(+), 1 deletion(-)
  create mode 100644 tools/error.h
 
-diff --git a/tools/debugedit.c b/tools/debugedit.c
-index 9f8dcd0fb..852f46073 100644
---- a/tools/debugedit.c
-+++ b/tools/debugedit.c
-@@ -26,7 +26,6 @@
- #include <byteswap.h>
- #include <endian.h>
- #include <errno.h>
--#include <error.h>
- #include <limits.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -40,6 +39,11 @@
- 
- #include <gelf.h>
- #include <dwarf.h>
-+#ifdef __GLIBC__
-+#include <error.h>
-+#else
-+#include "error.h"
-+#endif
- 
- 
- /* Unfortunately strtab manipulation functions were only officially added
 diff --git a/tools/elfdeps.c b/tools/elfdeps.c
-index 6d9094874..f69e60997 100644
+index d205935bb..3a8945b33 100644
 --- a/tools/elfdeps.c
 +++ b/tools/elfdeps.c
 @@ -5,10 +5,14 @@
@@ -94,25 +69,3 @@ index 000000000..ef06827a0
 +}
 +
 +#endif	/* _ERROR_H_ */
-diff --git a/tools/sepdebugcrcfix.c b/tools/sepdebugcrcfix.c
-index fba460014..2be9c1fd8 100644
---- a/tools/sepdebugcrcfix.c
-+++ b/tools/sepdebugcrcfix.c
-@@ -29,9 +29,13 @@
- #include <endian.h>
- #include <stdio.h>
- #include <stdlib.h>
--#include <error.h>
- #include <libelf.h>
- #include <gelf.h>
-+#ifdef __GLIBC__
-+#include <error.h>
-+#else
-+#include "error.h"
-+#endif
- 
- #ifndef _
- #define _(x) x
--- 
-2.29.2
-
diff --git a/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch b/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
deleted file mode 100644
index 4ac5c38f06..0000000000
--- a/meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <pkj@axis.com>
-Date: Mon, 15 May 2017 10:21:08 +0200
-Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be
- identifiable
-
-There is nothing that requires, e.g., a DSO to be executable, but it
-is still an ELF binary and should be identified as such.
-
-Upstream probably expects all ELF binaries to be marked as executable,
-but rather than imposing such a limitation for OE, allow any file to
-be identified as an ELF binary regardless of whether it is executable
-or not.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
-
----
- fileattrs/elf.attr | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
-index 5805dd0ee..3516f309d 100644
---- a/fileattrs/elf.attr
-+++ b/fileattrs/elf.attr
-@@ -1,4 +1,3 @@
- %__elf_provides		%{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
- %__elf_requires		%{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
- %__elf_magic		^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
--%__elf_flags		exeonly
--- 
-2.14.2
-
diff --git a/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb b/meta/recipes-devtools/rpm/rpm_4.17.0.bb
similarity index 90%
rename from meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
rename to meta/recipes-devtools/rpm/rpm_4.17.0.bb
index 189da92436..f917118abf 100644
--- a/meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.17.0.bb
@@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
 LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f"
 
-SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x \
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.17.x \
            file://environment.d-rpm.sh \
            file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
            file://0001-Do-not-read-config-files-from-HOME.patch \
@@ -32,22 +32,21 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x \
            file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
            file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
            file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
-           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-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-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
            file://0001-tools-Add-error.h-for-non-glibc-case.patch \
+           file://0001-docs-do-not-build-manpages-requires-pandoc.patch \
+           file://0001-build-pack.c-do-not-insert-payloadflags-into-.rpm-me.patch \
            "
 
 PE = "1"
-SRCREV = "3659b8a04f5b8bacf6535e0124e7fe23f15286bd"
+SRCREV = "3e74e8ba2dd5e76a5353d238dc7fc38651ce27b3"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libgcrypt file popt xz bzip2 elfutils python3"
+DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3"
 DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native"
 
 inherit autotools gettext pkgconfig python3native
@@ -58,7 +57,7 @@ AUTOTOOLS_AUXDIR = "${S}/build-aux"
 # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
 EXTRA_AUTORECONF:append = " --exclude=gnu-configize"
 
-EXTRA_OECONF:append = " --without-lua --enable-python --with-crypto=libgcrypt"
+EXTRA_OECONF:append = " --enable-python --with-crypto=libgcrypt"
 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
@@ -70,15 +69,18 @@ EXTRA_OECONF:append:class-nativesdk = " --sysconfdir=/etc --disable-plugins"
 
 BBCLASSEXTEND = "native nativesdk"
 
-PACKAGECONFIG ??= "bdb ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)} sqlite zstd"
 # The inhibit plugin serves no purpose outside of the target
 PACKAGECONFIG:remove:class-native = "inhibit"
 PACKAGECONFIG:remove:class-nativesdk = "inhibit"
 
-PACKAGECONFIG[bdb] = "--enable-bdb,--disable-bdb,db"
 PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
 PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus"
 PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
+PACKAGECONFIG[sqlite] = "--enable-sqlite=yes,--enable-sqlite=no,sqlite3"
+PACKAGECONFIG[ndb] = "--enable-ndb,--disable-ndb"
+PACKAGECONFIG[bdb-ro] = "--enable-bdb-ro,--disable-bdb-ro"
+PACKAGECONFIG[zstd] = "--enable-zstd=yes,--enable-zstd=no,zstd"
 
 ASNEEDED = ""
 
@@ -136,8 +138,6 @@ do_install:append () {
 	sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
 	    ${D}/${libdir}/rpm/macros
 
-	sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
-	    ${D}${libdir}/rpm/pythondistdeps.py
 }
 
 FILES:${PN} += "${libdir}/rpm-plugins/*.so \
-- 
2.31.1


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

* [PATCH 06/26] libdnf: fix the rpm sqlite-only target setup
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (3 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 05/26] rpm: update 4.16.1.3 -> 4.17.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 07/26] libsolv: disable rpm bdb format support Alexander Kanavin
                   ` (21 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...xt.cpp-do-not-try-to-access-BDB-data.patch | 37 +++++++++++++++++++
 meta/recipes-devtools/libdnf/libdnf_0.63.1.bb |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch

diff --git a/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch
new file mode 100644
index 0000000000..6f8a3dcb50
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch
@@ -0,0 +1,37 @@
+From 2f7382b35d59fe08034603497e82ffb943fedef1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 30 Jun 2021 15:31:16 +0200
+Subject: [PATCH] libdnf/dnf-context.cpp: do not try to access BDB database
+
+Upstream-Status: Inappropriate [upstream needs to rework this to support
+sqlite]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ libdnf/dnf-context.cpp | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp
+index 86f71a79..9cdcf769 100644
+--- a/libdnf/dnf-context.cpp
++++ b/libdnf/dnf-context.cpp
+@@ -2264,20 +2264,6 @@ dnf_context_setup(DnfContext *context,
+         !dnf_context_set_os_release(context, error))
+         return FALSE;
+ 
+-    /* setup a file monitor on the rpmdb, if we're operating on the native / */
+-    if (g_strcmp0(priv->install_root, "/") == 0) {
+-        rpmdb_path = g_build_filename(priv->install_root, "var/lib/rpm/Packages", NULL);
+-        file_rpmdb = g_file_new_for_path(rpmdb_path);
+-        priv->monitor_rpmdb = g_file_monitor_file(file_rpmdb,
+-                               G_FILE_MONITOR_NONE,
+-                               NULL,
+-                               error);
+-        if (priv->monitor_rpmdb == NULL)
+-            return FALSE;
+-        g_signal_connect(priv->monitor_rpmdb, "changed",
+-                         G_CALLBACK(dnf_context_rpmdb_changed_cb), context);
+-    }
+-
+     /* copy any vendor distributed cached metadata */
+     if (!dnf_context_copy_vendor_cache(context, error))
+         return FALSE;
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.63.1.bb b/meta/recipes-devtools/libdnf/libdnf_0.63.1.bb
index 282c28e2c4..a9f393e722 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.63.1.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.63.1.bb
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \
            file://enable_test_data_dir_set.patch \
            file://0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch \
            file://0001-drop-FindPythonInstDir.cmake.patch \
+           file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \
            "
 
 SRCREV = "8e451380bf84bd76e3925cbae2a06bb0e56f5cd9"
-- 
2.31.1


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

* [PATCH 07/26] libsolv: disable rpm bdb format support
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (4 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 06/26] libdnf: fix the rpm sqlite-only target setup Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 08/26] perl: do not build berkeley db module by default Alexander Kanavin
                   ` (20 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Otherwise this causes runtime errors when only sqlite is present.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-extended/libsolv/libsolv_0.7.19.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/libsolv/libsolv_0.7.19.bb b/meta/recipes-extended/libsolv/libsolv_0.7.19.bb
index bb925073ed..d30e61e9d9 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.7.19.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.7.19.bb
@@ -20,7 +20,7 @@ S = "${WORKDIR}/git"
 inherit cmake
 
 PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGE_CLASSES','package_rpm','rpm','',d)}"
-PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_RPMDB_BDB=ON,,db rpm"
+PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON,,rpm"
 
 EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON"
 
-- 
2.31.1


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

* [PATCH 08/26] perl: do not build berkeley db module by default
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (5 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 07/26] libsolv: disable rpm bdb format support Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 09/26] package_rpm: use zstd instead of xz Alexander Kanavin
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Bdb is unmaintained and altogether obsolete, the less dependencies
we have on it, the better.

This leaves only apt (specifically, apt-ftparchive) in core as a bdb consumer,
sadly it has a hard dependency that isn't easy to patch out. Maybe apt
upstream will get to it at some point.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-devtools/perl/perl_5.34.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/perl/perl_5.34.0.bb b/meta/recipes-devtools/perl/perl_5.34.0.bb
index ab19a8d0be..a12a0be2f2 100644
--- a/meta/recipes-devtools/perl/perl_5.34.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.34.0.bb
@@ -35,7 +35,7 @@ DEPENDS += "perlcross-native zlib virtual/crypt"
 
 PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
 
-PACKAGECONFIG ??= "bdb gdbm"
+PACKAGECONFIG ??= "gdbm"
 PACKAGECONFIG[bdb] = ",-Ui_db,db"
 PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
 
-- 
2.31.1


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

* [PATCH 09/26] package_rpm: use zstd instead of xz
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (6 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 08/26] perl: do not build berkeley db module by default Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 10/26] qemu: update 6.0.0 -> 6.1.0 Alexander Kanavin
                   ` (18 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

zstd has similar time and space performance in compression but is
vastly faster in decompression, which benefits rootfs creation
(especially when installing very large packages) and on-target
package installation.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/classes/package_rpm.bbclass | 4 ++--
 meta/conf/bitbake.conf           | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 88d861c0e7..fc1e4b3a4a 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -684,8 +684,8 @@ python do_package_rpm () {
     cmd = cmd + " --define '_use_internal_dependency_generator 0'"
     cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
     cmd = cmd + " --define '_build_id_links none'"
-    cmd = cmd + " --define '_binary_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
-    cmd = cmd + " --define '_source_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
+    cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
+    cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
     cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
     cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
     cmd = cmd + " --define '_buildhost reproducible'"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 2140d498f7..52d40738f4 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -814,6 +814,9 @@ XZ_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
 XZ_DEFAULTS ?= "--memlimit=${XZ_MEMLIMIT} --threads=${XZ_THREADS}"
 XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS"
 
+# Default parallelism for zstd
+ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
+
 # Limit the number of threads that OpenMP libraries will use. Otherwise they
 # may fallback to using all CPUs
 export OMP_NUM_THREADS = "${BB_NUMBER_THREADS}"
-- 
2.31.1


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

* [PATCH 10/26] qemu: update 6.0.0 -> 6.1.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (7 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 09/26] package_rpm: use zstd instead of xz Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 11/26] runqemu: correct vga-virtio option to keep virgl enabled Alexander Kanavin
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Recipe changes:
qemu-plugin.h is installed by both qemu-native and qemu-system-native

qmp.py module is now provided in a module directory (no other files
from that directory are necessary to use it though)

additional host-specific info is stripeed from ptest tests/tcg/*.mak

Patches:
drop all backports

drop 0001-Add-enable-disable-udev.patch (change added upstream)

drop 0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch
(issue fixed upstream)

drop 0004-qemu-disable-Valgrind.patch (valgrind detection moved
from configure to meson, and should be robust against host contamination)

rebase 0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
(upstream moved libgcrypt handling from configure to meson, and using
pkg-config is now a one-liner adjustment)

rebase cross.patch

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/conf/distro/include/tcmode-default.inc   |  2 +-
 ...u-native_6.0.0.bb => qemu-native_6.1.0.bb} |  0
 ...e_6.0.0.bb => qemu-system-native_6.1.0.bb} |  3 +-
 meta/recipes-devtools/qemu/qemu.inc           | 19 +---
 .../qemu/0001-Add-enable-disable-udev.patch   | 29 -------
 ...igure-fix-detection-of-gdbus-codegen.patch | 50 -----------
 ...nux-user-Tag-vsx-with-ieee128-fpbits.patch | 35 --------
 ...ix-memory-disclosure-in-virgl_cmd_ge.patch | 43 ---------
 ...ix-resource-leak-in-vg_resource_crea.patch | 41 ---------
 ...ix-memory-leak-in-vg_resource_attach.patch | 48 ----------
 .../qemu/0004-qemu-disable-Valgrind.patch     | 34 --------
 ...ix-memory-leak-while-calling-vg_reso.patch | 50 -----------
 ...ix-memory-leak-in-virgl_cmd_resource.patch | 58 -------------
 ...ix-memory-leak-in-virgl_resource_att.patch | 49 -----------
 ...ix-OOB-write-in-virgl_cmd_get_capset.patch | 49 -----------
 ...dd-pkg-config-handling-for-libgcrypt.patch | 87 ++++---------------
 .../qemu/qemu/CVE-2021-3527-1.patch           | 42 ---------
 .../qemu/qemu/CVE-2021-3527-2.patch           | 59 -------------
 .../qemu/qemu/CVE-2021-3682.patch             | 41 ---------
 meta/recipes-devtools/qemu/qemu/cross.patch   | 40 +++++----
 .../qemu/{qemu_6.0.0.bb => qemu_6.1.0.bb}     |  0
 21 files changed, 48 insertions(+), 731 deletions(-)
 rename meta/recipes-devtools/qemu/{qemu-native_6.0.0.bb => qemu-native_6.1.0.bb} (100%)
 rename meta/recipes-devtools/qemu/{qemu-system-native_6.0.0.bb => qemu-system-native_6.1.0.bb} (88%)
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3527-1.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3527-2.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3682.patch
 rename meta/recipes-devtools/qemu/{qemu_6.0.0.bb => qemu_6.1.0.bb} (100%)

diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 80b03305bb..ada27b8746 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -22,7 +22,7 @@ BINUVERSION ?= "2.37%"
 GDBVERSION ?= "10.%"
 GLIBCVERSION ?= "2.34"
 LINUXLIBCVERSION ?= "5.13%"
-QEMUVERSION ?= "6.0%"
+QEMUVERSION ?= "6.1%"
 GOVERSION ?= "1.16%"
 # This can not use wildcards like 8.0.% since it is also used in mesa to denote
 # llvm version being used, so always bump it with llvm recipe version bump
diff --git a/meta/recipes-devtools/qemu/qemu-native_6.0.0.bb b/meta/recipes-devtools/qemu/qemu-native_6.1.0.bb
similarity index 100%
rename from meta/recipes-devtools/qemu/qemu-native_6.0.0.bb
rename to meta/recipes-devtools/qemu/qemu-native_6.1.0.bb
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_6.1.0.bb
similarity index 88%
rename from meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb
rename to meta/recipes-devtools/qemu/qemu-system-native_6.1.0.bb
index 1c12eb7cf2..61dbd05efb 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_6.0.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_6.1.0.bb
@@ -25,7 +25,8 @@ do_install:append() {
     rm -f ${D}${datadir}/qemu/trace-events-all
     rm -rf ${D}${datadir}/qemu/keymaps
     rm -rf ${D}${datadir}/icons/
+    rm -rf ${D}${includedir}/qemu-plugin.h
 
     # Install qmp.py to be used with testimage
-    install -D ${S}/python/qemu/qmp.py ${D}${PYTHON_SITEPACKAGES_DIR}/qmp.py
+    install -D ${S}/python/qemu/qmp/__init__.py ${D}${PYTHON_SITEPACKAGES_DIR}/qmp.py
 }
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 76e8da159c..f85befa0ae 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -19,31 +19,17 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://run-ptest \
            file://0001-qemu-Add-missing-wacom-HID-descriptor.patch \
            file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
-           file://0004-qemu-disable-Valgrind.patch \
            file://0006-chardev-connect-socket-to-a-spawned-command.patch \
            file://0007-apic-fixup-fallthrough-to-PIC.patch \
            file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
-           file://0001-Add-enable-disable-udev.patch \
            file://0001-qemu-Do-not-include-file-if-not-exists.patch \
            file://mmap2.patch \
            file://determinism.patch \
            file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \
-           file://0001-configure-fix-detection-of-gdbus-codegen.patch \
-           file://0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch \
-           file://0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch \
-           file://0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch \
-           file://0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch \
-           file://0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch \
-           file://0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch \
-           file://0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch \
-           file://0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch \
-           file://CVE-2021-3527-1.patch \
-           file://CVE-2021-3527-2.patch \
-           file://CVE-2021-3682.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
-SRC_URI[sha256sum] = "87bc1a471ca24b97e7005711066007d443423d19aacda3d442558ae032fa30b9"
+SRC_URI[sha256sum] = "eebc089db3414bbeedf1e464beda0a7515aad30f73261abc246c9b27503a3c96"
 
 SRC_URI:append:class-target = " file://cross.patch"
 SRC_URI:append:class-nativesdk = " file://cross.patch"
@@ -80,6 +66,9 @@ do_install_ptest() {
 
 	# Strip the paths from the QEMU variable, we can use PATH
 	sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" ${D}${PTEST_PATH}/tests/tcg/*.mak
+
+        # Strip compiler flags as they break reproducibility
+        sed -i -e "s,CROSS_CC_GUEST=.*,CROSS_CC_GUEST=," ${D}${PTEST_PATH}/tests/tcg/*.mak
 }
 
 # QEMU_TARGETS is overridable variable
diff --git a/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch b/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
deleted file mode 100644
index 4b37967e7a..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-Add-enable-disable-udev.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From b921e5204030845dc7c9d16d5f66d965e8d05367 Mon Sep 17 00:00:00 2001
-From: Jeremy Puhlman <jpuhlman@mvista.com>
-Date: Thu, 19 Mar 2020 11:54:26 -0700
-Subject: [PATCH] Add enable/disable libudev
-
-Upstream-Status: Pending
-Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
-
-[update patch context]
-Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
----
- configure | 4 ++++
- 1 file changed, 4 insertions(+)
-
-Index: qemu-6.0.0/configure
-===================================================================
---- qemu-6.0.0.orig/configure
-+++ qemu-6.0.0/configure
-@@ -1565,6 +1565,10 @@ for opt do
-   ;;
-   --disable-gio) gio=no
-   ;;
-+  --enable-libudev) libudev="yes"
-+  ;;
-+  --disable-libudev) libudev="no"
-+  ;;
-   *)
-       echo "ERROR: unknown option $opt"
-       echo "Try '$0 --help' for more information"
diff --git a/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch b/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
deleted file mode 100644
index 8bffc31293..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-configure-fix-detection-of-gdbus-codegen.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 464cfc64201b21386030b8f353fe9724a3413a85 Mon Sep 17 00:00:00 2001
-From: Paolo Bonzini <pbonzini@redhat.com>
-Date: Wed, 5 May 2021 10:15:34 -0400
-Subject: [PATCH] configure: fix detection of gdbus-codegen
-
-"pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
-and it does not pass test -x (which does not walk the path).
-
-Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
-assignment in tests/qtest/meson.build uses an empty string as the
-command, and fails very eloquently:
-
-../tests/qtest/meson.build:92:2: ERROR: No program name specified.
-
-Use the "has" function instead of test -x, and fix the generation
-of config-host.mak since meson.build expects that GDBUS_CODEGEN
-is absent, rather than empty, if the tool is unavailable.
-
-Reported-by: Sebastian Mitterle <smitterl@redhat.com>
-Fixes: #178
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5ecfb76ccc056eb6127e44268e475827ae73b9e0]
-(not in 6.0.0, should be kept when upgrading)
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- configure | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-Index: qemu-6.0.0/configure
-===================================================================
---- qemu-6.0.0.orig/configure
-+++ qemu-6.0.0/configure
-@@ -3366,7 +3366,7 @@ if ! test "$gio" = "no"; then
-         gio_cflags=$($pkg_config --cflags gio-2.0)
-         gio_libs=$($pkg_config --libs gio-2.0)
-         gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
--        if [ ! -x "$gdbus_codegen" ]; then
-+        if ! has "$gdbus_codegen"; then
-             gdbus_codegen=
-         fi
-         # Check that the libraries actually work -- Ubuntu 18.04 ships
-@@ -5704,6 +5704,8 @@ if test "$gio" = "yes" ; then
-     echo "CONFIG_GIO=y" >> $config_host_mak
-     echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
-     echo "GIO_LIBS=$gio_libs" >> $config_host_mak
-+fi
-+if test "$gdbus_codegen" != "" ; then
-     echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
- fi
- echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch
deleted file mode 100644
index 11b6e3c678..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-linux-user-Tag-vsx-with-ieee128-fpbits.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From c5844a4cdee37268c9b65a65e6968ee129bb742d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Jun 2021 10:27:17 -0700
-Subject: [PATCH] linux-user: Tag vsx with ieee128 fpbits
-
-In OE we need this for ppc64le usermode to work since we generate 128bit
-long doubles and glibc 2.34 is now checking for this in hwcaps at
-runtime and failing to run the binary if machine does not support 128bit
-IEEE fp
-
-Fixes
-Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- linux-user/elfload.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux-user/elfload.c b/linux-user/elfload.c
-index 17ab06f612..e7dd18fd40 100644
---- a/linux-user/elfload.c
-+++ b/linux-user/elfload.c
-@@ -830,7 +830,7 @@ static uint32_t get_elf_hwcap2(void)
-                   PPC2_ISA207S), QEMU_PPC_FEATURE2_ARCH_2_07 |
-                   QEMU_PPC_FEATURE2_VEC_CRYPTO);
-     GET_FEATURE2(PPC2_ISA300, QEMU_PPC_FEATURE2_ARCH_3_00 |
--                 QEMU_PPC_FEATURE2_DARN);
-+                 QEMU_PPC_FEATURE2_DARN | QEMU_PPC_FEATURE2_HAS_IEEE128);
- 
- #undef GET_FEATURE
- #undef GET_FEATURE2
--- 
-2.32.0
-
diff --git a/meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch b/meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch
deleted file mode 100644
index 981c237292..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-vhost-user-gpu-fix-memory-disclosure-in-virgl_cmd_ge.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-CVE: CVE-2021-3545
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 121841b25d72d13f8cad554363138c360f1250ea Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@163.com>
-Date: Sat, 15 May 2021 20:03:56 -0700
-Subject: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in
- virgl_cmd_get_capset_info (CVE-2021-3545)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Otherwise some of the 'resp' will be leaked to guest.
-
-Fixes: CVE-2021-3545
-Reported-by: Li Qiang <liq3ea@163.com>
-virtio-gpu fix: 42a8dadc74 ("virtio-gpu: fix information leak
-in getting capset info dispatch")
-
-Signed-off-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210516030403.107723-2-liq3ea@163.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- contrib/vhost-user-gpu/virgl.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
-index 9e6660c7ab..6a332d601f 100644
---- a/contrib/vhost-user-gpu/virgl.c
-+++ b/contrib/vhost-user-gpu/virgl.c
-@@ -128,6 +128,7 @@ virgl_cmd_get_capset_info(VuGpu *g,
- 
-     VUGPU_FILL_CMD(info);
- 
-+    memset(&resp, 0, sizeof(resp));
-     if (info.capset_index == 0) {
-         resp.capset_id = VIRTIO_GPU_CAPSET_VIRGL;
-         virgl_renderer_get_cap_set(resp.capset_id,
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch b/meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch
deleted file mode 100644
index a9aee47e39..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0002-vhost-user-gpu-fix-resource-leak-in-vg_resource_crea.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-CVE: CVE-2021-3544
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 86dd8fac2acc366930a5dc08d3fb1b1e816f4e1e Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@163.com>
-Date: Sat, 15 May 2021 20:03:57 -0700
-Subject: [PATCH 2/7] vhost-user-gpu: fix resource leak in
- 'vg_resource_create_2d' (CVE-2021-3544)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Call 'vugbm_buffer_destroy' in error path to avoid resource leak.
-
-Fixes: CVE-2021-3544
-Reported-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
-Signed-off-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210516030403.107723-3-liq3ea@163.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- contrib/vhost-user-gpu/vhost-user-gpu.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
-index f73f292c9f..b5e153d0d6 100644
---- a/contrib/vhost-user-gpu/vhost-user-gpu.c
-+++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
-@@ -349,6 +349,7 @@ vg_resource_create_2d(VuGpu *g,
-         g_critical("%s: resource creation failed %d %d %d",
-                    __func__, c2d.resource_id, c2d.width, c2d.height);
-         g_free(res);
-+        vugbm_buffer_destroy(&res->buffer);
-         cmd->error = VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY;
-         return;
-     }
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch b/meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch
deleted file mode 100644
index 1718486405..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0003-vhost-user-gpu-fix-memory-leak-in-vg_resource_attach.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-CVE: CVE-2021-3544
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From b9f79858a614d95f5de875d0ca31096eaab72c3b Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@163.com>
-Date: Sat, 15 May 2021 20:03:58 -0700
-Subject: [PATCH 3/7] vhost-user-gpu: fix memory leak in
- vg_resource_attach_backing (CVE-2021-3544)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Check whether the 'res' has already been attach_backing to avoid
-memory leak.
-
-Fixes: CVE-2021-3544
-Reported-by: Li Qiang <liq3ea@163.com>
-virtio-gpu fix: 204f01b309 ("virtio-gpu: fix memory leak
-in resource attach backing")
-
-Signed-off-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210516030403.107723-4-liq3ea@163.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- contrib/vhost-user-gpu/vhost-user-gpu.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
-index b5e153d0d6..0437e52b64 100644
---- a/contrib/vhost-user-gpu/vhost-user-gpu.c
-+++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
-@@ -489,6 +489,11 @@ vg_resource_attach_backing(VuGpu *g,
-         return;
-     }
- 
-+    if (res->iov) {
-+        cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
-+        return;
-+    }
-+
-     ret = vg_create_mapping_iov(g, &ab, cmd, &res->iov);
-     if (ret != 0) {
-         cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC;
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
deleted file mode 100644
index 330bcaef0a..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4127296bb1046cdf73994ba69dc913d8c02fd74f Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 20 Oct 2015 22:19:08 +0100
-Subject: [PATCH] qemu: disable Valgrind
-
-There isn't an option to enable or disable valgrind support, so disable it to avoid non-deterministic builds.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
----
- configure | 9 ---------
- 1 file changed, 9 deletions(-)
-
-Index: qemu-6.0.0/configure
-===================================================================
---- qemu-6.0.0.orig/configure
-+++ qemu-6.0.0/configure
-@@ -4648,15 +4648,6 @@ fi
- # check if we have valgrind/valgrind.h
- 
- valgrind_h=no
--cat > $TMPC << EOF
--#include <valgrind/valgrind.h>
--int main(void) {
--  return 0;
--}
--EOF
--if compile_prog "" "" ; then
--    valgrind_h=yes
--fi
- 
- ########################################
- # check if environ is declared
diff --git a/meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch b/meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch
deleted file mode 100644
index 9fc2fafe1d..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0004-vhost-user-gpu-fix-memory-leak-while-calling-vg_reso.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-CVE: CVE-2021-3544
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From b7afebcf9e6ecf3cf9b5a9b9b731ed04bca6aa3e Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@163.com>
-Date: Sat, 15 May 2021 20:03:59 -0700
-Subject: [PATCH 4/7] vhost-user-gpu: fix memory leak while calling
- 'vg_resource_unref' (CVE-2021-3544)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If the guest trigger following sequences, the attach_backing will be leaked:
-
-	vg_resource_create_2d
-	vg_resource_attach_backing
-	vg_resource_unref
-
-This patch fix this by freeing 'res->iov' in vg_resource_destroy.
-
-Fixes: CVE-2021-3544
-Reported-by: Li Qiang <liq3ea@163.com>
-virtio-gpu fix: 5e8e3c4c75 ("virtio-gpu: fix resource leak
-in virgl_cmd_resource_unref")
-
-Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
-Signed-off-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210516030403.107723-5-liq3ea@163.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- contrib/vhost-user-gpu/vhost-user-gpu.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
-index 0437e52b64..770dfad529 100644
---- a/contrib/vhost-user-gpu/vhost-user-gpu.c
-+++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
-@@ -400,6 +400,7 @@ vg_resource_destroy(VuGpu *g,
-     }
- 
-     vugbm_buffer_destroy(&res->buffer);
-+    g_free(res->iov);
-     pixman_image_unref(res->image);
-     QTAILQ_REMOVE(&g->reslist, res, next);
-     g_free(res);
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch b/meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch
deleted file mode 100644
index e70f3c02c2..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0005-vhost-user-gpu-fix-memory-leak-in-virgl_cmd_resource.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-CVE: CVE-2021-3544
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From f6091d86ba9ea05f4e111b9b42ee0005c37a6779 Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@163.com>
-Date: Sat, 15 May 2021 20:04:00 -0700
-Subject: [PATCH 5/7] vhost-user-gpu: fix memory leak in
- 'virgl_cmd_resource_unref' (CVE-2021-3544)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The 'res->iov' will be leaked if the guest trigger following sequences:
-
-	virgl_cmd_create_resource_2d
-	virgl_resource_attach_backing
-	virgl_cmd_resource_unref
-
-This patch fixes this.
-
-Fixes: CVE-2021-3544
-Reported-by: Li Qiang <liq3ea@163.com>
-virtio-gpu fix: 5e8e3c4c75 ("virtio-gpu: fix resource leak
-in virgl_cmd_resource_unref"
-
-Signed-off-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210516030403.107723-6-liq3ea@163.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- contrib/vhost-user-gpu/virgl.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
-index 6a332d601f..c669d73a1d 100644
---- a/contrib/vhost-user-gpu/virgl.c
-+++ b/contrib/vhost-user-gpu/virgl.c
-@@ -108,9 +108,16 @@ virgl_cmd_resource_unref(VuGpu *g,
-                          struct virtio_gpu_ctrl_command *cmd)
- {
-     struct virtio_gpu_resource_unref unref;
-+    struct iovec *res_iovs = NULL;
-+    int num_iovs = 0;
- 
-     VUGPU_FILL_CMD(unref);
- 
-+    virgl_renderer_resource_detach_iov(unref.resource_id,
-+                                       &res_iovs,
-+                                       &num_iovs);
-+    g_free(res_iovs);
-+
-     virgl_renderer_resource_unref(unref.resource_id);
- }
- 
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch b/meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch
deleted file mode 100644
index 5efb87ca33..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0006-vhost-user-gpu-fix-memory-leak-in-virgl_resource_att.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-CVE: CVE-2021-3544
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 63736af5a6571d9def93769431e0d7e38c6677bf Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@163.com>
-Date: Sat, 15 May 2021 20:04:01 -0700
-Subject: [PATCH 6/7] vhost-user-gpu: fix memory leak in
- 'virgl_resource_attach_backing' (CVE-2021-3544)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If 'virgl_renderer_resource_attach_iov' failed, the 'res_iovs' will
-be leaked.
-
-Fixes: CVE-2021-3544
-Reported-by: Li Qiang <liq3ea@163.com>
-virtio-gpu fix: 33243031da ("virtio-gpu-3d: fix memory leak
-in resource attach backing")
-
-Signed-off-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210516030403.107723-7-liq3ea@163.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- contrib/vhost-user-gpu/virgl.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
-index c669d73a1d..a16a311d80 100644
---- a/contrib/vhost-user-gpu/virgl.c
-+++ b/contrib/vhost-user-gpu/virgl.c
-@@ -287,8 +287,11 @@ virgl_resource_attach_backing(VuGpu *g,
-         return;
-     }
- 
--    virgl_renderer_resource_attach_iov(att_rb.resource_id,
-+    ret = virgl_renderer_resource_attach_iov(att_rb.resource_id,
-                                        res_iovs, att_rb.nr_entries);
-+    if (ret != 0) {
-+        g_free(res_iovs);
-+    }
- }
- 
- static void
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch b/meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch
deleted file mode 100644
index 33e6a66193..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0007-vhost-user-gpu-fix-OOB-write-in-virgl_cmd_get_capset.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-CVE: CVE-2021-3546
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 9f22893adcb02580aee5968f32baa2cd109b3ec2 Mon Sep 17 00:00:00 2001
-From: Li Qiang <liq3ea@163.com>
-Date: Sat, 15 May 2021 20:04:02 -0700
-Subject: [PATCH 7/7] vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset'
- (CVE-2021-3546)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If 'virgl_cmd_get_capset' set 'max_size' to 0,
-the 'virgl_renderer_fill_caps' will write the data after the 'resp'.
-This patch avoid this by checking the returned 'max_size'.
-
-virtio-gpu fix: abd7f08b23 ("display: virtio-gpu-3d: check
-virgl capabilities max_size")
-
-Fixes: CVE-2021-3546
-Reported-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
-Signed-off-by: Li Qiang <liq3ea@163.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210516030403.107723-8-liq3ea@163.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
----
- contrib/vhost-user-gpu/virgl.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
-index a16a311d80..7172104b19 100644
---- a/contrib/vhost-user-gpu/virgl.c
-+++ b/contrib/vhost-user-gpu/virgl.c
-@@ -177,6 +177,10 @@ virgl_cmd_get_capset(VuGpu *g,
- 
-     virgl_renderer_get_cap_set(gc.capset_id, &max_ver,
-                                &max_size);
-+    if (!max_size) {
-+        cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
-+        return;
-+    }
-     resp = g_malloc0(sizeof(*resp) + max_size);
- 
-     resp->hdr.type = VIRTIO_GPU_RESP_OK_CAPSET;
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
index cc6a5fe754..4298964dfa 100644
--- a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
+++ b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -1,4 +1,4 @@
-From c207607cdf3996ad9783c3bffbcd3d65e74c0158 Mon Sep 17 00:00:00 2001
+From b51e6dd833172954c718bd600d846540eeb07220 Mon Sep 17 00:00:00 2001
 From: He Zhe <zhe.he@windriver.com>
 Date: Wed, 28 Aug 2019 19:56:28 +0800
 Subject: [PATCH] configure: Add pkg-config handling for libgcrypt
@@ -11,74 +11,19 @@ Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-0
 Signed-off-by: He Zhe <zhe.he@windriver.com>
 
 ---
- configure | 48 ++++++++++++++++++++++++++++++++++++++++--------
- 1 file changed, 40 insertions(+), 8 deletions(-)
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: qemu-6.0.0/configure
-===================================================================
---- qemu-6.0.0.orig/configure
-+++ qemu-6.0.0/configure
-@@ -2847,6 +2847,30 @@ has_libgcrypt() {
-     return 0
- }
- 
-+has_libgcrypt_pkgconfig() {
-+    if ! has $pkg_config ; then
-+        return 1
-+    fi
-+
-+    if ! $pkg_config --list-all | grep libgcrypt > /dev/null 2>&1 ; then
-+        return 1
-+    fi
-+
-+    if test -n "$cross_prefix" ; then
-+        host=$($pkg_config --variable=host libgcrypt)
-+        if test "${host%-gnu}-" != "${cross_prefix%-gnu}" ; then
-+            print_error "host($host) does not match cross_prefix($cross_prefix)"
-+            return 1
-+        fi
-+    fi
-+
-+    if ! $pkg_config --atleast-version=1.5.0 libgcrypt ; then
-+        print_error "libgcrypt version is $($pkg_config --modversion libgcrypt)"
-+        return 1
-+    fi
-+
-+    return 0
-+}
- 
- if test "$nettle" != "no"; then
-     pass="no"
-@@ -2885,7 +2909,14 @@ fi
- 
- if test "$gcrypt" != "no"; then
-     pass="no"
--    if has_libgcrypt; then
-+    if has_libgcrypt_pkgconfig; then
-+        gcrypt_cflags=$($pkg_config --cflags libgcrypt)
-+        if test "$static" = "yes" ; then
-+            gcrypt_libs=$($pkg_config --libs --static libgcrypt)
-+        else
-+            gcrypt_libs=$($pkg_config --libs libgcrypt)
-+        fi
-+    elif has_libgcrypt; then
-         gcrypt_cflags=$(libgcrypt-config --cflags)
-         gcrypt_libs=$(libgcrypt-config --libs)
-         # Debian has removed -lgpg-error from libgcrypt-config
-@@ -2895,12 +2926,12 @@ if test "$gcrypt" != "no"; then
-         then
-             gcrypt_libs="$gcrypt_libs -lgpg-error"
-         fi
-+    fi
- 
--        # Link test to make sure the given libraries work (e.g for static).
--        write_c_skeleton
--        if compile_prog "" "$gcrypt_libs" ; then
-+    # Link test to make sure the given libraries work (e.g for static).
-+    write_c_skeleton
-+    if compile_prog "" "$gcrypt_libs" ; then
-             pass="yes"
--        fi
-     fi
-     if test "$pass" = "yes"; then
-         gcrypt="yes"
+diff --git a/meson.build b/meson.build
+index b3e7ec0e9..4cbe715b7 100644
+--- a/meson.build
++++ b/meson.build
+@@ -874,7 +874,7 @@ endif
+ if not gnutls_crypto.found()
+   if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled()
+     gcrypt = dependency('libgcrypt', version: '>=1.8',
+-                        method: 'config-tool',
++                        method: 'pkg-config',
+                         required: get_option('gcrypt'),
+                         kwargs: static_kwargs)
+     # Debian has removed -lgpg-error from libgcrypt-config
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3527-1.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3527-1.patch
deleted file mode 100644
index 77a5385692..0000000000
--- a/meta/recipes-devtools/qemu/qemu/CVE-2021-3527-1.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 05a40b172e4d691371534828078be47e7fff524c Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 3 May 2021 15:29:15 +0200
-Subject: [PATCH] usb: limit combined packets to 1 MiB (CVE-2021-3527)
-
-usb-host and usb-redirect try to batch bulk transfers by combining many
-small usb packets into a single, large transfer request, to reduce the
-overhead and improve performance.
-
-This patch adds a size limit of 1 MiB for those combined packets to
-restrict the host resources the guest can bind that way.
-
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Message-Id: <20210503132915.2335822-6-kraxel@redhat.com>
-
-Upstream-Status: Backport
-https://gitlab.com/qemu-project/qemu/-/commit/05a40b172e4d691371534828078be47e7fff524c
-CVE: CVE-2021-3527
-Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
-
----
- hw/usb/combined-packet.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/hw/usb/combined-packet.c b/hw/usb/combined-packet.c
-index 5d57e883dc..e56802f89a 100644
---- a/hw/usb/combined-packet.c
-+++ b/hw/usb/combined-packet.c
-@@ -171,7 +171,9 @@ void usb_ep_combine_input_packets(USBEndpoint *ep)
-         if ((p->iov.size % ep->max_packet_size) != 0 || !p->short_not_ok ||
-                 next == NULL ||
-                 /* Work around for Linux usbfs bulk splitting + migration */
--                (totalsize == (16 * KiB - 36) && p->int_req)) {
-+                (totalsize == (16 * KiB - 36) && p->int_req) ||
-+                /* Next package may grow combined package over 1MiB */
-+                totalsize > 1 * MiB - ep->max_packet_size) {
-             usb_device_handle_data(ep->dev, first);
-             assert(first->status == USB_RET_ASYNC);
-             if (first->combined) {
--- 
-GitLab
-
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3527-2.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3527-2.patch
deleted file mode 100644
index 6371aced12..0000000000
--- a/meta/recipes-devtools/qemu/qemu/CVE-2021-3527-2.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Mon, 3 May 2021 15:29:12 +0200
-Subject: [PATCH] usb/redir: avoid dynamic stack allocation (CVE-2021-3527)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Use autofree heap allocation instead.
-
-Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket")
-Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-Message-Id: <20210503132915.2335822-3-kraxel@redhat.com>
-
-Upstream-Status: Backport
-https://gitlab.com/qemu-project/qemu/-/commit/7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
-CVE: CVE-2021-3527
-Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
-
----
- hw/usb/redirect.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
-index 17f06f3417..6a75b0dc4a 100644
---- a/hw/usb/redirect.c
-+++ b/hw/usb/redirect.c
-@@ -620,7 +620,7 @@ static void usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
-                 .endpoint = ep,
-                 .length = p->iov.size
-             };
--            uint8_t buf[p->iov.size];
-+            g_autofree uint8_t *buf = g_malloc(p->iov.size);
-             /* No id, we look at the ep when receiving a status back */
-             usb_packet_copy(p, buf, p->iov.size);
-             usbredirparser_send_iso_packet(dev->parser, 0, &iso_packet,
-@@ -818,7 +818,7 @@ static void usbredir_handle_bulk_data(USBRedirDevice *dev, USBPacket *p,
-         usbredirparser_send_bulk_packet(dev->parser, p->id,
-                                         &bulk_packet, NULL, 0);
-     } else {
--        uint8_t buf[size];
-+        g_autofree uint8_t *buf = g_malloc(size);
-         usb_packet_copy(p, buf, size);
-         usbredir_log_data(dev, "bulk data out:", buf, size);
-         usbredirparser_send_bulk_packet(dev->parser, p->id,
-@@ -923,7 +923,7 @@ static void usbredir_handle_interrupt_out_data(USBRedirDevice *dev,
-                                                USBPacket *p, uint8_t ep)
- {
-     struct usb_redir_interrupt_packet_header interrupt_packet;
--    uint8_t buf[p->iov.size];
-+    g_autofree uint8_t *buf = g_malloc(p->iov.size);
- 
-     DPRINTF("interrupt-out ep %02X len %zd id %"PRIu64"\n", ep,
-             p->iov.size, p->id);
--- 
-GitLab
-
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3682.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3682.patch
deleted file mode 100644
index 50a49233d3..0000000000
--- a/meta/recipes-devtools/qemu/qemu/CVE-2021-3682.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5e796671e6b8d5de4b0b423dce1b3eba144a92c9 Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kraxel@redhat.com>
-Date: Thu, 22 Jul 2021 09:27:56 +0200
-Subject: [PATCH] usbredir: fix free call
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-data might point into the middle of a larger buffer, there is a separate
-free_on_destroy pointer passed into bufp_alloc() to handle that.  It is
-only used in the normal workflow though, not when dropping packets due
-to the queue being full.  Fix that.
-
-Resolves: https://gitlab.com/qemu-project/qemu/-/issues/491
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-Message-Id: <20210722072756.647673-1-kraxel@redhat.com>
-
-CVE: CVE-2021-3682
-Upstream-Status: Backport [5e796671e6b8d5de4b0b423dce1b3eba144a92c9]
-Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
----
- hw/usb/redirect.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
-index 4ec9326e05..1ec909a63a 100644
---- a/hw/usb/redirect.c
-+++ b/hw/usb/redirect.c
-@@ -476,7 +476,7 @@ static int bufp_alloc(USBRedirDevice *dev, uint8_t *data, uint16_t len,
-     if (dev->endpoint[EP2I(ep)].bufpq_dropping_packets) {
-         if (dev->endpoint[EP2I(ep)].bufpq_size >
-                 dev->endpoint[EP2I(ep)].bufpq_target_size) {
--            free(data);
-+            free(free_on_destroy);
-             return -1;
-         }
-         dev->endpoint[EP2I(ep)].bufpq_dropping_packets = 0;
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/cross.patch b/meta/recipes-devtools/qemu/qemu/cross.patch
index a0fc39e5e2..bdb77ec7d0 100644
--- a/meta/recipes-devtools/qemu/qemu/cross.patch
+++ b/meta/recipes-devtools/qemu/qemu/cross.patch
@@ -1,30 +1,40 @@
+From f51ece86f84c877f255746cba22a6745f37d2b7f Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Tue, 5 Jan 2021 23:00:14 +0000
+Subject: [PATCH] qemu: Upgrade 5.1.0->5.2.0
+
 We need to be able to trigger configure's cross code but we don't want
 to set cross_prefix as it does other things we don't want. Patch things
 so we can do what we need in the target config case.
 
 Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?]
 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+---
+ configure | 4 ----
+ 1 file changed, 4 deletions(-)
 
-
-Index: qemu-6.0.0/configure
-===================================================================
---- qemu-6.0.0.orig/configure
-+++ qemu-6.0.0/configure
-@@ -6371,7 +6371,6 @@ if has $sdl2_config; then
- fi
- echo "strip = [$(meson_quote $strip)]" >> $cross
- echo "windres = [$(meson_quote $windres)]" >> $cross
--if test "$cross_compile" = "yes"; then
+diff --git a/configure b/configure
+index 9a79a004d..563b7827f 100755
+--- a/configure
++++ b/configure
+@@ -5128,7 +5128,6 @@ if test "$skip_meson" = no; then
+   fi
+   echo "strip = [$(meson_quote $strip)]" >> $cross
+   echo "windres = [$(meson_quote $windres)]" >> $cross
+-  if test "$cross_compile" = "yes"; then
      cross_arg="--cross-file config-meson.cross"
      echo "[host_machine]" >> $cross
      if test "$mingw32" = "yes" ; then
-@@ -6403,9 +6402,6 @@ if test "$cross_compile" = "yes"; then
+@@ -5160,9 +5159,6 @@ if test "$skip_meson" = no; then
      else
          echo "endian = 'little'" >> $cross
      fi
--else
+-  else
 -    cross_arg="--native-file config-meson.cross"
--fi
- mv $cross config-meson.cross
+-  fi
+   mv $cross config-meson.cross
  
- rm -rf meson-private meson-info meson-logs
+   rm -rf meson-private meson-info meson-logs
+-- 
+2.17.1
+
diff --git a/meta/recipes-devtools/qemu/qemu_6.0.0.bb b/meta/recipes-devtools/qemu/qemu_6.1.0.bb
similarity index 100%
rename from meta/recipes-devtools/qemu/qemu_6.0.0.bb
rename to meta/recipes-devtools/qemu/qemu_6.1.0.bb
-- 
2.31.1


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

* [PATCH 11/26] runqemu: correct vga-virtio option to keep virgl enabled
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (8 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 10/26] qemu: update 6.0.0 -> 6.1.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 12/26] gnupg: update 2.3.1 -> 2.3.2 Alexander Kanavin
                   ` (16 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

qemu 6.1 has (perhaps unintentionally) disabled virgl in -vga virtio:
https://gitlab.com/qemu-project/qemu/-/issues/586

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index c467b0eb19..3268bb18ad 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1350,7 +1350,7 @@ class BaseConfig(object):
 
         if self.sdl == True or self.gtk == True or self.egl_headless == True:
             self.set_dri_path()
-            self.qemu_opt += ' -vga virtio -display '
+            self.qemu_opt += ' -device virtio-vga-gl -display '
             if self.egl_headless == True:
                 self.qemu_opt += 'egl-headless,'
             else:
-- 
2.31.1


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

* [PATCH 12/26] gnupg: update 2.3.1 -> 2.3.2
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (9 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 11/26] runqemu: correct vga-virtio option to keep virgl enabled Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 13/26] pinentry: update 1.1.1 -> 1.2.0 Alexander Kanavin
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Drop chunk from relocate.patch, the upstream code no longer exists.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...-a-custom-value-for-the-location-of-.patch |  6 +--
 .../gnupg/gnupg/relocate.patch                | 39 +++++++------------
 .../gnupg/{gnupg_2.3.1.bb => gnupg_2.3.2.bb}  |  2 +-
 3 files changed, 19 insertions(+), 28 deletions(-)
 rename meta/recipes-support/gnupg/{gnupg_2.3.1.bb => gnupg_2.3.2.bb} (97%)

diff --git a/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch b/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
index ecd6263626..a66a8e62b0 100644
--- a/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
+++ b/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
@@ -1,4 +1,4 @@
-From 52ba9d34cd9317145ee8a93afd5d73dd0cbf3182 Mon Sep 17 00:00:00 2001
+From c873c85b1ee1c35ebbba0bc80c2352c64787a5fd Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Mon, 22 Jan 2018 18:00:21 +0200
 Subject: [PATCH] configure.ac: use a custom value for the location of
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index 7a2d410..14a7203 100644
+index d03ea3b..a6dfa19 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1841,7 +1841,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
+@@ -1958,7 +1958,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
  
  AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
  
diff --git a/meta/recipes-support/gnupg/gnupg/relocate.patch b/meta/recipes-support/gnupg/gnupg/relocate.patch
index 9b0f0a8ce0..f9f38c2876 100644
--- a/meta/recipes-support/gnupg/gnupg/relocate.patch
+++ b/meta/recipes-support/gnupg/gnupg/relocate.patch
@@ -1,4 +1,4 @@
-From d6992692d1c36983b709fe1ff049cc91ef2c408a Mon Sep 17 00:00:00 2001
+From 5a68a37ae2649e0988965cfe3a63a0142f0182a1 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Wed, 19 Sep 2018 14:44:40 +0100
 Subject: [PATCH] Allow the environment to override where gnupg looks for its
@@ -8,23 +8,23 @@ Upstream-Status: Inappropriate [OE-specific]
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
 ---
- common/homedir.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
+ common/homedir.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/common/homedir.c b/common/homedir.c
-index 85e09c4..e1410e2 100644
+index 7969a2c..06b8016 100644
 --- a/common/homedir.c
 +++ b/common/homedir.c
-@@ -788,7 +788,7 @@ gnupg_socketdir (void)
+@@ -918,7 +918,7 @@ gnupg_socketdir (void)
    if (!name)
      {
        unsigned int dummy;
 -      name = _gnupg_socketdir_internal (0, &dummy);
 +      name = getenv("GNUPG_SOCKETDIR") ?: _gnupg_socketdir_internal (0, &dummy);
+       gpgrt_annotate_leaked_object (name);
      }
  
-   return name;
-@@ -814,7 +814,7 @@ gnupg_sysconfdir (void)
+@@ -946,7 +946,7 @@ gnupg_sysconfdir (void)
      }
    return name;
  #else /*!HAVE_W32_SYSTEM*/
@@ -33,7 +33,7 @@ index 85e09c4..e1410e2 100644
  #endif /*!HAVE_W32_SYSTEM*/
  }
  
-@@ -843,7 +843,7 @@ gnupg_bindir (void)
+@@ -978,7 +978,7 @@ gnupg_bindir (void)
    else
      return rdir;
  #else /*!HAVE_W32_SYSTEM*/
@@ -42,7 +42,7 @@ index 85e09c4..e1410e2 100644
  #endif /*!HAVE_W32_SYSTEM*/
  }
  
-@@ -856,7 +856,7 @@ gnupg_libexecdir (void)
+@@ -991,7 +991,7 @@ gnupg_libexecdir (void)
  #ifdef HAVE_W32_SYSTEM
    return gnupg_bindir ();
  #else /*!HAVE_W32_SYSTEM*/
@@ -51,8 +51,8 @@ index 85e09c4..e1410e2 100644
  #endif /*!HAVE_W32_SYSTEM*/
  }
  
-@@ -870,7 +870,7 @@ gnupg_libdir (void)
-     name = xstrconcat (w32_rootdir (), DIRSEP_S "lib" DIRSEP_S "gnupg", NULL);
+@@ -1008,7 +1008,7 @@ gnupg_libdir (void)
+     }
    return name;
  #else /*!HAVE_W32_SYSTEM*/
 -  return GNUPG_LIBDIR;
@@ -60,8 +60,8 @@ index 85e09c4..e1410e2 100644
  #endif /*!HAVE_W32_SYSTEM*/
  }
  
-@@ -884,7 +884,7 @@ gnupg_datadir (void)
-     name = xstrconcat (w32_rootdir (), DIRSEP_S "share" DIRSEP_S "gnupg", NULL);
+@@ -1026,7 +1026,7 @@ gnupg_datadir (void)
+     }
    return name;
  #else /*!HAVE_W32_SYSTEM*/
 -  return GNUPG_DATADIR;
@@ -69,8 +69,8 @@ index 85e09c4..e1410e2 100644
  #endif /*!HAVE_W32_SYSTEM*/
  }
  
-@@ -900,7 +900,7 @@ gnupg_localedir (void)
-                        NULL);
+@@ -1045,7 +1045,7 @@ gnupg_localedir (void)
+     }
    return name;
  #else /*!HAVE_W32_SYSTEM*/
 -  return LOCALEDIR;
@@ -78,12 +78,3 @@ index 85e09c4..e1410e2 100644
  #endif /*!HAVE_W32_SYSTEM*/
  }
  
-@@ -971,7 +971,7 @@ gnupg_cachedir (void)
-     }
-   return dir;
- #else /*!HAVE_W32_SYSTEM*/
--  return GNUPG_LOCALSTATEDIR "/cache/" PACKAGE_NAME;
-+  return getenv("GNUPG_LOCALSTATEDIR") ?: GNUPG_LOCALSTATEDIR "/cache/" PACKAGE_NAME;
- #endif /*!HAVE_W32_SYSTEM*/
- }
- 
diff --git a/meta/recipes-support/gnupg/gnupg_2.3.1.bb b/meta/recipes-support/gnupg/gnupg_2.3.2.bb
similarity index 97%
rename from meta/recipes-support/gnupg/gnupg_2.3.1.bb
rename to meta/recipes-support/gnupg/gnupg_2.3.2.bb
index b8b0314d2f..135395e55d 100644
--- a/meta/recipes-support/gnupg/gnupg_2.3.1.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.3.2.bb
@@ -24,7 +24,7 @@ SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-
                                 file://relocate.patch"
 SRC_URI:append:class-nativesdk = " file://relocate.patch"
 
-SRC_URI[sha256sum] = "c498db346a9b9a4b399e514c8f56dfc0a888ce8f327f10376ff984452cd154ec"
+SRC_URI[sha256sum] = "e1d953e0e296072fca284215103ef168885eaac596c4660c5039a36a83e3041b"
 
 EXTRA_OECONF = "--disable-ldap \
 		--disable-ccid-driver \
-- 
2.31.1


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

* [PATCH 13/26] pinentry: update 1.1.1 -> 1.2.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (10 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 12/26] gnupg: update 2.3.1 -> 2.3.2 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 14/26] spirv-tools: update 2021.2 -> 2021.3 Alexander Kanavin
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Rebase patches.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/lib/oeqa/selftest/cases/oescripts.py     |   2 +-
 .../gpg-error_pkconf.patch                    | 126 ++++++++++--------
 .../libassuan_pkgconf.patch                   |   0
 .../{pinentry_1.1.1.bb => pinentry_1.2.0.bb}  |   2 +-
 4 files changed, 74 insertions(+), 56 deletions(-)
 rename meta/recipes-support/pinentry/{pinentry-1.1.1 => pinentry-1.2.0}/gpg-error_pkconf.patch (57%)
 rename meta/recipes-support/pinentry/{pinentry-1.1.1 => pinentry-1.2.0}/libassuan_pkgconf.patch (100%)
 rename meta/recipes-support/pinentry/{pinentry_1.1.1.bb => pinentry_1.2.0.bb} (93%)

diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py
index 8a10ff357b..255994b0f8 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -167,7 +167,7 @@ class OEListPackageconfigTests(OEScriptTests):
     def test_packageconfig_flags_option_all(self):
         results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir)
         expected_endlines = []
-        expected_endlines.append("pinentry-1.1.1")
+        expected_endlines.append("pinentry-1.2.0")
         expected_endlines.append("PACKAGECONFIG ncurses libcap")
         expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase")
         expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0")
diff --git a/meta/recipes-support/pinentry/pinentry-1.1.1/gpg-error_pkconf.patch b/meta/recipes-support/pinentry/pinentry-1.2.0/gpg-error_pkconf.patch
similarity index 57%
rename from meta/recipes-support/pinentry/pinentry-1.1.1/gpg-error_pkconf.patch
rename to meta/recipes-support/pinentry/pinentry-1.2.0/gpg-error_pkconf.patch
index 537735dba8..507c0c3917 100644
--- a/meta/recipes-support/pinentry/pinentry-1.1.1/gpg-error_pkconf.patch
+++ b/meta/recipes-support/pinentry/pinentry-1.2.0/gpg-error_pkconf.patch
@@ -1,4 +1,4 @@
-From 7b60f1563ecdb7020c145de8a96cae1c0a66c595 Mon Sep 17 00:00:00 2001
+From 54a4c9d3e5f1897ed4b978d5cdee646ca7a4f637 Mon Sep 17 00:00:00 2001
 From: Armin Kuster <akuster@mvista.com>
 Date: Fri, 2 Sep 2005 11:50:01 +0000
 Subject: [PATCH] Add gtk+, avahi, dbus-0.34 (.36 coming soon) and
@@ -11,14 +11,14 @@ Upstream-Status: Inappropriate [OE specific]
 Signed-off-by: Armin Kuster <akuster@mvista.com>
 
 ---
- m4/gpg-error.m4 | 141 ++----------------------------------------------
- 1 file changed, 4 insertions(+), 137 deletions(-)
+ m4/gpg-error.m4 | 159 ++----------------------------------------------
+ 1 file changed, 4 insertions(+), 155 deletions(-)
 
 diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4
-index c9b235f..a4fd41c 100644
+index 56a5d07..c0bec1f 100644
 --- a/m4/gpg-error.m4
 +++ b/m4/gpg-error.m4
-@@ -25,141 +25,12 @@ dnl config script does not match the host specification the script
+@@ -26,159 +26,12 @@ dnl config script does not match the host specification the script
  dnl is added to the gpg_config_script_warn variable.
  dnl
  AC_DEFUN([AM_PATH_GPG_ERROR],
@@ -61,45 +61,79 @@ index c9b235f..a4fd41c 100644
 -  min_gpg_error_version=ifelse([$1], ,1.33,$1)
 -  ok=no
 -
--  if test "$prefix" = NONE ; then
--    prefix_option_expanded=/usr/local
--  else
--    prefix_option_expanded="$prefix"
--  fi
--  if test "$exec_prefix" = NONE ; then
--    exec_prefix_option_expanded=$prefix_option_expanded
--  else
--    exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix)
--  fi
--  libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir)
+-  AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH])
+-  if test "$GPGRT_CONFIG" != "no"; then
+-    # Determine gpgrt_libdir
+-    #
+-    # Get the prefix of gpgrt-config assuming it's something like:
+-    #   <PREFIX>/bin/gpgrt-config
+-    gpgrt_prefix=${GPGRT_CONFIG%/*/*}
+-    possible_libdir1=${gpgrt_prefix}/lib
+-    # Determine by using system libdir-format with CC, it's like:
+-    #   Normal style: /usr/lib
+-    #   GNU cross style: /usr/<triplet>/lib
+-    #   Debian style: /usr/lib/<multiarch-name>
+-    #   Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64
+-    # It is assumed that CC is specified to the one of host on cross build.
+-    if libdir_candidates=$(${CC:-cc} -print-search-dirs | \
+-          sed -n -e "/^libraries/{s/libraries: =//;s/:/\\
+-/g;p;}"); then
+-      # From the output of -print-search-dirs, select valid pkgconfig dirs.
+-      libdir_candidates=$(for dir in $libdir_candidates; do
+-        if p=$(cd $dir 2>/dev/null && pwd); then
+-          test -d "$p/pkgconfig" && echo $p;
+-        fi
+-      done)
 -
--  if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then
--    gpgrt_libdir=$libdir_option_expanded
--  else
--    if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
--      if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
--        if test -f $possible_libdir/pkgconfig/gpg-error.pc; then
--          gpgrt_libdir=$possible_libdir
+-      for possible_libdir0 in $libdir_candidates; do
+-        # possible_libdir0:
+-        #   Fallback candidate, the one of system-installed (by $CC)
+-        #   (/usr/<triplet>/lib, /usr/lib/<multiarch-name> or /usr/lib32)
+-        # possible_libdir1:
+-        #   Another candidate, user-locally-installed
+-        #   (<gpgrt_prefix>/lib)
+-        # possible_libdir2
+-        #   Most preferred
+-        #   (<gpgrt_prefix>/<triplet>/lib,
+-        #    <gpgrt_prefix>/lib/<multiarch-name> or <gpgrt_prefix>/lib32)
+-        if test "${possible_libdir0##*/}" = "lib"; then
+-          possible_prefix0=${possible_libdir0%/lib}
+-          possible_prefix0_triplet=${possible_prefix0##*/}
+-          if test -z "$possible_prefix0_triplet"; then
+-            continue
+-          fi
+-          possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib
+-        else
+-          possible_prefix0=${possible_libdir0%%/lib*}
+-          possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0}
+-        fi
+-        if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then
+-          gpgrt_libdir=${possible_libdir2}
+-        elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then
+-          gpgrt_libdir=${possible_libdir1}
+-        elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then
+-          gpgrt_libdir=${possible_libdir0}
 -        fi
--      fi
+-        if test -n "$gpgrt_libdir"; then break; fi
+-      done
+-    else
+-      # When we cannot determine system libdir-format, use this:
+-      gpgrt_libdir=${possible_libdir1}
 -    fi
+-  else
+-    unset GPGRT_CONFIG
 -  fi
 -
--  if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then
--    AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
--    if test "$GPGRT_CONFIG" = "no"; then
--      unset GPGRT_CONFIG
+-  if test -n "$gpgrt_libdir"; then
+-    GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
+-    if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
+-      GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
+-      AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
+-      gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
 -    else
--      GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
--      if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
--        GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
--        AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
--        gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
--      else
--        unset GPGRT_CONFIG
--      fi
+-      unset GPGRT_CONFIG
 -    fi
--  else
+-  elif test "$GPG_ERROR_CONFIG" != "no"; then
 -    gpg_error_config_version=`$GPG_ERROR_CONFIG --version`
 -  fi
 -  if test "$GPG_ERROR_CONFIG" != "no"; then
@@ -120,22 +154,6 @@ index c9b235f..a4fd41c 100644
 -            fi
 -        fi
 -    fi
--    if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then
--      if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then
--        AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
--        if test "$GPGRT_CONFIG" = "no"; then
--          unset GPGRT_CONFIG
--        else
--          GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
--          if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
--            GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
--            AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config])
--          else
--            unset GPGRT_CONFIG
--          fi
--        fi
--      fi
--    fi
 -  fi
 -  AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
 +[
@@ -164,7 +182,7 @@ index c9b235f..a4fd41c 100644
      if test x"$gpg_error_config_host" != xnone ; then
        if test x"$gpg_error_config_host" != x"$host" ; then
    AC_MSG_WARN([[
-@@ -174,10 +45,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
+@@ -193,10 +46,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
        fi
      fi
    else
diff --git a/meta/recipes-support/pinentry/pinentry-1.1.1/libassuan_pkgconf.patch b/meta/recipes-support/pinentry/pinentry-1.2.0/libassuan_pkgconf.patch
similarity index 100%
rename from meta/recipes-support/pinentry/pinentry-1.1.1/libassuan_pkgconf.patch
rename to meta/recipes-support/pinentry/pinentry-1.2.0/libassuan_pkgconf.patch
diff --git a/meta/recipes-support/pinentry/pinentry_1.1.1.bb b/meta/recipes-support/pinentry/pinentry_1.2.0.bb
similarity index 93%
rename from meta/recipes-support/pinentry/pinentry_1.1.1.bb
rename to meta/recipes-support/pinentry/pinentry_1.2.0.bb
index 98577fe3ef..504ba3b5cc 100644
--- a/meta/recipes-support/pinentry/pinentry_1.1.1.bb
+++ b/meta/recipes-support/pinentry/pinentry_1.2.0.bb
@@ -16,7 +16,7 @@ SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://gpg-error_pkconf.patch \
 "
 
-SRC_URI[sha256sum] = "cd12a064013ed18e2ee8475e669b9f58db1b225a0144debdb85a68cecddba57f"
+SRC_URI[sha256sum] = "10072045a3e043d0581f91cd5676fcac7ffee957a16636adedaa4f583a616470"
 
 inherit autotools pkgconfig
 
-- 
2.31.1


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

* [PATCH 14/26] spirv-tools: update 2021.2 -> 2021.3
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (11 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 13/26] pinentry: update 1.1.1 -> 1.2.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 15/26] glslang: update 11.5.0 -> 11.6.0 Alexander Kanavin
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Drop 0001-fix-strncpy-bound-error.patch; issue fixed upstream.

Bump spirv-headers revision to avoid outdated headers causing
build errors.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../files/0001-fix-strncpy-bound-error.patch  | 30 -------------------
 .../spir/spirv-headers_1.5.4.bb               |  2 +-
 ...-tools_2021.2.bb => spirv-tools_2021.3.bb} |  6 ++--
 3 files changed, 3 insertions(+), 35 deletions(-)
 delete mode 100644 meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch
 rename meta/recipes-graphics/spir/{spirv-tools_2021.2.bb => spirv-tools_2021.3.bb} (86%)

diff --git a/meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch b/meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch
deleted file mode 100644
index bc59faa37b..0000000000
--- a/meta/recipes-graphics/spir/files/0001-fix-strncpy-bound-error.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1ba007583b83468494c4146bcb7267d863de6a7b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 26 Feb 2021 23:54:10 -0800
-Subject: [PATCH] fix strncpy bound error
-
-This patch fixes the following error while using gcc 11
-error: 'char* __builtin_strncpy(char*, const char*, long unsigned int)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
-
-Upstream-Status: Submitted [https://github.com/KhronosGroup/SPIRV-Tools/pull/4151]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- source/diagnostic.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/source/diagnostic.cpp b/source/diagnostic.cpp
-index edc27c8fd..77c29d70c 100644
---- a/source/diagnostic.cpp
-+++ b/source/diagnostic.cpp
-@@ -37,7 +37,7 @@ spv_diagnostic spvDiagnosticCreate(const spv_position position,
-   diagnostic->position = *position;
-   diagnostic->isTextSource = false;
-   memset(diagnostic->error, 0, length);
--  strncpy(diagnostic->error, message, length);
-+  memcpy(diagnostic->error, message, length);
-   return diagnostic;
- }
- 
--- 
-2.30.1
-
diff --git a/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb b/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb
index 7a43af5e6b..8f8206d15c 100644
--- a/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb
+++ b/meta/recipes-graphics/spir/spirv-headers_1.5.4.bb
@@ -7,7 +7,7 @@ HOMEPAGE = "https://www.khronos.org/registry/spir-v"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=c938b85bceb8fb26c1a807f28a52ae2d"
 
-SRCREV = "bcf55210f13a4fa3c3d0963b509ff1070e434c79"
+SRCREV = "6cae8216a6ea19ff3f237af01e54378c1ff81fcd"
 SRC_URI = "git://github.com/KhronosGroup/SPIRV-Headers;protocol=https"
 UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$"
 S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/spir/spirv-tools_2021.2.bb b/meta/recipes-graphics/spir/spirv-tools_2021.3.bb
similarity index 86%
rename from meta/recipes-graphics/spir/spirv-tools_2021.2.bb
rename to meta/recipes-graphics/spir/spirv-tools_2021.3.bb
index f55bd5194a..62330f285d 100644
--- a/meta/recipes-graphics/spir/spirv-tools_2021.2.bb
+++ b/meta/recipes-graphics/spir/spirv-tools_2021.3.bb
@@ -7,10 +7,8 @@ SECTION = "graphics"
 LICENSE  = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRCREV = "e198c6a785d388db68eb9166b43ac5e5208fd5cc"
-SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git \
-           file://0001-fix-strncpy-bound-error.patch \
-          "
+SRCREV = "1fbed83c8aab8517d821fcb4164c08567951938f"
+SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git"
 UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
 S = "${WORKDIR}/git"
 
-- 
2.31.1


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

* [PATCH 15/26] glslang: update 11.5.0 -> 11.6.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (12 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 14/26] spirv-tools: update 2021.2 -> 2021.3 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 16/26] shaderc: update 2021.1 -> 2021.2 Alexander Kanavin
                   ` (12 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../glslang/{glslang_11.5.0.bb => glslang_11.6.0.bb}            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-graphics/glslang/{glslang_11.5.0.bb => glslang_11.6.0.bb} (95%)

diff --git a/meta/recipes-graphics/glslang/glslang_11.5.0.bb b/meta/recipes-graphics/glslang/glslang_11.6.0.bb
similarity index 95%
rename from meta/recipes-graphics/glslang/glslang_11.5.0.bb
rename to meta/recipes-graphics/glslang/glslang_11.6.0.bb
index 2f076e5684..c39be55d5f 100644
--- a/meta/recipes-graphics/glslang/glslang_11.5.0.bb
+++ b/meta/recipes-graphics/glslang/glslang_11.6.0.bb
@@ -8,7 +8,7 @@ HOMEPAGE = "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler"
 LICENSE = "BSD-3-Clause & BSD-2-Clause & MIT & Apache-2.0 & GPL-3-with-bison-exception"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c5ce49c0456e9b413b98a4368c378229"
 
-SRCREV = "ae2a562936cc8504c9ef2757cceaff163147834f"
+SRCREV = "2fb89a0072ae7316af1c856f22663fde4928128a"
 SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https \
            file://0001-generate-glslang-pkg-config.patch"
 UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$"
-- 
2.31.1


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

* [PATCH 16/26] shaderc: update 2021.1 -> 2021.2
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (13 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 15/26] glslang: update 11.5.0 -> 11.6.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 17/26] lttng: update 2.12 -> 2.13.0 Alexander Kanavin
                   ` (11 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../shaderc/{shaderc_2021.1.bb => shaderc_2021.2.bb}            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-graphics/shaderc/{shaderc_2021.1.bb => shaderc_2021.2.bb} (95%)

diff --git a/meta/recipes-graphics/shaderc/shaderc_2021.1.bb b/meta/recipes-graphics/shaderc/shaderc_2021.2.bb
similarity index 95%
rename from meta/recipes-graphics/shaderc/shaderc_2021.1.bb
rename to meta/recipes-graphics/shaderc/shaderc_2021.2.bb
index e15b5794ee..5d70b6a087 100644
--- a/meta/recipes-graphics/shaderc/shaderc_2021.1.bb
+++ b/meta/recipes-graphics/shaderc/shaderc_2021.2.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "https://github.com/google/shaderc"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
-SRCREV = "031a8c9715df5d7c69dcc1ee9d53cbfa35c7b026"
+SRCREV = "2c5ef1b8f8b1fdcbe1b22764e82d5caaa1d04ef9"
 SRC_URI = "git://github.com/google/shaderc.git;protocol=https;branch=main \
            file://0001-cmake-disable-building-external-dependencies.patch \
            file://0002-libshaderc_util-fix-glslang-header-file-location.patch \
-- 
2.31.1


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

* [PATCH 17/26] lttng: update 2.12 -> 2.13.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (14 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 16/26] shaderc: update 2021.1 -> 2021.2 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 18/26] core-image-ptest-all: bump RAM requirement to 4G Alexander Kanavin
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Drop 0001-tests-regression-disable-the-tools-live-tests.patch
(mass-disabling of ptests) and replace that with more targeted fixes:

- a patch that adds explicit sleeps where races due to too tight timings
were observed (not a proper fix; upstream needs to figure out how
to sync explicitly and reliably)

- LD_LIBRARY_PATH so that helper binaries are able to find their
custom libraries they're linked with (we strip rpath from them
for reproducibility)

- set pgrep location explicitly as it used unconditionally
on target, but auto-detected (incorrectly) on the host

- enable kmod as it is available in target images

- correct various missing scripts, binaries, and inhibit stripping
where that is expected.

License-Update: license info consolidated in LICENSE
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...1-src-common-correct-header-location.patch | 41 +++++++++
 ...ression-disable-the-tools-live-tests.patch | 55 ------------
 ...more-before-analysing-traces-or-star.patch | 88 +++++++++++++++++++
 .../lttng/lttng-tools/run-ptest               |  1 +
 ...-tools_2.12.4.bb => lttng-tools_2.13.0.bb} | 22 +++--
 ...-common-link-with-liburcu-explicitly.patch | 25 ++++++
 ...Makefile.am-Add-install-lib-to-setup.patch | 22 +++--
 ...ttng-ust_2.12.2.bb => lttng-ust_2.13.0.bb} |  7 +-
 8 files changed, 185 insertions(+), 76 deletions(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch
 delete mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch
 rename meta/recipes-kernel/lttng/{lttng-tools_2.12.4.bb => lttng-tools_2.13.0.bb} (88%)
 create mode 100644 meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch
 rename meta/recipes-kernel/lttng/{lttng-ust_2.12.2.bb => lttng-ust_2.13.0.bb} (83%)

diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch
new file mode 100644
index 0000000000..925b51c3ce
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch
@@ -0,0 +1,41 @@
+From 790ef313364d1f1efb6f283705bb324eea2979ba Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sun, 5 Sep 2021 10:13:08 +0200
+Subject: [PATCH] src/common: correct header location
+
+sys/unistd.h is not guaranteed to exist, and does not with
+e.g. musl C library.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/common/kernel-probe.c    | 2 +-
+ src/common/userspace-probe.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/common/kernel-probe.c b/src/common/kernel-probe.c
+index 2beb53f..44100bc 100644
+--- a/src/common/kernel-probe.c
++++ b/src/common/kernel-probe.c
+@@ -20,7 +20,7 @@
+ #include <lttng/kernel-probe.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ 
+ static
+ int lttng_kernel_probe_location_address_serialize(
+diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c
+index 67b0ee6..66afc6f 100644
+--- a/src/common/userspace-probe.c
++++ b/src/common/userspace-probe.c
+@@ -20,7 +20,7 @@
+ #include <lttng/userspace-probe-internal.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+ 
+ static
+ int lttng_userspace_probe_location_function_set_binary_fd_handle(
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch
deleted file mode 100644
index 08c1423310..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From de9fc501e775cae05f1f87534b4237cd78e8d9a8 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 24 Jan 2020 18:03:25 +0100
-Subject: [PATCH] tests/regression: disable the tools/live tests
-
-They have been found to sporadically fail; the issue has been
-reported upstream and they will work to investigate and fix:
-https://bugs.lttng.org/issues/1217
-
-Upstream-Status: Inappropriate [upstream is working on a real fix]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- tests/regression/Makefile.am | 10 +---------
- 1 file changed, 1 insertion(+), 9 deletions(-)
-
-diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am
-index cbac90d..d467886 100644
---- a/tests/regression/Makefile.am
-+++ b/tests/regression/Makefile.am
-@@ -11,16 +11,10 @@ TESTS = tools/filtering/test_invalid_filter \
- 	tools/filtering/test_valid_filter \
- 	tools/streaming/test_ust \
- 	tools/health/test_thread_ok \
--	tools/live/test_ust \
--	tools/live/test_ust_tracefile_count \
--	tools/live/test_lttng_ust \
- 	tools/tracefile-limits/test_tracefile_count \
- 	tools/tracefile-limits/test_tracefile_size \
--	tools/exclusion/test_exclusion \
- 	tools/snapshots/test_ust_fast \
--	tools/snapshots/test_ust_streaming \
- 	tools/save-load/test_save \
--	tools/save-load/test_load \
- 	tools/save-load/test_autoload \
- 	tools/mi/test_mi \
- 	tools/wildcard/test_event_wildcard \
-@@ -38,8 +32,7 @@ TESTS = tools/filtering/test_invalid_filter \
- 	tools/working-directory/test_relayd_working_directory \
- 	tools/notification/test_notification_multi_app \
- 	tools/clear/test_ust \
--	tools/clear/test_kernel \
--	tools/tracker/test_event_tracker
-+	tools/clear/test_kernel
- 
- if HAVE_LIBLTTNG_UST_CTL
- SUBDIRS += ust
-@@ -60,7 +53,6 @@ TESTS += ust/before-after/test_before_after \
- 	ust/multi-lib/test_multi_lib \
- 	ust/rotation-destroy-flush/test_rotation_destroy_flush \
- 	ust/namespaces/test_ns_contexts \
--	ust/namespaces/test_ns_contexts_change \
- 	tools/metadata/test_ust \
- 	tools/relayd-grouping/test_ust
- endif # HAVE_LIBLTTNG_UST_CTL
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch
new file mode 100644
index 0000000000..c4cac9cc58
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch
@@ -0,0 +1,88 @@
+From 8d9daede0882d239b0a47b0f7a6db68ba4934a7d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sat, 4 Sep 2021 13:57:39 +0200
+Subject: [PATCH] tests: wait some more before analysing traces or starting
+ tracing
+
+Otherwise, there are sporadic race failures where lttng tracing
+is stopped before all expected events are collected or is started too soon, e.g.:
+
+PASS: tools/tracker/test_event_tracker 205 - Traced application stopped.
+PASS: tools/tracker/test_event_tracker 206 - Stop lttng tracing for session
+PASS: tools/tracker/test_event_tracker 207 - Destroy session tracker
+FAIL: tools/tracker/test_event_tracker 208 - Validate empty trace
+
+PASS: ust/namespaces/test_ns_contexts_change 42 - Stop lttng tracing for session mnt_ns
+PASS: ust/namespaces/test_ns_contexts_change 43 - Destroy session mnt_ns
+PASS: ust/namespaces/test_ns_contexts_change 44 - Wait after kill session daemon
+PASS: ust/namespaces/test_ns_contexts_change 45 - Validate trace for event mnt_ns = 4026531840, 1000 events
+PASS: ust/namespaces/test_ns_contexts_change 46 - Read a total of 1000 events, expected 1000
+PASS: ust/namespaces/test_ns_contexts_change 47 - Validate trace for event mnt_ns = 4026532303, 233 events
+FAIL: ust/namespaces/test_ns_contexts_change 48 - Read a total of 233 events, expected 1000
+
+This is a hack; issue should be fixed upstream with explicit syncs.
+It has been reported here: https://bugs.lttng.org/issues/1217
+
+Upstream-Status: Inappropriate [needs a real fix]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ tests/regression/tools/tracker/test_event_tracker       | 8 ++++++++
+ tests/regression/ust/namespaces/test_ns_contexts_change | 2 ++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
+index feb3787..a0f2257 100755
+--- a/tests/regression/tools/tracker/test_event_tracker
++++ b/tests/regression/tools/tracker/test_event_tracker
+@@ -130,6 +130,8 @@ function test_event_vpid_tracker()
+ 
+ 	prepare_"$domain"_app
+ 
++sleep 5
++
+ 	start_lttng_tracing_ok
+ 
+ 	if [ "$expect_event" -eq 1 ]; then
+@@ -173,6 +175,8 @@ function test_event_pid_tracker()
+ 
+ 	prepare_"$domain"_app
+ 
++sleep 5
++
+ 	start_lttng_tracing_ok
+ 
+ 	if [ "$expect_event" -eq 1 ]; then
+@@ -275,6 +279,8 @@ function test_event_vpid_track_untrack()
+ 
+ 	prepare_"$domain"_app
+ 
++sleep 5
++
+ 	start_lttng_tracing_ok
+ 
+ 	lttng_track_"$domain"_ok "--vpid ${CHILD_PID}"
+@@ -315,6 +321,8 @@ function test_event_pid_track_untrack()
+ 
+ 	prepare_"$domain"_app
+ 
++sleep 5
++
+ 	start_lttng_tracing_ok
+ 
+ 	lttng_track_"$domain"_ok "--pid ${CHILD_PID}"
+diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change
+index c0af15e..b111bfe 100755
+--- a/tests/regression/ust/namespaces/test_ns_contexts_change
++++ b/tests/regression/ust/namespaces/test_ns_contexts_change
+@@ -79,6 +79,8 @@ function test_ns()
+ 
+ 	touch "$file_sync_before_last"
+ 
++sleep 5
++
+ 	# stop and destroy
+ 	stop_lttng_tracing_ok "$session_name"
+ 	destroy_lttng_session_ok "$session_name"
+-- 
+2.20.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
index eaa2e7b29d..c4dbe50f21 100755
--- a/meta/recipes-kernel/lttng/lttng-tools/run-ptest
+++ b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
@@ -1,6 +1,7 @@
 #!/bin/sh
 # Without --ignore-exit, the tap harness causes any FAILs within a
 # test plan to raise ERRORs; this is just noise.
+export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs
 makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD"
 make -k -t all >/dev/null 2>&1
 exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g'
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.12.4.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb
similarity index 88%
rename from meta/recipes-kernel/lttng/lttng-tools_2.12.4.bb
rename to meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb
index ba26c15cdd..95bb2519d7 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.12.4.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb
@@ -25,7 +25,7 @@ PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
                  am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
                  PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
 "
-PACKAGECONFIG ??= "${LTTNGUST}"
+PACKAGECONFIG ??= "${LTTNGUST} kmod"
 PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
 PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
 PACKAGECONFIG[kmod] = "--with-kmod, --without-kmod, kmod"
@@ -35,14 +35,17 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
            file://0001-tests-do-not-strip-a-helper-library.patch \
            file://run-ptest \
            file://lttng-sessiond.service \
-           file://0001-tests-regression-disable-the-tools-live-tests.patch \
            file://determinism.patch \
+           file://0001-src-common-correct-header-location.patch \
+           file://0001-tests-wait-some-more-before-analysing-traces-or-star.patch \
            "
 
-SRC_URI[sha256sum] = "d729f8c2373a41194f171aeb0da0a9bb35ac181f31afa7e260786d19a500dea1"
+SRC_URI[sha256sum] = "8dc894f9a7a840e943c1c344345c75f001a9529daa9157f1a0e6175c081c29e6"
 
 inherit autotools ptest pkgconfig useradd python3-dir manpages systemd
 
+CACHED_CONFIGUREVARS = "PGREP=/usr/bin/pgrep"
+
 SYSTEMD_SERVICE:${PN} = "lttng-sessiond.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
@@ -72,14 +75,18 @@ do_install_ptest () {
     for f in Makefile tests/Makefile tests/utils/utils.sh tests/regression/tools/save-load/*.lttng \
             tests/regression/tools/save-load/configuration/load-42*.lttng tests/regression/tools/health/test_health.sh \
             tests/regression/tools/metadata/utils.sh tests/regression/tools/rotation/rotate_utils.sh \
+            tests/regression/tools/notification/util_event_generator.sh \
             tests/regression/tools/base-path/*.lttng; do
         install -D "${B}/$f" "${D}${PTEST_PATH}/$f"
     done
 
-    for f in config/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-4.0.xsd; do
+    for f in tests/utils/tap-driver.sh config/test-driver src/common/config/session.xsd src/common/mi-lttng-4.1.xsd; do
         install -D "${S}/$f" "${D}${PTEST_PATH}/$f"
     done
 
+    # Patch in the correct path for the custom libraries a helper executable needs
+    sed -i -e 's!FIXMEPTESTPATH!${PTEST_PATH}!' "${D}${PTEST_PATH}/run-ptest"
+
     # Prevent 'make check' from recursing into non-test subdirectories.
     sed -i -e 's!^SUBDIRS = .*!SUBDIRS = tests!' "${D}${PTEST_PATH}/Makefile"
 
@@ -107,7 +114,7 @@ do_install_ptest () {
         for f in $(find "${B}/tests/$d" -maxdepth 1 -executable -type f -printf '%P ') ; do
             cp ${B}/tests/$d/$f ${D}${PTEST_PATH}/tests/`dirname $d`/$f
             case $f in
-                *.so)
+                *.so|userspace-probe-elf-binary)
                     install -d ${D}${PTEST_PATH}/tests/$d/
                     ln -s  ../$f ${D}${PTEST_PATH}/tests/$d/$f
                     # Remove any rpath/runpath to pass QA check.
@@ -175,3 +182,8 @@ do_install_ptest () {
         esac
     done
 }
+
+INHIBIT_PACKAGE_STRIP_FILES = "\
+    ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/userspace-probe-elf-binary \
+    ${PKGD}${PTEST_PATH}/tests/utils/testapp/userspace-probe-elf-binary/.libs/userspace-probe-elf-binary \
+    "
diff --git a/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch b/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch
new file mode 100644
index 0000000000..2d61dfa525
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust/0001-lttng-ust-common-link-with-liburcu-explicitly.patch
@@ -0,0 +1,25 @@
+From 2058584b7e87d6bd9d1765577766e0df7752232c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sun, 5 Sep 2021 10:44:19 +0200
+Subject: [PATCH] lttng-ust-common: link with liburcu explicitly
+
+Otherwise linking errors are seen on x86-32.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/lib/lttng-ust-common/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lib/lttng-ust-common/Makefile.am b/src/lib/lttng-ust-common/Makefile.am
+index caeea2b..30febf0 100644
+--- a/src/lib/lttng-ust-common/Makefile.am
++++ b/src/lib/lttng-ust-common/Makefile.am
+@@ -15,6 +15,7 @@ liblttng_ust_common_la_SOURCES = \
+ 
+ liblttng_ust_common_la_LIBADD = \
+ 	$(top_builddir)/src/common/libcommon.la \
++        $(URCU_LIBS) \
+ 	$(DL_LIBS)
+ 
+ liblttng_ust_common_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
diff --git a/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch b/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch
index c2028d0e1a..fd9b6ea7ff 100644
--- a/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch
+++ b/meta/recipes-kernel/lttng/lttng-ust/0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch
@@ -1,4 +1,4 @@
-From f79dac30af9adda12996da7f6aa6667d3b580537 Mon Sep 17 00:00:00 2001
+From dd1fdc841d069dbd4e284f430a88af79de951124 Mon Sep 17 00:00:00 2001
 From: Robert Yang <liezhi.yang@windriver.com>
 Date: Thu, 26 Sep 2019 17:54:00 +0800
 Subject: [PATCH] python-lttngust/Makefile.am: Add --install-lib to setup.py
@@ -9,23 +9,21 @@ building.
 Upstream-Status: Submitted [https://github.com/lttng/lttng-ust/pull/59]
 
 Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
 ---
- python-lttngust/Makefile.am | 2 +-
+ src/python-lttngust/Makefile.am | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/python-lttngust/Makefile.am b/python-lttngust/Makefile.am
-index 6c0d20d..38b51b8 100644
---- a/python-lttngust/Makefile.am
-+++ b/python-lttngust/Makefile.am
-@@ -9,7 +9,7 @@ install-exec-local:
+diff --git a/src/python-lttngust/Makefile.am b/src/python-lttngust/Makefile.am
+index f95482d..f76d95b 100644
+--- a/src/python-lttngust/Makefile.am
++++ b/src/python-lttngust/Makefile.am
+@@ -32,7 +32,7 @@ install-exec-local: build-python-bindings.stamp
  	if [ "$(DESTDIR)" != "" ]; then \
  		opts="$$opts --root=$(DESTDIR)"; \
  	fi; \
--	$(PYTHON) setup.py install $$opts;
-+	$(PYTHON) setup.py install $$opts --install-lib=$(pythondir);
+-	$(PYTHON) $(builddir)/setup.py install $$opts;
++	$(PYTHON) $(builddir)/setup.py install $$opts --install-lib=$(pythondir);
  
  clean-local:
  	rm -rf $(builddir)/build
--- 
-2.7.4
-
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.12.2.bb b/meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb
similarity index 83%
rename from meta/recipes-kernel/lttng/lttng-ust_2.12.2.bb
rename to meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb
index 54a473d2cb..2074b8c318 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.12.2.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.13.0.bb
@@ -4,9 +4,7 @@ HOMEPAGE = "http://lttng.org/ust"
 BUGTRACKER = "https://bugs.lttng.org/projects/lttng-ust"
 
 LICENSE = "LGPLv2.1+ & MIT & GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
-                    file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \
-                    file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a46577a38ad0c36ff6ff43ccf40c480f"
 
 PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
                  am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
@@ -31,9 +29,10 @@ PE = "2"
 
 SRC_URI = "https://lttng.org/files/lttng-ust/lttng-ust-${PV}.tar.bz2 \
            file://0001-python-lttngust-Makefile.am-Add-install-lib-to-setup.patch \
+           file://0001-lttng-ust-common-link-with-liburcu-explicitly.patch \
            "
 
-SRC_URI[sha256sum] = "bcd0f064b6ca88c72d84e760eac3472ae5c828411c634435922bee9fce359fc7"
+SRC_URI[sha256sum] = "54e4c933679cf6a07971dc5861ce57fc4876ab740ab612407b30b5fc85371750"
 
 CVE_PRODUCT = "ust"
 
-- 
2.31.1


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

* [PATCH 18/26] core-image-ptest-all: bump RAM requirement to 4G
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (15 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 17/26] lttng: update 2.12 -> 2.13.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 19/26] inetutils: update 2.1 -> 2.2 Alexander Kanavin
                   ` (9 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

/tmp is half that, and lttng-ptest writes just under 1G there
(and just over 1G on aarch64), so let's have a safe margin.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-core/images/core-image-ptest-all.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/images/core-image-ptest-all.bb b/meta/recipes-core/images/core-image-ptest-all.bb
index c1d6aa28a9..1472451675 100644
--- a/meta/recipes-core/images/core-image-ptest-all.bb
+++ b/meta/recipes-core/images/core-image-ptest-all.bb
@@ -18,8 +18,8 @@ IMAGE_OVERHEAD_FACTOR = "1.0"
 IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
 
 # ptests need more memory than standard to avoid the OOM killer
-# also lttng-tools needs /tmp that has at least 1G
-QB_MEM = "-m 2048"
+# also lttng-tools needs /tmp that has at least 2G
+QB_MEM = "-m 4096"
 
 # Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
 PTEST_EXPECT_FAILURE = "1"
-- 
2.31.1


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

* [PATCH 19/26] inetutils: update 2.1 -> 2.2
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (16 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 18/26] core-image-ptest-all: bump RAM requirement to 4G Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 20/26] systemd: update 249.3 -> 249.4 Alexander Kanavin
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...tils-only-check-pam_appl.h-when-pam-enabled.patch | 12 ++++++------
 .../inetutils/{inetutils_2.1.bb => inetutils_2.2.bb} |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
 rename meta/recipes-connectivity/inetutils/{inetutils_2.1.bb => inetutils_2.2.bb} (99%)

diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
index 7d5c087c9d..2343c03cb4 100644
--- a/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
+++ b/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch
@@ -1,4 +1,4 @@
-From 684e45b34a33186bb17bcee0b01814c549a60bf6 Mon Sep 17 00:00:00 2001
+From cc66e842e037fba9f06761f942abe5c4856492b8 Mon Sep 17 00:00:00 2001
 From: Kai Kang <kai.kang@windriver.com>
 Date: Wed, 6 Mar 2019 09:36:11 -0500
 Subject: [PATCH] inetutils: Import version 1.9.4
@@ -15,10 +15,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
  1 file changed, 14 insertions(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index 86136fb..b220319 100644
+index 5e16c3a..18510a8 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -183,6 +183,19 @@ AC_SUBST(LIBUTIL)
+@@ -182,6 +182,19 @@ AC_SUBST(LIBUTIL)
  
  # See if we have libpam.a.  Investigate PAM versus Linux-PAM.
  if test "$with_pam" = yes ; then
@@ -38,12 +38,12 @@ index 86136fb..b220319 100644
    AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl)
    AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam)
    if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then
-@@ -620,7 +633,7 @@ AC_HEADER_DIRENT
- AC_CHECK_HEADERS([arpa/nameser.h arpa/tftp.h errno.h fcntl.h features.h \
+@@ -617,7 +630,7 @@ AC_HEADER_DIRENT
+ AC_CHECK_HEADERS([arpa/nameser.h arpa/tftp.h fcntl.h features.h \
  		  glob.h memory.h netinet/ether.h netinet/in_systm.h \
  		  netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \
 -		  security/pam_appl.h shadow.h \
 +		  shadow.h \
- 		  stdarg.h stdlib.h string.h stropts.h sys/tty.h \
+ 		  stropts.h sys/tty.h \
  		  sys/utsname.h sys/ptyvar.h sys/msgbuf.h sys/filio.h \
  		  sys/ioctl_compat.h sys/cdefs.h sys/stream.h sys/mkdev.h \
diff --git a/meta/recipes-connectivity/inetutils/inetutils_2.1.bb b/meta/recipes-connectivity/inetutils/inetutils_2.2.bb
similarity index 99%
rename from meta/recipes-connectivity/inetutils/inetutils_2.1.bb
rename to meta/recipes-connectivity/inetutils/inetutils_2.2.bb
index 0cf73cdb24..3bab137eb4 100644
--- a/meta/recipes-connectivity/inetutils/inetutils_2.1.bb
+++ b/meta/recipes-connectivity/inetutils/inetutils_2.2.bb
@@ -10,7 +10,7 @@ LICENSE = "GPLv3"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
 
-SRC_URI[sha256sum] = "01b9a4bc73a47e63f6e8a07b76122d9ad2a2e46ebf14870e9c91d660b5647a22"
+SRC_URI[sha256sum] = "d547f69172df73afef691a0f7886280fd781acea28def4ff4b4b212086a89d80"
 SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \
            file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \
            file://inetutils-1.8-0003-wchar.patch \
-- 
2.31.1


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

* [PATCH 20/26] systemd: update 249.3 -> 249.4
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (17 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 19/26] inetutils: update 2.1 -> 2.2 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 21/26] lsof: update 4.91 -> 4.94.0 Alexander Kanavin
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...ystemd-boot_249.3.bb => systemd-boot_249.4.bb} |  0
 meta/recipes-core/systemd/systemd.inc             |  2 +-
 .../0002-don-t-use-glibc-specific-qsort_r.patch   |  2 +-
 ....h-add-__compare_fn_t-and-comparison_fn_.patch |  2 +-
 ...lback-parse_printf_format-implementation.patch |  2 +-
 ...sic-missing.h-check-for-missing-strndupa.patch |  2 +-
 .../systemd/0006-Include-netinet-if_ether.h.patch | 15 ++++++++-------
 ...f-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch |  2 +-
 .../0008-add-missing-FTW_-macros-for-musl.patch   |  2 +-
 ...of-__register_atfork-for-non-glibc-build.patch |  2 +-
 .../0010-Use-uintmax_t-for-handling-rlim_t.patch  |  2 +-
 ...c-Disable-tests-for-missing-typedefs-in-.patch |  4 ++--
 ...ss-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch |  2 +-
 ...-compatible-basename-for-non-glibc-syste.patch |  2 +-
 ...le-buffering-when-writing-to-oom_score_a.patch |  2 +-
 ...XSI-compliant-strerror_r-from-GNU-specif.patch |  2 +-
 ...t_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch |  2 +-
 ...ng_type.h-add-__compar_d_fn_t-definition.patch |  2 +-
 ...d-redefinition-of-prctl_mm_map-structure.patch |  2 +-
 .../systemd/0019-Handle-missing-LOCK_EX.patch     |  2 +-
 ...mpatible-pointer-type-struct-sockaddr_un.patch |  2 +-
 .../systemd/0021-test-json.c-define-M_PIl.patch   |  2 +-
 ...2-do-not-disable-buffer-in-writing-files.patch |  2 +-
 .../systemd/0025-Handle-__cpu_mask-usage.patch    |  4 ++--
 .../systemd/0026-Handle-missing-gshadow.patch     |  2 +-
 ...scall.h-Define-MIPS-ABI-defines-for-musl.patch |  2 +-
 .../{systemd_249.3.bb => systemd_249.4.bb}        |  0
 27 files changed, 34 insertions(+), 33 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_249.3.bb => systemd-boot_249.4.bb} (100%)
 rename meta/recipes-core/systemd/{systemd_249.3.bb => systemd_249.4.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_249.3.bb b/meta/recipes-core/systemd/systemd-boot_249.4.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_249.3.bb
rename to meta/recipes-core/systemd/systemd-boot_249.4.bb
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index 05341724f4..bc098adcb3 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
                     file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "090378dcb1de5ca66900503210e85d63075fa70a"
+SRCREV = "4d8fd88b9641fce81272f60f556543f713175403"
 SRCBRANCH = "v249-stable"
 SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH} \
 "
diff --git a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
index 15fa0c4546..bd2312c3b3 100644
--- a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
@@ -1,4 +1,4 @@
-From 40acdb90031cfeb7140cee5205bce24f8c91d857 Mon Sep 17 00:00:00 2001
+From 0be164b79315998e719971db86ed79128ffb4a0b Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 13:41:41 +0800
 Subject: [PATCH] don't use glibc-specific qsort_r
diff --git a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
index d0110a2388..7b14316134 100644
--- a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
+++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
@@ -1,4 +1,4 @@
-From 2a2f95b6dc16d2ea7a8e9349c6b19cc50c34777b Mon Sep 17 00:00:00 2001
+From dfcae6aacf2790bdceac3f25fcabf7c6daee176c Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 13:55:12 +0800
 Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t
diff --git a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
index 1d61367da4..d83fe903b8 100644
--- a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
+++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
@@ -1,4 +1,4 @@
-From b19f800e178516d4f4d344457647e4a018bd6855 Mon Sep 17 00:00:00 2001
+From fcac5d47366085b29460590d36efafa87ccfe3b2 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Sat, 22 May 2021 20:26:24 +0200
 Subject: [PATCH] add fallback parse_printf_format implementation
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
index 0462d52d5e..1541d0b53c 100644
--- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -1,4 +1,4 @@
-From db6551741a3654d8e75aff93ea00fbff579f7b02 Mon Sep 17 00:00:00 2001
+From 5b90aba2eb7340085d657493bf8ec1a9f0e25108 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 14:18:21 +0800
 Subject: [PATCH] src/basic/missing.h: check for missing strndupa
diff --git a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
index 855607e6a8..4ce168b6ef 100644
--- a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
+++ b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
@@ -1,4 +1,4 @@
-From d7ae3aadc70555932e03349907f8be04d03a50ee Mon Sep 17 00:00:00 2001
+From 8983334730df280a4e4dcb08e586b453bc1d53bd Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 26 Oct 2017 22:10:42 -0700
 Subject: [PATCH] Include netinet/if_ether.h
@@ -103,7 +103,7 @@ index 5ad396a57e..1dc007fe13 100644
 -#endif /* _UAPI_LINUX_IN6_H */
 +#endif /* _LINUX_IN6_H */
 diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
-index e8c47f429a..359922c1b3 100644
+index f99c12620b..4966d62656 100644
 --- a/src/libsystemd-network/sd-dhcp6-client.c
 +++ b/src/libsystemd-network/sd-dhcp6-client.c
 @@ -5,7 +5,6 @@
@@ -274,12 +274,13 @@ index 2b72b618fc..d0d4cfb384 100644
  #include "sd-dhcp6-client.h"
  
 diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
-index 9421ce1aa6..3e37cbcc39 100644
+index d58b700050..bba1ca1cab 100644
 --- a/src/network/networkd-link.c
 +++ b/src/network/networkd-link.c
-@@ -1,8 +1,8 @@
+@@ -1,9 +1,9 @@
  /* SPDX-License-Identifier: LGPL-2.1-or-later */
  
+ #include <net/if.h>
 +#include <netinet/if_ether.h>
  #include <netinet/in.h>
  #include <linux/if.h>
@@ -299,7 +300,7 @@ index 850b4f449e..6f85d41328 100644
  #include <netinet/in.h>
  #include <linux/netdevice.h>
 diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
-index 77a93beca9..3bf9ae8837 100644
+index b7852f6eec..72514f6a0d 100644
 --- a/src/network/networkd-route.c
 +++ b/src/network/networkd-route.c
 @@ -1,5 +1,6 @@
@@ -310,7 +311,7 @@ index 77a93beca9..3bf9ae8837 100644
  #include <linux/ipv6_route.h>
  #include <linux/nexthop.h>
 diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c
-index 10c312c480..e44fbb5c35 100644
+index 13c4cedd10..6558d551ab 100644
 --- a/src/network/networkd-setlink.c
 +++ b/src/network/networkd-setlink.c
 @@ -1,8 +1,8 @@
@@ -369,7 +370,7 @@ index 8dfe23691b..e269856337 100644
  #include <netinet/ether.h>
  #include <unistd.h>
 diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
-index d40251331c..89566c05f5 100644
+index 5964e30bf1..52a18d7a7f 100644
 --- a/src/udev/udev-builtin-net_setup_link.c
 +++ b/src/udev/udev-builtin-net_setup_link.c
 @@ -1,5 +1,6 @@
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
index 28846935e0..8b56f52989 100644
--- a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
+++ b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -1,4 +1,4 @@
-From e2d70a1735fc6b9d3c079814831ab0b1b2a9d1e0 Mon Sep 17 00:00:00 2001
+From ea800e99dba3a6013269853540b5d491c7c18d36 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 14:56:21 +0800
 Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined
diff --git a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
index 1de7ccf150..95c3000aa1 100644
--- a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch
@@ -1,4 +1,4 @@
-From 3410d82c9d07aee3e951fc6ae0b41fc1a594e00d Mon Sep 17 00:00:00 2001
+From c25f3f1324a5961348f8df9c1d0441804604a0ff Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 15:00:06 +0800
 Subject: [PATCH] add missing FTW_ macros for musl
diff --git a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
index 4670c232a5..24cd0897f9 100644
--- a/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
+++ b/meta/recipes-core/systemd/systemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -1,4 +1,4 @@
-From 1e3bc870ded807cff0d3771dd89a850d020df032 Mon Sep 17 00:00:00 2001
+From c6cd600f859960c6e22a7e1c8b3d9ba92021e63a Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 15:03:47 +0800
 Subject: [PATCH] fix missing of __register_atfork for non-glibc builds
diff --git a/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
index e6bb37a65e..fec5f18e1a 100644
--- a/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
@@ -1,4 +1,4 @@
-From eeacb75025d8f537d54c35256c5730c9aab15cde Mon Sep 17 00:00:00 2001
+From a47f363edf31142724b8c8773eee9bbdcacbb389 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 15:12:41 +0800
 Subject: [PATCH] Use uintmax_t for handling rlim_t
diff --git a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
index 897e332f33..08ac2fdbdb 100644
--- a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
+++ b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -1,4 +1,4 @@
-From fa29a572faaeb6fb9ed0bc6802d17139773e1908 Mon Sep 17 00:00:00 2001
+From 1089bdf56990586e734ecabd53d088011ff58b90 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Wed, 28 Feb 2018 21:25:22 -0800
 Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl
@@ -13,7 +13,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
  1 file changed, 4 insertions(+)
 
 diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
-index 3c9dc180fa..e1a59d408c 100644
+index e36bee4e8f..4403c0aa52 100644
 --- a/src/test/test-sizeof.c
 +++ b/src/test/test-sizeof.c
 @@ -55,8 +55,10 @@ int main(void) {
diff --git a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index 3bf706fc55..a821dfc453 100644
--- a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -1,4 +1,4 @@
-From 88c8922f9e4d221402d9cb2e04b9c82e89125827 Mon Sep 17 00:00:00 2001
+From d95ba8d9a880258d1fc74b19aa8dc13141699efb Mon Sep 17 00:00:00 2001
 From: Andre McCurdy <armccurdy@gmail.com>
 Date: Tue, 10 Oct 2017 14:33:30 -0700
 Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
diff --git a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
index 74008714c1..95c1f422ba 100644
--- a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
+++ b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -1,4 +1,4 @@
-From e07e9b998ad61b09555bc809aa15de9d2516787a Mon Sep 17 00:00:00 2001
+From c03f527bb1973993a3b446b006f5bad71be30786 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Sun, 27 May 2018 08:36:44 -0700
 Subject: [PATCH] Define glibc compatible basename() for non-glibc systems
diff --git a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
index c5e20cbb80..b9ad3da5cd 100644
--- a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
+++ b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -1,4 +1,4 @@
-From 2f048d13e100158320bda248635b3c533ac9717b Mon Sep 17 00:00:00 2001
+From 87387970dfbf07c728a7d11f2ea422bc84de80e8 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Wed, 4 Jul 2018 15:00:44 +0800
 Subject: [PATCH] Do not disable buffering when writing to oom_score_adj
diff --git a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
index 39804bd364..aad7c25c78 100644
--- a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
+++ b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
@@ -1,4 +1,4 @@
-From 45148529792c0cda32fdd61610c8d5a700d541fa Mon Sep 17 00:00:00 2001
+From fb1b946c610a0d4fa464c5cb2c4a0daee1e51cea Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Tue, 10 Jul 2018 15:40:17 +0800
 Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi
diff --git a/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
index 365e2a36f1..c1e6787ee9 100644
--- a/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
+++ b/meta/recipes-core/systemd/systemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
@@ -1,4 +1,4 @@
-From 02a2772889d6cb08c9ca0561b52e7a9a80e50497 Mon Sep 17 00:00:00 2001
+From a24336f917e1b66160f148722554600ff85ac1b8 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 15:18:00 +0800
 Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP
diff --git a/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch b/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
index 8a6c03f312..95f2086f7b 100644
--- a/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
+++ b/meta/recipes-core/systemd/systemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
@@ -1,4 +1,4 @@
-From 47c4ac80689077b1eb86cf05b4326b1ac345aedf Mon Sep 17 00:00:00 2001
+From e0acbce4195c99d876e71a4cc20167681822f177 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 15:27:54 +0800
 Subject: [PATCH] missing_type.h: add __compar_d_fn_t definition
diff --git a/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
index e75935a280..898f6d5c6a 100644
--- a/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
+++ b/meta/recipes-core/systemd/systemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
@@ -1,4 +1,4 @@
-From 2cb33d8896a4ad2d3b489fed51f17d5e45dfb4fc Mon Sep 17 00:00:00 2001
+From 7a0435a185e931061a2ee6147347db8966233df4 Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 15:44:54 +0800
 Subject: [PATCH] avoid redefinition of prctl_mm_map structure
diff --git a/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch b/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch
index 629c103627..60b36b23b9 100644
--- a/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch
+++ b/meta/recipes-core/systemd/systemd/0019-Handle-missing-LOCK_EX.patch
@@ -1,4 +1,4 @@
-From 200a2a2e4f04a7b7078dd455fafbd6774240e30b Mon Sep 17 00:00:00 2001
+From 0c566970ea4fac0e3e597cfce0479c7b3502cff7 Mon Sep 17 00:00:00 2001
 From: Alex Kiernan <alex.kiernan@gmail.com>
 Date: Fri, 7 Aug 2020 15:19:27 +0000
 Subject: [PATCH] Handle missing LOCK_EX
diff --git a/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
index ea6e82f466..ac8e7f691f 100644
--- a/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
+++ b/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
@@ -1,4 +1,4 @@
-From 6445b7737a89256f35adc56701a5c47b48618ced Mon Sep 17 00:00:00 2001
+From e063abdbe73d38302533c02ce5b82116b909b888 Mon Sep 17 00:00:00 2001
 From: Alex Kiernan <alex.kiernan@gmail.com>
 Date: Fri, 7 Aug 2020 15:20:17 +0000
 Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un *
diff --git a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch
index 60c12b0740..b965cd63b5 100644
--- a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch
+++ b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch
@@ -1,4 +1,4 @@
-From ae71bf2b97dc9d4760defd83463c1d305f332f22 Mon Sep 17 00:00:00 2001
+From 82f509e29039966e942d1e8eb6283d0828d68b8a Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Mon, 25 Feb 2019 16:53:06 +0800
 Subject: [PATCH] test-json.c: define M_PIl
diff --git a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
index 6998bf0dd0..e0f31e8ad8 100644
--- a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
+++ b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
@@ -1,4 +1,4 @@
-From 3198690c2dbb4b457a04ef21914dc4d531540273 Mon Sep 17 00:00:00 2001
+From 1f2b7e65dc96d01c84d0f33a7edb776988b28f4f Mon Sep 17 00:00:00 2001
 From: Chen Qi <Qi.Chen@windriver.com>
 Date: Fri, 1 Mar 2019 15:22:15 +0800
 Subject: [PATCH] do not disable buffer in writing files
diff --git a/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch b/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch
index 06702765ee..a986de7fd2 100644
--- a/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch
+++ b/meta/recipes-core/systemd/systemd/0025-Handle-__cpu_mask-usage.patch
@@ -1,4 +1,4 @@
-From b04518c464b526f8b9adc9ce3c08b1881db47989 Mon Sep 17 00:00:00 2001
+From 6f72861193824c5d170ec252857bca040a72c7ab Mon Sep 17 00:00:00 2001
 From: Scott Murray <scott.murray@konsulko.com>
 Date: Fri, 13 Sep 2019 19:26:27 -0400
 Subject: [PATCH] Handle __cpu_mask usage
@@ -38,7 +38,7 @@ index 3c63a58826..4c2d4347fc 100644
  typedef struct CPUSet {
          cpu_set_t *set;
 diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
-index e1a59d408c..c269ea6e8c 100644
+index 4403c0aa52..e7e4ae112d 100644
 --- a/src/test/test-sizeof.c
 +++ b/src/test/test-sizeof.c
 @@ -1,6 +1,5 @@
diff --git a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
index dc63305825..347ec4182d 100644
--- a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
+++ b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
@@ -1,4 +1,4 @@
-From 0c8935128b39864b07dfee39cfa9d35d48f056aa Mon Sep 17 00:00:00 2001
+From 7fd5621608c312313a3be09f934a713176f739a8 Mon Sep 17 00:00:00 2001
 From: Alex Kiernan <alex.kiernan@gmail.com>
 Date: Tue, 10 Mar 2020 11:05:20 +0000
 Subject: [PATCH] Handle missing gshadow
diff --git a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
index ff96a720c5..9349844db2 100644
--- a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
@@ -1,4 +1,4 @@
-From f5d7fee9620cbcf52be8f8ba477890d28cadfbc8 Mon Sep 17 00:00:00 2001
+From 6690522f5096ec68f4a508242e4432e8b1ef07cc Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 12 Apr 2021 23:44:53 -0700
 Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl
diff --git a/meta/recipes-core/systemd/systemd_249.3.bb b/meta/recipes-core/systemd/systemd_249.4.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd_249.3.bb
rename to meta/recipes-core/systemd/systemd_249.4.bb
-- 
2.31.1


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

* [PATCH 21/26] lsof: update 4.91 -> 4.94.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (18 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 20/26] systemd: update 249.3 -> 249.4 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 22/26] libpam: update 1.5.1 -> 1.5.2 Alexander Kanavin
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Drop all custom sourcedir handling as the source is now a standard
git checkout.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../files/lsof-remove-host-information.patch  | 17 +++++------
 .../lsof/{lsof_4.91.bb => lsof_4.94.0.bb}     | 28 +++----------------
 2 files changed, 13 insertions(+), 32 deletions(-)
 rename meta/recipes-extended/lsof/{lsof_4.91.bb => lsof_4.94.0.bb} (53%)

diff --git a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch
index b7d2323dc9..70155f9a1d 100644
--- a/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch
+++ b/meta/recipes-extended/lsof/files/lsof-remove-host-information.patch
@@ -1,25 +1,29 @@
-Remove host information from version.h
+From 95b8a13c1ea4274f58304bf5c4f7ca3d036b10f3 Mon Sep 17 00:00:00 2001
+From: Li Wang <li.wang@windriver.com>
+Date: Wed, 30 Aug 2017 15:05:16 +0800
+Subject: [PATCH] Remove host information from version.h
 
 make lsof not include host information
 
 Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Li Wang <li.wang@windriver.com>
+
 ---
- dialects/linux/Makefile |   50 +++++++++--------------------------------------
+ dialects/linux/Makefile | 50 ++++++++---------------------------------
  1 file changed, 9 insertions(+), 41 deletions(-)
 
 diff --git a/dialects/linux/Makefile b/dialects/linux/Makefile
-index 2bea108..792142b 100644
+index 61e8643..5458a0a 100644
 --- a/dialects/linux/Makefile
 +++ b/dialects/linux/Makefile
-@@ -76,48 +76,16 @@ version.h:	FRC
+@@ -95,48 +95,16 @@ version.h:	FRC
  	@echo Constructing version.h
  	@rm -f version.h
  	@echo '#define	LSOF_BLDCMT	"${LSOF_BLDCMT}"' > version.h;
 -	@echo '#define	LSOF_CC		"${CC}"' >> version.h
 -	@echo '#define	LSOF_CCV	"${CCV}"' >> version.h
--	@echo '#define	LSOF_CCDATE	"'`date`'"' >> version.h
+-	@echo '#define	LSOF_CCDATE	"$(BUILD_DATE)"' >> version.h
 -	@echo '#define	LSOF_CCFLAGS	"'`echo ${CFLAGS} | sed 's/\\\\(/\\(/g' | sed 's/\\\\)/\\)/g' | sed 's/"/\\\\"/g'`'"' >> version.h
 +	@echo '#define	LSOF_CC		""' >> version.h
 +	@echo '#define	LSOF_CCV	""' >> version.h
@@ -71,6 +75,3 @@ index 2bea108..792142b 100644
  	@sed '/VN/s/.ds VN \(.*\)/#define	LSOF_VERSION	"\1"/' < version >> version.h
  
  FRC:
--- 
-1.7.9.5
-
diff --git a/meta/recipes-extended/lsof/lsof_4.91.bb b/meta/recipes-extended/lsof/lsof_4.94.0.bb
similarity index 53%
rename from meta/recipes-extended/lsof/lsof_4.91.bb
rename to meta/recipes-extended/lsof/lsof_4.94.0.bb
index d7428ea2c4..9659fa8246 100644
--- a/meta/recipes-extended/lsof/lsof_4.91.bb
+++ b/meta/recipes-extended/lsof/lsof_4.94.0.bb
@@ -11,33 +11,13 @@ LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429
 # https://people.freebsd.org/~abe/ ). http://www.mirrorservice.org seems to be
 # the most commonly used alternative.
 
-SRC_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2 \
+SRC_URI = "git://github.com/lsof-org/lsof \
            file://lsof-remove-host-information.patch \
           "
 
-SRC_URI[md5sum] = "148ed410cb52e08c2adc0c60f480f11f"
-SRC_URI[sha256sum] = "c9da946a525fbf82ff80090b6d1879c38df090556f3fe0e6d782cb44172450a3"
+SRCREV = "005e014e1abdadb2493d8b3ce87b37a2c0a2351d"
 
-UPSTREAM_CHECK_URI = "https://github.com/lsof-org/lsof/releases/"
-UPSTREAM_CHECK_REGEX = "lsof_(?P<pver>.*)\.linux\.tar"
-
-LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
-
-S = "${WORKDIR}/lsof_${PV}_src"
-
-python do_unpack () {
-    if not bb.data.inherits_class('externalsrc', d) or not d.getVar('EXTERNALSRC'):
-        # temporarily change S for unpack of lsof_${PV}
-        s = d.getVar('S', False)
-        d.setVar('S', '${WORKDIR}/lsof_${PV}')
-        bb.build.exec_func('base_do_unpack', d)
-        # temporarily change SRC_URI for unpack of lsof_${PV}_src
-        src_uri = d.getVar('SRC_URI', False)
-        d.setVar('SRC_URI', '${LOCALSRC}')
-        d.setVar('S', s)
-        bb.build.exec_func('base_do_unpack', d)
-        d.setVar('SRC_URI', src_uri)
-}
+S = "${WORKDIR}/git"
 
 export LSOF_INCLUDE = "${STAGING_INCDIR}"
 
@@ -62,5 +42,5 @@ do_compile () {
 do_install () {
 	install -d ${D}${sbindir} ${D}${mandir}/man8
 	install -m 0755 lsof ${D}${sbindir}/lsof
-	install -m 0644 lsof.8 ${D}${mandir}/man8/lsof.8
+	install -m 0644 Lsof.8 ${D}${mandir}/man8/lsof.8
 }
-- 
2.31.1


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

* [PATCH 22/26] libpam: update 1.5.1 -> 1.5.2
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (19 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 21/26] lsof: update 4.91 -> 4.94.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-10-12 10:13   ` [OE-core] " Zoltan Boszormenyi
  2021-09-08 18:01 ` [PATCH 23/26] libhandy: update 1.2.3 -> 1.4.0 Alexander Kanavin
                   ` (5 subsequent siblings)
  26 siblings, 1 reply; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Drop patches: issues fixed upstream.

Move .pc files to correct place as libpam is instructed to install them in /lib via
--libdir.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../0001-Makefile.am-support-usrmage.patch    | 28 -------------------
 ...space-Makefile.am-correctly-install-.patch | 28 -------------------
 .../pam/{libpam_1.5.1.bb => libpam_1.5.2.bb}  |  7 +++--
 3 files changed, 4 insertions(+), 59 deletions(-)
 delete mode 100644 meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch
 delete mode 100644 meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch
 rename meta/recipes-extended/pam/{libpam_1.5.1.bb => libpam_1.5.2.bb} (96%)

diff --git a/meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch b/meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch
deleted file mode 100644
index 5c6bc92705..0000000000
--- a/meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c09e012590c1ec2d3b622b64f1bfc10a2286c9ea Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Wed, 6 Jan 2021 12:08:20 +0800
-Subject: [PATCH] Makefile.am: support usrmage
-
-Upstream-Status: Inappropriate [oe-specific]
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- modules/pam_namespace/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/pam_namespace/Makefile.am b/modules/pam_namespace/Makefile.am
-index ddd5fc0..a1f1bec 100644
---- a/modules/pam_namespace/Makefile.am
-+++ b/modules/pam_namespace/Makefile.am
-@@ -18,7 +18,7 @@ TESTS = $(dist_check_SCRIPTS)
- securelibdir = $(SECUREDIR)
- secureconfdir = $(SCONFIGDIR)
- namespaceddir = $(SCONFIGDIR)/namespace.d
--servicedir = /lib/systemd/system
-+servicedir = $(systemd_system_unitdir)
- 
- AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-         -DSECURECONF_DIR=\"$(SCONFIGDIR)/\" $(WARN_CFLAGS)
--- 
-2.17.1
-
diff --git a/meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch b/meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch
deleted file mode 100644
index b41d1e5962..0000000000
--- a/meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e2db4082f6b988f1d5803028e9e47aee5f3519ac Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Sun, 27 Dec 2020 00:30:45 +0100
-Subject: [PATCH] modules/pam_namespace/Makefile.am: correctly install systemd
- unit file
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- modules/pam_namespace/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/pam_namespace/Makefile.am b/modules/pam_namespace/Makefile.am
-index 21e1b33..ddd5fc0 100644
---- a/modules/pam_namespace/Makefile.am
-+++ b/modules/pam_namespace/Makefile.am
-@@ -18,7 +18,7 @@ TESTS = $(dist_check_SCRIPTS)
- securelibdir = $(SECUREDIR)
- secureconfdir = $(SCONFIGDIR)
- namespaceddir = $(SCONFIGDIR)/namespace.d
--servicedir = $(prefix)/lib/systemd/system
-+servicedir = /lib/systemd/system
- 
- AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-         -DSECURECONF_DIR=\"$(SCONFIGDIR)/\" $(WARN_CFLAGS)
--- 
-2.24.0
-
diff --git a/meta/recipes-extended/pam/libpam_1.5.1.bb b/meta/recipes-extended/pam/libpam_1.5.2.bb
similarity index 96%
rename from meta/recipes-extended/pam/libpam_1.5.1.bb
rename to meta/recipes-extended/pam/libpam_1.5.2.bb
index efcd27137f..a3c4a50cb3 100644
--- a/meta/recipes-extended/pam/libpam_1.5.1.bb
+++ b/meta/recipes-extended/pam/libpam_1.5.2.bb
@@ -21,18 +21,17 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux
            file://pam.d/common-session-noninteractive \
            file://pam.d/other \
            file://libpam-xtests.patch \
-           file://0001-modules-pam_namespace-Makefile.am-correctly-install-.patch \
-           file://0001-Makefile.am-support-usrmage.patch \
            file://run-ptest \
            file://pam-volatiles.conf \
            "
 
-SRC_URI[sha256sum] = "201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc"
+SRC_URI[sha256sum] = "e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d"
 
 DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt"
 
 EXTRA_OECONF = "--includedir=${includedir}/security \
                 --libdir=${base_libdir} \
+                --with-systemdunitdir=${systemd_system_unitdir} \
                 --disable-nis \
                 --disable-regenerate-docu \
                 --disable-doc \
@@ -148,6 +147,8 @@ do_install() {
 	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
 		echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
 	fi
+        install -d ${D}/${libdir}/
+	mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir}/
 }
 
 do_install_ptest() {
-- 
2.31.1


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

* [PATCH 23/26] libhandy: update 1.2.3 -> 1.4.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (20 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 22/26] libpam: update 1.5.1 -> 1.5.2 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 24/26] rt-tests: update 2.1 -> 2.2 Alexander Kanavin
                   ` (4 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../libhandy/{libhandy_1.2.3.bb => libhandy_1.4.0.bb}         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-gnome/libhandy/{libhandy_1.2.3.bb => libhandy_1.4.0.bb} (92%)

diff --git a/meta/recipes-gnome/libhandy/libhandy_1.2.3.bb b/meta/recipes-gnome/libhandy/libhandy_1.4.0.bb
similarity index 92%
rename from meta/recipes-gnome/libhandy/libhandy_1.2.3.bb
rename to meta/recipes-gnome/libhandy/libhandy_1.4.0.bb
index 3921099412..39ee2aab86 100644
--- a/meta/recipes-gnome/libhandy/libhandy_1.2.3.bb
+++ b/meta/recipes-gnome/libhandy/libhandy_1.4.0.bb
@@ -9,8 +9,8 @@ BUGTRACKER = "https://gitlab.gnome.org/GNOME/libhandy/-/issues"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-SRC_URI = "git://gitlab.gnome.org/GNOME/libhandy.git;protocol=https;branch=libhandy-1-2"
-SRCREV = "e9ca4ac4b134bbd6ab91b6f916a915192fd3a465"
+SRC_URI = "git://gitlab.gnome.org/GNOME/libhandy.git;protocol=https"
+SRCREV = "f8626427acebfa08b2b4ee1166d51e416d3d7407"
 S = "${WORKDIR}/git"
 
 GIR_MESON_ENABLE_FLAG = 'enabled'
-- 
2.31.1


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

* [PATCH 24/26] rt-tests: update 2.1 -> 2.2
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (21 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 23/26] libhandy: update 1.2.3 -> 1.4.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 25/26] libgit2: update 1.1.1 -> 1.2.0 Alexander Kanavin
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch | 6 +++---
 meta/recipes-rt/rt-tests/rt-tests.inc                       | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch b/meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch
index 56556dfe63..1e8ff4619b 100644
--- a/meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch
+++ b/meta/recipes-rt/rt-tests/files/0001-Makefile-Allow-for-CC-and-AR-to-be-overridden.patch
@@ -1,4 +1,4 @@
-From 7b0ab10370cad38e26c5ffaaa55a1fd77fff0f18 Mon Sep 17 00:00:00 2001
+From 05ccf5045adf4248f29623ad0db2d2a55ae5cd06 Mon Sep 17 00:00:00 2001
 From: Randy Witt <randy.e.witt@intel.com>
 Date: Fri, 16 Oct 2020 16:54:30 -0700
 Subject: [PATCH] Makefile: Allow for CC and AR to be overridden
@@ -15,11 +15,11 @@ Upstream-Status: Inappropriate [other]
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 63cd77c..495d6bb 100644
+index ec5d693..ab8a8de 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -1,6 +1,6 @@
- VERSION = 2.1
+ VERSION = 2.2
 -CC = $(CROSS_COMPILE)gcc
 -AR = $(CROSS_COMPILE)ar
 +CC ?= $(CROSS_COMPILE)gcc
diff --git a/meta/recipes-rt/rt-tests/rt-tests.inc b/meta/recipes-rt/rt-tests/rt-tests.inc
index 5ce4d298b9..71227307c3 100644
--- a/meta/recipes-rt/rt-tests/rt-tests.inc
+++ b/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -1,5 +1,5 @@
-SRCREV = "667e1aae896f8448615b062d27c818b32cb960ff"
-PV = "2.1"
+SRCREV = "75c16956e32817dfb0d5cb7379e731061e16593f"
+PV = "2.2"
 PE = "1"
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git;branch=main"
-- 
2.31.1


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

* [PATCH 25/26] libgit2: update 1.1.1 -> 1.2.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (22 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 24/26] rt-tests: update 2.1 -> 2.2 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-08 18:01 ` [PATCH 26/26] libssh2: update 1.9.0 -> 1.10.0 Alexander Kanavin
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

License-Update: includes portions of openssl headers
https://github.com/libgit2/libgit2/commit/0903cac1d08817e87c556f5a3e6ec881be86c7f2

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../libgit2/{libgit2_1.1.1.bb => libgit2_1.2.0.bb}        | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-support/libgit2/{libgit2_1.1.1.bb => libgit2_1.2.0.bb} (59%)

diff --git a/meta/recipes-support/libgit2/libgit2_1.1.1.bb b/meta/recipes-support/libgit2/libgit2_1.2.0.bb
similarity index 59%
rename from meta/recipes-support/libgit2/libgit2_1.1.1.bb
rename to meta/recipes-support/libgit2/libgit2_1.2.0.bb
index ae30a7a100..6df42e473f 100644
--- a/meta/recipes-support/libgit2/libgit2_1.1.1.bb
+++ b/meta/recipes-support/libgit2/libgit2_1.2.0.bb
@@ -1,12 +1,12 @@
 SUMMARY = "the Git linkable library"
 HOMEPAGE = "http://libgit2.github.com/"
-LICENSE = "GPL-2.0-with-GCC-exception & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5b002a195fb7ea2d8d583f07eaff3a8e"
+LICENSE = "GPL-2.0-with-GCC-exception & MIT & openssl"
+LIC_FILES_CHKSUM = "file://COPYING;md5=73fa96e40ce64f79bab087c7e1deeacd"
 
 DEPENDS = "curl openssl zlib libssh2 libgcrypt libpcre2"
 
-SRC_URI = "git://github.com/libgit2/libgit2.git;branch=maint/v1.1"
-SRCREV = "8a0dc6783c340e61a44c179c48f832165ad2053c"
+SRC_URI = "git://github.com/libgit2/libgit2.git;branch=main"
+SRCREV = "4fd32be01c79a5c003bb47674ac1d76d948518b7"
 
 S = "${WORKDIR}/git"
 
-- 
2.31.1


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

* [PATCH 26/26] libssh2: update 1.9.0 -> 1.10.0
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (23 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 25/26] libgit2: update 1.1.1 -> 1.2.0 Alexander Kanavin
@ 2021-09-08 18:01 ` Alexander Kanavin
  2021-09-09  9:01 ` [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Peter Kjellerstedt
  2021-10-11  2:47 ` Hsia-Jun Li
  26 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-08 18:01 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

From: Alexander Kanavin <alex@linutronix.de>

0001-configure-Conditionally-undefine-backend-m4-macro.patch no
longer needed; code removed upstream.

License-Update: copyright years
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...nviroment-to-decide-if-a-test-is-bui.patch |   6 +-
 ...ditionally-undefine-backend-m4-macro.patch |  30 ----
 ...EC-macro-outside-of-if-check-549-550.patch | 112 ---------------
 .../libssh2/files/CVE-2019-17498.patch        | 131 ------------------
 .../{libssh2_1.9.0.bb => libssh2_1.10.0.bb}   |  10 +-
 5 files changed, 5 insertions(+), 284 deletions(-)
 delete mode 100644 meta/recipes-support/libssh2/files/0001-configure-Conditionally-undefine-backend-m4-macro.patch
 delete mode 100644 meta/recipes-support/libssh2/files/0001-kex.c-move-EC-macro-outside-of-if-check-549-550.patch
 delete mode 100644 meta/recipes-support/libssh2/files/CVE-2019-17498.patch
 rename meta/recipes-support/libssh2/{libssh2_1.9.0.bb => libssh2_1.10.0.bb} (78%)

diff --git a/meta/recipes-support/libssh2/files/0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch b/meta/recipes-support/libssh2/files/0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch
index 5ff9bf8462..b1204e49eb 100644
--- a/meta/recipes-support/libssh2/files/0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch
+++ b/meta/recipes-support/libssh2/files/0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch
@@ -1,4 +1,4 @@
-From f9e3e2ee7b18ba5bb8efe083171f3e701eb0a663 Mon Sep 17 00:00:00 2001
+From f6abce5ba41a412a247250dcd80e387e53474466 Mon Sep 17 00:00:00 2001
 From: Your Name <you@example.com>
 Date: Mon, 28 Dec 2020 02:08:03 +0000
 Subject: [PATCH] Don't let host enviroment to decide if a test is build
@@ -9,6 +9,7 @@ don't use SSHD on host to decide weither to build a test
 Upstream-Status: Inappropriate[oe specific]
 
 Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
 ---
  tests/Makefile.am | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
@@ -41,6 +42,3 @@ index dc0922f..6cbc35d 100644
 -endif
 \ No newline at end of file
 +endif
--- 
-2.20.1
-
diff --git a/meta/recipes-support/libssh2/files/0001-configure-Conditionally-undefine-backend-m4-macro.patch b/meta/recipes-support/libssh2/files/0001-configure-Conditionally-undefine-backend-m4-macro.patch
deleted file mode 100644
index 1128c7ea0c..0000000000
--- a/meta/recipes-support/libssh2/files/0001-configure-Conditionally-undefine-backend-m4-macro.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From efe7101786193eaddb749c0583af6b54aec6f289 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 2 Feb 2021 18:45:16 -0800
-Subject: [PATCH] configure: Conditionally undefine backend m4 macro
-
-Unlike the M4 builtin, this macro fails if macro is not defined
-therefore recover the behavior of the builtin.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index fe5054a..758f8c2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -127,7 +127,7 @@ fi
- m4_set_foreach([crypto_backends], [backend],
-   [AM_CONDITIONAL(m4_toupper(backend), test "$found_crypto" = "backend")]
- )
--m4_undefine([backend])
-+m4_ifdef([backend], [m4_undefine([backend])])
- 
- 
- # libz
--- 
-2.30.0
-
diff --git a/meta/recipes-support/libssh2/files/0001-kex.c-move-EC-macro-outside-of-if-check-549-550.patch b/meta/recipes-support/libssh2/files/0001-kex.c-move-EC-macro-outside-of-if-check-549-550.patch
deleted file mode 100644
index b331c1bf81..0000000000
--- a/meta/recipes-support/libssh2/files/0001-kex.c-move-EC-macro-outside-of-if-check-549-550.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 1f76151c92e1b52e9c24ebf06adc77fbd6c062bc Mon Sep 17 00:00:00 2001
-From: Will Cosgrove <will@panic.com>
-Date: Tue, 26 Jan 2021 11:41:21 -0800
-Subject: [PATCH] kex.c: move EC macro outside of if check #549 (#550)
-
-File: kex.c
-
-Notes:
-Moved the macro LIBSSH2_KEX_METHOD_EC_SHA_HASH_CREATE_VERIFY outside of the LIBSSH2_ECDSA since it's also now used by the ED25519 code.
-
-Sha 256, 384 and 512 need to be defined for all backends now even if they aren't used directly. I believe this is already the case, but just a heads up.
-
-Credit:
-Stefan-Ghinea
-
-Upstream-Status: Backport
-
-Reference to upstream patch:
-https://github.com/libssh2/libssh2/commit/1f76151c92e1b52e9c24ebf06adc77fbd6c062bc
-
-Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com>
----
- src/kex.c | 66 +++++++++++++++++++++++++++----------------------------
- 1 file changed, 33 insertions(+), 33 deletions(-)
-
-diff --git a/src/kex.c b/src/kex.c
-index cb16639..19ab6ec 100644
---- a/src/kex.c
-+++ b/src/kex.c
-@@ -1885,39 +1885,6 @@ kex_method_diffie_hellman_group_exchange_sha256_key_exchange
- }
- 
- 
--#if LIBSSH2_ECDSA
--
--/* kex_session_ecdh_curve_type
-- * returns the EC curve type by name used in key exchange
-- */
--
--static int
--kex_session_ecdh_curve_type(const char *name, libssh2_curve_type *out_type)
--{
--    int ret = 0;
--    libssh2_curve_type type;
--
--    if(name == NULL)
--        return -1;
--
--    if(strcmp(name, "ecdh-sha2-nistp256") == 0)
--        type = LIBSSH2_EC_CURVE_NISTP256;
--    else if(strcmp(name, "ecdh-sha2-nistp384") == 0)
--        type = LIBSSH2_EC_CURVE_NISTP384;
--    else if(strcmp(name, "ecdh-sha2-nistp521") == 0)
--        type = LIBSSH2_EC_CURVE_NISTP521;
--    else {
--        ret = -1;
--    }
--
--    if(ret == 0 && out_type) {
--        *out_type = type;
--    }
--
--    return ret;
--}
--
--
- /* LIBSSH2_KEX_METHOD_EC_SHA_HASH_CREATE_VERIFY
-  *
-  * Macro that create and verifies EC SHA hash with a given digest bytes
-@@ -2027,6 +1994,39 @@ kex_session_ecdh_curve_type(const char *name, libssh2_curve_type *out_type)
- }                                                                       \
- 
- 
-+#if LIBSSH2_ECDSA
-+
-+/* kex_session_ecdh_curve_type
-+ * returns the EC curve type by name used in key exchange
-+ */
-+
-+static int
-+kex_session_ecdh_curve_type(const char *name, libssh2_curve_type *out_type)
-+{
-+    int ret = 0;
-+    libssh2_curve_type type;
-+
-+    if(name == NULL)
-+        return -1;
-+
-+    if(strcmp(name, "ecdh-sha2-nistp256") == 0)
-+        type = LIBSSH2_EC_CURVE_NISTP256;
-+    else if(strcmp(name, "ecdh-sha2-nistp384") == 0)
-+        type = LIBSSH2_EC_CURVE_NISTP384;
-+    else if(strcmp(name, "ecdh-sha2-nistp521") == 0)
-+        type = LIBSSH2_EC_CURVE_NISTP521;
-+    else {
-+        ret = -1;
-+    }
-+
-+    if(ret == 0 && out_type) {
-+        *out_type = type;
-+    }
-+
-+    return ret;
-+}
-+
-+
- /* ecdh_sha2_nistp
-  * Elliptic Curve Diffie Hellman Key Exchange
-  */
--- 
-2.17.1
-
diff --git a/meta/recipes-support/libssh2/files/CVE-2019-17498.patch b/meta/recipes-support/libssh2/files/CVE-2019-17498.patch
deleted file mode 100644
index 001080072b..0000000000
--- a/meta/recipes-support/libssh2/files/CVE-2019-17498.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From dedcbd106f8e52d5586b0205bc7677e4c9868f9c Mon Sep 17 00:00:00 2001
-From: Will Cosgrove <will@panic.com>
-Date: Fri, 30 Aug 2019 09:57:38 -0700
-Subject: [PATCH] packet.c: improve message parsing (#402)
-
-* packet.c: improve parsing of packets
-
-file: packet.c
-
-notes:
-Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST.
-
-Upstream-Status: Backport
-CVE: CVE-2019-17498
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- src/packet.c | 68 ++++++++++++++++++++++------------------------------
- 1 file changed, 29 insertions(+), 39 deletions(-)
-
-diff --git a/src/packet.c b/src/packet.c
-index 38ab629..2e01bfc 100644
---- a/src/packet.c
-+++ b/src/packet.c
-@@ -419,8 +419,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
-                     size_t datalen, int macstate)
- {
-     int rc = 0;
--    char *message = NULL;
--    char *language = NULL;
-+    unsigned char *message = NULL;
-+    unsigned char *language = NULL;
-     size_t message_len = 0;
-     size_t language_len = 0;
-     LIBSSH2_CHANNEL *channelp = NULL;
-@@ -472,33 +472,23 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
- 
-         case SSH_MSG_DISCONNECT:
-             if(datalen >= 5) {
--                size_t reason = _libssh2_ntohu32(data + 1);
-+                uint32_t reason = 0;
-+                struct string_buf buf;
-+                buf.data = (unsigned char *)data;
-+                buf.dataptr = buf.data;
-+                buf.len = datalen;
-+                buf.dataptr++; /* advance past type */
- 
--                if(datalen >= 9) {
--                    message_len = _libssh2_ntohu32(data + 5);
-+                _libssh2_get_u32(&buf, &reason);
-+                _libssh2_get_string(&buf, &message, &message_len);
-+                _libssh2_get_string(&buf, &language, &language_len);
- 
--                    if(message_len < datalen-13) {
--                        /* 9 = packet_type(1) + reason(4) + message_len(4) */
--                        message = (char *) data + 9;
--
--                        language_len =
--                            _libssh2_ntohu32(data + 9 + message_len);
--                        language = (char *) data + 9 + message_len + 4;
--
--                        if(language_len > (datalen-13-message_len)) {
--                            /* bad input, clear info */
--                            language = message = NULL;
--                            language_len = message_len = 0;
--                        }
--                    }
--                    else
--                        /* bad size, clear it */
--                        message_len = 0;
--                }
-                 if(session->ssh_msg_disconnect) {
--                    LIBSSH2_DISCONNECT(session, reason, message,
--                                       message_len, language, language_len);
-+                    LIBSSH2_DISCONNECT(session, reason, (const char *)message,
-+                                       message_len, (const char *)language,
-+                                       language_len);
-                 }
-+
-                 _libssh2_debug(session, LIBSSH2_TRACE_TRANS,
-                                "Disconnect(%d): %s(%s)", reason,
-                                message, language);
-@@ -539,24 +529,24 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
-                 int always_display = data[1];
- 
-                 if(datalen >= 6) {
--                    message_len = _libssh2_ntohu32(data + 2);
--
--                    if(message_len <= (datalen - 10)) {
--                        /* 6 = packet_type(1) + display(1) + message_len(4) */
--                        message = (char *) data + 6;
--                        language_len = _libssh2_ntohu32(data + 6 +
--                                                        message_len);
--
--                        if(language_len <= (datalen - 10 - message_len))
--                            language = (char *) data + 10 + message_len;
--                    }
-+                    struct string_buf buf;
-+                    buf.data = (unsigned char *)data;
-+                    buf.dataptr = buf.data;
-+                    buf.len = datalen;
-+                    buf.dataptr += 2; /* advance past type & always display */
-+
-+                    _libssh2_get_string(&buf, &message, &message_len);
-+                    _libssh2_get_string(&buf, &language, &language_len);
-                 }
- 
-                 if(session->ssh_msg_debug) {
--                    LIBSSH2_DEBUG(session, always_display, message,
--                                  message_len, language, language_len);
-+                    LIBSSH2_DEBUG(session, always_display,
-+                                  (const char *)message,
-+                                  message_len, (const char *)language,
-+                                  language_len);
-                 }
-             }
-+
-             /*
-              * _libssh2_debug will actually truncate this for us so
-              * that it's not an inordinate about of data
-@@ -579,7 +569,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
-                 uint32_t len = 0;
-                 unsigned char want_reply = 0;
-                 len = _libssh2_ntohu32(data + 1);
--                if(datalen >= (6 + len)) {
-+                if((len <= (UINT_MAX - 6)) && (datalen >= (6 + len))) {
-                     want_reply = data[5 + len];
-                     _libssh2_debug(session,
-                                    LIBSSH2_TRACE_CONN,
--- 
-2.17.1
-
diff --git a/meta/recipes-support/libssh2/libssh2_1.9.0.bb b/meta/recipes-support/libssh2/libssh2_1.10.0.bb
similarity index 78%
rename from meta/recipes-support/libssh2/libssh2_1.9.0.bb
rename to meta/recipes-support/libssh2/libssh2_1.10.0.bb
index a0cbb6af6b..072d6819c0 100644
--- a/meta/recipes-support/libssh2/libssh2_1.9.0.bb
+++ b/meta/recipes-support/libssh2/libssh2_1.10.0.bb
@@ -5,19 +5,15 @@ SECTION = "libs"
 DEPENDS = "zlib"
 
 LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c5cf34fc0acb44b082ef50ef5e4354ca"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3e089ad0cf27edf1e7f261dfcd06acc7"
 
 SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
-           file://CVE-2019-17498.patch \
-           file://0001-configure-Conditionally-undefine-backend-m4-macro.patch \
            file://run-ptest \
-           file://0001-kex.c-move-EC-macro-outside-of-if-check-549-550.patch \
-"
+           "
 
 SRC_URI:append:ptest = " file://0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch"
 
-SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927"
-SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd"
+SRC_URI[sha256sum] = "2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51"
 
 inherit autotools pkgconfig ptest
 
-- 
2.31.1


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

* Re: [OE-core] [PATCH 03/26] lua: add a recipe from meta-oe
  2021-09-08 18:01 ` [PATCH 03/26] lua: add a recipe from meta-oe Alexander Kanavin
@ 2021-09-09  5:11   ` Khem Raj
  0 siblings, 0 replies; 33+ messages in thread
From: Khem Raj @ 2021-09-09  5:11 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

also send a a patch to remove it from meta-oe once its merged in core,
otherwise distros using meta-oe wont use it from core.

On Wed, Sep 8, 2021 at 11:01 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Lua is a hard dependency in rpm 4.17.
>
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>  meta/conf/distro/include/maintainers.inc      |   1 +
>  .../distro/include/ptest-packagelists.inc     |   1 +
>  ...ilding-lua-without-readline-on-Linux.patch |  59 +++++++
>  ...rriers-cannot-be-active-during-sweep.patch |  90 ++++++++++
>  .../lua/lua/CVE-2020-15888.patch              |  45 +++++
>  .../lua/lua/CVE-2020-15945.patch              | 167 ++++++++++++++++++
>  meta/recipes-devtools/lua/lua/lua.pc.in       |  10 ++
>  meta/recipes-devtools/lua/lua/run-ptest       |  19 ++
>  meta/recipes-devtools/lua/lua_5.3.6.bb        |  67 +++++++
>  9 files changed, 459 insertions(+)
>  create mode 100644 meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
>  create mode 100644 meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
>  create mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
>  create mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
>  create mode 100644 meta/recipes-devtools/lua/lua/lua.pc.in
>  create mode 100644 meta/recipes-devtools/lua/lua/run-ptest
>  create mode 100644 meta/recipes-devtools/lua/lua_5.3.6.bb
>
> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
> index 0e8185f4e3..d9d57459cf 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -467,6 +467,7 @@ RECIPE_MAINTAINER:pn-ltp = "Yi Zhao <yi.zhao@windriver.com>"
>  RECIPE_MAINTAINER:pn-lttng-modules = "Richard Purdie <richard.purdie@linuxfoundation.org>"
>  RECIPE_MAINTAINER:pn-lttng-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
>  RECIPE_MAINTAINER:pn-lttng-ust = "Richard Purdie <richard.purdie@linuxfoundation.org>"
> +RECIPE_MAINTAINER:pn-lua = "Alexander Kanavin <alex.kanavin@gmail.com>"
>  RECIPE_MAINTAINER:pn-lz4 = "Denys Dmytriyenko <denis@denix.org>"
>  RECIPE_MAINTAINER:pn-lzo = "Denys Dmytriyenko <denis@denix.org>"
>  RECIPE_MAINTAINER:pn-lzip = "Denys Dmytriyenko <denis@denix.org>"
> diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
> index e0ae1dd971..3709998f29 100644
> --- a/meta/conf/distro/include/ptest-packagelists.inc
> +++ b/meta/conf/distro/include/ptest-packagelists.inc
> @@ -40,6 +40,7 @@ PTESTS_FAST = "\
>      libxml-sax-base-perl-ptest \
>      libxml-simple-perl-ptest \
>      libxml2-ptest \
> +    lua-ptest \
>      lzo-ptest \
>      m4-ptest \
>      nettle-ptest \
> diff --git a/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch b/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
> new file mode 100644
> index 0000000000..e767900864
> --- /dev/null
> +++ b/meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
> @@ -0,0 +1,59 @@
> +From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +Date: Wed, 2 Oct 2019 17:54:15 +0200
> +Subject: [PATCH] Allow building lua without readline on Linux
> +
> +Upstream-Status: Pending
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + Makefile      | 2 +-
> + src/Makefile  | 3 +++
> + src/luaconf.h | 5 +++++
> + 3 files changed, 9 insertions(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 119110d..9f6df45 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -36,7 +36,7 @@ RM= rm -f
> + # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
> +
> + # Convenience platforms targets.
> +-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
> ++PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris
> +
> + # What to install.
> + TO_BIN= lua luac
> +diff --git a/src/Makefile b/src/Makefile
> +index 64c78f7..5c0428a 100644
> +--- a/src/Makefile
> ++++ b/src/Makefile
> +@@ -109,6 +109,9 @@ generic: $(ALL)
> + linux:
> +       $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
> +
> ++linux-no-readline:
> ++      $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl"
> ++
> + macosx:
> +       $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
> +
> +diff --git a/src/luaconf.h b/src/luaconf.h
> +index 9eeeea6..d71ca25 100644
> +--- a/src/luaconf.h
> ++++ b/src/luaconf.h
> +@@ -64,6 +64,11 @@
> + #define LUA_USE_READLINE      /* needs some extra libraries */
> + #endif
> +
> ++#if defined(LUA_USE_LINUX_NO_READLINE)
> ++#define LUA_USE_POSIX
> ++#define LUA_USE_DLOPEN                /* needs an extra library: -ldl */
> ++#endif
> ++
> +
> + #if defined(LUA_USE_MACOSX)
> + #define LUA_USE_POSIX
> +--
> +2.17.1
> +
> diff --git a/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch b/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
> new file mode 100644
> index 0000000000..a302874d76
> --- /dev/null
> +++ b/meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
> @@ -0,0 +1,90 @@
> +From 1e6df25ac28dcd89f0324177bb55019422404b44 Mon Sep 17 00:00:00 2001
> +From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
> +Date: Thu, 3 Sep 2020 15:32:17 +0800
> +Subject: [PATCH] Fixed bug: barriers cannot be active during sweep
> +
> +Barriers cannot be active during sweep, even in generational mode.
> +(Although gen. mode is not incremental, it can hit a barrier when
> +deleting a thread and closing its upvalues.)  The colors of objects are
> +being changed during sweep and, therefore, cannot be trusted.
> +
> +Upstream-Status: Backport [https://github.com/lua/lua/commit/a6da1472c0c5e05ff249325f979531ad51533110]
> +CVE: CVE-2020-24371
> +
> +[Adjust code KGC_INC -> KGC_NORMAL, refer 69371c4b84becac09c445aae01d005b49658ef82]
> +Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
> +---
> + src/lgc.c | 33 ++++++++++++++++++++++++---------
> + 1 file changed, 24 insertions(+), 9 deletions(-)
> +
> +diff --git a/src/lgc.c b/src/lgc.c
> +index 973c269..7af23d5 100644
> +--- a/src/lgc.c
> ++++ b/src/lgc.c
> +@@ -142,10 +142,17 @@ static int iscleared (global_State *g, const TValue *o) {
> +
> +
> + /*
> +-** barrier that moves collector forward, that is, mark the white object
> +-** being pointed by a black object. (If in sweep phase, clear the black
> +-** object to white [sweep it] to avoid other barrier calls for this
> +-** same object.)
> ++** Barrier that moves collector forward, that is, marks the white object
> ++** 'v' being pointed by the black object 'o'.  In the generational
> ++** mode, 'v' must also become old, if 'o' is old; however, it cannot
> ++** be changed directly to OLD, because it may still point to non-old
> ++** objects. So, it is marked as OLD0. In the next cycle it will become
> ++** OLD1, and in the next it will finally become OLD (regular old). By
> ++** then, any object it points to will also be old.  If called in the
> ++** incremental sweep phase, it clears the black object to white (sweep
> ++** it) to avoid other barrier calls for this same object. (That cannot
> ++** be done is generational mode, as its sweep does not distinguish
> ++** whites from deads.)
> + */
> + void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
> +   global_State *g = G(L);
> +@@ -154,7 +161,8 @@ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
> +     reallymarkobject(g, v);  /* restore invariant */
> +   else {  /* sweep phase */
> +     lua_assert(issweepphase(g));
> +-    makewhite(g, o);  /* mark main obj. as white to avoid other barriers */
> ++    if (g->gckind == KGC_NORMAL)  /* incremental mode? */
> ++      makewhite(g, o);  /* mark 'o' as white to avoid other barriers */
> +   }
> + }
> +
> +@@ -299,10 +307,15 @@ static void markbeingfnz (global_State *g) {
> +
> +
> + /*
> +-** Mark all values stored in marked open upvalues from non-marked threads.
> +-** (Values from marked threads were already marked when traversing the
> +-** thread.) Remove from the list threads that no longer have upvalues and
> +-** not-marked threads.
> ++** For each non-marked thread, simulates a barrier between each open
> ++** upvalue and its value. (If the thread is collected, the value will be
> ++** assigned to the upvalue, but then it can be too late for the barrier
> ++** to act. The "barrier" does not need to check colors: A non-marked
> ++** thread must be young; upvalues cannot be older than their threads; so
> ++** any visited upvalue must be young too.) Also removes the thread from
> ++** the list, as it was already visited. Removes also threads with no
> ++** upvalues, as they have nothing to be checked. (If the thread gets an
> ++** upvalue later, it will be linked in the list again.)
> + */
> + static void remarkupvals (global_State *g) {
> +   lua_State *thread;
> +@@ -313,9 +326,11 @@ static void remarkupvals (global_State *g) {
> +       p = &thread->twups;  /* keep marked thread with upvalues in the list */
> +     else {  /* thread is not marked or without upvalues */
> +       UpVal *uv;
> ++      lua_assert(!isold(thread) || thread->openupval == NULL);
> +       *p = thread->twups;  /* remove thread from the list */
> +       thread->twups = thread;  /* mark that it is out of list */
> +       for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) {
> ++        lua_assert(getage(uv) <= getage(thread));
> +         if (uv->u.open.touched) {
> +           markvalue(g, uv->v);  /* remark upvalue's value */
> +           uv->u.open.touched = 0;
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
> new file mode 100644
> index 0000000000..60a4125971
> --- /dev/null
> +++ b/meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
> @@ -0,0 +1,45 @@
> +From 6298903e35217ab69c279056f925fb72900ce0b7 Mon Sep 17 00:00:00 2001
> +From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
> +Date: Mon, 6 Jul 2020 12:11:54 -0300
> +Subject: [PATCH] Keep minimum size when shrinking a stack
> +
> +When shrinking a stack (during GC), do not make it smaller than the
> +initial stack size.
> +---
> + ldo.c | 5 ++---
> + 1 file changed, 2 insertions(+), 3 deletions(-)
> +==== end of original header ====
> +
> +CVE: CVE-2020-15888
> +
> +Upstream-Status: backport [https://github.com/lua/lua.git]
> +
> +Signed-off-by: Joe Slater <joe.slater@windriver.com>
> +
> +====
> +diff --git a/ldo.c b/ldo.c
> +index c563b1d9..a89ac010 100644
> +--- a/src/ldo.c
> ++++ b/src/ldo.c
> +@@ -220,7 +220,7 @@ static int stackinuse (lua_State *L) {
> +
> + void luaD_shrinkstack (lua_State *L) {
> +   int inuse = stackinuse(L);
> +-  int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;
> ++  int goodsize = inuse + BASIC_STACK_SIZE;
> +   if (goodsize > LUAI_MAXSTACK)
> +     goodsize = LUAI_MAXSTACK;  /* respect stack limit */
> +   if (L->stacksize > LUAI_MAXSTACK)  /* had been handling stack overflow? */
> +@@ -229,8 +229,7 @@ void luaD_shrinkstack (lua_State *L) {
> +     luaE_shrinkCI(L);  /* shrink list */
> +   /* if thread is currently not handling a stack overflow and its
> +      good size is smaller than current size, shrink its stack */
> +-  if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&
> +-      goodsize < L->stacksize)
> ++  if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize)
> +     luaD_reallocstack(L, goodsize);
> +   else  /* don't change stack */
> +     condmovestack(L,{},{});  /* (change only for debugging) */
> +--
> +2.17.1
> +
> diff --git a/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch b/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
> new file mode 100644
> index 0000000000..89ce491487
> --- /dev/null
> +++ b/meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
> @@ -0,0 +1,167 @@
> +From d8d344365945a534f700c82c5dd26f704f89fef3 Mon Sep 17 00:00:00 2001
> +From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
> +Date: Wed, 5 Aug 2020 16:59:58 +0800
> +Subject: [PATCH] Fixed bug: invalid 'oldpc' when returning to a function
> +
> +The field 'L->oldpc' is not always updated when control returns to a
> +function; an invalid value can seg. fault when computing 'changedline'.
> +(One example is an error in a finalizer; control can return to
> +'luaV_execute' without executing 'luaD_poscall'.) Instead of trying to
> +fix all possible corner cases, it seems safer to be resilient to invalid
> +values for 'oldpc'. Valid but wrong values at most cause an extra call
> +to a line hook.
> +
> +CVE: CVE-2020-15945
> +
> +[Adjust the code to be applicable to the tree]
> +
> +Upstream-Status: Backport [https://github.com/lua/lua/commit/a2195644d89812e5b157ce7bac35543e06db05e3]
> +
> +Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
> +Signed-off-by: Joe Slater <joe.slater@@windriver.com>
> +
> +---
> + src/ldebug.c | 30 +++++++++++++++---------------
> + src/ldebug.h |  4 ++++
> + src/ldo.c    |  2 +-
> + src/lstate.c |  1 +
> + src/lstate.h |  2 +-
> + 5 files changed, 22 insertions(+), 17 deletions(-)
> +
> +diff --git a/src/ldebug.c b/src/ldebug.c
> +index 239affb..832b16c 100644
> +--- a/src/ldebug.c
> ++++ b/src/ldebug.c
> +@@ -34,9 +34,8 @@
> + #define noLuaClosure(f)               ((f) == NULL || (f)->c.tt == LUA_TCCL)
> +
> +
> +-/* Active Lua function (given call info) */
> +-#define ci_func(ci)           (clLvalue((ci)->func))
> +-
> ++/* inverse of 'pcRel' */
> ++#define invpcRel(pc, p)                ((p)->code + (pc) + 1)
> +
> + static const char *funcnamefromcode (lua_State *L, CallInfo *ci,
> +                                     const char **name);
> +@@ -71,20 +70,18 @@ static void swapextra (lua_State *L) {
> +
> + /*
> + ** This function can be called asynchronously (e.g. during a signal).
> +-** Fields 'oldpc', 'basehookcount', and 'hookcount' (set by
> +-** 'resethookcount') are for debug only, and it is no problem if they
> +-** get arbitrary values (causes at most one wrong hook call). 'hookmask'
> +-** is an atomic value. We assume that pointers are atomic too (e.g., gcc
> +-** ensures that for all platforms where it runs). Moreover, 'hook' is
> +-** always checked before being called (see 'luaD_hook').
> ++** Fields 'basehookcount' and 'hookcount' (set by 'resethookcount')
> ++** are for debug only, and it is no problem if they get arbitrary
> ++** values (causes at most one wrong hook call). 'hookmask' is an atomic
> ++** value. We assume that pointers are atomic too (e.g., gcc ensures that
> ++** for all platforms where it runs). Moreover, 'hook' is always checked
> ++** before being called (see 'luaD_hook').
> + */
> + LUA_API void lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
> +   if (func == NULL || mask == 0) {  /* turn off hooks? */
> +     mask = 0;
> +     func = NULL;
> +   }
> +-  if (isLua(L->ci))
> +-    L->oldpc = L->ci->u.l.savedpc;
> +   L->hook = func;
> +   L->basehookcount = count;
> +   resethookcount(L);
> +@@ -665,7 +662,10 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
> + void luaG_traceexec (lua_State *L) {
> +   CallInfo *ci = L->ci;
> +   lu_byte mask = L->hookmask;
> ++  const Proto *p = ci_func(ci)->p;
> +   int counthook = (--L->hookcount == 0 && (mask & LUA_MASKCOUNT));
> ++  /* 'L->oldpc' may be invalid; reset it in this case */
> ++  int oldpc = (L->oldpc < p->sizecode) ? L->oldpc : 0;
> +   if (counthook)
> +     resethookcount(L);  /* reset count */
> +   else if (!(mask & LUA_MASKLINE))
> +@@ -677,15 +677,15 @@ void luaG_traceexec (lua_State *L) {
> +   if (counthook)
> +     luaD_hook(L, LUA_HOOKCOUNT, -1);  /* call count hook */
> +   if (mask & LUA_MASKLINE) {
> +-    Proto *p = ci_func(ci)->p;
> +     int npc = pcRel(ci->u.l.savedpc, p);
> +     int newline = getfuncline(p, npc);
> +     if (npc == 0 ||  /* call linehook when enter a new function, */
> +-        ci->u.l.savedpc <= L->oldpc ||  /* when jump back (loop), or when */
> +-        newline != getfuncline(p, pcRel(L->oldpc, p)))  /* enter a new line */
> ++        ci->u.l.savedpc <= invpcRel(oldpc, p) ||  /* when jump back (loop), or when */
> ++        newline != getfuncline(p, oldpc))  /* enter a new line */
> +       luaD_hook(L, LUA_HOOKLINE, newline);  /* call line hook */
> ++
> ++    L->oldpc = npc;  /* 'pc' of last call to line hook */
> +   }
> +-  L->oldpc = ci->u.l.savedpc;
> +   if (L->status == LUA_YIELD) {  /* did hook yield? */
> +     if (counthook)
> +       L->hookcount = 1;  /* undo decrement to zero */
> +diff --git a/src/ldebug.h b/src/ldebug.h
> +index 0e31546..c224cc4 100644
> +--- a/src/ldebug.h
> ++++ b/src/ldebug.h
> +@@ -13,6 +13,10 @@
> +
> + #define pcRel(pc, p)  (cast(int, (pc) - (p)->code) - 1)
> +
> ++/* Active Lua function (given call info) */
> ++#define ci_func(ci)            (clLvalue((ci)->func))
> ++
> ++
> + #define getfuncline(f,pc)     (((f)->lineinfo) ? (f)->lineinfo[pc] : -1)
> +
> + #define resethookcount(L)     (L->hookcount = L->basehookcount)
> +diff --git a/src/ldo.c b/src/ldo.c
> +index 90b695f..f66ac1a 100644
> +--- a/src/ldo.c
> ++++ b/src/ldo.c
> +@@ -382,7 +382,7 @@ int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) {
> +       luaD_hook(L, LUA_HOOKRET, -1);
> +       firstResult = restorestack(L, fr);
> +     }
> +-    L->oldpc = ci->previous->u.l.savedpc;  /* 'oldpc' for caller function */
> ++    L->oldpc = pcRel(ci->u.l.savedpc, ci_func(ci)->p);  /* 'oldpc' for caller function */
> +   }
> +   res = ci->func;  /* res == final position of 1st result */
> +   L->ci = ci->previous;  /* back to caller */
> +diff --git a/src/lstate.c b/src/lstate.c
> +index 9194ac3..3573e36 100644
> +--- a/src/lstate.c
> ++++ b/src/lstate.c
> +@@ -236,6 +236,7 @@ static void preinit_thread (lua_State *L, global_State *g) {
> +   L->nny = 1;
> +   L->status = LUA_OK;
> +   L->errfunc = 0;
> ++  L->oldpc = 0;
> + }
> +
> +
> +diff --git a/src/lstate.h b/src/lstate.h
> +index a469466..d75eadf 100644
> +--- a/src/lstate.h
> ++++ b/src/lstate.h
> +@@ -164,7 +164,6 @@ struct lua_State {
> +   StkId top;  /* first free slot in the stack */
> +   global_State *l_G;
> +   CallInfo *ci;  /* call info for current function */
> +-  const Instruction *oldpc;  /* last pc traced */
> +   StkId stack_last;  /* last free slot in the stack */
> +   StkId stack;  /* stack base */
> +   UpVal *openupval;  /* list of open upvalues in this stack */
> +@@ -174,6 +173,7 @@ struct lua_State {
> +   CallInfo base_ci;  /* CallInfo for first level (C calling Lua) */
> +   volatile lua_Hook hook;
> +   ptrdiff_t errfunc;  /* current error handling function (stack index) */
> ++  int oldpc;  /* last pc traced */
> +   int stacksize;
> +   int basehookcount;
> +   int hookcount;
> +--
> +2.13.3
> +
> diff --git a/meta/recipes-devtools/lua/lua/lua.pc.in b/meta/recipes-devtools/lua/lua/lua.pc.in
> new file mode 100644
> index 0000000000..c27e86e85d
> --- /dev/null
> +++ b/meta/recipes-devtools/lua/lua/lua.pc.in
> @@ -0,0 +1,10 @@
> +prefix=/usr
> +libdir=${prefix}/lib
> +includedir=${prefix}/include
> +
> +Name: Lua
> +Description: Lua language engine
> +Version: @VERSION@
> +Requires:
> +Libs: -L${libdir} -llua -lm -ldl
> +Cflags: -I${includedir}
> diff --git a/meta/recipes-devtools/lua/lua/run-ptest b/meta/recipes-devtools/lua/lua/run-ptest
> new file mode 100644
> index 0000000000..8e085e1af9
> --- /dev/null
> +++ b/meta/recipes-devtools/lua/lua/run-ptest
> @@ -0,0 +1,19 @@
> +#!/bin/sh
> +
> +cd test
> +lua -e"_U=true" all.lua > lua-test.tmp
> +
> +echo "--- test output ---"
> +cat lua-test.tmp
> +echo ""
> +echo ""
> +echo "--- ptest result ---"
> +
> +grep "final OK \!\!\!" lua-test.tmp > /dev/null
> +if [ $? -eq 0 ]; then
> +   echo "PASS: lua"
> +else
> +   echo "FAIL: lua"
> +fi
> +
> +rm -f lua-test.tmp
> diff --git a/meta/recipes-devtools/lua/lua_5.3.6.bb b/meta/recipes-devtools/lua/lua_5.3.6.bb
> new file mode 100644
> index 0000000000..f830e09259
> --- /dev/null
> +++ b/meta/recipes-devtools/lua/lua_5.3.6.bb
> @@ -0,0 +1,67 @@
> +DESCRIPTION = "Lua is a powerful light-weight programming language designed \
> +for extending applications."
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=f43d8ee6bc4df18ef8b276439cc4a153"
> +HOMEPAGE = "http://www.lua.org/"
> +
> +SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
> +           file://lua.pc.in \
> +           file://0001-Allow-building-lua-without-readline-on-Linux.patch \
> +           file://CVE-2020-15888.patch \
> +           file://CVE-2020-15945.patch \
> +           file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
> +           "
> +
> +# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
> +PV_testsuites = "5.3.4"
> +
> +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
> +           'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \
> +            file://run-ptest \
> +           ', '', d)}"
> +
> +SRC_URI[tarballsrc.md5sum] = "83f23dbd5230140a3770d5f54076948d"
> +SRC_URI[tarballsrc.sha256sum] = "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60"
> +SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3"
> +SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f"
> +
> +inherit pkgconfig binconfig ptest
> +
> +PACKAGECONFIG ??= "readline"
> +PACKAGECONFIG[readline] = ",,readline"
> +
> +TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
> +EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'"
> +
> +do_configure:prepend() {
> +    sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
> +    sed -i -e s:lib/lua/:${baselib}/lua/:g src/luaconf.h
> +}
> +
> +do_compile () {
> +    oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)}
> +}
> +
> +do_install () {
> +    oe_runmake \
> +        'INSTALL_TOP=${D}${prefix}' \
> +        'INSTALL_BIN=${D}${bindir}' \
> +        'INSTALL_INC=${D}${includedir}/' \
> +        'INSTALL_MAN=${D}${mandir}/man1' \
> +        'INSTALL_SHARE=${D}${datadir}/lua' \
> +        'INSTALL_LIB=${D}${libdir}' \
> +        'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
> +        install
> +    install -d ${D}${libdir}/pkgconfig
> +
> +    sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
> +    install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
> +    rmdir ${D}${datadir}/lua/5.3
> +    rmdir ${D}${datadir}/lua
> +}
> +
> +do_install_ptest () {
> +        cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV_testsuites}-tests ${D}${PTEST_PATH}/test
> +}
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.31.1
>
>
> 
>

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

* Re: [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (24 preceding siblings ...)
  2021-09-08 18:01 ` [PATCH 26/26] libssh2: update 1.9.0 -> 1.10.0 Alexander Kanavin
@ 2021-09-09  9:01 ` Peter Kjellerstedt
  2021-09-09  9:04   ` Alexander Kanavin
  2021-10-11  2:47 ` Hsia-Jun Li
  26 siblings, 1 reply; 33+ messages in thread
From: Peter Kjellerstedt @ 2021-09-09  9:01 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

 -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Alexander Kanavin
> Sent: den 8 september 2021 20:01
> To: openembedded-core@lists.openembedded.org
> Cc: Alexander Kanavin <alex.kanavin@gmail.com>
> Subject: [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1
> 
> Drop 0003-native_bindir.patch: it doesn't seem to actually define
> anything where the use_native parameter is set to true.
> 
> Also, the issue should be solved without invasive, custom patching
> of the code: via meson.cross, custom .pc files for the items in
> question or some other configuration mechanism.

We are not using QT, so I do not know what the actual effect of that 
patch being dropped is. Thus I do not know whether it is correct to 
drop it or not. However, it seems that the hunks that actually added 
the use_native=True arguments were dropped from the patch with the 
update to 0.58.0. In that release, the QT specific functions were moved 
from mesonbuild/dependencies/ui.py to mesonbuild/dependencies/qt.py
and the relevant hunks should probably have been moved along with the 
code instead of being removed.

//Peter

> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>  meta/recipes-devtools/meson/meson.inc         |  4 +-
>  .../0001-Make-CPU-family-warnings-fatal.patch | 20 ++--
>  .../meson/meson/0003-native_bindir.patch      | 94 -------------------
>  .../meson/meson/gi-target-dep.patch           | 41 --------
>  .../{meson_0.58.1.bb => meson_0.59.1.bb}      |  0
>  ...on_0.58.1.bb => nativesdk-meson_0.59.1.bb} |  0
>  6 files changed, 10 insertions(+), 149 deletions(-)
>  delete mode 100644 meta/recipes-devtools/meson/meson/0003-
> native_bindir.patch
>  delete mode 100644 meta/recipes-devtools/meson/meson/gi-target-dep.patch
>  rename meta/recipes-devtools/meson/{meson_0.58.1.bb => meson_0.59.1.bb}
> (100%)
>  rename meta/recipes-devtools/meson/{nativesdk-meson_0.58.1.bb =>
> nativesdk-meson_0.59.1.bb} (100%)
> 
> diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-
> devtools/meson/meson.inc
> index f1746d2094..c83ea406f0 100644
> --- a/meta/recipes-devtools/meson/meson.inc
> +++ b/meta/recipes-devtools/meson/meson.inc
> @@ -9,15 +9,13 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
> 
>  SRC_URI =
> "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-
> ${PV}.tar.gz \
>             file://0001-gtkdoc-fix-issues-that-arise-when-cross-
> compiling.patch \
> -           file://0003-native_bindir.patch \
>             file://0001-python-module-do-not-manipulate-the-environment-
> when.patch \
>             file://disable-rpath-handling.patch \
>             file://0001-modules-python.py-do-not-substitute-python-s-
> install.patch \
> -           file://gi-target-dep.patch \
>             file://0001-Make-CPU-family-warnings-fatal.patch \
>             file://0002-Support-building-allarch-recipes-again.patch \
>             "
> -SRC_URI[sha256sum] =
> "3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d"
> +SRC_URI[sha256sum] =
> "db586a451650d46bbe10984a87b79d9bcdc1caebf38d8e189f8848f8d502356d"
> 
>  UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
>  UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
> diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-
> warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-
> family-warnings-fatal.patch
> index bcccfabd17..c5be526b10 100644
> --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-
> fatal.patch
> +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-
> fatal.patch
> @@ -1,20 +1,21 @@
> -From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
> +From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 Mon Sep 17 00:00:00 2001
>  From: Ross Burton <ross.burton@intel.com>
>  Date: Tue, 3 Jul 2018 13:59:09 +0100
> -Subject: [PATCH 1/2] Make CPU family warnings fatal
> +Subject: [PATCH] Make CPU family warnings fatal
> 
>  Upstream-Status: Inappropriate [OE specific]
>  Signed-off-by: Ross Burton <ross.burton@intel.com>
> +
>  ---
>   mesonbuild/envconfig.py   | 2 +-
>   mesonbuild/environment.py | 4 +---
>   2 files changed, 2 insertions(+), 4 deletions(-)
> 
>  diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
> -index c6a4df3..4d58c91 100644
> +index 307aac3..66fb7ec 100644
>  --- a/mesonbuild/envconfig.py
>  +++ b/mesonbuild/envconfig.py
> -@@ -266,7 +266,7 @@ class MachineInfo:
> +@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
> 
>           cpu_family = literal['cpu_family']
>           if cpu_family not in known_cpu_families:
> @@ -24,20 +25,17 @@ index c6a4df3..4d58c91 100644
>           endian = literal['endian']
>           if endian not in ('little', 'big'):
>  diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
> -index fc9b703..eea8345 100644
> +index 71286a5..179917e 100644
>  --- a/mesonbuild/environment.py
>  +++ b/mesonbuild/environment.py
> -@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) ->
> str:
> +@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) ->
> str:
>               trial = 'ppc64'
> 
>       if trial not in known_cpu_families:
> --        mlog.warning('Unknown CPU family {!r}, please report this at '
> +-        mlog.warning(f'Unknown CPU family {trial!r}, please report this
> at '
>  -                     'https://github.com/mesonbuild/meson/issues/new
> with the '
> --                     'output of `uname -a` and `cat
> /proc/cpuinfo`'.format(trial))
> +-                     'output of `uname -a` and `cat /proc/cpuinfo`')
>  +        raise EnvironmentException('Unknown CPU family %s, see
> https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' %
> trial)
> 
>       return trial
> 
> ---
> -2.24.0
> -
> diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> deleted file mode 100644
> index 89257b9e05..0000000000
> --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> +++ /dev/null
> @@ -1,94 +0,0 @@
> -From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
> -From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> -Date: Wed, 15 Nov 2017 15:05:01 +0100
> -Subject: [PATCH] native_bindir
> -
> -Some libraries, like QT, have pre-processors that convert their input
> -files into something that the cross-compiler can process. We find the
> -path of those pre-processors via pkg-config-native instead of
> -pkg-config.
> -
> -This path forces the use of pkg-config-native for host_bins arguments.
> -
> -There are some discussions upstream to merge this patch, but I presonaly
> believe
> -that is is OE only.
> https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
> -
> -Upstream-Status: Inappropriate [OE specific]
> -Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> -
> ----
> - mesonbuild/dependencies/base.py | 19 +++++++++++--------
> - 1 file changed, 11 insertions(+), 8 deletions(-)
> -
> -diff --git a/mesonbuild/dependencies/base.py
> b/mesonbuild/dependencies/base.py
> -index 14380d4..d0c443f 100644
> ---- a/mesonbuild/dependencies/base.py
> -+++ b/mesonbuild/dependencies/base.py
> -@@ -179,7 +179,7 @@ class Dependency:
> -     def get_exe_args(self, compiler):
> -         return []
> -
> --    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any]) -> str:
> -+    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any], use_native=False) -> str:
> -         raise DependencyException(f'{self.name!r} is not a pkgconfig
> dependency')
> -
> -     def get_configtool_variable(self, variable_name):
> -@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
> -             return True
> -         return any(d.is_built() for d in self.ext_deps)
> -
> --    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any]) -> str:
> -+    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any], use_native=False) -> str:
> -         raise DependencyException('Method "get_pkgconfig_variable()" is
> '
> -                                   'invalid for an internal dependency')
> -
> -@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
> -         return s.format(self.__class__.__name__, self.name,
> self.is_found,
> -                         self.version_reqs)
> -
> --    def _call_pkgbin_real(self, args, env):
> --        cmd = self.pkgbin.get_command() + args
> -+    def _call_pkgbin_real(self, args, env, use_native=False):
> -+        if use_native:
> -+            cmd = [self.pkgbin.get_command()[0] + "-native"] + args
> -+        else:
> -+            cmd = self.pkgbin.get_command() + args
> -         p, out, err = Popen_safe(cmd, env=env)
> -         rc, out, err = p.returncode, out.strip(), err.strip()
> -         call = ' '.join(cmd)
> -@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
> -             if key.startswith('PKG_'):
> -                 mlog.debug(f'env[{key}]: {value}')
> -
> --    def _call_pkgbin(self, args, env=None):
> -+    def _call_pkgbin(self, args, env=None, use_native=False):
> -         # Always copy the environment since we're going to modify it
> -         # with pkg-config variables
> -         if env is None:
> -@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
> -         targs = tuple(args)
> -         cache = PkgConfigDependency.pkgbin_cache
> -         if (self.pkgbin, targs, fenv) not in cache:
> --            cache[(self.pkgbin, targs, fenv)] =
> self._call_pkgbin_real(args, env)
> -+            cache[(self.pkgbin, targs, fenv)] =
> self._call_pkgbin_real(args, env, use_native)
> -         return cache[(self.pkgbin, targs, fenv)]
> -
> -     def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
> -@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
> -                                       (self.name, out_raw))
> -         self.link_args, self.raw_link_args = self._search_libs(out,
> out_raw)
> -
> --    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any]) -> str:
> -+    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> T.Dict[str, T.Any], use_native=False) -> str:
> -         options = ['--variable=' + variable_name, self.name]
> -
> -         if 'define_variable' in kwargs:
> -@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
> -
> -             options = ['--define-variable=' + '='.join(definition)] +
> options
> -
> --        ret, out, err = self._call_pkgbin(options)
> -+        ret, out, err = self._call_pkgbin(options,
> use_native=use_native)
> -         variable = ''
> -         if ret != 0:
> -             if self.required:
> diff --git a/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> b/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> deleted file mode 100644
> index 29e164ccc7..0000000000
> --- a/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -When building gobject-introspection we want the *native* binaries (as
> they need
> -to be executed) but *host* gobject-introspection libraries, as otherwise
> the
> -native pkg-config can be used and the build will try to link native and
> host
> -binaries together.
> -
> -Upstream-Status: Backport [589236226856f591c9e8daf0cb7aa1aef8862388]
> -Signed-off-by: Ross Burton <ross.burton@arm.com>
> -
> -diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> -index f9660838e..2eefc3fc7 100644
> ---- a/mesonbuild/modules/gnome.py
> -+++ b/mesonbuild/modules/gnome.py
> -@@ -84,8 +84,8 @@ class GnomeModule(ExtensionModule):
> -
> mlog.bold('https://github.com/mesonbuild/meson/issues/1387'),
> -                      once=True)
> -
> --    def _get_native_dep(self, state, depname, required=True):
> --        kwargs = {'native': True, 'required': required}
> -+    def _get_dep(self, state, depname, native=False, required=True):
> -+        kwargs = {'native': native, 'required': required}
> -         holder = self.interpreter.func_dependency(state.current_node,
> [depname], kwargs)
> -         return holder.held_object
> -
> -@@ -101,7 +101,7 @@ class GnomeModule(ExtensionModule):
> -             return ExternalProgram.from_entry(name, prog)
> -
> -         # Check if pkgconfig has a variable
> --        dep = self._get_native_dep(state, depname, required=False)
> -+        dep = self._get_dep(state, depname, native=True, required=False)
> -         if dep.found() and dep.type_name == 'pkgconfig':
> -             value = dep.get_pkgconfig_variable(varname, {})
> -             if value:
> -@@ -481,7 +481,7 @@ class GnomeModule(ExtensionModule):
> -
> -     def _get_gir_dep(self, state):
> -         if not self.gir_dep:
> --            self.gir_dep = self._get_native_dep(state, 'gobject-
> introspection-1.0')
> -+            self.gir_dep = self._get_dep(state, 'gobject-introspection-
> 1.0')
> -             self.giscanner = self._get_native_binary(state, 'g-ir-
> scanner', 'gobject-introspection-1.0', 'g_ir_scanner')
> -             self.gicompiler = self._get_native_binary(state, 'g-ir-
> compiler', 'gobject-introspection-1.0', 'g_ir_compiler')
> -         return self.gir_dep, self.giscanner, self.gicompiler
> diff --git a/meta/recipes-devtools/meson/meson_0.58.1.bb b/meta/recipes-
> devtools/meson/meson_0.59.1.bb
> similarity index 100%
> rename from meta/recipes-devtools/meson/meson_0.58.1.bb
> rename to meta/recipes-devtools/meson/meson_0.59.1.bb
> diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
> b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> similarity index 100%
> rename from meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
> rename to meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> --
> 2.31.1


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

* Re: [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1
  2021-09-09  9:01 ` [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Peter Kjellerstedt
@ 2021-09-09  9:04   ` Alexander Kanavin
  0 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-09-09  9:04 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-core

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

On Thu, 9 Sept 2021 at 11:01, Peter Kjellerstedt <
peter.kjellerstedt@axis.com> wrote:

> We are not using QT, so I do not know what the actual effect of that
> patch being dropped is. Thus I do not know whether it is correct to
> drop it or not. However, it seems that the hunks that actually added
> the use_native=True arguments were dropped from the patch with the
> update to 0.58.0. In that release, the QT specific functions were moved
> from mesonbuild/dependencies/ui.py to mesonbuild/dependencies/qt.py
> and the relevant hunks should probably have been moved along with the
> code instead of being removed.
>

Sure, but if the patch does not clearly describe how to reproduce the
problem it is aiming to solve, I'm not going
to start digging or guessing. It's been a pain to rebase for a very long
time, and I've had enough.

Alex



>
> //Peter
>
> > Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> > ---
> >  meta/recipes-devtools/meson/meson.inc         |  4 +-
> >  .../0001-Make-CPU-family-warnings-fatal.patch | 20 ++--
> >  .../meson/meson/0003-native_bindir.patch      | 94 -------------------
> >  .../meson/meson/gi-target-dep.patch           | 41 --------
> >  .../{meson_0.58.1.bb => meson_0.59.1.bb}      |  0
> >  ...on_0.58.1.bb => nativesdk-meson_0.59.1.bb} |  0
> >  6 files changed, 10 insertions(+), 149 deletions(-)
> >  delete mode 100644 meta/recipes-devtools/meson/meson/0003-
> > native_bindir.patch
> >  delete mode 100644 meta/recipes-devtools/meson/meson/gi-target-dep.patch
> >  rename meta/recipes-devtools/meson/{meson_0.58.1.bb => meson_0.59.1.bb}
> > (100%)
> >  rename meta/recipes-devtools/meson/{nativesdk-meson_0.58.1.bb =>
> > nativesdk-meson_0.59.1.bb} (100%)
> >
> > diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-
> > devtools/meson/meson.inc
> > index f1746d2094..c83ea406f0 100644
> > --- a/meta/recipes-devtools/meson/meson.inc
> > +++ b/meta/recipes-devtools/meson/meson.inc
> > @@ -9,15 +9,13 @@ LIC_FILES_CHKSUM =
> > "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
> >
> >  SRC_URI =
> > "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-
> > ${PV}.tar.gz \
> >             file://0001-gtkdoc-fix-issues-that-arise-when-cross-
> > compiling.patch \
> > -           file://0003-native_bindir.patch \
> >             file://0001-python-module-do-not-manipulate-the-environment-
> > when.patch \
> >             file://disable-rpath-handling.patch \
> >             file://0001-modules-python.py-do-not-substitute-python-s-
> > install.patch \
> > -           file://gi-target-dep.patch \
> >             file://0001-Make-CPU-family-warnings-fatal.patch \
> >             file://0002-Support-building-allarch-recipes-again.patch \
> >             "
> > -SRC_URI[sha256sum] =
> > "3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d"
> > +SRC_URI[sha256sum] =
> > "db586a451650d46bbe10984a87b79d9bcdc1caebf38d8e189f8848f8d502356d"
> >
> >  UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
> >  UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
> > diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-
> > warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-
> > family-warnings-fatal.patch
> > index bcccfabd17..c5be526b10 100644
> > --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-
> > fatal.patch
> > +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-
> > fatal.patch
> > @@ -1,20 +1,21 @@
> > -From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
> > +From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 Mon Sep 17 00:00:00 2001
> >  From: Ross Burton <ross.burton@intel.com>
> >  Date: Tue, 3 Jul 2018 13:59:09 +0100
> > -Subject: [PATCH 1/2] Make CPU family warnings fatal
> > +Subject: [PATCH] Make CPU family warnings fatal
> >
> >  Upstream-Status: Inappropriate [OE specific]
> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
> > +
> >  ---
> >   mesonbuild/envconfig.py   | 2 +-
> >   mesonbuild/environment.py | 4 +---
> >   2 files changed, 2 insertions(+), 4 deletions(-)
> >
> >  diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
> > -index c6a4df3..4d58c91 100644
> > +index 307aac3..66fb7ec 100644
> >  --- a/mesonbuild/envconfig.py
> >  +++ b/mesonbuild/envconfig.py
> > -@@ -266,7 +266,7 @@ class MachineInfo:
> > +@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
> >
> >           cpu_family = literal['cpu_family']
> >           if cpu_family not in known_cpu_families:
> > @@ -24,20 +25,17 @@ index c6a4df3..4d58c91 100644
> >           endian = literal['endian']
> >           if endian not in ('little', 'big'):
> >  diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
> > -index fc9b703..eea8345 100644
> > +index 71286a5..179917e 100644
> >  --- a/mesonbuild/environment.py
> >  +++ b/mesonbuild/environment.py
> > -@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) ->
> > str:
> > +@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) ->
> > str:
> >               trial = 'ppc64'
> >
> >       if trial not in known_cpu_families:
> > --        mlog.warning('Unknown CPU family {!r}, please report this at '
> > +-        mlog.warning(f'Unknown CPU family {trial!r}, please report this
> > at '
> >  -                     'https://github.com/mesonbuild/meson/issues/new
> > with the '
> > --                     'output of `uname -a` and `cat
> > /proc/cpuinfo`'.format(trial))
> > +-                     'output of `uname -a` and `cat /proc/cpuinfo`')
> >  +        raise EnvironmentException('Unknown CPU family %s, see
> > https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' %
> > trial)
> >
> >       return trial
> >
> > ---
> > -2.24.0
> > -
> > diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> > b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> > deleted file mode 100644
> > index 89257b9e05..0000000000
> > --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> > +++ /dev/null
> > @@ -1,94 +0,0 @@
> > -From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
> > -From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> > -Date: Wed, 15 Nov 2017 15:05:01 +0100
> > -Subject: [PATCH] native_bindir
> > -
> > -Some libraries, like QT, have pre-processors that convert their input
> > -files into something that the cross-compiler can process. We find the
> > -path of those pre-processors via pkg-config-native instead of
> > -pkg-config.
> > -
> > -This path forces the use of pkg-config-native for host_bins arguments.
> > -
> > -There are some discussions upstream to merge this patch, but I presonaly
> > believe
> > -that is is OE only.
> > https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
> > -
> > -Upstream-Status: Inappropriate [OE specific]
> > -Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> > -
> > ----
> > - mesonbuild/dependencies/base.py | 19 +++++++++++--------
> > - 1 file changed, 11 insertions(+), 8 deletions(-)
> > -
> > -diff --git a/mesonbuild/dependencies/base.py
> > b/mesonbuild/dependencies/base.py
> > -index 14380d4..d0c443f 100644
> > ---- a/mesonbuild/dependencies/base.py
> > -+++ b/mesonbuild/dependencies/base.py
> > -@@ -179,7 +179,7 @@ class Dependency:
> > -     def get_exe_args(self, compiler):
> > -         return []
> > -
> > --    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> > T.Dict[str, T.Any]) -> str:
> > -+    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> > T.Dict[str, T.Any], use_native=False) -> str:
> > -         raise DependencyException(f'{self.name!r} is not a pkgconfig
> > dependency')
> > -
> > -     def get_configtool_variable(self, variable_name):
> > -@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
> > -             return True
> > -         return any(d.is_built() for d in self.ext_deps)
> > -
> > --    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> > T.Dict[str, T.Any]) -> str:
> > -+    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> > T.Dict[str, T.Any], use_native=False) -> str:
> > -         raise DependencyException('Method "get_pkgconfig_variable()" is
> > '
> > -                                   'invalid for an internal dependency')
> > -
> > -@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
> > -         return s.format(self.__class__.__name__, self.name,
> > self.is_found,
> > -                         self.version_reqs)
> > -
> > --    def _call_pkgbin_real(self, args, env):
> > --        cmd = self.pkgbin.get_command() + args
> > -+    def _call_pkgbin_real(self, args, env, use_native=False):
> > -+        if use_native:
> > -+            cmd = [self.pkgbin.get_command()[0] + "-native"] + args
> > -+        else:
> > -+            cmd = self.pkgbin.get_command() + args
> > -         p, out, err = Popen_safe(cmd, env=env)
> > -         rc, out, err = p.returncode, out.strip(), err.strip()
> > -         call = ' '.join(cmd)
> > -@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
> > -             if key.startswith('PKG_'):
> > -                 mlog.debug(f'env[{key}]: {value}')
> > -
> > --    def _call_pkgbin(self, args, env=None):
> > -+    def _call_pkgbin(self, args, env=None, use_native=False):
> > -         # Always copy the environment since we're going to modify it
> > -         # with pkg-config variables
> > -         if env is None:
> > -@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
> > -         targs = tuple(args)
> > -         cache = PkgConfigDependency.pkgbin_cache
> > -         if (self.pkgbin, targs, fenv) not in cache:
> > --            cache[(self.pkgbin, targs, fenv)] =
> > self._call_pkgbin_real(args, env)
> > -+            cache[(self.pkgbin, targs, fenv)] =
> > self._call_pkgbin_real(args, env, use_native)
> > -         return cache[(self.pkgbin, targs, fenv)]
> > -
> > -     def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
> > -@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
> > -                                       (self.name, out_raw))
> > -         self.link_args, self.raw_link_args = self._search_libs(out,
> > out_raw)
> > -
> > --    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> > T.Dict[str, T.Any]) -> str:
> > -+    def get_pkgconfig_variable(self, variable_name: str, kwargs:
> > T.Dict[str, T.Any], use_native=False) -> str:
> > -         options = ['--variable=' + variable_name, self.name]
> > -
> > -         if 'define_variable' in kwargs:
> > -@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
> > -
> > -             options = ['--define-variable=' + '='.join(definition)] +
> > options
> > -
> > --        ret, out, err = self._call_pkgbin(options)
> > -+        ret, out, err = self._call_pkgbin(options,
> > use_native=use_native)
> > -         variable = ''
> > -         if ret != 0:
> > -             if self.required:
> > diff --git a/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> > b/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> > deleted file mode 100644
> > index 29e164ccc7..0000000000
> > --- a/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> > +++ /dev/null
> > @@ -1,41 +0,0 @@
> > -When building gobject-introspection we want the *native* binaries (as
> > they need
> > -to be executed) but *host* gobject-introspection libraries, as otherwise
> > the
> > -native pkg-config can be used and the build will try to link native and
> > host
> > -binaries together.
> > -
> > -Upstream-Status: Backport [589236226856f591c9e8daf0cb7aa1aef8862388]
> > -Signed-off-by: Ross Burton <ross.burton@arm.com>
> > -
> > -diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> > -index f9660838e..2eefc3fc7 100644
> > ---- a/mesonbuild/modules/gnome.py
> > -+++ b/mesonbuild/modules/gnome.py
> > -@@ -84,8 +84,8 @@ class GnomeModule(ExtensionModule):
> > -
> > mlog.bold('https://github.com/mesonbuild/meson/issues/1387'),
> > -                      once=True)
> > -
> > --    def _get_native_dep(self, state, depname, required=True):
> > --        kwargs = {'native': True, 'required': required}
> > -+    def _get_dep(self, state, depname, native=False, required=True):
> > -+        kwargs = {'native': native, 'required': required}
> > -         holder = self.interpreter.func_dependency(state.current_node,
> > [depname], kwargs)
> > -         return holder.held_object
> > -
> > -@@ -101,7 +101,7 @@ class GnomeModule(ExtensionModule):
> > -             return ExternalProgram.from_entry(name, prog)
> > -
> > -         # Check if pkgconfig has a variable
> > --        dep = self._get_native_dep(state, depname, required=False)
> > -+        dep = self._get_dep(state, depname, native=True,
> required=False)
> > -         if dep.found() and dep.type_name == 'pkgconfig':
> > -             value = dep.get_pkgconfig_variable(varname, {})
> > -             if value:
> > -@@ -481,7 +481,7 @@ class GnomeModule(ExtensionModule):
> > -
> > -     def _get_gir_dep(self, state):
> > -         if not self.gir_dep:
> > --            self.gir_dep = self._get_native_dep(state, 'gobject-
> > introspection-1.0')
> > -+            self.gir_dep = self._get_dep(state, 'gobject-introspection-
> > 1.0')
> > -             self.giscanner = self._get_native_binary(state, 'g-ir-
> > scanner', 'gobject-introspection-1.0', 'g_ir_scanner')
> > -             self.gicompiler = self._get_native_binary(state, 'g-ir-
> > compiler', 'gobject-introspection-1.0', 'g_ir_compiler')
> > -         return self.gir_dep, self.giscanner, self.gicompiler
> > diff --git a/meta/recipes-devtools/meson/meson_0.58.1.bb b/meta/recipes-
> > devtools/meson/meson_0.59.1.bb
> > similarity index 100%
> > rename from meta/recipes-devtools/meson/meson_0.58.1.bb
> > rename to meta/recipes-devtools/meson/meson_0.59.1.bb
> > diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
> > b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> > similarity index 100%
> > rename from meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
> > rename to meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> > --
> > 2.31.1
>
>

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

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

* Re: [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1
  2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
                   ` (25 preceding siblings ...)
  2021-09-09  9:01 ` [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Peter Kjellerstedt
@ 2021-10-11  2:47 ` Hsia-Jun Li
  2021-10-11  8:05   ` Alexander Kanavin
  26 siblings, 1 reply; 33+ messages in thread
From: Hsia-Jun Li @ 2021-10-11  2:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex.kanavin



On 9/9/21 02:01, Alexander Kanavin wrote:
> CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> Drop 0003-native_bindir.patch: it doesn't seem to actually define
> anything where the use_native parameter is set to true.
> 
> Also, the issue should be solved without invasive, custom patching
> of the code: via meson.cross, custom .pc files for the items in
> question or some other configuration mechanism.
> 
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>   meta/recipes-devtools/meson/meson.inc         |  4 +-
>   .../0001-Make-CPU-family-warnings-fatal.patch | 20 ++--
>   .../meson/meson/0003-native_bindir.patch      | 94 -------------------
>   .../meson/meson/gi-target-dep.patch           | 41 --------
>   .../{meson_0.58.1.bb => meson_0.59.1.bb}      |  0
>   ...on_0.58.1.bb => nativesdk-meson_0.59.1.bb} |  0
>   6 files changed, 10 insertions(+), 149 deletions(-)
>   delete mode 100644 meta/recipes-devtools/meson/meson/0003-native_bindir.patch
>   delete mode 100644 meta/recipes-devtools/meson/meson/gi-target-dep.patch
>   rename meta/recipes-devtools/meson/{meson_0.58.1.bb => meson_0.59.1.bb} (100%)
>   rename meta/recipes-devtools/meson/{nativesdk-meson_0.58.1.bb => nativesdk-meson_0.59.1.bb} (100%)
I think we should update the meson.cross.template generated by this ^^^ 
file.

c_args, c_link_args, cpp_args, cpp_link_args have been moved to the 
'[built-in options]' section. Also we need an native-file here.
That is what
06b4910c3ada5398faf9369d686b82eee441bb19 has done for OE itself.

> 
> diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
> index f1746d2094..c83ea406f0 100644
> --- a/meta/recipes-devtools/meson/meson.inc
> +++ b/meta/recipes-devtools/meson/meson.inc
> @@ -9,15 +9,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
> 
>   SRC_URI = "https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mesonbuild_meson_releases_download_-24-257BPV-257D_meson-2D-24-257BPV-257D.tar.gz&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=gNJ7fQTAkVT-8n-Ph62ngFvOrjzapJ1INbXHP6rg2xU&s=5dqRty1dyk5ogg5-EgVkgg4YPUEY5-3UME8k0bWkEv4&e=  \
>              file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
> -           file://0003-native_bindir.patch \
>              file://0001-python-module-do-not-manipulate-the-environment-when.patch \
>              file://disable-rpath-handling.patch \
>              file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
> -           file://gi-target-dep.patch \
>              file://0001-Make-CPU-family-warnings-fatal.patch \
>              file://0002-Support-building-allarch-recipes-again.patch \
>              "
> -SRC_URI[sha256sum] = "3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d"
> +SRC_URI[sha256sum] = "db586a451650d46bbe10984a87b79d9bcdc1caebf38d8e189f8848f8d502356d"
> 
>   UPSTREAM_CHECK_URI = "https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mesonbuild_meson_releases&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=gNJ7fQTAkVT-8n-Ph62ngFvOrjzapJ1INbXHP6rg2xU&s=O7nZ0g946ut7YnoPv_FaabmxnkHPuAKY-r8ztXYdtT4&e= "
>   UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar"
> diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> index bcccfabd17..c5be526b10 100644
> --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch
> @@ -1,20 +1,21 @@
> -From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001
> +From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 Mon Sep 17 00:00:00 2001
>   From: Ross Burton <ross.burton@intel.com>
>   Date: Tue, 3 Jul 2018 13:59:09 +0100
> -Subject: [PATCH 1/2] Make CPU family warnings fatal
> +Subject: [PATCH] Make CPU family warnings fatal
> 
>   Upstream-Status: Inappropriate [OE specific]
>   Signed-off-by: Ross Burton <ross.burton@intel.com>
> +
>   ---
>    mesonbuild/envconfig.py   | 2 +-
>    mesonbuild/environment.py | 4 +---
>    2 files changed, 2 insertions(+), 4 deletions(-)
> 
>   diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
> -index c6a4df3..4d58c91 100644
> +index 307aac3..66fb7ec 100644
>   --- a/mesonbuild/envconfig.py
>   +++ b/mesonbuild/envconfig.py
> -@@ -266,7 +266,7 @@ class MachineInfo:
> +@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
> 
>            cpu_family = literal['cpu_family']
>            if cpu_family not in known_cpu_families:
> @@ -24,20 +25,17 @@ index c6a4df3..4d58c91 100644
>            endian = literal['endian']
>            if endian not in ('little', 'big'):
>   diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
> -index fc9b703..eea8345 100644
> +index 71286a5..179917e 100644
>   --- a/mesonbuild/environment.py
>   +++ b/mesonbuild/environment.py
> -@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
> +@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
>                trial = 'ppc64'
> 
>        if trial not in known_cpu_families:
> --        mlog.warning('Unknown CPU family {!r}, please report this at '
> +-        mlog.warning(f'Unknown CPU family {trial!r}, please report this at '
>   -                     'https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mesonbuild_meson_issues_new&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=gNJ7fQTAkVT-8n-Ph62ngFvOrjzapJ1INbXHP6rg2xU&s=E6p11_8xxyyW5xmKHE5K7_iKGL15ydVn4LzjxYHhyaw&e=  with the '
> --                     'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial))
> +-                     'output of `uname -a` and `cat /proc/cpuinfo`')
>   +        raise EnvironmentException('Unknown CPU family %s, see https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.yoctoproject.org_wiki_Meson_UnknownCPU&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=gNJ7fQTAkVT-8n-Ph62ngFvOrjzapJ1INbXHP6rg2xU&s=LluHbSsMmrwW57hP78ICwNrhaI_HYzqgsK9MAnx37ho&e=  for directions.' % trial)
> 
>        return trial
> 
> ---
> -2.24.0
> -
> diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> deleted file mode 100644
> index 89257b9e05..0000000000
> --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
> +++ /dev/null
> @@ -1,94 +0,0 @@
> -From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001
> -From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> -Date: Wed, 15 Nov 2017 15:05:01 +0100
> -Subject: [PATCH] native_bindir
> -
> -Some libraries, like QT, have pre-processors that convert their input
> -files into something that the cross-compiler can process. We find the
> -path of those pre-processors via pkg-config-native instead of
> -pkg-config.
> -
> -This path forces the use of pkg-config-native for host_bins arguments.
> -
> -There are some discussions upstream to merge this patch, but I presonaly believe
> -that is is OE only. https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mesonbuild_meson_issues_1849-23issuecomment-2D303730323&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=gNJ7fQTAkVT-8n-Ph62ngFvOrjzapJ1INbXHP6rg2xU&s=IApmoQBXk9DnxLOwc7ZqQvK3y6eYJzND5r08-dht6wE&e=
> -
> -Upstream-Status: Inappropriate [OE specific]
> -Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> -
> ----
> - mesonbuild/dependencies/base.py | 19 +++++++++++--------
> - 1 file changed, 11 insertions(+), 8 deletions(-)
> -
> -diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
> -index 14380d4..d0c443f 100644
> ---- a/mesonbuild/dependencies/base.py
> -+++ b/mesonbuild/dependencies/base.py
> -@@ -179,7 +179,7 @@ class Dependency:
> -     def get_exe_args(self, compiler):
> -         return []
> -
> --    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
> -+    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
> -         raise DependencyException(f'{self.name!r} is not a pkgconfig dependency')
> -
> -     def get_configtool_variable(self, variable_name):
> -@@ -267,7 +267,7 @@ class InternalDependency(Dependency):
> -             return True
> -         return any(d.is_built() for d in self.ext_deps)
> -
> --    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
> -+    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
> -         raise DependencyException('Method "get_pkgconfig_variable()" is '
> -                                   'invalid for an internal dependency')
> -
> -@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency):
> -         return s.format(self.__class__.__name__, self.name, self.is_found,
> -                         self.version_reqs)
> -
> --    def _call_pkgbin_real(self, args, env):
> --        cmd = self.pkgbin.get_command() + args
> -+    def _call_pkgbin_real(self, args, env, use_native=False):
> -+        if use_native:
> -+            cmd = [self.pkgbin.get_command()[0] + "-native"] + args
> -+        else:
> -+            cmd = self.pkgbin.get_command() + args
> -         p, out, err = Popen_safe(cmd, env=env)
> -         rc, out, err = p.returncode, out.strip(), err.strip()
> -         call = ' '.join(cmd)
> -@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency):
> -             if key.startswith('PKG_'):
> -                 mlog.debug(f'env[{key}]: {value}')
> -
> --    def _call_pkgbin(self, args, env=None):
> -+    def _call_pkgbin(self, args, env=None, use_native=False):
> -         # Always copy the environment since we're going to modify it
> -         # with pkg-config variables
> -         if env is None:
> -@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency):
> -         targs = tuple(args)
> -         cache = PkgConfigDependency.pkgbin_cache
> -         if (self.pkgbin, targs, fenv) not in cache:
> --            cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env)
> -+            cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native)
> -         return cache[(self.pkgbin, targs, fenv)]
> -
> -     def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]:
> -@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency):
> -                                       (self.name, out_raw))
> -         self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
> -
> --    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str:
> -+    def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str:
> -         options = ['--variable=' + variable_name, self.name]
> -
> -         if 'define_variable' in kwargs:
> -@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency):
> -
> -             options = ['--define-variable=' + '='.join(definition)] + options
> -
> --        ret, out, err = self._call_pkgbin(options)
> -+        ret, out, err = self._call_pkgbin(options, use_native=use_native)
> -         variable = ''
> -         if ret != 0:
> -             if self.required:
> diff --git a/meta/recipes-devtools/meson/meson/gi-target-dep.patch b/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> deleted file mode 100644
> index 29e164ccc7..0000000000
> --- a/meta/recipes-devtools/meson/meson/gi-target-dep.patch
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -When building gobject-introspection we want the *native* binaries (as they need
> -to be executed) but *host* gobject-introspection libraries, as otherwise the
> -native pkg-config can be used and the build will try to link native and host
> -binaries together.
> -
> -Upstream-Status: Backport [589236226856f591c9e8daf0cb7aa1aef8862388]
> -Signed-off-by: Ross Burton <ross.burton@arm.com>
> -
> -diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> -index f9660838e..2eefc3fc7 100644
> ---- a/mesonbuild/modules/gnome.py
> -+++ b/mesonbuild/modules/gnome.py
> -@@ -84,8 +84,8 @@ class GnomeModule(ExtensionModule):
> -                      mlog.bold('https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mesonbuild_meson_issues_1387&d=DwIDAg&c=7dfBJ8cXbWjhc0BhImu8wQ&r=P4xb2_7biqBxD4LGGPrSV6j-jf3C3xlR7PXU-mLTeZE&m=gNJ7fQTAkVT-8n-Ph62ngFvOrjzapJ1INbXHP6rg2xU&s=IN-Sy6yGBdhGjdLP8A2fUqMEAFSx_84xWoeH1jIeb7Q&e= '),
> -                      once=True)
> -
> --    def _get_native_dep(self, state, depname, required=True):
> --        kwargs = {'native': True, 'required': required}
> -+    def _get_dep(self, state, depname, native=False, required=True):
> -+        kwargs = {'native': native, 'required': required}
> -         holder = self.interpreter.func_dependency(state.current_node, [depname], kwargs)
> -         return holder.held_object
> -
> -@@ -101,7 +101,7 @@ class GnomeModule(ExtensionModule):
> -             return ExternalProgram.from_entry(name, prog)
> -
> -         # Check if pkgconfig has a variable
> --        dep = self._get_native_dep(state, depname, required=False)
> -+        dep = self._get_dep(state, depname, native=True, required=False)
> -         if dep.found() and dep.type_name == 'pkgconfig':
> -             value = dep.get_pkgconfig_variable(varname, {})
> -             if value:
> -@@ -481,7 +481,7 @@ class GnomeModule(ExtensionModule):
> -
> -     def _get_gir_dep(self, state):
> -         if not self.gir_dep:
> --            self.gir_dep = self._get_native_dep(state, 'gobject-introspection-1.0')
> -+            self.gir_dep = self._get_dep(state, 'gobject-introspection-1.0')
> -             self.giscanner = self._get_native_binary(state, 'g-ir-scanner', 'gobject-introspection-1.0', 'g_ir_scanner')
> -             self.gicompiler = self._get_native_binary(state, 'g-ir-compiler', 'gobject-introspection-1.0', 'g_ir_compiler')
> -         return self.gir_dep, self.giscanner, self.gicompiler
> diff --git a/meta/recipes-devtools/meson/meson_0.58.1.bb b/meta/recipes-devtools/meson/meson_0.59.1.bb
> similarity index 100%
> rename from meta/recipes-devtools/meson/meson_0.58.1.bb
> rename to meta/recipes-devtools/meson/meson_0.59.1.bb
> diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> similarity index 100%
> rename from meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb
> rename to meta/recipes-devtools/meson/nativesdk-meson_0.59.1.bb
> --
> 2.31.1
> 
> 
> 
> 
> 

-- 
Hsia-Jun(Randy) Li

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

* Re: [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1
  2021-10-11  2:47 ` Hsia-Jun Li
@ 2021-10-11  8:05   ` Alexander Kanavin
  0 siblings, 0 replies; 33+ messages in thread
From: Alexander Kanavin @ 2021-10-11  8:05 UTC (permalink / raw)
  To: Hsia-Jun Li; +Cc: OE-core

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

On Mon, 11 Oct 2021 at 04:48, Hsia-Jun Li <Randy.Li@synaptics.com> wrote:

> I think we should update the meson.cross.template generated by this ^^^
> file.
>
> c_args, c_link_args, cpp_args, cpp_link_args have been moved to the
> '[built-in options]' section. Also we need an native-file here.
> That is what
> 06b4910c3ada5398faf9369d686b82eee441bb19 has done for OE itself.
>

Can you send a patch please?

Alex

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

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

* Re: [OE-core] [PATCH 22/26] libpam: update 1.5.1 -> 1.5.2
  2021-09-08 18:01 ` [PATCH 22/26] libpam: update 1.5.1 -> 1.5.2 Alexander Kanavin
@ 2021-10-12 10:13   ` Zoltan Boszormenyi
  0 siblings, 0 replies; 33+ messages in thread
From: Zoltan Boszormenyi @ 2021-10-12 10:13 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core; +Cc: Alexander Kanavin

On 2021. 09. 08. 20:01, Alexander Kanavin wrote:
> From: Alexander Kanavin <alex@linutronix.de>
> 
> Drop patches: issues fixed upstream.
> 
> Move .pc files to correct place as libpam is instructed to install them in /lib via
> --libdir.
> 
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>   .../0001-Makefile.am-support-usrmage.patch    | 28 -------------------
>   ...space-Makefile.am-correctly-install-.patch | 28 -------------------
>   .../pam/{libpam_1.5.1.bb => libpam_1.5.2.bb}  |  7 +++--
>   3 files changed, 4 insertions(+), 59 deletions(-)
>   delete mode 100644 meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch
>   delete mode 100644 meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch
>   rename meta/recipes-extended/pam/{libpam_1.5.1.bb => libpam_1.5.2.bb} (96%)
> 
> diff --git a/meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch b/meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch
> deleted file mode 100644
> index 5c6bc92705..0000000000
> --- a/meta/recipes-extended/pam/libpam/0001-Makefile.am-support-usrmage.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -From c09e012590c1ec2d3b622b64f1bfc10a2286c9ea Mon Sep 17 00:00:00 2001
> -From: Changqing Li <changqing.li@windriver.com>
> -Date: Wed, 6 Jan 2021 12:08:20 +0800
> -Subject: [PATCH] Makefile.am: support usrmage
> -
> -Upstream-Status: Inappropriate [oe-specific]
> -
> -Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ----
> - modules/pam_namespace/Makefile.am | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/modules/pam_namespace/Makefile.am b/modules/pam_namespace/Makefile.am
> -index ddd5fc0..a1f1bec 100644
> ---- a/modules/pam_namespace/Makefile.am
> -+++ b/modules/pam_namespace/Makefile.am
> -@@ -18,7 +18,7 @@ TESTS = $(dist_check_SCRIPTS)
> - securelibdir = $(SECUREDIR)
> - secureconfdir = $(SCONFIGDIR)
> - namespaceddir = $(SCONFIGDIR)/namespace.d
> --servicedir = /lib/systemd/system
> -+servicedir = $(systemd_system_unitdir)
> -
> - AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
> -         -DSECURECONF_DIR=\"$(SCONFIGDIR)/\" $(WARN_CFLAGS)
> ---
> -2.17.1
> -
> diff --git a/meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch b/meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch
> deleted file mode 100644
> index b41d1e5962..0000000000
> --- a/meta/recipes-extended/pam/libpam/0001-modules-pam_namespace-Makefile.am-correctly-install-.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -From e2db4082f6b988f1d5803028e9e47aee5f3519ac Mon Sep 17 00:00:00 2001
> -From: Alexander Kanavin <alex.kanavin@gmail.com>
> -Date: Sun, 27 Dec 2020 00:30:45 +0100
> -Subject: [PATCH] modules/pam_namespace/Makefile.am: correctly install systemd
> - unit file
> -
> -Upstream-Status: Pending
> -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ----
> - modules/pam_namespace/Makefile.am | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/modules/pam_namespace/Makefile.am b/modules/pam_namespace/Makefile.am
> -index 21e1b33..ddd5fc0 100644
> ---- a/modules/pam_namespace/Makefile.am
> -+++ b/modules/pam_namespace/Makefile.am
> -@@ -18,7 +18,7 @@ TESTS = $(dist_check_SCRIPTS)
> - securelibdir = $(SECUREDIR)
> - secureconfdir = $(SCONFIGDIR)
> - namespaceddir = $(SCONFIGDIR)/namespace.d
> --servicedir = $(prefix)/lib/systemd/system
> -+servicedir = /lib/systemd/system
> -
> - AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
> -         -DSECURECONF_DIR=\"$(SCONFIGDIR)/\" $(WARN_CFLAGS)
> ---
> -2.24.0
> -
> diff --git a/meta/recipes-extended/pam/libpam_1.5.1.bb b/meta/recipes-extended/pam/libpam_1.5.2.bb
> similarity index 96%
> rename from meta/recipes-extended/pam/libpam_1.5.1.bb
> rename to meta/recipes-extended/pam/libpam_1.5.2.bb
> index efcd27137f..a3c4a50cb3 100644
> --- a/meta/recipes-extended/pam/libpam_1.5.1.bb
> +++ b/meta/recipes-extended/pam/libpam_1.5.2.bb
> @@ -21,18 +21,17 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux
>              file://pam.d/common-session-noninteractive \
>              file://pam.d/other \
>              file://libpam-xtests.patch \
> -           file://0001-modules-pam_namespace-Makefile.am-correctly-install-.patch \
> -           file://0001-Makefile.am-support-usrmage.patch \
>              file://run-ptest \
>              file://pam-volatiles.conf \
>              "
>   
> -SRC_URI[sha256sum] = "201d40730b1135b1b3cdea09f2c28ac634d73181ccd0172ceddee3649c5792fc"
> +SRC_URI[sha256sum] = "e4ec7131a91da44512574268f493c6d8ca105c87091691b8e9b56ca685d4f94d"
>   
>   DEPENDS = "bison-native flex flex-native cracklib libxml2-native virtual/crypt"
>   
>   EXTRA_OECONF = "--includedir=${includedir}/security \
>                   --libdir=${base_libdir} \
> +                --with-systemdunitdir=${systemd_system_unitdir} \
>                   --disable-nis \
>                   --disable-regenerate-docu \
>                   --disable-doc \
> @@ -148,6 +147,8 @@ do_install() {
>   	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
>   		echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
>   	fi
> +        install -d ${D}/${libdir}/
> +	mv ${D}/${base_libdir}/pkgconfig ${D}/${libdir}/

This is broken with DISTRO_FEATURES "usrmerge".
mv complains that the src and dest are the same files.

Best regards,
Zoltán Böszörményi

>   }
>   
>   do_install_ptest() {
> 
> 
> 
> 
> 


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

* Re: [OE-core] [PATCH 05/26] rpm: update 4.16.1.3 -> 4.17.0
  2021-09-08 18:01 ` [PATCH 05/26] rpm: update 4.16.1.3 -> 4.17.0 Alexander Kanavin
@ 2021-10-14 12:19   ` Martin Jansa
  0 siblings, 0 replies; 33+ messages in thread
From: Martin Jansa @ 2021-10-14 12:19 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

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

On Wed, Sep 8, 2021 at 8:01 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> The flagship features are migration from bdb to sqlite and zstd support,
> both are enabled and taken into use. The relationship and upstream
> preference
> between sqlite and ndb formats isn't quite clear.
>

FYI: interesting side-effect of bdb removal in
https://github.com/rpm-software-management/rpm/commit/4290300e24c5ab17c615b6108f38438e31eeb1d0
was that in some of our builds I've started to see:
ERROR: rpm-native-1_4.17.0-r0 do_configure: QA Issue: rpm-native: configure
was passed unrecognised options: --without-api-sanity-checker
--without-abi-compliance-checker [unknown-configure-option]

And the interesting part is that reporting unrecognised options stops
working (enable_option_checking=no gets set in generated configure) when
there is AC_CONFIG_SUBDIRS in configure.ac (even when not actively being
used as in
https://github.com/rpm-software-management/rpm/commit/4290300e24c5ab17c615b6108f38438e31eeb1d0#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810L509
when not using internal bdb), see
https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/status.m4#n1099

The unrecognized options were used since rpm-5 was removed in 2017 with:
https://git.openembedded.org/openembedded-core/commit/?id=d0365f35303db3595688a6e5290677e02a72c54e
but they didn't make it to QA issue, because of configure behavior.

Regards,

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

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

end of thread, other threads:[~2021-10-14 12:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 18:01 [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 02/26] libcap: update 2.51 -> 2.54 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 03/26] lua: add a recipe from meta-oe Alexander Kanavin
2021-09-09  5:11   ` [OE-core] " Khem Raj
2021-09-08 18:01 ` [PATCH 04/26] lua: update 5.3.6 -> 5.4.3 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 05/26] rpm: update 4.16.1.3 -> 4.17.0 Alexander Kanavin
2021-10-14 12:19   ` [OE-core] " Martin Jansa
2021-09-08 18:01 ` [PATCH 06/26] libdnf: fix the rpm sqlite-only target setup Alexander Kanavin
2021-09-08 18:01 ` [PATCH 07/26] libsolv: disable rpm bdb format support Alexander Kanavin
2021-09-08 18:01 ` [PATCH 08/26] perl: do not build berkeley db module by default Alexander Kanavin
2021-09-08 18:01 ` [PATCH 09/26] package_rpm: use zstd instead of xz Alexander Kanavin
2021-09-08 18:01 ` [PATCH 10/26] qemu: update 6.0.0 -> 6.1.0 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 11/26] runqemu: correct vga-virtio option to keep virgl enabled Alexander Kanavin
2021-09-08 18:01 ` [PATCH 12/26] gnupg: update 2.3.1 -> 2.3.2 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 13/26] pinentry: update 1.1.1 -> 1.2.0 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 14/26] spirv-tools: update 2021.2 -> 2021.3 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 15/26] glslang: update 11.5.0 -> 11.6.0 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 16/26] shaderc: update 2021.1 -> 2021.2 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 17/26] lttng: update 2.12 -> 2.13.0 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 18/26] core-image-ptest-all: bump RAM requirement to 4G Alexander Kanavin
2021-09-08 18:01 ` [PATCH 19/26] inetutils: update 2.1 -> 2.2 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 20/26] systemd: update 249.3 -> 249.4 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 21/26] lsof: update 4.91 -> 4.94.0 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 22/26] libpam: update 1.5.1 -> 1.5.2 Alexander Kanavin
2021-10-12 10:13   ` [OE-core] " Zoltan Boszormenyi
2021-09-08 18:01 ` [PATCH 23/26] libhandy: update 1.2.3 -> 1.4.0 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 24/26] rt-tests: update 2.1 -> 2.2 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 25/26] libgit2: update 1.1.1 -> 1.2.0 Alexander Kanavin
2021-09-08 18:01 ` [PATCH 26/26] libssh2: update 1.9.0 -> 1.10.0 Alexander Kanavin
2021-09-09  9:01 ` [OE-core] [PATCH 01/26] meson: update 0.58.1 -> 0.59.1 Peter Kjellerstedt
2021-09-09  9:04   ` Alexander Kanavin
2021-10-11  2:47 ` Hsia-Jun Li
2021-10-11  8:05   ` Alexander Kanavin

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