Bug 2768

Summary: Improve conditional builds .spec file
Product: Slurm Reporter: Alejandro Sanchez <alex>
Component: OtherAssignee: Tim Wickberg <tim>
Status: RESOLVED DUPLICATE QA Contact:
Severity: 5 - Enhancement    
Priority: ---    
Version: 16.05.x   
Hardware: Linux   
OS: Linux   
See Also: https://bugs.schedmd.com/show_bug.cgi?id=3396
Site: SchedMD Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---

Description Alejandro Sanchez 2016-05-24 17:59:58 MDT
Summary:

Modify slurm.spec to make use of %bcond_with and %bcond_without.

Context:

Message sent to slurm-dev by dani@letai.org.il (Daniel Letai) on 24/05/16:

The tar file contains a spec, so it's easy to just
rpmbuild -ta slurm-XXX.tar.bz2
and createrepo on the rpms.

If you require any special options during build, this is preferable to using an end result rpms, as it's quite easy to use defines, e.g.:

rpmbuild -ta --define '%_prefix /opt/%{name}' --define '%_without_debug 1' slurm-XXX.tar.bz2

I'm still puzzled why slurm.spec reinvents the wheel with the entire slurm_with(out)_opt macros instead of using the venerable bcond_with /  bcond_without macros (http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds)
Comment 1 Tim Wickberg 2016-05-25 01:28:49 MDT
I briefly looked into this - slurm.spec actually predates the introduction of the %bcond_with/without macros.

It's still worth looking into, although it is probably best left as part of a significant overhaul of the spec file as it'd be a significant change in how people currently use rpmbuild.
Comment 2 Alejandro Sanchez 2017-08-30 02:32:23 MDT
Tim - assigning this sev5 to you. IIRC correctly from meetings you told you were working on refactoring the .spec file and leaving a .spec legacy there too.
Comment 3 Tim Wickberg 2017-09-08 10:35:23 MDT
Marking this as a duplicate of the slurm.spec overhaul bug, this'll be fixed as part of that cleanup.

*** This bug has been marked as a duplicate of bug 3396 ***