Repair the warning that the user and group do not exist during installation
This commit is contained in:
parent
4f236ff7a7
commit
5be48e580e
@ -6,12 +6,13 @@
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.0.24
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Update agent for NestOS
|
||||
License: ASL 2.0
|
||||
URL: https://crates.io/crates/%{crate}
|
||||
Source0: %{crate}-%{version}.crate
|
||||
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
||||
Source2: zincati-systemd-sysusers.conf
|
||||
Patch1: base-cincinnati-url-for-nestos.patch
|
||||
Patch2: modify-as-nestos-stream.patch
|
||||
|
||||
@ -51,15 +52,10 @@ License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib
|
||||
%{_tmpfilesdir}/zincati.conf
|
||||
%{_datadir}/polkit-1/rules.d/zincati.rules
|
||||
%{_datadir}/polkit-1/actions/org.coreos.zincati.*
|
||||
%{_sysusersdir}/zincati.conf
|
||||
|
||||
%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
|
||||
%pre -n %{crate}
|
||||
%sysusers_create_package %{crate} %{SOURCE2}
|
||||
|
||||
%post -n %{crate}
|
||||
%systemd_post zincati.service
|
||||
@ -123,12 +119,17 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/actions \
|
||||
dist/polkit-1/actions/org.coreos.zincati.*
|
||||
ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock
|
||||
|
||||
install -Dpm644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/zincati.conf
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Sep 15 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-4
|
||||
- Repair the warning that the user and group do not exist during installation
|
||||
|
||||
* Thu Sep 01 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-3
|
||||
- modify fedora-coreos.stream to nestos.stream
|
||||
|
||||
|
||||
1
zincati-systemd-sysusers.conf
Normal file
1
zincati-systemd-sysusers.conf
Normal file
@ -0,0 +1 @@
|
||||
u zincati - "Zincati user for auto-updates" /run/zincati
|
||||
Loading…
x
Reference in New Issue
Block a user