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
@@ -13,6 +13,11 @@ const TRANSIENT_RPC_ERROR_PATTERNS = [
'service unavailable',
'ubus error',
'ipc error',
'access denied',
'доступ запрещён',
'доступ запрещен',
'permission denied',
'unauthorized',
];
export function isTransientRpcError(message?: string | null) {
@@ -774,7 +774,9 @@ export const TachyonShellMethods = {
const jobStartedAt = Date.now();
const isSelfUpdate =
component === 'tachyon' &&
(action === 'install' || action === 'reinstall');
(action === 'install' ||
action === 'reinstall' ||
action === 'install_version');
const targetVersion = expectedLatestVersion || '';
// Version before the update started: confirms an install even when the
// expected target version is unknown.