From d4bd1c068245b9a898223e81572e1953912eeafc Mon Sep 17 00:00:00 2001 From: zhangtaibo <55699410+zhangtaibo@users.noreply.github.com> Date: Sat, 4 Jul 2026 04:21:31 +0800 Subject: [PATCH] fix(agent-sec-core): explicitly enable systemd user unit after install %systemd_user_post calls systemctl preset, which checks the preset policy. Since no preset rule matches agent-sec-core.service, the default action is disable, leaving the unit disabled after package installation. Add explicit 'systemctl --user enable agent-sec-core.service' after %systemd_user_post to ensure the security daemon is enabled on install. Fixes #1320 --- src/agent-sec-core/agent-sec-core.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/agent-sec-core/agent-sec-core.spec.in b/src/agent-sec-core/agent-sec-core.spec.in index 192e7a0c2..a3958a68e 100644 --- a/src/agent-sec-core/agent-sec-core.spec.in +++ b/src/agent-sec-core/agent-sec-core.spec.in @@ -97,6 +97,7 @@ Built with maturin as a Rust native Python extension. %post -n agent-sec-cli %systemd_user_post agent-sec-core.service +systemctl --user enable agent-sec-core.service 2>/dev/null || true %preun -n agent-sec-cli %systemd_user_preun agent-sec-core.service