diff --git a/.github/workflows/build-coreos-aurora.yml b/.github/workflows/build-coreos-aurora.yml new file mode 100644 index 00000000000..a410b860b24 --- /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: stable diff --git a/.github/workflows/build-coreos-bluefin.yml b/.github/workflows/build-coreos-bluefin.yml index d3ac1d658a0..1ca44a7cc36 100644 --- a/.github/workflows/build-coreos-bluefin.yml +++ b/.github/workflows/build-coreos-bluefin.yml @@ -1,12 +1,21 @@ -name: bluefin CoreOS Kernel +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: @@ -16,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 4af27b7f370..4e75dd4b19b 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -48,6 +48,14 @@ jobs: image_flavor: asus - fedora_version: 39 image_flavor: asus-nvidia + - fedora_version: stable + image_flavor: asus + - fedora_version: stable + image_flavor: asus-nvidia + - fedora_version: stable + image_flavor: surface + - fedora_version: stable + image_flavor: surface-nvidia steps: - name: Checkout @@ -55,34 +63,77 @@ 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.fedora_version }}" =~ "stable" ]]; then + echo "AKMODS_FLAVOR=coreos" >> $GITHUB_ENV else echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV fi + # Env for matrix.image_flavor + if [[ "${{ matrix.image_flavor }}" == "nvidia" ]] && \ + [[ "${{ 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 }}" =~ "stable" ]]; 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 }} == "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 + 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}}-${{ matrix.image_flavor }}:${{ matrix.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' @@ -94,6 +145,7 @@ jobs: registry: cgr.dev/chainguard - name: Maximize build space + 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 @@ -107,18 +159,26 @@ jobs: TIMESTAMP="$(date +%Y%m%d)" FEDORA_VERSION="${{ matrix.fedora_version }}" - if [[ "${{ matrix.fedora_version }}" -eq "39" ]]; then + if [[ "${{ matrix.fedora_version }}" == "stable" ]]; 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 + IS_COREOS=false fi COMMIT_TAGS=() @@ -137,22 +197,28 @@ jobs: BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") if [[ ${{ github.ref_name }} == "testing" ]]; then - BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") - if [[ "$IS_LATEST_VERSION" == "true" ]] && \ + 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 + elif [[ "$IS_COREOS" == "true" ]]; then + echo "DEFAULT_TAG=stable-testing" >> $GITHUB_ENV + fi + else + 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 - elif [[ "$IS_LATEST_VERSION" == "true" ]] && \ - [[ "$IS_STABLE_VERSION" == "true" ]]; then - BUILD_TAGS+=("latest") - echo "DEFAULT_TAG=latest" >> $GITHUB_ENV - elif [[ "$IS_GTS_VERSION" == "true" ]]; then - BUILD_TAGS+=("gts") - echo "DEFAULT_TAG=gts" >> $GITHUB_ENV + BUILD_TAGS+=("latest") + echo "DEFAULT_TAG=latest" >> $GITHUB_ENV + 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 if [[ "${{ github.event_name }}" == "pull_request" ]]; then @@ -171,18 +237,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-${{ matrix.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 - # Build metadata - name: Image Metadata uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5 @@ -193,13 +247,15 @@ 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 + 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 # 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: | @@ -210,11 +266,13 @@ 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 }} + FEDORA_MAJOR_VERSION=${{ steps.labels.outputs.fedora_version }} TARGET_BASE=${{ matrix.target_base }} AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} + COREOS_TYPE=${{ env.coreos_type }} + KERNEL=${{ steps.labels.outputs.kernel_release }} labels: ${{ steps.meta.outputs.labels }} oci: false # TODO(GH-280) @@ -285,7 +343,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 }} run: echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" @@ -294,11 +352,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 }} + name: image-${{ env.IMAGE_NAME }}-${{ env.image_flavor }}-${{ matrix.fedora_version }} retention-days: 1 if-no-files-found: error path: | - ${{ env.IMAGE_NAME }}-${{ matrix.image_flavor }}-${{ matrix.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 @@ -351,14 +409,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 }} diff --git a/Containerfile b/Containerfile index 234d55adb3e..933770c9c70 100644 --- a/Containerfile +++ b/Containerfile @@ -5,11 +5,18 @@ 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_TYPE="${COREOS_TYPE:-}" +ARG KERNEL="${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 -FROM ghcr.io/ublue-os/bluefin-cli@sha256:09f092c19e7c1e6c965e88f17005c20c5298eeece3f644e259616adddb99462c as bluefin-cli +# # 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 @@ -20,6 +27,8 @@ 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_TYPE="${COREOS_TYPE:-}" +ARG KERNEL="${KERNEL:-}" # COPY Build Files COPY build_files/base build_files/shared /tmp/build/ @@ -29,19 +38,21 @@ COPY packages.json /tmp/packages.json # Copy ublue-update.toml to tmp first, to avoid being overwritten. COPY /system_files/shared/usr/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml -# Copy Bluefin CLI packages -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_nvidia /rpms /tmp/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 @@ -52,19 +63,24 @@ 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_TYPE="${COREOS_TYPE:-}" +ARG 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 -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/README.md b/README.md index 813b614ea6d..bcf45fe2084 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,9 +54,9 @@ sudo mokutil --timeout -1 sudo mokutil --import secure_boot.der ``` -### Note: -If you encounter an issue with a password being recognized as incorrect, try using the `-` key on the numpad instead. +#### Note +If you encounter an issue with a password being recognized as incorrect, try using the `-` key on the numpad instead. ## Repobeats 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/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 diff --git a/build_files/base/coreos_kernel.sh b/build_files/base/coreos_kernel.sh new file mode 100644 index 00000000000..2f11bf870fd --- /dev/null +++ b/build_files/base/coreos_kernel.sh @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +set -eoux pipefail + +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" +fi diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 7fda38929f4..dbfd3ab1ce4 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -2,8 +2,8 @@ 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 +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 \ @@ -11,9 +11,28 @@ if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then /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 sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo + +if [[ "${COREOS_TYPE}" == "nvidia" ]]; then + 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 + +# 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/base/nvidia.sh b/build_files/base/nvidia.sh index d04112cb12e..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" ]]; 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 diff --git a/build_files/shared/image-info.sh b/build_files/shared/image-info.sh index a67df222738..b028bbf8dc7 100755 --- a/build_files/shared/image-info.sh +++ b/build_files/shared/image-info.sh @@ -17,15 +17,28 @@ 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="stable" + IMAGE_TAG="stable" +fi + +if [[ "${COREOS_TYPE}" == "nvidia" ]]; then + image_flavor="nvidia" +fi + cat > $IMAGE_INFO <