diff mbox series

[v2] package/linux-tools: openssl dependency for x86_64 selftests

Message ID 20220524170541.93208-1-jarkko.sakkinen@iki.fi
State Accepted
Headers show
Series [v2] package/linux-tools: openssl dependency for x86_64 selftests | expand

Commit Message

Jarkko Sakkinen May 24, 2022, 5:05 p.m. UTC
On x86_64, libssl is a dependency for kselftests. selftests/sgx depends on
it.  Thus, select it in "Config.in", and add it as a build dependency in
"linux-tool-selftests.mk.in".

Link: https://lore.kernel.org/buildroot/20220517224809.21f77949@gmx.net/
Suggested-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
---
v2:
Config.in: BR2_PACKAGE_LIBOPENSSL => BR2_PACKAGE_OPENSSL
---
 package/linux-tools/Config.in                  | 1 +
 package/linux-tools/linux-tool-selftests.mk.in | 3 +++
 2 files changed, 4 insertions(+)

Comments

Yann E. MORIN May 25, 2022, 7:07 a.m. UTC | #1
Jarkko, All,

On 2022-05-24 20:05 +0300, Jarkko Sakkinen spake thusly:
> On x86_64, libssl is a dependency for kselftests. selftests/sgx depends on
> it.  Thus, select it in "Config.in", and add it as a build dependency in
> "linux-tool-selftests.mk.in".
> 
> Link: https://lore.kernel.org/buildroot/20220517224809.21f77949@gmx.net/
> Suggested-by: Peter Seiderer <ps.report@gmx.net>
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
> ---
> v2:
> Config.in: BR2_PACKAGE_LIBOPENSSL => BR2_PACKAGE_OPENSSL
> ---
>  package/linux-tools/Config.in                  | 1 +
>  package/linux-tools/linux-tool-selftests.mk.in | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
> index 791f2c085c..6217fcfb7a 100644
> --- a/package/linux-tools/Config.in
> +++ b/package/linux-tools/Config.in
> @@ -98,6 +98,7 @@ config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
>  	select BR2_PACKAGE_LIBCAP_NG
>  	select BR2_PACKAGE_UTIL_LINUX
>  	select BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS # runtime (taskset)
> +	select BR2_PACKAGE_OPENSSL if BR2_x86_64
>  	help
>  	  Build and install (to /usr/lib/kselftests) kernel selftests.
>  
> diff --git a/package/linux-tools/linux-tool-selftests.mk.in b/package/linux-tools/linux-tool-selftests.mk.in
> index b824c11bd6..06158e6147 100644
> --- a/package/linux-tools/linux-tool-selftests.mk.in
> +++ b/package/linux-tools/linux-tool-selftests.mk.in
> @@ -17,6 +17,9 @@ endif
>  endif
>  
>  SELFTESTS_DEPENDENCIES = libcap-ng popt
> +ifeq ($(NORMALIZED_ARCH),x86_64)
> +SELFTESTS_DEPENDENCIES += openssl
> +endif

I've changed ths codition to be in the package being actually enabled,
so that the real confdition to require openssl is only handled in
Config.in (or we'd have to sync the two everytime a new arch needs
openssl...)

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  SELFTESTS_MAKE_FLAGS = \
>  	$(LINUX_MAKE_FLAGS) \
> -- 
> 2.36.1
>
Jarkko Sakkinen May 26, 2022, 12:37 a.m. UTC | #2
On Wed, 2022-05-25 at 09:07 +0200, Yann E. MORIN wrote:
> Jarkko, All,
> 
> On 2022-05-24 20:05 +0300, Jarkko Sakkinen spake thusly:
> > On x86_64, libssl is a dependency for kselftests. selftests/sgx depends on
> > it.  Thus, select it in "Config.in", and add it as a build dependency in
> > "linux-tool-selftests.mk.in".
> > 
> > Link: https://lore.kernel.org/buildroot/20220517224809.21f77949@gmx.net/
> > Suggested-by: Peter Seiderer <ps.report@gmx.net>
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
> > ---
> > v2:
> > Config.in: BR2_PACKAGE_LIBOPENSSL => BR2_PACKAGE_OPENSSL
> > ---
> >  package/linux-tools/Config.in                  | 1 +
> >  package/linux-tools/linux-tool-selftests.mk.in | 3 +++
> >  2 files changed, 4 insertions(+)
> > 
> > diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
> > index 791f2c085c..6217fcfb7a 100644
> > --- a/package/linux-tools/Config.in
> > +++ b/package/linux-tools/Config.in
> > @@ -98,6 +98,7 @@ config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
> >         select BR2_PACKAGE_LIBCAP_NG
> >         select BR2_PACKAGE_UTIL_LINUX
> >         select BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS # runtime (taskset)
> > +       select BR2_PACKAGE_OPENSSL if BR2_x86_64
> >         help
> >           Build and install (to /usr/lib/kselftests) kernel selftests.
> >  
> > diff --git a/package/linux-tools/linux-tool-selftests.mk.in b/package/linux-tools/linux-tool-selftests.mk.in
> > index b824c11bd6..06158e6147 100644
> > --- a/package/linux-tools/linux-tool-selftests.mk.in
> > +++ b/package/linux-tools/linux-tool-selftests.mk.in
> > @@ -17,6 +17,9 @@ endif
> >  endif
> >  
> >  SELFTESTS_DEPENDENCIES = libcap-ng popt
> > +ifeq ($(NORMALIZED_ARCH),x86_64)
> > +SELFTESTS_DEPENDENCIES += openssl
> > +endif
> 
> I've changed ths codition to be in the package being actually enabled,
> so that the real confdition to require openssl is only handled in
> Config.in (or we'd have to sync the two everytime a new arch needs
> openssl...)
> 
> Applied to master, thanks.

Thank you, appreciate it!

Just for the record, there's also a bug in the selftest itself
preventing packaging it:

https://lore.kernel.org/linux-sgx/20220523181120.54547-1-jarkko@kernel.org/T/#u

BR, Jarkko
Peter Korsgaard June 1, 2022, 8:53 p.m. UTC | #3
>>>>> "Jarkko" == Jarkko Sakkinen <jarkko.sakkinen@iki.fi> writes:

 > On x86_64, libssl is a dependency for kselftests. selftests/sgx depends on
 > it.  Thus, select it in "Config.in", and add it as a build dependency in
 > "linux-tool-selftests.mk.in".

 > Link: https://lore.kernel.org/buildroot/20220517224809.21f77949@gmx.net/
 > Suggested-by: Peter Seiderer <ps.report@gmx.net>
 > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
 > ---
 > v2:
 > Config.in: BR2_PACKAGE_LIBOPENSSL => BR2_PACKAGE_OPENSSL

Committed to 2022.02.x, thanks.
diff mbox series

Patch

diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index 791f2c085c..6217fcfb7a 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -98,6 +98,7 @@  config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
 	select BR2_PACKAGE_LIBCAP_NG
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS # runtime (taskset)
+	select BR2_PACKAGE_OPENSSL if BR2_x86_64
 	help
 	  Build and install (to /usr/lib/kselftests) kernel selftests.
 
diff --git a/package/linux-tools/linux-tool-selftests.mk.in b/package/linux-tools/linux-tool-selftests.mk.in
index b824c11bd6..06158e6147 100644
--- a/package/linux-tools/linux-tool-selftests.mk.in
+++ b/package/linux-tools/linux-tool-selftests.mk.in
@@ -17,6 +17,9 @@  endif
 endif
 
 SELFTESTS_DEPENDENCIES = libcap-ng popt
+ifeq ($(NORMALIZED_ARCH),x86_64)
+SELFTESTS_DEPENDENCIES += openssl
+endif
 
 SELFTESTS_MAKE_FLAGS = \
 	$(LINUX_MAKE_FLAGS) \