Compare commits

...

14 commits

Author SHA1 Message Date
ea8286b693
readme/rejigger
Some checks failed
/ job (push) Has been cancelled
2024-07-22 09:08:06 +02:00
930318da82
readme/spx 2024-07-22 08:57:09 +02:00
512f5d4d9e
python sphinx 2024-07-22 08:35:34 +02:00
bbb180c9e6
python3 2024-07-21 22:40:33 +02:00
0981655749
readme/python3.6 2024-07-21 22:39:21 +02:00
6420e1a24c
readme/python 2024-07-21 22:32:56 +02:00
9da6e493d8
shfmt 2024-07-21 22:26:02 +02:00
909dc010e0
shellcheck 2024-07-21 22:21:23 +02:00
537f6c6cf9
plantuml 2024-07-21 22:18:20 +02:00
44c2557a50
ssh 2024-07-21 22:14:43 +02:00
f22b370cc3
graphviz 2024-07-21 22:06:29 +02:00
52ed683ed0
rsync 2024-07-21 22:04:09 +02:00
f4e45472cd
rsync & ssh → packages 2024-07-21 22:02:51 +02:00
1d7d6b27e8
readme/fedora 2024-07-21 21:24:29 +02:00
3 changed files with 74 additions and 41 deletions

View file

@ -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

80
spcd.sh
View file

@ -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() {

View file

@ -42,7 +42,6 @@ def main(main: str) -> None:
"apt-get",
"install",
"--assume-yes",
"graphviz",
"python3-sphinx",
"python3-sphinx-rtd-theme",
)