diff --git a/readme.md b/readme.md index 7a19759..e9fbf4c 100644 --- a/readme.md +++ b/readme.md @@ -27,7 +27,7 @@ from various contexts of CA, CI and OCI / OS. * [X] Debian * [X] Bookworm (12) * [ ] Bullseye (11) - * [X] Fedora → Python 3.12 + * [X] Fedora * [X] 40 * [X] 39 * [X] Rocky @@ -60,22 +60,22 @@ from various contexts of CA, CI and OCI / OS. ## Packages -| OS image | s | u | py | py++ | gviz | plantuml | shch | shf | ruf | -|:----------------|---|---|:-----|:-----|:-----|:----------|:-----|:----|:----| -| Alpine 3.20 | ☑ | ☐ | | 3.12 | 9.0 | 1.2024.4 | 0.10 | 3.8 | 0.4 | -| Alpine 3.19 | ☑ | ☐ | | 3.11 | 9.0 | 1.2023.12 | 0.9 | 3.7 | | -| Arch 20240101 | ☑ | ☑ | | 3.12 | 12.0 | 1.2023.13 | 0.10 | 3.8 | 0.5 | -| Arch 20231112 | ☑ | ☑ | | 3.12 | 12.0 | 1.2023.13 | 0.10 | 3.8 | 0.5 | -| Debian Bookworm | ☐ | ☐ | | 3.11 | 2.42 | 1.2020.2 | 0.9 | 3.6 | | -| Debian Bullseye | ☐ | ☐ | | 3.9 | 2.42 | 1.2020.2 | 0.7 | | | -| Ubuntu Noble | ☐ | ☐ | | 3.12 | 2.42 | 1.2020.2 | 0.9 | 3.8 | | -| Ubuntu Jammy | ☐ | ☐ | | 3.10 | 2.42 | 1.2020.2 | 0.8 | 3.4 | | -| Fedora 40 | ☑ | ☑ | 3.12 | 3.13 | 9.0 | 1.2024.6 | 0.9 | 3.7 | 0.4 | -| Fedora 39 | ☑ | ☑ | 3.12 | 3.13 | 8.1 | 1.2024.6 | 0.9 | 3.5 | 0.4 | -| Alma 9 | ☑ | ☑ | 3.9 | 3.12 | 2.44 | e1.2024.6 | e0.8 | | | -| Rocky 9 | ☑ | ☑ | 3.9 | 3.12 | 2.44 | e1.2024.6 | e0.8 | | | -| Alma 8 | ☑ | ☑ | | 3.12 | 2.40 | e1.2024.6 | e0.6 | | | -| Rocky 8 | ☑ | ☑ | | 3.12 | 2.40 | e1.2024.6 | e0.6 | | | +| os | s | u | python | gviz | plantuml | shch | spx | shf | ruf | +|:----------------|---|---|:------------|:-----|:----------|:-----|:----|:----|:----| +| Arch 20240101 | ☑ | ☑ | 3.12 | 12.0 | 1.2023.13 | 0.10 | 7.4 | 3.8 | 0.5 | +| Fedora 40 | ☑ | ☑ | 3.12 → 3.13 | 9.0 | 1.2024.6 | 0.9 | 7.2 | 3.7 | 0.4 | +| Alpine 3.20 | ☑ | ☐ | 3.12 | 9.0 | 1.2024.4 | 0.10 | 7.2 | 3.8 | 0.4 | +| Ubuntu Noble | ☐ | ☐ | 3.12 | 2.42 | 1.2020.2 | 0.9 | 7.2 | 3.8 | | +| Debian Bookworm | ☐ | ☐ | 3.11 | 2.42 | 1.2020.2 | 0.9 | 5.3 | 3.6 | | +| Alma / Rocky 9 | ☑ | ☑ | 3.9 → 3.12 | 2.44 | e1.2024.6 | e0.8 | | | | + +| os | s | u | python | gviz | plantuml | shch | spx | shf | ruf | +|:----------------|---|---|:------------|:-----|:----------|:-----|:----|:----|:----| +| Fedora 39 | ☑ | ☑ | 3.12 → 3.13 | 8.1 | 1.2024.6 | 0.9 | 6.2 | 3.5 | 0.4 | +| Alpine 3.19 | ☑ | ☐ | 3.11 | 9.0 | 1.2023.12 | 0.9 | 6.2 | 3.7 | | +| Ubuntu Jammy | ☐ | ☐ | 3.10 | 2.42 | 1.2020.2 | 0.8 | 4.3 | 3.4 | | +| Debian Bullseye | ☐ | ☐ | 3.9 | 2.42 | 1.2020.2 | 0.7 | 3.4 | | | +| Alma / Rocky 8 | ☑ | ☑ | 3.6 → 3.12 | 2.40 | e1.2024.6 | e0.6 | | | | ## Tasks diff --git a/spcd.sh b/spcd.sh index f596325..458202d 100644 --- a/spcd.sh +++ b/spcd.sh @@ -33,9 +33,7 @@ spcd_main() { spcd_install_git spcd_install_python # TODO move to Python - spcd_install_rsync - # TODO move to Python - spcd_install_ssh + spcd_install_packages spcd_clean_packages_cache spcd_install_python_modules spcd_write_python_module @@ -217,8 +215,6 @@ spcd_set_environment_variables() { SPCD_DNS_FILE="/etc/resolv.conf" SPCD_PKG_CA="ca-certificates" SPCD_PKG_GIT="git" - # TODO move to Python - SPCD_PKG_RSYNC="rsync" SPCD_PYTHON_ALIAS="python3" spcd_split spcd_echo "SPCD_DNS_FILE" "SPCD_PKG_CA" "SPCD_PKG_GIT" "SPCD_PYTHON_ALIAS" @@ -398,8 +394,8 @@ Acquire::https::Verify-Peer False; # set python command & package case "${SPCD_OS_ID}" in "${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") - SPCD_PYTHON_COMMAND="python3.11" - SPCD_PYTHON_PACKAGE="python3.11" + SPCD_PYTHON_COMMAND="python3.12" + SPCD_PYTHON_PACKAGE="python3.12" ;; "${SPCD_OS_ALPINE}") SPCD_PYTHON_COMMAND="python3.11" @@ -418,8 +414,8 @@ Acquire::https::Verify-Peer False; SPCD_PYTHON_PACKAGE="python3" ;; "${SPCD_OS_FEDORA}") - SPCD_PYTHON_COMMAND="python3.12" - SPCD_PYTHON_PACKAGE="python3" + SPCD_PYTHON_COMMAND="python3.13" + SPCD_PYTHON_PACKAGE="python3.13" ;; "${SPCD_OS_UBUNTU}") case "${SPCD_OS_VERSION}" in @@ -451,13 +447,6 @@ Acquire::https::Verify-Peer False; # spcd_split spcd_echo "SPCD_CA" - # TODO move to Python - case "${SPCD_PM}" in - "${SPCD_PM_APK}" | "${SPCD_PM_APT}") SPCD_PKG_SSH="openssh-client" ;; - "${SPCD_PM_DNF}") SPCD_PKG_SSH="openssh-clients" ;; - "${SPCD_PM_PACMAN}") SPCD_PKG_SSH="openssh" ;; - *) ;; - esac } spcd_list_working_directory() { @@ -609,15 +598,60 @@ spcd_install_python() { } # TODO move to Python -spcd_install_rsync() { +spcd_install_packages() { + # graphviz + spcd_step "Install GraphViz" + spcd_install_package "graphviz" + # plantuml + spcd_step "Install PlantUML" + case "${SPCD_OS_ID}" in + "${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;; + *) spcd_install_package "plantuml" ;; + esac + # python sphinx + spcd_step "Install Python Sphinx" + case "${SPCD_OS_ID}" in + "${SPCD_OS_ALPINE}") + spcd_install_package "py3-sphinx" + spcd_install_package "py3-sphinx_rtd_theme" + ;; + "${SPCD_OS_ARCH}") + spcd_install_package "python-sphinx" + spcd_install_package "python-sphinx_rtd_theme" + ;; + "${SPCD_OS_DEBIAN}" | "${SPCD_OS_UBUNTU}") + spcd_install_package "python3-sphinx" + spcd_install_package "python3-sphinx-rtd-theme" + ;; + "${SPCD_OS_FEDORA}") + spcd_install_package "python3-sphinx" + spcd_install_package "python3-sphinx_rtd_theme" + ;; + *) ;; + esac + # rsync spcd_step "Install Rsync" - spcd_install_package "${SPCD_PKG_RSYNC}" -} - -# TODO move to Python -spcd_install_ssh() { + spcd_install_package "rsync" + # shellcheck + spcd_step "Install ShellCheck" + case "${SPCD_OS_ID}" in + "${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;; + *) spcd_install_package "shellcheck" ;; + esac + # shfmt + spcd_step "Install ShellFormat" + case "${SPCD_OS_ID}" in + "${SPCD_OS_ALMA}" | "${SPCD_OS_ROCKY}") ;; + *) spcd_install_package "shfmt" ;; + esac + # ssh spcd_step "Install SSH" - spcd_install_package "${SPCD_PKG_SSH}" + case "${SPCD_PM}" in + "${SPCD_PM_APK}" | "${SPCD_PM_APT}") spcd_install_package "openssh-client" ;; + "${SPCD_PM_DNF}") spcd_install_package "openssh-clients" ;; + "${SPCD_PM_PACMAN}") spcd_install_package "openssh" ;; + *) ;; + esac } spcd_clean_packages_cache() { diff --git a/spcd/__init__.py b/spcd/__init__.py index 25827f6..2398f77 100644 --- a/spcd/__init__.py +++ b/spcd/__init__.py @@ -42,7 +42,6 @@ def main(main: str) -> None: "apt-get", "install", "--assume-yes", - "graphviz", "python3-sphinx", "python3-sphinx-rtd-theme", )