Unify builds
No files matched your search
@@ -3,11 +3,40 @@
|
||||
# Abort if anything fails
|
||||
set -e
|
||||
|
||||
# Parse command line arguments
|
||||
BUILD_MODE="offline"
|
||||
NO_CACHE=""
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--online)
|
||||
BUILD_MODE="online"
|
||||
shift
|
||||
;;
|
||||
--offline)
|
||||
BUILD_MODE="offline"
|
||||
shift
|
||||
;;
|
||||
--no-cache)
|
||||
NO_CACHE=1
|
||||
shift
|
||||
;;
|
||||
--no-boot-offer)
|
||||
NO_BOOT_OFFER=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Usage: $0 [--online|--offline] [--no-cache] [--no-boot-offer]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Ensure we have the submodule checked out
|
||||
git submodule update --init --recursive --jobs=8
|
||||
|
||||
# Prepare build repo
|
||||
BUILD_SCRIPT="builder/online.sh"
|
||||
BUILD_SCRIPT="builder/build-iso.sh"
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
BUILD_RELEASE_PATH="$BUILD_ROOT/release"
|
||||
mkdir -p "$BUILD_RELEASE_PATH"
|
||||
@@ -27,10 +56,12 @@ DOCKER_ARGS=(
|
||||
-e "OMARCHY_INSTALLER_REPO=$OMARCHY_INSTALLER_REPO"
|
||||
-e "OMARCHY_INSTALLER_REF=$OMARCHY_INSTALLER_REF"
|
||||
-e "OMARCHY_INSTALLER_URL=$OMARCHY_INSTALLER_URL"
|
||||
-e "OMARCHY_BUILD_MODE=$BUILD_MODE"
|
||||
-v "$BUILD_RELEASE_PATH/:/out/"
|
||||
-v "$BUILD_ROOT/$BUILD_SCRIPT:/$BUILD_SCRIPT:ro"
|
||||
-v "$BUILD_ROOT/archiso:/archiso:ro"
|
||||
-v "$BUILD_ROOT/builder:/builder:ro"
|
||||
-v "$BUILD_ROOT/configs:/configs:ro"
|
||||
)
|
||||
|
||||
# Use local pacman cache if you already have one on host to speed up repeat runs
|
||||
@@ -38,19 +69,27 @@ if [ -d "/var/cache/pacman/pkg" ]; then
|
||||
DOCKER_ARGS+=(-v "/var/cache/pacman/pkg:/var/cache/pacman/pkg")
|
||||
fi
|
||||
|
||||
# Mount the build cache directory where packages are downloaded for the offline repo
|
||||
# Only applicable for offline builds and when --no-cache is not specified
|
||||
if [[ "$BUILD_MODE" == "offline" && -z "$NO_CACHE" ]]; then
|
||||
# using a dated dir on the host to refresh daily if building multiple times
|
||||
BUILD_DATE=$(date +%Y-%m-%d)
|
||||
OFFLINE_REPO_BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
|
||||
mkdir -p "$OFFLINE_REPO_BUILD_CACHE_DIR"
|
||||
# Mount to /var/cache/airootfs/var/cache/omarchy since that's where repo packages go in the ISO
|
||||
DOCKER_ARGS+=(-v "$OFFLINE_REPO_BUILD_CACHE_DIR:/var/cache/airootfs/var/cache/omarchy")
|
||||
fi
|
||||
|
||||
# Run the builder with assembled args
|
||||
docker run "${DOCKER_ARGS[@]}" archlinux/archlinux:latest /$BUILD_SCRIPT
|
||||
|
||||
# Make iso accessible to all
|
||||
sudo chmod 777 -R "$BUILD_RELEASE_PATH"
|
||||
|
||||
# Move as install ref
|
||||
latest_iso=$(\ls -t "$BUILD_RELEASE_PATH"/*.iso | head -n1)
|
||||
iso_ref="${latest_iso%.*}-$OMARCHY_INSTALLER_REF.iso"
|
||||
mv "$latest_iso" "$iso_ref"
|
||||
mv -f "$latest_iso" "$iso_ref"
|
||||
|
||||
# Offer to boot the new build
|
||||
if [[ $1 != "--no-boot-offer" ]]; then
|
||||
if [[ -z "$NO_BOOT_OFFER" ]]; then
|
||||
echo
|
||||
gum confirm "Boot $iso_ref?" && omarchy-iso-boot "$iso_ref"
|
||||
fi
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Abort if anything fails
|
||||
set -e
|
||||
|
||||
# Ensure we have the submodule checked out
|
||||
git submodule update --init --recursive --jobs=8
|
||||
|
||||
# Prepare build repo
|
||||
BUILD_SCRIPT="builder/offline.sh"
|
||||
BUILD_ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
|
||||
BUILD_RELEASE_PATH="$BUILD_ROOT/release"
|
||||
mkdir -p "$BUILD_RELEASE_PATH"
|
||||
|
||||
OMARCHY_CONFIGURATOR_REPO="${OMARCHY_CONFIGURATOR_REPO:-omacom-io/omarchy-configurator}"
|
||||
OMARCHY_CONFIGURATOR_REF="${OMARCHY_CONFIGURATOR_REF:-master}"
|
||||
|
||||
OMARCHY_INSTALLER_REPO="${OMARCHY_INSTALLER_REPO:-basecamp/omarchy}"
|
||||
OMARCHY_INSTALLER_REF="${OMARCHY_INSTALLER_REF:-master}"
|
||||
OMARCHY_INSTALLER_URL="${OMARCHY_INSTALLER_URL:-https://omarchy.org/install}"
|
||||
|
||||
DOCKER_ARGS=(
|
||||
--rm
|
||||
--privileged
|
||||
-e "OMARCHY_CONFIGURATOR_REPO=$OMARCHY_CONFIGURATOR_REPO"
|
||||
-e "OMARCHY_CONFIGURATOR_REF=$OMARCHY_CONFIGURATOR_REF"
|
||||
-e "OMARCHY_INSTALLER_REPO=$OMARCHY_INSTALLER_REPO"
|
||||
-e "OMARCHY_INSTALLER_REF=$OMARCHY_INSTALLER_REF"
|
||||
-e "OMARCHY_INSTALLER_URL=$OMARCHY_INSTALLER_URL"
|
||||
-v "$BUILD_RELEASE_PATH/:/out/"
|
||||
-v "$BUILD_ROOT/$BUILD_SCRIPT:/$BUILD_SCRIPT:ro"
|
||||
-v "$BUILD_ROOT/archiso:/archiso:ro"
|
||||
-v "$BUILD_ROOT/builder:/builder:ro"
|
||||
-v "$BUILD_ROOT/configs:/configs:ro"
|
||||
)
|
||||
|
||||
# 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")
|
||||
fi
|
||||
|
||||
# Mount the build cache directory where packages are downloaded
|
||||
# using a dated dir on the host to refresh daily if building multiple times
|
||||
BUILD_DATE=$(date +%Y-%m-%d)
|
||||
BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
|
||||
mkdir -p "$BUILD_CACHE_DIR"
|
||||
# Mount to /var/cache/airootfs/var/cache/omarchy since that's where packages go in the ISO
|
||||
DOCKER_ARGS+=(-v "$BUILD_CACHE_DIR:/var/cache/airootfs/var/cache/omarchy")
|
||||
|
||||
# Run the builder with assembled args
|
||||
docker run "${DOCKER_ARGS[@]}" archlinux/archlinux:latest /$BUILD_SCRIPT
|
||||
|
||||
# Move as install ref
|
||||
latest_iso=$(\ls -t "$BUILD_RELEASE_PATH"/*.iso | head -n1)
|
||||
iso_ref="${latest_iso%.*}-$OMARCHY_INSTALLER_REF.iso"
|
||||
mv -f "$latest_iso" "$iso_ref"
|
||||
|
||||
# Offer to boot the new build
|
||||
if [[ $1 != "--no-boot-offer" ]]; then
|
||||
echo
|
||||
gum confirm "Boot $iso_ref?" && omarchy-iso-boot "$iso_ref"
|
||||
fi
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
# Build mode: offline (default) or online │ │
|
||||
OMARCHY_BUILD_MODE="${OMARCHY_BUILD_MODE:-offline}"
|
||||
|
||||
# Note that these are packages installed to the Arch container
|
||||
# used to build the ISO.
|
||||
pacman-key --init
|
||||
@@ -55,7 +58,7 @@ prepare_offline_mirror() {
|
||||
|
||||
# Download all the packages to the offline mirror inside the ISO
|
||||
echo "Downloading all packages (including AUR) to offline mirror: ${all_packages[@]}"
|
||||
pacman --config /builder/pacman-mirror.conf \
|
||||
pacman --config /configs/pacman-online.conf \
|
||||
--noconfirm -Syw "${all_packages[@]}" \
|
||||
--cachedir $offline_mirror_dir/ \
|
||||
--dbpath /tmp/offlinedb
|
||||
@@ -66,12 +69,8 @@ prepare_offline_mirror() {
|
||||
fi
|
||||
}
|
||||
|
||||
make_archiso_offline() {
|
||||
# This function will simply disable any online activity we have.
|
||||
# for instance the reflector.service which tries to optimize
|
||||
# mirror order by fetching the latest mirror list by default.
|
||||
|
||||
# Disable reflector
|
||||
disable_reflector() {
|
||||
# Avoid using reflector for mirror identification as we are relying on the global CDN
|
||||
rm "$build_cache_dir/airootfs/etc/systemd/system/multi-user.target.wants/reflector.service"
|
||||
rm -rf "$build_cache_dir/airootfs/etc/systemd/system/reflector.service.d"
|
||||
rm -rf "$build_cache_dir/airootfs/etc/xdg/reflector"
|
||||
@@ -86,8 +85,9 @@ mkdir -p $offline_mirror_dir/
|
||||
mkdir -p $offline_ruby_dir/
|
||||
|
||||
# We base our ISO on the official arch ISO (releng) config
|
||||
cp -r archiso/configs/releng/* $build_cache_dir/
|
||||
cp -r /archiso/configs/releng/* $build_cache_dir/
|
||||
rm "$build_cache_dir/airootfs/etc/motd"
|
||||
disable_reflector
|
||||
|
||||
# Bring in our configs
|
||||
cp -r /configs/* $build_cache_dir/
|
||||
@@ -108,35 +108,50 @@ mkdir -p "$build_cache_dir/airootfs/root"
|
||||
curl -fsSL -o "$build_cache_dir/airootfs/root/configurator" \
|
||||
"https://raw.githubusercontent.com/$OMARCHY_CONFIGURATOR_REPO/$OMARCHY_CONFIGURATOR_REF/configurator"
|
||||
|
||||
if [ "$OMARCHY_BUILD_MODE" = "online" ]; then
|
||||
echo "$OMARCHY_INSTALLER_REPO" >$build_cache_dir/airootfs/root/omarchy_installer_repo.txt
|
||||
echo "$OMARCHY_INSTALLER_REF" >$build_cache_dir/airootfs/root/omarchy_installer_ref.txt
|
||||
echo "$OMARCHY_INSTALLER_URL" >$build_cache_dir/airootfs/root/omarchy_installer_url.txt
|
||||
echo "online" >$build_cache_dir/airootfs/root/omarchy_install_mode.txt
|
||||
else
|
||||
echo "offline" >$build_cache_dir/airootfs/root/omarchy_install_mode.txt
|
||||
fi
|
||||
|
||||
# Add our additional packages to packages.x86_64
|
||||
printf '%s\n' "${arch_packages[@]}" >>"$build_cache_dir/packages.x86_64"
|
||||
|
||||
prepare_offline_mirror
|
||||
make_archiso_offline
|
||||
if [ "$OMARCHY_BUILD_MODE" = "offline" ]; then
|
||||
prepare_offline_mirror
|
||||
|
||||
# Download Ruby tarball if not already cached
|
||||
ruby_tarball="ruby-3.4.5-rails-8.0.2.1-x86_64.tar.gz"
|
||||
if [ ! -f "$offline_ruby_dir/$ruby_tarball" ]; then
|
||||
echo "Downloading Ruby tarball..."
|
||||
curl -fsSL -o "$offline_ruby_dir/$ruby_tarball" \
|
||||
"https://pkgs.omarchy.org/ruby/$ruby_tarball"
|
||||
else
|
||||
echo "Ruby tarball already cached, skipping download"
|
||||
# Download Ruby tarball if not already cached
|
||||
ruby_tarball="ruby-3.4.5-rails-8.0.2.1-x86_64.tar.gz"
|
||||
if [ ! -f "$offline_ruby_dir/$ruby_tarball" ]; then
|
||||
echo "Downloading Ruby tarball..."
|
||||
curl -fsSL -o "$offline_ruby_dir/$ruby_tarball" \
|
||||
"https://pkgs.omarchy.org/ruby/$ruby_tarball"
|
||||
else
|
||||
echo "Ruby tarball already cached, skipping download"
|
||||
fi
|
||||
|
||||
# Create a symlink to the offline mirror instead of duplicating it.
|
||||
# mkarchiso needs packages at /var/cache/omarchy/mirror/offline in the container,
|
||||
# but they're actually in $build_cache_dir/airootfs/var/cache/omarchy/mirror/offline
|
||||
mkdir -p /var/cache/omarchy/mirror
|
||||
ln -s "$offline_mirror_dir" "/var/cache/omarchy/mirror/offline"
|
||||
fi
|
||||
|
||||
# Install Python packages for the installer into the ISO
|
||||
# file system.
|
||||
pip install "${python_packages[@]}"
|
||||
|
||||
# Copy the offline pacman.conf to the ISO's /etc directory
|
||||
# so the live environment uses our offline mirror when booted
|
||||
cp $build_cache_dir/pacman.conf "$build_cache_dir/airootfs/etc/pacman.conf"
|
||||
if [ "$OMARCHY_BUILD_MODE" = "online" ]; then
|
||||
# Copy the online version so we use it for build and ISO boot
|
||||
cp $build_cache_dir/pacman-online.conf $build_cache_dir/pacman.conf
|
||||
fi
|
||||
|
||||
# Create a symlink to the offline mirror instead of duplicating it.
|
||||
# mkarchiso needs packages at /var/cache/omarchy/mirror/offline in the container,
|
||||
# but they're actually in $build_cache_dir/airootfs/var/cache/omarchy/mirror/offline
|
||||
mkdir -p /var/cache/omarchy/mirror
|
||||
ln -s "$offline_mirror_dir" "/var/cache/omarchy/mirror/offline"
|
||||
# Copy the pacman.conf to the ISO's /etc directory so the live environment uses our
|
||||
# same config when booted
|
||||
cp $build_cache_dir/pacman.conf "$build_cache_dir/airootfs/etc/pacman.conf"
|
||||
|
||||
# Finally, we assemble the entire ISO
|
||||
mkarchiso -v -w "$build_cache_dir/work/" -o "/out/" "$build_cache_dir/"
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Upload install log(s) to 0x0.st
|
||||
|
||||
ARCHINSTALL_LOG="/var/log/archinstall/install.log"
|
||||
OMARCHY_LOG="/var/log/omarchy-install.log"
|
||||
COMBINED_LOG="/tmp/combined-install.log"
|
||||
|
||||
# Combine whatever logs exist (archinstall first, then omarchy)
|
||||
cat $ARCHINSTALL_LOG $OMARCHY_LOG >"$COMBINED_LOG" 2>/dev/null
|
||||
|
||||
if [ ! -s "$COMBINED_LOG" ]; then
|
||||
echo "Error: No install logs found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading installation log to 0x0.st..."
|
||||
echo ""
|
||||
|
||||
URL=$(curl -sF "file=@$COMBINED_LOG" -Fexpires=24 https://0x0.st)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$URL" ]; then
|
||||
echo "✓ Log uploaded successfully!"
|
||||
echo "Share this URL with support:"
|
||||
echo ""
|
||||
echo " $URL"
|
||||
echo ""
|
||||
echo "This link will expire in 24 hours."
|
||||
else
|
||||
echo "Error: Failed to upload log file"
|
||||
exit 1
|
||||
fi
|
||||
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Note that these are packages installed to the Arch container used to build the ISO.
|
||||
pacman-key --init
|
||||
pacman --noconfirm -Sy archlinux-keyring archiso sudo base-devel git gum
|
||||
|
||||
# Packages needed for the Omarchy configurator (installer will fetch its own)
|
||||
arch_packages=(git gum openssl iw jq)
|
||||
|
||||
# We build our iso here
|
||||
cache_dir=$(realpath --canonicalize-missing ~/.cache/omarchy/iso_$(date +%Y-%m-%d))
|
||||
mkdir -p $cache_dir
|
||||
cd $cache_dir
|
||||
|
||||
# We base our ISO on the official arch ISO (releng) config
|
||||
cp -r /archiso/configs/releng/* .
|
||||
|
||||
# Add our needed packages to packages.x86_64
|
||||
printf '%s\n' "${arch_packages[@]}" >>"packages.x86_64"
|
||||
|
||||
# Retrieve the latest configurator for setting up user and selecting install disk.
|
||||
curl -fsSL -o "airootfs/root/configurator" \
|
||||
"https://raw.githubusercontent.com/$OMARCHY_CONFIGURATOR_REPO/$OMARCHY_CONFIGURATOR_REF/configurator"
|
||||
|
||||
echo "$OMARCHY_INSTALLER_REPO" >airootfs/root/omarchy_installer_repo.txt
|
||||
echo "$OMARCHY_INSTALLER_REF" >airootfs/root/omarchy_installer_ref.txt
|
||||
echo "$OMARCHY_INSTALLER_URL" >airootfs/root/omarchy_installer_url.txt
|
||||
|
||||
# Avoid using reflector for mirror identification as we are relying on the global CDN
|
||||
rm "airootfs/etc/systemd/system/multi-user.target.wants/reflector.service"
|
||||
rm -rf "airootfs/etc/systemd/system/reflector.service.d"
|
||||
rm -rf "airootfs/etc/xdg/reflector"
|
||||
|
||||
# Ensure the Omarchy installer launches automatically on boot
|
||||
cp /builder/cmds/autostart.sh airootfs/root/.automated_script.sh
|
||||
|
||||
# Patch the default archiso install files
|
||||
for patch in /builder/patches/*.patch; do
|
||||
git apply "$patch"
|
||||
done
|
||||
|
||||
# Remove the default motd
|
||||
rm airootfs/etc/motd
|
||||
|
||||
# Finally, we assemble the entire ISO
|
||||
mkarchiso -v -w "$cache_dir/work/" -o "/out/" "$cache_dir/"
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/pacman.conf
|
||||
+++ b/pacman.conf
|
||||
@@ -31,7 +31,7 @@ Architecture = auto
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
#Color
|
||||
-#NoProgressBar
|
||||
+NoProgressBar
|
||||
# We cannot check disk space from within a chroot environment
|
||||
#CheckSpace
|
||||
#VerbosePkgLists
|
||||
@@ -1,8 +0,0 @@
|
||||
--- a/efiboot/loader/loader.conf
|
||||
+++ b/efiboot/loader/loader.conf
|
||||
@@ -1,3 +1,3 @@
|
||||
-timeout 15
|
||||
+timeout 0
|
||||
default 01-archiso-x86_64-linux.conf
|
||||
-beep on
|
||||
+beep off
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/grub/grub.cfg
|
||||
+++ b/grub/grub.cfg
|
||||
@@ -45,8 +45,8 @@ fi
|
||||
|
||||
# Set default menu entry
|
||||
default=archlinux
|
||||
-timeout=15
|
||||
-timeout_style=menu
|
||||
+timeout=0
|
||||
+timeout_style=hidden
|
||||
|
||||
|
||||
# Menu entries
|
||||
@@ -1,10 +0,0 @@
|
||||
--- a/pacman.conf
|
||||
+++ b/pacman.conf
|
||||
@@ -98,3 +98,7 @@ Include = /etc/pacman.d/mirrorlist
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
+
|
||||
+[omarchy]
|
||||
+SigLevel = Optional TrustAll
|
||||
+Server = https://pkgs.omarchy.org/$arch
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/pacman.conf
|
||||
+++ b/pacman.conf
|
||||
@@ -90,8 +90,8 @@ Include = /etc/pacman.d/mirrorlist
|
||||
#[multilib-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
-#[multilib]
|
||||
-#Include = /etc/pacman.d/mirrorlist
|
||||
+[multilib]
|
||||
+Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
@@ -1,29 +0,0 @@
|
||||
--- a/pacman.conf
|
||||
+++ b/pacman.conf
|
||||
@@ -75,14 +75,14 @@ LocalFileSigLevel = Optional
|
||||
#[core-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
-[core]
|
||||
-Include = /etc/pacman.d/mirrorlist
|
||||
+# [core]
|
||||
+# Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[extra-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
-[extra]
|
||||
-Include = /etc/pacman.d/mirrorlist
|
||||
+# [extra]
|
||||
+# Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the multilib repositories as required here.
|
||||
@@ -98,3 +98,7 @@ Include = /etc/pacman.d/mirrorlist
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
+
|
||||
+[offline]
|
||||
+SigLevel = Optional TrustAll
|
||||
+Server = file:///var/cache/omarchy/mirror/offline/
|
||||
@@ -1,43 +0,0 @@
|
||||
--- a/profiledef.sh
|
||||
+++ b/profiledef.sh
|
||||
@@ -1,27 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
-iso_name="archlinux"
|
||||
+iso_name="omarchy"
|
||||
iso_label="ARCH_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
|
||||
-iso_publisher="Arch Linux <https://archlinux.org>"
|
||||
-iso_application="Arch Linux Live/Rescue DVD"
|
||||
+iso_publisher="Omarchy <https://omarchy.org>"
|
||||
+iso_application="Omarchy Installer"
|
||||
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
|
||||
install_dir="arch"
|
||||
buildmodes=('iso')
|
||||
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
|
||||
- 'uefi-ia32.systemd-boot.esp' 'uefi-x64.systemd-boot.esp'
|
||||
- 'uefi-ia32.systemd-boot.eltorito' 'uefi-x64.systemd-boot.eltorito')
|
||||
+ 'uefi-ia32.systemd-boot.esp' 'uefi-x64.systemd-boot.esp'
|
||||
+ 'uefi-ia32.systemd-boot.eltorito' 'uefi-x64.systemd-boot.eltorito')
|
||||
arch="x86_64"
|
||||
pacman_conf="pacman.conf"
|
||||
airootfs_image_type="squashfs"
|
||||
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
|
||||
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
|
||||
file_permissions=(
|
||||
- ["/etc/shadow"]="0:0:400"
|
||||
- ["/root"]="0:0:750"
|
||||
- ["/root/.automated_script.sh"]="0:0:755"
|
||||
- ["/root/.gnupg"]="0:0:700"
|
||||
- ["/usr/local/bin/choose-mirror"]="0:0:755"
|
||||
- ["/usr/local/bin/Installation_guide"]="0:0:755"
|
||||
- ["/usr/local/bin/livecd-sound"]="0:0:755"
|
||||
+ ["/etc/shadow"]="0:0:400"
|
||||
+ ["/root"]="0:0:750"
|
||||
+ ["/root/.automated_script.sh"]="0:0:755"
|
||||
+ ["/root/.gnupg"]="0:0:700"
|
||||
+ ["/usr/local/bin/choose-mirror"]="0:0:755"
|
||||
+ ["/root/configurator"]="0:0:755"
|
||||
+ ["/var/cache/omarchy/mirror/offline/"]="0:0:775"
|
||||
+ ["/usr/bin/tte"]="0:0:755"
|
||||
)
|
||||
@@ -31,8 +31,12 @@ set_tokyo_night_colors() {
|
||||
run_configurator() {
|
||||
set -euo pipefail
|
||||
|
||||
# Configurator for user information, disk selection, and wifi configuration
|
||||
NETWORK_NOT_NEEDED=true ./configurator
|
||||
# Check if this is an online or offline build
|
||||
if [ "${OMARCHY_INSTALL_MODE:-offline}" = "online" ]; then
|
||||
./configurator
|
||||
else
|
||||
NETWORK_NOT_NEEDED=true ./configurator
|
||||
fi
|
||||
|
||||
# Get username from installer config for reliable error recovery
|
||||
export OMARCHY_USER="$(jq -r '.users[0].username' user_credentials.json)"
|
||||
@@ -97,11 +101,13 @@ chroot_bash() {
|
||||
HOME=/home/$OMARCHY_USER \
|
||||
arch-chroot -u $OMARCHY_USER /mnt/ \
|
||||
env OMARCHY_CHROOT_INSTALL=1 \
|
||||
OMARCHY_OFFLINE_INSTALL=1 \
|
||||
OMARCHY_INSTALL_MODE="${OMARCHY_INSTALL_MODE:-offline}" \
|
||||
OMARCHY_USER_NAME="$(<user_full_name.txt)" \
|
||||
OMARCHY_USER_EMAIL="$(<user_email_address.txt)" \
|
||||
USER="$OMARCHY_USER" \
|
||||
HOME="/home/$OMARCHY_USER" \
|
||||
OMARCHY_REPO="$(<omarchy_installer_repo.txt)" \
|
||||
OMARCHY_REF="$(<omarchy_installer_ref.txt)" \
|
||||
/bin/bash "$@"
|
||||
}
|
||||
|
||||
@@ -110,7 +116,13 @@ if [[ $(tty) == "/dev/tty1" ]]; then
|
||||
export LOG_FILE="/var/log/omarchy-install.log"
|
||||
export OMARCHY_PATH="/root/omarchy"
|
||||
export OMARCHY_INSTALL="/root/omarchy/install"
|
||||
export OMARCHY_OFFLINE_INSTALL=1
|
||||
|
||||
# Set install mode based on build mode file, default to offline
|
||||
if [ -f /root/omarchy_install_mode.txt ]; then
|
||||
export OMARCHY_INSTALL_MODE="$(cat /root/omarchy_install_mode.txt)"
|
||||
else
|
||||
export OMARCHY_INSTALL_MODE="offline"
|
||||
fi
|
||||
|
||||
source "$OMARCHY_INSTALL/preflight/set-size-vars.sh"
|
||||
source "$OMARCHY_INSTALL/helpers/ansi-codes.sh"
|
||||
|
||||
@@ -14,14 +14,24 @@ SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
[core]
|
||||
Server = https://mirror.omarchy.org/$repo/os/$arch
|
||||
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
|
||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Server = https://mirror.omarchy.org/$repo/os/$arch
|
||||
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
|
||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Server = https://mirror.omarchy.org/$repo/os/$arch
|
||||
Server = https://mirror.rackspace.com/archlinux/$repo/os/$arch
|
||||
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[omarchy]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = https://pkgs.omarchy.org/$arch
|
||||
|
||||