Dear Fink Devlopers,

I have implemented the next phase of the shlibs project, which I'll discuss
in this message.

In this phase, in addition to making sure that all shared libraries are
kept in separate fink packages which can remain installed long after
other things have been upgraded, you will be asked to document which
shared libraries your package installs and to give dependency information
for those shared libraries.

This documentation is done with a new "Shlibs" field in the fink .info
file.  To give a simple example, the base package "apt-shlibs" installs
two shared libraries, and the apt-shlibs splitoff section of the .info
file now contains the lines

  Shlibs: <<
    %p/lib/libapt-inst.1.0.dylib %n (>= %v-%r)
    %p/lib/libapt-pkg.3.2 %n (>= %v-%r)
  <<

The format is: one line per shared library, which contains the -install_name
of the library (as given by otool -L), followed by the dependency information.
It's important to use %p in the install_name rather than /sw, so that users
with different installation directories will also get the correct information.

FINK MAINTAINERS ARE REQUESTED TO ADD THIS FIELD PRIOR TO MOVING A PACKAGE
TO THE 10.2/STABLE TREE.  It is not necessary to increase the revision
number when adding this field.

In most cases, the dependency information is going to resolve to the
package name (typically the foo-shlibs package), together with a versioning
which states "greater than or equal to the current version."  Stating such
information is your promise, as a package maintainer, that subsequent
versions of this package will contain a file of that name which is backward
compatible to the currently installed library.

In some cases, such as xfree86 and system-xfree86, there may be several
ways to obtain the needed library.  In that case, you can use the
"foo | bar" syntax for dependencies.

At the moment, Fink only processes the Shlibs field if you have the latest
Fink from CVS installed (it was committed to CVS shortly before
this message).  The shared libraries system comes with backup information,
listed in /sw/etc/dpkg/shlibs.defaults, and a file with the needed information
for all of fink's essential packages is installed with the new fink 
package manager.

If you would like to test how this system works, I've put a beta version 
of "fink-shlibdeps" into the CVS module "shared-libraries".  This perl
program is based on dpkg-shlibdeps, and it writes a file debian/substvars
(relative to the location from which it is called), assuming that the
current directory has a "debian" subdirectory.  You invoke it on a
list of binary files, and it determines all the fink packages which
those files depend on and writes the dependency information to that
substvars file.  At the moment it is only going to function correctly
on binaries from the essential packages, but you can test it there.

As noted above, it is perfectly safe to add a Shlibs field without increasing
the revision number of your package.  During the time between now and
the next fink package manager release, most users won't have the Shlibs
field processed anyway.  At the time of the next fink package manager
release, I will update the shlibs.default file so that all users will
have access to the Shlibs information whether their packages were
processed in the old way or the new way.

  -- Dave Morrison


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to