chore: Kernel cleanup, fix switcheroo install

This commit is contained in:
Kyle Gospodnetich 2025-01-12 22:17:56 -08:00
parent dcb1fc5d30
commit 5aa5217483
3 changed files with 24 additions and 33 deletions

View File

@ -113,9 +113,12 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
RUN --mount=type=cache,dst=/var/cache/libdnf5 \ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \ --mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=kernel,src=/tmp/rpms,dst=/tmp/kernel-rpms \ --mount=type=bind,from=kernel,src=/tmp/rpms,dst=/tmp/kernel-rpms \
--mount=type=bind,from=akmods,src=/rpms,dst=/tmp/akmods-rpms \
--mount=type=bind,from=akmods-extra,src=/rpms,dst=/tmp/akmods-extra-rpms \
--mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \ --mount=type=tmpfs,dst=/tmp \
/ctx/install-kernel && \ /ctx/install-kernel-akmods && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-*.repo && \
dnf5 -y install \ dnf5 -y install \
scx-scheds && \ scx-scheds && \
dnf5 -y swap \ dnf5 -y swap \
@ -156,28 +159,19 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
/ctx/install-firmware && \ /ctx/install-firmware && \
/ctx/cleanup /ctx/cleanup
# Add ublue packages # Install patched fwupd
# Install Valve's patched Mesa, Pipewire, Bluez, and Xwayland
# Install patched switcheroo control with proper discrete GPU support
RUN --mount=type=cache,dst=/var/cache/libdnf5 \ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \ --mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=akmods,src=/rpms,dst=/tmp/akmods-rpms \
--mount=type=bind,from=akmods-extra,src=/rpms,dst=/tmp/akmods-extra-rpms \
--mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \ --mount=type=tmpfs,dst=/tmp \
dnf5 -y copr enable ublue-os/akmods && \
/ctx/install-akmods && \
dnf5 -y swap \ dnf5 -y swap \
--repo copr:copr.fedorainfracloud.org:ublue-os:staging \ --repo copr:copr.fedorainfracloud.org:ublue-os:staging \
fwupd fwupd && \ fwupd fwupd && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion-*.repo && \ dnf5 -y swap \
/ctx/cleanup --repo terra-extras \
switcheroo-control switcheroo-control && \
# Install Valve's patched Mesa, Pipewire, Bluez, and Xwayland#
# Install patched switcheroo control with proper discrete GPU support
# Tempporary fix for GPU Encoding
RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \
dnf5 -y swap \ dnf5 -y swap \
--repo terra-extras \ --repo terra-extras \
mesa-filesystem mesa-filesystem && \ mesa-filesystem mesa-filesystem && \
@ -508,7 +502,7 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null && \ glib-compile-schemas /usr/share/glib-2.0/schemas &>/dev/null && \
rm -r /tmp/bazzite-schema-test && \ rm -r /tmp/bazzite-schema-test && \
sed -i 's/stage/none/g' /etc/rpm-ostreed.conf && \ sed -i 's/stage/none/g' /etc/rpm-ostreed.conf && \
dnf5 copr disable -y ublue-os/akmods && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
dnf5 copr disable -y kylegospo/bazzite && \ dnf5 copr disable -y kylegospo/bazzite && \
dnf5 copr disable -y kylegospo/bazzite-multilib && \ dnf5 copr disable -y kylegospo/bazzite-multilib && \
dnf5 copr disable -y ublue-os/staging && \ dnf5 copr disable -y ublue-os/staging && \
@ -585,7 +579,7 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
--mount=type=cache,dst=/var/cache/rpm-ostree \ --mount=type=cache,dst=/var/cache/rpm-ostree \
--mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=bind,from=ctx,source=/,target=/ctx \
--mount=type=tmpfs,dst=/tmp \ --mount=type=tmpfs,dst=/tmp \
dnf5 -y copr enable ublue-os/akmods && \ sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
dnf5 -y copr enable kylegospo/bazzite && \ dnf5 -y copr enable kylegospo/bazzite && \
dnf5 -y copr enable kylegospo/bazzite-multilib && \ dnf5 -y copr enable kylegospo/bazzite-multilib && \
dnf5 -y copr enable kylegospo/LatencyFleX && \ dnf5 -y copr enable kylegospo/LatencyFleX && \
@ -695,7 +689,7 @@ RUN --mount=type=cache,dst=/var/cache/libdnf5 \
; fi && \ ; fi && \
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/input-remapper-gtk.desktop && \ sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/input-remapper-gtk.desktop && \
cp "/usr/share/ublue-os/firstboot/yafti.yml" "/etc/yafti.yml" && \ cp "/usr/share/ublue-os/firstboot/yafti.yml" "/etc/yafti.yml" && \
dnf5 copr disable -y ublue-os/akmods && \ sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
dnf5 copr disable -y kylegospo/bazzite && \ dnf5 copr disable -y kylegospo/bazzite && \
dnf5 copr disable -y kylegospo/bazzite-multilib && \ dnf5 copr disable -y kylegospo/bazzite-multilib && \
dnf5 copr disable -y kylegospo/LatencyFleX && \ dnf5 copr disable -y kylegospo/LatencyFleX && \

View File

@ -1,14 +0,0 @@
#!/usr/bin/bash
set -eoux pipefail
for pkg in kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra
do
rpm --erase "$pkg" --nodeps
done
dnf5 -y install \
/tmp/kernel-rpms/kernel-[0-9]*.rpm \
/tmp/kernel-rpms/kernel-core-*.rpm \
/tmp/kernel-rpms/kernel-modules-*.rpm \
/tmp/kernel-rpms/kernel-uki-virt-*.rpm

View File

@ -2,6 +2,17 @@
set -eoux pipefail set -eoux pipefail
for pkg in kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra
do
rpm --erase "$pkg" --nodeps
done
dnf5 -y install \
/tmp/kernel-rpms/kernel-[0-9]*.rpm \
/tmp/kernel-rpms/kernel-core-*.rpm \
/tmp/kernel-rpms/kernel-modules-*.rpm \
/tmp/kernel-rpms/kernel-uki-virt-*.rpm
dnf5 -y install \ dnf5 -y install \
/tmp/akmods-rpms/kmods/*kvmfr*.rpm \ /tmp/akmods-rpms/kmods/*kvmfr*.rpm \
/tmp/akmods-rpms/kmods/*xone*.rpm \ /tmp/akmods-rpms/kmods/*xone*.rpm \