#1152228 dpkg-buildpackage: 3.0 (git) format fails: dpkg-genchanges: error: cannot fstat file ../package_version.git

Package:
dpkg
Source:
dpkg
Description:
Debian package management system
Submitter:
James Dingwall
Date:
2026-10-26 22:01:01 UTC
Severity:
normal
#1152228#5
Date:
2026-10-26 21:20:38 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

I am attempting to create a `dpkg-buildpackage` gitlab pipeline which creates
a .deb from the git source tree.  This works in an Ubuntu 24.04 derived
container but fails when the container is from Ubuntu 26.04 or Debian Sid.

The pipeline command is: `dpkg-buildpackage -us -uc`

The last lines of the build log:

dpkg-deb: building package 'python3-example' in '../python3-example_0.0.0_all.deb'.
 dpkg-genbuildinfo -O../example_0.0.0_amd64.buildinfo
 dpkg-genchanges -O../example_0.0.0_amd64.changes
dpkg-genchanges: error: cannot fstat file ../example_0.0.0.git: No such file or directory
dpkg-buildpackage: error: dpkg-genchanges -O../example_0.0.0_amd64.changes subprocess failed with exit status 255

The example_0.0.0.git file exists in the git root path and not the parent
directory.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I tried to patch the Git.pm perl code from the 24.04 container to 26.04 but
that did not help.  The git history showed some changes for `chdir` in that
file but they appeared to relate to logging rather than functionality.

See also: https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2148043