packages: name the basic tools Fedora's image does not ship, and drop rust-cache

Run 31383454158, fedora job, first line of the build:

    justfile:3:  make := `which make`
    sh: line 1: which: command not found

Fedora's container image is deliberately minimal and has neither `which`
-- deprecated there in favour of `command -v` -- nor make. Arch's
base-devel and Debian's build-essential include both, which is why this
broke on exactly one of the three.

Rather than fix that one symptom and rediscover the next, the recipes were
read for what they actually shell out to: 360 cargo, 163 install, 114 tar,
26 which, 18 find, 11 sed, 4 xargs, 2 make. findutils and tar are also
absent from Fedora's image, so both would have failed in turn, one run at
a time. All of them are now named, along with gzip, sed and diffutils.

Debian gains `file`, used by the deb step to pick ELF binaries out of the
staged tree for dpkg-shlibdeps. It is not part of Debian's essential set.

rust-cache is removed rather than repaired. It runs `cargo metadata` at the
workspace root to decide what to cache, and this root is a meta-repository
with no Cargo.toml -- 29 submodules, each its own crate -- so it reported
"could not find Cargo.toml" and cached nothing. Listing all 29 workspaces
would fix the error and buy a worse problem: their target directories come
to roughly 17 GB against a 10 GB per-repository limit, so the three jobs
would evict each other every run and pay the upload time for it. A cold
build is the honest cost of a workflow that runs on tags and on demand.
This commit is contained in:
2026-08-10 18:30:32 +07:00
parent e65a9722d9
commit 4bedb04f77
+28 -9
View File
@@ -83,12 +83,24 @@ jobs:
#
# The library lists are upstream's own, from the components' debian/control
# files, translated per distribution rather than trimmed.
#
# The Fedora list names a set of basic tools the other two get for free.
# Fedora's container image is deliberately minimal: no `which` (deprecated
# there in favour of `command -v`), no make, no findutils, no tar. Arch's
# base-devel and Debian's build-essential plus its essential set include
# all of them, which is why this only ever broke on one of the three.
#
# These are not guesses. The top-level justfile opens with
# `make := \`which make\``, and the submodules' own recipes shell out to
# find, xargs, tar and sed -- 114 tar invocations and 18 find between
# them. Several steps in this workflow use find as well.
- name: Install build dependencies (fedora)
if: matrix.distro == 'fedora'
run: |
dnf -y install --setopt=install_weak_deps=False \
git curl ca-certificates just \
gcc gcc-c++ cmake pkgconf-pkg-config nasm lld mold \
gcc gcc-c++ make which findutils tar gzip sed diffutils \
cmake pkgconf-pkg-config nasm lld mold \
clang-devel llvm-devel \
desktop-file-utils rpm-build \
dbus-devel expat-devel fontconfig-devel freetype-devel \
@@ -125,7 +137,7 @@ jobs:
git curl ca-certificates just \
build-essential cmake pkg-config nasm lld mold \
clang libclang-dev llvm-dev \
desktop-file-utils dpkg-dev fakeroot \
desktop-file-utils dpkg-dev fakeroot file \
libdbus-1-dev libexpat1-dev libfontconfig-dev libfreetype-dev \
libinput-dev libseat-dev libxkbcommon-dev \
libgbm-dev libegl-dev libgles-dev libwayland-dev libdisplay-info-dev \
@@ -168,13 +180,20 @@ jobs:
cargo --version
just --version
# Keyed per distribution: the same crate compiled against three different
# glibcs produces three different artifacts, and sharing one cache between
# them would mean each job invalidating the other two.
- uses: Swatinem/rust-cache@v2
with:
key: pkg-${{ matrix.distro }}
# No Swatinem/rust-cache here, unlike the two fork workflows.
#
# It was tried and it fails on this repository specifically: the action
# runs `cargo metadata` at the workspace root to work out what to cache,
# and this root is a meta-repository with no Cargo.toml -- it is 29
# submodules, each its own crate with its own target/. The action reported
# `could not find Cargo.toml in /__w/hyprcosmic/hyprcosmic` and cached
# nothing.
#
# Listing all 29 workspaces would fix the error and create a worse
# problem: their target directories come to roughly 17 GB, against a 10 GB
# per-repository cache limit, so the jobs would evict each other's entries
# every run and pay upload time for the privilege. A cold build is the
# honest cost of a workflow that only runs on tags and on demand.
- name: Determine version
id: ver
run: |