| 1030 |
1030 |
|
esac; \
|
| 1031 |
1031 |
|
for lang in $(echo "$LANGS" | tr ',' ' '); do \
|
| 1032 |
1032 |
|
case "$lang" in \
|
| 1033 |
|
- |
rust|go|python|zig|js) ;; \
|
| 1034 |
|
- |
*) echo "unknown language '$lang'; the builder offers rust, go, python, zig and js" >&2; exit 1 ;; \
|
|
1033 |
+ |
rust|c|go|python|zig|js) ;; \
|
|
1034 |
+ |
*) echo "unknown language '$lang'; the builder offers rust, c, go, python, zig and js" >&2; exit 1 ;; \
|
| 1035 |
1035 |
|
esac; \
|
| 1036 |
1036 |
|
done; \
|
| 1037 |
1037 |
|
case "$DB" in \
|
| 2114 |
2114 |
|
# default is profile-blind for the same reason — a client image has no
|
| 2115 |
2115 |
|
# more claim on a compiler than a server one.
|
| 2116 |
2116 |
|
#
|
|
2117 |
+ |
# WHAT `c` IS, because it is not a language row like the others. It is the
|
|
2118 |
+ |
# toolchain somebody needs to clone a repository and build it: gcc and g++,
|
|
2119 |
+ |
# make, cmake, meson and ninja, and the autotools trio. Ruled 2026-09-07
|
|
2120 |
+ |
# (Max), who put the goal as caring "more about being able to clone a repo
|
|
2121 |
+ |
# and compile it from scratch than keeping the original compiler for the
|
|
2122 |
+ |
# shipped binary".
|
|
2123 |
+ |
#
|
|
2124 |
+ |
# That framing is what keeps this bounded. Reproducing a shipped binary means
|
|
2125 |
+ |
# matching its toolchain and carrying every library header it linked, which is
|
|
2126 |
+ |
# unbounded and is the "spread of -devel packages that no language toggle
|
|
2127 |
+ |
# models" that killed the rebuild-what-we-ship rule. Building an arbitrary
|
|
2128 |
+ |
# checkout means having the compilers and the build systems, and letting the
|
|
2129 |
+ |
# person layer whatever that project names. The second is a fixed cost and
|
|
2130 |
+ |
# this row is it: 193 MiB across 86 packages over a rust image, measured with
|
|
2131 |
+ |
# `dnf install --assumeno` on fedora-bootc:43, 2026-09-07.
|
|
2132 |
+ |
#
|
|
2133 |
+ |
# gcc is named here as well as arriving with rust, so `LANGS=c` alone is a
|
|
2134 |
+ |
# working C toolchain rather than one that depends on another row being on.
|
|
2135 |
+ |
#
|
|
2136 |
+ |
# Weak dependencies off, matching every other install in this file. cmake
|
|
2137 |
+ |
# recommends its full documentation set and nothing here reads it.
|
|
2138 |
+ |
#
|
| 2117 |
2139 |
|
# THREE -devel PACKAGES RIDE WITH rust, and they are not the language's.
|
| 2118 |
2140 |
|
# wayland-devel, libxkbcommon-devel and fontconfig-devel are what shop
|
| 2119 |
2141 |
|
# links against, and shop is the terminal this image ships and runs. The
|
| 2142 |
2164 |
|
case "$lang" in \
|
| 2143 |
2165 |
|
rust) dnf install -y rust cargo \
|
| 2144 |
2166 |
|
wayland-devel libxkbcommon-devel fontconfig-devel ;; \
|
|
2167 |
+ |
c) dnf install -y --setopt=install_weak_deps=False \
|
|
2168 |
+ |
gcc gcc-c++ make cmake meson ninja-build \
|
|
2169 |
+ |
autoconf automake libtool patch pkgconf ;; \
|
| 2145 |
2170 |
|
go) dnf install -y golang ;; \
|
| 2146 |
2171 |
|
python) dnf install -y python3 python3-pip ;; \
|
| 2147 |
2172 |
|
zig) dnf install -y zig ;; \
|
| 2156 |
2181 |
|
pkg-config --exists "$mod" \
|
| 2157 |
2182 |
|
|| { echo "rust was asked for and $mod has no pkgconfig file; shop cannot be rebuilt on this image" >&2; exit 1; }; \
|
| 2158 |
2183 |
|
done ;; \
|
|
2184 |
+ |
c) for t in gcc g++ make cmake meson; do \
|
|
2185 |
+ |
command -v "$t" >/dev/null \
|
|
2186 |
+ |
|| { echo "c was asked for and $t is not in the image" >&2; exit 1; }; \
|
|
2187 |
+ |
done; \
|
|
2188 |
+ |
command -v ninja >/dev/null || command -v ninja-build >/dev/null \
|
|
2189 |
+ |
|| { echo "c was asked for and ninja is not in the image" >&2; exit 1; } ;; \
|
| 2159 |
2190 |
|
go) command -v go >/dev/null || { echo "go was asked for and the go binary is not in the image" >&2; exit 1; } ;; \
|
| 2160 |
2191 |
|
python) command -v python3 >/dev/null || { echo "python was asked for and python3 is not in the image" >&2; exit 1; } ;; \
|
| 2161 |
2192 |
|
zig) command -v zig >/dev/null || { echo "zig was asked for and the zig binary is not in the image" >&2; exit 1; } ;; \
|