All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] bitbake.conf: add ssh-keygen to HOSTTOOLS_NONFATAL
@ 2022-02-18  7:35 Markus Volk
  2022-02-25 15:47 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Volk @ 2022-02-18  7:35 UTC (permalink / raw)
  To: openembedded-core; +Cc: Markus Volk

Gnome Seahorse needs an external ssh-keygen to build and there is no provider
for it in yocto/oe. openssh-native is not allowed to build and if allowed there
are problems building it with '--enable-pam'.

'ssh' is already set to be added as a HOSTTOOL when it is found.
This commit also adds ssh-keygen.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index fba99e8f0c..15ea0bc29e 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -499,7 +499,7 @@ HOSTTOOLS += " \
 HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}"
 
 # Link to these if present
-HOSTTOOLS_NONFATAL += "aws gcc-ar gpg gpg-agent ld.bfd ld.gold nc pigz sftp socat ssh sudo"
+HOSTTOOLS_NONFATAL += "aws gcc-ar gpg gpg-agent ld.bfd ld.gold nc pigz sftp socat ssh ssh-keygen sudo"
 
 # Temporary add few more detected in bitbake world
 HOSTTOOLS_NONFATAL += "join nl size yes zcat"
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core][PATCH] bitbake.conf: add ssh-keygen to HOSTTOOLS_NONFATAL
  2022-02-18  7:35 [OE-core][PATCH] bitbake.conf: add ssh-keygen to HOSTTOOLS_NONFATAL Markus Volk
@ 2022-02-25 15:47 ` Richard Purdie
  2022-02-26  6:25   ` Markus Volk
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2022-02-25 15:47 UTC (permalink / raw)
  To: Markus Volk, openembedded-core

On Fri, 2022-02-18 at 08:35 +0100, Markus Volk wrote:
> Gnome Seahorse needs an external ssh-keygen to build and there is no provider
> for it in yocto/oe. openssh-native is not allowed to build and if allowed there
> are problems building it with '--enable-pam'.
> 
> 'ssh' is already set to be added as a HOSTTOOL when it is found.
> This commit also adds ssh-keygen.
> 
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  meta/conf/bitbake.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index fba99e8f0c..15ea0bc29e 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -499,7 +499,7 @@ HOSTTOOLS += " \
>  HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}"
>  
>  # Link to these if present
> -HOSTTOOLS_NONFATAL += "aws gcc-ar gpg gpg-agent ld.bfd ld.gold nc pigz sftp socat ssh sudo"
> +HOSTTOOLS_NONFATAL += "aws gcc-ar gpg gpg-agent ld.bfd ld.gold nc pigz sftp socat ssh ssh-keygen sudo"
>  

Does it actually need to generate keys or is it just checking for the presence
of the tool? I'm not a big fan of adding new tools like this, particularly as
this could still cause a deterministic build issue...

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core][PATCH] bitbake.conf: add ssh-keygen to HOSTTOOLS_NONFATAL
  2022-02-25 15:47 ` Richard Purdie
@ 2022-02-26  6:25   ` Markus Volk
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Volk @ 2022-02-26  6:25 UTC (permalink / raw)
  To: openembedded-core


Am 25.02.22 um 16:47 schrieb Richard Purdie:
> On Fri, 2022-02-18 at 08:35 +0100, Markus Volk wrote:
>> Gnome Seahorse needs an external ssh-keygen to build and there is no provider
>> for it in yocto/oe. openssh-native is not allowed to build and if allowed there
>> are problems building it with '--enable-pam'.
>>
>> 'ssh' is already set to be added as a HOSTTOOL when it is found.
>> This commit also adds ssh-keygen.
>>
>> Signed-off-by: Markus Volk <f_l_k@t-online.de>
>> ---
>>   meta/conf/bitbake.conf | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>> index fba99e8f0c..15ea0bc29e 100644
>> --- a/meta/conf/bitbake.conf
>> +++ b/meta/conf/bitbake.conf
>> @@ -499,7 +499,7 @@ HOSTTOOLS += " \
>>   HOSTTOOLS += "${@'ip ping ps scp ssh stty' if (bb.utils.contains_any('IMAGE_CLASSES', 'testimage testsdk', True, False, d) or any(x in (d.getVar("BBINCLUDED") or "") for x in ["testimage.bbclass", "testsdk.bbclass"])) else ''}"
>>   
>>   # Link to these if present
>> -HOSTTOOLS_NONFATAL += "aws gcc-ar gpg gpg-agent ld.bfd ld.gold nc pigz sftp socat ssh sudo"
>> +HOSTTOOLS_NONFATAL += "aws gcc-ar gpg gpg-agent ld.bfd ld.gold nc pigz sftp socat ssh ssh-keygen sudo"
>>   
> Does it actually need to generate keys or is it just checking for the presence
> of the tool? I'm not a big fan of adding new tools like this, particularly as
> this could still cause a deterministic build issue...

It looks like there is no need to generate keys. ssh-keygen is only 
looked for to get SSH_KEYGEN_PATH.

https://gitlab.gnome.org/GNOME/seahorse/-/blob/master/meson.build#L48

https://gitlab.gnome.org/GNOME/seahorse/-/blob/master/meson.build#L126

If that Path isn't set compile fails like this:

d -o ssh/libseahorse-ssh.a.p/meson-generated_operation.c.o -c 
ssh/libseahorse-ssh.a.p/operation.c
| ssh/libseahorse-ssh.a.p/operation.c: In function 
'seahorse_ssh_change_passphrase_operation_change_passphrase_async_co':
| ssh/libseahorse-ssh.a.p/operation.c:1834:61: error: 'SSH_KEYGEN_PATH' 
undeclared (first use in this function)
|  1834 |         _data_->_tmp15_ = g_strdup_printf ("%s -p -f '%s'", 
SSH_KEYGEN_PATH, _data_->_tmp14_);
| | ^~~~~~~~~~~~~~~
| ssh/libseahorse-ssh.a.p/operation.c:1834:61: note: each undeclared 
identifier is reported only once for each function it appears in
| ssh/libseahorse-ssh.a.p/operation.c: In function 
'seahorse_ssh_generate_operation_generate_async_co':
| ssh/libseahorse-ssh.a.p/operation.c:2032:75: error: 'SSH_KEYGEN_PATH' 
undeclared (first use in this function)
|  2032 |         _data_->_tmp12_ = g_strdup_printf ("%s %s -t '%s' -C 
%s -f '%s'", SSH_KEYGEN_PATH, _data_->bits_str, _data_->_tmp11_, 
_data_->comment, _data_->filename);
| | ^~~~~~~~~~~~~~~
| ssh/libseahorse-ssh.a.p/operation.c: In function 
'seahorse_ssh_private_import_operation_import_private_async_co':
| ssh/libseahorse-ssh.a.p/operation.c:2299:61: error: 'SSH_KEYGEN_PATH' 
undeclared (first use in this function)
|  2299 |         _data_->_tmp25_ = g_strdup_printf ("%s -y -f '%s'", 
SSH_KEYGEN_PATH, _data_->_tmp24_);

Actually it is not really ideal to derive that  from hosts path. But 
what would be best to do here?

Hack it like this in seahorse.bb?

do_configure:prepend() {
     sed -i "s|ssh_keygen = find_program('ssh-keygen')|#ssh_keygen = 
find_program('ssh-keygen')|" ${S}/meson.build
     sed -i "s|ssh_keygen.path()|'${bindir}/ssh-keygen'|" ${S}/meson.build
}



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-26  6:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18  7:35 [OE-core][PATCH] bitbake.conf: add ssh-keygen to HOSTTOOLS_NONFATAL Markus Volk
2022-02-25 15:47 ` Richard Purdie
2022-02-26  6:25   ` Markus Volk

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.