Bug#958945: lintian,debhelper: lintian emits missing-dependency-on-libc on auto-generated dbgsym package

2020-04-26 Thread Axel Beckert
Control: reassign -1 lintian 2.68.0
Control: retitle -1 lintian: Should emit an error on non-debug files in dbgsym 
packages

Hi again,

Axel Beckert wrote:
> From upstream's (generated) Makefile:
> 
> 
> linstall: | libipt_NETFLOW.so libip6t_NETFLOW.so
> @echo " *"
> install -D libipt_NETFLOW.so 
> $(DESTDIR)$(IPTABLES_MODULES)/libipt_NETFLOW.so
> install -D libip6t_NETFLOW.so 
> $(DESTDIR)$(IPTABLES_MODULES)/libip6t_NETFLOW.so
> 

There's one more interesting (surely generated) snippet in there:


IPTABLES_MODULES = /usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug


Makefile.in looks like this in the same place:


IPTABLES_MODULES = @IPTABLES_MODULES@


configure replaces this as follows:


s!@IPTABLES_MODULES@!$IPTLIB!


And from the build log:


Iptables module path: /usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug (from 
binary)


And indeed, the way to determine this value seems to be buggy:


$ strings /sbin/iptables | grep '^/.*lib.*/.*tables'
/usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug


I searched the output of "strings /sbin/iptables" for other, similar
paths, but there's just none:


$ strings /sbin/iptables | grep 'usr'
/usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug
$ strings /sbin/iptables | grep 'lib'
/lib64/ld-linux-x86-64.so.2
libmnl.so.0
libnftnl.so.11
libxtables.so.12
libc.so.6
__libc_start_main
/usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug
$ strings /sbin/iptables | grep 'x86'
/lib64/ld-linux-x86-64.so.2
/usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug


So the main issue here seems upstream's self-written configure script
that fails on recent iptables binaries.

> Maybe lintian should warn about non-debug stuff in dbgsym packages?
> I'll probably later retitle and reassign the bug report to lintian
> accordingly — once I've better understood wtf is going on here.

I'm convinced now that lintian should emit such a warning. Retitling
and reassigning accordingly.

This tag should be very likely of severity "error".

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#958945: lintian,debhelper: lintian emits missing-dependency-on-libc on auto-generated dbgsym package

2020-04-26 Thread Axel Beckert
Hi,

Axel Beckert wrote:
> E: iptables-netflow-dkms-dbgsym: missing-dependency-on-libc needed by 
> usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug/libip6t_NETFLOW.so and 1 
> others
> 
> Since I can't really influence the automatic debug symbol package, this
> must be either a false positive in Lintian or a bug in debhelper.

The issue actually might be elsewhere and the error issued by Lintian
might be correct. I though actually still don't know what happens
here, especially not why.

>From upstream's (generated) Makefile:


linstall: | libipt_NETFLOW.so libip6t_NETFLOW.so
@echo " *"
install -D libipt_NETFLOW.so 
$(DESTDIR)$(IPTABLES_MODULES)/libipt_NETFLOW.so
install -D libip6t_NETFLOW.so 
$(DESTDIR)$(IPTABLES_MODULES)/libip6t_NETFLOW.so


For some reason this causes the file paths mentioned in the lintian
warning to be used:



$ make -n DESTDIR=debian/tmp linstall
echo " *"
install -D libipt_NETFLOW.so 
debian/tmp/usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug/libipt_NETFLOW.so
install -D libip6t_NETFLOW.so 
debian/tmp/usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug/libip6t_NETFLOW.so
$ echo $IPTABLES_MODULES

$


So I suspect this is the cause for the then likely correct but kinda
misleading lintian warning.

Maybe lintian should warn about non-debug stuff in dbgsym packages?
I'll probably later retitle and reassign the bug report to lintian
accordingly — once I've better understood wtf is going on here.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug#958945: lintian,debhelper: lintian emits missing-dependency-on-libc on auto-generated dbgsym package

2020-04-26 Thread Axel Beckert
Package: lintian,debhelper
Severity: important
Version: debhelper/13 lintian/2.68.0

Hi,

while preparing the iptables-netflow/2.5-1 upload lintian emits this
packaging error (both with dh compat 11 as well as with level 12):

E: iptables-netflow-dkms-dbgsym: missing-dependency-on-libc needed by 
usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug/libip6t_NETFLOW.so and 1 
others

Since I can't really influence the automatic debug symbol package, this
must be either a false positive in Lintian or a bug in debhelper. Filing
against both packages for now. Feel free to reassign as needed.

The generated and accused dbgsym-package with still dh compat level 11
looks like this:

$ debc
iptables-netflow-dkms-dbgsym_2.5-1_amd64.deb

 new Debian package, version 2.0.
 size 6264 bytes: control archive=516 bytes.
 321 bytes,11 lines  control  
 207 bytes, 2 lines  md5sums  
 Package: iptables-netflow-dkms-dbgsym
 Source: iptables-netflow
 Version: 2.5-1
 Auto-Built-Package: debug-symbols
 Architecture: amd64
 Maintainer: Axel Beckert 
 Installed-Size: 59
 Depends: iptables-netflow-dkms (= 2.5-1)
 Section: debug
 Priority: optional
 Description: debug symbols for iptables-netflow-dkms
drwxr-xr-x root/root 0 2020-04-27 03:26 ./
drwxr-xr-x root/root 0 2020-04-27 03:26 ./usr/
drwxr-xr-x root/root 0 2020-04-27 03:26 ./usr/lib/
drwxr-xr-x root/root 0 2020-04-27 03:26 ./usr/lib/debug/
drwxr-xr-x root/root 0 2020-04-27 03:26 ./usr/lib/debug/.dwz/
drwxr-xr-x root/root 0 2020-04-27 03:26 
./usr/lib/debug/.dwz/x86_64-linux-gnu/
drwxr-xr-x root/root 0 2020-04-27 03:26 
./usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug/
-rw-r--r-- root/root 23752 2020-04-27 03:26 
./usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug/libip6t_NETFLOW.so
-rw-r--r-- root/root 23752 2020-04-27 03:26 
./usr/lib/debug/.dwz/x86_64-linux-gnu/iptables.debug/libipt_NETFLOW.so
drwxr-xr-x root/root 0 2020-04-27 03:26 ./usr/share/
drwxr-xr-x root/root 0 2020-04-27 03:26 ./usr/share/doc/
lrwxrwxrwx root/root 0 2020-04-27 03:26 
./usr/share/doc/iptables-netflow-dkms-dbgsym -> iptables-netflow-dkms

[... other packages ...]

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'unstable-debug'), 
(500, 'buildd-unstable'), (110, 'experimental'), (1, 'experimental-debug'), (1, 
'buildd-experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.5.0-1-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled