Hi Andrew,
On 02/09/26 14:06, Andrew Lee wrote:
Hi Balachandran,
On Tue, Sep 1, 2026 at 4:05 PM Balachandran Sivakumar
<[email protected]> wrote:
I have raised an MR[1]. But the builds are failing with "Failed due
to unexpected upstream changes". But build and tests pass locally and
gofmt was run as well. Could you please help? Thanks
[1]
https://salsa.debian.org/go-team/packages/dh-make-golang/-/merge_requests/8
This is a common mistake for people new to Debian packaging.
In Debian, the original upstream code is kept clean and unchanged. All
Debian-specific changes and packaging files must go inside the
`debian/` directory. That is why Debian packages are split into two
parts: the original upstream code (`.orig.tar.gz`) and the Debian
modifications (`.debian.tar.xz`).
To fix this, you need to turn your changes into a patch format using
quilt with DEP-3 headers. You can do this automatically from your
current branch by running:
`dpkg-source --commit`
Thanks a lot for the detailed mail. This helped me correct several
mistakes I had made in debian packaging.
This command compares your current work against the clean upstream
code, asks you to name the new patch, and creates the patch file
inside `debian/patches/` with a DEP-3 header template for you to fill
out.
Once you fill out that. You can try to build the package with sbuild
locally before push for salsa-ci.
`apt install sbuild`
`sbuild --chroot-mode=unshare --no-clean-source`
Noticed a few when following these steps
1. dh-make-golang defines a dependency on golang 1.24 in its go.mod
file. But the `debian/control` requires golang-any >1.21. This will fail
to build because of the use of strings.SplitSeq which is available from
>=1.24
2. A few dependencies are changing, either because a direct dependency
has synced with their upstream and so the transitive dependency has
changed, or we don't require that any more.
3. sbuild fails for github.com/google/go-github. I'm still debugging
this. Will have an update by tomorrow. Thanks
--
Thank you,
Balachandran Sivakumar