From 734d5b8332c8a915231a67bc32564f35808f189e Mon Sep 17 00:00:00 2001 From: Jocadbz Date: Tue, 28 Jan 2025 18:59:16 -0300 Subject: [PATCH] Remove Package Selections, removed non-ascii characters --- install-stage1.sh | 22 +---- install-stage2.sh | 38 -------- package_selections/README.md | 19 ---- .../desktop/additional_files.lst | 3 - package_selections/desktop/description.txt | 1 - package_selections/desktop/icewm-full | 13 --- package_selections/desktop/icewm-lite | 13 --- package_selections/desktop/none | 11 --- package_selections/desktop/options.lst | 3 - package_selections/desktop/resources/bashrc | 94 ------------------- .../desktop/resources/common_packages | 1 - package_selections/desktop/resources/xinitrc | 18 ---- .../nvidia/additional_files.lst | 0 package_selections/nvidia/description.txt | 10 -- package_selections/nvidia/none | 11 --- package_selections/nvidia/nvidia | 18 ---- package_selections/nvidia/nvidia390 | 18 ---- package_selections/nvidia/nvidia470 | 18 ---- package_selections/nvidia/options.lst | 4 - package_selections/sections.lst | 2 - 20 files changed, 2 insertions(+), 315 deletions(-) delete mode 100644 package_selections/README.md delete mode 100644 package_selections/desktop/additional_files.lst delete mode 100644 package_selections/desktop/description.txt delete mode 100644 package_selections/desktop/icewm-full delete mode 100644 package_selections/desktop/icewm-lite delete mode 100644 package_selections/desktop/none delete mode 100644 package_selections/desktop/options.lst delete mode 100644 package_selections/desktop/resources/bashrc delete mode 100644 package_selections/desktop/resources/common_packages delete mode 100644 package_selections/desktop/resources/xinitrc delete mode 100644 package_selections/nvidia/additional_files.lst delete mode 100644 package_selections/nvidia/description.txt delete mode 100644 package_selections/nvidia/none delete mode 100644 package_selections/nvidia/nvidia delete mode 100644 package_selections/nvidia/nvidia390 delete mode 100644 package_selections/nvidia/nvidia470 delete mode 100644 package_selections/nvidia/options.lst delete mode 100644 package_selections/sections.lst diff --git a/install-stage1.sh b/install-stage1.sh index d93bc82..73f37cc 100644 --- a/install-stage1.sh +++ b/install-stage1.sh @@ -62,7 +62,7 @@ fi echo " This script will now download and install Void Linux on your USB stick. -Any data that is currently on the stick will be lost and it won’t be +Any data that is currently on the stick will be lost and it won't be usable from Windows or MacOS. Before we begin, the following packages need to be installed (if not installed already): @@ -372,7 +372,7 @@ mkdir /mnt/target/boot/efi/LOADER >> $LOGFILE 2>&1 echo "GRUB has been deliberately installed to a non-standard location. This avoids default kernel hooks breaking the custom config." > /mnt/target/boot/efi/LOADER/README.TXT -# no idea if any of these are even necessary/relevant but it can’t hurt... +# no idea if any of these are even necessary/relevant but it can't hurt... TARGET_PRELOAD_GRUB_MODULES="usb usbms uhci ehci ohci part_gpt f2fs ahci ata pata" run_in_target grub-install --target=i386-pc --boot-directory=/boot/efi/LOADER --disk-module=native --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1 run_in_target grub-install --target=i386-efi --boot-directory=/boot/efi/LOADER --disk-module=native --efi-directory=/boot/efi --removable --no-nvram --modules="'$TARGET_PRELOAD_GRUB_MODULES'" "'/dev/$TARGET_DISK'" >> $LOGFILE 2>&1 @@ -414,24 +414,6 @@ function get_stage2_file { get_stage2_file install-stage2.sh >> $LOGFILE 2>&1 chmod 744 "$STAGE2_DIR/install-stage2.sh" >> $LOGFILE 2>&1 -get_stage2_file package_selections/sections.lst -readarray -t SECTIONS < "$STAGE2_DIR/package_selections/sections.lst" -for I in ${!SECTIONS[@]}; do - get_stage2_file "package_selections/${SECTIONS[$I]}/description.txt" - - get_stage2_file "package_selections/${SECTIONS[$I]}/options.lst" - readarray -t OPTIONS < "$STAGE2_DIR/package_selections/${SECTIONS[$I]}/options.lst" - for J in ${!OPTIONS[@]}; do - get_stage2_file "package_selections/${SECTIONS[$I]}/${OPTIONS[$J]}" - done - - get_stage2_file "package_selections/${SECTIONS[$I]}/additional_files.lst" - readarray -t FILES < "$STAGE2_DIR/package_selections/${SECTIONS[$I]}/additional_files.lst" - for J in ${!FILES[@]}; do - get_stage2_file "package_selections/${SECTIONS[$I]}/${FILES[$J]}" - done -done - mv /mnt/target/etc/sv/agetty-tty1/conf /mnt/target/etc/sv/agetty-tty1/conf.bak >> $LOGFILE 2>&1 echo 'if [ -x /sbin/agetty -o -x /bin/agetty ]; then if [ "${tty}" = "tty1" ]; then diff --git a/install-stage2.sh b/install-stage2.sh index 98b7ebc..e52d2c2 100644 --- a/install-stage2.sh +++ b/install-stage2.sh @@ -78,42 +78,4 @@ if [ "$INTERNET" = "up" ]; then echo "done" fi -readarray -t SECTIONS < /opt/void-usb/installer/package_selections/sections.lst -for I in ${!SECTIONS[@]}; do - readarray -t OPTIONS < "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/options.lst" - AVAILABLE_OPTIONS=() - for J in ${!OPTIONS[@]}; do - source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${OPTIONS[$J]}" - if check; then - AVAILABLE_OPTIONS+=("${OPTIONS[$J]}") - fi - done - - if [ -z "${AVAILABLE_OPTIONS[1]}" ]; then - # no need to ask, there is only one option anyway - CHOICE="${AVAILABLE_OPTIONS[0]}" - else - clear - cat "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/description.txt" - echo "" - for J in ${!AVAILABLE_OPTIONS[@]}; do - source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/${AVAILABLE_OPTIONS[$J]}" - echo "$J: $DESCRIPTION" - done - CHOICE="" - while [ -z "$CHOICE" ]; do - echo "" - echo "Select by entering the corresponding number." - read -p "> " CHOICE_NUMBER - grep "^[0-9]*$" <<< "$CHOICE_NUMBER" && CHOICE="${AVAILABLE_OPTIONS[$CHOICE_NUMBER]}" - done - fi - - source "/opt/void-usb/installer/package_selections/${SECTIONS[$I]}/$CHOICE" - if [ -n "$PACKAGES" ]; then - xbps-install --yes $PACKAGES - fi - post_install -done - bash --norc --noprofile diff --git a/package_selections/README.md b/package_selections/README.md deleted file mode 100644 index 8ec2f98..0000000 --- a/package_selections/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Package Selections - -These are intended to give the user a bunch of choices when installing the -system. For example whether to use XFE or a more fully featured set of applications. - -## Sections - -Sections contain choices of a specific category. The sections are stored in -folders containing the section’s description and its options. -For each section, only one of the options can be chosen. -The file `sections.lst` holds a list of all available sections in the order -in which the user will be asked about them. - -## Options - -Options are shell scripts that are sourced by the stage 2 installer. -They hold variables for description, package list, pre-install checks, -and additional post-install actions. -Options are shown in the order in which they appear in `options.lst`. diff --git a/package_selections/desktop/additional_files.lst b/package_selections/desktop/additional_files.lst deleted file mode 100644 index 4a271c5..0000000 --- a/package_selections/desktop/additional_files.lst +++ /dev/null @@ -1,3 +0,0 @@ -resources/common_packages -resources/xinitrc -resources/bashrc diff --git a/package_selections/desktop/description.txt b/package_selections/desktop/description.txt deleted file mode 100644 index 0a911f4..0000000 --- a/package_selections/desktop/description.txt +++ /dev/null @@ -1 +0,0 @@ -Choose a desktop setup to install diff --git a/package_selections/desktop/icewm-full b/package_selections/desktop/icewm-full deleted file mode 100644 index 2e4c1ba..0000000 --- a/package_selections/desktop/icewm-full +++ /dev/null @@ -1,13 +0,0 @@ -function check { - [ "$INTERNET" = "down" ] && return 1 - return 0 -} - -DESCRIPTION="Fully featured desktop with IceWM" - -# TODO -PACKAGES="$(cat /opt/void-usb/installer/package_selections/desktop/resources/common_packages) pavucontrol network-manager-applet vlc lxterminal bash-completion gufw conky icewm firefox arandr xscreensaver-elogind volctl" - -function post_install { - echo "desktop/icewm-light" >> /tmp/stage-2-choices -} diff --git a/package_selections/desktop/icewm-lite b/package_selections/desktop/icewm-lite deleted file mode 100644 index 3c3de18..0000000 --- a/package_selections/desktop/icewm-lite +++ /dev/null @@ -1,13 +0,0 @@ -function check { - [ "$INTERNET" = "down" ] && return 1 - return 0 -} - -DESCRIPTION="Small desktop with IceWM" - -# TODO -PACKAGES="$(cat /opt/void-usb/installer/package_selections/desktop/resources/common_packages) pulsemixer xterm icewm firefox htop xfe" - -function post_install { - echo "desktop/icewm-light" >> /tmp/stage-2-choices -} diff --git a/package_selections/desktop/none b/package_selections/desktop/none deleted file mode 100644 index d50091f..0000000 --- a/package_selections/desktop/none +++ /dev/null @@ -1,11 +0,0 @@ -function check { - return 0 -} - -DESCRIPTION="Leave the system as-is (no desktop)" - -PACKAGES="" - -function post_install { - echo "desktop/none" >> /tmp/stage-2-choices -} diff --git a/package_selections/desktop/options.lst b/package_selections/desktop/options.lst deleted file mode 100644 index 25f975f..0000000 --- a/package_selections/desktop/options.lst +++ /dev/null @@ -1,3 +0,0 @@ -icewm-full -icewm-lite -none diff --git a/package_selections/desktop/resources/bashrc b/package_selections/desktop/resources/bashrc deleted file mode 100644 index faca219..0000000 --- a/package_selections/desktop/resources/bashrc +++ /dev/null @@ -1,94 +0,0 @@ -# ALWAYS RUN -# ========== -# things to always set up, even for non-interactive shells - -EDITOR=nano -PAGER=less - -if grep -F ".local/bin" <<< "$PATH"; then - true -else - PATH="$HOME/.local/bin:$PATH" -fi - -export EDITOR PAGER PATH - -# CHECK INTERACTIVE -# ================= -# Don't do anything after this if not running an interactive shell. -case $- in - *i*) ;; - *) return ;; -esac - -# START XORG -# ========== -# TODO -# check if login shell -# if yes, check if .xinitrc exists -# if yes, check if xorg is already running -# if no, startx - -# ALIASES -# ======= -alias aliases="nano $HOME/.bashrc_aliases && source $HOME/.bashrc_aliases" -[ -f $HOME/.bashrc_aliases ] && source $HOME/.bashrc_aliases - -# BASH COMPLETION -# =============== -# include bash completions if they exist -# (may need to be adjusted to where the bash completions are stored on the current system) - -# Default for FreeBSD: -if [ -f /usr/local/share/bash-completion/bash_completion.sh ]; then - source /usr/local/share/bash-completion/bash_completion.sh -# Default for Linux: -elif [ -f /usr/share/bash-completion/bash_completion ]; then - source /usr/share/bash-completion/bash_completion -fi - -# VARIABLES -# ========= - -# don't put duplicate lines or lines starting with a space in history -HISTCONTROL=ingnoreboth -# unlimited history -HISTSIZE=-1 -HISTFILESIZE=-1 -# set a fancy prompt -PROMPT_COMMAND="PS1=\"[\[\e[03$( - if [ $EUID -eq 0 ] - then - echo -n '1;02m' - else - if [ -n "$(groups | grep 'wheel\|sudo')" ]; - then - echo -n '2;01m' - else - echo -n '6;01m' - fi - fi -)\]\u@\h\[\e[0m\]]:\$( - PROMPT_ERRORLEVEL=\$? - if [ \$PROMPT_ERRORLEVEL -eq 0 ] - then - echo -n '\[\e[032;02m\]' - else - echo -n '\[\e[031;02m\]' - fi - echo -n \$PROMPT_ERRORLEVEL - echo -n '\[\e[00m\]' -):\[\e[034;01m\]\$(pwd)\[\e[0m\]:$( - if [ $EUID -eq 0 ] - then - echo -n '\[\e[02m\]#\[\e[0m\]' - else - echo -n '\[\e[02m\]$\[\e[0m\]' - fi -)> \"" - -# SHELL OPTIONS -# ============= -shopt -s histappend -shopt -s checkwinsize -shopt -s globstar diff --git a/package_selections/desktop/resources/common_packages b/package_selections/desktop/resources/common_packages deleted file mode 100644 index e800aad..0000000 --- a/package_selections/desktop/resources/common_packages +++ /dev/null @@ -1 +0,0 @@ -setxkbmap xauth xorg-video-drivers mesa mesa-dri xorg-server elogind xorg-input-drivers xrandr acpilight xhost xinit xrdb xinput xgamma xset iceauth sessreg transset xcmsdb xkbutils xmodmap dejavu-fonts-ttf elogind xdg-utils dbus-elogind dbus-elogind-libs dbus-elogind-x11 pipewire diff --git a/package_selections/desktop/resources/xinitrc b/package_selections/desktop/resources/xinitrc deleted file mode 100644 index 25e3edb..0000000 --- a/package_selections/desktop/resources/xinitrc +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -if grep -F ".local/bin" <<< "$PATH"; then - true -else - PATH="$HOME/.local/bin:$PATH" -fi - -export PATH - -if [ -d "$HOME/.xinitrc.d" ]; then - for FILE in "$HOME/.xinitrc.d"/*; do - [ -x "$FILE" ] && "$FILE" & - done -fi - - -# The line below is placed by the package selection script. diff --git a/package_selections/nvidia/additional_files.lst b/package_selections/nvidia/additional_files.lst deleted file mode 100644 index e69de29..0000000 diff --git a/package_selections/nvidia/description.txt b/package_selections/nvidia/description.txt deleted file mode 100644 index 89b1f66..0000000 --- a/package_selections/nvidia/description.txt +++ /dev/null @@ -1,10 +0,0 @@ -Do you want to install the proprietary Nvidia driver? - -By default, Void Linux ships with the open-source nouveau driver. -This is nice because it gets the system up and running when using an -Nvidia GPU but, due to Nvidia’s secrecy, nouveau isn’t particularly good. - -Installing the proprietary driver is recommended if you want to use Nvidia GPUs. -This will enable the nonfree repository. - -Different versions are available. You can only choose one. diff --git a/package_selections/nvidia/none b/package_selections/nvidia/none deleted file mode 100644 index c07db39..0000000 --- a/package_selections/nvidia/none +++ /dev/null @@ -1,11 +0,0 @@ -function check { - return 0 -} - -DESCRIPTION="Don’t install." - -PACKAGES="" - -function post_install { - echo "nvidia/none" >> /tmp/stage-2-choices -} diff --git a/package_selections/nvidia/nvidia b/package_selections/nvidia/nvidia deleted file mode 100644 index 47b876a..0000000 --- a/package_selections/nvidia/nvidia +++ /dev/null @@ -1,18 +0,0 @@ -function check { - [ "$INTERNET" = "down" ] && return 1 - if xbps-query glibc >/dev/null 2>&1; then - return 0 - else - return 1 - fi -} - -DESCRIPTION="Latest Nvidia driver, supports GTX ??? series and up" - -#TODO: void-repo-nonfree -PACKAGES="nvidia" - -function post_install { - #TODO: nvidia modeset kernel parameter? - echo "nvidia/nvidia" >> /tmp/stage-2-choices -} diff --git a/package_selections/nvidia/nvidia390 b/package_selections/nvidia/nvidia390 deleted file mode 100644 index 32c567f..0000000 --- a/package_selections/nvidia/nvidia390 +++ /dev/null @@ -1,18 +0,0 @@ -function check { - [ "$INTERNET" = "down" ] && return 1 - if xbps-query glibc >/dev/null 2>&1; then - return 0 - else - return 1 - fi -} - -DESCRIPTION="Legacy Nvidia driver, version 390, supports GTX ??? series" - -#TODO: void-repo-nonfree -PACKAGES="nvidia390" - -function post_install { - #TODO: nvidia modeset kernel parameter? - echo "nvidia/nvidia390" >> /tmp/stage-2-choices -} diff --git a/package_selections/nvidia/nvidia470 b/package_selections/nvidia/nvidia470 deleted file mode 100644 index 96d6517..0000000 --- a/package_selections/nvidia/nvidia470 +++ /dev/null @@ -1,18 +0,0 @@ -function check { - [ "$INTERNET" = "down" ] && return 1 - if xbps-query glibc >/dev/null 2>&1; then - return 0 - else - return 1 - fi -} - -DESCRIPTION="Legacy Nvidia driver, version 470, supports GTX ??? series" - -#TODO: void-repo-nonfree -PACKAGES="nvidia470" - -function post_install { - #TODO: nvidia modeset kernel parameter? - echo "nvidia/nvidia470" >> /tmp/stage-2-choices -} diff --git a/package_selections/nvidia/options.lst b/package_selections/nvidia/options.lst deleted file mode 100644 index 7f83b08..0000000 --- a/package_selections/nvidia/options.lst +++ /dev/null @@ -1,4 +0,0 @@ -none -nvidia -nvidia470 -nvidia390 diff --git a/package_selections/sections.lst b/package_selections/sections.lst deleted file mode 100644 index 0b3a7ab..0000000 --- a/package_selections/sections.lst +++ /dev/null @@ -1,2 +0,0 @@ -nvidia -desktop