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

Re: Is this really the debian way ?



On Sat, Feb 08, 2014 at 07:13:59PM +0000, Roelof Wobben wrote:
> 
> On the control file these packages are made: 
> cjs  - Mozilla-based javascript bindings for the GNOME platform
> libcjs0c - This is the shared library applications link to
> libcjs-dev - This package contains the development files applications need to
>  build against.
That is very common. You have the programs people use in cjs. It has a
shared library or libraries in the lib package with the development
library parts (so other people can use it) in a -dev package.
That's pretty standard behaviour.

> DEB_DH_MAKESHLIBS_ARGS_libcjs0c = -Xusr/lib/cjs-1.0/ -V'libcjs0c (>= $(DEB_UPSTREAM_VERSION)), libcjs0-$(LIBMOZJS)' -- -c4
> 
> So they have to use some sort of "hack" to find the files of the second package. 
That looks odd. Let's go through the args
  * Don't look for my libraries in /usr/lib/cjs-1.0
  * The -V option adds libcjs0-$(LIBMOZJS) to the dependency, that looks
    wrong.
Your library package creates the shlibs file so that other packages that
link to it have a sensible dependency. As an example, libprocps0 has:
  libprocps 0 libprocps0 (>= 1:3.3.2-1)
while libprocps3 has:
  libprocps 3 libprocps3

So if something is built and linked with libprocps0 then it will have a
line in its control file like:
  Depends: libprocps0 (>= 1:3.3.2-1), [other things here]
while if it was linked with libprocps3 it looks like:
  Depends: libprocps3, [other things here]

That odd -V option is saying, if you link with libcjs then you need to
also install either this or a newer version of libcjs (this is common)
but you ALSO need libcjs0-(something here) package.

That's very, very odd. shlibs is for finding library depdencies (I need
libary XYZ, which package is it in?) not for... well just a dependency
for dependency sake.

I suspect, but it is only a guess, that libcjs0 should depend on this
MOZJS thing.

HOWEVER, if you MUST have this, the way in debhelper rules would be:

override_dh_makeshlibs:
    dh_makeshlibs -Xusr/lib/cjs-1.0/ -V'libcjs0c (>= $(DEB_UPSTREAM_VERSION)), libcjs0-$(LIBMOZJS)' -- -c4

What worries me is that if you need this MOZJS thing and you are not
making debian packages, then shlibs doesn't apply. If it is important
enough to do evil things to shlibs, then I suspect this theorectical
non-debian program wouldn't work.

 - Craig
-- 
Craig Small (@smallsees)   http://enc.com.au/       csmall at : enc.com.au
Debian GNU/Linux           http://www.debian.org/   csmall at : debian.org
GPG fingerprint:        5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5


Reply to: