[slurm-users] rpmbuild with custom sysconfdir not working in 21.08.8

262 views
Skip to first unread message

Marko Markoc

unread,
May 24, 2022, 3:09:29 PM5/24/22
to slurm...@lists.schedmd.com
Hi,

I have been successfully building slurm RPMs for our environment using rpmbuild and .rpmmacros to set up our custom sysconfdir. This has stopped working for me with versions 21.08.7 and 21.08.8. RPMs are created but sysconfdir is set up to default /etc/slurm one. 21.08.6 is the last version that builds correctly for me. Did anyone else experience this or does anyone know how to get it to work?

Thanks,
Marko

Juergen Salk

unread,
May 24, 2022, 5:04:34 PM5/24/22
to Slurm User Community List
Hi Marko,

I have had a very similar issue with setting up a custom path for the
Slurm configuration files when using the '%_sysconfdir' macro in
.rpmmacros, but this also happened with version 21.08.6 to me.

Does it work for you if you use '%_slurm_sysconfdir' instead of
'%_sysconfdir' macro in your .rpmmacros file? For me it worked.

Best regards
Jürgen


* Marko Markoc <mma...@pdx.edu> [220524 12:08]:

Kevin Buckley

unread,
May 25, 2022, 2:49:23 AM5/25/22
to slurm...@lists.schedmd.com
Looking at the files, that might have altered the behaviour in the
build system, that changed between 21.08.6 and 21.08.7, so

slurm.spec
configure.ac
Makefile.am

I can't see anything likely, within Slurm, to have altered the
behaviour.


To reinforce what Jurgen Salk wrote though, vis

> Does it work for you if you use '%_slurm_sysconfdir' instead of
> '%_sysconfdir' macro in your .rpmmacros file? For me it worked.

so there's a stanza in the spec-file that says

# 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...)
%{!?_slurm_sysconfdir: %global _slurm_sysconfdir /etc/slurm}
%define _sysconfdir %_slurm_sysconfdir


so there would appear to be a known, in the Rumsfeld sense, issue there.


Add to that, that the build wrapper for Slurm on our Cray XCs, has

rpmbuild --with cray --with lua --define "_slurm_sysconfdir /etc/opt/slurm" \
... other stuff ...

and it all points to what Jurgen said being likely to fix the issue
you are seeing, if not explaining why you are only seeing it now.

HTH,
Kevin


Juergen Salk

unread,
May 25, 2022, 3:40:39 AM5/25/22
to Slurm User Community List
Hi,

SchedMD also recently changed their online documentation on building
RPM packages for Slurm: https://slurm.schedmd.com/quickstart_admin.html

They now refer to '_slurm_sysconfdir' macro while it was '_sysconfdir'
in previous versions of the documentation.

Now it reads:

--- snip ---

To build RPMs directly, copy the distributed tarball into a directory
and execute (substituting the appropriate Slurm version number):

rpmbuild -ta slurm-21.08.1.tar.bz2

The rpm files will be installed under the $(HOME)/rpmbuild directory
of the user building them.

You can control some aspects of the RPM built with a .rpmmacros file
in your home directory. Special macro definitions will likely only be
required if files are installed in unconventional locations. Some
macro definitions that may be used in building Slurm include:

_enable_debug
Specify if debugging logic within Slurm is to be enabled
_prefix
Pathname of directory to contain the Slurm files
_slurm_sysconfdir
Pathname of directory containing the slurm.conf configuration file (default /etc/slurm)
with_munge
Specifies the MUNGE (authentication library) installation location
with_ssl
Specifies SSL library installation location

An example .rpmmacros file:

# .rpmmacros
# Override some RPM macros from /usr/lib/rpm/macros
# Set Slurm-specific macros for unconventional file locations
#
%_enable_debug "--with-debug"
%_prefix /opt/slurm
%_slurm_sysconfdir %{_prefix}/etc/slurm
%_defaultdocdir %{_prefix}/doc
%with_munge "--with-munge=/opt/munge"

--- snip ---

Best regards
Jürgen


* Kevin Buckley <Kevin....@pawsey.org.au> [220525 14:48]:
Reply all
Reply to author
Forward
0 new messages