* [Buildroot] [PATCH 1/1] package/opensc: disable tests
@ 2023-07-24 20:44 Bernd Kuhls
2023-07-25 19:18 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2023-07-24 20:44 UTC (permalink / raw)
To: buildroot
Fixes:
http://autobuild.buildroot.net/results/50b/50b6962ccd884a91391d13ee75852dd0e9ea1a84/
This error only occurs when building with BR2_SHARED_STATIC_LIBS=y, it
fails for src/tests/fuzzing/fuzz_pkcs15init which is only available when
static linking is enabled:
https://github.com/OpenSC/OpenSC/blob/master/src/tests/fuzzing/Makefile.am#L14
The upstream build system has no support to extract the correct ldflags
for libatomic.so provided by libcrypto.pc. Because we do not need the
tests anyway we just disable them to "fix" the build error for us.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
...onfigure-add-option-to-disable-tests.patch | 67 +++++++++++++++++++
package/opensc/opensc.mk | 4 +-
2 files changed, 70 insertions(+), 1 deletion(-)
create mode 100644 package/opensc/0003-configure-add-option-to-disable-tests.patch
diff --git a/package/opensc/0003-configure-add-option-to-disable-tests.patch b/package/opensc/0003-configure-add-option-to-disable-tests.patch
new file mode 100644
index 0000000000..29342026c1
--- /dev/null
+++ b/package/opensc/0003-configure-add-option-to-disable-tests.patch
@@ -0,0 +1,67 @@
+From 3c3ed2ecbf31d41b6e5406da55971b9d9eaa3388 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Mon, 24 Jul 2023 22:28:11 +0200
+Subject: [PATCH] configure: add option to disable tests
+
+Upstream: https://github.com/OpenSC/OpenSC/pull/2822
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ configure.ac | 9 +++++++++
+ src/Makefile.am | 6 +++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0a90445b..9b7543da 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -272,6 +272,13 @@ AC_ARG_ENABLE(
+ [enable_doc="no"]
+ )
+
++AC_ARG_ENABLE(
++ [tests],
++ [AS_HELP_STRING([--enable-tests],[enable tests @<:@enabled@:>@])],
++ ,
++ [enable_tests="yes"]
++)
++
+ AC_ARG_ENABLE(
+ [dnie-ui],
+ [AS_HELP_STRING([--enable-dnie-ui],[enable use of external user interface program to request DNIe pin@<:@disabled@:>@])],
+@@ -1119,6 +1126,7 @@ AM_CONDITIONAL([ENABLE_NOTIFY], [test "${enable_notify}" = "yes"])
+ AM_CONDITIONAL([ENABLE_CRYPTOTOKENKIT], [test "${enable_cryptotokenkit}" = "yes"])
+ AM_CONDITIONAL([ENABLE_OPENCT], [test "${enable_openct}" = "yes"])
+ AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"])
++AM_CONDITIONAL([ENABLE_TESTS], [test "${enable_tests}" = "yes"])
+ AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
+ AM_CONDITIONAL([CYGWIN], [test "${CYGWIN}" = "yes"])
+ AM_CONDITIONAL([ENABLE_MINIDRIVER], [test "${enable_minidriver}" = "yes"])
+@@ -1213,6 +1221,7 @@ XSL stylesheets: ${xslstylesheetsdir}
+
+ man support: ${enable_man}
+ doc support: ${enable_doc}
++tests: ${enable_tests}
+ thread locking support: ${enable_thread_locking}
+ zlib support: ${enable_zlib}
+ readline support: ${enable_readline}
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 3ce465bf..bf71b61f 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -3,7 +3,11 @@ EXTRA_DIST = Makefile.mak
+
+ # Order IS important
+ SUBDIRS = common scconf ui pkcs15init sm \
+- libopensc pkcs11 tools minidriver tests
++ libopensc pkcs11 tools minidriver
++
++if ENABLE_TESTS
++SUBDIRS += tests
++endif
+
+ if ENABLE_SM
+ SUBDIRS += smm
+--
+2.39.2
+
diff --git a/package/opensc/opensc.mk b/package/opensc/opensc.mk
index 253b6b26f8..32f0fdaa8b 100644
--- a/package/opensc/opensc.mk
+++ b/package/opensc/opensc.mk
@@ -9,8 +9,10 @@ OPENSC_SITE = https://github.com/OpenSC/OpenSC/releases/download/$(OPENSC_VERSIO
OPENSC_LICENSE = LGPL-2.1+
OPENSC_LICENSE_FILES = COPYING
OPENSC_CPE_ID_VENDOR = opensc_project
+# 0003-configure-add-option-to-disable-tests.patch
+OPENSC_AUTORECONF = YES
OPENSC_DEPENDENCIES = openssl pcsc-lite
OPENSC_INSTALL_STAGING = YES
-OPENSC_CONF_OPTS = --disable-cmocka --disable-strict
+OPENSC_CONF_OPTS = --disable-cmocka --disable-strict --disable-tests
$(eval $(autotools-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/opensc: disable tests
2023-07-24 20:44 [Buildroot] [PATCH 1/1] package/opensc: disable tests Bernd Kuhls
@ 2023-07-25 19:18 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2023-07-25 19:18 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: buildroot
Bernd, All,
On 2023-07-24 22:44 +0200, Bernd Kuhls spake thusly:
> Fixes:
> http://autobuild.buildroot.net/results/50b/50b6962ccd884a91391d13ee75852dd0e9ea1a84/
>
> This error only occurs when building with BR2_SHARED_STATIC_LIBS=y, it
> fails for src/tests/fuzzing/fuzz_pkcs15init which is only available when
> static linking is enabled:
> https://github.com/OpenSC/OpenSC/blob/master/src/tests/fuzzing/Makefile.am#L14
>
> The upstream build system has no support to extract the correct ldflags
> for libatomic.so provided by libcrypto.pc. Because we do not need the
> tests anyway we just disable them to "fix" the build error for us.
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> ...onfigure-add-option-to-disable-tests.patch | 67 +++++++++++++++++++
> package/opensc/opensc.mk | 4 +-
> 2 files changed, 70 insertions(+), 1 deletion(-)
> create mode 100644 package/opensc/0003-configure-add-option-to-disable-tests.patch
>
> diff --git a/package/opensc/0003-configure-add-option-to-disable-tests.patch b/package/opensc/0003-configure-add-option-to-disable-tests.patch
> new file mode 100644
> index 0000000000..29342026c1
> --- /dev/null
> +++ b/package/opensc/0003-configure-add-option-to-disable-tests.patch
> @@ -0,0 +1,67 @@
> +From 3c3ed2ecbf31d41b6e5406da55971b9d9eaa3388 Mon Sep 17 00:00:00 2001
> +From: Bernd Kuhls <bernd@kuhls.net>
> +Date: Mon, 24 Jul 2023 22:28:11 +0200
> +Subject: [PATCH] configure: add option to disable tests
> +
> +Upstream: https://github.com/OpenSC/OpenSC/pull/2822
> +
> +Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> +---
> + configure.ac | 9 +++++++++
> + src/Makefile.am | 6 +++++-
> + 2 files changed, 14 insertions(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 0a90445b..9b7543da 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -272,6 +272,13 @@ AC_ARG_ENABLE(
> + [enable_doc="no"]
> + )
> +
> ++AC_ARG_ENABLE(
> ++ [tests],
> ++ [AS_HELP_STRING([--enable-tests],[enable tests @<:@enabled@:>@])],
> ++ ,
> ++ [enable_tests="yes"]
> ++)
> ++
> + AC_ARG_ENABLE(
> + [dnie-ui],
> + [AS_HELP_STRING([--enable-dnie-ui],[enable use of external user interface program to request DNIe pin@<:@disabled@:>@])],
> +@@ -1119,6 +1126,7 @@ AM_CONDITIONAL([ENABLE_NOTIFY], [test "${enable_notify}" = "yes"])
> + AM_CONDITIONAL([ENABLE_CRYPTOTOKENKIT], [test "${enable_cryptotokenkit}" = "yes"])
> + AM_CONDITIONAL([ENABLE_OPENCT], [test "${enable_openct}" = "yes"])
> + AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"])
> ++AM_CONDITIONAL([ENABLE_TESTS], [test "${enable_tests}" = "yes"])
> + AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
> + AM_CONDITIONAL([CYGWIN], [test "${CYGWIN}" = "yes"])
> + AM_CONDITIONAL([ENABLE_MINIDRIVER], [test "${enable_minidriver}" = "yes"])
> +@@ -1213,6 +1221,7 @@ XSL stylesheets: ${xslstylesheetsdir}
> +
> + man support: ${enable_man}
> + doc support: ${enable_doc}
> ++tests: ${enable_tests}
> + thread locking support: ${enable_thread_locking}
> + zlib support: ${enable_zlib}
> + readline support: ${enable_readline}
> +diff --git a/src/Makefile.am b/src/Makefile.am
> +index 3ce465bf..bf71b61f 100644
> +--- a/src/Makefile.am
> ++++ b/src/Makefile.am
> +@@ -3,7 +3,11 @@ EXTRA_DIST = Makefile.mak
> +
> + # Order IS important
> + SUBDIRS = common scconf ui pkcs15init sm \
> +- libopensc pkcs11 tools minidriver tests
> ++ libopensc pkcs11 tools minidriver
> ++
> ++if ENABLE_TESTS
> ++SUBDIRS += tests
> ++endif
> +
> + if ENABLE_SM
> + SUBDIRS += smm
> +--
> +2.39.2
> +
> diff --git a/package/opensc/opensc.mk b/package/opensc/opensc.mk
> index 253b6b26f8..32f0fdaa8b 100644
> --- a/package/opensc/opensc.mk
> +++ b/package/opensc/opensc.mk
> @@ -9,8 +9,10 @@ OPENSC_SITE = https://github.com/OpenSC/OpenSC/releases/download/$(OPENSC_VERSIO
> OPENSC_LICENSE = LGPL-2.1+
> OPENSC_LICENSE_FILES = COPYING
> OPENSC_CPE_ID_VENDOR = opensc_project
> +# 0003-configure-add-option-to-disable-tests.patch
> +OPENSC_AUTORECONF = YES
> OPENSC_DEPENDENCIES = openssl pcsc-lite
> OPENSC_INSTALL_STAGING = YES
> -OPENSC_CONF_OPTS = --disable-cmocka --disable-strict
> +OPENSC_CONF_OPTS = --disable-cmocka --disable-strict --disable-tests
>
> $(eval $(autotools-package))
> --
> 2.39.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-25 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24 20:44 [Buildroot] [PATCH 1/1] package/opensc: disable tests Bernd Kuhls
2023-07-25 19:18 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.