Make --local-source the opt-in; default to network omarchy mirror

The previous version made the local build the only path. Convention is
the opposite: omarchy-iso-make pulls released omarchy* packages from
the omacom-pkgs.org mirror by default, and only builds from local
checkouts when explicitly asked via --local-source.

- bin/omarchy-iso-make: only mount /omarchy-installer + /omarchy-pkgs
  when --local-source is set. Default has neither mount.
- builder/build-iso.sh: skip build-omarchy-packages.sh when no local
  source. Don't filter the omarchy* names out of the pacman -Syw list
  in network mode (so they get downloaded from the mirror). With
  --local-source, the four package names are stripped after assembly
  so we don't re-fetch what we just built.
- For the package-list source: with /omarchy-installer mounted, read
  omarchy-base.packages from the checkout. Without it, briefly pull
  the published omarchy package, extract the .packages files from it
  to /tmp, and use those.
This commit is contained in:
Ryan Hughes committed 2026-05-20 21:34:49 -04:00
1 parent 9f4e5feef0
commit b8df9d3f50
2 files changed
+45 -24

No files matched your search

+27 -9
View File
@@ -34,10 +34,13 @@ rm -rf "$build_cache_dir/airootfs/etc/xdg/reflector"
cp -r /configs/* "$build_cache_dir/"
echo "$OMARCHY_MIRROR" > "$build_cache_dir/airootfs/root/omarchy_mirror"
# Build omarchy* packages from the mounted source trees and drop them in the
# offline mirror. The .automated_script.sh later pacstraps omarchy-installer
# (which deps-in omarchy + omarchy-settings + omarchy-limine) from there.
bash /builder/build-omarchy-packages.sh "$offline_mirror_dir"
# When --local-source is in effect, build omarchy* from the mounted source
# trees and drop them in the offline mirror. Otherwise pacman -Syw below
# downloads the published versions from the omarchy network mirror.
if [[ -d /omarchy-installer && -d /omarchy-pkgs ]]; then
bash /builder/build-omarchy-packages.sh "$offline_mirror_dir"
LOCAL_OMARCHY_BUILD=1
fi
# Node.js binary for offline mise install.
NODE_DIST_URL="https://nodejs.org/dist/latest"
@@ -54,17 +57,32 @@ arch_packages=(linux-t2 git gum jq openssl plymouth tzupdate omarchy-keyring lvm
printf '%s\n' "${arch_packages[@]}" >> "$build_cache_dir/packages.x86_64"
# Build the offline mirror: everything pacstrap might want during the target
# install. The omarchy* packages we just built are already in the mirror;
# this pacman -Syw downloads the rest from the live network mirror.
# install. With --local-source, the omarchy* packages we just built are
# already in the mirror and we filter them out below. Without it, pacman -Syw
# pulls the published omarchy* from the network mirror like any other package.
if [[ -d /omarchy-installer ]]; then
base_pkg_lists=(/omarchy-installer/install/omarchy-base.packages /omarchy-installer/install/omarchy-other.packages)
else
# Pull the same package lists out of the freshly-downloaded omarchy package
# so we don't need a local checkout in the non-local-source path.
pacman --config /configs/pacman-online-${OMARCHY_MIRROR}.conf --noconfirm -Sw omarchy --cachedir /tmp --dbpath /tmp/offlinedb-bootstrap >/dev/null
omarchy_pkg=$(ls /tmp/omarchy-*.pkg.tar.zst | head -1)
mkdir -p /tmp/omarchy-pkglists
bsdtar -xf "$omarchy_pkg" -C /tmp/omarchy-pkglists usr/share/omarchy/install/omarchy-base.packages usr/share/omarchy/install/omarchy-other.packages
base_pkg_lists=(/tmp/omarchy-pkglists/usr/share/omarchy/install/omarchy-base.packages /tmp/omarchy-pkglists/usr/share/omarchy/install/omarchy-other.packages)
fi
declare -a all_packages
mapfile -t all_packages < <(
{
cat "$build_cache_dir/packages.x86_64"
grep -hv '^#\|^$' /omarchy-installer/install/omarchy-base.packages /omarchy-installer/install/omarchy-other.packages
grep -hv '^#\|^$' "${base_pkg_lists[@]}"
grep -hv '^#\|^$' /builder/archinstall.packages
# Always include the omarchy meta-package set so the target install can
# find omarchy-installer in the offline mirror.
printf 'omarchy\nomarchy-settings\nomarchy-installer\nomarchy-limine\n'
} |
# Filter out our locally-built packages (they're already in the mirror).
grep -vE '^(omarchy|omarchy-settings|omarchy-installer|omarchy-limine)$' |
$([[ -n ${LOCAL_OMARCHY_BUILD:-} ]] && echo "grep -vE ^(omarchy|omarchy-settings|omarchy-installer|omarchy-limine)$" || echo cat) |
sort -u
)