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

Re: Packaging drivers



On 29 May 2000, Andreas Rottmann wrote:

> The drivers reside in
> /usr/lib/gql/drivers/libgql<soname>-<driverid>.so, wich in fact are,
> due to the Linux library versioning system, smylinks to
> libgql<soname>-<driverid>.so.<package-version>.

This is wrong. The actual files should habe at least two version numbers
and an ELF soname with one version number. ldconfig then creates symlinks
that are named like the soname field to the newest library it can find.
When a program is linked, it is linked against the soname of the file
without a version number (which is a symlink to the version the program
should be linked against). The first version number is the API version,
the others arbitrary.

> The symlinking is in this case unecessary, since the drivers are
> dynamically loaded from within a library, wich has <soname> compiled
> in and always tries to open libgql<soname>-<driverid>.so.

Which is also wrong, since it doesn't catch API changes like the normal
Unix library versioning scheme does.

> 1) The drivers package isn't a -dev package so I get lintian warnings
> complaining about library symlinks in a non -dev package.

Lintian is correct. A .so -> .so.<api> link is unnecessary when you're not
linking anything.

> 2) The symlinks weren't necessary (and aren't beautiful anyway) if I
> managed to install the "real driver .so" libgql<soname>-<driverid>.so
> (and not just have it beeing a symlink pointing to the real .so)

This is bad because API changes can happen. IMO the best solution is to
patch the source to request its libraries with ".so.<apiversion>" and call
ldconfig on the directory after installing or removing drivers.

   Simon

-- 
PGP public key available from http://phobos.fs.tum.de/pgp/Simon.Richter.asc
 Fingerprint: 10 62 F6 F5 C0 5D 9E D8  47 05 1B 8A 22 E5 4E C1
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!



Reply to: