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:
2 files changed
+45
-24
No files matched your search
+18
-15
@@ -16,9 +16,7 @@ while [[ $# -gt 0 ]]; do
|
||||
shift
|
||||
;;
|
||||
--local-source)
|
||||
# Kept as a flag for back-compat (older callers passed it); the ISO
|
||||
# build now always builds from local omarchy-installer + omarchy-pkgs
|
||||
# checkouts.
|
||||
LOCAL_SOURCE=1
|
||||
OMARCHY_MIRROR=edge
|
||||
shift
|
||||
;;
|
||||
@@ -56,16 +54,6 @@ OMARCHY_INSTALLER_REPO="${OMARCHY_INSTALLER_REPO:-basecamp/omarchy}"
|
||||
OMARCHY_INSTALLER_REF="${OMARCHY_INSTALLER_REF:-master}"
|
||||
OMARCHY_MIRROR="${OMARCHY_MIRROR:-stable}"
|
||||
|
||||
# Source paths for the local package builds. The ISO builder pacstraps
|
||||
# locally-built omarchy* packages from /omarchy-installer and /omarchy-pkgs,
|
||||
# so these must point at checkouts of those repos.
|
||||
OMARCHY_INSTALLER_PATH="${OMARCHY_INSTALLER_PATH:-$BUILD_ROOT/../omarchy-installer}"
|
||||
OMARCHY_PKGS_PATH="${OMARCHY_PKGS_PATH:-$BUILD_ROOT/../omarchy-pkgs}"
|
||||
[[ -d $OMARCHY_INSTALLER_PATH ]] || { echo "Error: omarchy-installer checkout not found at $OMARCHY_INSTALLER_PATH" >&2; exit 1; }
|
||||
[[ -d $OMARCHY_PKGS_PATH ]] || { echo "Error: omarchy-pkgs checkout not found at $OMARCHY_PKGS_PATH" >&2; exit 1; }
|
||||
OMARCHY_INSTALLER_PATH=$(realpath "$OMARCHY_INSTALLER_PATH")
|
||||
OMARCHY_PKGS_PATH=$(realpath "$OMARCHY_PKGS_PATH")
|
||||
|
||||
DOCKER_ARGS=(
|
||||
--rm
|
||||
--privileged
|
||||
@@ -79,10 +67,25 @@ DOCKER_ARGS=(
|
||||
-v "$BUILD_ROOT/archiso:/archiso:ro"
|
||||
-v "$BUILD_ROOT/builder:/builder:ro"
|
||||
-v "$BUILD_ROOT/configs:/configs:ro"
|
||||
-v "$OMARCHY_INSTALLER_PATH:/omarchy-installer:ro"
|
||||
-v "$OMARCHY_PKGS_PATH:/omarchy-pkgs:ro"
|
||||
)
|
||||
|
||||
# --local-source: build the omarchy* packages from local omarchy-installer +
|
||||
# omarchy-pkgs checkouts (mounted into the container) instead of pulling them
|
||||
# from the omarchy network mirror. Useful for testing in-flight changes
|
||||
# before they're released through pkgs.omarchy.org.
|
||||
if [[ -n "${LOCAL_SOURCE-}" ]]; then
|
||||
OMARCHY_INSTALLER_PATH="${OMARCHY_INSTALLER_PATH:-$BUILD_ROOT/../omarchy-installer}"
|
||||
OMARCHY_PKGS_PATH="${OMARCHY_PKGS_PATH:-$BUILD_ROOT/../omarchy-pkgs}"
|
||||
[[ -d $OMARCHY_INSTALLER_PATH ]] || { echo "Error: omarchy-installer checkout not found at $OMARCHY_INSTALLER_PATH" >&2; exit 1; }
|
||||
[[ -d $OMARCHY_PKGS_PATH ]] || { echo "Error: omarchy-pkgs checkout not found at $OMARCHY_PKGS_PATH" >&2; exit 1; }
|
||||
OMARCHY_INSTALLER_PATH=$(realpath "$OMARCHY_INSTALLER_PATH")
|
||||
OMARCHY_PKGS_PATH=$(realpath "$OMARCHY_PKGS_PATH")
|
||||
DOCKER_ARGS+=(
|
||||
-v "$OMARCHY_INSTALLER_PATH:/omarchy-installer:ro"
|
||||
-v "$OMARCHY_PKGS_PATH:/omarchy-pkgs:ro"
|
||||
)
|
||||
fi
|
||||
|
||||
# Use local pacman cache if you already have one on host to speed up repeat runs
|
||||
if [ -d "/var/cache/pacman/pkg" ]; then
|
||||
DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg")
|
||||
|
||||
Reference in new issue
Block a user