Compare commits
No commits in common. "58192fa9f8e458164abb3155af2fcc57986db36f" and "ca5de693dc18a80ad8ce26f528d50ab114fe04cf" have entirely different histories.
58192fa9f8
...
ca5de693dc
2 changed files with 81 additions and 83 deletions
|
@ -240,7 +240,6 @@ Handle project workflows in a unified way:
|
|||
* locales
|
||||
* persist
|
||||
* test
|
||||
* workspace variable
|
||||
|
||||
#### Shell → Python
|
||||
|
||||
|
|
|
@ -397,12 +397,12 @@ spcd_txt_get() {
|
|||
esac
|
||||
}
|
||||
|
||||
# ╭─────────────────╮
|
||||
# │ e = environment │
|
||||
# ╰─────────────────╯
|
||||
# ╭──────────╮
|
||||
# │ s = step │
|
||||
# ╰──────────╯
|
||||
|
||||
# ╭───┬───────────╮
|
||||
# │ e │ constants │
|
||||
# │ s │ constants │
|
||||
# ╰───┴───────────╯
|
||||
|
||||
SPCD_OS_ALMA="alma"
|
||||
|
@ -420,9 +420,9 @@ SPCD_PM_DNF="dnf"
|
|||
SPCD_PM_PACMAN="pacman"
|
||||
SPCD_PM_ZYPPER="zypper"
|
||||
|
||||
# ╭───┬───────────╮
|
||||
# │ e │ functions │
|
||||
# ╰───┴───────────╯
|
||||
# ╭───┬─────────────╮
|
||||
# │ s │ environment │
|
||||
# ╰───┴─────────────╯
|
||||
|
||||
spcd_step__environment_print() {
|
||||
spcd_ca "list"
|
||||
|
@ -836,68 +836,10 @@ spcd_python_pip() {
|
|||
fi
|
||||
}
|
||||
|
||||
# ╭───┬──────────────────────────────╮
|
||||
# │ f │ ca = certificate authorities │
|
||||
# ╰───┴──────────────────────────────╯
|
||||
|
||||
spcd_f_ca_install() {
|
||||
spcd_step "Install package"
|
||||
spcd_f_pm_pkg_install "ca-certificates"
|
||||
}
|
||||
|
||||
spcd_f_ca_update() {
|
||||
spcd_step "Update certificates"
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ARCH}" | \
|
||||
"${SPCD_OS_ALMA}" | \
|
||||
"${SPCD_OS_FEDORA}" | \
|
||||
"${SPCD_OS_ROCKY}")
|
||||
spcd_run update-ca-trust
|
||||
;;
|
||||
"${SPCD_OS_ALPINE}" | \
|
||||
"${SPCD_OS_DEBIAN}" | \
|
||||
"${SPCD_OS_OPENSUSE}" | \
|
||||
"${SPCD_OS_UBUNTU}")
|
||||
spcd_run update-ca-certificates
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
spcd_f_ca_write() {
|
||||
spcd_step "Write certificates"
|
||||
local root
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}")
|
||||
root="/etc/pki/ca-trust/source/anchors"
|
||||
;;
|
||||
"${SPCD_OS_ALPINE}" | "${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
|
||||
root="/usr/local/share/ca-certificates"
|
||||
;;
|
||||
"${SPCD_OS_ARCH}")
|
||||
root="/etc/ca-certificates/trust-source/anchors"
|
||||
;;
|
||||
"${SPCD_OS_OPENSUSE}")
|
||||
root="/etc/pki/trust/anchors"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
spcd_os_mkdir "${root}"
|
||||
spcd_ca "write" "${root}"
|
||||
}
|
||||
|
||||
# ╭───┬──────────────────────╮
|
||||
# │ f │ pm = package manager │
|
||||
# ╰───┴──────────────────────╯
|
||||
|
||||
spcd_f_pm_install() {
|
||||
spcd_step "Install tools"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APT}") spcd_f_pm_pkg_install "apt-utils" ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# ╭───┬────┬───────╮
|
||||
# │ f │ pm │ https │
|
||||
# ╰───┴────┴───────╯
|
||||
|
@ -1170,10 +1112,6 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
|
|||
esac
|
||||
}
|
||||
|
||||
# ╭───┬──────╮
|
||||
# │ s = step │
|
||||
# ╰───┴──────╯
|
||||
|
||||
# ╭───┬─────╮
|
||||
# │ s │ dns │
|
||||
# ╰───┴─────╯
|
||||
|
@ -1368,6 +1306,75 @@ Dir::Etc::SourceParts \"\";
|
|||
esac
|
||||
}
|
||||
|
||||
spcd_step__packages_install_tools() {
|
||||
spcd_step "Install tools"
|
||||
case "${SPCD_PM}" in
|
||||
"${SPCD_PM_APT}") spcd_f_pm_pkg_install "apt-utils" ;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
spcd_step__packages_install_locales() {
|
||||
spcd_step_in "Locales"
|
||||
spcd_step "Install"
|
||||
spcd_f_txt_locales "install"
|
||||
spcd_step "Set"
|
||||
spcd_f_txt_locale "set" "${SPCD_TXT_LOCALE}"
|
||||
spcd_step "Show"
|
||||
spcd_f_txt_locale "show"
|
||||
spcd_step_out
|
||||
}
|
||||
|
||||
# ╭───┬────╮
|
||||
# │ s │ ca │
|
||||
# ╰───┴────╯
|
||||
|
||||
spcd_step__ca_install_package() {
|
||||
spcd_step "Install package"
|
||||
spcd_f_pm_pkg_install "ca-certificates"
|
||||
}
|
||||
|
||||
spcd_step__ca_write_certificates() {
|
||||
spcd_step "Write certificates"
|
||||
local root
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}")
|
||||
root="/etc/pki/ca-trust/source/anchors"
|
||||
;;
|
||||
"${SPCD_OS_ALPINE}" | "${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
|
||||
root="/usr/local/share/ca-certificates"
|
||||
;;
|
||||
"${SPCD_OS_ARCH}")
|
||||
root="/etc/ca-certificates/trust-source/anchors"
|
||||
;;
|
||||
"${SPCD_OS_OPENSUSE}")
|
||||
root="/etc/pki/trust/anchors"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
spcd_os_mkdir "${root}"
|
||||
spcd_ca "write" "${root}"
|
||||
}
|
||||
|
||||
spcd_step__ca_update_certificates() {
|
||||
spcd_step "Update certificates"
|
||||
case "${SPCD_OS_ID}" in
|
||||
"${SPCD_OS_ARCH}" | \
|
||||
"${SPCD_OS_ALMA}" | \
|
||||
"${SPCD_OS_FEDORA}" | \
|
||||
"${SPCD_OS_ROCKY}")
|
||||
spcd_run update-ca-trust
|
||||
;;
|
||||
"${SPCD_OS_ALPINE}" | \
|
||||
"${SPCD_OS_DEBIAN}" | \
|
||||
"${SPCD_OS_OPENSUSE}" | \
|
||||
"${SPCD_OS_UBUNTU}")
|
||||
spcd_run update-ca-certificates
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# ╭───┬──────────╮
|
||||
# │ s │ packages │
|
||||
# ╰───┴──────────╯
|
||||
|
@ -1578,22 +1585,14 @@ spcd_main() {
|
|||
spcd_step__packages_set_configuration
|
||||
spcd_f_pm_https_trust
|
||||
spcd_f_pm_pkg_update
|
||||
spcd_f_pm_install
|
||||
# locales
|
||||
spcd_step_in "Locales"
|
||||
spcd_step "Install"
|
||||
spcd_f_txt_locales "install"
|
||||
spcd_step "Set"
|
||||
spcd_f_txt_locale "set" "${SPCD_TXT_LOCALE}"
|
||||
spcd_step "Show"
|
||||
spcd_f_txt_locale "show"
|
||||
spcd_step_out
|
||||
spcd_step__packages_install_tools
|
||||
spcd_step__packages_install_locales
|
||||
spcd_step_out
|
||||
# ca
|
||||
spcd_step_in "CA"
|
||||
spcd_f_ca_install
|
||||
spcd_f_ca_write
|
||||
spcd_f_ca_update
|
||||
spcd_step__ca_install_package
|
||||
spcd_step__ca_write_certificates
|
||||
spcd_step__ca_update_certificates
|
||||
spcd_step_out
|
||||
# packages
|
||||
spcd_step_in "Packages"
|
||||
|
|
Loading…
Reference in a new issue