Add native OpenWrt IPK/APK packages and release build workflow
OpenWrt IPK and APK / Validate source and resolve stable SDKs (push) Waiting to run
OpenWrt IPK and APK / Validate source and resolve stable SDKs (push) Waiting to run
This commit is contained in:
1 parent
edbc86697a
commit
9736aa82a8
13 files changed
+1413
No files matched your search
@@ -0,0 +1,67 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-owrt-remote
|
||||
PKG_VERSION:=121
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=kzolotarev95
|
||||
PKGARCH:=all
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/luci-app-owrt-remote
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=OpenWrt Remote Hub router agent
|
||||
URL:=https://github.com/kzolotarev95/luci-app-owrt-remote
|
||||
DEPENDS:=+luci-base +rpcd-mod-file +uhttpd +jsonfilter +curl +ca-bundle +etherwake
|
||||
endef
|
||||
|
||||
define Package/luci-app-owrt-remote/description
|
||||
Router agent and LuCI panel for OpenWrt Remote Hub. Includes Heartbeat,
|
||||
independent remote Xray control, WAN direct and bounded persistent logs.
|
||||
Xray is selected and verified for the router by the existing agent when
|
||||
applying the Hub configuration; it is not bundled into this noarch package.
|
||||
endef
|
||||
|
||||
define Package/luci-app-owrt-remote/conffiles
|
||||
/etc/config/owrtremote
|
||||
endef
|
||||
|
||||
# scripts/openwrt_package.py prepare creates this self-contained SDK package
|
||||
# from files/ and root/. There are no separately maintained runtime copies.
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/luci-app-owrt-remote/install
|
||||
$(CP) ./root/. $(1)/
|
||||
endef
|
||||
|
||||
define Package/luci-app-owrt-remote/postinst
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || /bin/sh /usr/lib/owrt-remote/package.sh configure
|
||||
endef
|
||||
|
||||
define Package/luci-app-owrt-remote/postrm
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || { \
|
||||
rm -f /tmp/luci-indexcache /tmp/luci-indexcache.*; \
|
||||
rm -rf /tmp/luci-modulecache; \
|
||||
[ ! -x /etc/init.d/rpcd ] || /etc/init.d/rpcd reload; \
|
||||
}
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# OpenWrt's generated postinst/prerm handle enable/start and stop/disable for
|
||||
# both procd services, and PKG_UPGRADE keeps upgrade semantics on IPK and APK.
|
||||
# Do not duplicate them or depend on opkg's "configure" argument: apk invokes
|
||||
# post-install/post-upgrade with version arguments instead.
|
||||
$(eval $(call BuildPackage,luci-app-owrt-remote))
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Native package installation needs the same private panel key as install.sh.
|
||||
# No network downloads or nested opkg/apk operations run under the package lock.
|
||||
set -eu
|
||||
|
||||
configure() {
|
||||
local dir key temp
|
||||
dir=/etc/owrt-remote
|
||||
umask 077
|
||||
mkdir -p "$dir"
|
||||
if [ ! -s "$dir/web.key" ]; then
|
||||
temp="$(mktemp "$dir/.web.key.XXXXXX")"
|
||||
trap 'rm -f "$temp"' EXIT
|
||||
dd if=/dev/urandom of="$temp" bs=32 count=1 2>/dev/null
|
||||
[ "$(wc -c <"$temp")" -eq 32 ] || { echo 'ERROR: insufficient random bytes for panel key' >&2; return 1; }
|
||||
key="$(sha256sum "$temp")"
|
||||
key="${key%% *}"
|
||||
[ "${#key}" = 64 ] || { echo 'ERROR: could not generate panel access key' >&2; return 1; }
|
||||
printf '%s\n' "$key" >"$temp"
|
||||
chmod 0600 "$temp"
|
||||
mv -f "$temp" "$dir/web.key"
|
||||
trap - EXIT
|
||||
fi
|
||||
chmod 0600 "$dir/web.key"
|
||||
# Native conffiles handling preserves existing UCI settings on upgrades.
|
||||
[ ! -f /etc/config/owrtremote ] || chmod 0600 /etc/config/owrtremote
|
||||
rm -f /tmp/luci-indexcache /tmp/luci-indexcache.*
|
||||
rm -rf /tmp/luci-modulecache
|
||||
if [ -x /etc/init.d/rpcd ]; then
|
||||
/etc/init.d/rpcd reload || { echo 'ERROR: rpcd reload failed' >&2; return 1; }
|
||||
fi
|
||||
printf '%s\n' 'OpenWrt Remote: installed. Open LuCI > Services > OpenWrt Remote.'
|
||||
printf '%s\n' 'Apply OpenWrt config from Hub to prepare Xray and start Remote.'
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
configure) configure ;;
|
||||
*) echo 'Usage: package.sh configure' >&2; exit 2 ;;
|
||||
esac
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"releases": [
|
||||
{"series": "23.05", "baseline": "23.05.5", "format": "ipk"},
|
||||
{"series": "24.10", "baseline": "24.10.3", "format": "ipk"},
|
||||
{"series": "25.12", "baseline": "25.12.2", "format": "apk"}
|
||||
],
|
||||
"targets": [
|
||||
{"id": "aarch64_cortex-a53", "target": "mvebu", "subtarget": "cortexa53"},
|
||||
{"id": "aarch64_cortex-a72", "target": "mvebu", "subtarget": "cortexa72"},
|
||||
{"id": "aarch64_generic", "target": "armsr", "subtarget": "armv8"},
|
||||
{"id": "arm_cortex-a7", "target": "bcm27xx", "subtarget": "bcm2709"},
|
||||
{"id": "arm_cortex-a9", "target": "mvebu", "subtarget": "cortexa9"},
|
||||
{"id": "mips_24kc", "target": "ath79", "subtarget": "generic"},
|
||||
{"id": "mipsel_24kc", "target": "ramips", "subtarget": "mt7621"},
|
||||
{"id": "mips64", "target": "octeon", "subtarget": "generic"},
|
||||
{"id": "x86", "target": "x86", "subtarget": "generic"},
|
||||
{"id": "x86_64", "target": "x86", "subtarget": "64", "publish": true}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user