]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: don't install broken tmpfiles config with sshd?confdir == 'no'
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 30 Jan 2024 10:25:19 +0000 (11:25 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 30 Jan 2024 17:56:21 +0000 (17:56 +0000)
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.

meson.build
src/ssh-generator/meson.build
src/userdb/meson.build
tmpfiles.d/meson.build

index 136b1eac214088f0f2e035531f59e59669481d7d..1001c114a424add7dcb3925656b1ce3526633604 100644 (file)
@@ -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)
 
 #####################################################################
index 4cc64647ed75f27e10f7408ad5f38ee5dd89999e..ab01da3c05e6b1b6cec918204a4136782dbb8a5e 100644 (file)
@@ -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',
index 2ee366dbaee29ceb640a75938e2e52d72e043caa..35303533c37c30dea4d38aea774f34a3bdf9f6e6 100644 (file)
@@ -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',
index d05ea94c160583f0b7ed76b1a0302a375f6d1560..bec24ac7b4db119a5db9eee6eb2aca55bd641b96 100644 (file)
@@ -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