From 0c17f026ea0bb30be5a929be3325acd76198eb87 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 4 May 2024 18:16:12 +0200 Subject: [PATCH] wip/conf,https --- cd.sh | 84 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/cd.sh b/cd.sh index f4b53ba..251169f 100644 --- a/cd.sh +++ b/cd.sh @@ -93,32 +93,6 @@ cd_set_environment_variables () { CD_CMD_INSTALL="dnf install --assumeyes" CD_CMD_UPDATE="dnf makecache" CD_CMD_UPGRADE="dnf upgrade --assumeyes" - ;; - "${CD_OS_ALPINE}") - CD_CMD_CLEAN="apk cache purge" - CD_CMD_INSTALL="apk add" - CD_CMD_UPDATE="apk update" - CD_CMD_UPGRADE="apk upgrade" - ;; - "${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}") - CD_CMD_CLEAN="apt-get clean" - CD_CMD_INSTALL="apt-get install --assume-yes" - CD_CMD_UPDATE="apt-get update" - CD_CMD_UPGRADE="apt-get upgrade --assume-yes" - ;; - esac - cd_split - cd_echo "CD_CMD_CLEAN" "CD_CMD_INSTALL" "CD_CMD_UPDATE" "CD_CMD_UPGRADE" - # TODO - case "${CD_OS_ID}" in - "${CD_OS_ALMA}") - CD_OS_REPO="${CD_DEFAULT_REPO_ALMA}" - [ "${CD_REPO_ALMA}" ] && CD_OS_REPO="${CD_REPO_ALMA}" - case "${CD_OS_VERSION}" in - "8"|"9") ;; - *) cd_error_os "CD_OS_VERSION" ;; - esac - CD_PKG_PKG="" CD_PM_CONF_PATH="/etc/dnf/dnf.conf" CD_PM_CONF_TEXT="\ [main] @@ -130,6 +104,48 @@ skip_if_unavailable=False " CD_PM_HTTPS_PATH="/etc/dnf/dnf.conf.d/https.conf" CD_PM_HTTPS_TEXT="sslverify=False" + ;; + "${CD_OS_ALPINE}") + CD_CMD_CLEAN="apk cache purge" + CD_CMD_INSTALL="apk add" + CD_CMD_UPDATE="apk update" + CD_CMD_UPGRADE="apk upgrade" + CD_PM_CONF_PATH="" + CD_PM_CONF_TEXT="" + CD_PM_HTTPS_PATH="/etc/apk/repositories.d/https" + CD_PM_HTTPS_TEXT="--no-verify" + ;; + "${CD_OS_DEBIAN}"|"${CD_OS_UBUNTU}") + CD_CMD_CLEAN="apt-get clean" + CD_CMD_INSTALL="apt-get install --assume-yes" + CD_CMD_UPDATE="apt-get update" + CD_CMD_UPGRADE="apt-get upgrade --assume-yes" + CD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf" + CD_PM_CONF_TEXT="\ +Acquire::Check-Valid-Until True; +APT::Get::Show-Versions True; +APT::Install-Recommends False; +APT::Install-Suggests False; +Dir::Etc::SourceParts \"\"; +" + CD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https" + CD_PM_HTTPS_TEXT="Acquire::https::Verify-Peer False;" + ;; + esac + cd_split + cd_echo "CD_CMD_CLEAN" "CD_CMD_INSTALL" "CD_CMD_UPDATE" "CD_CMD_UPGRADE" + cd_split + cd_echo "CD_PM_CONF_PATH" "CD_PM_HTTPS_PATH" + # TODO + case "${CD_OS_ID}" in + "${CD_OS_ALMA}") + CD_OS_REPO="${CD_DEFAULT_REPO_ALMA}" + [ "${CD_REPO_ALMA}" ] && CD_OS_REPO="${CD_REPO_ALMA}" + case "${CD_OS_VERSION}" in + "8"|"9") ;; + *) cd_error_os "CD_OS_VERSION" ;; + esac + CD_PKG_PKG="" CD_PYTHON_COMMAND="python3.11" CD_PYTHON_PACKAGE="python3.11" CD_PYTHON_PACKAGES="/usr/lib64/python3.11/site-packages" @@ -142,10 +158,6 @@ skip_if_unavailable=False *) cd_error_os "CD_OS_VERSION" ;; esac CD_PKG_PKG="" - CD_PM_CONF_PATH="" - CD_PM_CONF_TEXT="" - CD_PM_HTTPS_PATH="/etc/apk/repositories.d/https" - CD_PM_HTTPS_TEXT="--no-verify" CD_PYTHON_COMMAND="python3.11" CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGES="/usr/lib/python3.11/site-packages" @@ -161,16 +173,6 @@ skip_if_unavailable=False *) cd_error_os "CD_OS_VERSION" ;; esac CD_PKG_PKG="apt-utils" - CD_PM_CONF_PATH="/etc/apt/apt.conf.d/apt.conf" - CD_PM_CONF_TEXT="\ -Acquire::Check-Valid-Until True; -APT::Get::Show-Versions True; -APT::Install-Recommends False; -APT::Install-Suggests False; -Dir::Etc::SourceParts \"\"; -" - CD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https" - CD_PM_HTTPS_TEXT="Acquire::https::Verify-Peer False;" CD_PYTHON_PACKAGE="python3" CD_PYTHON_PACKAGES="/usr/lib/python3/dist-packages" ;; @@ -178,8 +180,6 @@ Dir::Etc::SourceParts \"\"; cd_split cd_echo "CD_PKG_PKG" cd_split - cd_echo "CD_PM_CONF_PATH" "CD_PM_HTTPS_PATH" - cd_split cd_echo "CD_PYTHON_COMMAND" "CD_PYTHON_PACKAGE" "CD_PYTHON_PACKAGES" # variables [ "${CD_CA_1}" ] && CD_CA=true