Unify builds
No files matched your search
@@ -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,27 +0,0 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
[options]
|
||||
HoldPkg = pacman glibc
|
||||
Architecture = auto
|
||||
ParallelDownloads = 5
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[omarchy]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = https://pkgs.omarchy.org/$arch
|
||||
@@ -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"
|
||||
)
|
||||