git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 10, 2025, 16:44 UTC
Message-ID
<xmqqzf9y905f.fsf@gitster.g>
In-Reply-To
<20251010-b4-pks-ci-ubuntu-sudo-rs-v1-1-88cc846d251c@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 14 quoted lines
> 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.

It is curious why this is done outside Ubuntu. The context is that the outermost case "$distro" has this arm

    ubuntu-*|i386/ubuntu-*|debian-*)
which is where the patched code appears.
Show 12 quoted lines
> @@ -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

So at least shouldn't we be limiting ourselves to do this only when /usr/bin/sudo.ws exists? Or do it in the nested case "$distro" that immediately follows this one to limit the effect only to Ubuntu (which may need to make this into a helper function that is called for both ubuntu-* and i386/ubuntu-* arms)?

>  	case "$distro" in
>  	ubuntu-*)
>  		mkdir --parents "$CUSTOM_PATH"
Thanks.
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 2 of 6 in “ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)”
  1. ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)Patrick Steinhardt, Oct 10, 2025
  2. Junio C HamanoOct 10, 2025
  3. Patrick SteinhardtOct 11, 2025
  4. brian m. carlsonOct 10, 2025
  5. Patrick SteinhardtOct 11, 2025
  6. Junio C HamanoOct 13, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.