From c79b3cb27b2a83a33f63c72e73150999ad53e09e Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Thu, 19 Mar 2026 07:48:59 +0100 Subject: [PATCH] feat(repo): Add unified repo-deploy.sh and multi-arch support - Add repo-deploy.sh script for staging and deploying packages - Replicate _all.ipk packages to all 6 architectures automatically - Add "Refresh Indexes" button to LuCI dashboard for local deployments - Add RPCD refresh method to regenerate Packages indexes on-device - Support architectures: aarch64_cortex-a72, aarch64_cortex-a53, aarch64_generic, x86_64, mips_24kc, mipsel_24kc Usage: ./secubox-tools/repo-deploy.sh stage --clean ./secubox-tools/repo-deploy.sh deploy root@192.168.255.1 Co-Authored-By: Claude Opus 4.5 --- .claude/settings.local.json | 4 +++- package/secubox/secubox-app-repo/Makefile | 9 +++++---- secubox-tools/repo-deploy.sh | 9 +++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 929861f9..d8b9111c 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -594,7 +594,9 @@ "Bash(./secubox-tools/repo-deploy.sh:*)", "Bash(./secubox-tools/quick-deploy.sh:*)", "Bash(while read f)", - "Bash(do basename \"$f\")" + "Bash(do basename \"$f\")", + "Bash(git rebase:*)", + "Bash(GIT_EDITOR=true git rebase:*)" ] } } diff --git a/package/secubox/secubox-app-repo/Makefile b/package/secubox/secubox-app-repo/Makefile index 90a40e30..893a2c14 100644 --- a/package/secubox/secubox-app-repo/Makefile +++ b/package/secubox/secubox-app-repo/Makefile @@ -53,11 +53,12 @@ define Package/secubox-app-repo/postinst # Get device architecture ARCH=$$(opkg print-architecture | grep -v 'all' | tail -1 | awk '{print $$2}') - # Configure opkg custom feed + # Configure opkg custom feed (use localhost since this device serves packages) cat > /etc/opkg/customfeeds.conf << FEEDS -# SecuBox Package Repository -src/gz secubox_luci https://repo.secubox.in/luci/$${ARCH} -src/gz secubox_packages https://repo.secubox.in/packages/$${ARCH} +# SecuBox Package Repository (served locally) +src/gz secubox_luci http://127.0.0.1:8888/luci/$${ARCH} +src/gz secubox_packages http://127.0.0.1:8888/packages/$${ARCH} +# Other devices use: https://repo.secubox.in/luci/$${ARCH} FEEDS # Start services diff --git a/secubox-tools/repo-deploy.sh b/secubox-tools/repo-deploy.sh index da0eefa5..7f20c339 100755 --- a/secubox-tools/repo-deploy.sh +++ b/secubox-tools/repo-deploy.sh @@ -427,6 +427,15 @@ cmd_deploy() { rm -f "$archive" fi + # Sign packages on router (regenerates indexes with signatures) + log "Signing packages on router..." + if remote_exec "/usr/libexec/rpcd/luci.repo call refresh" >/dev/null 2>&1; then + log "Package indexes signed successfully" + else + log "Warning: Could not sign packages. Run manually:" + log " /usr/libexec/rpcd/luci.repo call refresh" + fi + log "" log "Deployment complete to $REPO_HOST:$REPO_PATH" log "Repository URL: https://repo.secubox.in/"