summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2013-05-23 19:15:11 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-24 14:14:48 +0100
commit7bb6021c4c70b6abdb9d9a3e72d9447c872751a2 (patch)
tree073691291ed29fe1fc290aa06a8c9bfb703a146b /meta/recipes-core
parent657e46480b6f21b3e81e3f33764392539d7308ef (diff)
downloadpoky-7bb6021c4c70b6abdb9d9a3e72d9447c872751a2.tar.gz
systemd: update to 204
Removed patches integrated upstream. Added backport of fix for utmp not running at shutdown. Updated serial-getty service. Added missing util-linux dependency. (From OE-Core rev: 9e39d10ec92db23c9765b83559c32c0302bc8c5d) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service16
-rw-r--r--meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch41
-rw-r--r--meta/recipes-core/systemd/systemd/0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch367
-rw-r--r--meta/recipes-core/systemd/systemd/0002-readahead-chunk-on-spinning-media.patch142
-rw-r--r--meta/recipes-core/systemd/systemd/0003-readahead-cleanups.patch86
-rw-r--r--meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch33
-rw-r--r--meta/recipes-core/systemd/systemd/199-firmware.patch98
-rw-r--r--meta/recipes-core/systemd/systemd_204.bb (renamed from meta/recipes-core/systemd/systemd_199.bb)13
8 files changed, 381 insertions, 415 deletions
diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index 8eeaab697c..1c14dfea6a 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -1,23 +1,27 @@
1# This file is part of systemd. 1# This file is part of systemd.
2# 2#
3# systemd is free software; you can redistribute it and/or modify it 3# systemd is free software; you can redistribute it and/or modify it
4# under the terms of the GNU General Public License as published by 4# under the terms of the GNU Lesser General Public License as published by
5# the Free Software Foundation; either version 2 of the License, or 5# the Free Software Foundation; either version 2.1 of the License, or
6# (at your option) any later version. 6# (at your option) any later version.
7 7
8[Unit] 8[Unit]
9Description=Serial Getty on %I 9Description=Serial Getty on %I
10BindTo=dev-%i.device 10Documentation=man:agetty(8) man:systemd-getty-generator(8)
11After=dev-%i.device systemd-user-sessions.service 11Documentation=http://0pointer.de/blog/projects/serial-console.html
12BindsTo=dev-%i.device
13After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
14After=rc-local.service
12 15
13# If additional gettys are spawned during boot then we should make 16# If additional gettys are spawned during boot then we should make
14# sure that this is synchronized before getty.target, even though 17# sure that this is synchronized before getty.target, even though
15# getty.target didn't actually pull it in. 18# getty.target didn't actually pull it in.
16Before=getty.target 19Before=getty.target
20IgnoreOnIsolate=yes
17 21
18[Service] 22[Service]
19Environment=TERM=vt100 23ExecStart=-/sbin/agetty -s %I @BAUDRATE@ vt102
20ExecStart=-/sbin/agetty -s %I @BAUDRATE@ 24Type=idle
21Restart=always 25Restart=always
22RestartSec=0 26RestartSec=0
23UtmpIdentifier=%I 27UtmpIdentifier=%I
diff --git a/meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch b/meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch
deleted file mode 100644
index d847bbc202..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From d6f92bcbbae9a577adb9588c7b2783a5d0bf343d Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Tue, 16 Apr 2013 14:20:41 +0200
4Subject: [PATCH] configure: use AC_CHECK_TOOL for objcopy, strings and gperf
5
6* using AC_PATH_TOOL does not allow to override it from shell environment
7 which is useful when cross-compiling
8* with external toolchain I have different HOST_PREFIX and HOST_SYS
9 AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
10 which is available only as ${TARGET_PREFIX}objcopy then it tries
11 objcopy without prefix which is found on host, but that objcopy
12 does not work for !host (e.g. arm when building on x86) libs
13
14Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
15Upstream-Status: Submitted
16http://lists.freedesktop.org/archives/systemd-devel/2013-April/010468.html
17
18---
19 configure.ac | 6 +++---
20 1 file changed, 3 insertions(+), 3 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index 33b0ca9..519f1a9 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -86,9 +86,9 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
27 AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
28 enable_introspection=no])
29
30-AC_PATH_TOOL(OBJCOPY, objcopy)
31-AC_PATH_TOOL(STRINGS, strings)
32-AC_PATH_TOOL(GPERF, gperf)
33+AC_CHECK_TOOL(OBJCOPY, objcopy)
34+AC_CHECK_TOOL(STRINGS, strings)
35+AC_CHECK_TOOL(GPERF, gperf)
36 if test -z "$GPERF" ; then
37 AC_MSG_ERROR([*** gperf not found])
38 fi
39--
401.8.1.5
41
diff --git a/meta/recipes-core/systemd/systemd/0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch b/meta/recipes-core/systemd/systemd/0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch
new file mode 100644
index 0000000000..86fab9734c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch
@@ -0,0 +1,367 @@
1Upstream-Status: Backport
2Signed-off-by: Jonathan Liu <net147@gmail.com>
3
4From 3f92e4b4b61042391bd44de4dceb18177df0dd57 Mon Sep 17 00:00:00 2001
5From: Lennart Poettering <lennart@poettering.net>
6Date: Thu, 16 May 2013 00:19:03 +0200
7Subject: [PATCH] utmp: turn systemd-update-utmp-shutdown.service into a normal
8 runtime service
9
10With this change systemd-update-utmp-shutdown.service is replaced by
11systemd-update-utmp.service which is started at boot and stays around
12until shutdown. This allows us to properly order the unit against both
13/var/log and auditd.
14
15https://bugzilla.redhat.com/show_bug.cgi?id=853104
16https://bugs.freedesktop.org/show_bug.cgi?id=64365
17---
18 Makefile-man.am | 12 ++---
19 Makefile.am | 8 +--
20 man/systemd-update-utmp-runlevel.service.xml | 76 ---------------------------
21 man/systemd-update-utmp.service.xml | 76 +++++++++++++++++++++++++++
22 src/update-utmp/update-utmp.c | 2 +-
23 units/.gitignore | 2 +-
24 units/systemd-update-utmp-runlevel.service.in | 8 +--
25 units/systemd-update-utmp-shutdown.service.in | 19 -------
26 units/systemd-update-utmp.service.in | 21 ++++++++
27 9 files changed, 114 insertions(+), 110 deletions(-)
28 delete mode 100644 man/systemd-update-utmp-runlevel.service.xml
29 create mode 100644 man/systemd-update-utmp.service.xml
30 delete mode 100644 units/systemd-update-utmp-shutdown.service.in
31 create mode 100644 units/systemd-update-utmp.service.in
32
33diff --git a/Makefile-man.am b/Makefile-man.am
34index 7d62094..5888158 100644
35--- a/Makefile-man.am
36+++ b/Makefile-man.am
37@@ -72,7 +72,7 @@ MANPAGES += \
38 man/systemd-tmpfiles.8 \
39 man/systemd-tty-ask-password-agent.1 \
40 man/systemd-udevd.service.8 \
41- man/systemd-update-utmp-runlevel.service.8 \
42+ man/systemd-update-utmp.service.8 \
43 man/systemd.1 \
44 man/systemd.automount.5 \
45 man/systemd.device.5 \
46@@ -191,7 +191,7 @@ MANPAGES_ALIAS += \
47 man/systemd-udevd-control.socket.8 \
48 man/systemd-udevd-kernel.socket.8 \
49 man/systemd-udevd.8 \
50- man/systemd-update-utmp-shutdown.service.8 \
51+ man/systemd-update-utmp-runlevel.service.8 \
52 man/systemd-update-utmp.8 \
53 man/systemd-user.conf.5
54 man/SD_ALERT.3: man/sd-daemon.3
55@@ -289,8 +289,8 @@ man/systemd-tmpfiles-setup.service.8: man/systemd-tmpfiles.8
56 man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
57 man/systemd-udevd-kernel.socket.8: man/systemd-udevd.service.8
58 man/systemd-udevd.8: man/systemd-udevd.service.8
59-man/systemd-update-utmp-shutdown.service.8: man/systemd-update-utmp-runlevel.service.8
60-man/systemd-update-utmp.8: man/systemd-update-utmp-runlevel.service.8
61+man/systemd-update-utmp-runlevel.service.8: man/systemd-update-utmp.service.8
62+man/systemd-update-utmp.8: man/systemd-update-utmp.service.8
63 man/systemd-user.conf.5: man/systemd-system.conf.5
64 man/SD_ALERT.html: man/sd-daemon.html
65 $(html-alias)
66@@ -577,10 +577,10 @@ man/systemd-udevd-kernel.socket.html: man/systemd-udevd.service.html
67 man/systemd-udevd.html: man/systemd-udevd.service.html
68 $(html-alias)
69
70-man/systemd-update-utmp-shutdown.service.html: man/systemd-update-utmp-runlevel.service.html
71+man/systemd-update-utmp-runlevel.service.html: man/systemd-update-utmp.service.html
72 $(html-alias)
73
74-man/systemd-update-utmp.html: man/systemd-update-utmp-runlevel.service.html
75+man/systemd-update-utmp.html: man/systemd-update-utmp.service.html
76 $(html-alias)
77
78 man/systemd-user.conf.html: man/systemd-system.conf.html
79diff --git a/Makefile.am b/Makefile.am
80index 8d8139c..4c5e6fc 100644
81--- a/Makefile.am
82+++ b/Makefile.am
83@@ -417,8 +417,8 @@ nodist_systemunit_DATA = \
84 units/systemd-initctl.service \
85 units/systemd-shutdownd.service \
86 units/systemd-remount-fs.service \
87+ units/systemd-update-utmp.service \
88 units/systemd-update-utmp-runlevel.service \
89- units/systemd-update-utmp-shutdown.service \
90 units/systemd-tmpfiles-setup-dev.service \
91 units/systemd-tmpfiles-setup.service \
92 units/systemd-tmpfiles-clean.service \
93@@ -463,8 +463,8 @@ EXTRA_DIST += \
94 units/systemd-initctl.service.in \
95 units/systemd-shutdownd.service.in \
96 units/systemd-remount-fs.service.in \
97+ units/systemd-update-utmp.service.in \
98 units/systemd-update-utmp-runlevel.service.in \
99- units/systemd-update-utmp-shutdown.service.in \
100 units/systemd-tmpfiles-setup-dev.service.in \
101 units/systemd-tmpfiles-setup.service.in \
102 units/systemd-tmpfiles-clean.service.in \
103@@ -4070,8 +4070,8 @@ RUNLEVEL4_TARGET_WANTS += \
104 RUNLEVEL5_TARGET_WANTS += \
105 systemd-update-utmp-runlevel.service
106 endif
107-SHUTDOWN_TARGET_WANTS += \
108- systemd-update-utmp-shutdown.service
109+SYSINIT_TARGET_WANTS += \
110+ systemd-update-utmp.service
111 LOCAL_FS_TARGET_WANTS += \
112 systemd-remount-fs.service \
113 systemd-fsck-root.service \
114diff --git a/man/systemd-update-utmp-runlevel.service.xml b/man/systemd-update-utmp-runlevel.service.xml
115deleted file mode 100644
116index 867b958..0000000
117--- a/man/systemd-update-utmp-runlevel.service.xml
118+++ /dev/null
119@@ -1,76 +0,0 @@
120-<?xml version="1.0"?>
121-<!--*-nxml-*-->
122-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
123-<!--
124- This file is part of systemd.
125-
126- Copyright 2012 Lennart Poettering
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- systemd is distributed in the hope that it will be useful, but
134- WITHOUT ANY WARRANTY; without even the implied warranty of
135- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
136- Lesser General Public License for more details.
137-
138- You should have received a copy of the GNU Lesser General Public License
139- along with systemd; If not, see <http://www.gnu.org/licenses/>.
140--->
141-<refentry id="systemd-update-utmp-runlevel.service">
142-
143- <refentryinfo>
144- <title>systemd-update-utmp-runlevel.service</title>
145- <productname>systemd</productname>
146-
147- <authorgroup>
148- <author>
149- <contrib>Developer</contrib>
150- <firstname>Lennart</firstname>
151- <surname>Poettering</surname>
152- <email>lennart@poettering.net</email>
153- </author>
154- </authorgroup>
155- </refentryinfo>
156-
157- <refmeta>
158- <refentrytitle>systemd-update-utmp-runlevel.service</refentrytitle>
159- <manvolnum>8</manvolnum>
160- </refmeta>
161-
162- <refnamediv>
163- <refname>systemd-update-utmp-runlevel.service</refname>
164- <refname>systemd-update-utmp-shutdown.service</refname>
165- <refname>systemd-update-utmp</refname>
166- <refpurpose>Write audit and utmp updates at runlevel
167- changes and shutdown</refpurpose>
168- </refnamediv>
169-
170- <refsynopsisdiv>
171- <para><filename>systemd-update-utmp-runlevel.service</filename></para>
172- <para><filename>systemd-update-utmp-shutdown.service</filename></para>
173- <para><filename>/usr/lib/systemd/systemd-update-utmp</filename></para>
174- </refsynopsisdiv>
175-
176- <refsect1>
177- <title>Description</title>
178-
179- <para><filename>systemd-update-utmp-runlevel.service</filename>
180- is a service that writes SysV runlevel changes to utmp
181- and wtmp, as well as the audit logs, as they
182- occur. <filename>systemd-update-utmp-shutdown.service</filename>
183- does the same for shut-down requests.</para>
184- </refsect1>
185-
186- <refsect1>
187- <title>See Also</title>
188- <para>
189- <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
190- <citerefentry><refentrytitle>utmp</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
191- <citerefentry><refentrytitle>auditd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
192- </para>
193- </refsect1>
194-
195-</refentry>
196diff --git a/man/systemd-update-utmp.service.xml b/man/systemd-update-utmp.service.xml
197new file mode 100644
198index 0000000..846fc95
199--- /dev/null
200+++ b/man/systemd-update-utmp.service.xml
201@@ -0,0 +1,76 @@
202+<?xml version="1.0"?>
203+<!--*-nxml-*-->
204+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
205+<!--
206+ This file is part of systemd.
207+
208+ Copyright 2012 Lennart Poettering
209+
210+ systemd is free software; you can redistribute it and/or modify it
211+ under the terms of the GNU Lesser General Public License as published by
212+ the Free Software Foundation; either version 2.1 of the License, or
213+ (at your option) any later version.
214+
215+ systemd is distributed in the hope that it will be useful, but
216+ WITHOUT ANY WARRANTY; without even the implied warranty of
217+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
218+ Lesser General Public License for more details.
219+
220+ You should have received a copy of the GNU Lesser General Public License
221+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
222+-->
223+<refentry id="systemd-update-utmp.service">
224+
225+ <refentryinfo>
226+ <title>systemd-update-utmp.service</title>
227+ <productname>systemd</productname>
228+
229+ <authorgroup>
230+ <author>
231+ <contrib>Developer</contrib>
232+ <firstname>Lennart</firstname>
233+ <surname>Poettering</surname>
234+ <email>lennart@poettering.net</email>
235+ </author>
236+ </authorgroup>
237+ </refentryinfo>
238+
239+ <refmeta>
240+ <refentrytitle>systemd-update-utmp.service</refentrytitle>
241+ <manvolnum>8</manvolnum>
242+ </refmeta>
243+
244+ <refnamediv>
245+ <refname>systemd-update-utmp.service</refname>
246+ <refname>systemd-update-utmp-runlevel.service</refname>
247+ <refname>systemd-update-utmp</refname>
248+ <refpurpose>Write audit and utmp updates at bootup, runlevel
249+ changes and shutdown</refpurpose>
250+ </refnamediv>
251+
252+ <refsynopsisdiv>
253+ <para><filename>systemd-update-utmp.service</filename></para>
254+ <para><filename>systemd-update-utmp-runlevel.service</filename></para>
255+ <para><filename>/usr/lib/systemd/systemd-update-utmp</filename></para>
256+ </refsynopsisdiv>
257+
258+ <refsect1>
259+ <title>Description</title>
260+
261+ <para><filename>systemd-update-utmp-runlevel.service</filename>
262+ is a service that writes SysV runlevel changes to utmp
263+ and wtmp, as well as the audit logs, as they
264+ occur. <filename>systemd-update-utmp.service</filename>
265+ does the same for system reboots and shut-down requests.</para>
266+ </refsect1>
267+
268+ <refsect1>
269+ <title>See Also</title>
270+ <para>
271+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
272+ <citerefentry><refentrytitle>utmp</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
273+ <citerefentry><refentrytitle>auditd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
274+ </para>
275+ </refsect1>
276+
277+</refentry>
278diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
279index 9184025..202aa98 100644
280--- a/src/update-utmp/update-utmp.c
281+++ b/src/update-utmp/update-utmp.c
282@@ -104,7 +104,7 @@ static int get_current_runlevel(Context *c) {
283 { '3', SPECIAL_RUNLEVEL3_TARGET },
284 { '4', SPECIAL_RUNLEVEL4_TARGET },
285 { '2', SPECIAL_RUNLEVEL2_TARGET },
286- { 'S', SPECIAL_RESCUE_TARGET },
287+ { '1', SPECIAL_RESCUE_TARGET },
288 };
289 const char
290 *interface = "org.freedesktop.systemd1.Unit",
291diff --git a/units/systemd-update-utmp-runlevel.service.in b/units/systemd-update-utmp-runlevel.service.in
292index 27fae2c..99783e2 100644
293--- a/units/systemd-update-utmp-runlevel.service.in
294+++ b/units/systemd-update-utmp-runlevel.service.in
295@@ -7,12 +7,14 @@
296
297 [Unit]
298 Description=Update UTMP about System Runlevel Changes
299-Documentation=man:systemd-update-utmp-runlevel.service(8) man:utmp(5)
300+Documentation=man:systemd-update-utmp.service(8) man:utmp(5)
301 DefaultDependencies=no
302 RequiresMountsFor=/var/log/wtmp
303-After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
304+Conflicts=shutdown.target
305+Requisite=systemd-update-utmp.service
306+After=systemd-update-utmp.service
307 After=runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target
308-Before=final.target
309+Before=shutdown.target
310
311 [Service]
312 Type=oneshot
313diff --git a/units/systemd-update-utmp-shutdown.service.in b/units/systemd-update-utmp-shutdown.service.in
314deleted file mode 100644
315index aa93562..0000000
316--- a/units/systemd-update-utmp-shutdown.service.in
317+++ /dev/null
318@@ -1,19 +0,0 @@
319-# This file is part of systemd.
320-#
321-# systemd is free software; you can redistribute it and/or modify it
322-# under the terms of the GNU Lesser General Public License as published by
323-# the Free Software Foundation; either version 2.1 of the License, or
324-# (at your option) any later version.
325-
326-[Unit]
327-Description=Update UTMP about System Shutdown
328-Documentation=man:systemd-update-utmp-runlevel.service(8) man:utmp(5)
329-DefaultDependencies=no
330-RequiresMountsFor=/var/log/wtmp
331-After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
332-After=systemd-update-utmp-runlevel.service
333-Before=final.target
334-
335-[Service]
336-Type=oneshot
337-ExecStart=@rootlibexecdir@/systemd-update-utmp shutdown
338diff --git a/units/systemd-update-utmp.service.in b/units/systemd-update-utmp.service.in
339new file mode 100644
340index 0000000..e7c20a5
341--- /dev/null
342+++ b/units/systemd-update-utmp.service.in
343@@ -0,0 +1,21 @@
344+# This file is part of systemd.
345+#
346+# systemd is free software; you can redistribute it and/or modify it
347+# under the terms of the GNU Lesser General Public License as published by
348+# the Free Software Foundation; either version 2.1 of the License, or
349+# (at your option) any later version.
350+
351+[Unit]
352+Description=Update UTMP about System Reboot/Shutdown
353+Documentation=man:systemd-update-utmp.service(8) man:utmp(5)
354+DefaultDependencies=no
355+RequiresMountsFor=/var/log/wtmp
356+Conflicts=shutdown.target
357+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
358+Before=sysinit.target shutdown.target
359+
360+[Service]
361+Type=oneshot
362+RemainAfterExit=yes
363+ExecStart=@rootlibexecdir@/systemd-update-utmp reboot
364+ExecStop=@rootlibexecdir@/systemd-update-utmp shutdown
365--
3661.8.2.3
367
diff --git a/meta/recipes-core/systemd/systemd/0002-readahead-chunk-on-spinning-media.patch b/meta/recipes-core/systemd/systemd/0002-readahead-chunk-on-spinning-media.patch
deleted file mode 100644
index d57a01c916..0000000000
--- a/meta/recipes-core/systemd/systemd/0002-readahead-chunk-on-spinning-media.patch
+++ /dev/null
@@ -1,142 +0,0 @@
1Upstream-Status: Backport
2
3-Khem 2013/03/28
4
5From 94243ef299425d6c7089a7a05c48c9bb8f6cf3da Mon Sep 17 00:00:00 2001
6From: Auke Kok <auke-jan.h.kok@intel.com>
7Date: Fri, 22 Mar 2013 15:09:45 -0700
8Subject: [PATCH 02/17] readahead: chunk on spinning media
9
10Readahead has all sorts of bad side effects depending on your
11storage media. On rotating disks, it may be degrading startup
12performance if enough requests are queued spanning linearly
13over all blocks early at boot, and mount, blkid and friends
14want to insert reads to the start of these block devices after.
15
16The end result is that on spinning disks with ext3/4 that udev
17and mounts take a very long time, and nothing really happens until
18readahead is completely finished.
19
20This has the net effect that the CPU is almost entirely idle
21for the entire period that readahead is working. We could have
22finished starting up quite a lot of services in this time if
23we were smarter at how we do readahead.
24
25This patch sorts all requests into 2 second "chunks" and sub-sorts
26each chunk by block. This adds a single cross-drive seek per "chunk"
27but has the benefit that we will have a lot of the blocks we need
28early on in the boot sequence loaded into memory faster.
29
30For a comparison of how before/after bootcharts look (ext4 on a
31mobile 5400rpm 250GB drive) please look at:
32
33 http://foo-projects.org/~sofar/blocked-tests/
34
35There are bootcharts in the "before" and "after" folders where you
36should be able to see that many low-level services finish 5-7
37seconds earlier with the patch applied (after).
38---
39 Makefile.am | 2 +-
40 src/readahead/readahead-collect.c | 28 +++++++++++++++++++++++++---
41 2 files changed, 26 insertions(+), 4 deletions(-)
42
43diff --git a/Makefile.am b/Makefile.am
44index 37c1cc2..5861976 100644
45--- a/Makefile.am
46+++ b/Makefile.am
47@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \
48 systemd_readahead_LDADD = \
49 libsystemd-shared.la \
50 libsystemd-daemon.la \
51- libudev.la
52+ libudev.la -lm
53
54 dist_doc_DATA += \
55 src/readahead/sd-readahead.c \
56diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
57index 5d07f47..5d22949 100644
58--- a/src/readahead/readahead-collect.c
59+++ b/src/readahead/readahead-collect.c
60@@ -42,6 +42,7 @@
61 #include <sys/vfs.h>
62 #include <getopt.h>
63 #include <sys/inotify.h>
64+#include <math.h>
65
66 #ifdef HAVE_FANOTIFY_INIT
67 #include <sys/fanotify.h>
68@@ -67,6 +68,7 @@
69 */
70
71 static ReadaheadShared *shared = NULL;
72+static struct timespec starttime;
73
74 /* Avoid collisions with the NULL pointer */
75 #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1)
76@@ -205,6 +207,7 @@ static unsigned long fd_first_block(int fd) {
77 struct item {
78 const char *path;
79 unsigned long block;
80+ unsigned long bin;
81 };
82
83 static int qsort_compare(const void *a, const void *b) {
84@@ -213,6 +216,13 @@ static int qsort_compare(const void *a, const void *b) {
85 i = a;
86 j = b;
87
88+ /* sort by bin first */
89+ if (i->bin < j->bin)
90+ return -1;
91+ if (i->bin > j->bin)
92+ return 1;
93+
94+ /* then sort by sector */
95 if (i->block < j->block)
96 return -1;
97 if (i->block > j->block)
98@@ -250,6 +260,8 @@ static int collect(const char *root) {
99 goto finish;
100 }
101
102+ clock_gettime(CLOCK_MONOTONIC, &starttime);
103+
104 /* If there's no pack file yet we lower the kernel readahead
105 * so that mincore() is accurate. If there is a pack file
106 * already we assume it is accurate enough so that kernel
107@@ -447,10 +459,21 @@ static int collect(const char *root) {
108 free(p);
109 else {
110 unsigned long ul;
111+ struct timespec ts;
112+ struct item *entry;
113+
114+ entry = new0(struct item, 1);
115
116 ul = fd_first_block(m->fd);
117
118- if ((k = hashmap_put(files, p, SECTOR_TO_PTR(ul))) < 0) {
119+ clock_gettime(CLOCK_MONOTONIC, &ts);
120+
121+ entry->block = ul;
122+ entry->path = strdup(p);
123+ entry->bin = round((ts.tv_sec - starttime.tv_sec +
124+ ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0);
125+
126+ if ((k = hashmap_put(files, p, entry)) < 0) {
127 log_warning("set_put() failed: %s", strerror(-k));
128 free(p);
129 }
130@@ -518,8 +541,7 @@ done:
131
132 j = ordered;
133 HASHMAP_FOREACH_KEY(q, p, files, i) {
134- j->path = p;
135- j->block = PTR_TO_SECTOR(q);
136+ memcpy(j, q, sizeof(struct item));
137 j++;
138 }
139
140--
1411.7.9.5
142
diff --git a/meta/recipes-core/systemd/systemd/0003-readahead-cleanups.patch b/meta/recipes-core/systemd/systemd/0003-readahead-cleanups.patch
deleted file mode 100644
index e0b68df607..0000000000
--- a/meta/recipes-core/systemd/systemd/0003-readahead-cleanups.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1Upstream-Status: Backport
2
3-Khem 2013/03/28
4
5From b0640287f784a320661f7206c9ade07b99003fd5 Mon Sep 17 00:00:00 2001
6From: Auke Kok <auke-jan.h.kok@intel.com>
7Date: Tue, 26 Mar 2013 11:13:47 -0700
8Subject: [PATCH 03/17] readahead: cleanups
9
10- check for OOM
11- no need to use floats and round()
12---
13 Makefile.am | 2 +-
14 src/readahead/readahead-collect.c | 20 ++++++++++++++------
15 2 files changed, 15 insertions(+), 7 deletions(-)
16
17diff --git a/Makefile.am b/Makefile.am
18index 5861976..37c1cc2 100644
19--- a/Makefile.am
20+++ b/Makefile.am
21@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \
22 systemd_readahead_LDADD = \
23 libsystemd-shared.la \
24 libsystemd-daemon.la \
25- libudev.la -lm
26+ libudev.la
27
28 dist_doc_DATA += \
29 src/readahead/sd-readahead.c \
30diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
31index 5d22949..e2fd8df 100644
32--- a/src/readahead/readahead-collect.c
33+++ b/src/readahead/readahead-collect.c
34@@ -68,7 +68,7 @@
35 */
36
37 static ReadaheadShared *shared = NULL;
38-static struct timespec starttime;
39+static usec_t starttime;
40
41 /* Avoid collisions with the NULL pointer */
42 #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1)
43@@ -260,7 +260,7 @@ static int collect(const char *root) {
44 goto finish;
45 }
46
47- clock_gettime(CLOCK_MONOTONIC, &starttime);
48+ starttime = now(CLOCK_MONOTONIC);
49
50 /* If there's no pack file yet we lower the kernel readahead
51 * so that mincore() is accurate. If there is a pack file
52@@ -459,19 +459,27 @@ static int collect(const char *root) {
53 free(p);
54 else {
55 unsigned long ul;
56- struct timespec ts;
57+ usec_t entrytime;
58 struct item *entry;
59
60 entry = new0(struct item, 1);
61+ if (!entry) {
62+ r = log_oom();
63+ goto finish;
64+ }
65
66 ul = fd_first_block(m->fd);
67
68- clock_gettime(CLOCK_MONOTONIC, &ts);
69+ entrytime = now(CLOCK_MONOTONIC);
70
71 entry->block = ul;
72 entry->path = strdup(p);
73- entry->bin = round((ts.tv_sec - starttime.tv_sec +
74- ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0);
75+ if (!entry->path) {
76+ free(entry);
77+ r = log_oom();
78+ goto finish;
79+ }
80+ entry->bin = (entrytime - starttime) / 2000000;
81
82 if ((k = hashmap_put(files, p, entry)) < 0) {
83 log_warning("set_put() failed: %s", strerror(-k));
84--
851.7.9.5
86
diff --git a/meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch b/meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch
deleted file mode 100644
index f2c8e0290f..0000000000
--- a/meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1Upstream-Status: Backport
2
3-Khem 2013/03/28
4
5From 6f6fad96addf6b00b55c98cc0d0d8026b0c1e7ca Mon Sep 17 00:00:00 2001
6From: Eelco Dolstra <eelco.dolstra@logicblox.com>
7Date: Wed, 27 Mar 2013 13:41:59 +0100
8Subject: [PATCH 13/17] systemd-sysctl: Handle missing /etc/sysctl.conf
9 properly
10
11Since fabe5c0e5fce730aa66e10a9c4f9fdd443d7aeda, systemd-sysctl returns
12a non-zero exit code if /etc/sysctl.conf does not exist, due to a
13broken ENOENT check.
14---
15 src/sysctl/sysctl.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
19index 2d43660..79f3f77 100644
20--- a/src/sysctl/sysctl.c
21+++ b/src/sysctl/sysctl.c
22@@ -125,7 +125,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
23
24 r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f);
25 if (r < 0) {
26- if (ignore_enoent && errno == -ENOENT)
27+ if (ignore_enoent && r == -ENOENT)
28 return 0;
29
30 log_error("Failed to open file '%s', ignoring: %s", path, strerror(-r));
31--
321.7.9.5
33
diff --git a/meta/recipes-core/systemd/systemd/199-firmware.patch b/meta/recipes-core/systemd/systemd/199-firmware.patch
deleted file mode 100644
index aaab59b03b..0000000000
--- a/meta/recipes-core/systemd/systemd/199-firmware.patch
+++ /dev/null
@@ -1,98 +0,0 @@
1Upstream-Status: Backport
2http://cgit.freedesktop.org/systemd/systemd/patch/?id=d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ff
3
4From d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ff Mon Sep 17 00:00:00 2001
5From: Kay Sievers <kay@vrfy.org>
6Date: Thu, 28 Mar 2013 14:28:10 +0000
7Subject: build-sys: fix HAVE/ENABLE_FIRMWARE
8
9https://bugs.freedesktop.org/show_bug.cgi?id=62864
10---
11diff --git a/configure.ac b/configure.ac
12index 5b88bcf..e73cd5c 100644
13--- a/configure.ac
14+++ b/configure.ac
15@@ -728,6 +728,7 @@ for i in $with_firmware_path; do
16 done
17 IFS=$OLD_IFS
18 AC_SUBST(FIRMWARE_PATH)
19+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
20 AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
21
22 # ------------------------------------------------------------------------------
23@@ -736,7 +737,6 @@ AC_ARG_ENABLE([gudev],
24 [], [enable_gudev=yes])
25 AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ])
26 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
27-
28 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
29
30 # ------------------------------------------------------------------------------
31diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
32index 13922d3..c7d4319 100644
33--- a/src/udev/udev-builtin.c
34+++ b/src/udev/udev-builtin.c
35@@ -34,7 +34,7 @@ static const struct udev_builtin *builtins[] = {
36 [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
37 #endif
38 [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
39-#ifdef ENABLE_FIRMWARE
40+#ifdef HAVE_FIRMWARE
41 [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
42 #endif
43 [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
44diff --git a/src/udev/udev.h b/src/udev/udev.h
45index aa2edbe..906dfba 100644
46--- a/src/udev/udev.h
47+++ b/src/udev/udev.h
48@@ -140,7 +140,7 @@ enum udev_builtin_cmd {
49 UDEV_BUILTIN_BLKID,
50 #endif
51 UDEV_BUILTIN_BTRFS,
52-#ifdef ENABLE_FIRMWARE
53+#ifdef HAVE_FIRMWARE
54 UDEV_BUILTIN_FIRMWARE,
55 #endif
56 UDEV_BUILTIN_HWDB,
57@@ -169,7 +169,7 @@ struct udev_builtin {
58 extern const struct udev_builtin udev_builtin_blkid;
59 #endif
60 extern const struct udev_builtin udev_builtin_btrfs;
61-#ifdef ENABLE_FIRMWARE
62+#ifdef HAVE_FIRMWARE
63 extern const struct udev_builtin udev_builtin_firmware;
64 #endif
65 extern const struct udev_builtin udev_builtin_hwdb;
66diff --git a/src/udev/udevd.c b/src/udev/udevd.c
67index b30bedf..2ad7388 100644
68--- a/src/udev/udevd.c
69+++ b/src/udev/udevd.c
70@@ -98,7 +98,7 @@ struct event {
71 dev_t devnum;
72 int ifindex;
73 bool is_block;
74-#ifdef ENABLE_FIRMWARE
75+#ifdef HAVE_FIRMWARE
76 bool nodelay;
77 #endif
78 };
79@@ -444,7 +444,7 @@ static int event_queue_insert(struct udev_device *dev)
80 event->devnum = udev_device_get_devnum(dev);
81 event->is_block = streq("block", udev_device_get_subsystem(dev));
82 event->ifindex = udev_device_get_ifindex(dev);
83-#ifdef ENABLE_FIRMWARE
84+#ifdef HAVE_FIRMWARE
85 if (streq(udev_device_get_subsystem(dev), "firmware"))
86 event->nodelay = true;
87 #endif
88@@ -527,7 +527,7 @@ static bool is_devpath_busy(struct event *event)
89 return true;
90 }
91
92-#ifdef ENABLE_FIRMWARE
93+#ifdef HAVE_FIRMWARE
94 /* allow to bypass the dependency tracking */
95 if (event->nodelay)
96 continue;
97--
98cgit v0.9.0.2-2-gbebe
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_204.bb
index b1cc0465ef..ec5be1f804 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_204.bb
@@ -9,9 +9,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
9PROVIDES = "udev" 9PROVIDES = "udev"
10 10
11PE = "1" 11PE = "1"
12PR = "r4"
13 12
14DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 qemu-native" 13DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 qemu-native util-linux"
15DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" 14DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
16 15
17SECTION = "base/shell" 16SECTION = "base/shell"
@@ -23,16 +22,12 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
23 file://modprobe.rules \ 22 file://modprobe.rules \
24 file://var-run.conf \ 23 file://var-run.conf \
25 ${UCLIBCPATCHES} \ 24 ${UCLIBCPATCHES} \
25 file://0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch \
26 file://00-create-volatile.conf \ 26 file://00-create-volatile.conf \
27 file://0002-readahead-chunk-on-spinning-media.patch \
28 file://0003-readahead-cleanups.patch \
29 file://0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch \
30 file://0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch \
31 file://199-firmware.patch \
32 file://init \ 27 file://init \
33 " 28 "
34SRC_URI[md5sum] = "4bb13f84ce211e93f0141774a90a2322" 29SRC_URI[md5sum] = "a07619bb19f48164fbf0761d12fd39a8"
35SRC_URI[sha256sum] = "8c4462a04f3ecf7f083782e5e0687913b1d33c6444bf20fa2f31df9222965fed" 30SRC_URI[sha256sum] = "072c393503c7c1e55ca7acf3db659cbd28c7fe5fa94fab3db95360bafd96731b"
36 31
37UCLIBCPATCHES = "" 32UCLIBCPATCHES = ""
38UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \ 33UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \