Accepting request 922783 from home:eeich:branches:network:cluster

- Utilize sysuser infrastructure to set group spack.

OBS-URL: https://build.opensuse.org/request/show/922783
OBS-URL: https://build.opensuse.org/package/show/network:cluster/spack?expand=0&rev=31
This commit is contained in:
Christian Goll 2021-10-04 13:55:13 +00:00 committed by Git OBS Bridge
parent d1ce93b4a8
commit 364e14ab49
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Oct 1 05:55:10 UTC 2021 - Egbert Eich <eich@suse.com>
- Utilize sysuser infrastructure to set group spack.
-------------------------------------------------------------------
Wed Sep 29 20:32:58 UTC 2021 - Antoine Ginies <aginies@suse.com>

View File

@ -63,6 +63,7 @@ BuildRequires: polkit
BuildRequires: python-base
BuildRequires: python3-urllib3
BuildRequires: sudo
BuildRequires: sysuser-tools
Requires: %{name}-recipes = %{version}
Requires: bzip2
Requires: curl
@ -352,6 +353,11 @@ ln -sf %{_localstatedir}/cache/spack %{buildroot}%{_localstatedir}/lib/spack/cac
# Remove problematic binaries which are removed upstream with
# 0889be20e0d9dcdf4346cdeaa0647285187375f3
rm -r %{buildroot}%{_localstatedir}/lib/spack/repos/builtin/packages/patchelf/test/
echo "g %{name} -" > system-user-%{name}.conf
%sysusers_generate_pre system-user-%{name}.conf %{name} system-user-%{name}.conf
install -D -m 644 system-user-%{name}.conf %{buildroot}%{_sysusersdir}/system-user-%{name}.conf
%fdupes %{buildroot}%{spack_dir}
%fdupes %{buildroot}%{_datarootdir}/spack
%fdupes %{buildroot}%{_localstatedir}/lib/spack
@ -364,8 +370,7 @@ cp -r texinfo/Spack.info.gz %{buildroot}%{_infodir}
[ -d texinfo/Spack-figures ] && cp -r texinfo/Spack-figures %{buildroot}%{_infodir}
%endif
%pre
getent group %spack_group >/dev/null || groupadd -r %spack_group
%pre -f %{name}.pre
%post
# Replace /etc/spack/compilers.yaml
@ -419,6 +424,7 @@ sed -i "s@HOSTTYPE@$HOSTTYPE@" %{spack_dir}/etc/spack/compilers.yaml
%dir %{_sysconfdir}/skel/.spack
%config %{_sysconfdir}/skel/.spack/config.yaml
# repos directory is installed in -recipes
%{_sysusersdir}/system-user-%{name}.conf
%exclude %{_localstatedir}/lib/spack/repos
%files recipes