summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd
diff options
context:
space:
mode:
authorRadu Moisan <radu.moisan@intel.com>2013-01-19 22:47:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-20 12:58:55 +0000
commitb8744d5376a9df4ec30120fdc8f39579d34d0545 (patch)
tree9503d5816da66544969292ddb5ff999e50c1b9a8 /meta/recipes-core/systemd/systemd
parentb18886d9b7c913cd463a98d0ef1b3a8a240f5791 (diff)
downloadpoky-b8744d5376a9df4ec30120fdc8f39579d34d0545.tar.gz
systemd: add systemd recipes
Add systemd recipes and associated support recipes. Mostly based on meta-oe/meta-systemd, so almost all credit should go to: Andreas Müller <schnitzeltony@googlemail.com> Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Holger Hans Peter Freyther <holger@moiji-mobile.com> Khem Raj <raj.khem@gmail.com> Koen Kooi <koen@dominion.thruhere.net> Martin Jansa <Martin.Jansa@gmail.com> (From OE-Core rev: 6a8a48b4d0d0b9b8d8af46cae11245bcb870bbc3) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd/00-create-volatile.conf10
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch103
-rw-r--r--meta/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch91
-rw-r--r--meta/recipes-core/systemd/systemd/modprobe.rules17
-rw-r--r--meta/recipes-core/systemd/systemd/optional_secure_getenv.patch19
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch26
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch26
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch82
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch35
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch166
-rw-r--r--meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch335
-rw-r--r--meta/recipes-core/systemd/systemd/touchscreen.rules18
-rw-r--r--meta/recipes-core/systemd/systemd/use-rootlibdir.patch107
-rw-r--r--meta/recipes-core/systemd/systemd/var-run.conf4
14 files changed, 1039 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
new file mode 100644
index 0000000000..d160a9b2ab
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
@@ -0,0 +1,10 @@
1#This goes hand-in-hand with the base-files of OE-Core. The file must
2# be sorted before 'systemd.conf' becuase this attempts to create a file
3# inside /var/log.
4
5
6d /var/volatile/cache - - - -
7d /var/volatile/log - - - -
8d /var/volatile/lock - - - -
9d /var/volatile/run - - - -
10d /var/volatile/tmp - - - -
diff --git a/meta/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch b/meta/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch
new file mode 100644
index 0000000000..7de2705ace
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch
@@ -0,0 +1,103 @@
1From 2003e63f48cee2f497de7b90b66284f98c1c9919 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 10 Dec 2012 12:24:32 +0100
4Subject: [PATCH 1/2] Revert "systemd-analyze: use argparse instead of getopt"
5
6This reverts commit 0c0271841ab45595f71528c50bcf1904d4b841d5.
7
8Argparse is broken in current OE python
9---
10 src/analyze/systemd-analyze | 60 ++++++++++++++++++++++++++++---------------
11 1 files changed, 39 insertions(+), 21 deletions(-)
12
13diff --git a/src/analyze/systemd-analyze b/src/analyze/systemd-analyze
14index 88699d6..87a83dd 100755
15--- a/src/analyze/systemd-analyze
16+++ b/src/analyze/systemd-analyze
17@@ -1,7 +1,6 @@
18 #!/usr/bin/python
19
20-import sys, os
21-import argparse
22+import getopt, sys, os
23 from gi.repository import Gio
24 try:
25 import cairo
26@@ -76,6 +75,20 @@ def draw_text(context, x, y, text, size = 12, r = 0, g = 0, b = 0, vcenter = 0.5
27
28 context.restore()
29
30+def usage():
31+ sys.stdout.write("""systemd-analyze [--user] time
32+systemd-analyze [--user] blame
33+systemd-analyze [--user] plot
34+
35+Process systemd profiling information
36+
37+ -h --help Show this help
38+""")
39+
40+def help():
41+ usage()
42+ sys.exit()
43+
44 def time():
45
46 initrd_time, start_time, finish_time = acquire_start_time()
47@@ -266,29 +279,34 @@ def plot():
48
49 surface.finish()
50
51-parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
52- description='Process systemd profiling information',
53- epilog='''\
54-time - print time spent in the kernel before reaching userspace
55-blame - print list of running units ordered by time to init
56-plot - output SVG graphic showing service initialization
57-''')
58-
59-parser.add_argument('action', choices=('time', 'blame', 'plot'),
60- default='time', nargs='?',
61- help='action to perform (default: time)')
62-parser.add_argument('--user', action='store_true',
63- help='use the session bus')
64+def unknown_verb():
65+ sys.stderr.write("Unknown verb '%s'.\n" % args[0])
66+ usage()
67+ sys.exit(1)
68
69-args = parser.parse_args()
70+bus = Gio.BusType.SYSTEM
71
72-if args.user:
73- bus = Gio.BusType.SESSION
74-else:
75- bus = Gio.BusType.SYSTEM
76+try:
77+ opts, args = getopt.gnu_getopt(sys.argv[1:], "h", ["help", "user"])
78+except getopt.GetoptError as err:
79+ sys.stdout.write(str(err) + "\n")
80+ usage()
81+ sys.exit(2)
82+for o, a in opts:
83+ if o in ("-h", "--help"):
84+ help()
85+ elif o == '--user':
86+ bus = Gio.BusType.SESSION
87+ else:
88+ assert False, "unhandled option"
89
90 verb = {'time' : time,
91 'blame': blame,
92 'plot' : plot,
93+ 'help' : help,
94 }
95-verb.get(args.action)()
96+
97+if len(args) == 0:
98+ time()
99+else:
100+ verb.get(args[0], unknown_verb)()
101--
1021.7.7.6
103
diff --git a/meta/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch b/meta/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch
new file mode 100644
index 0000000000..e5e8d7df0d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch
@@ -0,0 +1,91 @@
1From 8079db861b8ffdce69fa10a9ab9ef4740045187f Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 10 Dec 2012 12:25:00 +0100
4Subject: [PATCH 2/2] Revert "analyze: use GDBus instead of dbus-python"
5
6This reverts commit 4940c64240541e91411620b7dc0963e012aa6b91.
7
8Python-gobject is too old in current OE
9---
10 src/analyze/systemd-analyze | 31 ++++++++++++++-----------------
11 1 files changed, 14 insertions(+), 17 deletions(-)
12
13diff --git a/src/analyze/systemd-analyze b/src/analyze/systemd-analyze
14index 87a83dd..636fd74 100755
15--- a/src/analyze/systemd-analyze
16+++ b/src/analyze/systemd-analyze
17@@ -1,15 +1,14 @@
18 #!/usr/bin/python
19
20-import getopt, sys, os
21-from gi.repository import Gio
22+import getopt, dbus, sys, os
23 try:
24 import cairo
25 except ImportError:
26 cairo = None
27
28 def acquire_time_data():
29- manager = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
30- None, 'org.freedesktop.systemd1', '/org/freedesktop/systemd1', 'org.freedesktop.systemd1.Manager', None)
31+
32+ manager = dbus.Interface(bus.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1'), 'org.freedesktop.systemd1.Manager')
33 units = manager.ListUnits()
34
35 l = []
36@@ -18,25 +17,23 @@ def acquire_time_data():
37 if i[5] != "":
38 continue
39
40- properties = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
41- None, 'org.freedesktop.systemd1', i[6], 'org.freedesktop.DBus.Properties', None)
42+ properties = dbus.Interface(bus.get_object('org.freedesktop.systemd1', i[6]), 'org.freedesktop.DBus.Properties')
43
44- ixt = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'InactiveExitTimestampMonotonic')
45- aet = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'ActiveEnterTimestampMonotonic')
46- axt = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'ActiveExitTimestampMonotonic')
47- iet = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'InactiveEnterTimestampMonotonic')
48+ ixt = int(properties.Get('org.freedesktop.systemd1.Unit', 'InactiveExitTimestampMonotonic'))
49+ aet = int(properties.Get('org.freedesktop.systemd1.Unit', 'ActiveEnterTimestampMonotonic'))
50+ axt = int(properties.Get('org.freedesktop.systemd1.Unit', 'ActiveExitTimestampMonotonic'))
51+ iet = int(properties.Get('org.freedesktop.systemd1.Unit', 'InactiveEnterTimestampMonotonic'))
52
53 l.append((str(i[0]), ixt, aet, axt, iet))
54
55 return l
56
57 def acquire_start_time():
58- properties = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
59- None, 'org.freedesktop.systemd1', '/org/freedesktop/systemd1', 'org.freedesktop.DBus.Properties', None)
60+ properties = dbus.Interface(bus.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1'), 'org.freedesktop.DBus.Properties')
61
62- initrd_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'InitRDTimestampMonotonic')
63- userspace_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'UserspaceTimestampMonotonic')
64- finish_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic')
65+ initrd_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'InitRDTimestampMonotonic'))
66+ userspace_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'UserspaceTimestampMonotonic'))
67+ finish_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic'))
68
69 if finish_time == 0:
70 sys.stderr.write("Bootup is not yet finished. Please try again later.\n")
71@@ -284,7 +281,7 @@ def unknown_verb():
72 usage()
73 sys.exit(1)
74
75-bus = Gio.BusType.SYSTEM
76+bus = dbus.SystemBus()
77
78 try:
79 opts, args = getopt.gnu_getopt(sys.argv[1:], "h", ["help", "user"])
80@@ -296,7 +293,7 @@ for o, a in opts:
81 if o in ("-h", "--help"):
82 help()
83 elif o == '--user':
84- bus = Gio.BusType.SESSION
85+ bus = dbus.SessionBus()
86 else:
87 assert False, "unhandled option"
88
89--
901.7.7.6
91
diff --git a/meta/recipes-core/systemd/systemd/modprobe.rules b/meta/recipes-core/systemd/systemd/modprobe.rules
new file mode 100644
index 0000000000..d4a096b82b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/modprobe.rules
@@ -0,0 +1,17 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# Try and modprobe for drivers for new hardware
17ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
diff --git a/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch b/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch
new file mode 100644
index 0000000000..35f1467c54
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch
@@ -0,0 +1,19 @@
1on uclibc secure_getenv is not available
2therefore default to using getenv instead
3
4Singed-off-by: Khem Raj <raj.khem@gmail.com>
5
6Upstream-Status: Pending
7Index: git/src/shared/missing.h
8===================================================================
9--- git.orig/src/shared/missing.h 2012-09-22 18:46:44.141282145 -0700
10+++ git/src/shared/missing.h 2012-09-22 18:48:44.081276570 -0700
11@@ -233,6 +233,8 @@
12 #ifndef HAVE_SECURE_GETENV
13 # ifdef HAVE___SECURE_GETENV
14 # define secure_getenv __secure_getenv
15+# elif defined __UCLIBC__
16+# define secure_getenv getenv
17 # else
18 # error neither secure_getenv nor __secure_getenv are available
19 # endif
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch b/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
new file mode 100644
index 0000000000..1bfc3bdb18
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
@@ -0,0 +1,26 @@
1--- systemd-185.orig/configure.ac 2012-06-04 14:15:16.000000000 -0400
2+++ systemd-pam-185/configure.ac 2012-06-21 22:57:10.000000000 -0400
3@@ -63,6 +63,23 @@
4
5 AC_PATH_PROG([M4], [m4])
6
7+# check for few functions not implemented in uClibc
8+
9+AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
10+
11+# check for %ms format support - assume always no if cross compiling
12+
13+AC_MSG_CHECKING([whether %ms format is supported by *scanf])
14+
15+AC_RUN_IFELSE(
16+ [AC_LANG_PROGRAM([[ include <stdio.h> ]],
17+ [[ char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
18+ int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
19+ return (rc==3)?0:1;]])],
20+ [AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
21+ [AC_MSG_RESULT([no])],
22+ [AC_MSG_RESULT([no])])
23+
24 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
25 m4_ifdef([GTK_DOC_CHECK], [
26 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
new file mode 100644
index 0000000000..449c27f88c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
@@ -0,0 +1,26 @@
1Index: git/src/nspawn/nspawn.c
2===================================================================
3--- git.orig/src/nspawn/nspawn.c 2012-09-22 17:57:05.000000000 -0700
4+++ git/src/nspawn/nspawn.c 2012-09-22 18:01:41.541405768 -0700
5@@ -63,6 +63,8 @@
6 LINK_GUEST
7 } LinkJournal;
8
9+#include "config.h"
10+
11 static char *arg_directory = NULL;
12 static char *arg_user = NULL;
13 static char **arg_controllers = NULL;
14@@ -1373,7 +1375,12 @@
15 a[0] = (char*) "/sbin/init";
16 execve(a[0], a, (char**) envp);
17 } else if (argc > optind)
18+#ifdef HAVE_EXECVPE
19 execvpe(argv[optind], argv + optind, (char**) envp);
20+#else
21+ environ = (char **)envp;
22+ execvp(argv[optind], argv + optind);
23+#endif /* HAVE_EXECVPE */
24 else {
25 chdir(home ? home : "/root");
26 execle("/bin/bash", "-bash", NULL, (char**) envp);
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
new file mode 100644
index 0000000000..089ba64690
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
@@ -0,0 +1,82 @@
1Index: git/src/journal/journal-file.c
2===================================================================
3--- git.orig/src/journal/journal-file.c 2012-09-02 09:49:15.126089594 -0700
4+++ git/src/journal/journal-file.c 2012-09-02 09:49:17.118089670 -0700
5@@ -34,6 +34,8 @@
6 #include "compress.h"
7 #include "fsprg.h"
8
9+#include "config.h"
10+
11 #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
12 #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
13
14@@ -262,7 +264,7 @@
15
16 static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
17 uint64_t old_size, new_size;
18- int r;
19+ int r = 0;
20
21 assert(f);
22
23@@ -307,10 +309,25 @@
24 /* Note that the glibc fallocate() fallback is very
25 inefficient, hence we try to minimize the allocation area
26 as we can. */
27+#ifdef HAVE_POSIX_ALLOCATE
28 r = posix_fallocate(f->fd, old_size, new_size - old_size);
29 if (r != 0)
30 return -r;
31
32+#else
33+ /* Use good old method to write zeros into the journal file
34+ perhaps very inefficient yet working. */
35+ if(new_size > old_size) {
36+ char *buf = alloca(new_size - old_size);
37+ off_t oldpos = lseek(f->fd, 0, SEEK_CUR);
38+ bzero(buf, new_size - old_size);
39+ lseek(f->fd, old_size, SEEK_SET);
40+ r = write(f->fd, buf, new_size - old_size);
41+ lseek(f->fd, oldpos, SEEK_SET);
42+ }
43+ if (r < 0)
44+ return -errno;
45+#endif /* HAVE_POSIX_FALLOCATE */
46 if (fstat(f->fd, &f->last_stat) < 0)
47 return -errno;
48
49Index: git/src/journal/journald-kmsg.c
50===================================================================
51--- git.orig/src/journal/journald-kmsg.c 2012-09-02 09:49:15.130089595 -0700
52+++ git/src/journal/journald-kmsg.c 2012-09-02 12:26:17.326447895 -0700
53@@ -404,6 +404,7 @@
54
55 int server_open_kernel_seqnum(Server *s) {
56 int fd;
57+ int r = 0;
58 uint64_t *p;
59
60 assert(s);
61@@ -417,8 +418,19 @@
62 log_error("Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
63 return 0;
64 }
65-
66- if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
67+#ifdef HAVE_POSIX_ALLOCATE
68+ r = posix_fallocate(fd, 0, sizeof(uint64_t));
69+#else
70+ /* Use good old method to write zeros into the journal file
71+ perhaps very inefficient yet working. */
72+ char *buf = alloca(sizeof(uint64_t));
73+ off_t oldpos = lseek(fd, 0, SEEK_CUR);
74+ bzero(buf, sizeof(uint64_t));
75+ lseek(fd, 0, SEEK_SET);
76+ r = write(fd, buf, sizeof(uint64_t));
77+ lseek(fd, oldpos, SEEK_SET);
78+#endif /* HAVE_POSIX_FALLOCATE */
79+ if (r < 0) {
80 log_error("Failed to allocate sequential number file, ignoring: %m");
81 close_nointr_nofail(fd);
82 return 0;
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
new file mode 100644
index 0000000000..3e5ea71e04
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
@@ -0,0 +1,35 @@
1Prefer getty to agetty in console setup systemd units
2
3Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
4---
5 units/getty@.service.m4 | 2 +-
6 units/serial-getty@.service.m4 | 2 +-
7 2 files changed, 2 insertions(+), 2 deletions(-)
8
9Index: systemd-37/units/getty@.service.m4
10===================================================================
11--- systemd-37.orig/units/getty@.service.m4
12+++ systemd-37/units/getty@.service.m4
13@@ -41,7 +41,7 @@
14
15 [Service]
16 Environment=TERM=linux
17 # the VT is cleared by TTYVTDisallocate
18-ExecStart=-/sbin/agetty --noclear %I 38400
19+ExecStart=-/sbin/getty -L %I 115200 linux
20 Type=idle
21 Restart=always
22 RestartSec=0
23Index: systemd-37/units/serial-getty@.service.m4
24===================================================================
25--- systemd-37.orig/units/serial-getty@.service.m4
26+++ systemd-37/units/serial-getty@.service.m4
27@@ -37,7 +37,7 @@
28
29 [Service]
30 Environment=TERM=vt102
31-ExecStart=-/sbin/agetty -s %I 115200,38400,9600
32+ExecStart=-/sbin/getty -L %I 115200 vt100
33 Type=idle
34 Restart=always
35 RestartSec=0
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
new file mode 100644
index 0000000000..8de9a3a326
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
@@ -0,0 +1,166 @@
1Index: git/src/journal/journal-send.c
2===================================================================
3--- git.orig/src/journal/journal-send.c 2012-09-02 00:10:08.748768268 -0700
4+++ git/src/journal/journal-send.c 2012-09-02 00:10:10.508768335 -0700
5@@ -34,6 +34,8 @@
6
7 #define SNDBUF_SIZE (8*1024*1024)
8
9+#include "config.h"
10+
11 /* We open a single fd, and we'll share it with the current process,
12 * all its threads, and all its subprocesses. This means we need to
13 * initialize it atomically, and need to operate on it atomically
14@@ -293,7 +295,12 @@
15 * file and just pass a file descriptor of it to the other
16 * side */
17
18+#ifdef HAVE_MKOSTEMP
19 buffer_fd = mkostemp(path, O_CLOEXEC|O_RDWR);
20+#else
21+ buffer_fd = mkstemp(path);
22+ if (buffer_fd >= 0) fcntl(buffer_fd, F_SETFD, FD_CLOEXEC);
23+#endif /* HAVE_MKOSTEMP */
24 if (buffer_fd < 0) {
25 r = -errno;
26 goto finish;
27Index: git/src/core/manager.c
28===================================================================
29--- git.orig/src/core/manager.c 2012-09-02 00:10:08.732768266 -0700
30+++ git/src/core/manager.c 2012-09-02 00:10:10.512768334 -0700
31@@ -67,6 +67,8 @@
32 #include "cgroup-util.h"
33 #include "path-util.h"
34
35+#include "config.h"
36+
37 /* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
38 #define GC_QUEUE_ENTRIES_MAX 16
39
40@@ -1701,7 +1703,12 @@
41 return -ENOMEM;
42
43 saved_umask = umask(0077);
44+#ifdef HAVE_MKOSTEMP
45 fd = mkostemp(path, O_RDWR|O_CLOEXEC);
46+#else
47+ fd = mkstemp(path);
48+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
49+#endif /* HAVE_MKOSTEMP */
50 umask(saved_umask);
51
52 if (fd < 0) {
53Index: git/src/shared/util.c
54===================================================================
55--- git.orig/src/shared/util.c 2012-09-02 00:10:08.784768269 -0700
56+++ git/src/shared/util.c 2012-09-02 00:10:10.512768334 -0700
57@@ -68,6 +68,8 @@
58 #include "exit-status.h"
59 #include "hashmap.h"
60
61+#include "config.h"
62+
63 int saved_argc = 0;
64 char **saved_argv = NULL;
65
66@@ -4519,7 +4521,12 @@
67 t[k] = '.';
68 stpcpy(stpcpy(t+k+1, fn), "XXXXXX");
69
70+#ifdef HAVE_MKOSTEMP
71 fd = mkostemp(t, O_WRONLY|O_CLOEXEC);
72+#else
73+ fd = mkstemp(t);
74+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
75+#endif /* HAVE_MKOSTEMP */
76 if (fd < 0) {
77 free(t);
78 return -errno;
79Index: git/src/shared/ask-password-api.c
80===================================================================
81--- git.orig/src/shared/ask-password-api.c 2012-09-02 00:10:08.772768268 -0700
82+++ git/src/shared/ask-password-api.c 2012-09-02 00:10:10.512768334 -0700
83@@ -37,6 +37,8 @@
84
85 #include "ask-password-api.h"
86
87+#include "config.h"
88+
89 static void backspace_chars(int ttyfd, size_t p) {
90
91 if (ttyfd < 0)
92@@ -326,7 +328,12 @@
93 mkdir_p_label("/run/systemd/ask-password", 0755);
94
95 u = umask(0022);
96+#ifdef HAVE_MKOSTEMP
97 fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY);
98+#else
99+ fd = mkstemp(temp);
100+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
101+#endif /* HAVE_MKOSTEMP */
102 umask(u);
103
104 if (fd < 0) {
105Index: git/src/journal/journalctl.c
106===================================================================
107--- git.orig/src/journal/journalctl.c 2012-09-02 00:10:08.752768267 -0700
108+++ git/src/journal/journalctl.c 2012-09-02 00:18:41.928787779 -0700
109@@ -540,7 +540,13 @@
110 n /= arg_interval;
111
112 close_nointr_nofail(fd);
113+#ifdef HAVE_MKOSTEMP
114 fd = mkostemp(k, O_WRONLY|O_CLOEXEC|O_NOCTTY);
115+#else
116+ fd = mkstemp(k);
117+ if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
118+#endif /* HAVE_MKOSTEMP */
119+
120 if (fd < 0) {
121 log_error("Failed to open %s: %m", k);
122 r = -errno;
123Index: git/src/journal/journal-verify.c
124===================================================================
125--- git.orig/src/journal/journal-verify.c 2012-09-02 00:10:08.752768267 -0700
126+++ git/src/journal/journal-verify.c 2012-09-02 00:24:10.268800268 -0700
127@@ -693,8 +693,12 @@
128 #endif
129 } else if (f->seal)
130 return -ENOKEY;
131-
132+#ifdef HAVE_MKOSTEMP
133 data_fd = mkostemp(data_path, O_CLOEXEC);
134+#else
135+ data_fd = mkstemp(data_path);
136+ if (data_fd >= 0) fcntl(data_fd, F_SETFD, FD_CLOEXEC);
137+#endif /* HAVE_MKOSTEMP */
138 if (data_fd < 0) {
139 log_error("Failed to create data file: %m");
140 r = -errno;
141@@ -702,7 +706,12 @@
142 }
143 unlink(data_path);
144
145+#ifdef HAVE_MKOSTEMP
146 entry_fd = mkostemp(entry_path, O_CLOEXEC);
147+#else
148+ entry_fd = mkstemp(entry_path);
149+ if (entry_fd >= 0) fcntl(entry_fd, F_SETFD, FD_CLOEXEC);
150+#endif /* HAVE_MKOSTEMP */
151 if (entry_fd < 0) {
152 log_error("Failed to create entry file: %m");
153 r = -errno;
154@@ -710,7 +719,12 @@
155 }
156 unlink(entry_path);
157
158+#ifdef HAVE_MKOSTEMP
159 entry_array_fd = mkostemp(entry_array_path, O_CLOEXEC);
160+#else
161+ entry_array_fd = mkstemp(entry_array_path);
162+ if (entry_array_fd >= 0) fcntl(entry_array_fd, F_SETFD, FD_CLOEXEC);
163+#endif /* HAVE_MKOSTEMP */
164 if (entry_array_fd < 0) {
165 log_error("Failed to create entry array file: %m");
166 r = -errno;
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
new file mode 100644
index 0000000000..ee63329830
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
@@ -0,0 +1,335 @@
1--- systemd-pam-185/src/fsck/fsck.c.orig 2012-06-22 23:22:22.000000000 -0400
2+++ systemd-pam-185/src/fsck/fsck.c 2012-06-22 21:15:56.000000000 -0400
3@@ -36,6 +36,8 @@
4 #include "bus-errors.h"
5 #include "virt.h"
6
7+#include "config.h"
8+
9 static bool arg_skip = false;
10 static bool arg_force = false;
11 static bool arg_show_progress = false;
12@@ -193,9 +195,16 @@
13 char *device;
14 double p;
15 usec_t t;
16-
17+#ifdef HAVE_MSFORMAT
18 if (fscanf(f, "%i %lu %lu %ms", &pass, &cur, &max, &device) != 4)
19- break;
20+#else
21+ device = malloc(257);
22+ if (fscanf(f, "%i %lu %lu %256s", &pass, &cur, &max, device) != 4) {
23+ free(device);
24+ }
25+
26+#endif /* HAVE_MSFORMAT */
27+ break;
28
29 /* Only show one progress counter at max */
30 if (!locked) {
31--- systemd-pam-185/src/core/swap.c.orig 2012-06-22 23:22:55.000000000 -0400
32+++ systemd-pam-185/src/core/swap.c 2012-06-22 21:17:10.000000000 -0400
33@@ -40,6 +40,8 @@
34 #include "def.h"
35 #include "path-util.h"
36
37+#include "config.h"
38+
39 static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
40 [SWAP_DEAD] = UNIT_INACTIVE,
41 [SWAP_ACTIVATING] = UNIT_ACTIVATING,
42@@ -1038,7 +1040,7 @@
43 for (i = 1;; i++) {
44 char *dev = NULL, *d;
45 int prio = 0, k;
46-
47+#ifdef HAVE_MSFORMAT
48 if ((k = fscanf(m->proc_swaps,
49 "%ms " /* device/file */
50 "%*s " /* type of swap */
51@@ -1046,10 +1048,18 @@
52 "%*s " /* used */
53 "%i\n", /* priority */
54 &dev, &prio)) != 2) {
55-
56+#else
57+ dev = malloc(257);
58+ if ((k = fscanf(m->proc_swaps,
59+ "%256s " /* device/file */
60+ "%*s " /* type of swap */
61+ "%*s " /* swap size */
62+ "%*s " /* used */
63+ "%i\n", /* priority */
64+ dev, &prio)) != 2) {
65+#endif /* HAVE_MSFORMAT */
66 if (k == EOF)
67 break;
68-
69 log_warning("Failed to parse /proc/swaps:%u.", i);
70 free(dev);
71 continue;
72--- systemd-pam-185/src/core/mount-setup.c.orig 2012-06-22 23:23:41.000000000 -0400
73+++ systemd-pam-185/src/core/mount-setup.c 2012-06-22 21:19:44.000000000 -0400
74@@ -28,6 +28,7 @@
75 #include <assert.h>
76 #include <unistd.h>
77 #include <ftw.h>
78+#include <linux/fs.h>
79
80 #include "mount-setup.h"
81 #include "dev-setup.h"
82@@ -41,6 +41,8 @@
83 #include "path-util.h"
84 #include "missing.h"
85
86+#include "config.h"
87+
88 #ifndef TTY_GID
89 #define TTY_GID 5
90 #endif
91@@ -200,9 +202,12 @@
92 for (;;) {
93 char *controller;
94 int enabled = 0;
95-
96+#ifdef HAVE_MSFORMAT
97 if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
98-
99+#else
100+ controller = malloc(257);
101+ if (fscanf(f, "%256s %*i %*i %i", controller, &enabled) != 2) {
102+#endif /* HAVE_MSFORMAT */
103 if (feof(f))
104 break;
105
106--- systemd-pam-185/src/core/mount.c.orig 2012-06-22 23:24:17.000000000 -0400
107+++ systemd-pam-185/src/core/mount.c 2012-06-22 22:51:21.000000000 -0400
108@@ -41,6 +41,8 @@
109 #include "exit-status.h"
110 #include "def.h"
111
112+#include "config.h"
113+
114 static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
115 [MOUNT_DEAD] = UNIT_INACTIVE,
116 [MOUNT_MOUNTING] = UNIT_ACTIVATING,
117@@ -1514,7 +1516,7 @@
118 int k;
119
120 device = path = options = options2 = fstype = d = p = o = NULL;
121-
122+#ifdef HAVE_MSFORMAT
123 if ((k = fscanf(m->proc_self_mountinfo,
124 "%*s " /* (1) mount id */
125 "%*s " /* (2) parent id */
126@@ -1533,7 +1535,31 @@
127 &fstype,
128 &device,
129 &options2)) != 5) {
130-
131+#else
132+ path = malloc(257);
133+ options = malloc(257);
134+ fstype = malloc(257);
135+ device = malloc(257);
136+ options2 = malloc(257);
137+ if ((k = fscanf(m->proc_self_mountinfo,
138+ "%*s " /* (1) mount id */
139+ "%*s " /* (2) parent id */
140+ "%*s " /* (3) major:minor */
141+ "%*s " /* (4) root */
142+ "%256s " /* (5) mount point */
143+ "%256s" /* (6) mount options */
144+ "%*[^-]" /* (7) optional fields */
145+ "- " /* (8) separator */
146+ "%256s " /* (9) file system type */
147+ "%256s" /* (10) mount source */
148+ "%256s" /* (11) mount options 2 */
149+ "%*[^\n]", /* some rubbish at the end */
150+ path,
151+ options,
152+ fstype,
153+ device,
154+ options2)) != 5) {
155+#endif /* HAVE_MSFORMAT */
156 if (k == EOF)
157 break;
158
159--- systemd-pam-185/src/core/umount.c.orig 2012-06-22 23:24:37.000000000 -0400
160+++ systemd-pam-185/src/core/umount.c 2012-06-22 22:56:15.000000000 -0400
161@@ -35,6 +35,8 @@
162 #include "path-util.h"
163 #include "util.h"
164
165+#include "config.h"
166+
167 typedef struct MountPoint {
168 char *path;
169 dev_t devnum;
170@@ -74,7 +76,7 @@
171 MountPoint *m;
172
173 path = p = NULL;
174-
175+#ifdef HAVE_MSFORMAT
176 if ((k = fscanf(proc_self_mountinfo,
177 "%*s " /* (1) mount id */
178 "%*s " /* (2) parent id */
179@@ -89,6 +91,23 @@
180 "%*s" /* (11) mount options 2 */
181 "%*[^\n]", /* some rubbish at the end */
182 &path)) != 1) {
183+#else
184+ path = malloc(257);
185+ if ((k = fscanf(proc_self_mountinfo,
186+ "%*s " /* (1) mount id */
187+ "%*s " /* (2) parent id */
188+ "%*s " /* (3) major:minor */
189+ "%*s " /* (4) root */
190+ "%256s " /* (5) mount point */
191+ "%*s" /* (6) mount options */
192+ "%*[^-]" /* (7) optional fields */
193+ "- " /* (8) separator */
194+ "%*s " /* (9) file system type */
195+ "%*s" /* (10) mount source */
196+ "%*s" /* (11) mount options 2 */
197+ "%*[^\n]", /* some rubbish at the end */
198+ path)) != 1) {
199+#endif /* HAVE_MSFORMAT */
200 if (k == EOF)
201 break;
202
203@@ -150,7 +169,7 @@
204 MountPoint *swap;
205 char *dev = NULL, *d;
206 int k;
207-
208+#ifdef HAVE_MSFORMAT
209 if ((k = fscanf(proc_swaps,
210 "%ms " /* device/file */
211 "%*s " /* type of swap */
212@@ -158,7 +177,16 @@
213 "%*s " /* used */
214 "%*s\n", /* priority */
215 &dev)) != 1) {
216-
217+#else
218+ dev = malloc(257);
219+ if ((k = fscanf(proc_swaps,
220+ "%256s " /* device/file */
221+ "%*s " /* type of swap */
222+ "%*s " /* swap size */
223+ "%*s " /* used */
224+ "%*s\n", /* priority */
225+ dev)) != 1) {
226+#endif /* HAVE_MSFORMAT */
227 if (k == EOF)
228 break;
229
230--- systemd-pam-185/src/shared/socket-util.c.orig 2012-06-22 23:25:00.000000000 -0400
231+++ systemd-pam-185/src/shared/socket-util.c 2012-06-22 22:59:27.000000000 -0400
232@@ -39,6 +39,8 @@
233 #include "socket-util.h"
234 #include "missing.h"
235
236+#include "config.h"
237+
238 int socket_address_parse(SocketAddress *a, const char *s) {
239 int r;
240 char *e, *n;
241@@ -201,8 +203,16 @@
242 a->type = SOCK_RAW;
243
244 errno = 0;
245- if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
246+#ifdef HAVE_MSFORMAT
247+ if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
248+ return errno ? -errno : -EINVAL;
249+#else
250+ sfamily = malloc(257);
251+ if (sscanf(s, "%256s %u", sfamily, &group) < 1) {
252+ free(sfamily);
253 return errno ? -errno : -EINVAL;
254+ }
255+#endif /* HAVE_MSFORMAT */
256
257 if ((family = netlink_family_from_string(sfamily)) < 0)
258 if (safe_atoi(sfamily, &family) < 0) {
259--- systemd-pam-185/src/tmpfiles/tmpfiles.c.orig 2012-06-22 23:25:21.000000000 -0400
260+++ systemd-pam-185/src/tmpfiles/tmpfiles.c 2012-06-22 23:13:49.000000000 -0400
261@@ -48,6 +48,8 @@
262 #include "set.h"
263 #include "conf-files.h"
264
265+#include "config.h"
266+
267 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
268 * them in the file system. This is intended to be used to create
269 * properly owned directories beneath /tmp, /var/tmp, /run, which are
270@@ -970,7 +972,7 @@
271 i = new0(Item, 1);
272 if (!i)
273 return log_oom();
274-
275+#ifdef HAVE_MSFORMAT
276 if (sscanf(buffer,
277 "%c "
278 "%ms "
279@@ -986,6 +988,28 @@
280 &group,
281 &age,
282 &n) < 2) {
283+#else
284+ i->path = malloc(257);
285+ mode = malloc(257);
286+ user = malloc(257);
287+ group = malloc(257);
288+ age = malloc(257);
289+ if (sscanf(buffer,
290+ "%c "
291+ "%256s "
292+ "%256s "
293+ "%256s "
294+ "%256s "
295+ "%256s "
296+ "%n",
297+ &type,
298+ i->path,
299+ mode,
300+ user,
301+ group,
302+ age,
303+ &n) < 2) {
304+#endif /* HAVE_MSFORMAT */
305 log_error("[%s:%u] Syntax error.", fname, line);
306 r = -EIO;
307 goto finish;
308--- systemd-pam-185/src/cryptsetup/cryptsetup-generator.c.orig 2012-06-22 23:25:47.000000000 -0400
309+++ systemd-pam-185/src/cryptsetup/cryptsetup-generator.c 2012-06-22 23:16:35.000000000 -0400
310@@ -30,6 +30,8 @@
311 #include "virt.h"
312 #include "strv.h"
313
314+#include "config.h"
315+
316 static const char *arg_dest = "/tmp";
317 static bool arg_enabled = true;
318 static bool arg_read_crypttab = true;
319@@ -421,8 +423,15 @@
320 l = strstrip(line);
321 if (*l == '#' || *l == 0)
322 continue;
323-
324+#ifdef HAVE_MSFORMAT
325 k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options);
326+#else
327+ name = malloc(257);
328+ device = malloc(257);
329+ password = malloc(257);
330+ options = malloc(257);
331+ k = sscanf(l, "%256s %256s %256s %256s", name, device, password, options);
332+#endif /* HAVE_MSFORMAT */
333 if (k < 2 || k > 4) {
334 log_error("Failed to parse /etc/crypttab:%u, ignoring.", n);
335 r = EXIT_FAILURE;
diff --git a/meta/recipes-core/systemd/systemd/touchscreen.rules b/meta/recipes-core/systemd/systemd/touchscreen.rules
new file mode 100644
index 0000000000..d83fd1673d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/touchscreen.rules
@@ -0,0 +1,18 @@
1# There are a number of modifiers that are allowed to be used in some
2# of the different fields. They provide the following subsitutions:
3#
4# %n the "kernel number" of the device.
5# For example, 'sda3' has a "kernel number" of '3'
6# %e the smallest number for that name which does not matches an existing node
7# %k the kernel name for the device
8# %M the kernel major number for the device
9# %m the kernel minor number for the device
10# %b the bus id for the device
11# %c the string returned by the PROGRAM
12# %s{filename} the content of a sysfs attribute
13# %% the '%' char itself
14#
15
16# Create a symlink to any touchscreen input device
17SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
18SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
diff --git a/meta/recipes-core/systemd/systemd/use-rootlibdir.patch b/meta/recipes-core/systemd/systemd/use-rootlibdir.patch
new file mode 100644
index 0000000000..4c471b673b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/use-rootlibdir.patch
@@ -0,0 +1,107 @@
1Upstream-Status: Undecided
2
3This patch removes some of hardcoded references to /lib
4and /usr/lib since on some architectures it should be
5/lib64 and /usr/lib64 atleast in OE
6
7I am not sure about the intention of hardcoded values
8thats why status is undecided
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12Index: git/Makefile.am
13===================================================================
14--- git.orig/Makefile.am 2012-09-22 11:07:58.811981199 -0700
15+++ git/Makefile.am 2012-09-22 11:09:11.267983956 -0700
16@@ -64,25 +64,25 @@
17
18 # Our own, non-special dirs
19 pkgsysconfdir=$(sysconfdir)/systemd
20-userunitdir=$(prefix)/lib/systemd/user
21-userpresetdir=$(prefix)/lib/systemd/user-preset
22-tmpfilesdir=$(prefix)/lib/tmpfiles.d
23-sysctldir=$(prefix)/lib/sysctl.d
24-usergeneratordir=$(prefix)/lib/systemd/user-generators
25+userunitdir=$(prefix)/$(rootlibdir)/systemd/user
26+userpresetdir=$(prefix)/$(rootlibdir)/systemd/user-preset
27+tmpfilesdir=$(prefix)/$(rootlibdir)/tmpfiles.d
28+sysctldir=$(prefix)/$(rootlibdir)/sysctl.d
29+usergeneratordir=$(prefix)/$(rootlibdir)/systemd/user-generators
30 pkgincludedir=$(includedir)/systemd
31 systemgeneratordir=$(rootlibexecdir)/system-generators
32 systemshutdowndir=$(rootlibexecdir)/system-shutdown
33 systemsleepdir=$(rootlibexecdir)/system-sleep
34-systemunitdir=$(rootprefix)/lib/systemd/system
35-systempresetdir=$(rootprefix)/lib/systemd/system-preset
36-udevlibexecdir=$(rootprefix)/lib/udev
37+systemunitdir=$(rootprefix)/$(rootlibdir)/systemd/system
38+systempresetdir=$(rootprefix)/$(rootlibdir)/systemd/system-preset
39+udevlibexecdir=$(rootprefix)/$(rootlibdir)/udev
40 udevhomedir = $(udevlibexecdir)
41 udevrulesdir = $(udevlibexecdir)/rules.d
42
43 # And these are the special ones for /
44 rootprefix=@rootprefix@
45 rootbindir=$(rootprefix)/bin
46-rootlibexecdir=$(rootprefix)/lib/systemd
47+rootlibexecdir=$(rootprefix)/$(rootlibdir)/systemd
48
49 CLEANFILES = $(BUILT_SOURCES)
50 EXTRA_DIST =
51@@ -132,7 +132,7 @@
52 -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
53 -DROOTPREFIX=\"$(rootprefix)\" \
54 -DRUNTIME_DIR=\"/run\" \
55- -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
56+ -DRANDOM_SEED=\"$(localstatedir)/$(rootlibdir)/random-seed\" \
57 -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
58 -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
59 -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
60@@ -2692,7 +2692,7 @@
61
62 binfmt-install-data-hook:
63 $(MKDIR_P) -m 0755 \
64- $(DESTDIR)$(prefix)/lib/binfmt.d \
65+ $(DESTDIR)$(prefix)/$(rootlibdir)/binfmt.d \
66 $(DESTDIR)$(sysconfdir)/binfmt.d \
67 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
68 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
69@@ -3107,7 +3107,7 @@
70
71 timedated-install-data-hook:
72 $(MKDIR_P) -m 0755 \
73- $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
74+ $(DESTDIR)$(prefix)/$(rootlibdir)/systemd/ntp-units.d \
75 $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
76 ( cd $(DESTDIR)$(systemunitdir) && \
77 rm -f dbus-org.freedesktop.timedate1.service && \
78@@ -3337,7 +3337,7 @@
79 logind-install-data-hook:
80 $(MKDIR_P) -m 0755 \
81 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
82- $(DESTDIR)$(localstatedir)/lib/systemd
83+ $(DESTDIR)$(localstatedir)/$(rootlibdir)/systemd
84 ( cd $(DESTDIR)$(systemunitdir) && \
85 rm -f dbus-org.freedesktop.login1.service && \
86 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
87@@ -3494,7 +3494,7 @@
88 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
89 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
90 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
91- -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
92+ -e 's,@RANDOM_SEED\@,$(localstatedir)/$(rootlibdir)/random-seed,g' \
93 -e 's,@prefix\@,$(prefix),g' \
94 -e 's,@exec_prefix\@,$(exec_prefix),g' \
95 -e 's,@libdir\@,$(libdir),g' \
96@@ -3619,9 +3619,9 @@
97 $(MKDIR_P) -m 0755 \
98 $(DESTDIR)$(tmpfilesdir) \
99 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
100- $(DESTDIR)$(prefix)/lib/modules-load.d \
101+ $(DESTDIR)$(prefix)/$(rootlibdir)/modules-load.d \
102 $(DESTDIR)$(sysconfdir)/modules-load.d \
103- $(DESTDIR)$(prefix)/lib/sysctl.d \
104+ $(DESTDIR)$(prefix)/$(rootlibdir)/sysctl.d \
105 $(DESTDIR)$(sysconfdir)/sysctl.d \
106 $(DESTDIR)$(systemshutdowndir) \
107 $(DESTDIR)$(systemsleepdir) \
diff --git a/meta/recipes-core/systemd/systemd/var-run.conf b/meta/recipes-core/systemd/systemd/var-run.conf
new file mode 100644
index 0000000000..c2c18e2b99
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/var-run.conf
@@ -0,0 +1,4 @@
1# empty /var/run
2R /var/run/* - - - - -
3# systemd-update-utmp-runlevel.service fails to start without this
4f /var/run/utmp 0644 root root - -