fix(ci): install Lua headers in SDK to prevent lucihttp compilation errors

The lucihttp package fails to compile in SDK environment with:
  fatal error: lua.h: No such file or directory

Root cause: Even with CONFIG_PACKAGE_lucihttp disabled, if lucihttp
is pulled as a dependency, it tries to compile but lacks Lua headers.

Solution:
1. Install lua package in SDK which provides the required headers
2. Use standard OpenWrt format for disabling packages:
   "# CONFIG_PACKAGE_lucihttp is not set" instead of "=n"
3. lucihttp won't be compiled since it's disabled, but if somehow
   triggered as dependency, lua.h will be available

Changes:
- GitHub Actions workflow: Added "Install Lua in SDK" step
- local-build.sh: Added lua installation after feeds install
- Both: Changed to OpenWrt standard disable format

This prevents the SDK build failure while keeping our packages
(PKGARCH:=all scripts) working correctly.

Fixes: #lucihttp-build-error

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-01 18:44:37 +01:00
parent dd588e0520
commit f5c98d90a3
2 changed files with 26 additions and 2 deletions

View File

@ -533,6 +533,18 @@ jobs:
echo "Note: Our SecuBox packages are PKGARCH:=all (scripts only)"
echo "They will be built regardless of dependency availability"
- name: Install Lua in SDK
run: |
cd sdk
echo "📦 Installing Lua headers in SDK to prevent lucihttp compilation errors..."
# Install lua package which provides headers needed by lucihttp
# This prevents lua.h missing error but we still don't want lucihttp compiled
./scripts/feeds install lua
echo "✅ Lua installed"
- name: Configure packages
run: |
cd sdk
@ -567,8 +579,9 @@ jobs:
# Disable problematic packages that fail to compile in SDK
# Our SecuBox packages are PKGARCH:=all (scripts) so they don't need these
echo "CONFIG_PACKAGE_lucihttp=n" >> .config
echo "CONFIG_PACKAGE_cgi-io=n" >> .config
# Use OpenWrt standard format for disabling packages
echo "# CONFIG_PACKAGE_lucihttp is not set" >> .config
echo "# CONFIG_PACKAGE_cgi-io is not set" >> .config
# Enable use of pre-built packages from feeds
echo "CONFIG_FEED_packages=y" >> .config

View File

@ -483,6 +483,12 @@ FEEDS
print_warning "Feed installation had errors, checking if critical..."
fi
# Install Lua to provide headers (prevents lua.h missing error in lucihttp)
echo ""
echo "📦 Installing Lua package for headers..."
./scripts/feeds install lua 2>&1 | grep -v "WARNING:" || true
print_info "Lua installed (provides headers to prevent lucihttp compilation errors)"
# Note: We skip manual dependency installation as it causes hangs
# The feeds install -a command above already installed all available packages
# lucihttp and cgi-io will be disabled in .config to prevent compilation failures
@ -1052,6 +1058,11 @@ setup_openwrt_feeds() {
print_warning "Feed install had warnings, checking directories..."
fi
# Install Lua to provide headers (prevents lua.h missing error in lucihttp)
echo ""
print_info "Installing Lua package for headers..."
./scripts/feeds install lua 2>&1 | grep -v "WARNING:" || true
# Verify feeds
for feed in packages luci; do
if [[ -d "feeds/$feed" ]]; then