From dc6fc6c0a2e5857829331e6b99144883625e8803 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sun, 11 Jan 2026 10:12:07 +0100 Subject: [PATCH] fix: Add customfeeds.conf for local SecuBox package feed - Create /etc/opkg/customfeeds.conf with secubox feed pre-configured - Install file via Makefile instead of postinst script - Mark as conffile to preserve user modifications on upgrade - Add .gitignore to exclude built .ipk files from git tracking (packages are embedded at build time by embed_local_feed) Co-Authored-By: Claude Opus 4.5 --- package/secubox/luci-app-secubox-bonus/Makefile | 14 +++++++++----- .../root/etc/opkg/customfeeds.conf | 5 +++++ .../root/www/secubox-feed/.gitignore | 7 +++++++ .../root/www/secubox-feed/.gitkeep | 1 - 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 package/secubox/luci-app-secubox-bonus/root/etc/opkg/customfeeds.conf create mode 100644 package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitignore delete mode 100644 package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitkeep diff --git a/package/secubox/luci-app-secubox-bonus/Makefile b/package/secubox/luci-app-secubox-bonus/Makefile index 0a14a361..c1136dae 100644 --- a/package/secubox/luci-app-secubox-bonus/Makefile +++ b/package/secubox/luci-app-secubox-bonus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-secubox-bonus PKG_VERSION:=0.2.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_ARCH:=all PKG_LICENSE:=Apache-2.0 PKG_MAINTAINER:=CyberMind @@ -14,6 +14,10 @@ LUCI_PKGARCH:=all include $(TOPDIR)/feeds/luci/luci.mk +define Package/luci-app-secubox-bonus/conffiles +/etc/opkg/customfeeds.conf +endef + define Package/luci-app-secubox-bonus/install # Documentation and static content $(INSTALL_DIR) $(1)/www/luci-static/secubox @@ -25,6 +29,10 @@ define Package/luci-app-secubox-bonus/install $(CP) ./root/www/secubox-feed/* $(1)/www/secubox-feed/; \ fi + # opkg custom feeds configuration + $(INSTALL_DIR) $(1)/etc/opkg + $(INSTALL_CONF) ./root/etc/opkg/customfeeds.conf $(1)/etc/opkg/customfeeds.conf + # RPCD backend for package management $(INSTALL_DIR) $(1)/usr/libexec/rpcd $(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.secubox-store $(1)/usr/libexec/rpcd/ @@ -45,10 +53,6 @@ endef define Package/luci-app-secubox-bonus/postinst #!/bin/sh [ -n "$${IPKG_INSTROOT}" ] || { - # Add local feed to opkg if not already present - if ! grep -q "secubox-feed" /etc/opkg/customfeeds.conf 2>/dev/null; then - echo "src/gz secubox file:///www/secubox-feed" >> /etc/opkg/customfeeds.conf - fi # Restart rpcd to load new backend /etc/init.d/rpcd restart rm -rf /tmp/luci-modulecache /tmp/luci-indexcache 2>/dev/null diff --git a/package/secubox/luci-app-secubox-bonus/root/etc/opkg/customfeeds.conf b/package/secubox/luci-app-secubox-bonus/root/etc/opkg/customfeeds.conf new file mode 100644 index 00000000..c8012905 --- /dev/null +++ b/package/secubox/luci-app-secubox-bonus/root/etc/opkg/customfeeds.conf @@ -0,0 +1,5 @@ +# SecuBox Local Package Feed +# Pre-built packages available for offline installation +# Managed by luci-app-secubox-bonus + +src/gz secubox file:///www/secubox-feed diff --git a/package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitignore b/package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitignore new file mode 100644 index 00000000..8ec6ad83 --- /dev/null +++ b/package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitignore @@ -0,0 +1,7 @@ +# Built packages are populated during build +# Do not commit binary files to git +*.ipk +*.apk +Packages +Packages.gz +apps-local.json diff --git a/package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitkeep b/package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitkeep deleted file mode 100644 index 817f2de7..00000000 --- a/package/secubox/luci-app-secubox-bonus/root/www/secubox-feed/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -# SecuBox Local Package Feed\n\nThis directory is populated during build with .ipk packages.\nDo not commit built packages to git.