chore: cleanup of packages.sh (#2184)

* chore: cleanup packages.sh

We will not be building different major fedora versions from the same
branch anymore.

* chore: move flathub to fetch.sh

We don't need the flatpak command, it doesn't do anything.
`/etc/flatpak/remotes.d` is always present in the image due to flatpak
package creating this directory.

* chore: don't remove fedora plasma theme

We shouldn't be working around potential issues this way.

* test: check for flathub
This commit is contained in:
renner 2026-05-14 18:35:59 +02:00 committed by GitHub
parent 250a2d0dd1
commit edee25e2e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 99 deletions

View file

@ -4,23 +4,15 @@ echo "::group:: ===$(basename "$0")==="
set -ouex pipefail set -ouex pipefail
# use negativo17 for 3rd party packages with higher priority than default # may break when partially upgraded
if ! grep -q fedora-multimedia <(dnf5 repolist); then dnf versionlock add "qt6-*" "plasma-desktop"
# Enable or Install Repofile
dnf5 config-manager setopt fedora-multimedia.enabled=1 ||
dnf5 config-manager addrepo --from-repofile="https://negativo17.org/repos/fedora-multimedia.repo"
fi
# Set higher priority
dnf5 config-manager setopt fedora-multimedia.priority=90
# Add Flathub to the image for eventual application PLASMA_VERS=$(rpm -q --qf "%{VERSION}" plasma-desktop)
mkdir -p /etc/flatpak/remotes.d/
curl --retry 3 -Lo /etc/flatpak/remotes.d/flathub.flatpakrepo https://dl.flathub.org/repo/flathub.flatpakrepo
# may break SDDM/KWin when upgraded
dnf5 versionlock add "qt6-*"
# use override to replace mesa and others with less crippled versions # use override to replace mesa and others with less crippled versions
dnf config-manager addrepo --from-repofile="https://negativo17.org/repos/fedora-multimedia.repo"
dnf config-manager setopt fedora-multimedia.priority=90
OVERRIDES=( OVERRIDES=(
"intel-gmmlib" "intel-gmmlib"
"intel-mediasdk" "intel-mediasdk"
@ -38,6 +30,7 @@ OVERRIDES=(
dnf5 distro-sync --skip-unavailable -y --repo='fedora-multimedia' "${OVERRIDES[@]}" dnf5 distro-sync --skip-unavailable -y --repo='fedora-multimedia' "${OVERRIDES[@]}"
dnf5 versionlock add "${OVERRIDES[@]}" dnf5 versionlock add "${OVERRIDES[@]}"
# All DNF-related operations should be done here whenever possible # All DNF-related operations should be done here whenever possible
#shellcheck source=build_files/shared/copr-helpers.sh #shellcheck source=build_files/shared/copr-helpers.sh
source /ctx/build_files/shared/copr-helpers.sh source /ctx/build_files/shared/copr-helpers.sh
@ -52,30 +45,18 @@ source /ctx/build_files/shared/copr-helpers.sh
# Prevent partial upgrading, major kde version updates black screened # Prevent partial upgrading, major kde version updates black screened
# https://github.com/ublue-os/aurora/issues/1227 # https://github.com/ublue-os/aurora/issues/1227
dnf5 versionlock add plasma-desktop
FEDORA_PACKAGES=( FEDORA_PACKAGES=(
adcli adcli
alsa-firmware alsa-firmware
apr apr{,-util}
apr-util
autofs autofs
borgbackup borgbackup
davfs2 davfs2
distrobox distrobox
evtest evtest
fastfetch fastfetch
fcitx5-chewing fcitx5-{chewing,chinese-addons,configtool,gtk,hangul,libthai,m17n,mozc,qt,sayura,unikey}
fcitx5-chinese-addons
fcitx5-configtool
fcitx5-gtk
fcitx5-hangul
fcitx5-libthai
fcitx5-m17n
fcitx5-mozc
fcitx5-qt
fcitx5-sayura
fcitx5-unikey
fish fish
flatpak-spawn flatpak-spawn
foo2zjs foo2zjs
@ -88,8 +69,7 @@ FEDORA_PACKAGES=(
google-noto-sans-sundanese-fonts google-noto-sans-sundanese-fonts
grub2-tools-extra grub2-tools-extra
gum gum
gvfs gvfs{,-fuse}
gvfs-fuse
htop htop
icoutils icoutils
ifuse ifuse
@ -118,13 +98,12 @@ FEDORA_PACKAGES=(
pam_yubico pam_yubico
pamu2fcfg pamu2fcfg
plasma-wallpapers-dynamic plasma-wallpapers-dynamic
plasma-firewall-"${PLASMA_VERS}"
powerstat powerstat
powertop powertop
rclone rclone
restic restic
samba-winbind samba-winbind{,-clients,-modules}
samba-winbind-clients
samba-winbind-modules
setools-console setools-console
solaar-udev solaar-udev
squashfs-tools squashfs-tools
@ -139,21 +118,8 @@ FEDORA_PACKAGES=(
zsh zsh
) )
# Version-specific Fedora package additions
case "$FEDORA_MAJOR_VERSION" in
43)
FEDORA_PACKAGES+=(
)
;;
44)
FEDORA_PACKAGES+=(
)
;;
esac
NEGATIVO_PACKAGES=( NEGATIVO_PACKAGES=(
ffmpeg ffmpeg{,-libs}
ffmpeg-libs
intel-vaapi-driver intel-vaapi-driver
libfdk-aac libfdk-aac
libva-utils libva-utils
@ -165,15 +131,11 @@ NEGATIVO_PACKAGES=(
echo "Installing ${#FEDORA_PACKAGES[@]} packages from Fedora repos and ${#NEGATIVO_PACKAGES[@]} from Negativo..." echo "Installing ${#FEDORA_PACKAGES[@]} packages from Fedora repos and ${#NEGATIVO_PACKAGES[@]} from Negativo..."
dnf5 -y install "${FEDORA_PACKAGES[@]}" "${NEGATIVO_PACKAGES[@]}" dnf5 -y install "${FEDORA_PACKAGES[@]}" "${NEGATIVO_PACKAGES[@]}"
# Install tailscale package from their repo # Fedora Tailscale is usually behind
echo "Installing tailscale from official repo..."
dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo
dnf config-manager setopt tailscale-stable.enabled=0 dnf config-manager setopt tailscale-stable.enabled=0
dnf -y install --enablerepo='tailscale-stable' tailscale dnf -y install --enablerepo='tailscale-stable' tailscale
# Install COPR packages using isolated enablement (secure)
echo "Installing COPR packages with isolated repo enablement..."
# From ublue-os/packages # From ublue-os/packages
copr_install_isolated "ublue-os/packages" \ copr_install_isolated "ublue-os/packages" \
"kcm_ublue" \ "kcm_ublue" \
@ -181,18 +143,6 @@ copr_install_isolated "ublue-os/packages" \
"oversteer-udev" \ "oversteer-udev" \
"uupd" "uupd"
# Version-specific COPR packages
# Example:
# copr_install_isolated "ublue-os/packages" "bazaar" "uupd"
case "$FEDORA_MAJOR_VERSION" in
43)
;;
44)
;;
esac
# kAirpods from ledif/kairpods COPR # kAirpods from ledif/kairpods COPR
copr_install_isolated "ledif/kairpods" \ copr_install_isolated "ledif/kairpods" \
"kairpods" "kairpods"
@ -203,40 +153,23 @@ copr_install_isolated "lizardbyte/beta" \
# Packages to exclude - common to all versions # Packages to exclude - common to all versions
EXCLUDED_PACKAGES=( EXCLUDED_PACKAGES=(
akonadi-server akonadi-server{,-mysql}
akonadi-server-mysql
default-fonts-cjk-sans default-fonts-cjk-sans
fedora-bookmarks fedora-bookmarks
fedora-chromium-config fedora-chromium-config{,-kde}
fedora-chromium-config-kde
fedora-third-party fedora-third-party
ffmpegthumbnailer ffmpegthumbnailer
firefox firefox
firefox-langpacks
firewall-config firewall-config
google-noto-sans-cjk-vf-fonts google-noto-sans-cjk-vf-fonts
kcharselect kcharselect
khelpcenter khelpcenter
krfb krfb{,-libs}
krfb-libs plasma-discover{,-libs}
plasma-discover-kns
plasma-discover-rpm-ostree
plasma-discover
plasma-discover-libs
plasma-welcome-fedora plasma-welcome-fedora
podman-docker podman-docker
) )
# Version-specific package exclusions
case "$FEDORA_MAJOR_VERSION" in
43)
EXCLUDED_PACKAGES+=()
;;
44)
EXCLUDED_PACKAGES+=()
;;
esac
# Remove excluded packages if they are installed # Remove excluded packages if they are installed
if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then
readarray -t INSTALLED_EXCLUDED < <(rpm -qa --queryformat='%{NAME}\n' "${EXCLUDED_PACKAGES[@]}" 2>/dev/null || true) readarray -t INSTALLED_EXCLUDED < <(rpm -qa --queryformat='%{NAME}\n' "${EXCLUDED_PACKAGES[@]}" 2>/dev/null || true)
@ -251,14 +184,10 @@ fi
# TODO: test if we still need this when upgrading firmware with fwupd # TODO: test if we still need this when upgrading firmware with fwupd
dnf -y copr enable ublue-os/staging dnf -y copr enable ublue-os/staging
dnf -y copr disable ublue-os/staging dnf -y copr disable ublue-os/staging
dnf5 -y swap \ dnf -y swap \
--repo=copr:copr.fedorainfracloud.org:ublue-os:staging \ --repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
fwupd fwupd fwupd fwupd
PLASMA_VERS=$(rpm -q --qf "%{VERSION}" plasma-desktop)
dnf -y install plasma-firewall-"${PLASMA_VERS}"
## Pins and Overrides ## Pins and Overrides
## Use this section to pin packages in order to avoid regressions ## Use this section to pin packages in order to avoid regressions
# Remember to leave a note with rationale/link to issue for each pin! # Remember to leave a note with rationale/link to issue for each pin!
@ -270,18 +199,11 @@ dnf -y install plasma-firewall-"${PLASMA_VERS}"
#fi #fi
# https://invent.kde.org/plasma/plasma-setup/-/issues/72 # https://invent.kde.org/plasma/plasma-setup/-/issues/72
dnf -y copr enable ublue-os/staging
dnf -y copr disable ublue-os/staging
dnf -y swap --repo=copr:copr.fedorainfracloud.org:ublue-os:staging \ dnf -y swap --repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
plasma-setup plasma-setup-"${PLASMA_VERS}"-*.aurora plasma-setup plasma-setup-"${PLASMA_VERS}"-*.aurora
dnf versionlock add plasma-setup dnf versionlock add plasma-setup
# we can't remove plasma-lookandfeel-fedora package because it is a dependency of plasma-desktop
rpm --erase --nodeps plasma-lookandfeel-fedora
# rpm erase doesn't remove actual files
rm -rf /usr/share/plasma/look-and-feel/org.fedoraproject.fedora.desktop/
# Install DX specific packages # Install DX specific packages
if [[ "${IMAGE_FLAVOR}" == "dx" ]]; then if [[ "${IMAGE_FLAVOR}" == "dx" ]]; then
/ctx/build_files/dx/00-dx.sh /ctx/build_files/dx/00-dx.sh

View file

@ -5,7 +5,7 @@ echo "::group:: ===$(basename "$0")==="
set -eoux pipefail set -eoux pipefail
# Enable Flathub # Enable Flathub
flatpak remote-add --system --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo curl --retry 3 -Lo /etc/flatpak/remotes.d/flathub.flatpakrepo https://dl.flathub.org/repo/flathub.flatpakrepo
# Offline Aurora documentation # Offline Aurora documentation
ghcurl "https://github.com/ublue-os/aurora-docs/releases/download/0.1/aurora.pdf" --retry 3 -o /tmp/aurora.pdf ghcurl "https://github.com/ublue-os/aurora-docs/releases/download/0.1/aurora.pdf" --retry 3 -o /tmp/aurora.pdf

View file

@ -42,6 +42,9 @@ test -f /usr/share/flatpak/preinstall.d/bazaar.preinstall
# Make sure this garbage never makes it to an image # Make sure this garbage never makes it to an image
test -f /usr/lib/systemd/system/flatpak-add-fedora-repos.service && false test -f /usr/lib/systemd/system/flatpak-add-fedora-repos.service && false
# Is flathub enabled by default?
test -f /etc/flatpak/remotes.d/flathub.flatpakrepo
# Make sure to not pull in the bazzite one # Make sure to not pull in the bazzite one
rpm -q plasma-setup --qf "%{RELEASE}" | grep -q aurora rpm -q plasma-setup --qf "%{RELEASE}" | grep -q aurora
@ -126,7 +129,6 @@ UNWANTED_PACKAGES=(
fedora-third-party fedora-third-party
firefox firefox
plasma-discover plasma-discover
plasma-lookandfeel-fedora
podman-docker podman-docker
) )