From 9dff55b2126e3c0d3bc8a2f9bced4f216c0fae1e Mon Sep 17 00:00:00 2001 From: MichaIng Date: Thu, 29 Aug 2019 13:13:44 +0200 Subject: [PATCH 1/5] Installer | Remove "dialog" from Debian/Ubuntu installer deps + The installer uses `whiptail`, thus `dialog` is not required. Signed-off-by: MichaIng --- automated install/basic-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 30beda91..2b01fcbf 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -188,10 +188,10 @@ if is_command apt-get ; then # grep -c will return 1 retVal on 0 matches, block this throwing the set -e with an OR TRUE PKG_COUNT="${PKG_MANAGER} -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true" # Some distros vary slightly so these fixes for dependencies may apply - # on Ubuntu 18.04.1 LTS we need to add the universe repository to gain access to dialog and dhcpcd5 + # on Ubuntu 18.04.1 LTS we need to add the universe repository to gain access to dhcpcd5 APT_SOURCES="/etc/apt/sources.list" if awk 'BEGIN{a=1;b=0}/bionic main/{a=0}/bionic.*universe/{b=1}END{exit a + b}' ${APT_SOURCES}; then - if ! whiptail --defaultno --title "Dependencies Require Update to Allowed Repositories" --yesno "Would you like to enable 'universe' repository?\\n\\nThis repository is required by the following packages:\\n\\n- dhcpcd5\\n- dialog" "${r}" "${c}"; then + if ! whiptail --defaultno --title "Dependencies Require Update to Allowed Repositories" --yesno "Would you like to enable 'universe' repository?\\n\\nThis repository is required by the following packages:\\n\\n- dhcpcd5" "${r}" "${c}"; then printf " %b Aborting installation: dependencies could not be installed.\\n" "${CROSS}" exit # exit the installer else @@ -242,7 +242,7 @@ if is_command apt-get ; then fi # Since our install script is so large, we need several other programs to successfully get a machine provisioned # These programs are stored in an array so they can be looped through later - INSTALLER_DEPS=(apt-utils dialog debconf dhcpcd5 git "${iproute_pkg}" whiptail) + INSTALLER_DEPS=(apt-utils debconf dhcpcd5 git "${iproute_pkg}" whiptail) # Pi-hole itself has several dependencies that also need to be installed PIHOLE_DEPS=(cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf libcap2) # The Web dashboard has some that also need to be installed From ebb1a730c11e2f516a072decf57a506e9d9a2960 Mon Sep 17 00:00:00 2001 From: bcambl Date: Sun, 15 Sep 2019 16:04:35 -0600 Subject: [PATCH 2/5] remove unused fedora/centos dependency: dialog Signed-off-by: bcambl --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 2b01fcbf..91858f0b 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -285,7 +285,7 @@ elif is_command rpm ; then UPDATE_PKG_CACHE=":" PKG_INSTALL=("${PKG_MANAGER}" install -y) PKG_COUNT="${PKG_MANAGER} check-update | egrep '(.i686|.x86|.noarch|.arm|.src)' | wc -l" - INSTALLER_DEPS=(dialog git iproute newt procps-ng which chkconfig) + INSTALLER_DEPS=(git iproute newt procps-ng which chkconfig) PIHOLE_DEPS=(bind-utils cronie curl findutils nmap-ncat sudo unzip wget libidn2 psmisc sqlite libcap) PIHOLE_WEB_DEPS=(lighttpd lighttpd-fastcgi php-common php-cli php-pdo php-xml) LIGHTTPD_USER="lighttpd" From 07cc5b501cef7c3ce1df6a11d17a87d13bfb5561 Mon Sep 17 00:00:00 2001 From: bcambl Date: Sun, 13 Oct 2019 11:44:15 -0600 Subject: [PATCH 3/5] replace debconf-apt-progress with apt-get in install_dependent_packages() Removes the need for conditional debconf-apt-progress dependency checking Signed-off-by: bcambl --- automated install/basic-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 91858f0b..9352fcb0 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1632,7 +1632,7 @@ install_dependent_packages() { # amount of download traffic. # NOTE: We may be able to use this installArray in the future to create a list of package that were # installed by us, and remove only the installed packages, and not the entire list. - if is_command debconf-apt-progress ; then + if is_command apt-get ; then # For each package, for i in "$@"; do printf " %b Checking for %s..." "${INFO}" "${i}" @@ -1645,7 +1645,7 @@ install_dependent_packages() { done if [[ "${#installArray[@]}" -gt 0 ]]; then test_dpkg_lock - debconf-apt-progress -- "${PKG_INSTALL[@]}" "${installArray[@]}" + "${PKG_INSTALL[@]}" "${installArray[@]}" return fi printf "\\n" From cbb146101021dc7109ee117c953febeec0d31317 Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 1 Jan 2020 12:41:33 -0600 Subject: [PATCH 4/5] add stdout horizontal rule to install_dependent_packages() Signed-off-by: bcambl --- automated install/basic-install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 9352fcb0..39f3a53c 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1645,7 +1645,10 @@ install_dependent_packages() { done if [[ "${#installArray[@]}" -gt 0 ]]; then test_dpkg_lock + printf " %b Processing %s install(s) for: %s, please wait...\\n" "${INFO}" "${PKG_MANAGER}" "${installArray[*]}" + printf '%*s\n' "$columns" '' | tr " " -; "${PKG_INSTALL[@]}" "${installArray[@]}" + printf '%*s\n' "$columns" '' | tr " " -; return fi printf "\\n" @@ -1663,7 +1666,10 @@ install_dependent_packages() { fi done if [[ "${#installArray[@]}" -gt 0 ]]; then - "${PKG_INSTALL[@]}" "${installArray[@]}" &> /dev/null + printf " %b Processing %s install(s) for: %s, please wait...\\n" "${INFO}" "${PKG_MANAGER}" "${installArray[*]}" + printf '%*s\n' "$columns" '' | tr " " -; + "${PKG_INSTALL[@]}" "${installArray[@]}" + printf '%*s\n' "$columns" '' | tr " " -; return fi printf "\\n" From 60c51886e07f2e1c235d43eba9c06642be7a0a8d Mon Sep 17 00:00:00 2001 From: bcambl Date: Wed, 1 Jan 2020 13:23:48 -0600 Subject: [PATCH 5/5] remove unused debian deps (apt-utils debconf) Signed-off-by: bcambl --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 39f3a53c..4ba5de06 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -242,7 +242,7 @@ if is_command apt-get ; then fi # Since our install script is so large, we need several other programs to successfully get a machine provisioned # These programs are stored in an array so they can be looped through later - INSTALLER_DEPS=(apt-utils debconf dhcpcd5 git "${iproute_pkg}" whiptail) + INSTALLER_DEPS=(dhcpcd5 git "${iproute_pkg}" whiptail) # Pi-hole itself has several dependencies that also need to be installed PIHOLE_DEPS=(cron curl dnsutils iputils-ping lsof netcat psmisc sudo unzip wget idn2 sqlite3 libcap2-bin dns-root-data resolvconf libcap2) # The Web dashboard has some that also need to be installed