From 880a4c8b4552110a27945ba54ad74386470b746f Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 30 May 2023 11:06:47 -0500 Subject: [PATCH 1/2] feat: use custom repos provided by akmods --- Containerfile | 1 + build.sh | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Containerfile b/Containerfile index 4cd47f52..c697234a 100644 --- a/Containerfile +++ b/Containerfile @@ -13,6 +13,7 @@ ADD post-install.sh /tmp/post-install.sh ADD packages.json /tmp/packages.json COPY --from=ghcr.io/ublue-os/config:latest /rpms /tmp/rpms +COPY --from=ghcr.io/ublue-os/akmods:${FEDORA_MAJOR_VERSION} /repos /tmp/akmods-repos COPY --from=ghcr.io/ublue-os/akmods:${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms RUN /tmp/build.sh diff --git a/build.sh b/build.sh index ec88668c..5e06fa03 100755 --- a/build.sh +++ b/build.sh @@ -24,8 +24,11 @@ rpm-ostree install \ /tmp/rpms/*.rpm \ fedora-repos-archive -rpm-ostree install \ - /tmp/akmods-rpms/*.rpm +# akmods: use any provided repos, but leave them disabled +cp /tmp/akmods-repos/*.repo /etc/yum.repos.d/ +rpm-ostree install /tmp/akmods-rpms/*.rpm +sed -i 's@enabled=1@enabled=0@g' /tmp/akmods-repos/*.repo +cp /tmp/akmods-repos/*.repo /etc/yum.repos.d/ if [[ "${#INCLUDED_PACKAGES[@]}" -gt 0 && "${#EXCLUDED_PACKAGES[@]}" -eq 0 ]]; then rpm-ostree install \ From 64d2eee23d4663d632590baee784b075e4edff1d Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Wed, 31 May 2023 00:59:38 -0500 Subject: [PATCH 2/2] refactor: use improved akmods 3rd party repo method --- Containerfile | 1 - build.sh | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Containerfile b/Containerfile index c697234a..4cd47f52 100644 --- a/Containerfile +++ b/Containerfile @@ -13,7 +13,6 @@ ADD post-install.sh /tmp/post-install.sh ADD packages.json /tmp/packages.json COPY --from=ghcr.io/ublue-os/config:latest /rpms /tmp/rpms -COPY --from=ghcr.io/ublue-os/akmods:${FEDORA_MAJOR_VERSION} /repos /tmp/akmods-repos COPY --from=ghcr.io/ublue-os/akmods:${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms RUN /tmp/build.sh diff --git a/build.sh b/build.sh index 5e06fa03..d90ed9d4 100755 --- a/build.sh +++ b/build.sh @@ -24,11 +24,18 @@ rpm-ostree install \ /tmp/rpms/*.rpm \ fedora-repos-archive -# akmods: use any provided repos, but leave them disabled -cp /tmp/akmods-repos/*.repo /etc/yum.repos.d/ -rpm-ostree install /tmp/akmods-rpms/*.rpm -sed -i 's@enabled=1@enabled=0@g' /tmp/akmods-repos/*.repo -cp /tmp/akmods-repos/*.repo /etc/yum.repos.d/ +rpm-ostree install /tmp/akmods-rpms/ublue-os/ublue-os-akmods-addons*.rpm +for REPO in $(rpm -ql ublue-os-akmods-addons|grep ^"/etc"|grep repo$); do + echo "akmods: enable default entry: ${REPO}" + sed -i '0,/enabled=0/{s/enabled=0/enabled=1/}' ${REPO} +done + +rpm-ostree install /tmp/akmods-rpms/kmods/*.rpm + +for REPO in $(rpm -ql ublue-os-akmods-addons|grep ^"/etc"|grep repo$); do + echo "akmods: disable per defaults: ${REPO}" + sed -i 's@enabled=1@enabled=0@g' ${REPO} +done if [[ "${#INCLUDED_PACKAGES[@]}" -gt 0 && "${#EXCLUDED_PACKAGES[@]}" -eq 0 ]]; then rpm-ostree install \