# ------------- # Base Packages # ------------- # slurm # slurm-devel # slurm-doc # slurm-gui # slurm-libs # slurm-plugins # slurm-plugins-auth_none # slurm-plugins-lua # slurm-plugins-munge # slurm-plugins-mysql # slurm-plugins-pbs # slurm-plugins-rrdtool # slurm-slurmdbd # ----------------- # Contribs Packages # ----------------- # slurm-contribs # slurm-openlava # slurm-perlapi # slurm-plugins-pam_slurm # slurm-torque Name: slurm Version: 17.02.7 Release: 1%{?dist} Summary: Simple Linux Utility for Resource Management License: GPLv2 and BSD URL: https://slurm.schedmd.com/ Source0: http://www.schedmd.com/download/latest/%{name}-%{version}.tar.bz2 Source1: slurm.conf Source2: slurmdbd.conf Source3: slurm-sview.desktop Source4: slurm-128x128.png Source5: slurm_setuser.in # upstream bugs #4094, #4095, #4101, #4113 Patch0: slurm_salloc_privileges.patch Patch1: slurm_format_truncation.patch # build-related patches Patch2: slurm_perlapi_rpaths.patch Patch3: slurm_html_doc_path.patch Patch4: slurm_doc_fix.patch # Fedora-related patches Patch5: slurm_service_files.patch BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: hdf5-devel BuildRequires: pkgconfig(hwloc) BuildRequires: pkgconfig(libfreeipmi) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(lua) BuildRequires: pkgconfig(mariadb) BuildRequires: pkgconfig(munge) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(openssl) BuildRequires: pam-devel BuildRequires: pmix-devel BuildRequires: readline-devel BuildRequires: pkgconfig(librrd) BuildRequires: pkgconfig(zlib) # follow arch exclusions for these devel packages %ifnarch s390 s390x %{arm} BuildRequires: libibmad-devel BuildRequires: libibumad-devel BuildRequires: numactl-devel %endif BuildRequires: desktop-file-utils BuildRequires: perl-ExtUtils-MakeMaker BuildRequires: perl-podlators BuildRequires: pkgconf %{?systemd_requires} BuildRequires: systemd Requires: %{name}-plugins%{?_isa} = %{version}-%{release} Requires: %{name}-plugins-munge%{?_isa} = %{version}-%{release} Requires: munge Requires(pre): shadow-utils %description Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. # ------------- # Base Packages # ------------- %package devel Summary: Slurm development Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel Development package for Slurm. Includes headers, libraries and man pages for using the Slurm API. %package doc Summary: Slurm documentation %description doc Documentation package for Slurm. Includes documentation and html-based configuration tools for Slurm. %package gui Summary: Slurm gui and visual tools Requires: %{name}%{?_isa} = %{version}-%{release} %description gui This package contains the Slurm visual tools smap and sview and their respective man pages. %package libs Summary: Slurm shared libraries %description libs Slurm shared libraries. %package plugins Summary: Slurm plugins (loadable shared objects) %description plugins Slurm plugins (loadable shared objects) supporting a wide variety of architectures and behaviors. These basically provide the building blocks with which Slurm can be configured. Note that some system specific plugins are in other packages. %package plugins-auth_none Summary: Slurm auth null implementation (no authentication) %description plugins-auth_none Slurm null authentication plugin. %package plugins-lua Summary: Slurm lua plugins %description plugins-lua Slurm proctrack/lua and job_submit/lua plugins. %package plugins-munge Summary: Slurm authentication and crypto plugins using Munge %description plugins-munge Slurm authentication and crypto implementation using Munge. Used to authenticate user originating an RPC, digitally sign and/or encrypt messages. %package plugins-mysql Summary: Slurm MySQL/MariaDb support %description plugins-mysql Slurm MySQL/MariaDb support plugins implementing interfaces to those databases for accounting storage and job completion. %package plugins-pbs Summary: Slurm torque (PBS) support %description plugins-pbs Slurm torque (PBS) support plugins. %package plugins-rrdtool Summary: Slurm rrdtool external sensor plugin %description plugins-rrdtool Slurm external sensor plugin for rrdtool. This package is separated from the base plugins package due to gui dependencies which are unneeded if not using this plugin. %package slurmdbd Summary: Slurm database daemon # Use with auth_none or munge plugins for authentication Requires: %{name}-plugins-munge%{?_isa} = %{version}-%{release} Requires: %{name}-plugins-mysql%{?_isa} = %{version}-%{release} Requires: munge %description slurmdbd Slurm database daemon. Used to accept and process database RPCs and upload database changes to slurmctld daemons on each cluster. # ----------------- # Contribs Packages # ----------------- %package contribs Summary: Perl tools to print Slurm job state information Requires: %{name}-perlapi%{?_isa} = %{version}-%{release} %description contribs Slurm contribution package which includes the programs seff, sjobexitmod, sjstat and smail. See their respective man pages for more information. %package openlava Summary: Openlava/LSF wrappers for transition from OpenLava/LSF to Slurm Requires: %{name}-perlapi%{?_isa} = %{version}-%{release} %description openlava OpenLava wrapper scripts used for helping migrate from OpenLava/LSF to Slurm. %package perlapi Summary: Perl API to Slurm Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description perlapi Perl API package for Slurm. This package includes the perl API to provide a helpful interface to Slurm through Perl. %package plugins-pam_slurm Summary: Slurm pam modules Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description plugins-pam_slurm The pam_slurm module restricts access to compute nodes in a cluster where Slurm is in use. Also includes the pam_slurm_adopt plugin for "adopting" connections into slurm jobs. %package torque Summary: Torque/PBS wrappers for transition from Torque/PBS to Slurm Requires: %{name}-perlapi%{?_isa} = %{version}-%{release} Requires: %{name}-plugins-pbs%{?_isa} = %{version}-%{release} %description torque Torque wrapper scripts used for helping migrate from Torque/PBS to Slurm. %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 cp %SOURCE1 etc/slurm.conf cp %SOURCE1 etc/slurm.conf.example cp %SOURCE2 etc/slurmdbd.conf cp %SOURCE2 etc/slurmdbd.conf.example mkdir -p share/applications mkdir -p share/icons/hicolor/128x128/apps cp %SOURCE3 share/applications/%{name}-sview.desktop cp %SOURCE4 share/icons/hicolor/128x128/apps/%{name}.png mkdir -p extras cp %SOURCE5 extras/slurm_setuser.in %build # upstream bug #2443. need to force lazy linkage since plugins contain # undefined symbols not used in every context, i.e. slurmctld vs slurmd. CFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy" CXXFLAGS="$RPM_OPT_FLAGS -Wl,-z,lazy" # --enable-debug (auxdir/x_ac_debug.m4) breaks fortification (-O0) %configure \ --prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir}/%{name} \ --with-pam_dir=%{_libdir}/security \ --enable-shared \ --disable-static \ --disable-debug \ --disable-developer \ --disable-bluegene \ --disable-native-cray \ --disable-cray-network \ --disable-salloc-background \ --disable-multiple-slurmd \ --disable-partial_attach \ --without-rpath \ # patch libtool to remove rpaths sed -i 's|^hardcode_into_libs=.*|hardcode_into_libs=no|g' libtool # configure the extras/slurm_setuser script sed -r ' s|^dir_conf=.*|dir_conf="%{_sysconfdir}/%{name}"|g; s|^dir_log=.*|dir_log="%{_var}/log/%{name}"|g; s|^dir_run=.*|dir_run="%{_rundir}/%{name}"|g; s|^dir_spool=.*|dir_spool="%{_var}/spool/%{name}"|g; s|^dir_tmpfiles_d=.*|dir_tmpfiles_d="%{_tmpfilesdir}"|g;' \ extras/slurm_setuser.in > extras/slurm_setuser # build base packages %make_build V=0 # build contribs packages # INSTALLDIRS=vendor so perlapi goes to vendor_perl directory PERL_MM_PARAMS="INSTALLDIRS=vendor" %make_build contrib V=0 %check make check %install %make_install %{__make} install-contrib DESTDIR=%{buildroot} install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name} install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/layouts.d install -d -m 0755 %{buildroot}%{_unitdir} install -m 0644 -p etc/cgroup.conf.example \ %{buildroot}%{_sysconfdir}/%{name} install -m 0644 -p etc/cgroup.conf.example \ %{buildroot}%{_sysconfdir}/%{name}/cgroup.conf install -m 0644 -p etc/cgroup_allowed_devices_file.conf.example \ %{buildroot}%{_sysconfdir}/%{name} install -m 0644 -p etc/layouts.d.power.conf.example \ %{buildroot}%{_sysconfdir}/%{name}/layouts.d/power.conf.example install -m 0644 -p etc/layouts.d.power_cpufreq.conf.example \ %{buildroot}%{_sysconfdir}/%{name}/layouts.d/power_cpufreq.conf.example install -m 0644 -p etc/layouts.d.unit.conf.example \ %{buildroot}%{_sysconfdir}/%{name}/layouts.d/unit.conf.example install -m 0644 -p etc/slurm.conf %{buildroot}%{_sysconfdir}/%{name} install -m 0644 -p etc/slurm.conf.example %{buildroot}%{_sysconfdir}/%{name} install -m 0644 -p etc/slurmdbd.conf %{buildroot}%{_sysconfdir}/%{name} install -m 0644 -p etc/slurmdbd.conf.example %{buildroot}%{_sysconfdir}/%{name} install -m 0644 -p etc/slurm.epilog.clean %{buildroot}%{_sysconfdir}/%{name} install -m 0644 -p etc/slurmctld.service %{buildroot}%{_unitdir} install -m 0644 -p etc/slurmd.service %{buildroot}%{_unitdir} install -m 0644 -p etc/slurmdbd.service %{buildroot}%{_unitdir} # tmpfiles.d file for creating /run/slurm dir after reboot install -d -m 0755 %{buildroot}%{_tmpfilesdir} cat >%{buildroot}%{_tmpfilesdir}/slurm.conf <%{buildroot}%{_sysconfdir}/logrotate.d/%{name} <%{buildroot}%{_libdir}/pkgconfig/slurm.pc < %{buildroot}%{_mandir}/man1/${prog}.1 done # contribs docs install -d -m 0755 %{buildroot}%{_docdir}/%{name}/contribs/lua install -m 0644 contribs/README %{buildroot}%{_docdir}/%{name}/contribs install -m 0644 contribs/lua/proctrack.lua %{buildroot}%{_docdir}/%{name}/contribs/lua # remove libtool archives find %{buildroot} -name \*.a -o -name \*.la | xargs rm -f # remove example plugins rm -f %{buildroot}%{_libdir}/%{name}/job_submit_defaults.so rm -f %{buildroot}%{_libdir}/%{name}/job_submit_logging.so rm -f %{buildroot}%{_libdir}/%{name}/job_submit_partition.so # remove bluegene files rm -f %{buildroot}%{_libdir}/%{name}/libsched_if.so rm -f %{buildroot}%{_libdir}/%{name}/libsched_if64.so rm -f %{buildroot}%{_libdir}/%{name}/runjob_plugin.so rm -f %{buildroot}%{_mandir}/man5/bluegene* rm -f %{buildroot}%{_sbindir}/sfree rm -f %{buildroot}%{_sbindir}/slurm_epilog rm -f %{buildroot}%{_sbindir}/slurm_prolog # remove cray files rm -f %{buildroot}%{_libdir}/%{name}/acct_gather_energy_cray.so rm -f %{buildroot}%{_libdir}/%{name}/core_spec_cray.so rm -f %{buildroot}%{_libdir}/%{name}/job_submit_cray.so rm -f %{buildroot}%{_libdir}/%{name}/select_cray.so rm -f %{buildroot}%{_libdir}/%{name}/switch_cray.so rm -f %{buildroot}%{_libdir}/%{name}/task_cray.so rm -f %{buildroot}%{_mandir}/man5/cray* # remove percs files rm -f %{buildroot}%{_libdir}/%{name}/launch_poe.so rm -f %{buildroot}%{_libdir}/%{name}/libpermapi.so rm -f %{buildroot}%{_libdir}/%{name}/switch_nrt.so # remove perl cruft rm -f %{buildroot}%{perl_vendorarch}/auto/Slurm*/.packlist rm -f %{buildroot}%{perl_vendorarch}/auto/Slurm*/Slurm*.bs rm -f %{buildroot}%{perl_archlib}/perllocal.pod # customize __find_requires to strip out incorrect dependencies cat >find-requires </dev/null || : %postun gui if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gui /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %post slurmdbd %systemd_post slurmdbd.service %preun slurmdbd %systemd_preun slurmdbd.service %postun slurmdbd %systemd_postun_with_restart slurmdbd.service %changelog * Thu Sep 14 2017 Philip Kovacs - 17.02.7-1 - Packaging for Fedora.