diff mbox series

openssh: Install internal header/lib files

Message ID IAS2.1666358226748943797.wkAx@lists.openembedded.org
State New
Headers show
Series openssh: Install internal header/lib files | expand

Commit Message

Willy Tu Oct. 21, 2022, 1:17 p.m. UTC
Install API only if opensshinternals is in DISTRO_FEATURES.

Install the OpenSSH header + lib files for other repo to build using it.
For example, https://github.com/google/hiba is dependent on those files
to build and this change is needed to meet that requirement.

https://github.com/openembedded/meta-openembedded/pull/597

Signed-off-by: Willy Tu <wltu@google.com>
---
meta/recipes-connectivity/openssh/openssh_9.0p1.bb | 11 +++++++++++
1 file changed, 11 insertions(+)

--
2.38.0.135.g90850a2211-goog

Comments

Willy Tu Oct. 21, 2022, 1:19 p.m. UTC | #1
just for visibility.


On Fri, Oct 21, 2022 at 6:17 AM Willy Tu via lists.openembedded.org
<wltu=google.com@lists.openembedded.org> wrote:
>
> Install API only if opensshinternals is in DISTRO_FEATURES.
>
> Install the OpenSSH header + lib files for other repo to build using it.
> For example, https://github.com/google/hiba is dependent on those files
> to build and this change is needed to meet that requirement.
>
> https://github.com/openembedded/meta-openembedded/pull/597
>
> Signed-off-by: Willy Tu <wltu@google.com>
> ---
>  meta/recipes-connectivity/openssh/openssh_9.0p1.bb | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/meta/recipes-connectivity/openssh/openssh_9.0p1.bb b/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
> index b63ea2b137..84da118ca6 100644
> --- a/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
> +++ b/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
> @@ -137,6 +137,17 @@ do_install:append () {
>   ${D}${sysconfdir}/init.d/sshd
>
>   install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys
> +
> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals', 'true', 'false', d)}; then
> + install -d ${D}${includedir}/ssh
> + install -d ${D}${includedir}/ssh/openbsd-compat
> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
> + install -m0644 ${S}/openbsd-compat/*.h ${D}${includedir}/ssh/openbsd-compat
> +
> + install -d ${D}${libdir}
> + install -m0644 ${S}/libssh.a ${D}${libdir}
> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
> + fi
>  }
>
>  do_install_ptest () {
> --
> 2.38.0.135.g90850a2211-goog
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#172016): https://lists.openembedded.org/g/openembedded-core/message/172016
> Mute This Topic: https://lists.openembedded.org/mt/94475279/6858837
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [wltu@google.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Ross Burton Oct. 21, 2022, 2:59 p.m. UTC | #2
Hi,

oe-core doesn’t accept merge requests on the github mirrors, and you pushed to meta-oe, which is a different repository.

>> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals', 'true', 'false', d)}; then

This should be a PACKAGECONFIG, as it’s not a distro-wide setting.

>> + install -d ${D}${includedir}/ssh
>> + install -d ${D}${includedir}/ssh/openbsd-compat
>> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
>> + install -m0644 ${S}/openbsd-compat/*.h ${D}${includedir}/ssh/openbsd-compat
>> +
>> + install -d ${D}${libdir}
>> + install -m0644 ${S}/libssh.a ${D}${libdir}
>> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
>> + fi

So you’re installing bits of the SSH source into the *target* packages because one piece of software needs the build tree. This is clearly an unsupported use of openssh, as the hiba build instructions literally say “build openssh, then point hiba’s configure at that build tree”.  If 

I suggest a better approach would be to have a bbappend in your layer which adds the files you need to *just the sysroot*, so the target packages are unaltered.

Ross
Willy Tu Oct. 21, 2022, 4:22 p.m. UTC | #3
Hi Ross,

Thanks for the feedback.

Can you point to the right repo to update? Just to make sure that I
understand the concern, you are not referring to
https://github.com/openembedded/meta-openembedded/pull/597, right? I am
making changes to
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
which
I thought is part of oe-core.

@Tristan Lelong <tlelong@google.com> is the maintainer for hiba and is okay
with the change. Do you have any suggestions on installing it to just the
sysroot in openssh while using it from the hiba recipe? I was not able to
do that when I tried it.

Thanks,

Willy Tu




On Fri, Oct 21, 2022 at 7:59 AM Ross Burton <Ross.Burton@arm.com> wrote:

> Hi,
>
> oe-core doesn’t accept merge requests on the github mirrors, and you
> pushed to meta-oe, which is a different repository.
>
> >> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals',
> 'true', 'false', d)}; then
>
> This should be a PACKAGECONFIG, as it’s not a distro-wide setting.
>
> >> + install -d ${D}${includedir}/ssh
> >> + install -d ${D}${includedir}/ssh/openbsd-compat
> >> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
> >> + install -m0644 ${S}/openbsd-compat/*.h
> ${D}${includedir}/ssh/openbsd-compat
> >> +
> >> + install -d ${D}${libdir}
> >> + install -m0644 ${S}/libssh.a ${D}${libdir}
> >> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
> >> + fi
>
> So you’re installing bits of the SSH source into the *target* packages
> because one piece of software needs the build tree. This is clearly an
> unsupported use of openssh, as the hiba build instructions literally say
> “build openssh, then point hiba’s configure at that build tree”.  If
>
> I suggest a better approach would be to have a bbappend in your layer
> which adds the files you need to *just the sysroot*, so the target packages
> are unaltered.
>
> Ross
Michael Opdenacker Oct. 21, 2022, 4:24 p.m. UTC | #4
Hi Willy

Thanks for the patch!

On 10/21/22 15:17, Willy Tu via lists.openembedded.org wrote:
> Install API only if opensshinternals is in DISTRO_FEATURES.
> Install the OpenSSH header + lib files for other repo to build using it.
> For example, https://github.com/google/hiba is dependent on those files
> to build and this change is needed to meet that requirement.
> https://github.com/openembedded/meta-openembedded/pull/597
> Signed-off-by: Willy Tu <wltu@google.com>
> ---
>  meta/recipes-connectivity/openssh/openssh_9.0p1.bb | 11 +++++++++++
>  1 file changed, 11 insertions(+)


There's a problem with the way you send your patches though. I used to 
have it too.

If I apply your patch through "git am", the author of the commit will be:
Willy Tu via lists.openembedded.org <wltu=google.com@lists.openembedded.org>
instead of
Willy Tu <wltu@google.com>

Because of this issue, the maintainer has to manually fix this field 
when accepting your patch. Worse, if he doesn't catch this, that's 
harder to fix afterwards.

You should be able to fix this by running:

git config --global sendemail.from "wltu@google.com"
This should add a "From" field to the sent patch which "git am" should 
be able to match with your name.

At least this worked for me. See 
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Sending_using_git-send-email

Could you try to send an update? You could send it to me again through 
private-email first.

Thanks in advance
Michael.
Willy Tu Oct. 24, 2022, 2:27 p.m. UTC | #5
Hi Michael,

Thanks for the response. Sorry for the delay. I must have missed the email
when I was setting up the filters. I have sent the patch directly to you
privately to see if that works.

As for
```
git config --global sendemail.from "wltu@google.com"
```
,

I think I already have to setup properly
```
$ git config --global sendemail.from
Willy Tu <wltu@google.com>
```

I believe the issue is because I created the topic directly with
https://lists.openembedded.org/g/openembedded-core/post. Instead with git
email and it filtered out the email from there for some reason. I should
probably just send the email through git instead. I did with the web UI
because I wasn't able to get my message show up before. Sorry for the
confusion. I'll try with git send-email next time.

Best,

Willy Tu


On Fri, Oct 21, 2022 at 9:24 AM Michael Opdenacker <
michael.opdenacker@bootlin.com> wrote:

> Hi Willy
>
> Thanks for the patch!
>
> On 10/21/22 15:17, Willy Tu via lists.openembedded.org wrote:
> > Install API only if opensshinternals is in DISTRO_FEATURES.
> > Install the OpenSSH header + lib files for other repo to build using it.
> > For example, https://github.com/google/hiba is dependent on those files
> > to build and this change is needed to meet that requirement.
> > https://github.com/openembedded/meta-openembedded/pull/597
> > Signed-off-by: Willy Tu <wltu@google.com>
> > ---
> >  meta/recipes-connectivity/openssh/openssh_9.0p1.bb | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
>
>
> There's a problem with the way you send your patches though. I used to
> have it too.
>
> If I apply your patch through "git am", the author of the commit will be:
> Willy Tu via lists.openembedded.org <wltu=
> google.com@lists.openembedded.org>
> instead of
> Willy Tu <wltu@google.com>
>
> Because of this issue, the maintainer has to manually fix this field
> when accepting your patch. Worse, if he doesn't catch this, that's
> harder to fix afterwards.
>
> You should be able to fix this by running:
>
> git config --global sendemail.from "wltu@google.com"
> This should add a "From" field to the sent patch which "git am" should
> be able to match with your name.
>
> At least this worked for me. See
>
> https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Sending_using_git-send-email
>
> Could you try to send an update? You could send it to me again through
> private-email first.
>
> Thanks in advance
> Michael.
>
> --
> Michael Opdenacker, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
Willy Tu Oct. 24, 2022, 2:38 p.m. UTC | #6
Adding +Tristan Lelong <tlelong@google.com> for visibility and comment on
any concern.

On Mon, Oct 24, 2022 at 7:27 AM Willy Tu via lists.openembedded.org <wltu=
google.com@lists.openembedded.org> wrote:

> Hi Michael,
>
> Thanks for the response. Sorry for the delay. I must have missed the email
> when I was setting up the filters. I have sent the patch directly to you
> privately to see if that works.
>
> As for
> ```
> git config --global sendemail.from "wltu@google.com"
> ```
> ,
>
> I think I already have to setup properly
> ```
> $ git config --global sendemail.from
> Willy Tu <wltu@google.com>
> ```
>
> I believe the issue is because I created the topic directly with
> https://lists.openembedded.org/g/openembedded-core/post. Instead with git
> email and it filtered out the email from there for some reason. I should
> probably just send the email through git instead. I did with the web UI
> because I wasn't able to get my message show up before. Sorry for the
> confusion. I'll try with git send-email next time.
>
> Best,
>
> Willy Tu
>
>
> On Fri, Oct 21, 2022 at 9:24 AM Michael Opdenacker <
> michael.opdenacker@bootlin.com> wrote:
>
>> Hi Willy
>>
>> Thanks for the patch!
>>
>> On 10/21/22 15:17, Willy Tu via lists.openembedded.org wrote:
>> > Install API only if opensshinternals is in DISTRO_FEATURES.
>> > Install the OpenSSH header + lib files for other repo to build using it.
>> > For example, https://github.com/google/hiba is dependent on those files
>> > to build and this change is needed to meet that requirement.
>> > https://github.com/openembedded/meta-openembedded/pull/597
>> > Signed-off-by: Willy Tu <wltu@google.com>
>> > ---
>> >  meta/recipes-connectivity/openssh/openssh_9.0p1.bb | 11 +++++++++++
>> >  1 file changed, 11 insertions(+)
>>
>>
>> There's a problem with the way you send your patches though. I used to
>> have it too.
>>
>> If I apply your patch through "git am", the author of the commit will be:
>> Willy Tu via lists.openembedded.org <wltu=
>> google.com@lists.openembedded.org>
>> instead of
>> Willy Tu <wltu@google.com>
>>
>> Because of this issue, the maintainer has to manually fix this field
>> when accepting your patch. Worse, if he doesn't catch this, that's
>> harder to fix afterwards.
>>
>> You should be able to fix this by running:
>>
>> git config --global sendemail.from "wltu@google.com"
>> This should add a "From" field to the sent patch which "git am" should
>> be able to match with your name.
>>
>> At least this worked for me. See
>>
>> https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Sending_using_git-send-email
>>
>> Could you try to send an update? You could send it to me again through
>> private-email first.
>>
>> Thanks in advance
>> Michael.
>>
>> --
>> Michael Opdenacker, Bootlin
>> Embedded Linux and Kernel engineering
>> https://bootlin.com
>>
>>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#172098):
> https://lists.openembedded.org/g/openembedded-core/message/172098
> Mute This Topic: https://lists.openembedded.org/mt/94475279/6858837
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> wltu@google.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Willy Tu Oct. 24, 2022, 4:04 p.m. UTC | #7
I am testing it out again and it seems like it does install to the target .

```
$ find -name libssh.a
./tmp/sysroots-components/armv7a/openssh/usr/lib/libssh.a
./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/image/usr/lib/libssh.a
./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/sysroot-destdir/usr/lib/libssh.a
./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/packages-split/openssh-staticdev/usr/lib/libssh.a
./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/openssh-9.0p1/libssh.a
./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/package/usr/lib/libssh.a
./tmp/work/armv7a-openbmc-linux-gnueabi/hiba/1.0+gitAUTOINC+3199239c6a-r0/recipe-sysroot/usr/lib/libssh.a
```
We don't want this, right?

I'll have to try to figure it out and fix it.

Willy Tu

On Mon, Oct 24, 2022 at 7:57 AM Tristan Lelong <tlelong@google.com> wrote:

>
>
> On Fri, Oct 21, 2022 at 6:22 PM Willy Tu <wltu@google.com> wrote:
>
>> Hi Ross,
>>
>> Thanks for the feedback.
>>
>> Can you point to the right repo to update? Just to make sure that I
>> understand the concern, you are not referring to
>> https://github.com/openembedded/meta-openembedded/pull/597, right? I am
>> making changes to
>> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh_9.0p1.bb which
>> I thought is part of oe-core.
>>
>> @Tristan Lelong <tlelong@google.com> is the maintainer for hiba and is
>> okay with the change. Do you have any suggestions on installing it to just
>> the sysroot in openssh while using it from the hiba recipe? I was not able
>> to do that when I tried it.
>>
>
> This was indeed discussed previously in another version of the patch, it
> seemed the best way to expose OpenSSH's internal files was via the devel
> package (not installed on the target), rather than hook into another
> package's syroot.
>
> The OpenSSH static libraries and header files are currently not made
> officially available because the API is not considered stable enough, but
> exporting them in OE for HIBA (gated by a PACKAGECONFIG) in order to
> support HIBA is fine.
>
>
>>
>> Thanks,
>>
>> Willy Tu
>>
>>
>>
>>
>> On Fri, Oct 21, 2022 at 7:59 AM Ross Burton <Ross.Burton@arm.com> wrote:
>>
>>> Hi,
>>>
>>> oe-core doesn’t accept merge requests on the github mirrors, and you
>>> pushed to meta-oe, which is a different repository.
>>>
>>> >> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals',
>>> 'true', 'false', d)}; then
>>>
>>> This should be a PACKAGECONFIG, as it’s not a distro-wide setting.
>>>
>>> >> + install -d ${D}${includedir}/ssh
>>> >> + install -d ${D}${includedir}/ssh/openbsd-compat
>>> >> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
>>> >> + install -m0644 ${S}/openbsd-compat/*.h
>>> ${D}${includedir}/ssh/openbsd-compat
>>> >> +
>>> >> + install -d ${D}${libdir}
>>> >> + install -m0644 ${S}/libssh.a ${D}${libdir}
>>> >> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
>>> >> + fi
>>>
>>> So you’re installing bits of the SSH source into the *target* packages
>>> because one piece of software needs the build tree. This is clearly an
>>> unsupported use of openssh, as the hiba build instructions literally say
>>> “build openssh, then point hiba’s configure at that build tree”.  If
>>>
>>> I suggest a better approach would be to have a bbappend in your layer
>>> which adds the files you need to *just the sysroot*, so the target packages
>>> are unaltered.
>>>
>>> Ross
>>
>>
>
> --
> Tristan Lelong | SRE | tlelong@google.com |
>
Willy Tu Oct. 24, 2022, 5:07 p.m. UTC | #8
Testing it out more and it seems like the current change is fine in that
regard.

I was building it against an OpenBMC image which include the change and the
header and libssh.a files doesn't show up in the image itself

```
./tmp/work/izumi-openbmc-linux-gnueabi/obmc-phosphor-image
```
doesn't have those files. I believe that's what we are looking for?

Willy Tu

On Mon, Oct 24, 2022 at 9:05 AM Willy Tu via lists.openembedded.org <wltu=
google.com@lists.openembedded.org> wrote:

> I am testing it out again and it seems like it does install to the target .
>
> ```
> $ find -name libssh.a
> ./tmp/sysroots-components/armv7a/openssh/usr/lib/libssh.a
>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/image/usr/lib/libssh.a
>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/sysroot-destdir/usr/lib/libssh.a
>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/packages-split/openssh-staticdev/usr/lib/libssh.a
>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/openssh-9.0p1/libssh.a
>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/package/usr/lib/libssh.a
>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/hiba/1.0+gitAUTOINC+3199239c6a-r0/recipe-sysroot/usr/lib/libssh.a
> ```
> We don't want this, right?
>
> I'll have to try to figure it out and fix it.
>
> Willy Tu
>
> On Mon, Oct 24, 2022 at 7:57 AM Tristan Lelong <tlelong@google.com> wrote:
>
>>
>>
>> On Fri, Oct 21, 2022 at 6:22 PM Willy Tu <wltu@google.com> wrote:
>>
>>> Hi Ross,
>>>
>>> Thanks for the feedback.
>>>
>>> Can you point to the right repo to update? Just to make sure that I
>>> understand the concern, you are not referring to
>>> https://github.com/openembedded/meta-openembedded/pull/597, right? I am
>>> making changes to
>>> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh_9.0p1.bb which
>>> I thought is part of oe-core.
>>>
>>> @Tristan Lelong <tlelong@google.com> is the maintainer for hiba and is
>>> okay with the change. Do you have any suggestions on installing it to just
>>> the sysroot in openssh while using it from the hiba recipe? I was not able
>>> to do that when I tried it.
>>>
>>
>> This was indeed discussed previously in another version of the patch, it
>> seemed the best way to expose OpenSSH's internal files was via the devel
>> package (not installed on the target), rather than hook into another
>> package's syroot.
>>
>> The OpenSSH static libraries and header files are currently not made
>> officially available because the API is not considered stable enough, but
>> exporting them in OE for HIBA (gated by a PACKAGECONFIG) in order to
>> support HIBA is fine.
>>
>>
>>>
>>> Thanks,
>>>
>>> Willy Tu
>>>
>>>
>>>
>>>
>>> On Fri, Oct 21, 2022 at 7:59 AM Ross Burton <Ross.Burton@arm.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> oe-core doesn’t accept merge requests on the github mirrors, and you
>>>> pushed to meta-oe, which is a different repository.
>>>>
>>>> >> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals',
>>>> 'true', 'false', d)}; then
>>>>
>>>> This should be a PACKAGECONFIG, as it’s not a distro-wide setting.
>>>>
>>>> >> + install -d ${D}${includedir}/ssh
>>>> >> + install -d ${D}${includedir}/ssh/openbsd-compat
>>>> >> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
>>>> >> + install -m0644 ${S}/openbsd-compat/*.h
>>>> ${D}${includedir}/ssh/openbsd-compat
>>>> >> +
>>>> >> + install -d ${D}${libdir}
>>>> >> + install -m0644 ${S}/libssh.a ${D}${libdir}
>>>> >> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a
>>>> ${D}${libdir}
>>>> >> + fi
>>>>
>>>> So you’re installing bits of the SSH source into the *target* packages
>>>> because one piece of software needs the build tree. This is clearly an
>>>> unsupported use of openssh, as the hiba build instructions literally say
>>>> “build openssh, then point hiba’s configure at that build tree”.  If
>>>>
>>>> I suggest a better approach would be to have a bbappend in your layer
>>>> which adds the files you need to *just the sysroot*, so the target packages
>>>> are unaltered.
>>>>
>>>> Ross
>>>
>>>
>>
>> --
>> Tristan Lelong | SRE | tlelong@google.com |
>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#172110):
> https://lists.openembedded.org/g/openembedded-core/message/172110
> Mute This Topic: https://lists.openembedded.org/mt/94475279/6858837
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> wltu@google.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Willy Tu Oct. 31, 2022, 3:42 p.m. UTC | #9
Friendly ping. Is there any more concern on this?

Willy Tu


On Mon, Oct 24, 2022 at 10:07 AM Willy Tu via lists.openembedded.org
<wltu=google.com@lists.openembedded.org> wrote:
>
> Testing it out more and it seems like the current change is fine in that regard.
>
> I was building it against an OpenBMC image which include the change and the header and libssh.a files doesn't show up in the image itself
>
> ```
> ./tmp/work/izumi-openbmc-linux-gnueabi/obmc-phosphor-image
> ```
> doesn't have those files. I believe that's what we are looking for?
>
> Willy Tu
>
> On Mon, Oct 24, 2022 at 9:05 AM Willy Tu via lists.openembedded.org <wltu=google.com@lists.openembedded.org> wrote:
>>
>> I am testing it out again and it seems like it does install to the target .
>>
>> ```
>> $ find -name libssh.a
>> ./tmp/sysroots-components/armv7a/openssh/usr/lib/libssh.a
>> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/image/usr/lib/libssh.a
>> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/sysroot-destdir/usr/lib/libssh.a
>> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/packages-split/openssh-staticdev/usr/lib/libssh.a
>> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/openssh-9.0p1/libssh.a
>> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/package/usr/lib/libssh.a
>> ./tmp/work/armv7a-openbmc-linux-gnueabi/hiba/1.0+gitAUTOINC+3199239c6a-r0/recipe-sysroot/usr/lib/libssh.a
>> ```
>> We don't want this, right?
>>
>> I'll have to try to figure it out and fix it.
>>
>> Willy Tu
>>
>> On Mon, Oct 24, 2022 at 7:57 AM Tristan Lelong <tlelong@google.com> wrote:
>>>
>>>
>>>
>>> On Fri, Oct 21, 2022 at 6:22 PM Willy Tu <wltu@google.com> wrote:
>>>>
>>>> Hi Ross,
>>>>
>>>> Thanks for the feedback.
>>>>
>>>> Can you point to the right repo to update? Just to make sure that I understand the concern, you are not referring to https://github.com/openembedded/meta-openembedded/pull/597, right? I am making changes to http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh_9.0p1.bb which I thought is part of oe-core.
>>>>
>>>> @Tristan Lelong is the maintainer for hiba and is okay with the change. Do you have any suggestions on installing it to just the sysroot in openssh while using it from the hiba recipe? I was not able to do that when I tried it.
>>>
>>>
>>> This was indeed discussed previously in another version of the patch, it seemed the best way to expose OpenSSH's internal files was via the devel package (not installed on the target), rather than hook into another package's syroot.
>>>
>>> The OpenSSH static libraries and header files are currently not made officially available because the API is not considered stable enough, but exporting them in OE for HIBA (gated by a PACKAGECONFIG) in order to support HIBA is fine.
>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Willy Tu
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Oct 21, 2022 at 7:59 AM Ross Burton <Ross.Burton@arm.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> oe-core doesn’t accept merge requests on the github mirrors, and you pushed to meta-oe, which is a different repository.
>>>>>
>>>>> >> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals', 'true', 'false', d)}; then
>>>>>
>>>>> This should be a PACKAGECONFIG, as it’s not a distro-wide setting.
>>>>>
>>>>> >> + install -d ${D}${includedir}/ssh
>>>>> >> + install -d ${D}${includedir}/ssh/openbsd-compat
>>>>> >> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
>>>>> >> + install -m0644 ${S}/openbsd-compat/*.h ${D}${includedir}/ssh/openbsd-compat
>>>>> >> +
>>>>> >> + install -d ${D}${libdir}
>>>>> >> + install -m0644 ${S}/libssh.a ${D}${libdir}
>>>>> >> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
>>>>> >> + fi
>>>>>
>>>>> So you’re installing bits of the SSH source into the *target* packages because one piece of software needs the build tree. This is clearly an unsupported use of openssh, as the hiba build instructions literally say “build openssh, then point hiba’s configure at that build tree”.  If
>>>>>
>>>>> I suggest a better approach would be to have a bbappend in your layer which adds the files you need to *just the sysroot*, so the target packages are unaltered.
>>>>>
>>>>> Ross
>>>
>>>
>>>
>>> --
>>> Tristan Lelong | SRE | tlelong@google.com |
>>
>>
>>
>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#172111): https://lists.openembedded.org/g/openembedded-core/message/172111
> Mute This Topic: https://lists.openembedded.org/mt/94475279/6858837
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [wltu@google.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Willy Tu Nov. 8, 2022, 4:23 p.m. UTC | #10
Is there anything else that I need to do to help move this forward?

Willy Tu

On Mon, Oct 31, 2022 at 8:42 AM Willy Tu via lists.openembedded.org <wltu=
google.com@lists.openembedded.org> wrote:

> Friendly ping. Is there any more concern on this?
>
> Willy Tu
>
>
> On Mon, Oct 24, 2022 at 10:07 AM Willy Tu via lists.openembedded.org
> <wltu=google.com@lists.openembedded.org> wrote:
> >
> > Testing it out more and it seems like the current change is fine in that
> regard.
> >
> > I was building it against an OpenBMC image which include the change and
> the header and libssh.a files doesn't show up in the image itself
> >
> > ```
> > ./tmp/work/izumi-openbmc-linux-gnueabi/obmc-phosphor-image
> > ```
> > doesn't have those files. I believe that's what we are looking for?
> >
> > Willy Tu
> >
> > On Mon, Oct 24, 2022 at 9:05 AM Willy Tu via lists.openembedded.org
> <wltu=google.com@lists.openembedded.org> wrote:
> >>
> >> I am testing it out again and it seems like it does install to the
> target .
> >>
> >> ```
> >> $ find -name libssh.a
> >> ./tmp/sysroots-components/armv7a/openssh/usr/lib/libssh.a
> >>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/image/usr/lib/libssh.a
> >>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/sysroot-destdir/usr/lib/libssh.a
> >>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/packages-split/openssh-staticdev/usr/lib/libssh.a
> >>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/openssh-9.0p1/libssh.a
> >>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/package/usr/lib/libssh.a
> >>
> ./tmp/work/armv7a-openbmc-linux-gnueabi/hiba/1.0+gitAUTOINC+3199239c6a-r0/recipe-sysroot/usr/lib/libssh.a
> >> ```
> >> We don't want this, right?
> >>
> >> I'll have to try to figure it out and fix it.
> >>
> >> Willy Tu
> >>
> >> On Mon, Oct 24, 2022 at 7:57 AM Tristan Lelong <tlelong@google.com>
> wrote:
> >>>
> >>>
> >>>
> >>> On Fri, Oct 21, 2022 at 6:22 PM Willy Tu <wltu@google.com> wrote:
> >>>>
> >>>> Hi Ross,
> >>>>
> >>>> Thanks for the feedback.
> >>>>
> >>>> Can you point to the right repo to update? Just to make sure that I
> understand the concern, you are not referring to
> https://github.com/openembedded/meta-openembedded/pull/597, right? I am
> making changes to
> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
> which I thought is part of oe-core.
> >>>>
> >>>> @Tristan Lelong is the maintainer for hiba and is okay with the
> change. Do you have any suggestions on installing it to just the sysroot in
> openssh while using it from the hiba recipe? I was not able to do that when
> I tried it.
> >>>
> >>>
> >>> This was indeed discussed previously in another version of the patch,
> it seemed the best way to expose OpenSSH's internal files was via the devel
> package (not installed on the target), rather than hook into another
> package's syroot.
> >>>
> >>> The OpenSSH static libraries and header files are currently not made
> officially available because the API is not considered stable enough, but
> exporting them in OE for HIBA (gated by a PACKAGECONFIG) in order to
> support HIBA is fine.
> >>>
> >>>>
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Willy Tu
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Fri, Oct 21, 2022 at 7:59 AM Ross Burton <Ross.Burton@arm.com>
> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> oe-core doesn’t accept merge requests on the github mirrors, and you
> pushed to meta-oe, which is a different repository.
> >>>>>
> >>>>> >> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals',
> 'true', 'false', d)}; then
> >>>>>
> >>>>> This should be a PACKAGECONFIG, as it’s not a distro-wide setting.
> >>>>>
> >>>>> >> + install -d ${D}${includedir}/ssh
> >>>>> >> + install -d ${D}${includedir}/ssh/openbsd-compat
> >>>>> >> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
> >>>>> >> + install -m0644 ${S}/openbsd-compat/*.h
> ${D}${includedir}/ssh/openbsd-compat
> >>>>> >> +
> >>>>> >> + install -d ${D}${libdir}
> >>>>> >> + install -m0644 ${S}/libssh.a ${D}${libdir}
> >>>>> >> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a
> ${D}${libdir}
> >>>>> >> + fi
> >>>>>
> >>>>> So you’re installing bits of the SSH source into the *target*
> packages because one piece of software needs the build tree. This is
> clearly an unsupported use of openssh, as the hiba build instructions
> literally say “build openssh, then point hiba’s configure at that build
> tree”.  If
> >>>>>
> >>>>> I suggest a better approach would be to have a bbappend in your
> layer which adds the files you need to *just the sysroot*, so the target
> packages are unaltered.
> >>>>>
> >>>>> Ross
> >>>
> >>>
> >>>
> >>> --
> >>> Tristan Lelong | SRE | tlelong@google.com |
> >>
> >>
> >>
> >>
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#172324):
> https://lists.openembedded.org/g/openembedded-core/message/172324
> Mute This Topic: https://lists.openembedded.org/mt/94475279/6858837
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> wltu@google.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Alexander Kanavin Nov. 8, 2022, 4:27 p.m. UTC | #11
The correct way to do this is to discuss the issue with openssh
upstream, and provide a link to any such discussion if it has already
happened. If they don't want to install these things, they have
reasons, and you need to at least try to convince them otherwise.

We generally do not go against upstream choices.

Alex

On Tue, 8 Nov 2022 at 17:23, Willy Tu via lists.openembedded.org
<wltu=google.com@lists.openembedded.org> wrote:
>
> Is there anything else that I need to do to help move this forward?
>
> Willy Tu
>
> On Mon, Oct 31, 2022 at 8:42 AM Willy Tu via lists.openembedded.org <wltu=google.com@lists.openembedded.org> wrote:
>>
>> Friendly ping. Is there any more concern on this?
>>
>> Willy Tu
>>
>>
>> On Mon, Oct 24, 2022 at 10:07 AM Willy Tu via lists.openembedded.org
>> <wltu=google.com@lists.openembedded.org> wrote:
>> >
>> > Testing it out more and it seems like the current change is fine in that regard.
>> >
>> > I was building it against an OpenBMC image which include the change and the header and libssh.a files doesn't show up in the image itself
>> >
>> > ```
>> > ./tmp/work/izumi-openbmc-linux-gnueabi/obmc-phosphor-image
>> > ```
>> > doesn't have those files. I believe that's what we are looking for?
>> >
>> > Willy Tu
>> >
>> > On Mon, Oct 24, 2022 at 9:05 AM Willy Tu via lists.openembedded.org <wltu=google.com@lists.openembedded.org> wrote:
>> >>
>> >> I am testing it out again and it seems like it does install to the target .
>> >>
>> >> ```
>> >> $ find -name libssh.a
>> >> ./tmp/sysroots-components/armv7a/openssh/usr/lib/libssh.a
>> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/image/usr/lib/libssh.a
>> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/sysroot-destdir/usr/lib/libssh.a
>> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/packages-split/openssh-staticdev/usr/lib/libssh.a
>> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/openssh-9.0p1/libssh.a
>> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/package/usr/lib/libssh.a
>> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/hiba/1.0+gitAUTOINC+3199239c6a-r0/recipe-sysroot/usr/lib/libssh.a
>> >> ```
>> >> We don't want this, right?
>> >>
>> >> I'll have to try to figure it out and fix it.
>> >>
>> >> Willy Tu
>> >>
>> >> On Mon, Oct 24, 2022 at 7:57 AM Tristan Lelong <tlelong@google.com> wrote:
>> >>>
>> >>>
>> >>>
>> >>> On Fri, Oct 21, 2022 at 6:22 PM Willy Tu <wltu@google.com> wrote:
>> >>>>
>> >>>> Hi Ross,
>> >>>>
>> >>>> Thanks for the feedback.
>> >>>>
>> >>>> Can you point to the right repo to update? Just to make sure that I understand the concern, you are not referring to https://github.com/openembedded/meta-openembedded/pull/597, right? I am making changes to http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh_9.0p1.bb which I thought is part of oe-core.
>> >>>>
>> >>>> @Tristan Lelong is the maintainer for hiba and is okay with the change. Do you have any suggestions on installing it to just the sysroot in openssh while using it from the hiba recipe? I was not able to do that when I tried it.
>> >>>
>> >>>
>> >>> This was indeed discussed previously in another version of the patch, it seemed the best way to expose OpenSSH's internal files was via the devel package (not installed on the target), rather than hook into another package's syroot.
>> >>>
>> >>> The OpenSSH static libraries and header files are currently not made officially available because the API is not considered stable enough, but exporting them in OE for HIBA (gated by a PACKAGECONFIG) in order to support HIBA is fine.
>> >>>
>> >>>>
>> >>>>
>> >>>> Thanks,
>> >>>>
>> >>>> Willy Tu
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Fri, Oct 21, 2022 at 7:59 AM Ross Burton <Ross.Burton@arm.com> wrote:
>> >>>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>> oe-core doesn’t accept merge requests on the github mirrors, and you pushed to meta-oe, which is a different repository.
>> >>>>>
>> >>>>> >> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals', 'true', 'false', d)}; then
>> >>>>>
>> >>>>> This should be a PACKAGECONFIG, as it’s not a distro-wide setting.
>> >>>>>
>> >>>>> >> + install -d ${D}${includedir}/ssh
>> >>>>> >> + install -d ${D}${includedir}/ssh/openbsd-compat
>> >>>>> >> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
>> >>>>> >> + install -m0644 ${S}/openbsd-compat/*.h ${D}${includedir}/ssh/openbsd-compat
>> >>>>> >> +
>> >>>>> >> + install -d ${D}${libdir}
>> >>>>> >> + install -m0644 ${S}/libssh.a ${D}${libdir}
>> >>>>> >> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
>> >>>>> >> + fi
>> >>>>>
>> >>>>> So you’re installing bits of the SSH source into the *target* packages because one piece of software needs the build tree. This is clearly an unsupported use of openssh, as the hiba build instructions literally say “build openssh, then point hiba’s configure at that build tree”.  If
>> >>>>>
>> >>>>> I suggest a better approach would be to have a bbappend in your layer which adds the files you need to *just the sysroot*, so the target packages are unaltered.
>> >>>>>
>> >>>>> Ross
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Tristan Lelong | SRE | tlelong@google.com |
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#172975): https://lists.openembedded.org/g/openembedded-core/message/172975
> Mute This Topic: https://lists.openembedded.org/mt/94475279/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Willy Tu Nov. 8, 2022, 5:08 p.m. UTC | #12
Thanks Alexander for the feedback,

We had some discussion internally with one of the OpenSSH maintainers
and they are fine with it. I'll try to see if there is a public forum
where we can share the discussion.

Willy Tu


On Tue, Nov 8, 2022 at 8:27 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> The correct way to do this is to discuss the issue with openssh
> upstream, and provide a link to any such discussion if it has already
> happened. If they don't want to install these things, they have
> reasons, and you need to at least try to convince them otherwise.
>
> We generally do not go against upstream choices.
>
> Alex
>
> On Tue, 8 Nov 2022 at 17:23, Willy Tu via lists.openembedded.org
> <wltu=google.com@lists.openembedded.org> wrote:
> >
> > Is there anything else that I need to do to help move this forward?
> >
> > Willy Tu
> >
> > On Mon, Oct 31, 2022 at 8:42 AM Willy Tu via lists.openembedded.org <wltu=google.com@lists.openembedded.org> wrote:
> >>
> >> Friendly ping. Is there any more concern on this?
> >>
> >> Willy Tu
> >>
> >>
> >> On Mon, Oct 24, 2022 at 10:07 AM Willy Tu via lists.openembedded.org
> >> <wltu=google.com@lists.openembedded.org> wrote:
> >> >
> >> > Testing it out more and it seems like the current change is fine in that regard.
> >> >
> >> > I was building it against an OpenBMC image which include the change and the header and libssh.a files doesn't show up in the image itself
> >> >
> >> > ```
> >> > ./tmp/work/izumi-openbmc-linux-gnueabi/obmc-phosphor-image
> >> > ```
> >> > doesn't have those files. I believe that's what we are looking for?
> >> >
> >> > Willy Tu
> >> >
> >> > On Mon, Oct 24, 2022 at 9:05 AM Willy Tu via lists.openembedded.org <wltu=google.com@lists.openembedded.org> wrote:
> >> >>
> >> >> I am testing it out again and it seems like it does install to the target .
> >> >>
> >> >> ```
> >> >> $ find -name libssh.a
> >> >> ./tmp/sysroots-components/armv7a/openssh/usr/lib/libssh.a
> >> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/image/usr/lib/libssh.a
> >> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/sysroot-destdir/usr/lib/libssh.a
> >> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/packages-split/openssh-staticdev/usr/lib/libssh.a
> >> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/openssh-9.0p1/libssh.a
> >> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/openssh/9.0p1-r0/package/usr/lib/libssh.a
> >> >> ./tmp/work/armv7a-openbmc-linux-gnueabi/hiba/1.0+gitAUTOINC+3199239c6a-r0/recipe-sysroot/usr/lib/libssh.a
> >> >> ```
> >> >> We don't want this, right?
> >> >>
> >> >> I'll have to try to figure it out and fix it.
> >> >>
> >> >> Willy Tu
> >> >>
> >> >> On Mon, Oct 24, 2022 at 7:57 AM Tristan Lelong <tlelong@google.com> wrote:
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Fri, Oct 21, 2022 at 6:22 PM Willy Tu <wltu@google.com> wrote:
> >> >>>>
> >> >>>> Hi Ross,
> >> >>>>
> >> >>>> Thanks for the feedback.
> >> >>>>
> >> >>>> Can you point to the right repo to update? Just to make sure that I understand the concern, you are not referring to https://github.com/openembedded/meta-openembedded/pull/597, right? I am making changes to http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh_9.0p1.bb which I thought is part of oe-core.
> >> >>>>
> >> >>>> @Tristan Lelong is the maintainer for hiba and is okay with the change. Do you have any suggestions on installing it to just the sysroot in openssh while using it from the hiba recipe? I was not able to do that when I tried it.
> >> >>>
> >> >>>
> >> >>> This was indeed discussed previously in another version of the patch, it seemed the best way to expose OpenSSH's internal files was via the devel package (not installed on the target), rather than hook into another package's syroot.
> >> >>>
> >> >>> The OpenSSH static libraries and header files are currently not made officially available because the API is not considered stable enough, but exporting them in OE for HIBA (gated by a PACKAGECONFIG) in order to support HIBA is fine.
> >> >>>
> >> >>>>
> >> >>>>
> >> >>>> Thanks,
> >> >>>>
> >> >>>> Willy Tu
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>> On Fri, Oct 21, 2022 at 7:59 AM Ross Burton <Ross.Burton@arm.com> wrote:
> >> >>>>>
> >> >>>>> Hi,
> >> >>>>>
> >> >>>>> oe-core doesn’t accept merge requests on the github mirrors, and you pushed to meta-oe, which is a different repository.
> >> >>>>>
> >> >>>>> >> + if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals', 'true', 'false', d)}; then
> >> >>>>>
> >> >>>>> This should be a PACKAGECONFIG, as it’s not a distro-wide setting.
> >> >>>>>
> >> >>>>> >> + install -d ${D}${includedir}/ssh
> >> >>>>> >> + install -d ${D}${includedir}/ssh/openbsd-compat
> >> >>>>> >> + install -m0644 ${S}/*.h ${D}${includedir}/ssh
> >> >>>>> >> + install -m0644 ${S}/openbsd-compat/*.h ${D}${includedir}/ssh/openbsd-compat
> >> >>>>> >> +
> >> >>>>> >> + install -d ${D}${libdir}
> >> >>>>> >> + install -m0644 ${S}/libssh.a ${D}${libdir}
> >> >>>>> >> + install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
> >> >>>>> >> + fi
> >> >>>>>
> >> >>>>> So you’re installing bits of the SSH source into the *target* packages because one piece of software needs the build tree. This is clearly an unsupported use of openssh, as the hiba build instructions literally say “build openssh, then point hiba’s configure at that build tree”.  If
> >> >>>>>
> >> >>>>> I suggest a better approach would be to have a bbappend in your layer which adds the files you need to *just the sysroot*, so the target packages are unaltered.
> >> >>>>>
> >> >>>>> Ross
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Tristan Lelong | SRE | tlelong@google.com |
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#172975): https://lists.openembedded.org/g/openembedded-core/message/172975
> > Mute This Topic: https://lists.openembedded.org/mt/94475279/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Alexander Kanavin Nov. 8, 2022, 5:11 p.m. UTC | #13
On Tue, 8 Nov 2022 at 18:08, Willy Tu <wltu@google.com> wrote:
>
> Thanks Alexander for the feedback,
>
> We had some discussion internally with one of the OpenSSH maintainers
> and they are fine with it. I'll try to see if there is a public forum
> where we can share the discussion.

If they are fine with it, then you need to submit a patch to openssh
that installs the needed pieces (perhaps subject to a configure
switch), get it accepted, and then add a backport to oe-core, in that
order. No do_install_append hacks please.

Alex
Willy Tu Nov. 8, 2022, 5:16 p.m. UTC | #14
I think they are fine with the hack here. oops. Ok, I'll work with
them to get the fix without this change.

Thanks for the feedback.

Willy Tu


On Tue, Nov 8, 2022 at 9:12 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> On Tue, 8 Nov 2022 at 18:08, Willy Tu <wltu@google.com> wrote:
> >
> > Thanks Alexander for the feedback,
> >
> > We had some discussion internally with one of the OpenSSH maintainers
> > and they are fine with it. I'll try to see if there is a public forum
> > where we can share the discussion.
>
> If they are fine with it, then you need to submit a patch to openssh
> that installs the needed pieces (perhaps subject to a configure
> switch), get it accepted, and then add a backport to oe-core, in that
> order. No do_install_append hacks please.
>
> Alex
Alexander Kanavin Nov. 8, 2022, 7:21 p.m. UTC | #15
I'd rather have this hidden in your recipes, yes. It's clearly a
special needs issue, and something you shouldn't ask us to maintain
for you (what I mean is that you're not going to rebase the patch when
a new openssh version is out, or adjust do_install - this falls on
usually me, and my time to do these ever-growing maintenance things is
not infinite).

Alex


On Tue, 8 Nov 2022 at 20:12, Tristan Lelong <tlelong@google.com> wrote:
>
> To be clear: OpenSSH maintainer will not accept a patch that exposes these files in the upstream version, but we got confirmation that they were ok if we maintained such a patch in OE (or a custom do_install in the recipe).
>
> If this solution is not acceptable from the OE maintainers point of view, the next option is to update the HIBA recipe to fetch OpenSSH sources on top of HIBA sources directly in HIBA's workdir, and use these instead of the one from sysroot.
>
> Would this work better for you?
>
> On Tue, Nov 8, 2022, 18:16 Willy Tu <wltu@google.com> wrote:
>>
>> I think they are fine with the hack here. oops. Ok, I'll work with
>> them to get the fix without this change.
>>
>> Thanks for the feedback.
>>
>> Willy Tu
>>
>>
>> On Tue, Nov 8, 2022 at 9:12 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>> >
>> > On Tue, 8 Nov 2022 at 18:08, Willy Tu <wltu@google.com> wrote:
>> > >
>> > > Thanks Alexander for the feedback,
>> > >
>> > > We had some discussion internally with one of the OpenSSH maintainers
>> > > and they are fine with it. I'll try to see if there is a public forum
>> > > where we can share the discussion.
>> >
>> > If they are fine with it, then you need to submit a patch to openssh
>> > that installs the needed pieces (perhaps subject to a configure
>> > switch), get it accepted, and then add a backport to oe-core, in that
>> > order. No do_install_append hacks please.
>> >
>> > Alex
Alexander Kanavin Nov. 8, 2022, 7:25 p.m. UTC | #16
Actually, you don't need to do this in HIBA - a bbappend to openssh will do.

Alex

On Tue, 8 Nov 2022 at 20:21, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:
>
> I'd rather have this hidden in your recipes, yes. It's clearly a
> special needs issue, and something you shouldn't ask us to maintain
> for you (what I mean is that you're not going to rebase the patch when
> a new openssh version is out, or adjust do_install - this falls on
> usually me, and my time to do these ever-growing maintenance things is
> not infinite).
>
> Alex
>
>
> On Tue, 8 Nov 2022 at 20:12, Tristan Lelong <tlelong@google.com> wrote:
> >
> > To be clear: OpenSSH maintainer will not accept a patch that exposes these files in the upstream version, but we got confirmation that they were ok if we maintained such a patch in OE (or a custom do_install in the recipe).
> >
> > If this solution is not acceptable from the OE maintainers point of view, the next option is to update the HIBA recipe to fetch OpenSSH sources on top of HIBA sources directly in HIBA's workdir, and use these instead of the one from sysroot.
> >
> > Would this work better for you?
> >
> > On Tue, Nov 8, 2022, 18:16 Willy Tu <wltu@google.com> wrote:
> >>
> >> I think they are fine with the hack here. oops. Ok, I'll work with
> >> them to get the fix without this change.
> >>
> >> Thanks for the feedback.
> >>
> >> Willy Tu
> >>
> >>
> >> On Tue, Nov 8, 2022 at 9:12 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
> >> >
> >> > On Tue, 8 Nov 2022 at 18:08, Willy Tu <wltu@google.com> wrote:
> >> > >
> >> > > Thanks Alexander for the feedback,
> >> > >
> >> > > We had some discussion internally with one of the OpenSSH maintainers
> >> > > and they are fine with it. I'll try to see if there is a public forum
> >> > > where we can share the discussion.
> >> >
> >> > If they are fine with it, then you need to submit a patch to openssh
> >> > that installs the needed pieces (perhaps subject to a configure
> >> > switch), get it accepted, and then add a backport to oe-core, in that
> >> > order. No do_install_append hacks please.
> >> >
> >> > Alex
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#172992): https://lists.openembedded.org/g/openembedded-core/message/172992
> Mute This Topic: https://lists.openembedded.org/mt/94475279/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Willy Tu Nov. 8, 2022, 7:30 p.m. UTC | #17
So do you suggest adding bbappend in meta-openembedded where
https://github.com/openembedded/meta-openembedded/pull/597 will live?

I'll check with the maintainer there. And Google/hiba users will maintain
that.

Best,

Willy Tu


On Tue, Nov 8, 2022 at 11:25 AM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> Actually, you don't need to do this in HIBA - a bbappend to openssh will
> do.
>
> Alex
>
> On Tue, 8 Nov 2022 at 20:21, Alexander Kanavin via
> lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
> wrote:
> >
> > I'd rather have this hidden in your recipes, yes. It's clearly a
> > special needs issue, and something you shouldn't ask us to maintain
> > for you (what I mean is that you're not going to rebase the patch when
> > a new openssh version is out, or adjust do_install - this falls on
> > usually me, and my time to do these ever-growing maintenance things is
> > not infinite).
> >
> > Alex
> >
> >
> > On Tue, 8 Nov 2022 at 20:12, Tristan Lelong <tlelong@google.com> wrote:
> > >
> > > To be clear: OpenSSH maintainer will not accept a patch that exposes
> these files in the upstream version, but we got confirmation that they were
> ok if we maintained such a patch in OE (or a custom do_install in the
> recipe).
> > >
> > > If this solution is not acceptable from the OE maintainers point of
> view, the next option is to update the HIBA recipe to fetch OpenSSH sources
> on top of HIBA sources directly in HIBA's workdir, and use these instead of
> the one from sysroot.
> > >
> > > Would this work better for you?
> > >
> > > On Tue, Nov 8, 2022, 18:16 Willy Tu <wltu@google.com> wrote:
> > >>
> > >> I think they are fine with the hack here. oops. Ok, I'll work with
> > >> them to get the fix without this change.
> > >>
> > >> Thanks for the feedback.
> > >>
> > >> Willy Tu
> > >>
> > >>
> > >> On Tue, Nov 8, 2022 at 9:12 AM Alexander Kanavin <
> alex.kanavin@gmail.com> wrote:
> > >> >
> > >> > On Tue, 8 Nov 2022 at 18:08, Willy Tu <wltu@google.com> wrote:
> > >> > >
> > >> > > Thanks Alexander for the feedback,
> > >> > >
> > >> > > We had some discussion internally with one of the OpenSSH
> maintainers
> > >> > > and they are fine with it. I'll try to see if there is a public
> forum
> > >> > > where we can share the discussion.
> > >> >
> > >> > If they are fine with it, then you need to submit a patch to openssh
> > >> > that installs the needed pieces (perhaps subject to a configure
> > >> > switch), get it accepted, and then add a backport to oe-core, in
> that
> > >> > order. No do_install_append hacks please.
> > >> >
> > >> > Alex
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#172992):
> https://lists.openembedded.org/g/openembedded-core/message/172992
> > Mute This Topic: https://lists.openembedded.org/mt/94475279/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
Alexander Kanavin Nov. 8, 2022, 7:37 p.m. UTC | #18
Ah, I thought this was in a separate layer. I think you're best off
getting a private copy of openssh sources then.

Alex

On Tue, 8 Nov 2022 at 20:30, Willy Tu <wltu@google.com> wrote:
>
> So do you suggest adding bbappend in meta-openembedded where https://github.com/openembedded/meta-openembedded/pull/597 will live?
>
> I'll check with the maintainer there. And Google/hiba users will maintain that.
>
> Best,
>
> Willy Tu
>
>
> On Tue, Nov 8, 2022 at 11:25 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>>
>> Actually, you don't need to do this in HIBA - a bbappend to openssh will do.
>>
>> Alex
>>
>> On Tue, 8 Nov 2022 at 20:21, Alexander Kanavin via
>> lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
>> wrote:
>> >
>> > I'd rather have this hidden in your recipes, yes. It's clearly a
>> > special needs issue, and something you shouldn't ask us to maintain
>> > for you (what I mean is that you're not going to rebase the patch when
>> > a new openssh version is out, or adjust do_install - this falls on
>> > usually me, and my time to do these ever-growing maintenance things is
>> > not infinite).
>> >
>> > Alex
>> >
>> >
>> > On Tue, 8 Nov 2022 at 20:12, Tristan Lelong <tlelong@google.com> wrote:
>> > >
>> > > To be clear: OpenSSH maintainer will not accept a patch that exposes these files in the upstream version, but we got confirmation that they were ok if we maintained such a patch in OE (or a custom do_install in the recipe).
>> > >
>> > > If this solution is not acceptable from the OE maintainers point of view, the next option is to update the HIBA recipe to fetch OpenSSH sources on top of HIBA sources directly in HIBA's workdir, and use these instead of the one from sysroot.
>> > >
>> > > Would this work better for you?
>> > >
>> > > On Tue, Nov 8, 2022, 18:16 Willy Tu <wltu@google.com> wrote:
>> > >>
>> > >> I think they are fine with the hack here. oops. Ok, I'll work with
>> > >> them to get the fix without this change.
>> > >>
>> > >> Thanks for the feedback.
>> > >>
>> > >> Willy Tu
>> > >>
>> > >>
>> > >> On Tue, Nov 8, 2022 at 9:12 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>> > >> >
>> > >> > On Tue, 8 Nov 2022 at 18:08, Willy Tu <wltu@google.com> wrote:
>> > >> > >
>> > >> > > Thanks Alexander for the feedback,
>> > >> > >
>> > >> > > We had some discussion internally with one of the OpenSSH maintainers
>> > >> > > and they are fine with it. I'll try to see if there is a public forum
>> > >> > > where we can share the discussion.
>> > >> >
>> > >> > If they are fine with it, then you need to submit a patch to openssh
>> > >> > that installs the needed pieces (perhaps subject to a configure
>> > >> > switch), get it accepted, and then add a backport to oe-core, in that
>> > >> > order. No do_install_append hacks please.
>> > >> >
>> > >> > Alex
>> >
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> > Links: You receive all messages sent to this group.
>> > View/Reply Online (#172992): https://lists.openembedded.org/g/openembedded-core/message/172992
>> > Mute This Topic: https://lists.openembedded.org/mt/94475279/1686489
>> > Group Owner: openembedded-core+owner@lists.openembedded.org
>> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> >
Willy Tu Nov. 8, 2022, 8:20 p.m. UTC | #19
ok, sounds good. thanks. I think I had a version that does that. I'll
revert back to that version.

I'll let the maintainer there know so that we can proceed with that direction.

Willy Tu


On Tue, Nov 8, 2022 at 11:37 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Ah, I thought this was in a separate layer. I think you're best off
> getting a private copy of openssh sources then.
>
> Alex
>
> On Tue, 8 Nov 2022 at 20:30, Willy Tu <wltu@google.com> wrote:
> >
> > So do you suggest adding bbappend in meta-openembedded where https://github.com/openembedded/meta-openembedded/pull/597 will live?
> >
> > I'll check with the maintainer there. And Google/hiba users will maintain that.
> >
> > Best,
> >
> > Willy Tu
> >
> >
> > On Tue, Nov 8, 2022 at 11:25 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
> >>
> >> Actually, you don't need to do this in HIBA - a bbappend to openssh will do.
> >>
> >> Alex
> >>
> >> On Tue, 8 Nov 2022 at 20:21, Alexander Kanavin via
> >> lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
> >> wrote:
> >> >
> >> > I'd rather have this hidden in your recipes, yes. It's clearly a
> >> > special needs issue, and something you shouldn't ask us to maintain
> >> > for you (what I mean is that you're not going to rebase the patch when
> >> > a new openssh version is out, or adjust do_install - this falls on
> >> > usually me, and my time to do these ever-growing maintenance things is
> >> > not infinite).
> >> >
> >> > Alex
> >> >
> >> >
> >> > On Tue, 8 Nov 2022 at 20:12, Tristan Lelong <tlelong@google.com> wrote:
> >> > >
> >> > > To be clear: OpenSSH maintainer will not accept a patch that exposes these files in the upstream version, but we got confirmation that they were ok if we maintained such a patch in OE (or a custom do_install in the recipe).
> >> > >
> >> > > If this solution is not acceptable from the OE maintainers point of view, the next option is to update the HIBA recipe to fetch OpenSSH sources on top of HIBA sources directly in HIBA's workdir, and use these instead of the one from sysroot.
> >> > >
> >> > > Would this work better for you?
> >> > >
> >> > > On Tue, Nov 8, 2022, 18:16 Willy Tu <wltu@google.com> wrote:
> >> > >>
> >> > >> I think they are fine with the hack here. oops. Ok, I'll work with
> >> > >> them to get the fix without this change.
> >> > >>
> >> > >> Thanks for the feedback.
> >> > >>
> >> > >> Willy Tu
> >> > >>
> >> > >>
> >> > >> On Tue, Nov 8, 2022 at 9:12 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
> >> > >> >
> >> > >> > On Tue, 8 Nov 2022 at 18:08, Willy Tu <wltu@google.com> wrote:
> >> > >> > >
> >> > >> > > Thanks Alexander for the feedback,
> >> > >> > >
> >> > >> > > We had some discussion internally with one of the OpenSSH maintainers
> >> > >> > > and they are fine with it. I'll try to see if there is a public forum
> >> > >> > > where we can share the discussion.
> >> > >> >
> >> > >> > If they are fine with it, then you need to submit a patch to openssh
> >> > >> > that installs the needed pieces (perhaps subject to a configure
> >> > >> > switch), get it accepted, and then add a backport to oe-core, in that
> >> > >> > order. No do_install_append hacks please.
> >> > >> >
> >> > >> > Alex
> >> >
> >> > -=-=-=-=-=-=-=-=-=-=-=-
> >> > Links: You receive all messages sent to this group.
> >> > View/Reply Online (#172992): https://lists.openembedded.org/g/openembedded-core/message/172992
> >> > Mute This Topic: https://lists.openembedded.org/mt/94475279/1686489
> >> > Group Owner: openembedded-core+owner@lists.openembedded.org
> >> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> >> > -=-=-=-=-=-=-=-=-=-=-=-
> >> >
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/openssh/openssh_9.0p1.bb b/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
index b63ea2b137..84da118ca6 100644
--- a/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_9.0p1.bb
@@ -137,6 +137,17 @@  do_install:append () {
${D}${sysconfdir}/init.d/sshd

install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'opensshinternals', 'true', 'false', d)}; then
+ install -d ${D}${includedir}/ssh
+ install -d ${D}${includedir}/ssh/openbsd-compat
+ install -m0644 ${S}/*.h ${D}${includedir}/ssh
+ install -m0644 ${S}/openbsd-compat/*.h ${D}${includedir}/ssh/openbsd-compat
+
+ install -d ${D}${libdir}
+ install -m0644 ${S}/libssh.a ${D}${libdir}
+ install -m0644 ${S}/openbsd-compat/libopenbsd-compat.a ${D}${libdir}
+ fi
}

do_install_ptest () {