• Re: Converting dnstop to track upstream git

    From Ahmad Khalifa@21:1/5 to Marc Haber on Fri May 30 20:40:01 2025
    On 30/05/2025 19:10, Marc Haber wrote:
    Now, how do I tell gbp from which commit on upstream/latest I want to
    base my next Debian version? How can I tell gbp to take HEAD of upstream/latest as the base of my current debian work AND allow gbp buildpackage to not complain about the out-of-debian/ changes?

    If there are no tags, you can change d/watch to track HEAD in git mode,
    then it's
    $ gbp import-orig --uscan

    That will import d/watch HEAD as a new commit on upstream branch, tag
    upstream commit, then merge it into debian branch.
    (I believe uscan does a shallow clone to get a tarball)

    Example d/watch with version mangling looks like this: https://salsa.debian.org/debian/openrgb/-/blob/debian/latest/debian/watch


    PS, since you don't have a gbp.conf file, you may need to pass --upstream-branch and --debian-branch to all gbp commands.
    Otherwise, the defaults are master and upstream.

    --
    Regards,
    Ahmad

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to All on Fri May 30 20:20:01 2025
    Hi,

    I have chosen dnstop to be my first target to follow Otto's excellent
    aricle about creating Debian packages using upstream git (https://optimizedbyotto.com/post/debian-packaging-from-git/).

    However, of course, it is not THAT easy. dnstop being a slowly moving
    package both in upstream and in Debian, the package has already had a
    numnber of uploads to Debian, and is already on salsa. Upstream doesn't
    do releases and they don't tag anything in their github git. The past
    Debian uploads were made from tarring up their archive, building a local .orig.tar.gz followed by gbp import-orig into the git that eventually
    ended up on salsa. I didn't know any better.

    I have recently reorganized the salsa project https://salsa.debian.org/debian/dnstop/-/branches to follow
    DEP-something branch names.

    old-upstream/latest is the former upstream
    branch with the gbp import-orig of the fake .orig.tar.gz files. The tags
    made by gbp import-orig were renamed to old-upstream/VERSION as well. upstream/latest was branched off from the upstream git
    debian/latest is still the old variant with debian packaging put on old-upstream/latest.

    I locally have a repository:
    $ git remote -v show
    origin git@salsa.debian.org:debian/dnstop.git (fetch)
    origin git@salsa.debian.org:debian/dnstop.git (push)
    upstreamvcs https://github.com/measurement-factory/dnstop (fetch) upstreamvcs https://github.com/measurement-factory/dnstop (push)

    master tracks upstreamvcs/master
    other local branches track the branches that are present on salsa.

    Now, how do I tell gbp from which commit on upstream/latest I want to
    base my next Debian version? How can I tell gbp to take HEAD of
    upstream/latest as the base of my current debian work AND allow gbp buildpackage to not complain about the out-of-debian/ changes?

    Thank you for commenting. Whatever you do, please do not push to
    debian/latest on salsa. I do not only want to have the repository in
    the desired state, I also want to learn how to get there. You can push
    new branches as you want to, just please dont touch the existing ones.

    Thanks!

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Haber@21:1/5 to Ahmad Khalifa on Fri May 30 21:40:01 2025
    On Fri, May 30, 2025 at 07:37:09PM +0100, Ahmad Khalifa wrote:
    On 30/05/2025 19:10, Marc Haber wrote:
    Now, how do I tell gbp from which commit on upstream/latest I want
    to base my next Debian version? How can I tell gbp to take HEAD of >>upstream/latest as the base of my current debian work AND allow gbp >>buildpackage to not complain about the out-of-debian/ changes?

    If there are no tags, you can change d/watch to track HEAD in git
    mode, then it's
    $ gbp import-orig --uscan

    Thank you. That was helpful. Having to go through a d/watch file and
    uscan for some reason feels like a detour, but it actually worked.

    PS, since you don't have a gbp.conf file, you may need to pass >--upstream-branch and --debian-branch to all gbp commands.
    Otherwise, the defaults are master and upstream.

    I have that set in ~/.gbp.conf, but you're of course right, that belongs
    also in debian/gbp.conf. Done.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)