Re: [RFH] fedora: pedantic fails complaining that awk is missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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@xxxxxx>
> 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@xxxxxxxxx>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> ---

Thanks for not crediting my initial report ;-)
The patch text is as expected.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux