summaryrefslogtreecommitdiff
path: root/src/journal-remote
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-04 09:59:09 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-04 10:16:48 +0200
commit6ed5ef9819c143b65a9f92c63b65d66feac59506 (patch)
tree380795fc70e5ae2e319694101bf4cfe346c66ada /src/journal-remote
parent7810d22171bbff1301397357afd4146016a60bde (diff)
downloadsystemd-6ed5ef9819c143b65a9f92c63b65d66feac59506.tar.gz
meson: create /var/log/journal/{,remote/} conditionally
Not everybody has those dirs in the filesystem (and they don't need to). When creating an installation package using $DESTDIR, it is easy enough to remove or ignore those directories, but if installing into a real root, it is ugly to create and remove them. Let's add an option so people can skip it if they want. Inspired by #12930.
Diffstat (limited to 'src/journal-remote')
-rw-r--r--src/journal-remote/meson.build12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build
index 2887daa4bf..87b8ba6495 100644
--- a/src/journal-remote/meson.build
+++ b/src/journal-remote/meson.build
@@ -63,9 +63,11 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
install_data('browse.html',
install_dir : join_paths(pkgdatadir, 'gatewayd'))
- meson.add_install_script('sh', '-c',
- mkdir_p.format('/var/log/journal/remote'))
- meson.add_install_script('sh', '-c',
- '''chown 0:0 $DESTDIR/var/log/journal/remote &&
- chmod 755 $DESTDIR/var/log/journal/remote || :''')
+ if get_option('create-log-dirs')
+ meson.add_install_script('sh', '-c',
+ mkdir_p.format('/var/log/journal/remote'))
+ meson.add_install_script('sh', '-c',
+ '''chown 0:0 $DESTDIR/var/log/journal/remote &&
+ chmod 755 $DESTDIR/var/log/journal/remote || :''')
+ endif
endif