Initial overhaul and cleanup of package install.

This commit is contained in:
natemaia 2020-04-25 20:03:14 -07:00
parent c012f0d09b
commit e0efe9fd21

View File

@ -5,14 +5,14 @@
# Some ideas and code reworked from other resources
# AIF, Calamares, and the Arch Wiki.. Credit where credit is due
# shellcheck disable=SC2086,SC2046
# shellcheck disable=SC2086,SC2046,SC2254
VER=2.1.35
VER=2.1.36
# default values {
: "${DIST=ArchLabs}" # distro name if not set
: "${MNT=/mnt}" # installation root mountpoint if not set
: "${DIST=ArchLabs}" # distro name if not set
: "${MNT=/mnt}" # installation root mountpoint if not set
ANS=/tmp/ans # dialog answer output file
FONT=ter-i16n # font used for the linux console
HOOKS=shutdown # additional mkinitcpio HOOKS
@ -29,44 +29,149 @@ USER_CMD="" # optional command(s) entered by the user to
export DIALOGOPTS="--cr-wrap" # dialog environment variable to hold default options, see `man dialog`
typeset -a PACKAGES USER_PKGS
# package arrays built later from user selections
typeset -a SES_PKGS USER_PKGS
# packages installed for all installation types as a baseline
# packages installed specific to archlabs, installed when any session is chosen {
typeset -a BASE_PKGS=(
"base" "base-devel" "xorg" "xorg-drivers" "sudo" "git" "gvfs" "gtk3"
"libmad" "libmatroska" "tumbler" "ffmpeg" "gstreamer" "gst-libav" "pamixer"
"gst-plugins-base" "scrot" "gst-plugins-good" "bash-completion" "xterm"
"playerctl" "pulseaudio" "pulseaudio-alsa" "pavucontrol" "xdg-user-dirs"
)
"alsa-firmware"
"alsa-lib"
"alsa-plugins"
"archlabs-baph"
"archlabs-fonts"
"archlabs-icons"
"archlabs-keyring"
"archlabs-keyring"
"archlabs-scripts"
"archlabs-skel-base"
"archlabs-themes"
"archlabs-wallpapers"
"ffmpeg"
"gst-libav"
"gst-plugins-base"
"gst-plugins-good"
"gstreamer"
"gtk3"
"gvfs"
"libmad"
"libmatroska"
"pamixer"
"pavucontrol"
"pulseaudio"
"pulseaudio-alsa"
"scrot"
"sudo"
"xdg-user-dirs"
"xorg-drivers" # TODO: should we only install specific drivers?
"xorg-font-utils"
"xorg-iceauth"
"xorg-server"
"xorg-server-common"
"xorg-setxbkmap"
"xorg-xauth"
"xorg-xbacklight"
"xorg-xinput"
"xorg-xkbcomp"
"xorg-xkill"
"xorg-xmodmap"
"xorg-xprop"
"xorg-xrandr"
"xorg-xrdb"
"xorg-xset"
"xorg-xsetroot"
"xterm"
) # }
# packages installed specific to archlabs, installed when any session is chosen
typeset -a AL_PKGS=(
"archlabs-keyring" "archlabs-icons" "archlabs-fonts" "archlabs-themes"
"archlabs-baph" "archlabs-wallpapers" "archlabs-scripts" "archlabs-skel-base"
)
# packages installed for most window managers to provide some basic functionality
# packages installed for most window managers to provide some basic functionality {
typeset -a WM_PKGS=(
"arandr" "nitrogen" "polkit-gnome" "network-manager-applet" "feh"
"volumeicon" "xclip" "exo" "laptop-detect" "xdotool" "picom" "wmctrl"
"gnome-keyring" "dunst" "gsimplecal" "xfce4-power-manager" "xfce4-settings"
)
"arandr"
"dunst"
"exo"
"feh"
"gnome-keyring"
"gsimplecal"
"network-manager-applet"
"nitrogen"
"polkit-gnome"
"picom"
"volumeicon"
"wmctrl"
"xclip"
"xdotool"
"xfce4-power-manager"
"xfce4-settings"
) # }
# packages installed when choosing to use pacstrap
# packages installed when choosing to use pacstrap {
typeset -a ISO_PKGS=(
"arch-install-scripts" "b43-firmware" "b43-fwcutter" "broadcom-wl" "btrfs-progs"
"clonezilla" "crda" "darkhttpd" "ddrescue" "dhclient" "dhcpcd" "dialog" "diffutils"
"dmraid" "dnsmasq" "dnsutils" "dosfstools" "elinks" "ethtool" "exfat-utils" "f2fs-tools"
"fsarchiver" "ppp" "pptpclient" "reiserfsprogs" "rp-pppoe" "rsync" "sdparm" "sg3_utils"
"smartmontools" "linux-firmware" "lsscsi" "lvm2" "man-db" "man-pages" "mc" "mdadm" "mtools"
"nano" "ndisc6" "netctl" "nfs-utils" "nilfs-utils" "nmap" "ntfs-3g" "ntp" "openconnect"
"openssh" "openvpn" "p7zip" "partclone" "parted" "partimage" "gpm" "gptfdisk" "hdparm"
"htop" "ipw2100-fw" "ipw2200-fw" "irssi" "iwd" "jfsutils" "iputils" "lftp" "linux-atm"
"gnu-netcat" "tcpdump" "testdisk" "unrar" "usb_modeswitch" "usbutils" "vi" "vim" "vpnc"
"wget" "wvdial" "wireless-regdb" "wireless_tools" "wpa_supplicant" "xfsprogs" "xl2tpd"
"alsa-firmware" "alsa-lib" "alsa-plugins" "geoclue2" "lsb-release" "networkmanager"
"pacman-contrib" "reflector" "terminus-font" "ttf-dejavu" "archlabs-keyring" "lm_sensors"
)
"arch-install-scripts"
"crda"
"ddrescue"
"dhclient"
"dhcpcd"
"diffutils"
"dmraid"
"dnsmasq"
"dnsutils"
"dosfstools"
"ethtool"
"exfat-utils"
"f2fs-tools"
"fsarchiver"
"hdparm"
"iputils"
"ipw2100-fw"
"ipw2200-fw"
"iwd"
"lftp"
"linux-firmware"
"lm_sensors"
"lsb-release"
"lsscsi"
"man-db"
"man-pages"
"mdadm"
"mtools"
"nfs-utils"
"nilfs-utils"
"ntp"
"openconnect"
"openssh"
"openvpn"
"p7zip"
"pacman-contrib"
"partclone"
"parted"
"partimage"
"ppp"
"pptpclient"
"reflector"
"rp-pppoe"
"sdparm"
"sg3_utils"
"tcpdump"
"terminus-font"
"testdisk"
"ttf-dejavu"
"usb_modeswitch"
"usbutils"
"vi"
"wireless-regdb"
"wireless_tools"
"wpa_supplicant"
"wvdial"
# are these needed?
# "xl2tpd"
# "vpnc"
# "smartmontools"
# "geoclue2"
# "clonezilla"
# "darkhttpd"
# "linux-atm"
# "ndisc6"
# "netctl"
) # }
SYS_MEM="$(awk '/MemTotal/ {print int($2 / 1024) "M"}' /proc/meminfo)"
LOCALES="$(awk '/\.UTF-8/ {gsub(/# .*|#/, ""); if ($1) {print $1 " - "}}' /etc/locale.gen)"
@ -79,9 +184,11 @@ CMAPS="$(find /usr/share/kbd/keymaps -name '*.map.gz' | awk '{gsub(/\.map\.gz|.*
# commands used to install each bootloader, however most get modified during runtime {
declare -A BCMDS=(
[efistub]='efibootmgr -v -d /dev/sda -p 1 -c -l'
[grub]='grub-install --recheck --force'
[refind-efi]='refind-install'
[grub]='grub-install --recheck --force' [syslinux]='syslinux-install_update -i -a -m'
[efistub]='efibootmgr -v -d /dev/sda -p 1 -c -l' [systemd-boot]='bootctl --path=/boot install'
[syslinux]='syslinux-install_update -i -a -m'
[systemd-boot]='bootctl --path=/boot install'
) # }
# sessions that provide their own super bind and set the wallpaper {
@ -92,35 +199,71 @@ declare SELF_CONTAINED_SES='startplasma-x11|gnome-session|startdde|cinnamon-sess
# executable name for each wm/de used in ~/.xinitrc {
declare -A WM_SESSIONS=(
[dwm]='dwm' [jwm]='jwm' [i3-gaps]='i3' [bspwm]='bspwm' [awesome]='awesome' [plasma]='startplasma-x11' [xfce4]='startxfce4'
[deepin]='startdde' [gnome]='gnome-session' [fluxbox]='startfluxbox' [openbox]='openbox-session' [cinnamon]='cinnamon-session'
[awesome]='awesome'
[bspwm]='bspwm'
[cinnamon]='cinnamon-session'
[deepin]='startdde'
[dwm]='dwm'
[fluxbox]='startfluxbox'
[gnome]='gnome-session'
[i3-gaps]='i3'
[jwm]='jwm'
[openbox]='openbox-session'
[plasma]='startplasma-x11'
[xfce4]='startxfce4'
) # }
# Packages installed for each wm/de, most are depends of the skel packages {
declare -A WM_EXT=(
[dwm]='nitrogen polkit-gnome gnome-keyring dunst lxappearance' [jwm]='' [deepin]='deepin-extra'
[gnome]='gnome-tweaks' [cinnamon]='gnome-terminal' [plasma]='kde-applications-meta powerdevil'
[awesome]='archlabs-skel-awesome' [bspwm]='archlabs-skel-bspwm' [fluxbox]='archlabs-skel-fluxbox'
[i3-gaps]='archlabs-skel-i3-gaps' [openbox]='archlabs-skel-openbox' [xfce4]='archlabs-skel-xfce4 xfce4-goodies'
[awesome]='archlabs-skel-awesome'
[bspwm]='archlabs-skel-bspwm'
[cinnamon]='gnome-terminal'
[deepin]='deepin-extra'
[dwm]='nitrogen polkit-gnome gnome-keyring dunst lxappearance'
[fluxbox]='archlabs-skel-fluxbox'
[gnome]='gnome-tweaks'
[i3-gaps]='archlabs-skel-i3-gaps'
[jwm]=''
[openbox]='archlabs-skel-openbox'
[plasma]='kde-applications-meta powerdevil'
[xfce4]='archlabs-skel-xfce4 xfce4-goodies'
) # }
# files offered for editing after install is complete {
declare -A EDIT_FILES=(
[login]='' # login is populated once we know the username and shell
[fstab]='/etc/fstab' [sudoers]='/etc/sudoers' [crypttab]='/etc/crypttab' [pacman]='/etc/pacman.conf'
[console]='/etc/vconsole.conf' [mkinitcpio]='/etc/mkinitcpio.conf' [hostname]='/etc/hostname /etc/hosts'
[fstab]='/etc/fstab'
[sudoers]='/etc/sudoers'
[crypttab]='/etc/crypttab'
[pacman]='/etc/pacman.conf'
[console]='/etc/vconsole.conf'
[mkinitcpio]='/etc/mkinitcpio.conf'
[hostname]='/etc/hostname /etc/hosts'
[bootloader]="/boot/loader/entries/$DIST.conf" # ** based on bootloader
[locale]='/etc/locale.conf /etc/default/locale' [keyboard]='/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard'
[locale]='/etc/locale.conf /etc/default/locale'
[keyboard]='/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard'
) # }
# mkfs command flags for filesystem formatting {
declare -A FS_CMD_FLAGS=(
[f2fs]='-f' [jfs]='-q' [xfs]='-f' [ntfs]='-q' [ext2]='-q' [ext3]='-q' [ext4]='-q' [vfat]='-F32' [nilfs2]='-q' [reiserfs]='-q'
[ext2]='-q'
[ext3]='-q'
[ext4]='-q'
[f2fs]='-f'
[jfs]='-q'
[nilfs2]='-q'
[ntfs]='-q'
[reiserfs]='-q'
[vfat]='-F32'
[xfs]='-f'
) # }
# mount options for each filesystem {
declare -A FS_OPTS=(
[vfat]='' [ntfs]='' [ext2]='' [ext3]='' # NA
[vfat]=''
[ntfs]=''
[ext2]=''
[ext3]=''
[jfs]='discard errors=continue errors=panic nointegrity'
[reiserfs]='acl nolog notail replayonly user_xattr off'
[ext4]='discard dealloc nofail noacl relatime noatime nobarrier nodelalloc'
@ -131,24 +274,37 @@ declare -A FS_OPTS=(
# packages installed for each login option {
declare -A LOGIN_PKGS=(
[xinit]='xorg-xinit' [ly]='archlabs-ly' [gdm]='gdm' [sddm]='sddm'
[gdm]='gdm'
[lightdm]='lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings accountsservice'
[ly]='archlabs-ly'
[sddm]='sddm'
[xinit]='xorg-xinit'
) # }
# extras installed for user selected packages {
# if a package requires additional packages that aren't already dependencies
# they can be added here eg. [package]="extra"
declare -A PKG_EXT=(
[vlc]='qt4' [mpd]='mpc' [mupdf]='mupdf-tools'
[zathura]='zathura-pdf-poppler' [noto-fonts]='noto-fonts-emoji' [cairo-dock]='cairo-dock-plug-ins' [qt5ct]='qt5-styleplugins'
[vlc]='qt5ct qt5-styleplugins' [qutebrowser]='qt5ct qt5-styleplugins' [qbittorrent]='qt5ct qt5-styleplugins' [transmission-qt]='qt5ct qt5-styleplugins'
[bluez]='bluez-libs bluez-utils bluez-tools bluez-plugins bluez-hid2hci' [kdenlive]='dvdauthor frei0r-plugins breeze breeze-gtk qt5ct qt5-styleplugins'
[bluez]='bluez-libs bluez-utils bluez-tools bluez-plugins bluez-hid2hci'
[cairo-dock]='cairo-dock-plug-ins'
[kdenlive]='qt5ct qt5-styleplugins'
[mpd]='mpc'
[mupdf]='mupdf-tools'
[noto-fonts]='noto-fonts-emoji'
[pcmanfm]='tumbler'
[qbittorrent]='qt5ct qt5-styleplugins'
[qt5ct]='qt5-styleplugins'
[qutebrowser]='qt5ct qt5-styleplugins'
[thunar]='tumbler thunar-volman'
[transmission-qt]='qt5ct qt5-styleplugins'
[vlc]='qt5ct qt5-styleplugins'
[zathura]='zathura-pdf-poppler'
) # }
# dialog text variables {
# Basics (somewhat in order)
_welcome="\nThis will help you get $DIST installed and setup on your system.\n\nIf you are unsure about a section the default option will be listed or\nthe first selected item will be the default.\n\n\nMenu Navigation:\n\n - Select items with the arrow keys or the option number.\n - Use [Space] to toggle check boxes and [Enter] to accept.\n - Switch between fields using [Tab] or the arrow keys.\n - Use [Page Up] and [Page Down] to jump whole pages\n - Press the highlighted key of an option to select it.\n"
_keymap="\nPick which keymap to use for the system from the list below\n\nThis is used once a graphical environment is running (Xorg).\n\nSystem default: us"
_keymap="\nSelect which keymap to use from the list below.\n\nThis will determine the installed system keymap, NOT locale which is chosen later.\n\nSystem default: us"
_vconsole="\nSelect the console keymap, the console is the tty shell you reach before starting a graphical environment (Xorg).\n\nIts keymap is separate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nSystem default: us"
_prep="\nThis is the installer main menu, once a step is complete you will return here.\n\nOn successful completion of a step the cursor will be advanced to the next step\nOn failure the cursor will be placed on the step required to advance (when possible).\n\nSteps beginning with an asterisk (*) are required.\n\nOnce you're happy with the choices and the required steps are complete, selecting the final step will begin the install."
_device="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb, /sdc ..."
@ -253,7 +409,7 @@ main()
select_show()
{
local pkgs="${USER_PKGS[*]} ${PACKAGES[*]}"
local pkgs="${USER_PKGS[*]} ${SES_PKGS[*]}"
[[ $INSTALL_WMS == *dwm* ]] && pkgs="dwm st dmenu $pkgs"
pkgs="${pkgs// / }" pkgs="${pkgs# }"
msg "Show Configuration" "
@ -507,9 +663,15 @@ select_sessions()
select_login || return 1
for pkg in "${USERWM_PKGS[@]}"; do
[[ ${PACKAGES[*]} != *"$pkg"* ]] && PACKAGES+=("$pkg")
[[ ${SES_PKGS[*]} != *"$pkg"* ]] && SES_PKGS+=("$pkg")
done
if [[ $INSTALL_WMS ]]; then
echo "$INSTALL_WMS" > /tmp/wmlist
else
rm -f /tmp/wmlist
fi
return 0
}
@ -521,6 +683,7 @@ select_packages()
atom "An open-source text editor developed by GitHub" "$(ofn atom "${USER_PKGS[*]}")" \
audacious "A free and advanced audio player based on GTK+" "$(ofn audacious "${USER_PKGS[*]}")" \
audacity "A program that lets you manipulate digital audio waveforms" "$(ofn audacity "${USER_PKGS[*]}")" \
base-devel "A group of packages required for AUR" "$(ofn base-devel "${USER_PKGS[*]}")" \
blueman "GUI bluetooth device manager" "$(ofn blueman "${USER_PKGS[*]}")" \
bluez "Simple CLI based bluetooth support" "$(ofn bluez "${USER_PKGS[*]}")" \
cairo-dock "Light eye-candy fully themable animated dock" "$(ofn cairo-dock "${USER_PKGS[*]}")" \
@ -529,7 +692,8 @@ select_packages()
clementine "A modern music player and library organizer" "$(ofn clementine "${USER_PKGS[*]}")" \
cmus "A small, fast and powerful console music player" "$(ofn cmus "${USER_PKGS[*]}")" \
deadbeef "A GTK+ audio player for GNU/Linux" "$(ofn deadbeef "${USER_PKGS[*]}")" \
deluge "A BitTorrent client written in python" "$(ofn deluge "${USER_PKGS[*]}")" \
deluge "A bittorrent client written in python" "$(ofn deluge "${USER_PKGS[*]}")" \
elinks "An advanced and well-established feature-rich text mode web browser" "$(ofn elinks "${USER_PKGS[*]}")" \
emacs "An extensible, customizable, self-documenting real-time display editor" "$(ofn emacs "${USER_PKGS[*]}")" \
epiphany "A GNOME web browser based on the WebKit rendering engine" "$(ofn epiphany "${USER_PKGS[*]}")" \
evince "A document viewer" "$(ofn evince "${USER_PKGS[*]}")" \
@ -540,6 +704,7 @@ select_packages()
geany "A fast and lightweight IDE" "$(ofn geany "${USER_PKGS[*]}")" \
geary "A lightweight email client for the GNOME desktop" "$(ofn geary "${USER_PKGS[*]}")" \
gimp "GNU Image Manipulation Program" "$(ofn gimp "${USER_PKGS[*]}")" \
git "The fast distributed version control system" "$(ofn git "${USER_PKGS[*]}")" \
gnome-calculator "GNOME Scientific calculator" "$(ofn gnome-calculator "${USER_PKGS[*]}")" \
gnome-disk-utility "Disk Management Utility" "$(ofn gnome-disk-utility "${USER_PKGS[*]}")" \
gnome-system-monitor "View current processes and monitor system state" "$(ofn gnome-system-monitor "${USER_PKGS[*]}")" \
@ -548,33 +713,41 @@ select_packages()
gpicview "Lightweight image viewer" "$(ofn gpicview "${USER_PKGS[*]}")" \
guvcview "Capture video from camera devices" "$(ofn guvcview "${USER_PKGS[*]}")" \
hexchat "A popular and easy to use graphical IRC client" "$(ofn hexchat "${USER_PKGS[*]}")" \
htop "An interactive process viewer" "$(ofn htop "${USER_PKGS[*]}")" \
inkscape "Professional vector graphics editor" "$(ofn inkscape "${USER_PKGS[*]}")" \
irssi "A modular text mode IRC client with Perl scripting" "$(ofn irssi "${USER_PKGS[*]}")" \
irssi "Modular text mode IRC client" "$(ofn irssi "${USER_PKGS[*]}")" \
kdenlive "A popular non-linear video editor for Linux" "$(ofn kdenlive "${USER_PKGS[*]}")" \
krita "Edit and paint images" "$(ofn krita "${USER_PKGS[*]}")" \
libreoffice-fresh "Full featured office suite" "$(ofn libreoffice-fresh "${USER_PKGS[*]}")" \
lollypop "A new music playing application" "$(ofn lollypop "${USER_PKGS[*]}")" \
mc "A file manager that imitates Norton Commander" "$(ofn mc "${USER_PKGS[*]}")" \
mousepad "A simple text editor" "$(ofn mousepad "${USER_PKGS[*]}")" \
mpd "A flexible, powerful, server-side application for playing music" "$(ofn mpd "${USER_PKGS[*]}")" \
mpv "A media player based on mplayer" "$(ofn mpv "${USER_PKGS[*]}")" \
mupdf "Lightweight PDF and XPS viewer" "$(ofn mupdf "${USER_PKGS[*]}")" \
mutt "Small but very powerful text-based mail client" "$(ofn mutt "${USER_PKGS[*]}")" \
nano "Pico editor clone with enhancements" "$(ofn nano "${USER_PKGS[*]}")" \
nautilus "The default file manager for Gnome" "$(ofn nautilus "${USER_PKGS[*]}")" \
ncmpcpp "A mpd client and almost exact clone of ncmpc with some new features" "$(ofn ncmpcpp "${USER_PKGS[*]}")" \
neovim "A fork of Vim aiming to improve user experience, plugins, and GUIs." "$(ofn neovim "${USER_PKGS[*]}")" \
nmap "Utility for network discovery and security auditing" "$(ofn nmap "${USER_PKGS[*]}")" \
noto-fonts "Google Noto fonts" "$(ofn noto-fonts "${USER_PKGS[*]}")" \
noto-fonts-cjk "Google Noto CJK fonts (Chinese, Japanese, Korean)" "$(ofn noto-fonts-cjk "${USER_PKGS[*]}")" \
ntfs-3g "NTFS filesystem driver and utilities" "$(ofn ntfs-3g "${USER_PKGS[*]}")" \
obs-studio "Free opensource streaming/recording software" "$(ofn obs-studio "${USER_PKGS[*]}")" \
openshot "An open-source, non-linear video editor for Linux" "$(ofn openshot "${USER_PKGS[*]}")" \
opera "A Fast and secure, free of charge web browser from Opera Software" "$(ofn opera "${USER_PKGS[*]}")" \
pcmanfm "A fast and lightweight file manager based in Lxde" "$(ofn pcmanfm "${USER_PKGS[*]}")" \
pidgin "Multi-protocol instant messaging client" "$(ofn pidgin "${USER_PKGS[*]}")" \
plank "An elegant, simple, and clean dock" "$(ofn plank "${USER_PKGS[*]}")" \
qbittorrent "An advanced BitTorrent client" "$(ofn qbittorrent "${USER_PKGS[*]}")" \
playerctl "Mpris media player controller and lib for spotify, vlc, audacious, bmp, xmms2, and others." "$(ofn playerctl "${USER_PKGS[*]}")" \
qbittorrent "An advanced bittorrent client" "$(ofn qbittorrent "${USER_PKGS[*]}")" \
qpdfview "A tabbed PDF viewer" "$(ofn qpdfview "${USER_PKGS[*]}")" \
qt5ct "GUI for managing Qt based application themes, icons, and fonts" "$(ofn qt5ct "${USER_PKGS[*]}")" \
qutebrowser "A keyboard-focused vim-like web browser based on Python and PyQt5" "$(ofn qutebrowser "${USER_PKGS[*]}")" \
rhythmbox "A Music playback and management application" "$(ofn rhythmbox "${USER_PKGS[*]}")" \
rsync "A file transfer program to keep remote files in sync" "$(ofn rsync "${USER_PKGS[*]}")" \
rxvt-unicode "A unicode enabled rxvt-clone terminal emulator" "$(ofn rxvt-unicode "${USER_PKGS[*]}")" \
sakura "A terminal emulator based on GTK and VTE" "$(ofn sakura "${USER_PKGS[*]}")" \
simple-scan "Simple scanning utility" "$(ofn simple-scan "${USER_PKGS[*]}")" \
@ -587,15 +760,18 @@ select_packages()
thunderbird "Standalone mail and news reader from mozilla" "$(ofn thunderbird "${USER_PKGS[*]}")" \
tilda "A GTK based drop down terminal for Linux and Unix" "$(ofn tilda "${USER_PKGS[*]}")" \
tilix "A tiling terminal emulator for Linux using GTK+ 3" "$(ofn tilix "${USER_PKGS[*]}")" \
transmission-cli "Free BitTorrent client CLI" "$(ofn transmission-cli "${USER_PKGS[*]}")" \
transmission-cli "Free bittorrent client CLI" "$(ofn transmission-cli "${USER_PKGS[*]}")" \
unrar "The RAR compression program" "$(ofn unrar "${USER_PKGS[*]}")" \
transmission-gtk "GTK+ Front end for transmission" "$(ofn transmission-gtk "${USER_PKGS[*]}")" \
transmission-qt "Qt Front end for transmission" "$(ofn transmission-qt "${USER_PKGS[*]}")" \
ttf-anonymous-pro "A family fixed-width fonts designed with code in mind" "$(ofn ttf-anonymous-pro "${USER_PKGS[*]}")" \
ttf-fira-code "Monospaced font with programming ligatures" "$(ofn ttf-fira-code "${USER_PKGS[*]}")" \
ttf-font-awesome "Iconic font designed for Bootstrap" "$(ofn ttf-font-awesome "${USER_PKGS[*]}")" \
ttf-hack "A hand groomed typeface based on Bitstream Vera Mono" "$(ofn ttf-hack "${USER_PKGS[*]}")" \
vim "Vi Improved, a highly configurable, improved version of the vi text editor" "$(ofn vim "${USER_PKGS[*]}")" \
vlc "A free and open source cross-platform multimedia player" "$(ofn vlc "${USER_PKGS[*]}")" \
weechat "Fast, light and extensible IRC client" "$(ofn weechat "${USER_PKGS[*]}")" \
wget "Network utility to retrieve files from the Web" "$(ofn wget "${USER_PKGS[*]}")" \
xapps "Common library for X-Apps project" "$(ofn xapps "${USER_PKGS[*]}")" \
xarchiver "A GTK+ frontend to various command line archivers" "$(ofn xarchiver "${USER_PKGS[*]}")" \
xed "A small and lightweight text editor. X-Apps Project." "$(ofn xed "${USER_PKGS[*]}")" \
@ -681,7 +857,8 @@ part_menu()
part_show()
{
msg "Device Tree" "\n\n$(
lsblk -no NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT | awk '/disk|part|lvm|crypt/ && !'"/${IGNORE_DEV:-NONEXX}/"'{sub(/part|disk|crypt|lvm/, ""); print}'
lsblk -no NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT |
awk '/disk|part|lvm|crypt/ && !'"/${IGNORE_DEV:-NONEXX}/"'{sub(/part|disk|crypt|lvm/, ""); print}'
)\n\n"
}
@ -1168,11 +1345,10 @@ select_mntopts()
local opts=''
local title="${fs^} Mount Options"
yesno "$title" "\nMount partition with default options?\n" && return 1
for i in ${FS_OPTS[$fs]}; do
opts+="$i - off "
done
yesno "$title" "\nUse automatic mount with default options?\n" "Automatic" "Custom" && return 1
until [[ $MNT_OPTS ]]; do
dlg MNT_OPTS check "$title" "$_mount" $opts
[[ $MNT_OPTS ]] || return 1 # no options is auto mount
@ -1296,11 +1472,11 @@ install_base()
cp -vf /etc/X11/xorg.conf.d/* "$MNT/etc/X11/xorg.conf.d/"
fi
else
# archiso files
# remove archiso files when copying iso
rm -rf "$MNT/etc/mkinitcpio-archiso.conf"
find "$MNT/usr/lib/initcpio" -name 'archiso*' -type f -delete
# vmlinuz, if this isn't copied the standard kernel may fail mkinitcpio
# vmlinuz, if this isn't copied the vanilla kernel may fail mkinitcpio
cp -vf "$RUN/x86_64/vmlinuz" "$MNT/boot/vmlinuz-linux" 2> "$ERR"
errshow 1 "cp -vf '$RUN/x86_64/vmlinuz' '$MNT/boot/vmlinuz-linux'"
@ -1319,9 +1495,9 @@ install_base()
[[ $DIST != "ArchLabs" ]] || sed -i "s/ArchLabs/$DIST/g" "$MNT/etc/"{lsb-release,os-release}
# copy network settings
[[ -d /etc/netctl/interfaces ]] && cp -rfv /etc/netctl/interfaces "$MNT/etc/netctl/"
[[ -f /etc/resolv.conf ]] && cp -fv /etc/resolv.conf "$MNT/etc/"
[[ -e /etc/NetworkManager/system-connections ]] && cp -rvf /etc/NetworkManager/system-connections "$MNT/etc/NetworkManager/"
[[ -d /etc/netctl/interfaces ]] && cp -rfv /etc/netctl/interfaces "$MNT/etc/netctl/"
[[ -d /etc/NetworkManager/system-connections ]] && cp -rvf /etc/NetworkManager/system-connections "$MNT/etc/NetworkManager/"
# allow members of the wheel group to run commands as root
sed -i "s/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" "$MNT/etc/sudoers"
@ -1506,58 +1682,69 @@ install_packages()
{
typeset -a inpkg rmpkg loginpkg
for i in "${PACKAGES[@]}"; do
inpkg+=("$i")
done
for i in "${USER_PKGS[@]}"; do
inpkg+=("$i")
done
for i in "${AL_PKGS[@]}"; do
inpkg+=("$i")
done
inpkg=("${SES_PKGS[@]}" "${USER_PKGS[@]}")
if [[ $INSTALL_WMS ]]; then
inpkg+=("${BASE_PKGS[@]}")
[[ $INSTALL_WMS =~ ($WM_PKG_SES) ]] && inpkg+=("${WM_PKGS[@]}")
fi
for i in ${LOGIN_PKGS[$LOGIN_TYPE]}; do
loginpkg+=("$i")
done
if [[ $INSTALL_WMS =~ ($WM_PKG_SES) ]]; then
for i in "${WM_PKGS[@]}"; do
inpkg+=("$i")
done
blk=$(lsblk -f)
lspci | grep -qi 'broadcom' && inpkg+=("b43-firmware" "b43-fwcutter" "broadcom-wl")
grep -qi 'ntfs' <<< "$blk" && inpkg+=("ntfs-3g")
grep -qi 'jfs' <<< "$blk" && inpkg+=("jfsutils")
grep -qi 'xfs' <<< "$blk" && inpkg+=("xfsprogs")
grep -qi 'btrfs' <<< "$blk" && inpkg+=("btrfs-progs")
grep -qi 'reiserfs' <<< "$blk" && inpkg+=("reiserfsprogs")
[[ $LVM ]] && inpkg+=("lvm2")
[[ $INSTALL_WMS =~ dwm ]] && inpkg+=("git")
[[ $NEWSHELL == "bash" ]] && inpkg+=("bash-completion")
if [[ -d /etc/NetworkManager/system-connections ]]; then
inpkg+=("networkmanager")
elif [[ $(find /etc/network/interfaces -type f) ]]; then
inpkg+=("netctl")
fi
[[ $PACSTRAP != 1 ]] && pacman -Qq archlabs-installer >/dev/null 2>&1 && rmpkg+=("archlabs-installer")
if [[ $NEWSHELL == 'zsh' ]]; then
inpkg+=("zsh-completions")
inpkg+=("zsh-completions" "bash-completion")
elif [[ $PACSTRAP != 1 ]]; then
rmpkg+=("zsh")
fi
if [[ $PACSTRAP != 1 ]] && pacman -Qq archlabs-installer >/dev/null 2>&1; then
rmpkg+=("archlabs-installer")
fi
# remove the packages we don't want on the installed system
[[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm"
# update and install crucial packages first to avoid issues
chrun "pacman -Syyu ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -Syyu ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed'"
# install crucial packages first to avoid issues
chrun "pacman -S ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S ${loginpkg[*]} $NEWSHELL $UCODE $KERNEL --noconfirm --needed'"
# reinstalling iputils fixes the network issue for non-root users
chrun "pacman -S iputils --noconfirm"
# remove the packages we don't want on the installed system
[[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm"
# install the packages chosen throughout the install
# install the packages chosen throughout the install plus extras added
chrun "pacman -S ${inpkg[*]} --needed --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S ${inpkg[*]} --needed --noconfirm'"
# bootloader packages
if [[ $BOOTLDR == 'grub' ]]; then
[[ $SYS == 'UEFI' ]] && local efib="efibootmgr"
chrun "pacman -S os-prober grub $efib --needed --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S os-prober grub $efib --needed --noconfirm'"
chrun "pacman -S os-prober grub --needed --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S os-prober grub --needed --noconfirm'"
elif [[ $BOOTLDR == 'refind-efi' ]]; then
chrun "pacman -S refind-efi efibootmgr --needed --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S refind-efi efibootmgr --needed --noconfirm'"
elif [[ $SYS == 'UEFI' ]]; then
chrun "pacman -S refind-efi --needed --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S refind-efi --needed --noconfirm'"
elif [[ $BOOTLDR == 'syslinux' ]]; then
chrun "pacman -S syslinux --needed --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S syslinux --needed --noconfirm'"
fi
if [[ $SYS == 'UEFI' ]]; then
chrun "pacman -S efibootmgr --needed --noconfirm" 2> "$ERR" 2>&1
errshow 1 "chrun 'pacman -S efibootmgr --needed --noconfirm'"
fi
@ -1728,26 +1915,35 @@ install_mirrorlist()
install_background()
{
if [[ -d /etc/NetworkManager/system-connections ]]; then
net="networkmanager"
else
net="netctl"
fi
if yesno "Base Install" "$_bginstall" "Pacstrap" "Copy iso"; then
PACSTRAP=1
(
install_mirrorlist "/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 &&
pacstrap /mnt ${BASE_PKGS[*]} ${ISO_PKGS[*]} >> /tmp/bgout 2>&1 &&
cp /etc/pacman.d/mirrorlist "$MNT/etc/pacman.d/mirrorlist"
cp /etc/pacman.conf "$MNT/etc/pacman.conf"
al_repo "$MNT/etc/pacman.conf"
chrun "systemctl enable NetworkManager.service" >> /tmp/bgout 2>&1
) &
BG_PID=$!
else
PACSTRAP=0
(
rsync -a /run/archiso/sfs/airootfs/ "$MNT/" &&
install_mirrorlist "$MNT/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1 &&
pacstrap /mnt base ${ISO_PKGS[*]} $net >> /tmp/bgout 2>&1 &&
cp /etc/pacman.d/mirrorlist "$MNT/etc/pacman.d/mirrorlist" &&
cp /etc/pacman.conf "$MNT/etc/pacman.conf" &&
al_repo "$MNT/etc/pacman.conf" &&
chrun "pacman -Syyu ${BASE_PKGS[*]} --noconfirm --needed" >> /tmp/bgout 2>&1
[[ $net == "networkmanager" ]] && chrun "systemctl enable NetworkManager.service" >> /tmp/bgout 2>&1
[[ -e /tmp/wmlist ]] && chrun "pacman -S ${BASE_PKGS[*]} --noconfirm --needed" >> /tmp/bgout 2>&1
) &
BG_PID=$!
PACSTRAP=1
else
(
rsync -avh /run/archiso/sfs/airootfs/ "$MNT/" > /tmp/bgout 2>&1 &&
install_mirrorlist "$MNT/etc/pacman.d/mirrorlist" >> /tmp/bgout 2>&1 &&
al_repo "$MNT/etc/pacman.conf" &&
chrun "pacman -Syyu $net --noconfirm --needed" >> /tmp/bgout 2>&1
[[ $net == "networkmanager" ]] && chrun "systemctl enable NetworkManager.service" >> /tmp/bgout 2>&1
[[ -e /tmp/wmlist ]] && chrun "pacman -S ${BASE_PKGS[*]} --noconfirm --needed" >> /tmp/bgout 2>&1
) &
BG_PID=$!
PACSTRAP=0
fi
# shellcheck disable=SC2064
trap "kill $BG_PID 2> /dev/null" EXIT
@ -2465,8 +2661,7 @@ live()
al_repo "/etc/pacman.conf"
pacman -Syyu --noconfirm || die 1
rm -rf /var/cache/pacman/pkg/*
local pkgs="${BASE_PKGS[*]}"
pacman -S ${pkgs/base-devel /} ${AL_PKGS[*]} xorg-xinit --needed --noconfirm || die 1
pacman -S ${BASE_PKGS[*]} xorg-xinit --needed --noconfirm || die 1
rm -rf /var/cache/pacman/pkg/*
case "$ses" in
$WM_PKG_SES) pacman -S "$ses" ${WM_PKGS[*]} ${WM_EXT[$ses]} --needed --noconfirm || die 1 ;;