All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev
@ 2018-09-19  6:41 Urs Fässler
  2018-09-19 15:11 ` Andreas Oberritter
  0 siblings, 1 reply; 7+ messages in thread
From: Urs Fässler @ 2018-09-19  6:41 UTC (permalink / raw)
  To: openembedded-core

Image generation fails with the configuration:
  EXTRA_IMAGE_FEATURES = "ssh-server-dropbear eclipse-debug dev-pkgs"
This is due the dependency eclipse-debug -> openssh-sftp-server ->
openssh-dev -> openssh. openssh can not be installed since it conflicts
with dropbear.

By adding the package openssh-sftp-server-dev we have no dependency to
openssh-dev nor openssh.

Signed-off-by: Urs Fässler <urs.fassler@bbv.ch>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
---
 meta/recipes-connectivity/openssh/openssh_7.8p1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssh/openssh_7.8p1.bb b/meta/recipes-connectivity/openssh/openssh_7.8p1.bb
index f4b295f2df..2782cdb2ad 100644
--- a/meta/recipes-connectivity/openssh/openssh_7.8p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_7.8p1.bb
@@ -132,7 +132,7 @@ do_install_ptest () {
 
 ALLOW_EMPTY_${PN} = "1"
 
-PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
+PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server ${PN}-sftp-server-dev"
 FILES_${PN}-scp = "${bindir}/scp.${BPN}"
 FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
 FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
@@ -146,6 +146,7 @@ FILES_${PN}-keygen = "${bindir}/ssh-keygen"
 RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
 RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
 RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
+RDEPENDS_${PN}-sftp-server-dev += "${PN}-sftp-server"
 
 RPROVIDES_${PN}-ssh = "ssh"
 RPROVIDES_${PN}-sshd = "sshd"
-- 
2.18.0



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

* Re: [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev
  2018-09-19  6:41 [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev Urs Fässler
@ 2018-09-19 15:11 ` Andreas Oberritter
  2018-09-19 16:01   ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Oberritter @ 2018-09-19 15:11 UTC (permalink / raw)
  To: openembedded-core


On Wed, 19 Sep 2018 08:41:35 +0200
Urs Fässler <urs.fassler@bbv.ch> wrote:

> Image generation fails with the configuration:
>   EXTRA_IMAGE_FEATURES = "ssh-server-dropbear eclipse-debug dev-pkgs"
> This is due the dependency eclipse-debug -> openssh-sftp-server ->
> openssh-dev -> openssh. openssh can not be installed since it conflicts
> with dropbear.

That's odd. Why does openssh-sftp-server depend on openssh-dev? Does openssh-dev contain a file which it shouldn't, e.g. a dynamically loaded module/plug-in?

Regards,
Andreas

> 
> By adding the package openssh-sftp-server-dev we have no dependency to
> openssh-dev nor openssh.
> 
> Signed-off-by: Urs Fässler <urs.fassler@bbv.ch>
> Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
> ---
>  meta/recipes-connectivity/openssh/openssh_7.8p1.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-connectivity/openssh/openssh_7.8p1.bb b/meta/recipes-connectivity/openssh/openssh_7.8p1.bb
> index f4b295f2df..2782cdb2ad 100644
> --- a/meta/recipes-connectivity/openssh/openssh_7.8p1.bb
> +++ b/meta/recipes-connectivity/openssh/openssh_7.8p1.bb
> @@ -132,7 +132,7 @@ do_install_ptest () {
>  
>  ALLOW_EMPTY_${PN} = "1"
>  
> -PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
> +PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server ${PN}-sftp-server-dev"
>  FILES_${PN}-scp = "${bindir}/scp.${BPN}"
>  FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
>  FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
> @@ -146,6 +146,7 @@ FILES_${PN}-keygen = "${bindir}/ssh-keygen"
>  RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
>  RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
>  RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
> +RDEPENDS_${PN}-sftp-server-dev += "${PN}-sftp-server"
>  
>  RPROVIDES_${PN}-ssh = "ssh"
>  RPROVIDES_${PN}-sshd = "sshd"



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

* Re: [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev
  2018-09-19 15:11 ` Andreas Oberritter
@ 2018-09-19 16:01   ` Richard Purdie
  2018-09-24 13:26     ` Urs Fässler
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2018-09-19 16:01 UTC (permalink / raw)
  To: Andreas Oberritter, openembedded-core

On Wed, 2018-09-19 at 17:11 +0200, Andreas Oberritter wrote:
> On Wed, 19 Sep 2018 08:41:35 +0200
> Urs Fässler <urs.fassler@bbv.ch> wrote:
> 
> > Image generation fails with the configuration:
> >   EXTRA_IMAGE_FEATURES = "ssh-server-dropbear eclipse-debug dev-
> > pkgs"
> > This is due the dependency eclipse-debug -> openssh-sftp-server ->
> > openssh-dev -> openssh. openssh can not be installed since it
> > conflicts
> > with dropbear.
> 
> That's odd. Why does openssh-sftp-server depend on openssh-dev? Does
> openssh-dev contain a file which it shouldn't, e.g. a dynamically
> loaded module/plug-in?

It doesn't, its the fact that "dev-pkgs" are requested in
IMAGE_FEATURES. "openssh-dev" would be the default for openssh packages
and dropbear-dev would be the default for dropbear packages. 

The patch here doesn't sound correct. I'm wondering if the correct fix
is for ${PN}-dev should not depend on ${PN} and whether that would fix
the problem?

Cheers,

Richard


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

* Re: [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev
  2018-09-19 16:01   ` Richard Purdie
@ 2018-09-24 13:26     ` Urs Fässler
  2018-09-25 13:05       ` Urs Fässler
  0 siblings, 1 reply; 7+ messages in thread
From: Urs Fässler @ 2018-09-24 13:26 UTC (permalink / raw)
  To: Richard Purdie, Andreas Oberritter, openembedded-core

On Wed, 2018-09-19 at 09:01 -0700, Richard Purdie wrote:
> On Wed, 2018-09-19 at 17:11 +0200, Andreas Oberritter wrote:
> > On Wed, 19 Sep 2018 08:41:35 +0200
> > Urs Fässler <urs.fassler@bbv.ch> wrote:
> > 
> > > Image generation fails with the configuration:
> > >   EXTRA_IMAGE_FEATURES = "ssh-server-dropbear eclipse-debug dev-
> > > pkgs"
> > > This is due the dependency eclipse-debug -> openssh-sftp-server ->
> > > openssh-dev -> openssh. openssh can not be installed since it
> > > conflicts
> > > with dropbear.
> > 
> > That's odd. Why does openssh-sftp-server depend on openssh-dev?
> > Does
> > openssh-dev contain a file which it shouldn't, e.g. a dynamically
> > loaded module/plug-in?
> 
> It doesn't, its the fact that "dev-pkgs" are requested in
> IMAGE_FEATURES. "openssh-dev" would be the default for openssh
> packages
> and dropbear-dev would be the default for dropbear packages. 
> 
> The patch here doesn't sound correct. I'm wondering if the correct
> fix
> is for ${PN}-dev should not depend on ${PN} and whether that
> would fix
> the problem?

The dependency from ${PN}-dev to ${PN} seems to be the default behavior
in Yocto. I don't know the consequences when we change this for
openssh. But it helps in my case.
(I added RDEPENDS_${PN}-dev = "", didn't found a better way)

Another workaround is, when I don't allow the generation of an empty
${PN}-dev package. I have the same considerations as with the previous
idea.

I see the problem that dev-pkgs automatically installs openssh-dev if I
select the openssh-sftp-server.
The nice solution would be to tell Yocto not to install openssh-dev
when openssh-sftp-server and dev-pkgs is configured. But I have no idea
if or how this is possible.

Unfortunately I didn't found a recipe where this problem is also
solved.

Kind Regards
Urs



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

* Re: [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev
  2018-09-24 13:26     ` Urs Fässler
@ 2018-09-25 13:05       ` Urs Fässler
  2018-09-25 13:54         ` richard.purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Urs Fässler @ 2018-09-25 13:05 UTC (permalink / raw)
  To: Richard Purdie, Andreas Oberritter, openembedded-core

On Mon, 2018-09-24 at 15:26 +0200, Urs Fässler wrote:
> On Wed, 2018-09-19 at 09:01 -0700, Richard Purdie wrote:
> > On Wed, 2018-09-19 at 17:11 +0200, Andreas Oberritter wrote:
> > > On Wed, 19 Sep 2018 08:41:35 +0200
> > > Urs Fässler <urs.fassler@bbv.ch> wrote:
> > > 
> > > > Image generation fails with the configuration:
> > > >   EXTRA_IMAGE_FEATURES = "ssh-server-dropbear eclipse-debug
> > > > dev-
> > > > pkgs"
> > > > This is due the dependency eclipse-debug -> openssh-sftp-server 
> > > > ->
> > > > openssh-dev -> openssh. openssh can not be installed since it
> > > > conflicts
> > > > with dropbear.
> > > 
> > > That's odd. Why does openssh-sftp-server depend on openssh-dev?
> > > Does
> > > openssh-dev contain a file which it shouldn't, e.g. a dynamically
> > > loaded module/plug-in?
> > 
> > It doesn't, its the fact that "dev-pkgs" are requested in
> > IMAGE_FEATURES. "openssh-dev" would be the default for openssh
> > packages
> > and dropbear-dev would be the default for dropbear packages. 
> >
> > The patch here doesn't sound correct. I'm wondering if the
correct
> > fix
> > is for ${PN}-dev should not depend on ${PN} and whether that
> > would fix
> > the problem?
> 
> The dependency from ${PN}-dev to ${PN} seems to be the default
> behavior
> in Yocto. I don't know the consequences when we change this for
> openssh. But it helps in my case.
> (I added RDEPENDS_${PN}-dev = "", didn't found a better way)

If somebody know the implication of removing the dependency from ${PN}-
dev to ${PN} for openssh and give the ok for it, I am fine with this
solution.

> Another workaround is, when I don't allow the generation of an empty
> ${PN}-dev package. I have the same considerations as with the
> previous
> idea.
> 
> I see the problem that dev-pkgs automatically installs openssh-dev if
> I
> select the openssh-sftp-server.
> The nice solution would be to tell Yocto not to install openssh-dev
> when openssh-sftp-server and dev-pkgs is configured. But I have no
> idea
> if or how this is possible.

I don't think it is possible on a package level. Only in the script
that resolved the *-dev installation. This is done with scripts/oe-
pkgdata-util at line ~116. First, it tries to install package xyz-dev
for package xyz. If the package xyz-dev does not exist, it looks from
which recipe package xyz does come from. If it is from abc, then abc-
dev is installed.

Adding the openssh-sftp-server-dev guides the script to use the first
choice of the script.

Kind Regards
Urs




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

* Re: [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev
  2018-09-25 13:05       ` Urs Fässler
@ 2018-09-25 13:54         ` richard.purdie
  2018-10-01 15:07           ` Urs Fässler
  0 siblings, 1 reply; 7+ messages in thread
From: richard.purdie @ 2018-09-25 13:54 UTC (permalink / raw)
  To: Urs Fässler, Andreas Oberritter, openembedded-core

On Tue, 2018-09-25 at 15:05 +0200, Urs Fässler wrote:
> On Mon, 2018-09-24 at 15:26 +0200, Urs Fässler wrote:
> > On Wed, 2018-09-19 at 09:01 -0700, Richard Purdie wrote:
> > > On Wed, 2018-09-19 at 17:11 +0200, Andreas Oberritter wrote:
> > > > On Wed, 19 Sep 2018 08:41:35 +0200
> > > > Urs Fässler <urs.fassler@bbv.ch> wrote:
> > > > 
> > > > > Image generation fails with the configuration:
> > > > >   EXTRA_IMAGE_FEATURES = "ssh-server-dropbear eclipse-debug
> > > > > dev-
> > > > > pkgs"
> > > > > This is due the dependency eclipse-debug -> openssh-sftp-
> > > > > server 
> > > > > ->
> > > > > openssh-dev -> openssh. openssh can not be installed since it
> > > > > conflicts
> > > > > with dropbear.
> > > > 
> > > > That's odd. Why does openssh-sftp-server depend on openssh-dev?
> > > > Does
> > > > openssh-dev contain a file which it shouldn't, e.g. a
> > > > dynamically
> > > > loaded module/plug-in?
> > > 
> > > It doesn't, its the fact that "dev-pkgs" are requested in
> > > IMAGE_FEATURES. "openssh-dev" would be the default for openssh
> > > packages
> > > and dropbear-dev would be the default for dropbear packages. 
> > > 
> > > The patch here doesn't sound correct. I'm wondering if the
> 
> correct
> > > fix
> > > is for ${PN}-dev should not depend on ${PN} and whether that
> > > would fix
> > > the problem?
> > 
> > The dependency from ${PN}-dev to ${PN} seems to be the default
> > behavior
> > in Yocto. I don't know the consequences when we change this for
> > openssh. But it helps in my case.
> > (I added RDEPENDS_${PN}-dev = "", didn't found a better way)
> 
> If somebody know the implication of removing the dependency from
> ${PN}-dev to ${PN} for openssh and give the ok for it, I am fine with
> this solution.

I have an idea of the potential problems but I think we should consider
it. It would need wide testing and is a 2.7 change at this point.

Cheers,

Richard



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

* Re: [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev
  2018-09-25 13:54         ` richard.purdie
@ 2018-10-01 15:07           ` Urs Fässler
  0 siblings, 0 replies; 7+ messages in thread
From: Urs Fässler @ 2018-10-01 15:07 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

On Tue, 2018-09-25 at 14:54 +0100, richard.purdie@linuxfoundation.org
wrote:
> On Tue, 2018-09-25 at 15:05 +0200, Urs Fässler wrote:
> > On Mon, 2018-09-24 at 15:26 +0200, Urs Fässler wrote:
> > > On Wed, 2018-09-19 at 09:01 -0700, Richard Purdie wrote:
> > > > On Wed, 2018-09-19 at 17:11 +0200, Andreas Oberritter wrote:
> > > > > On Wed, 19 Sep 2018 08:41:35 +0200
> > > > > Urs Fässler <urs.fassler@bbv.ch> wrote:
> > > > > 
> > > > > > Image generation fails with the configuration:
> > > > > >   EXTRA_IMAGE_FEATURES = "ssh-server-dropbear eclipse-debug
> > > > > > dev-
> > > > > > pkgs"
> > > > > > This is due the dependency eclipse-debug -> openssh-sftp-
> > > > > > server 
> > > > > > ->
> > > > > > openssh-dev -> openssh. openssh can not be installed since
> > > > > > it
> > > > > > conflicts
> > > > > > with dropbear.
> > > > > 
> > > > > That's odd. Why does openssh-sftp-server depend on openssh-
> > > > > dev?
> > > > > Does
> > > > > openssh-dev contain a file which it shouldn't, e.g. a
> > > > > dynamically
> > > > > loaded module/plug-in?
> > > > 
> > > > It doesn't, its the fact that "dev-pkgs" are requested in
> > > > IMAGE_FEATURES. "openssh-dev" would be the default for openssh
> > > > packages
> > > > and dropbear-dev would be the default for dropbear packages. 
> > > > 
> > > > The patch here doesn't sound correct. I'm wondering if the
> > 
> > correct
> > > > fix
> > > > is for ${PN}-dev should not depend on ${PN} and whether that
> > > > would fix
> > > > the problem?
> > > 
> > > The dependency from ${PN}-dev to ${PN} seems to be the default
> > > behavior
> > > in Yocto. I don't know the consequences when we change this for
> > > openssh. But it helps in my case.
> > > (I added RDEPENDS_${PN}-dev = "", didn't found a better way)
> > 
> > If somebody know the implication of removing the dependency from
> > ${PN}-dev to ${PN} for openssh and give the ok for it, I am fine
> > with
> > this solution.
> 
> I have an idea of the potential problems but I think we should
> consider
> it. It would need wide testing and is a 2.7 change at this point.

This is imho a change in behavior on a whole different level, but
renders my problem obsolete.

The current behavior is, that the oe-pkgdata-util script first tries to
find openssh-sftp-server-dev. Since there is no such package, the
fallback mechanism is used. It looks what package/recipe provides
openssh-sftp-server. This is openssh, so openssh-dev is installed, even
it is not really related to openssh-sftp-server.
With my patch I try to solve the problem within the current behavior. I
use the default case of the oe-pkgdata-util script by providing
openssh-sftp-server-dev. This is also the case we would have if there
would be some files that belong in openssh-sftp-server-dev.

I understand that you like to solve the problem on the higher level,
but it is out of my scope. Within my scope, the provided patch looks
like the right way.

Is there a change that we find a solution on the openssh package scope?

Kind Regards
Urs




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

end of thread, other threads:[~2018-10-02  3:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19  6:41 [PATCH] openssh: resolve install conflict with openssh-sftp-server-dev Urs Fässler
2018-09-19 15:11 ` Andreas Oberritter
2018-09-19 16:01   ` Richard Purdie
2018-09-24 13:26     ` Urs Fässler
2018-09-25 13:05       ` Urs Fässler
2018-09-25 13:54         ` richard.purdie
2018-10-01 15:07           ` Urs Fässler

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.