Rearrange and simplify ISO setup
This commit is contained in:
1 parent
a534205c19
commit
ea707f677d
24 files changed
+371
-231
No files matched your search
+36
-59
@@ -42,21 +42,19 @@ prepare_offline_mirror() {
|
||||
# Start with base ISO packages (including our arch_packages already appended)
|
||||
all_packages=($(cat "$build_cache_dir/packages.x86_64"))
|
||||
|
||||
# Add packages from omarchy and archinstall
|
||||
[ -f /builder/packages/omarchy.packages ] && all_packages+=($(grep -v '^#' /builder/packages/omarchy.packages | grep -v '^$'))
|
||||
[ -f /builder/packages/archinstall.packages ] && all_packages+=($(grep -v '^#' /builder/packages/archinstall.packages | grep -v '^$'))
|
||||
# Add packages from the omarchy installer's unified package list
|
||||
all_packages+=($(grep -v '^#' "$build_cache_dir/airootfs/root/omarchy/install/omarchy-base.packages" | grep -v '^$'))
|
||||
all_packages+=($(grep -v '^#' "$build_cache_dir/airootfs/root/omarchy/install/omarchy-other.packages" | grep -v '^$'))
|
||||
|
||||
# Add archinstall needed packages
|
||||
all_packages+=($(grep -v '^#' /builder/packages/archinstall.packages | grep -v '^$'))
|
||||
|
||||
if [ ${#all_packages[@]} -gt 0 ]; then
|
||||
# This assume we've manually built all the AUR packages
|
||||
# and made them accessible "online" during the build process:
|
||||
(cd $build_cache_dir/ && git apply /builder/patches/offline/aur-mirror.patch)
|
||||
(cd $build_cache_dir/ && git apply /builder/patches/offline/enable-multilib.patch)
|
||||
|
||||
mkdir -p /tmp/offlinedb
|
||||
|
||||
# Download all the paclibffikages to the offline mirror inside the ISO
|
||||
# Download all the packages to the offline mirror inside the ISO
|
||||
echo "Downloading all packages (including AUR) to offline mirror: ${all_packages[@]}"
|
||||
pacman --config $build_cache_dir/pacman.conf \
|
||||
pacman --config /builder/pacman-mirror.conf \
|
||||
--noconfirm -Syw "${all_packages[@]}" \
|
||||
--cachedir $offline_mirror_dir/ \
|
||||
--dbpath /tmp/offlinedb
|
||||
@@ -64,10 +62,6 @@ prepare_offline_mirror() {
|
||||
repo-add --new "$offline_mirror_dir/offline.db.tar.gz" "$offline_mirror_dir/"*.pkg.tar.zst
|
||||
|
||||
rm "$build_cache_dir/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook"
|
||||
|
||||
# Revert the "online" AUR patch, as we'll replace it with the proper
|
||||
# offline patched mirror for the ISO later.
|
||||
(cd $build_cache_dir && git apply -R /builder/patches/offline/aur-mirror.patch)
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -82,24 +76,37 @@ make_archiso_offline() {
|
||||
rm -rf "$build_cache_dir/airootfs/etc/xdg/reflector"
|
||||
}
|
||||
|
||||
#######################
|
||||
# Build process start
|
||||
#######################
|
||||
|
||||
mkdir -p $build_cache_dir/
|
||||
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/
|
||||
rm "$build_cache_dir/airootfs/etc/motd"
|
||||
|
||||
# Add our needed packages to packages.x86_64 right away
|
||||
# Bring in our configs
|
||||
cp -r /configs/* $build_cache_dir/
|
||||
cat $build_cache_dir/grub/grub.cfg
|
||||
|
||||
# Clone Omarchy itself
|
||||
git clone -b $OMARCHY_INSTALLER_REF https://github.com/$OMARCHY_INSTALLER_REPO.git "$build_cache_dir/airootfs/root/omarchy"
|
||||
|
||||
# Make log uploader available in the ISO too
|
||||
mkdir -p "$build_cache_dir/airootfs/usr/local/bin/"
|
||||
cp "$build_cache_dir/airootfs/root/omarchy/bin/omarchy-upload-log" "$build_cache_dir/airootfs/usr/local/bin/omarchy-upload-log"
|
||||
|
||||
# Download the configurator
|
||||
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"
|
||||
|
||||
# Add our additional packages to packages.x86_64
|
||||
printf '%s\n' "${arch_packages[@]}" >>"$build_cache_dir/packages.x86_64"
|
||||
|
||||
# Apply all the general patches early (same as online.sh)
|
||||
# Need to do this from the cache_dir
|
||||
cd $build_cache_dir
|
||||
for patch in /builder/patches/*.patch; do
|
||||
git apply "$patch"
|
||||
done
|
||||
cd -
|
||||
|
||||
prepare_offline_mirror
|
||||
make_archiso_offline
|
||||
|
||||
@@ -113,49 +120,19 @@ else
|
||||
echo "Ruby tarball already cached, skipping download"
|
||||
fi
|
||||
|
||||
# Insert the configurator in the root users home folder (default user in the official releng ISO profile).
|
||||
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"
|
||||
|
||||
# Clone Omarchy itself
|
||||
git clone -b $OMARCHY_INSTALLER_REF https://github.com/$OMARCHY_INSTALLER_REPO.git "$build_cache_dir/airootfs/root/omarchy"
|
||||
|
||||
# Copy icons to the airootfs for offline installation
|
||||
mkdir -p "$build_cache_dir/airootfs/root/.local/share/applications/icons"
|
||||
cp /builder/icons/*.png "$build_cache_dir/airootfs/root/.local/share/applications/icons/"
|
||||
|
||||
# Copy the autostart script (we'll need to create an offline version)
|
||||
cp /builder/cmds/autostart-offline.sh $build_cache_dir/airootfs/root/.automated_script.sh
|
||||
|
||||
# Copy the log upload utility to /usr/local/bin
|
||||
mkdir -p "$build_cache_dir/airootfs/usr/local/bin"
|
||||
cp /builder/cmds/omarchy-upload-install-log "$build_cache_dir/airootfs/usr/local/bin/"
|
||||
chmod +x "$build_cache_dir/airootfs/usr/local/bin/omarchy-upload-install-log"
|
||||
|
||||
# Remove the default motd
|
||||
rm "$build_cache_dir/airootfs/etc/motd"
|
||||
|
||||
# Ensure pacman cache directory exists with proper permissions
|
||||
mkdir -p "$build_cache_dir/airootfs/var/cache/pacman/pkg"
|
||||
chmod 755 "$build_cache_dir/airootfs/var/cache/pacman/pkg"
|
||||
|
||||
# Install Python packages for the installer into the ISO
|
||||
# file system.
|
||||
pip install "${python_packages[@]}"
|
||||
|
||||
# We have to do this, because `mkarchiso` copies in the pacman.conf
|
||||
# in use during the build process - so it needs to be made offline.
|
||||
(cd $build_cache_dir/ && git apply --reverse /builder/patches/offline/enable-multilib.patch)
|
||||
(cd "$build_cache_dir" && git apply /builder/patches/offline/offline-mirror.patch)
|
||||
# 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"
|
||||
|
||||
# And we also need to duplicate the offline mirror.
|
||||
# Because inside the ISO it will look for packages in /var/cache/omarchy/mirror/offline
|
||||
# but that means the build of the ISO itself will also look at this location
|
||||
# but in the container.
|
||||
# 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
|
||||
cp -r "$offline_mirror_dir" "/var/cache/omarchy/mirror/"
|
||||
ln -s "$offline_mirror_dir" "/var/cache/omarchy/mirror/offline"
|
||||
|
||||
# Finally, we assemble the entire ISO
|
||||
mkarchiso -v -w "$build_cache_dir/work/" -o "/out/" "$build_cache_dir/"
|
||||
@@ -1,169 +0,0 @@
|
||||
# Installed via install/packages.sh
|
||||
1password-beta
|
||||
1password-cli
|
||||
alacritty
|
||||
asdcontrol-git
|
||||
avahi
|
||||
base
|
||||
base-devel
|
||||
bash-completion
|
||||
bat
|
||||
blueberry
|
||||
brightnessctl
|
||||
btop
|
||||
cargo
|
||||
clang
|
||||
cups
|
||||
cups-browsed
|
||||
cups-filters
|
||||
cups-pdf
|
||||
docker
|
||||
docker-buildx
|
||||
docker-compose
|
||||
dust
|
||||
evince
|
||||
eza
|
||||
fastfetch
|
||||
fcitx5
|
||||
fcitx5-gtk
|
||||
fcitx5-qt
|
||||
fd
|
||||
ffmpegthumbnailer
|
||||
fzf
|
||||
gcc14
|
||||
github-cli
|
||||
gnome-calculator
|
||||
gnome-keyring
|
||||
gnome-themes-extra
|
||||
gum
|
||||
gvfs-mtp
|
||||
gvfs-smb
|
||||
hypridle
|
||||
hyprland
|
||||
hyprland-qtutils
|
||||
hyprlock
|
||||
hyprpicker
|
||||
hyprshot
|
||||
hyprsunset
|
||||
imagemagick
|
||||
impala
|
||||
imv
|
||||
inetutils
|
||||
intel-media-driver
|
||||
jq
|
||||
kdenlive
|
||||
kvantum-qt5
|
||||
lazydocker
|
||||
lazygit
|
||||
less
|
||||
libqalculate
|
||||
libreoffice
|
||||
libva-intel-driver
|
||||
llvm
|
||||
localsend
|
||||
luarocks
|
||||
mako
|
||||
man
|
||||
mariadb-libs
|
||||
mise
|
||||
mpv
|
||||
nautilus
|
||||
fontconfig
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
nss-mdns
|
||||
nvim
|
||||
obs-studio
|
||||
obsidian
|
||||
omarchy-chromium
|
||||
omarchy-lazyvim
|
||||
pamixer
|
||||
pinta
|
||||
playerctl
|
||||
plocate
|
||||
plymouth
|
||||
polkit-gnome
|
||||
postgresql-libs
|
||||
power-profiles-daemon
|
||||
python-gobject
|
||||
python-poetry-core
|
||||
python-terminaltexteffects
|
||||
qt5-wayland
|
||||
ripgrep
|
||||
satty
|
||||
signal-desktop
|
||||
slurp
|
||||
spotify
|
||||
starship
|
||||
sushi
|
||||
swaybg
|
||||
swayosd
|
||||
system-config-printer
|
||||
tldr
|
||||
tree-sitter-cli
|
||||
ttf-cascadia-mono-nerd
|
||||
ttf-ia-writer
|
||||
ttf-jetbrains-mono-nerd
|
||||
typora
|
||||
tzupdate
|
||||
ufw
|
||||
ufw-docker
|
||||
unzip
|
||||
uwsm
|
||||
walker-bin
|
||||
waybar
|
||||
wf-recorder
|
||||
whois
|
||||
wireless-regdb
|
||||
wiremix
|
||||
wireplumber
|
||||
wl-clip-persist
|
||||
wl-clipboard
|
||||
wl-screenrec
|
||||
woff2-font-awesome
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-hyprland
|
||||
xmlstarlet
|
||||
xournalpp
|
||||
yaru-icon-theme
|
||||
yay
|
||||
zoxide
|
||||
|
||||
# Installed elsewhere
|
||||
autoconf-archive
|
||||
btrfs-progs
|
||||
dart
|
||||
egl-wayland
|
||||
git
|
||||
gst-plugin-pipewire
|
||||
gtk4-layer-shell
|
||||
htop
|
||||
intltool
|
||||
iwd
|
||||
jdk-openjdk
|
||||
libpulse
|
||||
libsass
|
||||
libva-nvidia-driver
|
||||
limine-mkinitcpio-hook
|
||||
limine-snapper-sync
|
||||
linux
|
||||
linux-firmware
|
||||
linux-headers
|
||||
nvidia-dkms
|
||||
nvidia-open-dkms
|
||||
nvidia-utils
|
||||
lib32-nvidia-utils
|
||||
pipewire
|
||||
pipewire-alsa
|
||||
pipewire-jack
|
||||
pipewire-pulse
|
||||
qt5-remoteobjects
|
||||
qt6-wayland
|
||||
sassc
|
||||
snapper
|
||||
webp-pixbuf-loader
|
||||
wget
|
||||
yay-debug
|
||||
zram-generator
|
||||
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# /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
|
||||
Reference in new issue
Block a user