]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci(pedantic): ensure that awk is installed
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Wed, 16 Apr 2025 05:31:01 +0000 (07:31 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2025 14:06:02 +0000 (07:06 -0700)
The image pointed to by the fedora:latest tag has moved from fedora
41 to 42. The fedora 41 container images have awk installed while
the fedora 42 images do not.  That change is most likely just part
of reducing the size of the base container images.

In both AlmaLinux and Fedora (as well as other RHEL
derivatives/relatives), awk is provided by the gawk package.

On Fedora, `dnf install awk` would work, by using the package
filelist data to determine that /usr/bin/awk is provided by gawk and
installs gawk as a result.

On AlmaLinux (8 & 9, by quick testing by Todd), that is not the case
and you'd need to use `dnf install gawk` or `dnf install '*bin/awk'`
to get it installed. Having said that, awk _is_ included in the
current AlmaLinux 8 and 9 images, so it isn't strictly needed.  But
it's probably better to be explicit that we need it installed, as a
defense against some future change to the AlmaLinux container
removing awk.

Because we know that on both of these distros, our scripts that call
for 'awk' had been using 'gawk' that was installed as part of the
base image, let's make sure that we explicitly install 'gawk'.  If
the image already has it, it would be a no-op that does not cause
breakage.

Suggested-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/install-dependencies.sh

index 0df74610d063fb8793ea1774f030b84dc1338979..6ebe09037aaae337a411390d51b616009863839a 100755 (executable)
@@ -31,7 +31,7 @@ alpine-*)
        ;;
 fedora-*|almalinux-*)
        dnf -yq update >/dev/null &&
-       dnf -yq install shadow-utils sudo make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
+       dnf -yq install shadow-utils sudo make gcc findutils diffutils perl python3 gawk gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null
        ;;
 ubuntu-*|i386/ubuntu-*|debian-*)
        # Required so that apt doesn't wait for user input on certain packages.