Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97552 - sys-cluster/torque keeps absolute paths to portage temporary directory inside libraries
Summary: sys-cluster/torque keeps absolute paths to portage temporary directory inside...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-30 15:34 UTC by Pat Lougheed
Modified: 2010-09-10 19:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Make Torque 1.2.0_p1 respect DESTDIR (1.2.0_p1-respect-destdir.patch,19.86 KB, patch)
2005-06-30 17:03 UTC, Pat Lougheed
Details | Diff
New Torque ebuild with required changes for the patch (torque-1.2.0_p1.ebuild,1.71 KB, text/plain)
2005-06-30 17:06 UTC, Pat Lougheed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pat Lougheed 2005-06-30 15:34:29 UTC
When installing sys-cluster/torque, the installed libraries keep within them a compile-time absolute path to one of the installed binaries. This doesn't appear to be an issue when just using Torque, but when trying to compile software that depends on Torque (ie. the Maui cluster scheduler), they fail to run.

How to reproduce:
1. emerge torque
2. download and compile maui
3. killall pbs_sched && maui, watch for error messages

One my system, this results in the following error message being displayed:

sh: /scratch/gentoo-portage-tmp/portage/torque-1.2.0_p1/image//usr/sbin/pbs_iff: No such file or directory

(Note that PORTAGE_TMPDIR=/scratch/gentoo-portage-tmp on my system.)

Basically, it looks like when running ebuild ....torque-1.2.0_p1.ebuild install, the make prefix=${D}/usr install that gets called causes a rebuild of all the Torque libraries with the new prefix (which is different from that passed in src_compile). The process works like this:

1. ebuild calls "make prefix=${D}/usr mandir=${D}/usr/share/man PBS_SERVER_HOME=${D}/usr/spool/PBS install || die" in src_install.
2. Torque's makefile sets ${prefix}, which then in turn sets ${sbindir}.
3. Makefile sets IFF_PATH=$(sbindir)/pbs_iff.
4. This path in turn gets placed into the CFLAGS define in src/lib/Libpbs/Makefile and compiles the library with that (absolute) path.

I'm working on a solution for this, but smarter minds than mine may have a quicker solution.
Comment 1 Pat Lougheed 2005-06-30 17:03:11 UTC
Created attachment 62366 [details, diff]
Make Torque 1.2.0_p1 respect DESTDIR

Note that this obseletes the sed on pbs_mkdirs.in in the current
torque-1.2.0_p1.ebuild
Comment 2 Pat Lougheed 2005-06-30 17:06:20 UTC
Created attachment 62367 [details]
New Torque ebuild with required changes for the patch

ebuild incorporates patching with the patch previously attached, changes the
make install line appropriately, and removes the now obsoleted sed.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-07-04 18:12:43 UTC
fixed in cvs now, there were a few other places that needed DESTDIR in
pbs_mkdirs.in as well that you missed, but I've got them all now.