Ticket 2768 - Improve conditional builds .spec file
Summary: Improve conditional builds .spec file
Status: RESOLVED DUPLICATE of ticket 3396
Alias: None
Product: Slurm
Classification: Unclassified
Component: Other (show other tickets)
Version: 16.05.x
Hardware: Linux Linux
: 5 - Enhancement
Assignee: Tim Wickberg
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2016-05-24 17:59 MDT by Alejandro Sanchez
Modified: 2017-09-08 10:35 MDT (History)
0 users

See Also:
Site: SchedMD
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
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 ticket has been marked as a duplicate of ticket 3396 ***