diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd')
21 files changed, 1263 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..9ffa88e464 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf | |||
@@ -0,0 +1,7 @@ | |||
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 | |||
6 | d /var/volatile/log - - - - | ||
7 | d /var/volatile/tmp - - - - | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch new file mode 100644 index 0000000000..c5ad29174c --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch | |||
@@ -0,0 +1,180 @@ | |||
1 | From 4dc8dee0435bb63cbe474004b0a8df0363fe94dd Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan McGregor <dan.mcgregor@usask.ca> | ||
3 | Date: Fri, 5 Sep 2014 06:28:58 -0600 | ||
4 | Subject: [PATCH] Make root's home directory configurable. | ||
5 | |||
6 | OpenEmbedded has a configurable home directory for root. Allow | ||
7 | systemd to be built using its idea of what root's home directory | ||
8 | should be. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> | ||
13 | --- | ||
14 | Makefile.am | 2 ++ | ||
15 | configure.ac | 7 +++++++ | ||
16 | src/core/unit-printf.c | 2 +- | ||
17 | src/nspawn/nspawn.c | 4 ++-- | ||
18 | src/shared/util.c | 4 ++-- | ||
19 | units/console-shell.service.m4.in | 4 ++-- | ||
20 | units/emergency.service.in | 4 ++-- | ||
21 | units/rescue.service.m4.in | 4 ++-- | ||
22 | 8 files changed, 20 insertions(+), 11 deletions(-) | ||
23 | |||
24 | diff --git a/Makefile.am b/Makefile.am | ||
25 | index 4028112..5d18f5c 100644 | ||
26 | --- a/Makefile.am | ||
27 | +++ b/Makefile.am | ||
28 | @@ -191,6 +191,7 @@ AM_CPPFLAGS = \ | ||
29 | -DKEXEC=\"$(KEXEC)\" \ | ||
30 | -DLIBDIR=\"$(libdir)\" \ | ||
31 | -DROOTLIBDIR=\"$(rootlibdir)\" \ | ||
32 | + -DROOTHOMEDIR=\"$(roothomedir)\" \ | ||
33 | -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ | ||
34 | -I $(top_srcdir)/src \ | ||
35 | -I $(top_builddir)/src/shared \ | ||
36 | @@ -5584,6 +5585,7 @@ EXTRA_DIST += \ | ||
37 | substitutions = \ | ||
38 | '|rootlibexecdir=$(rootlibexecdir)|' \ | ||
39 | '|rootbindir=$(rootbindir)|' \ | ||
40 | + '|roothomedir=$(roothomedir)|' \ | ||
41 | '|bindir=$(bindir)|' \ | ||
42 | '|SYSTEMCTL=$(rootbindir)/systemctl|' \ | ||
43 | '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \ | ||
44 | diff --git a/configure.ac b/configure.ac | ||
45 | index 18b7198..365bc73 100644 | ||
46 | --- a/configure.ac | ||
47 | +++ b/configure.ac | ||
48 | @@ -1272,6 +1272,11 @@ AC_ARG_WITH([rootlibdir], | ||
49 | [], | ||
50 | [with_rootlibdir=${libdir}]) | ||
51 | |||
52 | +AC_ARG_WITH([roothomedir], | ||
53 | + AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]), | ||
54 | + [], | ||
55 | + [with_roothomedir=/root]) | ||
56 | + | ||
57 | AC_ARG_WITH([pamlibdir], | ||
58 | AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), | ||
59 | [], | ||
60 | @@ -1317,6 +1322,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) | ||
61 | AC_SUBST([pamconfdir], [$with_pamconfdir]) | ||
62 | AC_SUBST([rootprefix], [$with_rootprefix]) | ||
63 | AC_SUBST([rootlibdir], [$with_rootlibdir]) | ||
64 | +AC_SUBST([roothomedir], [$with_roothomedir]) | ||
65 | |||
66 | AC_CONFIG_FILES([ | ||
67 | Makefile po/Makefile.in | ||
68 | @@ -1400,6 +1406,7 @@ AC_MSG_RESULT([ | ||
69 | include_prefix: ${INCLUDE_PREFIX} | ||
70 | lib dir: ${libdir} | ||
71 | rootlib dir: ${with_rootlibdir} | ||
72 | + root home dir: ${with_roothomedir} | ||
73 | SysV init scripts: ${SYSTEM_SYSVINIT_PATH} | ||
74 | SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} | ||
75 | Build Python: ${PYTHON} | ||
76 | diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c | ||
77 | index 62599d0..852d34c 100644 | ||
78 | --- a/src/core/unit-printf.c | ||
79 | +++ b/src/core/unit-printf.c | ||
80 | @@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char | ||
81 | * best of it if we can, but fail if we can't */ | ||
82 | |||
83 | if (!c->user || streq(c->user, "root") || streq(c->user, "0")) | ||
84 | - n = strdup("/root"); | ||
85 | + n = strdup(ROOTHOMEDIR); | ||
86 | else | ||
87 | return -ENOTSUP; | ||
88 | |||
89 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c | ||
90 | index d01da45..3e876d5 100644 | ||
91 | --- a/src/nspawn/nspawn.c | ||
92 | +++ b/src/nspawn/nspawn.c | ||
93 | @@ -3312,7 +3312,7 @@ int main(int argc, char *argv[]) { | ||
94 | if (r < 0) | ||
95 | _exit(EXIT_FAILURE); | ||
96 | |||
97 | - if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) || | ||
98 | + if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) || | ||
99 | (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) || | ||
100 | (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) { | ||
101 | log_oom(); | ||
102 | @@ -3402,7 +3402,7 @@ int main(int argc, char *argv[]) { | ||
103 | } else if (argc > optind) | ||
104 | execvpe(argv[optind], argv + optind, env_use); | ||
105 | else { | ||
106 | - chdir(home ? home : "/root"); | ||
107 | + chdir(home ? home : ROOTHOMEDIR); | ||
108 | execle("/bin/bash", "-bash", NULL, env_use); | ||
109 | execle("/bin/sh", "-sh", NULL, env_use); | ||
110 | } | ||
111 | diff --git a/src/shared/util.c b/src/shared/util.c | ||
112 | index 85a570a..aef6033 100644 | ||
113 | --- a/src/shared/util.c | ||
114 | +++ b/src/shared/util.c | ||
115 | @@ -4377,7 +4377,7 @@ int get_user_creds( | ||
116 | *gid = 0; | ||
117 | |||
118 | if (home) | ||
119 | - *home = "/root"; | ||
120 | + *home = ROOTHOMEDIR; | ||
121 | |||
122 | if (shell) | ||
123 | *shell = "/bin/sh"; | ||
124 | @@ -5363,7 +5363,7 @@ int get_home_dir(char **_h) { | ||
125 | /* Hardcode home directory for root to avoid NSS */ | ||
126 | u = getuid(); | ||
127 | if (u == 0) { | ||
128 | - h = strdup("/root"); | ||
129 | + h = strdup(ROOTHOMEDIR); | ||
130 | if (!h) | ||
131 | return -ENOMEM; | ||
132 | |||
133 | diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in | ||
134 | index 3f4904a..e2af652 100644 | ||
135 | --- a/units/console-shell.service.m4.in | ||
136 | +++ b/units/console-shell.service.m4.in | ||
137 | @@ -15,8 +15,8 @@ After=rc-local.service | ||
138 | Before=getty.target | ||
139 | |||
140 | [Service] | ||
141 | -Environment=HOME=/root | ||
142 | -WorkingDirectory=/root | ||
143 | +Environment=HOME=@roothomedir@ | ||
144 | +WorkingDirectory=@roothomedir@ | ||
145 | ExecStart=-/sbin/sulogin | ||
146 | ExecStopPost=-@SYSTEMCTL@ poweroff | ||
147 | Type=idle | ||
148 | diff --git a/units/emergency.service.in b/units/emergency.service.in | ||
149 | index 91fc1bb..659547e 100644 | ||
150 | --- a/units/emergency.service.in | ||
151 | +++ b/units/emergency.service.in | ||
152 | @@ -13,8 +13,8 @@ Conflicts=shutdown.target | ||
153 | Before=shutdown.target | ||
154 | |||
155 | [Service] | ||
156 | -Environment=HOME=/root | ||
157 | -WorkingDirectory=/root | ||
158 | +Environment=HOME=@roothomedir@ | ||
159 | +WorkingDirectory=@roothomedir@ | ||
160 | ExecStartPre=-/bin/plymouth quit | ||
161 | ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.' | ||
162 | ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" | ||
163 | diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in | ||
164 | index ef54369..7aad86f 100644 | ||
165 | --- a/units/rescue.service.m4.in | ||
166 | +++ b/units/rescue.service.m4.in | ||
167 | @@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service | ||
168 | Before=shutdown.target | ||
169 | |||
170 | [Service] | ||
171 | -Environment=HOME=/root | ||
172 | -WorkingDirectory=/root | ||
173 | +Environment=HOME=@roothomedir@ | ||
174 | +WorkingDirectory=@roothomedir@ | ||
175 | ExecStartPre=-/bin/plymouth quit | ||
176 | ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.' | ||
177 | ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" | ||
178 | -- | ||
179 | 1.9.3 | ||
180 | |||
diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch new file mode 100644 index 0000000000..9aa07c1b10 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch | |||
@@ -0,0 +1,138 @@ | |||
1 | Upstream-Status: Inappropriate [OE specific] | ||
2 | |||
3 | Subject: add support for executing scripts under /etc/rcS.d/ | ||
4 | |||
5 | To be compatible, all services translated from scripts under /etc/rcS.d would | ||
6 | run before services translated from scripts under /etc/rcN.d. | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | --- | ||
10 | src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++--------- | ||
11 | 1 file changed, 38 insertions(+), 12 deletions(-) | ||
12 | |||
13 | diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c | ||
14 | index 9a869ba..10c55c0 100644 | ||
15 | --- a/src/sysv-generator/sysv-generator.c | ||
16 | +++ b/src/sysv-generator/sysv-generator.c | ||
17 | @@ -43,7 +43,8 @@ | ||
18 | |||
19 | typedef enum RunlevelType { | ||
20 | RUNLEVEL_UP, | ||
21 | - RUNLEVEL_DOWN | ||
22 | + RUNLEVEL_DOWN, | ||
23 | + RUNLEVEL_SYSINIT | ||
24 | } RunlevelType; | ||
25 | |||
26 | static const struct { | ||
27 | @@ -58,6 +59,9 @@ static const struct { | ||
28 | { "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP }, | ||
29 | { "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP }, | ||
30 | |||
31 | + /* Debian style rcS.d, also adopted by OE */ | ||
32 | + { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT}, | ||
33 | + | ||
34 | /* Standard SysV runlevels for shutdown */ | ||
35 | { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN }, | ||
36 | { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN } | ||
37 | @@ -66,7 +70,7 @@ static const struct { | ||
38 | directories in this order, and we want to make sure that | ||
39 | sysv_start_priority is known when we first load the | ||
40 | unit. And that value we only know from S links. Hence | ||
41 | - UP must be read before DOWN */ | ||
42 | + UP/SYSINIT must be read before DOWN */ | ||
43 | }; | ||
44 | |||
45 | typedef struct SysvStub { | ||
46 | @@ -82,6 +86,8 @@ typedef struct SysvStub { | ||
47 | char **conflicts; | ||
48 | bool has_lsb; | ||
49 | bool reload; | ||
50 | + bool default_dependencies; | ||
51 | + bool from_rcsd; | ||
52 | } SysvStub; | ||
53 | |||
54 | const char *arg_dest = "/tmp"; | ||
55 | @@ -156,6 +162,9 @@ static int generate_unit_file(SysvStub *s) { | ||
56 | "Description=%s\n", | ||
57 | s->path, s->description); | ||
58 | |||
59 | + if (!s->default_dependencies) | ||
60 | + fprintf(f, "DefaultDependencies=no\n"); | ||
61 | + | ||
62 | if (!isempty(before)) | ||
63 | fprintf(f, "Before=%s\n", before); | ||
64 | if (!isempty(after)) | ||
65 | @@ -661,18 +670,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { | ||
66 | if (s->has_lsb && other->has_lsb) | ||
67 | continue; | ||
68 | |||
69 | - if (other->sysv_start_priority < s->sysv_start_priority) { | ||
70 | - r = strv_extend(&s->after, other->name); | ||
71 | + /* All scripts under /etc/rcS.d should execute before scripts under | ||
72 | + * /etc/rcN.d */ | ||
73 | + if (!other->from_rcsd && s->from_rcsd) { | ||
74 | + r = strv_extend(&s->before, other->name); | ||
75 | if (r < 0) | ||
76 | return log_oom(); | ||
77 | - } | ||
78 | - else if (other->sysv_start_priority > s->sysv_start_priority) { | ||
79 | - r = strv_extend(&s->before, other->name); | ||
80 | + } else if (other->from_rcsd && !s->from_rcsd) { | ||
81 | + r = strv_extend(&s->after, other->name); | ||
82 | if (r < 0) | ||
83 | return log_oom(); | ||
84 | - } | ||
85 | - else | ||
86 | - continue; | ||
87 | + } else { | ||
88 | + if (other->sysv_start_priority < s->sysv_start_priority) { | ||
89 | + r = strv_extend(&s->after, other->name); | ||
90 | + if (r < 0) | ||
91 | + return log_oom(); | ||
92 | + } | ||
93 | + else if (other->sysv_start_priority > s->sysv_start_priority) { | ||
94 | + r = strv_extend(&s->before, other->name); | ||
95 | + if (r < 0) | ||
96 | + return log_oom(); | ||
97 | + } | ||
98 | + else | ||
99 | + continue; | ||
100 | + } | ||
101 | |||
102 | /* FIXME: Maybe we should compare the name here lexicographically? */ | ||
103 | } | ||
104 | @@ -725,6 +746,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) { | ||
105 | return log_oom(); | ||
106 | |||
107 | service->sysv_start_priority = -1; | ||
108 | + service->default_dependencies = true; | ||
109 | + service->from_rcsd = false; | ||
110 | service->name = name; | ||
111 | service->path = fpath; | ||
112 | |||
113 | @@ -810,9 +833,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { | ||
114 | |||
115 | if (de->d_name[0] == 'S') { | ||
116 | |||
117 | - if (rcnd_table[i].type == RUNLEVEL_UP) { | ||
118 | + if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) { | ||
119 | service->sysv_start_priority = | ||
120 | MAX(a*10 + b, service->sysv_start_priority); | ||
121 | + service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true; | ||
122 | + service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false; | ||
123 | } | ||
124 | |||
125 | r = set_ensure_allocated(&runlevel_services[i], | ||
126 | @@ -825,7 +850,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { | ||
127 | goto finish; | ||
128 | |||
129 | } else if (de->d_name[0] == 'K' && | ||
130 | - (rcnd_table[i].type == RUNLEVEL_DOWN)) { | ||
131 | + (rcnd_table[i].type == RUNLEVEL_DOWN || | ||
132 | + rcnd_table[i].type == RUNLEVEL_SYSINIT)) { | ||
133 | |||
134 | r = set_ensure_allocated(&shutdown_services, | ||
135 | trivial_hash_func, trivial_compare_func); | ||
136 | -- | ||
137 | 1.9.1 | ||
138 | |||
diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch new file mode 100644 index 0000000000..e0043597a2 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch | |||
@@ -0,0 +1,176 @@ | |||
1 | From 5a16bc264c32237e38a844d55e7a1820a31b8440 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com> | ||
3 | Date: Fri, 28 Nov 2014 15:59:59 +0100 | ||
4 | Subject: [PATCH] build-sys: configure the list of system users, files and | ||
5 | directories | ||
6 | |||
7 | Choose which system users defined in sysusers.d/systemd.conf and files | ||
8 | or directories in tmpfiles.d/systemd.conf, should be provided depending | ||
9 | on comile-time configuration. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | Makefile.am | 4 ++++ | ||
15 | configure.ac | 2 ++ | ||
16 | sysusers.d/.gitignore | 1 + | ||
17 | sysusers.d/{systemd.conf => systemd.conf.m4} | 8 ++++++++ | ||
18 | tmpfiles.d/.gitignore | 3 ++- | ||
19 | tmpfiles.d/{systemd.conf => systemd.conf.m4} | 2 ++ | ||
20 | 6 files changed, 19 insertions(+), 1 deletion(-) | ||
21 | rename sysusers.d/{systemd.conf => systemd.conf.m4} (77%) | ||
22 | rename tmpfiles.d/{systemd.conf => systemd.conf.m4} (96%) | ||
23 | |||
24 | Index: git/Makefile.am | ||
25 | =================================================================== | ||
26 | --- git.orig/Makefile.am 2015-01-23 21:23:04.000000000 +0000 | ||
27 | +++ git/Makefile.am 2015-01-23 21:23:04.000000000 +0000 | ||
28 | @@ -5698,6 +5698,10 @@ | ||
29 | $(AM_V_at)$(MKDIR_P) $(dir $@) | ||
30 | $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ | ||
31 | |||
32 | +sysusers.d/%: sysusers.d/%.m4 | ||
33 | + $(AM_V_at)$(MKDIR_P) $(dir $@) | ||
34 | + $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ | ||
35 | + | ||
36 | tmpfiles.d/%: tmpfiles.d/%.m4 | ||
37 | $(AM_V_at)$(MKDIR_P) $(dir $@) | ||
38 | $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ | ||
39 | Index: git/configure.ac | ||
40 | =================================================================== | ||
41 | --- git.orig/configure.ac 2015-01-23 21:23:04.000000000 +0000 | ||
42 | +++ git/configure.ac 2015-01-23 21:23:04.000000000 +0000 | ||
43 | @@ -971,6 +971,7 @@ | ||
44 | AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon])) | ||
45 | if test "x$enable_timesyncd" != "xno"; then | ||
46 | have_timesyncd=yes | ||
47 | + M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD" | ||
48 | fi | ||
49 | AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"]) | ||
50 | |||
51 | @@ -1060,6 +1061,7 @@ | ||
52 | AS_IF([test "x$enable_networkd" != "xno"], [ | ||
53 | AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled]) | ||
54 | have_networkd=yes | ||
55 | + M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD" | ||
56 | ]) | ||
57 | AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"]) | ||
58 | |||
59 | Index: git/sysusers.d/systemd.conf | ||
60 | =================================================================== | ||
61 | --- git.orig/sysusers.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000 | ||
62 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
63 | @@ -1,12 +0,0 @@ | ||
64 | -# This file is part of systemd. | ||
65 | -# | ||
66 | -# systemd is free software; you can redistribute it and/or modify it | ||
67 | -# under the terms of the GNU Lesser General Public License as published by | ||
68 | -# the Free Software Foundation; either version 2.1 of the License, or | ||
69 | -# (at your option) any later version. | ||
70 | - | ||
71 | -g systemd-journal - - | ||
72 | -u systemd-bus-proxy - "systemd Bus Proxy" | ||
73 | -u systemd-network - "systemd Network Management" | ||
74 | -u systemd-resolve - "systemd Resolver" | ||
75 | -u systemd-timesync - "systemd Time Synchronization" | ||
76 | Index: git/sysusers.d/systemd.conf.m4 | ||
77 | =================================================================== | ||
78 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
79 | +++ git/sysusers.d/systemd.conf.m4 2015-01-23 21:26:30.000000000 +0000 | ||
80 | @@ -0,0 +1,20 @@ | ||
81 | +# This file is part of systemd. | ||
82 | +# | ||
83 | +# systemd is free software; you can redistribute it and/or modify it | ||
84 | +# under the terms of the GNU Lesser General Public License as published by | ||
85 | +# the Free Software Foundation; either version 2.1 of the License, or | ||
86 | +# (at your option) any later version. | ||
87 | + | ||
88 | +g systemd-journal - - | ||
89 | +m4_ifdef(`ENABLE_KDBUS', | ||
90 | +u systemd-bus-proxy - "systemd Bus Proxy" | ||
91 | +)m4_dnl | ||
92 | +m4_ifdef(`ENABLE_NETWORKD', | ||
93 | +u systemd-network - "systemd Network Management" | ||
94 | +)m4_dnl | ||
95 | +m4_ifdef(`ENABLE_RESOLVED', | ||
96 | +u systemd-resolve - "systemd Resolver" | ||
97 | +)m4_dnl | ||
98 | +m4_ifdef(`ENABLE_TIMESYNCD', | ||
99 | +u systemd-timesync - "systemd Time Synchronization" | ||
100 | +)m4_dnl | ||
101 | Index: git/tmpfiles.d/systemd.conf | ||
102 | =================================================================== | ||
103 | --- git.orig/tmpfiles.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000 | ||
104 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
105 | @@ -1,32 +0,0 @@ | ||
106 | -# This file is part of systemd. | ||
107 | -# | ||
108 | -# systemd is free software; you can redistribute it and/or modify it | ||
109 | -# under the terms of the GNU Lesser General Public License as published by | ||
110 | -# the Free Software Foundation; either version 2.1 of the License, or | ||
111 | -# (at your option) any later version. | ||
112 | - | ||
113 | -# See tmpfiles.d(5) for details | ||
114 | - | ||
115 | -d /run/user 0755 root root - | ||
116 | -F! /run/utmp 0664 root utmp - | ||
117 | - | ||
118 | -d /run/systemd/ask-password 0755 root root - | ||
119 | -d /run/systemd/seats 0755 root root - | ||
120 | -d /run/systemd/sessions 0755 root root - | ||
121 | -d /run/systemd/users 0755 root root - | ||
122 | -d /run/systemd/machines 0755 root root - | ||
123 | -d /run/systemd/shutdown 0755 root root - | ||
124 | -d /run/systemd/netif 0755 systemd-network systemd-network - | ||
125 | -d /run/systemd/netif/links 0755 systemd-network systemd-network - | ||
126 | -d /run/systemd/netif/leases 0755 systemd-network systemd-network - | ||
127 | - | ||
128 | -d /run/log 0755 root root - | ||
129 | - | ||
130 | -z /run/log/journal 2755 root systemd-journal - - | ||
131 | -Z /run/log/journal/%m ~2750 root systemd-journal - - | ||
132 | - | ||
133 | -z /var/log/journal 2755 root systemd-journal - - | ||
134 | -z /var/log/journal/%m 2755 root systemd-journal - - | ||
135 | - | ||
136 | -d /var/lib/systemd 0755 root root - | ||
137 | -d /var/lib/systemd/coredump 0755 root root 3d | ||
138 | Index: git/tmpfiles.d/systemd.conf.m4 | ||
139 | =================================================================== | ||
140 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
141 | +++ git/tmpfiles.d/systemd.conf.m4 2015-01-23 21:26:46.000000000 +0000 | ||
142 | @@ -0,0 +1,34 @@ | ||
143 | +# This file is part of systemd. | ||
144 | +# | ||
145 | +# systemd is free software; you can redistribute it and/or modify it | ||
146 | +# under the terms of the GNU Lesser General Public License as published by | ||
147 | +# the Free Software Foundation; either version 2.1 of the License, or | ||
148 | +# (at your option) any later version. | ||
149 | + | ||
150 | +# See tmpfiles.d(5) for details | ||
151 | + | ||
152 | +d /run/user 0755 root root - | ||
153 | +F! /run/utmp 0664 root utmp - | ||
154 | + | ||
155 | +d /run/systemd/ask-password 0755 root root - | ||
156 | +d /run/systemd/seats 0755 root root - | ||
157 | +d /run/systemd/sessions 0755 root root - | ||
158 | +d /run/systemd/users 0755 root root - | ||
159 | +d /run/systemd/machines 0755 root root - | ||
160 | +d /run/systemd/shutdown 0755 root root - | ||
161 | +m4_ifdef(`ENABLE_NETWORKD', | ||
162 | +d /run/systemd/netif 0755 systemd-network systemd-network - | ||
163 | +d /run/systemd/netif/links 0755 systemd-network systemd-network - | ||
164 | +d /run/systemd/netif/leases 0755 systemd-network systemd-network - | ||
165 | +)m4_dnl | ||
166 | + | ||
167 | +d /run/log 0755 root root - | ||
168 | + | ||
169 | +z /run/log/journal 2755 root systemd-journal - - | ||
170 | +Z /run/log/journal/%m ~2750 root systemd-journal - - | ||
171 | + | ||
172 | +z /var/log/journal 2755 root systemd-journal - - | ||
173 | +z /var/log/journal/%m 2755 root systemd-journal - - | ||
174 | + | ||
175 | +d /var/lib/systemd 0755 root root - | ||
176 | +d /var/lib/systemd/coredump 0755 root root 3d | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch new file mode 100644 index 0000000000..4795f8670f --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From bedd083aaedb3bbb14ef579a047bf4b4fed56d9b Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com> | ||
3 | Date: Wed, 26 Nov 2014 09:17:50 +0100 | ||
4 | Subject: [PATCH] build-sys: do not install tmpfiles and sysusers files by | ||
5 | default | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | --- | ||
12 | Makefile.am | 14 +++++++++++--- | ||
13 | 1 file changed, 11 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/Makefile.am b/Makefile.am | ||
16 | index ddd0df1..65bb176 100644 | ||
17 | --- a/Makefile.am | ||
18 | +++ b/Makefile.am | ||
19 | @@ -2039,7 +2039,6 @@ nodist_tmpfiles_DATA = \ | ||
20 | dist_tmpfiles_DATA = \ | ||
21 | tmpfiles.d/systemd.conf \ | ||
22 | tmpfiles.d/systemd-nologin.conf \ | ||
23 | - tmpfiles.d/systemd-remote.conf \ | ||
24 | tmpfiles.d/tmp.conf \ | ||
25 | tmpfiles.d/x11.conf \ | ||
26 | tmpfiles.d/var.conf | ||
27 | @@ -2094,8 +2093,7 @@ SYSINIT_TARGET_WANTS += \ | ||
28 | systemd-sysusers.service | ||
29 | |||
30 | dist_sysusers_DATA = \ | ||
31 | - sysusers.d/systemd.conf \ | ||
32 | - sysusers.d/systemd-remote.conf | ||
33 | + sysusers.d/systemd.conf | ||
34 | |||
35 | nodist_sysusers_DATA = \ | ||
36 | sysusers.d/basic.conf | ||
37 | @@ -3839,6 +3837,16 @@ systemd_journal_remote_CFLAGS = \ | ||
38 | systemd_journal_remote_LDADD += \ | ||
39 | $(MICROHTTPD_LIBS) | ||
40 | |||
41 | +if ENABLE_SYSUSERS | ||
42 | +dist_sysusers_DATA += \ | ||
43 | + sysusers.d/systemd-remote.conf | ||
44 | +endif | ||
45 | + | ||
46 | +if ENABLE_TMPFILES | ||
47 | +dist_tmpfiles_DATA += \ | ||
48 | + tmpfiles.d/systemd-remote.conf | ||
49 | +endif | ||
50 | + | ||
51 | if HAVE_GNUTLS | ||
52 | systemd_journal_remote_LDADD += \ | ||
53 | $(GNUTLS_LIBS) | ||
54 | -- | ||
55 | 1.9.1 | ||
56 | |||
diff --git a/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch new file mode 100644 index 0000000000..911e2ff1c1 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 2173cbf847fc53ca24950e77958c902edecfc207 Mon Sep 17 00:00:00 2001 | ||
2 | From: Olivier Brunel <jjk@jjacky.com> | ||
3 | Date: Fri, 5 Dec 2014 16:06:45 +0100 | ||
4 | Subject: [PATCH] journal: Fix navigating backwards missing entries | ||
5 | |||
6 | With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the | ||
7 | needle was found as the last item in the array, it wasn't actually processed as | ||
8 | match, resulting in entries being missed. | ||
9 | |||
10 | https://bugs.freedesktop.org/show_bug.cgi?id=86855 | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
15 | --- | ||
16 | src/journal/journal-file.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c | ||
20 | index 7858435..c5d2d19 100644 | ||
21 | --- a/src/journal/journal-file.c | ||
22 | +++ b/src/journal/journal-file.c | ||
23 | @@ -1657,7 +1657,7 @@ static int generic_array_bisect( | ||
24 | } | ||
25 | } | ||
26 | |||
27 | - if (k > n) { | ||
28 | + if (k >= n) { | ||
29 | if (direction == DIRECTION_UP) { | ||
30 | i = n; | ||
31 | subtract_one = true; | ||
32 | -- | ||
33 | 2.1.3 | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch new file mode 100644 index 0000000000..448ef1a917 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Subject: missing.h: add fake __NR_memfd_create for MIPS | ||
4 | |||
5 | We don't have the correct __NR_memfd_create syscall number yet, so set it to | ||
6 | 0xffffffff for now to prevent compile time errors. | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | --- | ||
10 | src/shared/missing.h | 3 +++ | ||
11 | 1 file changed, 3 insertions(+) | ||
12 | |||
13 | diff --git a/src/shared/missing.h b/src/shared/missing.h | ||
14 | index 3ff1a21..3051cb5 100644 | ||
15 | --- a/src/shared/missing.h | ||
16 | +++ b/src/shared/missing.h | ||
17 | @@ -167,6 +167,9 @@ static inline int pivot_root(const char *new_root, const char *put_old) { | ||
18 | # define __NR_fanotify_mark 5296 | ||
19 | # endif | ||
20 | # endif | ||
21 | +# ifndef __NR_memfd_create | ||
22 | +# define __NR_memfd_create 0xffffffff /* FIXME */ | ||
23 | +# endif | ||
24 | #else | ||
25 | # ifndef __NR_fanotify_init | ||
26 | # define __NR_fanotify_init 338 | ||
27 | -- | ||
28 | 1.9.1 | ||
29 | |||
diff --git a/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch b/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch new file mode 100644 index 0000000000..fbde13f077 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Upstream-Status: Inappropriate [oe specific] | ||
2 | |||
3 | Subject: systemd-user: avoid using system-auth | ||
4 | |||
5 | In OE, we don't provide system-auth, instead, we use common-* files. | ||
6 | So modify systemd-user file to use common-* files. | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | --- | ||
10 | src/login/systemd-user | 4 ++-- | ||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/src/login/systemd-user b/src/login/systemd-user | ||
14 | index 8112d74..99635af 100644 | ||
15 | --- a/src/login/systemd-user | ||
16 | +++ b/src/login/systemd-user | ||
17 | @@ -2,5 +2,5 @@ | ||
18 | # | ||
19 | # Used by systemd --user instances. | ||
20 | |||
21 | -account include system-auth | ||
22 | -session include system-auth | ||
23 | +account include common-account | ||
24 | +session include common-session | ||
25 | -- | ||
26 | 1.9.1 | ||
diff --git a/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch b/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch new file mode 100644 index 0000000000..b5b0168149 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch | |||
@@ -0,0 +1,142 @@ | |||
1 | From aeb50ff0bd4bbbca74c4695072232348351d512d Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Gundersen <teg@jklm.no> | ||
3 | Date: Wed, 27 Aug 2014 17:45:41 +0200 | ||
4 | Subject: [PATCH] tmpfiles: make resolv.conf entry conditional on resolved | ||
5 | support | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | |||
10 | --- | ||
11 | Makefile.am | 15 +++++++++++++-- | ||
12 | TODO | 2 -- | ||
13 | configure.ac | 1 + | ||
14 | tmpfiles.d/.gitignore | 1 + | ||
15 | tmpfiles.d/{etc.conf => etc.conf.m4} | 2 ++ | ||
16 | 5 files changed, 17 insertions(+), 4 deletions(-) | ||
17 | create mode 100644 tmpfiles.d/.gitignore | ||
18 | rename tmpfiles.d/{etc.conf => etc.conf.m4} (95%) | ||
19 | |||
20 | Index: git/Makefile.am | ||
21 | =================================================================== | ||
22 | --- git.orig/Makefile.am 2015-01-24 00:41:20.134716451 -0800 | ||
23 | +++ git/Makefile.am 2015-01-24 00:41:20.126716451 -0800 | ||
24 | @@ -1935,14 +1935,16 @@ | ||
25 | units/systemd-tmpfiles-setup.service \ | ||
26 | units/systemd-tmpfiles-clean.service | ||
27 | |||
28 | +nodist_tmpfiles_DATA = \ | ||
29 | + tmpfiles.d/etc.conf | ||
30 | + | ||
31 | dist_tmpfiles_DATA = \ | ||
32 | tmpfiles.d/systemd.conf \ | ||
33 | tmpfiles.d/systemd-nologin.conf \ | ||
34 | tmpfiles.d/systemd-remote.conf \ | ||
35 | tmpfiles.d/tmp.conf \ | ||
36 | tmpfiles.d/x11.conf \ | ||
37 | - tmpfiles.d/var.conf \ | ||
38 | - tmpfiles.d/etc.conf | ||
39 | + tmpfiles.d/var.conf | ||
40 | |||
41 | if HAVE_SYSV_COMPAT | ||
42 | dist_tmpfiles_DATA += \ | ||
43 | @@ -1965,10 +1967,14 @@ | ||
44 | endif | ||
45 | |||
46 | EXTRA_DIST += \ | ||
47 | + tmpfiles.d/etc.conf.m4 \ | ||
48 | units/systemd-tmpfiles-setup-dev.service.in \ | ||
49 | units/systemd-tmpfiles-setup.service.in \ | ||
50 | units/systemd-tmpfiles-clean.service.in | ||
51 | |||
52 | +CLEANFILES += \ | ||
53 | + tmpfiles.d/etc.conf | ||
54 | + | ||
55 | # ------------------------------------------------------------------------------ | ||
56 | if ENABLE_SYSUSERS | ||
57 | systemd_sysusers_SOURCES = \ | ||
58 | @@ -5684,6 +5690,11 @@ | ||
59 | $(AM_V_at)$(MKDIR_P) $(dir $@) | ||
60 | $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ | ||
61 | |||
62 | +tmpfiles.d/%: tmpfiles.d/%.m4 | ||
63 | + $(AM_V_at)$(MKDIR_P) $(dir $@) | ||
64 | + $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ | ||
65 | + | ||
66 | + | ||
67 | units/%: units/%.m4 | ||
68 | $(AM_V_at)$(MKDIR_P) $(dir $@) | ||
69 | $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@ | ||
70 | Index: git/TODO | ||
71 | =================================================================== | ||
72 | --- git.orig/TODO 2015-01-24 00:41:20.134716451 -0800 | ||
73 | +++ git/TODO 2015-01-24 00:41:20.126716451 -0800 | ||
74 | @@ -111,8 +111,6 @@ | ||
75 | |||
76 | * Allow multiple ExecStart= for all Type= settings, so that we can cover rescue.service nicely | ||
77 | |||
78 | -* the resolv.conf tmpfiles line should be covered by ENABLE_NETWORKD... | ||
79 | - | ||
80 | * Add a new verb "systemctl top" | ||
81 | |||
82 | * logind: allow users to kill or lock their own sessions | ||
83 | Index: git/configure.ac | ||
84 | =================================================================== | ||
85 | --- git.orig/configure.ac 2015-01-24 00:41:20.134716451 -0800 | ||
86 | +++ git/configure.ac 2015-01-24 00:41:20.126716451 -0800 | ||
87 | @@ -1041,6 +1041,7 @@ | ||
88 | AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon])) | ||
89 | if test "x$enable_resolved" != "xno"; then | ||
90 | have_resolved=yes | ||
91 | + M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED" | ||
92 | fi | ||
93 | AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"]) | ||
94 | |||
95 | Index: git/tmpfiles.d/.gitignore | ||
96 | =================================================================== | ||
97 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
98 | +++ git/tmpfiles.d/.gitignore 2015-01-24 00:41:20.126716451 -0800 | ||
99 | @@ -0,0 +1 @@ | ||
100 | +etc.conf | ||
101 | Index: git/tmpfiles.d/etc.conf | ||
102 | =================================================================== | ||
103 | --- git.orig/tmpfiles.d/etc.conf 2015-01-24 00:41:20.134716451 -0800 | ||
104 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
105 | @@ -1,15 +0,0 @@ | ||
106 | -# This file is part of systemd. | ||
107 | -# | ||
108 | -# systemd is free software; you can redistribute it and/or modify it | ||
109 | -# under the terms of the GNU Lesser General Public License as published by | ||
110 | -# the Free Software Foundation; either version 2.1 of the License, or | ||
111 | -# (at your option) any later version. | ||
112 | - | ||
113 | -# See tmpfiles.d(5) for details | ||
114 | - | ||
115 | -L /etc/os-release - - - - ../usr/lib/os-release | ||
116 | -L /etc/localtime - - - - ../usr/share/zoneinfo/UTC | ||
117 | -L+ /etc/mtab - - - - ../proc/self/mounts | ||
118 | -L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf | ||
119 | -C /etc/nsswitch.conf - - - - | ||
120 | -C /etc/pam.d - - - - | ||
121 | Index: git/tmpfiles.d/etc.conf.m4 | ||
122 | =================================================================== | ||
123 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
124 | +++ git/tmpfiles.d/etc.conf.m4 2015-01-24 00:41:20.126716451 -0800 | ||
125 | @@ -0,0 +1,17 @@ | ||
126 | +# This file is part of systemd. | ||
127 | +# | ||
128 | +# systemd is free software; you can redistribute it and/or modify it | ||
129 | +# under the terms of the GNU Lesser General Public License as published by | ||
130 | +# the Free Software Foundation; either version 2.1 of the License, or | ||
131 | +# (at your option) any later version. | ||
132 | + | ||
133 | +# See tmpfiles.d(5) for details | ||
134 | + | ||
135 | +L /etc/os-release - - - - ../usr/lib/os-release | ||
136 | +L /etc/localtime - - - - ../usr/share/zoneinfo/UTC | ||
137 | +L+ /etc/mtab - - - - ../proc/self/mounts | ||
138 | +m4_ifdef(`ENABLE_RESOLVED', | ||
139 | +L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf | ||
140 | +) | ||
141 | +C /etc/nsswitch.conf - - - - | ||
142 | +C /etc/pam.d - - - - | ||
diff --git a/meta/recipes-core/systemd/systemd/binfmt-install.patch b/meta/recipes-core/systemd/systemd/binfmt-install.patch new file mode 100644 index 0000000000..c2d5099f24 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/binfmt-install.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | Don't install dependency links at install time for the binfmt services, use | ||
2 | [Install] blocks so that they get created when the service is enabled like a | ||
3 | traditional service. | ||
4 | |||
5 | The [Install] blocks were rejected upstream as they don't have a way to "enable" | ||
6 | it on install without static symlinks which can't be disabled, only masked. We | ||
7 | however can do that in a postinst. | ||
8 | |||
9 | Upstream-Status: Denied | ||
10 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
11 | |||
12 | diff --git a/Makefile.am b/Makefile.am | ||
13 | index 7933de6..78acb6f 100644 | ||
14 | --- a/Makefile.am | ||
15 | +++ b/Makefile.am | ||
16 | @@ -3133,10 +3133,6 @@ INSTALL_DIRS += \ | ||
17 | $(prefix)/lib/binfmt.d \ | ||
18 | $(sysconfdir)/binfmt.d | ||
19 | |||
20 | -SYSINIT_TARGET_WANTS += \ | ||
21 | - systemd-binfmt.service \ | ||
22 | - proc-sys-fs-binfmt_misc.automount | ||
23 | - | ||
24 | endif | ||
25 | |||
26 | EXTRA_DIST += \ | ||
27 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount | ||
28 | index 6be3893..709adef 100644 | ||
29 | --- a/units/proc-sys-fs-binfmt_misc.automount | ||
30 | +++ b/units/proc-sys-fs-binfmt_misc.automount | ||
31 | @@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/ | ||
32 | |||
33 | [Automount] | ||
34 | Where=/proc/sys/fs/binfmt_misc | ||
35 | + | ||
36 | +[Install] | ||
37 | +WantedBy=sysinit.target | ||
38 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in | ||
39 | index 02dfe77..86d3481 100644 | ||
40 | --- a/units/systemd-binfmt.service.in | ||
41 | +++ b/units/systemd-binfmt.service.in | ||
42 | @@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5) | ||
43 | Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt | ||
44 | DefaultDependencies=no | ||
45 | Conflicts=shutdown.target | ||
46 | +Wants=proc-sys-fs-binfmt_misc.automount | ||
47 | After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount | ||
48 | Before=sysinit.target shutdown.target | ||
49 | ConditionPathIsReadWrite=/proc/sys/ | ||
50 | @@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d | ||
51 | Type=oneshot | ||
52 | RemainAfterExit=yes | ||
53 | ExecStart=@rootlibexecdir@/systemd-binfmt | ||
54 | + | ||
55 | +[Install] | ||
56 | +WantedBy=sysinit.target | ||
diff --git a/meta/recipes-core/systemd/systemd/init b/meta/recipes-core/systemd/systemd/init new file mode 100644 index 0000000000..ea52be4820 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/init | |||
@@ -0,0 +1,104 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ### BEGIN INIT INFO | ||
4 | # Provides: udev | ||
5 | # Required-Start: mountvirtfs | ||
6 | # Required-Stop: | ||
7 | # Default-Start: S | ||
8 | # Default-Stop: | ||
9 | # Short-Description: Start udevd, populate /dev and load drivers. | ||
10 | ### END INIT INFO | ||
11 | |||
12 | . /etc/init.d/functions | ||
13 | |||
14 | export TZ=/etc/localtime | ||
15 | |||
16 | [ -d /sys/class ] || exit 1 | ||
17 | [ -r /proc/mounts ] || exit 1 | ||
18 | [ -x @UDEVD@ ] || exit 1 | ||
19 | [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache | ||
20 | [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf | ||
21 | |||
22 | readfile () { | ||
23 | filename=$1 | ||
24 | READDATA="" | ||
25 | if [ -r $filename ]; then | ||
26 | while read line; do | ||
27 | READDATA="$READDATA$line" | ||
28 | done < $filename | ||
29 | fi | ||
30 | } | ||
31 | |||
32 | case "$1" in | ||
33 | start) | ||
34 | export ACTION=add | ||
35 | # propagate /dev from /sys | ||
36 | echo "Starting udev" | ||
37 | |||
38 | # mount the devtmpfs on /dev, if not already done | ||
39 | LANG=C awk '$2 == "/dev" && ($3 == "devtmpfs") { exit 1 }' /proc/mounts && { | ||
40 | mount -n -o mode=0755 -t devtmpfs none "/dev" | ||
41 | } | ||
42 | [ -e /dev/pts ] || mkdir -m 0755 /dev/pts | ||
43 | [ -e /dev/shm ] || mkdir -m 1777 /dev/shm | ||
44 | mount -a -t tmpfs 2>/dev/null | ||
45 | |||
46 | # cache handling | ||
47 | if [ "$DEVCACHE" != "" ]; then | ||
48 | readfile /proc/version | ||
49 | VERSION="$READDATA" | ||
50 | readfile /proc/cmdline | ||
51 | CMDLINE="$READDATA" | ||
52 | readfile /proc/devices | ||
53 | DEVICES="$READDATA" | ||
54 | readfile /proc/atags | ||
55 | ATAGS="$READDATA" | ||
56 | |||
57 | if [ -e $DEVCACHE ]; then | ||
58 | readfile /etc/udev/cache.data | ||
59 | if [ "$READDATA" = "$VERSION$CMDLINE$DEVICES$ATAGS" ]; then | ||
60 | (cd /; tar xf $DEVCACHE > /dev/null 2>&1) | ||
61 | not_first_boot=1 | ||
62 | [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE" | ||
63 | [ -e /dev/shm/udev.cache ] && rm -f /dev/shm/udev.cache | ||
64 | else | ||
65 | echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache | ||
66 | fi | ||
67 | else | ||
68 | echo "$VERSION$CMDLINE$DEVICES$ATAGS" > /dev/shm/udev.cache | ||
69 | fi | ||
70 | fi | ||
71 | |||
72 | # make_extra_nodes | ||
73 | killproc systemd-udevd > "/dev/null" 2>&1 | ||
74 | |||
75 | # trigger the sorted events | ||
76 | echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug | ||
77 | @UDEVD@ -d | ||
78 | |||
79 | udevadm control --env=STARTUP=1 | ||
80 | if [ "$not_first_boot" != "" ];then | ||
81 | udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform | ||
82 | (udevadm settle --timeout=3; udevadm control --env=STARTUP=)& | ||
83 | else | ||
84 | udevadm trigger --action=add | ||
85 | udevadm settle | ||
86 | fi | ||
87 | ;; | ||
88 | stop) | ||
89 | echo "Stopping udevd" | ||
90 | start-stop-daemon --stop --name systemd-udevd --quiet | ||
91 | ;; | ||
92 | restart) | ||
93 | $0 stop | ||
94 | sleep 1 | ||
95 | $0 start | ||
96 | ;; | ||
97 | status) | ||
98 | status systemd-udevd | ||
99 | ;; | ||
100 | *) | ||
101 | echo "Usage: $0 {start|stop|status|restart}" | ||
102 | exit 1 | ||
103 | esac | ||
104 | exit 0 | ||
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..2063268246 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | on uclibc secure_getenv is not available | ||
2 | therefore default to using getenv instead | ||
3 | |||
4 | Upstream-Status: Denied [no desire for uclibc support] | ||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | |||
7 | Index: 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/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest new file mode 100644 index 0000000000..a2d61c2894 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/run-ptest | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | tar -C test -xJf test/sys.tar.xz | ||
4 | make test/rules-test.sh.log | ||
5 | make test/udev-test.pl.log | ||
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..4639532236 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Upstream-Status: Denied [no desire for uclibc support] | ||
2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
3 | |||
4 | Index: git/configure.ac | ||
5 | =================================================================== | ||
6 | --- git.orig/configure.ac 2014-03-15 17:53:51.756340454 -0700 | ||
7 | +++ git/configure.ac 2014-03-15 18:07:34.888355897 -0700 | ||
8 | @@ -78,6 +78,24 @@ | ||
9 | |||
10 | M4_DEFINES= | ||
11 | |||
12 | +# check for few functions not implemented in uClibc | ||
13 | + | ||
14 | +AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate) | ||
15 | + | ||
16 | +# check for %ms format support - assume always no if cross compiling | ||
17 | + | ||
18 | +AC_MSG_CHECKING([whether %ms format is supported by *scanf]) | ||
19 | + | ||
20 | +AC_LINK_IFELSE( | ||
21 | + [AC_LANG_PROGRAM([ | ||
22 | + #include <stdio.h> | ||
23 | + ],[ | ||
24 | + char *buf1, *buf2, *buf3, str="1 2.3 abcde" ; | ||
25 | + int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ; | ||
26 | + return (rc==3)?0:1;])], | ||
27 | + [AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])], | ||
28 | + [AC_MSG_RESULT([no])]) | ||
29 | + | ||
30 | # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line | ||
31 | m4_ifdef([GTK_DOC_CHECK], [ | ||
32 | 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..7170a38af3 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | Upstream-Status: Denied [no desire for uclibc support] | ||
2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
3 | |||
4 | Index: systemd-209/src/nspawn/nspawn.c | ||
5 | =================================================================== | ||
6 | --- systemd-209.orig/src/nspawn/nspawn.c 2014-02-19 15:03:09.000000000 -0800 | ||
7 | +++ systemd-209/src/nspawn/nspawn.c 2014-02-19 23:20:38.720628627 -0800 | ||
8 | @@ -91,6 +91,8 @@ | ||
9 | LINK_GUEST | ||
10 | } LinkJournal; | ||
11 | |||
12 | +#include "config.h" | ||
13 | + | ||
14 | static char *arg_directory = NULL; | ||
15 | static char *arg_user = NULL; | ||
16 | static sd_id128_t arg_uuid = {}; | ||
17 | @@ -2045,7 +2047,12 @@ | ||
18 | a[0] = (char*) "/sbin/init"; | ||
19 | execve(a[0], a, env_use); | ||
20 | } else if (argc > optind) | ||
21 | +#ifdef HAVE_EXECVPE | ||
22 | execvpe(argv[optind], argv + optind, env_use); | ||
23 | +#else | ||
24 | + environ = env_use; | ||
25 | + execvp(argv[optind], argv + optind); | ||
26 | +#endif /* HAVE_EXECVPE */ | ||
27 | else { | ||
28 | chdir(home ? home : "/root"); | ||
29 | execle("/bin/bash", "-bash", NULL, env_use); | ||
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..f8e19ce172 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | Upstream-Status: Denied [no desire for uclibc support] | ||
2 | |||
3 | This patch is uclibc specific, thus not suitable for upstream. | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
7 | --- | ||
8 | src/journal/journal-file.c | 16 +++++++++++++++- | ||
9 | src/journal/journald-kmsg.c | 16 ++++++++++++++-- | ||
10 | 2 files changed, 29 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c | ||
13 | index f2f1f35..092f87b 100644 | ||
14 | --- a/src/journal/journal-file.c | ||
15 | +++ b/src/journal/journal-file.c | ||
16 | @@ -38,6 +38,8 @@ | ||
17 | #include "compress.h" | ||
18 | #include "fsprg.h" | ||
19 | |||
20 | +#include "config.h" | ||
21 | + | ||
22 | #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem)) | ||
23 | #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem)) | ||
24 | |||
25 | @@ -314,7 +316,7 @@ static int journal_file_verify_header(JournalFile *f) { | ||
26 | |||
27 | static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) { | ||
28 | uint64_t old_size, new_size; | ||
29 | - int r; | ||
30 | + int r = 0; | ||
31 | |||
32 | assert(f); | ||
33 | |||
34 | @@ -362,9 +364,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) | ||
35 | /* Note that the glibc fallocate() fallback is very | ||
36 | inefficient, hence we try to minimize the allocation area | ||
37 | as we can. */ | ||
38 | +#ifdef HAVE_POSIX_FALLOCATE | ||
39 | r = posix_fallocate(f->fd, old_size, new_size - old_size); | ||
40 | if (r != 0) | ||
41 | return -r; | ||
42 | +#else | ||
43 | + /* Write something every 512 bytes to make sure the block is allocated */ | ||
44 | + uint64_t len = new_size - old_size; | ||
45 | + uint64_t offset = old_size; | ||
46 | + for (offset += (len-1) % 512; len > 0; offset += 512) { | ||
47 | + len -= 512; | ||
48 | + if (pwrite(f->fd, "", 1, offset) != 1) | ||
49 | + return -errno; | ||
50 | + } | ||
51 | + | ||
52 | +#endif /* HAVE_POSIX_FALLOCATE */ | ||
53 | |||
54 | if (fstat(f->fd, &f->last_stat) < 0) | ||
55 | return -errno; | ||
56 | diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c | ||
57 | index 12992e7..dc4fa93 100644 | ||
58 | --- a/src/journal/journald-kmsg.c | ||
59 | +++ b/src/journal/journald-kmsg.c | ||
60 | @@ -437,6 +437,7 @@ fail: | ||
61 | int server_open_kernel_seqnum(Server *s) { | ||
62 | _cleanup_close_ int fd; | ||
63 | uint64_t *p; | ||
64 | + int r = 0; | ||
65 | |||
66 | assert(s); | ||
67 | |||
68 | @@ -449,8 +450,19 @@ int server_open_kernel_seqnum(Server *s) { | ||
69 | log_error("Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m"); | ||
70 | return 0; | ||
71 | } | ||
72 | - | ||
73 | - if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) { | ||
74 | +#ifdef HAVE_POSIX_FALLOCATE | ||
75 | + r = posix_fallocate(fd, 0, sizeof(uint64_t)); | ||
76 | +#else | ||
77 | + /* Use good old method to write zeros into the journal file | ||
78 | + perhaps very inefficient yet working. */ | ||
79 | + char *buf = alloca(sizeof(uint64_t)); | ||
80 | + off_t oldpos = lseek(fd, 0, SEEK_CUR); | ||
81 | + bzero(buf, sizeof(uint64_t)); | ||
82 | + lseek(fd, 0, SEEK_SET); | ||
83 | + r = write(fd, buf, sizeof(uint64_t)); | ||
84 | + lseek(fd, oldpos, SEEK_SET); | ||
85 | +#endif /* HAVE_POSIX_FALLOCATE */ | ||
86 | + if (r < 0) { | ||
87 | log_error("Failed to allocate sequential number file, ignoring: %m"); | ||
88 | return 0; | ||
89 | } | ||
90 | -- | ||
91 | 1.7.9.5 | ||
92 | |||
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..9b4c940984 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | Prefer getty to agetty in console setup systemd units | ||
2 | |||
3 | Upstream-Status: Inappropriate [configuration specific] | ||
4 | Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | --- | ||
6 | units/getty@.service.m4 | 2 +- | ||
7 | units/serial-getty@.service.m4 | 2 +- | ||
8 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
9 | |||
10 | Index: git/units/getty@.service.m4 | ||
11 | =================================================================== | ||
12 | --- git.orig/units/getty@.service.m4 2014-03-15 08:16:17.000000000 -0700 | ||
13 | +++ git/units/getty@.service.m4 2014-03-15 08:21:11.007695825 -0700 | ||
14 | @@ -27,7 +27,7 @@ | ||
15 | |||
16 | [Service] | ||
17 | # the VT is cleared by TTYVTDisallocate | ||
18 | -ExecStart=-/sbin/agetty --noclear %I $TERM | ||
19 | +ExecStart=-/sbin/getty -L %I $TERM | ||
20 | Type=idle | ||
21 | Restart=always | ||
22 | RestartSec=0 | ||
23 | Index: git/units/serial-getty@.service.m4 | ||
24 | =================================================================== | ||
25 | --- git.orig/units/serial-getty@.service.m4 2014-03-15 08:16:17.000000000 -0700 | ||
26 | +++ git/units/serial-getty@.service.m4 2014-03-15 08:22:31.291697331 -0700 | ||
27 | @@ -22,7 +22,7 @@ | ||
28 | IgnoreOnIsolate=yes | ||
29 | |||
30 | [Service] | ||
31 | -ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM | ||
32 | +ExecStart=-/sbin/getty -L 115200 %I $TERM | ||
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..8c7aa072da --- /dev/null +++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Upstream-Status: Denied [no desire for uclibc support] | ||
2 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
3 | |||
4 | Index: git/src/shared/util.c | ||
5 | =================================================================== | ||
6 | --- git.orig/src/shared/util.c 2014-03-15 15:14:21.368160908 -0700 | ||
7 | +++ git/src/shared/util.c 2014-03-15 15:44:21.988194688 -0700 | ||
8 | @@ -85,6 +85,8 @@ | ||
9 | #include "def.h" | ||
10 | #include "missing.h" | ||
11 | |||
12 | +#include "config.h" | ||
13 | + | ||
14 | int saved_argc = 0; | ||
15 | char **saved_argv = NULL; | ||
16 | |||
17 | @@ -6222,7 +6224,13 @@ | ||
18 | |||
19 | u = umask(077); | ||
20 | |||
21 | +#ifdef HAVE_MKOSTEMP | ||
22 | fd = mkostemp(pattern, flags); | ||
23 | +#else | ||
24 | + fd = mkstemp(pattern); | ||
25 | + if (fd >= 0) fcntl(fd, F_SETFD, flags); | ||
26 | +#endif /* HAVE_MKOSTEMP */ | ||
27 | + | ||
28 | if (fd < 0) | ||
29 | return -errno; | ||
30 | |||
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 | ||
17 | SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" | ||
18 | SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen0" | ||
diff --git a/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch b/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch new file mode 100644 index 0000000000..39dfc9e2ea --- /dev/null +++ b/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | bypass unimplemented _SC_PHYS_PAGES system configuration API in uclibc | ||
2 | |||
3 | Upstream-Status: Inappropriate [uclibc-specific] | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | |||
7 | Index: git/src/shared/util.c | ||
8 | =================================================================== | ||
9 | --- git.orig/src/shared/util.c 2014-03-15 18:09:34.796358146 -0700 | ||
10 | +++ git/src/shared/util.c 2014-03-15 20:16:33.836501084 -0700 | ||
11 | @@ -6332,11 +6332,24 @@ | ||
12 | |||
13 | /* We return this as uint64_t in case we are running as 32bit | ||
14 | * process on a 64bit kernel with huge amounts of memory */ | ||
15 | - | ||
16 | +#ifdef __UCLIBC__ | ||
17 | + char line[128]; | ||
18 | + FILE *f = fopen("/proc/meminfo", "r"); | ||
19 | + if (f == NULL) | ||
20 | + return 0; | ||
21 | + while (!feof(f) && fgets(line, sizeof(line)-1, f)) { | ||
22 | + if (sscanf(line, "MemTotal: %l kB", &mem) == 1) { | ||
23 | + mem *= 1024; | ||
24 | + break; | ||
25 | + } | ||
26 | + } | ||
27 | + fclose(f); | ||
28 | + return (uint64_t) mem; | ||
29 | +#else | ||
30 | mem = sysconf(_SC_PHYS_PAGES); | ||
31 | assert(mem > 0); | ||
32 | - | ||
33 | return (uint64_t) mem * (uint64_t) page_size(); | ||
34 | +#endif | ||
35 | } | ||
36 | |||
37 | char* mount_test_option(const char *haystack, const char *needle) { | ||
diff --git a/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch b/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch new file mode 100644 index 0000000000..15645dee11 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Dont include sys/sysinfo.h on uclibc it conflicts with linux/sysinfo.h | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | Upstream-Status: Inappropriate [uclibc specific] | ||
5 | |||
6 | Index: systemd-209/src/readahead/readahead-common.c | ||
7 | =================================================================== | ||
8 | --- systemd-209.orig/src/readahead/readahead-common.c 2014-02-12 18:42:33.810685053 -0800 | ||
9 | +++ systemd-209/src/readahead/readahead-common.c 2014-02-19 23:49:31.856661142 -0800 | ||
10 | @@ -22,7 +22,9 @@ | ||
11 | #include <errno.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <string.h> | ||
14 | +#ifndef __UCLIBC__ | ||
15 | #include <sys/sysinfo.h> | ||
16 | +#endif | ||
17 | #include <sys/inotify.h> | ||
18 | #include <fcntl.h> | ||
19 | #include <sys/mman.h> | ||