#1140560 debrebuild: dpkg and mmdebstrap builders die on buildinfos without Build-Path

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Serge Schneider
Date:
2026-06-22 18:39:02 UTC
Severity:
normal
Tags:
#1140560#5
Date:
2026-06-22 18:37:08 UTC
From:
To:
Dear Maintainer,

Since Build-Path is an optional field, debrebuild should work without it.
dpkg-genbuildinfo only sets it if it starts with '/build/'.

What actually happens:

$ mkdir -p /tmp/debrebuild
$ cd /tmp/debrebuild/
$ wget
https://buildinfos.debian.net/buildinfo-pool/h/hello/hello_2.12.3-1_amd64.buildinfo

Edit the buildinfo file to remove the field:
@@ -18,7 +18,6 @@
 Build-Origin: Debian
 Build-Architecture: amd64
 Build-Date: Thu, 14 May 2026 08:56:42 +0000
-Build-Path: /build/reproducible-path/hello-2.12.3
 Installed-Build-Depends:
  autoconf (= 2.72-6),
  automake (= 1:1.18.1-4),

$ debrebuild hello_2.12.3-1_amd64.buildinfo --buildresult=./out
--builder=mmdebstrap
...
I: skipping cleanup/reproducible as requested
I: creating tarball...
I: done
I: removing tempdir /tmp/mmdebstrap.wJ7g2t3a61...
I: success in 22.2760 seconds
fileparse(): need a valid pathname at /usr/bin/debrebuild line 700.

I've attached a patch that sets the build path to
/build/$srcpkgname-$upstream_ver for the dpkg and mmdebstrap builders. It's
not ideal but it does resolve the problem.

Kind regards,

Serge
--- /etc/devscripts.conf ---
Empty.
--- ~/.devscripts --- Not present