Accepting request 455364 from home:eeich:branches:network:cluster
- Use %slurm_u and %slurm_g macros defined at the beginning of the spec file when adding the slurm user/group for consistency. - Define these macros to daemon,root for non-systemd. - For anything newer than Leap 42.1 or SLE-12-SP1 build OpenHPC compatible. OBS-URL: https://build.opensuse.org/request/show/455364 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=14
This commit is contained in:
parent
bd06e0c765
commit
a47a9ab6d8
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 7 16:47:17 UTC 2017 - eich@suse.com
|
||||||
|
|
||||||
|
- Use %slurm_u and %slurm_g macros defined at the beginning of the spec
|
||||||
|
file when adding the slurm user/group for consistency.
|
||||||
|
- Define these macros to daemon,root for non-systemd.
|
||||||
|
- For anything newer than Leap 42.1 or SLE-12-SP1 build OpenHPC compatible.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 1 20:17:47 UTC 2017 - eich@suse.com
|
Wed Feb 1 20:17:47 UTC 2017 - eich@suse.com
|
||||||
|
|
||||||
|
28
slurm.spec
28
slurm.spec
@ -15,10 +15,10 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
%define trans() ( echo %{1} | sed -e "s#-#\\.#g" )
|
# For anything newer than Leap 42.1 and SLE-12-SP1 build compatible to OpenHPC.
|
||||||
%define trunc() ( echo %{1} | sed -e "s#\\([^.]\\+\\.[^.]\\+\\.[^.]\\+\\).*#\\1#" )
|
%if 0%{?sle_version} >= 120200
|
||||||
%define vers_f() %(%trans)
|
%define OHPC_BUILD 1
|
||||||
%define vers_t() %(%trunc)
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1220 || 0%{?sle_version} >= 120000
|
%if 0%{?suse_version} >= 1220 || 0%{?sle_version} >= 120000
|
||||||
%define with_systemd 1
|
%define with_systemd 1
|
||||||
@ -41,8 +41,18 @@
|
|||||||
%define libslurm libslurm29
|
%define libslurm libslurm29
|
||||||
%define ver_exp 16-05-8-1
|
%define ver_exp 16-05-8-1
|
||||||
|
|
||||||
%define slurm_u %name
|
%if 0%{?with_systemd}
|
||||||
%define slurm_g %name
|
%define slurm_u %name
|
||||||
|
%define slurm_g %name
|
||||||
|
%else
|
||||||
|
%define slurm_u daemon
|
||||||
|
%define slurm_g root
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%define trans() ( echo %{1} | sed -e "s#-#\\.#g" )
|
||||||
|
%define trunc() ( echo %{1} | sed -e "s#\\([^.]\\+\\.[^.]\\+\\.[^.]\\+\\).*#\\1#" )
|
||||||
|
%define vers_f() %(%trans)
|
||||||
|
%define vers_t() %(%trunc)
|
||||||
|
|
||||||
Name: slurm
|
Name: slurm
|
||||||
Version: %{vers_f %ver_exp}
|
Version: %{vers_f %ver_exp}
|
||||||
@ -414,8 +424,8 @@ EOF
|
|||||||
%endif
|
%endif
|
||||||
%define slurmdir %{_sysconfdir}/slurm
|
%define slurmdir %{_sysconfdir}/slurm
|
||||||
%define slurmdescr "SLURM workload manager"
|
%define slurmdescr "SLURM workload manager"
|
||||||
getent group %name >/dev/null || groupadd -r %name
|
getent group %slurm_g >/dev/null || groupadd -r %slurm_g
|
||||||
getent passwd %name >/dev/null || useradd -r -g %name -d %slurmdir -s /bin/false -c %{slurmdescr} %name
|
getent passwd %slurm_u >/dev/null || useradd -r -g %slurm_g -d %slurmdir -s /bin/false -c %{slurmdescr} %slurm_u
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
@ -499,7 +509,7 @@ exit 0
|
|||||||
%{_bindir}/sshare
|
%{_bindir}/sshare
|
||||||
%{_bindir}/sstat
|
%{_bindir}/sstat
|
||||||
%{_bindir}/strigger
|
%{_bindir}/strigger
|
||||||
%{?have_netloc: %{_bindir}/netloc_to_topology}
|
%{?have_netloc:%{_bindir}/netloc_to_topology}
|
||||||
%{_sbindir}/slurmctld
|
%{_sbindir}/slurmctld
|
||||||
%{_sbindir}/slurmd
|
%{_sbindir}/slurmd
|
||||||
%{_sbindir}/slurmstepd
|
%{_sbindir}/slurmstepd
|
||||||
|
Loading…
Reference in New Issue
Block a user