summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO5
-rw-r--r--docs/var-log/README.logs (renamed from docs/var-log/README)0
-rw-r--r--docs/var-log/meson.build4
-rw-r--r--meson.build2
-rw-r--r--tmpfiles.d/legacy.conf.in (renamed from tmpfiles.d/legacy.conf)3
-rw-r--r--tmpfiles.d/meson.build38
6 files changed, 32 insertions, 20 deletions
diff --git a/TODO b/TODO
index 249f4a2257..3a17a20c1a 100644
--- a/TODO
+++ b/TODO
@@ -378,9 +378,8 @@ Features:
https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-wake-sources
at the end).
-* We should probably replace /var/log/README, /etc/rc.d/README with symlinks
- that are linked to these places instead of copied. After all they are
- constant vendor data.
+* We should probably replace /etc/rc.d/README with a symlink to doc
+ content. After all it is constant vendor data.
* maybe add kernel cmdline params: to force random seed crediting
diff --git a/docs/var-log/README b/docs/var-log/README.logs
index 5c6c5924b5..5c6c5924b5 100644
--- a/docs/var-log/README
+++ b/docs/var-log/README.logs
diff --git a/docs/var-log/meson.build b/docs/var-log/meson.build
index ba7957711d..35f756cafe 100644
--- a/docs/var-log/meson.build
+++ b/docs/var-log/meson.build
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
if conf.get('HAVE_SYSV_COMPAT') == 1 and get_option('create-log-dirs')
- install_data('README',
- install_dir : '/var/log')
+ install_data('README.logs',
+ install_dir : docdir)
endif
diff --git a/meson.build b/meson.build
index a2ee15bf32..815c223171 100644
--- a/meson.build
+++ b/meson.build
@@ -91,6 +91,7 @@ sysvinit_path = get_option('sysvinit-path')
sysvrcnd_path = get_option('sysvrcnd-path')
conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '',
description : 'SysV init scripts and rcN.d links are supported')
+conf.set10('CREATE_LOG_DIRS', get_option('create-log-dirs'))
if get_option('hibernate') and not get_option('initrd')
error('hibernate depends on initrd')
@@ -215,6 +216,7 @@ conf.set_quoted('BINFMT_DIR', binfmtdir)
conf.set_quoted('BOOTLIBDIR', bootlibdir)
conf.set_quoted('CATALOG_DATABASE', join_paths(catalogstatedir, 'database'))
conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root'))
+conf.set_quoted('DOC_DIR', docdir)
conf.set_quoted('DOCUMENT_ROOT', join_paths(pkgdatadir, 'gatewayd'))
conf.set_quoted('ENVIRONMENT_DIR', environmentdir)
conf.set_quoted('INCLUDE_DIR', includedir)
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