From b0295e6e89980c768b39495789f51838e05c06d2 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sat, 3 Jan 2026 09:55:11 +0100 Subject: [PATCH] fix(ci): patch Makefiles to remove dependencies during SDK build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build was still trying to compile lucihttp even though disabled in .config because `make package/XXX/compile` automatically resolves and builds ALL dependencies regardless of .config settings. Solution: Patch package Makefiles to comment out LUCI_DEPENDS before building. This works because: - Our packages are PKGARCH:=all (pure Lua scripts) - Dependencies (luci-base, lucihttp, rpcd) are runtime-only - They will be installed as prebuilt packages on target device - No compilation is needed for our script-only packages Changes: - Added "Patch packages" step to remove LUCI_DEPENDS from Makefiles - Uses sed to comment out dependency declarations - Applied before configure step so defconfig doesn't pull in deps This allows SDK to build our packages without trying to compile incompatible dependencies like lucihttp (Lua 5.1 API with Lua 5.4). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .github/workflows/build-openwrt-packages.yml | 23 +++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-openwrt-packages.yml b/.github/workflows/build-openwrt-packages.yml index 372fe845..ae883edd 100644 --- a/.github/workflows/build-openwrt-packages.yml +++ b/.github/workflows/build-openwrt-packages.yml @@ -533,6 +533,27 @@ jobs: echo "Note: Our SecuBox packages are PKGARCH:=all (scripts only)" echo "They will be built regardless of dependency availability" + - name: Patch packages to remove dependencies for SDK build + run: | + cd sdk + + echo "🔧 Patching package Makefiles to remove runtime dependencies..." + echo " (Dependencies will be installed separately on target device)" + + # Remove LUCI_DEPENDS from all luci-app packages + # Our packages are PKGARCH:=all (scripts) - dependencies are runtime-only + for makefile in package/luci-app-*/Makefile; do + if [[ -f "$makefile" ]]; then + PKG=$(basename $(dirname "$makefile")) + echo " 📝 $PKG" + + # Comment out LUCI_DEPENDS line + sed -i 's/^LUCI_DEPENDS:=/#& # Removed for SDK build - runtime only/' "$makefile" + fi + done + + echo "✅ Packages patched for SDK build" + - name: Configure packages run: | cd sdk @@ -628,7 +649,7 @@ jobs: BUILD_LOG="/tmp/build-${PKG_NAME}.log" # Our packages are PKGARCH:=all (pure scripts), no compilation needed - # Try regular build first, fallback to direct packaging if dependencies fail + # Dependencies removed from Makefile - they're runtime-only (prebuilt on target) if timeout 600 make package/${PKG_NAME}/compile V=s -j1 > "$BUILD_LOG" 2>&1; then # Build succeeded, check if package was created (.apk or .ipk) PKG_FILE=$(find bin -name "${PKG_NAME}*.${PKG_EXT}" 2>/dev/null | head -1)