summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-05-16 18:03:23 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-05-19 10:25:26 +0900
commit8e6c71bc19443c2049ff9a609b77c2de6e0a6e8a (patch)
tree15e1e3d4cd763ae52701aa2d218c16ac1d0ee85d
parentd34593570a54dc0c8ba8438b1e1e400dd5053ecb (diff)
downloadsystemd-8e6c71bc19443c2049ff9a609b77c2de6e0a6e8a.tar.gz
meson: use jinja2 in src/journal-remote
One stanza had "if install_sysconfdir_samples", while the other "if install_sysconfdir", which looks like a mistake. install_sysconfdir_samples is now used for both.
-rw-r--r--src/journal-remote/journal-remote.conf.in6
-rw-r--r--src/journal-remote/journal-upload.conf.in6
-rw-r--r--src/journal-remote/meson.build36
3 files changed, 23 insertions, 25 deletions
diff --git a/src/journal-remote/journal-remote.conf.in b/src/journal-remote/journal-remote.conf.in
index 4c1b78ebc1..648aa1ba11 100644
--- a/src/journal-remote/journal-remote.conf.in
+++ b/src/journal-remote/journal-remote.conf.in
@@ -15,6 +15,6 @@
[Remote]
# Seal=false
# SplitMode=host
-# ServerKeyFile=@CERTIFICATEROOT@/private/journal-remote.pem
-# ServerCertificateFile=@CERTIFICATEROOT@/certs/journal-remote.pem
-# TrustedCertificateFile=@CERTIFICATEROOT@/ca/trusted.pem
+# ServerKeyFile={{CERTIFICATE_ROOT}}/private/journal-remote.pem
+# ServerCertificateFile={{CERTIFICATE_ROOT}}/certs/journal-remote.pem
+# TrustedCertificateFile={{CERTIFICATE_ROOT}}/ca/trusted.pem
diff --git a/src/journal-remote/journal-upload.conf.in b/src/journal-remote/journal-upload.conf.in
index 29b623bdfa..94471e4a00 100644
--- a/src/journal-remote/journal-upload.conf.in
+++ b/src/journal-remote/journal-upload.conf.in
@@ -14,6 +14,6 @@
[Upload]
# URL=
-# ServerKeyFile=@CERTIFICATEROOT@/private/journal-upload.pem
-# ServerCertificateFile=@CERTIFICATEROOT@/certs/journal-upload.pem
-# TrustedCertificateFile=@CERTIFICATEROOT@/ca/trusted.pem
+# ServerKeyFile={{CERTIFICATE_ROOT}}/private/journal-upload.pem
+# ServerCertificateFile={{CERTIFICATE_ROOT}}/certs/journal-upload.pem
+# TrustedCertificateFile={{CERTIFICATE_ROOT}}/ca/trusted.pem
diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build
index c42d85bc4b..d516fbabf7 100644
--- a/src/journal-remote/meson.build
+++ b/src/journal-remote/meson.build
@@ -42,27 +42,25 @@ systemd_journal_gatewayd_sources = files('''
microhttpd-util.c
'''.split())
-if conf.get('ENABLE_REMOTE') ==1 and conf.get('HAVE_LIBCURL') == 1
- journal_upload_conf = configure_file(
- input : 'journal-upload.conf.in',
- output : 'journal-upload.conf',
- configuration : substs)
- if install_sysconfdir
- install_data(journal_upload_conf,
- install_dir : pkgsysconfdir)
- endif
-endif
+in_files = [
+ ['journal-upload.conf',
+ conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1 and install_sysconfdir_samples],
+ ['journal-remote.conf',
+ conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1 and install_sysconfdir_samples]]
-if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
- journal_remote_conf = configure_file(
- input : 'journal-remote.conf.in',
- output : 'journal-remote.conf',
- configuration : substs)
- if install_sysconfdir_samples
- install_data(journal_remote_conf,
- install_dir : pkgsysconfdir)
- endif
+foreach tuple : in_files
+ file = tuple[0]
+ custom_target(
+ file,
+ input : file + '.in',
+ output: file,
+ command : [meson_render_jinja2, config_h, '@INPUT@'],
+ capture : true,
+ install : tuple[1],
+ install_dir : pkgsysconfdir)
+endforeach
+if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
install_data('browse.html',
install_dir : join_paths(pkgdatadir, 'gatewayd'))