From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed, 3 Jul 2024 17:31:57 +0200
Subject: test: call dch with --vendor=Ubuntu in reconstruct-changelog

test_reconstruct_changelog fails on Debian unstable:

```
__________________________ test_reconstruct_changelog __________________________

pygit2_repo = pygit2.Repository('/tmp/tmp5ktk68oo/.git/')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7b447f19f2f0>

    @pytest.mark.skipif(
        ENTRY_POINT_TYPE is None,
        reason="Entry point testing not available",
    )
    def test_reconstruct_changelog(pygit2_repo, monkeypatch):
        '''The reconstruct-changelog endpoint should add the expected commit'''
        monkeypatch.setenv('DEBFULLNAME', 'Test User')
        monkeypatch.setenv('DEBEMAIL', 'test@example.com')
        Repo(
            commits=[
                Commit(tree=SourceTree(Source()), name='root'),
                Commit(
                    tree=SourceTree(Source(spec=SourceSpec(mutate=1))),
                    message=' * Test changelog entry',
                    name='child',
                    parents=[Placeholder('root')],
                ),
            ],
            tags={'root': Placeholder('root'), 'child': Placeholder('child')},
        ).write(pygit2_repo)
        pygit2_repo.checkout('refs/tags/child')
        subprocess.check_call(
            [get_entry_point('reconstruct-changelog'), 'HEAD^'],
            cwd=pygit2_repo.workdir,
        )
        with open(os.path.join(pygit2_repo.workdir, 'debian/changelog'), 'r') as f:
            changelog_lines = f.read().splitlines()
> assert changelog_lines[0:4] == [
            'source-builder-package (1-1ubuntu1) UNRELEASED; urgency=medium',
            '',
            ' * Test changelog entry',
            '',
        ]
E AssertionError: assert ['source-buil...ngelog entry'] == ['source-buil...og entry', '']
E
E At index 0 diff: 'source-builder-package (1-1.1) UNRELEASED; urgency=medium' != 'source-builder-package (1-1ubuntu1) UNRELEASED; urgency=medium'
E Use -v to get more diff

gitubuntu/integration_test.py:226: AssertionError
----------------------------- Captured stdout call -----------------------------
```

Call debchange with `--vendor=Ubuntu` to get Ubuntu versioning
regardless of the host distribution.

LP: #2071803
Forwarded: https://code.launchpad.net/~bdrung/git-ubuntu/+git/git-ubuntu/+merge/468691
---
 bin/git-reconstruct-changelog | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/git-reconstruct-changelog b/bin/git-reconstruct-changelog
index cdb2460..7d72a60 100755
--- a/bin/git-reconstruct-changelog
+++ b/bin/git-reconstruct-changelog
@@ -5,7 +5,7 @@ tempfile=`mktemp --tmpdir git-reconstruct-changelog.XXXXXXXXXX`
 cleanup() { rm -f "$tempfile"; }
 trap cleanup EXIT
 
-dch PLACEHOLDER
+dch --vendor=Ubuntu PLACEHOLDER
 sed -n '1,/PLACEHOLDER/{/PLACEHOLDER/!p}' debian/changelog > "$tempfile"
 for rev in `git rev-list --reverse $1..HEAD`; do
 	if [ "`git diff --name-only $rev^ $rev`" = debian/changelog ]; then
