aurora/build_scripts/base/17-cleanup.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

49 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/bash
echo "::group:: ===$(basename "$0")==="
set -eoux pipefail
# TODO: Remove with F45 release
if [[ "${AKMODS_FLAVOR}" =~ coreos ]]; then
systemctl enable aurora-zfs-deprecation-notifier.timer
fi
systemctl preset-all
systemctl --global preset-all
# Disable third-party repos
for repo in fedora-multimedia tailscale fedora-cisco-openh264; do
if [[ -f "/etc/yum.repos.d/${repo}.repo" ]]; then
sed -i 's@enabled=1@enabled=0@g' "/etc/yum.repos.d/${repo}.repo"
fi
done
# Disable Terra repos (installed on F42 and earlier)
for i in /etc/yum.repos.d/terra*.repo; do
if [[ -f "$i" ]]; then
sed -i 's@enabled=1@enabled=0@g' "$i"
fi
done
# Disable all COPR repos (should already be disabled by helpers, but ensure)
for i in /etc/yum.repos.d/_copr:*.repo; do
if [[ -f "$i" ]]; then
sed -i 's@enabled=1@enabled=0@g' "$i"
fi
done
# 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
# Disable fedora-coreos-pool if it exists
if [ -f /etc/yum.repos.d/fedora-coreos-pool.repo ]; then
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-coreos-pool.repo
fi
echo "::endgroup::"