From: Junio C Hamano <gitster@pobox•com>
To: Johannes Schindelin <Johannes.Schindelin@gmx•de>
Cc: Todd Zullinger <tmz@pobox•com>, git@vger•kernel.org
Subject: Re: [RFH] fedora: pedantic fails complaining that awk is missing
Date: Wed, 16 Apr 2025 07:03:09 -0700 [thread overview]
Message-ID: <xmqqzfggi4pu.fsf@gitster.g> (raw)
In-Reply-To: <81209cfd-049e-c853-9c4a-2cf9803e56a4@gmx.de> (Johannes Schindelin's message of "Wed, 16 Apr 2025 07:31:01 +0200 (CEST)")
Johannes Schindelin <Johannes.Schindelin@gmx•de> writes:
> This reasoning is very convincing, so I allowed myself to turn that into
> the following commit (which fixed the build:
> https://github.com/git-for-windows/git/actions/runs/14485317015/job/40629741228):
>
> -- snipsnap --
> From 4890df8bf1c1311ef0c3b5a92412ccc4f833f944 Mon Sep 17 00:00:00 2001
> From: Johannes Schindelin <johannes.schindelin@gmx•de>
> Date: Wed, 16 Apr 2025 07:17:24 +0200
> Subject: [PATCH] ci(pedantic): ensure that awk is installed
Superb. Thanks for working well together.
>
> 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, but for unintended reasons! It
> uses 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 my quick testing), 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.
>
> Using the package name "gawk" is the right thing to do.
> Note that even '*bin/awk' would have worked, but it is less specific.
> And who knows, maybe in the far future a BSD variant of awk is offered,
> too, and would then cause ambiguities. Best to avoid that.
The last two paragraphs may want to be rephrased.
The using scripts are saying "awk", not "gawk", so there is no
specific reason to avoid mawk or other implementations at least for
now. As long as installing one of them makes sure that end-user
scripts that invoke "awk" ends up invoking the one that was
installed, I have no objection to pick just one of them, but I do
not think "we must be explicit to call for 'gawk' and not any other
implementation" is what we want to say.
Instead, we should say something like "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."
Specifically, we should not say we want to avoid BSD awk, unless we
know our awk scripts won't work with it and/or fixing a bug that was
caused by the incompatibilities.
> Suggested-by: Todd Zullinger <tmz@pobox•com>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx•de>
> ---
Thanks for not crediting my initial report ;-)
The patch text is as expected.
prev parent reply other threads:[~2025-04-16 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 23:58 [RFH] fedora: pedantic fails complaining that awk is missing Junio C Hamano
2025-04-16 4:40 ` Todd Zullinger
2025-04-16 5:31 ` Johannes Schindelin
2025-04-16 14:03 ` Junio C Hamano [this message]
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=xmqqzfggi4pu.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
--cc=tmz@pobox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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