git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
@ 2025-10-10  9:41 Patrick Steinhardt
  2025-10-10 16:44 ` Junio C Hamano
  2025-10-10 21:33 ` brian m. carlson
  0 siblings, 2 replies; 6+ messages in thread
From: Patrick Steinhardt @ 2025-10-10  9:41 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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>
---
Hi,

this breaks a bunch of our CI jobs, both for GitHub and GitLab. It would
probably make sense to fast-track the fix.

Thanks!

Patrick
---
 ci/install-dependencies.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 0d3aa496fc..a8dcd9b9bc 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -65,6 +65,15 @@ ubuntu-*|i386/ubuntu-*|debian-*)
 		libsecret-1-dev libpcre2-dev meson ninja-build pkg-config cargo \
 		${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"

---
base-commit: 60f3f52f17cceefa5299709b189ce6fe2d181e7b
change-id: 20251010-b4-pks-ci-ubuntu-sudo-rs-8e992b87ddf0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-10-13 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10  9:41 [PATCH] ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1) Patrick Steinhardt
2025-10-10 16:44 ` Junio C Hamano
2025-10-11 10:57   ` Patrick Steinhardt
2025-10-10 21:33 ` brian m. carlson
2025-10-11 10:57   ` Patrick Steinhardt
2025-10-13 14:27     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).