]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: do not explicitly specify ownership of /var/log/journal/
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 21 Sep 2023 08:47:36 +0000 (10:47 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 21 Sep 2023 13:06:44 +0000 (14:06 +0100)
In 9289e093ae6fd5484f9119e1ee07d1dffe37cd10 we started using install_emptydir().

When running unprivileged, 'DESTDIR=… meson install -C build --quiet --no-rebuild'
would emit two warnings:
  '…/var/log/journal': Unable to set owner 'root' and group 'root': Operation not permitted, ignoring...
  '…/var/log/journal/remote': Unable to set owner 'root' and group 'root': Operation not permitted, ignoring...

Those were the only two install_emptydir()s that specified ownership.
Let's drop the user/group specification to get rid of the warning.

When installing as root, we will create a root-owned directory anyway.
When not running as root, we cannot create a root-owned directory.
So this specification only makes a difference if we are running as root,
and the directory already existed, and was not owned by root. In that case,
I think it's actually better to leave the existing modification in place.
(E.g. maybe the admin chgrp'ed the ownership for whatever reason. We might
just as well leave that in place.)

src/journal-remote/meson.build
src/journal/meson.build

index 28c47043dc2bfe366052dd1a00ae2be305a97f2d..fe766dbb018535f6651a5f87a538d71f04dad4b7 100644 (file)
@@ -114,6 +114,6 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
 
         if get_option('create-log-dirs')
                 install_emptydir('/var/log/journal/remote',
-                                 install_mode : [ 'rwxr-xr-x', 'root', 'root' ])
+                                 install_mode : 'rwxr-xr-x')
         endif
 endif
index 402522827f46563e247df9b6bfe9b9cd35a0fff5..42b3131f658e9a72224bb76613dcf8c1f38a5bff 100644 (file)
@@ -185,7 +185,7 @@ endif
 
 if get_option('create-log-dirs')
         install_emptydir('/var/log/journal',
-                         install_mode : [ 'rwxr-xr-x', 'root', 'root' ])
+                         install_mode : 'rwxr-xr-x')
         if get_option('adm-group')
                 meson.add_install_script(
                         sh, '-c',