From 5e92221ba421c0ee1fd302e0e344473d394dcb85 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sun, 13 Oct 2024 16:36:54 -0400 Subject: [PATCH 1/3] chown system python packages --- root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run b/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run index f32ae8d..15411a5 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run +++ b/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run @@ -10,7 +10,12 @@ rm -rf \ if ! id -G abc | grep -qw "7310"; then usermod -a -G lsio abc fi - +PUID=${PUID:-911} +PY_LOCAL_PATH=$(find /usr/local/lib -maxdepth 1 -name python* -type d) +if [[ ! "$(stat -c %u ${PY_LOCAL_PATH}/site-packages)" == "${PUID}" ]]; then + echo "**** New container detected, fixing python package permissions. This may take a while. ****" + chown -R abc:abc "${PY_LOCAL_PATH}/site-packages" +fi # set permissions echo "Setting permissions" lsiown -R abc:abc \ From c9cb4d1b9e8c25dcc5e8aae540dac2fc1b150b59 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:11:55 -0400 Subject: [PATCH 2/3] increase timeout --- Jenkinsfile | 2 +- jenkins-vars.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 426e6a0..70a13fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { CI_WEB = 'true' CI_PORT = '8123' CI_SSL = 'false' - CI_DELAY = '120' + CI_DELAY = '240' CI_DOCKERENV = 'TZ=Europe/London' CI_AUTH = '' CI_WEBPATH = '' diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 0140e05..3473b85 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -23,7 +23,7 @@ repo_vars: - CI_WEB = 'true' - CI_PORT = '8123' - CI_SSL = 'false' - - CI_DELAY = '120' + - CI_DELAY = '240' - CI_DOCKERENV = 'TZ=Europe/London' - CI_AUTH = '' - CI_WEBPATH = '' From 1a717bc2c4b83a1f6065a26f7c14ac3211c74e10 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:42:12 -0400 Subject: [PATCH 3/3] hail mary --- Dockerfile | 1 + Dockerfile.aarch64 | 1 + root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f8b058..de38596 100644 --- a/Dockerfile +++ b/Dockerfile @@ -233,6 +233,7 @@ RUN \ chmod -R g+w /usr/local && \ groupadd lsio && \ groupmod -g 7310 lsio && \ + mv /usr/local/lib/python3.12 /usr/local/lib/python3.12.bak && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apk del --purge \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 12cf4af..94c62d8 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -233,6 +233,7 @@ RUN \ chmod -R g+w /usr/local && \ groupadd lsio && \ groupmod -g 7310 lsio && \ + mv /usr/local/lib/python3.12 /usr/local/lib/python3.12.bak && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apk del --purge \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run b/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run index 15411a5..a9cde16 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run +++ b/root/etc/s6-overlay/s6-rc.d/init-config-homeassistant/run @@ -12,9 +12,11 @@ if ! id -G abc | grep -qw "7310"; then fi PUID=${PUID:-911} PY_LOCAL_PATH=$(find /usr/local/lib -maxdepth 1 -name python* -type d) -if [[ ! "$(stat -c %u ${PY_LOCAL_PATH}/site-packages)" == "${PUID}" ]]; then +PY_LOCAL_PATH="${PY_LOCAL_PATH%.bak}" +if [[ -d "${PY_LOCAL_PATH}.bak" ]]; then echo "**** New container detected, fixing python package permissions. This may take a while. ****" - chown -R abc:abc "${PY_LOCAL_PATH}/site-packages" + mv "${PY_LOCAL_PATH}.bak" "${PY_LOCAL_PATH}" + chown -R abc:abc "${PY_LOCAL_PATH}" fi # set permissions echo "Setting permissions"