From 44fcb9a7e7deecd0a42026e15b92874d49c09646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 21 Sep 2023 10:47:36 +0200 Subject: [PATCH] meson: do not explicitly specify ownership of /var/log/journal/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 | 2 +- src/journal/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build index 28c47043dc2..fe766dbb018 100644 --- a/src/journal-remote/meson.build +++ b/src/journal-remote/meson.build @@ -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 diff --git a/src/journal/meson.build b/src/journal/meson.build index 402522827f4..42b3131f658 100644 --- a/src/journal/meson.build +++ b/src/journal/meson.build @@ -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',