Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] rpmbuild defining opt install path
From: Lloyd Brown (lloyd_brown_at_[hidden])
Date: 2012-06-27 14:12:27


That's a really good idea. The trouble is that I need to have multiple
versions installed (eg. compiled with the various compilers), so I think
I still need to manipulate name in some way, so the packages will be
named differently. But _prefix should definitely give me more
flexibility as to where it's installed.

Lloyd Brown
Systems Administrator
Fulton Supercomputing Lab
Brigham Young University
http://marylou.byu.edu

On 06/27/2012 11:12 AM, Jeff Squyres wrote:
> On Jun 26, 2012, at 2:40 PM, Lloyd Brown wrote:
>
>> Is there an easy way with the .spec file and the rpmbuild command, for
>> me to override the path the OpenMPI RPM installs into, in /opt?
>> Basically, I'm already doing something like this:
>
> I think all you need to do is override the RPM-builtin names, like _prefix (and possibly some others). For example, I did this in RHEL 6.2:
>
> rpmbuild --rebuild --define '_prefix /tmp/bogus' \
> /home/jsquyres/RPMS/SRPMS/openmpi-1.6-1.src.rpm
>
> Which resulted in:
>
> + ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/tmp/bogus --exec-prefix=/tmp/bogus --bindir=/tmp/bogus/bin --sbindir=/tmp/bogus/sbin --sysconfdir=/tmp/bogus/etc --datadir=/tmp/bogus/share --includedir=/tmp/bogus/include --libdir=/tmp/bogus/lib64 --libexecdir=/tmp/bogus/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
>
> For some reason, this didn't override localstatedir, sharedstatedir, mandir, and infodir (gotta love RPM! :-) ), so I did:
>
> rpmbuild --rebuild --define '_prefix /tmp/bogus' --define '_localstatedir /tmp/bogus/var' --define '_sharedstatedir /tmp/bogus/var/lib' --define '_mandir /tmp/bogus/share/man' --define '_infodir /tmp/bogus/share/info' /home/jsquyres/RPMS/SRPMS/openmpi-1.6-1.src.rpm
>
> When then gave me what I think you want:
>
> + ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/tmp/bogus --exec-prefix=/tmp/bogus --bindir=/tmp/bogus/bin --sbindir=/tmp/bogus/sbin --sysconfdir=/tmp/bogus/etc --datadir=/tmp/bogus/share --includedir=/tmp/bogus/include --libdir=/tmp/bogus/lib64 --libexecdir=/tmp/bogus/libexec --localstatedir=/tmp/bogus/var --sharedstatedir=/tmp/bogus/var/lib --mandir=/tmp/bogus/share/man --infodir=/tmp/bogus/share/info
>