git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
Date: Fri, 10 Oct 2025 09:44:44 -0700	[thread overview]
Message-ID: <xmqqzf9y905f.fsf@gitster.g> (raw)
In-Reply-To: <20251010-b4-pks-ci-ubuntu-sudo-rs-v1-1-88cc846d251c@pks.im> (Patrick Steinhardt's message of "Fri, 10 Oct 2025 11:41:14 +0200")

Patrick Steinhardt <ps@pks.im> writes:

> 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.

> @@ -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.

  reply	other threads:[~2025-10-10 16:44 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 [this message]
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

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=xmqqzf9y905f.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /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).