* [Buildroot] [PATCH] Revert "package/gnupg2: bump to version 2.4.0"
@ 2023-02-18 10:14 Bagas Sanjaya
2023-02-18 10:39 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 8+ messages in thread
From: Bagas Sanjaya @ 2023-02-18 10:14 UTC (permalink / raw)
To: Buildroot; +Cc: Bagas Sanjaya
Bumping the package version to 2.4.0, it fails to cross-compile with
unsafe cross-compile paths (for example recent build log at [1]):
make[4]: Entering directory '/home/thomas/autobuild/instance-3/output-1/build/gnupg2-2.4.0/common'
/home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o t-stringhelp.o t-stringhelp.c
/home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DWITHOUT_NPTH=1 -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o libcommon_a-i18n.o `test -f 'i18
n.c' || echo './'`i18n.c
/home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DWITHOUT_NPTH=1 -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o libcommon_a-mapstrings.o `test -
f 'mapstrings.c' || echo './'`mapstrings.c
/home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DWITHOUT_NPTH=1 -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o libcommon_a-stringhelp.o `test -
f 'stringhelp.c' || echo './'`stringhelp.c
aarch64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
make[4]: *** [Makefile:1283: t-stringhelp.o] Error 1
Revert the bump for now until the issue can be fixed upstream.
[1]: http://autobuild.buildroot.net/results/5bf00af86da6e41d1a48abc7304bf339908a0150/build-end.log
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
package/gnupg2/0001-ks_ldap_free_state.patch | 21 ++++++++++++++++++++
package/gnupg2/gnupg2.hash | 10 +++++-----
package/gnupg2/gnupg2.mk | 2 +-
3 files changed, 27 insertions(+), 6 deletions(-)
create mode 100644 package/gnupg2/0001-ks_ldap_free_state.patch
diff --git a/package/gnupg2/0001-ks_ldap_free_state.patch b/package/gnupg2/0001-ks_ldap_free_state.patch
new file mode 100644
index 0000000000..fa55d27c04
--- /dev/null
+++ b/package/gnupg2/0001-ks_ldap_free_state.patch
@@ -0,0 +1,21 @@
+
+Fix undefined reference to `ks_ldap_free_state' if OpenLDAP is not
+installed
+
+Backported from: 7011286ce6e1fb56c2989fdafbd11b931c489faa
+
+Signed-off-by: Michael Fischer <mf@go-sys.de>
+
+--- a/dirmngr/server.c
++++ b/dirmngr/server.c
+@@ -3137,8 +3137,10 @@ start_command_handler (assuan_fd_t fd, unsigned int session_id)
+ ctrl->refcount);
+ else
+ {
++#if USE_LDAP
+ ks_ldap_free_state (ctrl->ks_get_state);
+ ctrl->ks_get_state = NULL;
++#endif
+ release_ctrl_ocsp_certs (ctrl);
+ xfree (ctrl->server_local);
+ dirmngr_deinit_default_ctrl (ctrl);
diff --git a/package/gnupg2/gnupg2.hash b/package/gnupg2/gnupg2.hash
index c642862fe2..f9c071ad45 100644
--- a/package/gnupg2/gnupg2.hash
+++ b/package/gnupg2/gnupg2.hash
@@ -1,7 +1,7 @@
-# From https://lists.gnupg.org/pipermail/gnupg-announce/2022q4/000477.html
-sha1 63dde155a8df0d5e1987efa5fc17438beca83ac1 gnupg-2.4.0.tar.bz2
+# From https://lists.gnupg.org/pipermail/gnupg-announce/2022q4/000476.html
+sha1 1f31b7b4c9c9adad97f94ea3acf1aa64c0424bcc gnupg-2.3.8.tar.bz2
# Calculated based on the hash above and signature
-# https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.4.0.tar.bz2.sig
-# using key 6DAA6E64A76D2840571B4902528897B826403ADA
-sha256 1d79158dd01d992431dd2e3facb89fdac97127f89784ea2cb610c600fb0c1483 gnupg-2.4.0.tar.bz2
+# https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.3.8.tar.bz2.sig
+# using key 6DAA6E64A76D2840571B4902528897B826403ADA and AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD
+sha256 540b7a40e57da261fb10ef521a282e0021532a80fd023e75fb71757e8a4969ed gnupg-2.3.8.tar.bz2
sha256 bc2d6664f6276fa0a72d57633b3ae68dc7dcb677b71018bf08c8e93e509f1357 COPYING
diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk
index 5935ce6939..9dc29ca99e 100644
--- a/package/gnupg2/gnupg2.mk
+++ b/package/gnupg2/gnupg2.mk
@@ -4,7 +4,7 @@
#
################################################################################
-GNUPG2_VERSION = 2.4.0
+GNUPG2_VERSION = 2.3.8
GNUPG2_SOURCE = gnupg-$(GNUPG2_VERSION).tar.bz2
GNUPG2_SITE = https://gnupg.org/ftp/gcrypt/gnupg
GNUPG2_LICENSE = GPL-3.0+
base-commit: d00e437922fb1b611f35c3138b9fbf7bcff62757
--
An old man doll... just what I always wanted! - Clara
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] Revert "package/gnupg2: bump to version 2.4.0"
2023-02-18 10:14 [Buildroot] [PATCH] Revert "package/gnupg2: bump to version 2.4.0" Bagas Sanjaya
@ 2023-02-18 10:39 ` Thomas Petazzoni via buildroot
2023-02-18 11:13 ` Julien Olivain
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-18 10:39 UTC (permalink / raw)
To: Bagas Sanjaya; +Cc: Julien Olivain, Buildroot
Hello Bagas,
Let's add Julien Olivain in Cc, as he did the bump of gnupg2 to version
2.4.0.
Julien: could you have a look at the below issue, which is affecting
gnupg2 in the autobuilders?
Thanks a lot!
Thomas
On Sat, 18 Feb 2023 17:14:26 +0700
Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> Bumping the package version to 2.4.0, it fails to cross-compile with
> unsafe cross-compile paths (for example recent build log at [1]):
>
> make[4]: Entering directory '/home/thomas/autobuild/instance-3/output-1/build/gnupg2-2.4.0/common'
> /home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o t-stringhelp.o t-stringhelp.c
> /home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DWITHOUT_NPTH=1 -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o libcommon_a-i18n.o `test -f 'i
18
> n.c' || echo './'`i18n.c
> /home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DWITHOUT_NPTH=1 -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o libcommon_a-mapstrings.o `test
-
> f 'mapstrings.c' || echo './'`mapstrings.c
> /home/thomas/autobuild/instance-3/output-1/host/bin/aarch64-buildroot-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -DGNUPG_BINDIR="\"/usr/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/libexec\"" -DGNUPG_LIBDIR="\"/usr/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/var\"" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libusb-1.0 -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/home/thomas/autobuild/instance-3/output-1/host/aarch64-buildroot-linux-gnu/sysroot/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DWITHOUT_NPTH=1 -Wall -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -g1 -D_FORTIFY_SOURCE=2 -c -o libcommon_a-stringhelp.o `test
-
> f 'stringhelp.c' || echo './'`stringhelp.c
> aarch64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include'
> make[4]: *** [Makefile:1283: t-stringhelp.o] Error 1
>
> Revert the bump for now until the issue can be fixed upstream.
>
> [1]: http://autobuild.buildroot.net/results/5bf00af86da6e41d1a48abc7304bf339908a0150/build-end.log
>
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
> package/gnupg2/0001-ks_ldap_free_state.patch | 21 ++++++++++++++++++++
> package/gnupg2/gnupg2.hash | 10 +++++-----
> package/gnupg2/gnupg2.mk | 2 +-
> 3 files changed, 27 insertions(+), 6 deletions(-)
> create mode 100644 package/gnupg2/0001-ks_ldap_free_state.patch
>
> diff --git a/package/gnupg2/0001-ks_ldap_free_state.patch b/package/gnupg2/0001-ks_ldap_free_state.patch
> new file mode 100644
> index 0000000000..fa55d27c04
> --- /dev/null
> +++ b/package/gnupg2/0001-ks_ldap_free_state.patch
> @@ -0,0 +1,21 @@
> +
> +Fix undefined reference to `ks_ldap_free_state' if OpenLDAP is not
> +installed
> +
> +Backported from: 7011286ce6e1fb56c2989fdafbd11b931c489faa
> +
> +Signed-off-by: Michael Fischer <mf@go-sys.de>
> +
> +--- a/dirmngr/server.c
> ++++ b/dirmngr/server.c
> +@@ -3137,8 +3137,10 @@ start_command_handler (assuan_fd_t fd, unsigned int session_id)
> + ctrl->refcount);
> + else
> + {
> ++#if USE_LDAP
> + ks_ldap_free_state (ctrl->ks_get_state);
> + ctrl->ks_get_state = NULL;
> ++#endif
> + release_ctrl_ocsp_certs (ctrl);
> + xfree (ctrl->server_local);
> + dirmngr_deinit_default_ctrl (ctrl);
> diff --git a/package/gnupg2/gnupg2.hash b/package/gnupg2/gnupg2.hash
> index c642862fe2..f9c071ad45 100644
> --- a/package/gnupg2/gnupg2.hash
> +++ b/package/gnupg2/gnupg2.hash
> @@ -1,7 +1,7 @@
> -# From https://lists.gnupg.org/pipermail/gnupg-announce/2022q4/000477.html
> -sha1 63dde155a8df0d5e1987efa5fc17438beca83ac1 gnupg-2.4.0.tar.bz2
> +# From https://lists.gnupg.org/pipermail/gnupg-announce/2022q4/000476.html
> +sha1 1f31b7b4c9c9adad97f94ea3acf1aa64c0424bcc gnupg-2.3.8.tar.bz2
> # Calculated based on the hash above and signature
> -# https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.4.0.tar.bz2.sig
> -# using key 6DAA6E64A76D2840571B4902528897B826403ADA
> -sha256 1d79158dd01d992431dd2e3facb89fdac97127f89784ea2cb610c600fb0c1483 gnupg-2.4.0.tar.bz2
> +# https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.3.8.tar.bz2.sig
> +# using key 6DAA6E64A76D2840571B4902528897B826403ADA and AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD
> +sha256 540b7a40e57da261fb10ef521a282e0021532a80fd023e75fb71757e8a4969ed gnupg-2.3.8.tar.bz2
> sha256 bc2d6664f6276fa0a72d57633b3ae68dc7dcb677b71018bf08c8e93e509f1357 COPYING
> diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk
> index 5935ce6939..9dc29ca99e 100644
> --- a/package/gnupg2/gnupg2.mk
> +++ b/package/gnupg2/gnupg2.mk
> @@ -4,7 +4,7 @@
> #
> ################################################################################
>
> -GNUPG2_VERSION = 2.4.0
> +GNUPG2_VERSION = 2.3.8
> GNUPG2_SOURCE = gnupg-$(GNUPG2_VERSION).tar.bz2
> GNUPG2_SITE = https://gnupg.org/ftp/gcrypt/gnupg
> GNUPG2_LICENSE = GPL-3.0+
>
> base-commit: d00e437922fb1b611f35c3138b9fbf7bcff62757
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] Revert "package/gnupg2: bump to version 2.4.0"
2023-02-18 10:39 ` Thomas Petazzoni via buildroot
@ 2023-02-18 11:13 ` Julien Olivain
2023-02-18 13:24 ` Thomas Petazzoni via buildroot
2023-02-18 13:45 ` [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0") Bagas Sanjaya
0 siblings, 2 replies; 8+ messages in thread
From: Julien Olivain @ 2023-02-18 11:13 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Bagas Sanjaya, Buildroot
Hi Thomas, Bagas, All,
On 18/02/2023 11:39, Thomas Petazzoni wrote:
> Hello Bagas,
>
> Let's add Julien Olivain in Cc, as he did the bump of gnupg2 to version
> 2.4.0.
>
> Julien: could you have a look at the below issue, which is affecting
> gnupg2 in the autobuilders?
I indeed started to receive some autobuild failures.
Unfortunately, I cannot reproduce on my system for now:
on my side, the build complete successfully.
I tried with _and_ without having a /usr/bin/gpgrt-config on host,
which I was suspecting to bring some host config.
In my first proposal of gnupg2 version 2.4.0 bump [1], I initially
proposed
to add Buildroot staging bin dir in PATH, to make sure we won't have
such
host/br-staging confusion:
GNUPG2_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
Bagas, could you try on your side if this solve the issue?
[1]
https://patchwork.ozlabs.org/project/buildroot/patch/20230103193649.7488-5-ju.o@free.fr/
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH] Revert "package/gnupg2: bump to version 2.4.0"
2023-02-18 11:13 ` Julien Olivain
@ 2023-02-18 13:24 ` Thomas Petazzoni via buildroot
2023-02-18 13:45 ` [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0") Bagas Sanjaya
1 sibling, 0 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-18 13:24 UTC (permalink / raw)
To: Julien Olivain; +Cc: Bagas Sanjaya, Buildroot
Hello Julien,
On Sat, 18 Feb 2023 12:13:16 +0100
Julien Olivain <ju.o@free.fr> wrote:
> I indeed started to receive some autobuild failures.
> Unfortunately, I cannot reproduce on my system for now:
> on my side, the build complete successfully.
>
> I tried with _and_ without having a /usr/bin/gpgrt-config on host,
> which I was suspecting to bring some host config.
>
> In my first proposal of gnupg2 version 2.4.0 bump [1], I initially
> proposed
> to add Buildroot staging bin dir in PATH, to make sure we won't have
> such
> host/br-staging confusion:
>
> GNUPG2_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
This is a really bad idea, and can potentially break. Indeed,
STAGING_DIR/usr/bin contains lots of programs that are compiled for the
target. So if you do that, the build process on your build machine
might try to invoke executables that are compiled for the target.
If the issue comes from a <foo>-config script, then generally, two
things are needed:
- Make sure the <foo>-config script returns correct values for
cross-compilation. If not, use <pkg>_CONFIG_SCRIPTS in the package
installing this <foo>-config script
- Make sure the package calling the <foo>-config script calls the
right one. Most autotools-based projects provide some sort of cache
variable that allows to tell the configure script that <foo>-config
in $(STAGING_DIR)/usr/bin/<foo>-config should be used
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0")
2023-02-18 11:13 ` Julien Olivain
2023-02-18 13:24 ` Thomas Petazzoni via buildroot
@ 2023-02-18 13:45 ` Bagas Sanjaya
2023-02-18 17:40 ` Julien Olivain
1 sibling, 1 reply; 8+ messages in thread
From: Bagas Sanjaya @ 2023-02-18 13:45 UTC (permalink / raw)
To: Julien Olivain, Thomas Petazzoni; +Cc: Buildroot
On 2/18/23 18:13, Julien Olivain wrote:
> In my first proposal of gnupg2 version 2.4.0 bump [1], I initially proposed
> to add Buildroot staging bin dir in PATH, to make sure we won't have such
> host/br-staging confusion:
>
> GNUPG2_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
>
> Bagas, could you try on your side if this solve the issue?
>
> [1] https://patchwork.ozlabs.org/project/buildroot/patch/20230103193649.7488-5-ju.o@free.fr/
>
Hi Julien,
I applied your suggestion on top of master as:
---- >8 ----
diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk
index 5935ce6939..55917912a8 100644
--- a/package/gnupg2/gnupg2.mk
+++ b/package/gnupg2/gnupg2.mk
@@ -15,6 +15,9 @@ GNUPG2_SELINUX_MODULES = gpg
GNUPG2_DEPENDENCIES = zlib libgpg-error libgcrypt libassuan libksba libnpth \
$(if $(BR2_PACKAGE_LIBICONV),libiconv) host-pkgconf
+# Let's see if staging GNUPG2_CONF_ENV here works.
+GNUPG2_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
+
GNUPG2_CONF_OPTS = \
--disable-rpath \
--with-libgpg-error-prefix=$(STAGING_DIR)/usr \
Unfortunately, the build error still occurs with your suggestion.
Thanks.
--
An old man doll... just what I always wanted! - Clara
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0")
2023-02-18 13:45 ` [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0") Bagas Sanjaya
@ 2023-02-18 17:40 ` Julien Olivain
2023-02-19 4:26 ` Bagas Sanjaya
0 siblings, 1 reply; 8+ messages in thread
From: Julien Olivain @ 2023-02-18 17:40 UTC (permalink / raw)
To: Bagas Sanjaya; +Cc: Thomas Petazzoni, Buildroot
Hi Bagas,
On 18/02/2023 14:45, Bagas Sanjaya wrote:
> On 2/18/23 18:13, Julien Olivain wrote:
>> In my first proposal of gnupg2 version 2.4.0 bump [1], I initially
>> proposed
>> to add Buildroot staging bin dir in PATH, to make sure we won't have
>> such
>> host/br-staging confusion:
>>
>> GNUPG2_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
>>
>> Bagas, could you try on your side if this solve the issue?
>>
>> [1]
>> https://patchwork.ozlabs.org/project/buildroot/patch/20230103193649.7488-5-ju.o@free.fr/
>>
>
> Hi Julien,
>
> I applied your suggestion on top of master as:
>
> ---- >8 ----
> diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk
> index 5935ce6939..55917912a8 100644
> --- a/package/gnupg2/gnupg2.mk
> +++ b/package/gnupg2/gnupg2.mk
> @@ -15,6 +15,9 @@ GNUPG2_SELINUX_MODULES = gpg
> GNUPG2_DEPENDENCIES = zlib libgpg-error libgcrypt libassuan libksba
> libnpth \
> $(if $(BR2_PACKAGE_LIBICONV),libiconv) host-pkgconf
>
> +# Let's see if staging GNUPG2_CONF_ENV here works.
> +GNUPG2_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH)
> +
> GNUPG2_CONF_OPTS = \
> --disable-rpath \
> --with-libgpg-error-prefix=$(STAGING_DIR)/usr \
>
>
> Unfortunately, the build error still occurs with your suggestion.
Thank you for testing.
I still can't reproduce the issue on my side. Compilation works fine on
my system
(with and without a /usr/bin/gpgrt-config script), and also in the
Buildroot
utils/docker-run (which does not include a /usr/bin/gpgrt-config
script). My system
has the same libgpg-error version 1.46 as Buildroot.
Could you tell me what is the distribution of your host system (or what
is the version
of the libgpg-error on the host)? I'll try the same environment in a
docker.
Another way to force the gpgrt-config path without putting the full
staging usr bin
in the PATH (as Thomas recommended not to do) would be to add the
following:
GNUPG2_CONF_ENV += GPGRT_CONFIG=$(STAGING_DIR)/usr/bin/gpgrt-config
While compiling gnupg2 in Buildroot, you should see in the configuration
log:
...
checking for gpg-error-config...
/path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpg-error-config
checking for gpgrt-config...
/path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpgrt-config
...
Without this line, if the host contains a gpgrt-config, you should see:
checking for gpg-error-config...
/path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpg-error-config
checking for gpgrt-config... /usr/bin/gpgrt-config
and if the host does not not contain a gpgrt-config, you should see:
checking for gpg-error-config...
/path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpg-error-config
checking for gpgrt-config... no
I still suspect the root cause is the presence of a
/usr/bin/gpgrt-config of a specific/older
libgpg-error version on the host.
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0")
2023-02-18 17:40 ` Julien Olivain
@ 2023-02-19 4:26 ` Bagas Sanjaya
2023-02-19 15:00 ` Julien Olivain
0 siblings, 1 reply; 8+ messages in thread
From: Bagas Sanjaya @ 2023-02-19 4:26 UTC (permalink / raw)
To: Julien Olivain; +Cc: Thomas Petazzoni, Buildroot
[-- Attachment #1.1: Type: text/plain, Size: 2671 bytes --]
On Sat, Feb 18, 2023 at 06:40:35PM +0100, Julien Olivain wrote:
> Thank you for testing.
>
> I still can't reproduce the issue on my side. Compilation works fine on my
> system
> (with and without a /usr/bin/gpgrt-config script), and also in the Buildroot
> utils/docker-run (which does not include a /usr/bin/gpgrt-config script). My
> system
> has the same libgpg-error version 1.46 as Buildroot.
>
> Could you tell me what is the distribution of your host system (or what is
> the version
> of the libgpg-error on the host)? I'll try the same environment in a
> docker.
>
> Another way to force the gpgrt-config path without putting the full staging
> usr bin
> in the PATH (as Thomas recommended not to do) would be to add the following:
>
> GNUPG2_CONF_ENV += GPGRT_CONFIG=$(STAGING_DIR)/usr/bin/gpgrt-config
>
Hi Julien,
My setup is Debian 11.
For the host GnuPG, I compiled GnuPG 2.4.0 with libgpg-error 1.46. I
source a script (gnupg-setup) to initialize the compiled version into my
~/.bashrc.
The script is:
---- >8 ----
if ! (systemctl --user is-active -q dirmngr-local.socket); then
systemctl --user start {dirmngr,gpg-agent,gpg-agent-ssh,gpg-agent-browser,gpg-agent-extra}-local.socket
fi
export PATH=$HOME/.local/gnupg/bin:$PATH
The actual .socket unit files are copied from GnuPG sources but I add
Conflicts= against corresponding system-provided socket units.
For your suggestion above, the build successed only when the initialization
script above isn't sourced. However, when the script is sourced, the build
search for host version of libraries instead (and thus FTBFS).
> While compiling gnupg2 in Buildroot, you should see in the configuration
> log:
>
> ...
> checking for gpg-error-config... /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpg-error-config
> checking for gpgrt-config... /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpgrt-config
> ...
>
> Without this line, if the host contains a gpgrt-config, you should see:
>
> checking for gpg-error-config... /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpg-error-config
> checking for gpgrt-config... /usr/bin/gpgrt-config
>
> and if the host does not not contain a gpgrt-config, you should see:
>
> checking for gpg-error-config... /path/to/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin/gpg-error-config
> checking for gpgrt-config... no
Yes, I see the message above in my build log.
Thanks.
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0")
2023-02-19 4:26 ` Bagas Sanjaya
@ 2023-02-19 15:00 ` Julien Olivain
0 siblings, 0 replies; 8+ messages in thread
From: Julien Olivain @ 2023-02-19 15:00 UTC (permalink / raw)
To: Bagas Sanjaya; +Cc: Thomas Petazzoni, Buildroot
Hi Bagas,
On 19/02/2023 05:26, Bagas Sanjaya wrote:
> On Sat, Feb 18, 2023 at 06:40:35PM +0100, Julien Olivain wrote:
>> Thank you for testing.
>>
>> I still can't reproduce the issue on my side. Compilation works fine
>> on my
>> system
>> (with and without a /usr/bin/gpgrt-config script), and also in the
>> Buildroot
>> utils/docker-run (which does not include a /usr/bin/gpgrt-config
>> script). My
>> system
>> has the same libgpg-error version 1.46 as Buildroot.
>>
>> Could you tell me what is the distribution of your host system (or
>> what is
>> the version
>> of the libgpg-error on the host)? I'll try the same environment in a
>> docker.
>>
>> Another way to force the gpgrt-config path without putting the full
>> staging
>> usr bin
>> in the PATH (as Thomas recommended not to do) would be to add the
>> following:
>>
>> GNUPG2_CONF_ENV += GPGRT_CONFIG=$(STAGING_DIR)/usr/bin/gpgrt-config
>>
>
> Hi Julien,
>
> My setup is Debian 11.
>
> For the host GnuPG, I compiled GnuPG 2.4.0 with libgpg-error 1.46. I
> source a script (gnupg-setup) to initialize the compiled version into
> my
> ~/.bashrc.
>
> The script is:
>
> ---- >8 ----
> if ! (systemctl --user is-active -q dirmngr-local.socket); then
> systemctl --user start
> {dirmngr,gpg-agent,gpg-agent-ssh,gpg-agent-browser,gpg-agent-extra}-local.socket
> fi
>
> export PATH=$HOME/.local/gnupg/bin:$PATH
>
> The actual .socket unit files are copied from GnuPG sources but I add
> Conflicts= against corresponding system-provided socket units.
>
> For your suggestion above, the build successed only when the
> initialization
> script above isn't sourced. However, when the script is sourced, the
> build
> search for host version of libraries instead (and thus FTBFS).
Thanks for the tests and feedback. I am now able to reproduce the issue
by installing the libgpg-error-dev package in the Buildroot Docker image
(which also happen to be a Debian 11).
I'll send my patch proposal to fix autobuild failures.
Right now, I don't see why your sourced file would prevent this fix to
work.
Is it possible the same issue happen in other gnupg2 friend packages?
(such as libassuan, libgcrypt, libksba, ...) which I believe are all
using
the AM_PATH_GPG_ERROR() macro from libgpg-error gpg-error.m4.
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-02-19 15:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-18 10:14 [Buildroot] [PATCH] Revert "package/gnupg2: bump to version 2.4.0" Bagas Sanjaya
2023-02-18 10:39 ` Thomas Petazzoni via buildroot
2023-02-18 11:13 ` Julien Olivain
2023-02-18 13:24 ` Thomas Petazzoni via buildroot
2023-02-18 13:45 ` [Buildroot] Debugging gnupg2 unsafe search path error (was Re: [PATCH] Revert "package/gnupg2: bump to version 2.4.0") Bagas Sanjaya
2023-02-18 17:40 ` Julien Olivain
2023-02-19 4:26 ` Bagas Sanjaya
2023-02-19 15:00 ` Julien Olivain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox