Skip to content

Commit 76cf599

Browse files
Peter Kjellerstedtrossburton
authored andcommitted
systemd: Remove /var/log/README using a patch
Commit f82d9c9 (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>
1 parent 4bcb1cd commit 76cf599

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 425ad51e727058b48dd4580fd6afe7e51e96a28a Mon Sep 17 00:00:00 2001
2+
From: Peter Kjellerstedt <pkj@axis.com>
3+
Date: Tue, 21 Jan 2025 05:02:00 +0100
4+
Subject: [PATCH] Do not create /var/log/README
5+
6+
/var/log/README is a link to /usr/share/doc/systemd/README.logs. The
7+
latter is packaged in systemd-doc and likely not installed, which leaves
8+
/var/log/README as a dead link. Since /var/log/README is not very
9+
useful, just remove it.
10+
11+
Upstream-Status: Inappropriate [OE specific]
12+
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
13+
---
14+
tmpfiles.d/legacy.conf.in | 3 ---
15+
1 file changed, 3 deletions(-)
16+
17+
diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
18+
index b475500e58..650c91a8da 100644
19+
--- a/tmpfiles.d/legacy.conf.in
20+
+++ b/tmpfiles.d/legacy.conf.in
21+
@@ -13,9 +13,6 @@
22+
23+
d /run/lock 0755 root root -
24+
L /var/lock - - - - ../run/lock
25+
-{% if CREATE_LOG_DIRS %}
26+
-L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
27+
-{% endif %}
28+
29+
{% if HAVE_SYSV_COMPAT %}
30+
# /run/lock/subsys is used for serializing SysV service execution, and

meta/recipes-core/systemd/systemd_257.1.bb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SRC_URI += " \
2828
file://systemd-pager.sh \
2929
file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
3030
file://0002-implment-systemd-sysv-install-for-OE.patch \
31+
file://0001-Do-not-create-var-log-README.patch \
3132
"
3233

3334
# patches needed by musl
@@ -405,10 +406,6 @@ do_install() {
405406
# Actively disable Predictable Network Interface Names
406407
sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link
407408
fi
408-
409-
if [ -e ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf ];then
410-
sed -i -e '/^L \/var\/log\/README/d' ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf
411-
fi
412409
}
413410

414411
python populate_packages:prepend (){

0 commit comments

Comments
 (0)