diff --git a/.github/workflows/reusable-build-iso-anaconda.yml b/.github/workflows/reusable-build-iso-anaconda.yml index 3282846c99b..9d624499825 100644 --- a/.github/workflows/reusable-build-iso-anaconda.yml +++ b/.github/workflows/reusable-build-iso-anaconda.yml @@ -53,12 +53,20 @@ jobs: sudo apt install -y \ podman - - name: Maximize build space - if: matrix.platform != 'arm64' + - name: Maximize build space (remove-software) + if: matrix. platform != 'arm64' uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 with: remove-codeql: true + - name: Maximize build space + uses: ublue-os/container-storage-action@911baca08baf30c8654933e9e9723cb399892140 + continue-on-error: true + with: + target-dir: /var/lib/containers + mount-opts: compress-force=zstd:2 + loopback-free: 0.9 + - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -89,8 +97,10 @@ jobs: with: image-ref: ${{ steps.image_ref.outputs.image_ref }}:${{ matrix.image_version }} flatpaks-list: ${{ github.workspace }}/flatpaks/system-flatpaks.list - hook-post-rootfs: ${{ github.workspace }}/iso_files/configure_iso_anaconda.sh + hook-post-rootfs: ${{ matrix.image_version == 'lts' && format('{0}/iso_files/configure_lts_iso_anaconda.sh', github.workspace) || format('{0}/iso_files/configure_iso_anaconda.sh', github.workspace) }} kargs: ${{ steps.image_ref.outputs.kargs }} + builder-distro: ${{ matrix.image_version == 'lts' && 'centos' || 'fedora' }} + - name: Rename ISO id: rename @@ -108,7 +118,7 @@ jobs: echo "output_directory=$OUTPUT_DIRECTORY" >> "${GITHUB_OUTPUT}" - name: Upload to Job Artifacts - if: github.event_name == 'pull_request' + if: github.ref_name == 'testing' uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: ${{ steps.image_ref.outputs.artifact_format }} diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index 90d2b7534e5..0bcddfe30dd 100644 --- a/.github/workflows/reusable-build-iso.yml +++ b/.github/workflows/reusable-build-iso.yml @@ -50,6 +50,14 @@ jobs: uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9 with: remove-codeql: true + + - name: Maximize build space + uses: ublue-os/container-storage-action@911baca08baf30c8654933e9e9723cb399892140 + continue-on-error: true + with: + target-dir: /var/lib/containers + mount-opts: compress-force=zstd:2 + loopback-free: 0.9 - name: Setup Just uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 diff --git a/iso_files/configure_iso_anaconda.sh b/iso_files/configure_iso_anaconda.sh index 7f05f53a597..4364c0c056b 100644 --- a/iso_files/configure_iso_anaconda.sh +++ b/iso_files/configure_iso_anaconda.sh @@ -55,7 +55,10 @@ SPECS=( "anaconda-live" ) if [[ "$IMAGE_TAG" =~ lts ]]; then - dnf config-manager --set-enabled centos-hyperscale + dnf config-manager --set-enabled centos-release-kmods-kernel + dnf copr enable -y jreilly/anaconda-webui + + SPECS+=("anaconda-webui") elif [[ "$(rpm -E %fedora)" -ge 42 ]]; then SPECS+=("anaconda-webui") fi @@ -90,7 +93,7 @@ btrfs_compression = zstd:1 default_partitioning = / (min 1 GiB, max 70 GiB) /home (min 500 MiB, free 50 GiB) - /var (btrfs) + /var (btrfs) [User Interface] custom_stylesheet = /usr/share/anaconda/pixmaps/silverblue/fedora-silverblue.css @@ -112,7 +115,7 @@ fi # Configure . /etc/os-release -if [[ "$IMAGE_TAG" =~ gts|lts ]]; then +if [[ "$IMAGE_TAG" =~ gts ]]; then echo "Bluefin ${IMAGE_TAG^^} release $VERSION_ID (${VERSION_CODENAME:=Big Bird})" >/etc/system-release else echo "Bluefin release $VERSION_ID ($VERSION_CODENAME)" >/etc/system-release diff --git a/iso_files/configure_lts_iso_anaconda.sh b/iso_files/configure_lts_iso_anaconda.sh new file mode 100644 index 00000000000..2086d6247b8 --- /dev/null +++ b/iso_files/configure_lts_iso_anaconda.sh @@ -0,0 +1,188 @@ +#!/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 yaru-theme || true + +# Setup dock +tee /usr/share/glib-2.0/schemas/zz2-org.gnome.shell.gschema.override <= F42 +SPECS=( + "libdnf5" + "python3-libdnf5" + "libblockdev" + "libblockdev-lvm" + "libblockdev-dm" + "libblockdev-btrfs" + "anaconda-live" + "anaconda-webui" + "firefox" +) + +dnf copr enable -y jreilly1821/anaconda-webui + +dnf install -y "${SPECS[@]}" + + +# Fix the wrong dir for webui +sed -i 's|/usr/libexec/webui-desktop|/usr/libexec/anaconda/webui-desktop|g' /bin/liveinst + +# Anaconda Profile Detection + +# Bluefin +tee /etc/anaconda/profile.d/bluefin-lts.conf <<'EOF' +# Anaconda configuration file for Bluefin LTS + +[Profile] +# Define the profile. +profile_id = bluefin + +[Profile Detection] +# Match os-release values +os_id = bluefin-lts + +[Network] +default_on_boot = FIRST_WIRED_WITH_LINK + +[Bootloader] +efi_dir = centos +menu_auto_hide = True + +[Storage] +file_system_type = xfs +default_partitioning = + / (min 5 GiB, max 70 GiB) + /var (min 5 GiB) + +[User Interface] +custom_stylesheet = /usr/share/anaconda/pixmaps/silverblue/fedora-silverblue.css +hidden_spokes = + NetworkSpoke + PasswordSpoke + UserSpoke +hidden_webui_pages = + anaconda-screen-accounts + +[Localization] +use_geolocation = False +EOF + +sed -i 's/^ID=.*/ID=bluefin-lts/' /usr/lib/os-release +echo "VARIANT_ID=bluefin-lts" >>/usr/lib/os-release + +# Configure +. /etc/os-release +# if [[ "$IMAGE_TAG" =~ gts ]]; then +# echo "Bluefin ${IMAGE_TAG^^} release $VERSION_ID (${VERSION_CODENAME:=Big Bird})" >/etc/system-release +# else +echo "Bluefin release $VERSION_ID Achillobator" >/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 +sed -i 's| Fedora| Bluefin|' /usr/share/anaconda/gnome/fedora-welcome || true +sed -i 's|Activities|in the dock|' /usr/share/anaconda/gnome/fedora-welcome || true + +# Get Artwork +git clone --depth=1 https://github.com/ublue-os/packages.git /root/packages +mkdir -p /usr/share/anaconda/pixmaps/silverblue +cp -r /root/packages/bluefin/fedora-logos/src/anaconda/* /usr/share/anaconda/pixmaps/silverblue/ +rm -rf /root/packages + +# Interactive Kickstart +tee -a /usr/share/anaconda/interactive-defaults.ks <