<p dir="ltr"></p>
<p dir="ltr">-Khem<br>
On Mar 4, 2014 11:21 AM, &quot;Saul Wold&quot; &lt;<a href="mailto:sgw@linux.intel.com">sgw@linux.intel.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On 03/02/2014 08:00 PM, Khem Raj wrote:<br>
&gt;&gt;<br>
&gt;&gt; Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
&gt;&gt; ---<br>
&gt;&gt;   ...-Use-bin-mkdir-instead-of-host-mkdir-path.patch | 31 --------<br>
&gt;&gt;   ...ournal-Add-missing-byte-order-conversions.patch | 60 ----------------<br>
&gt;&gt;   .../journal-file-protect-against-alloca-0.patch    | 23 ------<br>
&gt;&gt;   ...n-appending-to-journal-file-allocate-larg.patch | 83 ----------------------<br>
&gt;&gt;   .../systemd/journald-add-missing-error-check.patch | 16 -----<br>
&gt;&gt;   .../systemd/journald-fix-minor-memory-leak.patch   | 16 -----<br>
&gt;&gt;   .../systemd/systemd-pam-fix-fallocate.patch        | 24 +++----<br>
&gt;&gt;   meta/recipes-core/systemd/<a href="http://systemd_208.bb">systemd_208.bb</a>           | 17 ++---<br>
&gt;&gt;   8 files changed, 19 insertions(+), 251 deletions(-)<br>
&gt;&gt;   delete mode 100644 meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch<br>
&gt;&gt;   delete mode 100644 meta/recipes-core/systemd/systemd/journal-Add-missing-byte-order-conversions.patch<br>
&gt;&gt;   delete mode 100644 meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch<br>
&gt;&gt;   delete mode 100644 meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch<br>
&gt;&gt;   delete mode 100644 meta/recipes-core/systemd/systemd/journald-add-missing-error-check.patch<br>
&gt;&gt;   delete mode 100644 meta/recipes-core/systemd/systemd/journald-fix-minor-memory-leak.patch<br>
&gt;&gt;<br>
&gt;<br>
&gt; This still has an issue with ptest enabled<br></p>
<p dir="ltr">yes came from a different branch let me port that fix into this patch and prepare  a v2<br></p>
<p dir="ltr">&gt; install /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/Makefile /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/README.testsuite /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/TEST-01-BASIC /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/TEST-02-CRYPTSETUP /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/TEST-03-JOBS /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/a.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/b.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/c.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/d.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/e.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/end.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/f.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/g.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/h.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/hello-after-sleep.target /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/hello.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/rule-syntax-check.py /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/rules-test.sh /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/sched_idle_bad.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/sched_idle_ok.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/sched_rr_bad.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/sched_rr_change.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/sched_rr_ok.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/sleep.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/sys.tar.xz /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/test-functions /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/testsuite.target /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/<a href="http://udev-test.pl">udev-test.pl</a> /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/git/test/unstoppable.service /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/image/usr/lib/systemd/ptest/test<br>

&gt; ERROR: Function failed: do_install_ptest_base (log file is located at /srv/hdd/builds/world/tmp/work/ppc7400-poky-linux/systemd/1_208+gitAUTOINC+255eb046a7-r0/temp/log.do_install_ptest_base.9647)<br>
&gt;<br>
&gt; Thanks<br>
&gt;         Sau!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch b/meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch<br>
&gt;&gt; deleted file mode 100644<br>
&gt;&gt; index 25988fc..0000000<br>
&gt;&gt; --- a/meta/recipes-core/systemd/systemd/0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch<br>
&gt;&gt; +++ /dev/null<br>
&gt;&gt; @@ -1,31 +0,0 @@<br>
&gt;&gt; -From 5599ab4ae3fe74cdd9699f2874badf241f0148fe Mon Sep 17 00:00:00 2001<br>
&gt;&gt; -From: Jonathan Liu &lt;<a href="mailto:net147@gmail.com">net147@gmail.com</a>&gt;<br>
&gt;&gt; -Date: Wed, 28 Aug 2013 19:09:49 -0700<br>
&gt;&gt; -Subject: [PATCH] Use /bin/mkdir instead of host mkdir path<br>
&gt;&gt; -<br>
&gt;&gt; -If the host system has /usr/bin/mkdir, autoconf would set MKDIR_P to<br>
&gt;&gt; -/usr/bin/mkdir when it should be /bin/mkdir. As a result, the<br>
&gt;&gt; -kmod-static-nodes service fails to start on the target because<br>
&gt;&gt; -/usr/bin/mkdir doesn&#39;t exist. This has been observed when building<br>
&gt;&gt; -systemd on Arch Linux host.<br>
&gt;&gt; -<br>
&gt;&gt; -Upstream-Status: Inappropriate [embedded specific]<br>
&gt;&gt; -Signed-off-by: Jonathan Liu &lt;<a href="mailto:net147@gmail.com">net147@gmail.com</a>&gt;<br>
&gt;&gt; ----<br>
&gt;&gt; - units/<a href="http://kmod-static-nodes.service.in">kmod-static-nodes.service.in</a> | 2 +-<br>
&gt;&gt; - 1 file changed, 1 insertion(+), 1 deletion(-)<br>
&gt;&gt; -<br>
&gt;&gt; -diff --git a/units/<a href="http://kmod-static-nodes.service.in">kmod-static-nodes.service.in</a> b/units/<a href="http://kmod-static-nodes.service.in">kmod-static-nodes.service.in</a><br>
&gt;&gt; -index d8a8420..1daed5f 100644<br>
&gt;&gt; ---- a/units/<a href="http://kmod-static-nodes.service.in">kmod-static-nodes.service.in</a><br>
&gt;&gt; -+++ b/units/<a href="http://kmod-static-nodes.service.in">kmod-static-nodes.service.in</a><br>
&gt;&gt; -@@ -14,5 +14,5 @@ ConditionCapability=CAP_MKNOD<br>
&gt;&gt; - [Service]<br>
&gt;&gt; - Type=oneshot<br>
&gt;&gt; - RemainAfterExit=yes<br>
&gt;&gt; --ExecStartPre=@MKDIR_P@ /run/tmpfiles.d<br>
&gt;&gt; -+ExecStartPre=/bin/mkdir -p /run/tmpfiles.d<br>
&gt;&gt; - ExecStart=@KMOD@ static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf<br>
&gt;&gt; ---<br>
&gt;&gt; -1.8.3.4<br>
&gt;&gt; -<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/systemd/journal-Add-missing-byte-order-conversions.patch b/meta/recipes-core/systemd/systemd/journal-Add-missing-byte-order-conversions.patch<br>
&gt;&gt; deleted file mode 100644<br>
&gt;&gt; index 21ea0f9..0000000<br>
&gt;&gt; --- a/meta/recipes-core/systemd/systemd/journal-Add-missing-byte-order-conversions.patch<br>
&gt;&gt; +++ /dev/null<br>
&gt;&gt; @@ -1,60 +0,0 @@<br>
&gt;&gt; -From 43539d6b60ef0db3e98d00bef0024614c8c1807a Mon Sep 17 00:00:00 2001<br>
&gt;&gt; -From: George McCollister &lt;<a href="mailto:george.mccollister@gmail.com">george.mccollister@gmail.com</a>&gt;<br>
&gt;&gt; -Date: Tue, 31 Dec 2013 14:37:32 -0600<br>
&gt;&gt; -Subject: [PATCH] journal: Add missing byte order conversions<br>
&gt;&gt; -<br>
&gt;&gt; -Convert entry_array.items[0] to host byte order prior to passing it to<br>
&gt;&gt; -chain_cache_put().<br>
&gt;&gt; -<br>
&gt;&gt; -[zj: also use le64toh in journal-verify.c]<br>
&gt;&gt; -<br>
&gt;&gt; -<a href="https://bugs.freedesktop.org/show_bug.cgi?id=73194">https://bugs.freedesktop.org/show_bug.cgi?id=73194</a><br>
&gt;&gt; -<br>
&gt;&gt; -Upstream-Status: Backport [Fedora]<br>
&gt;&gt; ----<br>
&gt;&gt; - src/journal/journal-file.c   | 4 ++--<br>
&gt;&gt; - src/journal/journal-verify.c | 6 +++---<br>
&gt;&gt; - 2 files changed, 5 insertions(+), 5 deletions(-)<br>
&gt;&gt; -<br>
&gt;&gt; -Index: systemd-208/src/journal/journal-file.c<br>
&gt;&gt; -===================================================================<br>
&gt;&gt; ---- systemd-208.orig/src/journal/journal-file.c        2014-02-07 22:51:44.000000000 -0800<br>
&gt;&gt; -+++ systemd-208/src/journal/journal-file.c     2014-02-07 22:58:40.665062951 -0800<br>
&gt;&gt; -@@ -1447,7 +1447,7 @@<br>
&gt;&gt; -<br>
&gt;&gt; - found:<br>
&gt;&gt; -         /* Let&#39;s cache this item for the next invocation */<br>
&gt;&gt; --        chain_cache_put(f-&gt;chain_cache, ci, first, a, o-&gt;entry_array.items[0], t);<br>
&gt;&gt; -+        chain_cache_put(f-&gt;chain_cache, ci, first, a, le64toh(o-&gt;entry_array.items[0]), t);<br>
&gt;&gt; -<br>
&gt;&gt; -         r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &amp;o);<br>
&gt;&gt; -         if (r &lt; 0)<br>
&gt;&gt; -@@ -1624,7 +1624,7 @@<br>
&gt;&gt; -                 return 0;<br>
&gt;&gt; -<br>
&gt;&gt; -         /* Let&#39;s cache this item for the next invocation */<br>
&gt;&gt; --        chain_cache_put(f-&gt;chain_cache, ci, first, a, array-&gt;entry_array.items[0], t);<br>
&gt;&gt; -+        chain_cache_put(f-&gt;chain_cache, ci, first, a, le64toh(array-&gt;entry_array.items[0]), t);<br>
&gt;&gt; -<br>
&gt;&gt; -         if (subtract_one &amp;&amp; i == 0)<br>
&gt;&gt; -                 p = last_p;<br>
&gt;&gt; -Index: systemd-208/src/journal/journal-verify.c<br>
&gt;&gt; -===================================================================<br>
&gt;&gt; ---- systemd-208.orig/src/journal/journal-verify.c      2013-08-13 13:02:46.000000000 -0700<br>
&gt;&gt; -+++ systemd-208/src/journal/journal-verify.c   2014-02-07 22:57:14.849308409 -0800<br>
&gt;&gt; -@@ -249,12 +249,12 @@<br>
&gt;&gt; -                 }<br>
&gt;&gt; -<br>
&gt;&gt; -                 for (i = 0; i &lt; journal_file_entry_array_n_items(o); i++)<br>
&gt;&gt; --                        if (o-&gt;entry_array.items[i] != 0 &amp;&amp;<br>
&gt;&gt; --                            !VALID64(o-&gt;entry_array.items[i])) {<br>
&gt;&gt; -+                        if (le64toh(o-&gt;entry_array.items[i]) != 0 &amp;&amp;<br>
&gt;&gt; -+                            !VALID64(le64toh(o-&gt;entry_array.items[i]))) {<br>
&gt;&gt; -                                 log_error(OFSfmt&quot;: invalid object entry array item (%&quot;PRIu64&quot;/%&quot;PRIu64&quot;): &quot;OFSfmt,<br>
&gt;&gt; -                                           offset,<br>
&gt;&gt; -                                           i, journal_file_entry_array_n_items(o),<br>
&gt;&gt; --                                          o-&gt;entry_array.items[i]);<br>
&gt;&gt; -+                                          le64toh(o-&gt;entry_array.items[i]));<br>
&gt;&gt; -                                 return -EBADMSG;<br>
&gt;&gt; -                         }<br>
&gt;&gt; -<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch b/meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch<br>
&gt;&gt; deleted file mode 100644<br>
&gt;&gt; index 953373e..0000000<br>
&gt;&gt; --- a/meta/recipes-core/systemd/systemd/journal-file-protect-against-alloca-0.patch<br>
&gt;&gt; +++ /dev/null<br>
&gt;&gt; @@ -1,23 +0,0 @@<br>
&gt;&gt; -From a25fd0d4bd3cf652e55c24e7dc873fe530fa111a Mon Sep 17 00:00:00 2001<br>
&gt;&gt; -From: Thomas Hindoe Paaboel Andersen &lt;<a href="mailto:phomes@gmail.com">phomes@gmail.com</a>&gt;<br>
&gt;&gt; -Date: Mon, 16 Dec 2013 23:35:30 +0100<br>
&gt;&gt; -Subject: [PATCH] journal-file: protect against alloca(0)<br>
&gt;&gt; -<br>
&gt;&gt; ----<br>
&gt;&gt; - src/journal/journal-file.c | 3 ++-<br>
&gt;&gt; - 1 file changed, 2 insertions(+), 1 deletion(-)<br>
&gt;&gt; -<br>
&gt;&gt; -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c<br>
&gt;&gt; -index 090cf97..8ea258b 100644<br>
&gt;&gt; ---- a/src/journal/journal-file.c<br>
&gt;&gt; -+++ b/src/journal/journal-file.c<br>
&gt;&gt; -@@ -2737,7 +2737,8 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6<br>
&gt;&gt; -         ts.realtime = le64toh(o-&gt;entry.realtime);<br>
&gt;&gt; -<br>
&gt;&gt; -         n = journal_file_entry_n_items(o);<br>
&gt;&gt; --        items = alloca(sizeof(EntryItem) * n);<br>
&gt;&gt; -+        /* alloca() can&#39;t take 0, hence let&#39;s allocate at least one */<br>
&gt;&gt; -+        items = alloca(sizeof(EntryItem) * MAX(1u, n));<br>
&gt;&gt; -<br>
&gt;&gt; -         for (i = 0; i &lt; n; i++) {<br>
&gt;&gt; -                 uint64_t l, h;<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch b/meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch<br>
&gt;&gt; deleted file mode 100644<br>
&gt;&gt; index 89573bb..0000000<br>
&gt;&gt; --- a/meta/recipes-core/systemd/systemd/journal-when-appending-to-journal-file-allocate-larg.patch<br>
&gt;&gt; +++ /dev/null<br>
&gt;&gt; @@ -1,83 +0,0 @@<br>
&gt;&gt; -From c0658e1948c301177b1527227be0c18932cd7cce Mon Sep 17 00:00:00 2001<br>
&gt;&gt; -From: Lennart Poettering &lt;<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>&gt;<br>
&gt;&gt; -Date: Tue, 26 Nov 2013 18:39:42 +0100<br>
&gt;&gt; -Subject: [PATCH] journal: when appending to journal file, allocate larger<br>
&gt;&gt; - blocks at once<br>
&gt;&gt; -<br>
&gt;&gt; -(cherry picked from commit a676e66535e12458ea6d366a653f8dd60f982504)<br>
&gt;&gt; -<br>
&gt;&gt; -Conflicts:<br>
&gt;&gt; -       src/journal/journal-file.c<br>
&gt;&gt; ----<br>
&gt;&gt; - src/journal/journal-file.c | 26 +++++++++++++++++---------<br>
&gt;&gt; - 1 file changed, 17 insertions(+), 9 deletions(-)<br>
&gt;&gt; -<br>
&gt;&gt; -Upstream-Status: Backport<br>
&gt;&gt; -<br>
&gt;&gt; -Index: systemd-208/src/journal/journal-file.c<br>
&gt;&gt; -===================================================================<br>
&gt;&gt; ---- systemd-208.orig/src/journal/journal-file.c        2014-02-07 22:37:06.013722798 -0800<br>
&gt;&gt; -+++ systemd-208/src/journal/journal-file.c     2014-02-07 22:44:51.563341090 -0800<br>
&gt;&gt; -@@ -68,6 +68,9 @@<br>
&gt;&gt; - /* How many entries to keep in the entry array chain cache at max */<br>
&gt;&gt; - #define CHAIN_CACHE_MAX 20<br>
&gt;&gt; -<br>
&gt;&gt; -+/* How much to increase the journal file size at once each time we allocate something new. */<br>
&gt;&gt; -+#define FILE_SIZE_INCREASE (8ULL*1024ULL*1024ULL)              /* 8MB */<br>
&gt;&gt; -+<br>
&gt;&gt; - int journal_file_set_online(JournalFile *f) {<br>
&gt;&gt; -         assert(f);<br>
&gt;&gt; -<br>
&gt;&gt; -@@ -218,8 +221,7 @@<br>
&gt;&gt; -         journal_file_set_online(f);<br>
&gt;&gt; -<br>
&gt;&gt; -         /* Sync the online state to disk */<br>
&gt;&gt; --        msync(f-&gt;header, PAGE_ALIGN(sizeof(Header)), MS_SYNC);<br>
&gt;&gt; --        fdatasync(f-&gt;fd);<br>
&gt;&gt; -+        fsync(f-&gt;fd);<br>
&gt;&gt; -<br>
&gt;&gt; -         return 0;<br>
&gt;&gt; - }<br>
&gt;&gt; -@@ -313,7 +315,7 @@<br>
&gt;&gt; - }<br>
&gt;&gt; -<br>
&gt;&gt; - static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {<br>
&gt;&gt; --        uint64_t old_size, new_size;<br>
&gt;&gt; -+        uint64_t old_size, new_size, file_size;<br>
&gt;&gt; -         int r;<br>
&gt;&gt; -<br>
&gt;&gt; -         assert(f);<br>
&gt;&gt; -@@ -333,12 +335,10 @@<br>
&gt;&gt; -         if (new_size &lt;= old_size)<br>
&gt;&gt; -                 return 0;<br>
&gt;&gt; -<br>
&gt;&gt; --        if (f-&gt;metrics.max_size &gt; 0 &amp;&amp;<br>
&gt;&gt; --            new_size &gt; f-&gt;metrics.max_size)<br>
&gt;&gt; -+        if (f-&gt;metrics.max_size &gt; 0 &amp;&amp; new_size &gt; f-&gt;metrics.max_size)<br>
&gt;&gt; -                 return -E2BIG;<br>
&gt;&gt; -<br>
&gt;&gt; --        if (new_size &gt; f-&gt;metrics.min_size &amp;&amp;<br>
&gt;&gt; --            f-&gt;metrics.keep_free &gt; 0) {<br>
&gt;&gt; -+        if (new_size &gt; f-&gt;metrics.min_size &amp;&amp; f-&gt;metrics.keep_free &gt; 0) {<br>
&gt;&gt; -                 struct statvfs svfs;<br>
&gt;&gt; -<br>
&gt;&gt; -                 if (fstatvfs(f-&gt;fd, &amp;svfs) &gt;= 0) {<br>
&gt;&gt; -@@ -363,8 +363,16 @@<br>
&gt;&gt; -         if (r != 0)<br>
&gt;&gt; -                 return -r;<br>
&gt;&gt; -<br>
&gt;&gt; --        if (fstat(f-&gt;fd, &amp;f-&gt;last_stat) &lt; 0)<br>
&gt;&gt; --                return -errno;<br>
&gt;&gt; -+        /* Increase the file size a bit further than this, so that we<br>
&gt;&gt; -+         * we can create larger memory maps to cache */<br>
&gt;&gt; -+        file_size = ((new_size+FILE_SIZE_INCREASE-1) / FILE_SIZE_INCREASE) * FILE_SIZE_INCREASE;<br>
&gt;&gt; -+        if (file_size &gt; (uint64_t) f-&gt;last_stat.st_size) {<br>
&gt;&gt; -+                if (file_size &gt; new_size)<br>
&gt;&gt; -+                        ftruncate(f-&gt;fd, file_size);<br>
&gt;&gt; -+<br>
&gt;&gt; -+                if (fstat(f-&gt;fd, &amp;f-&gt;last_stat) &lt; 0)<br>
&gt;&gt; -+                        return -errno;<br>
&gt;&gt; -+        }<br>
&gt;&gt; -<br>
&gt;&gt; -         f-&gt;header-&gt;arena_size = htole64(new_size - le64toh(f-&gt;header-&gt;header_size));<br>
&gt;&gt; -<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/systemd/journald-add-missing-error-check.patch b/meta/recipes-core/systemd/systemd/journald-add-missing-error-check.patch<br>
&gt;&gt; deleted file mode 100644<br>
&gt;&gt; index 10590e1..0000000<br>
&gt;&gt; --- a/meta/recipes-core/systemd/systemd/journald-add-missing-error-check.patch<br>
&gt;&gt; +++ /dev/null<br>
&gt;&gt; @@ -1,16 +0,0 @@<br>
&gt;&gt; -Upstream-Status: Backport [Fedora]<br>
&gt;&gt; -<br>
&gt;&gt; -Index: systemd-208/src/journal/journal-file.c<br>
&gt;&gt; -===================================================================<br>
&gt;&gt; ---- systemd-208.orig/src/journal/journal-file.c        2013-08-13 13:02:46.397707086 -0700<br>
&gt;&gt; -+++ systemd-208/src/journal/journal-file.c     2014-02-07 22:29:01.398794277 -0800<br>
&gt;&gt; -@@ -907,7 +907,8 @@<br>
&gt;&gt; -<br>
&gt;&gt; -         osize = offsetof(Object, field.payload) + size;<br>
&gt;&gt; -         r = journal_file_append_object(f, OBJECT_FIELD, osize, &amp;o, &amp;p);<br>
&gt;&gt; --<br>
&gt;&gt; -+      if (r &lt; 0)<br>
&gt;&gt; -+              return r;<br>
&gt;&gt; -         o-&gt;field.hash = htole64(hash);<br>
&gt;&gt; -         memcpy(o-&gt;field.payload, field, size);<br>
&gt;&gt; -<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/systemd/journald-fix-minor-memory-leak.patch b/meta/recipes-core/systemd/systemd/journald-fix-minor-memory-leak.patch<br>
&gt;&gt; deleted file mode 100644<br>
&gt;&gt; index 9b90ed2..0000000<br>
&gt;&gt; --- a/meta/recipes-core/systemd/systemd/journald-fix-minor-memory-leak.patch<br>
&gt;&gt; +++ /dev/null<br>
&gt;&gt; @@ -1,16 +0,0 @@<br>
&gt;&gt; -Fix minor memory leak<br>
&gt;&gt; -<br>
&gt;&gt; -Upstream-Status: Backport [Fedora]<br>
&gt;&gt; -<br>
&gt;&gt; -Index: systemd-208/src/journal/journal-vacuum.c<br>
&gt;&gt; -===================================================================<br>
&gt;&gt; ---- systemd-208.orig/src/journal/journal-vacuum.c      2013-09-12 05:51:57.258256643 -0700<br>
&gt;&gt; -+++ systemd-208/src/journal/journal-vacuum.c   2014-02-07 22:35:55.695747001 -0800<br>
&gt;&gt; -@@ -277,6 +277,7 @@<br>
&gt;&gt; -                                 freed += size;<br>
&gt;&gt; -                         } else if (errno != ENOENT)<br>
&gt;&gt; -                                 log_warning(&quot;Failed to delete %s/%s: %m&quot;, directory, p);<br>
&gt;&gt; -+                      free(p);<br>
&gt;&gt; -<br>
&gt;&gt; -                         continue;<br>
&gt;&gt; -                 }<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch<br>
&gt;&gt; index d1740ef..05223d3 100644<br>
&gt;&gt; --- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch<br>
&gt;&gt; +++ b/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch<br>
&gt;&gt; @@ -1,10 +1,10 @@<br>
&gt;&gt;   Upstream-Status: Denied [no desire for uclibc support]<br>
&gt;&gt;   Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; -Index: systemd-208/src/journal/journal-file.c<br>
&gt;&gt; +Index: git/src/journal/journal-file.c<br>
&gt;&gt;   ===================================================================<br>
&gt;&gt; ---- systemd-208.orig/src/journal/journal-file.c        2014-02-14 00:05:05.000000000 -0800<br>
&gt;&gt; -+++ systemd-208/src/journal/journal-file.c     2014-02-14 00:08:41.338821677 -0800<br>
&gt;&gt; +--- git.orig/src/journal/journal-file.c        2014-03-02 16:25:38.000000000 -0800<br>
&gt;&gt; ++++ git/src/journal/journal-file.c     2014-03-02 16:27:24.151238740 -0800<br>
&gt;&gt;   @@ -38,6 +38,8 @@<br>
&gt;&gt;    #include &quot;compress.h&quot;<br>
&gt;&gt;    #include &quot;fsprg.h&quot;<br>
&gt;&gt; @@ -17,13 +17,13 @@ Index: systemd-208/src/journal/journal-file.c<br>
&gt;&gt;   @@ -316,7 +318,7 @@<br>
&gt;&gt;<br>
&gt;&gt;    static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {<br>
&gt;&gt; -         uint64_t old_size, new_size, file_size;<br>
&gt;&gt; +         uint64_t old_size, new_size;<br>
&gt;&gt;   -        int r;<br>
&gt;&gt;   +        int r = 0;<br>
&gt;&gt;<br>
&gt;&gt;            assert(f);<br>
&gt;&gt;<br>
&gt;&gt; -@@ -359,9 +361,24 @@<br>
&gt;&gt; +@@ -364,9 +366,24 @@<br>
&gt;&gt;            /* Note that the glibc fallocate() fallback is very<br>
&gt;&gt;               inefficient, hence we try to minimize the allocation area<br>
&gt;&gt;               as we can. */<br>
&gt;&gt; @@ -46,13 +46,13 @@ Index: systemd-208/src/journal/journal-file.c<br>
&gt;&gt;   +               return -errno;<br>
&gt;&gt;   +#endif /* HAVE_POSIX_FALLOCATE */<br>
&gt;&gt;<br>
&gt;&gt; -         /* Increase the file size a bit further than this, so that we<br>
&gt;&gt; -          * we can create larger memory maps to cache */<br>
&gt;&gt; -Index: systemd-208/src/journal/journald-kmsg.c<br>
&gt;&gt; +         if (fstat(f-&gt;fd, &amp;f-&gt;last_stat) &lt; 0)<br>
&gt;&gt; +                 return -errno;<br>
&gt;&gt; +Index: git/src/journal/journald-kmsg.c<br>
&gt;&gt;   ===================================================================<br>
&gt;&gt; ---- systemd-208.orig/src/journal/journald-kmsg.c       2014-02-14 00:05:05.000000000 -0800<br>
&gt;&gt; -+++ systemd-208/src/journal/journald-kmsg.c    2014-02-14 00:05:47.498823000 -0800<br>
&gt;&gt; -@@ -407,6 +407,7 @@<br>
&gt;&gt; +--- git.orig/src/journal/journald-kmsg.c       2014-03-02 16:25:38.000000000 -0800<br>
&gt;&gt; ++++ git/src/journal/journald-kmsg.c    2014-03-02 16:26:35.419237826 -0800<br>
&gt;&gt; +@@ -408,6 +408,7 @@<br>
&gt;&gt;<br>
&gt;&gt;    int server_open_kernel_seqnum(Server *s) {<br>
&gt;&gt;            int fd;<br>
&gt;&gt; @@ -60,7 +60,7 @@ Index: systemd-208/src/journal/journald-kmsg.c<br>
&gt;&gt;            uint64_t *p;<br>
&gt;&gt;<br>
&gt;&gt;            assert(s);<br>
&gt;&gt; -@@ -420,8 +421,19 @@<br>
&gt;&gt; +@@ -421,8 +422,19 @@<br>
&gt;&gt;                    log_error(&quot;Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m&quot;);<br>
&gt;&gt;                    return 0;<br>
&gt;&gt;            }<br>
&gt;&gt; diff --git a/meta/recipes-core/systemd/<a href="http://systemd_208.bb">systemd_208.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd_208.bb">systemd_208.bb</a><br>
&gt;&gt; index 1bcedaa..6762173 100644<br>
&gt;&gt; --- a/meta/recipes-core/systemd/<a href="http://systemd_208.bb">systemd_208.bb</a><br>
&gt;&gt; +++ b/meta/recipes-core/systemd/<a href="http://systemd_208.bb">systemd_208.bb</a><br>
&gt;&gt; @@ -17,22 +17,20 @@ SECTION = &quot;base/shell&quot;<br>
&gt;&gt;<br>
&gt;&gt;   inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest<br>
&gt;&gt;<br>
&gt;&gt; -SRC_URI = &quot;<a href="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz">http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz</a> \<br>
&gt;&gt; -           file://0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch \<br>
&gt;&gt; +SRCREV = &quot;255eb046a7bcb90e60a3a54302bc1250c1aed26a&quot;<br>
&gt;&gt; +<br>
&gt;&gt; +PV = &quot;208+git${SRCPV}&quot;<br>
&gt;&gt; +<br>
&gt;&gt; +SRC_URI = &quot;git://<a href="http://anongit.freedesktop.org/systemd/systemd-stable;branch=v208-stable;protocol=git">anongit.freedesktop.org/systemd/systemd-stable;branch=v208-stable;protocol=git</a> \<br>
&gt;&gt;              file://binfmt-install.patch \<br>
&gt;&gt; -           file://journald-add-missing-error-check.patch \<br>
&gt;&gt; -           file://journald-fix-minor-memory-leak.patch \<br>
&gt;&gt; -           file://journal-when-appending-to-journal-file-allocate-larg.patch \<br>
&gt;&gt; -           file://journal-file-protect-against-alloca-0.patch \<br>
&gt;&gt; -           file://journal-Add-missing-byte-order-conversions.patch \<br>
&gt;&gt;              file://touchscreen.rules \<br>
&gt;&gt;              ${UCLIBCPATCHES} \<br>
&gt;&gt;              file://00-create-volatile.conf \<br>
&gt;&gt;              file://init \<br>
&gt;&gt;              file://run-ptest \<br>
&gt;&gt;             &quot;<br>
&gt;&gt; -SRC_URI[md5sum] = &quot;df64550d92afbffb4f67a434193ee165&quot;<br>
&gt;&gt; -SRC_URI[sha256sum] = &quot;aa64fa864466fd5727005c55d61c092828b94b4f857272c0b503695022146390&quot;<br>
&gt;&gt; +<br>
&gt;&gt; +S = &quot;${WORKDIR}/git&quot;<br>
&gt;&gt;<br>
&gt;&gt;   UCLIBCPATCHES = &quot;&quot;<br>
&gt;&gt;   UCLIBCPATCHES_libc-uclibc = &quot;file://systemd-pam-configure-check-uclibc.patch \<br>
&gt;&gt; @@ -76,7 +74,6 @@ EXTRA_OECONF = &quot; --with-rootprefix=${rootprefix} \<br>
&gt;&gt;                    --disable-manpages \<br>
&gt;&gt;                    --disable-coredump \<br>
&gt;&gt;                    --disable-introspection \<br>
&gt;&gt; -                 --disable-tcpwrap \<br>
&gt;&gt;                    --enable-split-usr \<br>
&gt;&gt;                    --without-python \<br>
&gt;&gt;                    --with-sysvrcnd-path=${sysconfdir} \<br>
&gt;&gt;<br>
</p>