Package: debhelper
Version: 13.20
Severity: normal

Hi! I've just tried out compat 14 to start preparing one of my packages to it, but noticed that the dh-sequence-single-binary dependency doesn't work as expected. According to the manpage, if that addon is used, dh_auto_build should install files to debian/singlepackage/, not debian/tmp/, but this is not what I'm observing. Here's a reproducer:

   $ cat Makefile
   .POSIX:
# Paths
   PREFIX = /usr/local
   BINDIR = bin
# Utilities
   INSTALL = install
   MKDIR = mkdir -p
   RM = rm -f
all: main main: main.o main.o: main.c install: main
        $(MKDIR) $(DESTDIR)$(PREFIX)/$(BINDIR)
        $(INSTALL) main $(DESTDIR)$(PREFIX)/$(BINDIR)
uninstall:
        $(RM) $(DESTDIR)$(PREFIX)/$(BINDIR)/main
clean:
        $(RM) main main.o
.PHONY: all clean install uninstall $ cat main.c
   #include <stdio.h>
int main(void) {
        puts("Hello, world!");
        return 0;
   }
$ cat debian/changelog
   compat-14-test (1.0) UNRELEASED; urgency=low
* Initial release. (Closes: #XXXXXX) -- Andrea Pappacoda <and...@pappacoda.it> Tue, 24 Sep 2024 23:33:13 +0200 $ cat debian/control
   Source: compat-14-test
   Section: misc
   Priority: optional
   Maintainer: Andrea Pappacoda <and...@pappacoda.it>
   Build-Depends:
    debhelper (>= 13~),
    dh-sequence-single-binary,
    dpkg-build-api (= 1),
   Standards-Version: 4.7.0
   X-DH-Compat: 14
   X-Style: black
Package: compat-14-test
   Architecture: any
   Description: test for debhelper compat 14
$ cat debian/rules
   #!/usr/bin/make -f
%:
        dh $@
override_dh_auto_install:
        dh_auto_install -- PREFIX=/usr

   $ cat debian/source/format
   3.0 (native)

If I build the package as-is, the build fails as follows:

   dh_auto_install -- PREFIX=/usr
        make -j12 install DESTDIR=/tmp/tmp.hKSeWe1Ril/compat-14-test/debian/tmp 
AM_UPDATE_INFO_DIR=no "INSTALL=install --strip-program=true" PREFIX=/usr
   make[2]: Entering directory '/tmp/tmp.hKSeWe1Ril/compat-14-test'
   mkdir -p /tmp/tmp.hKSeWe1Ril/compat-14-test/debian/tmp/usr/bin
   install --strip-program=true main 
/tmp/tmp.hKSeWe1Ril/compat-14-test/debian/tmp/usr/bin
   install: WARNING: ignoring --strip-program option as -s option was not 
specified
   make[2]: Leaving directory '/tmp/tmp.hKSeWe1Ril/compat-14-test'
   make[1]: Leaving directory '/tmp/tmp.hKSeWe1Ril/compat-14-test'
      dh_installdocs
      dh_installchangelogs
      dh_perl
      dh_link
      dh_missing
   dh_missing: warning: usr/bin/main exists in debian/tmp but is not installed 
to anywhere
        The following debhelper tools have reported what they installed (with 
files per package)
        * dh_installdocs: compat-14-test (0)
        If the missing files are installed by another tool, please file a bug 
against it.
        When filing the report, if the tool is not part of debhelper itself, 
please reference the
        "Logging helpers and dh_missing" section from the "PROGRAMMING" guide 
for debhelper (10.6.3+).
         (in the debhelper package: /usr/share/doc/debhelper/PROGRAMMING.md.gz)
        Be sure to test with dpkg-buildpackage -A/-B as the results may vary 
when only a subset is built
        If the omission is intentional or no other helper can take care of this 
consider adding the
        paths to debian/not-installed.
   dh_missing: error: missing files, aborting
   make: *** [debian/rules:4: binary] Error 255

As you can see, the files get installed in debian/tmp even if the addon is present, which then leads to a failure. The same exact package, under compat 13, builds fine.

Am I misunderstanding what dh-sequence-single-binary should do? If I add a bare debian/install file then the build completes successfully under compat 14, but fails in compat 13.

Bye!

Attachment: signature.asc
Description: PGP signature

Reply via email to