fix(ci): remove unnecessary Lua header installation step

Our SecuBox packages are PKGARCH:=all (pure scripts) and don't require
Lua headers or lucihttp compilation.  The Lua header installation step
was causing premature compilation attempts of lua/lucihttp which failed
due to API incompatibility between lucihttp (Lua 5.1 API) and lua5.4.

Changes:
- Removed "Install Lua headers" step from GitHub Actions workflow
- Removed Lua header installation from local-build.sh (2 instances)
- Packages will use prebuilt dependencies as intended
- lucihttp/cgi-io remain disabled in .config

This resolves the lualib.h missing error by avoiding the compilation
entirely rather than trying to fix header paths.

🤖 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-03 09:25:20 +01:00
parent 39ca4af683
commit 3a8831daf1
3 changed files with 12 additions and 209 deletions

View File

@ -219,7 +219,12 @@
"Bash(source secubox-tools/webui/.venv/bin/activate:*)",
"Bash(python -m app.ingest:*)",
"Bash(python -m json.tool:*)",
"Bash(python -m uvicorn:*)"
"Bash(python -m uvicorn:*)",
"Bash(./local-build.sh)",
"Bash(./scripts/feeds search:*)",
"Bash(./sdk/scripts/feeds install:*)",
"Bash(readlink:*)",
"Bash(git -C feeds/luci branch:*)"
]
}
}

View File

@ -533,87 +533,6 @@ jobs:
echo "Note: Our SecuBox packages are PKGARCH:=all (scripts only)"
echo "They will be built regardless of dependency availability"
- name: Install Lua headers in SDK staging directory
run: |
cd sdk
echo "📦 Installing Lua headers manually to prevent lucihttp compilation failures..."
# Install lua package to feeds
./scripts/feeds install lua
# Find Lua source directory in feeds
LUA_SRC=$(find feeds/packages/lang/lua/src -type d -name "lua-*" 2>/dev/null | head -1)
if [ -n "$LUA_SRC" ]; then
echo "Found Lua source at: $LUA_SRC"
# Create include directory in all target staging dirs
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
echo "Installing headers to $STAGING/usr/include/"
mkdir -p "$STAGING/usr/include"
# Copy Lua headers
if [ -d "$LUA_SRC" ]; then
cp -v "$LUA_SRC"/*.h "$STAGING/usr/include/" 2>/dev/null || true
cp -v "$LUA_SRC"/src/*.h "$STAGING/usr/include/" 2>/dev/null || true
fi
fi
done
else
echo "⚠️ Lua source not found in feeds, trying alternative methods..."
# Alternative 1: Search for Lua headers in build_dir
LUA_BUILD_DIR=$(find build_dir -type f -name "lua.h" -printf '%h\n' 2>/dev/null | head -1)
if [ -n "$LUA_BUILD_DIR" ]; then
echo "Found Lua headers in build_dir at: $LUA_BUILD_DIR"
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
mkdir -p "$STAGING/usr/include"
# Copy ALL header files from the directory
cp -v "$LUA_BUILD_DIR"/*.h "$STAGING/usr/include/" 2>/dev/null || true
fi
done
else
# Alternative 2: Use system Lua headers as last resort
echo "Searching for system Lua headers..."
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
mkdir -p "$STAGING/usr/include"
# Try to find lua headers anywhere in the SDK
find . -type f \( -name "lua.h" -o -name "lualib.h" -o -name "lauxlib.h" \) \
-exec cp {} "$STAGING/usr/include/" \; 2>/dev/null || true
fi
done
fi
fi
# Verify headers are installed
echo ""
echo "Verifying Lua headers installation:"
for STAGING in staging_dir/target-*; do
HEADERS_FOUND=0
for HEADER in lua.h lualib.h lauxlib.h; do
if [ -f "$STAGING/usr/include/$HEADER" ]; then
echo "✅ $STAGING/usr/include/$HEADER"
HEADERS_FOUND=$((HEADERS_FOUND + 1))
else
echo "❌ $STAGING/usr/include/$HEADER NOT FOUND"
fi
done
if [ $HEADERS_FOUND -eq 3 ]; then
echo "✅ All required Lua headers installed for $(basename $STAGING)"
else
echo "⚠️ Warning: Missing some Lua headers in $(basename $STAGING)"
fi
done
- name: Configure packages
run: |
cd sdk

View File

@ -484,75 +484,12 @@ FEEDS
print_warning "Feed installation had errors, checking if critical..."
fi
# Install Lua headers manually to staging directory (prevents lua.h missing error in lucihttp)
echo ""
echo "📦 Installing Lua headers manually to staging directory..."
./scripts/feeds install lua 2>&1 | grep -v "WARNING:" || true
# Find Lua source directory in feeds
LUA_SRC=$(find feeds/packages/lang/lua/src -type d -name "lua-*" 2>/dev/null | head -1)
if [ -n "$LUA_SRC" ]; then
print_info "Found Lua source at: $LUA_SRC"
# Create include directory in all target staging dirs
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
echo "Installing headers to $STAGING/usr/include/"
mkdir -p "$STAGING/usr/include"
# Copy Lua headers
cp "$LUA_SRC"/*.h "$STAGING/usr/include/" 2>/dev/null || true
cp "$LUA_SRC"/src/*.h "$STAGING/usr/include/" 2>/dev/null || true
fi
done
else
print_warn "Lua source not found in feeds, trying alternative methods..."
# Alternative 1: Search for Lua headers in build_dir
LUA_BUILD_DIR=$(find build_dir -type f -name "lua.h" -printf '%h\n' 2>/dev/null | head -1)
if [ -n "$LUA_BUILD_DIR" ]; then
echo "Found Lua headers in build_dir at: $LUA_BUILD_DIR"
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
mkdir -p "$STAGING/usr/include"
# Copy ALL header files from the directory
cp "$LUA_BUILD_DIR"/*.h "$STAGING/usr/include/" 2>/dev/null || true
fi
done
else
# Alternative 2: Use system Lua headers as last resort
echo "Searching for system Lua headers..."
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
mkdir -p "$STAGING/usr/include"
# Try to find lua headers anywhere in the SDK
find . -type f \( -name "lua.h" -o -name "lualib.h" -o -name "lauxlib.h" \) \
-exec cp {} "$STAGING/usr/include/" \; 2>/dev/null || true
fi
done
fi
fi
# Verify headers are installed
if ls staging_dir/target-*/usr/include/lua.h 2>/dev/null > /dev/null; then
print_info "✅ Lua headers successfully installed in staging directory"
else
print_warn "⚠️ Lua headers not found, but continuing (may cause issues with lucihttp)"
fi
# 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
# Our SecuBox packages are PKGARCH:=all (scripts) so they don't need compiled dependencies
# Note: We skip Lua header installation and manual dependency builds
# Our SecuBox packages are PKGARCH:=all (scripts only) - no compilation needed
# lucihttp and cgi-io dependencies will be disabled in .config
echo ""
echo " Dependencies will be handled via .config (pre-built packages preferred)"
echo " lucihttp and cgi-io will be disabled (fail to compile: missing lua.h)"
echo " Our packages are PKGARCH:=all (scripts) - no lucihttp compilation needed"
# Verify feeds
echo ""
@ -1114,66 +1051,8 @@ setup_openwrt_feeds() {
print_warning "Feed install had warnings, checking directories..."
fi
# Install Lua headers manually to staging directory (prevents lua.h missing error in lucihttp)
echo ""
print_info "Installing Lua headers manually to staging directory..."
./scripts/feeds install lua 2>&1 | grep -v "WARNING:" || true
# Find Lua source directory in feeds
LUA_SRC=$(find feeds/packages/lang/lua/src -type d -name "lua-*" 2>/dev/null | head -1)
if [ -n "$LUA_SRC" ]; then
print_info "Found Lua source at: $LUA_SRC"
# Create include directory in all target staging dirs
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
echo "Installing headers to $STAGING/usr/include/"
mkdir -p "$STAGING/usr/include"
# Copy Lua headers
cp "$LUA_SRC"/*.h "$STAGING/usr/include/" 2>/dev/null || true
cp "$LUA_SRC"/src/*.h "$STAGING/usr/include/" 2>/dev/null || true
fi
done
else
print_warning "Lua source not found in feeds, trying alternative methods..."
# Alternative 1: Search for Lua headers in build_dir
LUA_BUILD_DIR=$(find build_dir -type f -name "lua.h" -printf '%h\n' 2>/dev/null | head -1)
if [ -n "$LUA_BUILD_DIR" ]; then
echo "Found Lua headers in build_dir at: $LUA_BUILD_DIR"
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
mkdir -p "$STAGING/usr/include"
# Copy ALL header files from the directory
cp "$LUA_BUILD_DIR"/*.h "$STAGING/usr/include/" 2>/dev/null || true
fi
done
else
# Alternative 2: Use system Lua headers as last resort
echo "Searching for system Lua headers..."
for STAGING in staging_dir/target-*; do
if [ -d "$STAGING" ]; then
mkdir -p "$STAGING/usr/include"
# Try to find lua headers anywhere in the SDK
find . -type f \( -name "lua.h" -o -name "lualib.h" -o -name "lauxlib.h" \) \
-exec cp {} "$STAGING/usr/include/" \; 2>/dev/null || true
fi
done
fi
fi
# Verify headers are installed
if ls staging_dir/target-*/usr/include/lua.h 2>/dev/null > /dev/null; then
print_success "✅ Lua headers successfully installed in staging directory"
else
print_warning "⚠️ Lua headers not found, but continuing (may cause issues with lucihttp)"
fi
# Note: Skipping Lua header installation
# Our packages are PKGARCH:=all (scripts only) - no compilation needed
# Verify feeds
for feed in packages luci; do