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