Re: patching binaries at install time without breaking rpm -V?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, 21 December 2005, at 13:23:59 (-0800),
Christian Goetze wrote:

> One reason why parsing argv[0] is not sufficient is that it doesn't
> work for shared objects loaded up via dlopen. Are there others?

Lots.  The most obvious being argv[0] with no path info.  A less
obvious problem being insidious uses of execv*() functions.

> I'm actually quite successful with doing the argv[0] trick for most
> normal executables, and even perl can work that way as long as you
> don't try to embed it.

Getting it right 95% of the time is easy.  It's the other 5% that's
tricky.

> Solaris, of all systems, has the right construct: you can compile in 
> "ORIGIN" into the library search path.

That's great...assuming all you care about is loading shared objects.
And if that's all you care about, creative use of LD_LIBRARY_PATH
and/or LD_PRELOAD wrappers are the simple and obvious solution.

But what about config file search paths? image paths? font paths?

There's also the problem of how being invoked as /usr/bin/bob can help
bob know that it's supposed to find its config files in
/etc/X11/bob/bob.conf.

Definitely trying to attack the problem from the wrong direction
here.  RPM is not the droid you're looking for.

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <mej@xxxxxxxxx>
n + 1, Inc., http://www.nplus1.net/       Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
 "I will sail my vessel till the river runs dry.  Like a bird upon the
  wind, these waters are my sky.  I'll never reach my destination if I
  never try, so I will sail my vessel till the river runs dry."
                                          -- Garth Brooks, "The River"

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux