[git-buildpackage] Questions regarding building process using gbp and an existing git repo

Pierre Equoy pierre.equoy at protonmail.com
Wed Aug 12 11:05:34 CEST 2020


Hello!

I'm trying to use gbp to create Debian packages from an upstream git repository.

I've followed the "No upstream tarballs" section from the "When upstream uses Git" page[1] and I'm a bit confused by the result.

I have the following .git/gbp.conf file:

----------------------------
[DEFAULT]
upstream-branch = master
debian-branch = debian
upstream-tag = v%(version)s
----------------------------

In my upstream branch (master), I have a tag on the commit I'd like to create a Debian package from (v0.78).

In the documention, it is said to run:

gbp buildpackage --git-pristine-tar --git-pristine-tar-commit --git-upstream-tag='v%(version)s' --git-debian-branch=debian/sid

however, I get the following error:

----------------------------
gbp:error: You have uncommitted changes in your source tree:
gbp:error: On branch debian
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	debian/

nothing added to commit but untracked files present (use "git add" to track)

gbp:error: Use --git-ignore-new to ignore.
----------------------------

Once I create the debian folder with the required information, do I have to commit it first, or should I use the --git-ignore-new option instead?


Moreover, in the manual page for `git buildpackage`[2], we can see that if --git-pristine-tar is enabled, "the --git-upstream-tag, --git-upstream-tree options have no effect."

Later in the doc[1], it is said to launch

  gbp dch --debian-branch=debian/sid --snapshot --auto debian/

but, again, in the doc page[3], we can read that --auto "is ignored for compatibility with older versions. It used to trigger automatic mode.". Should it be removed from the doc page then?

I managed to build my package in the end, but then, a few lines later, it says to:

gbp dch --release --auto --git-debian-branch=debian

However, when I run this, I get the following error:

gbp dch: error: no such option: --git-debian-branch

If I remove "--git-debian-branch=debian", I can then edit the changelog manually, but the version number is not using the version number from the upstream branch's tag (v0.78), but instead it's using "0.77ubuntu1".

Is it the intended use? In that case, I don't understand at what point the "upstream-tag" option is used.

Thanks in advance for any clarification you may provide!


[1] https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.html
[2] https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/man.gbp.buildpackage.html
[3] https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/man.gbp.dch.html

--
Pierre

Sent with ProtonMail Secure Email.




More information about the git-buildpackage mailing list