#1133285 dh-debputy: report missing B-D before the build

#1133285#5
Date:
2026-04-11 17:14:16 UTC
From:
To:
Hello.

The dpkg-buildpackage command in the following script fails with:
  debputy internal-command dpkg-build-driver-run-task clean
  rm -fr ./autom4te.cache _build
  dh_autoreconf_clean
  dh_clean dh_clean: error: Please specify the compatibility level in debian/control. Such as, via Build-Depends: debhelper-compat (= X)
  debputy: error: The command dh_clean failed with status: 255
  dpkg-buildpackage: error: debputy internal-command dpkg-build-driver-run-task clean subprocess returned exit status 1

In case it helps, a direct call to debputy (last line) succeeds with:
  dpkg-buildtree clean
  rm -fr debian/.debputy

Also, if configure.ac,Makefile.am are replaced by a hand-written
Makefile, all goes as expected.


#!/bin/sh
set -Cefu
mkdir tmp tmp/truc tmp/truc/debian tmp/truc/debian/source
cd tmp
touch truc/Makefile.am
cat > truc/configure.ac <<EOF
AC_INIT([truc], [1])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
tar -caf truc_1.orig.tar.gz truc
cat > truc/debian/changelog <<EOF
truc (1-1) UNRELEASED; urgency=medium

  * Test

#1133285#10
Date:
2026-04-11 17:56:30 UTC
From:
To:
Nicolas Boulenguez:

Hi,

Thanks for the report.

Unfortunately, this is "intentional" in the sense that an autotools
build system triggers `dh_autoreconf` and and therefore `dh_clean` is
needed.

What is missing is that `debputy` should have an error for using
`autotools` without the proper build dependency (or a port of
`dh_autoreconf` that does not require `debhelper`). This is part of
https://salsa.debian.org/debian/debputy/-/issues/115

Best regards,
Niels

#1133285#17
Date:
2026-04-11 17:56:30 UTC
From:
To:
Nicolas Boulenguez:

Hi,

Thanks for the report.

Unfortunately, this is "intentional" in the sense that an autotools
build system triggers `dh_autoreconf` and and therefore `dh_clean` is
needed.

What is missing is that `debputy` should have an error for using
`autotools` without the proper build dependency (or a port of
`dh_autoreconf` that does not require `debhelper`). This is part of
https://salsa.debian.org/debian/debputy/-/issues/115

Best regards,
Niels