From d043b5ff510fcb3d334a70f12f19ea0038396173 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:14:26 +0000 Subject: [PATCH 01/10] Github bot : issues linked to readme --- jellyfin/README.md | 1 + qbittorrent/README.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/jellyfin/README.md b/jellyfin/README.md index c391fb21e..3fb1f6a5f 100644 --- a/jellyfin/README.md +++ b/jellyfin/README.md @@ -1,3 +1,4 @@ +## ⚠ Open Request : [✨ [REQUEST] Jellyfin discord bot (opened 2023-08-17)](https://github.com/alexbelgium/hassio-addons/issues/943) by [@matsob0123](https://github.com/matsob0123) ## ⚠ Open Request : [✨ [REQUEST] Jellyfish NAS: omit `/config/addons_config/jellyfin/data/metadata` from backup (opened 2023-10-25)](https://github.com/alexbelgium/hassio-addons/issues/1048) by [@bilogic](https://github.com/bilogic) # Home assistant add-on: jellyfin diff --git a/qbittorrent/README.md b/qbittorrent/README.md index de6072253..5dde08772 100644 --- a/qbittorrent/README.md +++ b/qbittorrent/README.md @@ -1,4 +1,3 @@ -## ⚠ Open Issue : [🐛 [qbittorrent] Unable to get qbitmanage to run (opened 2023-12-13)](https://github.com/alexbelgium/hassio-addons/issues/1131) by [@hacshacdgacs](https://github.com/hacshacdgacs) ## ⚠ Open Issue : [🐛 [Qbittorrent] Unable to connect to Qbittorrent from Sonarr or Prowlarr (opened 2024-01-02)](https://github.com/alexbelgium/hassio-addons/issues/1153) by [@JohnnyPicnic](https://github.com/JohnnyPicnic) # Home assistant add-on: qbittorrent From 254369b0c95fa61017c02cbc5d0039d137bb8d8f Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:48:22 +0100 Subject: [PATCH 02/10] Update Dockerfile https://github.com/alexbelgium/hassio-addons/issues/1154#issuecomment-1876077498 --- calibre/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calibre/Dockerfile b/calibre/Dockerfile index 02a1d9aab..47512b7d6 100644 --- a/calibre/Dockerfile +++ b/calibre/Dockerfile @@ -34,12 +34,12 @@ VOLUME [ "/sys/fs/cgroup" ] # hadolint ignore=SC2015,DL4006,SC2013,SC2086 RUN \ # Change home folder location - usermod --home /config/addons_config/calibre abc \ + usermod --home /config abc \ && mkdir -p /opt/calibre # Global LSIO modifications ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" -ARG CONFIGLOCATION="/config/addons_config/calibre" +ARG CONFIGLOCATION="/config" RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## From f5d953e475b37b98e23a5860f2760c2b41db29f5 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:49:20 +0100 Subject: [PATCH 03/10] Update config.json --- calibre/config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calibre/config.json b/calibre/config.json index c291b447f..f69a68891 100644 --- a/calibre/config.json +++ b/calibre/config.json @@ -57,9 +57,9 @@ "/dev/nvme2" ], "environment": { - "CALIBRE_CONFIG_DIRECTORY": "/config/addons_config/calibre", - "FM_HOME": "/config/addons_config/calibre", - "HOME": "/config/addons_config/calibre", + "CALIBRE_CONFIG_DIRECTORY": "/config", + "FM_HOME": "/config", + "HOME": "/config", "PGID": "0", "PUID": "0", "START_DOCKER": "false", From 304076cd56659da3c3f137075b064576e67f8016 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:52:24 +0100 Subject: [PATCH 04/10] Create 01-migrate.sh --- calibre/rootfs/etc/cont-init.d/01-migrate.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 calibre/rootfs/etc/cont-init.d/01-migrate.sh diff --git a/calibre/rootfs/etc/cont-init.d/01-migrate.sh b/calibre/rootfs/etc/cont-init.d/01-migrate.sh new file mode 100644 index 000000000..52595c889 --- /dev/null +++ b/calibre/rootfs/etc/cont-init.d/01-migrate.sh @@ -0,0 +1,13 @@ +#!/usr/bin/with-contenv bashio +# shellcheck shell=bash +set -e + +#################### +# Migrate database # +#################### + +if [ -f /homeassistant/addons_config/calibre ]; then + echo "Moving database to new location /config" + cp -rnf /homeassistant/addons_config/calibre/* /config/ + rm -r /homeassistant/addons_config/calibre +fi From 9a03ad4188968fe5ac9306acdbdafbabf0778f27 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:53:31 +0100 Subject: [PATCH 05/10] Update 20-folders.sh --- calibre/rootfs/etc/cont-init.d/20-folders.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calibre/rootfs/etc/cont-init.d/20-folders.sh b/calibre/rootfs/etc/cont-init.d/20-folders.sh index 8ee432613..505718613 100755 --- a/calibre/rootfs/etc/cont-init.d/20-folders.sh +++ b/calibre/rootfs/etc/cont-init.d/20-folders.sh @@ -12,7 +12,7 @@ LOCATION=$(bashio::config 'data_location') if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then # Default location - LOCATION="/config/addons_config/calibre" + LOCATION="/config" else bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually" @@ -25,7 +25,7 @@ else done if [ -z "$LOCATIONOK" ]; then - LOCATION="/config/addons_config/calibre" + LOCATION="/config" bashio::log.fatal "Your data_location value can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $LOCATION" fi From 5db99178da0f915a39a1b4f1262f8305a042fa19 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:54:47 +0100 Subject: [PATCH 06/10] update --- calibre/rootfs/etc/cont-init.d/20-folders.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calibre/rootfs/etc/cont-init.d/20-folders.sh b/calibre/rootfs/etc/cont-init.d/20-folders.sh index 505718613..a381ad829 100755 --- a/calibre/rootfs/etc/cont-init.d/20-folders.sh +++ b/calibre/rootfs/etc/cont-init.d/20-folders.sh @@ -45,7 +45,7 @@ done # Correct home location for folders in /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d; do if [ -d "$folders" ]; then - sed -i "s|/config/addons_config/calibre|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true + sed -i "s|/config|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true fi done From b90418f848820fcacb6daaf99cf4363bbfbf43eb Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:58:01 +0100 Subject: [PATCH 07/10] Update config.json https://github.com/alexbelgium/hassio-addons/issues/1154#issuecomment-1876077498 --- calibre/config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calibre/config.json b/calibre/config.json index f69a68891..4201b1280 100644 --- a/calibre/config.json +++ b/calibre/config.json @@ -71,7 +71,8 @@ "map": [ "media:rw", "share:rw", - "config:rw", + "addon_config:rw", + "homeassistant_config:rw", "ssl" ], "name": "Calibre", From 9b2e35fd5a1d92657b8226f8278fe2d0c2e356c4 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:00:27 +0100 Subject: [PATCH 08/10] Update CHANGELOG.md --- calibre/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/calibre/CHANGELOG.md b/calibre/CHANGELOG.md index 7a3c832f1..4716cd250 100644 --- a/calibre/CHANGELOG.md +++ b/calibre/CHANGELOG.md @@ -1,3 +1,4 @@ +- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/hassio_addons/calibre to a folder only accessible from my Filebrowser addon called /addon_configs/something-calibre. This avoids the addon to mess with your homeassistant configuration folder, and allows to backup the options. Migration of data, custom configs, and custom scripts should be automatic. Please be sure to update all your links however ! For more information, see here : https://developers.home-assistant.io/blog/2023/11/06/public-addon-config/ https://github.com/alexbelgium/hassio-addons/issues/1154 ## 7.2.0 (16-12-2023) - Update to latest version from linuxserver/docker-calibre From cc81871eab65b30619560534c5c1f05bd53bf264 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:00:07 +0100 Subject: [PATCH 09/10] Disable for arrays --- .templates/00-global_var.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.templates/00-global_var.sh b/.templates/00-global_var.sh index b6599440c..2b58c3d68 100755 --- a/.templates/00-global_var.sh +++ b/.templates/00-global_var.sh @@ -16,6 +16,11 @@ mapfile -t arr < <(jq -r 'keys[]' "${JSONSOURCE}") for KEYS in "${arr[@]}"; do # export key VALUE=$(jq ."$KEYS" "${JSONSOURCE}") + # Check if the value is an array + if [[ "$VALUE" == \[* ]]; then + bashio::log.warning "$VALUE is an array, skipping" + else + # Continue for single values VALUE="${VALUE//[\"\']/}" line="${KEYS}='${VALUE}'" # Check if secret @@ -59,7 +64,7 @@ for KEYS in "${arr[@]}"; do # For s6 if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi echo "export ${KEYS}='${VALUE}'" >> ~/.bashrc - + fi done ################ From 1b7a8b8e821e9ba7138486727c58553348925fb9 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:00:55 +0100 Subject: [PATCH 10/10] Update config.json --- inadyn/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inadyn/config.json b/inadyn/config.json index c6df25611..483f41efc 100644 --- a/inadyn/config.json +++ b/inadyn/config.json @@ -108,5 +108,5 @@ "slug": "inadyn", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "2.12.0" + "version": "2.12.0-2" }