Skip to content

Commit

Permalink
feat: Fedora 41 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalOughtness authored Oct 29, 2024
1 parent 03fa9eb commit ca09552
Show file tree
Hide file tree
Showing 32 changed files with 82 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
attempt_delay: 15000
command: |
set -eo pipefail
linux=$(skopeo inspect docker://ghcr.io/ublue-os/main-kernel:40 | jq -r '.Labels["ostree.linux"]')
AKMODS_KERNEL_VERSION=$(skopeo inspect docker://ghcr.io/ublue-os/akmods:main-40 | jq -r '.Labels["ostree.linux"]')
linux=$(skopeo inspect docker://ghcr.io/ublue-os/main-kernel:41 | jq -r '.Labels["ostree.linux"]')
AKMODS_KERNEL_VERSION=$(skopeo inspect docker://ghcr.io/ublue-os/akmods:main-41 | jq -r '.Labels["ostree.linux"]')
if [[ "${linux}" != "${AKMODS_KERNEL_VERSION}" ]]; then
echo "Kernel Versions do not match between AKMODS and Cached-Kernel."
exit 1
Expand Down
11 changes: 11 additions & 0 deletions files/scripts/regenerateinitramfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

# Tell build process to exit if there are any errors.
set -oue pipefail


rpm-ostree cliwrap install-to-root /

QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//')"
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
chmod 0600 "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
10 changes: 2 additions & 8 deletions files/scripts/setearlyloading.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,5 @@
# Tell build process to exit if there are any errors.
set -oue pipefail

sed -i 's@omit_drivers@force_drivers@g' /usr/lib/dracut/dracut.conf.d/99-nvidia-dracut.conf
sed -i 's@ nvidia @ i915 amdgpu nvidia @g' /usr/lib/dracut/dracut.conf.d/99-nvidia-dracut.conf

rpm-ostree cliwrap install-to-root /

QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(\d+\.\d+\.\d+)' | sed -E 's/kernel-//')"
/usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
chmod 0600 "/lib/modules/$QUALIFIED_KERNEL/initramfs.img"
sed -i 's@omit_drivers@force_drivers@g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf
sed -i 's@ nvidia @ i915 amdgpu nvidia @g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf
2 changes: 1 addition & 1 deletion files/system/hyprland/usr/share/hyprland/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ dwindle {

master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
new_status = master
}

gestures {
Expand Down
5 changes: 2 additions & 3 deletions recipes/common/common-modules.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
modules:
- type: containerfile
snippets:
- COPY --from=ghcr.io/ublue-os/akmods:main-40 /rpms /tmp/rpms
- COPY --from=ghcr.io/ublue-os/akmods:main-41 /rpms /tmp/rpms
- RUN find /tmp/rpms
- RUN rpm -q ublue-os-akmods-addons || rpm-ostree install /tmp/rpms/ublue-os/ublue-os-akmods-addons*.rpm
- type: containerfile
snippets:
- COPY --from=ghcr.io/ublue-os/main-kernel:40 /tmp/rpms /tmp/rpms/kernel
- COPY --from=ghcr.io/ublue-os/main-kernel:41 /tmp/rpms /tmp/rpms/kernel
- type: script
scripts:
- installsignedkernel.sh
- removeunusedrepos.sh

- type: containerfile
snippets:
Expand Down
5 changes: 5 additions & 0 deletions recipes/common/final-modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
modules:
- type: script
scripts:
- removeunusedrepos.sh
- regenerateinitramfs.sh
5 changes: 3 additions & 2 deletions recipes/common/nvidia-modules.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
modules:
- type: containerfile
snippets:
- COPY --from=ghcr.io/ublue-os/akmods-nvidia:main-40 /rpms/ /tmp/rpms
- COPY --from=ghcr.io/ublue-os/akmods-nvidia:main-41 /rpms/ /tmp/rpms
- RUN find /tmp/rpms
- RUN rpm-ostree install /tmp/rpms/ublue-os/ublue-os-nvidia*.rpm
- RUN sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/nvidia-container-toolkit.repo
- RUN rpm-ostree install /tmp/rpms/kmods/kmod-nvidia*.rpm nvidia-container-toolkit xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver
- RUN sed -i '0,/enabled=0/{s/enabled=0/enabled=1\npriority=90/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo
- RUN rpm-ostree install /tmp/rpms/kmods/kmod-nvidia*.rpm libnvidia-fbc libva-nvidia-driver nvidia-driver nvidia-driver-cuda nvidia-modprobe nvidia-persistenced nvidia-settings nvidia-container-toolkit
- type: script
scripts:
- installnvidiatoolkitpolicy.sh
Expand Down
7 changes: 4 additions & 3 deletions recipes/common/nvidia-open-modules.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
modules:
- type: containerfile
snippets:
- COPY --from=ghcr.io/ublue-os/akmods-nvidia-open:main-40 /rpms/ /tmp/rpms
- COPY --from=ghcr.io/ublue-os/akmods-nvidia-open:main-41 /rpms/ /tmp/rpms
- RUN find /tmp/rpms
- RUN rpm-ostree install /tmp/rpms/ublue-os/ublue-os-nvidia*.rpm
- RUN sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/nvidia-container-toolkit.repo
- RUN rpm-ostree install /tmp/rpms/kmods/kmod-nvidia*.rpm nvidia-container-toolkit xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda nvidia-vaapi-driver
- RUN sed -i '0,/enabled=0/{s/enabled=0/enabled=1\npriority=90/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo
- RUN rpm-ostree install /tmp/rpms/kmods/kmod-nvidia*.rpm libnvidia-fbc libva-nvidia-driver nvidia-driver nvidia-driver-cuda nvidia-modprobe nvidia-persistenced nvidia-settings nvidia-container-toolkit
- type: script
scripts:
- installnvidiatoolkitpolicy.sh
- removeunusedrepos.sh
- setearlyloading.sh
- setdrmvariables.sh
- setdrmvariables.sh
3 changes: 2 additions & 1 deletion recipes/recipe-hyprland-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/hyprland-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-hyprland-nvidia-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/nvidia-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/hyprland-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-hyprland-nvidia-open-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/nvidia-open-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/hyprland-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-hyprland-nvidia-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
- from-file: common/common-modules.yml
- from-file: common/nvidia-open-modules.yml
- from-file: common/hyprland-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-hyprland-nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
- from-file: common/common-modules.yml
- from-file: common/nvidia-modules.yml
- from-file: common/hyprland-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-hyprland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
- from-file: common/common-modules.yml
- from-file: common/hyprland-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-river-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/river-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-river-nvidia-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/nvidia-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/river-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-river-nvidia-open-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/nvidia-open-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/river-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-river-nvidia-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
- from-file: common/common-modules.yml
- from-file: common/nvidia-open-modules.yml
- from-file: common/river-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-river-nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
- from-file: common/common-modules.yml
- from-file: common/nvidia-modules.yml
- from-file: common/river-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-river.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
- from-file: common/common-modules.yml
- from-file: common/river-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-sway-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/sericea

image-version: 40
image-version: 41

modules:
- from-file: common/remove-sddm.yml
- from-file: common/common-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/sway-modules.yml
- from-file: common/final-modules.yml
5 changes: 3 additions & 2 deletions recipes/recipe-sway-nvidia-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/sericea

image-version: 40
image-version: 41

modules:
- from-file: common/remove-sddm.yml
Expand All @@ -14,4 +14,5 @@ modules:
- from-file: common/sway-modules.yml
- type: script
scripts:
- setswaynvidiaenvironment.sh
- setswaynvidiaenvironment.sh
- from-file: common/final-modules.yml
5 changes: 3 additions & 2 deletions recipes/recipe-sway-nvidia-open-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/sericea

image-version: 40
image-version: 41

modules:
- from-file: common/remove-sddm.yml
Expand All @@ -14,4 +14,5 @@ modules:
- from-file: common/sway-modules.yml
- type: script
scripts:
- setswaynvidiaenvironment.sh
- setswaynvidiaenvironment.sh
- from-file: common/final-modules.yml
5 changes: 3 additions & 2 deletions recipes/recipe-sway-nvidia-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/sericea

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
Expand All @@ -13,4 +13,5 @@ modules:
- from-file: common/sway-modules.yml
- type: script
scripts:
- setswaynvidiaenvironment.sh
- setswaynvidiaenvironment.sh
- from-file: common/final-modules.yml
5 changes: 3 additions & 2 deletions recipes/recipe-sway-nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/sericea

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
Expand All @@ -13,4 +13,5 @@ modules:
- from-file: common/sway-modules.yml
- type: script
scripts:
- setswaynvidiaenvironment.sh
- setswaynvidiaenvironment.sh
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-sway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/sericea

image-version: 40
image-version: 41

modules:
- from-file: common/sddm-modules.yml
- from-file: common/common-modules.yml
- from-file: common/sway-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-wayfire-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/wayfire-modules.yml
- from-file: common/final-modules.yml

3 changes: 2 additions & 1 deletion recipes/recipe-wayfire-nvidia-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/nvidia-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/wayfire-modules.yml
- from-file: common/final-modules.yml
3 changes: 2 additions & 1 deletion recipes/recipe-wayfire-nvidia-open-gdm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ description: ublue images for wayland compositors

base-image: quay.io/fedora-ostree-desktops/base

image-version: 40
image-version: 41

modules:
- from-file: common/common-modules.yml
- from-file: common/nvidia-open-modules.yml
- from-file: common/gdm-modules.yml
- from-file: common/wayfire-modules.yml
- from-file: common/final-modules.yml
Loading

0 comments on commit ca09552

Please sign in to comment.