Re: [OMPI users] Making RPM from source that respects --prefix
On Oct 7, 2009, at 9:36 PM, Bill Johnstone wrote: Thank you for your responses. Based on the information you both provided, I was able to get buildrpm to make the OMPI RPM the way I wanted. I ended up having to define _prefix , _mandir , and _infodir . Ah, yes -- _mandir and _infodir. Sorry; I should have mentioned those, but I always forget that some distros don't automatically put those dirs under _prefix. Sigh. Additionally, I found I had to use --define "shell_scripts_basename mpivars" because without that, when I tried to use mpi-selector, mpi- selector did not find the installation since it specifically seems to look for the shell scripts as mpivars.{sh,csh} rather than mpivars-1.3.3.{sh,csh} as the .spec file builds. I think the .spec file should be changed to match what mpi-selector expects. The intent of putting the version string at the end of the shell script names was to allow them to co-exist with other Open MPI installs in the same tree. In hindsight, that seems a little silly, because the scripts are installed in bindir -- where you can clearly only have 1 Open MPI installed at a time. I'll fix. Jeff, it might also be really useful to have a .spec build option to allow the RPM to register itself as the system default. I hand- modified the .spec file to do this. Please let me know if I should register a feature request somewhere more formally. Sure, that sounds reasonable. What --define option did you add for it? Something like --define "mpi_selector_default 1" that causes -- system to be added to the mpi-selector command lines in %post and %preun? -- Jeff Squyres jsquy...@cisco.com
Re: [OMPI users] Making RPM from source that respects --prefix
Hello Jeff and Kiril, Thank you for your responses. Based on the information you both provided, I was able to get buildrpm to make the OMPI RPM the way I wanted. I ended up having to define _prefix , _mandir , and _infodir . Additionally, I found I had to use --define "shell_scripts_basename mpivars" because without that, when I tried to use mpi-selector, mpi-selector did not find the installation since it specifically seems to look for the shell scripts as mpivars.{sh,csh} rather than mpivars-1.3.3.{sh,csh} as the .spec file builds. I think the .spec file should be changed to match what mpi-selector expects. Jeff, it might also be really useful to have a .spec build option to allow the RPM to register itself as the system default. I hand-modified the .spec file to do this. Please let me know if I should register a feature request somewhere more formally. Thanks again to you both, and sorry for taking so long to reply.
Re: [OMPI users] Making RPM from source that respects --prefix
Hi Bill, you might want to have a look here if you need a working example of that: https://savannah.fzk.de/cgi-bin/viewcvs.cgi/trunk/?root=openmpi-build We used to generate both SRPMs and RPMs for Open MPI in a previous project and did in fact specify a separate installation directory : (%define ompi_prefix /opt/i2g/openmpi in i2g-openmpi.spec.in) Hope that helps. Regards, Kiril On Fri, 2009-10-02 at 03:48 -0700, Bill Johnstone wrote: > I'm trying to build an RPM of 1.3.3 from the SRPM. Despite typical RPM > practice, I need to build ompi so that it installs to a different directory > from /usr or /opt, i.e. what I would get if I just built from source myself > with a --prefix argument to configure. > > When I invoke buildrpm with the --define 'configure_options --prefix= path> ...', the options do get set when the building process gets kicked off. > However, when I query the final RPM, only vampirtrace has paid attention to > the specified --prefix and wants to place its files accordingly. How should > I alter the .spec file (or in some other place?) to get the desired behavior > for the final file locations in the RPM? > > Thank you for any help. > > > > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users -- Dipl.-Inf. Kiril Dichev Tel.: +49 711 685 60492 E-mail: dic...@hlrs.de High Performance Computing Center Stuttgart (HLRS) Universität Stuttgart 70550 Stuttgart Germany
Re: [OMPI users] Making RPM from source that respects --prefix
rpmbuild likes to pass many of its own options to configure, including many that set bindir, libdir, etc. explicitly. Try setting _prefix instead of passing the prefix as a configure_options. For example: rpmbuild --rebuild --define '_prefix /tmp/bogus' openmpi-1.3.3-1.src.rpm On Oct 2, 2009, at 6:48 AM, Bill Johnstone wrote: I'm trying to build an RPM of 1.3.3 from the SRPM. Despite typical RPM practice, I need to build ompi so that it installs to a different directory from /usr or /opt, i.e. what I would get if I just built from source myself with a --prefix argument to configure. When I invoke buildrpm with the --define 'configure_options -- prefix= ...', the options do get set when the building process gets kicked off. However, when I query the final RPM, only vampirtrace has paid attention to the specified --prefix and wants to place its files accordingly. How should I alter the .spec file (or in some other place?) to get the desired behavior for the final file locations in the RPM? Thank you for any help. ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users -- Jeff Squyres jsquy...@cisco.com
[OMPI users] Making RPM from source that respects --prefix
I'm trying to build an RPM of 1.3.3 from the SRPM. Despite typical RPM practice, I need to build ompi so that it installs to a different directory from /usr or /opt, i.e. what I would get if I just built from source myself with a --prefix argument to configure. When I invoke buildrpm with the --define 'configure_options --prefix= ...', the options do get set when the building process gets kicked off. However, when I query the final RPM, only vampirtrace has paid attention to the specified --prefix and wants to place its files accordingly. How should I alter the .spec file (or in some other place?) to get the desired behavior for the final file locations in the RPM? Thank you for any help.