Skip to content

Commit

Permalink
feat: use negativo17 in lieu of rpmfusion (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsherman authored Oct 5, 2024
1 parent adf1583 commit 891a173
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 44 deletions.
1 change: 0 additions & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ jobs:
SOURCE_ORG=${{ env.SOURCE_ORG }}
SOURCE_IMAGE=${{ env.SOURCE_IMAGE }}
FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }}
RPMFUSION_MIRROR=${{ vars.RPMFUSION_MIRROR }}
KERNEL_VERSION=${{ env.KERNEL_VERSION }}
IMAGE_REGISTRY=${{ env.IMAGE_REGISTRY }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
1 change: 0 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION}

ARG IMAGE_NAME="${IMAGE_NAME:-silverblue}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG RPMFUSION_MIRROR="${:-}"
ARG KERNEL_VERSION="${KERNEL_VERSION:-6.9.7-200.fc40.x86_64}"

COPY sys_files/usr /usr
Expand Down
54 changes: 20 additions & 34 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,11 @@ RELEASE="$(rpm -E %fedora)"
KERNEL_SUFFIX=""
QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(|'"$KERNEL_SUFFIX"'-)(\d+\.\d+\.\d+)' | sed -E 's/kernel-(|'"$KERNEL_SUFFIX"'-)//')"

RPMFUSION_MIRROR_RPMS="https://mirrors.rpmfusion.org"
if [ -n "${RPMFUSION_MIRROR}" ]; then
RPMFUSION_MIRROR_RPMS=${RPMFUSION_MIRROR}
fi

mkdir -p /tmp/rpm-repos
curl -Lo /tmp/rpm-repos/rpmfusion-free-release-"${RELEASE}".noarch.rpm "${RPMFUSION_MIRROR_RPMS}"/free/fedora/rpmfusion-free-release-"${RELEASE}".noarch.rpm
curl -Lo /tmp/rpm-repos/rpmfusion-nonfree-release-"${RELEASE}".noarch.rpm "${RPMFUSION_MIRROR_RPMS}"/nonfree/fedora/rpmfusion-nonfree-release-"${RELEASE}".noarch.rpm

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/rpm-repos/*.rpm \
/tmp/akmods-rpms/*.rpm \
fedora-repos-archive

Expand All @@ -42,25 +32,27 @@ else
/tmp/kernel-rpms/kernel-modules-*.rpm
fi

if [[ "${FEDORA_MAJOR_VERSION}" -ge 39 ]]; then
# note: this is done before single mirror hack to ensure this persists in image and is not reset
echo "Enable rpmfusion-(non)free-updates-testing with low priority for Fedora ${FEDORA_MAJOR_VERSION}"
sed -i '0,/enabled=0/{s/enabled=0/enabled=1\npriority=110/}' /etc/yum.repos.d/rpmfusion-*-updates-testing.repo
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=0/{s/enabled=0/enabled=1\npriority=90/}' /etc/yum.repos.d/negativo17-fedora-multimedia.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

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
# 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 \
libvdpau \
mesa-dri-drivers \
mesa-filesystem \
mesa-libEGL \
mesa-libGL \
mesa-libgbm \
mesa-libglapi \
mesa-libxatracker \
mesa-va-drivers \
mesa-vulkan-drivers

# run common packages script
/ctx/packages.sh
Expand All @@ -71,9 +63,3 @@ fi
if [[ "${KERNEL_VERSION}" == "${QUALIFIED_KERNEL}" ]]; then
/ctx/initramfs.sh
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
18 changes: 10 additions & 8 deletions packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,21 @@
"google-noto-sans-javanese-fonts",
"google-noto-sans-sundanese-fonts",
"grub2-tools-extra",
"gstreamer1-plugins-bad",
"gstreamer1-plugins-ugly",
"heif-pixbuf-loader",
"htop",
"intel-media-driver",
"intel-vaapi-driver",
"just",
"kernel-tools",
"libcamera",
"libcamera-tools",
"libcamera-gstreamer",
"libcamera-ipa",
"libheif-freeworld",
"libheif-tools",
"libfdk-aac",
"libratbag-ratbagd",
"libva-intel-driver",
"libva-utils",
"lshw",
"mesa-va-drivers-freeworld.x86_64",
"net-tools",
"nvme-cli",
"nvtop",
Expand All @@ -43,7 +42,7 @@
"pam-u2f",
"pam_yubico",
"pamu2fcfg",
"pipewire-codec-aptx",
"pipewire-libs-extra",
"pipewire-plugin-libcamera",
"powerstat",
"smartmontools",
Expand Down Expand Up @@ -85,17 +84,20 @@
},
"exclude": {
"all": [
"fdk-aac-free",
"ffmpeg-free",
"google-noto-sans-cjk-vf-fonts",
"gstreamer1-plugins-bad-free-libs",
"gstreamer1-plugins-bad-free",
"gstreamer1-plugins-ugly-free",
"libavcodec-free",
"libavdevice-free",
"libavfilter-free",
"libavformat-free",
"libavutil-free",
"libpostproc-free",
"libswresample-free",
"libswscale-free",
"mesa-va-drivers"
"libswscale-free"
],
"kinoite": [
"ffmpegthumbnailer",
Expand Down

0 comments on commit 891a173

Please sign in to comment.