- Fix package postrm scripts to strictly require \ to be 'remove' or 'purge' before running cleanup, preventing destructive cleanup when opkg runs postrm with empty arguments during reinstalls/upgrades. - In action.uc install_files, ensure tachyon backend package is installed before luci-app-tachyon to prevent opkg dependency removal races. - In action.uc install_zapret2, ensure ::1 localhost exists in /etc/hosts before package installation to prevent nftables IPv6 resolution errors, and cleanly stop/disable standalone zapret2 daemon. - In zapret2 provider common.uc and nfqueue runtime.uc, automatically resolve required blob binary payloads and default filter parameters for strategies. - In fe-app-tachyon, add 'access denied' / 'Доступ запрещён' to transient RPC error patterns and track install_version as self-update so rpcd reload during self-update does not abort the progress modal with an error. - In tests/package_lifecycle.sh, avoid grep -q in pipefail pipelines to prevent upstream SIGPIPE failures.
56 lines
1.9 KiB
Makefile
56 lines
1.9 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=luci-app-tachyon
|
|
|
|
TACHYON_SOURCE_VERSION:=$(or $(TACHYON_PACKAGE_VERSION),$(TACHYON_VERSION))
|
|
TACHYON_HAS_RELEASE_VERSION:=$(if $(filter dev,$(TACHYON_SOURCE_VERSION)),,$(TACHYON_SOURCE_VERSION))
|
|
TACHYON_COMPILED_VERSION:=$(if $(TACHYON_HAS_RELEASE_VERSION),$(TACHYON_SOURCE_VERSION),$(or $(TACHYON_SOURCE_VERSION),dev))
|
|
TACHYON_RELEASE_VERSION_VALID:=$(if $(TACHYON_HAS_RELEASE_VERSION),$(shell printf '%s\n' '$(TACHYON_SOURCE_VERSION)' | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$$' && printf '1'),1)
|
|
|
|
ifeq ($(TACHYON_RELEASE_VERSION_VALID),)
|
|
$(error TACHYON_PACKAGE_VERSION and TACHYON_VERSION must use x.y.z format)
|
|
endif
|
|
|
|
PKG_VERSION:=$(or $(TACHYON_HAS_RELEASE_VERSION),0.0.0)
|
|
PKG_RELEASE:=
|
|
PKG_PO_VERSION:=$(PKG_VERSION)
|
|
|
|
LUCI_TITLE:=LuCI Tachyon app
|
|
LUCI_DEPENDS:=+luci-base +tachyon
|
|
LUCI_PROVIDES:=luci-app-forkop
|
|
LUCI_REPLACES:=luci-app-forkop
|
|
LUCI_PKGARCH:=all
|
|
LUCI_LANG.ru:=Русский (Russian)
|
|
LUCI_LANG.en:=English
|
|
LUCI_MAINTAINER:=Dushnilin <dushnilin@gmail.com>
|
|
LUCI_DESCRIPTION:=Rule-based Tachyon LuCI app with hybrid sing-box + zapret orchestration
|
|
LUCI_MINIFY_JS:=0
|
|
|
|
PKG_LICENSE:=GPL-2.0-or-later
|
|
LUCI_LANGUAGES:=en ru
|
|
|
|
define Build/Prepare/$(PKG_NAME)
|
|
sed -i -e 's/__COMPILED_VERSION_VARIABLE__/$(TACHYON_COMPILED_VERSION)/g' $(PKG_BUILD_DIR)/htdocs/luci-static/resources/view/tachyon/main.js || true
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/postrm
|
|
#!/bin/sh
|
|
|
|
[ -n "$${IPKG_INSTROOT}" ] && exit 0
|
|
[ "$$1" = "upgrade" ] && exit 0
|
|
[ "$$1" != "remove" ] && [ "$$1" != "purge" ] && [ -n "$$1" ] && exit 0
|
|
|
|
if [ -f /var/run/tachyon/component-actions/action.lock ] || [ -f /tmp/run/tachyon/component-actions/action.lock ]; then
|
|
exit 0
|
|
fi
|
|
|
|
rm -f /var/luci-indexcache* /tmp/luci-indexcache* /tmp/luci-modulecache/* 2>/dev/null || true
|
|
[ -x /etc/init.d/rpcd ] && /etc/init.d/rpcd reload >/dev/null 2>&1 || true
|
|
|
|
exit 0
|
|
endef
|
|
|
|
include $(TOPDIR)/feeds/luci/luci.mk
|
|
|
|
# call BuildPackage - OpenWrt buildroot signature
|