Use sysusers_create_compat to create users in pre
Resolves: RHEL-59966
This commit is contained in:
parent
ee58a69916
commit
a647bde76c
@ -23,12 +23,14 @@ License: GPL-3.0-only
|
|||||||
URL: %{gourl}
|
URL: %{gourl}
|
||||||
Source: %{url}/releases/download/%{tag}/yggdrasil-%{version}.tar.xz
|
Source: %{url}/releases/download/%{tag}/yggdrasil-%{version}.tar.xz
|
||||||
Source1: config.toml
|
Source1: config.toml
|
||||||
|
Source2: yggdrasil.sysuser
|
||||||
|
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: pkgconfig(dbus-1)
|
BuildRequires: pkgconfig(dbus-1)
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
BuildRequires: pkgconfig(bash-completion)
|
BuildRequires: pkgconfig(bash-completion)
|
||||||
|
%{?sysusers_requires_compat}
|
||||||
|
|
||||||
%description %{common_description}
|
%description %{common_description}
|
||||||
|
|
||||||
@ -62,12 +64,16 @@ export %gomodulesmode
|
|||||||
%install
|
%install
|
||||||
%meson_install
|
%meson_install
|
||||||
%__install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/config.toml
|
%__install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/config.toml
|
||||||
|
%__install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf
|
||||||
|
|
||||||
%if %{with check}
|
%if %{with check}
|
||||||
%check
|
%check
|
||||||
%gocheck
|
%gocheck
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%sysusers_create_compat %{SOURCE2}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post %{name}.service
|
%systemd_post %{name}.service
|
||||||
%systemd_user_post %{name}.service
|
%systemd_user_post %{name}.service
|
||||||
|
4
yggdrasil.sysuser
Normal file
4
yggdrasil.sysuser
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#Type Name ID GECOS Home directory Shell
|
||||||
|
u yggdrasil - "yggdrasil system user" /var/lib/yggdrasil -
|
||||||
|
u yggdrasil-worker - "yggdrasil worker user" - -
|
||||||
|
m yggdrasil yggdrasil-worker
|
Loading…
Reference in New Issue
Block a user