add %pre script
This commit is contained in:
parent
2f1ff3ba53
commit
551dee3677
@ -2,10 +2,11 @@
|
|||||||
%global __cargo_skip_build 0
|
%global __cargo_skip_build 0
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%global crate zincati
|
%global crate zincati
|
||||||
|
%global zcuid 986
|
||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-%{crate}
|
||||||
Version: 0.0.24
|
Version: 0.0.24
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Update agent for NestOS
|
Summary: Update agent for NestOS
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://crates.io/crates/%{crate}
|
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/rules.d/zincati.rules
|
||||||
%{_datadir}/polkit-1/actions/org.coreos.zincati.*
|
%{_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}
|
%post -n %{crate}
|
||||||
%systemd_post zincati.service
|
%systemd_post zincati.service
|
||||||
|
|
||||||
@ -118,6 +128,9 @@ ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 01 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-2
|
||||||
|
- add %pre script
|
||||||
|
|
||||||
* Wed Jun 08 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-1
|
* Wed Jun 08 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-1
|
||||||
- update to 0.0.24
|
- update to 0.0.24
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user