diff --git a/rust-zincati.spec b/rust-zincati.spec index 1567bf471d75af2d46e580218ffb9f334f0d5c7e..2df20a94760b1bba6b14e63cbc2368719e274cb7 100644 --- a/rust-zincati.spec +++ b/rust-zincati.spec @@ -2,10 +2,11 @@ %global __cargo_skip_build 0 %define debug_package %{nil} %global crate zincati +%global zcuid 986 Name: rust-%{crate} Version: 0.0.24 -Release: 1 +Release: 2 Summary: Update agent for NestOS License: ASL 2.0 URL: https://crates.io/crates/%{crate} @@ -50,6 +51,15 @@ License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib %{_datadir}/polkit-1/rules.d/zincati.rules %{_datadir}/polkit-1/actions/org.coreos.zincati.* +%pre +if ! getent group zincati >/dev/null; then + groupadd -g %{zcuid} -r zincati +fi +if ! getent passwd zincati >/dev/null; then + useradd -r -g zincati -d /run/%{crate} zincati \ + -s /sbin/nologin -c "Zincati user for auto-updates" +fi + %post -n %{crate} %systemd_post zincati.service @@ -118,6 +128,9 @@ ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/ %endif %changelog +* Thu Sep 01 2022 fushanqing - 0.0.24-2 +- add %pre script + * Wed Jun 08 2022 fushanqing - 0.0.24-1 - update to 0.0.24