diff options
-rw-r--r-- | docs/var-log/meson.build | 2 | ||||
-rw-r--r-- | meson_options.txt | 2 | ||||
-rw-r--r-- | src/journal-remote/meson.build | 12 | ||||
-rw-r--r-- | src/journal/meson.build | 26 |
4 files changed, 24 insertions, 18 deletions
diff --git a/docs/var-log/meson.build b/docs/var-log/meson.build index 0ddff20ce5..993eb31d67 100644 --- a/docs/var-log/meson.build +++ b/docs/var-log/meson.build @@ -5,7 +5,7 @@ file = configure_file( output : 'README', configuration : substs) -if conf.get('HAVE_SYSV_COMPAT') == 1 +if conf.get('HAVE_SYSV_COMPAT') == 1 and get_option('create-log-dirs') install_data(file, install_dir : varlogdir) endif diff --git a/meson_options.txt b/meson_options.txt index e56d33760b..7c8a769bbc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -95,6 +95,8 @@ option('timesyncd', type : 'boolean', description : 'install the systemd-timesyncd daemon') option('remote', type : 'combo', choices : ['auto', 'true', 'false'], description : 'support for "journal over the network"') +option('create-log-dirs', type : 'boolean', + description : 'create /var/log/journal{,/remote}') option('nss-myhostname', type : 'boolean', description : 'install nss-myhostname module') option('nss-mymachines', type : 'combo', choices : ['auto', 'true', 'false'], 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 diff --git a/src/journal/meson.build b/src/journal/meson.build index e03d6dc232..5796f77cac 100644 --- a/src/journal/meson.build +++ b/src/journal/meson.build @@ -111,20 +111,22 @@ 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') +if get_option('create-log-dirs') 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') + mkdir_p.format('/var/log/journal')) meson.add_install_script( 'sh', '-c', - 'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :') + '''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 endif |