Compare commits

...

5 commits

Author SHA1 Message Date
ee1cb0af52
copy git cloned packages into venv instead of system
Some checks failed
/ job (push) Failing after 14m56s
2024-08-07 12:43:45 +02:00
deb1ce6c49
constant for venv 2024-08-07 12:37:04 +02:00
c7617ec6c6
simplify enumeration loops for dns & ca 2024-08-07 12:31:06 +02:00
0387195fa8
only main and root packages 2024-08-07 11:31:43 +02:00
7a8b64c3b4
synchronize packages 2024-08-07 11:14:32 +02:00

27
spcd.sh
View file

@ -528,14 +528,13 @@ spcd_set_https_verification_off() {
spcd_set_dns_resolving() { spcd_set_dns_resolving() {
spcd_step "Set DNS resolving" spcd_step "Set DNS resolving"
spcd_sdr__index=1 while true; do
spcd_sdr__index=$((spcd_sdr__index + 1))
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\"" eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
while [ -n "${spcd_sdr__value}" ]; do [ -n "${spcd_sdr__value}" ] || break
spcd_sdr__text="${spcd_sdr__text}\ spcd_sdr__text="${spcd_sdr__text}\
nameserver ${spcd_sdr__value} nameserver ${spcd_sdr__value}
" "
spcd_sdr__index=$((spcd_sdr__index + 1))
eval "spcd_sdr__value=\"\${SPCD_DNS_${spcd_sdr__index}}\""
done done
spcd_write "${SPCD_DNS_FILE}" "${spcd_sdr__text}" spcd_write "${SPCD_DNS_FILE}" "${spcd_sdr__text}"
} }
@ -558,15 +557,14 @@ spcd_install_ca_certificates() {
spcd_write_ca_certificates() { spcd_write_ca_certificates() {
spcd_step "Write CA certificates" spcd_step "Write CA certificates"
spcd_mkdir "${SPCD_CA_ROOT}" spcd_mkdir "${SPCD_CA_ROOT}"
spcd_wcc__index=1 while true; do
spcd_wcc__index=$((spcd_wcc__index + 1))
eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\"" eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\""
while [ -n "${spcd_wcc__text}" ]; do [ -n "${spcd_wcc__text}" ] || break
spcd_wcc__path="${SPCD_CA_ROOT}/${spcd_wcc__index}.crt" spcd_wcc__path="${SPCD_CA_ROOT}/${spcd_wcc__index}.crt"
spcd_split spcd_split
spcd_write "${spcd_wcc__path}" "${spcd_wcc__text}" spcd_write "${spcd_wcc__path}" "${spcd_wcc__text}"
spcd_openssl "${spcd_wcc__path}" spcd_openssl "${spcd_wcc__path}"
spcd_wcc__index=$((spcd_wcc__index + 1))
eval "spcd_wcc__text=\"\${SPCD_CA_${spcd_wcc__index}}\""
done done
} }
@ -706,9 +704,9 @@ spcd_install_packages() {
index-url = ${SPCD_URL_PYTHON} index-url = ${SPCD_URL_PYTHON}
" "
spcd_split spcd_split
spcd_ip__venv="/opt/venv" "${SPCD_PYTHON_ALIAS}" -m "venv" "${SPCD_VENV}"
"${SPCD_PYTHON_ALIAS}" -m "venv" "${spcd_ip__venv}" spcd_split
. "${spcd_ip__venv}/bin/activate" . "${SPCD_VENV}/bin/activate"
spcd_split spcd_split
pip install --upgrade "pip" pip install --upgrade "pip"
spcd_split spcd_split
@ -721,6 +719,7 @@ index-url = ${SPCD_URL_PYTHON}
spcd_install_python_modules() { spcd_install_python_modules() {
spcd_step "Install Python modules" spcd_step "Install Python modules"
spcd_ipm__root="$(mktemp --directory)" || exit spcd_ipm__root="$(mktemp --directory)" || exit
spcd_ipm__target="${SPCD_VENV}/lib/${SPCD_PYTHON_COMMAND}/site-packages"
echo "${spcd_ipm__root}" echo "${spcd_ipm__root}"
for spcd_ipm__repository in "${SPCD_GIT_MAIN}" "${SPCD_GIT_ROOT}"; do for spcd_ipm__repository in "${SPCD_GIT_MAIN}" "${SPCD_GIT_ROOT}"; do
case "${spcd_ipm__repository}" in case "${spcd_ipm__repository}" in
@ -742,8 +741,8 @@ ${spcd_ipm__url}
echo "\ echo "\
${spcd_ipm__path} ${spcd_ipm__path}
${SPCD_PYTHON_PACKAGES}" ${spcd_ipm__target}"
cp --recursive "${spcd_ipm__path}" "${SPCD_PYTHON_PACKAGES}" || cp --recursive "${spcd_ipm__path}" "${spcd_ipm__target}" ||
exit exit
# check matching of file and variable # check matching of file and variable
spcd_ipm__script="${spcd_ipm__root}/${spcd_ipm__name}/spcd.sh" spcd_ipm__script="${spcd_ipm__root}/${spcd_ipm__name}/spcd.sh"
@ -949,6 +948,8 @@ SPCD_PM_APT="apt"
SPCD_PM_DNF="dnf" SPCD_PM_DNF="dnf"
SPCD_PM_PACMAN="pacman" SPCD_PM_PACMAN="pacman"
SPCD_VENV="/opt/venv"
SPCD_HORIZONTAL="────╌╌╌╌┄┄┄┄┈┈┈┈" SPCD_HORIZONTAL="────╌╌╌╌┄┄┄┄┈┈┈┈"
SPCD_OPEN="${SPCD_BOX_DOWN}${SPCD_BOX_LEFT}" SPCD_OPEN="${SPCD_BOX_DOWN}${SPCD_BOX_LEFT}"