Compare commits

...

26 commits

Author SHA1 Message Date
c203db24d3
readme/jammy
Some checks failed
/ job (push) Failing after 2m13s
2024-08-20 14:21:49 +02:00
4551976395
readme/py/← 2024-08-20 14:20:21 +02:00
246537a2c3
3.11 2024-08-20 14:14:36 +02:00
3826309171
out 2024-08-20 14:11:49 +02:00
e4f9eb3600
readme/tasks 2024-08-20 14:04:17 +02:00
c9b03d099c
opensuse/readme 2024-08-20 13:57:02 +02:00
5a8c91c8d8
opensuse/pm 2024-08-20 13:22:24 +02:00
a0c9746f15
opensuse/feedback 2024-08-20 13:09:41 +02:00
ae2a24a9c8
opensuse/pm/repos 2024-08-20 13:08:15 +02:00
832e5c180c
readme/tasks 2024-08-20 12:54:21 +02:00
dfa7970e7d
sh/80 2024-08-20 12:49:54 +02:00
9207279dc5
opensuse/url/chosen 2024-08-20 11:40:16 +02:00
aae6c25b6e
opensuse/url/default 2024-08-20 11:31:15 +02:00
a9a033d59f
opensuse/readme/https 2024-08-20 11:21:32 +02:00
c113bdd095
opensuse/py/pkgs 2024-08-20 11:17:06 +02:00
309023a661
readme/task 2024-08-20 11:14:51 +02:00
958bc49b12
fedora/py/cmd,pkg 2024-08-20 11:03:20 +02:00
81993970ab
opensuse/py/cmd,pkg 2024-08-20 10:56:07 +02:00
111da82d17
readme/| 2024-08-20 10:39:01 +02:00
fc9f3e4ac6
readme/↕ 2024-08-20 09:24:30 +02:00
de40d4ccd8
readme/align 2024-08-20 09:17:29 +02:00
ca2bdac6c4
opensuse/versions 2024-08-20 09:07:45 +02:00
7e641d7c03
opensuse/ca,pm 2024-08-20 08:36:22 +02:00
3078a46bfb
opensuse/id 2024-08-20 08:27:15 +02:00
d8404734fd
opensuse/workflows 2024-08-20 08:20:43 +02:00
dd27168b75
opensuse/readme 2024-08-20 08:17:19 +02:00
5 changed files with 135 additions and 29 deletions

View file

@ -0,0 +1,14 @@
on: [push]
jobs:
job:
container:
image: ${{vars.DOCKER}}opensuse/leap:15.5
steps:
- name: spcd
env:
SPCD: ${{vars.SPCD}}
run: ${{vars.SPCD}}
- run: spcd-check-project
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -0,0 +1,14 @@
on: [push]
jobs:
job:
container:
image: ${{vars.DOCKER}}opensuse/leap:15.6
steps:
- name: spcd
env:
SPCD: ${{vars.SPCD}}
run: ${{vars.SPCD}}
- run: spcd-check-project
- run: spcd-build-project
- run: spcd-browse-workspace

View file

@ -21,7 +21,7 @@ keywords = []
license-files = { paths = ["license.md"] }
name = "spcd"
readme = "readme.md"
requires-python = ">= 3.10"
requires-python = ">= 3.11"
[project.scripts]
# command = "package.module:function"

View file

@ -30,12 +30,15 @@ from various contexts of CA, CI and OCI / OS.
* [X] Fedora
* [X] 40
* [X] 39
* [ ] OpenSUSE
* [ ] 15.6
* [ ] 15.5
* [X] Rocky
* [X] 9
* [X] 8
* [X] Ubuntu
* [X] Noble (24.04)
* [X] Jammy (22.04)
* [ ] Jammy (22.04)
## How
@ -57,39 +60,43 @@ from various contexts of CA, CI and OCI / OS.
| SPCD_URL_DEBIAN | Debian repository URL | https://deb.debian.org |
| SPCD_URL_EPEL | EPEL repository URL | https://dl.fedoraproject.org |
| SPCD_URL_FEDORA | Fedora repository URL | https://rpmfind.net |
| SPCD_URL_OPENSUSE | OpenSUSE repository URL | https://download.opensuse.org |
| SPCD_URL_PYTHON | Python repository URL | https://pypi.org/simple |
| SPCD_URL_ROCKY | Rocky repository URL | https://dl.rockylinux.org |
| SPCD_URL_UBUNTU | Ubuntu repository URL | https://ubuntu.mirrors.ovh.net |
## Packages
| os | https | upd-ca | python | graphviz | plantuml | shellcheck | shfmt |
|:----------------|---|---|:------------|:------|:----------|:-----|:-----|
| Arch 20240101 | ☑ | ☑ | 3.12 | 12.0 | 1.2023.13 | 0.10 | 3.8 |
| Fedora 40 | ☑ | ☑ | 3.12 → 3.13 | 9.0 | 1.2024.6 | 0.9 | 3.7 |
| Alpine 3.20 | ☑ | ☐ | 3.12 | 9.0 | 1.2024.4 | 0.10 | 3.8 |
| Ubuntu Noble | ☐ | ☐ | 3.12 | u2.42 | u1.2020.2 | u0.9 | u3.8 |
| Debian Bookworm | ☐ | ☐ | 3.11 | 2.42 | 1.2020.2 | 0.9 | 3.6 |
| Alma / Rocky 9 | ☑ | ☑ | 3.9 → 3.12 | 2.44 | e1.2024.6 | e0.8 | |
| os | https | updat-ca | python | graphviz | plantuml | shellcheck | shfmt |
|:----------------|---|---|:------------|:------|:-----------|:------|:-----|
| Arch 20240101 | ☑ | ☑ | 3.12 | 12.0 | 1.2023.13 | 0.10 | 3.8 |
| Fedora 40 | ☑ | ☑ | 3.13 ← 3.12 | 9.0 | 1.2024.6 | 0.9 | 3.7 |
| Alpine 3.20 | ☑ | ☐ | 3.12 | 9.0 | 1.2024.4 | 0.10 | 3.8 |
| Ubuntu Noble | ☐ | ☐ | 3.12 | u2.42 | u1.2020.2 | u0.9 | u3.8 |
| Debian Bookworm | ☐ | ☐ | 3.11 | 2.42 | 1.2020.2 | 0.9 | 3.6 |
| OpenSUSE 15.6 | ☐ | ☑ | 3.12 ← 3.6 | 2.48 | 1.2020.9 | 0.8 | 3.5 |
| Alma | Rocky 9 | ☑ | ☑ | 3.12 ← 3.9 | 2.44 | e1.2024.6 | e0.8 | |
| os | https | upd-ca | python | graphviz | plantuml | shellcheck | shfmt |
|:----------------|---|---|:------------|:------|:----------|:-----|:-----|
| Fedora 39 | ☑ | ☑ | 3.12 → 3.13 | 8.1 | 1.2024.6 | 0.9 | 3.5 |
| Alpine 3.19 | ☑ | ☐ | 3.11 | 9.0 | 1.2023.12 | 0.9 | 3.7 |
| Ubuntu Jammy | ☐ | ☐ | 3.10 | u2.42 | u1.2020.2 | u0.8 | u3.4 |
| Debian Bullseye | ☐ | ☐ | 3.9 | 2.42 | 1.2020.2 | 0.7 | |
| Alma / Rocky 8 | ☑ | ☑ | 3.6 → 3.12 | 2.40 | e1.2024.6 | e0.6 | |
| os | https | updat-ca | python | graphviz | plantuml | shellcheck | shfmt |
|:----------------|---|---|:------------|:------|:-----------|:------|:-----|
| Fedora 39 | ☑ | ☑ | 3.13 ← 3.12 | 8.1 | 1.2024.6 | 0.9 | 3.5 |
| Alpine 3.19 | ☑ | ☐ | 3.11 | 9.0 | 1.2023.12 | 0.9 | 3.7 |
| OpenSUSE 15.5 | ☐ | ☑ | 3.11 ← 3.6 | 2.48 | 1.2020.9 | 0.8 | 3.5 |
| Alma | Rocky 8 | ☑ | ☑ | 3.12 ← 3.6 | 2.40 | e1.2024.6 | e0.6 | |
| os | https | updat-ca | python | graphviz | plantuml | shellcheck | shfmt |
|:----------------|---|---|:------------|:------|:-----------|:------|:-----|
| Ubuntu Jammy | ☐ | ☐ | 3.10 | u2.42 | u1.2020.2 | u0.8 | u3.4 |
| Debian Bullseye | ☐ | ☐ | 3.9 | 2.42 | 1.2020.2 | 0.7 | |
## Tasks
* define templates
* actions
* includes
* relay environment module name
### sh
* support opensuse operating system
* review repositories handling for systems
* opensuse
* codecs repository
* disable & enable https
* write tests
### sh → py
@ -97,9 +104,9 @@ from various contexts of CA, CI and OCI / OS.
* check file & variable sums
* install system packages
* epel
* bats
* plantuml
* shellcheck
* shunit | bats
* graphviz
* openssh
* rsync
@ -110,11 +117,17 @@ from various contexts of CA, CI and OCI / OS.
* venv
* create
* activate
* relay environment module name
### py
* detect ssh private key type
* check
* .py
* .sh
* maximum line length
* detect ssh private key type
* list sys.path
* set workflow templates
* actions
* includes
* write tests

73
spcd.sh
View file

@ -142,6 +142,7 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
"arch") SPCD_OS_ID="${SPCD_OS_ARCH}" ;;
"debian") SPCD_OS_ID="${SPCD_OS_DEBIAN}" ;;
"fedora") SPCD_OS_ID="${SPCD_OS_FEDORA}" ;;
"opensuse-leap") SPCD_OS_ID="${SPCD_OS_OPENSUSE}" ;;
"rocky") SPCD_OS_ID="${SPCD_OS_ROCKY}" ;;
"ubuntu") SPCD_OS_ID="${SPCD_OS_UBUNTU}" ;;
*) spcd_error_os "SPCD_OS_ID" ;;
@ -153,7 +154,7 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
SPCD_OS_VERSION=$(spcd_grep_os VERSION_ID |
sed "s|^\([0-9]\+\)\..*|\1|")
;;
"${SPCD_OS_ALPINE}")
"${SPCD_OS_ALPINE}" | "${SPCD_OS_OPENSUSE}")
SPCD_OS_VERSION=$(spcd_grep_os VERSION_ID |
sed "s|^\([0-9]\+\.[0-9]\+\)\..*|\1|")
;;
@ -194,6 +195,12 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
*) spcd_error_os "SPCD_OS_VERSION" ;;
esac
;;
"${SPCD_OS_OPENSUSE}")
case "${SPCD_OS_VERSION}" in
"15.6" | "15.5") ;;
*) spcd_error_os "SPCD_OS_VERSION" ;;
esac
;;
"${SPCD_OS_UBUNTU}")
case "${SPCD_OS_VERSION}" in
"noble" | "jammy") ;;
@ -231,6 +238,10 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
SPCD_CA_ROOT="/usr/local/share/ca-certificates"
SPCD_CMD_CA="update-ca-certificates"
;;
"${SPCD_OS_OPENSUSE}")
SPCD_CA_ROOT="/etc/pki/trust/anchors"
SPCD_CMD_CA="update-ca-certificates"
;;
*) ;;
esac
spcd_split
@ -249,6 +260,9 @@ ${SPCD_PROJECT_ROOT}$(basename "${GITHUB_SERVER_URL}")"
"${SPCD_OS_ARCH}")
SPCD_PM="${SPCD_PM_PACMAN}"
;;
"${SPCD_OS_OPENSUSE}")
SPCD_PM="${SPCD_PM_ZYPPER}"
;;
*) ;;
esac
spcd_split
@ -321,6 +335,20 @@ Dir::Etc::SourceParts \"\";
SPCD_PM_HTTPS_PATH="/etc/apt/apt.conf.d/https"
SPCD_PM_HTTPS_TEXT="\
Acquire::https::Verify-Peer False;
"
;;
"${SPCD_PM_ZYPPER}")
SPCD_PM_CLEAN="zypper clean"
SPCD_PM_INSTALL="zypper --non-interactive install"
SPCD_PM_QUERY="rpm --query"
SPCD_PM_UPDATE="zypper refresh"
SPCD_PM_UPGRADE="zypper --non-interactive update"
SPCD_PKG_PKG=""
SPCD_PM_CONF_PATH=""
SPCD_PM_CONF_TEXT="\
"
SPCD_PM_HTTPS_PATH=""
SPCD_PM_HTTPS_TEXT="\
"
;;
*) ;;
@ -347,6 +375,9 @@ Acquire::https::Verify-Peer False;
"${SPCD_OS_FEDORA}")
SPCD_URL_DEFAULT="http://download.example/pub/fedora/linux/releases"
;;
"${SPCD_OS_OPENSUSE}")
SPCD_URL_DEFAULT="http://download.opensuse.org"
;;
"${SPCD_OS_ROCKY}")
SPCD_URL_DEFAULT="http://dl.rockylinux.org/\$contentdir"
;;
@ -374,6 +405,11 @@ Acquire::https::Verify-Peer False;
[ -n "${SPCD_URL_FEDORA}" ] && SPCD_URL_CHOSEN="${SPCD_URL_FEDORA}" ||
SPCD_URL_CHOSEN="https://rpmfind.net/linux/fedora/linux/releases"
;;
"${SPCD_OS_OPENSUSE}")
[ -n "${SPCD_URL_OPENSUSE}" ] &&
SPCD_URL_CHOSEN="${SPCD_URL_OPENSUSE}" ||
SPCD_URL_CHOSEN="https://download.opensuse.org"
;;
"${SPCD_OS_ROCKY}")
[ -n "${SPCD_URL_ROCKY}" ] && SPCD_URL_CHOSEN="${SPCD_URL_ROCKY}" ||
SPCD_URL_CHOSEN="https://dl.rockylinux.org/\$contentdir"
@ -413,8 +449,21 @@ 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_OPENSUSE}")
case "${SPCD_OS_VERSION}" in
"15.6")
SPCD_PYTHON_COMMAND="python3.12"
SPCD_PYTHON_PACKAGE="python312"
;;
"15.5")
SPCD_PYTHON_COMMAND="python3.11"
SPCD_PYTHON_PACKAGE="python311"
;;
*) ;;
esac
;;
"${SPCD_OS_UBUNTU}")
case "${SPCD_OS_VERSION}" in
@ -430,7 +479,8 @@ Acquire::https::Verify-Peer False;
spcd_echo "SPCD_PYTHON_COMMAND" "SPCD_PYTHON_PACKAGE"
# set python packages
case "${SPCD_OS_ID}" in
"${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}")
"${SPCD_OS_ALMA}" | "${SPCD_OS_FEDORA}" | "${SPCD_OS_ROCKY}" | \
"${SPCD_OS_OPENSUSE}")
SPCD_PYTHON_PACKAGES="/usr/lib64/${SPCD_PYTHON_COMMAND}/site-packages"
;;
"${SPCD_OS_ALPINE}" | "${SPCD_OS_ARCH}")
@ -488,6 +538,19 @@ deb ${SPCD_URL_CHOSEN} ${SPCD_OS_VERSION}-updates main
deb ${SPCD_URL_CHOSEN}-security ${SPCD_OS_VERSION}-security main
"
;;
"${SPCD_OS_OPENSUSE}")
for spcd_spr__file in \
"backports-update" \
"non-oss" \
"oss" \
"sle-update" \
"update-non-oss" \
"update" \
"openh264"; do
spcd_sed "/etc/zypp/repos.d/repo-${spcd_spr__file}.repo" \
"|${SPCD_URL_DEFAULT}|${SPCD_URL_CHOSEN}|"
done
;;
"${SPCD_OS_ROCKY}")
case "${SPCD_OS_VERSION}" in
"8") spcd_spr__file="/etc/yum.repos.d/Rocky-BaseOS.repo" ;;
@ -910,6 +973,7 @@ SPCD_OS_ALPINE="alpine"
SPCD_OS_ARCH="arch"
SPCD_OS_DEBIAN="debian"
SPCD_OS_FEDORA="fedora"
SPCD_OS_OPENSUSE="opensuse"
SPCD_OS_ROCKY="rocky"
SPCD_OS_UBUNTU="ubuntu"
@ -917,6 +981,7 @@ SPCD_PM_APK="apk"
SPCD_PM_APT="apt"
SPCD_PM_DNF="dnf"
SPCD_PM_PACMAN="pacman"
SPCD_PM_ZYPPER="zypper"
SPCD_PYTHON_VENV="/opt/venv"
SPCD_PYTHON_VENV_BINARIES="${SPCD_PYTHON_VENV}/bin"