From b6e5985a0571e9245f22ceb7e3cc42ac78ae6b7f Mon Sep 17 00:00:00 2001 From: Lukas Brabec Date: Wed, 23 Apr 2025 10:04:26 +0200 Subject: [PATCH] utilize sysusers to create testcloud group --- testcloud.spec | 6 ++++++ testcloud.sysusers | 1 + 2 files changed, 7 insertions(+) create mode 100644 testcloud.sysusers diff --git a/testcloud.spec b/testcloud.spec index ccccfa1..da98692 100644 --- a/testcloud.spec +++ b/testcloud.spec @@ -7,6 +7,7 @@ Summary: Tool for running cloud images locally License: GPL-2.0-or-later URL: https://pagure.io/testcloud Source0: https://releases.pagure.org/testcloud/%{name}-%{version}.tar.gz +Source1: testcloud.sysusers ExclusiveArch: %{kernel_arches} noarch BuildArch: noarch @@ -81,6 +82,9 @@ install -d %{buildroot}/%{_sharedstatedir}/testcloud/instances mkdir -p %{buildroot}%{_sysconfdir}/polkit-1/rules.d install conf/99-testcloud-nonroot-libvirt-access.rules %{buildroot}%{_sysconfdir}/polkit-1/rules.d/99-testcloud-nonroot-libvirt-access.rules +# sysusers conf file for creation of testcloud group +install -p -m644 -D %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf + %check %pytest # Remove compiled .py files from /etc after os_install_post @@ -104,6 +108,8 @@ rm -rf %{buildroot}%{_sysconfdir}/testcloud/__pycache__ %{_bindir}/t7d %{_datadir}/bash-completion/completions/testcloud +%{_sysusersdir}/%{name}.conf + %files -n python3-%{name} %{python3_sitelib}/testcloud %{python3_sitelib}/*.egg-info diff --git a/testcloud.sysusers b/testcloud.sysusers new file mode 100644 index 0000000..6d2797f --- /dev/null +++ b/testcloud.sysusers @@ -0,0 +1 @@ +g testcloud -