From 72337c301becdc175df551ffdd22f748fb6fb417 Mon Sep 17 00:00:00 2001 From: inffy <10782843+inffy@users.noreply.github.com> Date: Mon, 19 May 2025 10:39:33 +0300 Subject: [PATCH] feat: Create livecd with anaconda webui (#482) * add aurora copr for anaconda live stuff * fix(iso): Handle platform differences * feat(iso): Live ISO using anaconda as the installer * fix(iso): anaconda artifact name (#2539) * fix: improve the live anaconda hook Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * add a pull request run if the configure script changes Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * set a funny name Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * fixups * fixup! set a funny name Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * reorder Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * make our own profiles Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * desktop icon, don't constantly rebuild images Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * figure out how to get libblockdev-btrfs on lts Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> * fix: remove gts workflow * add flatpaks for ISO * small fixes * remove the unneeded LTS workflow * don't hide the parts of the installer * few small fixes * remove google fonts from live iso * remove motd and brew from iso * un-break building * add -live notion to ISOs * ignore image builds --------- Signed-off-by: m2 <69128853+m2Giles@users.noreply.github.com> Co-authored-by: m2 <69128853+m2Giles@users.noreply.github.com> Co-authored-by: Niklas <40402114+NiHaiden@users.noreply.github.com> --- .github/workflows/build-image-latest-hwe.yml | 4 + .github/workflows/build-image-latest-main.yml | 5 +- .github/workflows/build-image-stable.yml | 4 + .github/workflows/generate-release.yml | 5 +- .../workflows/reusable-build-iso-anaconda.yml | 123 ++++++++++++++ .github/workflows/reusable-build-iso.yml | 21 ++- .github/workflows/reusable-build.yml | 27 ++- Justfile | 87 +++++----- iso_files/aurora.repo | 10 ++ iso_files/configure_iso_anaconda.sh | 156 ++++++++++++++++++ iso_files/system-flatpaks-dx.list | 4 + iso_files/system-flatpaks.list | 22 +++ 12 files changed, 400 insertions(+), 68 deletions(-) create mode 100644 .github/workflows/reusable-build-iso-anaconda.yml create mode 100644 iso_files/aurora.repo create mode 100644 iso_files/configure_iso_anaconda.sh create mode 100644 iso_files/system-flatpaks-dx.list create mode 100644 iso_files/system-flatpaks.list diff --git a/.github/workflows/build-image-latest-hwe.yml b/.github/workflows/build-image-latest-hwe.yml index 1336730d..13cf95e0 100644 --- a/.github/workflows/build-image-latest-hwe.yml +++ b/.github/workflows/build-image-latest-hwe.yml @@ -7,6 +7,10 @@ on: - testing paths-ignore: - "**.md" + - "iso_files/**" + - "aurora_flatpaks/**" + - "dx_flatpaks/**" + - ".github/workflows/*iso*" workflow_call: workflow_dispatch: diff --git a/.github/workflows/build-image-latest-main.yml b/.github/workflows/build-image-latest-main.yml index 92b9e76b..8c6d72f4 100644 --- a/.github/workflows/build-image-latest-main.yml +++ b/.github/workflows/build-image-latest-main.yml @@ -7,6 +7,10 @@ on: - testing paths-ignore: - "**.md" + - "iso_files/**" + - "aurora_flatpaks/**" + - "dx_flatpaks/**" + - ".github/workflows/*iso*" workflow_call: workflow_dispatch: @@ -32,4 +36,3 @@ jobs: uses: ./.github/workflows/generate-release.yml with: stream_name: '["latest"]' - diff --git a/.github/workflows/build-image-stable.yml b/.github/workflows/build-image-stable.yml index 0ee9605c..aa7f74f8 100644 --- a/.github/workflows/build-image-stable.yml +++ b/.github/workflows/build-image-stable.yml @@ -7,6 +7,10 @@ on: - testing paths-ignore: - "**.md" + - "iso_files/**" + - "aurora_flatpaks/**" + - "dx_flatpaks/**" + - ".github/workflows/*iso*" schedule: - cron: "50 5 * * 0" # 5:50 UTC sunday workflow_call: diff --git a/.github/workflows/generate-release.yml b/.github/workflows/generate-release.yml index 5667db17..ba145b2d 100644 --- a/.github/workflows/generate-release.yml +++ b/.github/workflows/generate-release.yml @@ -34,9 +34,8 @@ jobs: with: fetch-depth: 500 - - name: Install Just - shell: bash - run: bash .github/workflows/shared/install-just.sh + - name: Setup Just + uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 - name: Check Just Syntax shell: bash diff --git a/.github/workflows/reusable-build-iso-anaconda.yml b/.github/workflows/reusable-build-iso-anaconda.yml new file mode 100644 index 00000000..1e2b7493 --- /dev/null +++ b/.github/workflows/reusable-build-iso-anaconda.yml @@ -0,0 +1,123 @@ +--- +name: Build ISOs (Live Anaconda) + +on: + workflow_dispatch: + pull_request: + paths: + - ".github/workflows/reusable-build-iso-anaconda.yml" + - "iso_files/configure_iso_anaconda.sh" + +env: + IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}" + IMAGE_NAME: "aurora" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + build: + name: Build ISOs + runs-on: ${{ matrix.platform == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }} + strategy: + fail-fast: false + matrix: + platform: [amd64] + flavor: ["main", "nvidia-open"] + image_version: ["stable"] + include: + - platform: amd64 + flavor: "main" + image_version: stable + permissions: + contents: read + packages: read + id-token: write + + steps: + - name: Install dependencies + if: matrix.platform == 'arm64' + run: | + set -x + sudo apt update -y + sudo apt install -y \ + podman + + - name: Maximize build space + if: matrix.platform != 'arm64' + uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 + with: + remove-codeql: true + + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Setup Just + uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 + + - name: Check Just Syntax + shell: bash + run: | + just check + + - name: Format image ref + id: image_ref + env: + FLAVOR: ${{ matrix.flavor }} + run: | + set -eoux pipefail + image_name=$(just image_name "aurora" "${{ matrix.image_version}}" "${{ matrix.flavor}}") + image_ref="${IMAGE_REGISTRY}/${image_name}" + KARGS="NONE" + echo "image_ref=$image_ref" >> "${GITHUB_OUTPUT}" + echo "artifact_format="$image_name-${{ matrix.image_version }}-live"" >> "${GITHUB_OUTPUT}" + echo "kargs=$KARGS" >> "${GITHUB_OUTPUT}" + + - name: Build ISO + id: build + uses: ublue-os/titanoboa@main + with: + image-ref: ${{ steps.image_ref.outputs.image_ref }}:${{ matrix.image_version }} + flatpaks-list: ${{ github.workspace }}/iso_files/system-flatpaks.list + hook-post-rootfs: ${{ github.workspace }}/iso_files/configure_iso_anaconda.sh + kargs: ${{ steps.image_ref.outputs.kargs }} + + - name: Rename ISO + id: rename + env: + OUTPUT_PATH: ${{ steps.build.outputs.iso-dest }} + FLAVOR: ${{ matrix.flavor }} + OUTPUT_NAME: ${{ steps.image_ref.outputs.artifact_format }} + IMAGE_VERSION: ${{ matrix.image_version }} + run: | + set -x + mkdir -p output + OUTPUT_DIRECTORY="$(realpath output)" + sha256sum "${OUTPUT_PATH}" | tee "${OUTPUT_DIRECTORY}/${OUTPUT_NAME}.iso-CHECKSUM" + mv "${OUTPUT_PATH}" "${OUTPUT_DIRECTORY}/${OUTPUT_NAME}.iso" + echo "output_directory=$OUTPUT_DIRECTORY" >> "${GITHUB_OUTPUT}" + + - name: Upload to Job Artifacts + if: github.event_name == 'pull_request' || ${{ ! contains(matrix.image_version, 'lts')}} + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: ${{ steps.image_ref.outputs.artifact_format }} + if-no-files-found: error + path: ${{ steps.rename.outputs.output_directory }} + + - name: Upload to CloudFlare + if: contains(matrix.image_version, 'stable') && github.event_name != 'pull_request' + shell: bash + env: + RCLONE_CONFIG_R2_TYPE: s3 + RCLONE_CONFIG_R2_PROVIDER: Cloudflare + RCLONE_CONFIG_R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID_2025 }} + RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY_2025 }} + RCLONE_CONFIG_R2_REGION: auto + RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT_2025 }} + SOURCE_DIR: ${{ steps.rename.outputs.output_directory }} + run: | + sudo apt-get update + sudo apt-get install -y rclone + rclone copy "${SOURCE_DIR}" R2:aurora-dl diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index a1833692..c56de0ad 100644 --- a/.github/workflows/reusable-build-iso.yml +++ b/.github/workflows/reusable-build-iso.yml @@ -33,20 +33,27 @@ jobs: - name: Checkout Repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: Install Just - shell: bash - run: bash .github/workflows/shared/install-just.sh - - - name: Check Just Syntax - shell: bash + - name: Install dependencies + if: matrix.platform == 'arm64' run: | - just check + set -x + sudo apt update -y + sudo apt install -y \ + podman - name: Maximize build space uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 with: remove-codeql: true + - name: Setup Just + uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 + + - name: Check Just Syntax + shell: bash + run: | + just check + - name: Build ISO shell: bash env: diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 2fc4d85f..cba69f25 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -42,9 +42,13 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: Install Just - shell: bash - run: bash .github/workflows/shared/install-just.sh + - name: Maximize build space + uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 + with: + remove-codeql: true + + - name: Setup Just + uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 - name: Check Just Syntax shell: bash @@ -66,20 +70,15 @@ jobs: echo "Default Tag: ${DEFAULT_TAG}" echo "DEFAULT_TAG=${DEFAULT_TAG}" >> $GITHUB_ENV - - name: Maximize build space - uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 - with: - remove-codeql: true - - name: Build Image id: build-image shell: bash run: | - sudo just repo_organization="${{ github.repository_owner }}" \ - build-ghcr "${{ matrix.base_name }}" \ - "${{ matrix.stream_name }}" \ - "${{ matrix.image_flavor }}" \ - "${{ inputs.kernel_pin }}" + sudo $(command -v just) repo_organization="${{ github.repository_owner }}" \ + build-ghcr "${{ matrix.base_name }}" \ + "${{ matrix.stream_name }}" \ + "${{ matrix.image_flavor }}" \ + "${{ inputs.kernel_pin }}" - name: Setup Syft id: setup-syft @@ -107,7 +106,7 @@ jobs: id: rechunk-image shell: bash run: | - sudo just rechunk "${{ matrix.base_name }}" \ + sudo $(command -v just) rechunk "${{ matrix.base_name }}" \ "${{ matrix.stream_name }}" \ "${{ matrix.image_flavor }}" \ "1" diff --git a/Justfile b/Justfile index ff4707cc..3bcccd47 100644 --- a/Justfile +++ b/Justfile @@ -28,10 +28,11 @@ export SUDO_DISPLAY := if `if [ -n "${DISPLAY:-}" ] || [ -n "${WAYLAND_DISPLAY:- export SUDOIF := if `id -u` == "0" { "" } else if SUDO_DISPLAY == "true" { "sudo --askpass" } else { "sudo" } export PODMAN := if path_exists("/usr/bin/podman") == "true" { env("PODMAN", "/usr/bin/podman") } else if path_exists("/usr/bin/docker") == "true" { env("PODMAN", "docker") } else { env("PODMAN", "exit 1 ; ") } export PULL_POLICY := if PODMAN =~ "docker" { "missing" } else { "newer" } +just := just_executable() [private] default: - @just --list + @{{ just }} --list # Check Just Syntax [group('Just')] @@ -39,10 +40,10 @@ check: #!/usr/bin/bash find . -type f -name "*.just" | while read -r file; do echo "Checking syntax: $file" - just --unstable --fmt --check -f $file + {{ just }} --unstable --fmt --check -f $file done echo "Checking syntax: Justfile" - just --unstable --fmt --check -f Justfile + {{ just }} --unstable --fmt --check -f Justfile # Fix Just Syntax [group('Just')] @@ -50,10 +51,10 @@ fix: #!/usr/bin/bash find . -type f -name "*.just" | while read -r file; do echo "Checking syntax: $file" - just --unstable --fmt -f $file + {{ just }} --unstable --fmt -f $file done echo "Checking syntax: Justfile" - just --unstable --fmt -f Justfile || { exit 1; } + {{ just }} --unstable --fmt -f Justfile || { exit 1; } # Clean Repo [group('Utility')] @@ -112,10 +113,10 @@ build $image="aurora" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline set -eoux pipefail # Validate - just validate "${image}" "${tag}" "${flavor}" + {{ just }} validate "${image}" "${tag}" "${flavor}" # Image Name - image_name=$(just image_name {{ image }} {{ tag }} {{ flavor }}) + image_name=$({{ just }} image_name {{ image }} {{ tag }} {{ flavor }}) # Base Image base_image_name="kinoite" @@ -142,10 +143,10 @@ build $image="aurora" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline if [[ {{ ghcr }} == "0" ]]; then rm -f /tmp/manifest.json fi - fedora_version=$(just fedora_version '{{ image }}' '{{ tag }}' '{{ flavor }}' '{{ kernel_pin }}') + fedora_version=$({{ just }} fedora_version '{{ image }}' '{{ tag }}' '{{ flavor }}' '{{ kernel_pin }}') # Verify Base Image with cosign - just verify-container "${base_image_name}-main:${fedora_version}" + {{ just }} verify-container "${base_image_name}-main:${fedora_version}" # Kernel Release/Pin if [[ -z "${kernel_pin:-}" ]]; then @@ -155,14 +156,14 @@ build $image="aurora" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline fi # Verify Containers with Cosign - just verify-container "akmods:${akmods_flavor}-${fedora_version}-${kernel_release}" + {{ just }} verify-container "akmods:${akmods_flavor}-${fedora_version}-${kernel_release}" if [[ "${akmods_flavor}" =~ coreos ]]; then - just verify-container "akmods-zfs:${akmods_flavor}-${fedora_version}-${kernel_release}" + {{ just }} verify-container "akmods-zfs:${akmods_flavor}-${fedora_version}-${kernel_release}" fi if [[ "${flavor}" =~ nvidia-open ]]; then - just verify-container "akmods-nvidia-open:${akmods_flavor}-${fedora_version}-${kernel_release}" + {{ just }} verify-container "akmods-nvidia-open:${akmods_flavor}-${fedora_version}-${kernel_release}" elif [[ "${flavor}" =~ nvidia ]]; then - just verify-container "akmods-nvidia:${akmods_flavor}-${fedora_version}-${kernel_release}" + {{ just }} verify-container "akmods-nvidia:${akmods_flavor}-${fedora_version}-${kernel_release}" fi # Get Version @@ -237,17 +238,17 @@ build $image="aurora" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline # Rechunk if [[ "{{ rechunk }}" == "1" && "{{ ghcr }}" == "1" && "{{ pipeline }}" == "1" ]]; then - just rechunk "${image}" "${tag}" "${flavor}" 1 1 + {{ just }} rechunk "${image}" "${tag}" "${flavor}" 1 1 elif [[ "{{ rechunk }}" == "1" && "{{ ghcr }}" == "1" ]]; then - just rechunk "${image}" "${tag}" "${flavor}" 1 + {{ just }} rechunk "${image}" "${tag}" "${flavor}" 1 elif [[ "{{ rechunk }}" == "1" ]]; then - just rechunk "${image}" "${tag}" "${flavor}" + {{ just }} rechunk "${image}" "${tag}" "${flavor}" fi # Build Image and Rechunk [group('Image')] build-rechunk image="aurora" tag="latest" flavor="main" kernel_pin="": - @just build {{ image }} {{ tag }} {{ flavor }} 1 0 0 {{ kernel_pin }} + @{{ just }} build {{ image }} {{ tag }} {{ flavor }} 1 0 0 {{ kernel_pin }} # Build Image with GHCR Flag [group('Image')] @@ -257,13 +258,13 @@ build-ghcr image="aurora" tag="latest" flavor="main" kernel_pin="": echo "Must Run with sudo or as root..." exit 1 fi - just build {{ image }} {{ tag }} {{ flavor }} 0 1 0 {{ kernel_pin }} + {{ just }} build {{ image }} {{ tag }} {{ flavor }} 0 1 0 {{ kernel_pin }} # Build Image for Pipeline: [group('Image')] build-pipeline image="aurora" tag="latest" flavor="main" kernel_pin="": #!/usr/bin/bash - ${SUDOIF} just build {{ image }} {{ tag }} {{ flavor }} 1 1 1 {{ kernel_pin }} + ${SUDOIF} {{ just }} build {{ image }} {{ tag }} {{ flavor }} 1 1 1 {{ kernel_pin }} # Rechunk Image [group('Image')] @@ -275,15 +276,15 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": set -eoux pipefail # Validate - just validate "${image}" "${tag}" "${flavor}" + {{ just }} validate "${image}" "${tag}" "${flavor}" # Image Name - image_name=$(just image_name {{ image }} {{ tag }} {{ flavor }}) + image_name=$({{ just }} image_name {{ image }} {{ tag }} {{ flavor }}) # Check if image is already built ID=$(${PODMAN} images --filter reference=localhost/"${image_name}":"${tag}" --format "'{{ '{{.ID}}' }}'") if [[ -z "$ID" ]]; then - just build "${image}" "${tag}" "${flavor}" + {{ just }} build "${image}" "${tag}" "${flavor}" fi # Load into Rootful Podman @@ -418,8 +419,8 @@ rechunk $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": # Pipeline Checks if [[ {{ pipeline }} == "1" && -n "${SUDO_USER:-}" ]]; then - sudo -u "${SUDO_USER}" just load-rechunk "${image}" "${tag}" "${flavor}" - sudo -u "${SUDO_USER}" just secureboot "${image}" "${tag}" "${flavor}" + sudo -u "${SUDO_USER}" {{ just }} load-rechunk "${image}" "${tag}" "${flavor}" + sudo -u "${SUDO_USER}" {{ just }} secureboot "${image}" "${tag}" "${flavor}" fi # Load OCI into Podman Store @@ -429,10 +430,10 @@ load-rechunk image="aurora" tag="latest" flavor="main": set -eou pipefail # Validate - just validate {{ image }} {{ tag }} {{ flavor }} + {{ just }} validate {{ image }} {{ tag }} {{ flavor }} # Image Name - image_name=$(just image_name {{ image }} {{ tag }} {{ flavor }}) + image_name=$({{ just }} image_name {{ image }} {{ tag }} {{ flavor }}) # Load Image OUT_NAME="${image_name}_build" @@ -450,15 +451,15 @@ run $image="aurora" $tag="latest" $flavor="main": set -eoux pipefail # Validate - just validate "${image}" "${tag}" "${flavor}" + {{ just }} validate "${image}" "${tag}" "${flavor}" # Image Name - image_name=$(just image_name {{ image }} {{ tag }} {{ flavor }}) + image_name=$({{ just }} image_name {{ image }} {{ tag }} {{ flavor }}) # Check if image exists ID=$(${PODMAN} images --filter reference=localhost/"${image_name}":"${tag}" --format "'{{ '{{.ID}}' }}'") if [[ -z "$ID" ]]; then - just build "$image" "$tag" "$flavor" + {{ just }} build "$image" "$tag" "$flavor" fi # Run Container @@ -471,10 +472,10 @@ build-iso $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": set -eoux pipefail # Validate - just validate "${image}" "${tag}" "${flavor}" + {{ just }} validate "${image}" "${tag}" "${flavor}" # Image Name - image_name=$(just image_name {{ image }} {{ tag }} {{ flavor }}) + image_name=$({{ just }} image_name {{ image }} {{ tag }} {{ flavor }}) build_dir="${image_name}_build" mkdir -p "$build_dir" @@ -494,7 +495,7 @@ build-iso $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": IMAGE_REPO=localhost ID=$(${PODMAN} images --filter reference=localhost/"${image_name}":"${tag}" --format "'{{ '{{.ID}}' }}'") if [[ -z "$ID" ]]; then - just build "$image" "$tag" "$flavor" + {{ just }} build "$image" "$tag" "$flavor" fi fi @@ -606,7 +607,7 @@ build-iso $image="aurora" $tag="latest" $flavor="main" ghcr="0" pipeline="0": # Build ISO using GHCR Image [group('ISO')] build-iso-ghcr image="aurora" tag="latest" flavor="main": - @just build-iso {{ image }} {{ tag }} {{ flavor }} 1 + @{{ just }} build-iso {{ image }} {{ tag }} {{ flavor }} 1 # Run ISO [group('ISO')] @@ -615,14 +616,14 @@ run-iso $image="aurora" $tag="latest" $flavor="main": set -eoux pipefail # Validate - just validate "${image}" "${tag}" "${flavor}" + {{ just }} validate "${image}" "${tag}" "${flavor}" # Image Name - image_name=$(just image_name {{ image }} {{ tag }} {{ flavor }}) + image_name=$({{ just }} image_name {{ image }} {{ tag }} {{ flavor }}) # Check if ISO Exists if [[ ! -f "${image_name}_build/${image_name}-${tag}.iso" ]]; then - just build-iso "$image" "$tag" "$flavor" + {{ just }} build-iso "$image" "$tag" "$flavor" fi # Determine which port to use @@ -695,10 +696,10 @@ secureboot $image="aurora" $tag="latest" $flavor="main": set -eou pipefail # Validate - just validate "${image}" "${tag}" "${flavor}" + {{ just }} validate "${image}" "${tag}" "${flavor}" # Image Name - image_name=$(just image_name ${image} ${tag} ${flavor}) + image_name=$({{ just }} image_name ${image} ${tag} ${flavor}) # Get the vmlinuz to check kernel_release=$(${PODMAN} inspect "${image_name}":"${tag}" | jq -r '.[].Config.Labels["ostree.linux"]') @@ -745,7 +746,7 @@ secureboot $image="aurora" $tag="latest" $flavor="main": fedora_version image="aurora" tag="latest" flavor="main" $kernel_pin="": #!/usr/bin/bash set -eou pipefail - just validate {{ image }} {{ tag }} {{ flavor }} + {{ just }} validate {{ image }} {{ tag }} {{ flavor }} if [[ ! -f /tmp/manifest.json ]]; then if [[ "{{ tag }}" =~ stable ]]; then # CoreOS does not uses cosign @@ -766,7 +767,7 @@ fedora_version image="aurora" tag="latest" flavor="main" $kernel_pin="": image_name image="aurora" tag="latest" flavor="main": #!/usr/bin/bash set -eou pipefail - just validate {{ image }} {{ tag }} {{ flavor }} + {{ just }} validate {{ image }} {{ tag }} {{ flavor }} if [[ "{{ flavor }}" =~ main ]]; then image_name={{ image }} else @@ -785,9 +786,9 @@ generate-build-tags image="aurora" tag="latest" flavor="main" kernel_pin="" ghcr if [[ {{ ghcr }} == "0" ]]; then rm -f /tmp/manifest.json fi - FEDORA_VERSION="$(just fedora_version '{{ image }}' '{{ tag }}' '{{ flavor }}' '{{ kernel_pin }}')" - DEFAULT_TAG=$(just generate-default-tag {{ tag }} {{ ghcr }}) - IMAGE_NAME=$(just image_name {{ image }} {{ tag }} {{ flavor }}) + FEDORA_VERSION="$({{ just }} fedora_version '{{ image }}' '{{ tag }}' '{{ flavor }}' '{{ kernel_pin }}')" + DEFAULT_TAG=$({{ just }} generate-default-tag {{ tag }} {{ ghcr }}) + IMAGE_NAME=$({{ just }} image_name {{ image }} {{ tag }} {{ flavor }}) # Use Build Version from Rechunk if [[ -z "${version:-}" ]]; then version="{{ tag }}-${FEDORA_VERSION}.$(date +%Y%m%d)" diff --git a/iso_files/aurora.repo b/iso_files/aurora.repo new file mode 100644 index 00000000..2eec60d5 --- /dev/null +++ b/iso_files/aurora.repo @@ -0,0 +1,10 @@ +[copr:copr.fedorainfracloud.org:ublue-os:aurora] +name=Copr repo for aurora owned by ublue-os +baseurl=https://download.copr.fedorainfracloud.org/results/ublue-os/aurora/fedora-$releasever-$basearch/ +type=rpm-md +skip_if_unavailable=True +gpgcheck=1 +gpgkey=https://download.copr.fedorainfracloud.org/results/ublue-os/aurora/pubkey.gpg +repo_gpgcheck=0 +enabled=1 +enabled_metadata=1 diff --git a/iso_files/configure_iso_anaconda.sh b/iso_files/configure_iso_anaconda.sh new file mode 100644 index 00000000..473fa942 --- /dev/null +++ b/iso_files/configure_iso_anaconda.sh @@ -0,0 +1,156 @@ +#!/usr/bin/env bash + +set -eoux pipefail + +IMAGE_INFO="$(cat /usr/share/ublue-os/image-info.json)" +IMAGE_TAG="$(jq -c -r '."image-tag"' <<<"$IMAGE_INFO")" +IMAGE_REF="$(jq -c -r '."image-ref"' <<<"$IMAGE_INFO")" +IMAGE_REF="${IMAGE_REF##*://}" +sbkey='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' + +# Configure Live Environment +## Remove packages from liveCD to save space +dnf remove -y google-noto-fonts-all ublue-brew ublue-motd || true + +glib-compile-schemas /usr/share/glib-2.0/schemas + +systemctl disable rpm-ostree-countme.service +systemctl disable tailscaled.service +systemctl disable bootloader-update.service +systemctl disable brew-upgrade.timer +systemctl disable brew-update.timer +systemctl disable brew-setup.service +systemctl disable rpm-ostreed-automatic.timer +systemctl disable uupd.timer +systemctl disable ublue-system-setup.service +systemctl disable ublue-guest-user.service +systemctl disable check-sb-key.service +systemctl --global disable ublue-flatpak-manager.service +systemctl --global disable podman-auto-update.timer +systemctl --global disable ublue-user-setup.service + +# Configure Anaconda + +# Install Anaconda, Webui if >= F42 +SPECS=( + "libblockdev-btrfs" + "libblockdev-lvm" + "libblockdev-dm" + "anaconda-live" + "anaconda-webui" +) +dnf install -y "${SPECS[@]}" + +# Anaconda Profile Detection + +# Aurora +tee /etc/anaconda/profile.d/aurora.conf <<'EOF' +# Anaconda configuration file for Aurora Stable + +[Profile] +# Define the profile. +profile_id = aurora + +[Profile Detection] +# Match os-release values +os_id = aurora + +[Network] +default_on_boot = FIRST_WIRED_WITH_LINK + +[Bootloader] +efi_dir = fedora +menu_auto_hide = True + +[Storage] +default_scheme = BTRFS +btrfs_compression = zstd:1 +default_partitioning = + / (min 1 GiB, max 70 GiB) + /home (min 500 MiB, free 50 GiB) + /var (btrfs) + +[User Interface] +custom_stylesheet = /usr/share/anaconda/pixmaps/fedora.css + +[Localization] +use_geolocation = False +EOF + +# Configure +. /etc/os-release +echo "Aurora release $VERSION_ID ($VERSION_CODENAME)" >/etc/system-release + +sed -i 's/ANACONDA_PRODUCTVERSION=.*/ANACONDA_PRODUCTVERSION=""/' /usr/{,s}bin/liveinst || true +sed -i 's|^Icon=.*|Icon=/usr/share/pixmaps/fedora-logo-icon.png|' /usr/share/applications/liveinst.desktop || true + +# Get Artwork +git clone --depth=1 https://github.com/ublue-os/packages.git /root/packages +mkdir -p /usr/share/anaconda/pixmaps/ +cp -r /root/packages/aurora/fedora-logos/src/anaconda/* /usr/share/anaconda/pixmaps/ +rm -rf /root/packages + +# Interactive Kickstart +tee -a /usr/share/anaconda/interactive-defaults.ks <