summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-05-25 21:49:00 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-05-26 08:42:34 +0200
commit091579bf2c1a424fac9c10b7a1738cea132ecd60 (patch)
treed7279d32dac80e1f2d1d41a1443dca099a41cb3a /meta-oe/recipes-core
parent5755cbd883f74c24a1d4b909f48dd14c12b9b18d (diff)
downloadmeta-openembedded-091579bf2c1a424fac9c10b7a1738cea132ecd60.tar.gz
systemd: import from OE rev 84696f215bbf81cb3def7e03e45dd66b0a85b1bb
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-core')
-rw-r--r--meta-oe/recipes-core/systemd/systemd/0001-systemd-disable-xml-file-stuff-and-introspection.patch93
-rw-r--r--meta-oe/recipes-core/systemd/systemd/execute.patch17
-rw-r--r--meta-oe/recipes-core/systemd/systemd/serial-getty@.service28
-rw-r--r--meta-oe/recipes-core/systemd/systemd_git.bb91
4 files changed, 229 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd/0001-systemd-disable-xml-file-stuff-and-introspection.patch b/meta-oe/recipes-core/systemd/systemd/0001-systemd-disable-xml-file-stuff-and-introspection.patch
new file mode 100644
index 000000000..63310aaec
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd/0001-systemd-disable-xml-file-stuff-and-introspection.patch
@@ -0,0 +1,93 @@
1From 4f2c783daa2556666821ad4b3a8825a7b58857b4 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 2 May 2011 09:12:21 +0200
4Subject: [PATCH] systemd: disable xml file stuff and introspection
5
6---
7 Makefile.am | 40 ++--------------------------------------
8 1 files changed, 2 insertions(+), 38 deletions(-)
9
10diff --git a/Makefile.am b/Makefile.am
11index 873090e..49d2ee8 100644
12--- a/Makefile.am
13+++ b/Makefile.am
14@@ -199,21 +199,6 @@ dist_dbussystemservice_DATA = \
15 dist_udevrules_DATA = \
16 src/99-systemd.rules
17
18-dbusinterface_DATA = \
19- org.freedesktop.systemd1.Manager.xml \
20- org.freedesktop.systemd1.Job.xml \
21- org.freedesktop.systemd1.Unit.xml \
22- org.freedesktop.systemd1.Service.xml \
23- org.freedesktop.systemd1.Socket.xml \
24- org.freedesktop.systemd1.Timer.xml \
25- org.freedesktop.systemd1.Target.xml \
26- org.freedesktop.systemd1.Device.xml \
27- org.freedesktop.systemd1.Mount.xml \
28- org.freedesktop.systemd1.Automount.xml \
29- org.freedesktop.systemd1.Snapshot.xml \
30- org.freedesktop.systemd1.Swap.xml \
31- org.freedesktop.systemd1.Path.xml
32-
33 dist_bashcompletion_DATA = \
34 src/systemctl-bash-completion.sh
35
36@@ -642,17 +627,10 @@ XML_FILES = \
37 XML_IN_FILES = \
38 ${patsubst %.1,%.xml.in,${patsubst %.3,%.xml.in,${patsubst %.5,%.xml.in,${patsubst %.7,%.xml.in,${patsubst %.8,%.xml.in,$(nodist_man_MANS)}}}}}
39
40-dist_noinst_DATA = \
41- ${XML_FILES:.xml=.html}
42-
43-nodist_noinst_DATA = \
44- ${XML_IN_FILES:.xml.in=.html}
45-
46 EXTRA_DIST += \
47 $(XML_FILES) \
48 $(XML_IN_FILES) \
49- ${nodist_man_MANS:=.in} \
50- ${XML_IN_FILES:.xml.in=.html.in}
51+ ${nodist_man_MANS:=.in}
52
53 systemd_SOURCES = \
54 src/main.c
55@@ -1218,7 +1196,6 @@ CLEANFILES = \
56 $(nodist_systemunit_DATA) \
57 $(nodist_userunit_DATA) \
58 $(nodist_man_MANS) \
59- ${XML_IN_FILES:.xml.in=.html} \
60 $(pkgconfigdata_DATA) \
61 src/org.freedesktop.systemd1.policy
62
63@@ -1280,26 +1257,13 @@ man/%.8: man/%.xml
64 man/%.8.in: man/%.xml.in
65 $(XSLTPROC_PROCESS_MAN_IN)
66
67-man/%.html: man/%.xml
68- $(XSLTPROC_PROCESS_HTML)
69-
70-man/%.html.in: man/%.xml.in
71- $(XSLTPROC_PROCESS_HTML_IN)
72-
73 CLEANFILES += \
74 $(dist_man_MANS) \
75- ${nodist_man_MANS:=.in} \
76- ${XML_FILES:.xml=.html} \
77- ${XML_IN_FILES:.xml.in=.html.in}
78+ ${nodist_man_MANS:=.in}
79 endif
80
81 DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
82
83-org.freedesktop.systemd1.%.xml: systemd
84- $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
85- $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
86- $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp
87-
88 CLEANFILES += \
89 $(dbusinterface_DATA)
90
91--
921.6.6.1
93
diff --git a/meta-oe/recipes-core/systemd/systemd/execute.patch b/meta-oe/recipes-core/systemd/systemd/execute.patch
new file mode 100644
index 000000000..c9f88c82e
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd/execute.patch
@@ -0,0 +1,17 @@
1Index: git/src/execute.c
2===================================================================
3--- git.orig/src/execute.c 2010-06-15 11:41:02.792856752 +0200
4+++ git/src/execute.c 2010-06-15 11:52:02.899046198 +0200
5@@ -47,6 +47,12 @@
6 #include "cgroup.h"
7 #include "namespace.h"
8
9+#ifndef SCHED_RESET_ON_FORK
10+# define SCHED_RESET_ON_FORK 0x40000000
11+#endif
12+
13+
14+
15 /* This assumes there is a 'tty' group */
16 #define TTY_MODE 0620
17
diff --git a/meta-oe/recipes-core/systemd/systemd/serial-getty@.service b/meta-oe/recipes-core/systemd/systemd/serial-getty@.service
new file mode 100644
index 000000000..daf0dac72
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd/serial-getty@.service
@@ -0,0 +1,28 @@
1# This file is part of systemd.
2#
3# systemd is free software; you can redistribute it and/or modify it
4# under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or
6# (at your option) any later version.
7
8[Unit]
9Description=Serial Getty on %I
10BindTo=dev-%i.device
11After=dev-%i.device systemd-user-sessions.service
12
13# If additional gettys are spawned during boot then we should make
14# sure that this is synchronized before getty.target, even though
15# getty.target didn't actually pull it in.
16Before=getty.target
17
18[Service]
19Environment=TERM=vt100
20ExecStart=-/sbin/getty @BAUDRATE@ %I
21Restart=always
22RestartSec=0
23UtmpIdentifier=%I
24KillMode=process
25
26# Some login implementations ignore SIGTERM, so we send SIGHUP
27# instead, to ensure that login terminates cleanly.
28KillSignal=SIGHUP
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb
new file mode 100644
index 000000000..fe939b6c2
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd_git.bb
@@ -0,0 +1,91 @@
1DESCRIPTION = "Systemd a init replacement"
2HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
5
6DEPENDS = "readline udev dbus libcap2 libcgroup"
7DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
8
9PRIORITY = "optional"
10SECTION = "base/shell"
11
12inherit gitpkgv
13PKGV = "v${GITPKGVTAG}"
14
15# This gets reset to the proper version with PKGV above
16# Except that PKGV doesn't work in OE-core :(
17# PV = "git"
18PV = "v26"
19PR = "r0"
20
21inherit autotools vala update-alternatives
22
23SRCREV = "da2617378523e007ec0c6efe99d0cebb2be994e1"
24
25SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git \
26 file://execute.patch \
27 file://0001-systemd-disable-xml-file-stuff-and-introspection.patch \
28 file://serial-getty@.service \
29 "
30
31S = "${WORKDIR}/git"
32
33SYSTEMDDISTRO ?= "debian"
34SYSTEMDDISTRO_angstrom = "angstrom"
35
36# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
37EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
38 --with-rootdir=${base_prefix} \
39 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
40 --disable-gtk \
41 "
42
43def get_baudrate(bb, d):
44 return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[0]
45
46def get_console(bb, d):
47 return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[1]
48
49do_install_append() {
50 if [ ! ${@get_baudrate(bb, d)} = "" ]; then
51 sed -i -e s/\@BAUDRATE\@/${@get_baudrate(bb, d)}/g ${WORKDIR}/serial-getty@.service
52 install ${WORKDIR}/serial-getty@.service ${D}${base_libdir}/systemd/system/
53 ln -sf ${base_libdir}/systemd/system/serial-getty@.service \
54 ${D}${sysconfdir}/systemd/system/getty.target.wants/getty@${@get_console(bb, d)}.service
55 fi
56}
57
58ALTERNATIVE_NAME = "init"
59ALTERNATIVE_LINK = "${base_sbindir}/init"
60ALTERNATIVE_PATH = "${base_bindir}/systemd"
61ALTERNATIVE_PRIORITY = "80"
62
63PACKAGES =+ "${PN}-gui ${PN}-serialgetty"
64
65FILES_${PN}-gui = "${bindir}/systemadm"
66
67# This is a machine specific file
68FILES_${PN}-serialgetty = "${base_libdir}/systemd/system/serial-getty@.service ${sysconfdir}/systemd/system/getty.target.wants/getty@${@get_console(bb, d)}.service"
69PACKAGE_ARCH_${PN}-serialgetty = "${MACHINE_ARCH}"
70
71FILES_${PN} = " ${base_bindir}/* \
72 ${datadir}/dbus-1/services \
73 ${datadir}/dbus-1/system-services \
74 ${datadir}/polkit-1 \
75 ${datadir}/${PN} \
76 ${sysconfdir} \
77 ${base_libdir}/systemd/* \
78 ${base_libdir}/systemd/system/* \
79 ${base_libdir}/udev/rules.d \
80 ${base_libdir}/security/*.so \
81 /cgroup \
82 ${bindir}/systemd* \
83 ${libdir}/tmpfiles.d/*.conf \
84 ${libdir}/systemd \
85 "
86
87FILES_${PN}-dbg += "${base_libdir}/systemd/.debug ${base_libdir}/systemd/*/.debug"
88
89# kbd -> loadkeys,setfont
90RRECOMMENDS_${PN} += "kbd kbd-consolefonts ${PN}-serialgetty"
91