From 35bb9afb94619382e8e4059a08b205bdbbda6e99 Mon Sep 17 00:00:00 2001
From: Daniel Letai <dani@letai.org.il>
Date: Mon, 29 Apr 2019 14:22:13 -0600
Subject: [PATCH] slurm.spec - allow --with-pmix in rpmbuild.

And require the compute nodes to have an identical installation version
to avoid issues with mismatched libraries.

Bug 6598.
---
 slurm.spec | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/slurm.spec b/slurm.spec
index 17dd81f1373..89772cfb728 100644
--- a/slurm.spec
+++ b/slurm.spec
@@ -30,6 +30,7 @@ Source:		%{slurm_source_dir}.tar.bz2
 # --with numa		%_with_numa 1		require NUMA support
 # --without pam		%_without_pam 1		don't require pam-devel RPM to be installed
 # --without x11		%_without_x11 1		disable internal X11 support
+# --with pmix		%_with_pmix path	require pmix support
 
 #  Options that are off by default (enable with --with <opt>)
 %bcond_with cray
@@ -44,6 +45,7 @@ Source:		%{slurm_source_dir}.tar.bz2
 %bcond_with lua
 %bcond_with numa
 %bcond_with x11
+%bcond_with pmix
 
 # Use debug by default on all systems
 %bcond_without debug
@@ -116,6 +118,11 @@ BuildRequires: numactl-devel
 %endif
 %endif
 
+%if %{with pmix}
+BuildRequires: pmix
+%global pmix %(rpm -q pmix --qf "%{VERSION}")
+%endif
+
 #  Allow override of sysconfdir via _slurm_sysconfdir.
 #  Note 'global' instead of 'define' needed here to work around apparent
 #   bug in rpm macro scoping (or something...)
@@ -201,6 +208,9 @@ to launch jobs.
 Summary: Slurm compute node daemon
 Group: System Environment/Base
 Requires: %{name}%{?_isa} = %{version}-%{release}
+%if %{with pmix}
+Requires: pmix = %{pmix_version}
+%endif
 %description slurmd
 Slurm compute node daemon. Used to launch jobs on compute nodes
 
-- 
GitLab