# SPDX-License-Identifier: Apache-2.0
# Copyright 2026 IT Beratung Hermann GmbH

# Fedora build environment for the Wusel RPM. Matches the target (Fedora), so the
# binary links against a compatible glibc and rpmbuild is native.
#
# Rust comes from `dnf`, not mise, deliberately — the actual package build
# (`rpmbuild --rebuild`, inside wusel.spec's own %build) runs in a chroot that
# only ever satisfies BuildRequires via dnf-installed packages, the same way a
# real COPR/OBS/`mock` build does. Pinning Rust via mise here would test a
# toolchain no build service will ever actually use. build-rpm.sh's own
# `cargo vendor` step (outside the chroot, just fetching sources) still prefers
# mise when present, so a macOS host without this container gets its usual
# pinned toolchain for that one step — but *this* image, the one that actually
# builds the package, matches the target: `rust >= 1.85` (wusel.spec's
# BuildRequires) against whatever Fedora 44 currently ships (see the Cargo.toml
# comment by rust-version for why 1.85 and not something newer-looking).
FROM fedora:44

ENV LANG=C.UTF-8

RUN dnf -y install \
        git \
        rust cargo \
        gcc make pkgconf-pkg-config \
        nautilus-devel glib2-devel fuse3-devel \
        rpm-build \
    && dnf clean all

WORKDIR /work

CMD ["bash"]
