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

Re: rpmlint question



On Thu, 15 Feb 2007, Michael Schwendt wrote:

On Wed, 14 Feb 2007 16:03:12 -0500 (EST), Tom Diehl wrote:

It turns out that libdspam.so is not needed but there are subpackages
that contain drivers for mysql and postgresql. If I pull the .so symlinks,
I get the following error:

[bullwinkle pts33]# dspam --daemon --debug
1312: [02/14/2007 15:46:54] dlopen() failed: /usr/lib/libmysql_drv.so: /usr/lib/libmysql_drv.so: cannot open shared object file: No such file or directory
1312: [02/14/2007 15:46:54] Unable to initialize storage driver
[bullwinkle pts33]#

Having said the above, there is a config file in dspam, that calls
/usr/lib/libmysql_drv.so. If I change the config to /usr/lib/libmysql_drv.so.7
or /usr/lib/libmysql_drv.so.7.0.0 then the program runs and the driver loads.

What is the correct way to handle this type of thing?

Rule of thumb: don't touch it unless you know what you are doing.

In addition, if the right answer is to drop the *.so libs, am I really supposed
to drop them or do they belong in the -devel package?

Is there a doc for this somewhere? So far, I have not been able to find one.

There used to be a paragraph somewhere in the Wiki, merged from fedora.us,
but I think it got obsoleted/dropped because it would be too confusing for
packaging newbies. The decision on what to do with *.so files is difficult.

Like me!! :-)

Basically, you only need to know which libraries are needed at run-time
and which are needed at build-time only. Then you can include them in the
right packages. For ordinary libraries, which are correctly named, only
the *.so.* files are needed at run-time and the *.so symlink is only
needed during development. libfoo.so is what is needed for the linker
option -lfoo to succeed.

In your example, however. the developers use dlopen() to load shared
libraries at run-time. The libraries are used like plugins. Is there an
API (in header files) for those plugin libraries?

I do not think so.

The developers ought to move their plugins to a private directory and not
pollute /usr/lib. The chosen file names are very generic, too, since the
libraries can conflict with any other package, which would also include a
libmysql_drv.so.* Further, the developers ought to dlopen the versioned
libs rather than the non-versioned *.so and that is especially useful when
loading external libs (e.g. system libs).

AAH!! This helps a lot. I think I am finally starting to understand this magic.

So, if I understand you correctly, the right thing to do in this case, would
be to get upstream to use /usr/lib/libmysql_drv.so.7 and put the *.so files in
the -devel package.

Is this correct?

Regards,
--
Tom Diehl		tdiehl rogueind com		Spamtrap address mtd123 rogueind com


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