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.buck...@pawsey.org.au> [220525 14:48]:
> On 2022/05/25 03:08, Marko Markoc wrote:
> > 
> > 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?
> 
> 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
> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to