Skip to contentSkip to conversation

Fixes available on O.S. Systems tree

PATCH New Otavio Salvador 1 participant 4 messages Jan 31, 2012

lore
Share & tools
lore
#0 lore raw

cover Fixes available on O.S. Systems tree

The following changes since commit a76fff17ea8420686ef81b35f80efac1bef21649:

ristretto: update to 0.3.4 (2012-01-30 13:03:40 +0100)

are available in the git repository at:
git://github.com/OSSystems/meta-oe master
https://github.com/OSSystems/meta-oe/tree/master

Otavio Salvador (3):
systemd-serialgetty: support machines without serial console systemd.bbclass: depends on systemd
busybox: fix busybox-syslog systemd service file

 meta-oe/classes/systemd.bbclass                    |    2 +-
 .../busybox/busybox/busybox-syslog.service.in      |    2 +-
 .../recipes-core/busybox/busybox_1.19.3.bbappend   |    2 +-
 .../recipes-core/systemd/systemd-serialgetty.bb    |   24 +++++++++++++------
 4 files changed, 19 insertions(+), 11 deletions(-)
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/3 systemd-serialgetty: support machines without serial console

---
 .../recipes-core/systemd/systemd-serialgetty.bb    |   24 +++++++++++++------
 1 files changed, 16 insertions(+), 8 deletions(-)
meta-oe/recipes-core/systemd/systemd-serialgetty.bb +16 -8
index 2b88d0c..5b903a0 100644
@@ -2,29 +2,37 @@ DESCRIPTION = "Systemd serial config"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=751419260aa954499f7abaabaa882bbe"
 
-PR = "r1"
+PR = "r2"
 
 SERIAL_CONSOLE ?= "115200 ttyS0"
 
 SRC_URI = "file://LICENSE \
            file://[email protected]"
 
-def get_baudrate(bb, d):
-    return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[0]
+def get_serial_console_value(d, index):
+    c = d.getVar('SERIAL_CONSOLE', True)
 
-def get_console(bb, d):
-    return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[1]
+    if len(c):
+        return c.split()[index]
+
+    return ""
+
+def get_baudrate(d):
+    return get_serial_console_value(d, 0)
+
+def get_console(d):
+    return get_serial_console_value(d, 1)
 
 do_install() {
-	if [ ! ${@get_baudrate(bb, d)} = "" ]; then
-		sed -i -e s/\@BAUDRATE\@/${@get_baudrate(bb, d)}/g ${WORKDIR}/[email protected]
+	if [ ! ${@get_baudrate(d)} = "" ]; then
+		sed -i -e s/\@BAUDRATE\@/${@get_baudrate(d)}/g ${WORKDIR}/[email protected]
 		install -d ${D}${base_libdir}/systemd/system/
 		install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/
 		install ${WORKDIR}/[email protected] ${D}${base_libdir}/systemd/system/
 
 		# enable the service
 		ln -sf ${base_libdir}/systemd/system/[email protected] \
-			${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(bb, d)}.service
+			${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(d)}.service
 	fi
 }
 
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 2/3 systemd.bbclass: depends on systemd

In reply to Otavio Salvador

Packages that uses the systemd class need to have systemd build otherwise they might fail to detect systemd as available or fail to generate rootfs.

---
 meta-oe/classes/systemd.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta-oe/classes/systemd.bbclass +1 -1
index 2ca7bfc..094a12c 100644
@@ -1,4 +1,4 @@
-DEPENDS_append = " systemd-systemctl-native"
+DEPENDS_append = " systemd systemd-systemctl-native"
 
 systemd_postinst() {
 OPTS=""
Signature · 1 line
1.7.2.5
#3 lore raw

PATCH 3/3 busybox: fix busybox-syslog systemd service file

In reply to Otavio Salvador

The service file had the 'Wants' in 'Service' group instead of the 'Unit' group.

---
 .../busybox/busybox/busybox-syslog.service.in      |    2 +-
 .../recipes-core/busybox/busybox_1.19.3.bbappend   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-core/busybox/busybox/busybox-syslog.service.in +1 -1
index db90082..27b9831 100644
@@ -1,12 +1,12 @@
 [Unit]
 Description=System Logging Service
+Wants=busybox-klogd.service
 
 [Service]
 ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
 EnvironmentFile=-/etc/default/busybox-syslog
 ExecStart=@base_sbindir@/syslogd -n $OPTIONS
 Sockets=syslog.socket
-Wants=busybox-klogd.service
 
 [Install]
 WantedBy=multi-user.target
meta-oe/recipes-core/busybox/busybox_1.19.3.bbappend +1 -1
index 46177e3..7e72a43 100644
@@ -1,6 +1,6 @@
 inherit systemd
 
-PRINC := "${@int(PRINC) + 1}"
+PRINC := "${@int(PRINC) + 2}"
 
 # look for files in the layer first
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
Signature · 1 line
1.7.2.5