From e452b5080a64582ef8721057bdb3fba3ebff5002 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sun, 23 Jun 2024 09:03:08 -0400 Subject: [PATCH 01/58] feat: Use CoreOS Kernel --- .github/workflows/build-coreos-bluefin.yml | 28 ++++++++++++++ .github/workflows/reusable-build.yml | 44 +++++++++++++++------- Containerfile | 7 +++- build_files/base/coreos_kernel.sh | 15 ++++++++ build_files/base/install-akmods.sh | 31 ++++++++------- build_files/dx/install-akmods-dx.sh | 10 +++-- 6 files changed, 102 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/build-coreos-bluefin.yml create mode 100644 build_files/base/coreos_kernel.sh diff --git a/.github/workflows/build-coreos-bluefin.yml b/.github/workflows/build-coreos-bluefin.yml new file mode 100644 index 00000000000..e7bf585d931 --- /dev/null +++ b/.github/workflows/build-coreos-bluefin.yml @@ -0,0 +1,28 @@ +name: bluefin 39 +on: + merge_group: + pull_request: + branches: + - main + - testing + paths-ignore: + - '**.md' + - 'system_files/kinoite/**' + push: + branches: + - main + paths-ignore: + - '**.md' + - 'system_files/kinoite/**' + schedule: + - cron: '41 5 * * *' # 5:41 UTC everyday + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: coreos diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 49b90c9d3f2..ebf57048d4c 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -44,14 +44,13 @@ jobs: fedora_version: - ${{ inputs.fedora_version }} exclude: - - fedora_version: 38 - image_flavor: asus - - fedora_version: 38 - image_flavor: asus-nvidia - - fedora_version: 38 - image_flavor: surface - - fedora_version: 38 - image_flavor: surface-nvidia + - fedora_version: coreos + image_flavor: + - nvidia + - asus + - asus-nvidia + - surface + - surface-nvidia steps: - name: Checkout @@ -82,11 +81,23 @@ jobs: else echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV fi + # Make the Fedora Major Version an Environment Variable + echo "FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }}" >> $GITHUB_ENV + + - name: Get CoreOS Kernel Version and Fedora Version + id: coreos_kernel + shell: bash + if: ${{ matrix.fedora_version }} == 'coreos' + run: | + KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:$COREOS_STREAM | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + echo "kernel-release=$KERNEL_RELEASE" >> $GITHUB_OUTPUT + FEDORA_VERSION=$(echo $KERNEL_RELEASE | grep -oP 'fc\K[0-9]+') + echo "FEDORA_MAJOR_VERSION=$FEDORA_VERSION" >> $GITHUB_ENV - name: Verify base image uses: EyeCantCU/cosign-action/verify@v0.2.2 with: - containers: ${{ env.BASE_IMAGE_NAME}}-${{ matrix.image_flavor }}:${{ matrix.fedora_version }} + containers: ${{ env.BASE_IMAGE_NAME}}-${{ matrix.image_flavor }}:${{ env.FEDORA_MAJOR_VERSION }} - name: Verify Chainguard images if: matrix.base_name != 'bluefin' && matrix.base_name != 'aurora' @@ -123,6 +134,10 @@ jobs: IS_LATEST_VERSION=false IS_STABLE_VERSION=false IS_GTS_VERSION=false + elif [[ "${{ matrix.fedora_version }}" == "coreos" ]]; then + IS_LATEST_VERSION=false + IS_STABLE_VERSION=false + IS_GTS_VERSION=false fi COMMIT_TAGS=() @@ -180,7 +195,7 @@ jobs: shell: bash run: | set -eo pipefail - ver=$(skopeo inspect docker://ghcr.io/ublue-os/silverblue-${{ matrix.image_flavor }}:${{ matrix.fedora_version }} | jq -r '.Labels["org.opencontainers.image.version"]') + ver=$(skopeo inspect docker://ghcr.io/ublue-os/silverblue-${{ matrix.image_flavor }}:${{ env.FEDORA_MAJOR_VERSION }} | jq -r '.Labels["org.opencontainers.image.version"]') if [ -z "$ver" ] || [ "null" = "$ver" ]; then echo "inspected image version must not be empty or null" exit 1 @@ -216,9 +231,10 @@ jobs: IMAGE_NAME=${{ env.IMAGE_NAME }} IMAGE_FLAVOR=${{ matrix.image_flavor }} IMAGE_VENDOR=${{ github.repository_owner }} - FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }} + FEDORA_MAJOR_VERSION=${{ env.FEDORA_MAJOR_VERSION }} TARGET_BASE=${{ matrix.target_base }} AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} + COREOS_KERNEL=${{ steps.coreos_kernel.outputs.kernel-release }} labels: ${{ steps.meta.outputs.labels }} oci: false # TODO(GH-280) @@ -289,7 +305,7 @@ jobs: IMAGE_REGISTRY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }} IMAGE_NAME: ${{ env.IMAGE_NAME }} IMAGE_FLAVOR: ${{ matrix.image_flavor }} - FEDORA_VERSION: ${{ matrix.fedora_version }} + FEDORA_VERSION: ${{ env.FEDORA_MAJOR_VERSION }} run: echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" @@ -297,11 +313,11 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: - name: image-${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }} + name: image-${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ env.FEDORA_MAJOR_VERSION }} retention-days: 1 if-no-files-found: error path: | - ${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}.txt + ${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ env.FEDORA_MAJOR_VERSION }}.txt check: name: Check all ${{ inputs.brand_name }} ${{ inputs.fedora_version }} builds successful diff --git a/Containerfile b/Containerfile index 841ad2ce874..4581b913382 100644 --- a/Containerfile +++ b/Containerfile @@ -5,11 +5,12 @@ ARG SOURCE_IMAGE="${SOURCE_IMAGE:-${BASE_IMAGE_NAME}-${IMAGE_FLAVOR}}" ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG TARGET_BASE="${TARGET_BASE:-bluefin}" +ARG COREOS_KERNEL="${KERNEL:-}" # FROM's for copying ARG KMOD_SOURCE_COMMON="ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}" FROM ${KMOD_SOURCE_COMMON} as akmods -FROM ghcr.io/ublue-os/bluefin-cli as bluefin-cli +FROM ghcr.io/ublue-os/bluefin-cli:latest as bluefin-cli ## bluefin image section FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS base @@ -20,6 +21,7 @@ ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" +ARG COREOS_KERNEL="${KERNEL}" # COPY Build Files COPY build_files/base build_files/shared /tmp/build/ @@ -52,13 +54,14 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" +ARG COREOS_KERNEL="${KERNEL}" # dx specific files come from the dx directory in this repo COPY build_files/dx build_files/shared /tmp/build/ COPY system_files/dx / COPY packages.json /tmp/packages.json -# Copy akmods-extra from ublue +# Copy akmods from ublue COPY --from=akmods /rpms /tmp/akmods-rpms # Build, Clean-up, Commit diff --git a/build_files/base/coreos_kernel.sh b/build_files/base/coreos_kernel.sh new file mode 100644 index 00000000000..665a418a2c3 --- /dev/null +++ b/build_files/base/coreos_kernel.sh @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +set -eoux pipefail + +if [[ -n ${COREOS_KERNEL:-} ]]; then + KERNEL_VERSION=${COREOS_KERNEL} + KERNEL_MAJOR_MINOR_PATCH=$(echo $KERNEL_VERSION | cut -d '-' -f 1) + KERNEL_RELEASE=$(echo $KERNEL_VERSION | cut -d '-' -f 2) + rpm-ostree override replace --experimental \ + https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ + https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ + https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ + https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ + https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-extra-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm +fi diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 7fda38929f4..37fcdcad68f 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -2,18 +2,23 @@ set -ouex pipefail -sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo -if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then - rpm-ostree install \ - /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ - /tmp/akmods-rpms/kmods/*xone*.rpm \ - /tmp/akmods-rpms/kmods/*openrazer*.rpm \ - /tmp/akmods-rpms/kmods/*wl*.rpm \ - /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm -fi -if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then - rpm-ostree install \ - /tmp/akmods-rpms/kmods/*evdi*.rpm -fi sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo + +if [[ -z ${COREOS_KERNEL:-} ]]; then + sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo + sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo + if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ + /tmp/akmods-rpms/kmods/*xone*.rpm \ + /tmp/akmods-rpms/kmods/*openrazer*.rpm \ + /tmp/akmods-rpms/kmods/*wl*.rpm \ + /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm + fi + if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*evdi*.rpm + fi + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo +fi diff --git a/build_files/dx/install-akmods-dx.sh b/build_files/dx/install-akmods-dx.sh index 3949c139759..dbd8fb5376f 100644 --- a/build_files/dx/install-akmods-dx.sh +++ b/build_files/dx/install-akmods-dx.sh @@ -2,8 +2,10 @@ set -ouex pipefail -sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo -if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then - rpm-ostree install \ - /tmp/akmods-rpms/kmods/*kvmfr*.rpm +if [[ -z ${COREOS_KERNEL:-} ]]; then + sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo + if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*kvmfr*.rpm + fi fi From fc7f99e4f64ac07afe0e6193c538dc7ec4011019 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sun, 23 Jun 2024 09:08:54 -0400 Subject: [PATCH 02/58] chore: updated Containerfile Args --- Containerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index 4581b913382..1dee721f913 100644 --- a/Containerfile +++ b/Containerfile @@ -5,7 +5,7 @@ ARG SOURCE_IMAGE="${SOURCE_IMAGE:-${BASE_IMAGE_NAME}-${IMAGE_FLAVOR}}" ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG TARGET_BASE="${TARGET_BASE:-bluefin}" -ARG COREOS_KERNEL="${KERNEL:-}" +ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # FROM's for copying ARG KMOD_SOURCE_COMMON="ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}" @@ -21,7 +21,7 @@ ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" -ARG COREOS_KERNEL="${KERNEL}" +ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # COPY Build Files COPY build_files/base build_files/shared /tmp/build/ @@ -54,7 +54,7 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" -ARG COREOS_KERNEL="${KERNEL}" +ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # dx specific files come from the dx directory in this repo COPY build_files/dx build_files/shared /tmp/build/ From 8d8009fc5727c3000d8796ab24c2b0aa32d63071 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sun, 23 Jun 2024 09:10:41 -0400 Subject: [PATCH 03/58] chore: explicitly set coreOS stream to stable --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index ebf57048d4c..5d375048b65 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -89,7 +89,7 @@ jobs: shell: bash if: ${{ matrix.fedora_version }} == 'coreos' run: | - KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:$COREOS_STREAM | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') echo "kernel-release=$KERNEL_RELEASE" >> $GITHUB_OUTPUT FEDORA_VERSION=$(echo $KERNEL_RELEASE | grep -oP 'fc\K[0-9]+') echo "FEDORA_MAJOR_VERSION=$FEDORA_VERSION" >> $GITHUB_ENV From 80a627d8de6a61e6fb303be7e1cfa9aa611b36ec Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sun, 23 Jun 2024 12:16:35 -0400 Subject: [PATCH 04/58] chore(ci): Match CoreOS Kernel workflow for merge --- .github/workflows/build-coreos-bluefin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-coreos-bluefin.yml b/.github/workflows/build-coreos-bluefin.yml index e7bf585d931..354ea033dab 100644 --- a/.github/workflows/build-coreos-bluefin.yml +++ b/.github/workflows/build-coreos-bluefin.yml @@ -1,4 +1,4 @@ -name: bluefin 39 +name: bluefin CoreOS Kernel on: merge_group: pull_request: From 2dc8ca2c72e53dfb05ee4a998ffa7faf84305b7c Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sun, 23 Jun 2024 12:37:24 -0400 Subject: [PATCH 05/58] chore(ci): Fix Excludes --- .github/workflows/reusable-build.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 5d375048b65..3606b22ac40 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -44,13 +44,20 @@ jobs: fedora_version: - ${{ inputs.fedora_version }} exclude: + - fedora_version: 39 + image_flavor: asus + - fedora_version: 39 + image_flavor: asus-nvidia - fedora_version: coreos - image_flavor: - - nvidia - - asus - - asus-nvidia - - surface - - surface-nvidia + image_flavor: nvidia + - fedora_version: coreos + image_flavor: asus + - fedora_version: coreos + image_flavor: asus-nvidia + - fedora_version: coreos + image_flavor: surface + - fedora_version: coreos + image_flavor: surface-nvidia steps: - name: Checkout From a909e0126c4f591ad88c3e70daeb4c8bc8fda075 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:01:01 -0400 Subject: [PATCH 06/58] chore(ci): coreOS tags --- .github/workflows/build-39-bluefin.yml | 1 + .github/workflows/build-40-bluefin.yml | 1 + .github/workflows/reusable-build.yml | 22 ++++++++++++++-------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-39-bluefin.yml b/.github/workflows/build-39-bluefin.yml index f071d415519..8c2450f5a25 100644 --- a/.github/workflows/build-39-bluefin.yml +++ b/.github/workflows/build-39-bluefin.yml @@ -11,6 +11,7 @@ on: push: branches: - main + - testing paths-ignore: - '**.md' - 'system_files/kinoite/**' diff --git a/.github/workflows/build-40-bluefin.yml b/.github/workflows/build-40-bluefin.yml index af8bd525b04..0c6fe121f5d 100644 --- a/.github/workflows/build-40-bluefin.yml +++ b/.github/workflows/build-40-bluefin.yml @@ -11,6 +11,7 @@ on: push: branches: - main + - testing paths-ignore: - '**.md' - 'system_files/kinoite/**' diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 444bb219ddc..c69c96ed00c 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -139,6 +139,7 @@ jobs: else IS_COREOS=false fi + echo "IS_COREOS=$IS_COREOS" >> $GITHUB_ENV COMMIT_TAGS=() BUILD_TAGS=() @@ -156,7 +157,7 @@ jobs: if [[ ${IS_COREOS} == "true" ]]; then BUILD_TAGS=("${FEDORA_VERSION}-coreos" "${FEDORA_VERSION}-coreos-${TIMESTAMP}") else - BUILD_TAGS=("${FEDORA_VERSION}-coreos" "${FEDORA_VERSION}-coreos-${TIMESTAMP}") + BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") fi if [[ ${{ github.ref_name }} == "testing" ]]; then @@ -171,10 +172,12 @@ jobs: BUILD_TAGS+=("gts-testing-coreos") echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV elif [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then + [[ "$IS_STABLE_VERSION" == "true" ]] && \ + [[ "$IS_COREOS" == "false" ]]; then BUILD_TAGS+=("testing") echo "DEFAULT_TAG=testing" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]]; then + elif [[ "$IS_GTS_VERSION" == "true" ]] && \ + [[ "$IS_COREOS" == "false" ]]; then BUILD_TAGS+=("gts-testing") echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV fi @@ -188,10 +191,12 @@ jobs: BUILD_TAGS+=("gts-coreos") echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV elif [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then + [[ "$IS_STABLE_VERSION" == "true" ]] && \ + [[ "$IS_COREOS" == "false" ]]; then BUILD_TAGS+=("latest") echo "DEFAULT_TAG=latest" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]]; then + elif [[ "$IS_GTS_VERSION" == "true" ]] && \ + [[ "$IS_COREOS" == "false" ]]; then BUILD_TAGS+=("gts") echo "DEFAULT_TAG=gts" >> $GITHUB_ENV fi @@ -224,12 +229,13 @@ jobs: fi echo "VERSION=$ver" >> $GITHUB_OUTPUT - - name: Get CoreOS Kernel Version and Fedora Version + - name: Get CoreOS Kernel Version id: coreos_kernel shell: bash - if: ${{ matrix.coreos_tag }} == 'coreos' run: | - KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + if [[ ${{ env.IS_COREOS }} == "true" ]]; then + KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + fi echo "kernel-release=$KERNEL_RELEASE" >> $GITHUB_OUTPUT # Build metadata From e77dd816b372a3b482fdc10d20c616dc0a54bd6c Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:08:30 -0400 Subject: [PATCH 07/58] chore(ci): coreOS tags --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index c69c96ed00c..5c0a912f7c3 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -154,7 +154,7 @@ jobs: COMMIT_TAGS+=("${SHA_SHORT}") fi - if [[ ${IS_COREOS} == "true" ]]; then + if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then BUILD_TAGS=("${FEDORA_VERSION}-coreos" "${FEDORA_VERSION}-coreos-${TIMESTAMP}") else BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") From 7b28e47385a8abc703f07f81696b5904874c35e8 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:02:23 -0400 Subject: [PATCH 08/58] chore(ci): coreOS tags --- .github/workflows/reusable-build.yml | 78 +++++++++++++++------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 5c0a912f7c3..9b5c0377ceb 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -161,44 +161,48 @@ jobs: fi if [[ ${{ github.ref_name }} == "testing" ]]; then - BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "true" ]]; then - BUILD_TAGS+=("testing-coreos") - echo "DEFAULT_TAG=testing-coreos" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "true" ]]; then - BUILD_TAGS+=("gts-testing-coreos") - echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV - elif [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "false" ]]; then - BUILD_TAGS+=("testing") - echo "DEFAULT_TAG=testing" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ + if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos" "${FEDORA_VERSION}-testing-coreos-${TIMESTAMP}") + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("testing-coreos") + echo "DEFAULT_TAG=testing-coreos" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]] && \ + [[ "$IS_COREOS" == "true" ]]; then + BUILD_TAGS+=("gts-testing-coreos") + echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV + fi + else + BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("testing") + echo "DEFAULT_TAG=testing" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]]; then + BUILD_TAGS+=("gts-testing") + echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV + fi + else + if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("latest-coreos") + echo "DEFAULT_TAG=latest-coreos" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]]; then + BUILD_TAGS+=("gts-coreos") + echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV + fi + else + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("latest") + echo "DEFAULT_TAG=latest" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]] && \ [[ "$IS_COREOS" == "false" ]]; then - BUILD_TAGS+=("gts-testing") - echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV - fi - elif [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "true" ]]; then - BUILD_TAGS+=("latest-coreos") - echo "DEFAULT_TAG=latest-coreos" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "true" ]]; then - BUILD_TAGS+=("gts-coreos") - echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV - elif [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "false" ]]; then - BUILD_TAGS+=("latest") - echo "DEFAULT_TAG=latest" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "false" ]]; then - BUILD_TAGS+=("gts") - echo "DEFAULT_TAG=gts" >> $GITHUB_ENV + BUILD_TAGS+=("gts") + echo "DEFAULT_TAG=gts" >> $GITHUB_ENV + fi + fi fi if [[ "${{ github.event_name }}" == "pull_request" ]]; then From 6f709f1f22375542b814bb6daf553a45245f3496 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:08:06 -0400 Subject: [PATCH 09/58] chore(ci): coreOS tags --- .github/workflows/reusable-build.yml | 49 ++++++++++++++-------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 9b5c0377ceb..285ad73477f 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -161,46 +161,47 @@ jobs: fi if [[ ${{ github.ref_name }} == "testing" ]]; then - if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos" "${FEDORA_VERSION}-testing-coreos-${TIMESTAMP}") if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("testing-coreos") - echo "DEFAULT_TAG=testing-coreos" >> $GITHUB_ENV + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("testing-coreos") + echo "DEFAULT_TAG=testing-coreos" >> $GITHUB_ENV elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "true" ]]; then - BUILD_TAGS+=("gts-testing-coreos") - echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV + [[ "$IS_COREOS" == "true" ]]; then + BUILD_TAGS+=("gts-testing-coreos") + echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV fi - else + else BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("testing") - echo "DEFAULT_TAG=testing" >> $GITHUB_ENV + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("testing") + echo "DEFAULT_TAG=testing" >> $GITHUB_ENV elif [[ "$IS_GTS_VERSION" == "true" ]]; then - BUILD_TAGS+=("gts-testing") - echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV + BUILD_TAGS+=("gts-testing") + echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV fi + fi else if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("latest-coreos") - echo "DEFAULT_TAG=latest-coreos" >> $GITHUB_ENV + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("latest-coreos") + echo "DEFAULT_TAG=latest-coreos" >> $GITHUB_ENV elif [[ "$IS_GTS_VERSION" == "true" ]]; then - BUILD_TAGS+=("gts-coreos") - echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV + BUILD_TAGS+=("gts-coreos") + echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV fi else if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("latest") - echo "DEFAULT_TAG=latest" >> $GITHUB_ENV + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("latest") + echo "DEFAULT_TAG=latest" >> $GITHUB_ENV elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "false" ]]; then - BUILD_TAGS+=("gts") - echo "DEFAULT_TAG=gts" >> $GITHUB_ENV + [[ "$IS_COREOS" == "false" ]]; then + BUILD_TAGS+=("gts") + echo "DEFAULT_TAG=gts" >> $GITHUB_ENV fi fi fi From 9359e1edd5fe1568f5e598f5efa8b1c72634b617 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:42:42 -0400 Subject: [PATCH 10/58] feat: add nvidia coreos --- .github/workflows/reusable-build.yml | 36 ++++++++++++++++++++++++++-- Containerfile | 6 +++++ build_files/base/install-akmods.sh | 27 +++++++++++++++++---- build_files/base/nvidia.sh | 2 +- build_files/shared/initramfs.sh | 2 +- 5 files changed, 64 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 285ad73477f..ea3b5e3d2e0 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -45,6 +45,7 @@ jobs: - ${{ inputs.fedora_version }} coreos_tag: - coreos + - coreos-nv - "" exclude: - fedora_version: 39 @@ -61,6 +62,16 @@ jobs: image_flavor: surface - coreos_tag: coreos image_flavor: surface-nvidia + - coreos_tag: coreos-nv + image_flavor: nvidia + - coreos_tag: coreos-nv + image_flavor: asus + - coreos_tag: coreos-nv + image_flavor: asus-nvidia + - coreos_tag: coreos-nv + image_flavor: surface + - coreos_tag: coreos-nv + image_flavor: surface-nvidia steps: - name: Checkout @@ -161,7 +172,7 @@ jobs: fi if [[ ${{ github.ref_name }} == "testing" ]]; then - if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + if [[ "${{ matrix.coreos_tag }}" == "coreos" ]]; then BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos" "${FEDORA_VERSION}-testing-coreos-${TIMESTAMP}") if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then @@ -172,6 +183,17 @@ jobs: BUILD_TAGS+=("gts-testing-coreos") echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV fi + elif [[ "${{ matrix.coreos_tag }}" == "coreos-nv" ]]; then + BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos-nv" "${FEDORA_VERSION}-testing-coreos-nv-${TIMESTAMP}") + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("testing-coreos-nv") + echo "DEFAULT_TAG=testing-coreos-nv" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]] && \ + [[ "$IS_COREOS" == "true" ]]; then + BUILD_TAGS+=("gts-testing-coreos-nv") + echo "DEFAULT_TAG=gts-testing-coreos-nv" >> $GITHUB_ENV + fi else BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") if [[ "$IS_LATEST_VERSION" == "true" ]] && \ @@ -184,7 +206,7 @@ jobs: fi fi else - if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + if [[ "${{ matrix.coreos_tag }}" == "coreos" ]]; then if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then BUILD_TAGS+=("latest-coreos") @@ -193,6 +215,15 @@ jobs: BUILD_TAGS+=("gts-coreos") echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV fi + elif [[ "${{ matrix.coreos_tag }}" == "coreos-nv" ]]; then + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("latest-coreos-nv") + echo "DEFAULT_TAG=latest-coreos-nv" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]]; then + BUILD_TAGS+=("gts-coreos-nv") + echo "DEFAULT_TAG=gts-coreos-nv" >> $GITHUB_ENV + fi else if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then @@ -275,6 +306,7 @@ jobs: FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }} TARGET_BASE=${{ matrix.target_base }} AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} + COREOS_TAG=${{ matrix.coreos_tag }} COREOS_KERNEL=${{ steps.coreos_kernel.outputs.kernel-release }} labels: ${{ steps.meta.outputs.labels }} oci: false diff --git a/Containerfile b/Containerfile index 1dee721f913..76c66a4983a 100644 --- a/Containerfile +++ b/Containerfile @@ -5,11 +5,14 @@ ARG SOURCE_IMAGE="${SOURCE_IMAGE:-${BASE_IMAGE_NAME}-${IMAGE_FLAVOR}}" ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG TARGET_BASE="${TARGET_BASE:-bluefin}" +ARG COREOS_TAG="${COREOS_TAG:-}" ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # FROM's for copying ARG KMOD_SOURCE_COMMON="ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}" +ARG COREOS_KMODS="ghcr.io/ublue-os/ucore-kmods:stable" FROM ${KMOD_SOURCE_COMMON} as akmods +FROM ${COREOS_KMODS} as coreos_kmods FROM ghcr.io/ublue-os/bluefin-cli:latest as bluefin-cli ## bluefin image section @@ -21,6 +24,7 @@ ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" +ARG COREOS_TAG="${COREOS_TAG:-}" ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # COPY Build Files @@ -36,6 +40,7 @@ COPY --from=bluefin-cli /usr/bin/atuin /usr/bin/atuin COPY --from=bluefin-cli /usr/share/bash-prexec /usr/share/bash-prexec # COPY ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion COPY --from=akmods /rpms /tmp/akmods-rpms +COPY --from=coreos_kmods /rpms /tmp/coreos/rpms # Build, cleanup, commit. RUN rpm-ostree cliwrap install-to-root / && \ @@ -54,6 +59,7 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" +ARG COREOS_TAG="${COREOS_TAG:-}" ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # dx specific files come from the dx directory in this repo diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 37fcdcad68f..f477ac0e4b3 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -2,12 +2,10 @@ set -ouex pipefail -curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo -sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo - -if [[ -z ${COREOS_KERNEL:-} ]]; then +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo +if [[ -z ${COREOS_TAG:-} ]]; then + curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo - sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then rpm-ostree install \ /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ @@ -21,4 +19,23 @@ if [[ -z ${COREOS_KERNEL:-} ]]; then /tmp/akmods-rpms/kmods/*evdi*.rpm fi sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo +elif [[ ${COREOS_TAG} =~ "coreos" ]] + curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ + https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo + KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" + find /tmp/coreos/rpms + rpm-ostree install /tmp/coreos/rpms/ublue-os-ucore-addons-*.rpm + rpm-ostree install /tmp/coreos/rpms/kmods/zfs/*.rpm pv + depmod -A ${KERNEL_FOR_DEPMOD} + if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then + curl -Lo /etc/yum.repos.d/negativo17-fedora-nvidia.repo https://negativo17.org/repos/fedora-nvidia.repo + rpm-ostree install /tmp/coreos/rpms/kmods/nvidia/ublue-os-ucore-nvidia-*.rpm + sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + rpm-ostree install \ + /tmp/coreos/rpms/nvidia/kmod-nvidia-*.rpm \ + nvidia-driver-cuda \ + nvidia-container-toolkit + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + fi + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo fi diff --git a/build_files/base/nvidia.sh b/build_files/base/nvidia.sh index d04112cb12e..75e7b01bb52 100644 --- a/build_files/base/nvidia.sh +++ b/build_files/base/nvidia.sh @@ -3,7 +3,7 @@ set -ouex pipefail # Nvidia Configurations -if [[ "${IMAGE_FLAVOR}" =~ "nvidia" ]]; then +if [[ "${IMAGE_FLAVOR}" =~ "nvidia" || "${COREOS_TAG}" =~ "coreos-nv" ]]; then # Restore x11 for Nvidia Images if [[ "${BASE_IMAGE_NAME}" =~ "kinoite" && "${FEDORA_MAJOR_VERSION}" -gt "39" ]]; then rpm-ostree install plasma-workspace-x11 diff --git a/build_files/shared/initramfs.sh b/build_files/shared/initramfs.sh index e58acf1a62f..13217f5922c 100755 --- a/build_files/shared/initramfs.sh +++ b/build_files/shared/initramfs.sh @@ -3,7 +3,7 @@ set -oue pipefail # Remove nvidia specific files -if [[ "${IMAGE_FLAVOR}" =~ "nvidia" ]]; then +if [[ "${IMAGE_FLAVOR}" =~ "nvidia" || ${COREOS_TAG} =~ "coreos-nv" ]]; then rm -f /usr/lib/modprobe.d/nvk.conf rm -f /usr/lib/modprobe.d/amd-legacy.conf else From 99da0bf48f3bd27d6cff182ed04697e85bdf6059 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:48:23 -0400 Subject: [PATCH 11/58] chore: change coreos for artifact upload --- .github/workflows/reusable-build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index ea3b5e3d2e0..f38ad366114 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -44,8 +44,8 @@ jobs: fedora_version: - ${{ inputs.fedora_version }} coreos_tag: - - coreos - - coreos-nv + - -coreos + - -coreos-nv - "" exclude: - fedora_version: 39 @@ -172,7 +172,7 @@ jobs: fi if [[ ${{ github.ref_name }} == "testing" ]]; then - if [[ "${{ matrix.coreos_tag }}" == "coreos" ]]; then + if [[ "${{ matrix.coreos_tag }}" == "-coreos" ]]; then BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos" "${FEDORA_VERSION}-testing-coreos-${TIMESTAMP}") if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then @@ -183,7 +183,7 @@ jobs: BUILD_TAGS+=("gts-testing-coreos") echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV fi - elif [[ "${{ matrix.coreos_tag }}" == "coreos-nv" ]]; then + elif [[ "${{ matrix.coreos_tag }}" == "-coreos-nv" ]]; then BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos-nv" "${FEDORA_VERSION}-testing-coreos-nv-${TIMESTAMP}") if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then @@ -206,7 +206,7 @@ jobs: fi fi else - if [[ "${{ matrix.coreos_tag }}" == "coreos" ]]; then + if [[ "${{ matrix.coreos_tag }}" == "-coreos" ]]; then if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then BUILD_TAGS+=("latest-coreos") @@ -215,7 +215,7 @@ jobs: BUILD_TAGS+=("gts-coreos") echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV fi - elif [[ "${{ matrix.coreos_tag }}" == "coreos-nv" ]]; then + elif [[ "${{ matrix.coreos_tag }}" == "-coreos-nv" ]]; then if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then BUILD_TAGS+=("latest-coreos-nv") @@ -387,7 +387,7 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: - name: image-${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }} + name: image-${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}${{coreos_tag}} retention-days: 1 if-no-files-found: error path: | From f9116556300c1ffe2ac169f27046b175b6c6c832 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:49:53 -0400 Subject: [PATCH 12/58] fix: quote coreos tags --- .github/workflows/reusable-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index f38ad366114..cf11a9421df 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -44,8 +44,8 @@ jobs: fedora_version: - ${{ inputs.fedora_version }} coreos_tag: - - -coreos - - -coreos-nv + - "-coreos" + - "-coreos-nv" - "" exclude: - fedora_version: 39 From 5cf3e8d5abf337cd7b422145b5e60e8e2b665fdf Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:52:40 -0400 Subject: [PATCH 13/58] fix: use coreos tag for artifact upload --- .github/workflows/reusable-build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index cf11a9421df..243c20662fc 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -380,18 +380,19 @@ jobs: IMAGE_NAME: ${{ env.IMAGE_NAME }} IMAGE_FLAVOR: ${{ matrix.image_flavor }} FEDORA_VERSION: ${{ matrix.fedora_version }} + COREOS_TAG: ${{ matrix.coreos_tag }} run: - echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" + echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}${{ matrix.coreos_tag }}.txt" - name: Upload artifact if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: - name: image-${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}${{coreos_tag}} + name: image-${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag }} retention-days: 1 if-no-files-found: error path: | - ${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}.txt + ${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag}}.txt check: name: Check all ${{ inputs.brand_name }} ${{ inputs.fedora_version }} builds successful From 76fb64fbd1dfa7c72411a5b441b34057312b914b Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:54:16 -0400 Subject: [PATCH 14/58] fix: update excludes --- .github/workflows/reusable-build.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 243c20662fc..979c47c630a 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -52,25 +52,25 @@ jobs: image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - - coreos_tag: coreos + - coreos_tag: -coreos image_flavor: nvidia - - coreos_tag: coreos + - coreos_tag: -coreos image_flavor: asus - - coreos_tag: coreos + - coreos_tag: -coreos image_flavor: asus-nvidia - - coreos_tag: coreos + - coreos_tag: -coreos image_flavor: surface - - coreos_tag: coreos + - coreos_tag: -coreos image_flavor: surface-nvidia - - coreos_tag: coreos-nv + - coreos_tag: -coreos-nv image_flavor: nvidia - - coreos_tag: coreos-nv + - coreos_tag: -coreos-nv image_flavor: asus - - coreos_tag: coreos-nv + - coreos_tag: -coreos-nv image_flavor: asus-nvidia - - coreos_tag: coreos-nv + - coreos_tag: -coreos-nv image_flavor: surface - - coreos_tag: coreos-nv + - coreos_tag: -coreos-nv image_flavor: surface-nvidia steps: From 60009251ff0f26df30cc17498626bd4dbeecf717 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:05:07 -0400 Subject: [PATCH 15/58] fix: missing then --- build_files/base/install-akmods.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index f477ac0e4b3..ccc6925e69e 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -19,7 +19,7 @@ if [[ -z ${COREOS_TAG:-} ]]; then /tmp/akmods-rpms/kmods/*evdi*.rpm fi sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo -elif [[ ${COREOS_TAG} =~ "coreos" ]] +elif [[ ${COREOS_TAG} =~ "coreos" ]]; then curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" From 918e2177d856ebec2d086e132d9645f6bfa6b2d3 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:51:48 -0400 Subject: [PATCH 16/58] fix: rpm path --- build_files/base/install-akmods.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index ccc6925e69e..618eff029fb 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -24,7 +24,7 @@ elif [[ ${COREOS_TAG} =~ "coreos" ]]; then https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" find /tmp/coreos/rpms - rpm-ostree install /tmp/coreos/rpms/ublue-os-ucore-addons-*.rpm + rpm-ostree install /tmp/coreos/rpms/kmods/ublue-os-ucore-addons-*.rpm rpm-ostree install /tmp/coreos/rpms/kmods/zfs/*.rpm pv depmod -A ${KERNEL_FOR_DEPMOD} if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then From 987ec744bd322fdeb285b8ef66353cbbb7019263 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:01:55 -0400 Subject: [PATCH 17/58] fix: rpm path --- build_files/base/install-akmods.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 618eff029fb..c1d5e3b9fdc 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -32,10 +32,11 @@ elif [[ ${COREOS_TAG} =~ "coreos" ]]; then rpm-ostree install /tmp/coreos/rpms/kmods/nvidia/ublue-os-ucore-nvidia-*.rpm sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/nvidia-container-toolkit.repo rpm-ostree install \ - /tmp/coreos/rpms/nvidia/kmod-nvidia-*.rpm \ + /tmp/coreos/rpms/kmods/nvidia/kmod-nvidia-*.rpm \ nvidia-driver-cuda \ nvidia-container-toolkit sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo fi - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-nvidia.repo fi From 36cb807094f37c8eedd2b20cf966c2c44cb17eed Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:14:37 -0400 Subject: [PATCH 18/58] fix: disable negativo17 only for coreos-nv --- build_files/base/install-akmods.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index c1d5e3b9fdc..ecc480a82f3 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -36,7 +36,6 @@ elif [[ ${COREOS_TAG} =~ "coreos" ]]; then nvidia-driver-cuda \ nvidia-container-toolkit sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-nvidia.repo. fi - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-nvidia.repo fi From 0a6b6140b11ceeed2ce30a7aef66c6d29d2ceca3 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:59:02 -0400 Subject: [PATCH 19/58] fix: missing script in build base --- build_files/base/build-base.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_files/base/build-base.sh b/build_files/base/build-base.sh index 1f63f51aa3d..cd0dad6cca7 100644 --- a/build_files/base/build-base.sh +++ b/build_files/base/build-base.sh @@ -4,6 +4,7 @@ set -ouex pipefail . /tmp/build/firmware.sh +. /tmp/build/coreos_kernel.sh . /tmp/build/copr-repos.sh . /tmp/build/install-akmods.sh . /tmp/build/packages.sh From 05e8d7acce3d8434d14154bd4e677809096ad9c9 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 15:16:22 -0400 Subject: [PATCH 20/58] fix: disable nvidia coreOS --- .github/workflows/reusable-build.yml | 22 +++++++++++----------- build_files/base/install-akmods.sh | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 979c47c630a..3a9c4a86ed2 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -45,7 +45,7 @@ jobs: - ${{ inputs.fedora_version }} coreos_tag: - "-coreos" - - "-coreos-nv" + # - "-coreos-nv" - "" exclude: - fedora_version: 39 @@ -62,16 +62,16 @@ jobs: image_flavor: surface - coreos_tag: -coreos image_flavor: surface-nvidia - - coreos_tag: -coreos-nv - image_flavor: nvidia - - coreos_tag: -coreos-nv - image_flavor: asus - - coreos_tag: -coreos-nv - image_flavor: asus-nvidia - - coreos_tag: -coreos-nv - image_flavor: surface - - coreos_tag: -coreos-nv - image_flavor: surface-nvidia + # - coreos_tag: -coreos-nv + # image_flavor: nvidia + # - coreos_tag: -coreos-nv + # image_flavor: asus + # - coreos_tag: -coreos-nv + # image_flavor: asus-nvidia + # - coreos_tag: -coreos-nv + # image_flavor: surface + # - coreos_tag: -coreos-nv + # image_flavor: surface-nvidia steps: - name: Checkout diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index ecc480a82f3..83af16f81bf 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -27,15 +27,15 @@ elif [[ ${COREOS_TAG} =~ "coreos" ]]; then rpm-ostree install /tmp/coreos/rpms/kmods/ublue-os-ucore-addons-*.rpm rpm-ostree install /tmp/coreos/rpms/kmods/zfs/*.rpm pv depmod -A ${KERNEL_FOR_DEPMOD} - if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then - curl -Lo /etc/yum.repos.d/negativo17-fedora-nvidia.repo https://negativo17.org/repos/fedora-nvidia.repo - rpm-ostree install /tmp/coreos/rpms/kmods/nvidia/ublue-os-ucore-nvidia-*.rpm - sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - rpm-ostree install \ - /tmp/coreos/rpms/kmods/nvidia/kmod-nvidia-*.rpm \ - nvidia-driver-cuda \ - nvidia-container-toolkit - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-nvidia.repo. - fi + # if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then + # curl -Lo /etc/yum.repos.d/negativo17-fedora-nvidia.repo https://negativo17.org/repos/fedora-nvidia.repo + # rpm-ostree install /tmp/coreos/rpms/kmods/nvidia/ublue-os-ucore-nvidia-*.rpm + # sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + # rpm-ostree install \ + # /tmp/coreos/rpms/kmods/nvidia/kmod-nvidia-*.rpm \ + # nvidia-driver-cuda \ + # nvidia-container-toolkit + # sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + # sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-nvidia.repo. + # fi fi From 0f5b85fdadeb7dcdd8fe519cbc35a6db1c84e533 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:09:45 -0400 Subject: [PATCH 21/58] fix: stop building ISOs in testing --- .github/workflows/reusable-build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 3a9c4a86ed2..b437e65bab5 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -445,14 +445,14 @@ jobs: fi done - build_iso: - name: iso - needs: [check] - if: github.ref_name == 'testing' && inputs.fedora_version != '40' - # Eventually would be nice for building images in PRs - #if: ${{ endsWith(github.event.pull_request.title, '[ISO]') }} - uses: ./.github/workflows/reusable-build-iso.yml - secrets: inherit - with: - brand_name: ${{ inputs.brand_name }} - fedora_version: ${{ inputs.fedora_version }} + # build_iso: + # name: iso + # needs: [check] + # if: github.ref_name == 'testing' && inputs.fedora_version != '40' + # # Eventually would be nice for building images in PRs + # #if: ${{ endsWith(github.event.pull_request.title, '[ISO]') }} + # uses: ./.github/workflows/reusable-build-iso.yml + # secrets: inherit + # with: + # brand_name: ${{ inputs.brand_name }} + # fedora_version: ${{ inputs.fedora_version }} From 8ab5c9624efb3f4821d73453bb80939f57fbc86b Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:21:00 -0400 Subject: [PATCH 22/58] feat: bluefin cli now sources bling --- build_files/base/fetch-install.sh | 3 +++ just/bluefin-apps.just | 17 ------------- just/bluefin-system.just | 18 +++++++++++++- .../usr/share/ublue-os/bluefin-cli/bling.fish | 18 ++++++++++++++ .../usr/share/ublue-os/bluefin-cli/bling.sh | 24 +++++++++++++++++++ 5 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 system_files/shared/usr/share/ublue-os/bluefin-cli/bling.fish create mode 100644 system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh diff --git a/build_files/base/fetch-install.sh b/build_files/base/fetch-install.sh index 9a6b3206970..94a2519b440 100644 --- a/build_files/base/fetch-install.sh +++ b/build_files/base/fetch-install.sh @@ -9,6 +9,9 @@ install -c -m 0755 /tmp/starship /usr/bin # shellcheck disable=SC2016 echo 'eval "$(starship init bash)"' >> /etc/bashrc +# Bash Prexec +curl -Lo /usr/share/bash-prexec https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh + # Topgrade Install pip install --prefix=/usr topgrade diff --git a/just/bluefin-apps.just b/just/bluefin-apps.just index 6a6e1ff3462..c6f509def3c 100644 --- a/just/bluefin-apps.just +++ b/just/bluefin-apps.just @@ -86,23 +86,6 @@ install-jetbrains-toolbox: echo "Launching JetBrains Toolbox" ./jetbrains-toolbox-"${BUILD_VERSION}"/jetbrains-toolbox -alias atuin := install-atuin - -# Add atuin -install-atuin: - #!/usr/bin/bash - shell=$(basename $SHELL) - if test $shell = "fish"; then - echo "Adding atuin to your config.fish" - printf '\nif status is-interactive\n\tif type -q atuin\n\t\tatuin init fish | source\n\tend\nend\n' >> ${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish - elif test $shell = "zsh"; then - echo "Adding atuin to your .zshrc" - printf '\n[[ "$(command -v atuin)" ]] && eval "$(atuin init zsh)"\n' >> ${ZDOTDIR:-$HOME}/.zshrc - elif test $shell = "bash"; then - echo "Adding bash-prexec and atuin to your .bashrc" - printf '\n[[ -f /usr/share/bash-prexec ]] && source /usr/share/bash-prexec\n[[ "$(command -v atuin)" ]] && eval "$(atuin init bash)"\n' >> ~/.bashrc - fi - alias incus := install-incus # Install and configure Incus diff --git a/just/bluefin-system.just b/just/bluefin-system.just index c8a9a35c48b..e2d94341946 100644 --- a/just/bluefin-system.just +++ b/just/bluefin-system.just @@ -17,7 +17,23 @@ benchmark: # Configure Bluefin-CLI Terminal Experience with Brew bluefin-cli: - @brew bundle --file /usr/share/ublue-os/homebrew/bluefin-cli.Brewfile --no-lock + #!/usr/bin/bash + echo 'Installing bling from Homebrew 🍻🍻🍻' + brew bundle --file /usr/share/ublue-os/homebrew/bluefin-cli.Brewfile --no-lock + echo 'Setting up your Shell 🐚🐚🐚' + shell=$(basename $SHELL) + if test $shell -eq "fish"; then + echo 'Adding bling to your config.fish 🐟🐟🐟' + printf 'source /usr/share/ublue-os/bluefin-cli/bling.fish' >> ${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish + elif test $shell -eq "zsh"; then + echo 'Adding bling to your .zshrc 💤💤💤' + printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${ZDOTDIR:-$HOME}/.zshrc + elif test $shell -eq "bash"; then + echo 'Adding bling to your .bashrc 💥💥💥' + printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${HOME}/.bashrc + else + echo 'Unknown Shell ... You are on your own' + fi echo 'Installation complete ... please close and reopen your terminal!' # Configure Bluefin-CLI Terminal Experience diff --git a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.fish b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.fish new file mode 100644 index 00000000000..c813e3c617c --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.fish @@ -0,0 +1,18 @@ +# ls aliases +alias ll='eza -l --icons=auto --group-directories-first' +alias l.='eza -d .*' +alias ls='eza' +alias l1='eza -1' + +# ugrep for grep +alias grep='ug' +alias egrep='ug -E' +alias fgrep='ug -F' +alias xzgrep='ug -z' +alias xzegrep='ug -zE' +alias xzfgrep='ug -zF' + +if status is-interactive + eval "$(atuin init fish)" + eval "$(zoxide init fish)" +end diff --git a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh new file mode 100644 index 00000000000..e503d3317ae --- /dev/null +++ b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +# ls aliases +alias ll='eza -l --icons=auto --group-directories-first' +alias l.='eza -d .*' +alias ls='eza' +alias l1='eza -1' + +# ugrep for grep +alias grep='ug' +alias egrep='ug -E' +alias fgrep='ug -F' +alias xzgrep='ug -z' +alias xzegrep='ug -zE' +alias xzfgrep='ug -zF' + +if [ $(basename $SHELL) -eq "bash" ]; then + source /usr/share/bash-prexec + eval "$(atuin init bash)" + eval "$(zoxide init bash)" +elif [ $(basename $SHELL) -eq "zsh" ]; then + eval "$(atuin init zsh)" + eval "$(zoxide init zsh)" +fi From fc729d1b8b5ef4b71ae76e82f55473a16bd3b74d Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:38:28 -0400 Subject: [PATCH 23/58] fix: use bash equality check for bluefin-cli --- just/bluefin-system.just | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/just/bluefin-system.just b/just/bluefin-system.just index e2d94341946..e4631169734 100644 --- a/just/bluefin-system.just +++ b/just/bluefin-system.just @@ -22,13 +22,13 @@ bluefin-cli: brew bundle --file /usr/share/ublue-os/homebrew/bluefin-cli.Brewfile --no-lock echo 'Setting up your Shell 🐚🐚🐚' shell=$(basename $SHELL) - if test $shell -eq "fish"; then + if [[ "${shell}" == "fish" ]]; then echo 'Adding bling to your config.fish 🐟🐟🐟' printf 'source /usr/share/ublue-os/bluefin-cli/bling.fish' >> ${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish - elif test $shell -eq "zsh"; then + elif [[ "${shell}" == "zsh" ]]; then echo 'Adding bling to your .zshrc 💤💤💤' printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${ZDOTDIR:-$HOME}/.zshrc - elif test $shell -eq "bash"; then + elif [[ "${shell}" == "bash" ]]; then echo 'Adding bling to your .bashrc 💥💥💥' printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${HOME}/.bashrc else From f978e4dd197bcdc03568efac3bd759cf04c89ebe Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Mon, 24 Jun 2024 19:43:50 -0400 Subject: [PATCH 24/58] chore: sh uses single = for string comp --- system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh index e503d3317ae..ebc237edd3c 100644 --- a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh +++ b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh @@ -14,11 +14,11 @@ alias xzgrep='ug -z' alias xzegrep='ug -zE' alias xzfgrep='ug -zF' -if [ $(basename $SHELL) -eq "bash" ]; then +if [ $(basename $SHELL) = "bash" ]; then source /usr/share/bash-prexec eval "$(atuin init bash)" eval "$(zoxide init bash)" -elif [ $(basename $SHELL) -eq "zsh" ]; then +elif [ $(basename $SHELL) = "zsh" ]; then eval "$(atuin init zsh)" eval "$(zoxide init zsh)" fi From 729c461e0f4c0b645518e71f7aafcec97f9ce864 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:07:04 -0400 Subject: [PATCH 25/58] chore: make ujust bluefin-cli more robust --- just/bluefin-system.just | 19 +- .../shared/usr/libexec/ublue-bling.sh | 169 ++++++++++++++++++ 2 files changed, 170 insertions(+), 18 deletions(-) create mode 100755 system_files/shared/usr/libexec/ublue-bling.sh diff --git a/just/bluefin-system.just b/just/bluefin-system.just index e4631169734..92cadc3ffb6 100644 --- a/just/bluefin-system.just +++ b/just/bluefin-system.just @@ -17,24 +17,7 @@ benchmark: # Configure Bluefin-CLI Terminal Experience with Brew bluefin-cli: - #!/usr/bin/bash - echo 'Installing bling from Homebrew 🍻🍻🍻' - brew bundle --file /usr/share/ublue-os/homebrew/bluefin-cli.Brewfile --no-lock - echo 'Setting up your Shell 🐚🐚🐚' - shell=$(basename $SHELL) - if [[ "${shell}" == "fish" ]]; then - echo 'Adding bling to your config.fish 🐟🐟🐟' - printf 'source /usr/share/ublue-os/bluefin-cli/bling.fish' >> ${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish - elif [[ "${shell}" == "zsh" ]]; then - echo 'Adding bling to your .zshrc 💤💤💤' - printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${ZDOTDIR:-$HOME}/.zshrc - elif [[ "${shell}" == "bash" ]]; then - echo 'Adding bling to your .bashrc 💥💥💥' - printf 'source /usr/share/ublue-os/bluefin-cli/bling.sh' >> ${HOME}/.bashrc - else - echo 'Unknown Shell ... You are on your own' - fi - echo 'Installation complete ... please close and reopen your terminal!' + @/usr/libexec/ublue-bling.sh # Configure Bluefin-CLI Terminal Experience [private] diff --git a/system_files/shared/usr/libexec/ublue-bling.sh b/system_files/shared/usr/libexec/ublue-bling.sh new file mode 100755 index 00000000000..8943041f677 --- /dev/null +++ b/system_files/shared/usr/libexec/ublue-bling.sh @@ -0,0 +1,169 @@ +#!/usr/bin/bash +#shellcheck disable=SC2154 + +set -eou pipefail + +# Source libujust for colors/ugum +source /usr/lib/ujust/ujust.sh + +# Exit Handling +function Exiting(){ + printf "%s%sExiting...%s\n" "${red}" "${bold}" "${normal}" + printf "Rerun script with %s%sujust bluefin-cli%s\n" "${blue}" "${bold}" "${normal}" + exit 0 +} + +# Trap function +function ctrl_c(){ + printf "\nSignal SIGINT caught\n" + Exiting +} + +# Brew Bundle Install +function brew-bundle(){ +echo 'Installing bling from Homebrew 🍻🍻🍻' +brew bundle --file /usr/share/ublue-os/homebrew/bluefin-cli.Brewfile --no-lock +} + +# Check if bling is already sourced +function check-bling() { +shell="$1" +if [[ "${shell}" == "fish" ]]; then + line=$(grep -n "source /usr/share/ublue-os/bluefin-cli/bling.fish" \ + "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" \ + | grep -Eo '^[^:]+') + if [[ -n "${line}" ]]; then + return 1; + fi + return 0; +elif [[ "${shell}" == "zsh" ]]; then + line=$(grep -n "source /usr/share/ublue-os/bluefin-cli/bling.sh" \ + "${ZDOTDIR:-$HOME}/.zshrc" \ + | grep -Eo '^[^:]+') + if [[ -n "${line}" ]]; then + return 1; + fi + return 0; +elif [[ "${shell}" == "bash" ]]; then + line=$(grep -n "source /usr/share/ublue-os/bluefin-cli/bling.sh" \ + "${HOME}/.bashrc" \ + | grep -Eo '^[^:]+') + if [[ -n "${line}" ]]; then + return 1; + fi + return 0; +else + echo 'Unknown Shell ... You are on your own' + exit 1; +fi +} + +# Add Bling +function add-bling(){ +shell="$1" +if ! brew-bundle; then + Exiting +fi +echo 'Setting up your Shell 🐚🐚🐚' +if [[ "${shell}" == "fish" ]]; then + echo 'Adding bling to your config.fish 🐟🐟🐟' + cat<<-EOF >> "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" +### bling.fish source start +source /usr/share/ublue-os/bluefin-cli/bling.fish +### bling.fish source end +EOF +elif [[ "${shell}" == "zsh" ]]; then + echo 'Adding bling to your .zshrc 💤💤💤' + cat<<-EOF >> "${ZDOTDIR:-$HOME}/.zshrc" +### bling.sh source start +source /usr/share/ublue-os/bluefin-cli/bling.sh +### bling.sh source end +EOF +elif [[ "${shell}" == "bash" ]]; then + echo 'Adding bling to your .bashrc 💥💥💥' + cat<<-EOF >> "${HOME}/.bashrc" +### bling.sh source start +source /usr/share/ublue-os/bluefin-cli/bling.sh +### bling.sh source end +EOF +else + echo 'Unknown Shell ... You are on your own' +fi +} + +# Remove bling, handle if old method +function remove-bling(){ +shell="$1" +if [[ "${shell}" == "fish" ]]; then + sed -i '/### bling.fish source start/,/### bling.fish source end/d' \ + "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" \ + || \ + line=$(grep -n "source /usr/share/ublue-os/bluefin-cli/bling.fish" \ + "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" \ + | grep -Eo '^[^:]+') && sed -i "${line}"d \ + "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" +elif [[ "${shell}" == "zsh" ]]; then + sed -i '/### bling.sh source start/,/### bling.sh source end/d' \ + "${ZDOTDIR:-$HOME}/.zshrc" \ + || \ + line=$(grep -n "source /usr/share/ublue-os/bluefin-cli/bling.sh" \ + "${ZDOTDIR:-$HOME}/.zshrc" \ + | grep -Eo '^[^:]+') && sed -i "${line}"d \ + "${ZDOTDIR:-$HOME}/.zshrc" +elif [[ "${shell}" == "bash" ]]; then + sed -i '/### bling.sh source start/,/### bling.sh source end/d' \ + "${HOME}/.bashrc" \ + || \ + line=$(grep -n "source /usr/share/ublue-os/bluefin-cli/bling.sh" \ + "${HOME}/.bashrc" \ + | grep -Eo '^[^:]+') && sed -i "${line}"d \ + "${HOME}/.bashrc" +fi +} + +# Main function. +function main(){ + +# Get Shell +shell=$(basename "$SHELL") +reentry="$1" +clear +if [[ -n "${reentry:-}" ]]; then + printf "%s%s%s\n\n" "${bold}" "$reentry" "$normal" +fi + +# Check if bling is enabled and display +printf "Shell:\t%s%s%s%s\n" "${green}" "${bold}" "${shell}" "${normal}" +if ! check-bling "${shell}"; then + printf "Bling:\t%s%sEnabled%s\n" "${green}" "${bold}" "${normal}" +else + printf "Bling:\t%s%sDisabled%s\n" "${red}" "${bold}" "${normal}" +fi + +# ugum enable/disable +CHOICE=$(Choose enable disable cancel) + +# Enable/Disable. Recurse if bad option. +if [[ "${CHOICE}" == "enable" ]]; then + if check-bling "${shell}"; then + trap ctrl_c SIGINT + add-bling "${shell}" + printf "%s%sInstallation Complete%s ... please close and reopen your terminal!" "${green}" "${bold}" "${normal}" + else + main "Bling is already configured ..." + fi +elif [[ "${CHOICE}" == "disable" ]]; then + if check-bling "${shell}"; then + main "Bling is not yet configured ..." + else + remove-bling "${shell}" + trap ctrl_c SIGINT + printf "%s%sBling Removed%s ... please close and reopen your terminal\n" "${red}" "${bold}" "${normal}" + fi +else + Exiting +fi +} + +# Entrypoint +main "" From d4f7da61e8b7cceebb4e338808d2672fbd8bbbec Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:05:15 -0400 Subject: [PATCH 26/58] feat: use akmods caching layer --- .github/workflows/reusable-build.yml | 38 +++++++---------- Containerfile | 23 ++++++++--- build_files/base/install-akmods.sh | 61 +++++++++++++--------------- build_files/dx/install-akmods-dx.sh | 10 ++--- 4 files changed, 64 insertions(+), 68 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 405dc4dae48..c57b7a75a81 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -43,35 +43,16 @@ jobs: - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} - coreos_tag: - - "-coreos" - # - "-coreos-nv" - - "" + include: + - image_flavor: main + coreos_tag: -coreos + - image_flavor: main + coreos_tag: -coreos-nv exclude: - fedora_version: 39 image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - - coreos_tag: -coreos - image_flavor: nvidia - - coreos_tag: -coreos - image_flavor: asus - - coreos_tag: -coreos - image_flavor: asus-nvidia - - coreos_tag: -coreos - image_flavor: surface - - coreos_tag: -coreos - image_flavor: surface-nvidia - # - coreos_tag: -coreos-nv - # image_flavor: nvidia - # - coreos_tag: -coreos-nv - # image_flavor: asus - # - coreos_tag: -coreos-nv - # image_flavor: asus-nvidia - # - coreos_tag: -coreos-nv - # image_flavor: surface - # - coreos_tag: -coreos-nv - # image_flavor: surface-nvidia steps: - name: Checkout @@ -79,26 +60,35 @@ jobs: - name: Matrix Variables run: | + # IMAGE_NAME if [[ "${{ matrix.image_flavor }}" == "main" ]]; then echo "IMAGE_NAME=${{ matrix.base_name }}" >> $GITHUB_ENV else echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.base_name, matrix.image_flavor) }}" >> $GITHUB_ENV fi + + # BASE_IMAGE_NAME if [[ "${{ matrix.base_name }}" =~ "bluefin" ]]; then echo "BASE_IMAGE_NAME"="silverblue" >> $GITHUB_ENV elif [[ "${{ matrix.base_name }}" =~ "aurora" ]]; then echo "BASE_IMAGE_NAME"="kinoite" >> $GITHUB_ENV fi + + # TARGET_NAME if [[ "${{ matrix.base_name }}" =~ "dx" ]]; then echo "TARGET_NAME"="dx" >> $GITHUB_ENV else echo "TARGET_NAME"="base" >> $GITHUB_ENV fi + + # AKMODS_FLAVOR if [[ "${{ matrix.image_flavor }}" =~ "asus" ]]; then echo "AKMODS_FLAVOR=asus" >> $GITHUB_ENV elif [[ "${{ matrix.image_flavor }}" =~ "surface" ]]; then echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV echo "KERNEL_SUFFIX=surface" >> $GITHUB_ENV + elif [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + echo "AKMODS_FLAVOR=coreos" >> $GITHUB_ENV else echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV fi diff --git a/Containerfile b/Containerfile index 82f0cf5163d..0e808e4b99a 100644 --- a/Containerfile +++ b/Containerfile @@ -11,8 +11,12 @@ ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # FROM's for copying ARG KMOD_SOURCE_COMMON="ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}" ARG COREOS_KMODS="ghcr.io/ublue-os/ucore-kmods:stable" +ARG COREOS_NVIDIA="ghcr.io/ublue-os/akmods-nvidia:coreos-${FEDORA_MAJOR_VERSION}" FROM ${KMOD_SOURCE_COMMON} as akmods +# TODO figure out a better way to get zfs for coreos FROM ${COREOS_KMODS} as coreos_kmods +# TODO figure out a better way to get nvidia for coreos +FROM ${COREOS_NVIDIA} as coreos_nvidia ## bluefin image section FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS base @@ -36,15 +40,19 @@ COPY packages.json /tmp/packages.json COPY /system_files/shared/usr/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml # COPY ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion COPY --from=akmods /rpms /tmp/akmods-rpms -COPY --from=coreos_kmods /rpms/kmods/zfs /tmp/coreos/rpms +COPY --from=coreos_nvidia /rpms /tmp/nvidia/akmods-rpms +COPY --from=coreos_kmods /rpms/kmods /tmp/coreos/akmods-rpms # Build, cleanup, commit. RUN rpm-ostree cliwrap install-to-root / && \ + mkdir -p /var/lib/alternatives && \ bash -c ". /tmp/build/build-base.sh" && \ + mv /var/lib/alternatives /staged-alternatives && \ rm -rf /tmp/* /var/* && \ + ostree container commit && \ + mkdir -p /var/lib && mv /staged-alternatives /var/lib/alternatives && \ mkdir -p /var/tmp && \ - chmod -R 1777 /var/tmp && \ - ostree container commit + chmod -R 1777 /var/tmp ## bluefin-dx developer edition image section FROM base AS dx @@ -67,9 +75,12 @@ COPY packages.json /tmp/packages.json COPY --from=akmods /rpms /tmp/akmods-rpms # Build, Clean-up, Commit -RUN bash -c ". /tmp/build/build-dx.sh" && \ +RUN mkdir -p /var/lib/alternatives && \ + bash -c ". /tmp/build/build-dx.sh" && \ fc-cache --system-only --really-force --verbose && \ + mv /var/lib/alternatives /staged-alternatives && \ rm -rf /tmp/* /var/* && \ + ostree container commit && \ + mkdir -p /var/lib && mv /staged-alternatives /var/lib/alternatives && \ mkdir -p /var/tmp && \ - chmod -R 1777 /var/tmp && \ - ostree container commit + chmod -R 1777 /var/tmp diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 83af16f81bf..8f337b35222 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -2,40 +2,37 @@ set -ouex pipefail -sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo -if [[ -z ${COREOS_TAG:-} ]]; then - curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo - sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo - if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then - rpm-ostree install \ - /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ - /tmp/akmods-rpms/kmods/*xone*.rpm \ - /tmp/akmods-rpms/kmods/*openrazer*.rpm \ - /tmp/akmods-rpms/kmods/*wl*.rpm \ - /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm - fi - if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then - rpm-ostree install \ - /tmp/akmods-rpms/kmods/*evdi*.rpm - fi - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo -elif [[ ${COREOS_TAG} =~ "coreos" ]]; then +curl -Lo /etc/yum.repos.d/negativo17-fedora-multimedia.repo https://negativo17.org/repos/fedora-multimedia.repo +sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo +if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ + /tmp/akmods-rpms/kmods/*xone*.rpm \ + /tmp/akmods-rpms/kmods/*openrazer*.rpm \ + /tmp/akmods-rpms/kmods/*wl*.rpm \ + /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \ + /tmp/akmods-rpms/kmods/*framework-laptop*.rpm +fi +if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*evdi*.rpm +fi +if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" find /tmp/coreos/rpms - rpm-ostree install /tmp/coreos/rpms/kmods/ublue-os-ucore-addons-*.rpm - rpm-ostree install /tmp/coreos/rpms/kmods/zfs/*.rpm pv - depmod -A ${KERNEL_FOR_DEPMOD} - # if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then - # curl -Lo /etc/yum.repos.d/negativo17-fedora-nvidia.repo https://negativo17.org/repos/fedora-nvidia.repo - # rpm-ostree install /tmp/coreos/rpms/kmods/nvidia/ublue-os-ucore-nvidia-*.rpm - # sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - # rpm-ostree install \ - # /tmp/coreos/rpms/kmods/nvidia/kmod-nvidia-*.rpm \ - # nvidia-driver-cuda \ - # nvidia-container-toolkit - # sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - # sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-nvidia.repo. - # fi + rpm-ostree install /tmp/coreos/rpms/*.rpm pv + depmod -A "${KERNEL_FOR_DEPMOD}" + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo +fi +if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then + rpm-ostree install /tmp/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm + source /tmp/akmods-rpms/kmods/nvidia-vars + rpm-ostree install \ + xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION} \ + xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-libs.i686 \ + nvidia-container-toolkit nvidia-vaapi-driver ${VARIANT_PKGS} \ + /tmp/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${RELEASE}.rpm fi +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo diff --git a/build_files/dx/install-akmods-dx.sh b/build_files/dx/install-akmods-dx.sh index dbd8fb5376f..3949c139759 100644 --- a/build_files/dx/install-akmods-dx.sh +++ b/build_files/dx/install-akmods-dx.sh @@ -2,10 +2,8 @@ set -ouex pipefail -if [[ -z ${COREOS_KERNEL:-} ]]; then - sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo - if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then - rpm-ostree install \ - /tmp/akmods-rpms/kmods/*kvmfr*.rpm - fi +sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo +if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*kvmfr*.rpm fi From e9966d13bd9af950f7180b7e23be0d634c713ee9 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:07:52 -0400 Subject: [PATCH 27/58] chore: rework includes --- .github/workflows/reusable-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index c57b7a75a81..374b7e87ccf 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -43,11 +43,13 @@ jobs: - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} + coreos_tag: + - "" include: - image_flavor: main - coreos_tag: -coreos + coreos_tag: "-coreos" - image_flavor: main - coreos_tag: -coreos-nv + coreos_tag: "-coreos-nv" exclude: - fedora_version: 39 image_flavor: asus From d7e35ff62d1bf5f289e7450ce0747a14f7aedbc6 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:10:35 -0400 Subject: [PATCH 28/58] chore: rework includes --- .github/workflows/reusable-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 374b7e87ccf..1b4457c3d06 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -43,12 +43,12 @@ jobs: - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} - coreos_tag: - - "" include: - image_flavor: main + fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos" - image_flavor: main + fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos-nv" exclude: - fedora_version: 39 From 28aa2167f6885b143c3b3997f06690620cfbe55a Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:12:17 -0400 Subject: [PATCH 29/58] chore: rework includes --- .github/workflows/reusable-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 1b4457c3d06..8561cc870f1 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -43,6 +43,7 @@ jobs: - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} + coreos_tag: "" include: - image_flavor: main fedora_version: ${{ inputs.fedora_version }} From 5d4768fe245d588b6063efd3290872a222845faa Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:18:10 -0400 Subject: [PATCH 30/58] chore: rework includes --- .github/workflows/reusable-build.yml | 5 ++--- build_files/base/install-akmods.sh | 14 +++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 8561cc870f1..374b7e87ccf 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -43,13 +43,12 @@ jobs: - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} - coreos_tag: "" + coreos_tag: + - "" include: - image_flavor: main - fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos" - image_flavor: main - fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos-nv" exclude: - fedora_version: 39 diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 8f337b35222..1fdb409bbb8 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -21,18 +21,22 @@ if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" - find /tmp/coreos/rpms - rpm-ostree install /tmp/coreos/rpms/*.rpm pv + rpm-ostree install /tmp/coreos/rpms/*.rpm \ + /tmp/coreos/rpms/zfs/*rpm \ + pv depmod -A "${KERNEL_FOR_DEPMOD}" sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo fi if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then - rpm-ostree install /tmp/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm - source /tmp/akmods-rpms/kmods/nvidia-vars + rpm-ostree install /tmp/nvidia/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm + source /tmp/nvidia/akmods-rpms/kmods/nvidia-vars rpm-ostree install \ xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION} \ xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-libs.i686 \ nvidia-container-toolkit nvidia-vaapi-driver ${VARIANT_PKGS} \ - /tmp/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${RELEASE}.rpm + /tmp/nvidia/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${RELEASE}.rpm + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + systemctl enable ublue-nvctk-cdi.service + semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp fi sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo From 12e1794aefabe210694c2b8e6292466fc73d89e3 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:21:57 -0400 Subject: [PATCH 31/58] chore: rework includes --- .github/workflows/reusable-build.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 374b7e87ccf..ca45a3ba003 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -45,16 +45,18 @@ jobs: - ${{ inputs.fedora_version }} coreos_tag: - "" - include: - - image_flavor: main - coreos_tag: "-coreos" - - image_flavor: main - coreos_tag: "-coreos-nv" exclude: - fedora_version: 39 image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia + include: + - image_flavor: main + base_name: + coreos_tag: "-coreos" + - image_flavor: main + base_name: + coreos_tag: "-coreos-nv" steps: - name: Checkout From cb7d3f5e3afdeb1b71392b7503d48db226d25d94 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:25:42 -0400 Subject: [PATCH 32/58] chore: use excludes --- .github/workflows/reusable-build.yml | 30 +++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index ca45a3ba003..3b089b42601 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -45,18 +45,34 @@ jobs: - ${{ inputs.fedora_version }} coreos_tag: - "" + - "-coreos" + - "-coreos-nv" exclude: - fedora_version: 39 image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - include: - - image_flavor: main - base_name: - coreos_tag: "-coreos" - - image_flavor: main - base_name: - coreos_tag: "-coreos-nv" + # TODO Figure out why include doesn't work + - coreos_tag: "-coreos" + image_flavor: nvidia + - coreos_tag: "-coreos" + image_flavor: asus + - coreos_tag: "-coreos" + image_flavor: asus-nvidia + - coreos_tag: "-coreos" + image_flavor: surface + - coreos_tag: "-coreos" + image_flavor: surface-nvidia + - coreos_tag: "-coreos-nv" + image_flavor: nvidia + - coreos_tag: "-coreos-nv" + image_flavor: asus + - coreos_tag: "-coreos-nv" + image_flavor: asus-nvidia + - coreos_tag: "-coreos-nv" + image_flavor: surface + - coreos_tag: "-coreos-nv" + image_flavor: surface-nvidia steps: - name: Checkout From 8c33966409e740dbefe377ad5b56c9347ddeced5 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:26:11 -0400 Subject: [PATCH 33/58] fix: correct akmods path --- build_files/base/install-akmods.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 1fdb409bbb8..5cafcedf712 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -21,8 +21,8 @@ if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" - rpm-ostree install /tmp/coreos/rpms/*.rpm \ - /tmp/coreos/rpms/zfs/*rpm \ + rpm-ostree install /tmp/coreos/akmods-rpms/*.rpm \ + /tmp/coreos/akmods-rpms/zfs/*.rpm \ pv depmod -A "${KERNEL_FOR_DEPMOD}" sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo From 0536f1b097823c97118917d6668f5ca75ac42385 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:26:45 -0400 Subject: [PATCH 34/58] chore: don't build testing on push --- .github/workflows/build-39-bluefin.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-39-bluefin.yml b/.github/workflows/build-39-bluefin.yml index 8c2450f5a25..f071d415519 100644 --- a/.github/workflows/build-39-bluefin.yml +++ b/.github/workflows/build-39-bluefin.yml @@ -11,7 +11,6 @@ on: push: branches: - main - - testing paths-ignore: - '**.md' - 'system_files/kinoite/**' From 363c51b97d4be885cf54d0447f662866c5c11b6a Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:27:12 -0400 Subject: [PATCH 35/58] chore: don't build testing on push --- .github/workflows/build-40-bluefin.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-40-bluefin.yml b/.github/workflows/build-40-bluefin.yml index 0c6fe121f5d..af8bd525b04 100644 --- a/.github/workflows/build-40-bluefin.yml +++ b/.github/workflows/build-40-bluefin.yml @@ -11,7 +11,6 @@ on: push: branches: - main - - testing paths-ignore: - '**.md' - 'system_files/kinoite/**' From 014d395188db0296af96462f869123653911f45c Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:11:44 -0400 Subject: [PATCH 36/58] chore: rework includes, nvidia coreos --- .github/workflows/reusable-build.yml | 106 ++++++++++++++------------- build_files/base/install-akmods.sh | 32 +++++--- 2 files changed, 75 insertions(+), 63 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 3b089b42601..8e7d103efee 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -45,34 +45,45 @@ jobs: - ${{ inputs.fedora_version }} coreos_tag: - "" - - "-coreos" - - "-coreos-nv" exclude: - fedora_version: 39 image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - # TODO Figure out why include doesn't work - - coreos_tag: "-coreos" - image_flavor: nvidia - - coreos_tag: "-coreos" - image_flavor: asus - - coreos_tag: "-coreos" - image_flavor: asus-nvidia - - coreos_tag: "-coreos" - image_flavor: surface - - coreos_tag: "-coreos" - image_flavor: surface-nvidia - - coreos_tag: "-coreos-nv" - image_flavor: nvidia - - coreos_tag: "-coreos-nv" - image_flavor: asus - - coreos_tag: "-coreos-nv" - image_flavor: asus-nvidia - - coreos_tag: "-coreos-nv" - image_flavor: surface - - coreos_tag: "-coreos-nv" - image_flavor: surface-nvidia + include: + - image_flavor: main + base_name: ${{ inputs.brand_name }} + coreos_tag: "-coreos" + - image_flavor: main + base_name: ${{ inputs.brand_name }}-dx + coreos_tag: "-coreos" + - image_flavor: nvidia + base_name: ${{ inputs.brand_name }} + coreos_tag: "-coreos" + - image_flavor: nvidia + base_name: ${{ inputs.brand_name }}-dx + coreos_tag: "-coreos" + # # TODO Figure out why include doesn't work + # - coreos_tag: "-coreos" + # image_flavor: nvidia + # - coreos_tag: "-coreos" + # image_flavor: asus + # - coreos_tag: "-coreos" + # image_flavor: asus-nvidia + # - coreos_tag: "-coreos" + # image_flavor: surface + # - coreos_tag: "-coreos" + # image_flavor: surface-nvidia + # - coreos_tag: "-coreos-nv" + # image_flavor: nvidia + # - coreos_tag: "-coreos-nv" + # image_flavor: asus + # - coreos_tag: "-coreos-nv" + # image_flavor: asus-nvidia + # - coreos_tag: "-coreos-nv" + # image_flavor: surface + # - coreos_tag: "-coreos-nv" + # image_flavor: surface-nvidia steps: - name: Checkout @@ -113,10 +124,23 @@ jobs: echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV fi + # Env for matrix.image_flavor + if [[ "${{ matrix.image_flavor }}" == "nvidia" ]] && \ + [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + echo "image_flavor=main" >> $GITHUB_ENV + echo "coreos_type=nvidia" >> $GITHUB_ENV + elif [[ "${{ matrix.image_flavor }}" == "main" ]] && \ + [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + echo "image_flavor=${{ matrix.image_flavor }}" >> $GITHUB_ENV + echo "coreos_type=main" >> $GITHUB_ENV + else + echo "image_flavor=${{ matrix.image_flavor }}" >> $GITHUB_ENV + fi + - name: Verify base image uses: EyeCantCU/cosign-action/verify@11f8c114a5e67c7a663c9dfcaf76d85429d254bc # v0.2.2 with: - containers: ${{ env.BASE_IMAGE_NAME}}-${{ matrix.image_flavor }}:${{ matrix.fedora_version }} + containers: ${{ env.BASE_IMAGE_NAME}}-${{ env.image_flavor }}:${{ matrix.fedora_version }} - name: Verify Chainguard images if: matrix.base_name != 'bluefin' && matrix.base_name != 'aurora' @@ -193,17 +217,6 @@ jobs: BUILD_TAGS+=("gts-testing-coreos") echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV fi - elif [[ "${{ matrix.coreos_tag }}" == "-coreos-nv" ]]; then - BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos-nv" "${FEDORA_VERSION}-testing-coreos-nv-${TIMESTAMP}") - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("testing-coreos-nv") - echo "DEFAULT_TAG=testing-coreos-nv" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "true" ]]; then - BUILD_TAGS+=("gts-testing-coreos-nv") - echo "DEFAULT_TAG=gts-testing-coreos-nv" >> $GITHUB_ENV - fi else BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") if [[ "$IS_LATEST_VERSION" == "true" ]] && \ @@ -225,15 +238,6 @@ jobs: BUILD_TAGS+=("gts-coreos") echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV fi - elif [[ "${{ matrix.coreos_tag }}" == "-coreos-nv" ]]; then - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("latest-coreos-nv") - echo "DEFAULT_TAG=latest-coreos-nv" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]]; then - BUILD_TAGS+=("gts-coreos-nv") - echo "DEFAULT_TAG=gts-coreos-nv" >> $GITHUB_ENV - fi else if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then @@ -268,7 +272,7 @@ jobs: shell: bash run: | set -eo pipefail - ver=$(skopeo inspect docker://ghcr.io/ublue-os/silverblue-${{ matrix.image_flavor }}:${{ matrix.fedora_version }} | jq -r '.Labels["org.opencontainers.image.version"]') + ver=$(skopeo inspect docker://ghcr.io/ublue-os/silverblue-${{ env.image_flavor }}:${{ matrix.fedora_version }} | jq -r '.Labels["org.opencontainers.image.version"]') if [ -z "$ver" ] || [ "null" = "$ver" ]; then echo "inspected image version must not be empty or null" exit 1 @@ -279,7 +283,7 @@ jobs: id: coreos_kernel shell: bash run: | - if [[ ${{ env.IS_COREOS }} == "true" ]]; then + if [[ ${{ matrix.coreos_tag }} =~ "coreos" ]]; then KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') fi echo "kernel-release=$KERNEL_RELEASE" >> $GITHUB_OUTPUT @@ -311,12 +315,12 @@ jobs: build-args: | BASE_IMAGE_NAME=${{ env.BASE_IMAGE_NAME }} IMAGE_NAME=${{ env.IMAGE_NAME }} - IMAGE_FLAVOR=${{ matrix.image_flavor }} + IMAGE_FLAVOR=${{ env.image_flavor }} IMAGE_VENDOR=${{ github.repository_owner }} FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }} TARGET_BASE=${{ matrix.target_base }} AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} - COREOS_TAG=${{ matrix.coreos_tag }} + COREOS_TYPE=${{ env.coreos_type }} COREOS_KERNEL=${{ steps.coreos_kernel.outputs.kernel-release }} labels: ${{ steps.meta.outputs.labels }} oci: false @@ -388,7 +392,7 @@ jobs: DIGEST: ${{ steps.push.outputs.digest }} IMAGE_REGISTRY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }} IMAGE_NAME: ${{ env.IMAGE_NAME }} - IMAGE_FLAVOR: ${{ matrix.image_flavor }} + IMAGE_FLAVOR: ${{ env.image_flavor }} FEDORA_VERSION: ${{ matrix.fedora_version }} COREOS_TAG: ${{ matrix.coreos_tag }} run: @@ -398,11 +402,11 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: - name: image-${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag }} + name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag }} retention-days: 1 if-no-files-found: error path: | - ${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag}}.txt + ${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag}}.txt check: name: Check all ${{ inputs.brand_name }} ${{ inputs.fedora_version }} builds successful diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 5cafcedf712..845f55fdc91 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -26,17 +26,25 @@ if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then pv depmod -A "${KERNEL_FOR_DEPMOD}" sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo -fi -if [[ "${COREOS_TAG}" =~ "coreos-nv" ]]; then - rpm-ostree install /tmp/nvidia/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm - source /tmp/nvidia/akmods-rpms/kmods/nvidia-vars - rpm-ostree install \ - xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION} \ - xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-libs.i686 \ - nvidia-container-toolkit nvidia-vaapi-driver ${VARIANT_PKGS} \ - /tmp/nvidia/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${RELEASE}.rpm - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - systemctl enable ublue-nvctk-cdi.service - semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp + if [[ "${COREOS_TYPE}" == "nvidia" ]]; then + rpm-ostree install /tmp/nvidia/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm + # shellcheck disable=SC1091 + source /tmp/nvidia/akmods-rpms/kmods/nvidia-vars + if [[ "${BASE_IMAGE_NAME}" == "kinoite" ]]; then + VARIANT_PKGS="supergfxctl-plasmoid supergfxctl" + elif [[ "${BASE_IMAGE_NAME}" == "silverblue" ]]; then + VARIANT_PKGS="gnome-shell-extension-supergfxctl-gex supergfxctl" + else + VARIANT_PKGS="" + fi + rpm-ostree install \ + "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION}" \ + "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-libs.i686" \ + "nvidia-container-toolkit nvidia-vaapi-driver ${VARIANT_PKGS}" \ + "/tmp/nvidia/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${RELEASE}.rpm" + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + systemctl enable ublue-nvctk-cdi.service + semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp + fi fi sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo From a1955eb58ff9b38d095bbf92c6d445ae25017413 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:15:25 -0400 Subject: [PATCH 37/58] fix: use is_coreos env variable --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 8e7d103efee..55300c7bf64 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -283,7 +283,7 @@ jobs: id: coreos_kernel shell: bash run: | - if [[ ${{ matrix.coreos_tag }} =~ "coreos" ]]; then + if [[ ${{ env.IS_COREOS }} == "true" ]]; then KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') fi echo "kernel-release=$KERNEL_RELEASE" >> $GITHUB_OUTPUT From da45c2bfdb7748d99fe4913d4765cb6e5aa62398 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:20:45 -0400 Subject: [PATCH 38/58] fix: specify fedora version for include --- .github/workflows/reusable-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 55300c7bf64..110c17faf17 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -53,15 +53,19 @@ jobs: include: - image_flavor: main base_name: ${{ inputs.brand_name }} + fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos" - image_flavor: main base_name: ${{ inputs.brand_name }}-dx + fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos" - image_flavor: nvidia base_name: ${{ inputs.brand_name }} + fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos" - image_flavor: nvidia base_name: ${{ inputs.brand_name }}-dx + fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos" # # TODO Figure out why include doesn't work # - coreos_tag: "-coreos" From 86f128ffdad5d7d3d35d0ee45dfee5f8cb1deb26 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:32:49 -0400 Subject: [PATCH 39/58] fix: change build arg --- Containerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index 0e808e4b99a..2ab0377df80 100644 --- a/Containerfile +++ b/Containerfile @@ -5,7 +5,7 @@ ARG SOURCE_IMAGE="${SOURCE_IMAGE:-${BASE_IMAGE_NAME}-${IMAGE_FLAVOR}}" ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG TARGET_BASE="${TARGET_BASE:-bluefin}" -ARG COREOS_TAG="${COREOS_TAG:-}" +ARG COREOS_TYPE="${COREOS_TYPE:-}" ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # FROM's for copying @@ -27,7 +27,7 @@ ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" -ARG COREOS_TAG="${COREOS_TAG:-}" +ARG COREOS_TYPE="${COREOS_TYPE:-}" ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # COPY Build Files @@ -63,7 +63,7 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" -ARG COREOS_TAG="${COREOS_TAG:-}" +ARG COREOS_TYPE="${COREOS_TYPE:-}" ARG COREOS_KERNEL="${COREOS_KERNEL:-}" # dx specific files come from the dx directory in this repo From 1004ea639d804682521c99babb5f1ee7272cb6f8 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:42:49 -0400 Subject: [PATCH 40/58] fix: update build arg --- build_files/base/nvidia.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/base/nvidia.sh b/build_files/base/nvidia.sh index 75e7b01bb52..4053cac67fe 100644 --- a/build_files/base/nvidia.sh +++ b/build_files/base/nvidia.sh @@ -3,7 +3,7 @@ set -ouex pipefail # Nvidia Configurations -if [[ "${IMAGE_FLAVOR}" =~ "nvidia" || "${COREOS_TAG}" =~ "coreos-nv" ]]; then +if [[ "${IMAGE_FLAVOR}" =~ "nvidia" || "${COREOS_TYPE}" =~ "nvidia" ]]; then # Restore x11 for Nvidia Images if [[ "${BASE_IMAGE_NAME}" =~ "kinoite" && "${FEDORA_MAJOR_VERSION}" -gt "39" ]]; then rpm-ostree install plasma-workspace-x11 From eed47fe67de053262bc24194277aa497d74263ea Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Tue, 25 Jun 2024 20:43:29 -0400 Subject: [PATCH 41/58] fix: update build arg --- build_files/shared/initramfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/shared/initramfs.sh b/build_files/shared/initramfs.sh index 13217f5922c..2fb6b55ab13 100755 --- a/build_files/shared/initramfs.sh +++ b/build_files/shared/initramfs.sh @@ -3,7 +3,7 @@ set -oue pipefail # Remove nvidia specific files -if [[ "${IMAGE_FLAVOR}" =~ "nvidia" || ${COREOS_TAG} =~ "coreos-nv" ]]; then +if [[ "${IMAGE_FLAVOR}" =~ "nvidia" || ${COREOS_TYPE} =~ "nvidia" ]]; then rm -f /usr/lib/modprobe.d/nvk.conf rm -f /usr/lib/modprobe.d/amd-legacy.conf else From 620a9e7ae44786201663278ec45732e26ecdf127 Mon Sep 17 00:00:00 2001 From: Mark Mihalik Date: Tue, 25 Jun 2024 21:32:10 -0400 Subject: [PATCH 42/58] chore: nvidia for coreos --- build_files/base/install-akmods.sh | 44 ++++++++++++++++-------------- build_files/shared/image-info.sh | 8 +++++- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 845f55fdc91..c3c00726611 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -17,6 +17,29 @@ if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then rpm-ostree install \ /tmp/akmods-rpms/kmods/*evdi*.rpm fi +sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo + +if [[ "${COREOS_TYPE}" == "nvidia" ]]; then + rpm-ostree install /tmp/nvidia/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm + # shellcheck disable=SC1091 + source /tmp/nvidia/akmods-rpms/kmods/nvidia-vars + if [[ "${BASE_IMAGE_NAME}" == "kinoite" ]]; then + VARIANT_PKGS="supergfxctl-plasmoid supergfxctl" + elif [[ "${BASE_IMAGE_NAME}" == "silverblue" ]]; then + VARIANT_PKGS="gnome-shell-extension-supergfxctl-gex supergfxctl" + else + VARIANT_PKGS="" + fi + rpm-ostree install \ + "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION}" \ + "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-libs.i686" \ + "nvidia-container-toolkit nvidia-vaapi-driver ${VARIANT_PKGS}" \ + "/tmp/nvidia/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${FEDORA_MAJOR_VERSION}.rpm" + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo + systemctl enable ublue-nvctk-cdi.service + semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp +fi + if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo @@ -26,25 +49,4 @@ if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then pv depmod -A "${KERNEL_FOR_DEPMOD}" sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo - if [[ "${COREOS_TYPE}" == "nvidia" ]]; then - rpm-ostree install /tmp/nvidia/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm - # shellcheck disable=SC1091 - source /tmp/nvidia/akmods-rpms/kmods/nvidia-vars - if [[ "${BASE_IMAGE_NAME}" == "kinoite" ]]; then - VARIANT_PKGS="supergfxctl-plasmoid supergfxctl" - elif [[ "${BASE_IMAGE_NAME}" == "silverblue" ]]; then - VARIANT_PKGS="gnome-shell-extension-supergfxctl-gex supergfxctl" - else - VARIANT_PKGS="" - fi - rpm-ostree install \ - "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION}" \ - "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-libs.i686" \ - "nvidia-container-toolkit nvidia-vaapi-driver ${VARIANT_PKGS}" \ - "/tmp/nvidia/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${RELEASE}.rpm" - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - systemctl enable ublue-nvctk-cdi.service - semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp - fi fi -sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo diff --git a/build_files/shared/image-info.sh b/build_files/shared/image-info.sh index a67df222738..63af86e4d3a 100755 --- a/build_files/shared/image-info.sh +++ b/build_files/shared/image-info.sh @@ -17,10 +17,16 @@ case $FEDORA_MAJOR_VERSION in ;; esac +if [[ "${COREOS_TYPE}" == "nvidia" ]]; then + image_flavor="nvidia" +else + image_flavor="${IMAGE_FLAVOR}" +fi + cat > $IMAGE_INFO < Date: Tue, 25 Jun 2024 22:01:38 -0400 Subject: [PATCH 43/58] fix: use hwe nvidia install script --- .github/workflows/reusable-build.yml | 21 --------------------- Containerfile | 2 +- build_files/base/install-akmods.sh | 21 +++------------------ 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 110c17faf17..d676c58e5d3 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -67,27 +67,6 @@ jobs: base_name: ${{ inputs.brand_name }}-dx fedora_version: ${{ inputs.fedora_version }} coreos_tag: "-coreos" - # # TODO Figure out why include doesn't work - # - coreos_tag: "-coreos" - # image_flavor: nvidia - # - coreos_tag: "-coreos" - # image_flavor: asus - # - coreos_tag: "-coreos" - # image_flavor: asus-nvidia - # - coreos_tag: "-coreos" - # image_flavor: surface - # - coreos_tag: "-coreos" - # image_flavor: surface-nvidia - # - coreos_tag: "-coreos-nv" - # image_flavor: nvidia - # - coreos_tag: "-coreos-nv" - # image_flavor: asus - # - coreos_tag: "-coreos-nv" - # image_flavor: asus-nvidia - # - coreos_tag: "-coreos-nv" - # image_flavor: surface - # - coreos_tag: "-coreos-nv" - # image_flavor: surface-nvidia steps: - name: Checkout diff --git a/Containerfile b/Containerfile index 2ab0377df80..03876792663 100644 --- a/Containerfile +++ b/Containerfile @@ -40,7 +40,7 @@ COPY packages.json /tmp/packages.json COPY /system_files/shared/usr/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml # COPY ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion COPY --from=akmods /rpms /tmp/akmods-rpms -COPY --from=coreos_nvidia /rpms /tmp/nvidia/akmods-rpms +COPY --from=coreos_nvidia /rpms /tmp/akmods-rpms COPY --from=coreos_kmods /rpms/kmods /tmp/coreos/akmods-rpms # Build, cleanup, commit. diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index c3c00726611..3a94c4f251a 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -20,24 +20,9 @@ fi sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo if [[ "${COREOS_TYPE}" == "nvidia" ]]; then - rpm-ostree install /tmp/nvidia/akmods-rpms/ublue-os/ublue-os-nvidia-addons-*.rpm - # shellcheck disable=SC1091 - source /tmp/nvidia/akmods-rpms/kmods/nvidia-vars - if [[ "${BASE_IMAGE_NAME}" == "kinoite" ]]; then - VARIANT_PKGS="supergfxctl-plasmoid supergfxctl" - elif [[ "${BASE_IMAGE_NAME}" == "silverblue" ]]; then - VARIANT_PKGS="gnome-shell-extension-supergfxctl-gex supergfxctl" - else - VARIANT_PKGS="" - fi - rpm-ostree install \ - "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-{,cuda-,devel-,kmodsrc-,power-}${NVIDIA_FULL_VERSION}" \ - "xorg-x11-drv-${NVIDIA_PACKAGE_NAME}-libs.i686" \ - "nvidia-container-toolkit nvidia-vaapi-driver ${VARIANT_PKGS}" \ - "/tmp/nvidia/akmods-rpms/kmods/kmod-${NVIDIA_PACKAGE_NAME}-${KERNEL_VERSION}-${NVIDIA_AKMOD_VERSION}.fc${FEDORA_MAJOR_VERSION}.rpm" - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/nvidia-container-toolkit.repo - systemctl enable ublue-nvctk-cdi.service - semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp + curl -Lo /tmp/nvidia-install.sh https://raw.githubusercontent.com/ublue-os/hwe/main/nvidia-install.sh && \ + chmod +x /tmp/nvidia-install.sh && \ + IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh fi if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then From 7c31feee3965e1bc694259aaae5b669076ab9510 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:55:26 -0400 Subject: [PATCH 44/58] chore: update rollback-helper and image-info.json --- build_files/shared/image-info.sh | 18 ++++++-- .../shared/usr/bin/ublue-rollback-helper | 43 +++++++++++++++---- 2 files changed, 49 insertions(+), 12 deletions(-) diff --git a/build_files/shared/image-info.sh b/build_files/shared/image-info.sh index 63af86e4d3a..9f94525fadf 100755 --- a/build_files/shared/image-info.sh +++ b/build_files/shared/image-info.sh @@ -7,13 +7,25 @@ IMAGE_REF="ostree-image-signed:docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME" case $FEDORA_MAJOR_VERSION in 39) - IMAGE_TAG="gts" + if [[ -n "${COREOS_TYPE:-}" ]]; then + IMAGE_TAG="gts-coreos" + else + IMAGE_TAG="gts" + fi ;; 40) - IMAGE_TAG="latest" + if [[ -n "${COREOS_TYPE:-}" ]]; then + IMAGE_TAG="latest-coreos" + else + IMAGE_TAG="latest" + fi ;; *) - IMAGE_TAG="$FEDORA_MAJOR_VERSION" + if [[ -n "${COREOS_TYPE:-}" ]]; then + IMAGE_TAG="${FEDORA_MAJOR_VERSION}-coreos" + else + IMAGE_TAG="$FEDORA_MAJOR_VERSION" + fi ;; esac diff --git a/system_files/shared/usr/bin/ublue-rollback-helper b/system_files/shared/usr/bin/ublue-rollback-helper index 249297cf981..179af03c785 100755 --- a/system_files/shared/usr/bin/ublue-rollback-helper +++ b/system_files/shared/usr/bin/ublue-rollback-helper @@ -8,19 +8,41 @@ IMAGE_TAG=$(jq -r '."image-tag"' < $IMAGE_INFO) FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO) function list_tags(){ - skopeo list-tags docker://ghcr.io/ublue-os/${IMAGE_NAME} | grep -E --color=never -- "$FEDORA_VERSION-([0-9]+)" | sort -rV + coreos=$1 + skopeo list-tags docker://ghcr.io/ublue-os/"${IMAGE_NAME}" | grep -E --color=never -- "$FEDORA_VERSION-([0-9]+)${coreos}" | sort -rV } +function valid_coreos(){ + if [[ ${IMAGE_NAME} == "bluefin" ]] || \ + [[ ${IMAGE_NAME} == "bluefin-dx" ]] || \ + [[ ${IMAGE_NAME} == "bluefin-nvidia" ]] || \ + [[ ${IMAGE_NAME} == "bluefin-dx-nvidia" ]] || \ + [[ ${IMAGE_NAME} == "aurora" ]] || \ + [[ ${IMAGE_NAME} == "aurora-dx" ]] || \ + [[ ${IMAGE_NAME} == "aurora-nvidia" ]] || \ + [[ ${IMAGE_NAME} == "aurora-dx-nvidia" ]]; then + return 0 + fi + return 1 +} + + function rebase_helper(){ + coreos=$1 + if [[ -n "${coreos}" && ! $(valid_coreos) ]]; then + echo "There are no coreos tags for your image..." + /usr/bin/ublue-rollback-helper + fi base_image="ghcr.io/ublue-os/${IMAGE_NAME}" echo "Which Tag would you like to rebase to?" choose_target=$(Choose date latest gts cancel) - if [[ "$choose_target" == "latest" || "$choose_target" == "gts" ]]; then - rebase_target="${base_image}:$choose_target" + if [[ "$choose_target" =~ "latest" || "$choose_target" =~ "gts" ]]; then + rebase_target="${base_image}:${choose_target}${coreos}" elif [[ "$choose_target" == "date" ]]; then - valid_tags=( $(list_tags | sed 's/\"//g' | sed 's/,//g')) + # shellcheck disable=SC2207 + valid_tags=( $(list_tags "${coreos}" | sed 's/\"//g' | sed 's/,//g')) target_tag=$(Choose cancel "${valid_tags[@]}") - if grep -Eq "$FEDORA_VERSION-([0-9]+)" <<< "${target_tag}"; then + if grep -Eq "$FEDORA_VERSION-([0-9]+)${coreos}" <<< "${target_tag}"; then # target_tag=${target_tag:1:-2} rebase_target="${base_image}:$target_tag" else @@ -29,7 +51,7 @@ function rebase_helper(){ else return 1 fi - if [[ "$choose_target" == "gts" && "$IMAGE_TAG" != "gts" ]]; then + if [[ "$choose_target" =~ "gts" && "$IMAGE_TAG" =~ "latest" ]]; then echo "Warning rolling back Major Fedora Versions may not work" fi echo "Rebase Target is ${rebase_target}" @@ -41,10 +63,13 @@ function rebase_helper(){ fi } -option=$(Choose rebase cancel) +echo "Choose your action." +option=$(Choose rebase rebase-coreos cancel) if [[ "$option" == "rebase" ]]; then - rebase_helper || /usr/bin/ublue-rollback-helper + rebase_helper "" || /usr/bin/ublue-rollback-helper +elif [[ "$option" == "rebase-coreos" ]]; then + rebase_helper "-coreos" || /usr/bin/ublue-rollback-helper else exit 0 -fi \ No newline at end of file +fi From 922b12913a0137bafab73ee3e94130faf0d82866 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:26:37 -0400 Subject: [PATCH 45/58] chore(ci): reduce number of builds --- .github/workflows/reusable-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d676c58e5d3..e2f8cd01ccb 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -50,6 +50,10 @@ jobs: image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia + - fedora_version: 39 + image_flavor: surface + - fedora_version: 39 + image_flavor: surface-nvidia include: - image_flavor: main base_name: ${{ inputs.brand_name }} @@ -288,6 +292,7 @@ jobs: # Build image using Buildah action - name: Build Image id: build_image + if: github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request' uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2 with: containerfiles: | From e321d441ae8482d8ca2e54409ca1962663bd0ef3 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:28:58 -0400 Subject: [PATCH 46/58] chore: reduce pull request build time --- .github/workflows/reusable-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index e2f8cd01ccb..45ed4d63d92 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -139,6 +139,7 @@ jobs: registry: cgr.dev/chainguard - name: Maximize build space + if: github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request' uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7 - name: Check just syntax From 4e1db004f0016729af5a7c90e740d71f7c644ae8 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:38:27 -0400 Subject: [PATCH 47/58] chore(ci): more build time speedups --- .github/workflows/reusable-build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 45ed4d63d92..480ae86fdad 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -50,10 +50,11 @@ jobs: image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - - fedora_version: 39 - image_flavor: surface - - fedora_version: 39 - image_flavor: surface-nvidia + if: github.event_name == 'pull_request' + - fedora_version: 39 + image_flavor: surface + - fedora_version: 39 + image_flavor: surface-nvidia include: - image_flavor: main base_name: ${{ inputs.brand_name }} @@ -139,7 +140,7 @@ jobs: registry: cgr.dev/chainguard - name: Maximize build space - if: github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request' + if: matrix.base_name != ${{ inputs.brand_name }}-dx && (github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request') uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7 - name: Check just syntax From 6b62412abeb2a77eaf67da19b38d222902afea6f Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:41:36 -0400 Subject: [PATCH 48/58] chore(ci): unbreak workflow --- .github/workflows/reusable-build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 480ae86fdad..e86cf9fd30b 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -50,11 +50,10 @@ jobs: image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - if: github.event_name == 'pull_request' - - fedora_version: 39 - image_flavor: surface - - fedora_version: 39 - image_flavor: surface-nvidia + - fedora_version: 39 + image_flavor: surface + - fedora_version: 39 + image_flavor: surface-nvidia include: - image_flavor: main base_name: ${{ inputs.brand_name }} @@ -287,7 +286,7 @@ jobs: labels: | org.opencontainers.image.title=${{ env.IMAGE_NAME }} org.opencontainers.image.version=${{ steps.labels.outputs.VERSION }} - org.opencontainers.image.description=An interpretation of the Ubuntu spirit built on Fedora technology + org.opencontainers.image.description=An interpretation of the Ubuntu spirit built on Fedora technology io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/bluefin/bluefin/README.md io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4 From b28fcc961cff3e330dd2d1a8a0cd6f5615dbf1f6 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:46:11 -0400 Subject: [PATCH 49/58] chore(ci): try to not use max build space unless needed --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index e86cf9fd30b..cf7971ddba1 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -139,7 +139,7 @@ jobs: registry: cgr.dev/chainguard - name: Maximize build space - if: matrix.base_name != ${{ inputs.brand_name }}-dx && (github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request') + if: contains(matrix.base_name, '-dx') && (github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request') uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7 - name: Check just syntax From 21f4271fc919bc179c5b09e25924853cada7412b Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:01:18 -0400 Subject: [PATCH 50/58] chore: refactor to using coreos as tag --- .github/workflows/build-coreos-bluefin.yml | 28 +++ .github/workflows/reusable-build.yml | 170 +++++++----------- build_files/base/coreos_kernel.sh | 18 +- build_files/base/install-akmods.sh | 21 +-- build_files/shared/image-info.sh | 30 ++-- .../shared/usr/bin/ublue-rollback-helper | 41 +---- 6 files changed, 134 insertions(+), 174 deletions(-) create mode 100644 .github/workflows/build-coreos-bluefin.yml diff --git a/.github/workflows/build-coreos-bluefin.yml b/.github/workflows/build-coreos-bluefin.yml new file mode 100644 index 00000000000..4637c210d37 --- /dev/null +++ b/.github/workflows/build-coreos-bluefin.yml @@ -0,0 +1,28 @@ +name: bluefin coreos +on: + merge_group: + pull_request: + branches: + - main + - testing + paths-ignore: + - '**.md' + - 'system_files/kinoite/**' + push: + branches: + - main + paths-ignore: + - '**.md' + - 'system_files/kinoite/**' + schedule: + - cron: '41 5 * * *' # 5:41 UTC everyday + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: coreos diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index cf7971ddba1..f3888a1caa2 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -50,27 +50,14 @@ jobs: image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - - fedora_version: 39 + - fedora_version: coreos + image_flavor: asus + - fedora_version: coreos + image_flavor: asus-nvidia + - fedora_version: coreos image_flavor: surface - - fedora_version: 39 + - fedora_version: coreos image_flavor: surface-nvidia - include: - - image_flavor: main - base_name: ${{ inputs.brand_name }} - fedora_version: ${{ inputs.fedora_version }} - coreos_tag: "-coreos" - - image_flavor: main - base_name: ${{ inputs.brand_name }}-dx - fedora_version: ${{ inputs.fedora_version }} - coreos_tag: "-coreos" - - image_flavor: nvidia - base_name: ${{ inputs.brand_name }} - fedora_version: ${{ inputs.fedora_version }} - coreos_tag: "-coreos" - - image_flavor: nvidia - base_name: ${{ inputs.brand_name }}-dx - fedora_version: ${{ inputs.fedora_version }} - coreos_tag: "-coreos" steps: - name: Checkout @@ -105,7 +92,7 @@ jobs: elif [[ "${{ matrix.image_flavor }}" =~ "surface" ]]; then echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV echo "KERNEL_SUFFIX=surface" >> $GITHUB_ENV - elif [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + elif [[ "${{ matrix.fedora_version }}" =~ "coreos" ]]; then echo "AKMODS_FLAVOR=coreos" >> $GITHUB_ENV else echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV @@ -113,21 +100,42 @@ jobs: # Env for matrix.image_flavor if [[ "${{ matrix.image_flavor }}" == "nvidia" ]] && \ - [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then + [[ "${{ matrix.fedora_version }}" =~ "coreos" ]]; then echo "image_flavor=main" >> $GITHUB_ENV echo "coreos_type=nvidia" >> $GITHUB_ENV elif [[ "${{ matrix.image_flavor }}" == "main" ]] && \ - [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then - echo "image_flavor=${{ matrix.image_flavor }}" >> $GITHUB_ENV - echo "coreos_type=main" >> $GITHUB_ENV + [[ "${{ matrix.fedora_version }}" =~ "coreos" ]]; then + echo "image_flavor=${{ matrix.image_flavor }}" >> $GITHUB_ENV + echo "coreos_type=main" >> $GITHUB_ENV else echo "image_flavor=${{ matrix.image_flavor }}" >> $GITHUB_ENV fi + - name: Get Current Fedora Version + id: labels + shell: bash + run: | + set -eo pipefail + if [[ ${{ matrix.fedora_version }} == "coreos" ]]; then + KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + fedora_version=$(echo $KERNEL_RELEASE | grep -oP 'fc\K[0-9]+') + else + KERNEL_RELEASE=$(skopeo inspect docker://ghcr.io/ublue-os/silverblue-${{ env.image_flavor }}:${{ matrix.fedora_version }} | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + fi + fedora_version=$(echo $KERNEL_RELEASE | grep -oP 'fc\K[0-9]+') + ver=$(skopeo inspect docker://ghcr.io/ublue-os/${{ env.BASE_IMAGE_NAME }}-${{ env.image_flavor }}:$fedora_version | jq -r '.Labels["org.opencontainers.image.version"]') + echo "kernel_release=$KERNEL_RELEASE" >> $GITHUB_OUTPUT + echo "fedora_version=$fedora_version" >> $GITHUB_OUTPUT + if [ -z "$ver" ] || [ "null" = "$ver" ]; then + echo "inspected image version must not be empty or null" + exit 1 + fi + echo "VERSION=$ver" >> $GITHUB_OUTPUT + - name: Verify base image uses: EyeCantCU/cosign-action/verify@11f8c114a5e67c7a663c9dfcaf76d85429d254bc # v0.2.2 with: - containers: ${{ env.BASE_IMAGE_NAME}}-${{ env.image_flavor }}:${{ matrix.fedora_version }} + containers: ${{ env.BASE_IMAGE_NAME}}-${{ env.image_flavor }}:${{ env.fedora_version }} - name: Verify Chainguard images if: matrix.base_name != 'bluefin' && matrix.base_name != 'aurora' @@ -153,26 +161,27 @@ jobs: TIMESTAMP="$(date +%Y%m%d)" FEDORA_VERSION="${{ matrix.fedora_version }}" - if [[ "${{ matrix.fedora_version }}" -eq "39" ]]; then + if [[ "${{ matrix.fedora_version }}" == "coreos" ]]; then + IS_LATEST_VERSION=false + IS_STABLE_VERSION=true + IS_GTS_VERSION=false + IS_COREOS=true + elif [[ "${{ matrix.fedora_version }}" -eq "39" ]]; then IS_LATEST_VERSION=false IS_STABLE_VERSION=true IS_GTS_VERSION=true + IS_COREOS=false elif [[ "${{ matrix.fedora_version }}" -eq "40" ]]; then IS_LATEST_VERSION=true IS_STABLE_VERSION=true IS_GTS_VERSION=false + IS_COREOS=false elif [[ "${{ matrix.fedora_version }}" -eq "41" ]]; then IS_LATEST_VERSION=false IS_STABLE_VERSION=false IS_GTS_VERSION=false - fi - - if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then - IS_COREOS=true - else IS_COREOS=false fi - echo "IS_COREOS=$IS_COREOS" >> $GITHUB_ENV COMMIT_TAGS=() BUILD_TAGS=() @@ -187,55 +196,27 @@ jobs: COMMIT_TAGS+=("${SHA_SHORT}") fi - if [[ "${{ matrix.coreos_tag }}" =~ "coreos" ]]; then - BUILD_TAGS=("${FEDORA_VERSION}-coreos" "${FEDORA_VERSION}-coreos-${TIMESTAMP}") - else - BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") - fi + BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") if [[ ${{ github.ref_name }} == "testing" ]]; then - if [[ "${{ matrix.coreos_tag }}" == "-coreos" ]]; then - BUILD_TAGS=("${FEDORA_VERSION}-testing-coreos" "${FEDORA_VERSION}-testing-coreos-${TIMESTAMP}") - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("testing-coreos") - echo "DEFAULT_TAG=testing-coreos" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "true" ]]; then - BUILD_TAGS+=("gts-testing-coreos") - echo "DEFAULT_TAG=gts-testing-coreos" >> $GITHUB_ENV - fi - else - BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("testing") - echo "DEFAULT_TAG=testing" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]]; then - BUILD_TAGS+=("gts-testing") - echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV - fi + BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("testing") + echo "DEFAULT_TAG=testing" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]]; then + BUILD_TAGS+=("gts-testing") + echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV fi else - if [[ "${{ matrix.coreos_tag }}" == "-coreos" ]]; then - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("latest-coreos") - echo "DEFAULT_TAG=latest-coreos" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]]; then - BUILD_TAGS+=("gts-coreos") - echo "DEFAULT_TAG=gts-coreos" >> $GITHUB_ENV - fi - else - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("latest") - echo "DEFAULT_TAG=latest" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "false" ]]; then - BUILD_TAGS+=("gts") - echo "DEFAULT_TAG=gts" >> $GITHUB_ENV - fi + if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + [[ "$IS_STABLE_VERSION" == "true" ]]; then + BUILD_TAGS+=("latest") + echo "DEFAULT_TAG=latest" >> $GITHUB_ENV + elif [[ "$IS_GTS_VERSION" == "true" ]] && \ + [[ "$IS_COREOS" == "false" ]]; then + BUILD_TAGS+=("gts") + echo "DEFAULT_TAG=gts" >> $GITHUB_ENV fi fi @@ -255,27 +236,6 @@ jobs: done echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT - - name: Get Current Fedora Version - id: labels - shell: bash - run: | - set -eo pipefail - ver=$(skopeo inspect docker://ghcr.io/ublue-os/silverblue-${{ env.image_flavor }}:${{ matrix.fedora_version }} | jq -r '.Labels["org.opencontainers.image.version"]') - if [ -z "$ver" ] || [ "null" = "$ver" ]; then - echo "inspected image version must not be empty or null" - exit 1 - fi - echo "VERSION=$ver" >> $GITHUB_OUTPUT - - - name: Get CoreOS Kernel Version - id: coreos_kernel - shell: bash - run: | - if [[ ${{ env.IS_COREOS }} == "true" ]]; then - KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') - fi - echo "kernel-release=$KERNEL_RELEASE" >> $GITHUB_OUTPUT - # Build metadata - name: Image Metadata uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5 @@ -287,6 +247,7 @@ jobs: org.opencontainers.image.title=${{ env.IMAGE_NAME }} org.opencontainers.image.version=${{ steps.labels.outputs.VERSION }} org.opencontainers.image.description=An interpretation of the Ubuntu spirit built on Fedora technology + ostree.linux=${{ steps.labels.outputs.kernel_release }} io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/bluefin/bluefin/README.md io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4 @@ -306,11 +267,11 @@ jobs: IMAGE_NAME=${{ env.IMAGE_NAME }} IMAGE_FLAVOR=${{ env.image_flavor }} IMAGE_VENDOR=${{ github.repository_owner }} - FEDORA_MAJOR_VERSION=${{ matrix.fedora_version }} + FEDORA_MAJOR_VERSION=${{ env.fedora_version }} TARGET_BASE=${{ matrix.target_base }} AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} COREOS_TYPE=${{ env.coreos_type }} - COREOS_KERNEL=${{ steps.coreos_kernel.outputs.kernel-release }} + KERNEL=${{ steps.labels.outputs.kernel_release }} labels: ${{ steps.meta.outputs.labels }} oci: false # TODO(GH-280) @@ -382,20 +343,19 @@ jobs: IMAGE_REGISTRY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }} IMAGE_NAME: ${{ env.IMAGE_NAME }} IMAGE_FLAVOR: ${{ env.image_flavor }} - FEDORA_VERSION: ${{ matrix.fedora_version }} - COREOS_TAG: ${{ matrix.coreos_tag }} + FEDORA_VERSION: ${{ env.fedora_version }} run: - echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}${{ matrix.coreos_tag }}.txt" + echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" - name: Upload artifact if: github.event_name != 'pull_request' uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: - name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag }} + name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ env.fedora_version }} retention-days: 1 if-no-files-found: error path: | - ${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ matrix.fedora_version }}${{ matrix.coreos_tag}}.txt + ${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ env.fedora_version }}.txt check: name: Check all ${{ inputs.brand_name }} ${{ inputs.fedora_version }} builds successful diff --git a/build_files/base/coreos_kernel.sh b/build_files/base/coreos_kernel.sh index 665a418a2c3..2f11bf870fd 100644 --- a/build_files/base/coreos_kernel.sh +++ b/build_files/base/coreos_kernel.sh @@ -2,14 +2,14 @@ set -eoux pipefail -if [[ -n ${COREOS_KERNEL:-} ]]; then - KERNEL_VERSION=${COREOS_KERNEL} - KERNEL_MAJOR_MINOR_PATCH=$(echo $KERNEL_VERSION | cut -d '-' -f 1) - KERNEL_RELEASE=$(echo $KERNEL_VERSION | cut -d '-' -f 2) +if [[ -n "${COREOS_TYPE:-}" ]]; then + KERNEL_VERSION="${KERNEL}" + KERNEL_MAJOR_MINOR_PATCH=$(echo "$KERNEL_VERSION" | cut -d '-' -f 1) + KERNEL_RELEASE=$(echo "$KERNEL_VERSION" | cut -d '-' -f 2) rpm-ostree override replace --experimental \ - https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ - https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ - https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ - https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm \ - https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-extra-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm + "https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm" \ + "https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm" \ + "https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm" \ + "https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-core-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm" \ + "https://kojipkgs.fedoraproject.org//packages/kernel/$KERNEL_MAJOR_MINOR_PATCH/$KERNEL_RELEASE/x86_64/kernel-modules-extra-$KERNEL_MAJOR_MINOR_PATCH-$KERNEL_RELEASE.x86_64.rpm" fi diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 3a94c4f251a..84105ad3ae8 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -25,13 +25,14 @@ if [[ "${COREOS_TYPE}" == "nvidia" ]]; then IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh fi -if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then - curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ - https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo - KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" - rpm-ostree install /tmp/coreos/akmods-rpms/*.rpm \ - /tmp/coreos/akmods-rpms/zfs/*.rpm \ - pv - depmod -A "${KERNEL_FOR_DEPMOD}" - sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo -fi +# ZFS is pulled from Ucore which is not in sync +# if [[ "${AKMODS_FLAVOR}" =~ "coreos" ]]; then +# curl -Lo /etc/yum.repos.d/ublue-os-ucore-fedora.repo \ +# https://copr.fedorainfracloud.org/coprs/ublue-os/ucore/repo/fedora/ublue-os-ucore-fedora.repo +# KERNEL_FOR_DEPMOD="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" +# rpm-ostree install /tmp/coreos/akmods-rpms/*.rpm \ +# /tmp/coreos/akmods-rpms/zfs/*.rpm \ +# pv +# depmod -A "${KERNEL_FOR_DEPMOD}" +# sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/ublue-os-ucore-fedora.repo +# fi diff --git a/build_files/shared/image-info.sh b/build_files/shared/image-info.sh index 9f94525fadf..7c5ee9d7dac 100755 --- a/build_files/shared/image-info.sh +++ b/build_files/shared/image-info.sh @@ -7,32 +7,26 @@ IMAGE_REF="ostree-image-signed:docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME" case $FEDORA_MAJOR_VERSION in 39) - if [[ -n "${COREOS_TYPE:-}" ]]; then - IMAGE_TAG="gts-coreos" - else - IMAGE_TAG="gts" - fi + IMAGE_TAG="gts" ;; 40) - if [[ -n "${COREOS_TYPE:-}" ]]; then - IMAGE_TAG="latest-coreos" - else - IMAGE_TAG="latest" - fi + IMAGE_TAG="latest" ;; *) - if [[ -n "${COREOS_TYPE:-}" ]]; then - IMAGE_TAG="${FEDORA_MAJOR_VERSION}-coreos" - else - IMAGE_TAG="$FEDORA_MAJOR_VERSION" - fi + IMAGE_TAG="$FEDORA_MAJOR_VERSION" ;; esac +image_flavor="${IMAGE_FLAVOR}" +fedora_version="${FEDORA_MAJOR_VERSION}" + +if [[ -n "${COREOS_TYPE:-}" ]]; then + fedora_version="coreos" + IMAGE_TAG="coreos" +fi + if [[ "${COREOS_TYPE}" == "nvidia" ]]; then image_flavor="nvidia" -else - image_flavor="${IMAGE_FLAVOR}" fi cat > $IMAGE_INFO < $IMAGE_INFO < Date: Wed, 26 Jun 2024 15:09:03 -0400 Subject: [PATCH 51/58] chore(ci): continue refactor --- .github/workflows/reusable-build.yml | 10 +++++----- Containerfile | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index f3888a1caa2..93aaee02bc0 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -135,7 +135,7 @@ jobs: - name: Verify base image uses: EyeCantCU/cosign-action/verify@11f8c114a5e67c7a663c9dfcaf76d85429d254bc # v0.2.2 with: - containers: ${{ env.BASE_IMAGE_NAME}}-${{ env.image_flavor }}:${{ env.fedora_version }} + containers: ${{ env.BASE_IMAGE_NAME}}-${{ env.image_flavor }}:${{ steps.labels.outputs.fedora_version }} - name: Verify Chainguard images if: matrix.base_name != 'bluefin' && matrix.base_name != 'aurora' @@ -267,7 +267,7 @@ jobs: IMAGE_NAME=${{ env.IMAGE_NAME }} IMAGE_FLAVOR=${{ env.image_flavor }} IMAGE_VENDOR=${{ github.repository_owner }} - FEDORA_MAJOR_VERSION=${{ env.fedora_version }} + FEDORA_MAJOR_VERSION=${{ steps.labels.outputs.fedora_version }} TARGET_BASE=${{ matrix.target_base }} AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} COREOS_TYPE=${{ env.coreos_type }} @@ -343,7 +343,7 @@ jobs: IMAGE_REGISTRY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }} IMAGE_NAME: ${{ env.IMAGE_NAME }} IMAGE_FLAVOR: ${{ env.image_flavor }} - FEDORA_VERSION: ${{ env.fedora_version }} + FEDORA_VERSION: ${{ steps.labels.outputs.fedora_version }} run: echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" @@ -351,11 +351,11 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: - name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ env.fedora_version }} + name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ steps.labels.outputs.fedora_version }} retention-days: 1 if-no-files-found: error path: | - ${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ env.fedora_version }}.txt + ${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ steps.labels.outputs.fedora_version }}.txt check: name: Check all ${{ inputs.brand_name }} ${{ inputs.fedora_version }} builds successful diff --git a/Containerfile b/Containerfile index 03876792663..1a40a168116 100644 --- a/Containerfile +++ b/Containerfile @@ -13,8 +13,8 @@ ARG KMOD_SOURCE_COMMON="ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_ ARG COREOS_KMODS="ghcr.io/ublue-os/ucore-kmods:stable" ARG COREOS_NVIDIA="ghcr.io/ublue-os/akmods-nvidia:coreos-${FEDORA_MAJOR_VERSION}" FROM ${KMOD_SOURCE_COMMON} as akmods -# TODO figure out a better way to get zfs for coreos -FROM ${COREOS_KMODS} as coreos_kmods +# # TODO figure out a better way to get zfs for coreos +# FROM ${COREOS_KMODS} as coreos_kmods # TODO figure out a better way to get nvidia for coreos FROM ${COREOS_NVIDIA} as coreos_nvidia @@ -41,7 +41,7 @@ COPY /system_files/shared/usr/etc/ublue-update/ublue-update.toml /tmp/ublue-upda # COPY ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion COPY --from=akmods /rpms /tmp/akmods-rpms COPY --from=coreos_nvidia /rpms /tmp/akmods-rpms -COPY --from=coreos_kmods /rpms/kmods /tmp/coreos/akmods-rpms +# COPY --from=coreos_kmods /rpms/kmods /tmp/coreos/akmods-rpms # Build, cleanup, commit. RUN rpm-ostree cliwrap install-to-root / && \ From 4b27fb2823634260c8790fb93604af211c8c75b5 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:13:13 -0400 Subject: [PATCH 52/58] chore(ci): add aurora coreos, update containerfile --- .github/workflows/build-coreos-aurora.yml | 28 +++++++++++++++++++++++ Containerfile | 6 ++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-coreos-aurora.yml diff --git a/.github/workflows/build-coreos-aurora.yml b/.github/workflows/build-coreos-aurora.yml new file mode 100644 index 00000000000..eb874ecb480 --- /dev/null +++ b/.github/workflows/build-coreos-aurora.yml @@ -0,0 +1,28 @@ +name: aurora coreos +on: + merge_group: + pull_request: + branches: + - main + - testing + paths-ignore: + - '**.md' + - 'system_files/bluefin/**' + push: + branches: + - main + paths-ignore: + - '**.md' + - 'system_files/bluefin/**' + schedule: + - cron: '41 5 * * *' # 5:41 UTC everyday + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: aurora + fedora_version: coreos diff --git a/Containerfile b/Containerfile index 1a40a168116..933770c9c70 100644 --- a/Containerfile +++ b/Containerfile @@ -6,7 +6,7 @@ ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG TARGET_BASE="${TARGET_BASE:-bluefin}" ARG COREOS_TYPE="${COREOS_TYPE:-}" -ARG COREOS_KERNEL="${COREOS_KERNEL:-}" +ARG KERNEL="${KERNEL:-}" # FROM's for copying ARG KMOD_SOURCE_COMMON="ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}" @@ -28,7 +28,7 @@ ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG COREOS_TYPE="${COREOS_TYPE:-}" -ARG COREOS_KERNEL="${COREOS_KERNEL:-}" +ARG KERNEL="${KERNEL:-}" # COPY Build Files COPY build_files/base build_files/shared /tmp/build/ @@ -64,7 +64,7 @@ ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG COREOS_TYPE="${COREOS_TYPE:-}" -ARG COREOS_KERNEL="${COREOS_KERNEL:-}" +ARG KERNEL="${KERNEL:-}" # dx specific files come from the dx directory in this repo COPY build_files/dx build_files/shared /tmp/build/ From 407e7189da2ec67e1d7957505727a672c6ad375e Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:32:30 -0400 Subject: [PATCH 53/58] chore(ci): change tag name to stable --- .github/workflows/build-coreos-aurora.yml | 2 +- .github/workflows/build-coreos-bluefin.yml | 2 +- .github/workflows/reusable-build.yml | 23 ++++++++++------------ 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-coreos-aurora.yml b/.github/workflows/build-coreos-aurora.yml index eb874ecb480..a410b860b24 100644 --- a/.github/workflows/build-coreos-aurora.yml +++ b/.github/workflows/build-coreos-aurora.yml @@ -25,4 +25,4 @@ jobs: secrets: inherit with: brand_name: aurora - fedora_version: coreos + fedora_version: stable diff --git a/.github/workflows/build-coreos-bluefin.yml b/.github/workflows/build-coreos-bluefin.yml index 4637c210d37..1ca44a7cc36 100644 --- a/.github/workflows/build-coreos-bluefin.yml +++ b/.github/workflows/build-coreos-bluefin.yml @@ -25,4 +25,4 @@ jobs: secrets: inherit with: brand_name: bluefin - fedora_version: coreos + fedora_version: stable diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 93aaee02bc0..9cfc88de08f 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -43,20 +43,18 @@ jobs: - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} - coreos_tag: - - "" exclude: - fedora_version: 39 image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia - - fedora_version: coreos + - fedora_version: stable image_flavor: asus - - fedora_version: coreos + - fedora_version: stable image_flavor: asus-nvidia - - fedora_version: coreos + - fedora_version: stable image_flavor: surface - - fedora_version: coreos + - fedora_version: stable image_flavor: surface-nvidia steps: @@ -92,7 +90,7 @@ jobs: elif [[ "${{ matrix.image_flavor }}" =~ "surface" ]]; then echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV echo "KERNEL_SUFFIX=surface" >> $GITHUB_ENV - elif [[ "${{ matrix.fedora_version }}" =~ "coreos" ]]; then + elif [[ "${{ matrix.fedora_version }}" =~ "stable" ]]; then echo "AKMODS_FLAVOR=coreos" >> $GITHUB_ENV else echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV @@ -100,11 +98,11 @@ jobs: # Env for matrix.image_flavor if [[ "${{ matrix.image_flavor }}" == "nvidia" ]] && \ - [[ "${{ matrix.fedora_version }}" =~ "coreos" ]]; then + [[ "${{ matrix.fedora_version }}" =~ "stable" ]]; then echo "image_flavor=main" >> $GITHUB_ENV echo "coreos_type=nvidia" >> $GITHUB_ENV elif [[ "${{ matrix.image_flavor }}" == "main" ]] && \ - [[ "${{ matrix.fedora_version }}" =~ "coreos" ]]; then + [[ "${{ matrix.fedora_version }}" =~ "stable" ]]; then echo "image_flavor=${{ matrix.image_flavor }}" >> $GITHUB_ENV echo "coreos_type=main" >> $GITHUB_ENV else @@ -116,7 +114,7 @@ jobs: shell: bash run: | set -eo pipefail - if [[ ${{ matrix.fedora_version }} == "coreos" ]]; then + if [[ ${{ matrix.fedora_version }} == "stable" ]]; then KERNEL_RELEASE=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') fedora_version=$(echo $KERNEL_RELEASE | grep -oP 'fc\K[0-9]+') else @@ -161,7 +159,7 @@ jobs: TIMESTAMP="$(date +%Y%m%d)" FEDORA_VERSION="${{ matrix.fedora_version }}" - if [[ "${{ matrix.fedora_version }}" == "coreos" ]]; then + if [[ "${{ matrix.fedora_version }}" == "stable" ]]; then IS_LATEST_VERSION=false IS_STABLE_VERSION=true IS_GTS_VERSION=false @@ -213,8 +211,7 @@ jobs: [[ "$IS_STABLE_VERSION" == "true" ]]; then BUILD_TAGS+=("latest") echo "DEFAULT_TAG=latest" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]] && \ - [[ "$IS_COREOS" == "false" ]]; then + elif [[ "$IS_GTS_VERSION" == "true" ]]; then BUILD_TAGS+=("gts") echo "DEFAULT_TAG=gts" >> $GITHUB_ENV fi From 9a6852601956c2d4a60ecb12aa1fccfc21fc5ddd Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:59:12 -0400 Subject: [PATCH 54/58] chore: make sure there is a default tag --- .github/workflows/reusable-build.yml | 4 ++++ build_files/base/install-akmods.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 9cfc88de08f..232bbd049d1 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -205,6 +205,8 @@ jobs: elif [[ "$IS_GTS_VERSION" == "true" ]]; then BUILD_TAGS+=("gts-testing") echo "DEFAULT_TAG=gts-testing" >> $GITHUB_ENV + elif [[ "$IS_COREOS" == "true" ]]; then + echo "DEFAULT_TAG=stable-testing" >> $GITHUB_ENV fi else if [[ "$IS_LATEST_VERSION" == "true" ]] && \ @@ -214,6 +216,8 @@ jobs: elif [[ "$IS_GTS_VERSION" == "true" ]]; then BUILD_TAGS+=("gts") echo "DEFAULT_TAG=gts" >> $GITHUB_ENV + elif [[ "$IS_COREOS" == "true" ]]; then + echo "DEFAULT_TAG=stable" >> $GITHUB_ENV fi fi diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 84105ad3ae8..dbfd3ab1ce4 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -10,8 +10,8 @@ if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then /tmp/akmods-rpms/kmods/*xone*.rpm \ /tmp/akmods-rpms/kmods/*openrazer*.rpm \ /tmp/akmods-rpms/kmods/*wl*.rpm \ - /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \ - /tmp/akmods-rpms/kmods/*framework-laptop*.rpm + /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm + # /tmp/akmods-rpms/kmods/*framework-laptop*.rpm fi if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then rpm-ostree install \ From 90f995ab9fcdcc33c8a7b2a7148b28d9117520b0 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:17:33 -0400 Subject: [PATCH 55/58] fix(ci): make sure artifacts use stable, not 40 --- .github/workflows/reusable-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 232bbd049d1..4e75dd4b19b 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -344,7 +344,7 @@ jobs: IMAGE_REGISTRY: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }} IMAGE_NAME: ${{ env.IMAGE_NAME }} IMAGE_FLAVOR: ${{ env.image_flavor }} - FEDORA_VERSION: ${{ steps.labels.outputs.fedora_version }} + FEDORA_VERSION: ${{ matrix.fedora_version }} run: echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" @@ -352,11 +352,11 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 with: - name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ steps.labels.outputs.fedora_version }} + name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ matrix.fedora_version }} retention-days: 1 if-no-files-found: error path: | - ${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ steps.labels.outputs.fedora_version }}.txt + ${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ matrix.fedora_version }}.txt check: name: Check all ${{ inputs.brand_name }} ${{ inputs.fedora_version }} builds successful From 9d8294a2a5cafe48f6b603ed5e475d03fb9473ae Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:41:25 -0400 Subject: [PATCH 56/58] chore: cleanup branding and codacy errors --- README.md | 8 ++++---- build_files/base/aurora-changes.sh | 3 +++ build_files/shared/initramfs.sh | 2 +- system_files/kinoite/usr/share/ublue-os/motd/bluefin.md | 3 ++- .../shared/usr/share/ublue-os/bluefin-cli/bling.sh | 7 ++++--- .../shared/usr/share/ublue-os/motd/tips/10-tips.md | 3 --- .../silverblue/usr/share/ublue-os/motd/20-bluefin.md | 4 ++++ .../silverblue/usr/share/ublue-os/motd/bluefin.md | 3 ++- 8 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 system_files/silverblue/usr/share/ublue-os/motd/20-bluefin.md diff --git a/README.md b/README.md index 813b614ea6d..8beee7a13fe 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ ![image](https://github.com/ublue-os/bluefin/assets/1264109/b093bdec-40dc-48d2-b8ff-fcf0df390e8c) - > "Evolution is a process of constant branching and expansion." - Stephen Jay Gould Bluefin strives to cover these two use cases. For end users it provides a system as reliable as a Chromebook with near-zero maintainance, with the power of homebrew, flathub, and a container runtime to give you access to all the best software Open Source has to offer. Check [Introduction to Bluefin](https://universal-blue.discourse.group/t/introduction-to-bluefin/41) for a feature walkthrough. @@ -29,12 +28,12 @@ Aurora is a delightful KDE desktop experience for end-users that are looking for Both Aurora and Bluefin strive to offer a curated out of the box experience for users, they only differ in the default desktop and recommended applications: Bluefin uses GNOME, Aurora uses KDE. They are both maintained and built in this repository. -# Documentation +## Documentation 1. [Discussions and Announcements](https://universal-blue.discourse.group/c/bluefin/6) - strongly recommended! 2. [Administrator's Guide](https://universal-blue.discourse.group/t/bluefin-administrators-guide/40) -## Secure Boot +### Secure Boot Secure Boot is supported by default on our systems, providing an additional layer of security. After the first installation, you will be prompted to enroll the secure boot key in the BIOS. @@ -55,7 +54,8 @@ sudo mokutil --timeout -1 sudo mokutil --import secure_boot.der ``` -### Note: +#### Note + If you encounter an issue with a password being recognized as incorrect, try using the `-` key on the numpad instead. diff --git a/build_files/base/aurora-changes.sh b/build_files/base/aurora-changes.sh index 3c4d4ee4b57..c14462ef818 100644 --- a/build_files/base/aurora-changes.sh +++ b/build_files/base/aurora-changes.sh @@ -14,6 +14,9 @@ if [[ "${BASE_IMAGE_NAME}" = "kinoite" ]]; then sed -i 's@Keywords=@Keywords=konsole;console;@g' /usr/share/applications/org.gnome.Ptyxis.desktop cp /usr/share/applications/org.gnome.Ptyxis.desktop /usr/share/kglobalaccel/org.gnome.Ptyxis.desktop sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.kde.konsole.desktop + sed -i 's@Bluefin@Aurora@g' /usr/share/applications/system-update.desktop + sed -i 's@Bluefin@Aurora@g' /usr/share/ublue-os/motd/tips/10-tips.md + sed -i 's@Bluefin@Aurora@g' /usr/libexec/ublue-flatpak-manager rm -f /usr/etc/profile.d/gnome-ssh-askpass.{csh,sh} # This shouldn't be pulled in rm -f /usr/share/kglobalaccel/org.kde.konsole.desktop systemctl enable kde-sysmonitor-workaround.service diff --git a/build_files/shared/initramfs.sh b/build_files/shared/initramfs.sh index 2fb6b55ab13..c9e4a53e3d2 100755 --- a/build_files/shared/initramfs.sh +++ b/build_files/shared/initramfs.sh @@ -19,4 +19,4 @@ fi QUALIFIED_KERNEL="$(rpm -qa | grep -P 'kernel-(|'"$KERNEL_SUFFIX"'-)(\d+\.\d+\.\d+)' | sed -E 's/kernel-(|'"$KERNEL_SUFFIX"'-)//')" /usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible -v --add ostree -f "/lib/modules/$QUALIFIED_KERNEL/initramfs.img" -chmod 0600 /lib/modules/$QUALIFIED_KERNEL/initramfs.img +chmod 0600 "/lib/modules/$QUALIFIED_KERNEL/initramfs.img" diff --git a/system_files/kinoite/usr/share/ublue-os/motd/bluefin.md b/system_files/kinoite/usr/share/ublue-os/motd/bluefin.md index 6fc2b2c93cf..63b2a88d47d 100644 --- a/system_files/kinoite/usr/share/ublue-os/motd/bluefin.md +++ b/system_files/kinoite/usr/share/ublue-os/motd/bluefin.md @@ -1,4 +1,5 @@ -# Welcome to Aurora! +# Welcome to Aurora + 🔭 `%IMAGE_NAME%:%IMAGE_TAG%` Let's trace the stars. diff --git a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh index ebc237edd3c..5f9fe4bcc8b 100644 --- a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh +++ b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh @@ -14,11 +14,12 @@ alias xzgrep='ug -z' alias xzegrep='ug -zE' alias xzfgrep='ug -zF' -if [ $(basename $SHELL) = "bash" ]; then - source /usr/share/bash-prexec +if [ "$(basename "$SHELL")" = "bash" ]; then + #shellcheck disable=SC1091 + . /usr/share/bash-prexec eval "$(atuin init bash)" eval "$(zoxide init bash)" -elif [ $(basename $SHELL) = "zsh" ]; then +elif [ "$(basename "$SHELL")" = "zsh" ]; then eval "$(atuin init zsh)" eval "$(zoxide init zsh)" fi diff --git a/system_files/shared/usr/share/ublue-os/motd/tips/10-tips.md b/system_files/shared/usr/share/ublue-os/motd/tips/10-tips.md index cca73a78ddd..96952d5a4a7 100644 --- a/system_files/shared/usr/share/ublue-os/motd/tips/10-tips.md +++ b/system_files/shared/usr/share/ublue-os/motd/tips/10-tips.md @@ -1,15 +1,12 @@ -The Project Bluefin team will use this banner to share important information and occasional tips Follow us on 󰫑 [@UniversalBlue@fosstodon.org](https://fosstodon.org/@UniversalBlue) Bluefin is your gateway to Kubernetes 󱃾 `kind create cluster` to [get started](https://kind.sigs.k8s.io/) Bluefin is your gateway to Cloud Native - find your flock at [landscape.cncf.io](https://l.cncf.io) Support the app store! Donate to  [Flatpak](https://opencollective.com/flatpak) Need more indepth technical information?~Check out the [Bluefin Administrator's Guide](https://universal-blue.discourse.group/docs?topic=40) -Support [Bluefin's Paleoartists](https://universal-blue.discourse.group/docs?topic=299) Like servers? Check out [ucore](https://github.com/ublue-os/ucore) Update break something? You can roll back and pin the previous release or build date:~[View our guide](https://universal-blue.discourse.group/docs?topic=513) Use `brew search` and `brew install` to install packages. Bluefin will take care of the updates automatically Use `Ctrl`-`Alt`-`T` to quickly open a terminal -Use `Super`-`Space` to run Search Light (Super is your Windows key!) Tailscale is included, check out [their docs](https://tailscale.com/kb/1017/install) Bluefin is your gateway to AI and LLMs | `ujust ollama` to [get started](https://ollama.com/) `ujust --choose` will show you each shortcut and the script it's running diff --git a/system_files/silverblue/usr/share/ublue-os/motd/20-bluefin.md b/system_files/silverblue/usr/share/ublue-os/motd/20-bluefin.md new file mode 100644 index 00000000000..a67d3163758 --- /dev/null +++ b/system_files/silverblue/usr/share/ublue-os/motd/20-bluefin.md @@ -0,0 +1,4 @@ +The Project Bluefin team will use this banner to share important information and occasional tips +Use `Super`-`Space` to run Search Light (Super is your Windows key!) +Support [Bluefin's Paleoartists](https://universal-blue.discourse.group/docs?topic=299) + diff --git a/system_files/silverblue/usr/share/ublue-os/motd/bluefin.md b/system_files/silverblue/usr/share/ublue-os/motd/bluefin.md index b8eb6a4c7a7..57222afba26 100644 --- a/system_files/silverblue/usr/share/ublue-os/motd/bluefin.md +++ b/system_files/silverblue/usr/share/ublue-os/motd/bluefin.md @@ -1,4 +1,5 @@ # 󱍢 Welcome to Bluefin + 󱋩 `%IMAGE_NAME%:%IMAGE_TAG%` |  Command | Description | @@ -13,4 +14,4 @@ - 󰊤 [Issues](https://issues.projectbluefin.io) - 󰈙 [Documentation](http://docs.projectbluefin.io/) - 󰊌 [Discuss](https://community.projectbluefin.io/) -- 󰊌 [Leave Feedback](https://feedback.projectbluefin.io) \ No newline at end of file +- 󰊌 [Leave Feedback](https://feedback.projectbluefin.io) From 1671ead52bdb67190f528912a12f7331b9f729dd Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:45:02 -0400 Subject: [PATCH 57/58] chore: more codacy --- system_files/dx/usr/etc/profile.d/vscode-bluefin-profile.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/system_files/dx/usr/etc/profile.d/vscode-bluefin-profile.sh b/system_files/dx/usr/etc/profile.d/vscode-bluefin-profile.sh index 631fbe3b115..692e601d47c 100644 --- a/system_files/dx/usr/etc/profile.d/vscode-bluefin-profile.sh +++ b/system_files/dx/usr/etc/profile.d/vscode-bluefin-profile.sh @@ -1,3 +1,4 @@ +#!/usr/bin/sh if test "$(id -u)" -gt "0" && test -d "$HOME"; then # Add default settings when there are no settings if test ! -e "$HOME"/.config/Code/User/settings.json; then From c1f06d8cacdb8b0abec24e6132a2d976f92a08bd Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:22:26 -0400 Subject: [PATCH 58/58] chore: more cleanup --- README.md | 1 - build_files/shared/image-info.sh | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8beee7a13fe..bcf45fe2084 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ sudo mokutil --import secure_boot.der If you encounter an issue with a password being recognized as incorrect, try using the `-` key on the numpad instead. - ## Repobeats ![Alt](https://repobeats.axiom.co/api/embed/40b85b252bf6ea25eb90539d1adcea013ccae69a.svg "Repobeats analytics image") diff --git a/build_files/shared/image-info.sh b/build_files/shared/image-info.sh index 7c5ee9d7dac..b028bbf8dc7 100755 --- a/build_files/shared/image-info.sh +++ b/build_files/shared/image-info.sh @@ -17,12 +17,13 @@ case $FEDORA_MAJOR_VERSION in ;; esac +#shellcheck disable=SC2153 image_flavor="${IMAGE_FLAVOR}" fedora_version="${FEDORA_MAJOR_VERSION}" if [[ -n "${COREOS_TYPE:-}" ]]; then - fedora_version="coreos" - IMAGE_TAG="coreos" + fedora_version="stable" + IMAGE_TAG="stable" fi if [[ "${COREOS_TYPE}" == "nvidia" ]]; then