From: Frantisek Sumsal Date: Tue, 30 Jan 2024 10:25:19 +0000 (+0100) Subject: meson: don't install broken tmpfiles config with sshd?confdir == 'no' X-Git-Tag: v256-rc1~1011 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62670a7752fdcdf1bd4eb81c3afe4080fa945a04;p=thirdparty%2Fsystemd.git meson: don't install broken tmpfiles config with sshd?confdir == 'no' 20-systemd-ssh-generator.conf expands SSHCONFDIR, which is bogus when we build with -Dsshconfdir=no. Similarly, avoid expanding SSHDCONFDIR in 20-systemd-userdb.conf when building with -Dsshconfdir=no. Follow-up 6c7fc5d5f2. --- diff --git a/meson.build b/meson.build index 136b1eac214..1001c114a42 100644 --- a/meson.build +++ b/meson.build @@ -1669,6 +1669,9 @@ conf.set10('ENABLE_NSS', enable_nss) conf.set10('ENABLE_TIMEDATECTL', get_option('timedated') or get_option('timesyncd')) +conf.set10('ENABLE_SSH_PROXY_CONFIG', sshconfdir != 'no') +conf.set10('ENABLE_SSH_USERDB_CONFIG', conf.get('ENABLE_USERDB') == 1 and sshdconfdir != 'no') + conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests) ##################################################################### diff --git a/src/ssh-generator/meson.build b/src/ssh-generator/meson.build index 4cc64647ed7..ab01da3c05e 100644 --- a/src/ssh-generator/meson.build +++ b/src/ssh-generator/meson.build @@ -11,7 +11,7 @@ executables += [ }, ] -if sshconfdir != 'no' +if conf.get('ENABLE_SSH_PROXY_CONFIG') == 1 custom_target( '20-systemd-ssh-proxy.conf', input : '20-systemd-ssh-proxy.conf.in', diff --git a/src/userdb/meson.build b/src/userdb/meson.build index 2ee366dbaee..35303533c37 100644 --- a/src/userdb/meson.build +++ b/src/userdb/meson.build @@ -24,7 +24,7 @@ executables += [ }, ] -if conf.get('ENABLE_USERDB') == 1 and sshdconfdir != 'no' +if conf.get('ENABLE_SSH_USERDB_CONFIG') == 1 custom_target( '20-systemd-userdb.conf', input : '20-systemd-userdb.conf.in', diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build index d05ea94c160..bec24ac7b4d 100644 --- a/tmpfiles.d/meson.build +++ b/tmpfiles.d/meson.build @@ -34,8 +34,8 @@ in_files = [['etc.conf', ''], ['static-nodes-permissions.conf', ''], ['systemd.conf', ''], ['var.conf', ''], - ['20-systemd-userdb.conf', 'ENABLE_USERDB'], - ['20-systemd-ssh-generator.conf', ''], + ['20-systemd-userdb.conf', 'ENABLE_SSH_USERDB_CONFIG'], + ['20-systemd-ssh-generator.conf', 'ENABLE_SSH_PROXY_CONFIG'], ] foreach pair : in_files