Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] and rpm
From: Jirka Hladky (jhladky_at_[hidden])
Date: 2010-10-31 18:17:12

On Sunday, October 31, 2010 08:42:54 am you wrote:
> Le 31/10/2010 01:44, Jirka Hladky a écrit :
> > Hi all,
> >
> > since is nice script to help debug problems I was
> > thinking to add it to the rpm.
> >
> > However, path to the lstopo is set to the absolute build path:
> >
> > abs_top_builddir="/home/jhladky/tests/performance/hwloc/hwloc-1.0.2"
> > lstopo="$abs_top_builddir/utils/lstopo"
> >
> > so it will no work after installation from rpm package (lstopo is in
> > /usr/bin/lstopo)
> >
> > I would propose to modify the script to look first for installed lstopo
> > using "which" command.

Hi Brice,

> What about we first try the one in $abs_top_builddir/utils/lstopo and
> then revert back to $prefix/bin/lstopo ?

I'm sorry but I don't think that having $abs_top_builddir or $prefix in the rpm
is good idea. I would simply use "lstopo" or lstopo=`which lstopo` For
explanation please see bellow.

> By the way, should we rename into
> during install ?

I would vote to install into the same directory as other
hwloc binaries (and lstopo in particular).

I have reviewed few shell scripts at /usr/bin which relies on another
programs. They call the program by the name without any path like this:

$more /usr/bin/ooffice
exec "$@"

My recommendation would be:
1) During install, rename on
2) During install, remove variable abs_top_builddir all together and make
lstopo=`which lstopo`
3)Create a minimalist man page (it just need to say in one or two sentences
what the command does)

I don't think that having abs_top_builddir in rpm is good idea. It will
resolve to some build directory on some build system.

BTW, /tmp/a
is not working at the moment. /tmp/a
tar: Removing leading `/' from member names
tar: /tmp/a: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
mv: cannot stat `/tmp/tmp.6s80cAqWc2//tmp/a.tar.gz': No such file or directory
Hierarchy gathered in .//tmp/a.tar.gz and kept in /tmp/tmp.6s80cAqWc2//tmp/a/
./ line 54: .//tmp/a.tar.gz.output: No such file or
Expected topology output stored in .//tmp/a.tar.gz.output

I can fix this if you are interested.

Please let me know your opinion. Please let me know if I can help with any
work to implement the proposed changes.


> Brice