# # spec file for package slurm # # Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define trans() ( echo %{1} | sed -e "s#-#\\.#g" ) %define trunc() ( echo %{1} | sed -e "s#\\([^.]\\+\\.[^.]\\+\\.[^.]\\+\\).*#\\1#" ) %define vers_f() %(%trans) %define vers_t() %(%trunc) %if 0%{?suse_version} >= 1220 || 0%{?sle_version} >= 120000 %define with_systemd 1 %endif %if 0%{suse_version} >= 1310 %define have_netloc 1 %endif %define libslurm libslurm29 %define ver_exp 16-05-5-1 Name: slurm Version: %{vers_f %ver_exp} Release: 0 Summary: Simple Linux Utility for Resource Management License: SUSE-GPL-2.0-with-openssl-exception Group: Productivity/Clustering/Computing Url: https://computing.llnl.gov/linux/slurm/ Source: https://github.com/SchedMD/slurm/archive/%{name}-%{ver_exp}.tar.gz Source1: slurm.service Source2: slurmdbd.service Patch0: slurm-2.4.4-rpath.patch Patch1: slurm-2.4.4-init.patch Patch2: slurmd-Fix-slurmd-for-new-API-in-hwloc-2.0.patch Patch3: plugins-cgroup-Fix-slurmd-for-new-API-in-hwloc-2.0.patch Requires: slurm-plugins = %{version} BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: gtk2-devel BuildRequires: libbitmask-devel BuildRequires: libcpuset-devel BuildRequires: libhwloc-devel %ifarch x86_64 BuildRequires: libnuma-devel %endif BuildRequires: mysql-devel >= 5.0.0 BuildRequires: ncurses-devel BuildRequires: openssl-devel >= 0.9.6 BuildRequires: pkgconfig BuildRequires: postgresql-devel >= 8.0.0 BuildRequires: python BuildRequires: readline-devel %if 0%{?with_systemd} %{?systemd_requires} BuildRequires: systemd %else PreReq: %insserv_prereq %fillup_prereq %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description SLURM is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for Linux clusters containing up to 65,536 nodes. Components include machine status, partition management, job management, scheduling and accounting modules. %package doc Summary: Documentation for SLURM Group: Documentation/Clustering/Computing %description doc Documentation (html) for the SLURM cluster managment software %package -n perl-slurm Summary: Perl API to SLURM Group: Development/Languages/Perl Requires: slurm = %{version} %if 0%{?suse_version} < 1140 Requires: perl = %{perl_version} %else %{perl_requires} %endif %description -n perl-slurm Perl API package for SLURM. This package includes the perl API to provide a helpful interface to SLURM through Perl. %package -n %{libslurm} Summary: Libraries for slurm Group: System/Libraries %description -n %{libslurm} This package contains the library needed to run programs dynamically linked with slurm. %package devel Summary: Development package for SLURM Group: Development/Libraries/C and C++ Requires: %{libslurm} = %{version} Requires: slurm = %{version} %description devel Development package for SLURM. This package includes the header files and libraries for the SLURM API. %package auth-none Summary: SLURM auth NULL implementation (no authentication) Group: Productivity/Clustering/Computing Requires: slurm = %{version} %description auth-none This package cobtains the SLURM NULL authentication module. %package munge Summary: SLURM authentication and crypto implementation using Munge Group: Productivity/Clustering/Computing Requires: slurm = %{version} Requires: munge BuildRequires: munge-devel Obsoletes: slurm-auth-munge < %{version} Provides: slurm-auth-munge = %{version} %description munge This package contains the SLURM authentication module for Chris Dunlap''s Munge. %package sview Summary: SLURM graphical interface Group: Productivity/Clustering/Computing %description sview sview is a graphical user interface to get and update state information for jobs, partitions, and nodes managed by SLURM. %package sched-wiki Summary: SLURM plugin for the Maui or Moab scheduler wiki interface Group: Productivity/Clustering/Computing Requires: slurm = %{version} %description sched-wiki This package contains the SLURM plugin for the Maui or Moab scheduler wiki interface. %package slurmdbd Summary: SLURM database daemon Group: Productivity/Clustering/Computing Requires: slurm-plugins = %{version} %if 0%{?with_systemd} %{?systemd_requires} %else PreReq: %insserv_prereq %fillup_prereq %endif %description slurmdbd The SLURM database daemon provides accounting of jobs in a database. %package plugins Summary: SLURM plugins (loadable shared objects) Group: Productivity/Clustering/Computing %description plugins This package contains the SLURM plugins (loadable shared objects) %package torque Summary: Torque/PBS wrappers for transitition from Torque/PBS to SLURM Group: Productivity/Clustering/Computing Requires: perl-slurm = %{version} Provides: torque-client %description torque Torque wrapper scripts used for helping migrate from Torque/PBS to SLURM. %package openlava Summary: Openlava/LSF wrappers for transitition from OpenLava/LSF to Slurm Group: Development/System Requires: slurm-perlapi %package seff Summary: Mail tool that includes job statistics in user notification email Group: Development/System Requires: slurm-perlapi %description seff Mail program used directly by the Slurm daemons. On completion of a job, wait for it''s accounting information to be available and include that information in the email body. %description openlava OpenLava wrapper scripts used for helping migrate from OpenLava/LSF to Slurm %package slurmdb-direct Summary: Wrappers to write directly to the slurmdb Group: Productivity/Clustering/Computing Requires: perl-slurm = %{version} %if 0%{?suse_version} < 1140 Requires: perl = %{perl_version} %else %{perl_requires} %endif %description slurmdb-direct This package contains the wrappers to write directly to the slurmdb. %package sjstat Summary: Perl tool to print SLURM job state information Group: Productivity/Clustering/Computing Requires: slurm = %{version} %if 0%{?suse_version} < 1140 Requires: perl = %{perl_version} %else %{perl_requires} %endif %description sjstat This package contains the perl tool to print SLURM job state information. %package pam_slurm Summary: PAM module for restricting access to compute nodes via SLURM Group: Productivity/Clustering/Computing Requires: slurm = %{version} BuildRequires: pam-devel %description pam_slurm This module restricts access to compute nodes in a cluster where the Simple Linux Utility for Resource Managment (SLURM) is in use. Access is granted to root, any user with an SLURM-launched job currently running on the node, or any user who has allocated resources on the node according to the SLURM %prep %setup -q -n %{name}-%{name}-%{ver_exp} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 chmod 0644 doc/html/*.{gif,jpg} %build %configure --enable-shared \ --disable-static \ --without-rpath \ --sysconfdir=%{_sysconfdir}/%{name} make %{?_smp_mflags} %install %makeinstall make install-contrib DESTDIR=$RPM_BUILD_ROOT PERL_MM_PARAMS="INSTALLDIRS=vendor" rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/slurm.conf.template rm -f $RPM_BUILD_ROOT/%{_sbindir}/slurmconfgen.py %if 0%{?with_systemd} mkdir -p %{buildroot}%{_unitdir} install -p -m644 etc/slurmd.service etc/slurmdbd.service etc/slurmctld.service %{buildroot}%{_unitdir} ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmd ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmdbd ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcslurmctld %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%{?OHPC_BUILD:.example} install -D -m644 etc/slurmdbd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/slurmdbd.conf install -D -m644 etc/cgroup.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cgroup.conf install -D -m644 etc/cgroup_allowed_devices_file.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cgroup_allowed_devices_file.conf install -D -m755 etc/cgroup.release_common.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cgroup/release_common.example install -D -m755 etc/cgroup.release_common.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cgroup/release_freezer install -D -m755 etc/cgroup.release_common.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cgroup/release_cpuset install -D -m755 etc/cgroup.release_common.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cgroup/release_memory install -D -m644 etc/slurmdbd.conf.example ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/slurmdbd.conf.example install -D -m755 etc/slurm.epilog.clean ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/slurm.epilog.clean install -D -m755 contribs/sgather/sgather ${RPM_BUILD_ROOT}%{_bindir}/sgather install -D -m755 contribs/sjstat ${RPM_BUILD_ROOT}%{_bindir}/sjstat %if 0%{?OHPC_BUILD} # 6/16/15 karl.w.schulz@intel.com - do not package Slurm's version of libpmi with OpenHPC. rm -f $RPM_BUILD_ROOT/%{_libdir}/libpmi* rm -f $RPM_BUILD_ROOT/%{_libdir}/mpi_pmi2* # 9/8/14 karl.w.schulz@intel.com - provide starting config file head -n -2 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf.example | grep -v ReturnToService > $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf echo "# OpenHPC default configuration" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf echo "PropagateResourceLimitsExcept=MEMLOCK" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf echo "SlurmdLogFile=/var/log/slurm.log" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf echo "SlurmctldLogFile=/var/log/slurmctld.log" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf echo "Epilog=/etc/slurm/slurm.epilog.clean" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf echo "NodeName=c[1-4] Sockets=2 CoresPerSocket=8 ThreadsPerCore=2 State=UNKNOWN" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf echo "PartitionName=normal Nodes=c[1-4] Default=YES MaxTime=24:00:00 State=UP" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf # 6/3/16 nirmalasrjn@gmail.com - Adding ReturnToService Directive to starting config file (note removal of variable during above creation) echo "ReturnToService=1" >> $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.conf # 9/17/14 karl.w.schulz@intel.com - Add option to drop VM cache during epilog sed -i '/^# No other SLURM jobs,/i \\n# Drop clean caches (OpenHPC)\necho 3 > /proc/sys/vm/drop_caches\n\n#' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/slurm.epilog.clean %endif # Delete unpackaged files: rm -rf $RPM_BUILD_ROOT/%{_libdir}/slurm/*.{a,la} \ $RPM_BUILD_ROOT/%{_libdir}/*.la \ $RPM_BUILD_ROOT/%_lib/security/*.la \ $RPM_BUILD_ROOT/%{_mandir}/man5/bluegene* rm -f $RPM_BUILD_ROOT%{_mandir}/man1/srun_cr* \ $RPM_BUILD_ROOT%{_bindir}/srun_cr \ $RPM_BUILD_ROOT%{_libexecdir}/slurm/cr_* # Delete unpackaged files: test -s $RPM_BUILD_ROOT/%{_perldir}/auto/Slurm/Slurm.bs || rm -f $RPM_BUILD_ROOT/%{_perldir}/auto/Slurm/Slurm.bs test -s $RPM_BUILD_ROOT/%{_perldir}/auto/Slurmdb/Slurmdb.bs || rm -f $RPM_BUILD_ROOT/%{_perldir}/auto/Slurmdb/Slurmdb.bs rm doc/html/shtml2html.py doc/html/Makefile* %{__rm} -f %{buildroot}/%{perl_archlib}/perllocal.pod %{__rm} -f %{buildroot}/%{perl_vendorarch}/auto/Slurm/.packlist %{__rm} -f %{buildroot}/%{perl_vendorarch}/auto/Slurmdb/.packlist %{__mv} %{buildroot}/%{perl_sitearch}/config.slurmdb.pl %{buildroot}/%{perl_vendorarch} # Build man pages that are generated directly by the tools rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/sjobexitmod.1 ${RPM_BUILD_ROOT}%{_bindir}/sjobexitmod --roff > $RPM_BUILD_ROOT/%{_mandir}/man1/sjobexitmod.1 rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/sjstat.1 ${RPM_BUILD_ROOT}%{_bindir}/sjstat --roff > $RPM_BUILD_ROOT/%{_mandir}/man1/sjstat.1 # rpmlint reports wrong end of line for those files sed -i 's/\r$//' $RPM_BUILD_ROOT%{_bindir}/qrerun sed -i 's/\r$//' $RPM_BUILD_ROOT%{_bindir}/qalter mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d echo '%{_libdir} %{_libdir}/slurm' > $RPM_BUILD_ROOT/etc/ld.so.conf.d/slurm.conf chmod 644 $RPM_BUILD_ROOT/etc/ld.so.conf.d/slurm.conf # Make pkg-config file mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig cat > $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/slurm.pc <