Skip to content

Conversation

@jsquyres
Copy link
Member

@jsquyres jsquyres commented Jan 7, 2020

Allow the user to override the modulefile_path (root directory to
install the Open MPI modulefile), even if install_in_opt==1. For
example:

rpmbuild
--rebuild
--define 'install_in_opt 1'
--define 'modulefile_path /path/to/my/modulefiles/openmpi/%{version}'
openmpi-4.0.2-1.src.rpm

Signed-off-by: Jeff Squyres jsquyres@cisco.com
(cherry picked from commit 352e575)

Refs #6914
FYI @jschwartz-cray

RMs: technically, this is an enhancement. But it's pretty much an oversight; we really should have included this functionality in the first place.

Allow the user to override the modulefile_path (root directory to
install the Open MPI modulefile), even if install_in_opt==1.  For
example:

rpmbuild \
    --rebuild \
    --define 'install_in_opt 1' \
    --define 'modulefile_path /path/to/my/modulefiles/openmpi/%{version}' \
    openmpi-4.0.2-1.src.rpm

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit 352e575)
@hppritcha
Copy link
Member

bot:ompi:retest

@hppritcha hppritcha added the NEWS label Jan 8, 2020
Copy link
Member

@gpaulsen gpaulsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I tried to find documentation of the %{!?var: %define var foo} syntax (which there was already precedent for in the spec file before this PR, so I'm not concerned), but couldn't find that syntax anywhere on either https://rpm.org/documentation.html or https://rpm-packaging-guide.github.io/. I read it as "if var is not yet defined, then define it to be foo".

@hppritcha
Copy link
Member

bot:ompi:retest

@jsquyres
Copy link
Member Author

jsquyres commented Jan 8, 2020

I tried to find documentation of the %{!?var: %define var foo} syntax (which there was already precedent for in the spec file before this PR, so I'm not concerned), but couldn't find that syntax anywhere on either https://rpm.org/documentation.html or https://rpm-packaging-guide.github.io/. I read it as "if var is not yet defined, then define it to be foo".

RPM specfile syntax is a witch's brew of nomenclature, much of which is only documented in secret places, passed on via regal family tree lines, and otherwise un-verifiable to the general public.

Your interpretation of this syntax is correct: "if var is not defined, do this action" (and this action happens to correspond to "define var to foo").

@hppritcha hppritcha merged commit dc8246b into open-mpi:v4.0.x Jan 8, 2020
@jsquyres jsquyres deleted the pr/v4.0.x/rpm-specfile-fix branch January 8, 2020 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants