Compare commits

...

3 Commits

Author SHA1 Message Date
Link Dupont
f461fd6c7c Add tmt and basic smoke test
[skip changelog]
2024-10-16 12:38:06 -04:00
Link Dupont
6b51c02ccf Add yggdrasil user to rhsm group (RHEL-61735)
Resolves: RHEL-61735
2024-10-08 09:30:17 -04:00
Link Dupont
a647bde76c Use sysusers_create_compat to create users in pre
Resolves: RHEL-59966
2024-09-24 09:56:10 -04:00
5 changed files with 20 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
plans/main.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

3
tests/smoke/main.fmf Normal file
View File

@ -0,0 +1,3 @@
summary: Run yggd --help
test: /usr/bin/yggd --help
duration: 5m

View File

@ -23,12 +23,14 @@ License: GPL-3.0-only
URL: %{gourl}
Source: %{url}/releases/download/%{tag}/yggdrasil-%{version}.tar.xz
Source1: config.toml
Source2: yggdrasil.sysuser
BuildRequires: systemd-rpm-macros
BuildRequires: meson
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(bash-completion)
%{?sysusers_requires_compat}
%description %{common_description}
@ -62,12 +64,16 @@ export %gomodulesmode
%install
%meson_install
%__install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/config.toml
%__install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf
%if %{with check}
%check
%gocheck
%endif
%pre
%sysusers_create_compat %{SOURCE2}
%post
%systemd_post %{name}.service
%systemd_user_post %{name}.service

5
yggdrasil.sysuser Normal file
View File

@ -0,0 +1,5 @@
#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
m yggdrasil rhsm