From 3523dd534f35bd7660479191c81936f7db7c589e Mon Sep 17 00:00:00 2001 From: mstrhakr Date: Thu, 8 Oct 2026 09:26:23 -0400 Subject: [PATCH] fix(compatibility): require Unraid 6.12 and remove legacy WebUI patches Align documented requirements with the plugin's PHP 8 dependency. Remove obsolete patch scripts, assets, installer hooks, settings and action handling, while retaining the pre-7.0 Ace fallback and Git patch features. Add installer compatibility regression coverage for the minimum version and Ace fallback. Fixes #170. --- README.md | 2 +- compose.manager.plg | 50 +- docs/configuration.md | 21 +- docs/getting-started.md | 2 +- docs/user-guide.md | 6 +- .../compose.manager.settings.page | 83 ---- source/compose.manager/default.cfg | 1 - source/compose.manager/include/Exec.php | 21 - .../patches/6.10/docker_client.patch | 119 ----- .../patches/6.11/docker_client.patch | 103 ---- .../patches/6.9/docker_client.patch | 128 ----- .../compose.manager/scripts/install-patch.sh | 54 -- source/compose.manager/scripts/patch.sh | 462 ------------------ source/pkg_build.sh | 2 +- tests/unit/ComposeFilterTest.php | 2 +- tests/unit/InstallerCompatibilityTest.php | 42 ++ tests/unit/patch.bats | 98 ---- 17 files changed, 49 insertions(+), 1147 deletions(-) delete mode 100644 source/compose.manager/patches/6.10/docker_client.patch delete mode 100644 source/compose.manager/patches/6.11/docker_client.patch delete mode 100644 source/compose.manager/patches/6.9/docker_client.patch delete mode 100644 source/compose.manager/scripts/install-patch.sh delete mode 100644 source/compose.manager/scripts/patch.sh create mode 100644 tests/unit/InstallerCompatibilityTest.php delete mode 100644 tests/unit/patch.bats diff --git a/README.md b/README.md index c69b6944..e4ffc63b 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ With dcflachs Docker Compose Manager being depreciated, if you want to go back t ## Requirements -- unRAID 6.9.0 or later +- unRAID 6.12.0 or later (PHP 8 is required; first included in Unraid 6.12.0) > NOTE: This is untested on anything older than 7.2.3 currently. I will remove this note if I get a report that this IS compatible that far back. I am working on getting a machine setup for testing on the older versions. Any advice would be welcome, eg how to VM unraid easily. diff --git a/compose.manager.plg b/compose.manager.plg index 4dfaec28..0bb0dbe4 100644 --- a/compose.manager.plg +++ b/compose.manager.plg @@ -29,7 +29,7 @@ launch="&launch;" pluginURL="&pluginURL;" icon="cubes" - min="6.9.0" + min="6.12.0" support="https://forums.unraid.net/topic/197334-plugin-compose-manager-plus/" project="https://github.com/mstrhakr/compose_plugin" readme="https://github.com/mstrhakr/compose_plugin#readme" @@ -103,30 +103,6 @@ rm -f /tmp/ace-editor-install.sh - - -echo "" -echo "----------------------------------------------------" -echo "" -echo " Patches are only installed for" -echo " pre-6.12 Unraid versions." -echo "" -echo " If on 6.12 or later, patches are not needed" -echo " and skips will be shown below." -echo "" -echo "----------------------------------------------------" -echo "" - - - - - - -&emhttpLOC;/scripts/install-patch.sh install &emhttpLOC; &pluginLOC; -rm -f /tmp/patch-util-install.sh - - - echo "" @@ -140,30 +116,6 @@ echo "" - - -echo "" -echo "----------------------------------------------------" -echo "" -echo " Patches are only modified for" -echo " pre-6.12 Unraid versions." -echo "" -echo " If on 6.12 or later, patches are not needed" -echo " and skips will be shown below." -echo "" -echo "----------------------------------------------------" -echo "" - - - - - - -&emhttpLOC;/scripts/install-patch.sh remove &emhttpLOC; &pluginLOC; -rm -f /tmp/patch-util-remove.sh - - - diff --git a/docs/configuration.md b/docs/configuration.md index 4a95a3fd..6101cacb 100755 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -23,7 +23,7 @@ Access settings via **Settings → Compose** in the Unraid web UI. | **Show in Header Menu** | No | Display Compose Manager as a separate page in the header navigation bar. | | **Show Dashboard Tile** | Yes | Display a Compose Stacks tile on the Dashboard showing stack status at a glance. | | **Hide Compose Containers (Dashboard Tile)** | No | Hide containers managed by Compose stacks from Unraid's Docker Containers dashboard tile. This avoids duplicate entries when both tiles are visible. Requires "Show Dashboard Tile". | -| **Hide Compose Containers (Docker Page)** | No | Patch the native Docker UI to hide or filter Compose-managed containers. See the Web UI Patches section for version limitations. | +| **Hide Compose Containers (Docker Page)** | No | Hide Compose-managed containers from the Docker Containers table to avoid duplicate entries when Compose stacks appear on the same page. Requires "Show in Header Menu" to be disabled (inline mode). | | **Show Compose Above Docker Containers** | No | When the Docker page is displayed without tabs, move the Compose Stacks section above the built-in Docker Containers section. | | **Expand Stacks by Default** | No | Automatically expand all stack detail rows when the page loads. | @@ -39,7 +39,6 @@ Access settings via **Settings → Compose** in the Unraid web UI. | Setting | Default | Description | |---------|---------|-------------| -| **Legacy Patch Web UI** | No | Enable integration patches for the native Docker manager UI on Unraid ≤ 6.11. Not required on Unraid 6.12 and later. Use the Patch/Unpatch buttons to apply or remove the patch. | | **Debug to Log** | No | Enable debug logging to syslog to troubleshoot Compose command output. | ### Backup Settings @@ -90,24 +89,6 @@ The default location stores all compose configurations on the USB flash drive, e Compose Manager supports all four standard Compose file names and preserves the filenames already present in each stack. -## Web UI Patches - -This setting controls small compatibility patches that change how Compose-managed containers are presented in Unraid's native Docker UI. These patches only affect UI rendering and metadata — they do **not** stop containers or change how they run. - -### Legacy UI Patch - -- **Legacy behavior (Unraid < 6.12)** — On older Unraid releases the patch adds Compose-specific metadata (e.g. `net.unraid.docker.managed`) and tweaks the Docker manager so Compose-managed containers are recognized. Practical effects include skipping native update checks for those containers and preventing them from being treated like native Docker-managed containers in the UI. Use this when running an older Unraid release so Compose can interoperate cleanly with the Docker manager. This is enabled in the settings under "Patch UI" - -### Hide Compose Containers from Docker UI via Patch - -- **Hide patches (Unraid 6.12–7.2)** — For Unraid 6.12 through 7.2 we offer a different patch that **removes** Compose-managed containers from the Docker page and Dashboard tile entirely (they remain visible through the Compose Stacks tile). Use the hide patch to remove duplicate entries and declutter the Docker UI when you prefer to manage Compose stacks separately. This is enabled in the settings under "Hide Compose Containers from Docker UI via Patch" - -Notes and version limitations: - -- Unraid 6.12 and later integrate the basic "ignore" behavior natively; the legacy patch is not required for that functionality. -- The explicit "hide" patches are provided only for **6.12–7.2**. If you are on a version outside this range, check compatibility before enabling the hide option. -- Patch files are stored under `source/compose.manager/patches/` and are applied only when a matching Unraid version is detected. - ## Debug Logging Enable debug logging to troubleshoot issues. Logs are written to the Unraid syslog. diff --git a/docs/getting-started.md b/docs/getting-started.md index b738824d..b2ca7f0d 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -2,7 +2,7 @@ ## Requirements -- Unraid 6.9.0 or later +- Unraid 6.12.0 or later (PHP 8 is required; first included in Unraid 6.12.0) - Docker service enabled ## Installation diff --git a/docs/user-guide.md b/docs/user-guide.md index a670c1b8..bfe690f6 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -81,7 +81,7 @@ Compose Manager provides a Backup & Restore interface under **Settings → Compo ### Hiding and Filtering Compose Containers -You can optionally hide compose-managed containers from the native Docker manager and Dashboard. Use the setting to toggle patching of the Docker page and enable server-side filters so only the desired containers/stacks are shown. +Use **Hide Compose Containers from Docker Page** to hide Compose-managed containers from the native Docker Containers table when **Show Compose in Header Menu** is disabled (inline mode). Use **Hide Compose Containers from Docker Dashboard Tile** to hide them from the native Dashboard tile when **Show Dashboard Tile** is enabled. These display options avoid duplicate entries without changing how containers run; no legacy WebUI patch is required. ### Display Options @@ -119,7 +119,3 @@ services: ``` The **Web UI** tab in the editor provides a visual interface for adding these labels. - -### Patching the Native UI - -Enable "Patch Web UI" in settings to show compose containers in the native Docker manager with stack grouping. diff --git a/source/compose.manager/compose.manager.settings.page b/source/compose.manager/compose.manager.settings.page index 30103498..f2033cf1 100755 --- a/source/compose.manager/compose.manager.settings.page +++ b/source/compose.manager/compose.manager.settings.page @@ -9,12 +9,6 @@ Lock="true" include "/usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php"; require_once("/usr/local/emhttp/plugins/compose.manager/include/Defines.php"); $cfg = parse_plugin_cfg($sName); -$ui_patch_button_type = (!$option_patch_ui && strcmp($cfg['PATCH_UI'], "true") == 0 && !isset($composemanDockerClientPatch)) ? "Button" : "Hidden"; -$ui_unpatch_button_type = (!$option_patch_ui && strcmp($cfg['PATCH_UI'], "false") == 0 && isset($composemanDockerClientPatch)) ? "Button" : "Hidden"; - -$option_patch_ui = version_compare(parse_ini_file('/etc/unraid-version')['version'], '6.12.0-RC0', '>='); -$ui_patch_help_class = $option_patch_ui ? "hidden" : "inline_help"; // hide help on 6.12+ (integration built-in) // - $projects_exist = intval(shell_exec("ls -l " . $compose_root . " | grep ^d | wc -l")) != 0; @@ -658,7 +652,6 @@ $acePath = file_exists('/usr/local/emhttp/plugins/dynamix/javascript/ace/ace.js'