Bug 13821

Summary: [Warrior + Zeus bug] OpenSSH package does not integrate in core-image-base build
Product: [Build System, Metadata & Runtime] BitBake Reporter: Zoran Stojsavljevic <zoran.stojsavljevic>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED NOTABUG QA Contact:
Severity: enhancement    
Priority: Undecided CC: akuster808, poky.bs.watcher, poky.watcher, rpjday, zoran.stojsavljevic
Version: 3.0.3   
Target Milestone: ---   
Hardware: BeagleBone   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Unknown (Hard to categorize)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Zoran Stojsavljevic 2020-02-29 13:43:23 UTC
As heading says: OpenSSH package does not integrate in core-image-base build

It does integrate with core-image-minimal. The local.conf used is presented here:
https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/bbb-releases/bbb-zeus/local.conf
_______

Here is the full snippet:

# BeagleBone Black
CONF_VERSION = "1"
PATCHRESOLVE = "noop"
SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
DL_DIR ?= "${TOPDIR}/downloads"
TMPDIR ?= "${TOPDIR}/tmp"
PACKAGE_CLASSES ?= "package_rpm package_deb"
## Add systemd service
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_dev_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
## PACKAGECONFIG_append_pn-systemd = " networkd"
## mask for non-mender builds
BBMASK = "meta-bbb/recipes-mender"
BBMASK += "meta-openembedded/meta-oe/recipes-extended/socketcan/canutils"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
CORE_IMAGE_EXTRA_INSTALL_append = "openssh dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell cmake libsocketcan nfs-utils rt-tests strace procps packagegroup-core-buildessential "
DISTRO_FEATURES_append = " nfs systemd"
IMAGE_FSTYPES_append = " cpio.xz"
## INHERIT += "extrausers"
## EXTRA_USERS_PARAMS = "usermod -P root root;"

MACHINE ??= "beaglebone"
DISTRO ??= "poky"
BBMULTICONFIG ?= ""
_______

It is observed on the different architectures:
[1] Beagle Bone Black
[2] Imx-IMX8

On arm 32 and 64 bit architectures. 

This bug is present more than a year (I spotted it on Sumo, if I recall it correctly).

Please, test it for yourselves!

Thank you,
Zoran
Comment 1 Richard Purdie 2020-03-01 17:56:09 UTC
What does "does not integrate" mean? Do you mean it fails to build? If so what was the error? or does it fail to boot or provide an ssh server? We need details about what actually fails please.
Comment 2 akuster 2020-03-01 23:02:15 UTC
To add onessh server to an image, can do one of three things.


1) EXTRA_IMAGE_FEATURES += “ssh-server-openssh” 

or

2) IMAGE_FEATURES += "ssh-server-openssh"


You can look at the openssh package-split to find which package needs to be installed 

tmp/work/{arch}/openssh/8.2p1-r0/packages-split

if you don't want to use the FEATURES option you can append to the image install.

3) IMAGE_INSTALL_append = " openssh-sshd"
Comment 3 Zoran Stojsavljevic 2020-03-02 04:31:43 UTC
> What does "does not integrate" mean? Do you mean it fails to build?
> If so what was the error? or does it fail to boot or provide an ssh
> server? We need details about what actually fails please.

Sorry for providing not enough info. There is no /etc/ssh/ directory on yocto build, that's the problem.

> To add onessh server to an image, can do one of three things.
>
> 1) EXTRA_IMAGE_FEATURES += “ssh-server-openssh”
> 2) IMAGE_FEATURES += "ssh-server-openssh"
> 3) IMAGE_INSTALL_append = " openssh-sshd"

Very good suggestions, thank you very much.

I'll try to find some time to try these suggestions, but it will be not too soon. Please, stay tuned.

Thank you,
Zoran
Comment 4 Zoran Stojsavljevic 2020-03-03 11:50:22 UTC
According to another people which reported to me about this, these options solve this problem...

> 1) EXTRA_IMAGE_FEATURES += “ssh-server-openssh”
> 2) IMAGE_FEATURES += "ssh-server-openssh"
> 3) IMAGE_INSTALL_append = " openssh-sshd"

So it is NOT a bug. I have no idea if this behaviour is documented in YOCTO manual, I hope it is!?

For the documentation purpose (to check if ssh behaviour is really documented), I'll add rpjday@crashcourse.ca email to find out the mega-manual ssh paragraph description.

Thank you all,
Zoran