From: Zbigniew Jędrzejewski-Szmek Date: Sat, 15 Apr 2017 04:56:05 +0000 (-0400) Subject: meson: add journal-install and hwdb-update hooks X-Git-Tag: v234~286^2~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6e49d4e52dbd8f67e76689103a59d524423cbf1;p=thirdparty%2Fsystemd.git 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 --- diff --git a/hwdb/meson.build b/hwdb/meson.build index 4498d5e08b9..1e859fd20d4 100644 --- a/hwdb/meson.build +++ b/hwdb/meson.build @@ -25,6 +25,10 @@ if conf.get('ENABLE_HWDB', 0) == 1 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d'))) + + meson.add_install_script('sh', '-c', + 'test -n "$DESTDIR" || @0@/systemd-hwdb update' + .format(rootbindir)) endif ############################################################ diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build index 35342755d36..c182e7c4777 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 a1d33d08102..2457bc72346 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