[OE-core] [PATCH v6] systemd: update to 204

Jonathan Liu net147 at gmail.com
Fri May 24 01:01:23 UTC 2013


Removed patches integrated upstream.
Added backport of fix for utmp not running at shutdown.
Updated serial-getty service.
Added missing util-linux dependency.
Updated uClibc patches.

Signed-off-by: Jonathan Liu <net147 at gmail.com>
---
 .../systemd-serialgetty/serial-getty at .service      |  16 +-
 ...se-AC_CHECK_TOOL-for-objcopy-strings-and-.patch |  41 ---
 ...ystemd-update-utmp-shutdown.service-into-.patch | 367 +++++++++++++++++++++
 .../0002-readahead-chunk-on-spinning-media.patch   | 142 --------
 .../systemd/systemd/0003-readahead-cleanups.patch  |  86 -----
 ...ctl-Handle-missing-etc-sysctl.conf-proper.patch |  33 --
 .../systemd/systemd/199-firmware.patch             |  98 ------
 .../systemd/systemd/systemd-pam-fix-mkostemp.patch | 110 +++---
 .../systemd/systemd/systemd-pam-fix-msformat.patch |  86 ++---
 .../systemd/{systemd_199.bb => systemd_204.bb}     |  13 +-
 10 files changed, 480 insertions(+), 512 deletions(-)
 delete mode 100644 meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch
 create mode 100644 meta/recipes-core/systemd/systemd/0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0002-readahead-chunk-on-spinning-media.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0003-readahead-cleanups.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/199-firmware.patch
 rename meta/recipes-core/systemd/{systemd_199.bb => systemd_204.bb} (95%)

diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty at .service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty at .service
index 8eeaab6..1c14dfe 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty at .service
+++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty at .service
@@ -1,23 +1,27 @@
 #  This file is part of systemd.
 #
 #  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
 #  (at your option) any later version.
 
 [Unit]
 Description=Serial Getty on %I
-BindTo=dev-%i.device
-After=dev-%i.device systemd-user-sessions.service
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+BindsTo=dev-%i.device
+After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
+After=rc-local.service
 
 # If additional gettys are spawned during boot then we should make
 # sure that this is synchronized before getty.target, even though
 # getty.target didn't actually pull it in.
 Before=getty.target
+IgnoreOnIsolate=yes
 
 [Service]
-Environment=TERM=vt100
-ExecStart=-/sbin/agetty -s %I @BAUDRATE@
+ExecStart=-/sbin/agetty -s %I @BAUDRATE@ vt102
+Type=idle
 Restart=always
 RestartSec=0
 UtmpIdentifier=%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 d847bbc..0000000
--- a/meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From d6f92bcbbae9a577adb9588c7b2783a5d0bf343d Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa at gmail.com>
-Date: Tue, 16 Apr 2013 14:20:41 +0200
-Subject: [PATCH] configure: use AC_CHECK_TOOL for objcopy, strings and gperf
-
-* using AC_PATH_TOOL does not allow to override it from shell environment
-  which is useful when cross-compiling
-* with external toolchain I have different HOST_PREFIX and HOST_SYS
-  AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
-  which is available only as ${TARGET_PREFIX}objcopy then it tries
-  objcopy without prefix which is found on host, but that objcopy
-  does not work for !host (e.g. arm when building on x86) libs
-
-Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
-Upstream-Status: Submitted
-http://lists.freedesktop.org/archives/systemd-devel/2013-April/010468.html
-
----
- configure.ac | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 33b0ca9..519f1a9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -86,9 +86,9 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
-    AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
-    enable_introspection=no])
- 
--AC_PATH_TOOL(OBJCOPY, objcopy)
--AC_PATH_TOOL(STRINGS, strings)
--AC_PATH_TOOL(GPERF, gperf)
-+AC_CHECK_TOOL(OBJCOPY, objcopy)
-+AC_CHECK_TOOL(STRINGS, strings)
-+AC_CHECK_TOOL(GPERF, gperf)
- if test -z "$GPERF" ; then
-         AC_MSG_ERROR([*** gperf not found])
- fi
--- 
-1.8.1.5
-
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 0000000..86fab97
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch
@@ -0,0 +1,367 @@
+Upstream-Status: Backport
+Signed-off-by: Jonathan Liu <net147 at gmail.com>
+
+From 3f92e4b4b61042391bd44de4dceb18177df0dd57 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Thu, 16 May 2013 00:19:03 +0200
+Subject: [PATCH] utmp: turn systemd-update-utmp-shutdown.service into a normal
+ runtime service
+
+With this change systemd-update-utmp-shutdown.service is replaced by
+systemd-update-utmp.service which is started at boot and stays around
+until shutdown. This allows us to properly order the unit against both
+/var/log and auditd.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=853104
+https://bugs.freedesktop.org/show_bug.cgi?id=64365
+---
+ Makefile-man.am                               | 12 ++---
+ Makefile.am                                   |  8 +--
+ man/systemd-update-utmp-runlevel.service.xml  | 76 ---------------------------
+ man/systemd-update-utmp.service.xml           | 76 +++++++++++++++++++++++++++
+ src/update-utmp/update-utmp.c                 |  2 +-
+ units/.gitignore                              |  2 +-
+ units/systemd-update-utmp-runlevel.service.in |  8 +--
+ units/systemd-update-utmp-shutdown.service.in | 19 -------
+ units/systemd-update-utmp.service.in          | 21 ++++++++
+ 9 files changed, 114 insertions(+), 110 deletions(-)
+ delete mode 100644 man/systemd-update-utmp-runlevel.service.xml
+ create mode 100644 man/systemd-update-utmp.service.xml
+ delete mode 100644 units/systemd-update-utmp-shutdown.service.in
+ create mode 100644 units/systemd-update-utmp.service.in
+
+diff --git a/Makefile-man.am b/Makefile-man.am
+index 7d62094..5888158 100644
+--- a/Makefile-man.am
++++ b/Makefile-man.am
+@@ -72,7 +72,7 @@ MANPAGES += \
+ 	man/systemd-tmpfiles.8 \
+ 	man/systemd-tty-ask-password-agent.1 \
+ 	man/systemd-udevd.service.8 \
+-	man/systemd-update-utmp-runlevel.service.8 \
++	man/systemd-update-utmp.service.8 \
+ 	man/systemd.1 \
+ 	man/systemd.automount.5 \
+ 	man/systemd.device.5 \
+@@ -191,7 +191,7 @@ MANPAGES_ALIAS += \
+ 	man/systemd-udevd-control.socket.8 \
+ 	man/systemd-udevd-kernel.socket.8 \
+ 	man/systemd-udevd.8 \
+-	man/systemd-update-utmp-shutdown.service.8 \
++	man/systemd-update-utmp-runlevel.service.8 \
+ 	man/systemd-update-utmp.8 \
+ 	man/systemd-user.conf.5
+ man/SD_ALERT.3: man/sd-daemon.3
+@@ -289,8 +289,8 @@ man/systemd-tmpfiles-setup.service.8: man/systemd-tmpfiles.8
+ man/systemd-udevd-control.socket.8: man/systemd-udevd.service.8
+ man/systemd-udevd-kernel.socket.8: man/systemd-udevd.service.8
+ man/systemd-udevd.8: man/systemd-udevd.service.8
+-man/systemd-update-utmp-shutdown.service.8: man/systemd-update-utmp-runlevel.service.8
+-man/systemd-update-utmp.8: man/systemd-update-utmp-runlevel.service.8
++man/systemd-update-utmp-runlevel.service.8: man/systemd-update-utmp.service.8
++man/systemd-update-utmp.8: man/systemd-update-utmp.service.8
+ man/systemd-user.conf.5: man/systemd-system.conf.5
+ man/SD_ALERT.html: man/sd-daemon.html
+ 	$(html-alias)
+@@ -577,10 +577,10 @@ man/systemd-udevd-kernel.socket.html: man/systemd-udevd.service.html
+ man/systemd-udevd.html: man/systemd-udevd.service.html
+ 	$(html-alias)
+ 
+-man/systemd-update-utmp-shutdown.service.html: man/systemd-update-utmp-runlevel.service.html
++man/systemd-update-utmp-runlevel.service.html: man/systemd-update-utmp.service.html
+ 	$(html-alias)
+ 
+-man/systemd-update-utmp.html: man/systemd-update-utmp-runlevel.service.html
++man/systemd-update-utmp.html: man/systemd-update-utmp.service.html
+ 	$(html-alias)
+ 
+ man/systemd-user.conf.html: man/systemd-system.conf.html
+diff --git a/Makefile.am b/Makefile.am
+index 8d8139c..4c5e6fc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -417,8 +417,8 @@ nodist_systemunit_DATA = \
+ 	units/systemd-initctl.service \
+ 	units/systemd-shutdownd.service \
+ 	units/systemd-remount-fs.service \
++	units/systemd-update-utmp.service \
+ 	units/systemd-update-utmp-runlevel.service \
+-	units/systemd-update-utmp-shutdown.service \
+ 	units/systemd-tmpfiles-setup-dev.service \
+ 	units/systemd-tmpfiles-setup.service \
+ 	units/systemd-tmpfiles-clean.service \
+@@ -463,8 +463,8 @@ EXTRA_DIST += \
+ 	units/systemd-initctl.service.in \
+ 	units/systemd-shutdownd.service.in \
+ 	units/systemd-remount-fs.service.in \
++	units/systemd-update-utmp.service.in \
+ 	units/systemd-update-utmp-runlevel.service.in \
+-	units/systemd-update-utmp-shutdown.service.in \
+ 	units/systemd-tmpfiles-setup-dev.service.in \
+ 	units/systemd-tmpfiles-setup.service.in \
+ 	units/systemd-tmpfiles-clean.service.in \
+@@ -4070,8 +4070,8 @@ RUNLEVEL4_TARGET_WANTS += \
+ RUNLEVEL5_TARGET_WANTS += \
+ 	systemd-update-utmp-runlevel.service
+ endif
+-SHUTDOWN_TARGET_WANTS += \
+-	systemd-update-utmp-shutdown.service
++SYSINIT_TARGET_WANTS += \
++	systemd-update-utmp.service
+ LOCAL_FS_TARGET_WANTS += \
+ 	systemd-remount-fs.service \
+ 	systemd-fsck-root.service \
+diff --git a/man/systemd-update-utmp-runlevel.service.xml b/man/systemd-update-utmp-runlevel.service.xml
+deleted file mode 100644
+index 867b958..0000000
+--- a/man/systemd-update-utmp-runlevel.service.xml
++++ /dev/null
+@@ -1,76 +0,0 @@
+-<?xml version="1.0"?>
+-<!--*-nxml-*-->
+-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+-<!--
+-  This file is part of systemd.
+-
+-  Copyright 2012 Lennart Poettering
+-
+-  systemd is free software; you can redistribute it and/or modify it
+-  under the terms of the GNU Lesser General Public License as published by
+-  the Free Software Foundation; either version 2.1 of the License, or
+-  (at your option) any later version.
+-
+-  systemd is distributed in the hope that it will be useful, but
+-  WITHOUT ANY WARRANTY; without even the implied warranty of
+-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-  Lesser General Public License for more details.
+-
+-  You should have received a copy of the GNU Lesser General Public License
+-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+--->
+-<refentry id="systemd-update-utmp-runlevel.service">
+-
+-        <refentryinfo>
+-                <title>systemd-update-utmp-runlevel.service</title>
+-                <productname>systemd</productname>
+-
+-                <authorgroup>
+-                        <author>
+-                                <contrib>Developer</contrib>
+-                                <firstname>Lennart</firstname>
+-                                <surname>Poettering</surname>
+-                                <email>lennart at poettering.net</email>
+-                        </author>
+-                </authorgroup>
+-        </refentryinfo>
+-
+-        <refmeta>
+-                <refentrytitle>systemd-update-utmp-runlevel.service</refentrytitle>
+-                <manvolnum>8</manvolnum>
+-        </refmeta>
+-
+-        <refnamediv>
+-                <refname>systemd-update-utmp-runlevel.service</refname>
+-                <refname>systemd-update-utmp-shutdown.service</refname>
+-                <refname>systemd-update-utmp</refname>
+-                <refpurpose>Write audit and utmp updates at runlevel
+-                changes and shutdown</refpurpose>
+-        </refnamediv>
+-
+-        <refsynopsisdiv>
+-                <para><filename>systemd-update-utmp-runlevel.service</filename></para>
+-                <para><filename>systemd-update-utmp-shutdown.service</filename></para>
+-                <para><filename>/usr/lib/systemd/systemd-update-utmp</filename></para>
+-        </refsynopsisdiv>
+-
+-        <refsect1>
+-                <title>Description</title>
+-
+-                <para><filename>systemd-update-utmp-runlevel.service</filename>
+-                is a service that writes SysV runlevel changes to utmp
+-                and wtmp, as well as the audit logs, as they
+-                occur. <filename>systemd-update-utmp-shutdown.service</filename>
+-                does the same for shut-down requests.</para>
+-        </refsect1>
+-
+-        <refsect1>
+-                <title>See Also</title>
+-                <para>
+-                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+-                        <citerefentry><refentrytitle>utmp</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+-                        <citerefentry><refentrytitle>auditd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+-                </para>
+-        </refsect1>
+-
+-</refentry>
+diff --git a/man/systemd-update-utmp.service.xml b/man/systemd-update-utmp.service.xml
+new file mode 100644
+index 0000000..846fc95
+--- /dev/null
++++ b/man/systemd-update-utmp.service.xml
+@@ -0,0 +1,76 @@
++<?xml version="1.0"?>
++<!--*-nxml-*-->
++<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
++<!--
++  This file is part of systemd.
++
++  Copyright 2012 Lennart Poettering
++
++  systemd is free software; you can redistribute it and/or modify it
++  under the terms of the GNU Lesser General Public License as published by
++  the Free Software Foundation; either version 2.1 of the License, or
++  (at your option) any later version.
++
++  systemd is distributed in the hope that it will be useful, but
++  WITHOUT ANY WARRANTY; without even the implied warranty of
++  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++  Lesser General Public License for more details.
++
++  You should have received a copy of the GNU Lesser General Public License
++  along with systemd; If not, see <http://www.gnu.org/licenses/>.
++-->
++<refentry id="systemd-update-utmp.service">
++
++        <refentryinfo>
++                <title>systemd-update-utmp.service</title>
++                <productname>systemd</productname>
++
++                <authorgroup>
++                        <author>
++                                <contrib>Developer</contrib>
++                                <firstname>Lennart</firstname>
++                                <surname>Poettering</surname>
++                                <email>lennart at poettering.net</email>
++                        </author>
++                </authorgroup>
++        </refentryinfo>
++
++        <refmeta>
++                <refentrytitle>systemd-update-utmp.service</refentrytitle>
++                <manvolnum>8</manvolnum>
++        </refmeta>
++
++        <refnamediv>
++                <refname>systemd-update-utmp.service</refname>
++                <refname>systemd-update-utmp-runlevel.service</refname>
++                <refname>systemd-update-utmp</refname>
++                <refpurpose>Write audit and utmp updates at bootup, runlevel
++                changes and shutdown</refpurpose>
++        </refnamediv>
++
++        <refsynopsisdiv>
++                <para><filename>systemd-update-utmp.service</filename></para>
++                <para><filename>systemd-update-utmp-runlevel.service</filename></para>
++                <para><filename>/usr/lib/systemd/systemd-update-utmp</filename></para>
++        </refsynopsisdiv>
++
++        <refsect1>
++                <title>Description</title>
++
++                <para><filename>systemd-update-utmp-runlevel.service</filename>
++                is a service that writes SysV runlevel changes to utmp
++                and wtmp, as well as the audit logs, as they
++                occur. <filename>systemd-update-utmp.service</filename>
++                does the same for system reboots and shut-down requests.</para>
++        </refsect1>
++
++        <refsect1>
++                <title>See Also</title>
++                <para>
++                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
++                        <citerefentry><refentrytitle>utmp</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
++                        <citerefentry><refentrytitle>auditd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
++                </para>
++        </refsect1>
++
++</refentry>
+diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
+index 9184025..202aa98 100644
+--- a/src/update-utmp/update-utmp.c
++++ b/src/update-utmp/update-utmp.c
+@@ -104,7 +104,7 @@ static int get_current_runlevel(Context *c) {
+                 { '3', SPECIAL_RUNLEVEL3_TARGET },
+                 { '4', SPECIAL_RUNLEVEL4_TARGET },
+                 { '2', SPECIAL_RUNLEVEL2_TARGET },
+-                { 'S', SPECIAL_RESCUE_TARGET },
++                { '1', SPECIAL_RESCUE_TARGET },
+         };
+         const char
+                 *interface = "org.freedesktop.systemd1.Unit",
+diff --git a/units/systemd-update-utmp-runlevel.service.in b/units/systemd-update-utmp-runlevel.service.in
+index 27fae2c..99783e2 100644
+--- a/units/systemd-update-utmp-runlevel.service.in
++++ b/units/systemd-update-utmp-runlevel.service.in
+@@ -7,12 +7,14 @@
+ 
+ [Unit]
+ Description=Update UTMP about System Runlevel Changes
+-Documentation=man:systemd-update-utmp-runlevel.service(8) man:utmp(5)
++Documentation=man:systemd-update-utmp.service(8) man:utmp(5)
+ DefaultDependencies=no
+ RequiresMountsFor=/var/log/wtmp
+-After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
++Conflicts=shutdown.target
++Requisite=systemd-update-utmp.service
++After=systemd-update-utmp.service
+ After=runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target
+-Before=final.target
++Before=shutdown.target
+ 
+ [Service]
+ Type=oneshot
+diff --git a/units/systemd-update-utmp-shutdown.service.in b/units/systemd-update-utmp-shutdown.service.in
+deleted file mode 100644
+index aa93562..0000000
+--- a/units/systemd-update-utmp-shutdown.service.in
++++ /dev/null
+@@ -1,19 +0,0 @@
+-#  This file is part of systemd.
+-#
+-#  systemd is free software; you can redistribute it and/or modify it
+-#  under the terms of the GNU Lesser General Public License as published by
+-#  the Free Software Foundation; either version 2.1 of the License, or
+-#  (at your option) any later version.
+-
+-[Unit]
+-Description=Update UTMP about System Shutdown
+-Documentation=man:systemd-update-utmp-runlevel.service(8) man:utmp(5)
+-DefaultDependencies=no
+-RequiresMountsFor=/var/log/wtmp
+-After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
+-After=systemd-update-utmp-runlevel.service
+-Before=final.target
+-
+-[Service]
+-Type=oneshot
+-ExecStart=@rootlibexecdir@/systemd-update-utmp shutdown
+diff --git a/units/systemd-update-utmp.service.in b/units/systemd-update-utmp.service.in
+new file mode 100644
+index 0000000..e7c20a5
+--- /dev/null
++++ b/units/systemd-update-utmp.service.in
+@@ -0,0 +1,21 @@
++#  This file is part of systemd.
++#
++#  systemd is free software; you can redistribute it and/or modify it
++#  under the terms of the GNU Lesser General Public License as published by
++#  the Free Software Foundation; either version 2.1 of the License, or
++#  (at your option) any later version.
++
++[Unit]
++Description=Update UTMP about System Reboot/Shutdown
++Documentation=man:systemd-update-utmp.service(8) man:utmp(5)
++DefaultDependencies=no
++RequiresMountsFor=/var/log/wtmp
++Conflicts=shutdown.target
++After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
++Before=sysinit.target shutdown.target
++
++[Service]
++Type=oneshot
++RemainAfterExit=yes
++ExecStart=@rootlibexecdir@/systemd-update-utmp reboot
++ExecStop=@rootlibexecdir@/systemd-update-utmp shutdown
+-- 
+1.8.2.3
+
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 d57a01c..0000000
--- a/meta/recipes-core/systemd/systemd/0002-readahead-chunk-on-spinning-media.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-Upstream-Status: Backport
-
--Khem 2013/03/28
-
-From 94243ef299425d6c7089a7a05c48c9bb8f6cf3da Mon Sep 17 00:00:00 2001
-From: Auke Kok <auke-jan.h.kok at intel.com>
-Date: Fri, 22 Mar 2013 15:09:45 -0700
-Subject: [PATCH 02/17] readahead: chunk on spinning media
-
-Readahead has all sorts of bad side effects depending on your
-storage media. On rotating disks, it may be degrading startup
-performance if enough requests are queued spanning linearly
-over all blocks early at boot, and mount, blkid and friends
-want to insert reads to the start of these block devices after.
-
-The end result is that on spinning disks with ext3/4 that udev
-and mounts take a very long time, and nothing really happens until
-readahead is completely finished.
-
-This has the net effect that the CPU is almost entirely idle
-for the entire period that readahead is working. We could have
-finished starting up quite a lot of services in this time if
-we were smarter at how we do readahead.
-
-This patch sorts all requests into 2 second "chunks" and sub-sorts
-each chunk by block. This adds a single cross-drive seek per "chunk"
-but has the benefit that we will have a lot of the blocks we need
-early on in the boot sequence loaded into memory faster.
-
-For a comparison of how before/after bootcharts look (ext4 on a
-mobile 5400rpm 250GB drive) please look at:
-
-    http://foo-projects.org/~sofar/blocked-tests/
-
-There are bootcharts in the "before" and "after" folders where you
-should be able to see that many low-level services finish 5-7
-seconds earlier with the patch applied (after).
----
- Makefile.am                       |    2 +-
- src/readahead/readahead-collect.c |   28 +++++++++++++++++++++++++---
- 2 files changed, 26 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 37c1cc2..5861976 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \
- systemd_readahead_LDADD = \
- 	libsystemd-shared.la \
- 	libsystemd-daemon.la \
--	libudev.la
-+	libudev.la -lm
- 
- dist_doc_DATA += \
- 	src/readahead/sd-readahead.c \
-diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
-index 5d07f47..5d22949 100644
---- a/src/readahead/readahead-collect.c
-+++ b/src/readahead/readahead-collect.c
-@@ -42,6 +42,7 @@
- #include <sys/vfs.h>
- #include <getopt.h>
- #include <sys/inotify.h>
-+#include <math.h>
- 
- #ifdef HAVE_FANOTIFY_INIT
- #include <sys/fanotify.h>
-@@ -67,6 +68,7 @@
-  */
- 
- static ReadaheadShared *shared = NULL;
-+static struct timespec starttime;
- 
- /* Avoid collisions with the NULL pointer */
- #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1)
-@@ -205,6 +207,7 @@ static unsigned long fd_first_block(int fd) {
- struct item {
-         const char *path;
-         unsigned long block;
-+        unsigned long bin;
- };
- 
- static int qsort_compare(const void *a, const void *b) {
-@@ -213,6 +216,13 @@ static int qsort_compare(const void *a, const void *b) {
-         i = a;
-         j = b;
- 
-+        /* sort by bin first */
-+        if (i->bin < j->bin)
-+                return -1;
-+        if (i->bin > j->bin)
-+                return 1;
-+
-+        /* then sort by sector */
-         if (i->block < j->block)
-                 return -1;
-         if (i->block > j->block)
-@@ -250,6 +260,8 @@ static int collect(const char *root) {
-                 goto finish;
-         }
- 
-+        clock_gettime(CLOCK_MONOTONIC, &starttime);
-+
-         /* If there's no pack file yet we lower the kernel readahead
-          * so that mincore() is accurate. If there is a pack file
-          * already we assume it is accurate enough so that kernel
-@@ -447,10 +459,21 @@ static int collect(const char *root) {
-                                         free(p);
-                                 else {
-                                         unsigned long ul;
-+                                        struct timespec ts;
-+                                        struct item *entry;
-+
-+                                        entry = new0(struct item, 1);
- 
-                                         ul = fd_first_block(m->fd);
- 
--                                        if ((k = hashmap_put(files, p, SECTOR_TO_PTR(ul))) < 0) {
-+                                        clock_gettime(CLOCK_MONOTONIC, &ts);
-+
-+                                        entry->block = ul;
-+                                        entry->path = strdup(p);
-+                                        entry->bin = round((ts.tv_sec - starttime.tv_sec +
-+                                                     ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0);
-+
-+                                        if ((k = hashmap_put(files, p, entry)) < 0) {
-                                                 log_warning("set_put() failed: %s", strerror(-k));
-                                                 free(p);
-                                         }
-@@ -518,8 +541,7 @@ done:
- 
-                 j = ordered;
-                 HASHMAP_FOREACH_KEY(q, p, files, i) {
--                        j->path = p;
--                        j->block = PTR_TO_SECTOR(q);
-+                        memcpy(j, q, sizeof(struct item));
-                         j++;
-                 }
- 
--- 
-1.7.9.5
-
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 e0b68df..0000000
--- a/meta/recipes-core/systemd/systemd/0003-readahead-cleanups.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-Upstream-Status: Backport
-
--Khem 2013/03/28
-
-From b0640287f784a320661f7206c9ade07b99003fd5 Mon Sep 17 00:00:00 2001
-From: Auke Kok <auke-jan.h.kok at intel.com>
-Date: Tue, 26 Mar 2013 11:13:47 -0700
-Subject: [PATCH 03/17] readahead: cleanups
-
-- check for OOM
-- no need to use floats and round()
----
- Makefile.am                       |    2 +-
- src/readahead/readahead-collect.c |   20 ++++++++++++++------
- 2 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 5861976..37c1cc2 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \
- systemd_readahead_LDADD = \
- 	libsystemd-shared.la \
- 	libsystemd-daemon.la \
--	libudev.la -lm
-+	libudev.la
- 
- dist_doc_DATA += \
- 	src/readahead/sd-readahead.c \
-diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
-index 5d22949..e2fd8df 100644
---- a/src/readahead/readahead-collect.c
-+++ b/src/readahead/readahead-collect.c
-@@ -68,7 +68,7 @@
-  */
- 
- static ReadaheadShared *shared = NULL;
--static struct timespec starttime;
-+static usec_t starttime;
- 
- /* Avoid collisions with the NULL pointer */
- #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1)
-@@ -260,7 +260,7 @@ static int collect(const char *root) {
-                 goto finish;
-         }
- 
--        clock_gettime(CLOCK_MONOTONIC, &starttime);
-+        starttime = now(CLOCK_MONOTONIC);
- 
-         /* If there's no pack file yet we lower the kernel readahead
-          * so that mincore() is accurate. If there is a pack file
-@@ -459,19 +459,27 @@ static int collect(const char *root) {
-                                         free(p);
-                                 else {
-                                         unsigned long ul;
--                                        struct timespec ts;
-+                                        usec_t entrytime;
-                                         struct item *entry;
- 
-                                         entry = new0(struct item, 1);
-+                                        if (!entry) {
-+                                                r = log_oom();
-+                                                goto finish;
-+                                        }
- 
-                                         ul = fd_first_block(m->fd);
- 
--                                        clock_gettime(CLOCK_MONOTONIC, &ts);
-+                                        entrytime = now(CLOCK_MONOTONIC);
- 
-                                         entry->block = ul;
-                                         entry->path = strdup(p);
--                                        entry->bin = round((ts.tv_sec - starttime.tv_sec +
--                                                     ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0);
-+                                        if (!entry->path) {
-+                                                free(entry);
-+                                                r = log_oom();
-+                                                goto finish;
-+                                        }
-+                                        entry->bin = (entrytime - starttime) / 2000000;
- 
-                                         if ((k = hashmap_put(files, p, entry)) < 0) {
-                                                 log_warning("set_put() failed: %s", strerror(-k));
--- 
-1.7.9.5
-
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 f2c8e02..0000000
--- a/meta/recipes-core/systemd/systemd/0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Backport
-
--Khem 2013/03/28
-
-From 6f6fad96addf6b00b55c98cc0d0d8026b0c1e7ca Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra <eelco.dolstra at logicblox.com>
-Date: Wed, 27 Mar 2013 13:41:59 +0100
-Subject: [PATCH 13/17] systemd-sysctl: Handle missing /etc/sysctl.conf
- properly
-
-Since fabe5c0e5fce730aa66e10a9c4f9fdd443d7aeda, systemd-sysctl returns
-a non-zero exit code if /etc/sysctl.conf does not exist, due to a
-broken ENOENT check.
----
- src/sysctl/sysctl.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
-index 2d43660..79f3f77 100644
---- a/src/sysctl/sysctl.c
-+++ b/src/sysctl/sysctl.c
-@@ -125,7 +125,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
- 
-         r = search_and_fopen_nulstr(path, "re", conf_file_dirs, &f);
-         if (r < 0) {
--                if (ignore_enoent && errno == -ENOENT)
-+                if (ignore_enoent && r == -ENOENT)
-                         return 0;
- 
-                 log_error("Failed to open file '%s', ignoring: %s", path, strerror(-r));
--- 
-1.7.9.5
-
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 aaab59b..0000000
--- a/meta/recipes-core/systemd/systemd/199-firmware.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Upstream-Status: Backport
-http://cgit.freedesktop.org/systemd/systemd/patch/?id=d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ff
-
-From d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ff Mon Sep 17 00:00:00 2001
-From: Kay Sievers <kay at vrfy.org>
-Date: Thu, 28 Mar 2013 14:28:10 +0000
-Subject: build-sys: fix HAVE/ENABLE_FIRMWARE
-
-https://bugs.freedesktop.org/show_bug.cgi?id=62864
----
-diff --git a/configure.ac b/configure.ac
-index 5b88bcf..e73cd5c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -728,6 +728,7 @@ for i in $with_firmware_path; do
- done
- IFS=$OLD_IFS
- AC_SUBST(FIRMWARE_PATH)
-+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
- AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
- 
- # ------------------------------------------------------------------------------
-@@ -736,7 +737,6 @@ AC_ARG_ENABLE([gudev],
-        [], [enable_gudev=yes])
- 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]) ])
- AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
--
- AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
- 
- # ------------------------------------------------------------------------------
-diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
-index 13922d3..c7d4319 100644
---- a/src/udev/udev-builtin.c
-+++ b/src/udev/udev-builtin.c
-@@ -34,7 +34,7 @@ static const struct udev_builtin *builtins[] = {
-         [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
- #endif
-         [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
--#ifdef ENABLE_FIRMWARE
-+#ifdef HAVE_FIRMWARE
-         [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
- #endif
-         [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
-diff --git a/src/udev/udev.h b/src/udev/udev.h
-index aa2edbe..906dfba 100644
---- a/src/udev/udev.h
-+++ b/src/udev/udev.h
-@@ -140,7 +140,7 @@ enum udev_builtin_cmd {
-         UDEV_BUILTIN_BLKID,
- #endif
-         UDEV_BUILTIN_BTRFS,
--#ifdef ENABLE_FIRMWARE
-+#ifdef HAVE_FIRMWARE
-         UDEV_BUILTIN_FIRMWARE,
- #endif
-         UDEV_BUILTIN_HWDB,
-@@ -169,7 +169,7 @@ struct udev_builtin {
- extern const struct udev_builtin udev_builtin_blkid;
- #endif
- extern const struct udev_builtin udev_builtin_btrfs;
--#ifdef ENABLE_FIRMWARE
-+#ifdef HAVE_FIRMWARE
- extern const struct udev_builtin udev_builtin_firmware;
- #endif
- extern const struct udev_builtin udev_builtin_hwdb;
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index b30bedf..2ad7388 100644
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -98,7 +98,7 @@ struct event {
-         dev_t devnum;
-         int ifindex;
-         bool is_block;
--#ifdef ENABLE_FIRMWARE
-+#ifdef HAVE_FIRMWARE
-         bool nodelay;
- #endif
- };
-@@ -444,7 +444,7 @@ static int event_queue_insert(struct udev_device *dev)
-         event->devnum = udev_device_get_devnum(dev);
-         event->is_block = streq("block", udev_device_get_subsystem(dev));
-         event->ifindex = udev_device_get_ifindex(dev);
--#ifdef ENABLE_FIRMWARE
-+#ifdef HAVE_FIRMWARE
-         if (streq(udev_device_get_subsystem(dev), "firmware"))
-                 event->nodelay = true;
- #endif
-@@ -527,7 +527,7 @@ static bool is_devpath_busy(struct event *event)
-                         return true;
-                 }
- 
--#ifdef ENABLE_FIRMWARE
-+#ifdef HAVE_FIRMWARE
-                 /* allow to bypass the dependency tracking */
-                 if (event->nodelay)
-                         continue;
---
-cgit v0.9.0.2-2-gbebe
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
index fb8443d..0ea2da3 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
@@ -1,72 +1,74 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <raj.khem at gmail.com>
 
-Index: git/src/journal/journal-send.c
+Index: systemd-204/src/journal/journal-send.c
 ===================================================================
---- git.orig/src/journal/journal-send.c	2012-09-02 00:10:08.748768268 -0700
-+++ git/src/journal/journal-send.c	2012-09-02 00:10:10.508768335 -0700
-@@ -34,6 +34,8 @@
- 
- #define SNDBUF_SIZE (8*1024*1024)
+--- systemd-204.orig/src/journal/journal-send.c	2013-05-06 12:06:04.000000000 -0700
++++ systemd-204/src/journal/journal-send.c	2013-05-23 11:21:14.500338688 -0700
+@@ -46,6 +46,8 @@
+                 memcpy(*_f + 10, _func, _fl);     \
+         } while(false)
  
 +#include "config.h"
 +
  /* We open a single fd, and we'll share it with the current process,
   * all its threads, and all its subprocesses. This means we need to
   * initialize it atomically, and need to operate on it atomically
-@@ -293,7 +295,12 @@
+@@ -312,8 +314,13 @@
+         /* Message doesn't fit... Let's dump the data in a temporary
           * file and just pass a file descriptor of it to the other
           * side */
- 
+-
 +#ifdef HAVE_MKOSTEMP
          buffer_fd = mkostemp(path, O_CLOEXEC|O_RDWR);
 +#else
-+	buffer_fd = mkstemp(path);
-+	if (buffer_fd >= 0) fcntl(buffer_fd, F_SETFD, FD_CLOEXEC);
-+#endif	/* HAVE_MKOSTEMP */
-         if (buffer_fd < 0) {
-                 r = -errno;
-                 goto finish;
-Index: git/src/core/manager.c
++        buffer_fd = mkstemp(path);
++        if (buffer_fd >= 0) fcntl(buffer_fd, F_SETFD, FD_CLOEXEC);
++#endif /* HAVE_MKOSTEMP */
++
+         if (buffer_fd < 0)
+                 return -errno;
+ 
+Index: systemd-204/src/core/manager.c
 ===================================================================
---- git.orig/src/core/manager.c	2012-09-02 00:10:08.732768266 -0700
-+++ git/src/core/manager.c	2012-09-02 00:10:10.512768334 -0700
-@@ -67,6 +67,8 @@
- #include "cgroup-util.h"
- #include "path-util.h"
+--- systemd-204.orig/src/core/manager.c	2013-04-25 17:53:56.000000000 -0700
++++ systemd-204/src/core/manager.c	2013-05-23 11:23:15.864340878 -0700
+@@ -72,6 +72,8 @@
+ #include "audit-fd.h"
+ #include "env-util.h"
  
 +#include "config.h"
 +
  /* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
  #define GC_QUEUE_ENTRIES_MAX 16
  
-@@ -1701,7 +1703,12 @@
+@@ -1973,7 +1975,12 @@
                  return -ENOMEM;
  
-         saved_umask = umask(0077);
+         RUN_WITH_UMASK(0077) {
 +#ifdef HAVE_MKOSTEMP
-         fd = mkostemp(path, O_RDWR|O_CLOEXEC);
+                 fd = mkostemp(path, O_RDWR|O_CLOEXEC);
 +#else
-+	fd = mkstemp(path);
-+	if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
-+#endif	/* HAVE_MKOSTEMP */
-         umask(saved_umask);
++                fd = mkstemp(path);
++                if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
++#endif /* HAVE_MKOSTEMP */
+         }
  
          if (fd < 0) {
-Index: git/src/shared/util.c
+Index: systemd-204/src/shared/util.c
 ===================================================================
---- git.orig/src/shared/util.c	2012-09-02 00:10:08.784768269 -0700
-+++ git/src/shared/util.c	2012-09-02 00:10:10.512768334 -0700
-@@ -68,6 +68,8 @@
- #include "exit-status.h"
- #include "hashmap.h"
+--- systemd-204.orig/src/shared/util.c	2013-05-07 12:07:22.000000000 -0700
++++ systemd-204/src/shared/util.c	2013-05-23 11:19:35.028336822 -0700
+@@ -74,6 +74,8 @@
+ #include "env-util.h"
+ #include "fileio.h"
  
 +#include "config.h"
 +
  int saved_argc = 0;
  char **saved_argv = NULL;
  
-@@ -4519,7 +4521,12 @@
+@@ -3921,7 +3923,12 @@
          t[k] = '.';
          stpcpy(stpcpy(t+k+1, fn), "XXXXXX");
  
@@ -79,10 +81,10 @@ Index: git/src/shared/util.c
          if (fd < 0) {
                  free(t);
                  return -errno;
-Index: git/src/shared/ask-password-api.c
+Index: systemd-204/src/shared/ask-password-api.c
 ===================================================================
---- git.orig/src/shared/ask-password-api.c	2012-09-02 00:10:08.772768268 -0700
-+++ git/src/shared/ask-password-api.c	2012-09-02 00:10:10.512768334 -0700
+--- systemd-204.orig/src/shared/ask-password-api.c	2013-04-08 08:26:34.000000000 -0700
++++ systemd-204/src/shared/ask-password-api.c	2013-05-23 11:24:43.456342451 -0700
 @@ -37,6 +37,8 @@
  
  #include "ask-password-api.h"
@@ -92,24 +94,24 @@ Index: git/src/shared/ask-password-api.c
  static void backspace_chars(int ttyfd, size_t p) {
  
          if (ttyfd < 0)
-@@ -326,7 +328,12 @@
+@@ -325,7 +327,12 @@
          mkdir_p_label("/run/systemd/ask-password", 0755);
  
-         u = umask(0022);
+         RUN_WITH_UMASK(0022) {
 +#ifdef HAVE_MKOSTEMP
-         fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY);
+                 fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY);
 +#else
-+	fd = mkstemp(temp);
-+	if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
-+#endif	/* HAVE_MKOSTEMP */
-         umask(u);
++                fd = mkstemp(temp);
++                if (fd >= 0) fcntl(fd, F_SETFD, FD_CLOEXEC);
++#endif /* HAVE_MKOSTEMP */
+         }
  
          if (fd < 0) {
-Index: git/src/journal/journalctl.c
+Index: systemd-204/src/journal/journalctl.c
 ===================================================================
---- git.orig/src/journal/journalctl.c	2012-09-02 00:10:08.752768267 -0700
-+++ git/src/journal/journalctl.c	2012-09-02 00:18:41.928787779 -0700
-@@ -540,7 +540,13 @@
+--- systemd-204.orig/src/journal/journalctl.c	2013-05-07 12:07:22.000000000 -0700
++++ systemd-204/src/journal/journalctl.c	2013-05-23 11:19:35.028336822 -0700
+@@ -755,7 +755,13 @@
          n /= arg_interval;
  
          close_nointr_nofail(fd);
@@ -123,11 +125,11 @@ Index: git/src/journal/journalctl.c
          if (fd < 0) {
                  log_error("Failed to open %s: %m", k);
                  r = -errno;
-Index: git/src/journal/journal-verify.c
+Index: systemd-204/src/journal/journal-verify.c
 ===================================================================
---- git.orig/src/journal/journal-verify.c	2012-09-02 00:10:08.752768267 -0700
-+++ git/src/journal/journal-verify.c	2012-09-02 00:24:10.268800268 -0700
-@@ -693,8 +693,12 @@
+--- systemd-204.orig/src/journal/journal-verify.c	2012-11-20 13:42:23.000000000 -0800
++++ systemd-204/src/journal/journal-verify.c	2013-05-23 11:19:35.032336822 -0700
+@@ -700,8 +700,12 @@
  #endif
          } else if (f->seal)
                  return -ENOKEY;
@@ -141,7 +143,7 @@ Index: git/src/journal/journal-verify.c
          if (data_fd < 0) {
                  log_error("Failed to create data file: %m");
                  r = -errno;
-@@ -702,7 +706,12 @@
+@@ -709,7 +713,12 @@
          }
          unlink(data_path);
  
@@ -154,7 +156,7 @@ Index: git/src/journal/journal-verify.c
          if (entry_fd < 0) {
                  log_error("Failed to create entry file: %m");
                  r = -errno;
-@@ -710,7 +719,12 @@
+@@ -717,7 +726,12 @@
          }
          unlink(entry_path);
  
diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
index 8d1aa7d..77bb305 100644
--- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
+++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
@@ -1,10 +1,10 @@
 Upstream-Status: Denied [no desire for uclibc support]
 Signed-off-by: Khem Raj <raj.khem at gmail.com>
 
-Index: systemd-198/src/fsck/fsck.c
+Index: systemd-204/src/fsck/fsck.c
 ===================================================================
---- systemd-198.orig/src/fsck/fsck.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/fsck/fsck.c	2013-03-09 14:49:03.756572873 -0800
+--- systemd-204.orig/src/fsck/fsck.c	2013-04-02 05:48:49.000000000 -0700
++++ systemd-204/src/fsck/fsck.c	2013-05-23 11:26:51.776345015 -0700
 @@ -37,6 +37,8 @@
  #include "virt.h"
  #include "fileio.h"
@@ -14,7 +14,7 @@ Index: systemd-198/src/fsck/fsck.c
  static bool arg_skip = false;
  static bool arg_force = false;
  static bool arg_show_progress = false;
-@@ -203,9 +205,16 @@
+@@ -198,9 +200,16 @@
                  char *device;
                  double p;
                  usec_t t;
@@ -33,10 +33,10 @@ Index: systemd-198/src/fsck/fsck.c
  
                  /* Only show one progress counter at max */
                  if (!locked) {
-Index: systemd-198/src/core/swap.c
+Index: systemd-204/src/core/swap.c
 ===================================================================
---- systemd-198.orig/src/core/swap.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/core/swap.c	2013-03-09 14:49:03.756572873 -0800
+--- systemd-204.orig/src/core/swap.c	2013-05-06 12:06:04.000000000 -0700
++++ systemd-204/src/core/swap.c	2013-05-23 11:26:51.780345015 -0700
 @@ -41,6 +41,8 @@
  #include "path-util.h"
  #include "virt.h"
@@ -46,7 +46,7 @@ Index: systemd-198/src/core/swap.c
  static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
          [SWAP_DEAD] = UNIT_INACTIVE,
          [SWAP_ACTIVATING] = UNIT_ACTIVATING,
-@@ -1037,6 +1039,7 @@
+@@ -1055,6 +1057,7 @@
                  char *dev = NULL, *d;
                  int prio = 0, k;
  
@@ -54,7 +54,7 @@ Index: systemd-198/src/core/swap.c
                  k = fscanf(m->proc_swaps,
                             "%ms "  /* device/file */
                             "%*s "  /* type of swap */
-@@ -1044,6 +1047,16 @@
+@@ -1062,6 +1065,16 @@
                             "%*s "  /* used */
                             "%i\n", /* priority */
                             &dev, &prio);
@@ -71,10 +71,10 @@ Index: systemd-198/src/core/swap.c
                  if (k != 2) {
                          if (k == EOF)
                                  break;
-Index: systemd-198/src/core/mount-setup.c
+Index: systemd-204/src/core/mount-setup.c
 ===================================================================
---- systemd-198.orig/src/core/mount-setup.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/core/mount-setup.c	2013-03-09 14:49:03.760572872 -0800
+--- systemd-204.orig/src/core/mount-setup.c	2013-04-24 06:34:38.000000000 -0700
++++ systemd-204/src/core/mount-setup.c	2013-05-23 11:26:51.780345015 -0700
 @@ -28,6 +28,7 @@
  #include <assert.h>
  #include <unistd.h>
@@ -92,7 +92,7 @@ Index: systemd-198/src/core/mount-setup.c
  #ifndef TTY_GID
  #define TTY_GID 5
  #endif
-@@ -231,9 +234,12 @@
+@@ -233,9 +236,12 @@
          for (;;) {
                  char *controller;
                  int enabled = 0;
@@ -107,11 +107,11 @@ Index: systemd-198/src/core/mount-setup.c
                          if (feof(f))
                                  break;
  
-Index: systemd-198/src/core/mount.c
+Index: systemd-204/src/core/mount.c
 ===================================================================
---- systemd-198.orig/src/core/mount.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/core/mount.c	2013-03-09 14:49:03.760572872 -0800
-@@ -42,6 +42,8 @@
+--- systemd-204.orig/src/core/mount.c	2013-05-06 12:06:04.000000000 -0700
++++ systemd-204/src/core/mount.c	2013-05-23 11:26:51.780345015 -0700
+@@ -43,6 +43,8 @@
  #include "exit-status.h"
  #include "def.h"
  
@@ -120,7 +120,7 @@ Index: systemd-198/src/core/mount.c
  static const UnitActiveState state_translation_table[_MOUNT_STATE_MAX] = {
          [MOUNT_DEAD] = UNIT_INACTIVE,
          [MOUNT_MOUNTING] = UNIT_ACTIVATING,
-@@ -1584,7 +1586,7 @@
+@@ -1626,7 +1628,7 @@
                  int k;
  
                  device = path = options = options2 = fstype = d = p = o = NULL;
@@ -129,7 +129,7 @@ Index: systemd-198/src/core/mount.c
                  if ((k = fscanf(m->proc_self_mountinfo,
                                  "%*s "       /* (1) mount id */
                                  "%*s "       /* (2) parent id */
-@@ -1603,7 +1605,31 @@
+@@ -1645,7 +1647,31 @@
                                  &fstype,
                                  &device,
                                  &options2)) != 5) {
@@ -162,10 +162,10 @@ Index: systemd-198/src/core/mount.c
                          if (k == EOF)
                                  break;
  
-Index: systemd-198/src/core/umount.c
+Index: systemd-204/src/core/umount.c
 ===================================================================
---- systemd-198.orig/src/core/umount.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/core/umount.c	2013-03-09 14:49:03.760572872 -0800
+--- systemd-204.orig/src/core/umount.c	2013-04-18 08:14:11.000000000 -0700
++++ systemd-204/src/core/umount.c	2013-05-23 11:26:51.780345015 -0700
 @@ -36,6 +36,8 @@
  #include "util.h"
  #include "virt.h"
@@ -235,10 +235,10 @@ Index: systemd-198/src/core/umount.c
                          if (k == EOF)
                                  break;
  
-Index: systemd-198/src/shared/socket-util.c
+Index: systemd-204/src/shared/socket-util.c
 ===================================================================
---- systemd-198.orig/src/shared/socket-util.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/shared/socket-util.c	2013-03-09 14:49:03.760572872 -0800
+--- systemd-204.orig/src/shared/socket-util.c	2013-04-18 08:14:11.000000000 -0700
++++ systemd-204/src/shared/socket-util.c	2013-05-23 11:30:53.528348084 -0700
 @@ -40,6 +40,8 @@
  #include "missing.h"
  #include "fileio.h"
@@ -252,25 +252,25 @@ Index: systemd-198/src/shared/socket-util.c
          a->type = SOCK_RAW;
  
          errno = 0;
--        if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
 +#ifdef HAVE_MSFORMAT
-+	if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
+         if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
+-                return errno > 0 ? -errno : -EINVAL;
 +                return errno ? -errno : -EINVAL;
 +#else
-+	sfamily = malloc(257);
-+	if (sscanf(s, "%256s %u", sfamily, &group) < 1) {
-+		free(sfamily);
-                 return errno ? -errno : -EINVAL;
-+	}
++        sfamily = malloc(257);
++        if (sscanf(s, "%256s %u", sfamily, &group) < 1) {
++                 free(sfamily);
++                 return errno ? -errno : -EINVAL;
++        }
 +#endif /* HAVE_MSFORMAT */
  
          family = netlink_family_from_string(sfamily);
          if (family < 0)
-Index: systemd-198/src/tmpfiles/tmpfiles.c
+Index: systemd-204/src/tmpfiles/tmpfiles.c
 ===================================================================
---- systemd-198.orig/src/tmpfiles/tmpfiles.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/tmpfiles/tmpfiles.c	2013-03-09 14:55:40.772566599 -0800
-@@ -51,6 +51,8 @@
+--- systemd-204.orig/src/tmpfiles/tmpfiles.c	2013-04-24 06:34:38.000000000 -0700
++++ systemd-204/src/tmpfiles/tmpfiles.c	2013-05-23 11:26:51.784345016 -0700
+@@ -52,6 +52,8 @@
  #include "conf-files.h"
  #include "capability.h"
  
@@ -279,7 +279,7 @@ Index: systemd-198/src/tmpfiles/tmpfiles.c
  /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
   * them in the file system. This is intended to be used to create
   * properly owned directories beneath /tmp, /var/tmp, /run, which are
-@@ -993,6 +995,7 @@
+@@ -1029,6 +1031,7 @@
          if (!i)
                  return log_oom();
  
@@ -287,7 +287,7 @@ Index: systemd-198/src/tmpfiles/tmpfiles.c
          r = sscanf(buffer,
                     "%c %ms %ms %ms %ms %ms %n",
                     &type,
-@@ -1002,6 +1005,29 @@
+@@ -1038,6 +1041,29 @@
                     &group,
                     &age,
                     &n);
@@ -316,11 +316,11 @@ Index: systemd-198/src/tmpfiles/tmpfiles.c
 +
          if (r < 2) {
                  log_error("[%s:%u] Syntax error.", fname, line);
-                 r = -EIO;
-Index: systemd-198/src/cryptsetup/cryptsetup-generator.c
+                 return -EIO;
+Index: systemd-204/src/cryptsetup/cryptsetup-generator.c
 ===================================================================
---- systemd-198.orig/src/cryptsetup/cryptsetup-generator.c	2013-03-07 13:18:34.000000000 -0800
-+++ systemd-198/src/cryptsetup/cryptsetup-generator.c	2013-03-09 14:51:33.080571639 -0800
+--- systemd-204.orig/src/cryptsetup/cryptsetup-generator.c	2013-05-06 12:06:04.000000000 -0700
++++ systemd-204/src/cryptsetup/cryptsetup-generator.c	2013-05-23 11:26:51.784345016 -0700
 @@ -31,6 +31,8 @@
  #include "strv.h"
  #include "fileio.h"
@@ -330,7 +330,7 @@ Index: systemd-198/src/cryptsetup/cryptsetup-generator.c
  static const char *arg_dest = "/tmp";
  static bool arg_enabled = true;
  static bool arg_read_crypttab = true;
-@@ -395,7 +397,16 @@
+@@ -398,7 +400,16 @@
                          if (*l == '#' || *l == 0)
                                  continue;
  
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_204.bb
similarity index 95%
rename from meta/recipes-core/systemd/systemd_199.bb
rename to meta/recipes-core/systemd/systemd_204.bb
index b1cc046..ec5be1f 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 \
 PROVIDES = "udev"
 
 PE = "1"
-PR = "r4"
 
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 qemu-native"
+DEPENDS = "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"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
@@ -23,16 +22,12 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            file://modprobe.rules \
            file://var-run.conf \
            ${UCLIBCPATCHES} \
+           file://0001-utmp-turn-systemd-update-utmp-shutdown.service-into-.patch \
            file://00-create-volatile.conf \
-           file://0002-readahead-chunk-on-spinning-media.patch \
-           file://0003-readahead-cleanups.patch \
-           file://0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch \
-           file://0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch \
-           file://199-firmware.patch \
            file://init \
           "
-SRC_URI[md5sum] = "4bb13f84ce211e93f0141774a90a2322"
-SRC_URI[sha256sum] = "8c4462a04f3ecf7f083782e5e0687913b1d33c6444bf20fa2f31df9222965fed"
+SRC_URI[md5sum] = "a07619bb19f48164fbf0761d12fd39a8"
+SRC_URI[sha256sum] = "072c393503c7c1e55ca7acf3db659cbd28c7fe5fa94fab3db95360bafd96731b"
 
 UCLIBCPATCHES = ""
 UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \
-- 
1.8.2.3




More information about the Openembedded-core mailing list