]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: use jinja2 in sysctl.d/
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 16 May 2021 14:01:24 +0000 (16:01 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 May 2021 01:24:43 +0000 (10:24 +0900)
sysctl.d/50-coredump.conf.in
sysctl.d/meson.build

index 2ffc1cb0fb41f8843c6165a014db36c738e7ba28..5fb551a8cf9fd6260ea4dcee24eba63cb52ca430 100644 (file)
@@ -13,7 +13,7 @@
 # the core dump.
 #
 # See systemd-coredump(8) and core(5).
-kernel.core_pattern=|@rootlibexecdir@/systemd-coredump %P %u %g %s %t %c %h
+kernel.core_pattern=|{{ROOTLIBEXECDIR}}/systemd-coredump %P %u %g %s %t %c %h
 
 # Allow 16 coredumps to be dispatched in parallel by the kernel.
 # We collect metadata from /proc/%P/, and thus need to make sure the crashed
index 7e3482af62a99589b21f8b2060e1d8980a01a1f4..6f3db5955484836dd27a6434230747c9ff4d9e6a 100644 (file)
@@ -5,8 +5,6 @@ install_data(
         '50-default.conf',
         install_dir : sysctldir)
 
-in_files = []
-
 # Kernel determines PID_MAX_LIMIT by
 # #define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
 #         (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
@@ -14,18 +12,14 @@ if cc.sizeof('long') > 4
         install_data('50-pid-max.conf', install_dir : sysctldir)
 endif
 
-if conf.get('ENABLE_COREDUMP') == 1
-        in_files += ['50-coredump.conf']
-endif
-
-foreach file : in_files
-        gen = configure_file(
-                input : file + '.in',
-                output : file,
-                configuration : substs)
-        install_data(gen,
-                     install_dir : sysctldir)
-endforeach
+custom_target(
+        '50-coredump.conf',
+        input : '50-coredump.conf.in',
+        output : '50-coredump.conf',
+        command : [meson_render_jinja2, config_h, '@INPUT@'],
+        capture : true,
+        install : conf.get('ENABLE_COREDUMP') == 1,
+        install_dir : sysctldir)
 
 if install_sysconfdir
         meson.add_install_script('sh', '-c',