diff options
| -rw-r--r-- | .github/workflows/validate-installer-iso.yml | 3 | ||||
| -rwxr-xr-x | installer/build.sh | 1 | ||||
| -rw-r--r-- | installer/system_files/overrides/etc/anaconda/profile.d/aerocore.conf | 36 | ||||
| -rwxr-xr-x | tests/test-aerocore-anaconda-profile.sh | 16 |
4 files changed, 56 insertions, 0 deletions
diff --git a/.github/workflows/validate-installer-iso.yml b/.github/workflows/validate-installer-iso.yml index 5ddf344..d98964d 100644 --- a/.github/workflows/validate-installer-iso.yml +++ b/.github/workflows/validate-installer-iso.yml @@ -60,6 +60,9 @@ jobs: - name: Test GPT root configuration run: tests/test-configure-target-gpt-root.sh + - name: Validate AeroCore Anaconda profile + run: tests/test-aerocore-anaconda-profile.sh + - name: Validate Anaconda WebUI patch run: | fixture="$(mktemp)" diff --git a/installer/build.sh b/installer/build.sh index 205f18c..937d324 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -89,6 +89,7 @@ fi live_product_name="AeroCore OS" sed -i "s/^NAME=.*/NAME=\"${live_product_name}\"/" /usr/lib/os-release sed -i "s/^PRETTY_NAME=.*/PRETTY_NAME=\"${live_product_name} ${live_version_id} (Kinoite)\"/" /usr/lib/os-release +sed -i 's/^ID=.*/ID=aerocore/' /usr/lib/os-release sed -i "s/^LOGO=.*/LOGO=distributor-logo/" /usr/lib/os-release printf '%s release %s (Kinoite)\n' "${live_product_name}" "${live_version_id}" > /etc/system-release diff --git a/installer/system_files/overrides/etc/anaconda/profile.d/aerocore.conf b/installer/system_files/overrides/etc/anaconda/profile.d/aerocore.conf new file mode 100644 index 0000000..0dd8f41 --- /dev/null +++ b/installer/system_files/overrides/etc/anaconda/profile.d/aerocore.conf @@ -0,0 +1,36 @@ +# Anaconda configuration for the AeroCore live installer. +# +# This deliberately does not inherit the Fedora KDE profile: that profile +# hides the accounts screen, which would leave an interactive bootc install +# without a user account. Keep the account page available so the installer +# creates the user's requested login during installation. + +[Profile] +profile_id = aerocore + +[Profile Detection] +os_id = aerocore + +[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] +# Leave anaconda-screen-accounts visible. The user account is configured in +# the WebUI rather than via an unused Lorax template. +hidden_webui_pages = + network + +[Localization] +use_geolocation = False diff --git a/tests/test-aerocore-anaconda-profile.sh b/tests/test-aerocore-anaconda-profile.sh new file mode 100755 index 0000000..3b3bb61 --- /dev/null +++ b/tests/test-aerocore-anaconda-profile.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +profile="${project_root}/installer/system_files/overrides/etc/anaconda/profile.d/aerocore.conf" +build_script="${project_root}/installer/build.sh" + +grep -qx 'profile_id = aerocore' "${profile}" +grep -qx 'os_id = aerocore' "${profile}" +grep -Fqx "sed -i 's/^ID=.*/ID=aerocore/' /usr/lib/os-release" "${build_script}" + +if grep -Eq '^[[:space:]]*(UserSpoke|anaconda-screen-accounts)[[:space:]]*$' "${profile}"; then + echo "AeroCore's Anaconda profile must leave account creation visible" >&2 + exit 1 +fi |
