fix: prevent package removal during web update and fix zapret2 installation

- 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.
This commit is contained in:
Dushnilin
2026-09-09 07:37:55 +03:00
parent f92c931a72
commit 8a56361bfd
13 changed files with 128 additions and 16 deletions
@@ -3462,7 +3462,12 @@ var TRANSIENT_RPC_ERROR_PATTERNS = [
"bad gateway",
"service unavailable",
"ubus error",
"ipc error"
"ipc error",
"access denied",
"\u0434\u043E\u0441\u0442\u0443\u043F \u0437\u0430\u043F\u0440\u0435\u0449\u0451\u043D",
"\u0434\u043E\u0441\u0442\u0443\u043F \u0437\u0430\u043F\u0440\u0435\u0449\u0435\u043D",
"permission denied",
"unauthorized"
];
function isTransientRpcError(message) {
if (!message) {
@@ -4053,7 +4058,7 @@ var TachyonShellMethods = {
},
waitComponentActionJob: async (jobId, component, action, expectedLatestVersion) => {
const jobStartedAt = Date.now();
const isSelfUpdate = component === "tachyon" && (action === "install" || action === "reinstall");
const isSelfUpdate = component === "tachyon" && (action === "install" || action === "reinstall" || action === "install_version");
const targetVersion = expectedLatestVersion || "";
let baselineVersion = "";
if (isSelfUpdate) {