* Re: [OE-core] [scarthgap][PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4
2026-05-14 13:30 Guðni Már Gilbert
@ 2026-06-09 11:51 ` Jeremy Rosen
0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Rosen @ 2026-06-09 11:51 UTC (permalink / raw)
To: gudni.m.g, openembedded-core
Hello Guðni
I tried to apply this patch but it broke the autobuild with a
compilation error
see
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/3952
for an example of a failed build.
I am a bit suprised that a stable upgrade of a library would make nos
#error trigger at compilation time. I would be interested in any
investigation with that
for the time being I will drop this patch for scarthgap, please resubmit
once the compilation error is fixed
Regards
Jérémy
On Thu May 14, 2026 at 3:30 PM CEST, Guðni Már Gilbert via lists.openembedded.org wrote:
> Fixes CVE-2026-41989
>
> Full changelog:
> https://github.com/gpg/libgcrypt/compare/libgcrypt-1.10.3...libgcrypt-1.10.4
>
> Noteworthy changes in version 1.10.4 (2026-04-21) [C24/A4/R4]
> -------------------------------------------------
>
> * Bug fixes:
> - Fix possible ECDH buffer overwrite with zeroes. [T8211]
> - Fix AESWRAP padding length check. [T7130]
>
> * Other:
> - Handle HAVE_BROKEN_MLOCK for the case of building with ASAN.
> [T7889]
>
> Release-info: https://dev.gnupg.org/T8233
>
> CVE: CVE-2026-41989
> Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
> ---
> ...ilding-error-with-O2-in-sysroot-path.patch | 64 -------------------
> ...01-libgcrypt-fix-m4-file-for-oe-core.patch | 3 +-
> ...m-fix-undefined-reference-to-pthread.patch | 9 ++-
> .../libgcrypt/files/no-bench-slope.patch | 12 +++-
> .../libgcrypt/files/no-native-gpg-error.patch | 10 ++-
> ...ibgcrypt_1.10.3.bb => libgcrypt_1.10.4.bb} | 3 +-
> 6 files changed, 25 insertions(+), 76 deletions(-)
> delete mode 100644 meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch
> rename meta/recipes-support/libgcrypt/{libgcrypt_1.10.3.bb => libgcrypt_1.10.4.bb} (92%)
>
> diff --git a/meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch
> deleted file mode 100644
> index dee4969f35..0000000000
> --- a/meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch
> +++ /dev/null
> @@ -1,64 +0,0 @@
> -From b99952adc6ee611641709610d2e4dc90ba9acf37 Mon Sep 17 00:00:00 2001
> -From: "simit.ghane" <simit.ghane@lge.com>
> -Date: Tue, 7 May 2024 14:09:03 +0530
> -Subject: [PATCH] Fix building error with '-O2' in sysroot path
> -
> -* cipher/Makefile.am (o_flag_munging): Tweak the sed script.
> -* random/Makefile.am (o_flag_munging): Ditto.
> ---
> -
> -Characters like '-O2' or '-Ofast' will be replaced by '-O1' and '-O0'
> -respectively when compiling cipher and random in the filesystem
> -paths as well if they happen to contain '-O2' or '-Ofast
> -
> -If we are cross compiling libgcrypt and sysroot contains such
> -characters, we would
> -get compile errors because the sysroot path has been modified.
> -
> -Fix this by adding blank spaces and tabs before the original matching
> -pattern in the sed command.
> -
> -Signed-off-by: simit.ghane <simit.ghane@lge.com>
> -
> -ChangeLog entries added by wk
> -
> -Note that there is also the configure option --disable-O-flag-munging;
> -see the README.
> -
> -Upstream-Status: Backport [https://dev.gnupg.org/rCb99952adc6ee611641709610d2e4dc90ba9acf37 https://dev.gnupg.org/rC5afadba008918d651afefb842ae123cc18454c74]
> -
> -Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ----
> - cipher/Makefile.am | 2 +-
> - random/Makefile.am | 2 +-
> - 2 files changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/cipher/Makefile.am b/cipher/Makefile.am
> -index 2c39586e..a914ed2b 100644
> ---- a/cipher/Makefile.am
> -+++ b/cipher/Makefile.am
> -@@ -168,7 +168,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c
> -
> -
> - if ENABLE_O_FLAG_MUNGING
> --o_flag_munging = sed -e 's/-O\([2-9sgz][2-9sgz]*\)/-O1/' -e 's/-Ofast/-O1/g'
> -+o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /g' -e 's/[[:blank:]]-Ofast/ -O1 /g'
> - else
> - o_flag_munging = cat
> - endif
> -diff --git a/random/Makefile.am b/random/Makefile.am
> -index 0c935a05..340df38a 100644
> ---- a/random/Makefile.am
> -+++ b/random/Makefile.am
> -@@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
> -
> - # The rndjent module needs to be compiled without optimization. */
> - if ENABLE_O_FLAG_MUNGING
> --o_flag_munging = sed -e 's/-O\([1-9sgz][1-9sgz]*\)/-O0/g' -e 's/-Ofast/-O0/g'
> -+o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /g' -e 's/[[:blank:]]-Ofast/ -O0 /g'
> - else
> - o_flag_munging = cat
> - endif
> ---
> -2.44.1
> -
> diff --git a/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
> index cbfa30f0ad..9206453d2a 100644
> --- a/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
> +++ b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
> @@ -1,4 +1,4 @@
> -From bcfd89abdb5110b93314297120412d4c7f2da313 Mon Sep 17 00:00:00 2001
> +From 17f9b99ec4d6db91180ed39641f27a7c66cfb412 Mon Sep 17 00:00:00 2001
> From: Trevor Gamblin <trevor.gamblin@windriver.com>
> Date: Tue, 29 Oct 2019 14:08:32 -0400
> Subject: [PATCH] libgcrypt: fix m4 file for oe-core
> @@ -11,7 +11,6 @@ settings.
> Upstream-Status: Inappropriate [oe-specific]
>
> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
> -
> ---
> src/libgcrypt.m4 | 90 +++---------------------------------------------
> 1 file changed, 4 insertions(+), 86 deletions(-)
> diff --git a/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
> index 4233fa7877..daf4d30b1f 100644
> --- a/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
> +++ b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
> @@ -1,4 +1,4 @@
> -From 9182bc2dc676858a823c477d8f45a578b8c4f69f Mon Sep 17 00:00:00 2001
> +From df905c6d2fcd5a8044e3ec9fcd5082b764540dd9 Mon Sep 17 00:00:00 2001
> From: Hongxu Jia <hongxu.jia@windriver.com>
> Date: Sun, 12 Jun 2016 04:44:29 -0400
> Subject: [PATCH] tests/Makefile.am: fix undefined reference to
> @@ -9,16 +9,15 @@ Add missing '-lpthread' to CFLAGS
> Upstream-Status: Pending
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> -
> ---
> tests/Makefile.am | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> -index e6953fd..f47e1d3 100644
> +index 302d923..b302ad5 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> -@@ -76,7 +76,7 @@ t_mpi_bit_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@
> +@@ -87,7 +87,7 @@ t_mpi_bit_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@
> t_secmem_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@
> testapi_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@
> t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@
> @@ -27,7 +26,7 @@ index e6953fd..f47e1d3 100644
> testdrv_LDADD = $(LDADD_FOR_TESTS_KLUDGE)
>
> # Build a version of the test driver for the build platform.
> -@@ -95,7 +95,7 @@ else
> +@@ -106,7 +106,7 @@ else
> xtestsuite_libs = ../src/.libs/libgcrypt.so*
> xtestsuite_driver = testdrv
> t_kdf_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@
> diff --git a/meta/recipes-support/libgcrypt/files/no-bench-slope.patch b/meta/recipes-support/libgcrypt/files/no-bench-slope.patch
> index 8de3c6713b..0a8eb56f10 100644
> --- a/meta/recipes-support/libgcrypt/files/no-bench-slope.patch
> +++ b/meta/recipes-support/libgcrypt/files/no-bench-slope.patch
> @@ -1,3 +1,8 @@
> +From 164870c01911c48a8f0ea4e93bff1f05ff5c13ca Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@arm.com>
> +Date: Fri, 9 Sep 2022 11:13:37 +0100
> +Subject: [PATCH] libgcrypt: disable bench-slope test case
> +
> The bench-slope test appears to be aborting fairly frequently, which causes
> failures on the autobuilder.
>
> @@ -5,12 +10,15 @@ Until this has been root-caused, disable the test.
>
> Upstream-Status: Inappropriate
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> +---
> + tests/testdrv.c | 1 -
> + 1 file changed, 1 deletion(-)
>
> diff --git a/tests/testdrv.c b/tests/testdrv.c
> -index 0ccde326..d3455186 100644
> +index 6d6abd5..d345518 100644
> --- a/tests/testdrv.c
> +++ b/tests/testdrv.c
> -@@ -77,7 +77,6 @@ static struct {
> +@@ -76,7 +76,6 @@ static struct {
> { "t-x448" },
> { "t-ed448" },
> { "benchmark" },
> diff --git a/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch
> index b9a607863d..c6b40b04b5 100644
> --- a/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch
> +++ b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch
> @@ -1,11 +1,19 @@
> +From dedc54234af84503de085e5b04f2bfe2d5ec63b3 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@arm.com>
> +Date: Fri, 26 Aug 2022 15:23:37 +0100
> +Subject: [PATCH] libgcrypt: rewrite ptest
> +
> Don't depend on a native libgpg-error to build the test driver, as it's
> an optional dependency for some C annotations.
>
> Upstream-Status: Inappropriate
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> +---
> + tests/testdrv.c | 1 -
> + 1 file changed, 1 deletion(-)
>
> diff --git a/tests/testdrv.c b/tests/testdrv.c
> -index 0ccde326..6d6abd57 100644
> +index 0ccde32..6d6abd5 100644
> --- a/tests/testdrv.c
> +++ b/tests/testdrv.c
> @@ -32,7 +32,6 @@
> diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.10.3.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb
> similarity index 92%
> rename from meta/recipes-support/libgcrypt/libgcrypt_1.10.3.bb
> rename to meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb
> index 3d49d586bb..a3b5bd06cc 100644
> --- a/meta/recipes-support/libgcrypt/libgcrypt_1.10.3.bb
> +++ b/meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb
> @@ -25,9 +25,8 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
> file://no-native-gpg-error.patch \
> file://no-bench-slope.patch \
> file://run-ptest \
> - file://0001-Fix-building-error-with-O2-in-sysroot-path.patch \
> "
> -SRC_URI[sha256sum] = "8b0870897ac5ac67ded568dcfadf45969cfa8a6beb0fd60af2a9eadc2a3272aa"
> +SRC_URI[sha256sum] = "d6d2f835a79711ceba54b53d1081d388d24fb0341d79a268a6557e12908a90a0"
>
> BINCONFIG = "${bindir}/libgcrypt-config"
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [scarthgap][PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4
2026-07-04 10:55 Jakub Szczudlo
@ 2026-07-06 12:25 ` Yoann Congal
2026-07-06 12:28 ` Jakub Szczudlo
0 siblings, 1 reply; 6+ messages in thread
From: Yoann Congal @ 2026-07-06 12:25 UTC (permalink / raw)
To: jakubszczudlo40, openembedded-core; +Cc: Hongxu Jia
On Sat Jul 4, 2026 at 12:55 PM CEST, Jakub Szczudlo via lists.openembedded.org wrote:
> Release notes are here:
> https://dev.gnupg.org/T8233.html
> Version cointains fix for CVE-2026-41989
>
> Signed-off-by: Jakub Szczudlo <jakubszczudlo40@gmail.com>
Hello,
I just remembered but this upgrade was attempted before but failed:
https://lore.kernel.org/all/20260514133022.56169-1-gudni.m.g@gmail.com/
I tried your but same issue:
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/93/builds/4071/steps/12/logs/stdio
| | libtool: compile: x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O0 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -DHAVE_CONFIG_H -I. -I../../libgcrypt-1.10.4/random -I.. -I../src -I../../libgcrypt-1.10.4/src -O2 -pipe -g -feliminate-unused-debug-types [...] -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -c ../../libgcrypt-1.10.4/random/rndjent.c -fPIC -DPIC -o .libs/rndjent.o
| | In file included from ../../libgcrypt-1.10.4/random/rndjent.c:99:
| | ../../libgcrypt-1.10.4/random/jitterentropy-base.c:58:3: error: #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy.c."
| | 58 | #error "The CPU Jitter random number generator must not be compiled with optimizations. See documentation. Use the compiler switch -O0 for compiling jitterentropy.c."
| | | ^~~~~
| | make[2]: *** [Makefile:775: rndjent.lo] Error 1
| | make[2]: *** Waiting for unfinished jobs....
| | make[2]: Leaving directory '/srv/pokybuild/yocto-worker/genericx86-64-alt/build/build/tmp/work/core2-64-poky-linux/libgcrypt/1.10.4/build/random'
| | make[1]: *** [Makefile:500: all-recursive] Error 1
| | make[1]: Leaving directory '/srv/pokybuild/yocto-worker/genericx86-64-alt/build/build/tmp/work/core2-64-poky-linux/libgcrypt/1.10.4/build'
| | make: *** [Makefile:432: all] Error 2
| | ERROR: oe_runmake failed
| | WARNING: exit code 1 from a shell command.
| NOTE: recipe libgcrypt-1.10.4-r0: task do_compile: Failed
| ERROR: Task (/srv/pokybuild/yocto-worker/genericx86-64-alt/build/meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb:do_compile) failed with exit code '1'
Can you look into this please?
Note: you can find the config for this particular build here:
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/93/builds/4071/steps/11/logs/stdio
Regards,
--
Yoann Congal
Smile ECS
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [scarthgap][PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4
2026-07-06 12:25 ` [OE-core] " Yoann Congal
@ 2026-07-06 12:28 ` Jakub Szczudlo
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Szczudlo @ 2026-07-06 12:28 UTC (permalink / raw)
To: Yoann Congal; +Cc: openembedded-core, Hongxu Jia
[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]
pon., 6 lip 2026, 14:25 użytkownik Yoann Congal <yoann.congal@smile.fr>
napisał:
> On Sat Jul 4, 2026 at 12:55 PM CEST, Jakub Szczudlo via
> lists.openembedded.org wrote:
> > Release notes are here:
> > https://dev.gnupg.org/T8233.html
> > Version cointains fix for CVE-2026-41989
> >
> > Signed-off-by: Jakub Szczudlo <jakubszczudlo40@gmail.com>
>
> Hello,
>
> I just remembered but this upgrade was attempted before but failed:
> https://lore.kernel.org/all/20260514133022.56169-1-gudni.m.g@gmail.com/
>
> I tried your but same issue:
>
> https://autobuilder.yoctoproject.org/valkyrie/?#/builders/93/builds/4071/steps/12/logs/stdio
> | | libtool: compile: x86_64-poky-linux-gcc -m64 -march=core2
> -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O0
> -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
> -DHAVE_CONFIG_H -I. -I../../libgcrypt-1.10.4/random -I.. -I../src
> -I../../libgcrypt-1.10.4/src -O2 -pipe -g -feliminate-unused-debug-types
> [...] -fvisibility=hidden -fno-delete-null-pointer-checks -Wall -c
> ../../libgcrypt-1.10.4/random/rndjent.c -fPIC -DPIC -o .libs/rndjent.o
> | | In file included from ../../libgcrypt-1.10.4/random/rndjent.c:99:
> | | ../../libgcrypt-1.10.4/random/jitterentropy-base.c:58:3: error: #error
> "The CPU Jitter random number generator must not be compiled with
> optimizations. See documentation. Use the compiler switch -O0 for compiling
> jitterentropy.c."
> | | 58 | #error "The CPU Jitter random number generator must not be
> compiled with optimizations. See documentation. Use the compiler switch -O0
> for compiling jitterentropy.c."
> | | | ^~~~~
> | | make[2]: *** [Makefile:775: rndjent.lo] Error 1
> | | make[2]: *** Waiting for unfinished jobs....
> | | make[2]: Leaving directory
> '/srv/pokybuild/yocto-worker/genericx86-64-alt/build/build/tmp/work/core2-64-poky-linux/libgcrypt/1.10.4/build/random'
> | | make[1]: *** [Makefile:500: all-recursive] Error 1
> | | make[1]: Leaving directory
> '/srv/pokybuild/yocto-worker/genericx86-64-alt/build/build/tmp/work/core2-64-poky-linux/libgcrypt/1.10.4/build'
> | | make: *** [Makefile:432: all] Error 2
> | | ERROR: oe_runmake failed
> | | WARNING: exit code 1 from a shell command.
> | NOTE: recipe libgcrypt-1.10.4-r0: task do_compile: Failed
> | ERROR: Task
> (/srv/pokybuild/yocto-worker/genericx86-64-alt/build/meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb:do_compile)
> failed with exit code '1'
>
> Can you look into this please?
>
> Note: you can find the config for this particular build here:
>
> https://autobuilder.yoctoproject.org/valkyrie/?#/builders/93/builds/4071/steps/11/logs/stdio
>
> Regards,
>
> --
> Yoann Congal
> Smile ECS
>
I will check the logs and fix the issue.
Thanks for running builder.
Best regards,
Jakub Szczudlo
[-- Attachment #2: Type: text/html, Size: 4067 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4
@ 2026-07-07 6:43 Jakub Szczudlo
2026-07-08 9:31 ` [OE-core] [scarthgap][PATCH] " Mathieu Dubois-Briand
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Szczudlo @ 2026-07-07 6:43 UTC (permalink / raw)
To: openembedded-core; +Cc: Hongxu Jia, Jakub Szczudlo, Yoann Congal
Release notes are here:
https://dev.gnupg.org/T8233.html
Update contains fix for CVE-2026-41989 and because of building error patch need to be
updated to fix compile flags in new version.
Signed-off-by: Jakub Szczudlo <jakubszczudlo40@gmail.com>
---
v3:
- Correct patch file name to be the same as patch title
v2:
- Added new patch to fix building error with '-O2' in sysroot path for libgcrypt 1.10.4, patch
was taken from wrynose and backported.
...ilding-error-with-O2-in-sysroot-path.patch | 64 -------------------
...r-handle-substitution-in-sed-command.patch | 49 ++++++++++++++
...ibgcrypt_1.10.3.bb => libgcrypt_1.10.4.bb} | 4 +-
3 files changed, 51 insertions(+), 66 deletions(-)
delete mode 100644 meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch
create mode 100644 meta/recipes-support/libgcrypt/files/0002-random-cipher-handle-substitution-in-sed-command.patch
rename meta/recipes-support/libgcrypt/{libgcrypt_1.10.3.bb => libgcrypt_1.10.4.bb} (92%)
diff --git a/meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch
deleted file mode 100644
index dee4969f35..0000000000
--- a/meta/recipes-support/libgcrypt/files/0001-Fix-building-error-with-O2-in-sysroot-path.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From b99952adc6ee611641709610d2e4dc90ba9acf37 Mon Sep 17 00:00:00 2001
-From: "simit.ghane" <simit.ghane@lge.com>
-Date: Tue, 7 May 2024 14:09:03 +0530
-Subject: [PATCH] Fix building error with '-O2' in sysroot path
-
-* cipher/Makefile.am (o_flag_munging): Tweak the sed script.
-* random/Makefile.am (o_flag_munging): Ditto.
---
-
-Characters like '-O2' or '-Ofast' will be replaced by '-O1' and '-O0'
-respectively when compiling cipher and random in the filesystem
-paths as well if they happen to contain '-O2' or '-Ofast
-
-If we are cross compiling libgcrypt and sysroot contains such
-characters, we would
-get compile errors because the sysroot path has been modified.
-
-Fix this by adding blank spaces and tabs before the original matching
-pattern in the sed command.
-
-Signed-off-by: simit.ghane <simit.ghane@lge.com>
-
-ChangeLog entries added by wk
-
-Note that there is also the configure option --disable-O-flag-munging;
-see the README.
-
-Upstream-Status: Backport [https://dev.gnupg.org/rCb99952adc6ee611641709610d2e4dc90ba9acf37 https://dev.gnupg.org/rC5afadba008918d651afefb842ae123cc18454c74]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- cipher/Makefile.am | 2 +-
- random/Makefile.am | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cipher/Makefile.am b/cipher/Makefile.am
-index 2c39586e..a914ed2b 100644
---- a/cipher/Makefile.am
-+++ b/cipher/Makefile.am
-@@ -168,7 +168,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c
-
-
- if ENABLE_O_FLAG_MUNGING
--o_flag_munging = sed -e 's/-O\([2-9sgz][2-9sgz]*\)/-O1/' -e 's/-Ofast/-O1/g'
-+o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /g' -e 's/[[:blank:]]-Ofast/ -O1 /g'
- else
- o_flag_munging = cat
- endif
-diff --git a/random/Makefile.am b/random/Makefile.am
-index 0c935a05..340df38a 100644
---- a/random/Makefile.am
-+++ b/random/Makefile.am
-@@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
-
- # The rndjent module needs to be compiled without optimization. */
- if ENABLE_O_FLAG_MUNGING
--o_flag_munging = sed -e 's/-O\([1-9sgz][1-9sgz]*\)/-O0/g' -e 's/-Ofast/-O0/g'
-+o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /g' -e 's/[[:blank:]]-Ofast/ -O0 /g'
- else
- o_flag_munging = cat
- endif
---
-2.44.1
-
diff --git a/meta/recipes-support/libgcrypt/files/0002-random-cipher-handle-substitution-in-sed-command.patch b/meta/recipes-support/libgcrypt/files/0002-random-cipher-handle-substitution-in-sed-command.patch
new file mode 100644
index 0000000000..35c7527e83
--- /dev/null
+++ b/meta/recipes-support/libgcrypt/files/0002-random-cipher-handle-substitution-in-sed-command.patch
@@ -0,0 +1,49 @@
+From e96df0c82e086bf348753d2d0fa37fa6191b4b14 Mon Sep 17 00:00:00 2001
+From: "simit.ghane" <simit.ghane@lge.com>
+Date: Tue, 11 Jun 2024 07:22:28 +0530
+Subject: [PATCH] random:cipher: handle substitution in sed command
+
+Upstream-Status: Backport [https://github.com/gpg/libgcrypt/commit/e96df0c82e086bf348753d2d0fa37fa6191b4b14]
+
+* cipher/Makefile.am (o_flag_munging): Add 'g' flag for first sed
+expression.
+* random/Makefile.am (o_flag_munging): Likewise.
+--
+
+It was there earlier and accidentally removed from
+Makefile.am of cipher and random
+
+Signed-off-by: simit.ghane <simit.ghane@lge.com>
+[jk: add changelog to commit message]
+Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
+---
+ cipher/Makefile.am | 2 +-
+ random/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cipher/Makefile.am b/cipher/Makefile.am
+index ea9014cc98..149c9f2101 100644
+--- a/cipher/Makefile.am
++++ b/cipher/Makefile.am
+@@ -169,7 +169,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c
+
+
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /' -e 's/[[:blank:]]-Ofast/ -O1 /g'
++o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /g' -e 's/[[:blank:]]-Ofast/ -O1 /g'
+ else
+ o_flag_munging = cat
+ endif
+diff --git a/random/Makefile.am b/random/Makefile.am
+index c7100ef8b8..a42e430649 100644
+--- a/random/Makefile.am
++++ b/random/Makefile.am
+@@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
+
+ # The rndjent module needs to be compiled without optimization. */
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O0 /' -e 's/[[:blank:]]-Ofast/ -O0 /g'
++o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O0 /g' -e 's/[[:blank:]]-Ofast/ -O0 /g'
+ else
+ o_flag_munging = cat
+ endif
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.10.3.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb
similarity index 92%
rename from meta/recipes-support/libgcrypt/libgcrypt_1.10.3.bb
rename to meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb
index 3d49d586bb..96e3a692b6 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.10.3.bb
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.10.4.bb
@@ -25,9 +25,9 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
file://no-native-gpg-error.patch \
file://no-bench-slope.patch \
file://run-ptest \
- file://0001-Fix-building-error-with-O2-in-sysroot-path.patch \
+ file://0002-random-cipher-handle-substitution-in-sed-command.patch \
"
-SRC_URI[sha256sum] = "8b0870897ac5ac67ded568dcfadf45969cfa8a6beb0fd60af2a9eadc2a3272aa"
+SRC_URI[sha256sum] = "d6d2f835a79711ceba54b53d1081d388d24fb0341d79a268a6557e12908a90a0"
BINCONFIG = "${bindir}/libgcrypt-config"
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [scarthgap][PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4
2026-07-07 6:43 [PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4 Jakub Szczudlo
@ 2026-07-08 9:31 ` Mathieu Dubois-Briand
2026-07-08 9:34 ` Jakub Szczudlo
0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Dubois-Briand @ 2026-07-08 9:31 UTC (permalink / raw)
To: jakubszczudlo40, openembedded-core; +Cc: Hongxu Jia, Yoann Congal
On Tue Jul 7, 2026 at 8:43 AM CEST, Jakub Szczudlo via lists.openembedded.org wrote:
> Release notes are here:
> https://dev.gnupg.org/T8233.html
> Update contains fix for CVE-2026-41989 and because of building error patch need to be
> updated to fix compile flags in new version.
>
> Signed-off-by: Jakub Szczudlo <jakubszczudlo40@gmail.com>
> ---
> v3:
> - Correct patch file name to be the same as patch title
> v2:
> - Added new patch to fix building error with '-O2' in sysroot path for libgcrypt 1.10.4, patch
> was taken from wrynose and backported.
Hi Jakub,
Thanks for your patch, but please remember to add the [scarthgap] prefix
in the subject when targeting stable branches.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [scarthgap][PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4
2026-07-08 9:31 ` [OE-core] [scarthgap][PATCH] " Mathieu Dubois-Briand
@ 2026-07-08 9:34 ` Jakub Szczudlo
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Szczudlo @ 2026-07-08 9:34 UTC (permalink / raw)
To: Mathieu Dubois-Briand; +Cc: openembedded-core, Hongxu Jia, Yoann Congal
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
śr., 8 lip 2026, 11:31 użytkownik Mathieu Dubois-Briand <
mathieu.dubois-briand@bootlin.com> napisał:
> On Tue Jul 7, 2026 at 8:43 AM CEST, Jakub Szczudlo via
> lists.openembedded.org wrote:
> > Release notes are here:
> > https://dev.gnupg.org/T8233.html
> > Update contains fix for CVE-2026-41989 and because of building error
> patch need to be
> > updated to fix compile flags in new version.
> >
> > Signed-off-by: Jakub Szczudlo <jakubszczudlo40@gmail.com>
> > ---
> > v3:
> > - Correct patch file name to be the same as patch title
> > v2:
> > - Added new patch to fix building error with '-O2' in sysroot path for
> libgcrypt 1.10.4, patch
> > was taken from wrynose and backported.
>
> Hi Jakub,
>
> Thanks for your patch, but please remember to add the [scarthgap] prefix
> in the subject when targeting stable branches.
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
sure, this was a mistake, I also send patch with corrected prefixes here:
https://lists.openembedded.org/g/openembedded-core/message/240364?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Arecentpostdate%2Fsticky%2C%2Clibgcrypt%2C20%2C2%2C0%2C120153110
Best regards,
Jakub Szczudlo
[-- Attachment #2: Type: text/html, Size: 2324 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-08 9:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 6:43 [PATCH] libgcrypt: upgrade 1.10.3 -> 1.10.4 Jakub Szczudlo
2026-07-08 9:31 ` [OE-core] [scarthgap][PATCH] " Mathieu Dubois-Briand
2026-07-08 9:34 ` Jakub Szczudlo
-- strict thread matches above, loose matches on Subject: below --
2026-07-04 10:55 Jakub Szczudlo
2026-07-06 12:25 ` [OE-core] " Yoann Congal
2026-07-06 12:28 ` Jakub Szczudlo
2026-05-14 13:30 Guðni Már Gilbert
2026-06-09 11:51 ` [OE-core] " Jeremy Rosen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox