systemd misc fixes
cover systemd misc fixes
The following changes since commit cfd1520b4b492ab27b2900ba3510abe6f288097e:
oe-selftest: separated the SStateBase and SStateTests in different modules (2014-01-16 12:18:52 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/systemd-misc-fixes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-misc-fixes
Chen Qi (5):
systemd: add 'less' to its RDEPENDS
dropbear: add systemd unit files
openssh: fixes for systemd
distcc: add systemd support
at: add systemd support
.../openssh/openssh-6.4p1/sshd.socket | 1 - .../openssh/openssh-6.4p1/[email protected] | 1 + .../openssh/openssh-6.4p1/sshdgenkeys.service | 8 ++++---- meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 4 ++-- meta/recipes-core/dropbear/dropbear.inc | 17 ++++++++++++++++- .../recipes-core/dropbear/dropbear/dropbear.socket | 10 ++++++++++ .../dropbear/dropbear/[email protected] | 11 +++++++++++ .../dropbear/dropbear/dropbearkey.service | 8 ++++++++ meta/recipes-core/systemd/systemd_208.bb | 3 ++- meta/recipes-devtools/distcc/distcc_3.1.bb | 14 +++++++++++--- meta/recipes-devtools/distcc/files/default | 5 +++++ meta/recipes-devtools/distcc/files/distccd.service | 11 +++++++++++ meta/recipes-extended/at/at_3.1.14.bb | 10 +++++++++- meta/recipes-extended/at/files/atd.service | 9 +++++++++ 14 files changed, 99 insertions(+), 13 deletions(-) create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear.socket create mode 100644 meta/recipes-core/dropbear/dropbear/[email protected] create mode 100644 meta/recipes-core/dropbear/dropbear/dropbearkey.service create mode 100644 meta/recipes-devtools/distcc/files/distccd.service create mode 100644 meta/recipes-extended/at/files/atd.service
Signature · 1 line
1.7.9.5
PATCH 1/5 systemd: add 'less' to its RDEPENDS
The less command provided by busybox cannot interpret the control character, resulting in obscure output of the journalctl command in a systemd based image.
Add the 'less' package to systemd's RDEPENDS so that the output of 'journalctl' looks clear to users.
[YOCTO #5723]
--- meta/recipes-core/systemd/systemd_208.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_208.bb +2 -1
@@ -217,7 +217,8 @@ FILES_${PN} = " ${base_bindir}/* \ FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" -RDEPENDS_${PN} += "kmod dbus util-linux-mount" +# less package is needed to correctly display the contents of 'journalctl' +RDEPENDS_${PN} += "kmod dbus util-linux-mount less" RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \ util-linux-agetty \
Signature · 1 line
1.7.9.5
PATCH 2/5 dropbear: add systemd unit files
In reply to Chen QiThis patch mainly comes from meta-systemd with a few modifications. The purpose is to get rid of the LSB init scripts in systemd images.
[YOCTO #4420]
--- meta/recipes-core/dropbear/dropbear.inc | 17 ++++++++++++++++- .../recipes-core/dropbear/dropbear/dropbear.socket | 10 ++++++++++ .../dropbear/dropbear/[email protected] | 11 +++++++++++ .../dropbear/dropbear/dropbearkey.service | 8 ++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear.socket create mode 100644 meta/recipes-core/dropbear/dropbear/[email protected] create mode 100644 meta/recipes-core/dropbear/dropbear/dropbearkey.service
meta/recipes-core/dropbear/dropbear.inc +16 -1
@@ -19,17 +19,22 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ file://0004-fix-2kb-keys.patch \ file://0007-dropbear-fix-for-x32-abi.patch \ file://init \ + file://dropbearkey.service \ + file://[email protected] \ + file://dropbear.socket \ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} " PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ file://0006-dropbear-configuration-file.patch \ file://dropbear" -inherit autotools update-rc.d +inherit autotools update-rc.d systemd INITSCRIPT_NAME = "dropbear" INITSCRIPT_PARAMS = "defaults 10" +SYSTEMD_SERVICE_${PN} = "dropbear.socket" + CFLAGS_prepend = " -I. " LD = "${CC}"
@@ -66,6 +71,16 @@ do_install() { install -d ${D}${sysconfdir}/pam.d install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/ fi + + # deal with systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dropbear.socket ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@BINDIR@,${bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + ${D}${systemd_unitdir}/system/dropbear.socket ${D}${systemd_unitdir}/system/*.service } inherit update-alternatives
meta/recipes-core/dropbear/dropbear/dropbear.socket new file +10 -0
@@ -0,0 +1,10 @@ +[Unit] +Conflicts=dropbear.service + +[Socket] +ListenStream=22 +Accept=yes + +[Install] +WantedBy=sockets.target +Also=dropbearkey.service
meta/recipes-core/dropbear/dropbear/[email protected] new file +11 -0
@@ -0,0 +1,11 @@ +[Unit] +Description=SSH Per-Connection Server +Wants=dropbearkey.service +After=syslog.target dropbearkey.service + +[Service] +EnvironmentFile=-/etc/default/dropbear +ExecStart=-@SBINDIR@/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS +ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID +StandardInput=socket +KillMode=process
meta/recipes-core/dropbear/dropbear/dropbearkey.service new file +8 -0
@@ -0,0 +1,8 @@ +[Unit] +Description=SSH Key Generation +ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key + +[Service] +Type=oneshot +ExecStart=@SBINDIR@/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key +RemainAfterExit=yes
Signature · 1 line
1.7.9.5
PATCH 3/5 openssh: fixes for systemd
In reply to Chen QiThis patch contains a few fixes for the systemd unit files of openssh. The fixes use the same unit files in Fedora 20 as a reference.
1) Remove sshdgenkeys.service and [email protected] from SYSTEMD_SERVICE.
2) Fix the dependency and logic of sshdgenkeys.service.
--- .../openssh/openssh-6.4p1/sshd.socket | 1 - .../openssh/openssh-6.4p1/[email protected] | 1 + .../openssh/openssh-6.4p1/sshdgenkeys.service | 8 ++++---- meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
meta/recipes-connectivity/openssh/openssh-6.4p1/sshd.socket +0 -1
@@ -8,4 +8,3 @@ Accept=yes [Install] WantedBy=sockets.target -Also=sshdgenkeys.service
meta/recipes-connectivity/openssh/openssh-6.4p1/[email protected] +1 -0
@@ -1,5 +1,6 @@ [Unit] Description=OpenSSH Per-Connection Daemon +Wants=sshdgenkeys.service After=sshdgenkeys.service [Service]
meta/recipes-connectivity/openssh/openssh-6.4p1/sshdgenkeys.service +4 -4
@@ -1,10 +1,10 @@ [Unit] -Description=SSH Key Generation +Description=OpenSSH Key Generation +ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key +ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key [Service] ExecStart=@BINDIR@/ssh-keygen -A Type=oneshot RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target
meta/recipes-connectivity/openssh/openssh_6.4p1.bb +2 -2
@@ -44,7 +44,7 @@ INITSCRIPT_NAME_${PN}-sshd = "sshd" INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" SYSTEMD_PACKAGES = "${PN}-sshd" -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket [email protected] sshdgenkeys.service" +SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket" PACKAGECONFIG ??= "tcp-wrappers" PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers"
@@ -114,7 +114,7 @@ ALLOW_EMPTY_${PN} = "1" PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" 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" +FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system" FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd" FILES_${PN}-sftp = "${bindir}/sftp" FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
Signature · 1 line
1.7.9.5
PATCH 4/5 distcc: add systemd support
In reply to Chen QiAdd systemd support for distcc.
These unit files mainly use the same files in Fedora 20 as a reference.
[YOCTO #4420]
--- meta/recipes-devtools/distcc/distcc_3.1.bb | 14 +++++++++++--- meta/recipes-devtools/distcc/files/default | 5 +++++ meta/recipes-devtools/distcc/files/distccd.service | 11 +++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-devtools/distcc/files/distccd.service
meta/recipes-devtools/distcc/distcc_3.1.bb +11 -3
@@ -22,12 +22,13 @@ SRC_URI = "http://distcc.googlecode.com/files/${BPN}-${PV}.tar.bz2 \ file://separatebuilddir.patch \ file://default \ file://distccmon-gnome.desktop \ - file://distcc" + file://distcc \ + file://distccd.service" SRC_URI[md5sum] = "a1a9d3853df7133669fffec2a9aab9f3" SRC_URI[sha256sum] = "f55dbafd76bed3ce57e1bbcdab1329227808890d90f4c724fcd2d53f934ddd89" -inherit autotools pkgconfig update-rc.d useradd +inherit autotools pkgconfig update-rc.d useradd systemd EXTRA_OECONF += "--disable-Werror PYTHON=/dev/null"
@@ -40,11 +41,17 @@ USERADD_PARAM_${PN} = "--system \ INITSCRIPT_NAME = "distcc" +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "distccd.service" + do_install_append() { install -d ${D}${sysconfdir}/init.d/ install -d ${D}${sysconfdir}/default install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/distccd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distccd.service ${DESKTOPINSTALL} } DESKTOPINSTALL = ""
@@ -58,7 +65,8 @@ FILES_${PN} = " ${sysconfdir} \ ${bindir}/distcc \ ${bindir}/lsdistcc \ ${bindir}/distccd \ - ${bindir}/distccmon-text" + ${bindir}/distccmon-text \ + ${systemd_unitdir}/system/distccd.service" FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \ ${datadir}/distcc"
meta/recipes-devtools/distcc/files/default +5 -0
@@ -17,3 +17,8 @@ STARTDISTCC="true" # ALLOWEDNETS="127.0.0.1" ALLOWEDNETS="192.168.7.0/24" + +# +# OPTIONS is used for the systemd service file +# +OPTIONS="--allow 192.168.7.0/24"
meta/recipes-devtools/distcc/files/distccd.service new file +11 -0
@@ -0,0 +1,11 @@ +[Unit] +Description=Distccd A Distributed Compilation Server +After=network.target + +[Service] +User=distcc +EnvironmentFile=-/etc/default/distcc +ExecStart=@BINDIR@/distccd --verbose --no-detach --daemon $OPTIONS + +[Install] +WantedBy=multi-user.target
Signature · 1 line
1.7.9.5
PATCH 5/5 at: add systemd support
In reply to Chen QiAdd systemd support for at.
This patch mainly comes from meta-systemd.
[YOCTO #4420]
--- meta/recipes-extended/at/at_3.1.14.bb | 10 +++++++++- meta/recipes-extended/at/files/atd.service | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/at/files/atd.service
meta/recipes-extended/at/at_3.1.14.bb +9 -1
@@ -22,6 +22,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \ file://posixtm.h \ file://file_replacement_with_gplv2.patch \ file://S99at \ + file://atd.service \ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" PAM_SRC_URI = "file://pam.conf.patch \
@@ -37,7 +38,9 @@ EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \ --with-atspool=/var/spool/at/spool \ ac_cv_header_security_pam_appl_h=${@base_contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} " -inherit autotools +inherit autotools systemd + +SYSTEMD_SERVICE_${PN} = "atd.service" PARALLEL_MAKE = ""
@@ -53,6 +56,11 @@ do_install () { install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at + # install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service + if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd fi
meta/recipes-extended/at/files/atd.service new file +9 -0
@@ -0,0 +1,9 @@ +[Unit] +Description=Job spooling tools +After=syslog.target + +[Service] +ExecStart=@SBINDIR@/atd -f + +[Install] +WantedBy=multi-user.target
Signature · 1 line
1.7.9.5
Quoted 8 lines · Chen Qi
The following changes since commit
cfd1520b4b492ab27b2900ba3510abe6f288097e:oe-selftest: separated the SStateBase and SStateTests in different modules (2014-01-16 12:18:52 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contribChenQi/systemd-misc-fixes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-misc-fixes
Can you send pull-request from oe-core?
Quoted 6 lines
Chen Qi (5):
systemd: add 'less' to its RDEPENDS
dropbear: add systemd unit files
openssh: fixes for systemd
distcc: add systemd support
at: add systemd support
Thank you, openssh fix for [email protected] in SYSTEMD_SERVICE was requested since it was introduced, good to see the fix now.
Can you please send cleanup patches for meta-systemd after this patchset is merged? Thanks
Quoted 28 lines
.../openssh/openssh-6.4p1/sshd.socket | 1 - .../openssh/openssh-6.4p1/[email protected] | 1 + .../openssh/openssh-6.4p1/sshdgenkeys.service | 8 ++++---- meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 4 ++-- meta/recipes-core/dropbear/dropbear.inc | 17 ++++++++++++++++- .../recipes-core/dropbear/dropbear/dropbear.socket | 10 ++++++++++ .../dropbear/dropbear/[email protected] | 11 +++++++++++ .../dropbear/dropbear/dropbearkey.service | 8 ++++++++ meta/recipes-core/systemd/systemd_208.bb | 3 ++- meta/recipes-devtools/distcc/distcc_3.1.bb | 14 +++++++++++--- meta/recipes-devtools/distcc/files/default | 5 +++++ meta/recipes-devtools/distcc/files/distccd.service | 11 +++++++++++ meta/recipes-extended/at/at_3.1.14.bb | 10 +++++++++- meta/recipes-extended/at/files/atd.service | 9 +++++++++ 14 files changed, 99 insertions(+), 13 deletions(-) create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear.socket create mode 100644 meta/recipes-core/dropbear/dropbear/[email protected] create mode 100644 meta/recipes-core/dropbear/dropbear/dropbearkey.service create mode 100644 meta/recipes-devtools/distcc/files/distccd.service create mode 100644 meta/recipes-extended/at/files/atd.serviceSignature · 6 lines
1.7.9.5 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 11 lines · Martin Jansa
Quoted 8 lines · Chen Qi
The following changes since commit
cfd1520b4b492ab27b2900ba3510abe6f288097e:oe-selftest: separated the SStateBase and SStateTests in different modules (2014-01-16 12:18:52 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contribChenQi/systemd-misc-fixes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-misc-fixesCan you send pull-request from oe-core?
I've sent out V2. But the remote branch is still poky-contrib. Is it OK?
Quoted 11 lines
Quoted 6 lines
Chen Qi (5):
systemd: add 'less' to its RDEPENDS
dropbear: add systemd unit files
openssh: fixes for systemd
distcc: add systemd support
at: add systemd supportThank you, openssh fix for [email protected] in
SYSTEMD_SERVICEwas requested since it was introduced, good to see the fix now.Can you please send cleanup patches for meta-systemd after this patchset is merged? Thanks
Yes, of course.
Best Regards,
Chen Qi
Quoted 28 lines
Quoted 28 lines
.../openssh/openssh-6.4p1/sshd.socket | 1 - .../openssh/openssh-6.4p1/[email protected] | 1 + .../openssh/openssh-6.4p1/sshdgenkeys.service | 8 ++++---- meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 4 ++-- meta/recipes-core/dropbear/dropbear.inc | 17 ++++++++++++++++- .../recipes-core/dropbear/dropbear/dropbear.socket | 10 ++++++++++ .../dropbear/dropbear/[email protected] | 11 +++++++++++ .../dropbear/dropbear/dropbearkey.service | 8 ++++++++ meta/recipes-core/systemd/systemd_208.bb | 3 ++- meta/recipes-devtools/distcc/distcc_3.1.bb | 14 +++++++++++--- meta/recipes-devtools/distcc/files/default | 5 +++++ meta/recipes-devtools/distcc/files/distccd.service | 11 +++++++++++ meta/recipes-extended/at/at_3.1.14.bb | 10 +++++++++- meta/recipes-extended/at/files/atd.service | 9 +++++++++ 14 files changed, 99 insertions(+), 13 deletions(-)create mode 100644 meta/recipes-core/dropbear/dropbear/dropbear.socket create mode 100644 meta/recipes-core/dropbear/dropbear/[email protected] create mode 100644 meta/recipes-core/dropbear/dropbear/dropbearkey.service create mode 100644 meta/recipes-devtools/distcc/files/distccd.service create mode 100644 meta/recipes-extended/at/files/atd.service
Signature · 6 lines
1.7.9.5 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 1/5] systemd: add 'less' to its RDEPENDS
In reply to Chen Qimeta/recipes-core/systemd/systemd_208.bb FILES_${PN} = " ${base_bindir}/* \ · line 221
Quoted 2 lines · Chen Qi
meta/recipes-core/systemd/systemd_208.bb +2
-0+# less package is needed to correctly display the contents of 'journalctl' +RDEPENDS_${PN} += "kmod dbus util-linux-mount less"
please make this an RRECOMMENDS; people can set 'SYSTEMD_PAGER=' or pipe the journalctl output and do not need 'less' then.
Enrico