Don't create symbol link for existing file
/etc/os-release and /etc/localtime exist in our
system, so remove below two lines in /usr/lib/tmpfiles.d/etc.conf
L /etc/os-release - - - - ../usr/lib/os-release
L /etc/localtime - - - - ../usr/share/zoneinfo/UTC

* The os-release is shipped by base-files in other distributions.
  Recently, the base-files changed the os-release directory from
  /etc/os-release to /usr/lib/os-release, which causes systemd boot
  up failed, so a fix was added into systemd is

  ln -s /usr/lib/os-release /etc/os-release

  However, the os-release file shipped by os-release in Yocto project.
  The location is still /etc/os-release, so systemd doesn't
  need to create the symbol link.

* /etc/localtime file shipped by tzdata-2016e in Yocto project, so
  no need to create symbol link as:
  ln -s /usr/share/zoneinfo/UTC /etc/localtime

Signed-off-by: Mingli Yu <mingli...@windriver.com>
---
 ...1-tmpfiles.d-don-t-create-the-symbol-link.patch | 51 ++++++++++++++++++++++
 meta/recipes-core/systemd/systemd_230.bb           |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-tmpfiles.d-don-t-create-the-symbol-link.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-don-t-create-the-symbol-link.patch
 
b/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-don-t-create-the-symbol-link.patch
new file mode 100644
index 0000000..72cd9f8
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0001-tmpfiles.d-don-t-create-the-symbol-link.patch
@@ -0,0 +1,51 @@
+From 6f7977d79fd464f8615d68476583f4b1732865b1 Mon Sep 17 00:00:00 2001
+From: Wenlin Kang <wenlin.k...@windriver.com>
+Date: Wed, 27 Jul 2016 05:20:24 +0000
+Subject: [PATCH] tmpfiles.d: don't create the symbol link
+
+Don't create symbol link for existing file
+/etc/os-release and /etc/localtime exist in our
+system, so remove below two lines in /usr/lib/tmpfiles.d/etc.conf
+L /etc/os-release - - - - ../usr/lib/os-release
+L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
+
+* The os-release is shipped by base-files in other distributions.
+  Recently, the base-files changed the os-release directory from
+  /etc/os-release to /usr/lib/os-release, which causes systemd boot
+  up failed, so a fix was added into systemd is
+
+  ln -s /usr/lib/os-release /etc/os-release
+
+  However, the os-release file shipped by os-release in Yocto project.
+  The location is still /etc/os-release, so systemd doesn't need
+  to create the symbol link.
+
+* /etc/localtime file shipped by tzdata-2016e in Yocto project, so
+  no need to create symbol link as:
+  ln -s /usr/share/zoneinfo/UTC /etc/localtime
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Yue Tao <yue....@windriver.com>
+Signed-off-by: Wenlin Kang <wenlin.k...@windriver.com>
+Signed-off-by: Mingli Yu <mingli...@windriver.com>
+---
+ tmpfiles.d/etc.conf.m4 | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tmpfiles.d/etc.conf.m4 b/tmpfiles.d/etc.conf.m4
+index ef7b9b9..5691a07 100644
+--- a/tmpfiles.d/etc.conf.m4
++++ b/tmpfiles.d/etc.conf.m4
+@@ -7,8 +7,6 @@
+ 
+ # See tmpfiles.d(5) for details
+ 
+-L /etc/os-release - - - - ../usr/lib/os-release
+-L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
+ L+ /etc/mtab - - - - ../proc/self/mounts
+ m4_ifdef(`HAVE_SMACK_RUN_LABEL',
+ t /etc/mtab - - - - security.SMACK64=_
+-- 
+2.8.2
+
diff --git a/meta/recipes-core/systemd/systemd_230.bb 
b/meta/recipes-core/systemd/systemd_230.bb
index 374a197..55af780 100644
--- a/meta/recipes-core/systemd/systemd_230.bb
+++ b/meta/recipes-core/systemd/systemd_230.bb
@@ -36,6 +36,7 @@ SRC_URI += " \
            
file://0021-include-missing.h-for-getting-secure_getenv-definiti.patch \
            
file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
            file://udev-re-enable-mount-propagation-for-udevd.patch \
+           file://0001-tmpfiles.d-don-t-create-the-symbol-link.patch \
 "
 SRC_URI_append_libc-uclibc = "\
            
file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
-- 
2.8.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to