secubox-image.sh: Dev-side image builder via OpenWrt ASU API with
build, download, firmware-selector commands. Includes first-boot
script that resizes root, adds SecuBox feed, and installs all
packages. Supports --resize flag for full eMMC utilization.
secubox-sysupgrade.sh: On-device upgrade script that detects current
device/packages, builds custom image via ASU, and applies sysupgrade.
Uses jsonfilter (OpenWrt native) for JSON parsing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The settings page was showing "CAPI: Error" because the status
method didn't return the capi_enrolled field. Added CAPI status
check to get_status() so the health display shows correct status.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change build path from package/secubox/ to package/feeds/secubox/
- Add -f flag to force install from secubox feed
- Add verification that package exists after feed install
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add shorthand names for all toolchain packages so they can be used
directly with the build command without requiring full directory names.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix recursive inclusion bug where secubox-app-bonus was including itself
causing 1GB package size (now 7.5MB with 73 packages)
- Fix Packages index generation to strip Source/SourceName/SourceDateEpoch/URL
fields that caused opkg parsing issues
- Add rebuild_bonus_package() to local-build.sh for proper feed embedding
- Update secubox-feed install command to handle local dependencies from files
(workaround for opkg signature bug with file:// URLs)
- Clean up libc dependency stripping in Packages generation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add four major features to enhance SecuBox AppStore:
1. Feed Source Management:
- Feed types: published, unpublished, development
- Share tokens for private feed access
- CLI: secubox feed list/add/share/import
- LuCI: Feed type badges and share URLs in catalog-sources
2. Profile Export/Import:
- Export configurations with feed sources embedded
- Import from URL or file with merge/replace modes
- CLI: secubox profile export/import/share
- LuCI: New profiles.js view with export/import dialogs
3. Skill System:
- Capability discovery from module catalogs
- Quality indicators based on provider count
- CLI: secubox skill list/providers/install/check
- LuCI: New skills.js view with provider browser
4. Feedback Loop:
- Issue reporting and resolution tracking
- Search existing resolutions
- CLI: secubox feedback report/resolve/search/list
- LuCI: New feedback.js view for knowledge base
Technical changes:
- RPCD backend with 17 new API methods
- POSIX shell compatibility fixes (ESC via printf, tr A-Z a-z)
- LuCI menu entries for new views
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove all LuCI dependencies (luci-base, rpcd, luci-lib-jsonc)
- Remove LuCI-specific files (RPCD backend, ACL, menu, JS views)
- Package now only provides local opkg feed and documentation
- Remove Packages.sig to avoid signature verification errors
- Update local-build.sh to skip signature generation for local feeds
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update local-build.sh to remove libc from Packages index
- Prevents opkg architecture mismatch errors on install
- Regenerate secubox-feed with 74 packages
- Update RPCD scripts for lyrion, mailinabox, metablogizer, nextcloud
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix LAPI status check to dynamically read port from config
- Previously hardcoded wrong port (8080 vs 8180)
- Add comprehensive SecuBox feed documentation to README
- Document opkg configuration, HAProxy publishing, troubleshooting
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- README.md: Update to v0.16.0 with all 38 modules categorized
- CHANGELOG.md: Create comprehensive changelog (v0.12.0-v0.16.0)
- CLAUDE.md: Add toolchain build rules for Go/CGO packages
- secubox-tools/README.md: Add SDK vs toolchain build guidance
- TODO-ANALYSE.md: Mark completed tasks, update health score
- HISTORY.md: Document ARM64 toolchain discovery, multi-instance
- dev-status-widget.js: Update stats (38 modules, 1500 commits)
SDK builds produce LSE atomics that crash on some ARM64 CPUs.
Go/CGO packages (crowdsec, netifyd) must use full toolchain.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
OpenWrt uses a restricted PATH that doesn't include system binaries.
The kernel headers build step requires rsync, which fails with Error 127.
This fix automatically creates a symlink to the system rsync in
staging_dir/host/bin/ at the start of firmware and toolchain builds.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add target/compile step to build kernel and prepare target environment
- Add golang/host/compile step to build host Go compiler for Go packages
- Combine tools/install and toolchain/install with target/compile for complete prereq build
- Use print_warning instead of error for non-fatal build issues
This fixes the toolchain build to properly support Go packages
(secubox-app-cs-firewall-bouncer, secubox-app-crowdsec) which require
the host Go compiler.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add sync command to synchronize packages from package/secubox to local-feed
- Add local-feed deletion to clean-all command
- Add missing packages to package/secubox:
- luci-app-secubox-crowdsec
- secubox-crowdsec-setup
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rebuilt all luci-app-* and secubox-app-* packages for aarch64-cortex-a72
- Updated local-build.sh with FORCE=1 to bypass rsync prereq check
- Removed packages that failed SDK build (require full buildroot)
- Updated Packages index and apps-local.json manifest
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add embed_local_feed() to local-build.sh that copies built packages
into bonus app as /www/secubox-feed/ for offline installation
- Generate Packages index and apps-local.json manifest for opkg
- Add RPCD backend (luci.secubox-store) for package install/remove
- Add LuCI view for browsing and managing local packages
- Fix OPENWRT_ONLY_PACKAGES to allow secubox-app-* wrappers in SDK build
- Remove experimental python3-* packages (unfinished mitmproxy native plan)
- Set rootfs partition size to 16GB for larger overlay
- Bump luci-app-secubox-bonus to v0.2.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update mitmproxy to v11.1.3
- Build from Python source (no prebuilt arm64 binaries)
- Add Python dependencies
- Add mitmproxy to local-build.sh and sync-openwrt-packages.sh
- Set PKGARCH:=all for Python package
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update default router IP to 192.168.255.1
- Add SSH control master for single password prompt per session
- Add StrictHostKeyChecking=no for smoother deployment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set luci-app-ndpid version to 0.9.1
- Fix sync-openwrt-packages.sh to search subdirectories (base/, packages/)
- Add missing packages: ndpid, crowdsec-firewall-bouncer, secubox-core, etc.
- Add all LuCI SecuBox apps to sync list
- Improve checksums handling
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add secubox-app-nodogsplash to OPENWRT_ONLY_PACKAGES (requires native compilation)
- Add shorthand name mappings: ndpid, netifyd, nodogsplash, crowdsec
- Add DIR_NAME_MAP to resolve shorthand names to actual directory names
- Update help text with clear SDK vs toolchain package documentation
- Improve examples showing both shorthand and full directory name usage
Usage: ./local-build.sh build nodogsplash
./local-build.sh build ndpid
./local-build.sh build secubox-app-ndpid
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add PKG_NAME_MAP for directory to package name translation
- Set mochabin (aarch64-cortex-a72) as default architecture
- Fix package file finding logic for proper .ipk detection
- Add proper OpenWrt target configuration based on architecture
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major achievements:
- Successfully built CrowdSec 1.7.4-r2 (81MB) for aarch64_cortex-a72
- Netifyd 5.2.1-r1 confirmed working with all fixes
- Both packages built with OpenWrt 24.10.5 buildroot
CrowdSec Build:
- Full Go 1.23 compatibility with vendored modules
- Staged all required golang.org/x/* dependencies
- Fixed go.mod directives for OpenWrt toolchain
- Includes crowdsec engine + crowdsec-cli (cscli)
- Complete configuration files and init scripts
Netifyd Status:
- 5.2.1 package with GCC 13.3/C++17 fixes operational
- LuCI dashboard v1.0.2 with working metrics
- Native status.json integration confirmed
Build System Updates:
- Enhanced local-build.sh for OpenWrt-only packages
- Improved package sync and build workflow
- Updated Makefiles for consistency
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed critical Makefile structure issue that prevented luci-app-secubox-admin from
being indexed by the feed system and built by the SDK.
Changes:
1. Added `include $(TOPDIR)/rules.mk` at the beginning (required for all OpenWrt packages)
2. Added PKG_LICENSE and PKG_MAINTAINER fields (best practices)
3. Added LUCI_PKGARCH:=all to match other LuCI packages
4. Added closing comment `# call BuildPackage - OpenWrt buildroot`
5. Moved include statements to proper positions
This fix aligns the Makefile with the standard OpenWrt/LuCI package structure used
by luci-app-secubox and other working packages.
Additionally:
- Suppressed kconfig warnings in local-build.sh by redirecting stderr to /dev/null
for all `make defconfig` commands (lines 532, 782, 1278)
Build verification:
✅ Package now appears in feeds/secubox.index
✅ Successfully builds: luci-app-secubox-admin_1.0.0-r2_all.ipk (8.3KB)
✅ Total SecuBox packages built: 33
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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>
Enhanced Lua header installation in SDK to copy ALL .h files from the
Lua source directory, not just search for lua.h individually.
Changes:
- Primary: Copy all *.h files from feeds/packages/lang/lua/src/lua-*/
- Fallback 1: Find directory with lua.h in build_dir and copy ALL headers
- Fallback 2: Search for lua.h, lualib.h, lauxlib.h individually
- Added verification for all 3 critical headers
This fixes the lualib.h missing error that occurred even when lua.h
was successfully found and installed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Previous approach tried to compile Lua package but failed silently,
leaving no headers in staging_dir. This caused lucihttp to fail with:
fatal error: lua.h: No such file or directory
Root cause: `make package/lua/compile || true` was failing but being
ignored, so headers were never installed to staging_dir.
New solution - Direct header installation:
1. Install lua package to feeds (./scripts/feeds install lua)
2. Find Lua source directory in feeds/packages/lang/lua/src/
3. Directly copy *.h headers to staging_dir/target-*/usr/include/
4. Verify lua.h exists before continuing
This avoids the complexity of compiling Lua and directly provides
the headers that lucihttp needs for compilation.
Fallback: If headers not found in feeds source, search build_dir
for any existing lua.h and copy it.
Changes:
- GitHub Actions: Completely rewrote header installation logic
- local-build.sh: Updated both Lua header installation sections
- Both: Added detailed verification and fallback mechanisms
This should finally resolve the persistent lucihttp compilation
failures in SDK builds.
Related: 7209c83, f5c98d9
Fixes: #lucihttp-lua-headers-missing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The previous fix only installed Lua via feeds but didn't compile it,
so lua.h headers were still missing from staging_dir. This caused
all LuCI packages to fail compilation with:
fatal error: lua.h: No such file or directory
Root cause: ./scripts/feeds install lua only adds the package to the
build system but doesn't compile it or install headers to staging_dir.
Solution:
1. Install lua package via feeds
2. Enable lua in .config with CONFIG_PACKAGE_lua=m
3. Compile lua package: make package/lua/compile
4. This installs lua.h and other headers to staging_dir/target-*/usr/include/
5. Verify headers are present before continuing
Changes:
- GitHub Actions: Update "Install Lua" step to compile package
- local-build.sh: Update both Lua installation sections (2 places)
- Both: Add verification that lua.h exists in staging_dir
This ensures lucihttp and all LuCI packages can find Lua headers
during compilation, preventing the SDK build failures.
Related: f5c98d9 (previous incomplete fix)
Fixes: #lucihttp-missing-headers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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>