Subject: Re: [PATCH] ci: avoid ubuntu:rolling in most jobs for now

From: Colin Stagner <[email-masked]>
Date: Fri, 6 Feb 2026 22:27:03 -0600

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 <[email-masked]>
---
 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