From 119349c48a0709faec1c06086029aadbdc86f3e5 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Wed, 16 Jun 2010 23:03:24 +0200 Subject: systemd: add systemd to openembedded * not fully functional yet * needs udev-154 and cgroup enabled in kernel * halt/reboot don't work with busybox --- recipes/systemd/files/disable_xml_generation.patch | 36 ++++++++++++++++++++++ recipes/systemd/files/execute.patch | 17 ++++++++++ recipes/systemd/files/getty-serial@.service | 19 ++++++++++++ recipes/systemd/files/replace_accpet4.patch | 26 ++++++++++++++++ recipes/systemd/files/systemadm.patch | 13 ++++++++ 5 files changed, 111 insertions(+) create mode 100644 recipes/systemd/files/disable_xml_generation.patch create mode 100644 recipes/systemd/files/execute.patch create mode 100644 recipes/systemd/files/getty-serial@.service create mode 100644 recipes/systemd/files/replace_accpet4.patch create mode 100644 recipes/systemd/files/systemadm.patch (limited to 'recipes/systemd/files') diff --git a/recipes/systemd/files/disable_xml_generation.patch b/recipes/systemd/files/disable_xml_generation.patch new file mode 100644 index 0000000000..47f36b8ecb --- /dev/null +++ b/recipes/systemd/files/disable_xml_generation.patch @@ -0,0 +1,36 @@ +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/execute.patch b/recipes/systemd/files/execute.patch new file mode 100644 index 0000000000..c9f88c82ea --- /dev/null +++ b/recipes/systemd/files/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/recipes/systemd/files/getty-serial@.service b/recipes/systemd/files/getty-serial@.service new file mode 100644 index 0000000000..62e4695243 --- /dev/null +++ b/recipes/systemd/files/getty-serial@.service @@ -0,0 +1,19 @@ +# 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/files/replace_accpet4.patch b/recipes/systemd/files/replace_accpet4.patch new file mode 100644 index 0000000000..d57b07af65 --- /dev/null +++ b/recipes/systemd/files/replace_accpet4.patch @@ -0,0 +1,26 @@ +Index: git/src/logger.c +=================================================================== +--- git.orig/src/logger.c 2010-06-15 23:02:38.212932153 +0200 ++++ git/src/logger.c 2010-06-15 23:02:51.091686447 +0200 +@@ -331,7 +331,7 @@ + + assert(s); + +- if ((fd = accept4(server_fd, NULL, NULL, SOCK_NONBLOCK|SOCK_CLOEXEC)) < 0) ++ if ((fd = accept(server_fd, NULL, NULL)) < 0) + return -errno; + + if (s->n_streams >= STREAMS_MAX) { +Index: git/src/socket.c +=================================================================== +--- git.orig/src/socket.c 2010-06-15 23:02:16.269606647 +0200 ++++ git/src/socket.c 2010-06-15 23:02:31.115021717 +0200 +@@ -1201,7 +1201,7 @@ + if (w->socket_accept) { + for (;;) { + +- if ((cfd = accept4(fd, NULL, NULL, SOCK_NONBLOCK)) < 0) { ++ if ((cfd = accept(fd, NULL, NULL)) < 0) { + + if (errno == EINTR) + continue; diff --git a/recipes/systemd/files/systemadm.patch b/recipes/systemd/files/systemadm.patch new file mode 100644 index 0000000000..b9c09dbbee --- /dev/null +++ b/recipes/systemd/files/systemadm.patch @@ -0,0 +1,13 @@ +Index: git/src/systemadm.vala +=================================================================== +--- git.orig/src/systemadm.vala 2010-06-15 11:02:35.863509632 +0200 ++++ git/src/systemadm.vala 2010-06-15 11:06:16.305986249 +0200 +@@ -297,7 +297,7 @@ + + bbox.pack_start(cancel_button, false, true, 0); + +- bus = Bus.get(session ? BusType.SESSION : BusType.SYSTEM); ++ bus = DBus.Bus.get(session ? DBus.BusType.SESSION : DBus.BusType.SYSTEM); + + manager = bus.get_object( + "org.freedesktop.systemd1", -- cgit 1.2.3-korg