From dd9eff1a58de1adf0550359a7057aeccd42b2578 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 12:41:16 +0000 Subject: [PATCH 01/16] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20SambaNas2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index e4c8352c..3182aae1 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base:20.1.0 +ARG BUILD_FROM=ghcr.io/hassio-addons/base:20.1.1 ARG BUILD_DATE="" ARG BUILD_DESCRIPTION="" ARG BUILD_NAME="" @@ -6,7 +6,7 @@ ARG BUILD_REF="" ARG BUILD_REPOSITORY="dianlight/hassio-addons" ARG BUILD_VERSION="" ARG SAMBA_VERSION=distribution -ARG HA_CLI_VERSION=5.0.0 +ARG HA_CLI_VERSION=5.1.0 # QUIC Builder Stage (only if SAMBA_VERSION is not "distribution") # hadolint ignore=DL3006 @@ -155,7 +155,7 @@ ENV \ # Setup base ARG BUILD_ARCH=amd64 -ARG HA_CLI_VERSION=5.0.0 +ARG HA_CLI_VERSION=5.1.0 ARG SRAT_VERSION=2026.5.0-rc6 ARG SAMBA_VERSION=distribution From 618fa7e87db8c4bedb1458d0fb3014b2dfd2400a Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Sat, 16 May 2026 22:25:20 +0200 Subject: [PATCH 02/16] =?UTF-8?q?=E2=9C=A8=20feat(be):=20Add=20check-prote?= =?UTF-8?q?ction-mode=20oneshot=20s6-rc.d=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warns the user at startup when Protection Mode is enabled: - Prints a yellow ASCII banner to the add-on log - Creates a persistent notification in the HA UI via the Supervisor /core/api/services/persistent_notification/create endpoint, listing the affected features and fix steps --- .../check-protection-mode/dependencies.d/base | 0 .../s6-rc.d/check-protection-mode/run | 69 +++++++++++++++++++ .../s6-rc.d/check-protection-mode/type | 1 + .../s6-rc.d/check-protection-mode/up | 1 + .../user/contents.d/check-protection-mode | 0 5 files changed, 71 insertions(+) create mode 100644 sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/dependencies.d/base create mode 100755 sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run create mode 100644 sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/type create mode 100644 sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/up create mode 100644 sambanas2/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/check-protection-mode diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/dependencies.d/base b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/dependencies.d/base new file mode 100644 index 00000000..e69de29b diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run new file mode 100755 index 00000000..a63ca336 --- /dev/null +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run @@ -0,0 +1,69 @@ +#!/command/with-contenv bashio +# shellcheck shell=bash +# vim: ft=bash +# ============================================================================== +# Check Protection Mode - One-time startup check +# Warns the user (log banner + HA persistent notification) when Protection Mode +# is enabled, since this add-on requires it to be OFF for full functionality. +# ============================================================================== +set -euo pipefail +exec 2>&1 +trap 'bashio::log.error "check-protection-mode/run failed at line ${BASH_LINENO[0]} (exit code: ${?})"' ERR + +# ── Nothing to do when protection mode is already disabled ─────────────────── +if ! bashio::addon.protected; then + bashio::log.debug "Protection mode is disabled. Full functionality available." + exit 0 +fi + +# ── Warning banner in the add-on log ───────────────────────────────────────── +bashio::log.yellow "╔══════════════════════════════════════════════════════════════════════════════╗" +bashio::log.yellow "║ ║" +bashio::log.yellow "║ ⚠️ WARNING: PROTECTION MODE IS ENABLED ⚠️ ║" +bashio::log.yellow "║ ║" +bashio::log.yellow "║ Samba NAS2 requires Protection Mode to be DISABLED for full functionality. ║" +bashio::log.yellow "║ ║" +bashio::log.yellow "║ The following features will NOT work while Protection Mode is active: ║" +bashio::log.yellow "║ • Mounting external disks (MoreDisks / Automount) ║" +bashio::log.yellow "║ • NFS server support ║" +bashio::log.yellow "║ • Kernel module loading (modprobe) ║" +bashio::log.yellow "║ • Some SMB operations requiring elevated privileges ║" +bashio::log.yellow "║ ║" +bashio::log.yellow "║ To fix: Settings → Add-ons → Samba NAS2 → Info → disable Protection mode ║" +bashio::log.yellow "║ ║" +bashio::log.yellow "╚══════════════════════════════════════════════════════════════════════════════╝" + +# ── Persistent notification in Home Assistant UI ────────────────────────────── +bashio::log.info "Sending protection mode warning to Home Assistant notifications..." + +readonly NOTIFICATION_ID="sambanas2_protection_mode_warning" +readonly NOTIFICATION_TITLE="⚠️ Samba NAS2: Protection Mode Enabled" +readonly NOTIFICATION_MESSAGE="**Samba NAS2** is running with **Protection Mode enabled**. +This prevents several features from working correctly. + +### Features that will NOT work: +- Mounting external disks (MoreDisks / Automount) +- NFS server support +- Kernel module loading +- Some SMB operations requiring elevated privileges + +### How to fix: +1. Go to **Settings → Add-ons → Samba NAS2** +2. Click the **Info** tab +3. Toggle **OFF** the *Protection mode* switch +4. Restart the add-on" + +notification_payload=$(jq -cn \ + --arg id "${NOTIFICATION_ID}" \ + --arg title "${NOTIFICATION_TITLE}" \ + --arg msg "${NOTIFICATION_MESSAGE}" \ + '{notification_id: $id, title: $title, message: $msg}') || { + bashio::log.warning "Failed to build notification JSON payload; skipping HA notification." + exit 0 +} + +bashio::api.supervisor POST /core/api/services/persistent_notification/create \ + "${notification_payload}" \ + || bashio::log.warning "Could not create HA persistent notification (non-critical). Check logs." + +bashio::log.info "Protection mode check complete." diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/type b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/type new file mode 100644 index 00000000..bdd22a18 --- /dev/null +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/type @@ -0,0 +1 @@ +oneshot diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/up b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/up new file mode 100644 index 00000000..b0731aba --- /dev/null +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/check-protection-mode/run diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/check-protection-mode b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/check-protection-mode new file mode 100644 index 00000000..e69de29b From 0c4724ac874f290ee6d0084aa6f779c4460d8e62 Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Sat, 16 May 2026 22:41:03 +0200 Subject: [PATCH 03/16] =?UTF-8?q?=F0=9F=90=9B=20fix(be):=20Fix=20protectio?= =?UTF-8?q?n=20mode=20boolean=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bashio::addon.protected always exits 0 and only prints the string "true"/"false" to stdout — using it directly in "if !" never worked. Capture the output first and test with bashio::var.false, matching the pattern used internally by bashio::require.protected / bashio::require.unprotected. --- .../etc/s6-overlay/s6-rc.d/check-protection-mode/run | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run index a63ca336..c0b73789 100755 --- a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run @@ -10,8 +10,13 @@ set -euo pipefail exec 2>&1 trap 'bashio::log.error "check-protection-mode/run failed at line ${BASH_LINENO[0]} (exit code: ${?})"' ERR +# bashio::addon.protected always returns exit 0 and *prints* "true"/"false". +# Capture the output and test with bashio::var.true (same pattern used by +# bashio::require.protected / bashio::require.unprotected internally). +protected="$(bashio::addon.protected)" + # ── Nothing to do when protection mode is already disabled ─────────────────── -if ! bashio::addon.protected; then +if bashio::var.false "${protected}"; then bashio::log.debug "Protection mode is disabled. Full functionality available." exit 0 fi From 12759f39f4fe5a4529c70f10a6c3bf0d298ca282 Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Sat, 16 May 2026 22:59:18 +0200 Subject: [PATCH 04/16] =?UTF-8?q?=E2=9C=A8=20feat(fe):=20Show=20alert=20wh?= =?UTF-8?q?en=20Protection=20Mode=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump addon version to 2026.5.0-rc7, update CHANGELOG, and update SRAT reference --- sambanas2/CHANGELOG.md | 12 ++++++++++-- sambanas2/config.yaml | 2 +- .../etc/s6-overlay/s6-rc.d/check-protection-mode/run | 12 ++++++------ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index 2e7f4a28..7ff410a9 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 2026.5.0-rc6 +## 2026.5.0-rc7 ### 🙏 Thanks @@ -15,7 +15,15 @@ - ***If you need HDIdle support don't update and wait future releases.*** - ***If you need Avahi/mDNS support don't update and wait future releases.*** -#### 🏗 Chore +### 🏗 Chore +- Update SRAT to v2026.5.0-rc7 + +### ✨ Features +- Add a allert when Protected Mode is enabled in Home Assistant (See [DOCS](DOCS.md) ) + +## 2026.5.0-rc6 + +### 🏗 Chore - Update SRAT to v2026.5.0-rc6 ## 2026.5.0-rc5 diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index 4cb4e2f0..dd02f0d3 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -1,6 +1,6 @@ --- name: Samba NAS2 -version: 2026.5.0-rc6 +version: 2026.5.0-rc7 slug: sambanas2 description: Expose Home Assistant disc with SMB/CIFS url: https://github.com/dianlight/hassio-addons/tree/master/sambanas2 diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run index c0b73789..641047a2 100755 --- a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/check-protection-mode/run @@ -26,15 +26,15 @@ bashio::log.yellow "╔═══════════════════ bashio::log.yellow "║ ║" bashio::log.yellow "║ ⚠️ WARNING: PROTECTION MODE IS ENABLED ⚠️ ║" bashio::log.yellow "║ ║" -bashio::log.yellow "║ Samba NAS2 requires Protection Mode to be DISABLED for full functionality. ║" +bashio::log.yellow "║ Samba NAS2 requires Protection Mode to be DISABLED for full functionality. ║" bashio::log.yellow "║ ║" bashio::log.yellow "║ The following features will NOT work while Protection Mode is active: ║" -bashio::log.yellow "║ • Mounting external disks (MoreDisks / Automount) ║" -bashio::log.yellow "║ • NFS server support ║" -bashio::log.yellow "║ • Kernel module loading (modprobe) ║" -bashio::log.yellow "║ • Some SMB operations requiring elevated privileges ║" +bashio::log.yellow "║ • Mounting external disks (MoreDisks / Automount) ║" +bashio::log.yellow "║ • NFS server support ║" +bashio::log.yellow "║ • Kernel module loading (modprobe) ║" +bashio::log.yellow "║ • Some SMB operations requiring elevated privileges ║" bashio::log.yellow "║ ║" -bashio::log.yellow "║ To fix: Settings → Add-ons → Samba NAS2 → Info → disable Protection mode ║" +bashio::log.yellow "║ To fix: Settings → Add-ons → Samba NAS2 → Info → disable Protection mode ║" bashio::log.yellow "║ ║" bashio::log.yellow "╚══════════════════════════════════════════════════════════════════════════════╝" From 480668589f9099485052e12ea4e61de76a69abe1 Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Sun, 17 May 2026 07:08:19 +0200 Subject: [PATCH 05/16] =?UTF-8?q?=F0=9F=94=A7=20chore(be):=20Bump=20SRAT?= =?UTF-8?q?=20to=20rc7,=20comment=20image,=20tweak=20socat=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/Dockerfile | 2 +- sambanas2/config.yaml | 2 +- sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index 3182aae1..d9b5625d 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -156,7 +156,7 @@ ENV \ # Setup base ARG BUILD_ARCH=amd64 ARG HA_CLI_VERSION=5.1.0 -ARG SRAT_VERSION=2026.5.0-rc6 +ARG SRAT_VERSION=2026.5.0-rc7 ARG SAMBA_VERSION=distribution # Copy compiled binaries from builder stages diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index dd02f0d3..4f1b841c 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -65,7 +65,7 @@ schema: clean_upgrade_dir: bool? factory_reset: bool? use_external_kernel_modules: bool? -image: ghcr.io/dianlight/addon-sambanas2 +#image: ghcr.io/dianlight/addon-sambanas2 udev: true #usb: true host_dbus: true diff --git a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run index 0c12f1ad..3be52273 100755 --- a/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run +++ b/sambanas2/rootfs/etc/s6-overlay/s6-rc.d/socat/run @@ -9,10 +9,9 @@ exec 2>&1 trap 'bashio::log.error "socat/run failed at line ${BASH_LINENO[0]} (exit code: ${?})"' ERR if bashio::var.has_value "$(bashio::addon.port 3000)"; then - bashio::log.warning "$(figlet -p -f big -w 600 'ALLERT!')" + bashio::log.yellow "$(figlet -p -f big -w 600 'ALLERT!')" bashio::log.warning "Addon OPEN ACCESS PORT port is set to $(bashio::addon.port 3000)->$(bashio::addon.ingress_port)" exec socat TCP-LISTEN:$(bashio::addon.port 3000),fork TCP:127.0.0.1:$(bashio::addon.ingress_port) else exec sleep infinity fi - From 96b92bdb92c1d172d98f61b2792ad21a0584fc8a Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Sun, 17 May 2026 09:23:12 +0200 Subject: [PATCH 06/16] =?UTF-8?q?=F0=9F=94=A7=20chore(ha):=20Update=20Home?= =?UTF-8?q?=20Assistant=20client=20to=205.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index 7ff410a9..c5f51291 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -17,6 +17,7 @@ ### 🏗 Chore - Update SRAT to v2026.5.0-rc7 +- Update homeassistant client to 5.1.0 ### ✨ Features - Add a allert when Protected Mode is enabled in Home Assistant (See [DOCS](DOCS.md) ) From 6f6ca9e82769be2076d91ca2a05c70c5f09dffbc Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Sun, 17 May 2026 09:40:30 +0200 Subject: [PATCH 07/16] =?UTF-8?q?=E2=9C=A8=20feat(build):=20Uncomment=20im?= =?UTF-8?q?age=20key=20in=20config.yaml=20if=20present?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added a step to ensure the `image` key is uncommented in `config.yaml` when scripts are present. * This change enhances the configuration process by ensuring necessary fields are active for builds. --- .github/workflows/docker-image-dev.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml index 5bc2734f..6b11c9d1 100644 --- a/.github/workflows/docker-image-dev.yml +++ b/.github/workflows/docker-image-dev.yml @@ -198,6 +198,18 @@ jobs: yq -i ".name = \"${{ needs.setup.outputs.name }}\"" "$CONFIG_FILE" echo "Updated name to ${{ needs.setup.outputs.name }}" + - name: Ensure image key is uncommented in config.yaml + if: needs.setup.outputs.has_scripts == 'true' + shell: bash + run: | + CONFIG_FILE="./${{ needs.setup.outputs.addon_dir }}/config.yaml" + if grep -Eq '^\s*#\s*image\s*:' "$CONFIG_FILE"; then + sed -E -i 's/^([[:space:]]*)#[[:space:]]*(image[[:space:]]*:.*)$/\1\2/' "$CONFIG_FILE" + echo "Uncommented image key in $CONFIG_FILE" + else + echo "No commented image key found in $CONFIG_FILE" + fi + - name: Run Addon custom scripts if: needs.setup.outputs.has_scripts == 'true' env: From 6f4fc93a9754e8c2770d667806b6b90c92cc59cf Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Mon, 25 May 2026 21:57:17 +0200 Subject: [PATCH 08/16] =?UTF-8?q?=F0=9F=94=A7=20chore(be):=20Bump=20SRAT?= =?UTF-8?q?=20and=20addon=20to=20rc8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uncomment image entry and comment out panel_title in config.yaml --- sambanas2/Dockerfile | 2 +- sambanas2/config.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index d9b5625d..960153c8 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -156,7 +156,7 @@ ENV \ # Setup base ARG BUILD_ARCH=amd64 ARG HA_CLI_VERSION=5.1.0 -ARG SRAT_VERSION=2026.5.0-rc7 +ARG SRAT_VERSION=2026.5.0-rc8 ARG SAMBA_VERSION=distribution # Copy compiled binaries from builder stages diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index 4f1b841c..43236a2e 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -1,6 +1,6 @@ --- name: Samba NAS2 -version: 2026.5.0-rc7 +version: 2026.5.0-rc8 slug: sambanas2 description: Expose Home Assistant disc with SMB/CIFS url: https://github.com/dianlight/hassio-addons/tree/master/sambanas2 @@ -29,7 +29,7 @@ ingress_port: 0 # For add-ons on host network ingress_entry: index.html ingress_stream: true panel_icon: mdi:folder-network -panel_title: Samba NAS2 +#panel_title: Samba NAS2 panel_admin: true discovery: ["srat"] @@ -65,7 +65,7 @@ schema: clean_upgrade_dir: bool? factory_reset: bool? use_external_kernel_modules: bool? -#image: ghcr.io/dianlight/addon-sambanas2 +image: ghcr.io/dianlight/addon-sambanas2 udev: true #usb: true host_dbus: true From d6e3f789373543dcf2b3e261b7d75693e1746475 Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Tue, 26 May 2026 06:31:36 +0200 Subject: [PATCH 09/16] =?UTF-8?q?=E2=9C=A8=20feat(be+doc):=20Install=20sma?= =?UTF-8?q?rtmontools-sdk=20and=20set=20library=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ARG SMARTMONTOOLS_SDK_VERSION=7.5 to the main build stage - Download libsmartmon--linux-.tar.gz from dianlight/smartmontools-sdk releases and extract to /usr/local, placing libsmartmon.a in /usr/local/lib and headers under /usr/local/include/smartmon/ - Set LIBRARY_PATH and CPATH in the ENV block (all container processes) and register /etc/profile.d/smartmontools-sdk.sh (interactive login shells) so the library is discoverable for all users without manual configuration - Add CHANGELOG entry for 2026.5.0-rc8 - Add DOCS.md section documenting SMART monitoring internals --- sambanas2/CHANGELOG.md | 17 +++++++++++++++++ sambanas2/DOCS.md | 18 ++++++++++++++++++ sambanas2/Dockerfile | 13 +++++++++++++ 3 files changed, 48 insertions(+) diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index c5f51291..6044fb08 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 2026.5.0-rc8 + +### 🙏 Thanks + +- Thanks to all the contributors and users that help to make this addon better. + +### 🚨 Notes +- This is a release candidate version, it may contain bugs and issues. Use it at your own risk. + +### 🏗 Chore +- Update SRAT to v2026.5.0-rc8 + +### ✨ Features +- Install [smartmontools-sdk v7.5](https://github.com/dianlight/smartmontools-sdk) (`libsmartmon.a` + headers) providing in-process SMART device access without spawning a subprocess +- Set `LIBRARY_PATH` and `CPATH` environment variables for all container processes so that components linking against `libsmartmon` are automatically found +- Register `/etc/profile.d/smartmontools-sdk.sh` so interactive login shells also inherit the correct library and include paths + ## 2026.5.0-rc7 ### 🙏 Thanks diff --git a/sambanas2/DOCS.md b/sambanas2/DOCS.md index 0a745bfb..2c9141e1 100644 --- a/sambanas2/DOCS.md +++ b/sambanas2/DOCS.md @@ -140,6 +140,24 @@ NFS services run under s6 supervision and the exports file is **automatically ma - 🔌 Depending on your HAOS architecture/board, NFS functionality may require enabling `use_external_kernel_modules` to load extra kernel modules - Changes made through SRAT are applied automatically without requiring an add-on restart +## SMART Monitoring and Disk Health + +Samba NAS2 bundles the **[smartmontools-sdk](https://github.com/dianlight/smartmontools-sdk)** (`libsmartmon`) so that SMART queries are performed **in-process** — no subprocess is spawned to run `smartctl`. This provides: + +- Faster and more efficient disk health queries +- Unified ATA/SATA, NVMe, and SCSI/SAS device support via a single native API +- Structured JSON output for integration with the SRAT web interface + +The SDK is installed at build time: + +| Path | Contents | +|---|---| +| `/usr/local/lib/libsmartmon.a` | Pre-built static library (smartmontools v7.5) | +| `/usr/local/include/smartmon/` | Public C++ headers | + +`LIBRARY_PATH` and `CPATH` environment variables are automatically exported to all container processes and interactive shells so any component linking against `libsmartmon` finds the library without manual configuration. + + ## Configuration Example configuration with all available options and their default values: diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index 960153c8..f2697da4 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -151,6 +151,8 @@ ENV \ S6_CMD_WAIT_FOR_SERVICES=1 \ S6_KILL_GRACETIME=30000 \ S6_SYNC_DISKS=1 \ + CPATH="/usr/local/include" \ + LIBRARY_PATH="/usr/local/lib" \ TERM="xterm-256color" # Setup base @@ -158,6 +160,7 @@ ARG BUILD_ARCH=amd64 ARG HA_CLI_VERSION=5.1.0 ARG SRAT_VERSION=2026.5.0-rc8 ARG SAMBA_VERSION=distribution +ARG SMARTMONTOOLS_SDK_VERSION=7.5 # Copy compiled binaries from builder stages #COPY --from=builder_wsdd /usr/sbin/wsdd2 /usr/sbin/ @@ -290,6 +293,16 @@ RUN wget -qO- https://www.gershnik.com/alpine-repo/gershnik@hotmail.com-6643812 RUN curl -fsSL -o /usr/bin/ha "https://github.com/home-assistant/cli/releases/download/${HA_CLI_VERSION}/ha_${BUILD_ARCH}" \ && chmod a+x /usr/bin/ha +# Download and install smartmontools-sdk +RUN curl -fsSL -o /tmp/smartmontools-sdk.tar.gz \ + "https://github.com/dianlight/smartmontools-sdk/releases/download/v${SMARTMONTOOLS_SDK_VERSION}/libsmartmon-${SMARTMONTOOLS_SDK_VERSION}-linux-${BUILD_ARCH}.tar.gz" \ + && tar -xzf /tmp/smartmontools-sdk.tar.gz -C /usr/local \ + && rm -f /tmp/smartmontools-sdk.tar.gz \ + && printf '%s\n' \ + 'export LIBRARY_PATH="/usr/local/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"' \ + 'export CPATH="/usr/local/include${CPATH:+:$CPATH}"' \ + > /etc/profile.d/smartmontools-sdk.sh + # Download and install SRAT RUN SRAT_ARCH_SUFFIX="${BUILD_ARCH}"; \ if [ "${BUILD_ARCH}" = "amd64" ]; then \ From 788815c0b711bc3790db73a9466dc45f4cc0cb2d Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Wed, 27 May 2026 05:23:12 +0200 Subject: [PATCH 10/16] =?UTF-8?q?=F0=9F=94=A7=20chore(be+doc):=20Update=20?= =?UTF-8?q?changelog=20and=20use=20musl=20smartmon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/CHANGELOG.md | 21 +++++++-------------- sambanas2/Dockerfile | 2 +- sambanas2/config.yaml | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index 6044fb08..299a05ea 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -5,9 +5,15 @@ ### 🙏 Thanks - Thanks to all the contributors and users that help to make this addon better. +- Special thanks to supporters and sponsors. With our support I was able to buy a copilot subscription to help me code faster and better. ### 🚨 Notes -- This is a release candidate version, it may contain bugs and issues. Use it at your own risk. +- This is a release candidate version, it may contain bugs and issues. Use it at your own risk. It is not recommended to use this version in production environments. +- This version is not compatible with the previous SambaNas addon, it is a complete rewrite and refactor of the addon. It is recommended to backup your configuration before updating to this version. +- This version is only tested with Home Assistant OS and Supervised installations. It may not work properly with Home Assistant Core or Container installations. +- ***Your existing configuration may be lost when updating to this version. Please backup your configuration before updating.*** +- ***If you need HDIdle support don't update and wait future releases.*** +- ***If you need Avahi/mDNS support don't update and wait future releases.*** ### 🏗 Chore - Update SRAT to v2026.5.0-rc8 @@ -19,19 +25,6 @@ ## 2026.5.0-rc7 -### 🙏 Thanks - -- Thanks to all the contributors and users that help to make this addon better. -- Special thanks to supporters and sponsors. With our support I was able to buy a copilot subscription to help me code faster and better. - -### 🚨 Notes -- This is a release candidate version, it may contain bugs and issues. Use it at your own risk. It is not recommended to use this version in production environments. -- This version is not compatible with the previous SambaNas addon, it is a complete rewrite and refactor of the addon. It is recommended to backup your configuration before updating to this version. -- This version is only tested with Home Assistant OS and Supervised installations. It may not work properly with Home Assistant Core or Container installations. -- ***Your existing configuration will be lost when updating to this version. Please backup your configuration before updating.*** -- ***If you need HDIdle support don't update and wait future releases.*** -- ***If you need Avahi/mDNS support don't update and wait future releases.*** - ### 🏗 Chore - Update SRAT to v2026.5.0-rc7 - Update homeassistant client to 5.1.0 diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index f2697da4..99119f19 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -295,7 +295,7 @@ RUN curl -fsSL -o /usr/bin/ha "https://github.com/home-assistant/cli/releases/do # Download and install smartmontools-sdk RUN curl -fsSL -o /tmp/smartmontools-sdk.tar.gz \ - "https://github.com/dianlight/smartmontools-sdk/releases/download/v${SMARTMONTOOLS_SDK_VERSION}/libsmartmon-${SMARTMONTOOLS_SDK_VERSION}-linux-${BUILD_ARCH}.tar.gz" \ + "https://github.com/dianlight/smartmontools-sdk/releases/download/v${SMARTMONTOOLS_SDK_VERSION}/libsmartmon-${SMARTMONTOOLS_SDK_VERSION}-linux-${BUILD_ARCH}-musl.tar.gz" \ && tar -xzf /tmp/smartmontools-sdk.tar.gz -C /usr/local \ && rm -f /tmp/smartmontools-sdk.tar.gz \ && printf '%s\n' \ diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index 43236a2e..e59c9bf8 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -65,7 +65,7 @@ schema: clean_upgrade_dir: bool? factory_reset: bool? use_external_kernel_modules: bool? -image: ghcr.io/dianlight/addon-sambanas2 +#image: ghcr.io/dianlight/addon-sambanas2 udev: true #usb: true host_dbus: true From 398f08aa999272d959f4dd379aaad874c0dd8f8e Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Wed, 27 May 2026 18:33:19 +0200 Subject: [PATCH 11/16] =?UTF-8?q?=F0=9F=93=9D=20docs(doc):=20Update=20Chan?= =?UTF-8?q?gelog=20to=202026.5.0-rc9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/CHANGELOG.md | 9 +++++++-- sambanas2/Dockerfile | 2 +- sambanas2/config.yaml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index 299a05ea..8114215b 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 2026.5.0-rc8 +## 2026.5.0-rc9 ### 🙏 Thanks @@ -16,13 +16,18 @@ - ***If you need Avahi/mDNS support don't update and wait future releases.*** ### 🏗 Chore -- Update SRAT to v2026.5.0-rc8 +- Update SRAT to v2026.5.0-rc9 ### ✨ Features - Install [smartmontools-sdk v7.5](https://github.com/dianlight/smartmontools-sdk) (`libsmartmon.a` + headers) providing in-process SMART device access without spawning a subprocess - Set `LIBRARY_PATH` and `CPATH` environment variables for all container processes so that components linking against `libsmartmon` are automatically found - Register `/etc/profile.d/smartmontools-sdk.sh` so interactive login shells also inherit the correct library and include paths +## 2026.5.0-rc8 + +### 🏗 Chore +- Update SRAT to v2026.5.0-rc8 + ## 2026.5.0-rc7 ### 🏗 Chore diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index 99119f19..ea651d29 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -158,7 +158,7 @@ ENV \ # Setup base ARG BUILD_ARCH=amd64 ARG HA_CLI_VERSION=5.1.0 -ARG SRAT_VERSION=2026.5.0-rc8 +ARG SRAT_VERSION=2026.5.0-rc9 ARG SAMBA_VERSION=distribution ARG SMARTMONTOOLS_SDK_VERSION=7.5 diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index e59c9bf8..d2b77a6e 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -1,6 +1,6 @@ --- name: Samba NAS2 -version: 2026.5.0-rc8 +version: 2026.5.0-rc9 slug: sambanas2 description: Expose Home Assistant disc with SMB/CIFS url: https://github.com/dianlight/hassio-addons/tree/master/sambanas2 From b6fd5198c6520e120f6d16a1679f91de78fdd780 Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Wed, 27 May 2026 19:13:46 +0200 Subject: [PATCH 12/16] =?UTF-8?q?=F0=9F=94=A7=20chore(be):=20Uncomment=20i?= =?UTF-8?q?mage=20in=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index d2b77a6e..85758c05 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -65,7 +65,7 @@ schema: clean_upgrade_dir: bool? factory_reset: bool? use_external_kernel_modules: bool? -#image: ghcr.io/dianlight/addon-sambanas2 +image: ghcr.io/dianlight/addon-sambanas2 udev: true #usb: true host_dbus: true From 10eac5aa4fce727af82da598450a5ad3c9d2dd71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:01:29 +0000 Subject: [PATCH 13/16] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20SambaNas2?= =?UTF-8?q?=20to=20v20.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index ea651d29..798b57ce 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base:20.1.1 +ARG BUILD_FROM=ghcr.io/hassio-addons/base:20.2.0 ARG BUILD_DATE="" ARG BUILD_DESCRIPTION="" ARG BUILD_NAME="" From c22a4bb2047d4901a0b3070fea47b44f88c51ee1 Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Fri, 12 Jun 2026 14:07:55 +0200 Subject: [PATCH 14/16] =?UTF-8?q?=F0=9F=94=A7=20chore(be):=20Prepare=20202?= =?UTF-8?q?6.6.0-rc10=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/CHANGELOG.md | 20 ++++++++++++++++++++ sambanas2/DOCS.md | 15 ++++++++------- sambanas2/Dockerfile | 2 +- sambanas2/build.yaml | 11 ----------- sambanas2/config.yaml | 2 +- 5 files changed, 30 insertions(+), 20 deletions(-) delete mode 100644 sambanas2/build.yaml diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index 8114215b..a7f675dd 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## 2026.6.0-rc10 + +### 🙏 Thanks + +- Thanks to all the contributors and users that help to make this addon better. +- Special thanks to supporters and sponsors. With our support I was able to buy a copilot subscription to help me code faster and better. + +### 🚨 Notes +- This is a release candidate version, it may contain bugs and issues. Use it at your own risk. It is not recommended to use this version in production environments. +- This version is not compatible with the previous SambaNas addon, it is a complete rewrite and refactor of the addon. It is recommended to backup your configuration before updating to this version. +- This version is only tested with Home Assistant OS and Supervised installations. It may not work properly with Home Assistant Core or Container installations. +- ***Your existing configuration may be lost when updating to this version. Please backup your configuration before updating.*** + +### 🏗 Chore +- Update SRAT to v2026.6.0-rc10 +- Update Base image to v21.0.0 (Alpine base image to v3.24.0) + +### ✨ Features +- New 'Lab Mode' setting in Settings → General section to enable experimental features and configurations for advanced users and testers. When enabled, this setting allows access to features that are still in development or testing phases, providing early access to new functionality while clearly indicating that these features may be unstable or subject to change. + ## 2026.5.0-rc9 ### 🙏 Thanks diff --git a/sambanas2/DOCS.md b/sambanas2/DOCS.md index 2c9141e1..2594d89e 100644 --- a/sambanas2/DOCS.md +++ b/sambanas2/DOCS.md @@ -18,11 +18,12 @@ The following table compares the major functionalities available in SambaNAS and |------------------------------------|:--------:|:---------:| | **Network Sharing** | | | | CIFS Volume Exporting | ✔️ | ✔️ | -| NFS Volume Exporting | ❌ | 🧪 🔌 (internal HA-addon use only) | +| NFS Volume Exporting | ❌ | 🧪 🔌 n | | SMB Multichannel Support | ✔️ | ✔️ | | WSDD and WSDD2 Integration | ✔️ | ❌ | | WSDD-Native | ❌ | ✔️ | -| Avahi/mDNS Support | ✔️ | 🚧 Soon (via component) | +| Avahi/mDNS Support | ✔️ | ❌ | +| HA mDNS Support | ❌ | 🧪 (via component) | | Samba over QUIC Support | ❌ | 🧪 🔌 | | **Volume Management** | | | | Mounting additional volumes | ✔️ | ✔️ | @@ -43,14 +44,14 @@ The following table compares the major functionalities available in SambaNAS and | **Integration** | | | | MQTT integration | ✔️ | ❌ | | HA Native API Integration | ❌ | ✔️ | -| Component Integration | ❌ | 🚧 Soon | +| Component Integration | ❌ | 🧪 (limited) | | **Disk Management** | | | | SMART Monitoring | ✔️ | ✔️ | | SMART Test Support | ❌ | ✔️ | -| Disk Spindown Support | ✔️ | 🚧 Soon | -| Per Disk Spindown Support | ❌ | 🚧 Soon | +| Disk Spindown Support | ✔️ | 🧪 | +| Per Disk Spindown Support | ❌ | 🧪 | | **Filesystem Support** | | | -| Filesystem Checking | ❌ | 🚧 Soon | +| Filesystem Checking | ❌ | ✔️ | | Advanced XFS Support | ❌ | 🚧 Soon | | Advanced BTRFS Support | ❌ | 🚧 Soon | | Advanced ZFS Support | ❌ | 🚧 Soon | @@ -58,7 +59,7 @@ The following table compares the major functionalities available in SambaNAS and | External Kernel Modules Support | ❌ | ✔️ | -> ✔️ = Supported  ❌ = Not Supported  🧪 = Experimental  🔌 = Only with extra kernel modules (see hasos_more_modules)  🚧 Soon = Coming in future versions  🔚 EOL = End of Life +> ✔️ = Supported  ❌ = Not Supported  🧪 = Experimental (Lab Mode)  🔌 = Only with extra kernel modules (see hasos_more_modules)  🚧 Soon = Coming in future versions  🔚 EOL = End of Life ## Installation diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index ea651d29..4e26ca1f 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base:20.1.1 +ARG BUILD_FROM=ghcr.io/hassio-addons/base:21.0.0 ARG BUILD_DATE="" ARG BUILD_DESCRIPTION="" ARG BUILD_NAME="" diff --git a/sambanas2/build.yaml b/sambanas2/build.yaml deleted file mode 100644 index 985bd30d..00000000 --- a/sambanas2/build.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -build_from: - aarch64: ghcr.io/hassio-addons/base:20.1.0 - amd64: ghcr.io/hassio-addons/base:20.1.0 -#cosign: -# #base_identity: https://github.com/home-assistant/builder/.* -# identity: https://github.com/dianlight/hassio-addons/.* -args: - HA_CLI_VERSION: "5.0.0" - SRAT_VERSION: "2026.4.0-rc2" - SAMBA_VERSION: "distribution" #"4.23.1" # Use "distribution" or "edge" to use precompiled packages from version or edge branch diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index 85758c05..e0b43505 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -1,6 +1,6 @@ --- name: Samba NAS2 -version: 2026.5.0-rc9 +version: 2026.6.0-rc10 slug: sambanas2 description: Expose Home Assistant disc with SMB/CIFS url: https://github.com/dianlight/hassio-addons/tree/master/sambanas2 From 9ef751e25848a53dffb98866bccb00b929e8fa91 Mon Sep 17 00:00:00 2001 From: Lucio Tarantino Date: Sun, 12 Jul 2026 08:56:33 +0200 Subject: [PATCH 15/16] =?UTF-8?q?=F0=9F=94=A7=20chore:=20Bump=20version=20?= =?UTF-8?q?to=202026.7.0-rc11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sambanas2/CHANGELOG.md | 4 +++- sambanas2/DOCS.md | 2 +- sambanas2/Dockerfile | 2 +- sambanas2/config.yaml | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index a7f675dd..b83605d7 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 2026.6.0-rc10 +## 2026.7.0-rc11 ### 🙏 Thanks @@ -13,6 +13,8 @@ - This version is only tested with Home Assistant OS and Supervised installations. It may not work properly with Home Assistant Core or Container installations. - ***Your existing configuration may be lost when updating to this version. Please backup your configuration before updating.*** +## 2026.6.0-rc10 + ### 🏗 Chore - Update SRAT to v2026.6.0-rc10 - Update Base image to v21.0.0 (Alpine base image to v3.24.0) diff --git a/sambanas2/DOCS.md b/sambanas2/DOCS.md index 2594d89e..56ce8e26 100644 --- a/sambanas2/DOCS.md +++ b/sambanas2/DOCS.md @@ -18,7 +18,7 @@ The following table compares the major functionalities available in SambaNAS and |------------------------------------|:--------:|:---------:| | **Network Sharing** | | | | CIFS Volume Exporting | ✔️ | ✔️ | -| NFS Volume Exporting | ❌ | 🧪 🔌 n | +| NFS Volume Exporting | ❌ | 🧪 🔌 | | SMB Multichannel Support | ✔️ | ✔️ | | WSDD and WSDD2 Integration | ✔️ | ❌ | | WSDD-Native | ❌ | ✔️ | diff --git a/sambanas2/Dockerfile b/sambanas2/Dockerfile index 4e26ca1f..d921825d 100644 --- a/sambanas2/Dockerfile +++ b/sambanas2/Dockerfile @@ -158,7 +158,7 @@ ENV \ # Setup base ARG BUILD_ARCH=amd64 ARG HA_CLI_VERSION=5.1.0 -ARG SRAT_VERSION=2026.5.0-rc9 +ARG SRAT_VERSION=2026.7.0-rc11 ARG SAMBA_VERSION=distribution ARG SMARTMONTOOLS_SDK_VERSION=7.5 diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index ec690007..829e6ab0 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -1,6 +1,6 @@ --- name: Samba NAS2 -version: 2026.6.0-rc10 +version: 2026.7.0-rc11 slug: sambanas2 description: Expose Home Assistant disc with SMB/CIFS url: https://github.com/dianlight/hassio-addons/tree/master/sambanas2 @@ -65,7 +65,7 @@ schema: clean_upgrade_dir: bool? factory_reset: bool? use_external_kernel_modules: bool? -#image: ghcr.io/dianlight/addon-sambanas2 +image: ghcr.io/dianlight/addon-sambanas2 udev: true #usb: true host_dbus: true From 649494838007beab73b53646848b4a846b431ba6 Mon Sep 17 00:00:00 2001 From: Prerelease Bot Date: Sun, 12 Jul 2026 09:51:20 +0000 Subject: [PATCH 16/16] ci(script) Commit all automatic changes for mergerelease in sambanas2 --- sambanas2/CHANGELOG.md | 94 ++++++++++++++++++++++++++++++++++++++++++ sambanas2/config.yaml | 1 - 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/sambanas2/CHANGELOG.md b/sambanas2/CHANGELOG.md index b83605d7..66054dab 100644 --- a/sambanas2/CHANGELOG.md +++ b/sambanas2/CHANGELOG.md @@ -13,6 +13,100 @@ - This version is only tested with Home Assistant OS and Supervised installations. It may not work properly with Home Assistant Core or Container installations. - ***Your existing configuration may be lost when updating to this version. Please backup your configuration before updating.*** + +### 🐭 Features from SRAT [v2026.7.0-rc11](https://github.com/dianlight/srat) + +#### 🔧 Chore + +- **Migrate to TypeScript 7.0 RC** (Go-based `tsgo` compiler): + - Updated peer dependency to `typescript: ^7.0.1-rc` + - Updated `@typescript/native-preview` to `7.0.0-dev.20260701.1` + - Updated `tsconfig.json`, migration docs, and instruction files + - Patches `esModuleInterop` default and other TS 7.0 defaults + +#### ✨ Features + +- **HDIdle per-disk model** (Lab Mode feature): Replaced the global HDIdle + enable/disable toggle with a fully per-disk configuration model gated behind + Lab Mode (`experimental_lab_mode=true`). Key changes: + - **Per-disk enable/disable**: each physical disk has its own HDIdle record + (`enabled: yes|custom|no`); the service runs automatically when ≥1 disk is + enabled. The five global `Settings.hdidle_*` fields have been removed. + - **Dashboard suggestion badge**: HDDs that have not yet been configured show + an inline "Enable HDIdle?" badge in the disk I/O table (visible only in Lab + Mode). The badge provides **Ignore** (persists `suggestion_ignored=true`) + and **Enable** (navigates to the per-disk card in the Volumes page). + - **Non-rotational guard**: enabling HDIdle on an SSD/NVMe or a device with + unknown rotational type opens a confirm dialog; accepting persists + `force_enabled=true` so the warning does not repeat. The backend returns + HTTP 409 if the flag is missing, preventing accidental spindowns of SSDs. + - **Rotational detection**: `Disk.is_rotational` tri-state (HDD/SSD/unknown) + is now derived from `/sys/block//queue/rotational` (sysfs primary) with + SMART `rotation_rate` as fallback. Unknown (e.g. USB enclosures) returns + `nil` — treated as non-rotational for safety. + - **Ignore-suggestion endpoint**: `POST /api/disk/{id}/hdidle/ignore-suggestion` + persists the badge dismissal per disk. + - **Adaptive polling**: the monitor goroutine polls every 60s when ≥1 disk is + spun-up and slows to 5min when all monitored disks are already spun-down. + The goroutine is never started when zero disks are enabled. + - **readOnly threading**: the per-disk settings card now correctly propagates + the `readOnly` flag from `VolumeDetailsPanel`. +- **mDNS Registration**: Added optional mDNS registration of the SRAT service for local network discovery. When enabled, the backend registers a `_srat._tcp` service with the system mDNS responder, advertising the service name, port, and metadata. This allows compatible clients to discover the SRAT service on the local network without manual configuration. The feature is controlled by a new `MDNSRegistration` boolean setting in the advanced settings section. + +#### 🐛 Bug Fixes + +- **HDIdle service permanently broken after first Stop()**: `Stop()` no longer + leaves `stopChan` non-nil after close. Subsequent `Start()` calls now succeed + (idempotent). Fixes a latent bug where the service refused to restart after + any config PUT. +- **Nested mutex deadlock** in `GetDeviceStatus`, `GetProcessStatus`, and + `observeDiskActivity`: calls to `IsRunning()` under an existing lock now read + `stopChan` directly to avoid the deadlock inherent in re-acquiring an + `RWMutex` that is not guaranteed reentrant. +- **`GetDeviceConfig` returned HTTP 500 when service disabled**: the guard + `!s.config.Enabled → ErrorHDIdleNotSupported` has been removed. The config + endpoint is now always available for inspection/configuration regardless of + whether the monitor goroutine is running. +- **`disk_id` injected unsanitised into file path**: `hdidle_handler.go` was + naïvely prefixing every `disk_id` with `/dev/disk/by-id/` without validation. + Replaced by `HDIdleServiceInterface.ResolveDevicePath()` which probes three + candidate paths (absolute `/dev/…`, by-id, kernel name) and rejects inputs + containing path-traversal characters. + +#### 🔄 Breaking Changes + +- `Settings.hdidle_enabled`, `hdidle_default_idle_time`, `hdidle_default_command_type`, + `hdidle_default_power_condition`, and `hdidle_ignore_spin_down_detection` have + been **removed** from the API and the DB (migration 00017 drops the + corresponding rows from the `properties` table). +- `POST /api/hdidle/start` and `POST /api/hdidle/stop` have been **removed**. + The service lifecycle is now fully automatic (driven by the per-disk records). +- `PATCH /api/disk/{id}/hdidle/config` has been **removed** (it was a dead spec + entry with no handler). + +#### 🏗 Chore + +- DB migration `00017` (`drop_global_hdidle_properties`): deletes the five + obsolete global HDIdle property rows. Down migration re-seeds them with their + original defaults for dev/test rollback. +- `events.PowerEvent` now carries a `Kind PowerEventKind` discriminant field + (`config` or `status`) so subscribers can branch without comparing zero-values. +- Two new `dto.HDIdleDevice` fields (`SuggestionIgnored`, `ForceEnabled`) and + matching GORM/generated-layer/converter updates. Schema columns are added by + GORM `AutoMigrate` on the next startup — no manual migration needed. +- `openapi.json` is **not regenerated** in this branch — it requires a working + Go toolchain and `go run ./cmd/srat-openapi`. **CI must run** + `go run ./cmd/srat-openapi -dir=backend/docs` and + `cd frontend && bun run gen:api` before merging to keep generated artifacts in + sync. Three hand-edited generated files (`config_to_dto_conv_gen.go`, + `dto_to_dbom_conv_gen.go`, `g/hdidle_device_config.go`) are aligned with their + source directives — a `go generate ./...` run will produce the same output. + +#### 🔧 Maintenance + +- **Multi-variant server release**: Release archives now ship three `srat-server` variants — `srat-server-static` (fully static, zero shared-library dependencies), `srat-server-musl` (dynamic linked against musl libc, built via Zig), and `srat-server-glib` (dynamic linked against glibc, built via CGO). The `srat-server` entry in the archive is a symlink that defaults to `srat-server-static`; the upgrade process automatically updates it to the best available variant for the running system (musl → glibc → static). `srat-openapi` is no longer included in release archives. `srat-cli` is always statically linked. + + ## 2026.6.0-rc10 ### 🏗 Chore diff --git a/sambanas2/config.yaml b/sambanas2/config.yaml index 829e6ab0..89e14db8 100644 --- a/sambanas2/config.yaml +++ b/sambanas2/config.yaml @@ -32,7 +32,6 @@ panel_icon: mdi:folder-network #panel_title: Samba NAS2 panel_admin: true discovery: ["srat"] - boot: auto init: false hassio_api: true