Ticket 21063 - make slurm.spec more inline wih configure capabilities, general cleanup
Summary: make slurm.spec more inline wih configure capabilities, general cleanup
Status: OPEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Build System and Packaging (show other tickets)
Version: 24.11.x
Hardware: Linux Linux
: C - Contributions
Assignee: Tim Wickberg
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2024-10-01 01:25 MDT by dani
Modified: 2025-02-26 04:36 MST (History)
2 users (show)

See Also:
Site: CRAY
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: Royalty Report
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: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
suggested slurm.spec (26.00 KB, text/plain)
2024-10-01 01:25 MDT, dani
Details
slurm.spec.without-munge.patch (1.25 KB, patch)
2024-11-02 15:16 MDT, dani
Details | Diff
slurm.spec.with-rsmi.patch (1.38 KB, patch)
2024-11-02 15:18 MDT, dani
Details | Diff
slurm.spec.with-lz4.patch (1.12 KB, patch)
2024-11-02 15:19 MDT, dani
Details | Diff
slurm.spec.with-ofed.patch (1.18 KB, patch)
2024-11-02 15:21 MDT, dani
Details | Diff
slurm.spec.with-bpf.patch (1.12 KB, patch)
2024-11-02 15:22 MDT, dani
Details | Diff
slurm.spec.with-mysql.patch (4.36 KB, patch)
2024-11-02 15:23 MDT, dani
Details | Diff
slurm.spec.with-oneapi.patch (1.22 KB, patch)
2024-11-02 15:24 MDT, dani
Details | Diff
slurm.spec.with-s2n.patch (1.21 KB, patch)
2024-11-02 15:25 MDT, dani
Details | Diff
slurm.spec.with-nvml.patch (1.60 KB, patch)
2024-11-02 15:29 MDT, dani
Details | Diff
Allow disabling pam (466 bytes, patch)
2024-11-02 15:33 MDT, dani
Details | Diff
remove duplicate freeipmi line (403 bytes, patch)
2024-11-02 15:35 MDT, dani
Details | Diff
Prevent macro expansion in comments (3.09 KB, patch)
2024-11-02 15:47 MDT, dani
Details | Diff
Fixed pmix dependency (345 bytes, patch)
2024-11-02 15:49 MDT, dani
Details | Diff
Added BuildRequires for hdf5 (753 bytes, patch)
2024-11-02 15:52 MDT, dani
Details | Diff
External requires generator is deprecated (561 bytes, patch)
2024-11-02 15:59 MDT, dani
Details | Diff
Added missing bcond (395 bytes, patch)
2024-11-02 16:02 MDT, dani
Details | Diff
Add required rpms hint to build html from man pages (1.34 KB, patch)
2024-11-02 16:07 MDT, dani
Details | Diff
Add support for sview in spec file (1.47 KB, patch)
2024-11-02 16:08 MDT, dani
Details | Diff

Note You need to log in before you can comment on or make changes to this ticket.
Description dani 2024-10-01 01:25:29 MDT
Created attachment 39000 [details]
suggested slurm.spec

Attached a suggested slurm.spec with some added '--with' and '--without' flags as well cleaned up mysql_config and OFED dependencies.

Most notably, added '--without munge' to remove dependency on munge and added a saner handling of nvml (require explicit --with nvml, or it's disabled even if detected, and a default nvml_path that corresponds to default location in recent nvidia rpms).

The attached spec also addresses a possible issue with unintended macro expansion in comments due to rpm's spec macro expansion limitations, and some inline comments explaining my rational for various changes.

I did not address the lack of changelog section warning issued by rpmbuild, since this can be resolved in several ways.

I would suggest adding a changelog section with the following form:
 %changelog
 %autochangelog

But this requires an additional step when releasing a version, of running:
> rpmautospec generate-changelog
In the git tag before packaging as tar, and see 
https://fedoraproject.org/wiki/Changes/rpmautospec
https://docs.pagure.org/Fedora-Infra.rpmautospec/autochangelog.html
https://github.com/fedora-infra/rpmautospec
https://fedoramagazine.org/use-rpmautospec-in-fedora-linux/

As a side note, all of my changes can be backported to 24.05
Comment 1 dani 2024-11-02 15:16:53 MDT
Created attachment 39522 [details]
slurm.spec.without-munge.patch

Make munge optional
Comment 2 dani 2024-11-02 15:18:13 MDT
Created attachment 39523 [details]
slurm.spec.with-rsmi.patch

Add rsmi support to rpm spec file
Comment 3 dani 2024-11-02 15:19:08 MDT
Created attachment 39524 [details]
slurm.spec.with-lz4.patch

Add lz4 support to rpm spec file
Comment 4 dani 2024-11-02 15:21:05 MDT
Created attachment 39525 [details]
slurm.spec.with-ofed.patch

Add OFED support to rpm spec file
Comment 5 dani 2024-11-02 15:22:38 MDT
Created attachment 39526 [details]
slurm.spec.with-bpf.patch

Add bpf support to rpm spec file
Comment 6 dani 2024-11-02 15:23:59 MDT
Created attachment 39527 [details]
slurm.spec.with-mysql.patch

Handle mysql better in rpm spec file
Comment 7 dani 2024-11-02 15:24:43 MDT
Created attachment 39528 [details]
slurm.spec.with-oneapi.patch

Add oneapi support to rpm spec file
Comment 8 dani 2024-11-02 15:25:29 MDT
Created attachment 39529 [details]
slurm.spec.with-s2n.patch

Add s2n support to rpm spec file
Comment 9 dani 2024-11-02 15:29:17 MDT
Created attachment 39530 [details]
slurm.spec.with-nvml.patch

Handle nvml better in rpm spec file. Note nvml is disabled by default even if the requires are there. Path is naively deduced from installed rpms.
Comment 10 dani 2024-11-02 15:33:18 MDT
Created attachment 39531 [details]
Allow disabling pam

Make rpm behave closer to configure - allow disabling pam.
Comment 11 dani 2024-11-02 15:35:23 MDT
Created attachment 39532 [details]
remove duplicate freeipmi line

In configure there are 2 freeipmi lines.
Comment 12 dani 2024-11-02 15:47:11 MDT
Created attachment 39533 [details]
Prevent macro expansion in comments

RPM has a bug that expands macros in comment. It might be fixed in newer rpm versions, but not in RHEL9 yet.
Comment 13 dani 2024-11-02 15:49:32 MDT
Created attachment 39534 [details]
Fixed pmix dependency

pmix now ships a devel package, which is what build requires. Fixed to pkgconfig(pmix).
Comment 14 dani 2024-11-02 15:52:58 MDT
Created attachment 39535 [details]
Added BuildRequires for hdf5

Added BuildRequires to give a hint to package builders of the rpm required to enable it.
Comment 15 dani 2024-11-02 15:59:48 MDT
Created attachment 39536 [details]
External requires generator is deprecated

External requires generator is deprecated, used solution as per documentation at 
>https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/#_filtering_provides_and_requires_after_scanning
Comment 16 dani 2024-11-02 16:02:06 MDT
Created attachment 39537 [details]
Added missing bcond

Commandline with or without selinux was not picked up due to missing bcond
Comment 17 dani 2024-11-02 16:07:07 MDT
Created attachment 39538 [details]
Add required rpms hint to build html from man pages

Added BuildRequires for man2html, to let package builder know which rpm is missing to enable creating the html files from man pages.

A couple of notes:
1. Using `--without man2html` will not prevent building the html pages if man2html is installed
2. `--without html` is useful to skip the BuildRequire if the html is not desired
Comment 18 dani 2024-11-02 16:08:56 MDT
Created attachment 39539 [details]
Add support for sview in spec file

Support optional sview creation.