diff --git a/.github/workflows/build-39-aurora.yml b/.github/workflows/build-39-aurora.yml deleted file mode 100644 index 9f66952002a..00000000000 --- a/.github/workflows/build-39-aurora.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Aurora 39 -on: - pull_request: - branches: - - main - - testing - paths-ignore: - - '**.md' - - 'system_files/silverblue/**' - schedule: - - cron: '41 5 * * 0' # 5:41 UTC Weekly on Sunday - workflow_dispatch: - -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: aurora - fedora_version: 39 diff --git a/.github/workflows/build-aurora-iso.yml b/.github/workflows/build-aurora-latest-iso.yml similarity index 57% rename from .github/workflows/build-aurora-iso.yml rename to .github/workflows/build-aurora-latest-iso.yml index 379b10c98ba..f3309c45188 100644 --- a/.github/workflows/build-aurora-iso.yml +++ b/.github/workflows/build-aurora-latest-iso.yml @@ -1,13 +1,13 @@ -name: Aurora ISO +name: Aurora Latest ISO on: workflow_dispatch: schedule: - - cron: '0 2 * * sun' # 02:00 Sunday + - cron: '0 4 * * sun' # 04:00 Sunday jobs: build-40: - name: Aurora 40 + name: Aurora Latest ISO uses: ./.github/workflows/reusable-build-iso.yml secrets: inherit with: brand_name: aurora - fedora_version: 40 + fedora_version: latest diff --git a/.github/workflows/build-aurora-stable-iso.yml b/.github/workflows/build-aurora-stable-iso.yml new file mode 100644 index 00000000000..628cae6c644 --- /dev/null +++ b/.github/workflows/build-aurora-stable-iso.yml @@ -0,0 +1,12 @@ +name: Aurora Stable ISO +on: + workflow_dispatch: + +jobs: + build: + name: Aurora Stable + uses: ./.github/workflows/reusable-build-iso.yml + secrets: inherit + with: + brand_name: aurora + fedora_version: stable \ No newline at end of file diff --git a/.github/workflows/build-beta-aurora.yml b/.github/workflows/build-beta-aurora.yml new file mode 100644 index 00000000000..84d6a68d7aa --- /dev/null +++ b/.github/workflows/build-beta-aurora.yml @@ -0,0 +1,28 @@ +name: Aurora Beta +on: + # merge_group: + # pull_request: + # branches: + # - main + # - testing + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # push: + # branches: + # - main + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # schedule: + # - cron: "40 4 * * *" # 4:40 UTC everyday + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: aurora + fedora_version: beta diff --git a/.github/workflows/build-beta-bluefin.yml b/.github/workflows/build-beta-bluefin.yml new file mode 100644 index 00000000000..9e20f414a7b --- /dev/null +++ b/.github/workflows/build-beta-bluefin.yml @@ -0,0 +1,28 @@ +name: Bluefin Beta +on: + # merge_group: + # pull_request: + # branches: + # - main + # - testing + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # push: + # branches: + # - main + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # schedule: + # - cron: "40 4 * * *" # 4:40 UTC everyday + workflow_dispatch: + +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: beta diff --git a/.github/workflows/build-bluefin-gts-iso.yml b/.github/workflows/build-bluefin-gts-iso.yml index 974ae0c2c09..62f4478bfec 100644 --- a/.github/workflows/build-bluefin-gts-iso.yml +++ b/.github/workflows/build-bluefin-gts-iso.yml @@ -1,9 +1,8 @@ name: Bluefin GTS ISO on: workflow_dispatch: - schedule: - - cron: '0 2 * * sun' # 02:00 Sunday - + # schedule: + # - cron: '0 2 * * sun' # 02:00 Sunday jobs: build-gts: @@ -12,4 +11,4 @@ jobs: secrets: inherit with: brand_name: bluefin - fedora_version: 39 + fedora_version: gts diff --git a/.github/workflows/build-bluefin-latest-iso.yml b/.github/workflows/build-bluefin-latest-iso.yml index 2cd7874be95..602e96257e9 100644 --- a/.github/workflows/build-bluefin-latest-iso.yml +++ b/.github/workflows/build-bluefin-latest-iso.yml @@ -2,7 +2,7 @@ name: Bluefin Latest ISO on: workflow_dispatch: schedule: - - cron: '0 3 * * sun' # 03:00 Sunday + - cron: '0 4 * * sun' # 04:00 Sunday jobs: diff --git a/.github/workflows/build-bluefin-stable-iso.yml b/.github/workflows/build-bluefin-stable-iso.yml index 1a36d00e271..5de9f605e24 100644 --- a/.github/workflows/build-bluefin-stable-iso.yml +++ b/.github/workflows/build-bluefin-stable-iso.yml @@ -1,8 +1,8 @@ -name: Bluefin Stable ISO Build +name: Bluefin Stable ISO on: workflow_dispatch: - schedule: - - cron: '41 6 * * 2' # 6:41 UTC every Tuesday + # schedule: + # - cron: '41 6 * * 2' # 6:41 UTC every Tuesday jobs: diff --git a/.github/workflows/build-39-bluefin.yml b/.github/workflows/build-gts-bluefin.yml similarity index 89% rename from .github/workflows/build-39-bluefin.yml rename to .github/workflows/build-gts-bluefin.yml index 8147bcd0a9e..053055a02df 100644 --- a/.github/workflows/build-39-bluefin.yml +++ b/.github/workflows/build-gts-bluefin.yml @@ -1,4 +1,4 @@ -name: Bluefin 39 +name: Bluefin GTS on: pull_request: branches: @@ -18,4 +18,4 @@ jobs: secrets: inherit with: brand_name: bluefin - fedora_version: 39 + fedora_version: gts diff --git a/.github/workflows/build-40-aurora.yml b/.github/workflows/build-latest-aurora.yml similarity index 90% rename from .github/workflows/build-40-aurora.yml rename to .github/workflows/build-latest-aurora.yml index 4db70f405c9..643c9f83dd9 100644 --- a/.github/workflows/build-40-aurora.yml +++ b/.github/workflows/build-latest-aurora.yml @@ -1,4 +1,4 @@ -name: Aurora 40 +name: Aurora Latest on: merge_group: pull_request: @@ -25,4 +25,4 @@ jobs: secrets: inherit with: brand_name: aurora - fedora_version: 40 + fedora_version: latest diff --git a/.github/workflows/build-40-bluefin.yml b/.github/workflows/build-latest-bluefin.yml similarity index 90% rename from .github/workflows/build-40-bluefin.yml rename to .github/workflows/build-latest-bluefin.yml index be0c2fb9a80..9ef35430ad6 100644 --- a/.github/workflows/build-40-bluefin.yml +++ b/.github/workflows/build-latest-bluefin.yml @@ -1,4 +1,4 @@ -name: Bluefin 40 +name: Bluefin Latest on: merge_group: pull_request: @@ -25,4 +25,4 @@ jobs: secrets: inherit with: brand_name: bluefin - fedora_version: 40 + fedora_version: latest diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index bc9d510365d..039d6e8745c 100644 --- a/.github/workflows/reusable-build-iso.yml +++ b/.github/workflows/reusable-build-iso.yml @@ -1,4 +1,4 @@ -name: Reusable ISO +name: Reusable ISO on: workflow_call: inputs: @@ -7,7 +7,7 @@ on: required: true type: string fedora_version: - description: 'The Fedora release version: 38, 39, 40, etc' + description: "The Fedora release version: 38, 39, 40, etc" required: true type: string @@ -38,13 +38,17 @@ jobs: fedora_version: - ${{ inputs.fedora_version }} exclude: - - fedora_version: 38 + - fedora_version: gts image_flavor: asus - - fedora_version: 38 + - fedora_version: gts image_flavor: asus-nvidia - - fedora_version: 38 + - fedora_version: stable + image_flavor: asus + - fedora_version: stable + image_flavor: asus-nvidia + - fedora_version: stable image_flavor: surface - - fedora_version: 38 + - fedora_version: stable image_flavor: surface-nvidia steps: @@ -66,26 +70,29 @@ jobs: elif [[ ${{ inputs.brand_name }} == "aurora" ]]; then echo "VARIANT=Kinoite" >> $GITHUB_ENV fi - if [[ ${{ inputs.fedora_version }} == "39" ]]; then - echo "IS_GTS_VERSION=true" >> $GITHUB_ENV - elif [[ ${{ inputs.fedora_version }} == "40" ]]; then - echo "IS_LATEST_VERSION=true" >> $GITHUB_ENV - fi + + - name: Get Current Fedora Version + id: labels + shell: bash + run: | + set -eo pipefail + kernel_release=$(skopeo inspect docker://ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ inputs.fedora_version }} | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + fedora_version=$(echo $kernel_release | grep -oP 'fc\K[0-9]+') + echo "kernel_release=$kernel_release" >> $GITHUB_OUTPUT + echo "fedora_version=$fedora_version" >> $GITHUB_OUTPUT - name: Set Image Tag id: generate-tag shell: bash run: | - if [[ "${{ env.IS_LATEST_VERSION }}" == "true" ]]; then - TAG="latest" - elif [[ "${{ env.IS_GTS_VERSION }}" == "true" ]]; then - TAG="gts" - fi + TAG="${{ inputs.fedora_version }}" if [[ "${{ github.ref_name }}" == "testing" ]]; then - if [[ "${{ env.IS_GTS_VERSION }}" == "true" ]]; then + if [[ "${{ inputs.fedora_version }}" == "true" ]]; then TAG="gts-testing" - elif [[ "${{ env.IS_LATEST_VERSION }}" == "true" ]]; then + elif [[ "${{ inputs.fedora_version }}" == "true" ]]; then + TAG="stable-testing" + elif [[ "${{ inputs.fedora_version }}" == "true" ]]; then TAG="testing" fi fi @@ -113,7 +120,7 @@ jobs: shell: bash run: | set -ex - image="ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ steps.generate-tag.outputs.tag }}" + image="ghcr.io/ublue-os/${{ env.IMAGE_NAME }}:${{ inputs.fedora_version }}" # Make temp space TEMP_FLATPAK_INSTALL_DIR=$(mktemp -d -p ${{ github.workspace }} flatpak.XXX) # Get list of refs from directory @@ -147,10 +154,10 @@ jobs: image_name: ${{ env.IMAGE_NAME }} image_repo: ghcr.io/ublue-os variant: ${{ env.VARIANT }} - version: ${{ matrix.fedora_version }} + version: ${{ steps.labels.outputs.fedora_version }} image_tag: ${{ steps.generate-tag.outputs.tag }} - secure_boot_key_url: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' - enrollment_password: 'ublue-os' + secure_boot_key_url: "https://github.com/ublue-os/akmods/raw/main/certs/public_key.der" + enrollment_password: "ublue-os" iso_name: ${{ env.IMAGE_NAME }}-${{ steps.generate-tag.outputs.tag }}.iso enable_cache_dnf: "false" enable_cache_skopeo: "false" diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index f36770a834b..1722699baa0 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -3,7 +3,7 @@ on: workflow_call: inputs: fedora_version: - description: 'The Fedora release version: 38, 39, 40, etc' + description: "The Fedora Version: gts, stable, or latest" required: true type: string brand_name: @@ -12,10 +12,10 @@ on: type: string outputs: images: - description: 'An array of images built and pushed to the registry' + description: "An array of images built and pushed to the registry" value: ${{ jobs.check.outputs.images }} env: - IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.fedora_version }} @@ -44,9 +44,9 @@ jobs: fedora_version: - ${{ inputs.fedora_version }} exclude: - - fedora_version: 39 + - fedora_version: gts image_flavor: asus - - fedora_version: 39 + - fedora_version: gts image_flavor: asus-nvidia - fedora_version: stable image_flavor: asus @@ -56,6 +56,14 @@ jobs: image_flavor: surface - fedora_version: stable image_flavor: surface-nvidia + - fedora_version: beta + image_flavor: asus + - fedora_version: beta + image_flavor: asus-nvidia + - fedora_version: beta + image_flavor: surface + - fedora_version: beta + image_flavor: surface-nvidia steps: - name: Checkout @@ -90,7 +98,8 @@ jobs: elif [[ "${{ matrix.image_flavor }}" =~ "surface" ]]; then echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV echo "KERNEL_SUFFIX=surface" >> $GITHUB_ENV - elif [[ "${{ matrix.fedora_version }}" =~ "stable" ]]; then + elif [[ "${{ matrix.fedora_version }}" == "stable" || \ + "${{ matrix.fedora_version }}" == "gts" ]]; then echo "AKMODS_FLAVOR=coreos" >> $GITHUB_ENV else echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV @@ -98,11 +107,13 @@ jobs: # 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 + [[ "${{ matrix.fedora_version }}" == "stable" || \ + "${{ matrix.fedora_version }}" == "gts" ]]; then + echo "image_flavor=main" >> $GITHUB_ENV + echo "coreos_type=nvidia" >> $GITHUB_ENV elif [[ "${{ matrix.image_flavor }}" == "main" ]] && \ - [[ "${{ matrix.fedora_version }}" =~ "stable" ]]; then + [[ "${{ matrix.fedora_version }}" == "stable" || \ + "${{ matrix.fedora_version }}" == "gts" ]]; then echo "image_flavor=${{ matrix.image_flavor }}" >> $GITHUB_ENV echo "coreos_type=main" >> $GITHUB_ENV else @@ -116,14 +127,18 @@ jobs: 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]+') + elif [[ ${{ matrix.fedora_version }} == "gts" ]]; then + coreos_kernel_release=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]') + major_minor_patch=$(echo "$coreos_kernel_release" | cut -d '-' -f 1) + coreos_fedora_version=$(echo $coreos_kernel_release | grep -oP 'fc\K[0-9]+') + KERNEL_RELEASE="${major_minor_patch}-200.fc$(($coreos_fedora_version - 1))" 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 + ver=$(skopeo inspect docker://ghcr.io/ublue-os/${{ env.BASE_IMAGE_NAME }}-${{ env.image_flavor }}:$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 @@ -164,17 +179,17 @@ jobs: IS_STABLE_VERSION=true IS_GTS_VERSION=false IS_COREOS=true - elif [[ "${{ matrix.fedora_version }}" -eq "39" ]]; then + elif [[ "${{ matrix.fedora_version }}" == "gts" ]]; then IS_LATEST_VERSION=false IS_STABLE_VERSION=true IS_GTS_VERSION=true IS_COREOS=false - elif [[ "${{ matrix.fedora_version }}" -eq "40" ]]; then + elif [[ "${{ matrix.fedora_version }}" == "latest" ]]; then IS_LATEST_VERSION=true IS_STABLE_VERSION=true IS_GTS_VERSION=false IS_COREOS=false - elif [[ "${{ matrix.fedora_version }}" -eq "41" ]]; then + elif [[ "${{ matrix.fedora_version }}" == "beta" ]]; then IS_LATEST_VERSION=false IS_STABLE_VERSION=false IS_GTS_VERSION=false @@ -194,10 +209,18 @@ jobs: COMMIT_TAGS+=("${SHA_SHORT}") fi - BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") + if [[ ${{ matrix.fedora_version }} == "stable" ]]; then + BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}") + else + BUILD_TAGS=("${{ steps.labels.outputs.fedora_version }}" "${{ steps.labels.outputs.fedora_version }}-${TIMESTAMP}") + fi if [[ ${{ github.ref_name }} == "testing" ]]; then - BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") + if [[ ${{ matrix.fedora_version }} == "stable" ]]; then + BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}") + else + BUILD_TAGS=("${{ steps.labels.outputs.fedora_version }}-testing" "${{ steps.labels.outputs.fedora_version }}-testing-${TIMESTAMP}") + fi if [[ "$IS_LATEST_VERSION" == "true" ]] && \ [[ "$IS_STABLE_VERSION" == "true" ]]; then BUILD_TAGS+=("testing") @@ -248,7 +271,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 }} + ostree.linux=${{ steps.labels.outputs.kernel_release }}.x86_64 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 @@ -273,6 +296,7 @@ jobs: AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} COREOS_TYPE=${{ env.coreos_type }} KERNEL=${{ steps.labels.outputs.kernel_release }} + UBLUE_IMAGE_TAG=${{ matrix.fedora_version }} labels: ${{ steps.meta.outputs.labels }} oci: false # TODO(GH-280) @@ -345,8 +369,7 @@ jobs: IMAGE_NAME: ${{ env.IMAGE_NAME }} IMAGE_FLAVOR: ${{ env.image_flavor }} FEDORA_VERSION: ${{ matrix.fedora_version }} - run: - echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" + run: echo "${IMAGE_REGISTRY}@${DIGEST}" > "${IMAGE_NAME}-${IMAGE_FLAVOR}-${FEDORA_VERSION}.txt" - name: Upload artifact if: github.event_name != 'pull_request' @@ -412,7 +435,7 @@ jobs: build_iso: name: iso needs: [check] - if: github.event_name == 'schedule' && github.ref_name == 'main' && ( inputs.brand_name == 'bluefin' && inputs.fedora_version == '39' ) + if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && (github.ref_name == 'main' || github.ref_name == 'testing') && inputs.fedora_version != 'beta' && inputs.fedora_version != 'latest' # Eventually would be nice for building images in PRs #if: ${{ endsWith(github.event.pull_request.title, '[ISO]') }} uses: ./.github/workflows/reusable-build-iso.yml diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 72791eeb6d6..d0c6bca0a1f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -96,12 +96,12 @@ "description": "Choose which container to build", "default": "bluefin", "options": [ - "bluefin", - "bluefin-dx", - "bluefin latest", - "bluefin-dx latest", - "aurora", - "aurora-dx" + "bluefin gts", + "bluefin-dx gts", + "bluefin stable", + "bluefin-dx stable", + "aurora stable", + "aurora-dx stable" ] } ] diff --git a/Containerfile b/Containerfile index 933770c9c70..86feb4fedfb 100644 --- a/Containerfile +++ b/Containerfile @@ -7,15 +7,13 @@ ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}" ARG TARGET_BASE="${TARGET_BASE:-bluefin}" ARG COREOS_TYPE="${COREOS_TYPE:-}" ARG KERNEL="${KERNEL:-}" +ARG UBLUE_IMAGE_TAG="${UBLUE_IMAGE_TAG:-latest}" # 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 @@ -29,6 +27,7 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG COREOS_TYPE="${COREOS_TYPE:-}" ARG KERNEL="${KERNEL:-}" +ARG UBLUE_IMAGE_TAG="${UBLUE_IMAGE_TAG:-latest}" # COPY Build Files COPY build_files/base build_files/shared /tmp/build/ @@ -41,7 +40,6 @@ 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 # Build, cleanup, commit. RUN rpm-ostree cliwrap install-to-root / && \ @@ -65,6 +63,7 @@ ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG COREOS_TYPE="${COREOS_TYPE:-}" ARG KERNEL="${KERNEL:-}" +ARG UBLUE_IMAGE_TAG="${UBLUE_IMAGE_TAG:-latest}" # dx specific files come from the dx directory in this repo COPY build_files/dx build_files/shared /tmp/build/ diff --git a/Justfile b/Justfile index 9d4e92f7bd6..de88d174925 100644 --- a/Justfile +++ b/Justfile @@ -1,7 +1,5 @@ export project_root := `git rev-parse --show-toplevel` export git_branch := ` git branch --show-current` -export gts := "39" -export latest := "40" alias run := run-container @@ -28,7 +26,6 @@ just-check: just --unstable --fmt --check -f ${project_root}/Justfile # Fix Just Syntax -[private] just-fix: #!/usr/bin/bash find "${project_root}" -type f -name "*.just" | while read -r file; do @@ -91,7 +88,6 @@ help: echo "Or in a more stripped down version with 'just run' " echo "Specify which image you wish to build and run by name. " echo "Example: 'just run-container aurora' -> runs aurora without systemd " - echo "Example: 'just run bluefin-dx' -> runs bluefin-dx with systemd " echo " " echo "Helper scripts are in 'project_root/scripts'. " echo " " @@ -101,38 +97,26 @@ help: echo " " just --list -# Build Bluefin -bluefin: (build "bluefin" "base" "{{gts}}") +# Build Bluefin GTS +bluefin: (build "bluefin" "base" "gts") -# Build Bluefin-DX -bluefin-dx: (build "bluefin" "dx" "{{gts}}") +# Build Bluefin-DX GTS +bluefin-dx: (build "bluefin" "dx" "gts") -# Build Bluefin Latest -bluefin-latest: (build "bluefin" "base" "{{latest}}") +# Build Bluefin GTS ISO +bluefin-iso: (build-iso "bluefin" "base" "gts") -# Build Bluefin-DX Latest -bluefin-dx-latest: (build "bluefin" "dx" "{{latest}}") +# Build Bluefin-DX GTS ISO +bluefin-dx-iso: (build-iso "bluefin" "dx" "gts") # Build Aurora -aurora: (build "aurora" "base" "{{latest}}") +aurora: (build "aurora" "base" "stable") # Builed Aurora-DX -aurora-dx: (build "aurora" "dx" "{{latest}}") - -# Build Bluefin-ISO -bluefin-iso: (build-iso "bluefin" "base" "{{gts}}") - -# Build Bluefin-DX-ISO -bluefin-dx-iso: (build-iso "bluefin" "dx" "{{gts}}") - -# Build Bluefin Latest-ISO -bluefin-latest-iso: (build-iso "bluefin" "base" "{{latest}}") - -# Build Bluefin-DX Latest-ISO -bluefin-dx-latest-iso: (build-iso "bluefin" "dx" "{{latest}}") +aurora-dx: (build "aurora" "dx" "stable") -# Build Aurora-ISO -aurora-iso: (build-iso "aurora" "base" "{{latest}}") +# Build Aurora ISO +aurora-iso: (build-iso "aurora" "base" "stable") -# Builed Aurora-DX-ISO -aurora-dx-iso: (build-iso "aurora" "dx" "{{latest}}") +# Builed Aurora-DX ISO +aurora-dx-iso: (build-iso "aurora" "dx" "stable") diff --git a/build_files/base/install-akmods.sh b/build_files/base/install-akmods.sh index 46fd3c757af..90a0f785ae7 100755 --- a/build_files/base/install-akmods.sh +++ b/build_files/base/install-akmods.sh @@ -7,6 +7,7 @@ if [[ -n "${COREOS_TYPE:-}" ]]; then https://raw.githubusercontent.com/coreos/fedora-coreos-config/testing-devel/fedora-coreos-pool.repo fi +# Nvidia for gts/stable - nvidia 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 && \ @@ -16,18 +17,28 @@ fi 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 + +# Everyone +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 + +# All but Asus 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 +# ZFS for gts/stable +if [[ -n "${COREOS_TYPE:-}" ]]; then + rpm-ostree install /tmp/akmods-rpms/kmods/zfs/*.rpm \ + pv + depmod -a -v "${KERNEL}".x86_64 + echo "zfs" > /usr/lib/modules-load.d/zfs.conf +fi diff --git a/build_files/shared/image-info.sh b/build_files/shared/image-info.sh index b028bbf8dc7..d376770a4db 100755 --- a/build_files/shared/image-info.sh +++ b/build_files/shared/image-info.sh @@ -5,26 +5,8 @@ set -ouex pipefail IMAGE_INFO="/usr/share/ublue-os/image-info.json" IMAGE_REF="ostree-image-signed:docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME" -case $FEDORA_MAJOR_VERSION in - 39) - IMAGE_TAG="gts" - ;; - 40) - IMAGE_TAG="latest" - ;; - *) - IMAGE_TAG="$FEDORA_MAJOR_VERSION" - ;; -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" @@ -36,9 +18,9 @@ cat > $IMAGE_INFO <> "${XDG_CONFIG_HOME:-$HOME/.config}/fish/config.fish" ### bling.fish source start -source /usr/share/ublue-os/bluefin-cli/bling.fish +test -f /usr/share/ublue-os/bluefin-cli/bling.fish && 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 +test -f /usr/share/ublue-os/bluefin-cli/bling.sh && 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 +test -f /usr/share/ublue-os/bluefin-cli/bling.sh && source /usr/share/ublue-os/bluefin-cli/bling.sh ### bling.sh source end EOF else 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 index c813e3c617c..a9fa7d47f62 100644 --- a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.fish +++ b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.fish @@ -1,18 +1,22 @@ # ls aliases -alias ll='eza -l --icons=auto --group-directories-first' -alias l.='eza -d .*' -alias ls='eza' -alias l1='eza -1' +if [ "$(command -v eza)" ] + alias ll='eza -l --icons=auto --group-directories-first' + alias l.='eza -d .*' + alias ls='eza' + alias l1='eza -1' +end # 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 [ "$(command -v ug)" ] + alias grep='ug' + alias egrep='ug -E' + alias fgrep='ug -F' + alias xzgrep='ug -z' + alias xzegrep='ug -zE' + alias xzfgrep='ug -zF' +end if status is-interactive - eval "$(atuin init fish)" - eval "$(zoxide init fish)" + [ "$(command -v atuin)" ] && eval "$(atuin init fish)" + [ "$(command -v zoxide)" ] && 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 index 5f9fe4bcc8b..1fe7719dd95 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 @@ -1,25 +1,29 @@ #!/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' +if [ "$(command -v eza)" ]; then + alias ll='eza -l --icons=auto --group-directories-first' + alias l.='eza -d .*' + alias ls='eza' + alias l1='eza -1' +fi # 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 [ "$(command -v ug)" ]; then + alias grep='ug' + alias egrep='ug -E' + alias fgrep='ug -F' + alias xzgrep='ug -z' + alias xzegrep='ug -zE' + alias xzfgrep='ug -zF' +fi if [ "$(basename "$SHELL")" = "bash" ]; then #shellcheck disable=SC1091 . /usr/share/bash-prexec - eval "$(atuin init bash)" - eval "$(zoxide init bash)" + [ "$(command -v atuin)" ] && eval "$(atuin init bash)" + [ "$(command -v zoxide)" ] && eval "$(zoxide init bash)" elif [ "$(basename "$SHELL")" = "zsh" ]; then - eval "$(atuin init zsh)" - eval "$(zoxide init zsh)" + [ "$(command -v atuin)" ] && eval "$(atuin init zsh)" + [ "$(command -v zoxide)" ] && eval "$(zoxide init zsh)" fi