!11 Repair the warning that the user and group do not exist during installation
From: @fu-shanqing Reviewed-by: @duyiwei7w Signed-off-by: @duyiwei7w
This commit is contained in:
commit
c445b9fb49
@ -6,12 +6,13 @@
|
|||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-%{crate}
|
||||||
Version: 0.0.24
|
Version: 0.0.24
|
||||||
Release: 3
|
Release: 4
|
||||||
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}
|
||||||
Source0: %{crate}-%{version}.crate
|
Source0: %{crate}-%{version}.crate
|
||||||
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
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
|
Patch1: base-cincinnati-url-for-nestos.patch
|
||||||
Patch2: modify-as-nestos-stream.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
|
%{_tmpfilesdir}/zincati.conf
|
||||||
%{_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.*
|
||||||
|
%{_sysusersdir}/zincati.conf
|
||||||
|
|
||||||
%pre
|
%pre -n %{crate}
|
||||||
if ! getent group zincati >/dev/null; then
|
%sysusers_create_package %{crate} %{SOURCE2}
|
||||||
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
|
||||||
@ -123,12 +119,17 @@ install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/actions \
|
|||||||
dist/polkit-1/actions/org.coreos.zincati.*
|
dist/polkit-1/actions/org.coreos.zincati.*
|
||||||
ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock
|
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}
|
%if %{with check}
|
||||||
%check
|
%check
|
||||||
%cargo_test
|
%cargo_test
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Sep 01 2022 fushanqing <fushanqing@kylinos.cn> - 0.0.24-3
|
||||||
- modify fedora-coreos.stream to nestos.stream
|
- 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