All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/4] systemd related fixes post 1.6
@ 2014-04-24  2:07 Chen Qi
  2014-04-24  2:07 ` [PATCH V2 1/4] cronie: add systemd support Chen Qi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chen Qi @ 2014-04-24  2:07 UTC (permalink / raw)
  To: openembedded-core

Changes since V1:
1. Fix an error in generate-rndc-key.sh. The command should be `chmod' instead of `chown'.

The following changes since commit bec37f8b85b6dd1e4e1c1b9b215a7952ca2fc386:

  build-appliance-image: Update to  head revision (2014-04-22 22:53:34 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/systemd-post-1.6
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/systemd-post-1.6

Chen Qi (4):
  cronie: add systemd support
  bind: add systemd support
  ppp: add systemd support
  tcf-agent: add systemd support

 .../bind/bind/generate-rndc-key.sh                 |    7 +++++++
 meta/recipes-connectivity/bind/bind/named.service  |   22 ++++++++++++++++++++
 meta/recipes-connectivity/bind/bind_9.9.5.bb       |   17 ++++++++++++++-
 meta/recipes-connectivity/ppp/ppp/ppp@.service     |    9 ++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.6.bb         |    9 ++++++--
 .../tcf-agent/tcf-agent/tcf-agent.service          |   10 +++++++++
 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb   |    8 ++++++-
 meta/recipes-extended/cronie/cronie/crond.service  |   11 ++++++++++
 meta/recipes-extended/cronie/cronie_1.4.11.bb      |   12 ++++++++++-
 9 files changed, 100 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
 create mode 100644 meta/recipes-connectivity/bind/bind/named.service
 create mode 100644 meta/recipes-connectivity/ppp/ppp/ppp@.service
 create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
 create mode 100644 meta/recipes-extended/cronie/cronie/crond.service

-- 
1.7.9.5



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

* [PATCH V2 1/4] cronie: add systemd support
  2014-04-24  2:07 [PATCH V2 0/4] systemd related fixes post 1.6 Chen Qi
@ 2014-04-24  2:07 ` Chen Qi
  2014-04-24  2:07 ` [PATCH V2 2/4] bind: " Chen Qi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Chen Qi @ 2014-04-24  2:07 UTC (permalink / raw)
  To: openembedded-core

Add systemd support for cronie.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-extended/cronie/cronie/crond.service |   11 +++++++++++
 meta/recipes-extended/cronie/cronie_1.4.11.bb     |   12 +++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/cronie/cronie/crond.service

diff --git a/meta/recipes-extended/cronie/cronie/crond.service b/meta/recipes-extended/cronie/cronie/crond.service
new file mode 100644
index 0000000..d435a6e
--- /dev/null
+++ b/meta/recipes-extended/cronie/cronie/crond.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Periodic Command Scheduler
+
+[Service]
+EnvironmentFile=/etc/sysconfig/crond
+ExecStart=@SBINDIR@/crond -n $CRONDARGS
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cronie/cronie_1.4.11.bb b/meta/recipes-extended/cronie/cronie_1.4.11.bb
index d98d0d9..2a932e0 100644
--- a/meta/recipes-extended/cronie/cronie_1.4.11.bb
+++ b/meta/recipes-extended/cronie/cronie_1.4.11.bb
@@ -19,6 +19,7 @@ SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
            file://fix-out-of-tree-build.patch \
            file://crond.init \
            file://crontab \
+           file://crond.service \
            ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
 
 PAM_SRC_URI = "file://crond_pam_config.patch"
@@ -27,7 +28,7 @@ PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
 SRC_URI[md5sum] = "2ba645cf54de17f138ef70312843862f"
 SRC_URI[sha256sum] = "fd08084cedddbb42499f80ddb7f2158195c3555c2ff40ee11d4ece2f9864d7be"
 
-inherit autotools update-rc.d useradd
+inherit autotools update-rc.d useradd systemd
 
 
 PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
@@ -42,12 +43,21 @@ INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "--system crontab"
 
+SYSTEMD_SERVICE_${PN} = "crond.service"
+
 do_install_append () {
 	install -d ${D}${sysconfdir}/sysconfig/
 	install -d ${D}${sysconfdir}/init.d/
 	install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
 	install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
 
+	# install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+	       -e 's,@SBINDIR@,${sbindir},g' \
+	       ${D}${systemd_unitdir}/system/crond.service
+
 	# below are necessary for a complete cron environment
 	install -d ${D}${localstatedir}/spool/cron
 	install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
-- 
1.7.9.5



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

* [PATCH V2 2/4] bind: add systemd support
  2014-04-24  2:07 [PATCH V2 0/4] systemd related fixes post 1.6 Chen Qi
  2014-04-24  2:07 ` [PATCH V2 1/4] cronie: add systemd support Chen Qi
@ 2014-04-24  2:07 ` Chen Qi
  2014-04-24  2:07 ` [PATCH V2 3/4] ppp: " Chen Qi
  2014-04-24  2:07 ` [PATCH V2 4/4] tcf-agent: " Chen Qi
  3 siblings, 0 replies; 5+ messages in thread
From: Chen Qi @ 2014-04-24  2:07 UTC (permalink / raw)
  To: openembedded-core

Add systemd support for bind.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../bind/bind/generate-rndc-key.sh                 |    7 +++++++
 meta/recipes-connectivity/bind/bind/named.service  |   22 ++++++++++++++++++++
 meta/recipes-connectivity/bind/bind_9.9.5.bb       |   17 ++++++++++++++-
 3 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
 create mode 100644 meta/recipes-connectivity/bind/bind/named.service

diff --git a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
new file mode 100644
index 0000000..db20127
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ ! -s /etc/bind/rndc.key ]; then
+    echo -n "Generating /etc/bind/rndc.key:"
+    /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
+    chmod 0640 /etc/bind/rndc.key
+fi
diff --git a/meta/recipes-connectivity/bind/bind/named.service b/meta/recipes-connectivity/bind/bind/named.service
new file mode 100644
index 0000000..1792e41
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/named.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Berkeley Internet Name Domain (DNS)
+Wants=nss-lookup.target
+Before=nss-lookup.target
+After=network.target
+
+[Service]
+Type=forking
+EnvironmentFile=-/etc/sysconfig/named
+PIDFile=/run/named/named.pid
+
+ExecStartPre=@SBINDIR@/generate-rndc-key.sh
+ExecStart=@SBINDIR@/named $OPTIONS
+
+ExecReload=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc reload > /dev/null 2>&1 || @BASE_BINDIR@/kill -HUP $MAINPID'
+
+ExecStop=@BASE_BINDIR@/sh -c '@SBINDIR@/rndc stop > /dev/null 2>&1 || @BASE_BINDIR@/kill -TERM $MAINPID'
+
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/bind/bind_9.9.5.bb b/meta/recipes-connectivity/bind/bind_9.9.5.bb
index 604deb6..053c352 100644
--- a/meta/recipes-connectivity/bind/bind_9.9.5.bb
+++ b/meta/recipes-connectivity/bind/bind_9.9.5.bb
@@ -13,6 +13,8 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
            file://make-etc-initd-bind-stop-work.patch \
            file://mips1-not-support-opcode.diff \
            file://dont-test-on-host.patch \
+           file://generate-rndc-key.sh \
+           file://named.service \
 	   "
 
 SRC_URI[md5sum] = "e676c65cad5234617ee22f48e328c24e"
@@ -27,11 +29,13 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
                  --with-openssl=${STAGING_LIBDIR}/.. --with-libxml2=${STAGING_LIBDIR}/.. \
                  --enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \
                "
-inherit autotools-brokensep update-rc.d
+inherit autotools-brokensep update-rc.d systemd
 
 INITSCRIPT_NAME = "bind"
 INITSCRIPT_PARAMS = "defaults"
 
+SYSTEMD_SERVICE_${PN} = "named.service"
+
 PARALLEL_MAKE = ""
 
 RDEPENDS_${PN} = "python-core"
@@ -39,6 +43,7 @@ RDEPENDS_${PN} = "python-core"
 PACKAGES_prepend = " ${PN}-utils "
 FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
 FILES_${PN}-dev += "${bindir}/isc-config.h"
+FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
 
 do_install_append() {
 	rm "${D}${bindir}/nslookup"
@@ -50,6 +55,16 @@ do_install_append() {
 	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
 	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
 	sed -i -e '1s,#!.*python,#! /usr/bin/env python,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
+
+	# Install systemd related files
+	install -d ${D}${localstatedir}/cache/bind
+	install -d ${D}${sbindir}
+	install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+	       -e 's,@SBINDIR@,${sbindir},g' \
+	       ${D}${systemd_unitdir}/system/named.service
 }
 
 CONFFILES_${PN} = " \
-- 
1.7.9.5



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

* [PATCH V2 3/4] ppp: add systemd support
  2014-04-24  2:07 [PATCH V2 0/4] systemd related fixes post 1.6 Chen Qi
  2014-04-24  2:07 ` [PATCH V2 1/4] cronie: add systemd support Chen Qi
  2014-04-24  2:07 ` [PATCH V2 2/4] bind: " Chen Qi
@ 2014-04-24  2:07 ` Chen Qi
  2014-04-24  2:07 ` [PATCH V2 4/4] tcf-agent: " Chen Qi
  3 siblings, 0 replies; 5+ messages in thread
From: Chen Qi @ 2014-04-24  2:07 UTC (permalink / raw)
  To: openembedded-core

Add systemd support for ppp.
The unit file mostly comes from ArchLinux.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-connectivity/ppp/ppp/ppp@.service |    9 +++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.6.bb     |    9 +++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-connectivity/ppp/ppp/ppp@.service

diff --git a/meta/recipes-connectivity/ppp/ppp/ppp@.service b/meta/recipes-connectivity/ppp/ppp/ppp@.service
new file mode 100644
index 0000000..2bf0b5e
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp/ppp@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=PPP link to %I
+Before=network.target
+
+[Service]
+ExecStart=@SBINDIR@/pppd call %I nodetach nolog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb b/meta/recipes-connectivity/ppp/ppp_2.4.6.bb
index b98abec..8bc3672 100644
--- a/meta/recipes-connectivity/ppp/ppp_2.4.6.bb
+++ b/meta/recipes-connectivity/ppp/ppp_2.4.6.bb
@@ -28,12 +28,13 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
            file://ppp_on_boot \
            file://provider \
            file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
+           file://ppp@.service \
 "
 
 SRC_URI[md5sum] = "3434d2cc9327167a0723aaaa8670083b"
 SRC_URI[sha256sum] = "1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d"
 
-inherit autotools-brokensep
+inherit autotools-brokensep systemd
 
 TARGET_CC_ARCH += " ${LDFLAGS}"
 EXTRA_OEMAKE = "STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}"
@@ -61,13 +62,17 @@ do_install_append () {
 	install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts
 	install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot
 	install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' \
+	       ${D}${systemd_unitdir}/system/ppp@.service
 	rm -rf ${D}/${mandir}/man8/man8
 	chmod u+s ${D}${sbindir}/pppd
 }
 
 CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
 PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools"
-FILES_${PN}        = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd"
+FILES_${PN}        = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_unitdir}/system/ppp@.service"
 FILES_${PN}-dbg += "${libdir}/pppd/${PV}/.debug"
 FILES_${PN}-oa       = "${libdir}/pppd/${PV}/pppoatm.so"
 FILES_${PN}-oe       = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/rp-pppoe.so"
-- 
1.7.9.5



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

* [PATCH V2 4/4] tcf-agent: add systemd support
  2014-04-24  2:07 [PATCH V2 0/4] systemd related fixes post 1.6 Chen Qi
                   ` (2 preceding siblings ...)
  2014-04-24  2:07 ` [PATCH V2 3/4] ppp: " Chen Qi
@ 2014-04-24  2:07 ` Chen Qi
  3 siblings, 0 replies; 5+ messages in thread
From: Chen Qi @ 2014-04-24  2:07 UTC (permalink / raw)
  To: openembedded-core

Add systemd unit file tcf-agent.service.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../tcf-agent/tcf-agent/tcf-agent.service          |   10 ++++++++++
 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb   |    8 +++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service

diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
new file mode 100644
index 0000000..5d7a586
--- /dev/null
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Target Communication Framework agent
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/tcf-agent -d -L- -l0
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index 1eb0021..616a6a7 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -12,6 +12,7 @@ PR = "r2"
 SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git \
            file://fix_ranlib.patch \
            file://tcf-agent.init \
+           file://tcf-agent.service \
           "
 
 DEPENDS = "util-linux openssl"
@@ -19,7 +20,9 @@ RDEPENDS_${PN} = "bash"
 
 S = "${WORKDIR}/git"
 
-inherit update-rc.d
+inherit update-rc.d systemd
+
+SYSTEMD_SERVICE_${PN} = "tcf-agent.service"
 
 INITSCRIPT_NAME = "tcf-agent"
 INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
@@ -44,5 +47,8 @@ do_install() {
 	oe_runmake install INSTALLROOT=${D}
 	install -d ${D}${sysconfdir}/init.d/
 	install -m 0755 ${WORKDIR}/tcf-agent.init ${D}${sysconfdir}/init.d/tcf-agent
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/tcf-agent.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tcf-agent.service
 }
 
-- 
1.7.9.5



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

end of thread, other threads:[~2014-04-24  2:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24  2:07 [PATCH V2 0/4] systemd related fixes post 1.6 Chen Qi
2014-04-24  2:07 ` [PATCH V2 1/4] cronie: add systemd support Chen Qi
2014-04-24  2:07 ` [PATCH V2 2/4] bind: " Chen Qi
2014-04-24  2:07 ` [PATCH V2 3/4] ppp: " Chen Qi
2014-04-24  2:07 ` [PATCH V2 4/4] tcf-agent: " Chen Qi

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.