summaryrefslogtreecommitdiffstats
path: root/tmpfiles.d
diff options
context:
space:
mode:
authorLuca BRUNO <luca.bruno@coreos.com>2021-07-08 11:47:32 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-21 17:29:06 +0200
commit6fe23ff31c02c7e9607edd0df819e59da5d49abc (patch)
tree6b6024c22b7fa1a7eb8992dfff8b6d59a69e030c /tmpfiles.d
parentMerge pull request #20123 from keszybz/extended-job-status (diff)
downloadsystemd-6fe23ff31c02c7e9607edd0df819e59da5d49abc.tar.xz
systemd-6fe23ff31c02c7e9607edd0df819e59da5d49abc.zip
docs: move /var/log/README to a tmpfiles.d symlink
This moves the /var/log/README content out of /var and into the docs location, replacing the previous file with a symlink created through a tmpfiles.d entry.
Diffstat (limited to 'tmpfiles.d')
-rw-r--r--tmpfiles.d/legacy.conf.in (renamed from tmpfiles.d/legacy.conf)3
-rw-r--r--tmpfiles.d/meson.build38
2 files changed, 26 insertions, 15 deletions
diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf.in
index 62e2ae0986..4f2c0d7c43 100644
--- a/tmpfiles.d/legacy.conf
+++ b/tmpfiles.d/legacy.conf.in
@@ -12,6 +12,9 @@
d /run/lock 0755 root root -
L /var/lock - - - - ../run/lock
+{% if CREATE_LOG_DIRS %}
+L /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
+{% endif %}
# /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems.
diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
index a8aaacaf29..6f8ff09fc8 100644
--- a/tmpfiles.d/meson.build
+++ b/tmpfiles.d/meson.build
@@ -12,7 +12,6 @@ files = [['README', ''],
['systemd-pstore.conf', 'ENABLE_PSTORE'],
['tmp.conf', ''],
['x11.conf', ''],
- ['legacy.conf', 'HAVE_SYSV_COMPAT'],
]
foreach pair : files
@@ -26,21 +25,30 @@ foreach pair : files
endif
endforeach
-in_files = ['etc.conf',
- 'static-nodes-permissions.conf',
- 'systemd.conf',
- 'var.conf']
+in_files = [['etc.conf', ''],
+ ['legacy.conf', 'HAVE_SYSV_COMPAT'],
+ ['static-nodes-permissions.conf', ''],
+ ['systemd.conf', ''],
+ ['var.conf', ''],
+ ]
-foreach file : in_files
- custom_target(
- # XXX: workaround for old meson. Drop when upgrading.
- 'tmpfiles+' + file,
- input : file + '.in',
- output: file,
- command : [meson_render_jinja2, config_h, '@INPUT@'],
- capture : true,
- install : enable_tmpfiles,
- install_dir : tmpfilesdir)
+foreach pair : in_files
+ if not enable_tmpfiles
+ # do nothing
+ elif pair[1] == '' or conf.get(pair[1]) == 1
+ custom_target(
+ # XXX: workaround for old meson. Drop when upgrading.
+ 'tmpfiles+' + pair[0],
+ input : pair[0] + '.in',
+ output: pair[0],
+ command : [meson_render_jinja2, config_h, '@INPUT@'],
+ capture : true,
+ install : enable_tmpfiles,
+ install_dir : tmpfilesdir)
+ else
+ message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
+ .format(pair[0], pair[1], conf.get(pair[1], 0)))
+ endif
endforeach
if enable_tmpfiles and install_sysconfdir