[git-buildpackage] Questions regarding building process using gbp and an existing git repo
Guido Günther
agx at sigxcpu.org
Wed Aug 12 11:52:12 CEST 2020
Hi Pierre,
On Wed, Aug 12, 2020 at 09:05:34AM +0000, Pierre Equoy wrote:
> 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?
If you want the packaging to persist you commit that on your `debian` branch.
> 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."
It has an effect for comitting a tarball (`--git-pristine-tar-commit`)
but not for creating it. I've clarified that in the docs. Fixed in
https://git.sigxcpu.org/cgit/git-buildpackage/commit/?id=7179893620b3cdcaf199790f345ece805ef9c1f1
thanks!
> 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 think it can be dropped.
> 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
The `--git-` is too much. Fixed in:
https://git.sigxcpu.org/cgit/git-buildpackage/commit/?id=bd1573032c098e96e73dc1f5e35d4823ef378b83
thanks!
>
> 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.
It will not pick up the new upstream version if you
- modified the changelog past the 'import'
- it can't match the upstream tag (--upstream-tag option)
Cheers,
-- Guido
>
> 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.
>
>
> _______________________________________________
> git-buildpackage mailing list
> git-buildpackage at lists.sigxcpu.org
> http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
More information about the git-buildpackage
mailing list