Aleksandar Milivojevic wrote:
Quoting Michael Jennings <mej@xxxxxxxxx>:
If you would like to propose a portable method of obtaining the path
of the invoked binary 100% of the time (i.e., argv[0] and searching
$PATH are OUT), I'd like to see it.
Hmmmm.... You might try with looking where your txt segments are
mapped. Not
sure how portable the code would be, and if it would work on *every*
Unix, Unix
look-alike and variant out there. But then, is there such thing as
portable
code ;-)
# lsof -d txt
Neat... but in the end of the day, I'd still need to patch code to
include this functionality, so I'm not any better off than patching in
simpler functionality.
What I am looking for is a way to make relocatable rpms out of software
that wasn't designed with this in mind, and I think the only thing that
I can do is to build the rpms in a suitable deep location to get long
hardwired paths in the binaries, then patch them after installation,
replacing the long build-time paths with shorter runtime paths.
--
cg
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list