Skip to content

Commit

Permalink
meson: don't install broken tmpfiles config with sshd?confdir == 'no'
Browse files Browse the repository at this point in the history
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 6c7fc5d.
  • Loading branch information
mrc0mmand authored and bluca committed Jan 30, 2024
1 parent cb3244c commit 62670a7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#####################################################################
Expand Down
2 changes: 1 addition & 1 deletion src/ssh-generator/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/userdb/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions tmpfiles.d/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62670a7

Please sign in to comment.