From d9e981bf921e0263a24b716b475c975681943947 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 3 May 2018 16:06:59 -0400 Subject: houskeeping --- configs/profile/build.sh | 58 +++++++++++++--------- configs/profile/packages/packages-lxde.all | 2 +- configs/profile/pacman.conf | 2 +- .../root/customize_root_image-constants.inc | 15 +++--- .../root-image/root/customize_root_image.sh | 2 + 5 files changed, 46 insertions(+), 33 deletions(-) diff --git a/configs/profile/build.sh b/configs/profile/build.sh index 9e19cc1..b87d86c 100755 --- a/configs/profile/build.sh +++ b/configs/profile/build.sh @@ -19,7 +19,7 @@ iso_dirname='parabola' enable_offline_install='false' offline_switch='' work_dir=./work -out_dir=./out +out_dir=./out/$(echo "${iso_edition}-${iso_version}" | tr '[:upper:]/' '[:lower:]-') target='' verbose='' efi_img_kbytes=40000 @@ -94,40 +94,49 @@ make_packages() { # standard package lists local _install_base_lists=$( ls ${packages_dir}/packages-{all,${iso_init}}.{all,${arch}} 2> /dev/null || true) local _cache_base_lists=$( ls ${packages_dir}/cache-{all,${iso_init}}.{all,${arch}} 2> /dev/null || true) - # gui-specific package lists - local _install_gui_lists=$( ls ${packages_dir}/packages-{gui,${iso_gui}}.{all,${arch}} 2> /dev/null || true) - local _cache_gui_lists=$( ls ${packages_dir}/cache-{gui,${iso_gui}}.{all,${arch}} 2> /dev/null || true) + # standard gui package lists + local _install_basegui_lists=$(ls ${packages_dir}/packages-gui.{all,${arch}} 2> /dev/null || true) + local _cache_basegui_lists=$( ls ${packages_dir}/cache-gui.{all,${arch}} 2> /dev/null || true) # init-specific gui package lists local _install_initgui_lists=$(ls ${packages_dir}/packages-${iso_init}-gui.{all,${arch}} 2> /dev/null || true) local _cache_initgui_lists=$( ls ${packages_dir}/cache-${iso_init}-gui.{all,${arch}} 2> /dev/null || true) + # wmde-specific package lists + local _install_gui_lists=$( ls ${packages_dir}/packages-${iso_gui}.{all,${arch}} 2> /dev/null || true) + local _cache_gui_lists=$( ls ${packages_dir}/cache-${iso_gui}.{all,${arch}} 2> /dev/null || true) _install_base_lists=${_install_base_lists// /} _cache_base_lists=${_cache_base_lists// /} - _install_gui_lists=${_install_gui_lists// /} - _cache_gui_lists=${_cache_gui_lists// /} + _install_basegui_lists=${_install_basegui_lists// /} + _cache_basegui_lists=${_cache_basegui_lists// /} _install_initgui_lists=${_install_initgui_lists// /} _cache_initgui_lists=${_cache_initgui_lists// /} + _install_gui_lists=${_install_gui_lists// /} + _cache_gui_lists=${_cache_gui_lists// /} # collect standard packages local _install_base_packages=$( [ "${_install_base_lists}" ] && grep -hv ^# ${_install_base_lists}) local _cache_base_packages=$( [ "${_cache_base_lists}" ] && grep -hv ^# ${_cache_base_lists}) - # collect gui-specific packages - local _install_gui_packages=$( [ "${_install_gui_lists}" ] && grep -hv ^# ${_install_gui_lists}) - local _cache_gui_packages=$( [ "${_cache_gui_lists}" ] && grep -hv ^# ${_cache_gui_lists}) + # collect standard gui packages + local _install_basegui_packages=$([ "${_install_basegui_lists}" ] && grep -hv ^# ${_install_basegui_lists}) + local _cache_basegui_packages=$( [ "${_cache_basegui_lists}" ] && grep -hv ^# ${_cache_basegui_lists}) # collect init-specific gui packages local _install_initgui_packages=$([ "${_install_initgui_lists}" ] && grep -hv ^# ${_install_initgui_lists}) local _cache_initgui_packages=$( [ "${_cache_initgui_lists}" ] && grep -hv ^# ${_cache_initgui_lists}) + # collect wmde-specific packages + local _install_gui_packages=$( [ "${_install_gui_lists}" ] && grep -hv ^# ${_install_gui_lists}) + local _cache_gui_packages=$( [ "${_cache_gui_lists}" ] && grep -hv ^# ${_cache_gui_lists}) if [[ "${iso_gui}" != 'cli' ]]; then _gui_packages_msg="${_gui_packages_msg/non-graphical/graphical}" - _install_gui_lists="${_install_gui_lists} ${_install_initgui_lists}" - _cache_gui_lists="${_cache_gui_lists} ${_cache_initgui_lists}" - _install_gui_packages="${_install_gui_packages} ${_install_initgui_packages}" - _cache_gui_packages="${_cache_gui_packages} ${_cache_initgui_packages}" + _install_gui_lists="${_install_basegui_lists} ${_install_initgui_lists} ${_install_gui_lists}" + _cache_gui_lists="${_cache_basegui_lists} ${_cache_initgui_lists} ${_cache_gui_lists}" + _install_gui_packages="${_install_basegui_packages} ${_install_initgui_packages} ${_install_gui_packages}" + _cache_gui_packages="${_cache_basegui_packages} ${_cache_initgui_packages} ${_cache_gui_packages}" fi - # display results _install_gui_lists=${_install_gui_lists// /} _cache_gui_lists=${_cache_gui_lists// /} + _install_base_packages=${_install_base_packages// /} _cache_base_packages=${_cache_base_packages// /} _install_gui_packages=${_install_gui_packages// /} _cache_gui_packages=${_cache_gui_packages// /} + # display results local _install_packages="${_install_base_packages} ${_install_gui_packages}" local _cache_packages="${_cache_base_packages} ${_cache_gui_packages}" _install_packages=${_install_packages// /} @@ -262,7 +271,7 @@ make_efi() { # Prepare efiboot.img::/EFI for "El Torito" EFI boot mode make_efiboot() { # Cleanup in case of previous aborted run - while mount | grep ${work_dir}/efiboot; do umount ${work_dir}/efiboot; sleep 1; done; + while mount | grep ${work_dir}/efiboot > /dev/null; do umount ${work_dir}/efiboot; sleep 1; done; rm ${work_dir}/iso/EFI/parabolaiso/efiboot.img 2> /dev/null || true # create EFI image @@ -374,9 +383,10 @@ else fi iso_title="${iso_title} - ${iso_edition} Edition ${iso_version}" iso_filename="parabola-${iso_edition}-${iso_arch}-${iso_type}-${iso_version}.iso" -iso_filename=$(echo ${iso_filename} | tr '[:upper:]/' '[:lower:]-') -iso_init=$(echo ${iso_edition} | cut -d '/' -f 1 | tr '[:upper:]' '[:lower:]') -iso_gui=$( echo ${iso_edition} | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]') +iso_filename=$( echo ${iso_filename} | tr '[:upper:]/' '[:lower:]-') +out_dir=./out/$(echo ${iso_edition}-${iso_version} | tr '[:upper:]/' '[:lower:]-') +iso_init=$( echo ${iso_edition} | cut -d '/' -f 1 | tr '[:upper:]' '[:lower:]' ) +iso_gui=$( echo ${iso_edition} | cut -d '/' -f 2 | tr '[:upper:]' '[:lower:]' ) [[ "${iso_init}" == 'openrc' ]] && base_group='base-openrc' || base_group='base' [[ "${archs}" == 'i686' ]] && arch='i686' || arch='x86_64' @@ -395,20 +405,20 @@ pacman_conf=${pacman_conf// /} # validate build environment if [[ "$(uname -m)" != 'x86_64' ]] || ! grep 'ID_LIKE=.*archlinux' /usr/lib/os-release > /dev/null; then - echo "This script needs to be run on an x86_64 ArchLinux derrivative." + LOG_ERROR "This script needs to be run on an x86_64 ArchLinux derrivative." exit 1 elif [[ ${EUID} -ne 0 ]]; then - echo "This script needs to be run with root privileges." + LOG_ERROR "This script needs to be run with root privileges." exit 1 elif ! pacman --version | grep libalpm > /dev/null; then - echo "This script needs the 'pacman' package manager to be installed." + LOG_ERROR "This script needs the 'pacman' package manager to be installed." exit 1 elif ! pacman -Qi parabolaiso-data > /dev/null; then - echo "This script needs the 'parabolaiso-data' package to be installed." + LOG_ERROR "This script needs the 'parabolaiso-data' package to be installed." exit 1 elif ! echo "${VALID_INITS[@]}" | tr " " "\n" | grep -E "^${iso_init}$" > /dev/null || \ ! echo "${VALID_GUIS[@]}" | tr " " "\n" | grep -E "^${iso_gui}$" > /dev/null; then - echo "Invalid init/wm combination: '${iso_edition}'." + LOG_ERROR "Invalid init/wm combination: '${iso_edition}'." exit 1 fi @@ -425,7 +435,7 @@ for arch in ${archs}; do ! -f ${prefix}boot_${arch} -o ! -f ${prefix}prepare_${arch} ] && \ is_done=0 done -if ! (($is_done)); then echo ${launch_msg}; else echo "Nothing to do"; exit; fi; +if ! (($is_done)); then LOG_STEP ${launch_msg}; else LOG_STEP "Nothing to do"; exit; fi; ## build ISO ## diff --git a/configs/profile/packages/packages-lxde.all b/configs/profile/packages/packages-lxde.all index 907f020..968c910 100644 --- a/configs/profile/packages/packages-lxde.all +++ b/configs/profile/packages/packages-lxde.all @@ -8,7 +8,7 @@ galculator-gtk2 gnumeric gparted gpicview -# gksu # (issue #1781) +gksu gnome-screenshot lxappearance lxappearance-obconf diff --git a/configs/profile/pacman.conf b/configs/profile/pacman.conf index 942f59d..e8a9f8a 100644 --- a/configs/profile/pacman.conf +++ b/configs/profile/pacman.conf @@ -91,10 +91,10 @@ Include = /etc/pacman.d/mirrorlist [community] Include = /etc/pacman.d/mirrorlist +# TODO: move calamares, parabola-laf, wbar to 'pcr' then comment out 'pcr-testing' [pcr-testing] Include = /etc/pacman.d/mirrorlist -# TODO: move calamares to 'pcr' then comment out 'pcr-testing' [pcr] Include = /etc/pacman.d/mirrorlist diff --git a/configs/profile/root-image/root/customize_root_image-constants.inc b/configs/profile/root-image/root/customize_root_image-constants.inc index a334924..d0359a6 100644 --- a/configs/profile/root-image/root/customize_root_image-constants.inc +++ b/configs/profile/root-image/root/customize_root_image-constants.inc @@ -30,6 +30,8 @@ readonly OPENRC_SERVICES_GUI="alsasound \ readonly OPENRC_SERVICES="${OPENRC_SERVICES_ALL} ${OPENRC_SERVICES_GUI}" [[ "${iso_gui}" == 'cli' ]] && readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL}" || readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL} ${SYSTEMD_SERVICES_GUI}" +[ "${enable_offline_install}" == 'true' ] && readonly INSTALL_TYPE='Complete' || \ + readonly INSTALL_TYPE='NetInstall' readonly DEFAULT_SHELL=/bin/bash readonly NETINSTALL_MSG="To install Parabola, the system must be connected to the internet." readonly COMPLETE_MSG="This ISO is capable of installing a complete Parabola system\n\ @@ -37,16 +39,15 @@ readonly COMPLETE_MSG="This ISO is capable of installing a complete Parabola sys >>>>the latest packages from the internet, run the following command\n\ >>>>before beginning the install:\n\ # cp /etc/pacman-online.conf /etc/pacman.conf" -[ "${enable_offline_install}" == 'false' ] && readonly NETWORK_MOTD_MSG=${NETINSTALL_MSG} || \ - readonly NETWORK_MOTD_MSG=${COMPLETE_MSG} -readonly ROOT_SKEL_FILES="/etc/skel/.automated_script.sh \ - /etc/skel/.bash_logout \ - /etc/skel/.bash_profile " +[ "${INSTALL_TYPE}" == 'Complete' ] && readonly NETWORK_MOTD_MSG=${NETINSTALL_MSG} || \ + readonly NETWORK_MOTD_MSG=${COMPLETE_MSG} +readonly ROOT_SKEL_FILES="/etc/skel/.bash_logout \ + /etc/skel/.bash_profile \ + /etc/skel/install-openrc-lxde.sh \ + /etc/skel/install-systemd-mate.sh" readonly LIVE_USER=parabola readonly LIVE_USER_GROUPS="adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" readonly OPENRC_USER_GROUPS="disk,sys" [[ "${iso_init}" == 'openrc' ]] && readonly USER_GROUPS="${LIVE_USER_GROUPS},${OPENRC_USER_GROUPS}" || readonly USER_GROUPS="${LIVE_USER_GROUPS}" -[ "${enable_offline_install}" == 'true' ] && readonly INSTALL_TYPE="Complete" || \ - readonly INSTALL_TYPE="NetInstall" readonly PRETTY_NAME="$(echo ${iso_title} | cut -d ' ' -f -5) - (${INSTALL_TYPE})" diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh index edd0a3f..518436c 100755 --- a/configs/profile/root-image/root/customize_root_image.sh +++ b/configs/profile/root-image/root/customize_root_image.sh @@ -17,6 +17,8 @@ chmod 440 /etc/sudoers.d/g_wheel # configure pacman sed -i "s|#Server|Server|" /etc/pacman.d/mirrorlist +[ "${INSTALL_TYPE}" == 'Complete' ] && pacman_conf=pacman-offline.conf || pacman_conf=pacman-online.conf +cp /etc/${pacman_conf} /etc/pacman.conf # configure services if [[ "${iso_init}" == 'systemd' ]] -- cgit v1.2.2