All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Cc: openembedded-devel@lists.openembedded.org
Subject: [PATCH 01/22] busybox: enable systemd integration for syslogd
Date: Fri, 22 Mar 2013 17:38:21 +0000	[thread overview]
Message-ID: <9ef1ee1552757f3cf5cb979a9df7cf45f38b2f7a.1363973088.git.ross.burton@intel.com> (raw)
In-Reply-To: <cover.1363973088.git.ross.burton@intel.com>
In-Reply-To: <cover.1363973088.git.ross.burton@intel.com>

From: Radu Moisan <radu.moisan@intel.com>

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-core/busybox/busybox.inc                |   18 ++++++++++++++++--
 meta/recipes-core/busybox/busybox_1.20.2.bb          |    2 ++
 .../busybox/files/busybox-klogd.service.in           |    8 ++++++++
 .../busybox/files/busybox-syslog.service.in          |   13 +++++++++++++
 4 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/busybox/files/busybox-klogd.service.in
 create mode 100644 meta/recipes-core/busybox/files/busybox-syslog.service.in

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index fc6ca91..e936e59 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -18,7 +18,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"
 PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
 
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${systemd_unitdir}/system/syslog.service"
 FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
 FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
@@ -32,12 +32,16 @@ INITSCRIPT_NAME_${PN}-mdev = "mdev"
 INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
 INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
+
+SYSTEMD_PACKAGES = "${PN}-syslog"
+SYSTEMD_SERVICE_${PN}-syslog = "${PN}-syslog.service"
+
 CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
 CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
 
-inherit cml1 update-rc.d
+inherit cml1 systemd update-rc.d
 
 # internal helper
 def busybox_cfg(feature, features, tokens, cnf, rem):
@@ -213,6 +217,16 @@ do_install () {
                fi
 	fi
 	install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
+
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
+            > ${D}${systemd_unitdir}/system/busybox-syslog.service
+        sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \
+            > ${D}${systemd_unitdir}/system/busybox-klogd.service
+
+        ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
+    fi
 }
 
 inherit update-alternatives
diff --git a/meta/recipes-core/busybox/busybox_1.20.2.bb b/meta/recipes-core/busybox/busybox_1.20.2.bb
index 783261e..a02cd38 100644
--- a/meta/recipes-core/busybox/busybox_1.20.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.20.2.bb
@@ -28,6 +28,8 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://fix-for-spurious-testsuite-failure.patch \
            file://busybox-1.20.2-kernel_ver.patch \
            file://stat-usr-bin.patch \
+           file://busybox-syslog.service.in \
+           file://busybox-klogd.service.in \
            file://testsuite-du-du-k-works-fix-false-positive.patch"
 
 SRC_URI[tarball.md5sum] = "e025414bc6cd79579cc7a32a45d3ae1c"
diff --git a/meta/recipes-core/busybox/files/busybox-klogd.service.in b/meta/recipes-core/busybox/files/busybox-klogd.service.in
new file mode 100644
index 0000000..d7c7755
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-klogd.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Kernel Logging Service
+
+[Service]
+ExecStart=@base_sbindir@/klogd -n
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.service.in b/meta/recipes-core/busybox/files/busybox-syslog.service.in
new file mode 100644
index 0000000..2e04321
--- /dev/null
+++ b/meta/recipes-core/busybox/files/busybox-syslog.service.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=System Logging Service
+Wants=busybox-klogd.service
+
+[Service]
+EnvironmentFile=-/etc/default/busybox-syslog
+ExecStart=@base_sbindir@/syslogd -n $OPTIONS
+Sockets=syslog.socket
+
+[Install]
+WantedBy=multi-user.target
+Also=busybox-klogd.service
+Alias=syslog.service
-- 
1.7.10.4




  reply	other threads:[~2013-03-22 17:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 17:38 [PATCH 00/22] hybrid systemd/sysvinit, and systemd fixes Ross Burton
2013-03-22 17:38 ` Ross Burton [this message]
2013-03-25 12:47   ` [PATCH 01/22] busybox: enable systemd integration for syslogd Andreas Müller
2013-03-25 12:53     ` Burton, Ross
2013-03-25 12:58       ` Andreas Müller
2013-03-22 17:38 ` [PATCH 02/22] busybox: add strictatime support to mount Ross Burton
2013-03-22 17:38 ` [PATCH 03/22] systemd: make xz support (compressed journal) optional, defaulting to on Ross Burton
2013-03-22 17:38 ` [PATCH 04/22] systemd: merge udev-systemd into udev Ross Burton
2013-03-22 17:38 ` [PATCH 05/22] core-image-minimal-initramfs: don't install busybox-syslog Ross Burton
2013-03-22 17:38 ` [PATCH 06/22] systemd: don't depend on the PCI/USB databases Ross Burton
2013-03-22 17:38 ` [PATCH 07/22] systemd: split out the hwdb data Ross Burton
2013-03-22 17:38 ` [PATCH 08/22] default-providers: change udev selection logic Ross Burton
2013-03-22 17:38 ` [PATCH 09/22] update-rcd.bbclass: handle both sysvinit and systemd features being present Ross Burton
2013-03-22 19:04   ` Martin Jansa
2013-03-22 19:04     ` [OE-core] " Martin Jansa
2013-03-22 19:11     ` Burton, Ross
2013-03-22 19:11       ` [OE-core] " Burton, Ross
2013-03-22 17:38 ` [PATCH 10/22] util-linux: split uuidd into it's own package, and enable for systemd Ross Burton
2013-03-22 17:38 ` [PATCH 11/22] update-rcd: drop depends to recommends, check for update-rcd in scripts Ross Burton
2013-03-22 17:38 ` [PATCH 12/22] systemd: check for systemctl first, and don't force systemd to be installed Ross Burton
2013-03-22 17:38 ` [PATCH 13/22] systemd: add udev init script for hybrid sysvinit/systemd usage Ross Burton
2013-03-22 17:38 ` [PATCH 14/22] update-rc.d/systemd: change communication variable name Ross Burton
2013-03-22 17:38 ` [PATCH 15/22] default-distrovars: don't add INITMAN to DISTRO_FEATURES and DISTRO_FEATURES_BACKFILL Ross Burton
2013-03-22 17:38 ` [PATCH 16/22] bitbake.conf: explicitly backfill sysvinit, not DISTRO_FEATURES_INITMAN Ross Burton
2013-03-22 17:38 ` [PATCH 17/22] local.conf.sample.extended: remove obsolete DISTRO_FEATURES_INITMAN reference Ross Burton
2013-03-22 17:38 ` [PATCH 18/22] default-distrovars: " Ross Burton
2013-03-22 17:38 ` [PATCH 19/22] packagegroup-core-boot: revert to specifying sysvinit as default init manager Ross Burton
2013-03-23  4:30   ` Saul Wold
2013-03-22 17:38 ` [PATCH 20/22] Revert "base-files: add fstab for systemd based systems" Ross Burton
2013-03-22 17:38 ` [PATCH 21/22] systemd-compat-units: disable dbus-1 Ross Burton
2013-03-22 17:38 ` [PATCH 22/22] systemd: recommend systemd-compat-units Ross Burton
2013-03-22 22:00 ` [oe] [PATCH 00/22] hybrid systemd/sysvinit, and systemd fixes Martin Jansa
2013-03-22 22:00   ` Martin Jansa
2013-03-25 12:39   ` [oe] " Burton, Ross
2013-03-25 12:39     ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ef1ee1552757f3cf5cb979a9df7cf45f38b2f7a.1363973088.git.ross.burton@intel.com \
    --to=ross.burton@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.