generated from ublue-os/base
-
Notifications
You must be signed in to change notification settings - Fork 51
/
install.sh
executable file
·87 lines (74 loc) · 3.06 KB
/
install.sh
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
#!/usr/bin/bash
set -ouex pipefail
RELEASE="$(rpm -E %fedora)"
KERNEL_SUFFIX=""
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(|'"$KERNEL_SUFFIX"'-)(\d+\.\d+\.\d+)' | sed -E 's/kernel-(|'"$KERNEL_SUFFIX"'-)//')"
curl -Lo /etc/yum.repos.d/_copr_ublue-os_staging.repo https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${RELEASE}"/ublue-os-staging-fedora-"${RELEASE}".repo
curl -Lo /etc/yum.repos.d/_copr_kylegospo_oversteer.repo https://copr.fedorainfracloud.org/coprs/kylegospo/oversteer/repo/fedora-"${RELEASE}"/kylegospo-oversteer-fedora-"${RELEASE}".repo
rpm-ostree install \
/tmp/rpms/*.rpm \
/tmp/akmods-rpms/*.rpm \
fedora-repos-archive
# Handle Kernel Skew with override replace
rpm-ostree cliwrap install-to-root /
if [[ "${KERNEL_VERSION}" == "${QUALIFIED_KERNEL}" ]]; then
echo "Installing signed kernel from kernel-cache."
cd /tmp
rpm2cpio /tmp/kernel-rpms/kernel-core-*.rpm | cpio -idmv
cp ./lib/modules/*/vmlinuz /usr/lib/modules/*/vmlinuz
cd /
else
echo "Install kernel version ${KERNEL_VERSION} from kernel-cache."
rpm-ostree override replace \
--experimental \
--install=zstd \
/tmp/kernel-rpms/kernel-[0-9]*.rpm \
/tmp/kernel-rpms/kernel-core-*.rpm \
/tmp/kernel-rpms/kernel-modules-*.rpm
fi
# use negativo17 for 3rd party packages with higher priority than default
curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo
sed -i '0,/enabled=1/{s/enabled=1/enabled=1\npriority=90/}' /etc/yum.repos.d/negativo17-fedora-multimedia.repo
# use override to replace mesa and others with less crippled versions
rpm-ostree override replace \
--experimental \
--from repo='fedora-multimedia' \
libheif \
libva \
libva-intel-media-driver \
mesa-dri-drivers \
mesa-filesystem \
mesa-libEGL \
mesa-libGL \
mesa-libgbm \
mesa-libglapi \
mesa-libxatracker \
mesa-va-drivers \
mesa-vulkan-drivers
if [[ "$FEDORA_MAJOR_VERSION" -ne "41" ]]; then
rpm-ostree override replace \
--experimental \
--from repo='fedora-multimedia' \
libvdpau
fi
# Disable DKMS support in gnome-software
if [[ "$FEDORA_MAJOR_VERSION" -ge "41" && "$IMAGE_NAME" == "silverblue" ]]; then
rpm-ostree override remove \
gnome-software-rpm-ostree
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \
gnome-software
fi
# run common packages script
/ctx/packages.sh
## install packages direct from github
/ctx/github-release-install.sh sigstore/cosign x86_64
# use CoreOS' generator for emergency/rescue boot
# see detail: https://github.com/ublue-os/main/issues/653
CSFG=/usr/lib/systemd/system-generators/coreos-sulogin-force-generator
curl -sSLo ${CSFG} https://raw.githubusercontent.com/coreos/fedora-coreos-config/refs/heads/stable/overlay.d/05core/usr/lib/systemd/system-generators/coreos-sulogin-force-generator
chmod +x ${CSFG}
if [[ "${KERNEL_VERSION}" == "${QUALIFIED_KERNEL}" ]]; then
/ctx/initramfs.sh
fi