summaryrefslogtreecommitdiff
path: root/recipes/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/systemd')
-rw-r--r--recipes/systemd/files/disable_xml_generation.patch36
-rw-r--r--recipes/systemd/files/execute.patch17
-rw-r--r--recipes/systemd/files/getty-serial@.service19
-rw-r--r--recipes/systemd/files/replace_accpet4.patch26
-rw-r--r--recipes/systemd/files/systemadm.patch13
-rw-r--r--recipes/systemd/systemd_git.bb62
6 files changed, 173 insertions, 0 deletions
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",
diff --git a/recipes/systemd/systemd_git.bb b/recipes/systemd/systemd_git.bb
new file mode 100644
index 0000000000..5f98e54b1b
--- /dev/null
+++ b/recipes/systemd/systemd_git.bb
@@ -0,0 +1,62 @@
+DESCRIPTION = "Systemd a init replacement"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
+LICENSE = "GPL"
+DEPENDS = "readline udev dbus libcap2 libcgroup gtk+"
+PRIORITY = "optional"
+SECTION = "base/shell"
+
+PV = "0.0"
+PR_append = "+${SRCPV}"
+
+inherit autotools vala
+
+TAG = "1ebdf2d8793181f31b766b8342391aa1978f9917"
+
+SRC_URI = "git://anongit.freedesktop.org/systemd;protocol=git;tag=${TAG} \
+ file://execute.patch \
+ file://systemadm.patch \
+ file://disable_xml_generation.patch \
+ file://replace_accpet4.patch \
+ file://getty-serial@.service \
+ "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " --with-distro=debian \
+ --with-rootdir=${base_prefix} \
+ "
+
+PACKAGES = "${PN} ${PN}-gui ${PN}-dbg ${PN}-doc"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN} = " ${base_bindir}/* \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/${PN} \
+ ${sysconfdir} \
+ ${base_libdir}/systemd/* \
+ ${base_libdir}/systemd/system/* \
+ ${base_libdir}/udev/rules.d \
+ /cgroup \
+ ${bindir}/systemd-install \
+ "
+
+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]
+
+
+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
+}