Skip to contentSkip to conversation

tmpfiles.d: don't create the symbol link

PATCH In review Mingli Yu 3 participants 3 messages Aug 8, 2016

lore
Share & tools
lore

Mingli Yu

author
#0 lore raw

PATCH 1/1 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

---
 ...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
meta/recipes-core/systemd/systemd/0001-tmpfiles.d-don-t-create-the-symbol-link.patch new file +51 -0
new file mode 100644
index 0000000..72cd9f8
@@ -0,0 +1,51 @@
+From 6f7977d79fd464f8615d68476583f4b1732865b1 Mon Sep 17 00:00:00 2001
+From: Wenlin Kang <[email protected]>
+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 <[email protected]>
+Signed-off-by: Wenlin Kang <[email protected]>
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ 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
+
meta/recipes-core/systemd/systemd_230.bb +1 -0
index 374a197..55af780 100644
@@ -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 \
Signature · 1 line
2.8.1
#1 lore raw
Quoted 14 lines · Mingli Yu

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

Quoted 6 lines

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.

OE should follow upstream. Why aren’t we doing what systemd is doing ?

Quoted 88 lines

* /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

---
...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

meta/recipes-core/systemd/systemd/0001-tmpfiles.d-don-t-create-the-symbol-link.patch new file +51 -0
new file mode 100644
index 0000000..72cd9f8
@@ -0,0 +1,51 @@
+From 6f7977d79fd464f8615d68476583f4b1732865b1 Mon Sep 17 00:00:00 2001
+From: Wenlin Kang <[email protected]>
+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 <[email protected]>
+Signed-off-by: Wenlin Kang <[email protected]>
+Signed-off-by: Mingli Yu <[email protected]>
+---
+ 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
+
meta/recipes-core/systemd/systemd_230.bb +1 -0
index 374a197..55af780 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
In reply to Mingli Yu
Quoted 6 lines · Mingli Yu

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

What is this solving? Does systemd error or emit some warnings if the files already exist?

Ross