forked from ublue-os/bluefin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path00-dx.sh
More file actions
executable file
·133 lines (117 loc) · 3.18 KB
/
Copy path00-dx.sh
File metadata and controls
executable file
·133 lines (117 loc) · 3.18 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
#!/usr/bin/bash
echo "::group:: ===$(basename "$0")==="
set -ouex pipefail
# Load secure COPR helpers
# shellcheck source=build_files/shared/copr-helpers.sh
source /ctx/build_files/shared/copr-helpers.sh
# DX packages from Fedora repos - common to all versions
FEDORA_PACKAGES=(
android-tools
bcc
bpftop
bpftrace
cascadia-code-fonts
cockpit-bridge
cockpit-machines
cockpit-networkmanager
cockpit-ostree
cockpit-podman
cockpit-selinux
cockpit-storaged
cockpit-system
dbus-x11
edk2-ovmf
flatpak-builder
genisoimage
git-subtree
git-svn
iotop
libvirt
libvirt-nss
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
rocm-hip
rocm-opencl
rocm-smi
sysprof
incus
incus-agent
lxc
tiptop
trace-cmd
udica
util-linux-script
virt-manager
virt-v2v
virt-viewer
ydotool
)
echo "Installing ${#FEDORA_PACKAGES[@]} DX packages from Fedora repos..."
dnf5 -y install "${FEDORA_PACKAGES[@]}"
dnf config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo
sed -i "s/enabled=.*/enabled=0/g" /etc/yum.repos.d/docker-ce.repo
dnf -y install --enablerepo=docker-ce-stable \
containerd.io \
docker-buildx-plugin \
docker-ce \
docker-ce-cli \
docker-compose-plugin \
docker-model-plugin
tee /etc/yum.repos.d/vscode.repo <<'EOF'
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF
sed -i "s/enabled=.*/enabled=0/g" /etc/yum.repos.d/vscode.repo
dnf -y install --enablerepo=code \
code
# DX packages to exclude - common to all versions
EXCLUDED_PACKAGES=()
# Version-specific package exclusions for DX
case "$FEDORA_MAJOR_VERSION" in
43)
EXCLUDED_PACKAGES+=(mozilla-fira-mono-fonts)
;;
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
dnf5 -y remove "${INSTALLED_EXCLUDED[@]}"
else
echo "No excluded packages found to remove."
fi
fi
systemctl enable docker.socket
systemctl enable podman.socket
systemctl enable swtpm-workaround.service
systemctl enable libvirt-workaround.service
systemctl enable bluefin-dx-groups.service
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo
# NOTE: we won't use dnf5 copr plugin for ublue-os/akmods until our upstream provides the COPR standard naming
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:ublue-os:akmods.repo
# 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::"