Hi Otto,
thanks for your comments.
On Thu, Feb 12, 2026 at 10:06:09PM +0800, Otto Kekäläinen wrote:
>How would I:
>- convert such a package to have the upstream git history in salsa's
>main branch
>- still be able to do an upload with upstream's signed origtargz
>- probably even have upstream git history in git log of debian/latest?
Thanks to Colin for the additional info.
I'd like to stress that while Colin had these parameters given on the
command-line for the sake of explaining how it works..:
Using "gbp import-orig --upstream-vcs-tag" [1] for the next new release
..
"gbp import-orig --pristine-tar --uscan --upstream-vcs-tag=whatever".
..to will get the dual tar+git import and all of above by simply
always running 'git import-orig --uscan' and having in gbp.conf these
defined:
upstream-vcs-tag = %(version%~%.)s
pristine-tar = True
The format of 'upstream-vcs-tag' needs to be adjusted to match your
upstream's convention.
Yes, that is the way I'd recommend going forward from today. When one is
going back to history, you cannot simply commit a gbp.conf to a past
revision, as this would not only rewrite git history but also rewrite
the history of the actual code.
Perhaps trying out a demo described in
https://lists.debian.org/debian-devel/2026/01/msg00231.html can help
you visually see what exactly is happening in the repo.
First run this to prepare:
cd $(mktemp -d)
gbp clone --add-upstream-vcs https://salsa.debian.org/otto/galera-4-demo.git
cd galera-4-demo/
Then open gitk to see visually the git repo history with all branches:
gitk --all &
Then run the import:
gbp import-orig --uscan --verbose
Then go back to the gitk window and press F5 to have it reload and
show the state of the import.
You will see how the gbp.conf:upstream-vcs-tag automatically applied
and took the upstream git history even though you simply just ran 'gbp
import-orig --uscan'.
Yes, that is the way one would do it when looking forward. It doesn't,
however, actually import the upstream releases that were done between
the state of the repository and today, and looks only at the latest
thing that upstream released.
And, in the galera case, you can't do anything else since their release
directory seems to only contain the latest release, as of today 26.4.22,
so telling uscan to just use 26.4.20 doesn't work.
To your question on how to migrate to this setup, I believe all you
need to do is configure gbp.conf correctly once, and thereafter 'gbp
import-orig --uscan' will do everything automatically (with the caveat
that your starting point was a fairly "normal" Debian packaging git).
I think that I have understand that I can start with today's layout and
go forward with having upstream's future history in Debian git. I just
haven't lived with a repository set up this way for sufficienty long
time to know how it works.
Hoever, gbp import-orig --uscan doesn't touch the history. Look at
https://salsa.debian.org/debian/atop where I started using "your" method
with upstream 2.12. As far as I can see, there is no connection between
upstreamvcs/master and upstream/latest before upstream/2.12.0 (is there
a git spell to verify this short of scrolling through the output of git
log --oneline --graph debian/latest upstream/latest master ?
I would like to have those connections between the release tags of
upstreamvcs and the respective upstream/latest even for upstream release
tags that were imported to upstream/latest with legacy methods such as
gbp import-orig foo.orig.tar.gz.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421