forked from pool/slurm
- Remove the last two commits, changes were invalid.
OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=43
This commit is contained in:
parent
903545a8b9
commit
d6c16c524d
@ -1,11 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 7 14:20:06 UTC 2018 - eich@suse.com
|
||||
|
||||
- Fix user/group settings (boo#1084333)
|
||||
* Fix user/group for /var/run/slurm the PID file directory.
|
||||
* Fix user/group in systemd service files for process ownership.
|
||||
* Create a separate logdir for slurm as well.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 29 13:43:57 UTC 2018 - cgoll@suse.com
|
||||
|
||||
|
22
slurm.spec
22
slurm.spec
@ -187,7 +187,7 @@ Obsoletes: slurm-auth-munge < %{version}
|
||||
Provides: slurm-auth-munge = %{version}
|
||||
|
||||
%description munge
|
||||
This package contains the SLURM authentication module for Chris Dunlap''s Munge.
|
||||
This package contains the SLURM authentication module for Chris Dunlap's Munge.
|
||||
|
||||
%package sview
|
||||
Summary: SLURM graphical interface
|
||||
@ -335,28 +335,13 @@ make install-contrib DESTDIR=%{buildroot} PERL_MM_PARAMS="INSTALLDIRS=vendor"
|
||||
%if 0%{?with_systemd}
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -p -m644 etc/slurmd.service etc/slurmdbd.service etc/slurmctld.service %{buildroot}%{_unitdir}
|
||||
# Fix up User/Group of slurmd/slurmctld service.
|
||||
for i in slurmd.service slurmctld.service;
|
||||
do
|
||||
grep -Eq "^Group=" %{buildroot}%{_unitdir}/$i && \
|
||||
sed-i -e "s/Group=.*/User=%slurm_g/" %{buildroot}%{_unitdir}/$i || \
|
||||
sed -i -e "/\[Service\]/aGroup=%slurm_g" %{buildroot}%{_unitdir}/$i
|
||||
grep -Eq "^User=" %{buildroot}%{_unitdir}/$i && \
|
||||
sed -i -e "s/User=.*/User=%slurm_u/" %{buildroot}%{_unitdir}/$i || \
|
||||
sed -i -e "/\[Service\]/aUser=%slurm_u" %{buildroot}%{_unitdir}/$i
|
||||
done
|
||||
%if "%slurm_u" != "root"
|
||||
%define slurmlogdir %{_localstatedir}/log/%{name}
|
||||
install -d -m 755 %{buildroot}%{slurmlogdir}
|
||||
%endif
|
||||
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmd
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmdbd
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmctld
|
||||
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}/
|
||||
cat <<-EOF > %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
||||
# Create a directory with permissions 0700 owned by user slurm, group slurm
|
||||
d /var/run/slurm 0700 %slurm_u %slurm_g
|
||||
d /var/run/slurm 0700 slurm slurm
|
||||
EOF
|
||||
chmod 0644 %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
||||
%else
|
||||
@ -396,8 +381,6 @@ sed -i 's#\(StateSaveLocation=\).*#\1%_localstatedir/lib/slurm#' %{buildroot}/%
|
||||
sed -i 's#^\(SlurmdPidFile=\).*$#\1%{_localstatedir}/run/slurm/slurmd.pid#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
|
||||
sed -i 's#^\(SlurmctldPidFile=\).*$#\1%{_localstatedir}/run/slurm/slurmctld.pid#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
|
||||
sed -i 's#^\(SlurmdSpoolDir=\)/.*#\1%{_localstatedir}/spool/slurm#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf
|
||||
%{?slurmlogdir:sed -i 's#^\(SlurmctldLogFile=\)/.*#\1%{slurmlogdir}#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf}
|
||||
%{?slurmlogdir:sed -i 's#^\(SlurmLogFile=\)/.*#\1%{slurmlogdir}#' %{buildroot}/%{_sysconfdir}/%{name}/slurm.conf}
|
||||
cat >>%{buildroot}/%{_sysconfdir}/%{name}/slurm.conf <<EOF
|
||||
# SUSE default configuration
|
||||
PropagateResourceLimitsExcept=MEMLOCK
|
||||
@ -863,7 +846,6 @@ exit 0
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/power_cpufreq.conf.example
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/layouts.d/unit.conf.example
|
||||
%{?OHPC_BUILD:%attr(0755, %slurm_u, %slurm_g) %_localstatedir/lib/slurm}
|
||||
%{?slurmlogdir:%dir %attr(-,%conman_u,%conman_g) %{slurmlogdir}}
|
||||
%{?with_systemd:%{_tmpfilesdir}/%{name}.conf}
|
||||
%dir %{_var}/spool/slurm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user