Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions bin/omarchy-iso-make
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ while [[ $# -gt 0 ]]; do
;;
# The release rehearsal: --local-source holds omarchy-pkgs with omarchy and
# omarchy-settings pinned the way a release is (test/rehearsal-pins). Those
# two are built from it, under their release names; omarchy-nvim and every
# other package come from edge as published. The ISO ends in -rehearsal.
# two are built from it, under their release names, and omarchy-boot-systemd
# with them where it is there; omarchy-nvim and every other package come
# from edge as published. The ISO ends in -rehearsal.
--rehearsal)
REHEARSAL=1
shift
Expand All @@ -174,7 +175,11 @@ if [[ -n $REHEARSAL ]]; then
# promotes edge, so the rehearsal takes everything else from edge.
OMARCHY_ISO_REF=rehearsal
OMARCHY_MIRROR=edge
: "${OMARCHY_LOCAL_PACKAGES:=omarchy-settings omarchy}"
# omarchy-boot-systemd is released in lockstep with them, where the pkgs
# checkout has it.
rehearsal_packages="omarchy-settings omarchy"
[[ ! -d $LOCAL_PKGS_PATH/pkgbuilds/omarchy-boot-systemd ]] || rehearsal_packages+=" omarchy-boot-systemd"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Rehearsal package sources misdescribed

--rehearsal now also builds omarchy-boot-systemd from the supplied checkout when its recipe exists. But README.md:519 still says every package besides omarchy and omarchy-settings comes from edge as published. Maintainers are therefore told they are testing a published boot package when they are testing a local build.

The documentation rule requires updates in the same PR when documented operator behavior changes. Update the rehearsal section to include the local boot package.

Rule Used: When a PR changes user-visible or operator-visible behavior documented in README.md, docs//*.md, builder/qualcomm/README.md, or test/fake-pci.md, update the doc in the same PR. When README.md or a file under docs//*.md is added, moved, or removed... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: bin/omarchy-iso-make
Line: 181

Comment:
**Rehearsal package sources misdescribed**

`--rehearsal` now also builds `omarchy-boot-systemd` from the supplied checkout when its recipe exists. But `README.md:519` still says every package besides `omarchy` and `omarchy-settings` comes from edge as published. Maintainers are therefore told they are testing a published boot package when they are testing a local build.

The documentation rule requires updates in the same PR when documented operator behavior changes. Update the rehearsal section to include the local boot package.

**Rule Used:** When a PR changes user-visible or operator-visible behavior documented in README.md, docs/**/*.md, builder/qualcomm/README.md, or test/fake-pci.md, update the doc in the same PR. When README.md or a file under docs/**/*.md is added, moved, or removed... ([source](https://github.com/omacom/omarchy-iso/blob/667d29757d62f84d1db10ae61e4b94cc8464813f/.greptile/config.json))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

: "${OMARCHY_LOCAL_PACKAGES:=$rehearsal_packages}"
Comment on lines +180 to +182

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Older rehearsals fail during installation

If the Omarchy checkout lacks omarchy-boot-switch, the rehearsal still adds omarchy-boot-systemd whenever its recipe exists. The local-package branch in build-iso.sh runs before the missing-command check, so the package ships anyway. The installer then selects systemd-boot and stops when it calls the missing command, after preparing the target disk.

Check for omarchy-boot-switch before adding the local swap package, and exclude that package from the mirror otherwise.

fi

if [[ -n $LOCAL_OMARCHY_PATH ]]; then
Expand Down
63 changes: 61 additions & 2 deletions builder/build-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,20 @@ export OMARCHY_RUNTIME_PACKAGE OMARCHY_SETTINGS_PACKAGE OMARCHY_NVIM_PACKAGE
# The ones --local-source builds from the mounted checkouts, all three unless
# OMARCHY_LOCAL_PACKAGES names fewer; the others come from the channel. The
# release rehearsal (--rehearsal) builds only the pinned omarchy and
# omarchy-settings, and takes omarchy-nvim as published, as a release does.
read -ra local_packages <<<"${OMARCHY_LOCAL_PACKAGES:-$OMARCHY_SETTINGS_PACKAGE $OMARCHY_RUNTIME_PACKAGE $OMARCHY_NVIM_PACKAGE}"
# omarchy-settings (and omarchy-boot-systemd, released with them), and takes
# omarchy-nvim as published, as a release does.
# The image boots through Limine's stack: on x86_64 the omarchy-boot package,
# on aarch64 its packages by name. UEFI installs swap it for
# omarchy-boot-systemd. A pkgs checkout that has them builds them with the
# runtime that depends on them.
boot_stack_packages=""
if [[ -d /omarchy-pkgs/pkgbuilds/omarchy-boot-systemd ]]; then
case $OMARCHY_ARCH in
x86_64) boot_stack_packages=" omarchy-boot omarchy-boot-systemd" ;;
aarch64) boot_stack_packages=" omarchy-boot-systemd" ;;
esac
fi
read -ra local_packages <<<"${OMARCHY_LOCAL_PACKAGES:-$OMARCHY_SETTINGS_PACKAGE $OMARCHY_RUNTIME_PACKAGE $OMARCHY_NVIM_PACKAGE$boot_stack_packages}"
export OMARCHY_LOCAL_PACKAGES="${local_packages[*]}"
# The runtime and settings packages come from one commit and are released in
# lockstep, so a build makes both from source; omarchy-nvim may come from the
Expand All @@ -87,6 +99,7 @@ done
for local_package_name in "${local_packages[@]}"; do
case $local_package_name in
"$OMARCHY_RUNTIME_PACKAGE" | "$OMARCHY_SETTINGS_PACKAGE" | "$OMARCHY_NVIM_PACKAGE") ;;
omarchy-boot | omarchy-boot-systemd) [[ " $boot_stack_packages " == *" $local_package_name "* ]] || { echo "ERROR: this $OMARCHY_ARCH build can't build $local_package_name" >&2; exit 1; } ;;
*) echo "ERROR: OMARCHY_LOCAL_PACKAGES names $local_package_name, which this build does not install" >&2; exit 1 ;;
esac
done
Expand Down Expand Up @@ -949,6 +962,31 @@ if ! resolved_package_files="$(
fi
mapfile -t required_package_files <<< "$resolved_package_files"

# UEFI installs swap the image's Limine stack for omarchy-boot-systemd, which
# conflicts with it, so it is resolved in a transaction of its own and kept in
# the mirror next to it. Built locally, it is kept with the other local builds
# below and its dependencies came in with theirs. The installer finishes the
# swap with the runtime's omarchy-boot-switch, so a runtime built from an
# Omarchy checkout without it keeps Limine whatever the channel offers.
boot_swap_package=""
if [[ " ${local_packages[*]} " == *" omarchy-boot-systemd "* && -n ${LOCAL_OMARCHY_BUILD:-} ]]; then
boot_swap_package=omarchy-boot-systemd
elif [[ -d /omarchy-source && ! -f /omarchy-source/bin/omarchy-boot-switch ]]; then
echo "$OMARCHY_ARCH: the Omarchy checkout has no omarchy-boot-switch; UEFI installs will boot Limine" >&2
elif pacman --config "$online_pacman_conf" --dbpath /tmp/offlinedb -Sp omarchy-boot-systemd >/dev/null 2>&1; then
boot_swap_package=omarchy-boot-systemd
pacman --config "$online_pacman_conf" --noconfirm -Sw omarchy-boot-systemd \
--cachedir "$offline_mirror_dir/" --dbpath /tmp/offlinedb --needed
if ! swap_package_files="$(pacman --config "$online_pacman_conf" --noconfirm \
--dbpath /tmp/offlinedb -S --print --print-format '%f' omarchy-boot-systemd)"; then
echo "ERROR: could not resolve the package files of omarchy-boot-systemd" >&2
exit 1
fi
mapfile -t -O "${#required_package_files[@]}" required_package_files <<<"$swap_package_files"
else
echo "$OMARCHY_ARCH: no repository offers omarchy-boot-systemd; UEFI installs will boot Limine" >&2
fi

# The online transaction intentionally excludes packages built from the local
# checkouts. Add those exact artifacts back to the keep-set after verifying
# that the local build left exactly one file for each selected package name.
Expand Down Expand Up @@ -1108,6 +1146,27 @@ if ! installable_files="$(
echo "ERROR: could not resolve the packages an install can ask for" >&2
exit 1
fi
# The boot swap package is never in the image, and what it adds to it ships.
if [[ -n $boot_swap_package ]]; then
if [[ -n ${LOCAL_OMARCHY_BUILD:-} && " ${local_packages[*]} " == *" omarchy-boot-systemd "* ]]; then
# What it depends on, as built: the channel's database doesn't know it.
swap_depends=()
for archive in "$offline_mirror_dir"/omarchy-boot-systemd-[0-9]*.pkg.tar.*; do
[[ $archive == *.sig ]] && continue
installable_files+=$'\n'"${archive##*/}"
mapfile -t -O "${#swap_depends[@]}" swap_depends < <(bsdtar -xOf "$archive" .PKGINFO | sed -n 's/^depend = //p')
done
(( ${#swap_depends[@]} )) || { echo "ERROR: the omarchy-boot-systemd build names no dependencies" >&2; exit 1; }
else
swap_depends=(omarchy-boot-systemd)
fi
if ! swap_files="$(pacman --config "$online_pacman_conf" --noconfirm \
--dbpath /tmp/offlinedb -S --print --print-format '%f' "${swap_depends[@]}")"; then
echo "ERROR: could not resolve the systemd-boot stack UEFI installs switch to" >&2
exit 1
fi
installable_files+=$'\n'"$swap_files"
fi
shipped_list="$build_cache_dir/airootfs/usr/share/omarchy-iso/offline-mirror.shipped"
# archlinuxarm-keyring stays too, with its signature: on aarch64 validate_boot
# checks the target keyring against them (_validate_package_signing).
Expand Down
Loading