git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
Date: Sat, 11 Oct 2025 12:57:52 +0200	[thread overview]
Message-ID: <aOo4ME3dNApd0xDL@pks.im> (raw)
In-Reply-To: <xmqqzf9y905f.fsf@gitster.g>

On Fri, Oct 10, 2025 at 09:44:44AM -0700, Junio C Hamano wrote:
> 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

  reply	other threads:[~2025-10-11 10:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-10-10 21:33 ` brian m. carlson
2025-10-11 10:57   ` Patrick Steinhardt
2025-10-13 14:27     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aOo4ME3dNApd0xDL@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).