From ee0741e9ccc0de66c69683ff3e3f7ae97549ce698b04206c501ad0180ed032f4 Mon Sep 17 00:00:00 2001 From: Corot Sebastien Date: Sun, 2 Nov 2014 20:27:29 +0000 Subject: [PATCH] Accepting request 259383 from home:scorot:branches:network:cluster - version 14.03.9 * Many bug fixes. See NEWS file - add systemd support OBS-URL: https://build.opensuse.org/request/show/259383 OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=6 --- slurm-14.03.6.tar.bz2 | 3 --- slurm-14.03.9.tar.bz2 | 3 +++ slurm.changes | 7 +++++ slurm.service | 11 ++++++++ slurm.spec | 59 ++++++++++++++++++++++++++++++++++++++++++- slurmdbd.service | 11 ++++++++ 6 files changed, 90 insertions(+), 4 deletions(-) delete mode 100644 slurm-14.03.6.tar.bz2 create mode 100644 slurm-14.03.9.tar.bz2 create mode 100644 slurm.service create mode 100644 slurmdbd.service diff --git a/slurm-14.03.6.tar.bz2 b/slurm-14.03.6.tar.bz2 deleted file mode 100644 index 12941f3..0000000 --- a/slurm-14.03.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85db4953c9ed1de35a298cb3d4cb11950905e4f7dc6c4d0c7113ebd09333aa9d -size 6138371 diff --git a/slurm-14.03.9.tar.bz2 b/slurm-14.03.9.tar.bz2 new file mode 100644 index 0000000..754121e --- /dev/null +++ b/slurm-14.03.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a0b90eb8dcc219a0c5fa7cec227b2df538cc49472e16b7131cad6987301d07d +size 6155648 diff --git a/slurm.changes b/slurm.changes index a6dc98f..38c3dec 100644 --- a/slurm.changes +++ b/slurm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Nov 2 15:04:42 UTC 2014 - scorot@free.fr + +- version 14.03.9 + * Many bug fixes. See NEWS file +- add systemd support + ------------------------------------------------------------------- Sat Jul 26 10:22:32 UTC 2014 - scorot@free.fr diff --git a/slurm.service b/slurm.service new file mode 100644 index 0000000..6c0b6f5 --- /dev/null +++ b/slurm.service @@ -0,0 +1,11 @@ +[Unit] +Description=SLURM is a simple resource management system +After=network.target + +[Service] +Type=forking +EnvironmentFile=-/etc/sysconfig/slurm +ExecStart=/usr/sbin/slurmd + +[Install] +WantedBy=multi-user.target diff --git a/slurm.spec b/slurm.spec index 30e2c14..3332c70 100644 --- a/slurm.spec +++ b/slurm.spec @@ -15,17 +15,24 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%if 0%{?suse_version} >= 1220 +%define with_systemd 1 +%else +%define with_systemd 0 +%endif %define libslurm libslurm27 Name: slurm -Version: 14.03.6 +Version: 14.03.9 Release: 0 Summary: Simple Linux Utility for Resource Management License: GPL-3.0 Group: Productivity/Clustering/Computing Url: https://computing.llnl.gov/linux/slurm/ Source: slurm-%{version}.tar.bz2 +Source1: slurm.service +Source2: slurmdbd.service Patch0: slurm-2.4.4-rpath.patch Patch1: slurm-2.4.4-init.patch PreReq: %insserv_prereq %fillup_prereq @@ -46,6 +53,9 @@ BuildRequires: pkgconfig BuildRequires: postgresql-devel >= 8.0.0 BuildRequires: python BuildRequires: readline-devel +%if %{with_systemd} +BuildRequires: systemd +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -207,10 +217,15 @@ make %{?_smp_mflags} %makeinstall make install-contrib DESTDIR=$RPM_BUILD_ROOT +%if %{with_systemd} +mkdir -p %{buildroot}%{_unitdir} +install -p -m644 %{S:1} %{S:2} %{buildroot}%{_unitdir} +%else install -D -m755 etc/init.d.slurm $RPM_BUILD_ROOT%{_initrddir}/slurm install -D -m755 etc/init.d.slurmdbd $RPM_BUILD_ROOT%{_initrddir}/slurmdbd ln -sf %{_initrddir}/slurm %{buildroot}%{_sbindir}/rcslurm ln -sf %{_initrddir}/slurmdbd %{buildroot}%{_sbindir}/rcslurmdbd +%endif install -D -m644 etc/slurm.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/slurm.conf install -D -m644 etc/slurmdbd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/slurmdbd.conf @@ -239,25 +254,59 @@ rm doc/html/shtml2html.py doc/html/Makefile* %fdupes -s $RPM_BUILD_ROOT +%if %{with_systemd} +%pre +%service_add_pre slurm.service +%endif + %post +%if %{with_systemd} +%service_add_post slurm.service +%else %fillup_and_insserv slurm +%endif %preun +%if %{with_systemd} +%service_del_preun slurm.service +%else %stop_on_removal slurm +%endif %postun +%if %{with_systemd} +%service_del_postun slurm.service +%else %restart_on_update slurm %insserv_cleanup +%endif + +%if %{with_systemd} +%pre slurmdbd +%service_add_pre slurmdbd.service +%endif %post slurmdbd +%if %{with_systemd} +%service_add_post slurmdbd.service +%else %fillup_and_insserv slurmdbd +%endif %preun slurmdbd +%if %{with_systemd} +%service_del_preun slurmdbd.service +%else %stop_on_removal slurmdbd +%endif %postun slurmdbd +%if %{with_systemd} +%service_del_postun slurmdbd.service +%else %restart_on_update slurmdbd %insserv_cleanup +%endif %post -n %{libslurm} -p /sbin/ldconfig @@ -332,8 +381,12 @@ rm doc/html/shtml2html.py doc/html/Makefile* %config(noreplace) %{_sysconfdir}/%{name}/slurm.epilog.clean %dir %{_sysconfdir}/%{name}/cgroup %config(noreplace) %{_sysconfdir}/%{name}/cgroup/release_common +%if %{with_systemd} +%config %{_unitdir}/slurm.service +%else %{_initrddir}/slurm %{_sbindir}/rcslurm +%endif %files -n %{libslurm} %defattr(-,root,root) @@ -386,8 +439,12 @@ rm doc/html/shtml2html.py doc/html/Makefile* %{_mandir}/man5/slurmdbd.* %{_mandir}/man8/slurmdbd.* %config(noreplace) %{_sysconfdir}/%{name}/slurmdbd.conf +%if %{with_systemd} +%config %{_unitdir}/slurmdbd.service +%else %{_initrddir}/slurmdbd %{_sbindir}/rcslurmdbd +%endif %files plugins %defattr(-,root,root) diff --git a/slurmdbd.service b/slurmdbd.service new file mode 100644 index 0000000..09b1442 --- /dev/null +++ b/slurmdbd.service @@ -0,0 +1,11 @@ +[Unit] +Description=SLURMDBD is a database server interface for SLURM +After=network.target + +[Service] +Type=forking +EnvironmentFile=-/etc/sysconfig/slurm +ExecStart=/usr/sbin/slurmdbd + +[Install] +WantedBy=multi-user.target