Muhammad Shakeel : openssh: Add systemd support
A message that is not in the archive (sent off-list or not yet received): 20130910220329.45CB15043D@opal
Quoted 49 lines · On Tue, Sep 10, 2013 at 10:03:29PM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6e6445d487c033913a29763f8e3a7a339d5b612d URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6e6445d487c033913a29763f8e3a7a339d5b612dAuthor: Muhammad Shakeel <[email protected]> Date: Wed Sep 4 11:04:59 2013 +0000openssh: Add systemd support
-Remove dependency on meta-systemd
Signed-off-by Muhammad Shakeel <[email protected]>Signed-off-by Saul Wold <[email protected]>Signed-off-by Richard Purdie <[email protected]>---
.../openssh/openssh-6.2p2/sshd.socket | 11 +++++++++++ .../openssh/openssh-6.2p2/[email protected] | 9 +++++++++ .../openssh/openssh-6.2p2/sshdgenkeys.service | 10 ++++++++++ meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 19 +++++++++++++++++-- 4 files changed, 47 insertions(+), 2 deletions(-)meta/recipes-connectivity/openssh/openssh_6.2p2.bb +5
-2@@ -26,14 +26,17 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://init \ file://openssh-CVE-2011-4327.patch \ file://mac.patch \ - ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://sshd.socket \ + file://[email protected] \ + file://sshdgenkeys.service " PAM_SRC_URI = "file://sshd" SRC_URI[md5sum] = "be46174dcbb77ebb4ea88ef140685de1" SRC_URI[sha256sum] = "7f29b9d2ad672ae0f9e1dcbff871fc5c2e60a194e90c766432e32161b842313b" -inherit useradd update-rc.d update-alternatives +inherit useradd update-rc.d update-alternatives systemd USERADD_PACKAGES = "${PN}-sshd" USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
meta/recipes-connectivity/openssh/openssh_6.2p2.bb INITSCRIPT_PACKAGES = "${PN}-sshd" · line 48
Quoted 5 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb +2
-0@@ -41,6 +44,9 @@ INITSCRIPT_PACKAGES = "${PN}-sshd" 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"
Is it correct to use [email protected] here?
meta-systemd .bbappend had only sshd.socket:
-SYSTEMD_PACKAGES = "${PN}-sshd"
-SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
(re)starting sshd@service from postinst is failing with:
SHR root@pjama /etc $ bash -x /var/lib/opkg/info/openssh-sshd.postinst
+ OPTS=
+ '[' -n '' ']'
+ type systemctl
+ systemctl enable sshd.socket [email protected] sshdgenkeys.service
+ '[' -z '' -a enable = enable ']'
+ systemctl restart sshd.socket [email protected] sshdgenkeys.service Failed to issue method call: Unit name [email protected] is not valid.
Quoted 25 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb +10
-0+ PACKAGECONFIG ??= "tcp-wrappers" PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers"@@ -93,6 +99,15 @@ do_install_append () { echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly + + install -d ${D}${systemd_unitdir}/system + install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system + install -c -m 0644 ${WORKDIR}/[email protected] ${D}${systemd_unitdir}/system + install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BINDIR@,${bindir},g' \ + ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service } ALLOW_EMPTY_${PN} = "1"_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 62 lines · Martin Jansa
Quoted 49 lines · On Tue, Sep 10, 2013 at 10:03:29PM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6e6445d487c033913a29763f8e3a7a339d5b612d URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6e6445d487c033913a29763f8e3a7a339d5b612dAuthor: Muhammad Shakeel <[email protected]> Date: Wed Sep 4 11:04:59 2013 +0000openssh: Add systemd support
-Remove dependency on meta-systemd
Signed-off-by Muhammad Shakeel <[email protected]>Signed-off-by Saul Wold <[email protected]>Signed-off-by Richard Purdie <[email protected]>---
.../openssh/openssh-6.2p2/sshd.socket | 11 +++++++++++ .../openssh/openssh-6.2p2/[email protected] | 9 +++++++++ .../openssh/openssh-6.2p2/sshdgenkeys.service | 10 ++++++++++ meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 19 +++++++++++++++++-- 4 files changed, 47 insertions(+), 2 deletions(-)meta/recipes-connectivity/openssh/openssh_6.2p2.bb +5
-2@@ -26,14 +26,17 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://init \ file://openssh-CVE-2011-4327.patch \ file://mac.patch \ - ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://sshd.socket \ + file://[email protected] \ + file://sshdgenkeys.service " PAM_SRC_URI = "file://sshd" SRC_URI[md5sum] = "be46174dcbb77ebb4ea88ef140685de1" SRC_URI[sha256sum] = "7f29b9d2ad672ae0f9e1dcbff871fc5c2e60a194e90c766432e32161b842313b" -inherit useradd update-rc.d update-alternatives +inherit useradd update-rc.d update-alternatives systemd USERADD_PACKAGES = "${PN}-sshd" USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"meta/recipes-connectivity/openssh/openssh_6.2p2.bb INITSCRIPT_PACKAGES = "${PN}-sshd" · line 48
Quoted 5 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb +2
-0@@ -41,6 +44,9 @@ INITSCRIPT_PACKAGES = "${PN}-sshd" 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"Is it correct to use [email protected] here?
meta-systemd .bbappend had only sshd.socket:
(quoted diff) +0
-2-SYSTEMD_PACKAGES = "${PN}-sshd" -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
Quoted 9 lines
(re)starting sshd@service from postinst is failing with:
SHR root@pjama /etc $ bash -x/var/lib/opkg/info/openssh-sshd.postinst
+ OPTS=
+ '[' -n '' ']'
+ type systemctl
+ systemctl enable sshd.socket [email protected] sshdgenkeys.service
+ '[' -z '' -a enable = enable ']'
+ systemctl restart sshd.socket [email protected] sshdgenkeys.service Failed to issue method call: Unit name [email protected] is not valid.
ping
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 54 lines · Martin Jansa
Quoted 53 lines · Martin Jansa
Quoted 52 lines · On Tue, Sep 10, 2013 at 10:03:29PM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6e6445d487c033913a29763f8e3a7a339d5b612d URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6e6445d487c033913a29763f8e3a7a339d5b612dAuthor: Muhammad Shakeel <[email protected]> Date: Wed Sep 4 11:04:59 2013 +0000openssh: Add systemd support
-Remove dependency on meta-systemd
Signed-off-by Muhammad Shakeel <[email protected]>Signed-off-by Saul Wold <[email protected]>Signed-off-by Richard Purdie <[email protected]>---
.../openssh/openssh-6.2p2/sshd.socket | 11 +++++++++++ .../openssh/openssh-6.2p2/[email protected] | 9 +++++++++ .../openssh/openssh-6.2p2/sshdgenkeys.service | 10 ++++++++++ meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 19 +++++++++++++++++-- 4 files changed, 47 insertions(+), 2 deletions(-)meta/recipes-connectivity/openssh/openssh_6.2p2.bb +5
-2@@ -26,14 +26,17 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://init \ file://openssh-CVE-2011-4327.patch \ file://mac.patch \ - ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://sshd.socket \ + file://[email protected] \ + file://sshdgenkeys.service " PAM_SRC_URI = "file://sshd" SRC_URI[md5sum] = "be46174dcbb77ebb4ea88ef140685de1" SRC_URI[sha256sum] = "7f29b9d2ad672ae0f9e1dcbff871fc5c2e60a194e90c766432e32161b842313b" -inherit useradd update-rc.d update-alternatives +inherit useradd update-rc.d update-alternatives systemd USERADD_PACKAGES = "${PN}-sshd" USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"@@ -41,6 +44,9 @@ INITSCRIPT_PACKAGES = "${PN}-sshd" INITSCRIPT_NAME_${PN}-sshd = "sshd" INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
Quoted 7 lines
Review
Quoted 7 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb INITSCRIPT_PACKAGES = "${PN}-sshd" · line 48
Quoted 2 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb +2
-0+SYSTEMD_PACKAGES = "${PN}-sshd" +SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket [email protected] sshdgenkeys.service"Is it correct to use [email protected] here?
meta-systemd .bbappend had only sshd.socket:
(quoted diff) +0
-2-SYSTEMD_PACKAGES = "${PN}-sshd" -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
(Sorry for not replying earlier, your message was moved into a filtered dir)
sshd.service was running a single SSH server for all incoming connections, suitable only for systems with a large amount of SSH traffic. In almost all other cases it is a better idea to use sshd.socket + [email protected] (i.e. the on-demand spawning version for one instance per connection).
[email protected] should not be start/restart by systemctl by postinst and to achieve this, IMO, it should be removed from SYSTEMD_SERVICE_${PN}-sshd.
Quoted 11 lines
Quoted 9 lines
(re)starting sshd@service from postinst is failing with:
SHR root@pjama /etc $ bash -x/var/lib/opkg/info/openssh-sshd.postinst
+ OPTS=
+ '[' -n '' ']'
+ type systemctl
+ systemctl enable sshd.socket [email protected] sshdgenkeys.service
+ '[' -z '' -a enable = enable ']'
+ systemctl restart sshd.socket [email protected] sshdgenkeys.service Failed to issue method call: Unit name [email protected] is not valid.ping
Quoted 64 lines · Muhammad Shakeel
Quoted 54 lines · Martin Jansa
Quoted 53 lines · Martin Jansa
Quoted 52 lines · On Tue, Sep 10, 2013 at 10:03:29PM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6e6445d487c033913a29763f8e3a7a339d5b612d URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6e6445d487c033913a29763f8e3a7a339d5b612dAuthor: Muhammad Shakeel <[email protected]> Date: Wed Sep 4 11:04:59 2013 +0000openssh: Add systemd support
-Remove dependency on meta-systemd
Signed-off-by Muhammad Shakeel <[email protected]>Signed-off-by Saul Wold <[email protected]>Signed-off-by Richard Purdie <[email protected]>---
.../openssh/openssh-6.2p2/sshd.socket | 11 +++++++++++ .../openssh/openssh-6.2p2/[email protected] | 9 +++++++++ .../openssh/openssh-6.2p2/sshdgenkeys.service | 10 ++++++++++ meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 19 +++++++++++++++++-- 4 files changed, 47 insertions(+), 2 deletions(-)meta/recipes-connectivity/openssh/openssh_6.2p2.bb +5
-2@@ -26,14 +26,17 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://init \ file://openssh-CVE-2011-4327.patch \ file://mac.patch \ - ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://sshd.socket \ + file://[email protected] \ + file://sshdgenkeys.service " PAM_SRC_URI = "file://sshd" SRC_URI[md5sum] = "be46174dcbb77ebb4ea88ef140685de1" SRC_URI[sha256sum] = "7f29b9d2ad672ae0f9e1dcbff871fc5c2e60a194e90c766432e32161b842313b" -inherit useradd update-rc.d update-alternatives +inherit useradd update-rc.d update-alternatives systemd USERADD_PACKAGES = "${PN}-sshd" USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"@@ -41,6 +44,9 @@ INITSCRIPT_PACKAGES = "${PN}-sshd" INITSCRIPT_NAME_${PN}-sshd = "sshd" INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"Quoted 7 lines
Review
Quoted 7 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb INITSCRIPT_PACKAGES = "${PN}-sshd" · line 48
Quoted 2 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb +2
-0+SYSTEMD_PACKAGES = "${PN}-sshd" +SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket [email protected] sshdgenkeys.service"Is it correct to use [email protected] here?
meta-systemd .bbappend had only sshd.socket:
(quoted diff) +0
-2-SYSTEMD_PACKAGES = "${PN}-sshd" -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"(Sorry for not replying earlier, your message was moved into a filtered dir)
Quoted 8 lines
sshd.service was running a single SSH server for all incoming connections, suitable only for systems with a large amount of SSH traffic. In almost all other cases it is a better idea to use sshd.socket + [email protected] (i.e. the on-demand spawning version for one instance per connection).
[email protected] should not be start/restart by systemctl by postinst and to achieve this, IMO, it should be removed from SYSTEMD_SERVICE_${PN}-sshd.
Can you please send patch for it?
Thanks
Quoted 12 lines
Quoted 11 lines
Quoted 9 lines
(re)starting sshd@service from postinst is failing with:
SHR root@pjama /etc $ bash -x/var/lib/opkg/info/openssh-sshd.postinst
+ OPTS=
+ '[' -n '' ']'
+ type systemctl
+ systemctl enable sshd.socket [email protected] sshdgenkeys.service
+ '[' -z '' -a enable = enable ']'
+ systemctl restart sshd.socket [email protected] sshdgenkeys.service Failed to issue method call: Unit name [email protected] is not valid.ping
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 71 lines · Martin Jansa
Quoted 70 lines · Muhammad Shakeel
Quoted 54 lines · Martin Jansa
Quoted 53 lines · Martin Jansa
Quoted 52 lines · On Tue, Sep 10, 2013 at 10:03:29PM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6e6445d487c033913a29763f8e3a7a339d5b612d URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6e6445d487c033913a29763f8e3a7a339d5b612dAuthor: Muhammad Shakeel <[email protected]> Date: Wed Sep 4 11:04:59 2013 +0000openssh: Add systemd support
-Remove dependency on meta-systemd
Signed-off-by Muhammad Shakeel <[email protected]>Signed-off-by Saul Wold <[email protected]>Signed-off-by Richard Purdie <[email protected]>---
.../openssh/openssh-6.2p2/sshd.socket | 11 +++++++++++ .../openssh/openssh-6.2p2/[email protected] | 9 +++++++++ .../openssh/openssh-6.2p2/sshdgenkeys.service | 10 ++++++++++ meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 19 +++++++++++++++++-- 4 files changed, 47 insertions(+), 2 deletions(-)meta/recipes-connectivity/openssh/openssh_6.2p2.bb +5
-2@@ -26,14 +26,17 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://init \ file://openssh-CVE-2011-4327.patch \ file://mac.patch \ - ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" + ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ + file://sshd.socket \ + file://[email protected] \ + file://sshdgenkeys.service " PAM_SRC_URI = "file://sshd" SRC_URI[md5sum] = "be46174dcbb77ebb4ea88ef140685de1" SRC_URI[sha256sum] = "7f29b9d2ad672ae0f9e1dcbff871fc5c2e60a194e90c766432e32161b842313b" -inherit useradd update-rc.d update-alternatives +inherit useradd update-rc.d update-alternatives systemd USERADD_PACKAGES = "${PN}-sshd" USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"@@ -41,6 +44,9 @@ INITSCRIPT_PACKAGES = "${PN}-sshd" INITSCRIPT_NAME_${PN}-sshd = "sshd" INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"Quoted 7 lines
Review
Quoted 7 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb INITSCRIPT_PACKAGES = "${PN}-sshd" · line 48
Quoted 2 lines
meta/recipes-connectivity/openssh/openssh_6.2p2.bb +2
-0+SYSTEMD_PACKAGES = "${PN}-sshd" +SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket [email protected] sshdgenkeys.service"Is it correct to use [email protected] here?
meta-systemd .bbappend had only sshd.socket:
(quoted diff) +0
-2-SYSTEMD_PACKAGES = "${PN}-sshd" -SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"(Sorry for not replying earlier, your message was moved into a filtered dir)
sshd.service was running a single SSH server for all incoming connections, suitable only for systems with a large amount of SSH traffic. In almost all other cases it is a better idea to use sshd.socket + [email protected] (i.e. the on-demand spawning version for one instance per connection).
Quoted 4 lines
Quoted 2 lines
[email protected] should not be start/restart by systemctl by postinst and to achieve this, IMO, it should be removed from SYSTEMD_SERVICE_${PN}-sshd.
Can you please send patch for it?
PING
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]