From 6fe23ff31c02c7e9607edd0df819e59da5d49abc Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Thu, 8 Jul 2021 09:47:32 +0000 Subject: 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. --- tmpfiles.d/legacy.conf | 27 --------------------------- tmpfiles.d/legacy.conf.in | 30 ++++++++++++++++++++++++++++++ tmpfiles.d/meson.build | 38 +++++++++++++++++++++++--------------- 3 files changed, 53 insertions(+), 42 deletions(-) delete mode 100644 tmpfiles.d/legacy.conf create mode 100644 tmpfiles.d/legacy.conf.in (limited to 'tmpfiles.d') diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf deleted file mode 100644 index 62e2ae0986..0000000000 --- a/tmpfiles.d/legacy.conf +++ /dev/null @@ -1,27 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -# See tmpfiles.d(5) for details - -# These files are considered legacy and are unnecessary on legacy-free -# systems. - -d /run/lock 0755 root root - -L /var/lock - - - - ../run/lock - -# /run/lock/subsys is used for serializing SysV service execution, and -# hence without use on SysV-less systems. - -d /run/lock/subsys 0755 root root - - -# /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the -# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and -# 'quotacheck.mode=force' - -r! /forcefsck -r! /fastboot -r! /forcequotacheck diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in new file mode 100644 index 0000000000..4f2c0d7c43 --- /dev/null +++ b/tmpfiles.d/legacy.conf.in @@ -0,0 +1,30 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +# See tmpfiles.d(5) for details + +# These files are considered legacy and are unnecessary on legacy-free +# systems. + +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. + +d /run/lock/subsys 0755 root root - + +# /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the +# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and +# 'quotacheck.mode=force' + +r! /forcefsck +r! /fastboot +r! /forcequotacheck 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 -- cgit v1.2.1