fix: rewrite netinstall and calamares launcher
- netinstall.conf: add required:true, file:// prefix, label config - netinstall.yaml: flat group structure with proper DE package lists - settings_online.conf: fix netinstall exec ordering - calamares-next.sh: comprehensive yad-based launcher with logging - PKGBUILD: pkgrel 9, yad as dependency
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
pkgname=calamares-branding-antergos-next
|
||||
pkgver=1.0
|
||||
pkgrel=8
|
||||
pkgrel=9
|
||||
pkgdesc="Calamares branding for Antergos NeXT with offline/online installer support"
|
||||
arch=('any')
|
||||
url="https://github.com/Antergos-NeXT"
|
||||
license=('GPL3')
|
||||
depends=('calamares')
|
||||
optdepends=('zenity: graphical mode chooser dialog')
|
||||
depends=('calamares' 'yad')
|
||||
optdepends=('zenity: fallback for graphical mode chooser dialog')
|
||||
source=("branding.desc"
|
||||
"stylesheet.qss"
|
||||
"show.qml"
|
||||
|
||||
@@ -1,64 +1,198 @@
|
||||
#!/bin/bash
|
||||
# Antergos NeXT Installer Launcher
|
||||
# Presents offline/online choice and launches Calamares with the right config
|
||||
|
||||
set -e
|
||||
# Antergos NeXT Calamares Installer Launcher
|
||||
|
||||
# Prefer zenity (GTK), fall back to dialog (curses)
|
||||
if command -v zenity &>/dev/null; then
|
||||
DIALOG="zenity"
|
||||
elif command -v kdialog &>/dev/null; then
|
||||
DIALOG="kdialog"
|
||||
else
|
||||
DIALOG=""
|
||||
fi
|
||||
GUIDIE() {
|
||||
echo "calamares-next: $1" | sed -e 's|<tt>||g' -e 's|</tt>||g'
|
||||
|
||||
# Check for internet connectivity
|
||||
check_net() {
|
||||
ping -c 1 -W 2 archlinux.org &>/dev/null
|
||||
local prog=yad
|
||||
command -v yad &>/dev/null || prog=zenity
|
||||
|
||||
local cmd=(
|
||||
"$prog" --form --title="Error detected"
|
||||
--text="<b>calamares-next:</b>\n$1\n"
|
||||
--image=dialog-error
|
||||
--button=yad-quit:1
|
||||
)
|
||||
"${cmd[@]}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
CHOICE=""
|
||||
if [ -n "$DIALOG" ]; then
|
||||
if [ "$DIALOG" = "zenity" ]; then
|
||||
CHOICE=$(zenity --list \
|
||||
--title="Antergos NeXT Installer" \
|
||||
--text="Choose installation mode:" \
|
||||
--width=500 --height=300 \
|
||||
--column="Mode" --column="Description" \
|
||||
"Offline" "Install GNOME desktop from the live ISO. No internet required." \
|
||||
"Online" "Choose a desktop environment and install from the internet.")
|
||||
else
|
||||
CHOICE=$(kdialog --menu "Antergos NeXT Installer\nChoose installation mode:" \
|
||||
"Offline" "Install GNOME desktop from the live ISO. No internet required." \
|
||||
"Online" "Choose a desktop environment and install from the internet.")
|
||||
fi
|
||||
else
|
||||
echo "Antergos NeXT Installer"
|
||||
echo "======================"
|
||||
echo "1) Offline — Install GNOME from ISO (no internet)"
|
||||
echo "2) Online — Choose DE and install from internet"
|
||||
echo ""
|
||||
read -rp "Choice [1]: " n
|
||||
case "$n" in
|
||||
2|online|Online) CHOICE="Online" ;;
|
||||
*) CHOICE="Offline" ;;
|
||||
esac
|
||||
fi
|
||||
FollowFile() {
|
||||
local tailfile="$1"
|
||||
local term_title="$2"
|
||||
local xpos="$3"
|
||||
local ypos="$4"
|
||||
|
||||
case "$CHOICE" in
|
||||
"Online")
|
||||
# Online mode: use netinstall for DE selection, no unpackfs
|
||||
if ! check_net; then
|
||||
if [ -n "$DIALOG" ]; then
|
||||
"$DIALOG" --error --text="No internet connection detected.\n\nOnline installation requires a working network connection.\nPlease connect to the internet and try again."
|
||||
fi
|
||||
exit 1
|
||||
case "$CurrentDesktop" in
|
||||
xfce) xfce4-terminal -T "$term_title" --geometry="120x20+$xpos+$ypos" -x tail -f "$tailfile" & ;;
|
||||
kde) setsid konsole -e tail -f "$tailfile" &> /dev/null ;;
|
||||
esac
|
||||
}
|
||||
|
||||
CatchChrootedPacmanLog() {
|
||||
local pacmanlog=""
|
||||
local lockfile="$HOME/.$progname.lck"
|
||||
|
||||
while true ; do
|
||||
sleep 2
|
||||
pacmanlog="$(/usr/bin/ls -1 /tmp/calamares-root-*/var/log/pacman.log 2>/dev/null | /usr/bin/tail -n 1)"
|
||||
if [ -n "$pacmanlog" ] ; then
|
||||
[ -r "$lockfile" ] && return
|
||||
/usr/bin/touch "$lockfile"
|
||||
FollowFile "$pacmanlog" "Pacman log" 400 50
|
||||
break
|
||||
fi
|
||||
exec calamares -c /etc/calamares-online
|
||||
;;
|
||||
*)
|
||||
# Offline mode: use unpackfs with GNOME squashfs
|
||||
exec calamares -c /etc/calamares-offline
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
LogHeader() {
|
||||
local calamares_version date
|
||||
calamares_version="$(pacman -Q calamares 2>/dev/null | awk '{print $NF}')"
|
||||
date=$(date -u "+%x %X")
|
||||
|
||||
cat <<EOF > $log
|
||||
########## $log by calamares-next
|
||||
########## Started (UTC): $date
|
||||
########## Install mode: $mode
|
||||
########## Calamares version: $calamares_version
|
||||
EOF
|
||||
}
|
||||
|
||||
InstallLog_Start() {
|
||||
LogHeader
|
||||
|
||||
if [ "$ShowInstallLog" = "TRUE" ] ; then
|
||||
FollowFile "$log" "Install log" 20 20
|
||||
fi
|
||||
}
|
||||
|
||||
Calamares_Start() {
|
||||
local kdesu=/usr/lib/kf6/kdesu
|
||||
[ -x $kdesu ] || kdesu=kdesu
|
||||
|
||||
case "$CurrentDesktop" in
|
||||
kde) $kdesu -t -c "calamares -D8" >> $log & ;;
|
||||
*) pkexec calamares -D8 >> $log & ;;
|
||||
esac
|
||||
}
|
||||
|
||||
AskMode() {
|
||||
local ICO="/usr/share/calamares/branding/antergos-next/antergos-icon.png"
|
||||
[ -f "$ICO" ] || ICO="system-software-install"
|
||||
|
||||
local cmd=(
|
||||
yad --form
|
||||
--title="Antergos NeXT Installer"
|
||||
--text="Choose installation mode:"
|
||||
--image="$ICO"
|
||||
--columns=2 --borders=10 --homogeneous
|
||||
--height=180 --width=600 --scroll
|
||||
--buttons-layout=spread
|
||||
)
|
||||
|
||||
if [ "$has_connection" = yes ] ; then
|
||||
cmd+=(
|
||||
--field="Online: Full desktop selection from the internet\nChoose your desktop environment, customize packages,\nget the latest updates.":LBL ""
|
||||
--field="Offline: Quick install from the live ISO\nInstall GNOME desktop directly from the ISO.\nNo internet required.":LBL ""
|
||||
--button="Online":11
|
||||
--button="Offline":13
|
||||
)
|
||||
else
|
||||
cmd+=(
|
||||
--field="Offline: Quick install from the live ISO\nInstall GNOME desktop directly from the ISO.":LBL ""
|
||||
--button="Offline":13
|
||||
)
|
||||
fi
|
||||
|
||||
"${cmd[@]}"
|
||||
}
|
||||
|
||||
InstallWithLogs() {
|
||||
InstallLog_Start
|
||||
Calamares_Start
|
||||
|
||||
if [ "$ShowPacmanLog" = "FALSE" ] ; then
|
||||
sleep 5
|
||||
return
|
||||
fi
|
||||
|
||||
case "$mode" in
|
||||
online) CatchChrootedPacmanLog ;;
|
||||
offline) CatchChrootedPacmanLog ;;
|
||||
esac
|
||||
}
|
||||
|
||||
SetConfig() {
|
||||
local cfolder=/etc/calamares
|
||||
|
||||
case "$mode" in
|
||||
online)
|
||||
sudo cp "$cfolder/settings_online.conf" "$cfolder/settings.conf"
|
||||
PreLog "Using online settings"
|
||||
;;
|
||||
offline)
|
||||
sudo cp "$cfolder/settings_offline.conf" "$cfolder/settings.conf"
|
||||
PreLog "Using offline settings"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
PreLog() {
|
||||
echo "==> $1" >> "$prelogfile"
|
||||
}
|
||||
|
||||
Main() {
|
||||
progname="${0##*/}"
|
||||
has_connection=no
|
||||
show_mode=yes
|
||||
|
||||
[ -x /usr/bin/calamares ] || GUIDIE "<tt>/usr/bin/calamares</tt> is needed for installing Antergos NeXT"
|
||||
|
||||
ping -c 1 -W 2 archlinux.org &>/dev/null && has_connection=yes
|
||||
|
||||
local CurrentDesktop=""
|
||||
if [ "$XDG_CURRENT_DESKTOP" ]; then
|
||||
CurrentDesktop=$(echo "$XDG_CURRENT_DESKTOP" | tr '[:upper:]' '[:lower:]')
|
||||
elif [ "$DESKTOP_SESSION" ]; then
|
||||
CurrentDesktop=$(echo "$DESKTOP_SESSION" | tr '[:upper:]' '[:lower:]')
|
||||
fi
|
||||
|
||||
local ShowInstallLog="FALSE"
|
||||
local ShowPacmanLog="FALSE"
|
||||
local Home=/home/liveuser
|
||||
local log=$Home/antergos-install.log
|
||||
local cfolder=/etc/calamares
|
||||
local workdir=""
|
||||
local prelogfile=""
|
||||
|
||||
workdir="$Home/work.$progname.xyz"
|
||||
mkdir -p "$workdir"
|
||||
|
||||
prelogfile="$workdir/preliminary.log"
|
||||
rm -f "$prelogfile"
|
||||
|
||||
if [ "$show_mode" = yes ] ; then
|
||||
AskMode
|
||||
ret=$?
|
||||
case $ret in
|
||||
11) mode=online ;;
|
||||
13) mode=offline ;;
|
||||
*) exit $ret ;;
|
||||
esac
|
||||
else
|
||||
mode=offline
|
||||
fi
|
||||
|
||||
case "$mode" in
|
||||
online|offline)
|
||||
SetConfig
|
||||
InstallWithLogs
|
||||
;;
|
||||
*)
|
||||
GUIDIE "unsupported mode '$mode'"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
Main "$@"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
---
|
||||
groupsUrl: /etc/calamares/modules/netinstall.yaml
|
||||
operation: install
|
||||
groupsUrl:
|
||||
- file:///etc/calamares/modules/netinstall.yaml
|
||||
required: true
|
||||
label:
|
||||
sidebar: "Packages"
|
||||
title: "Packages (select your desktop environment and additional packages)"
|
||||
|
||||
@@ -1,76 +1,219 @@
|
||||
---
|
||||
- name: "Desktop Environments"
|
||||
description: "Select the desktop environment to install. Choose one."
|
||||
- name: "KDE Plasma"
|
||||
description: "Full-featured, modern desktop with KDE Plasma and applications"
|
||||
selected: false
|
||||
hidden: false
|
||||
immutable: false
|
||||
critical: false
|
||||
subgroups:
|
||||
- name: "KDE Plasma"
|
||||
description: "Full-featured, modern desktop with KDE applications"
|
||||
packages:
|
||||
- plasma-meta
|
||||
- kde-applications-meta
|
||||
selected: false
|
||||
critical: false
|
||||
- name: "GNOME"
|
||||
description: "Modern and streamlined desktop environment"
|
||||
packages:
|
||||
- gnome
|
||||
- gnome-tweaks
|
||||
- gnome-shell-extensions
|
||||
selected: true
|
||||
critical: false
|
||||
- name: "Xfce"
|
||||
description: "Fast and lightweight classic desktop"
|
||||
packages:
|
||||
- xfce4
|
||||
- xfce4-goodies
|
||||
selected: false
|
||||
critical: false
|
||||
- name: "Budgie"
|
||||
description: "Elegant and simple desktop environment"
|
||||
packages:
|
||||
- budgie-desktop
|
||||
- budgie-desktop-view
|
||||
- budgie-screensaver
|
||||
selected: false
|
||||
critical: false
|
||||
- name: "Cinnamon"
|
||||
description: "Traditional desktop with modern conventions"
|
||||
packages:
|
||||
- cinnamon
|
||||
- cinnamon-translations
|
||||
selected: false
|
||||
critical: false
|
||||
- name: "MATE"
|
||||
description: "Intuitive and attractive classic desktop"
|
||||
packages:
|
||||
- mate
|
||||
- mate-extra
|
||||
selected: false
|
||||
critical: false
|
||||
- name: "LXQt"
|
||||
description: "Lightweight Qt desktop environment"
|
||||
packages:
|
||||
- lxqt
|
||||
- lxqt-connman-applet
|
||||
- oxygen-icons
|
||||
selected: false
|
||||
critical: false
|
||||
- name: "i3 / Sway"
|
||||
description: "Tiling window managers for power users"
|
||||
packages:
|
||||
- i3-wm
|
||||
- i3status
|
||||
- i3lock
|
||||
- dmenu
|
||||
- sway
|
||||
- waybar
|
||||
- wofi
|
||||
selected: false
|
||||
critical: false
|
||||
|
||||
packages:
|
||||
- ark
|
||||
- bluedevil
|
||||
- breeze-gtk
|
||||
- dolphin
|
||||
- dolphin-plugins
|
||||
- ffmpegthumbs
|
||||
- gwenview
|
||||
- kate
|
||||
- kcalc
|
||||
- kde-cli-tools
|
||||
- kde-gtk-config
|
||||
- kdeconnect
|
||||
- kdegraphics-thumbnailers
|
||||
- kdenetwork-filesharing
|
||||
- kdeplasma-addons
|
||||
- kinfocenter
|
||||
- kio-admin
|
||||
- kio-extras
|
||||
- kio-fuse
|
||||
- konsole
|
||||
- kscreen
|
||||
- kwallet-pam
|
||||
- kwayland-integration
|
||||
- okular
|
||||
- partitionmanager
|
||||
- plasma-browser-integration
|
||||
- plasma-desktop
|
||||
- plasma-disks
|
||||
- plasma-nm
|
||||
- plasma-pa
|
||||
- plasma-systemmonitor
|
||||
- plasma-workspace
|
||||
- powerdevil
|
||||
- print-manager
|
||||
- qt6-imageformats
|
||||
- spectacle
|
||||
- xdg-desktop-portal-kde
|
||||
- xsettingsd
|
||||
- name: "GNOME"
|
||||
description: "Modern and streamlined desktop environment"
|
||||
selected: true
|
||||
critical: false
|
||||
packages:
|
||||
- adwaita-icon-theme
|
||||
- evince
|
||||
- file-roller
|
||||
- gdm
|
||||
- gnome-calculator
|
||||
- gnome-clocks
|
||||
- gnome-console
|
||||
- gnome-control-center
|
||||
- gnome-disk-utility
|
||||
- gnome-keyring
|
||||
- gnome-shell
|
||||
- gnome-system-monitor
|
||||
- gnome-terminal
|
||||
- gnome-text-editor
|
||||
- gnome-themes-extra
|
||||
- gnome-tweaks
|
||||
- gvfs
|
||||
- gvfs-afc
|
||||
- gvfs-gphoto2
|
||||
- gvfs-mtp
|
||||
- gvfs-nfs
|
||||
- gvfs-smb
|
||||
- loupe
|
||||
- nautilus
|
||||
- sushi
|
||||
- xdg-desktop-portal-gnome
|
||||
- xdg-user-dirs-gtk
|
||||
- name: "Xfce"
|
||||
description: "Fast and lightweight classic desktop"
|
||||
selected: false
|
||||
critical: false
|
||||
packages:
|
||||
- blueman
|
||||
- file-roller
|
||||
- galculator
|
||||
- gvfs
|
||||
- gvfs-afc
|
||||
- gvfs-gphoto2
|
||||
- gvfs-mtp
|
||||
- gvfs-nfs
|
||||
- gvfs-smb
|
||||
- lightdm
|
||||
- lightdm-slick-greeter
|
||||
- mousepad
|
||||
- network-manager-applet
|
||||
- parole
|
||||
- ristretto
|
||||
- thunar-archive-plugin
|
||||
- thunar-media-tags-plugin
|
||||
- xdg-user-dirs-gtk
|
||||
- xfce4
|
||||
- xfce4-battery-plugin
|
||||
- xfce4-mount-plugin
|
||||
- xfce4-netload-plugin
|
||||
- xfce4-notifyd
|
||||
- xfce4-pulseaudio-plugin
|
||||
- xfce4-screensaver
|
||||
- xfce4-screenshooter
|
||||
- xfce4-taskmanager
|
||||
- xfce4-whiskermenu-plugin
|
||||
- name: "Budgie"
|
||||
description: "Elegant and simple desktop environment"
|
||||
selected: false
|
||||
critical: false
|
||||
packages:
|
||||
- budgie-desktop
|
||||
- budgie-desktop-view
|
||||
- budgie-extras
|
||||
- eog
|
||||
- file-roller
|
||||
- gedit
|
||||
- gnome-keyring
|
||||
- gnome-terminal
|
||||
- gvfs
|
||||
- gvfs-afc
|
||||
- gvfs-gphoto2
|
||||
- gvfs-mtp
|
||||
- gvfs-nfs
|
||||
- gvfs-smb
|
||||
- lightdm
|
||||
- lightdm-slick-greeter
|
||||
- mutter
|
||||
- nemo
|
||||
- nemo-fileroller
|
||||
- network-manager-applet
|
||||
- xdg-user-dirs-gtk
|
||||
- name: "Cinnamon"
|
||||
description: "Traditional desktop with modern conventions"
|
||||
selected: false
|
||||
critical: false
|
||||
packages:
|
||||
- cinnamon
|
||||
- cinnamon-translations
|
||||
- file-roller
|
||||
- galculator
|
||||
- gnome-system-monitor
|
||||
- gnome-terminal
|
||||
- gvfs
|
||||
- gvfs-afc
|
||||
- gvfs-gphoto2
|
||||
- gvfs-mtp
|
||||
- gvfs-nfs
|
||||
- gvfs-smb
|
||||
- lightdm
|
||||
- lightdm-slick-greeter
|
||||
- nemo-fileroller
|
||||
- xdg-user-dirs-gtk
|
||||
- name: "MATE"
|
||||
description: "Intuitive and attractive classic desktop"
|
||||
selected: false
|
||||
critical: false
|
||||
packages:
|
||||
- gvfs
|
||||
- gvfs-afc
|
||||
- gvfs-gphoto2
|
||||
- gvfs-mtp
|
||||
- gvfs-nfs
|
||||
- gvfs-smb
|
||||
- lightdm
|
||||
- lightdm-slick-greeter
|
||||
- mate
|
||||
- mate-extra
|
||||
- network-manager-applet
|
||||
- xdg-user-dirs-gtk
|
||||
- name: "LXQt"
|
||||
description: "Lightweight Qt desktop environment"
|
||||
selected: false
|
||||
critical: false
|
||||
packages:
|
||||
- breeze
|
||||
- breeze-gtk
|
||||
- featherpad
|
||||
- gvfs
|
||||
- gvfs-mtp
|
||||
- libstatgrab
|
||||
- libsysstat
|
||||
- lm_sensors
|
||||
- lxqt
|
||||
- lxqt-archiver
|
||||
- network-manager-applet
|
||||
- oxygen-icons
|
||||
- pavucontrol-qt
|
||||
- print-manager
|
||||
- xdg-utils
|
||||
- xsettingsd
|
||||
- name: "i3 / Sway"
|
||||
description: "Tiling window managers for power users"
|
||||
selected: false
|
||||
critical: false
|
||||
packages:
|
||||
- dmenu
|
||||
- dunst
|
||||
- feh
|
||||
- galculator
|
||||
- gvfs
|
||||
- gvfs-afc
|
||||
- gvfs-gphoto2
|
||||
- gvfs-mtp
|
||||
- gvfs-nfs
|
||||
- gvfs-smb
|
||||
- i3-wm
|
||||
- i3lock
|
||||
- i3status
|
||||
- lightdm
|
||||
- lightdm-slick-greeter
|
||||
- sway
|
||||
- waybar
|
||||
- wofi
|
||||
- name: "Base System"
|
||||
description: "Core system packages for a functional Arch Linux installation"
|
||||
selected: true
|
||||
@@ -92,7 +235,6 @@
|
||||
- which
|
||||
- man-db
|
||||
- man-pages
|
||||
|
||||
- name: "Antergos Packages"
|
||||
description: "Antergos NeXT branding and tools"
|
||||
selected: true
|
||||
@@ -106,12 +248,9 @@
|
||||
- calamares
|
||||
- calamares-branding-antergos-next
|
||||
- firefox
|
||||
|
||||
- name: "Hardware Support"
|
||||
description: "Additional hardware drivers and firmware"
|
||||
selected: false
|
||||
hidden: false
|
||||
immutable: false
|
||||
critical: false
|
||||
packages:
|
||||
- mesa
|
||||
|
||||
@@ -29,7 +29,6 @@ sequence:
|
||||
- services-systemd
|
||||
- grubcfg
|
||||
- bootloader
|
||||
- packages
|
||||
- removeuser
|
||||
- umount
|
||||
- show:
|
||||
|
||||
Reference in New Issue
Block a user