[debhelper-devel] Bug#887571: debhelper: dh lies about what it does, breaks builds by creating new files, etc

Norbert Preining norbert at preining.info
Thu Jan 18 03:38:04 UTC 2018


Package: debhelper
Version: 11.1.2
Severity: serious
Justification: breaks other packages

Dear DebHelper developers,

thanks for your efforts, but it would be very helpful if debhelper/dh
would stick to what itself says it is doing.

I am trying to build texlive-bin, and somewhere at/around the configure
stage files
  configure.lineno
are created, which break building:
  checking whether g++ accepts -g... no
  checking dependency style of g++... none
  checking what warning flags to pass to the Objective C++ compiler...
  ../../../texk/web2c/configure: 20010: ./configure.lineno: Syntax error: Bad fd number
  === configuring in web2c failed

I confirmed the following:
* doing the same invocation of configure manually does NOT create
  configure.lineno and the build succeeds.
* what dh says it is doing with 
    dh binary --no-act ...
  is *different* from what is actually happening, since doing the exact
  same things as listed by dh binary --no-act immediately breaks

Example for this (the reautoconf stage has already been done):
  $ dh binary --no-act --with autoreconf --builddirectory Work
  debian/rules override_dh_auto_configure
  dh_auto_build -O--builddirectory=Work
  dh_auto_test -O--builddirectory=Work

But doing
  $ debian/rules override_dh_auto_configure
breaks becasue it does not change into Work before calling configure.

Adding the obviously necessary
  DH_INTERNAL_BUILDFLAGS=1
  DH_INTERNAL_OPTIONS=-O--builddirectory=Work
  DH_INTERNAL_OVERRIDE=dh_auto_configure
make the above command work, but somewhere/somehow starts creating
configure.lineno files, while doing the configure.

Calling make -f debian/rules binary I see the following:
$ make -f debian/rules binary
dh binary --with autoreconf --builddirectory Work
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/home/norbert/Development/TeX/debian/git/build-area/texlive-bin-2018.20180118.46355'
# we have to make sure that the mendex test case that is added
# by a patch is executable
chmod 0755 texk/mendexk/tests/mendex.test
# run out configure script
dh_auto_configure -- -C --prefix=/usr 	\
--datarootdir=/usr/share/texlive	\
--disable-native-texlive-build		\
.... OTHER configure args
--enable-ipc
	cd Work && ../configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdi....
  ....
configure: creating cache config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc

and at this time
  configure.lineno
is already existing, and propagated down the tree and breaking the build
builds.

But doing by hand, EVEN with the above three env variables set, doing
only the
  cd Work && ../configure --build=x86_64-lin ...
part does NOT create configure.lineno.


Also running
  dh_auto_configure -- -C --prefix=/usr 	\
	--datarootdir=/usr/share/texlive	\
  ....
does NOT create configure.lineno.

As a consequence, the only remaining candidate is that 
  dh
does *something*else* before calling the targets or setting env vars.

This is extremely difficult to debug without a proper documentation and
completely unreproducible behaviour from dh.

It is hard to guess what happens here, and I would be very grateful for
an expanation what else dh is doing before calling the actual things it
says it is calling.

Best

Norbert

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.13 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  autotools-dev            20171216.1
ii  binutils                 2.29.1-13
ii  dh-autoreconf            15
ii  dh-strip-nondeterminism  0.040-1
ii  dpkg                     1.19.0.4
ii  dpkg-dev                 1.19.0.4
ii  file                     1:5.32-1
ii  libdpkg-perl             1.19.0.4
ii  man-db                   2.7.6.1-4
ii  perl                     5.26.1-4
ii  po-debconf               1.0.20

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn  dh-make  <none>
pn  dwz      <none>

-- no debconf information




More information about the debhelper-devel mailing list