diff options
author | Koen Kooi <koen@openembedded.org> | 2011-05-02 10:22:10 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2011-05-06 09:30:17 +0200 |
commit | 1f14659d5e01f1896ed8899900d2d10745993eea (patch) | |
tree | 4843128e5ed311fe4b40b8c9cfd7471bb9ffd8ad | |
parent | c062f83ab255a355413c4a2b2d1b09dec5c8da6c (diff) | |
download | openembedded-1f14659d5e01f1896ed8899900d2d10745993eea.tar.gz |
systemd: update to v26
Signed-off-by: Koen Kooi <koen@openembedded.org>
-rw-r--r-- | recipes/systemd/files/disable_xml_generation.patch | 36 | ||||
-rw-r--r-- | recipes/systemd/files/getty-serial@.service | 19 | ||||
-rw-r--r-- | recipes/systemd/systemd-v26/0001-systemd-disable-xml-file-stuff-and-introspection.patch | 93 | ||||
-rw-r--r-- | recipes/systemd/systemd-v26/0003-Angstrom-support.patch | 165 | ||||
-rw-r--r-- | recipes/systemd/systemd-v26/execute.patch (renamed from recipes/systemd/files/execute.patch) | 0 | ||||
-rw-r--r-- | recipes/systemd/systemd-v26/replace_accpet4.patch (renamed from recipes/systemd/files/replace_accpet4.patch) | 0 | ||||
-rw-r--r-- | recipes/systemd/systemd-v26/serial-getty@.service | 28 | ||||
-rw-r--r-- | recipes/systemd/systemd-v26/systemadm.patch (renamed from recipes/systemd/files/systemadm.patch) | 0 | ||||
-rw-r--r-- | recipes/systemd/systemd_git.bb | 71 |
9 files changed, 331 insertions, 81 deletions
diff --git a/recipes/systemd/files/disable_xml_generation.patch b/recipes/systemd/files/disable_xml_generation.patch deleted file mode 100644 index 47f36b8ecb..0000000000 --- a/recipes/systemd/files/disable_xml_generation.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am 2010-06-15 22:58:46.752961117 +0200 -+++ git/Makefile.am 2010-06-15 22:59:22.615040570 +0200 -@@ -75,21 +75,6 @@ - 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_systemunit_DATA = \ - units/emergency.service \ - units/basic.target \ -@@ -466,9 +451,6 @@ - man/systemd.special.html.in - endif - --org.freedesktop.systemd1.%.xml: systemd -- $(AM_V_GEN)./systemd --introspect=${@:.xml=} > $@ -- - CLEANFILES += $(dbusinterface_DATA) - - install-data-hook: diff --git a/recipes/systemd/files/getty-serial@.service b/recipes/systemd/files/getty-serial@.service deleted file mode 100644 index 62e4695243..0000000000 --- a/recipes/systemd/files/getty-serial@.service +++ /dev/null @@ -1,19 +0,0 @@ -# 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=Getty on %I -Before=getty.target -After=basic.target -Conflicts=shutdown.target - -[Service] -Environment=TERM=linux -ExecStart=/sbin/getty @BAUDRATE@ %I -Restart=restart-always -RestartSec=0 -KillMode=process-group diff --git a/recipes/systemd/systemd-v26/0001-systemd-disable-xml-file-stuff-and-introspection.patch b/recipes/systemd/systemd-v26/0001-systemd-disable-xml-file-stuff-and-introspection.patch new file mode 100644 index 0000000000..63310aaecd --- /dev/null +++ b/recipes/systemd/systemd-v26/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/recipes/systemd/systemd-v26/0003-Angstrom-support.patch b/recipes/systemd/systemd-v26/0003-Angstrom-support.patch new file mode 100644 index 0000000000..c75cee4c30 --- /dev/null +++ b/recipes/systemd/systemd-v26/0003-Angstrom-support.patch @@ -0,0 +1,165 @@ +From 0fa5b59c5f484c80453e9d3201b87e4253f8bec3 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <koen@dominion.thruhere.net> +Date: Thu, 5 May 2011 17:15:41 +0200 +Subject: [PATCH 3/3] Angstrom support + +This commit consists of the initial work to include Angstrom as a ported +distribution for systemd. + +Angstrom tries to follow the debian way as much as possible, but deviates +where it doesn't make sense for 'embedded'. + +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> +--- + Makefile.am | 7 +++++++ + configure.ac | 7 +++++++ + src/locale-setup.c | 2 +- + src/service.c | 10 +++++----- + src/util.c | 12 ++++++++++++ + 5 files changed, 32 insertions(+), 6 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 49d2ee8..f3f7818 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -96,6 +96,12 @@ AM_CPPFLAGS += \ + -DKBD_SETFONT=\"/bin/setfont\" \ + -DDEFAULT_FONT=\"LatArCyrHeb-16\" + else ++if TARGET_ANGSTROM ++AM_CPPFLAGS += \ ++ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ ++ -DKBD_SETFONT=\"/usr/bin/setfont\" \ ++ -DDEFAULT_FONT=\"LatArCyrHeb-16\" ++else + AM_CPPFLAGS += \ + -DKBD_LOADKEYS=\"/bin/loadkeys\" \ + -DKBD_SETFONT=\"/bin/setfont\" \ +@@ -105,6 +111,7 @@ endif + endif + endif + endif ++endif + + rootbin_PROGRAMS = \ + systemd \ +diff --git a/configure.ac b/configure.ac +index dcd4b9d..b5b7ac3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -295,6 +295,7 @@ if test "z$with_distro" = "z"; then + test -f "/etc/altlinux-release" && with_distro="altlinux" + test -f "/etc/mandriva-release" && with_distro="mandriva" + test -f "/etc/meego-release" && with_distro="meego" ++ test -f "/etc/angstrom-version" && with_distro="angstrom" + if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then + with_distro="ubuntu" + fi +@@ -375,6 +376,11 @@ case $with_distro in + AC_DEFINE(TARGET_MEEGO, [], [Target is MeeGo]) + M4_DISTRO_FLAG=-DTARGET_MEEGO=1 + ;; ++ angstrom) ++ SYSTEM_SYSVRCND_PATH=/etc ++ AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström]) ++ M4_DISTRO_FLAG=-DTARGET_ANGSTROM=1 ++ ;; + other) + ;; + *) +@@ -425,6 +431,7 @@ AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware) + AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux) + AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva) + AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego) ++AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom) + + AM_CONDITIONAL(HAVE_PLYMOUTH, test -n "$have_plymouth") + AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes") +diff --git a/src/locale-setup.c b/src/locale-setup.c +index d9adfa3..33111da 100644 +--- a/src/locale-setup.c ++++ b/src/locale-setup.c +@@ -136,7 +136,7 @@ int locale_setup(void) { + log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r)); + } + +-#elif defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) ++#elif defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM) + if (r <= 0 && + (r = parse_env_file("/etc/default/locale", NEWLINE, + "LANG", &variables[VARIABLE_LANG], +diff --git a/src/service.c b/src/service.c +index e7a5622..f826754 100644 +--- a/src/service.c ++++ b/src/service.c +@@ -65,7 +65,7 @@ static const struct { + { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT }, + #endif + +-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_FRUGALWARE) ++#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_FRUGALWARE) || defined(TARGET_ANGSTROM) + /* Debian style rcS.d */ + { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT }, + #endif +@@ -246,7 +246,7 @@ static char *sysv_translate_name(const char *name) { + if (!(r = new(char, strlen(name) + sizeof(".service")))) + return NULL; + +-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) ++#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM) + if (endswith(name, ".sh")) + /* Drop Debian-style .sh suffix */ + strcpy(stpcpy(r, name) - 3, ".service"); +@@ -297,7 +297,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char + "x-display-manager", SPECIAL_DISPLAY_MANAGER_SERVICE, + "null", NULL, + +-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) ++#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM) + "mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET, + #endif + +@@ -887,7 +887,7 @@ static int service_load_sysv_name(Service *s, const char *name) { + + /* For SysV services we strip the boot.*, rc.* and *.sh + * prefixes/suffixes. */ +-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) ++#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM) + if (endswith(name, ".sh.service")) + return -ENOENT; + #endif +@@ -914,7 +914,7 @@ static int service_load_sysv_name(Service *s, const char *name) { + + r = service_load_sysv_path(s, path); + +-#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) ++#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM) + if (r >= 0 && s->meta.load_state == UNIT_STUB) { + /* Try Debian style *.sh source'able init scripts */ + strcat(path, ".sh"); +diff --git a/src/util.c b/src/util.c +index f0051ee..5af9161 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -3426,6 +3426,18 @@ void status_welcome(void) { + + if (!ansi_color) + const_color = "1;35"; /* Bright Magenta for MeeGo */ ++#elif defined(TARGET_ANGSTROM) ++ ++ if (!pretty_name) { ++ if ((r = read_one_line_file("/etc/angstrom-version", &pretty_name)) < 0) { ++ ++ if (r != -ENOENT) ++ log_warning("Failed to read /etc/angstrom-version: %s", strerror(-r)); ++ } ++ } ++ ++ if (!ansi_color) ++ const_color = "1;35"; /* Bright Magenta for Angstrom */ + #endif + + if (!pretty_name && !const_pretty) +-- +1.6.6.1 + diff --git a/recipes/systemd/files/execute.patch b/recipes/systemd/systemd-v26/execute.patch index c9f88c82ea..c9f88c82ea 100644 --- a/recipes/systemd/files/execute.patch +++ b/recipes/systemd/systemd-v26/execute.patch diff --git a/recipes/systemd/files/replace_accpet4.patch b/recipes/systemd/systemd-v26/replace_accpet4.patch index d57b07af65..d57b07af65 100644 --- a/recipes/systemd/files/replace_accpet4.patch +++ b/recipes/systemd/systemd-v26/replace_accpet4.patch diff --git a/recipes/systemd/systemd-v26/serial-getty@.service b/recipes/systemd/systemd-v26/serial-getty@.service new file mode 100644 index 0000000000..daf0dac723 --- /dev/null +++ b/recipes/systemd/systemd-v26/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/recipes/systemd/files/systemadm.patch b/recipes/systemd/systemd-v26/systemadm.patch index b9c09dbbee..b9c09dbbee 100644 --- a/recipes/systemd/files/systemadm.patch +++ b/recipes/systemd/systemd-v26/systemadm.patch diff --git a/recipes/systemd/systemd_git.bb b/recipes/systemd/systemd_git.bb index 5f98e54b1b..863ca3a2a1 100644 --- a/recipes/systemd/systemd_git.bb +++ b/recipes/systemd/systemd_git.bb @@ -1,62 +1,81 @@ DESCRIPTION = "Systemd a init replacement" HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" -LICENSE = "GPL" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" + DEPENDS = "readline udev dbus libcap2 libcgroup gtk+" PRIORITY = "optional" SECTION = "base/shell" -PV = "0.0" +PV = "v26" +PR = "r6" PR_append = "+${SRCPV}" -inherit autotools vala +inherit autotools vala update-alternatives -TAG = "1ebdf2d8793181f31b766b8342391aa1978f9917" +TAG = "7a6000a68241d23c9f6f6bde47b2cfa9c18189da" SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git;tag=${TAG} \ file://execute.patch \ - file://systemadm.patch \ - file://disable_xml_generation.patch \ + file://0001-systemd-disable-xml-file-stuff-and-introspection.patch \ + file://0003-Angstrom-support.patch \ file://replace_accpet4.patch \ - file://getty-serial@.service \ + file://serial-getty@.service \ " S = "${WORKDIR}/git" -EXTRA_OECONF = " --with-distro=debian \ +SYSTEMDDISTRO ?= "debian" +SYSTEMDDISTRO_angstrom = "angstrom" + +# The gtk+ tools should get built as a seperate recipe e.g. systemd-tools +EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \ --with-rootdir=${base_prefix} \ + --disable-gtk \ " -PACKAGES = "${PN} ${PN}-gui ${PN}-dbg ${PN}-doc" +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" FILES_${PN}-gui = "${bindir}/systemadm" 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-install \ + ${bindir}/systemd* \ + ${libdir}/tmpfiles.d/*.conf \ + ${libdir}/systemd \ " -FILES_${PN}-dbg += " /lib/systemd/.debug " - -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] +FILES_${PN}-dbg += "${base_libdir}/systemd/.debug ${base_libdir}/systemd/*/.debug" +# util-linux -> hwclock, kbd -> loadkeys,setfont +RRECOMMENDS_${PN} += "util-linux kbd kbd-consolefonts" -do_install_append(){ - if [ ! ${@get_baudrate(bb, d)} = "" ]; then - sed -i -e s/\@BAUDRATE\@/${@get_baudrate(bb, d)}/g ${WORKDIR}/getty-serial@.service - install ${WORKDIR}/getty-serial@.service ${D}${base_libdir}/systemd/system/ - ln -sf ${base_libdir}/systemd/system/getty-serial@.service \ - ${D}${sysconfdir}/systemd/system/getty.target.wants/getty@${@get_console(bb, d)}.service - fi -} |