From 5e07ee4bbcee1a7b12f9d3efe8ae3d10b44cdbfd Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Tue, 26 Mar 2024 17:26:26 -0500 Subject: [PATCH] refactor: keep contents related commands in scripts (#537) --- Containerfile | 7 +------ install.sh | 3 +++ post-install.sh | 7 +++++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Containerfile b/Containerfile index df521780..b57e60ed 100644 --- a/Containerfile +++ b/Containerfile @@ -21,14 +21,9 @@ COPY --from=ghcr.io/ublue-os/config:latest /rpms /tmp/rpms COPY --from=ghcr.io/ublue-os/akmods:main-${FEDORA_MAJOR_VERSION} /rpms/ublue-os /tmp/rpms COPY sys_files/usr /usr -RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-$(rpm -E %fedora)/ublue-os-staging-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_ublue-os_staging.repo && \ - wget https://copr.fedorainfracloud.org/coprs/kylegospo/oversteer/repo/fedora-$(rpm -E %fedora)/kylegospo-oversteer-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_kylegospo_oversteer.repo && \ - /tmp/install.sh && \ +RUN /tmp/install.sh && \ /tmp/post-install.sh && \ - rm -f /etc/yum.repos.d/_copr_ublue-os_staging.repo && \ - rm -f /etc/yum.repos.d/_copr_kylegospo_oversteer.repo && \ rm -rf /tmp/* /var/* && \ - if [[ "$IMAGE_NAME" == "base" ]]; then systemctl enable getty@tty1; fi && \ ostree container commit && \ mkdir -p /var/tmp && chmod -R 1777 /var/tmp diff --git a/install.sh b/install.sh index 02532428..81d1ccc3 100755 --- a/install.sh +++ b/install.sh @@ -13,6 +13,9 @@ wget -P /tmp/rpms \ ${RPMFUSION_MIRROR_RPMS}/free/fedora/rpmfusion-free-release-${RELEASE}.noarch.rpm \ ${RPMFUSION_MIRROR_RPMS}/nonfree/fedora/rpmfusion-nonfree-release-${RELEASE}.noarch.rpm +wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-${RELEASE}/ublue-os-staging-fedora-${RELEASE}.repo -O /etc/yum.repos.d/_copr_ublue-os_staging.repo +wget https://copr.fedorainfracloud.org/coprs/kylegospo/oversteer/repo/fedora-${RELEASE}/kylegospo-oversteer-fedora-${RELEASE}.repo -O /etc/yum.repos.d/_copr_kylegospo_oversteer.repo + rpm-ostree install \ /tmp/rpms/*.rpm \ fedora-repos-archive diff --git a/post-install.sh b/post-install.sh index f35798a6..53d69526 100755 --- a/post-install.sh +++ b/post-install.sh @@ -2,6 +2,10 @@ set -ouex pipefail +if [[ "$IMAGE_NAME" == "base" ]]; then + systemctl enable getty@tty1 +fi + systemctl enable rpm-ostreed-automatic.timer systemctl enable flatpak-system-update.timer @@ -10,3 +14,6 @@ systemctl --global enable flatpak-user-update.timer cp /usr/share/ublue-os/update-services/etc/rpm-ostreed.conf /etc/rpm-ostreed.conf ln -s "/usr/share/fonts/google-noto-sans-cjk-fonts" "/usr/share/fonts/noto-cjk" + +rm -f /etc/yum.repos.d/_copr_ublue-os_staging.repo +rm -f /etc/yum.repos.d/_copr_kylegospo_oversteer.repo