aurora/build_scripts/dx/00-dx.sh
renner 1a4be9911d
chore: cleanup systemd services, move to presets (#2892)
* chore: cleanup systemd services, move to presets

Preset files are cooler [1] and we should be able to get rid of a little
bit of complexity on the ISOs as we simply delete the preset file to
undo things we don't want to have on the ISO (uupd, tailscale ...)
instead of playing catch-up with the image [2].

Also we don't need to enable the *service* of rpm-ostree-countme, we
want to have the *timer* enabled, which is already done by default in
Fedora. The rpm-ostreed-automatic.timer is a leftover from ublue-os/main
days as we enable that for those images but disable it here as we use
uupd.

The Bazaar service got deleted and the need for that got completely
eliminated upstream recently.

[1] https://www.freedesktop.org/software/systemd/man/latest/systemd.preset.html
[2] https://github.com/get-aurora-dev/iso/issues/100

* chore: also do DX

* sunshine

we should make this a seperate thing as we want to still have this
disabled on the live iso

* deal with homebrew nonsense

* prefix with 89

so they can be overriden by others via preset files but still have more
priority over Fedora ones

* split fedora flatpak related services

so we can more easily keep this configuration active
2026-09-19 19:44:08 +00:00

119 lines
2.7 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
echo "Installing ${#FEDORA_PACKAGES[@]} DX packages from Fedora repos..."
dnf5 -y install "${FEDORA_PACKAGES[@]}"
# docker is not available for f45 yet
# https://github.com/docker/docker-ce-packaging/issues/1353
# TODO: get it from docker again once it's available
if [[ $(rpm -E %fedora) == "44" ]]; then
# Docker packages from their repo
dnf -y install --from-repo=docker-ce-stable \
containerd.io \
docker-buildx-plugin \
docker-ce \
docker-ce-cli \
docker-compose-plugin
else
# we get this from common, the fedora package provides the exact same one
rm -f /usr/lib/sysusers.d/docker.conf
dnf -y install \
containerd \
docker-buildx \
moby-engine \
docker-cli \
docker-compose
fi
# VSCode package from Microsoft repo
dnf -y install --from-repo=code \
code
dnf -y install --from-repo='copr:copr.fedorainfracloud.org:karmab:kcli' kcli
dnf -y install --from-repo='copr:copr.fedorainfracloud.org: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
# Disable RPM Fusion repos
for i in /etc/yum.repos.d/rpmfusion-*.repo; do
if [[ -f "$i" ]]; then
sed -i 's@enabled=1@enabled=0@g' "$i"
fi
done
echo "::endgroup::"