All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] [v3] openssh: Add systemd support
@ 2013-08-16 17:27 Shakeel, Muhammad
  2013-08-16 17:27 ` [PATCH 2/4] [v3] lighttpd: " Shakeel, Muhammad
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Shakeel, Muhammad @ 2013-08-16 17:27 UTC (permalink / raw)
  To: openembedded-core

From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

-Remove dependency on meta-systemd

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
 .../openssh/openssh-6.2p2/sshd.socket              |   11 +++++++++++
 .../openssh/openssh-6.2p2/sshd@.service            |    9 +++++++++
 .../openssh/openssh-6.2p2/sshdgenkeys.service      |   10 ++++++++++
 meta/recipes-connectivity/openssh/openssh_6.2p2.bb |   20 ++++++++++++++++++--
 4 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd.socket b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd.socket
new file mode 100644
index 0000000..753a33b
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd.socket
@@ -0,0 +1,11 @@
+[Unit]
+Conflicts=sshd.service
+
+[Socket]
+ExecStartPre=/bin/mkdir -p /var/run/sshd
+ListenStream=22
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
+Also=sshdgenkeys.service
diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd@.service b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd@.service
new file mode 100644
index 0000000..d118490
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=OpenSSH Per-Connection Daemon
+After=sshdgenkeys.service
+
+[Service]
+ExecStart=-/usr/sbin/sshd -i
+ExecReload=/bin/kill -HUP $MAINPID
+StandardInput=socket
+StandardError=syslog
diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/sshdgenkeys.service b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshdgenkeys.service
new file mode 100644
index 0000000..c717214
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshdgenkeys.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=SSH Key Generation
+
+[Service]
+ExecStart=/usr/bin/ssh-keygen -A
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb
index c76f9ac..8dac2f1 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb
@@ -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://sshd@.service \
+           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,10 @@ 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 sshd@.service sshdgenkeys.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
 PACKAGECONFIG ??= "tcp-wrappers"
 PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers"
 
@@ -93,6 +100,14 @@ 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 -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
+	sed -i 's,/bin/,${base_bindir}/,g' ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/sshd@.service
+	sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/sshd@.service
+	sed -i 's,/usr/bin/,${bindir}/,g' ${D}${systemd_unitdir}/system/sshdgenkeys.service
 }
 
 ALLOW_EMPTY_${PN} = "1"
@@ -102,6 +117,7 @@ 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 += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly"
+FILES_${PN}-sshd += "${systemd_unitdir}"
 FILES_${PN}-sftp = "${bindir}/sftp"
 FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
 FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] [v3] lighttpd: Add systemd support
  2013-08-16 17:27 [PATCH 1/4] [v3] openssh: Add systemd support Shakeel, Muhammad
@ 2013-08-16 17:27 ` Shakeel, Muhammad
  2013-08-16 17:27 ` [PATCH 3/4] [v3] rpcbind: " Shakeel, Muhammad
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Shakeel, Muhammad @ 2013-08-16 17:27 UTC (permalink / raw)
  To: openembedded-core

From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

- Remove dependency on meta-systemd

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
 .../lighttpd/files/lighttpd.service                |   12 ++++++++++++
 meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb  |   14 ++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/lighttpd/files/lighttpd.service b/meta/recipes-extended/lighttpd/files/lighttpd.service
new file mode 100644
index 0000000..a5333b6
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/files/lighttpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Lightning Fast Webserver With Light System Requirements
+After=network.target
+
+[Service]
+ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd.conf
+ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd.conf
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb
index 6635e31..3876fcc 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t
         file://index.html.lighttpd \
         file://lighttpd.conf \
         file://lighttpd \
+        file://lighttpd.service \
         "
 
 SRC_URI[md5sum] = "8e2d4ae8e918d4de1aeb9842584d170b"
@@ -39,19 +40,28 @@ EXTRA_OECONF = " \
              --disable-static \
 "
 
-inherit autotools pkgconfig update-rc.d gettext
+inherit autotools pkgconfig update-rc.d gettext systemd
 
 INITSCRIPT_NAME = "lighttpd"
 INITSCRIPT_PARAMS = "defaults 70"
 
+SYSTEMD_SERVICE_${PN} = "lighttpd.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
 do_install_append() {
 	install -d ${D}${sysconfdir}/init.d ${D}/www/logs ${D}/www/pages/dav ${D}/www/var
 	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
 	install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
 	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
+	sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/lighttpd.service
+	sed -i 's,/etc/,${sysconfdir}/,g' ${D}${systemd_unitdir}/system/lighttpd.service
+	sed -i 's,/bin/,${base_bindir}/,g' ${D}${systemd_unitdir}/system/lighttpd.service
 }
 
-FILES_${PN} += "${sysconfdir} /www"
+FILES_${PN} += "${sysconfdir} /www ${systemd_unitdir}"
 
 CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
 
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] [v3] rpcbind: Add systemd support
  2013-08-16 17:27 [PATCH 1/4] [v3] openssh: Add systemd support Shakeel, Muhammad
  2013-08-16 17:27 ` [PATCH 2/4] [v3] lighttpd: " Shakeel, Muhammad
@ 2013-08-16 17:27 ` Shakeel, Muhammad
  2013-08-16 17:27 ` [PATCH 4/4] [v3] nfs-utils: " Shakeel, Muhammad
  2013-08-16 17:47 ` [PATCH 1/4] [v3] openssh: " Khem Raj
  3 siblings, 0 replies; 9+ messages in thread
From: Shakeel, Muhammad @ 2013-08-16 17:27 UTC (permalink / raw)
  To: openembedded-core

From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

- Remove dependency on meta-systemd

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
 meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf |    3 +++
 .../rpcbind/rpcbind/rpcbind.service                |   14 ++++++++++++++
 meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb     |   15 ++++++++++++++-
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
new file mode 100644
index 0000000..2a4dfbc
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.conf
@@ -0,0 +1,3 @@
+# Optional arguments passed to rpcbind.
+#
+RPCBIND_OPTS=""
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
new file mode 100644
index 0000000..fa217b9
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=RPC Bind
+After=network.target
+Wants=rpcbind.target
+Before=rpcbind.target
+
+[Service]
+Type=forking
+EnvironmentFile=-/etc/rpcbind.conf
+ExecStart=/usr/sbin/rpcbind -w $RPCBIND_OPTS
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
index be2897c..b65c7aa 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -15,6 +15,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
            file://fix_host_path.patch \
            file://obsolete_automake_macros.patch \
            ${UCLIBCPATCHES} \
+           file://rpcbind.conf \
+           file://rpcbind.service \
           "
 
 UCLIBCPATCHES_libc-uclibc = "file://0001-uclibc-nss.patch \
@@ -27,7 +29,7 @@ SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497
 
 PR = "r4"
 
-inherit autotools update-rc.d
+inherit autotools update-rc.d systemd
 
 PACKAGECONFIG ??= "tcp-wrappers"
 PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
@@ -35,6 +37,11 @@ PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
 INITSCRIPT_NAME = "rpcbind"
 INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
 
+SYSTEMD_SERVICE_${PN} = "rpcbind.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+EXTRA_OECONF += " --enable-warmstarts "
+
 do_install_append () {
 	mv ${D}${bindir} ${D}${sbindir}
 
@@ -43,4 +50,10 @@ do_install_append () {
 		-e 's,/sbin/,${sbindir}/,g' \
 		${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
 	chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
+
+	install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
+	sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/rpcbind.service
+	sed -i 's,/etc/,${sysconfdir}/,g' ${D}${systemd_unitdir}/system/rpcbind.service
 }
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] [v3] nfs-utils: Add systemd support
  2013-08-16 17:27 [PATCH 1/4] [v3] openssh: Add systemd support Shakeel, Muhammad
  2013-08-16 17:27 ` [PATCH 2/4] [v3] lighttpd: " Shakeel, Muhammad
  2013-08-16 17:27 ` [PATCH 3/4] [v3] rpcbind: " Shakeel, Muhammad
@ 2013-08-16 17:27 ` Shakeel, Muhammad
  2013-08-16 17:47 ` [PATCH 1/4] [v3] openssh: " Khem Raj
  3 siblings, 0 replies; 9+ messages in thread
From: Shakeel, Muhammad @ 2013-08-16 17:27 UTC (permalink / raw)
  To: openembedded-core

From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

- Remove dependency on meta-systemd

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
 .../nfs-utils/nfs-utils/nfs-mountd.service         |   11 ++++++
 .../nfs-utils/nfs-utils/nfs-server.service         |   18 ++++++++++
 .../nfs-utils/nfs-utils/nfs-statd.service          |   12 +++++++
 .../nfs-utils/nfs-utils/nfs-utils.conf             |   35 ++++++++++++++++++++
 .../nfs-utils/nfs-utils_1.2.8.bb                   |   20 +++++++++--
 5 files changed, 94 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
new file mode 100644
index 0000000..2e8dc03
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=NFS Mount Daemon
+After=rpcbind.service nfs-server.service
+Requires=rpcbind.service nfs-server.service
+
+[Service]
+EnvironmentFile=-/etc/nfs-utils.conf
+ExecStart=/usr/sbin/rpc.mountd -F $MOUNTD_OPTS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
new file mode 100644
index 0000000..6c1eacb
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=NFS Server
+Requires=rpcbind.service nfs-mountd.service
+After=rpcbind.service
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/nfs-utils.conf
+ExecStartPre=/usr/sbin/exportfs -r
+ExecStart=/usr/sbin/rpc.nfsd $NFSD_OPTS $NFSD_COUNT
+ExecStop=/usr/sbin/rpc.nfsd 0
+ExecStopPost=/usr/sbin/exportfs -f
+ExecReload=/usr/sbin/exportfs -r
+StandardError=syslog
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
new file mode 100644
index 0000000..ca53527
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=NFS file locking service
+After=rpcbind.service
+Requires=rpcbind.service
+Before=remote-fs-pre.target
+
+[Service]
+EnvironmentFile=-/etc/nfs-utils.conf
+ExecStart=/usr/sbin/rpc.statd -F $STATD_OPTS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.conf b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.conf
new file mode 100644
index 0000000..a1007a7
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.conf
@@ -0,0 +1,35 @@
+# Parameters to be passed to nfs-utils (clients & server) service files.
+#
+
+# Options to pass to rpc.nfsd.
+NFSD_OPTS=""
+
+# Number of servers to start up; the default is 8 servers.
+NFSD_COUNT=""
+
+# Where to mount nfsd filesystem; the default is "/proc/fs/nfsd".
+PROCNFSD_MOUNTPOINT=""
+
+# Options used to mount nfsd filesystem; the default is "rw,nodev,noexec,nosuid".
+PROCNFSD_MOUNTOPTS=""
+
+# Options for rpc.mountd.
+# If you have a port-based firewall, you might want to set up
+# a fixed port here using the --port option.
+MOUNTD_OPTS=""
+
+# Parameters to be passed to nfs-common (nfs clients & server) init script.
+#
+
+# If you do not set values for the NEED_ options, they will be attempted
+# autodetected; this should be sufficient for most people. Valid alternatives
+# for the NEED_ options are "yes" and "no".
+
+# Do you want to start the statd daemon? It is not needed for NFSv4.
+NEED_STATD=""
+
+# Options to pass to rpc.statd.
+# N.B. statd normally runs on both client and server, and run-time
+# options should be specified accordingly.
+# STATD_OPTS="-p 32765 -o 32766"
+STATD_OPTS=""
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb
index fd6d33e..f684424 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.8.bb
@@ -15,7 +15,11 @@ RRECOMMENDS_${PN} = "kernel-module-nfsd"
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.bz2 \
            file://nfs-utils-1.0.6-uclibc.patch \
            file://nfs-utils-1.2.3-sm-notify-res_init.patch \
-           file://nfsserver"
+           file://nfsserver \
+           file://nfs-utils.conf \
+           file://nfs-server.service \
+           file://nfs-mountd.service \
+           file://nfs-statd.service "
 
 SRC_URI[md5sum] = "6e7d97de51e428a0b8698c16ca23db77"
 SRC_URI[sha256sum] = "1cc8f02a633eddbf0a1d93421f331479c4cdab4c5ab33b8bf8c7c369f9156ac6"
@@ -31,7 +35,10 @@ INITSCRIPT_NAME = "nfsserver"
 # in the shutdown levels, but that works fine.
 INITSCRIPT_PARAMS = "defaults"
 
-inherit autotools update-rc.d
+inherit autotools update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service nfs-statd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
 
 # --enable-uuid is need for cross-compiling
 EXTRA_OECONF = "--with-statduser=nobody \
@@ -65,6 +72,15 @@ do_install_append () {
 	install -d ${D}${sysconfdir}/init.d
 	install -d ${D}${localstatedir}/lib/nfs/statd
 	install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
+
+	install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
+	install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/
+	install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/
+	sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${systemd_unitdir}/system/*.service
+	sed -i 's,/etc/,${sysconfdir}/,g' ${D}${systemd_unitdir}/system/*.service
+
 	# kernel code as of 3.8 hard-codes this path as a default
 	install -d ${D}/var/lib/nfs/v4recovery
 
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] [v3] openssh: Add systemd support
  2013-08-16 17:27 [PATCH 1/4] [v3] openssh: Add systemd support Shakeel, Muhammad
                   ` (2 preceding siblings ...)
  2013-08-16 17:27 ` [PATCH 4/4] [v3] nfs-utils: " Shakeel, Muhammad
@ 2013-08-16 17:47 ` Khem Raj
  2013-08-19  6:18   ` Muhammad Shakeel
  3 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2013-08-16 17:47 UTC (permalink / raw)
  To: Shakeel, Muhammad; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 5906 bytes --]

On Fri, Aug 16, 2013 at 10:27 AM, Shakeel, Muhammad <
muhammad_shakeel@mentor.com> wrote:

> From: Muhammad Shakeel <muhammad_shakeel@mentor.com>
>
> -Remove dependency on meta-systemd
>
> Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
> ---
>  .../openssh/openssh-6.2p2/sshd.socket              |   11 +++++++++++
>  .../openssh/openssh-6.2p2/sshd@.service            |    9 +++++++++
>  .../openssh/openssh-6.2p2/sshdgenkeys.service      |   10 ++++++++++
>  meta/recipes-connectivity/openssh/openssh_6.2p2.bb |   20
> ++++++++++++++++++--
>  4 files changed, 48 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd.socket
> b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd.socket
> new file mode 100644
> index 0000000..753a33b
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd.socket
> @@ -0,0 +1,11 @@
> +[Unit]
> +Conflicts=sshd.service
> +
> +[Socket]
> +ExecStartPre=/bin/mkdir -p /var/run/sshd
> +ListenStream=22
> +Accept=yes
> +
> +[Install]
> +WantedBy=sockets.target
> +Also=sshdgenkeys.service
> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd@.service
> b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd@.service
> new file mode 100644
> index 0000000..d118490
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshd@.service
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=OpenSSH Per-Connection Daemon
> +After=sshdgenkeys.service
> +
> +[Service]
> +ExecStart=-/usr/sbin/sshd -i
> +ExecReload=/bin/kill -HUP $MAINPID
> +StandardInput=socket
> +StandardError=syslog
> diff --git
> a/meta/recipes-connectivity/openssh/openssh-6.2p2/sshdgenkeys.service
> b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshdgenkeys.service
> new file mode 100644
> index 0000000..c717214
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/sshdgenkeys.service
> @@ -0,0 +1,10 @@
> +[Unit]
> +Description=SSH Key Generation
> +
> +[Service]
> +ExecStart=/usr/bin/ssh-keygen -A
> +Type=oneshot
> +RemainAfterExit=yes
> +
> +[Install]
> +WantedBy=multi-user.target
>



it would be nice if it was using libdir/bindir instead of hardcoded paths
coudld be achieved by generating the unit files from some sort of .in files
at build time so it could benefit
the distros which dont use /usr e.g.

​​

> diff --git a/meta/recipes-connectivity/openssh/openssh_6.2p2.bbb/meta/recipes-connectivity/openssh/
> openssh_6.2p2.bb
> index c76f9ac..8dac2f1 100644
> --- a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb
> +++ b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb
> @@ -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://sshd@.service \
> +           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,10 @@ 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 sshd@.service
> sshdgenkeys.service"
> +SYSTEMD_AUTO_ENABLE = "enable"
> +
>  PACKAGECONFIG ??= "tcp-wrappers"
>  PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers"
>
> @@ -93,6 +100,14 @@ 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 -m 0644 ${WORKDIR}/sshd.socket
> ${D}${systemd_unitdir}/system
> +       install -m 0644 ${WORKDIR}/sshd@.service
> ${D}${systemd_unitdir}/system
> +       install -m 0644 ${WORKDIR}/sshdgenkeys.service
> ${D}${systemd_unitdir}/system
> +       sed -i 's,/bin/,${base_bindir}/,g'
> ${D}${systemd_unitdir}/system/sshd.socket
> ${D}${systemd_unitdir}/system/sshd@.service
> +       sed -i 's,/usr/sbin/,${sbindir}/,g'
> ${D}${systemd_unitdir}/system/sshd@.service
> +       sed -i 's,/usr/bin/,${bindir}/,g'
> ${D}${systemd_unitdir}/system/sshdgenkeys.service
>  }
>
>  ALLOW_EMPTY_${PN} = "1"
> @@ -102,6 +117,7 @@ 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 += "${sysconfdir}/ssh/moduli
> ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly"
> +FILES_${PN}-sshd += "${systemd_unitdir}"
>  FILES_${PN}-sftp = "${bindir}/sftp"
>  FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
>  FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
> --
> 1.7.9.5
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 8343 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] [v3] openssh: Add systemd support
  2013-08-16 17:47 ` [PATCH 1/4] [v3] openssh: " Khem Raj
@ 2013-08-19  6:18   ` Muhammad Shakeel
  2013-08-19  6:40     ` Khem Raj
  0 siblings, 1 reply; 9+ messages in thread
From: Muhammad Shakeel @ 2013-08-19  6:18 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

On 08/16/2013 10:47 PM, Khem Raj wrote:
>
>
>
> On Fri, Aug 16, 2013 at 10:27 AM, Shakeel, Muhammad 
> <muhammad_shakeel@mentor.com <mailto:muhammad_shakeel@mentor.com>> wrote:
>
>     From: Muhammad Shakeel <muhammad_shakeel@mentor.com
>     <mailto:muhammad_shakeel@mentor.com>>
>
>     -Remove dependency on meta-systemd
>
>     +[Service]
>     +ExecStart=-/usr/sbin/sshd -i
>
>
>
> it would be nice if it was using libdir/bindir instead of hardcoded paths
> coudld be achieved by generating the unit files from some sort of .in 
> files at build time so it could benefit
> the distros which dont use /usr e.g.
> ​​
>
>     +       sed -i 's,/bin/,${base_bindir}/,g'
>     ${D}${systemd_unitdir}/system/sshd.socket
>     ${D}${systemd_unitdir}/system/sshd@.service
>     +       sed -i 's,/usr/sbin/,${sbindir}/,g'
>     ${D}${systemd_unitdir}/system/sshd@.service
>     +       sed -i 's,/usr/bin/,${bindir}/,g'
>     ${D}${systemd_unitdir}/system/sshdgenkeys.service
>
>
/usr/sbin/ is being sed'ed with ${sbindir} in do_install_append of the 
respective recipe file. /usr/bin/ and /bin/ is also taken care of.

Regards

[-- Attachment #2: Type: text/html, Size: 3361 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] [v3] openssh: Add systemd support
  2013-08-19  6:18   ` Muhammad Shakeel
@ 2013-08-19  6:40     ` Khem Raj
  2013-08-19 21:00       ` Saul Wold
  0 siblings, 1 reply; 9+ messages in thread
From: Khem Raj @ 2013-08-19  6:40 UTC (permalink / raw)
  To: Muhammad Shakeel; +Cc: Patches and discussions about the oe-core layer

On Sun, Aug 18, 2013 at 11:18 PM, Muhammad Shakeel
<muhammad_shakeel@mentor.com> wrote:
> /usr/sbin/ is being sed'ed with ${sbindir} in do_install_append of the
> respective recipe file. /usr/bin/ and /bin/ is also taken care of.

i see, thats better. however I do see a need to have  a generalized
way of specifying service files and a generic
processing engine which then takes care of it. Otherwise we have the
same code replicated in multiple recipes


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] [v3] openssh: Add systemd support
  2013-08-19  6:40     ` Khem Raj
@ 2013-08-19 21:00       ` Saul Wold
  2013-08-20  6:54         ` Muhammad Shakeel
  0 siblings, 1 reply; 9+ messages in thread
From: Saul Wold @ 2013-08-19 21:00 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On 08/18/2013 11:40 PM, Khem Raj wrote:
> On Sun, Aug 18, 2013 at 11:18 PM, Muhammad Shakeel
> <muhammad_shakeel@mentor.com> wrote:
>> /usr/sbin/ is being sed'ed with ${sbindir} in do_install_append of the
>> respective recipe file. /usr/bin/ and /bin/ is also taken care of.
>
> i see, thats better. however I do see a need to have  a generalized
> way of specifying service files and a generic
> processing engine which then takes care of it. Otherwise we have the
> same code replicated in multiple recipes

Agreed, I think there should be a generalized solution here, implemented 
in the systemd.bbclass.

It also appears that this set is also creating a /lib dir that should 
not be there for non-systemd builds.

> ERROR: Task 25 (/home/sgw/yocto/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb, do_package) failed with exit code '1'
> ERROR: QA Issue: nfs-utils: Files/directories were installed but not shipped
>   /lib
> ERROR: QA run found fatal errors. Please consider fixing them.
> ERROR: Function failed: do_package_qa
> ERROR: Logfile of failure stored in: /home/sgw/yocto/builds/world/tmp/work/x86_64-poky-linux/nfs-utils/1.2.8-r0/temp/log.do_package.17558

Thanks
	Sau!


> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] [v3] openssh: Add systemd support
  2013-08-19 21:00       ` Saul Wold
@ 2013-08-20  6:54         ` Muhammad Shakeel
  0 siblings, 0 replies; 9+ messages in thread
From: Muhammad Shakeel @ 2013-08-20  6:54 UTC (permalink / raw)
  To: Saul Wold; +Cc: Patches and discussions about the oe-core layer

On 08/20/2013 02:00 AM, Saul Wold wrote:
> On 08/18/2013 11:40 PM, Khem Raj wrote:
>> On Sun, Aug 18, 2013 at 11:18 PM, Muhammad Shakeel
>> <muhammad_shakeel@mentor.com> wrote:
>>> /usr/sbin/ is being sed'ed with ${sbindir} in do_install_append of the
>>> respective recipe file. /usr/bin/ and /bin/ is also taken care of.
>>
>> i see, thats better. however I do see a need to have  a generalized
>> way of specifying service files and a generic
>> processing engine which then takes care of it. Otherwise we have the
>> same code replicated in multiple recipes
>
> Agreed, I think there should be a generalized solution here, 
> implemented in the systemd.bbclass.
This is not required for all of the systemd unit files. Packages which 
have upstream systemd support, e.g. avahi, ofono they install service 
file theirselves.
I have already discussed to move this 'sed' part into systemd.bbclass 
but Ross Burton had other ideas. 
http://patches.openembedded.org/patch/53489/

So what is your final recommendation here?

> It also appears that this set is also creating a /lib dir that should 
> not be there for non-systemd builds.
>
>> ERROR: Task 25 
>> (/home/sgw/yocto/poky/meta/recipes-extended/lighttpd/lighttpd_1.4.32.bb, 
>> do_package) failed with exit code '1'
>> ERROR: QA Issue: nfs-utils: Files/directories were installed but not 
>> shipped
>>   /lib
>> ERROR: QA run found fatal errors. Please consider fixing them.
>> ERROR: Function failed: do_package_qa
>> ERROR: Logfile of failure stored in: 
>> /home/sgw/yocto/builds/world/tmp/work/x86_64-poky-linux/nfs-utils/1.2.8-r0/temp/log.do_package.17558
Sorry about this error, I will fix this in next version.

Regards
--Shakeel


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-20  6:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-16 17:27 [PATCH 1/4] [v3] openssh: Add systemd support Shakeel, Muhammad
2013-08-16 17:27 ` [PATCH 2/4] [v3] lighttpd: " Shakeel, Muhammad
2013-08-16 17:27 ` [PATCH 3/4] [v3] rpcbind: " Shakeel, Muhammad
2013-08-16 17:27 ` [PATCH 4/4] [v3] nfs-utils: " Shakeel, Muhammad
2013-08-16 17:47 ` [PATCH 1/4] [v3] openssh: " Khem Raj
2013-08-19  6:18   ` Muhammad Shakeel
2013-08-19  6:40     ` Khem Raj
2013-08-19 21:00       ` Saul Wold
2013-08-20  6:54         ` Muhammad Shakeel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.