parrot/parrot — Issue #201: Work-directory references in installed files
Author: he32
Created: 2011-11-16 14:10:43+00:00
State: open

While packaging up Parrot 3.8.0 for NetBSD's pkgsrc package system, it is apparent that
relatively recently pkgsrc has become stricter about not allowing work-directory references
in installed files.

Parrot 3.8.0 tries to install no less than 12 files with work-directory references.

Carrying around references to the build / work directory can be dangerous, as there is no
guarantee that it will or will not exist at any point in the future, and if that directory is included
in any form of search list, at best unpredictable behavior can ensue.

The files with work-directory references and the corresponding "strings -a | grep work" entries are:

bin/ops2c

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

(library references, no less!)

bin/parrot

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

bin/parrot-nqp

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

bin/parrot-prove

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

bin/parrot_config

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

bin/parrot_nci_thunk_gen

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

bin/pbc_merge

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

bin/pbc_to_exe

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

bin/winxed

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

lib/parrot/3.8.0/include/config.fpmc

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

lib/parrot/3.8.0/parrot_config.o

/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
/usr/pkgsrc/lang/parrot/work/parrot-3.8.0
-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot
"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"
/usr/pkgsrc/lang/parrot/work/.tools/bin/tar

lib/parrot/3.8.0/tools/lib/Parrot/Config/Generated.pm

'build_dir' => '/usr/pkgsrc/lang/parrot/work/parrot-3.8.0',
'coveragedir' => '/usr/pkgsrc/lang/parrot/work/parrot-3.8.0',
'libparrot_linkflags' => '-L"/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib" -lparrot',
'rpath_blib' => '"-Wl,-R/usr/pkgsrc/lang/parrot/work/parrot-3.8.0/blib/lib"',
'tar' => '/usr/pkgsrc/lang/parrot/work/.tools/bin/tar',

Now, many if not most of these come from this last generated configuration file, it would appear.
I'm uncertain of the strategy to deal with these issues -- maybe these settings should be
farmed out to a separate file which is only used during the build phase, and which is not
converted into an object file and embedded in the installed binaries?