#1034710 dpkg-gensymbols: Add higher check level for unnecessary entries in symbols file

#1034710#5
Date:
2023-04-22 10:07:07 UTC
From:
To:
When building libvirt, dpkg-gensymbols currently produces the
following output:

  dpkg-gensymbols: warning: debian/libvirt0/DEBIAN/symbols doesn't match completely debian/libvirt0.symbols
  --- debian/libvirt0.symbols (libvirt0_9.2.0-2_amd64)
  +++ dpkg-gensymbolsFLVUCu	2023-04-22 11:43:15.646242440 +0200
  @@ -1,5 +1,5 @@
   libvirt-admin.so.0 libvirt0 #MINVER#
  - (symver|optional)LIBVIRT_ADMIN_1.3.0 1.2.18
  +#MISSING: 9.2.0-2# (symver|optional)LIBVIRT_ADMIN_1.3.0 1.2.18
    (symver|optional)LIBVIRT_ADMIN_2.0.0 2.0.0~rc1
    (symver|optional)LIBVIRT_ADMIN_3.0.0 3.0.0
    (symver|optional)LIBVIRT_ADMIN_8.6.0 8.9.0

This is because debian/libvirt0.symbols contains

  libvirt-admin.so.0 libvirt0 #MINVER#
   *@LIBVIRT_ADMIN_1.3.0 1.2.18

even though no LIBVIRT_ADMIN_1.3.0 symbol was ever added to the
library.

It would be nice if such a mistake on the maintainer's part could be
reported in a way that can't be easily missed or ignored, i.e. a
build failure. After the maintainer has explicitly opted into this
behavior by setting DPKG_GENSYMBOLS_CHECK_LEVEL, of course :)

#1034710#10
Date:
2023-06-09 02:21:17 UTC
From:
To:
Hi!

I think this is a good idea, and I'm planning on implementing it. The
problem is that I don't know for example in Debian how many packages
might FTBFS due to this. So off-hand adding this as part of an
existing check level might be problematic. Adding it as a higher level
would imply requiring more checks than the ones the maintainer might
want to handle, so that does not look like a nice option, even if it
would be the safest one. I guess if the check selection had been
implemented as an union of strings instead of integer levels, it would
be more extensible.

Thanks,
Guillem