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

Re: How to handle ´/etc/ld.so.preload library packages?

Marc Haber <debian-mentors.lists.debian.org@marc-haber.de> writes:

> (2)
> Ask the user if I should add the lib to /etc/ld.so.preload in the
> postinst and automatically remove the entry in prerm? Does order in
> /etc/ld.so.preload matter?

I'd guess that order is significant if more than one preloaded lib
defines the same symbol. I'm not sure whether deterministic behavious
is guaranteed at all in this case ... better to avoid this.

My solution would be to show the proposed new ld.so.preload (with the
lib added in postinst, with it removed in the prerm), or perhaps a
unidiff to the admin, and ask for her approval.

> (3)
> Do everything fully automatic?

I would feel a bit uncomfortable with this ... one error in your
package and its pretty much rescue disk time[1].

Perhaps a nice feature would be to first set LD_PRELOAD at the top of
your postinst, so that it automatically fails before installing your
library into ld.so.preload, whenever something is wrong with the lib.
I don't know how this would fare on upgrades, though.

[1] Unless a standalone shell is handy, or a suitably powerful
    program running.


Attachment: signature.ng
Description: PGP signature

Reply to: