diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2025-01-21 06:18:12 +0100 |
---|---|---|
committer | Ross Burton <ross.burton@arm.com> | 2025-01-23 12:14:29 +0000 |
commit | 73a7cb2701e3680eac7811a89fc51eeb6ff77f5c (patch) | |
tree | ae6f8e97f12029cd45b274c17a85606d9fdb9fff | |
parent | bf35e82d38f2c8279799c769404ec36df0371d6a (diff) | |
download | poky-73a7cb2701e3680eac7811a89fc51eeb6ff77f5c.tar.gz |
systemd: Remove /var/log/README using a patch
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.
(From OE-Core rev: 76cf5994262f9fd76cf27e111eb67ad1645541f1)
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>
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch | 30 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_257.1.bb | 5 |
2 files changed, 31 insertions, 4 deletions
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 index 0000000000..850e356b2f --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-Do-not-create-var-log-README.patch | |||
@@ -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 | ||
diff --git a/meta/recipes-core/systemd/systemd_257.1.bb b/meta/recipes-core/systemd/systemd_257.1.bb index e7dae83957..cdf72a5015 100644 --- a/meta/recipes-core/systemd/systemd_257.1.bb +++ b/meta/recipes-core/systemd/systemd_257.1.bb | |||
@@ -28,6 +28,7 @@ SRC_URI += " \ | |||
28 | file://systemd-pager.sh \ | 28 | file://systemd-pager.sh \ |
29 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | 29 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ |
30 | file://0002-implment-systemd-sysv-install-for-OE.patch \ | 30 | file://0002-implment-systemd-sysv-install-for-OE.patch \ |
31 | file://0001-Do-not-create-var-log-README.patch \ | ||
31 | " | 32 | " |
32 | 33 | ||
33 | # patches needed by musl | 34 | # patches needed by musl |
@@ -405,10 +406,6 @@ do_install() { | |||
405 | # Actively disable Predictable Network Interface Names | 406 | # Actively disable Predictable Network Interface Names |
406 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link | 407 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link |
407 | fi | 408 | 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 | ||
412 | } | 409 | } |
413 | 410 | ||
414 | python populate_packages:prepend (){ | 411 | python populate_packages:prepend (){ |