Re: [OE-core] [PATCH] openssh: openssh-dev shouldn't depend on openssh

2021-09-30 Thread Matt Johnston
On Wed, 2021-09-29 at 09:40 -0500, Mark Hatle wrote:
> 
> If your root filesystem does NOT have openssh in it, then we need to answer 
> the
> question why was the -dev version added?
> 
> You mention above it's "any built package", but that should not be the case.  
> It
> should be for any package installed into the corresponding root filesystem.

In this case "openssh" isn't installed in the root filesystem, only 
"openssh-sftp-server". 

> This should NOT install -dev packages for things not located in
> core-image-minimal.  If it does, then there is another problem, that was not 
> the
> intended design.  The intention when the do_populate_sdk was written was
> construct the rootfs, parse what was install and add -dev packages + their
> dependencies.

populate_sdk resolves the globs for installed packages with 
"oe-pkgdata-util glob /tmp/installedpkgs *-dev"
which falls back to using the PN ("openssh") to find a match for openssh-
sftp-server.
That behaviour is useful for libraries like 
libboost-thread1.77.0 -> boost-dev, so I guess it's best left as-is.

Cheers,
Matt
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156481): 
https://lists.openembedded.org/g/openembedded-core/message/156481
Mute This Topic: https://lists.openembedded.org/mt/85941131/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] openssh: openssh-dev shouldn't depend on openssh

2021-09-29 Thread Mark Hatle


On 9/29/21 3:36 AM, Matt Johnston wrote:
> On Wed, 2021-09-29 at 09:24 +0100, Richard Purdie wrote:
>>> +RDEPENDS:${PN}-dev = ""
>>
>> At that point what is the point of the -dev package? I think you could make
>> this argument about a lot of the -dev packages and I'm not sure I'd want to
>> see every recipe doing this.
>>
>> What are you using the -dev package for and do you need it at all?
> 
> The -dev package isn't needed for anything, but it gets pulled in when
> "populate_sdk" is built. That does a glob over all -dev packages for
> any built package.

The dev package's SHOULD depend on the regular package by default.  There are
VERY VERY few instances where the dev package is "useful" without the
corresponding run-time package in a 'normal' use-case.  (There are always
exceptions and corner cases, but they're just that exceptions and corner cases
in my experience and lead to massive confusion by developers if exploited.)

populate_sdk, the entire purpose of this is to install the -dev package (and
it's dependencies) for anything in your root filesystem.  This says that you
root filesystem contains "openssh", thus openssh-dev will be installed.

If your root filesystem does NOT have openssh in it, then we need to answer the
question why was the -dev version added?

You mention above it's "any built package", but that should not be the case.  It
should be for any package installed into the corresponding root filesystem.

i.e. bitbake core-image-minimal -c do_populate_sdk

This should NOT install -dev packages for things not located in
core-image-minimal.  If it does, then there is another problem, that was not the
intended design.  The intention when the do_populate_sdk was written was
construct the rootfs, parse what was install and add -dev packages + their
dependencies.

--Mark

> Cheers,
> Matt
> 
>>
>> [As an aside, I do think the -dev package dependencies need rethinking but
>> that is a lot more work which nobody seems very interested in]
>>
>> Cheers,
>>
>> Richard
>>
> 
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156456): 
https://lists.openembedded.org/g/openembedded-core/message/156456
Mute This Topic: https://lists.openembedded.org/mt/85941131/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] openssh: openssh-dev shouldn't depend on openssh

2021-09-29 Thread Alexander Kanavin
I think a better way out may be to make openssh and dropbear coinstallable?

Alex

On Wed, 29 Sept 2021 at 10:36, Matt Johnston 
wrote:

> On Wed, 2021-09-29 at 09:24 +0100, Richard Purdie wrote:
> > > +RDEPENDS:${PN}-dev = ""
> >
> > At that point what is the point of the -dev package? I think you could
> make
> > this argument about a lot of the -dev packages and I'm not sure I'd want
> to
> > see every recipe doing this.
> >
> > What are you using the -dev package for and do you need it at all?
>
> The -dev package isn't needed for anything, but it gets pulled in when
> "populate_sdk" is built. That does a glob over all -dev packages for
> any built package.
>
> Cheers,
> Matt
>
> >
> > [As an aside, I do think the -dev package dependencies need rethinking
> but
> > that is a lot more work which nobody seems very interested in]
> >
> > Cheers,
> >
> > Richard
> >
>
>
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156453): 
https://lists.openembedded.org/g/openembedded-core/message/156453
Mute This Topic: https://lists.openembedded.org/mt/85941131/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] openssh: openssh-dev shouldn't depend on openssh

2021-09-29 Thread Matt Johnston
On Wed, 2021-09-29 at 09:24 +0100, Richard Purdie wrote:
> > +RDEPENDS:${PN}-dev = ""
> 
> At that point what is the point of the -dev package? I think you could make
> this argument about a lot of the -dev packages and I'm not sure I'd want to
> see every recipe doing this.
> 
> What are you using the -dev package for and do you need it at all?

The -dev package isn't needed for anything, but it gets pulled in when
"populate_sdk" is built. That does a glob over all -dev packages for
any built package.

Cheers,
Matt

> 
> [As an aside, I do think the -dev package dependencies need rethinking but
> that is a lot more work which nobody seems very interested in]
> 
> Cheers,
> 
> Richard
> 



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156452): 
https://lists.openembedded.org/g/openembedded-core/message/156452
Mute This Topic: https://lists.openembedded.org/mt/85941131/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] openssh: openssh-dev shouldn't depend on openssh

2021-09-29 Thread Richard Purdie
On Wed, 2021-09-29 at 11:18 +0800, Matt Johnston wrote:
> In some situations packages such as openssh-sftp-server are used
> separately from openssh-sshd. The openssh-dev package is empty
> but can have conflicts when installed via populate_sdk. Removing the
> dependency avoids that.
> 
> https://github.com/openbmc/openbmc/issues/3819 is an example of the
> problem.
> 
> Signed-off-by: Matt Johnston 
> ---
>  meta/recipes-connectivity/openssh/openssh_8.7p1.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-connectivity/openssh/openssh_8.7p1.bb 
> b/meta/recipes-connectivity/openssh/openssh_8.7p1.bb
> index 07cd6b74cd..3ebdd62de3 100644
> --- a/meta/recipes-connectivity/openssh/openssh_8.7p1.bb
> +++ b/meta/recipes-connectivity/openssh/openssh_8.7p1.bb
> @@ -165,6 +165,8 @@ RDEPENDS:${PN}-sshd += "${PN}-keygen 
> ${@bb.utils.contains('DISTRO_FEATURES', 'pa
>  RRECOMMENDS:${PN}-sshd:append:class-target = "\
>  ${@bb.utils.filter('PACKAGECONFIG', 'rng-tools', d)} \
>  "
> +# openssh-dev shouldn't pull in openssh-sshd etc
> +RDEPENDS:${PN}-dev = ""

At that point what is the point of the -dev package? I think you could make this
argument about a lot of the -dev packages and I'm not sure I'd want to see every
recipe doing this.

What are you using the -dev package for and do you need it at all?

[As an aside, I do think the -dev package dependencies need rethinking but that
is a lot more work which nobody seems very interested in]

Cheers,

Richard


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156451): 
https://lists.openembedded.org/g/openembedded-core/message/156451
Mute This Topic: https://lists.openembedded.org/mt/85941131/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] openssh: openssh-dev shouldn't depend on openssh

2021-09-28 Thread Matt Johnston
In some situations packages such as openssh-sftp-server are used
separately from openssh-sshd. The openssh-dev package is empty
but can have conflicts when installed via populate_sdk. Removing the
dependency avoids that.

https://github.com/openbmc/openbmc/issues/3819 is an example of the
problem.

Signed-off-by: Matt Johnston 
---
 meta/recipes-connectivity/openssh/openssh_8.7p1.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-connectivity/openssh/openssh_8.7p1.bb 
b/meta/recipes-connectivity/openssh/openssh_8.7p1.bb
index 07cd6b74cd..3ebdd62de3 100644
--- a/meta/recipes-connectivity/openssh/openssh_8.7p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_8.7p1.bb
@@ -165,6 +165,8 @@ RDEPENDS:${PN}-sshd += "${PN}-keygen 
${@bb.utils.contains('DISTRO_FEATURES', 'pa
 RRECOMMENDS:${PN}-sshd:append:class-target = "\
 ${@bb.utils.filter('PACKAGECONFIG', 'rng-tools', d)} \
 "
+# openssh-dev shouldn't pull in openssh-sshd etc
+RDEPENDS:${PN}-dev = ""
 
 # gdb would make attach-ptrace test pass rather than skip but not worth the 
build dependencies
 RDEPENDS:${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed sudo 
coreutils"
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156437): 
https://lists.openembedded.org/g/openembedded-core/message/156437
Mute This Topic: https://lists.openembedded.org/mt/85941131/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-