aurora/build_scripts/dx/00-dx.sh
renner 728717d75e
refactor: use dnf do for some 3rd-party repositories (#2983)
In the past we have moved away from doing big dnf transactions spanning
multiple rpm repositories [1] because of the associated risk of third
party repos injecting packages we expect to get from Fedora. With this
we explicitly set which packages are allowed to be installed from each
repo. This means we still get to do big transactions which are generally
faster.

The downside of this is that if subpackages or dependencies from a
3rd-party repo get introduced/change then our builds will break, I think
this is fine as the ones I'm changing here have been unchanging for a
while.

This should only touch repositories with a very specific purpose/single
projects.

This purposefully doesn't touch any ublue-os coprs or negativo (also
they are difficult to handle as we use them in the nvidia script [2]),
those are the only mono-repos so outright excluding the packages is not
an easy option as we would make custom image builds (and usr-overlays
for testing) more annoying.

[1] https://github.com/ublue-os/aurora/issues/1115
[2] 1e4d10b9ac/build_files/nvidia/nvidia-install.sh
2026-10-10 17:30:41 +02:00

99 lines
2.1 KiB
Bash
Executable file

#!/usr/bin/bash
echo "::group:: ===$(basename "$0")==="
set -ouex pipefail
# Apply IP Forwarding before installing Docker to prevent messing with LXC networking
sysctl -p
# DX packages from Fedora repos - common to all versions
FEDORA_PACKAGES=(
android-tools
bcc
bcvk
bpftop
bpftrace
cockpit-bridge
cockpit-machines
cockpit-networkmanager
cockpit-ostree
cockpit-podman
cockpit-selinux
cockpit-storaged
cockpit-system
edk2-ovmf
flatpak-builder
incus
incus-agent
iotop
libvirt
libvirt-nss
lxc
nicstat
numactl
osbuild-selinux
p7zip
p7zip-plugins
podman-compose
podman-machine
podman-tui
qemu
qemu-char-spice
qemu-device-display-virtio-gpu
qemu-device-display-virtio-vga
qemu-device-usb-redirect
qemu-img
qemu-system-x86-core
qemu-user-binfmt
qemu-user-static
sysprof
trace-cmd
udica
virt-manager
virt-v2v
virt-viewer
ydotool
)
# rocm doesn't work well on nvidia
if [[ ! "${IMAGE_NAME}" =~ nvidia ]]; then
FEDORA_PACKAGES+=("rocm-hip" "rocm-opencl" "rocm-smi")
fi
dnf5 -y install "${FEDORA_PACKAGES[@]}"
# We could use Fedora's moby packages, these are "official"
DOCKER_CE=(
containerd.io
docker-buildx-plugin
docker-ce
docker-ce-cli
docker-compose-plugin
)
COPR_PREFIX="copr:copr.fedorainfracloud.org"
# shellcheck disable=SC1010
dnf do -y \
--action install --from-repo=code code \
--action install --from-repo=docker-ce-stable "${DOCKER_CE[@]}" \
--action install --from-repo="${COPR_PREFIX}:karmab:kcli" kcli
dnf -y install --from-repo="${COPR_PREFIX}:ublue-os:packages" ublue-os-libvirt-workarounds
rsync -rvK /ctx/system_files/dx/ /
# Load iptable_nat module for docker-in-docker.
# See:
# - https://github.com/ublue-os/bluefin/issues/2365
# - https://github.com/devcontainers/features/issues/1235
mkdir -p /etc/modules-load.d
tee /etc/modules-load.d/ip_tables.conf <<EOF
iptable_nat
EOF
# Branding Changes
echo "Variant=Developer Experience" >> /usr/share/kde-settings/kde-profile/default/xdg/kcm-about-distrorc
echo "::endgroup::"