]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: Remove /var/log/README using a patch
authorPeter Kjellerstedt <pkj@axis.com>
Tue, 21 Jan 2025 05:18:12 +0000 (06:18 +0100)
committerRoss Burton <ross.burton@arm.com>
Thu, 23 Jan 2025 12:13:32 +0000 (12:13 +0000)
Commit f82d9c997ba (systemd: enable create-log-dirs) removed the
creation of the /var/log/README symbolic link by using sed. However, the
update to 257 changed the target line and the sed expression no longer
matches. Rather than correcting the sed expression, use a patch to
remove /var/log/README so that any future changes do not go unnoticed.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd_257.1.bb

diff --git a/meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch b/meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch
new file mode 100644 (file)
index 0000000..850e356
--- /dev/null
@@ -0,0 +1,30 @@
+From 425ad51e727058b48dd4580fd6afe7e51e96a28a Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Tue, 21 Jan 2025 05:02:00 +0100
+Subject: [PATCH] Do not create /var/log/README
+
+/var/log/README is a link to /usr/share/doc/systemd/README.logs. The
+latter is packaged in systemd-doc and likely not installed, which leaves
+/var/log/README as a dead link. Since /var/log/README is not very
+useful, just remove it.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ tmpfiles.d/legacy.conf.in | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
+index b475500e58..650c91a8da 100644
+--- a/tmpfiles.d/legacy.conf.in
++++ b/tmpfiles.d/legacy.conf.in
+@@ -13,9 +13,6 @@
+ d /run/lock 0755 root root -
+ L /var/lock - - - - ../run/lock
+-{% if CREATE_LOG_DIRS %}
+-L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
+-{% endif %}
+ {% if HAVE_SYSV_COMPAT %}
+ # /run/lock/subsys is used for serializing SysV service execution, and
index e7dae83957dabc859fe94a50ceb0762c1e39cfd7..cdf72a5015779ac8f228c87740195df85087dd6b 100644 (file)
@@ -28,6 +28,7 @@ SRC_URI += " \
            file://systemd-pager.sh \
            file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
            file://0002-implment-systemd-sysv-install-for-OE.patch \
+           file://0001-Do-not-create-var-log-README.patch \
            "
 
 # patches needed by musl
@@ -405,10 +406,6 @@ do_install() {
                # Actively disable Predictable Network Interface Names
                sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link
        fi
-
-       if [ -e ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf ];then
-               sed -i -e '/^L \/var\/log\/README/d' ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf
-       fi
 }
 
 python populate_packages:prepend (){