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

Bug#622888: lintian: multi-arch libraries with arch-dependent overrides



Package: lintian
Version: 2.5.0~rc2
Severity: normal

Hi,

I just came across a possible problem with multi-arch support of
libraries that have arch-dependent overrides. I do not mean overrides
that simply differ in the triplet, that is covered in bug #617991:
"lintian overrides should support more precise pattern matching".

The more interesting case is a package that has actually different
overrides per arch and therefore can't be covered by better wildcard
matching. For example the libgl1-nvidia-glx package has the following
(and some more) overrides on i386:
    # The NVIDIA license does not allow any form of modification.
    libgl1-nvidia-glx: binary-has-unneeded-section
    libgl1-nvidia-glx: shared-lib-without-dependency-information
    libgl1-nvidia-glx: shlib-with-non-pic-code
    libgl1-nvidia-glx: shlib-without-PT_GNU_STACK-section
    libgl1-nvidia-glx: spelling-error-in-binary
and on amd64:
    # The NVIDIA license does not allow any form of modification.
    libgl1-nvidia-glx: binary-has-unneeded-section
    libgl1-nvidia-glx: shared-lib-without-dependency-information
    libgl1-nvidia-glx: shlib-with-executable-stack
    libgl1-nvidia-glx: spelling-error-in-binary

Installing different overrides files in different architectures of a
Multi-Arch: same package will cause a file conflict on
/usr/share/lintian/overrides/<package> as described in
http://wiki.debian.org/Multiarch/Implementation
    "Note that any files in /usr/share or /etc must be byte-for-byte
    identical across architectures, otherwise file conflicts will
    result! ..."

Installing a superset of the overrides on all architectures will cause
unused-override warnings (which could be overridden ...).

I see the follwing possible solutions, but there are probably more and
better ones:

1. allow installation of overrides in
      /usr/share/lintian/overrides/<package>:<arch>
   (using the multi-arch selection syntax for dpkg and friends) or
      /usr/share/lintian/overrides/<package>.<arch>
   (but that allows for file conflicts between packages "foobar" and
   "foobar.i386") or whatever suffix dpkg will use to distinguish files
   from same package, different arch in /var/lib/dpkg/info.
   This could be done automatically by dh_lintian when encountering a
   debian/[<package>.]lintian-overrides.<arch> file for a Multi-Arch:
   same package in debian/compat level 9.
   Lintian needs to be changed to prefer overrides/<package>:<arch> over
   overrides/<package>.
   A package providing more than one file in
   /usr/share/lintian/overrides/ is malformed.

2. add :<arch> suffix to the overrides as in
    libgl1-nvidia-glx:i386: shlib-with-non-pic-code
    libgl1-nvidia-glx:amd64: shlib-with-executable-stack
    libgl1-nvidia-glx: spelling-error-in-binary
   and ignore override entries for foreign architectures.
   The :<arch> suffix may not be used for Arch: all packages.
   A disadvantage I see here is that it is not easy to exclude an
   override for just one architecture, one has to enumerate all other
   archs and add the override for them. This could be solved by 3.:

3. add architecture selection similar to dpkg as in 
    libgl1-nvidia-glx [i386]: shlib-with-non-pic-code
    libgl1-nvidia-glx [!i386]: shlib-with-executable-stack
    libgl1-nvidia-glx [amd64, i386]: spelling-error-in-binary


Andreas



Reply to: