Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V3 0/4] Fixes for systemd services in systemd
@ 2014-09-28  3:00 Chen Qi
  2014-09-28  3:00 ` [PATCH V3 1/4] systemd: enable syslog.socket by default Chen Qi
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Chen Qi @ 2014-09-28  3:00 UTC (permalink / raw)
  To: openembedded-core

Changes since V2:
sysklogd: Unlink /dev/log only if it's not from systemd

The following changes since commit f6a39cc957bf85ff43513f0b76afc3b2c9c906b6:

  sstatesig: fix overrides behaviour to remove SIGGEN_LOCKEDSIGS_i586 (2014-09-17 22:00:05 +0100)

are available in the git repository at:

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

Chen Qi (4):
  systemd: enable syslog.socket by default
  busybox: fix for syslog service in systemd
  sysklogd: add systemd support
  sysklog: comment out configuration regarding xconsole

 meta/recipes-core/busybox/busybox.inc              |   9 +-
 .../busybox/files/busybox-klogd.service.in         |   4 +-
 .../busybox/files/busybox-syslog.service.in        |   7 +-
 meta/recipes-core/systemd/systemd_216.bb           |   2 +
 .../files/0001-syslogd.c-add-systemd-support.patch | 246 +++++++++++++++++++++
 meta/recipes-extended/sysklogd/files/klogd.service |   9 +
 .../sysklogd/files/sysklogd.service                |  14 ++
 meta/recipes-extended/sysklogd/files/syslog.conf   |   8 +-
 meta/recipes-extended/sysklogd/sysklogd.inc        |  38 +++-
 9 files changed, 317 insertions(+), 20 deletions(-)
 create mode 100644 meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
 create mode 100644 meta/recipes-extended/sysklogd/files/klogd.service
 create mode 100644 meta/recipes-extended/sysklogd/files/sysklogd.service

-- 
1.9.1



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

* [PATCH V3 1/4] systemd: enable syslog.socket by default
  2014-09-28  3:00 [PATCH V3 0/4] Fixes for systemd services in systemd Chen Qi
@ 2014-09-28  3:00 ` Chen Qi
  2014-09-28  3:00 ` [PATCH V3 2/4] busybox: fix for syslog service in systemd Chen Qi
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Chen Qi @ 2014-09-28  3:00 UTC (permalink / raw)
  To: openembedded-core

The syslog daemon behaviour in our systemd system should be like the following
1. If ForwardToSyslog is disabled, no daemon should be started.
2. If ForwardToSyslog is enabled, daemon should be started via socket
   activation. This is very important for OE based system. Because unlike
   other distros, OE allows serveral syslog packages installed into one
   image, using ALTERNATIVE mechanism to manage them. If the syslog
   service is started regardless of socket activation, things crash.
   For example, if there's 'WantedBy=multi-user.target' in the '[Install]'
   section of busybox-syslog.service file, then this service would be started
   anyway, even if syslog.service doesn't point to it. In this case,
   /sbin/syslogd in busybox-syslog.service might be from other syslog packages
   like sysklogd or rsyslog.

This patch is series of patches to implement the above behaviour. The
syslog.socket needs to be enabled by default so that other syslog service
could correctly be activated via socket activation at runtime.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/systemd/systemd_216.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index 331da99..e3a0760 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -148,6 +148,8 @@ do_install() {
 
 	# Enable journal to forward message to syslog daemon
 	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+	# Enable syslog.socket by default, this is specific to our system
+	ln -sf ../syslog.socket ${D}${systemd_unitdir}/system/sockets.target.wants/syslog.socket
 }
 
 do_install_ptest () {
-- 
1.9.1



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

* [PATCH V3 2/4] busybox: fix for syslog service in systemd
  2014-09-28  3:00 [PATCH V3 0/4] Fixes for systemd services in systemd Chen Qi
  2014-09-28  3:00 ` [PATCH V3 1/4] systemd: enable syslog.socket by default Chen Qi
@ 2014-09-28  3:00 ` Chen Qi
  2014-09-28  3:00 ` [PATCH V3 3/4] sysklogd: add systemd support Chen Qi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Chen Qi @ 2014-09-28  3:00 UTC (permalink / raw)
  To: openembedded-core

This patch includes the following changes:
1. Explicitly set StandardOutput of the log daemon to null.
   This would avoid creating a feedback loop of the syslog service.
   See link below for more information.
   http://www.freedesktop.org/wiki/Software/systemd/syslog/

2. Use ALTERNATIVE machanism to manage the syslog service file.
   This is because that other package may also provide a syslog
   implementation.

3. Make the syslog daemon socket activated only. Otherwise, things
   would crash if we install busybox-syslog and other syslog packages
   together in one image.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/busybox/busybox.inc                     | 9 +++++++--
 meta/recipes-core/busybox/files/busybox-klogd.service.in  | 4 +---
 meta/recipes-core/busybox/files/busybox-syslog.service.in | 7 +++----
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index bd66e4f..a6b205a 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -274,13 +274,12 @@ do_install () {
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
         if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
             install -d ${D}${systemd_unitdir}/system
-            sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \
+            sed -e 's,@base_sbindir@,${base_sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' < ${WORKDIR}/busybox-syslog.service.in \
 		> ${D}${systemd_unitdir}/system/busybox-syslog.service
             if [ -f ${WORKDIR}/busybox-syslog.default ] ; then
 		install -d ${D}${sysconfdir}/default
 		install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
             fi
-            ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
         fi
         if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
             install -d ${D}${systemd_unitdir}/system
@@ -311,6 +310,12 @@ python () {
         d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf')
         d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir', True)))
         d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
+
+    if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
+        pn = d.getVar('PN', True)
+        d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-service')
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir', True)))
+        d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/busybox-syslog.service' % (d.getVar('systemd_unitdir', True)))
 }
 
 python do_package_prepend () {
diff --git a/meta/recipes-core/busybox/files/busybox-klogd.service.in b/meta/recipes-core/busybox/files/busybox-klogd.service.in
index d7c7755..90cfc50 100644
--- a/meta/recipes-core/busybox/files/busybox-klogd.service.in
+++ b/meta/recipes-core/busybox/files/busybox-klogd.service.in
@@ -3,6 +3,4 @@ Description=Kernel Logging Service
 
 [Service]
 ExecStart=@base_sbindir@/klogd -n
-
-[Install]
-WantedBy=multi-user.target
+StandardOutput=null
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.service.in b/meta/recipes-core/busybox/files/busybox-syslog.service.in
index 2e04321..c84edaf 100644
--- a/meta/recipes-core/busybox/files/busybox-syslog.service.in
+++ b/meta/recipes-core/busybox/files/busybox-syslog.service.in
@@ -1,13 +1,12 @@
 [Unit]
 Description=System Logging Service
 Wants=busybox-klogd.service
+Requires=syslog.socket
 
 [Service]
-EnvironmentFile=-/etc/default/busybox-syslog
+EnvironmentFile=-@SYSCONFDIR@/default/busybox-syslog
 ExecStart=@base_sbindir@/syslogd -n $OPTIONS
-Sockets=syslog.socket
+StandardOutput=null
 
 [Install]
-WantedBy=multi-user.target
 Also=busybox-klogd.service
-Alias=syslog.service
-- 
1.9.1



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

* [PATCH V3 3/4] sysklogd: add systemd support
  2014-09-28  3:00 [PATCH V3 0/4] Fixes for systemd services in systemd Chen Qi
  2014-09-28  3:00 ` [PATCH V3 1/4] systemd: enable syslog.socket by default Chen Qi
  2014-09-28  3:00 ` [PATCH V3 2/4] busybox: fix for syslog service in systemd Chen Qi
@ 2014-09-28  3:00 ` Chen Qi
  2015-07-27 12:32   ` Ahsan, Noor
  2014-09-28  3:00 ` [PATCH V3 4/4] sysklog: comment out configuration regarding xconsole Chen Qi
  2015-07-28  1:34 ` [PATCH V3 0/4] Fixes for systemd services in systemd ChenQi
  4 siblings, 1 reply; 8+ messages in thread
From: Chen Qi @ 2014-09-28  3:00 UTC (permalink / raw)
  To: openembedded-core

This patch includes the following changes:
1. Add socket activation support for sysklogd
2. Add systemd service file
3. Use ALTERNATIVE mechanism in OE to manage the syslog service
4. Set ALTERNATIVE_PRIORITY to "100" regardless of whether 'systemd'
   is in DISTRO_FEATURES or not because sysklogd now has systemd support.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../files/0001-syslogd.c-add-systemd-support.patch | 246 +++++++++++++++++++++
 meta/recipes-extended/sysklogd/files/klogd.service |   9 +
 .../sysklogd/files/sysklogd.service                |  14 ++
 meta/recipes-extended/sysklogd/sysklogd.inc        |  38 +++-
 4 files changed, 300 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
 create mode 100644 meta/recipes-extended/sysklogd/files/klogd.service
 create mode 100644 meta/recipes-extended/sysklogd/files/sysklogd.service

diff --git a/meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch b/meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
new file mode 100644
index 0000000..1706906
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
@@ -0,0 +1,246 @@
+Upstream-Status: Pending
+
+Subject: syslogd.c: add systemd support
+
+1. add socket activation support
+2. unlink /dev/log if it's not provided by systemd
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ syslogd.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 137 insertions(+), 20 deletions(-)
+
+diff --git a/syslogd.c b/syslogd.c
+index acfd8f1..81e45e6 100644
+--- a/syslogd.c
++++ b/syslogd.c
+@@ -602,6 +602,9 @@ static char sccsid[] = "@(#)syslogd.c	5.27 (Berkeley) 10/10/88";
+ #define _PATH_LOG	"/dev/log"
+ #endif
+ 
++/* systemd support */
++#define SD_LISTEN_FDS_START 3
++
+ char	*ConfFile = _PATH_LOGCONF;
+ char	*PidFile = _PATH_LOGPID;
+ char	ctty[] = _PATH_CONSOLE;
+@@ -612,6 +615,7 @@ int inetm = 0;
+ static int debugging_on = 0;
+ static int nlogs = -1;
+ static int restart = 0;
++static int socket_from_systemd = 0;
+ 
+ #define MAXFUNIX	20
+ 
+@@ -822,6 +826,8 @@ int decode(char *name, struct code *codetab);
+ static void dprintf(char *, ...);
+ static void allocate_log(void);
+ void sighup_handler();
++/* systemd support */
++int sd_listen_fds(void);
+ 
+ #ifdef SYSLOG_UNIXAF
+ static int create_unix_socket(const char *path);
+@@ -963,9 +969,37 @@ int main(argc, argv)
+ 				 */
+ 				exit(1);
+ 			}
++
++			/* We keep stdout and stderr open in case we have to emit something */
++			close(0);
++			i = 3;
++
++			/* Trying to pass on LISTEN_PID with appropriate value */
++			const char *e;
++			unsigned long l;
++			char buf[24] = { '\0' };
++			int sd_fds;
++
++			if ( (e = getenv("LISTEN_PID")) ) {
++				errno = 0;
++				l = strtoul(e, NULL, 10);
++				if (errno == 0) {
++					if (getppid() == (pid_t)l) {
++						snprintf(buf,sizeof(buf), "%d", (int)getpid());
++						setenv("LISTEN_PID", buf, 1);
++					} 
++				}
++			}
++
+ 			signal (SIGTERM, SIG_DFL);
+ 			num_fds = getdtablesize();
+-			for (i= 0; i < num_fds; i++)
++
++			/* close all further fds except of the fds provided by systemd */
++			sd_fds = sd_listen_fds();
++			if (sd_fds > 0) {
++				i = SD_LISTEN_FDS_START + sd_fds;
++			}
++			for ( ; i < num_fds; i++)
+ 				(void) close(i);
+ 			untty();
+ 		}
+@@ -1248,28 +1282,37 @@ static int create_unix_socket(const char *path)
+ {
+ 	struct sockaddr_un sunx;
+ 	int fd;
++	int n;
+ 	char line[MAXLINE +1];
+ 
+-	if (path[0] == '\0')
++	n = sd_listen_fds();
++	if (n > 1) {
+ 		return -1;
+-
+-	(void) unlink(path);
+-
+-	memset(&sunx, 0, sizeof(sunx));
+-	sunx.sun_family = AF_UNIX;
+-	(void) strncpy(sunx.sun_path, path, sizeof(sunx.sun_path));
+-	fd = socket(AF_UNIX, SOCK_DGRAM, 0);
+-	if (fd < 0 || bind(fd, (struct sockaddr *) &sunx,
+-			   sizeof(sunx.sun_family)+strlen(sunx.sun_path)) < 0 ||
+-	    chmod(path, 0666) < 0) {
+-		(void) snprintf(line, sizeof(line), "cannot create %s", path);
+-		logerror(line);
+-		dprintf("cannot create %s (%d).\n", path, errno);
+-		close(fd);
++	} else if (n == 1) {
++		socket_from_systemd = 1;
++		fd = SD_LISTEN_FDS_START + 0;
++	} else {
++		if (path[0] == '\0')
++			return -1;
++
++		(void) unlink(path);
++
++		memset(&sunx, 0, sizeof(sunx));
++		sunx.sun_family = AF_UNIX;
++		(void) strncpy(sunx.sun_path, path, sizeof(sunx.sun_path));
++		fd = socket(AF_UNIX, SOCK_DGRAM, 0);
++		if (fd < 0 || bind(fd, (struct sockaddr *) &sunx,
++				   sizeof(sunx.sun_family)+strlen(sunx.sun_path)) < 0 ||
++		    chmod(path, 0666) < 0) {
++			(void) snprintf(line, sizeof(line), "cannot create %s", path);
++			logerror(line);
++			dprintf("cannot create %s (%d).\n", path, errno);
++			close(fd);
+ #ifndef SYSV
+-		die(0);
++			die(0);
+ #endif
+-		return -1;
++			return -1;
++		}
+ 	}
+ 	return fd;
+ }
+@@ -1998,12 +2041,27 @@ void wallmsg(f, iov)
+ 	/* open the user login file */
+ 	setutent();
+ 
+-
+ 	/*
+ 	 * Might as well fork instead of using nonblocking I/O
+ 	 * and doing notty().
+ 	 */
+ 	if (fork() == 0) {
++		/* Trying to pass on the LISTEN_PID with appropriate value */
++		const char *e;
++		unsigned long l;
++		char buf[24] = { '\0' };
++
++		if ( (e = getenv("LISTEN_PID")) ) {
++			errno = 0;
++			l = strtoul(e, NULL, 10);
++			if (errno == 0) {
++				if (getppid() == (pid_t)l) {
++					snprintf(buf,sizeof(buf), "%d", (int)getpid());
++					setenv("LISTEN_PID", buf, 1);
++				}
++			} 
++		}
++
+ 		(void) signal(SIGTERM, SIG_DFL);
+ 		(void) alarm(0);
+ #ifndef SYSV
+@@ -2254,9 +2312,15 @@ void die(sig)
+ 	if (InetInuse) close(inetm);
+ 
+ 	/* Clean-up files. */
+-        for (i = 0; i < nfunix; i++)
++	if (socket_from_systemd) {
++		i = 1;
++	} else {
++		i = 0;
++	}
++	for (; i < nfunix; i++)
+ 		if (funixn[i] && funix[i] != -1)
+ 			(void)unlink(funixn[i]);
++
+ #ifndef TESTING
+ 	(void) remove_pid(PidFile);
+ #endif
+@@ -2896,6 +2960,59 @@ void sighup_handler()
+ 	return;
+ }
+ 
++int sd_listen_fds() {
++	int r, fd;
++	const char *e;
++	unsigned long l;
++
++	e = getenv("LISTEN_PID");
++	if (!e) {
++		return 0;
++	}
++
++	errno = 0;
++	l = strtoul(e, NULL, 10);
++
++	if (errno != 0) {
++		return -errno;
++	}
++
++	if (getpid() != (pid_t)l) {
++		return 0;
++	}
++
++	e = getenv("LISTEN_FDS");
++	if (!e) {
++		return 0;
++	}
++
++	errno = 0;
++	l = strtoul(e, NULL, 10);
++
++	if (errno != 0) {
++		return -errno;
++	}
++
++	for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int)l; fd++) {
++		int flags;
++
++		flags = fcntl(fd, F_GETFD);
++		if (flags < 0) {
++			return -errno;
++		}
++
++		if (flags & FD_CLOEXEC)
++			continue;
++
++		if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
++			return -errno;
++		}
++	}
++
++	r = (int)l;
++
++	return r;
++}
+ /*
+  * Local variables:
+  *  c-indent-level: 8
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/sysklogd/files/klogd.service b/meta/recipes-extended/sysklogd/files/klogd.service
new file mode 100644
index 0000000..cf97e9c
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/klogd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=sysklogd Kernel Logging Service
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/klogd
+PIDFile=/var/run/klogd.pid
+ExecStart=@BASE_SBINDIR@/klogd $KLOGD
+StandardOutput=null
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd.service b/meta/recipes-extended/sysklogd/files/sysklogd.service
new file mode 100644
index 0000000..7806320
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/sysklogd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=System Logging Service
+Wants=klogd.service
+Requires=syslog.socket
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/sysklogd
+PIDFile=/var/run/syslogd.pid
+ExecStart=@BASE_SBINDIR@/syslogd $SYSLOGD
+StandardOutput=null
+
+[Install]
+Also=klogd.service
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index bcf8aa7..294eb4f 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -11,12 +11,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
                     file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
                    "
 
-inherit update-rc.d update-alternatives
+inherit update-rc.d systemd update-alternatives
 
 SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
            file://no-strip-install.patch \
+           file://0001-syslogd.c-add-systemd-support.patch \
            file://sysklogd \
            file://syslog.conf \
+           file://sysklogd.service \
+           file://klogd.service \
            "
 
 SRC_URI_append_e500v2 = " file://no-vectorization.patch"
@@ -24,6 +27,8 @@ SRC_URI_append_e500v2 = " file://no-vectorization.patch"
 INITSCRIPT_NAME = "syslog"
 CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
 
+SYSTEMD_SERVICE_${PN} = "sysklogd.service"
+
 CFLAGS_append = " -DSYSV"
 
 do_install () {
@@ -35,20 +40,39 @@ do_install () {
 	install -d ${D}${sysconfdir}
 	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
 	install -d ${D}${sysconfdir}/init.d
-	install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
+	install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${BPN}
+
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/sysklogd.service ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/klogd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+		${D}${systemd_unitdir}/system/*.service
 }
 
-# sysklogd package has no internal systemd support, so we weigh busybox's
-# sysklogd utility over it in case of systemd
-ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
+ALTERNATIVE_PRIORITY = '100'
 
-ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
+ALTERNATIVE_${PN} = "syslogd klogd syslog-conf"
 
 ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
 ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
-ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
 ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
 
+python () {
+    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        pn = d.getVar('PN', True)
+        sysconfdir = d.getVar('sysconfdir', True)
+        d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
+        d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
+
+    if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
+        pn = d.getVar('PN', True)
+        d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service')
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir', True)))
+        d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/sysklogd.service' % (d.getVar('systemd_unitdir', True)))
+}
+
 pkg_prerm_${PN} () {
 	if test "x$D" = "x"; then
 	if test "$1" = "upgrade" -o "$1" = "remove"; then
-- 
1.9.1



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

* [PATCH V3 4/4] sysklog: comment out configuration regarding xconsole
  2014-09-28  3:00 [PATCH V3 0/4] Fixes for systemd services in systemd Chen Qi
                   ` (2 preceding siblings ...)
  2014-09-28  3:00 ` [PATCH V3 3/4] sysklogd: add systemd support Chen Qi
@ 2014-09-28  3:00 ` Chen Qi
  2015-07-28  1:34 ` [PATCH V3 0/4] Fixes for systemd services in systemd ChenQi
  4 siblings, 0 replies; 8+ messages in thread
From: Chen Qi @ 2014-09-28  3:00 UTC (permalink / raw)
  To: openembedded-core

I commented out these configurations for the following reasons:
We don't have xconsole utility in OE. These configurations are useless
for us.

Besides, the /dev/xconsole device is created in the init script which means
if these configuration are enabled, we need to add a script in sysklogd which
creates /dev/xconsole and is invoked in ExecStartPre in the sysklogd's service
file.

I think it's better that we just comment these lines out.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-extended/sysklogd/files/syslog.conf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/sysklogd/files/syslog.conf b/meta/recipes-extended/sysklogd/files/syslog.conf
index 0849de1..46a734c 100644
--- a/meta/recipes-extended/sysklogd/files/syslog.conf
+++ b/meta/recipes-extended/sysklogd/files/syslog.conf
@@ -64,8 +64,8 @@ mail,news.none		-/var/log/messages
 # NOTE: adjust the list below, or you'll go crazy if you have a reasonably
 #      busy site..
 #
-daemon.*;mail.*;\
-news.err;\
-*.=debug;*.=info;\
-*.=notice;*.=warn	|/dev/xconsole
+#daemon.*;mail.*;\
+#news.err;\
+#*.=debug;*.=info;\
+#*.=notice;*.=warn	|/dev/xconsole
 
-- 
1.9.1



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

* Re: [PATCH V3 3/4] sysklogd: add systemd support
  2014-09-28  3:00 ` [PATCH V3 3/4] sysklogd: add systemd support Chen Qi
@ 2015-07-27 12:32   ` Ahsan, Noor
  0 siblings, 0 replies; 8+ messages in thread
From: Ahsan, Noor @ 2015-07-27 12:32 UTC (permalink / raw)
  To: Chen Qi, openembedded-core@lists.openembedded.org

Hello Chen,

May I know why your patch series is still pending merge?

Noor

-----Original Message-----
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Chen Qi
Sent: Sunday, September 28, 2014 8:00 AM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH V3 3/4] sysklogd: add systemd support

This patch includes the following changes:
1. Add socket activation support for sysklogd 2. Add systemd service file 3. Use ALTERNATIVE mechanism in OE to manage the syslog service 4. Set ALTERNATIVE_PRIORITY to "100" regardless of whether 'systemd'
   is in DISTRO_FEATURES or not because sysklogd now has systemd support.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../files/0001-syslogd.c-add-systemd-support.patch | 246 +++++++++++++++++++++
 meta/recipes-extended/sysklogd/files/klogd.service |   9 +
 .../sysklogd/files/sysklogd.service                |  14 ++
 meta/recipes-extended/sysklogd/sysklogd.inc        |  38 +++-
 4 files changed, 300 insertions(+), 7 deletions(-)  create mode 100644 meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
 create mode 100644 meta/recipes-extended/sysklogd/files/klogd.service
 create mode 100644 meta/recipes-extended/sysklogd/files/sysklogd.service

diff --git a/meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch b/meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
new file mode 100644
index 0000000..1706906
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-su
+++ pport.patch
@@ -0,0 +1,246 @@
+Upstream-Status: Pending
+
+Subject: syslogd.c: add systemd support
+
+1. add socket activation support
+2. unlink /dev/log if it's not provided by systemd
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ syslogd.c | 157 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 137 insertions(+), 20 deletions(-)
+
+diff --git a/syslogd.c b/syslogd.c
+index acfd8f1..81e45e6 100644
+--- a/syslogd.c
++++ b/syslogd.c
+@@ -602,6 +602,9 @@ static char sccsid[] = "@(#)syslogd.c	5.27 (Berkeley) 10/10/88";
+ #define _PATH_LOG	"/dev/log"
+ #endif
+ 
++/* systemd support */
++#define SD_LISTEN_FDS_START 3
++
+ char	*ConfFile = _PATH_LOGCONF;
+ char	*PidFile = _PATH_LOGPID;
+ char	ctty[] = _PATH_CONSOLE;
+@@ -612,6 +615,7 @@ int inetm = 0;
+ static int debugging_on = 0;
+ static int nlogs = -1;
+ static int restart = 0;
++static int socket_from_systemd = 0;
+ 
+ #define MAXFUNIX	20
+ 
+@@ -822,6 +826,8 @@ int decode(char *name, struct code *codetab);  
+static void dprintf(char *, ...);  static void allocate_log(void);  
+void sighup_handler();
++/* systemd support */
++int sd_listen_fds(void);
+ 
+ #ifdef SYSLOG_UNIXAF
+ static int create_unix_socket(const char *path); @@ -963,9 +969,37 @@ 
+int main(argc, argv)
+ 				 */
+ 				exit(1);
+ 			}
++
++			/* We keep stdout and stderr open in case we have to emit something */
++			close(0);
++			i = 3;
++
++			/* Trying to pass on LISTEN_PID with appropriate value */
++			const char *e;
++			unsigned long l;
++			char buf[24] = { '\0' };
++			int sd_fds;
++
++			if ( (e = getenv("LISTEN_PID")) ) {
++				errno = 0;
++				l = strtoul(e, NULL, 10);
++				if (errno == 0) {
++					if (getppid() == (pid_t)l) {
++						snprintf(buf,sizeof(buf), "%d", (int)getpid());
++						setenv("LISTEN_PID", buf, 1);
++					} 
++				}
++			}
++
+ 			signal (SIGTERM, SIG_DFL);
+ 			num_fds = getdtablesize();
+-			for (i= 0; i < num_fds; i++)
++
++			/* close all further fds except of the fds provided by systemd */
++			sd_fds = sd_listen_fds();
++			if (sd_fds > 0) {
++				i = SD_LISTEN_FDS_START + sd_fds;
++			}
++			for ( ; i < num_fds; i++)
+ 				(void) close(i);
+ 			untty();
+ 		}
+@@ -1248,28 +1282,37 @@ static int create_unix_socket(const char *path)  
+{
+ 	struct sockaddr_un sunx;
+ 	int fd;
++	int n;
+ 	char line[MAXLINE +1];
+ 
+-	if (path[0] == '\0')
++	n = sd_listen_fds();
++	if (n > 1) {
+ 		return -1;
+-
+-	(void) unlink(path);
+-
+-	memset(&sunx, 0, sizeof(sunx));
+-	sunx.sun_family = AF_UNIX;
+-	(void) strncpy(sunx.sun_path, path, sizeof(sunx.sun_path));
+-	fd = socket(AF_UNIX, SOCK_DGRAM, 0);
+-	if (fd < 0 || bind(fd, (struct sockaddr *) &sunx,
+-			   sizeof(sunx.sun_family)+strlen(sunx.sun_path)) < 0 ||
+-	    chmod(path, 0666) < 0) {
+-		(void) snprintf(line, sizeof(line), "cannot create %s", path);
+-		logerror(line);
+-		dprintf("cannot create %s (%d).\n", path, errno);
+-		close(fd);
++	} else if (n == 1) {
++		socket_from_systemd = 1;
++		fd = SD_LISTEN_FDS_START + 0;
++	} else {
++		if (path[0] == '\0')
++			return -1;
++
++		(void) unlink(path);
++
++		memset(&sunx, 0, sizeof(sunx));
++		sunx.sun_family = AF_UNIX;
++		(void) strncpy(sunx.sun_path, path, sizeof(sunx.sun_path));
++		fd = socket(AF_UNIX, SOCK_DGRAM, 0);
++		if (fd < 0 || bind(fd, (struct sockaddr *) &sunx,
++				   sizeof(sunx.sun_family)+strlen(sunx.sun_path)) < 0 ||
++		    chmod(path, 0666) < 0) {
++			(void) snprintf(line, sizeof(line), "cannot create %s", path);
++			logerror(line);
++			dprintf("cannot create %s (%d).\n", path, errno);
++			close(fd);
+ #ifndef SYSV
+-		die(0);
++			die(0);
+ #endif
+-		return -1;
++			return -1;
++		}
+ 	}
+ 	return fd;
+ }
+@@ -1998,12 +2041,27 @@ void wallmsg(f, iov)
+ 	/* open the user login file */
+ 	setutent();
+ 
+-
+ 	/*
+ 	 * Might as well fork instead of using nonblocking I/O
+ 	 * and doing notty().
+ 	 */
+ 	if (fork() == 0) {
++		/* Trying to pass on the LISTEN_PID with appropriate value */
++		const char *e;
++		unsigned long l;
++		char buf[24] = { '\0' };
++
++		if ( (e = getenv("LISTEN_PID")) ) {
++			errno = 0;
++			l = strtoul(e, NULL, 10);
++			if (errno == 0) {
++				if (getppid() == (pid_t)l) {
++					snprintf(buf,sizeof(buf), "%d", (int)getpid());
++					setenv("LISTEN_PID", buf, 1);
++				}
++			} 
++		}
++
+ 		(void) signal(SIGTERM, SIG_DFL);
+ 		(void) alarm(0);
+ #ifndef SYSV
+@@ -2254,9 +2312,15 @@ void die(sig)
+ 	if (InetInuse) close(inetm);
+ 
+ 	/* Clean-up files. */
+-        for (i = 0; i < nfunix; i++)
++	if (socket_from_systemd) {
++		i = 1;
++	} else {
++		i = 0;
++	}
++	for (; i < nfunix; i++)
+ 		if (funixn[i] && funix[i] != -1)
+ 			(void)unlink(funixn[i]);
++
+ #ifndef TESTING
+ 	(void) remove_pid(PidFile);
+ #endif
+@@ -2896,6 +2960,59 @@ void sighup_handler()
+ 	return;
+ }
+ 
++int sd_listen_fds() {
++	int r, fd;
++	const char *e;
++	unsigned long l;
++
++	e = getenv("LISTEN_PID");
++	if (!e) {
++		return 0;
++	}
++
++	errno = 0;
++	l = strtoul(e, NULL, 10);
++
++	if (errno != 0) {
++		return -errno;
++	}
++
++	if (getpid() != (pid_t)l) {
++		return 0;
++	}
++
++	e = getenv("LISTEN_FDS");
++	if (!e) {
++		return 0;
++	}
++
++	errno = 0;
++	l = strtoul(e, NULL, 10);
++
++	if (errno != 0) {
++		return -errno;
++	}
++
++	for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int)l; fd++) {
++		int flags;
++
++		flags = fcntl(fd, F_GETFD);
++		if (flags < 0) {
++			return -errno;
++		}
++
++		if (flags & FD_CLOEXEC)
++			continue;
++
++		if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) {
++			return -errno;
++		}
++	}
++
++	r = (int)l;
++
++	return r;
++}
+ /*
+  * Local variables:
+  *  c-indent-level: 8
+--
+1.9.1
+
diff --git a/meta/recipes-extended/sysklogd/files/klogd.service b/meta/recipes-extended/sysklogd/files/klogd.service
new file mode 100644
index 0000000..cf97e9c
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/klogd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=sysklogd Kernel Logging Service
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/klogd
+PIDFile=/var/run/klogd.pid
+ExecStart=@BASE_SBINDIR@/klogd $KLOGD
+StandardOutput=null
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd.service b/meta/recipes-extended/sysklogd/files/sysklogd.service
new file mode 100644
index 0000000..7806320
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/sysklogd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=System Logging Service
+Wants=klogd.service
+Requires=syslog.socket
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/sysklogd
+PIDFile=/var/run/syslogd.pid
+ExecStart=@BASE_SBINDIR@/syslogd $SYSLOGD StandardOutput=null
+
+[Install]
+Also=klogd.service
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index bcf8aa7..294eb4f 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -11,12 +11,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
                     file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
                    "
 
-inherit update-rc.d update-alternatives
+inherit update-rc.d systemd update-alternatives
 
 SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
            file://no-strip-install.patch \
+           file://0001-syslogd.c-add-systemd-support.patch \
            file://sysklogd \
            file://syslog.conf \
+           file://sysklogd.service \
+           file://klogd.service \
            "
 
 SRC_URI_append_e500v2 = " file://no-vectorization.patch"
@@ -24,6 +27,8 @@ SRC_URI_append_e500v2 = " file://no-vectorization.patch"
 INITSCRIPT_NAME = "syslog"
 CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
 
+SYSTEMD_SERVICE_${PN} = "sysklogd.service"
+
 CFLAGS_append = " -DSYSV"
 
 do_install () {
@@ -35,20 +40,39 @@ do_install () {
 	install -d ${D}${sysconfdir}
 	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
 	install -d ${D}${sysconfdir}/init.d
-	install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
+	install -m 755 ${WORKDIR}/sysklogd 
+${D}${sysconfdir}/init.d/syslog.${BPN}
+
+        install -d ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/sysklogd.service ${D}${systemd_unitdir}/system
+        install -m 0644 ${WORKDIR}/klogd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+		${D}${systemd_unitdir}/system/*.service
 }
 
-# sysklogd package has no internal systemd support, so we weigh busybox's -# sysklogd utility over it in case of systemd -ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
+ALTERNATIVE_PRIORITY = '100'
 
-ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
+ALTERNATIVE_${PN} = "syslogd klogd syslog-conf"
 
 ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
 ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
-ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
 ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
 
+python () {
+    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        pn = d.getVar('PN', True)
+        sysconfdir = d.getVar('sysconfdir', True)
+        d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
+        d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', 
+'%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', 
+True)))
+
+    if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
+        pn = d.getVar('PN', True)
+        d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service')
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir', True)))
+        d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', 
+'%s/system/sysklogd.service' % (d.getVar('systemd_unitdir', True))) }
+
 pkg_prerm_${PN} () {
 	if test "x$D" = "x"; then
 	if test "$1" = "upgrade" -o "$1" = "remove"; then
--
1.9.1

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


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

* Re: [PATCH V3 0/4] Fixes for systemd services in systemd
  2014-09-28  3:00 [PATCH V3 0/4] Fixes for systemd services in systemd Chen Qi
                   ` (3 preceding siblings ...)
  2014-09-28  3:00 ` [PATCH V3 4/4] sysklog: comment out configuration regarding xconsole Chen Qi
@ 2015-07-28  1:34 ` ChenQi
  2015-07-31 11:37   ` Ahsan, Noor
  4 siblings, 1 reply; 8+ messages in thread
From: ChenQi @ 2015-07-28  1:34 UTC (permalink / raw)
  To: openembedded-core

ping

Any comment is welcome.
If these patches look OK, I'll rebase them and send out a new version.

Best Regards,
Chen Qi

On 09/28/2014 11:00 AM, Chen Qi wrote:
> Changes since V2:
> sysklogd: Unlink /dev/log only if it's not from systemd
>
> The following changes since commit f6a39cc957bf85ff43513f0b76afc3b2c9c906b6:
>
>    sstatesig: fix overrides behaviour to remove SIGGEN_LOCKEDSIGS_i586 (2014-09-17 22:00:05 +0100)
>
> are available in the git repository at:
>
>    git://git.openembedded.org/openembedded-core-contrib ChenQi/systemd-syslog-service
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/systemd-syslog-service
>
> Chen Qi (4):
>    systemd: enable syslog.socket by default
>    busybox: fix for syslog service in systemd
>    sysklogd: add systemd support
>    sysklog: comment out configuration regarding xconsole
>
>   meta/recipes-core/busybox/busybox.inc              |   9 +-
>   .../busybox/files/busybox-klogd.service.in         |   4 +-
>   .../busybox/files/busybox-syslog.service.in        |   7 +-
>   meta/recipes-core/systemd/systemd_216.bb           |   2 +
>   .../files/0001-syslogd.c-add-systemd-support.patch | 246 +++++++++++++++++++++
>   meta/recipes-extended/sysklogd/files/klogd.service |   9 +
>   .../sysklogd/files/sysklogd.service                |  14 ++
>   meta/recipes-extended/sysklogd/files/syslog.conf   |   8 +-
>   meta/recipes-extended/sysklogd/sysklogd.inc        |  38 +++-
>   9 files changed, 317 insertions(+), 20 deletions(-)
>   create mode 100644 meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
>   create mode 100644 meta/recipes-extended/sysklogd/files/klogd.service
>   create mode 100644 meta/recipes-extended/sysklogd/files/sysklogd.service
>



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

* Re: [PATCH V3 0/4] Fixes for systemd services in systemd
  2015-07-28  1:34 ` [PATCH V3 0/4] Fixes for systemd services in systemd ChenQi
@ 2015-07-31 11:37   ` Ahsan, Noor
  0 siblings, 0 replies; 8+ messages in thread
From: Ahsan, Noor @ 2015-07-31 11:37 UTC (permalink / raw)
  To: ChenQi, openembedded-core@lists.openembedded.org

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

Hello Chen,

We are holding our patch for the warning message 

sysklogd-1.5.1: sysklogd rdepends on initscripts-functions, but it isn't a build dependency? [build-deps]

see attached email. Either we need your fix to be merged or allow us to send the patch again.

Thanks.

Noor

-----Original Message-----
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of ChenQi
Sent: Tuesday, July 28, 2015 6:34 AM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH V3 0/4] Fixes for systemd services in systemd

ping

Any comment is welcome.
If these patches look OK, I'll rebase them and send out a new version.

Best Regards,
Chen Qi

On 09/28/2014 11:00 AM, Chen Qi wrote:
> Changes since V2:
> sysklogd: Unlink /dev/log only if it's not from systemd
>
> The following changes since commit f6a39cc957bf85ff43513f0b76afc3b2c9c906b6:
>
>    sstatesig: fix overrides behaviour to remove SIGGEN_LOCKEDSIGS_i586 (2014-09-17 22:00:05 +0100)
>
> are available in the git repository at:
>
>    git://git.openembedded.org/openembedded-core-contrib ChenQi/systemd-syslog-service
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/systemd-syslog-service
>
> Chen Qi (4):
>    systemd: enable syslog.socket by default
>    busybox: fix for syslog service in systemd
>    sysklogd: add systemd support
>    sysklog: comment out configuration regarding xconsole
>
>   meta/recipes-core/busybox/busybox.inc              |   9 +-
>   .../busybox/files/busybox-klogd.service.in         |   4 +-
>   .../busybox/files/busybox-syslog.service.in        |   7 +-
>   meta/recipes-core/systemd/systemd_216.bb           |   2 +
>   .../files/0001-syslogd.c-add-systemd-support.patch | 246 +++++++++++++++++++++
>   meta/recipes-extended/sysklogd/files/klogd.service |   9 +
>   .../sysklogd/files/sysklogd.service                |  14 ++
>   meta/recipes-extended/sysklogd/files/syslog.conf   |   8 +-
>   meta/recipes-extended/sysklogd/sysklogd.inc        |  38 +++-
>   9 files changed, 317 insertions(+), 20 deletions(-)
>   create mode 100644 meta/recipes-extended/sysklogd/files/0001-syslogd.c-add-systemd-support.patch
>   create mode 100644 meta/recipes-extended/sysklogd/files/klogd.service
>   create mode 100644 meta/recipes-extended/sysklogd/files/sysklogd.service
>

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

[-- Attachment #2: Type: message/rfc822, Size: 5214 bytes --]

From: ChenQi <Qi.Chen@windriver.com>
To: "openembedded-core@lists.openembedded.org" <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] sysklogd: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES
Date: Fri, 19 Sep 2014 04:50:35 +0000
Message-ID: <541BB61B.7070905@windriver.com>

On 09/19/2014 12:06 PM, Fahad Usman wrote:
> We need to set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit' is not
> present in DISTRO_FEATURES so that any un-necessary package dependencies
> are not added by update-rc.d.bbclass
>
> Signed-off-by: Fahad Usman <fahad.usman@gmail.com>
> ---
>   meta/recipes-extended/sysklogd/sysklogd.inc |    5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
> index bcf8aa7..3cbbdfd 100644
> --- a/meta/recipes-extended/sysklogd/sysklogd.inc
> +++ b/meta/recipes-extended/sysklogd/sysklogd.inc
> @@ -56,3 +56,8 @@ pkg_prerm_${PN} () {
>       fi
>       fi
>   }
> +
> +python __anonymous() {
> +    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
> +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> +}

I'm now adding systemd support for sysklogd.
This recipe will then inherit systemd.bbclass.
And the task of setting INHIBIT_UPDATERCD_BBCLASS is automatically done.

The patches will be sent out in one day or two.

Best Regards,
Chen Qi
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

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

end of thread, other threads:[~2015-07-31 11:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-28  3:00 [PATCH V3 0/4] Fixes for systemd services in systemd Chen Qi
2014-09-28  3:00 ` [PATCH V3 1/4] systemd: enable syslog.socket by default Chen Qi
2014-09-28  3:00 ` [PATCH V3 2/4] busybox: fix for syslog service in systemd Chen Qi
2014-09-28  3:00 ` [PATCH V3 3/4] sysklogd: add systemd support Chen Qi
2015-07-27 12:32   ` Ahsan, Noor
2014-09-28  3:00 ` [PATCH V3 4/4] sysklog: comment out configuration regarding xconsole Chen Qi
2015-07-28  1:34 ` [PATCH V3 0/4] Fixes for systemd services in systemd ChenQi
2015-07-31 11:37   ` Ahsan, Noor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox