Compare commits

..

11 Commits

Author SHA1 Message Date
Alexandre
2ffe78d610 Fix SignalK startup hang on UID/GID remap failure 2026-03-05 11:04:05 +01:00
github-actions
cbf2ecb023 GitHub bot: changelog 2026-02-25 21:39:53 +00:00
github-actions
5476bd37f7 GitHub bot: changelog 2026-02-25 21:18:20 +00:00
Alexandre
4e07681e96 Update config.yaml 2026-02-25 22:11:21 +01:00
Alexandre
4d8ccbca77 Merge pull request #2532 from alexbelgium/copilot/fix-docker-compose-errors
Fix standalone Docker Compose mode: fallback to bashio-standalone when no Supervisor
2026-02-25 22:11:05 +01:00
Alexandre
91d153f584 Update config.yaml 2026-02-25 22:07:26 +01:00
Alexandre
b5da771ba3 Merge pull request #2533 from alexbelgium/copilot/fix-connection-refused-error
Fix wger PermissionError on /data/media during fresh install
2026-02-25 22:07:01 +01:00
copilot-swe-agent[bot]
014dd33231 fix: ensure wger sudoers entry persists after sudo package installation
The sudoers entry for the wger user was written to /etc/sudoers before
the sudo package was installed. When apt-get installs sudo, its default
/etc/sudoers conffile may overwrite the entry, causing sudo to fail at
runtime. This prevented ha_entrypoint.sh from running as root, so
/data/media was never created with correct permissions, resulting in
PermissionError when downloading exercise images.

Fix: re-add the sudoers entry after the sudo package is installed.
Also improve symlink handling in 90-run.sh to avoid self-referencing
copies on subsequent container starts.

Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-02-25 16:52:46 +00:00
copilot-swe-agent[bot]
2f9721e0d7 Fix standalone Docker Compose mode: fallback to bashio-standalone when no Supervisor
- ha_entrypoint.sh: probe_script_content now tries regular bashio first,
  falls back to bashio-standalone.sh if Supervisor API unreachable
- 00-banner.sh: source bashio-standalone before calling bashio functions
  in standalone branch (prevents undefined function errors with set -e)
- 01-custom_script.sh: same probe fix + add bashio-standalone.sh to
  fallback source chain

Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-02-25 16:43:19 +00:00
copilot-swe-agent[bot]
c44737b118 Initial plan 2026-02-25 16:33:43 +00:00
copilot-swe-agent[bot]
bfce7f4ebd Initial plan 2026-02-25 16:33:25 +00:00
12 changed files with 70 additions and 13 deletions

View File

@@ -7,12 +7,15 @@ set -e
# ======================================================================
if ! bashio::supervisor.ping 2>/dev/null; then
# Source standalone bashio first to provide function definitions
if [ -f /usr/local/lib/bashio-standalone.sh ]; then
source /usr/local/lib/bashio-standalone.sh
fi
bashio::log.blue '-----------------------------------------------------------'
bashio::log.blue "Starting addon in standalone mode (no Supervisor)"
bashio::log.blue "Version : ${BUILD_VERSION:-1.0}"
bashio::log.blue "Config source: ENV + /data/options.json"
bashio::log.blue '-----------------------------------------------------------'
source /usr/local/lib/bashio-standalone.sh
cp -rf /usr/local/lib/bashio-standalone.sh /usr/bin/bashio
grep -rlZ "^#!.*bashio" /etc |
while IFS= read -r -d '' f; do

View File

@@ -64,7 +64,20 @@ if ! command -v bashio::addon.version >/dev/null 2>&1; then
done
fi
bashio::addon.version
# Try regular bashio, fallback to standalone if unavailable or fails
set +e
_bv="$(bashio::addon.version 2>/dev/null)"
_rc=$?
set -e
if [ "$_rc" -ne 0 ] || [ -z "$_bv" ] || [ "$_bv" = "null" ]; then
if [ -f /usr/local/lib/bashio-standalone.sh ]; then
. /usr/local/lib/bashio-standalone.sh
_bv="$(bashio::addon.version)"
fi
fi
echo "$_bv"
'
validate_shebang() {
@@ -133,7 +146,7 @@ fi
sed -i "1s|^.*|#!$shebang|" "$0"
if ! command -v bashio::addon.version >/dev/null 2>&1; then
for f in /usr/lib/bashio/bashio.sh /usr/lib/bashio/lib.sh /usr/src/bashio/bashio.sh /usr/local/lib/bashio/bashio.sh; do
for f in /usr/lib/bashio/bashio.sh /usr/lib/bashio/lib.sh /usr/src/bashio/bashio.sh /usr/local/lib/bashio/bashio.sh /usr/local/lib/bashio-standalone.sh; do
if [ -f "$f" ]; then
# shellcheck disable=SC1090
. "$f"

View File

@@ -83,7 +83,21 @@ if ! command -v bashio::addon.version >/dev/null 2>&1; then
done
fi
bashio::addon.version
# Try regular bashio, fallback to standalone if unavailable or fails
set +e
_bv="$(bashio::addon.version 2>/dev/null)"
_rc=$?
set -e
if [ "$_rc" -ne 0 ] || [ -z "$_bv" ] || [ "$_bv" = "null" ]; then
if [ -f /usr/local/lib/bashio-standalone.sh ]; then
# shellcheck disable=SC1091
. /usr/local/lib/bashio-standalone.sh
_bv="$(bashio::addon.version)"
fi
fi
echo "$_bv"
'
validate_shebang() {

View File

@@ -1,3 +1,5 @@
## 2026.02.25 (25-02-2026)
- Minor bugs fixed
## 2026.02.01 (01-02-2026)
- Minor bugs fixed
## 2026.01.21 (21-01-2026)

View File

@@ -116,5 +116,5 @@ tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi
usb: true
version: 2026.02.01
version: 2026.02.25
video: true

View File

@@ -1,3 +1,6 @@
## 2.22.1-1 (2026-02-25)
- Fix startup hang by handling node UID/GID remap failures gracefully in init script
## 2.22.1 (2026-02-21)
- Update to latest version from SignalK/signalk-server (changelog : https://github.com/SignalK/signalk-server/releases)

View File

@@ -57,5 +57,5 @@ uart: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
usb: true
version: "2.22.1"
version: "2.22.1-1"
webui: http://[HOST]:[PORT:3000]

View File

@@ -16,8 +16,24 @@ chown -R "$USER:$USER" /config
# Set permissions
echo "... setting permissions for node user"
usermod -o -u 0 node
groupmod -o -g 0 node
if id "$USER" &>/dev/null; then
current_uid="$(id -u "$USER")"
current_gid="$(id -g "$USER")"
if [[ "$current_uid" != "0" ]]; then
if ! usermod -o -u 0 "$USER"; then
bashio::log.warning "Failed to set UID 0 for $USER; continuing with UID $current_uid"
fi
fi
if [[ "$current_gid" != "0" ]]; then
if ! groupmod -o -g 0 "$USER"; then
bashio::log.warning "Failed to set GID 0 for $USER; continuing with GID $current_gid"
fi
fi
else
bashio::log.warning "User $USER does not exist; continuing without UID/GID remap"
fi
# Ensure 600 for SSL files
echo "... specifying security files permissions"

View File

@@ -1,3 +1,5 @@
## 2.5-dev-2 (25-02-2026)
- Minor bugs fixed
## 2.5-dev (2026-01-21)
- Update to latest version from wger/server

View File

@@ -67,6 +67,10 @@ ENV PACKAGES="sudo nginx"
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_autoapps.sh" "/ha_autoapps.sh"
RUN chmod 744 /ha_autoapps.sh && /ha_autoapps.sh "$PACKAGES" || true && rm /ha_autoapps.sh
# Ensure sudoers entry exists after sudo package installation
# (installing sudo may overwrite /etc/sudoers with its default conffile)
RUN echo "wger ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
################
# 4 Entrypoint #
################

View File

@@ -23,5 +23,5 @@ schema:
slug: wger
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "2.5-dev"
version: "2.5-dev-2"
webui: "[PROTO:ssl]://[HOST]:[PORT:80]"

View File

@@ -11,22 +11,22 @@ sed -i "s|/home/wger/db/database.sqlite|/data/database.sqlite|g" /home/wger/src/
#####################
echo "... create directories"
mkdir -p /data/static
if [ -d /home/wger/static ]; then
if [ -d /home/wger/static ] && [ ! -L /home/wger/static ]; then
if [ -n "$(ls -A /home/wger/static 2> /dev/null)" ]; then
cp -rnf /home/wger/static/* /data/static/
fi
rm -r /home/wger/static
fi
ln -s /data/static /home/wger
ln -sf /data/static /home/wger
mkdir -p /data/media
if [ -d /home/wger/media ]; then
if [ -d /home/wger/media ] && [ ! -L /home/wger/media ]; then
if [ -n "$(ls -A /home/wger/media 2> /dev/null)" ]; then
cp -rnf /home/wger/media/* /data/media/
fi
rm -r /home/wger/media
fi
ln -s /data/media /home/wger
ln -sf /data/media /home/wger
#####################
# Align permissions #