From 3048fb56b31d652f9bb799270c0ca8502c44e167 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Fri, 4 Oct 2024 01:06:34 -0500 Subject: [PATCH 1/3] feat: use negativo17 in lieu of rpmfusion --- .github/workflows/reusable-build.yml | 1 - Containerfile | 5 ++--- install.sh | 20 -------------------- nvidia-install.sh | 10 ++-------- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 9bc3168b..93c05603 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -223,7 +223,6 @@ jobs: FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }} KERNEL_FLAVOR=${{ matrix.kernel_flavor }} KERNEL_VERSION=${{ env.KERNEL_VERSION }} - RPMFUSION_MIRROR=${{ vars.RPMFUSION_MIRROR }} labels: ${{ steps.meta.outputs.labels }} oci: false extra-args: | diff --git a/Containerfile b/Containerfile index bd6d072e..7f224e00 100644 --- a/Containerfile +++ b/Containerfile @@ -10,13 +10,13 @@ FROM ghcr.io/${SOURCE_ORG}/${KERNEL_FLAVOR}-kernel:${KERNEL_VERSION} AS kernel FROM scratch AS ctx COPY / / -FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS main +#FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS main +FROM git.shermanclan.net/bsherman/silverblue-main-neg17:${FEDORA_MAJOR_VERSION} AS main ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}" ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}" ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}" -ARG RPMFUSION_MIRROR="" ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.7-200.fc40.x86_64}" RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ @@ -41,7 +41,6 @@ ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}" ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}" ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}" -ARG RPMFUSION_MIRROR="" RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ --mount=type=bind,from=ctx,src=/,dst=/ctx \ diff --git a/install.sh b/install.sh index b66706d2..889ff0ab 100755 --- a/install.sh +++ b/install.sh @@ -9,20 +9,6 @@ if [ "${KERNEL_FLAVOR}" = "main" ]; then exit 0 fi -# after F41 launches, bump to 42 -if [[ "${FEDORA_MAJOR_VERSION}" -ge 41 ]]; then - # note: this is done before single mirror hack to ensure this persists in image and is not reset - # pre-release rpmfusion is in a different location - sed -i "s%free/fedora/releases%free/fedora/development%" /etc/yum.repos.d/rpmfusion-*.repo -fi - -if [ -n "${RPMFUSION_MIRROR}" ]; then - # force use of single rpmfusion mirror - echo "Using single rpmfusion mirror: ${RPMFUSION_MIRROR}" - sed -i.bak "s%^metalink=%#metalink=%" /etc/yum.repos.d/rpmfusion-*.repo - sed -i "s%^#baseurl=http://download1.rpmfusion.org%baseurl=${RPMFUSION_MIRROR}%" /etc/yum.repos.d/rpmfusion-*.repo -fi - # do HWE specific things if [ "${KERNEL_FLAVOR}" = "asus" ]; then echo "install.sh: steps for KERNEL_FLAVOR: ${KERNEL_FLAVOR}" @@ -99,10 +85,4 @@ else echo "install.sh: post-install for unexpected KERNEL_FLAVOR: ${KERNEL_FLAVOR}" fi -if [ -n "${RPMFUSION_MIRROR}" ]; then - # reset forced use of single rpmfusion mirror - echo "Revert from single rpmfusion mirror: ${RPMFUSION_MIRROR}" - rename -v .repo.bak .repo /etc/yum.repos.d/rpmfusion-*repo.bak -fi - /ctx/build-initramfs.sh diff --git a/nvidia-install.sh b/nvidia-install.sh index 8e0d4d75..231273fe 100755 --- a/nvidia-install.sh +++ b/nvidia-install.sh @@ -6,20 +6,14 @@ RELEASE="$(rpm -E %fedora)" sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo -# after F41 launches, bump to 42 -if [[ "${FEDORA_MAJOR_VERSION}" -ge 41 ]]; then - # note: this is done before single mirror hack to ensure this persists in image and is not reset - # pre-release rpmfusion is in a different location - sed -i "s%free/fedora/releases%free/fedora/development%" /etc/yum.repos.d/rpmfusion-*.repo -fi - ## nvidia install steps rpm-ostree install /tmp/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm # enables nvidia repos provided by ublue-os-nvidia-addons sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/eyecantcu-supergfxctl.repo -sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/nvidia-container-toolkit.repo +#NOTE: nvidia drivers are already provided by negativo17-fedora-multimedia.repo, no need to enable +#sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo source /tmp/akmods-rpms/kmods/nvidia-vars From 2d091d5aa212303764cdefb292afad28d6a7c3b3 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Fri, 4 Oct 2024 01:27:56 -0500 Subject: [PATCH 2/3] disable rpmfusion and use proper FROM --- Containerfile | 3 +-- install.sh | 3 +++ nvidia-install.sh | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index 7f224e00..013e4b5b 100644 --- a/Containerfile +++ b/Containerfile @@ -10,8 +10,7 @@ FROM ghcr.io/${SOURCE_ORG}/${KERNEL_FLAVOR}-kernel:${KERNEL_VERSION} AS kernel FROM scratch AS ctx COPY / / -#FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS main -FROM git.shermanclan.net/bsherman/silverblue-main-neg17:${FEDORA_MAJOR_VERSION} AS main +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS main ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-main}" diff --git a/install.sh b/install.sh index 889ff0ab..c5c8100b 100755 --- a/install.sh +++ b/install.sh @@ -9,6 +9,9 @@ if [ "${KERNEL_FLAVOR}" = "main" ]; then exit 0 fi +# disable any remaining rpmfusion repos +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion*.repo + # do HWE specific things if [ "${KERNEL_FLAVOR}" = "asus" ]; then echo "install.sh: steps for KERNEL_FLAVOR: ${KERNEL_FLAVOR}" diff --git a/nvidia-install.sh b/nvidia-install.sh index 231273fe..ad0526d1 100755 --- a/nvidia-install.sh +++ b/nvidia-install.sh @@ -4,6 +4,9 @@ set -ouex pipefail RELEASE="$(rpm -E %fedora)" +# disable any remaining rpmfusion repos +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion*.repo + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo ## nvidia install steps @@ -13,7 +16,7 @@ rpm-ostree install /tmp/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/eyecantcu-supergfxctl.repo sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/nvidia-container-toolkit.repo #NOTE: nvidia drivers are already provided by negativo17-fedora-multimedia.repo, no need to enable -#sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo +sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo source /tmp/akmods-rpms/kmods/nvidia-vars From 4c8b1bfbe3985198e99b631b816b7639e0a31633 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Sat, 5 Oct 2024 23:34:29 -0500 Subject: [PATCH 3/3] don't enable redundante fedora-nvidia repo --- nvidia-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvidia-install.sh b/nvidia-install.sh index ad0526d1..ca274b14 100755 --- a/nvidia-install.sh +++ b/nvidia-install.sh @@ -16,7 +16,7 @@ rpm-ostree install /tmp/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/eyecantcu-supergfxctl.repo sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/nvidia-container-toolkit.repo #NOTE: nvidia drivers are already provided by negativo17-fedora-multimedia.repo, no need to enable -sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo +#sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' /etc/yum.repos.d/negativo17-fedora-nvidia.repo source /tmp/akmods-rpms/kmods/nvidia-vars