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
Patrick Steinhardt <ps@pks.im>
Date
Oct 11, 2025, 10:57 UTC
Message-ID
<aOo4ME3dNApd0xDL@pks.im>
In-Reply-To
<xmqqzf9y905f.fsf@gitster.g>
On Fri, Oct 10, 2025 at 09:44:44AM -0700, Junio C Hamano wrote:
Show 19 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> > @@ -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)?

No other distro has this sudo.ws / sudo-rs split at the current point in time, and because of this they don't have /etc/alternatives/sudo, either. So for now at least the condition should be sufficient, I think.

If we want to tighten this we could probably make this something like "if test -f /etc/alternatives/sudo && test -f /usr/bin/sudo.ws". But to be honest, I feel like all variants are somewhat brittle here and there's scenarios where all of them will fail with upstream changes. So I feel like the current version is good enough, but I'm happy to adjust if you continue to feel otherwise.

Also, we don't have to do this for i386/ubuntu. Ubuntu has dropped 32 bit support, so it won't ever adopt this split. I have a patch series pending that'll convert this CI job to instead use i386/debian, which still continues to maintain 32 bit.

Thanks!
Patrick
Previous: Junio C HamanoNext: brian m. carlson
Message 3 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.