]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
authorPatrick Steinhardt <ps@pks.im>
Fri, 10 Oct 2025 09:41:14 +0000 (11:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 11 Oct 2025 17:10:34 +0000 (10:10 -0700)
Ubuntu 25.10 has been released. One prominent change in this version of
Ubuntu is the switch to some Rust-based utilities. Part of this switch
is also that Ubuntu now defaults to sudo-rs(1).

Unfortunately, this breaks our CI because sudo-rs(1) does not support
the `--preserve-env` flag. Let's revert back to the C-based sudo(1)
implementation to fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/install-dependencies.sh

index d061a4729339e097f868ac3bc5e01461f0ee42f7..6668c4df849350f243cf6948af11575ffbaa9909 100755 (executable)
@@ -61,6 +61,15 @@ ubuntu-*|i386/ubuntu-*|debian-*)
                libsecret-1-dev libpcre2-dev meson ninja-build pkg-config \
                ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
 
+       # Starting with Ubuntu 25.10, sudo can now be provided via either
+       # sudo(1) or sudo-rs(1), with the latter being the default. The problem
+       # is that it does not support `--preserve-env` though, which we rely on
+       # in our CI. We thus revert back to the C implementation.
+       if test -f /etc/alternatives/sudo
+       then
+               sudo update-alternatives --set sudo /usr/bin/sudo.ws
+       fi
+
        case "$distro" in
        ubuntu-*)
                mkdir --parents "$CUSTOM_PATH"