public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ci: avoid ubuntu:rolling in most jobs for now
@ 2026-02-05 21:26 Junio C Hamano
  2026-02-05 21:55 ` Collin Funk
  2026-02-06  7:39 ` Patrick Steinhardt
  0 siblings, 2 replies; 6+ messages in thread
From: Junio C Hamano @ 2026-02-05 21:26 UTC (permalink / raw)
  To: git; +Cc: Colin Stagner

We just was hit by buggy uutils dirname in ubuntu:rolling.
Avoid breakage caused by being on the bleeding edge.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

 * So here is what I have near the merge of "let's test contrib/
   stuff as well" in 'seen' for today's integration to avoid getting
   hit by broken dirname in ubuntu:rolling reported earlier in

    https://lore.kernel.org/git/ef128e1d-dd3e-4573-bfcd-6a98a0a1f394@howdoi.land/

   Until uutils used by ubuntu:rolling stabilizes a bit more, we may
   want to keep a patch like this in our CI jobs.  Or we may offer
   ourselves as a guinea-pig?  I do not have strong preference
   either way.

 .github/workflows/main.yml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f2e93f5461..0b4567c99f 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -377,10 +377,10 @@ jobs:
       matrix:
         vector:
         - jobname: linux-sha256
-          image: ubuntu:rolling
+          image: ubuntu:latest
           cc: clang
         - jobname: linux-reftable
-          image: ubuntu:rolling
+          image: ubuntu:latest
           cc: clang
         - jobname: linux-TEST-vars
           image: ubuntu:20.04
@@ -388,20 +388,20 @@ jobs:
           cc_package: gcc-8
         - jobname: linux-breaking-changes
           cc: gcc
-          image: ubuntu:rolling
+          image: ubuntu:latest
         - jobname: fedora-breaking-changes-meson
           image: fedora:latest
         - jobname: linux-leaks
-          image: ubuntu:rolling
+          image: ubuntu:latest
           cc: gcc
         - jobname: linux-reftable-leaks
-          image: ubuntu:rolling
+          image: ubuntu:latest
           cc: gcc
         - jobname: linux-asan-ubsan
-          image: ubuntu:rolling
+          image: ubuntu:latest
           cc: clang
         - jobname: linux-meson
-          image: ubuntu:rolling
+          image: ubuntu:latest
           cc: gcc
         - jobname: linux-musl-meson
           image: alpine:latest
-- 
2.53.0-181-gfd50f4332d


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

* Re: [PATCH] ci: avoid ubuntu:rolling in most jobs for now
  2026-02-05 21:26 [PATCH] ci: avoid ubuntu:rolling in most jobs for now Junio C Hamano
@ 2026-02-05 21:55 ` Collin Funk
  2026-02-06  7:39 ` Patrick Steinhardt
  1 sibling, 0 replies; 6+ messages in thread
From: Collin Funk @ 2026-02-05 21:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Colin Stagner

Junio C Hamano <gitster@pobox.com> writes:

> We just was hit by buggy uutils dirname in ubuntu:rolling.
> Avoid breakage caused by being on the bleeding edge.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>
>  * So here is what I have near the merge of "let's test contrib/
>    stuff as well" in 'seen' for today's integration to avoid getting
>    hit by broken dirname in ubuntu:rolling reported earlier in
>
>     https://lore.kernel.org/git/ef128e1d-dd3e-4573-bfcd-6a98a0a1f394@howdoi.land/
>
>    Until uutils used by ubuntu:rolling stabilizes a bit more, we may
>    want to keep a patch like this in our CI jobs.  Or we may offer
>    ourselves as a guinea-pig?  I do not have strong preference
>    either way.
>
>  .github/workflows/main.yml | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

If you would prefer to keep using ubuntu:rolling, you can do something
like this:

    $ podman run --rm -it ubuntu:25.10
    $ dirname --version
    dirname (uutils coreutils) 0.2.2
    $ apt-get upgrade -y; apt-get update -y;
    [...]
    $ apt-get install -y coreutils-from-gnu coreutils-from-uutils- \
        --allow-remove-essential
    [...]
    $ dirname --version | head -n 1
    dirname (GNU coreutils) 9.5

I'm not familiar with the CI, so I am not voting for either option. I'll
let others decide. :)

Collin

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

* Re: [PATCH] ci: avoid ubuntu:rolling in most jobs for now
  2026-02-05 21:26 [PATCH] ci: avoid ubuntu:rolling in most jobs for now Junio C Hamano
  2026-02-05 21:55 ` Collin Funk
@ 2026-02-06  7:39 ` Patrick Steinhardt
  2026-02-07  4:27   ` Colin Stagner
  1 sibling, 1 reply; 6+ messages in thread
From: Patrick Steinhardt @ 2026-02-06  7:39 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Colin Stagner

On Thu, Feb 05, 2026 at 01:26:42PM -0800, Junio C Hamano wrote:
> We just was hit by buggy uutils dirname in ubuntu:rolling.
> Avoid breakage caused by being on the bleeding edge.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> 
>  * So here is what I have near the merge of "let's test contrib/
>    stuff as well" in 'seen' for today's integration to avoid getting
>    hit by broken dirname in ubuntu:rolling reported earlier in
> 
>     https://lore.kernel.org/git/ef128e1d-dd3e-4573-bfcd-6a98a0a1f394@howdoi.land/
> 
>    Until uutils used by ubuntu:rolling stabilizes a bit more, we may
>    want to keep a patch like this in our CI jobs.  Or we may offer
>    ourselves as a guinea-pig?  I do not have strong preference
>    either way.

I think being a guinea-pig and reporting any issues we find to upstream
would be the best outcome. It's feasible that eventually, Ubuntu may
fully switch over to uutils, and if that's the case it would be great if
we had already ironed out all the bugs that we happen to hit ourselves.

So I think demoting to "latest" is a fine intermediate step to fix our
CI, but ideally we'd do a similar workaround to the sudo.ws workaround
we have in "ci/install-dependencies.sh" so that we only disable the
pieces that _don't_ work. That'd make it easy to contiue using the parts
that _do_ work, and once the bug has been fixed upstreamed and has
become part of Ubuntu we can then disable the workaround.

I plan to have a deeper look at our CI next week anyway to fix some
small warts and a test failure that we hit on GitLab with the MSVC job.
So maybe we commit your fix as an intermediate step, and I'll then
revert it and come up with a more localized fix?

Thanks!

Patrick

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

* Re: [PATCH] ci: avoid ubuntu:rolling in most jobs for now
  2026-02-06  7:39 ` Patrick Steinhardt
@ 2026-02-07  4:27   ` Colin Stagner
  2026-02-07  4:56     ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Stagner @ 2026-02-07  4:27 UTC (permalink / raw)
  To: Patrick Steinhardt, Junio C Hamano; +Cc: git, Colin Stagner

On 2/6/26 01:39, Patrick Steinhardt wrote:

> On 2/5/26 15:55, Collin Funk wrote:
>> If you would prefer to keep usingubuntu:rolling, you can do something
>> like this:
>> 
>>      $ podman run --rm -itubuntu:25.10
>>      $ dirname --version
>>      dirname (uutils coreutils) 0.2.2
>>      $ apt-get upgrade -y; apt-get update -y;
>>      [...]
>>      $ apt-get install -y coreutils-from-gnu coreutils-from-uutils- \
>>          --allow-remove-essential
>>      [...]
>>      $ dirname --version | head -n 1
>>      dirname (GNU coreutils) 9.5
>
> ideally we'd do a similar workaround to the sudo.ws workaround
> we have in "ci/install-dependencies.sh" so that we only disable the
> pieces that _don't_ work.

The ubuntu:rolling image still has GNU coreutils installed, but all
the command names are prefixed with "gnu". This approach replaces
only `dirname`. Feel free to adapt or discard as you like---this
isn't my CI!

Colin

-- >8 --
Subject: [PATCH] ci: ubuntu: use GNU coreutils for dirname

The uutils version of `dirname` has output that is inconsistent
with GNU coreutils. Prefer the GNU implementation of this command.

Signed-off-by: Colin Stagner <ask+git@howdoi.land>
---
 ci/install-dependencies.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 6ee8216a05..617b90cbc9 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -71,16 +71,27 @@ ubuntu-*|i386/ubuntu-*|debian-*)
 	# 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
 
+	# on uutils v0.2.2 from rust-coreutils,
+	#     dirname "foo/."
+	# outputs "." instead of "foo" like it should.
+	# Use GNU coreutils to provide dirname instead.
+	#
+	# See <https://github.com/uutils/coreutils/issues/10508>.
+	if test -x /usr/bin/gnudirname
+	then
+		ln -sfT /usr/bin/gnudirname /usr/bin/dirname
+	fi
+
 	case "$distro" in
 	ubuntu-*)
 		mkdir --parents "$CUSTOM_PATH"
 
 		wget --quiet --directory-prefix="$CUSTOM_PATH" \
 			"$P4WHENCE/bin.linux26x86_64/p4d" \
 			"$P4WHENCE/bin.linux26x86_64/p4" &&
 		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {

base-commit: 3e0db84c88c57e70ac8be8c196dfa92c5d656fbc
-- 
2.43.0


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

* Re: [PATCH] ci: avoid ubuntu:rolling in most jobs for now
  2026-02-07  4:27   ` Colin Stagner
@ 2026-02-07  4:56     ` Junio C Hamano
  2026-02-07  5:35       ` Colin Stagner
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2026-02-07  4:56 UTC (permalink / raw)
  To: Colin Stagner; +Cc: Patrick Steinhardt, git

Colin Stagner <ask+git@howdoi.land> writes:

> Subject: [PATCH] ci: ubuntu: use GNU coreutils for dirname
>
> The uutils version of `dirname` has output that is inconsistent
> with GNU coreutils. Prefer the GNU implementation of this command.
>
> Signed-off-by: Colin Stagner <ask+git@howdoi.land>
> ---
>  ci/install-dependencies.sh | 11 +++++++++++
>  1 file changed, 11 insertions(+)

Hmm, this certainly is a more focused solution.  Let me revert my
demote-from-rolling-to-latest hack and replace it with this one.

If we hit more breakages and at unacceptable high frequency, we may
want to change our mind and write off rolling as not stable enough
yet, but if we are lucky we won't have to.  Knock, knock...

> diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> index 6ee8216a05..617b90cbc9 100755
> --- a/ci/install-dependencies.sh
> +++ b/ci/install-dependencies.sh
> @@ -71,16 +71,27 @@ ubuntu-*|i386/ubuntu-*|debian-*)
>  	# 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
>  
> +	# on uutils v0.2.2 from rust-coreutils,
> +	#     dirname "foo/."
> +	# outputs "." instead of "foo" like it should.
> +	# Use GNU coreutils to provide dirname instead.
> +	#
> +	# See <https://github.com/uutils/coreutils/issues/10508>.
> +	if test -x /usr/bin/gnudirname
> +	then
> +		ln -sfT /usr/bin/gnudirname /usr/bin/dirname

"-T" is somewhat exotic, certainly outside POSIX, and is not needed
in this case, no?

> +	fi
> +
>  	case "$distro" in
>  	ubuntu-*)
>  		mkdir --parents "$CUSTOM_PATH"
>  
>  		wget --quiet --directory-prefix="$CUSTOM_PATH" \
>  			"$P4WHENCE/bin.linux26x86_64/p4d" \
>  			"$P4WHENCE/bin.linux26x86_64/p4" &&
>  		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
>
> base-commit: 3e0db84c88c57e70ac8be8c196dfa92c5d656fbc

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

* Re: [PATCH] ci: avoid ubuntu:rolling in most jobs for now
  2026-02-07  4:56     ` Junio C Hamano
@ 2026-02-07  5:35       ` Colin Stagner
  0 siblings, 0 replies; 6+ messages in thread
From: Colin Stagner @ 2026-02-07  5:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Patrick Steinhardt, git

On 2/6/26 22:56, Junio C Hamano wrote:
>> +	if test -x /usr/bin/gnudirname
>> +	then
>> +		ln -sfT /usr/bin/gnudirname /usr/bin/dirname
> "-T" is somewhat exotic, certainly outside POSIX, and is not needed
> in this case, no?

Correct, this works just fine without it. You can omit it.

When requesting an ln, I usually know and specify both filenames 
exactly. I do not desire directory behavior as I might for cp or mv. -T 
/ --no-target-directory is useful for this, if perhaps non-portable.

The coreutils info docs [1] highlight an interesting race condition that 
is avoided by --no-target-directory:

   when the command ‘mv /tmp/source /tmp/dest’ succeeds,
   there is no guarantee that /tmp/source was renamed
   to /tmp/dest: it could have been renamed to
   /tmp/dest/source ...  if mv -T /tmp/source /tmp/dest
   succeeds, there is no question that /tmp/source was
   renamed to /tmp/dest.

but I avoid writing to /tmp itself with anything other than mktemp or 
rm, for this very reason.

[1]: 
https://www.gnu.org/software/coreutils/manual/html_node/Target-directory.html



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

end of thread, other threads:[~2026-02-07  5:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-05 21:26 [PATCH] ci: avoid ubuntu:rolling in most jobs for now Junio C Hamano
2026-02-05 21:55 ` Collin Funk
2026-02-06  7:39 ` Patrick Steinhardt
2026-02-07  4:27   ` Colin Stagner
2026-02-07  4:56     ` Junio C Hamano
2026-02-07  5:35       ` Colin Stagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox