]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: guard symlinks in sysconfdir behind install_sysconfidr
authornikstur <nikstur@outlook.com>
Sun, 8 Feb 2026 13:22:28 +0000 (14:22 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 9 Feb 2026 15:52:53 +0000 (16:52 +0100)
Symlinks to files inside sysconfdir are now only installed if
ìnstall_sysconfdir=true (which is the default).

If sshconfdir,sshdconfdir,shellprofiledir are not inside sysconfdir and
install_sysconfidr=false, these symlinks are still installed to the
configured directory.

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

index b1692920f4d1a5188f1c96953b8d02338ceb80be..9551d2a11157f1fb80921e85aa2bf0a00e746c79 100644 (file)
@@ -3,7 +3,7 @@
 install_data('70-systemd-shell-extra.sh', install_dir : shellprofiledir.startswith('/usr/') ? shellprofiledir : libexecdir / 'profile.d')
 install_data('80-systemd-osc-context.sh', install_dir : shellprofiledir.startswith('/usr/') ? shellprofiledir : libexecdir / 'profile.d')
 
-if conf.get('LINK_SHELL_EXTRA_DROPIN') == 1
+if (not shellprofiledir.startswith(sysconfdir) or install_sysconfdir) and conf.get('LINK_SHELL_EXTRA_DROPIN') == 1
         if meson.version().version_compare('>=1.3.0')
                 install_symlink(
                         '70-systemd-shell-extra.sh',
@@ -19,7 +19,7 @@ if conf.get('LINK_SHELL_EXTRA_DROPIN') == 1
         endif
 endif
 
-if conf.get('LINK_OSC_CONTEXT_DROPIN') == 1
+if (not shellprofiledir.startswith(sysconfdir) or install_sysconfdir) and conf.get('LINK_OSC_CONTEXT_DROPIN') == 1
         if meson.version().version_compare('>=1.3.0')
                 install_symlink(
                         '80-systemd-osc-context.sh',
index 6fcf8d11fe013b4c72a9c6c856d60ce65f09fe07..f6babb47d3a4b6d251cc2348075eef22fe0b1237 100644 (file)
@@ -25,7 +25,7 @@ if conf.get('ENABLE_SSH_PROXY_CONFIG') == 1
                 install : true,
                 install_dir : sshconfdir.startswith('/usr/') ? sshconfdir : libexecdir / 'ssh_config.d')
 
-        if conf.get('LINK_SSH_PROXY_DROPIN') == 1
+        if (not sshconfdir.startswith(sysconfdir) or install_sysconfdir) and conf.get('LINK_SSH_PROXY_DROPIN') == 1
                 if meson.version().version_compare('>=1.3.0')
                         install_symlink(
                                 '20-systemd-ssh-proxy.conf',
index 4bb8ac17a69e0529687f7b61326de77818520f71..a933a4907b32f03c2e860559d3995c7711c457e4 100644 (file)
@@ -32,7 +32,7 @@ if conf.get('ENABLE_SSH_USERDB_CONFIG') == 1
                 install : true,
                 install_dir : sshdconfdir.startswith('/usr/') ? sshdconfdir : libexecdir / 'sshd_config.d')
 
-        if conf.get('LINK_SSHD_USERDB_DROPIN') == 1
+        if (not sshdconfdir.startswith(sysconfdir) or install_sysconfdir) and conf.get('LINK_SSHD_USERDB_DROPIN') == 1
                 if meson.version().version_compare('>=1.3.0')
                         install_symlink(
                                 '20-systemd-userdb.conf',