forked from ublue-os/bluefin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path03-packages.sh
More file actions
executable file
·265 lines (241 loc) · 6.86 KB
/
Copy path03-packages.sh
File metadata and controls
executable file
·265 lines (241 loc) · 6.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
#!/usr/bin/bash
echo "::group:: ===$(basename "$0")==="
set -ouex pipefail
# All DNF-related operations should be done here whenever possible
# use negativo17 for 3rd party packages with higher priority than default
# mitigate upstream packaging bug: https://bugzilla.redhat.com/show_bug.cgi?id=2332429
# swap the incorrectly installed OpenCL-ICD-Loader for ocl-icd, the expected package
# TODO: remove me when F42 dropped, F43 is not affected
if [[ "$(rpm -E %fedora)" == "42" ]]; then
dnf5 -y swap --repo='fedora' \
OpenCL-ICD-Loader ocl-icd
fi
if ! grep -q fedora-multimedia <(dnf5 repolist); then
# 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
# use override to replace mesa and others with less crippled versions
OVERRIDES=(
"intel-gmmlib"
"intel-mediasdk"
"intel-vpl-gpu-rt"
"libheif"
"libva"
"libva-intel-media-driver"
"mesa-dri-drivers"
"mesa-filesystem"
"mesa-libEGL"
"mesa-libGL"
"mesa-libgbm"
"mesa-va-drivers"
"mesa-vulkan-drivers"
)
dnf5 distro-sync --skip-unavailable -y --repo='fedora-multimedia' "${OVERRIDES[@]}"
dnf5 versionlock add "${OVERRIDES[@]}"
# shellcheck source=build_files/shared/copr-helpers.sh
source /ctx/build_files/shared/copr-helpers.sh
# NOTE:
# Packages are split into FEDORA_PACKAGES and COPR_PACKAGES to prevent
# malicious COPRs from injecting fake versions of Fedora packages.
# Fedora packages are installed first in bulk (safe).
# COPR packages are installed individually with isolated enablement.
# Base packages from Fedora repos - common to all versions
FEDORA_PACKAGES=(
adcli
adw-gtk3-theme
adwaita-fonts-all
alsa-firmware
alsa-tools-firmware
bcache-tools
borgbackup
containerd
cryfs
davfs2
ddcutil
evtest
fastfetch
firewall-config
fish
flatpak-spawn
foo2zjs
fuse-encfs
gcc
git-credential-libsecret
glow
gnome-tweaks
google-noto-sans-balinese-fonts
google-noto-sans-cjk-fonts
google-noto-sans-javanese-fonts
google-noto-sans-sundanese-fonts
grub2-tools-extra
gum
gvfs-nfs
htop
ibus-mozc
ibus-unikey
ifuse
igt-gpu-tools
input-remapper
intel-vaapi-driver
iwd
jetbrains-mono-fonts-all
just
krb5-workstation
libcamera-gstreamer
libcamera-tools
libgda
libgda-sqlite
libimobiledevice-utils
libratbag-ratbagd
libsss_autofs
libva-utils
libxcrypt-compat
lm_sensors
lshw
make
mozc
mtools
nautilus-gsconnect
net-tools
nvtop
oddjob-mkhomedir
opendyslexic-fonts
openrgb-udev-rules
openssh-askpass
pam-u2f
pam_yubico
pamu2fcfg
pipewire-libs-extra
powerstat
powertop
python3-pip
python3-pygit2
rclone
restic
samba
samba-dcerpc
samba-ldb-ldap-modules
samba-winbind-clients
samba-winbind-modules
setools-console
smartmontools
solaar-udev
squashfs-tools
sssd-ad
sssd-krb5
symlinks
tcpdump
tmux
traceroute
usbip
vim
waypipe
xdg-terminal-exec
yubikey-manager
zenity
zsh
)
# Version-specific Fedora package additions
case "$FEDORA_MAJOR_VERSION" in
42)
FEDORA_PACKAGES+=(
evolution-ews-core
uld
)
;;
43)
FEDORA_PACKAGES+=(
)
;;
esac
# Install all Fedora packages (bulk - safe from COPR injection)
echo "Installing ${#FEDORA_PACKAGES[@]} packages from Fedora repos..."
dnf -y install "${FEDORA_PACKAGES[@]}"
dnf config-manager addrepo --from-repofile=https://pkgs.tailscale.com/stable/fedora/tailscale.repo
dnf config-manager setopt tailscale-stable.enabled=0
dnf -y install --enablerepo='tailscale-stable' tailscale
dnf -y install --enablerepo=fedora-multimedia \
-x PackageKit* \
ffmpeg{,-libs} libavcodec @multimedia gstreamer1-plugins-{bad-free,bad-free-libs,good,base} lame{,-libs} libfdk-aac libjxl ffmpegthumbnailer
# From che/nerd-fonts
copr_install_isolated "che/nerd-fonts" "nerd-fonts"
# From ublue-os/packages
copr_install_isolated "ublue-os/packages" \
"uupd" \
"oversteer-udev"
# Version-specific COPR packages
# case "$FEDORA_MAJOR_VERSION" in
# 42)
# bazaar and uupd from ublue-os/packages
# copr_install_isolated "ublue-os/packages" "bazaar" "uupd"
# ;;
# 43)
# bazaar from ublue-os/packages
# copr_install_isolated "ublue-os/packages" "bazaar"
# ;;
# esac
# Packages to exclude - common to all versions
EXCLUDED_PACKAGES=(
default-fonts-cjk-sans
fedora-bookmarks
fedora-chromium-config
fedora-chromium-config-gnome
fedora-third-party
firefox
firefox-langpacks
gnome-extensions-app
gnome-shell-extension-background-logo
gnome-software
gnome-software-rpm-ostree
gnome-terminal-nautilus
google-noto-sans-cjk-vf-fonts
podman-docker
totem-video-thumbnailer
yelp
)
# Version-specific package exclusions
case "$FEDORA_MAJOR_VERSION" in
42)
EXCLUDED_PACKAGES+=()
;;
43)
EXCLUDED_PACKAGES+=()
;;
esac
# Remove excluded packages if they are installed
if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then
readarray -t INSTALLED_EXCLUDED < <(rpm -qa --queryformat='%{NAME}\n' "${EXCLUDED_PACKAGES[@]}" 2>/dev/null || true)
if [[ "${#INSTALLED_EXCLUDED[@]}" -gt 0 ]]; then
dnf -y remove "${INSTALLED_EXCLUDED[@]}"
else
echo "No excluded packages found to remove."
fi
fi
# Fix for ID in fwupd
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 \
fwupd fwupd
# TODO: remove me on next flatpak release when preinstall landed in Fedora
if [[ "$(rpm -E %fedora)" -ge "42" ]]; then
dnf -y copr enable ublue-os/flatpak-test
dnf -y copr disable ublue-os/flatpak-test
dnf -y --repo=copr:copr.fedorainfracloud.org:ublue-os:flatpak-test swap flatpak flatpak
dnf -y --repo=copr:copr.fedorainfracloud.org:ublue-os:flatpak-test swap flatpak-libs flatpak-libs
dnf -y --repo=copr:copr.fedorainfracloud.org:ublue-os:flatpak-test swap flatpak-session-helper flatpak-session-helper
dnf -y --repo=copr:copr.fedorainfracloud.org:ublue-os:flatpak-test install flatpak-debuginfo flatpak-libs-debuginfo flatpak-session-helper-debuginfo
fi
## Pins and Overrides
## Use this section to pin packages in order to avoid regressions
# Remember to leave a note with rationale/link to issue for each pin!
#
# Example:
#if [ "$FEDORA_MAJOR_VERSION" -eq "41" ]; then
# Workaround pkcs11-provider regression, see issue #1943
# rpm-ostree override replace https://bodhi.fedoraproject.org/updates/FEDORA-2024-dd2e9fb225
#fi
echo "::endgroup::"