<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14858</bug_id>
          
          <creation_ts>2022-07-11 13:23:40 +0000</creation_ts>
          <short_desc>IMAGE_FEATURE ptest causes conflict between dropbear and openssh in core-image.bbclass</short_desc>
          <delta_ts>2022-10-11 15:36:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.1 M3</target_milestone>
          
          <blocked>14926</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Pavel Zhukov">pavel</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>93657</commentid>
    <comment_count>0</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-07-11 13:23:40 +0000</bug_when>
    <thetext>Looks like this has similar root cause as: https://bugzilla.yoctoproject.org/show_bug.cgi?id=5057 and highlighted by (regressed in) https://git.openembedded.org/openembedded-core/commit/?id=a98188e83b2c027d99cc38e3367e1ec2a98efbb0

If ptest is in IMAGE_FEATURES list then openssh-ptest is marked to be installed as complementary packages (via openssh-sftp-server -&gt; openssh-ptest chain) and it requires openssh which conflicts with dropbear


$ cat /tmp/installed
openssh-sftp-server core2_64

$ oe-pkgdata-util -p /mnt/builds/oniroproject/goofy/builds/build-oniro-linux/tmp/pkgdata/qemux86-64  glob /tmp/installed  *-ptest
openssh-ptest

$ rpm -qpR tmp/deploy/rpm/core2_64/openssh-ptest-8.9p1-r0.core2_64.rpm 
[....]
openssh
openssh-misc
openssh-sftp
openssh-sftp-server
[.....]


Error: 
 Problem: problem with installed package dropbear-2020.81-r0.core2_64
  - package dropbear-2020.81-r0.core2_64 conflicts with openssh provided by openssh-8.9p1-r0.core2_64
  - package openssh-8.9p1-r0.core2_64 conflicts with dropbear provided by dropbear-2020.81-r0.core2_64
  - package openssh-ptest-8.9p1-r0.core2_64 requires openssh, but none of the providers can be installed
  - conflicting requests
(try to add &apos;--allowerasing&apos; to command line to replace conflicting packages or &apos;--skip-broken&apos; to skip uninstallable packages)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93658</commentid>
    <comment_count>1</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-07-11 18:35:59 +0000</bug_when>
    <thetext>The easiest way to reproduce this is:

local.conf
EXTRA_IMAGE_FEATURES:append = &quot; ptest-pkgs&quot;
IMAGE_INSTALL:append = &quot; packagegroup-core-ssh-dropbear &quot;

bitbake core-image-minimal.

However in product images packagegroup-core-ssh-dropbear dependency can be hidden by core-image class and it&apos;s not so obvious why openssh is pulled in into the image and why it fails only with ptest</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93659</commentid>
    <comment_count>2</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-07-11 20:45:46 +0000</bug_when>
    <thetext>core-image-weston brings ssh-server-dropbear feature too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93674</commentid>
    <comment_count>3</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-07-14 15:00:00 +0000</bug_when>
    <thetext>To summarize the issue.

Easiest way to reproduce the bug:
EXTRA_IMAGE_FEATURES:append = &quot; ptest-pkgs &quot;
IMAGE_INSTALL:append = &quot; packagegroup-core-ssh-dropbear &quot;

If IMAGE_FEATURES contains &quot;ptest-pkgs&quot; it triggers installation of complementary packages (meta/lib/oe/package_manager/__init.py__:install_complementary) with &quot;*-ptest&quot; glob for every installed package (including openssh-sftp-server which is recommended by packagegroup-core-ssh-dropbear).
as the result [1] is called which returns openssh-ptest. Openssh-ptest depends on openssh (via openssh-misc) which causes the conflict with dropbear. 

PACKAGE_EXCLUDE_COMPLEMENTARY = &quot;openssh&quot; &quot;fixes&quot; this issue and can be used as a workaround however it may break some use cases when -dbg -dev -ptest or other COMPLEMENTARY_GLOB packages has to be installed but will be filtered out. 


[1] oe-pkgdata-util -p d.getVar(PKGDATA_DIR)  glob &lt;installed_packages.file&gt;  d.getVar(IMAGE_INSTALL_COMPLEMENTARY)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93744</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-08-10 09:50:07 +0000</bug_when>
    <thetext>Having given this some thought, I think PACKAGE_EXCLUDE_COMPLEMENTARY = &quot;openssh&quot; is a reasonable workaround as all the alternatives are a lot more invasive with worst potential side effects too.

I think we should set that somewhere in OE-Core by default, the next question would be where. It really needs to be somewhere in one of the image classes...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93946</commentid>
    <comment_count>5</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2022-09-01 08:39:55 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/openembedded-core/message/170000</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94020</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-09-09 16:33:48 +0000</bug_when>
    <thetext>https://git.yoctoproject.org/poky/commit/?id=912b35e6e6df1e904cf9f4296d242a07943cf7b3</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>