Skip to content

Commit

Permalink
feat: use negativo17 in lieu of rpmfusion (#282)
Browse files Browse the repository at this point in the history
* feat: use negativo17 in lieu of rpmfusion

* disable rpmfusion and use proper FROM

* don't enable redundante fedora-nvidia repo
  • Loading branch information
bsherman authored Oct 6, 2024
1 parent 1b38027 commit 82fbc21
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 deletions.
1 change: 0 additions & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 0 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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=""
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.7-200.fc40.x86_64}"

RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
Expand All @@ -41,7 +40,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 \
Expand Down
21 changes: 2 additions & 19 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,8 @@ 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
# 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
Expand Down Expand Up @@ -99,10 +88,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
13 changes: 5 additions & 8 deletions nvidia-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,19 @@ set -ouex pipefail

RELEASE="$(rpm -E %fedora)"

sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo
# disable any remaining rpmfusion repos
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/rpmfusion*.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
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo

## 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

Expand Down

0 comments on commit 82fbc21

Please sign in to comment.