Bug 5597 - openssh: can't restart systemd services during install
Summary: openssh: can't restart systemd services during install
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: connectivity (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.7.2
Assignee: Randy Witt
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-11-25 15:33 UTC by Yevhen
Modified: 2015-05-19 21:54 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yevhen 2013-11-25 15:33:27 UTC
I'm using systemd as init system and opkg as package manager.
During installation of openssh package I'm getting following errors:

* pkg_run_script: package "openssh-sshd" postinst script returned status 1.
* opkg_configure: openssh-sshd.postinst returned 1.

As I've investigated the problem is in "postinst" script namely in the following line:

systemctl restart sshd.socket sshd@.service sshdgenkeys.service

Seems that sshd@.service can't be restarted in such way.
Comment 1 Richard Purdie 2013-11-28 15:42:11 UTC
Ross: There are various patches around on this, can you figure out what we should be doing there?
Comment 2 Randy Witt 2015-05-19 21:54:20 UTC
I tried building an image in 1.7.1 with the ssh-server-openssh feature enabled and it was successful

I also built core-image-minimal without the feature enabled and tried installing the package manually and it was successful with this output.

opkg install libcrypto1.0.0_1.0.1m-r0_core2-64.ipk libwrap0_7.6-r10_core2-64.ipk openssh-keygen_6.6p1-r0_core2-64.ipk openssh-sshd_6.6p1-r0_core2-64.ipk
Installing libcrypto1.0.0 (1.0.1m-r0) on root.
libcrypto1.0.0: unsatisfied recommendation for openssl-conf
Installing libwrap0 (7.6-r10) on root.
Installing openssh-keygen (6.6p1-r0) on root.
Installing openssh-sshd (6.6p1-r0) on root.
Running useradd commands...
NOTE: Performing useradd with [ --system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd] and 10 times of retry
Created symlink from /etc/systemd/system/sockets.target.wants/sshd.socket to /lib/systemd/system/sshd.socket.
Configuring libwrap0.
Configuring libcrypto1.0.0.
Configuring openssh-keygen.
Configuring openssh-sshd.