Add package list to the installer package
This commit is contained in:
parent
3c76cf943a
commit
76a62ee6da
@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
# immutable globals
|
||||
readonly VER="1.7.18" # Installer version
|
||||
readonly VER="1.7.19" # Installer version
|
||||
readonly DIST="ArchLabs" # Linux distributor
|
||||
readonly MNT="/mnt/install" # Install mountpoint
|
||||
readonly ERR="/tmp/errlog" # Built-in error log
|
||||
@ -16,7 +16,11 @@ readonly DBG="/tmp/debuglog" # Built-in error log
|
||||
|
||||
main() {
|
||||
if [[ $CURRENT_MENU != "main" ]]; then
|
||||
SELECTED=1
|
||||
if [[ $SAVED ]]; then
|
||||
SELECTED=$((SAVED + 1))
|
||||
else
|
||||
SELECTED=1
|
||||
fi
|
||||
CURRENT_MENU="main"
|
||||
elif (( SELECTED < 9 )); then
|
||||
((SELECTED++)) # increment the highlighted menu item
|
||||
@ -33,7 +37,7 @@ main() {
|
||||
# and that the needed config variables and user variables have been set up
|
||||
if [[ $SELECTED ]]; then
|
||||
if [[ $SELECTED -eq 8 || $SELECTED -eq 6 ]]; then
|
||||
{ [[ $SELECTED -eq 8 ]] && preinstall_check 1 || preinstall_check; } || return 1
|
||||
{ [[ $SELECTED -eq 8 ]] && preinstall_checks 1 || preinstall_checks; } || return 1
|
||||
elif [[ ($SELECTED -eq 2 || $SELECTED -eq 5) && $WARN != true ]]; then
|
||||
msgbox "$_PrepTitle" "$_WarnMount" && WARN=true
|
||||
fi
|
||||
|
@ -62,7 +62,7 @@ editor no
|
||||
EOF
|
||||
cat > ${MNT}${BMNTS[$SYS-$BOOTLDR]}/loader/entries/${DIST}.conf << EOF
|
||||
title $DIST Linux
|
||||
linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/$UCODE")
|
||||
linux /vmlinuz-${KERNEL}$([[ $UCODE ]] && printf "\ninitrd %s" "/${UCODE}.img")
|
||||
initrd /initramfs-$KERNEL.img
|
||||
options root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||
EOF
|
||||
@ -108,13 +108,13 @@ LABEL $DIST
|
||||
MENU LABEL $DIST Linux
|
||||
LINUX ../vmlinuz-$KERNEL
|
||||
APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||
INITRD ../initramfs-$KERNEL.img$([[ $UCODE ]] && printf "\nINITRD %s" "../$UCODE")
|
||||
INITRD ../initramfs-$KERNEL.img$([[ $UCODE ]] && printf "\nINITRD %s" "../${UCODE}.img")
|
||||
|
||||
LABEL ${DIST}fallback
|
||||
MENU LABEL $DIST Linux Fallback
|
||||
LINUX ../vmlinuz-$KERNEL
|
||||
APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||
INITRD ../initramfs-$KERNEL-fallback.img$([[ $UCODE ]] && printf "\nINITRD %s" "../$UCODE")
|
||||
INITRD ../initramfs-$KERNEL-fallback.img$([[ $UCODE ]] && printf "\nINITRD %s" "../${UCODE}.img")
|
||||
EOF
|
||||
return 0
|
||||
}
|
||||
|
@ -36,25 +36,6 @@ declare -g PACKAGES=""
|
||||
declare -g MYSHELL=""
|
||||
declare -g MKINIT_HOOKS="shutdown"
|
||||
|
||||
# package extras
|
||||
# if you add a package to $PACKAGES in any dialog and it uses or requires some
|
||||
# additional packages, you can add them here to keep it simple for the end user
|
||||
declare -gA PKG_EXT=(
|
||||
[vlc]="qt4"
|
||||
[mpd]="mpc"
|
||||
[mupdf]="mupdf-tools"
|
||||
[qt5ct]="qt5-styleplugins"
|
||||
[steam]="steam-native-runtime"
|
||||
[zathura]="zathura-pdf-poppler"
|
||||
[cairo-dock]="cairo-dock-plug-ins"
|
||||
[noto-fonts]="noto-fonts-emoji"
|
||||
[kdenlive]="kdebase-runtime dvdauthor frei0r-plugins breeze breeze-gtk"
|
||||
[vlc]="qt5ct qt5-styleplugins"
|
||||
[kdenlive]="qt5ct qt5-styleplugins" # duplicates are stripped with `uniq` later
|
||||
[qbittorrent]="qt5ct qt5-styleplugins"
|
||||
[qutebrowser]="qt5ct qt5-styleplugins"
|
||||
)
|
||||
|
||||
# }
|
||||
|
||||
|
||||
@ -383,6 +364,7 @@ select_login_method() {
|
||||
|
||||
select_packages() {
|
||||
if [[ $CURRENT_MENU != "packages" ]]; then
|
||||
declare -g SAVED=$SELECTED
|
||||
SELECTED=1
|
||||
CURRENT_MENU="packages"
|
||||
elif (( SELECTED < 9 )); then
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# vim:ft=sh:fdm=marker:fmr={,}
|
||||
# shellcheck disable=2153
|
||||
|
||||
# archlabs installer library script file
|
||||
# this file is not meant to be run directly
|
||||
@ -24,6 +25,7 @@ install() {
|
||||
|
||||
if [[ $HAS_NETWORK == true ]]; then
|
||||
# update the mirrorlist.. MUST be done before updating or it may be slow
|
||||
# this may already have been done if
|
||||
oneshot mirrorlist_sort
|
||||
|
||||
# MUST be before bootloader and running mkinitcpio
|
||||
@ -51,15 +53,33 @@ install() {
|
||||
}
|
||||
|
||||
install_base() {
|
||||
printf "\nUnpacking base file system --- Total: ~ 2.9G\n\n"
|
||||
rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/
|
||||
if [[ -e /run/archiso/sfs/airootfs/ ]]; then
|
||||
printf "\nUnpacking base system --- Total: ~ 2.9G\n\n"
|
||||
rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/
|
||||
else
|
||||
# update the mirrorlist.. MUST be done before pacstrapping or it may be slow
|
||||
oneshot mirrorlist_sort
|
||||
|
||||
printf "\nPacstrapping the base system.\n\n"
|
||||
local packages
|
||||
packages="$(grep -hv '^#' /usr/share/archlabs/installer/packages.txt)"
|
||||
local vmpkgs=""
|
||||
if [[ $VM ]]; then
|
||||
vmpkgs="virtualbox-guest-utils"
|
||||
[[ $KERNEL == 'linux-lts' ]] &&
|
||||
vmpkgs+=" virtualbox-guest-dkms linux-lts-headers" || vmpkgs+=" virtualbox-guest-modules-arch"
|
||||
fi
|
||||
pacstrap $MNT base $KERNEL $UCODE $packages $vmpkgs
|
||||
fi
|
||||
|
||||
# remove archiso init files and clean up install files
|
||||
rm -rf $MNT/etc/{sudoers.d/g_wheel,mkinitcpio-archiso.conf}
|
||||
rm -rf $MNT/etc/mkinitcpio-archiso.conf
|
||||
find $MNT/usr/lib/initcpio -name 'archiso*' -type f -exec rm '{}' \;
|
||||
|
||||
# cleanup system permissions
|
||||
# journal
|
||||
sed -i 's/volatile/auto/g' $MNT/etc/systemd/journald.conf
|
||||
|
||||
# allow members of group 'wheel' to execute sudo commands
|
||||
sed -i "s/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" $MNT/etc/sudoers
|
||||
|
||||
if [[ $VM ]]; then
|
||||
@ -76,14 +96,16 @@ EndSection
|
||||
EOF
|
||||
fi
|
||||
|
||||
# copy the kernel image for the regular kernel
|
||||
[[ $KERNEL != 'linux-lts' ]] && cp -f $RUN/x86_64/vmlinuz $MNT/boot/vmlinuz-linux
|
||||
if [[ -e /run/archiso/sfs/airootfs ]]; then
|
||||
# copy the kernel image for the regular kernel
|
||||
[[ $KERNEL != 'linux-lts' ]] && cp -f $RUN/x86_64/vmlinuz $MNT/boot/vmlinuz-linux
|
||||
|
||||
# copy CPU micro-code if set. manufacturer_ucode.img -> manufacturer-ucode.img
|
||||
[[ $UCODE ]] && cp -f $RUN/${UCODE/-/_} $MNT/boot/$UCODE
|
||||
# copy CPU micro-code if set. manufacturer_ucode.img -> manufacturer-ucode.img
|
||||
[[ $UCODE ]] && cp -f $RUN/${UCODE/-/_}.img $MNT/boot/${UCODE}.img
|
||||
fi
|
||||
|
||||
# copy network settings
|
||||
cp -rf /etc/NetworkManager/system-connections $MNT/etc/NetworkManager/
|
||||
[[ -e /etc/NetworkManager/system-connections ]] && cp -rf /etc/NetworkManager/system-connections $MNT/etc/NetworkManager/
|
||||
cp -f /etc/resolv.conf $MNT/etc/
|
||||
|
||||
# set the locale and timezone
|
||||
@ -146,8 +168,8 @@ create_user() {
|
||||
chrun "chown -Rf $NEWUSER:users /home/$NEWUSER"
|
||||
|
||||
# remove welcome message
|
||||
[[ $INSTALL_WMS =~ bspwm ]] || rm -rf $MNT/home/$NEWUSER/.config/{bspwm,sxhkd}
|
||||
[[ $INSTALL_WMS =~ i3-gaps ]] || rm -rf $MNT/home/$NEWUSER/.config/i3
|
||||
[[ $INSTALL_WMS =~ bspwm ]] || rm -rf $MNT/home/$NEWUSER/.config/{bspwm,sxhkd}
|
||||
[[ $INSTALL_WMS =~ openbox ]] || rm -rf $MNT/home/$NEWUSER/.config/{openbox,skippy-xd,jgmenu,conky,tint2}
|
||||
[[ $INSTALL_WMS =~ (openbox|i3-gaps|bspwm) ]] || rm -rf $MNT/home/$NEWUSER/.config/polybar
|
||||
|
||||
@ -192,7 +214,7 @@ EOF
|
||||
fi
|
||||
|
||||
# automatic startx for login shells
|
||||
[[ $MYSHELL == '/bin/bash' ]] && local loginrc=".profile" || local loginrc=".zprofile"
|
||||
[[ $MYSHELL == '/bin/bash' ]] && local loginrc=".bash_profile" || local loginrc=".zprofile"
|
||||
EDIT_FILES[11]+="/home/$NEWUSER/$loginrc"
|
||||
|
||||
cat >> $MNT/home/$NEWUSER/$loginrc << EOF
|
||||
|
@ -6,7 +6,26 @@
|
||||
# this file is not meant to be run directly
|
||||
# sourcing this file in a non bash shell is not advised
|
||||
|
||||
# shellcheck disable=2154,2153,2046
|
||||
# shellcheck disable=2154,2153,2046,2034
|
||||
|
||||
# package extras
|
||||
# if you add a package to $PACKAGES in any dialog and it uses or requires some
|
||||
# additional packages, you can add them here to keep it simple for the end user
|
||||
declare -gA PKG_EXT=(
|
||||
[vlc]="qt4"
|
||||
[mpd]="mpc"
|
||||
[mupdf]="mupdf-tools"
|
||||
[qt5ct]="qt5-styleplugins"
|
||||
[steam]="steam-native-runtime"
|
||||
[zathura]="zathura-pdf-poppler"
|
||||
[cairo-dock]="cairo-dock-plug-ins"
|
||||
[noto-fonts]="noto-fonts-emoji"
|
||||
[kdenlive]="kdebase-runtime dvdauthor frei0r-plugins breeze breeze-gtk"
|
||||
[vlc]="qt5ct qt5-styleplugins"
|
||||
[kdenlive]="qt5ct qt5-styleplugins" # duplicates are stripped with `uniq` later
|
||||
[qbittorrent]="qt5ct qt5-styleplugins"
|
||||
[qutebrowser]="qt5ct qt5-styleplugins"
|
||||
)
|
||||
|
||||
select_browsers() {
|
||||
local pkgs=""
|
||||
|
@ -110,9 +110,9 @@ system_identify() {
|
||||
local efidir="/sys/firmware/efi"
|
||||
|
||||
if grep -q 'GenuineIntel' /proc/cpuinfo; then
|
||||
declare -gx UCODE="intel-ucode.img"
|
||||
declare -gx UCODE="intel-ucode"
|
||||
elif grep -q 'AuthenticAMD' /proc/cpuinfo; then
|
||||
declare -gx UCODE="amd-ucode.img"
|
||||
declare -gx UCODE="amd-ucode"
|
||||
fi
|
||||
|
||||
if grep -qi 'apple' /sys/class/dmi/id/sys_vendor; then
|
||||
|
159
src/packages.txt
Normal file
159
src/packages.txt
Normal file
@ -0,0 +1,159 @@
|
||||
# base
|
||||
acpid
|
||||
arch-install-scripts
|
||||
b43-firmware
|
||||
b43-fwcutter
|
||||
bridge-utils
|
||||
broadcom-wl
|
||||
btrfs-progs
|
||||
clonezilla
|
||||
crda
|
||||
darkhttpd
|
||||
ddrescue
|
||||
dhclient
|
||||
dhcpcd
|
||||
dmidecode
|
||||
dmraid
|
||||
dnsmasq
|
||||
dnsutils
|
||||
ethtool
|
||||
exfat-utils
|
||||
f2fs-tools
|
||||
fakeroot
|
||||
fsarchiver
|
||||
gnu-netcat
|
||||
gpm
|
||||
gptfdisk
|
||||
grub
|
||||
vim
|
||||
hdparm
|
||||
ipw2100-fw
|
||||
ipw2200-fw
|
||||
irssi
|
||||
laptop-detect
|
||||
lftp
|
||||
lsscsi
|
||||
mtools
|
||||
ndisc6
|
||||
nfs-utils
|
||||
nilfs-utils
|
||||
nmap
|
||||
ntfs-3g
|
||||
openconnect
|
||||
openssh
|
||||
openvpn
|
||||
pacman-contrib
|
||||
partclone
|
||||
parted
|
||||
partimage
|
||||
ppp
|
||||
pptpclient
|
||||
refind-efi
|
||||
rp-pppoe
|
||||
rsync
|
||||
sdparm
|
||||
sg3_utils
|
||||
smartmontools
|
||||
sudo
|
||||
tcpdump
|
||||
testdisk
|
||||
usb_modeswitch
|
||||
vpnc
|
||||
wget
|
||||
wireless_tools
|
||||
wpa_actiond
|
||||
wvdial
|
||||
xl2tpd
|
||||
|
||||
# xorg
|
||||
mesa
|
||||
xorg-apps
|
||||
xorg-drivers
|
||||
xorg-server
|
||||
xorg-xinit
|
||||
|
||||
# installer
|
||||
dialog
|
||||
os-prober
|
||||
wipe
|
||||
|
||||
# codecs
|
||||
alsa-firmware
|
||||
alsa-lib
|
||||
alsa-plugins
|
||||
ffmpeg
|
||||
gst-libav
|
||||
gst-plugins-base
|
||||
gst-plugins-good
|
||||
gstreamer
|
||||
libmad
|
||||
libmatroska
|
||||
pulseaudio
|
||||
pulseaudio-alsa
|
||||
|
||||
# xfce
|
||||
xfce4-settings
|
||||
xfce4-power-manager
|
||||
gtk-engines
|
||||
gtk-engine-murrine
|
||||
|
||||
# network
|
||||
networkmanager
|
||||
wireless-regdb
|
||||
wpa_supplicant
|
||||
|
||||
# filesystem
|
||||
gvfs
|
||||
gvfs-afc
|
||||
gvfs-mtp
|
||||
gvfs-nfs
|
||||
tumbler
|
||||
xdg-user-dirs-gtk
|
||||
|
||||
# utilities
|
||||
gnome-keyring
|
||||
imagemagick
|
||||
jsoncpp
|
||||
libmpdclient
|
||||
lm_sensors
|
||||
lsb-release
|
||||
numlockx
|
||||
p7zip
|
||||
pamixer
|
||||
playerctl
|
||||
polkit-gnome
|
||||
reflector
|
||||
scrot
|
||||
unrar
|
||||
volumeicon
|
||||
wmctrl
|
||||
xclip
|
||||
xdotool
|
||||
zenity
|
||||
|
||||
# applications
|
||||
arandr
|
||||
compton
|
||||
dunst
|
||||
feh
|
||||
file-roller
|
||||
gparted
|
||||
gsimplecal
|
||||
htop
|
||||
mpv
|
||||
nitrogen
|
||||
pavucontrol
|
||||
ranger
|
||||
w3m
|
||||
xterm
|
||||
|
||||
# default WM
|
||||
openbox
|
||||
|
||||
# fonts
|
||||
terminus-font
|
||||
ttf-roboto
|
||||
ttf-ubuntu-font-family
|
||||
|
||||
# archlabs
|
||||
archlabs_unstable/archlabs
|
Reference in New Issue
Block a user