summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-15 06:56:05 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-24 03:47:29 +0200
commitf6e49d4e52dbd8f67e76689103a59d524423cbf1 (patch)
treed652b1912728384ef6f306de97f19ba3160dbd03 /src
parentmeson: add hwdb/update target (diff)
downloadsystemd-f6e49d4e52dbd8f67e76689103a59d524423cbf1.tar.xz
systemd-f6e49d4e52dbd8f67e76689103a59d524423cbf1.zip
meson: add journal-install and hwdb-update hooks
v2: - ignore errors in chown/chmod/setfacl - obey -Dadm-group=false, -Dwheel-group=false - fix reversed condition for systemd-hwdb update hook
Diffstat (limited to 'src')
-rw-r--r--src/journal-remote/meson.build4
-rw-r--r--src/journal/meson.build14
2 files changed, 16 insertions, 2 deletions
diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build
index 35342755d3..c182e7c477 100644
--- a/src/journal-remote/meson.build
+++ b/src/journal-remote/meson.build
@@ -47,5 +47,5 @@ install_data('browse.html',
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''')
+ 'chown 0:0 $DESTDIR/var/log/journal/remote &&
+ chmod 755 $DESTDIR/var/log/journal/remote || :')
diff --git a/src/journal/meson.build b/src/journal/meson.build
index a1d33d0810..2457bc7234 100644
--- a/src/journal/meson.build
+++ b/src/journal/meson.build
@@ -93,3 +93,17 @@ endif
install_data('journald.conf',
install_dir : pkgsysconfdir)
+
+meson.add_install_script('sh', '-c',
+ mkdir_p.format('/var/log/journal'))
+meson.add_install_script('sh', '-c',
+ 'chown 0:0 $DESTDIR/var/log/journal &&
+ chmod 755 $DESTDIR/var/log/journal || :')
+if get_option('adm-group')
+ meson.add_install_script('sh', '-c',
+ 'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
+endif
+if get_option('wheel-group')
+ meson.add_install_script('sh', '-c',
+ 'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
+endif