Compare commits

..

6 commits

Author SHA1 Message Date
164420d418
eval/locales
Some checks failed
/ arch (push) Successful in 2m57s
/ alpine (push) Successful in 2m24s
/ fedora (push) Successful in 7m59s
/ debian (push) Failing after 5m20s
/ opensuse (push) Successful in 2m54s
/ ubuntu (push) Successful in 11m0s
/ rocky (push) Blocked by required conditions
/ alma (push) Has been cancelled
2024-09-07 00:04:42 +02:00
81db5ca397
eval/pacman-key,update 2024-09-06 23:54:37 +02:00
f136bd1f07
eval/update-ca,upgrade 2024-09-06 23:52:24 +02:00
19eee535c5
eval/clean,install 2024-09-06 23:49:23 +02:00
9972005755
spcd_eval 2024-09-06 23:47:00 +02:00
dd1a9ed807
tasks/−restrict 2024-09-06 22:31:42 +02:00
2 changed files with 32 additions and 25 deletions

View file

@ -238,7 +238,6 @@ Handle project workflows in a unified way:
* disable & enable https * disable & enable https
* locales * locales
* persist * persist
* restrict LC_* variables set for alpine
* test * test
#### Shell → Python #### Shell → Python

View file

@ -247,6 +247,13 @@ nameserver ${value}
fi fi
} }
spcd_eval() {
if [ -n "${1}" ]; then
echo "${@}"
eval "${@}"
fi
}
# ╭───────────┬───────╮ # ╭───────────┬───────╮
# │ functions │ error │ # │ functions │ error │
# ╰───────────┴───────╯ # ╰───────────┴───────╯
@ -776,11 +783,11 @@ spcd_step__environment_list_workspace() {
spcd_clean_cache() { spcd_clean_cache() {
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk cache purge ;; "${SPCD_PM_APK}") spcd_eval apk cache purge ;;
"${SPCD_PM_APT}") apt-get clean ;; "${SPCD_PM_APT}") spcd_eval apt-get clean ;;
"${SPCD_PM_DNF}") dnf clean all ;; "${SPCD_PM_DNF}") spcd_eval dnf clean all ;;
"${SPCD_PM_PACMAN}") pacman --sync --clean --noconfirm ;; "${SPCD_PM_PACMAN}") spcd_eval pacman --sync --clean --noconfirm ;;
"${SPCD_PM_ZYPPER}") zypper clean ;; "${SPCD_PM_ZYPPER}") spcd_eval zypper clean ;;
*) ;; *) ;;
esac esac
} }
@ -819,11 +826,11 @@ spcd_https_path() {
spcd_install_package() { spcd_install_package() {
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk add "${1}" ;; "${SPCD_PM_APK}") spcd_eval apk add "${1}" ;;
"${SPCD_PM_APT}") apt-get install --assume-yes "${1}" ;; "${SPCD_PM_APT}") spcd_eval apt-get install --assume-yes "${1}" ;;
"${SPCD_PM_DNF}") dnf install --assumeyes "${1}" ;; "${SPCD_PM_DNF}") spcd_eval dnf install --assumeyes "${1}" ;;
"${SPCD_PM_PACMAN}") pacman --sync --noconfirm "${1}" ;; "${SPCD_PM_PACMAN}") spcd_eval pacman --sync --noconfirm "${1}" ;;
"${SPCD_PM_ZYPPER}") zypper --non-interactive install "${1}" ;; "${SPCD_PM_ZYPPER}") spcd_eval zypper --non-interactive install "${1}" ;;
*) ;; *) ;;
esac esac
spcd_clean_cache spcd_clean_cache
@ -1006,7 +1013,7 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
done done
;; ;;
"list") "list")
if ! locale --all-locales; then if ! spcd_eval locale --all-locales; then
echo "No locales yet!" echo "No locales yet!"
fi fi
;; ;;
@ -1198,10 +1205,11 @@ Dir::Etc::SourceParts \"\";
esac esac
case "${SPCD_OS_ID}" in case "${SPCD_OS_ID}" in
"${SPCD_OS_ARCH}") "${SPCD_OS_ARCH}")
pacman-key --init spcd_eval pacman-key --init
;; ;;
"${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}") "${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}")
export DEBIAN_FRONTEND="noninteractive" export DEBIAN_FRONTEND="noninteractive"
spcd_os_printenv DEBIAN_FRONTEND
;; ;;
*) ;; *) ;;
esac esac
@ -1239,11 +1247,11 @@ SSLVerify = No
spcd_step__packages_update_catalog() { spcd_step__packages_update_catalog() {
spcd_step "Update catalog" spcd_step "Update catalog"
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk update ;; "${SPCD_PM_APK}") spcd_eval apk update ;;
"${SPCD_PM_APT}") apt-get update ;; "${SPCD_PM_APT}") spcd_eval apt-get update ;;
"${SPCD_PM_DNF}") dnf makecache ;; "${SPCD_PM_DNF}") spcd_eval dnf makecache ;;
"${SPCD_PM_PACMAN}") pacman --sync --refresh ;; "${SPCD_PM_PACMAN}") spcd_eval pacman --sync --refresh ;;
"${SPCD_PM_ZYPPER}") zypper refresh ;; "${SPCD_PM_ZYPPER}") spcd_eval zypper refresh ;;
*) ;; *) ;;
esac esac
} }
@ -1305,13 +1313,13 @@ spcd_step__ca_update_certificates() {
"${SPCD_OS_ALMA}" | \ "${SPCD_OS_ALMA}" | \
"${SPCD_OS_FEDORA}" | \ "${SPCD_OS_FEDORA}" | \
"${SPCD_OS_ROCKY}") "${SPCD_OS_ROCKY}")
update-ca-trust spcd_eval update-ca-trust
;; ;;
"${SPCD_OS_ALPINE}" | \ "${SPCD_OS_ALPINE}" | \
"${SPCD_OS_DEBIAN}" | \ "${SPCD_OS_DEBIAN}" | \
"${SPCD_OS_OPENSUSE}" | \ "${SPCD_OS_OPENSUSE}" | \
"${SPCD_OS_UBUNTU}") "${SPCD_OS_UBUNTU}")
update-ca-certificates spcd_eval update-ca-certificates
;; ;;
*) ;; *) ;;
esac esac
@ -1333,11 +1341,11 @@ spcd_step__packages_verify_https() {
spcd_step__packages_upgrade_system() { spcd_step__packages_upgrade_system() {
spcd_step "Upgrade system" spcd_step "Upgrade system"
case "${SPCD_PM}" in case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk upgrade ;; "${SPCD_PM_APK}") spcd_eval apk upgrade ;;
"${SPCD_PM_APT}") apt-get upgrade --assume-yes ;; "${SPCD_PM_APT}") spcd_eval apt-get upgrade --assume-yes ;;
"${SPCD_PM_DNF}") dnf upgrade --assumeyes ;; "${SPCD_PM_DNF}") spcd_eval dnf upgrade --assumeyes ;;
"${SPCD_PM_PACMAN}") pacman --sync --sysupgrade --noconfirm ;; "${SPCD_PM_PACMAN}") spcd_eval pacman --sync --sysupgrade --noconfirm ;;
"${SPCD_PM_ZYPPER}") zypper --non-interactive update ;; "${SPCD_PM_ZYPPER}") spcd_eval zypper --non-interactive update ;;
*) ;; *) ;;
esac esac
} }