diff --git a/slurm.changes b/slurm.changes index c74ac05..6216419 100644 --- a/slurm.changes +++ b/slurm.changes @@ -4,6 +4,7 @@ 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 diff --git a/slurm.spec b/slurm.spec index a8a47ae..574f137 100644 --- a/slurm.spec +++ b/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 @@ -345,6 +345,10 @@ do 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 @@ -392,6 +396,8 @@ 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 <