Date   

Re: Security Advisory - yasm - CVE-2021-33461: Propose mv yasm_git.bb yasm-native_git.bb

Randy MacLeod
 

+ Anuj for meta-intel-qat use of yasm-native.

On 2022-10-13 10:05, Randy MacLeod wrote:
On 2022-10-13 02:33, Khem Raj wrote:


On Wed, Oct 12, 2022 at 10:59 PM Polampalli, Archana <Archana.Polampalli@... <mailto:Archana.Polampalli@...>> wrote:

    Hi Khem Raj,

    I Have seen the link, issue is in Open.

    Could you please confirm open embedded is going to provide the fix.


If someone in community signs up for it then yes


and in this case, the community is us (Wind River and other folks using yasm in OE)
so that may be you providing the fix Archana.

I'll explain more offline.


The yasm CVEs have come up again. Sigh.

Upstream seems not to be interested in fixing CVEs:

https://github.com/yasm/yasm/commits/master


We only need yasm-native (1) so does anyone object to
moving this recipe to yasm-native_git.bb ? This small change
would make it clear that images/tagets/machines are not _directly_ vulnerable
due to the fuzzing errors people are generating which result in CVEs.


../Randy


meta-oe.git on  master [$?]
❯ rg yasm
meta-multimedia/recipes-multimedia/aom/aom_3.4.0.bb
18:DEPENDS = " yasm-native"

meta-oe/recipes-devtools/yasm/yasm_git.bb
3:HOMEPAGE = "http://www.tortall.net/projects/yasm/"
13:SRC_URI = "git://github.com/yasm/yasm.git;branch=master;protocol=https \

meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
310:    yasm \

meta-oe.git on  master [$?]
❯ rg yasm ../meta-browser.git/
../meta-browser.git/meta-firefox/recipes-browser/firefox/firefox_68.9.0esr.bb
8:            yasm-native nasm-native unzip-native \

../meta-browser.git/meta-firefox/recipes-browser/firefox/firefox/fixes/pre-generated-old-configure.patch
8213:+                { echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&2; echo "configure: error: Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api" 1>&5; exit 1; }


meta-oe.git on  master [$?]
❯ rg yasm ../meta-intel-qat.git/
../meta-intel-qat.git/recipes-extended/qat/qat17_4.20.0-00001.bb
10:DEPENDS += "boost udev zlib openssl yasm-native"
182:# yasm encodes path to the input file and doesn't provide any option to workaround it.




../Randy



    Regards,
    Archana


    ------------------------------------------------------------------------
    *From:* Khem Raj <raj.khem@... <mailto:raj.khem@...>>
    *Sent:* Thursday, October 13, 2022 4:00 AM
    *To:* Polampalli, Archana <Archana.Polampalli@...
    <mailto:Archana.Polampalli@...>>
    *Cc:* openembedded-devel@...
    <mailto:openembedded-devel@...>
    <openembedded-devel@...
    <mailto:openembedded-devel@...>>
    *Subject:* Re: [oe] Security Advisory - yasm - CVE-2021-33461
    [Please note: This e-mail is from an EXTERNAL e-mail address]


    On Wed, Oct 12, 2022 at 10:24 AM Polampalli, Archana
    <archana.polampalli@...
    <mailto:archana.polampalli@...>> wrote:
    >
    > HI,
    >
    > Could you please confirm is there any security fix providing for CVE-2021-33461.

    seems to be open https://github.com/yasm/yasm/issues/161
    <https://github.com/yasm/yasm/issues/161>

    >
    >
    > Regards,
    > Archana
    >
    >     >







-- 
# Randy MacLeod
# Wind River Linux


Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Alexander Kanavin
 

On Thu, 30 Mar 2023 at 19:20, Böszörményi Zoltán <zboszor@...> wrote:

2023. 03. 30. 17:40 keltezéssel, Alexander Kanavin írta:
How do libfprint's meson rules for producing the executable and then
running it look like?
Here are the two generators:
https://gitlab.freedesktop.org/libfprint/libfprint/-/blob/master/libfprint/meson.build#L310
https://gitlab.freedesktop.org/libfprint/libfprint/-/blob/master/libfprint/meson.build#L325
Right. Welcome to:
https://github.com/mesonbuild/meson/issues/11029

I'm not sure what rules in meson do use the exe_wrapper setting, if
you can investigate that and see if one of them can be used in this
case, would be great. Or those two generators can be patched to prefix
the wrapper.

Alex


Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Zoltan Boszormenyi
 

2023. 03. 30. 17:40 keltezéssel, Alexander Kanavin írta:
How do libfprint's meson rules for producing the executable and then
running it look like?
Here are the two generators:
https://gitlab.freedesktop.org/libfprint/libfprint/-/blob/master/libfprint/meson.build#L310
https://gitlab.freedesktop.org/libfprint/libfprint/-/blob/master/libfprint/meson.build#L325

Any meson based recipe has a similar entry in ${WORKDIR}/meson.cross:

exe_wrapper = '/srv/storage/alex/yocto/build-64-alt/tmp/work/core2-64-poky-linux/glib-2.0/1_2.74.6-r0/meson-qemuwrapper'
Yes, and it's created for libfprint, it's just not used.
Otherwise running the executable would have succeeded.

And the use of the exe_wrapper is documented here:
https://mesonbuild.com/Cross-compilation.html

Alex

On Thu, 30 Mar 2023 at 17:24, Böszörményi Zoltán <zboszor@...> wrote:
2023. 03. 30. 15:50 keltezéssel, Alexander Kanavin írta:
Meson is specifically configured in yocto to user qemu usermode as the
wrapper to run cross binaries, so can libfprint build configuration be
tweaked to use that? This would avoid all the nasty -native extensions
and modifications.
How would I do that? This is the error if I not use the
externally built executables:

| [122/124]
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real
--internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| FAILED: libfprint/70-libfprint-2.rules
|
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real
--internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| Traceback (most recent call last):
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real",
line 8, in <module>
| sys.exit(main())
| ^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 287, in main
| return run(sys.argv[1:], launcher)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 275, in run
| return run_script_command(args[1], args[2:])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 223, in run_script_command
| return module.run(script_args)
| ^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py",
line 121, in run
| return run_exe(exe)
| ^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py",
line 66, in run_exe
| p = subprocess.Popen(cmd_args, env=child_env, cwd=exe.workdir,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1024, in __init__
| self._execute_child(args, executable, preexec_fn, close_fds,
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1789, in _execute_child
| self._posix_spawn(args, executable, env, restore_signals,
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1733, in _posix_spawn
| self.pid = os.posix_spawn(executable, args, env, **kwargs)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| FileNotFoundError: [Errno 2] No such file or directory:
'/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules'

The executable is built, it is there, and it's using the target system's
runtime linker path.

Obviously, meson doesn't run it through the exe_wrapper.

Alex

On Thu, 30 Mar 2023 at 15:43, Zoltan Boszormenyi <zboszor@...> wrote:
libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
.../0002-Make-building-tests-optional.patch | 47 ++++++++
.../libfprint/libfprint_1.94.5.bb | 45 +++++++
3 files changed, 203 insertions(+)
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+ ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+- 'fprint-list-udev-hwdb.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++ udev_hwdb = executable('fprint-list-udev-hwdb',
++ 'fprint-list-udev-hwdb.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++else
++ udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+ output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+ install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+- udev_rules = executable('fprint-list-udev-rules',
+- 'fprint-list-udev-rules.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++ if udev_rules_cmd == ''
++ udev_rules = executable('fprint-list-udev-rules',
++ 'fprint-list-udev-rules.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++ else
++ udev_rules = find_program(udev_rules_cmd)
++ endif
+
+ custom_target('udev-rules',
+ output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+ description: 'Installation path for udev rules',
+ type: 'string',
+ value: 'auto')
++option('udev_rules_cmd',
++ description : 'Optional path for native build of fprint-list-udev-rules',
++ type : 'string',
++ value : '')
+ option('udev_hwdb',
+ description: 'Whether to create a udev hwdb for autosuspend (included in systemd v248 and later)',
+ type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+ description: 'Installation path for udev hwdb',
+ type: 'string',
+ value: 'auto')
++option('udev_hwdb_cmd',
++ description : 'Optional path for native build of fprint-list-udev-hwdb',
++ type : 'string',
++ value : '')
+ option('gtk-examples',
+ description: 'Whether to build GTK+ example applications',
+ type: 'boolean',
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+ description: 'Whether to build the API documentation',
+ type: 'boolean',
+ value: true)
++option('tests',
++ description: 'Whether to build the tests',
++ type: 'boolean',
++ value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+ file://0001-Optionally-use-native-generators.patch \
+ file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+ -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+ install -d ${D}${bindir}
+ install -m0755 ${B}/libfprint/fprint-list-udev-hwdb ${D}${bindir}/fprint-list-udev-hwdb
+ install -m0755 ${B}/libfprint/fprint-list-udev-rules ${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2



Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Alexander Kanavin
 

Maybe you can raise the concern with upstream and see what they say?
How, in their opinion, should their component be cross-compiled? Can
the need to run target executables be eliminated from the build in
some other way we're not seeing?

Alex

On Thu, 30 Mar 2023 at 17:52, Böszörményi Zoltán <zboszor@...> wrote:

2023. 03. 30. 17:24 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
2023. 03. 30. 15:50 keltezéssel, Alexander Kanavin írta:
Meson is specifically configured in yocto to user qemu usermode as the
wrapper to run cross binaries, so can libfprint build configuration be
tweaked to use that? This would avoid all the nasty -native extensions
and modifications.
How would I do that? This is the error if I not use the
externally built executables:

| [122/124]
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real
--internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| FAILED: libfprint/70-libfprint-2.rules
|
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real
--internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| Traceback (most recent call last):
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real",
line 8, in <module>
| sys.exit(main())
| ^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 287, in main
| return run(sys.argv[1:], launcher)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 275, in run
| return run_script_command(args[1], args[2:])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 223, in run_script_command
| return module.run(script_args)
| ^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py",
line 121, in run
| return run_exe(exe)
| ^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py",
line 66, in run_exe
| p = subprocess.Popen(cmd_args, env=child_env, cwd=exe.workdir,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1024, in __init__
| self._execute_child(args, executable, preexec_fn, close_fds,
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1789, in _execute_child
| self._posix_spawn(args, executable, env, restore_signals,
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1733, in _posix_spawn
| self.pid = os.posix_spawn(executable, args, env, **kwargs)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| FileNotFoundError: [Errno 2] No such file or directory:
'/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules'

The executable is built, it is there, and it's using the target system's
runtime linker path.

Obviously, meson doesn't run it through the exe_wrapper.
It is possible that meson doesn't support running executables
via exe_wrapper whose output is captured in a file?

Maybe rewriting the generators to write their output directly
instead of on stdout will make libfprint more cross compiler
friendly.



Alex

On Thu, 30 Mar 2023 at 15:43, Zoltan Boszormenyi <zboszor@...> wrote:
libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
.../0002-Make-building-tests-optional.patch | 47 ++++++++
.../libfprint/libfprint_1.94.5.bb | 45 +++++++
3 files changed, 203 insertions(+)
create mode 100644
meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
create mode 100644
meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git
a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++
b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+ ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+- 'fprint-list-udev-hwdb.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++ udev_hwdb = executable('fprint-list-udev-hwdb',
++ 'fprint-list-udev-hwdb.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++else
++ udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+ output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+ install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+- udev_rules = executable('fprint-list-udev-rules',
+- 'fprint-list-udev-rules.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++ if udev_rules_cmd == ''
++ udev_rules = executable('fprint-list-udev-rules',
++ 'fprint-list-udev-rules.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++ else
++ udev_rules = find_program(udev_rules_cmd)
++ endif
+
+ custom_target('udev-rules',
+ output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+ description: 'Installation path for udev rules',
+ type: 'string',
+ value: 'auto')
++option('udev_rules_cmd',
++ description : 'Optional path for native build of fprint-list-udev-rules',
++ type : 'string',
++ value : '')
+ option('udev_hwdb',
+ description: 'Whether to create a udev hwdb for autosuspend (included in
systemd v248 and later)',
+ type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+ description: 'Installation path for udev hwdb',
+ type: 'string',
+ value: 'auto')
++option('udev_hwdb_cmd',
++ description : 'Optional path for native build of fprint-list-udev-hwdb',
++ type : 'string',
++ value : '')
+ option('gtk-examples',
+ description: 'Whether to build GTK+ example applications',
+ type: 'boolean',
+--
+2.39.2
+
diff --git
a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+ description: 'Whether to build the API documentation',
+ type: 'boolean',
+ value: true)
++option('tests',
++ description: 'Whether to build the tests',
++ type: 'boolean',
++ value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+
git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+ file://0001-Optionally-use-native-generators.patch \
+ file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+ -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+ install -d ${D}${bindir}
+ install -m0755 ${B}/libfprint/fprint-list-udev-hwdb
${D}${bindir}/fprint-list-udev-hwdb
+ install -m0755 ${B}/libfprint/fprint-list-udev-rules
${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2






Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Zoltan Boszormenyi
 

2023. 03. 30. 17:24 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:
2023. 03. 30. 15:50 keltezéssel, Alexander Kanavin írta:
Meson is specifically configured in yocto to user qemu usermode as the
wrapper to run cross binaries, so can libfprint build configuration be
tweaked to use that? This would avoid all the nasty -native extensions
and modifications.
How would I do that? This is the error if I not use the
externally built executables:

| [122/124] /home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real --internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| FAILED: libfprint/70-libfprint-2.rules
| /home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real --internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| Traceback (most recent call last):
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real", line 8, in <module>
|     sys.exit(main())
|              ^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 287, in main
|     return run(sys.argv[1:], launcher)
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 275, in run
|     return run_script_command(args[1], args[2:])
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 223, in run_script_command
|     return module.run(script_args)
|            ^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py", line 121, in run
|     return run_exe(exe)
|            ^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py", line 66, in run_exe
|     p = subprocess.Popen(cmd_args, env=child_env, cwd=exe.workdir,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py", line 1024, in __init__
|     self._execute_child(args, executable, preexec_fn, close_fds,
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py", line 1789, in _execute_child
|     self._posix_spawn(args, executable, env, restore_signals,
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py", line 1733, in _posix_spawn
|     self.pid = os.posix_spawn(executable, args, env, **kwargs)
|                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| FileNotFoundError: [Errno 2] No such file or directory: '/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules'

The executable is built, it is there, and it's using the target system's
runtime linker path.

Obviously, meson doesn't run it through the exe_wrapper.
It is possible that meson doesn't support running executables
via exe_wrapper whose output is captured in a file?

Maybe rewriting the generators to write their output directly
instead of on stdout will make libfprint more cross compiler
friendly.



Alex

On Thu, 30 Mar 2023 at 15:43, Zoltan Boszormenyi <zboszor@...> wrote:
libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
  ...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
  .../0002-Make-building-tests-optional.patch   |  47 ++++++++
  .../libfprint/libfprint_1.94.5.bb             |  45 +++++++
  3 files changed, 203 insertions(+)
  create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
  create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
  create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt     |  8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+     ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+-    'fprint-list-udev-hwdb.c',
+-    dependencies: libfprint_private_dep,
+-    link_with: libfprint_drivers,
+-    install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++    udev_hwdb = executable('fprint-list-udev-hwdb',
++        'fprint-list-udev-hwdb.c',
++        dependencies: libfprint_private_dep,
++        link_with: libfprint_drivers,
++        install: false)
++else
++    udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+     output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+     install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+-    udev_rules = executable('fprint-list-udev-rules',
+-        'fprint-list-udev-rules.c',
+-        dependencies: libfprint_private_dep,
+-        link_with: libfprint_drivers,
+-        install: false)
++    if udev_rules_cmd == ''
++        udev_rules = executable('fprint-list-udev-rules',
++            'fprint-list-udev-rules.c',
++            dependencies: libfprint_private_dep,
++            link_with: libfprint_drivers,
++            install: false)
++    else
++        udev_rules = find_program(udev_rules_cmd)
++    endif
+
+     custom_target('udev-rules',
+         output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+        description: 'Installation path for udev rules',
+        type: 'string',
+        value: 'auto')
++option('udev_rules_cmd',
++       description : 'Optional path for native build of fprint-list-udev-rules',
++       type : 'string',
++       value : '')
+ option('udev_hwdb',
+        description: 'Whether to create a udev hwdb for autosuspend (included in systemd v248 and later)',
+        type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+        description: 'Installation path for udev hwdb',
+        type: 'string',
+        value: 'auto')
++option('udev_hwdb_cmd',
++       description : 'Optional path for native build of fprint-list-udev-hwdb',
++       type : 'string',
++       value : '')
+ option('gtk-examples',
+        description: 'Whether to build GTK+ example applications',
+        type: 'boolean',
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build       | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++    subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+        description: 'Whether to build the API documentation',
+        type: 'boolean',
+        value: true)
++option('tests',
++       description: 'Whether to build the tests',
++       type: 'boolean',
++       value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+       file://0001-Optionally-use-native-generators.patch \
+       file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+       -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+       install -d ${D}${bindir}
+       install -m0755 ${B}/libfprint/fprint-list-udev-hwdb ${D}${bindir}/fprint-list-udev-hwdb
+       install -m0755 ${B}/libfprint/fprint-list-udev-rules ${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2





Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Alexander Kanavin
 

How do libfprint's meson rules for producing the executable and then
running it look like?

Any meson based recipe has a similar entry in ${WORKDIR}/meson.cross:

exe_wrapper = '/srv/storage/alex/yocto/build-64-alt/tmp/work/core2-64-poky-linux/glib-2.0/1_2.74.6-r0/meson-qemuwrapper'

And the use of the exe_wrapper is documented here:
https://mesonbuild.com/Cross-compilation.html

Alex

On Thu, 30 Mar 2023 at 17:24, Böszörményi Zoltán <zboszor@...> wrote:

2023. 03. 30. 15:50 keltezéssel, Alexander Kanavin írta:
Meson is specifically configured in yocto to user qemu usermode as the
wrapper to run cross binaries, so can libfprint build configuration be
tweaked to use that? This would avoid all the nasty -native extensions
and modifications.
How would I do that? This is the error if I not use the
externally built executables:

| [122/124]
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real
--internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| FAILED: libfprint/70-libfprint-2.rules
|
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real
--internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| Traceback (most recent call last):
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real",
line 8, in <module>
| sys.exit(main())
| ^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 287, in main
| return run(sys.argv[1:], launcher)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 275, in run
| return run_script_command(args[1], args[2:])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py",
line 223, in run_script_command
| return module.run(script_args)
| ^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py",
line 121, in run
| return run_exe(exe)
| ^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py",
line 66, in run_exe
| p = subprocess.Popen(cmd_args, env=child_env, cwd=exe.workdir,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1024, in __init__
| self._execute_child(args, executable, preexec_fn, close_fds,
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1789, in _execute_child
| self._posix_spawn(args, executable, env, restore_signals,
| File
"/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py",
line 1733, in _posix_spawn
| self.pid = os.posix_spawn(executable, args, env, **kwargs)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| FileNotFoundError: [Errno 2] No such file or directory:
'/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules'

The executable is built, it is there, and it's using the target system's
runtime linker path.

Obviously, meson doesn't run it through the exe_wrapper.


Alex

On Thu, 30 Mar 2023 at 15:43, Zoltan Boszormenyi <zboszor@...> wrote:
libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
.../0002-Make-building-tests-optional.patch | 47 ++++++++
.../libfprint/libfprint_1.94.5.bb | 45 +++++++
3 files changed, 203 insertions(+)
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+ ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+- 'fprint-list-udev-hwdb.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++ udev_hwdb = executable('fprint-list-udev-hwdb',
++ 'fprint-list-udev-hwdb.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++else
++ udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+ output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+ install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+- udev_rules = executable('fprint-list-udev-rules',
+- 'fprint-list-udev-rules.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++ if udev_rules_cmd == ''
++ udev_rules = executable('fprint-list-udev-rules',
++ 'fprint-list-udev-rules.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++ else
++ udev_rules = find_program(udev_rules_cmd)
++ endif
+
+ custom_target('udev-rules',
+ output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+ description: 'Installation path for udev rules',
+ type: 'string',
+ value: 'auto')
++option('udev_rules_cmd',
++ description : 'Optional path for native build of fprint-list-udev-rules',
++ type : 'string',
++ value : '')
+ option('udev_hwdb',
+ description: 'Whether to create a udev hwdb for autosuspend (included in systemd v248 and later)',
+ type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+ description: 'Installation path for udev hwdb',
+ type: 'string',
+ value: 'auto')
++option('udev_hwdb_cmd',
++ description : 'Optional path for native build of fprint-list-udev-hwdb',
++ type : 'string',
++ value : '')
+ option('gtk-examples',
+ description: 'Whether to build GTK+ example applications',
+ type: 'boolean',
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+ description: 'Whether to build the API documentation',
+ type: 'boolean',
+ value: true)
++option('tests',
++ description: 'Whether to build the tests',
++ type: 'boolean',
++ value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+ file://0001-Optionally-use-native-generators.patch \
+ file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+ -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+ install -d ${D}${bindir}
+ install -m0755 ${B}/libfprint/fprint-list-udev-hwdb ${D}${bindir}/fprint-list-udev-hwdb
+ install -m0755 ${B}/libfprint/fprint-list-udev-rules ${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2




Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Zoltan Boszormenyi
 

2023. 03. 30. 15:50 keltezéssel, Alexander Kanavin írta:
Meson is specifically configured in yocto to user qemu usermode as the
wrapper to run cross binaries, so can libfprint build configuration be
tweaked to use that? This would avoid all the nasty -native extensions
and modifications.
How would I do that? This is the error if I not use the
externally built executables:

| [122/124] /home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real --internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| FAILED: libfprint/70-libfprint-2.rules
| /home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real --internal exe --capture libfprint/70-libfprint-2.rules --
/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules
| Traceback (most recent call last):
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/bin/meson.real", line 8, in <module>
|     sys.exit(main())
|              ^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 287, in main
|     return run(sys.argv[1:], launcher)
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 275, in run
|     return run_script_command(args[1], args[2:])
|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 223, in run_script_command
|     return module.run(script_args)
|            ^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py", line 121, in run
|     return run_exe(exe)
|            ^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/mesonbuild/scripts/meson_exe.py", line 66, in run_exe
|     p = subprocess.Popen(cmd_args, env=child_env, cwd=exe.workdir,
|         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py", line 1024, in __init__
|     self._execute_child(args, executable, preexec_fn, close_fds,
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py", line 1789, in _execute_child
|     self._posix_spawn(args, executable, env, restore_signals,
|   File "/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/recipe-sysroot-native/usr/lib/python3.11/subprocess.py", line 1733, in _posix_spawn
|     self.pid = os.posix_spawn(executable, args, env, **kwargs)
|                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| FileNotFoundError: [Errno 2] No such file or directory: '/home/zozo/dtd-yocto-4.2/tmp-sicom-glibc/work/corei7-64-oe-linux/libfprint/1.94.5-r0/build/libfprint/fprint-list-udev-rules'

The executable is built, it is there, and it's using the target system's
runtime linker path.

Obviously, meson doesn't run it through the exe_wrapper.


Alex

On Thu, 30 Mar 2023 at 15:43, Zoltan Boszormenyi <zboszor@...> wrote:
libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
.../0002-Make-building-tests-optional.patch | 47 ++++++++
.../libfprint/libfprint_1.94.5.bb | 45 +++++++
3 files changed, 203 insertions(+)
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+ ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+- 'fprint-list-udev-hwdb.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++ udev_hwdb = executable('fprint-list-udev-hwdb',
++ 'fprint-list-udev-hwdb.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++else
++ udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+ output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+ install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+- udev_rules = executable('fprint-list-udev-rules',
+- 'fprint-list-udev-rules.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++ if udev_rules_cmd == ''
++ udev_rules = executable('fprint-list-udev-rules',
++ 'fprint-list-udev-rules.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++ else
++ udev_rules = find_program(udev_rules_cmd)
++ endif
+
+ custom_target('udev-rules',
+ output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+ description: 'Installation path for udev rules',
+ type: 'string',
+ value: 'auto')
++option('udev_rules_cmd',
++ description : 'Optional path for native build of fprint-list-udev-rules',
++ type : 'string',
++ value : '')
+ option('udev_hwdb',
+ description: 'Whether to create a udev hwdb for autosuspend (included in systemd v248 and later)',
+ type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+ description: 'Installation path for udev hwdb',
+ type: 'string',
+ value: 'auto')
++option('udev_hwdb_cmd',
++ description : 'Optional path for native build of fprint-list-udev-hwdb',
++ type : 'string',
++ value : '')
+ option('gtk-examples',
+ description: 'Whether to build GTK+ example applications',
+ type: 'boolean',
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+ description: 'Whether to build the API documentation',
+ type: 'boolean',
+ value: true)
++option('tests',
++ description: 'Whether to build the tests',
++ type: 'boolean',
++ value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+ file://0001-Optionally-use-native-generators.patch \
+ file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+ -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+ install -d ${D}${bindir}
+ install -m0755 ${B}/libfprint/fprint-list-udev-hwdb ${D}${bindir}/fprint-list-udev-hwdb
+ install -m0755 ${B}/libfprint/fprint-list-udev-rules ${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2



Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Zoltan Boszormenyi
 

2023. 03. 30. 15:50 keltezéssel, Alexander Kanavin írta:
Meson is specifically configured in yocto to user qemu usermode as the
wrapper to run cross binaries, so can libfprint build configuration be
tweaked to use that? This would avoid all the nasty -native extensions
and modifications.
Wasn't the mariadb change I made about 2 years ago
to use cmake's CROSSCOMPILING_EMULATOR that saved
building the whole mariadb-native just for one small binary
reverted recently because qemu doesn't emulate certain
parts of the instruction set and caused crashes?

The same principle applies to meson running binaries via qemu, too.


Alex

On Thu, 30 Mar 2023 at 15:43, Zoltan Boszormenyi <zboszor@...> wrote:
libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
.../0002-Make-building-tests-optional.patch | 47 ++++++++
.../libfprint/libfprint_1.94.5.bb | 45 +++++++
3 files changed, 203 insertions(+)
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+ ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+- 'fprint-list-udev-hwdb.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++ udev_hwdb = executable('fprint-list-udev-hwdb',
++ 'fprint-list-udev-hwdb.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++else
++ udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+ output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+ install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+- udev_rules = executable('fprint-list-udev-rules',
+- 'fprint-list-udev-rules.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++ if udev_rules_cmd == ''
++ udev_rules = executable('fprint-list-udev-rules',
++ 'fprint-list-udev-rules.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++ else
++ udev_rules = find_program(udev_rules_cmd)
++ endif
+
+ custom_target('udev-rules',
+ output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+ description: 'Installation path for udev rules',
+ type: 'string',
+ value: 'auto')
++option('udev_rules_cmd',
++ description : 'Optional path for native build of fprint-list-udev-rules',
++ type : 'string',
++ value : '')
+ option('udev_hwdb',
+ description: 'Whether to create a udev hwdb for autosuspend (included in systemd v248 and later)',
+ type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+ description: 'Installation path for udev hwdb',
+ type: 'string',
+ value: 'auto')
++option('udev_hwdb_cmd',
++ description : 'Optional path for native build of fprint-list-udev-hwdb',
++ type : 'string',
++ value : '')
+ option('gtk-examples',
+ description: 'Whether to build GTK+ example applications',
+ type: 'boolean',
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+ description: 'Whether to build the API documentation',
+ type: 'boolean',
+ value: true)
++option('tests',
++ description: 'Whether to build the tests',
++ type: 'boolean',
++ value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+ file://0001-Optionally-use-native-generators.patch \
+ file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+ -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+ install -d ${D}${bindir}
+ install -m0755 ${B}/libfprint/fprint-list-udev-hwdb ${D}${bindir}/fprint-list-udev-hwdb
+ install -m0755 ${B}/libfprint/fprint-list-udev-rules ${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2



Re: [meta-oe][PATCH 2/3] libfprint: New recipe

Alexander Kanavin
 

Meson is specifically configured in yocto to user qemu usermode as the
wrapper to run cross binaries, so can libfprint build configuration be
tweaked to use that? This would avoid all the nasty -native extensions
and modifications.

Alex

On Thu, 30 Mar 2023 at 15:43, Zoltan Boszormenyi <zboszor@...> wrote:

libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
.../0002-Make-building-tests-optional.patch | 47 ++++++++
.../libfprint/libfprint_1.94.5.bb | 45 +++++++
3 files changed, 203 insertions(+)
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+ ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+- 'fprint-list-udev-hwdb.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++ udev_hwdb = executable('fprint-list-udev-hwdb',
++ 'fprint-list-udev-hwdb.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++else
++ udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+ output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+ install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+- udev_rules = executable('fprint-list-udev-rules',
+- 'fprint-list-udev-rules.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++ if udev_rules_cmd == ''
++ udev_rules = executable('fprint-list-udev-rules',
++ 'fprint-list-udev-rules.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++ else
++ udev_rules = find_program(udev_rules_cmd)
++ endif
+
+ custom_target('udev-rules',
+ output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+ description: 'Installation path for udev rules',
+ type: 'string',
+ value: 'auto')
++option('udev_rules_cmd',
++ description : 'Optional path for native build of fprint-list-udev-rules',
++ type : 'string',
++ value : '')
+ option('udev_hwdb',
+ description: 'Whether to create a udev hwdb for autosuspend (included in systemd v248 and later)',
+ type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+ description: 'Installation path for udev hwdb',
+ type: 'string',
+ value: 'auto')
++option('udev_hwdb_cmd',
++ description : 'Optional path for native build of fprint-list-udev-hwdb',
++ type : 'string',
++ value : '')
+ option('gtk-examples',
+ description: 'Whether to build GTK+ example applications',
+ type: 'boolean',
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+ description: 'Whether to build the API documentation',
+ type: 'boolean',
+ value: true)
++option('tests',
++ description: 'Whether to build the tests',
++ type: 'boolean',
++ value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+ file://0001-Optionally-use-native-generators.patch \
+ file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+ -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+ install -d ${D}${bindir}
+ install -m0755 ${B}/libfprint/fprint-list-udev-hwdb ${D}${bindir}/fprint-list-udev-hwdb
+ install -m0755 ${B}/libfprint/fprint-list-udev-rules ${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2




[meta-oe][PATCH 3/3] fprintd: New recipe

Zoltan Boszormenyi
 

This is the DBus daemon that may be used for biometric authentication.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
.../0001-Make-building-tests-optional.patch | 81 +++++++++++++++++++
.../recipes-support/fprintd/fprintd_git.bb | 51 ++++++++++++
2 files changed, 132 insertions(+)
create mode 100644 meta-oe/recipes-support/fprintd/fprintd/0001-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/fprintd/fprintd_git.bb

diff --git a/meta-oe/recipes-support/fprintd/fprintd/0001-Make-building-tests-optional.patch b/meta-oe/recipes-support/fprintd/fprintd/0001-Make-building-tests-optional.patch
new file mode 100644
index 000000000..5b1f3a2d2
--- /dev/null
+++ b/meta-oe/recipes-support/fprintd/fprintd/0001-Make-building-tests-optional.patch
@@ -0,0 +1,81 @@
+From 494df63b916bbf3ebf5e0bfc843a1b5298de63b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 15:06:14 +0200
+Subject: [PATCH] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 10 +++++++++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 859bcf2..2abdd1f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -137,13 +137,16 @@ endif
+ polkit_policy_directory = polkit_gobject_dep.get_pkgconfig_variable('policydir')
+
+ # Tests dependencies
++if get_option('tests')
+ pam_wrapper_dep = dependency('pam_wrapper', required: false)
+ if get_option('pam') and not pam_wrapper_dep.found()
+ warning('Dependency "pam_wrapper" required by test suite not found')
+ endif
++endif
+
+ xmllint = find_program('xmllint', required: false)
+ python3 = find_program('python3') # No meson without it!
++if get_option('tests')
+ python3_test_modules = {
+ 'cairo': true,
+ 'dbus': true,
+@@ -159,6 +162,7 @@ foreach module, required : python3_test_modules
+ warning('Python3 module \'' + module + '\' required by test suite not found')
+ endif
+ endforeach
++endif
+
+ cdata = configuration_data()
+ cdata.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+@@ -182,7 +186,9 @@ endif
+ if get_option('gtk_doc')
+ subdir('doc')
+ endif
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+ subdir('po')
+
+ output = []
+@@ -205,6 +211,8 @@ output += ' Manuals: ' + get_option('man').to_string()
+ output += ' GTK Doc: ' + get_option('gtk_doc').to_string()
+ output += ' XML Linter ' + xmllint.found().to_string()
+ output += '\nTest setup:\n'
++if get_option('tests')
+ output += ' With address sanitizer: ' + address_sanitizer.to_string()
++endif
+
+ message('\n'+'\n'.join(output)+'\n')
+diff --git a/meson_options.txt b/meson_options.txt
+index 286889e..73b28f2 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -28,3 +28,7 @@ option('gtk_doc',
+ type: 'boolean',
+ value: false,
+ description: 'Use gtk-doc to build documentation')
++option('tests',
++ type: 'boolean',
++ value: true,
++ description: 'Run tests')
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/fprintd/fprintd_git.bb b/meta-oe/recipes-support/fprintd/fprintd_git.bb
new file mode 100644
index 000000000..6d8e69bd3
--- /dev/null
+++ b/meta-oe/recipes-support/fprintd/fprintd_git.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Daemon for fingerprint readers"
+DESCRIPTION = "fprintd is a D-Bus daemon that offers libfprint \
+functionality over the D-Bus interprocess communication bus."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/fprintd/"
+
+DEPENDS = " \
+ intltool-native glib-2.0 glib-2.0-native \
+ dbus-glib dbus-glib-native \
+ libpam libxslt libxslt-native libfprint polkit \
+"
+
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1f6f1c0be32491a0c8d2915607a28f36"
+
+#PR = "r1"
+
+# This is current master, the submitted patch does not apply to v1.94.2
+SRCREV = "09a3e5cf496e0ba0fe274003532c761e518fdfea"
+PV = "1.94.2"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/fprintd.git;branch=master;protocol=https \
+ file://0001-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig gettext systemd
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+
+PACKAGECONFIG[pam] = "-Dpam=true -Dpam_modules_dir=${libdir}/security,-Dpam=false,libpam"
+
+EXTRA_OEMESON = "-Dtests=false -Dgtk_doc=false -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dpam_modules_dir=${base_libdir}/security"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "fprintd.service"
+
+PACKAGES =+ "${PN}-pam ${PN}-conf"
+
+FILES:${PN}-pam = "${base_libdir}/security/pam_fprintd.so"
+
+FILES:${PN}-conf = "${sysconfdir}/fprintd.conf"
+
+FILES:${PN} += " \
+ ${datadir}/dbus-1/ \
+ ${datadir}/polkit-1/ \
+"
+
+FILES:${PN}-dev = "${base_libdir}/security/*.la"
+FILES:${PN}-staticdev += "${base_libdir}/security/*.a"
--
2.39.2


[meta-oe][PATCH 2/3] libfprint: New recipe

Zoltan Boszormenyi
 

libfprint is the library used by fprintd.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
...001-Optionally-use-native-generators.patch | 111 ++++++++++++++++++
.../0002-Make-building-tests-optional.patch | 47 ++++++++
.../libfprint/libfprint_1.94.5.bb | 45 +++++++
3 files changed, 203 insertions(+)
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
create mode 100644 meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb

diff --git a/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
new file mode 100644
index 000000000..779d78c28
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0001-Optionally-use-native-generators.patch
@@ -0,0 +1,111 @@
+From 4f0f84448dbc46c18d2700ddb45acdee67687574 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:45:31 +0200
+Subject: [PATCH 1/2] Optionally use native generators
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fprint-list-udev-hwdb and fprint-list-udev-rules are run
+during the build to generate autosuspend.hwdb and 70-*.rules,
+respectively.
+
+Since they are not marked as "native: true", a cross-compiled
+version is not possible.
+
+Since these binaries are linked with the libfprint_drivers target,
+marking them as native binaries would also need libfprint_drivers
+to be duplicated as a native version and possibly other library
+targets, too.
+
+Instead, make it the responsibility of the cross-compiler
+framework to build the native variant separately and allow
+the external binaries to be passed in.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ libfprint/meson.build | 30 ++++++++++++++++++++----------
+ meson_options.txt | 8 ++++++++
+ 2 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/libfprint/meson.build b/libfprint/meson.build
+index d3c8b03..2a4de67 100644
+--- a/libfprint/meson.build
++++ b/libfprint/meson.build
+@@ -301,11 +301,16 @@ libfprint_private_dep = declare_dependency(
+ ]
+ )
+
+-udev_hwdb = executable('fprint-list-udev-hwdb',
+- 'fprint-list-udev-hwdb.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++udev_hwdb_cmd = get_option('udev_hwdb_cmd')
++if udev_hwdb_cmd == ''
++ udev_hwdb = executable('fprint-list-udev-hwdb',
++ 'fprint-list-udev-hwdb.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++else
++ udev_hwdb = find_program(udev_hwdb_cmd)
++endif
+
+ udev_hwdb_generator = custom_target('udev-hwdb',
+ output: 'autosuspend.hwdb',
+@@ -315,12 +320,17 @@ udev_hwdb_generator = custom_target('udev-hwdb',
+ install: false,
+ )
+
++udev_rules_cmd = get_option('udev_rules_cmd')
+ if install_udev_rules
+- udev_rules = executable('fprint-list-udev-rules',
+- 'fprint-list-udev-rules.c',
+- dependencies: libfprint_private_dep,
+- link_with: libfprint_drivers,
+- install: false)
++ if udev_rules_cmd == ''
++ udev_rules = executable('fprint-list-udev-rules',
++ 'fprint-list-udev-rules.c',
++ dependencies: libfprint_private_dep,
++ link_with: libfprint_drivers,
++ install: false)
++ else
++ udev_rules = find_program(udev_rules_cmd)
++ endif
+
+ custom_target('udev-rules',
+ output: '70-@0@.rules'.format(versioned_libname),
+diff --git a/meson_options.txt b/meson_options.txt
+index f9b801f..a6f0c4d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,6 +14,10 @@ option('udev_rules_dir',
+ description: 'Installation path for udev rules',
+ type: 'string',
+ value: 'auto')
++option('udev_rules_cmd',
++ description : 'Optional path for native build of fprint-list-udev-rules',
++ type : 'string',
++ value : '')
+ option('udev_hwdb',
+ description: 'Whether to create a udev hwdb for autosuspend (included in systemd v248 and later)',
+ type: 'feature',
+@@ -22,6 +26,10 @@ option('udev_hwdb_dir',
+ description: 'Installation path for udev hwdb',
+ type: 'string',
+ value: 'auto')
++option('udev_hwdb_cmd',
++ description : 'Optional path for native build of fprint-list-udev-hwdb',
++ type : 'string',
++ value : '')
+ option('gtk-examples',
+ description: 'Whether to build GTK+ example applications',
+ type: 'boolean',
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
new file mode 100644
index 000000000..c83ea95e1
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint/0002-Make-building-tests-optional.patch
@@ -0,0 +1,47 @@
+From 8e27d45a7747c9aaf8e619f2de3ad3eae9659da8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 09:57:35 +0200
+Subject: [PATCH 2/2] Make building tests optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Submitted
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ meson.build | 4 +++-
+ meson_options.txt | 4 ++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1badb16..05edb8d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -309,7 +309,9 @@ if get_option('gtk-examples')
+ endif
+
+ subdir('data')
+-subdir('tests')
++if get_option('tests')
++ subdir('tests')
++endif
+
+ pkgconfig = import('pkgconfig')
+ pkgconfig.generate(
+diff --git a/meson_options.txt b/meson_options.txt
+index a6f0c4d..175710d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -38,3 +38,7 @@ option('doc',
+ description: 'Whether to build the API documentation',
+ type: 'boolean',
+ value: true)
++option('tests',
++ description: 'Whether to build the tests',
++ type: 'boolean',
++ value: true)
+--
+2.39.2
+
diff --git a/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
new file mode 100644
index 000000000..b0133409a
--- /dev/null
+++ b/meta-oe/recipes-support/libfprint/libfprint_1.94.5.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for fingerprint readers"
+DESCRIPTION = "libfprint is an open source software library \
+designed to make it easy for application developers to add \
+support for consumer fingerprint readers to their software."
+HOMEPAGE = "https://www.freedesktop.org/wiki/Software/fprint/libfprint/"
+
+DEPENDS = "glib-2.0 libgusb udev libgudev nspr nss pixman cairo"
+
+DEPENDS:append:class-target = " libfprint-native "
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+#PR = "r1"
+
+SRCREV = "86961a9429d589c387da37351fd6b4ff3caf67ea"
+
+SRC_URI = " \
+ git://anongit.freedesktop.org/git/libfprint/libfprint.git;branch=master;protocol=https \
+ file://0001-Optionally-use-native-generators.patch \
+ file://0002-Make-building-tests-optional.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit meson pkgconfig useradd python3native gobject-introspection
+
+EXTRA_OEMESON:class-native = "-Ddoc=false -Dtests=false -Dintrospection=false"
+
+EXTRA_OEMESON:class-target = "-Ddoc=false -Dtests=false \
+ -Dudev_hwdb=enabled -Dudev_hwdb_dir=${sysconfdir}/udev/hwdb.d \
+ -Dudev_hwdb_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-hwdb \
+ -Dudev_rules_cmd=${STAGING_BINDIR_NATIVE}/fprint-list-udev-rules \
+"
+
+do_install:append:class-native () {
+ install -d ${D}${bindir}
+ install -m0755 ${B}/libfprint/fprint-list-udev-hwdb ${D}${bindir}/fprint-list-udev-hwdb
+ install -m0755 ${B}/libfprint/fprint-list-udev-rules ${D}${bindir}/fprint-list-udev-rules
+}
+
+BBCLASSEXTEND = "native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "fprint"
--
2.39.2


[meta-oe][PATCH 1/3] libgusb: Allow building in native mode

Zoltan Boszormenyi
 

Dependency of libfprint-native.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
meta-oe/recipes-support/libgusb/libgusb_0.3.10.bb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/libgusb/libgusb_0.3.10.bb b/meta-oe/recipes-support/libgusb/libgusb_0.3.10.bb
index c208a2090..491b6a7a1 100644
--- a/meta-oe/recipes-support/libgusb/libgusb_0.3.10.bb
+++ b/meta-oe/recipes-support/libgusb/libgusb_0.3.10.bb
@@ -6,9 +6,13 @@ DEPENDS = "glib-2.0 libusb"

inherit meson gobject-introspection gtk-doc gettext vala

-PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
+PACKAGECONFIG:class-target ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false"

+EXTRA_OEMESON:append:class-native = " -Dtests=false -Dintrospection=false"
+
SRC_URI = "git://github.com/hughsie/libgusb.git;branch=main;protocol=https"
SRCREV = "332d5b987ffecb824426e88518e05547faf2b520"
S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
--
2.39.2


Re: [meta-oe][PATCH v2] librelp: fix function inline errors in debug build

Khem Raj
 

also patch does not apply cleanly

27772 Applying patch 0001-librelp-fix-function-inline-error.patch
27773 patching file src/relpsess.c
27774 Hunk #1 succeeded at 91 with fuzz 1.
27775 patching file src/tcp.c
27776 Hunk #1 succeeded at 142 with fuzz 1.
27777 Hunk #2 succeeded at 154 with fuzz 1.

On Thu, Mar 30, 2023 at 4:29 AM Randy MacLeod
<randy.macleod@...> wrote:

On 2023-03-30 01:44, Yash Shinde wrote:

With DEBUG_BUILD = "1", the following errors occur:

src/relpsess.c:95:1: error:
inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline]

src/tcp.c:146:1: error:
inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline]

src/tcp.c:158:1: error:
inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline]

Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function.
Add "__attribute__((always_inline))" to avoid these function inline errors.

Also revert the work-around made earlier in librelp_1.11.0.bb.

Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256

This is a less instrusive work-around.

Please create a gcc bug to track the compiler regression and reply here
with the ID. As well, note the gcc bug id in the librelp issue. Once the
compiler is fixed, we can close the librelp bug.


../Randy

Signed-off-by: Yash Shinde <Yash.Shinde@...>
---
...01-librelp-fix-function-inline-error.patch | 58 +++++++++++++++++++
.../rsyslog/librelp_1.11.0.bb | 2 +-
2 files changed, 59 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch

diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch b/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch
new file mode 100644
index 000000000..523a8991f
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch
@@ -0,0 +1,58 @@
+From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001
+From: Yash Shinde <Yash.Shinde@...>
+Date: Tue, 28 Mar 2023 04:06:58 +0000
+Subject: librelp: fix function inline errors in debug build
+
+With DEBUG_BUILD = "1", the following errors occur:
+
+ src/relpsess.c:95:1: error:
+ inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline]
+
+ src/tcp.c:146:1: error:
+ inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline]
+
+ src/tcp.c:158:1: error:
+ inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline]
+
+Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function. Add "__attribute__((always_inline))" to avoid these function inline errors.
+
+Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256
+
+Signed-off-by: Yash Shinde <Yash.Shinde@...>
+---
+
+diff --git a/src/relpsess.c b/src/relpsess.c
+index ee7b595..aa52b71 100644
+--- a/src/relpsess.c
++++ b/src/relpsess.c
+@@ -91,7 +91,7 @@ callOnErr(const relpSess_t *__restrict__ const pThis,
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpSessFreePermittedPeers(relpSess_t *const pThis)
+ {
+ int i;
+diff --git a/src/tcp.c b/src/tcp.c
+index 7a75cc4..f4088c0 100644
+--- a/src/tcp.c
++++ b/src/tcp.c
+@@ -142,7 +142,7 @@ static int relpTcpChkPeerName(relpTcp_t *const pThis, void* cert);
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ {
+ int i;
+@@ -154,7 +154,7 @@ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ }
+
+ /* helper to call onAuthErr if set */
+-static inline void
++__attribute__((always_inline)) static inline void
+ callOnAuthErr(relpTcp_t *const pThis, const char *authdata, const char *emsg, relpRetVal ecode)
+ {
+ pThis->pEngine->dbgprint((char*)"librelp: auth error: authdata:'%s', ecode %d, "
diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
index e7b79ad03..a41b05a35 100644
--- a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
DEPENDS = "gmp nettle libidn zlib gnutls openssl"

SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \
+ file://0001-librelp-fix-function-inline-error.patch \
"

SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"
@@ -15,6 +16,5 @@ S = "${WORKDIR}/git"

inherit autotools pkgconfig

-DEBUG_OPTIMIZATION:append = " -Wno-error=inline"




--
# Randy MacLeod
# Wind River Linux




[meta-oe][kirkstone][PATCH 2/2] libcrypt-openssl-rsa-perl: upgrade 0.32 -> 0.33

Armin Kuster
 

From: wangmy <wangmy@...>

0001-Fix-for-Issue-31.patch
removed since it's included in 0.33

Changelog:
=========
- Update for windows github CI
- Remove duplicit 'LICENSE' key
- Remove EUMM Remove version check
- #31 by removing reference to RSA_SSLV23_PADDING (removed from OpenSSL starting from v3.0.0)
- support passphase protected private key load
- fix 'unsupported encryption' error on old library versions
- Clarify croak message for missing passphrase on older cyphers
- More structs opaqued in LibreSSL 3.5
- Use a macro for dealing with older SSL lacking macros
- more CI fixups. Drop testing for 5.10 and 5.8. Something is broken upstream.

Signed-off-by: Wang Mingyu <wangmy@...>
Signed-off-by: Khem Raj <raj.khem@...>
(cherry picked from commit a97f771d35d85dfa0a428fbeea7405ad9754a5f8)
Signed-off-by: Armin Kuster <akuster808@...>
---
.../files/0001-Fix-for-Issue-31.patch | 37 -------------------
...2.bb => libcrypt-openssl-rsa-perl_0.33.bb} | 3 +-
2 files changed, 1 insertion(+), 39 deletions(-)
delete mode 100644 meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch
rename meta-perl/recipes-perl/libcrypt/{libcrypt-openssl-rsa-perl_0.32.bb => libcrypt-openssl-rsa-perl_0.33.bb} (86%)

diff --git a/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch b/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch
deleted file mode 100644
index a5ea43f88b..0000000000
--- a/meta-perl/recipes-perl/libcrypt/files/0001-Fix-for-Issue-31.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5e8202458e41ba1f7801746c503fe7c60ae340d5 Mon Sep 17 00:00:00 2001
-From: kambe-mikb <77083885+kambe-mikb@...>
-Date: Tue, 28 Sep 2021 17:40:18 +1000
-Subject: [PATCH] Fix for Issue 31
-
-Fix Issue 31 by removing reference to RSA_SSLV23_PADDING (removed from OpenSSL starting from v3.0.0)
-
-Upstream-Status: Submitted [https://github.com/toddr/Crypt-OpenSSL-RSA/pull/32]
-Signed-off-by: Khem Raj <raj.khem@...>
----
- RSA.xs | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/RSA.xs b/RSA.xs
-index 46cb199..4f65dfc 100644
---- a/RSA.xs
-+++ b/RSA.xs
-@@ -640,12 +640,16 @@ use_pkcs1_oaep_padding(p_rsa)
- CODE:
- p_rsa->padding = RSA_PKCS1_OAEP_PADDING;
-
-+#if OPENSSL_VERSION_NUMBER < 0x30000000L
-+
- void
- use_sslv23_padding(p_rsa)
- rsaData* p_rsa;
- CODE:
- p_rsa->padding = RSA_SSLV23_PADDING;
-
-+#endif
-+
- # Sign text. Returns the signature.
-
- SV*
---
-2.33.1
-
diff --git a/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.33.bb
similarity index 86%
rename from meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb
rename to meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.33.bb
index fd92c8a8db..aa8d138f2c 100644
--- a/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.32.bb
+++ b/meta-perl/recipes-perl/libcrypt/libcrypt-openssl-rsa-perl_0.33.bb
@@ -4,10 +4,9 @@ LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a67ceecc5d9a91a5a0d003ba50c26346"

SRC_URI = "http://www.cpan.org/modules/by-module/Crypt/Crypt-OpenSSL-RSA-${PV}.tar.gz \
- file://0001-Fix-for-Issue-31.patch \
"

-SRC_URI[sha256sum] = "adc74f0ae125c77f65d5dd32abb9c3429300a79543bf263494f333f9c0b62a61"
+SRC_URI[sha256sum] = "bdbe630f6d6f540325746ad99977272ac8664ff81bd19f0adaba6d6f45efd864"

DEPENDS += "libcrypt-openssl-guess-perl-native openssl"

--
2.25.1


[meta-oe][kirkstone][PATCH 1/2] monkey: use git fetcher

Armin Kuster
 

From: Martin Jansa <martin.jansa@...>

* monkey-project.com doesn't resolve anymore
* use v1.6.9 tag from github

Signed-off-by: Martin Jansa <Martin.Jansa@...>
Signed-off-by: Khem Raj <raj.khem@...>
(cherry picked from commit d04444509a220fcb61496d7e64f3ba09c647543b)
Signed-off-by: Armin Kuster <akuster808@...>
(cherry picked from commit 16c5d44d421a10510e7d31f9368df5a9560ddd05)
Signed-off-by: Armin Kuster <akuster808@...>
---
meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb
index 5b7e32733c..d3e22757c4 100644
--- a/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb
+++ b/meta-webserver/recipes-httpd/monkey/monkey_1.6.9.bb
@@ -7,12 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"

SECTION = "net"

-SRC_URI = "http://monkey-project.com/releases/1.6/monkey-${PV}.tar.gz \
+SRC_URI = "git://github.com/monkey/monkey;branch=1.6;protocol=https \
file://0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch \
file://monkey.service \
file://monkey.init"

-SRC_URI[sha256sum] = "f1122e89cda627123286542b0a18fcaa131cbe9d4f5dd897d9455157289148fb"
+SRCREV = "7999b487fded645381d387ec0e057e92407b0d2c"
+S = "${WORKDIR}/git"

UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases"
UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz"
--
2.25.1


Re: [meta-oe][PATCH v2] librelp: fix function inline errors in debug build

Randy MacLeod
 

On 2023-03-30 01:44, Yash Shinde wrote:
With DEBUG_BUILD = "1", the following errors occur:

   src/relpsess.c:95:1: error:
      inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline]

   src/tcp.c:146:1: error:
      inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline]

   src/tcp.c:158:1: error:
      inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline]

Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function.
Add "__attribute__((always_inline))" to avoid these function inline errors.

Also revert the work-around made earlier in librelp_1.11.0.bb.

Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256
This is a less instrusive work-around.

Please create a gcc bug to track the compiler regression and reply here
with the ID. As well, note the gcc bug id in the librelp issue. Once the
compiler is fixed, we can close the librelp bug.


../Randy


Signed-off-by: Yash Shinde <Yash.Shinde@...>
---
 ...01-librelp-fix-function-inline-error.patch | 58 +++++++++++++++++++
 .../rsyslog/librelp_1.11.0.bb                 |  2 +-
 2 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch

diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch b/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch
new file mode 100644
index 000000000..523a8991f
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch
@@ -0,0 +1,58 @@
+From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001
+From: Yash Shinde <Yash.Shinde@...>
+Date: Tue, 28 Mar 2023 04:06:58 +0000
+Subject: librelp: fix function inline errors in debug build
+
+With DEBUG_BUILD = "1", the following errors occur:
+
+   src/relpsess.c:95:1: error:
+      inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline]
+
+   src/tcp.c:146:1: error:
+      inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline]
+
+   src/tcp.c:158:1: error:
+      inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline]
+
+Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function. Add "__attribute__((always_inline))" to avoid these function inline errors.
+
+Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256
+
+Signed-off-by: Yash Shinde <Yash.Shinde@...>
+---
+
+diff --git a/src/relpsess.c b/src/relpsess.c
+index ee7b595..aa52b71 100644
+--- a/src/relpsess.c
++++ b/src/relpsess.c
+@@ -91,7 +91,7 @@ callOnErr(const relpSess_t *__restrict__ const pThis,
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpSessFreePermittedPeers(relpSess_t *const pThis)
+ {
+        int i;
+diff --git a/src/tcp.c b/src/tcp.c
+index 7a75cc4..f4088c0 100644
+--- a/src/tcp.c
++++ b/src/tcp.c
+@@ -142,7 +142,7 @@ static int relpTcpChkPeerName(relpTcp_t *const pThis, void* cert);
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ {
+        int i;
+@@ -154,7 +154,7 @@ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ }
+
+ /* helper to call onAuthErr if set */
+-static inline void
++__attribute__((always_inline)) static inline void
+ callOnAuthErr(relpTcp_t *const pThis, const char *authdata, const char *emsg, relpRetVal ecode)
+ {
+        pThis->pEngine->dbgprint((char*)"librelp: auth error: authdata:'%s', ecode %d, "
diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
index e7b79ad03..a41b05a35 100644
--- a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
 DEPENDS = "gmp nettle libidn zlib gnutls openssl"
 
 SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \
+           file://0001-librelp-fix-function-inline-error.patch \
 "
 
 SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"
@@ -15,6 +16,5 @@ S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig
 
-DEBUG_OPTIMIZATION:append = " -Wno-error=inline"
 
 


-- 
# Randy MacLeod
# Wind River Linux


[meta-oe][PATCH] hplip: Fix installation and QA

Zoltan Boszormenyi
 

With version 3.22.11 it's not enough avoid linking to the
closed source ImageProcessor library, it must not be installed
either. This library is pre-stripped so package QA fails.

Add a new patch to fix installing HPLIP.conf into
/usr/share/ipp-usb/quirks. The upstream Makefile.am fails
to take DESTDIR into account and do_install fails because
of this. Also, instead of detecting the presence of the
target directory which is invalid for a source build,
create it and install the quirk file.

Signed-off-by: Zoltán Böszörményi <zboszor@...>
---
.../0001-Fix-installing-ipp-usb-quirk.patch | 38 +++++++++++++++++++
...or-only-when-DISBALE_IMAGEPROCESSOR_.patch | 20 +++++++++-
.../recipes-extended/hplip/hplip_3.22.10.bb | 2 +
3 files changed, 58 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch

diff --git a/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch
new file mode 100644
index 000000000..71ed69722
--- /dev/null
+++ b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch
@@ -0,0 +1,38 @@
+From 5cfe30829174a18ec64e53c84292a0229ffa5602 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
+ <zboszor@...>
+Date: Thu, 30 Mar 2023 11:31:27 +0200
+Subject: [PATCH] Fix installing ipp-usb quirk
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use $(DESTDIR) as installation prefix for
+/usr/share/usb-ipp/quirk/HPLIP.conf.
+
+Signed-off-by: Zoltán Böszörményi <zboszor@...>
+---
+ Makefile.am | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e10364d..f520225 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -703,10 +703,9 @@ if !DISBALE_IMAGEPROCESSOR_BUILD
+ ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
+ fi
+ endif #DISABLE_IMAGEPROCESSOR
+- if [ -d "/usr/share/ipp-usb/quirks/" ]; then \
+- echo "ipp-usb directory exists"; \
+- cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \
+- fi
++ install -d -m0755 $(DESTDIR)/usr/share/ipp-usb/quirks ; \
++ echo "ipp-usb directory exists"; \
++ cp prnt/ipp-usb/HPLIP.conf $(DESTDIR)/usr/share/ipp-usb/quirks/
+ if !HPLIP_CLASS_DRIVER
+ # If scanner build, add hpaio entry to sane dll.conf.
+ if [ "$(scan_build)" = "yes" ]; then \
+--
+2.39.2
+
diff --git a/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch b/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch
index 2cfe1255e..fa973a8d8 100644
--- a/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch
+++ b/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch
@@ -7,8 +7,8 @@ Subject: [PATCH 2/4] Add ImageProcessor only when DISBALE_IMAGEPROCESSOR_BUILD
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@...>
---
- Makefile.am | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
+ Makefile.am | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 5f75759..73421b1 100644
@@ -27,6 +27,22 @@ index 5f75759..73421b1 100644
#else
#hpcupsdir = $(cupsfilterdir)
#hpcups_PROGRAMS = hpcups
+@@ -687,6 +692,7 @@
+
+ install-data-hook:
+ if HPLIP_BUILD
++if !DISBALE_IMAGEPROCESSOR_BUILD
+ if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \
+ cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
+ chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
+@@ -697,6 +703,7 @@
+ chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
+ ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
+ fi
++endif #DISABLE_IMAGEPROCESSOR
+ if [ -d "/usr/share/ipp-usb/quirks/" ]; then \
+ echo "ipp-usb directory exists"; \
+ cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \
--
2.37.3

diff --git a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb
index 23cc5197f..ca683483b 100644
--- a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb
+++ b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb
@@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \
file://0004-Define-missing-prototype-for-functions.patch \
file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \
file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \
+ file://0001-Fix-installing-ipp-usb-quirk.patch \
file://0001-Drop-using-register-storage-classifier.patch"
SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624"

@@ -80,6 +81,7 @@ FILES:${PN}-dbg += "\
${PYTHON_SITEPACKAGES_DIR}/.debug \
${libexecdir}/cups/filter/.debug "

+FILES:${PN} += "${datadir}/ipp-usb/quirks/HPLIP.conf"
FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
FILES:${PN}-ppd = "${datadir}/ppd"
FILES:${PN}-cups = "${datadir}/cups"
--
2.39.2


[meta-oe][PATCH] mcelog: improve the ptest output

Yu, Mingli
 

From: Mingli Yu <mingli.yu@...>

Before:
# ./run-ptest
[snip]
code 0xd2d: [PASS]

After:
# ./run-ptest
[snip]
PASS: code 0xd2d

Signed-off-by: Mingli Yu <mingli.yu@...>
---
meta-oe/recipes-support/mcelog/mcelog/run-ptest | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/mcelog/mcelog/run-ptest b/meta-oe/recipes-support/mcelog/mcelog/run-ptest
index ba7a2c768..320240f27 100644
--- a/meta-oe/recipes-support/mcelog/mcelog/run-ptest
+++ b/meta-oe/recipes-support/mcelog/mcelog/run-ptest
@@ -1,3 +1,9 @@
#!/bin/sh

-make -C tests test
+make -C tests test | sed -e '/\[PASS\]/ s/^/PASS: /g' \
+ -e '/\[FAIL\]/ s/^/FAIL: /g' \
+ -e '/\[IGNORE\]/ s/^/SKIP: /g' \
+ -e 's/IGNORE:/SKIP:/' \
+ -e 's/: \[PASS\]//' \
+ -e 's/: \[FAIL\]//' \
+ -e 's/: \[IGNORE\]//'
--
2.25.1


[meta-oe][PATCH v2] librelp: fix function inline errors in debug build

Yash Shinde
 

With DEBUG_BUILD = "1", the following errors occur:

src/relpsess.c:95:1: error:
inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline]

src/tcp.c:146:1: error:
inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline]

src/tcp.c:158:1: error:
inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline]

Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function.
Add "__attribute__((always_inline))" to avoid these function inline errors.

Also revert the work-around made earlier in librelp_1.11.0.bb.

Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256

Signed-off-by: Yash Shinde <Yash.Shinde@...>
---
...01-librelp-fix-function-inline-error.patch | 58 +++++++++++++++++++
.../rsyslog/librelp_1.11.0.bb | 2 +-
2 files changed, 59 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch

diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch b/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch
new file mode 100644
index 000000000..523a8991f
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/librelp/0001-librelp-fix-function-inline-error.patch
@@ -0,0 +1,58 @@
+From dc841f01fb6167ec9a80e373c5f4d2f5e3222ed6 Mon Sep 17 00:00:00 2001
+From: Yash Shinde <Yash.Shinde@...>
+Date: Tue, 28 Mar 2023 04:06:58 +0000
+Subject: librelp: fix function inline errors in debug build
+
+With DEBUG_BUILD = "1", the following errors occur:
+
+ src/relpsess.c:95:1: error:
+ inlining failed in call to 'relpSessFreePermittedPeers': function not considered for inlining [-Werror=inline]
+
+ src/tcp.c:146:1: error:
+ inlining failed in call to 'relpTcpFreePermittedPeers': function not considered for inlining [-Werror=inline]
+
+ src/tcp.c:158:1: error:
+ inlining failed in call to 'callOnAuthErr': function not considered for inlining [-Werror=inline]
+
+Compiler does not inline any functions when not optimizing unless you specify the ‘always_inline’ attribute for the function. Add "__attribute__((always_inline))" to avoid these function inline errors.
+
+Upstream-Status: Tracked by upstream bug: https://github.com/rsyslog/librelp/issues/256
+
+Signed-off-by: Yash Shinde <Yash.Shinde@...>
+---
+
+diff --git a/src/relpsess.c b/src/relpsess.c
+index ee7b595..aa52b71 100644
+--- a/src/relpsess.c
++++ b/src/relpsess.c
+@@ -91,7 +91,7 @@ callOnErr(const relpSess_t *__restrict__ const pThis,
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpSessFreePermittedPeers(relpSess_t *const pThis)
+ {
+ int i;
+diff --git a/src/tcp.c b/src/tcp.c
+index 7a75cc4..f4088c0 100644
+--- a/src/tcp.c
++++ b/src/tcp.c
+@@ -142,7 +142,7 @@ static int relpTcpChkPeerName(relpTcp_t *const pThis, void* cert);
+
+
+ /* helper to free permittedPeer structure */
+-static inline void
++__attribute__((always_inline)) static inline void
+ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ {
+ int i;
+@@ -154,7 +154,7 @@ relpTcpFreePermittedPeers(relpTcp_t *const pThis)
+ }
+
+ /* helper to call onAuthErr if set */
+-static inline void
++__attribute__((always_inline)) static inline void
+ callOnAuthErr(relpTcp_t *const pThis, const char *authdata, const char *emsg, relpRetVal ecode)
+ {
+ pThis->pEngine->dbgprint((char*)"librelp: auth error: authdata:'%s', ecode %d, "
diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
index e7b79ad03..a41b05a35 100644
--- a/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/librelp_1.11.0.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
DEPENDS = "gmp nettle libidn zlib gnutls openssl"

SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=stable \
+ file://0001-librelp-fix-function-inline-error.patch \
"

SRCREV = "b421f56d9ee31a966058d23bd23c966221c91396"
@@ -15,6 +16,5 @@ S = "${WORKDIR}/git"

inherit autotools pkgconfig

-DEBUG_OPTIMIZATION:append = " -Wno-error=inline"


--
2.34.1


Re: [meta-oe][PATCH v3 2/3] protobuf-c: add support of protobuf 4.22.x

Khem Raj
 

On Wed, Mar 29, 2023 at 12:49 PM Khem Raj <raj.khem@...> wrote:

I use archlinux for build system and I am still seeing build failure
for protobuf-c-native

http://sprunge.us/TiQyPZ

On Wed, Mar 29, 2023 at 3:08 AM Xiangyu Chen
<xiangyu.chen@...> wrote:

From: Xiangyu Chen <xiangyu.chen@...>

Signed-off-by: Xiangyu Chen <xiangyu.chen@...>
---
.../0001-add-support-of-protobuf-4.22.x.patch | 315 ++++++++++++++++++
.../protobuf/protobuf-c_1.4.1.bb | 5 +-
2 files changed, 319 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch

diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch
new file mode 100644
index 000000000..075b7044c
--- /dev/null
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch
@@ -0,0 +1,315 @@
+From 66a0b0d205224f63f19dd8f96abf9dcdc2112331 Mon Sep 17 00:00:00 2001
+From: Xiangyu Chen <xiangyu.chen@...>
+Date: Wed, 29 Mar 2023 14:25:17 +0800
+Subject: [PATCH] add support of protobuf 4.22.x
+
+after upgrade the protobuf to 4.22.x, the protobuf-c cannot compile anymore (#544) due to following changes:
+1.protobuf using c++14, that cause the command_line_interface.h report error
+2.protobuf using abseil-cpp library instead the trace API with GOOGLE_ header
+3. removed GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
+
+Upstream-Status: Pending [https://github.com/protobuf-c/protobuf-c/pull/548]
+
+Signed-off-by: Xiangyu Chen <xiangyu.chen@...>
+---
+ Makefile.am | 2 +-
+ configure.ac | 8 ++++++++
+ protoc-c/c_bytes_field.h | 1 -
+ protoc-c/c_enum.h | 1 -
+ protoc-c/c_enum_field.h | 1 -
+ protoc-c/c_extension.h | 1 -
+ protoc-c/c_field.cc | 2 +-
+ protoc-c/c_field.h | 3 ---
+ protoc-c/c_file.h | 1 -
+ protoc-c/c_generator.h | 2 --
+ protoc-c/c_helpers.cc | 4 ++--
+ protoc-c/c_message.cc | 4 ++--
+ protoc-c/c_message.h | 1 -
+ protoc-c/c_message_field.h | 3 ---
+ protoc-c/c_primitive_field.cc | 6 +++---
+ protoc-c/c_primitive_field.h | 3 ---
+ protoc-c/c_service.h | 1 -
+ protoc-c/c_string_field.h | 1 -
+ 18 files changed, 17 insertions(+), 28 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index c7339ef..3b0d1d6 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -20,7 +20,7 @@ AM_CPPFLAGS = \
+ -I${top_builddir} \
+ -I${top_srcdir}
+ AM_CFLAGS = ${my_CFLAGS}
+-AM_LDFLAGS =
++AM_LDFLAGS = ${ABSL_LOG_INTERNAL_CHECK_OP_LIBS} ${ABSL_LOG_RAW_HASH_SET_LIBS}
+
+ # code coverage
+
+diff --git a/configure.ac b/configure.ac
+index f5a0261..8ed549a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,6 +78,14 @@ if test "x$enable_protoc" != "xno"; then
+
+ AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
+
++# now checking 4.22.x protobuf, if so, set cxx as 14
++ AS_IF([pkg-config --atleast-version 4.22.0 protobuf],[AX_CXX_COMPILE_STDCXX(14, noext, mandatory)])
++
++ AS_IF([pkg-config --atleast-version 4.22.0 protobuf],
++ [PKG_CHECK_MODULES([ABSL_LOG_INTERNAL_CHECK_OP], [absl_log_internal_check_op],
++ [PKG_CHECK_MODULES([ABSL_LOG_RAW_HASH_SET], [absl_raw_hash_set], [], [AC_MSG_ERROR([Missing absl_raw_hash_set library.])])],
++ [AC_MSG_ERROR([Missing absl_log_internal_check_op library.])])])
++
+ PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0],
+ [proto3_supported=yes],
+ [PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])]
+diff --git a/protoc-c/c_bytes_field.h b/protoc-c/c_bytes_field.h
+index bf873f0..8fc63d3 100644
+--- a/protoc-c/c_bytes_field.h
++++ b/protoc-c/c_bytes_field.h
+@@ -88,7 +88,6 @@ class BytesFieldGenerator : public FieldGenerator {
+ private:
+ std::map<std::string, std::string> variables_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator);
+ };
+
+
+diff --git a/protoc-c/c_enum.h b/protoc-c/c_enum.h
+index 9c34b69..d5e58f0 100644
+--- a/protoc-c/c_enum.h
++++ b/protoc-c/c_enum.h
+@@ -107,7 +107,6 @@ class EnumGenerator {
+ const EnumDescriptor* descriptor_;
+ std::string dllexport_decl_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_enum_field.h b/protoc-c/c_enum_field.h
+index 3f8c005..03eb402 100644
+--- a/protoc-c/c_enum_field.h
++++ b/protoc-c/c_enum_field.h
+@@ -86,7 +86,6 @@ class EnumFieldGenerator : public FieldGenerator {
+ private:
+ std::map<std::string, std::string> variables_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
+ };
+
+
+diff --git a/protoc-c/c_extension.h b/protoc-c/c_extension.h
+index 9541388..9c5797d 100644
+--- a/protoc-c/c_extension.h
++++ b/protoc-c/c_extension.h
+@@ -99,7 +99,6 @@ class ExtensionGenerator {
+ std::string type_traits_;
+ std::string dllexport_decl_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_field.cc b/protoc-c/c_field.cc
+index 0716744..4abdc6d 100644
+--- a/protoc-c/c_field.cc
++++ b/protoc-c/c_field.cc
+@@ -231,7 +231,7 @@ FieldGeneratorMap::~FieldGeneratorMap() {}
+
+ const FieldGenerator& FieldGeneratorMap::get(
+ const FieldDescriptor* field) const {
+- GOOGLE_CHECK_EQ(field->containing_type(), descriptor_);
++ ABSL_CHECK_EQ(field->containing_type(), descriptor_);
+ return *field_generators_[field->index()];
+ }
+
+diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h
+index 3cad35d..76d3b0b 100644
+--- a/protoc-c/c_field.h
++++ b/protoc-c/c_field.h
+@@ -104,8 +104,6 @@ class FieldGenerator {
+ const std::string &descriptor_addr) const;
+ const FieldDescriptor *descriptor_;
+
+- private:
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator);
+ };
+
+ // Convenience class which constructs FieldGenerators for a Descriptor.
+@@ -122,7 +120,6 @@ class FieldGeneratorMap {
+
+ static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h
+index 8dfd8ba..ec55906 100644
+--- a/protoc-c/c_file.h
++++ b/protoc-c/c_file.h
+@@ -104,7 +104,6 @@ class FileGenerator {
+ std::unique_ptr<std::unique_ptr<ServiceGenerator>[]> service_generators_;
+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h
+index ac1ffaf..9260116 100644
+--- a/protoc-c/c_generator.h
++++ b/protoc-c/c_generator.h
+@@ -94,8 +94,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator {
+ OutputDirectory* output_directory,
+ std::string* error) const;
+
+- private:
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_helpers.cc b/protoc-c/c_helpers.cc
+index 6fd0cd3..1eaeeb4 100644
+--- a/protoc-c/c_helpers.cc
++++ b/protoc-c/c_helpers.cc
+@@ -286,7 +286,7 @@ const char* const kKeywordList[] = {
+
+ std::set<std::string> MakeKeywordsMap() {
+ std::set<std::string> result;
+- for (int i = 0; i < GOOGLE_ARRAYSIZE(kKeywordList); i++) {
++ for (int i = 0; i < ABSL_ARRAYSIZE(kKeywordList); i++) {
+ result.insert(kKeywordList[i]);
+ }
+ return result;
+@@ -548,7 +548,7 @@ std::string CEscape(const std::string& src) {
+ std::unique_ptr<char[]> dest(new char[dest_length]);
+ const int len = CEscapeInternal(src.data(), src.size(),
+ dest.get(), dest_length, false);
+- GOOGLE_DCHECK_GE(len, 0);
++ ABSL_DCHECK_GE(len, 0);
+ return std::string(dest.get(), len);
+ }
+
+diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc
+index 37e8bf8..c7e8515 100755
+--- a/protoc-c/c_message.cc
++++ b/protoc-c/c_message.cc
+@@ -499,7 +499,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) {
+ // NOTE: not supported by protobuf
+ vars["maybe_static"] = "";
+ vars["field_dv_ctype"] = "{ ... }";
+- GOOGLE_LOG(DFATAL) << "Messages can't have default values!";
++ ABSL_LOG(FATAL) << "Messages can't have default values!";
+ break;
+ case FieldDescriptor::CPPTYPE_STRING:
+ if (fd->type() == FieldDescriptor::TYPE_BYTES || opt.string_as_bytes())
+@@ -521,7 +521,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) {
+ break;
+ }
+ default:
+- GOOGLE_LOG(DFATAL) << "Unknown CPPTYPE";
++ ABSL_LOG(FATAL) << "Unknown CPPTYPE";
+ break;
+ }
+ if (!already_defined)
+diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h
+index ea1c3ab..e90782b 100644
+--- a/protoc-c/c_message.h
++++ b/protoc-c/c_message.h
+@@ -137,7 +137,6 @@ class MessageGenerator {
+ std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_;
+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_message_field.h b/protoc-c/c_message_field.h
+index 39b8d99..42efe36 100644
+--- a/protoc-c/c_message_field.h
++++ b/protoc-c/c_message_field.h
+@@ -83,9 +83,6 @@ class MessageFieldGenerator : public FieldGenerator {
+ std::string GetDefaultValue(void) const;
+ void GenerateStaticInit(io::Printer* printer) const;
+
+- private:
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator);
+ };
+
+
+diff --git a/protoc-c/c_primitive_field.cc b/protoc-c/c_primitive_field.cc
+index 6990893..d5a7b60 100644
+--- a/protoc-c/c_primitive_field.cc
++++ b/protoc-c/c_primitive_field.cc
+@@ -99,7 +99,7 @@ void PrimitiveFieldGenerator::GenerateStructMembers(io::Printer* printer) const
+ case FieldDescriptor::TYPE_STRING :
+ case FieldDescriptor::TYPE_BYTES :
+ case FieldDescriptor::TYPE_GROUP :
+- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break;
++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break;
+
+ // No default because we want the compiler to complain if any new
+ // types are added.
+@@ -143,7 +143,7 @@ std::string PrimitiveFieldGenerator::GetDefaultValue() const
+ case FieldDescriptor::CPPTYPE_BOOL:
+ return descriptor_->default_value_bool() ? "1" : "0";
+ default:
+- GOOGLE_LOG(DFATAL) << "unexpected CPPTYPE in c_primitive_field";
++ ABSL_LOG(FATAL) << "unexpected CPPTYPE in c_primitive_field";
+ return "UNEXPECTED_CPPTYPE";
+ }
+ }
+@@ -197,7 +197,7 @@ void PrimitiveFieldGenerator::GenerateDescriptorInitializer(io::Printer* printer
+ case FieldDescriptor::TYPE_STRING :
+ case FieldDescriptor::TYPE_BYTES :
+ case FieldDescriptor::TYPE_GROUP :
+- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break;
++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break;
+
+ // No default because we want the compiler to complain if any new
+ // types are added.
+diff --git a/protoc-c/c_primitive_field.h b/protoc-c/c_primitive_field.h
+index a9eb893..d2bb724 100644
+--- a/protoc-c/c_primitive_field.h
++++ b/protoc-c/c_primitive_field.h
+@@ -83,9 +83,6 @@ class PrimitiveFieldGenerator : public FieldGenerator {
+ std::string GetDefaultValue(void) const;
+ void GenerateStaticInit(io::Printer* printer) const;
+
+- private:
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_service.h b/protoc-c/c_service.h
+index 27125a6..4737ff3 100644
+--- a/protoc-c/c_service.h
++++ b/protoc-c/c_service.h
+@@ -101,7 +101,6 @@ class ServiceGenerator {
+ const ServiceDescriptor* descriptor_;
+ std::map<std::string, std::string> vars_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_string_field.h b/protoc-c/c_string_field.h
+index 513cea7..ba258e4 100644
+--- a/protoc-c/c_string_field.h
++++ b/protoc-c/c_string_field.h
+@@ -88,7 +88,6 @@ class StringFieldGenerator : public FieldGenerator {
+ private:
+ std::map<std::string, std::string> variables_;
+
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator);
+ };
+
+
+--
+2.34.1
+
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb
index d724287d6..bdaf43a54 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb
@@ -12,7 +12,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9f725889e0d77383e26cb42b0b62cea2"

DEPENDS = "protobuf-native protobuf"

-SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https"
+SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https \
+ file://0001-add-support-of-protobuf-4.22.x.patch \
+ "
+
SRCREV = "abc67a11c6db271bedbb9f58be85d6f4e2ea8389"

S = "${WORKDIR}/git"
--
2.34.1