• Bug#1105759: git-debpush upstream tag confusion

    From Simon Josefsson@21:1/5 to All on Wed May 14 16:00:01 2025
    Package: git-debpush
    Version: 12.12
    Severity: wishlist

    I got this error:

    jas@kaka:~/dpkg/git2cl$ git debpush --gbp --tag-only
    tags upstream/3.0, v3.0 all exist in this repository
    tell me which one you want to make an orig.tar from: git deborig --just-print '--version=1:3.0-3' TAG
    git-debpush: git-deborig failed; maybe try git-debpush --upstream=TAG jas@kaka:~/dpkg/git2cl$

    The message is correct, but I don't understand why it is confused by the unrelated v3.0 tag.

    jas@kaka:~/dpkg/git2cl$ cat debian/gbp.conf
    [DEFAULT]
    debian-branch = debian/latest
    upstream-branch = upstream/latest
    pristine-tar = True
    jas@kaka:~/dpkg/git2cl$

    I thought gbp defaults where to use upstream/* so v3.0 doesn't match here:

    --upstream-tag=tag-format
    Use this tag format when tagging upstream versions, default is
    upstream/%(version)s.

    Here is my upstream branch:

    jas@kaka:~/dpkg/git2cl$ git log -1 upstream/latest
    commit b2866e9a66b43855a37e462d17a8ba1ca3c51d90 (tag: upstream/3.0, origin/upstream/latest, jas/upstream/latest, upstream/latest)
    Author: Simon Josefsson <simon@josefsson.org>
    Date: Wed Oct 9 15:56:31 2024 +0200

    New upstream version 3.0
    jas@kaka:~/dpkg/git2cl$

    The v3.0 tag is coming from my upstreamvcs remote:

    jas@kaka:~/dpkg/git2cl$ git remote -v
    dgit
    jas git@salsa.debian.org:jas/git2cl.git (fetch)
    jas git@salsa.debian.org:jas/git2cl.git (push)
    origin git@salsa.debian.org:debian/git2cl.git (fetch)
    origin git@salsa.debian.org:debian/git2cl.git (push)
    upstreamvcs https://git.savannah.gnu.org/git/git2cl.git (fetch)
    upstreamvcs https://git.savannah.gnu.org/git/git2cl.git (push) jas@kaka:~/dpkg/git2cl$ git log -1 upstreamvcs/master
    commit 78455e00db59155469212fecae1362be00eb8754 (tag: v3.0, tag: git2cl-3.0, upstreamvcs/master)
    Author: Simon Josefsson <simon@josefsson.org>
    Date: Wed Oct 9 15:16:43 2024 +0200

    Fix git2cl POD doc.

    Reported by Reuben Thomas <rrt@sc3d.org> in
    https://savannah.nongnu.org/bugs/?40235
    jas@kaka:~/dpkg/git2cl$

    FWIW, this is a really nit-pick user experience bug report -- feel free
    to close if it is hard to solve. The workaround is trivial:

    git debpush --gbp --tag-only --upstream=upstream/3.0

    /Simon

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQNoBAEWCAMQFiEEo8ychwudMQq61M8vUXIrCP5HRaIFAmgkoBAUHHNpbW9uQGpv c2Vmc3Nvbi5vcmfCHCYAmDMEXJLOtBYJKwYBBAHaRw8BAQdACIcrZIvhrxDBkK9f V+QlTmXxo2naObDuGtw58YaxlOu0JVNpbW9uIEpvc2Vmc3NvbiA8c2ltb25Aam9z ZWZzc29uLm9yZz6IlgQTFggAPgIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgBYh BLHSvRN1vst4TPT4xNc89jjFPAa+BQJn0XQkBQkNZGbwAAoJENc89jjFPAa+BtIA /iR73CfBurG9y8pASh3cbGOMHpDZfMAtosu6jbpO69GHAP4p7l57d+iVty2VQMsx +3TCSAvZkpr4P/FuTzZ8JZe8BrgzBFySz4EWCSsGAQQB2kcPAQEHQOxTCIOaeXAx I2hIX4HK9bQTpNVei708oNr1Klm8qCGKiPUEGBYIACYCGwIWIQSx0r0Tdb7LeEz0 +MTXPPY4xTwGvgUCZ9F0SgUJDWRmSQCBdiAEGRYIAB0WIQSjzJyHC50xCrrUzy9R cisI/kdFogUCXJLPgQAKCRBRcisI/kdFoqdMAQCgH45aseZgIrwKOvUOA9QfsmeE 8GZHYNuFHmM9FEQS6AD6A4x5aYvoY6lo98pgtw2HPDhmcCXFItjXCrV4A0GmJA4J ENc89jjFPAa+wUUBAO64fbZek6FPlRK0DrlWsrjCXuLi6PUxyzCAY6lG2nhUAQC6 qobB9mkZlZ0qihy1x4JRtflqFcqqT9n7iUZkCDIiDbg4BFySz2oSCisGAQQBl1UB BQEBB0AxlRumDW6nZY7A+VCfek9VpEx6PJmdJyYPt3lNHMd6HAMBCAeIfgQYFggA JgIbDBYhBLHSvRN1vst4TPT4xNc89jjFPAa+BQJn0XTSBQkNZGboAAoJENc89jjF PAa+0M0BAPPRq73kLnHYNDMniVBOzUdi2XeF32idjEWWfjvyIJUOAP4wZ+ALxIeh is3Uw2BzGZE6ttXQ2Q+DeCJO3TPpIqaXDAAKCRBRcisI/kdFogqVAQDAaf5KE7tP Nfw3kbnn+9zucL29lIuW05o7UV2SiBByRAEA+Vl4Z7QK7do9qW3EpNTpsnY9Z3qm K5bDunzz86iLZwU=rGGA
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Josefsson@21:1/5 to Ian Jackson on Wed May 14 16:20:01 2025
    Ian Jackson <ijackson@chiark.greenend.org.uk> writes:

    Simon Josefsson writes ("Bug#1105759: git-debpush upstream tag confusion"):
    Package: git-debpush
    Version: 12.12
    Severity: wishlist
    ...
    The message is correct, but I don't understand why it is confused by the
    unrelated v3.0 tag.
    ...
    I thought gbp defaults where to use upstream/* so v3.0 doesn't match here: >>
    --upstream-tag=tag-format
    Use this tag format when tagging upstream versions,
    default is upstream/%(version)s.

    git-debpush doesn't read gbp.conf nor does it invoke gbp.
    I don't think we want it to do either.

    So making this work like you want isn't going to be very easy.

    Maybe we could talk to the gbp maintainer and ask if there could be a
    common *git* config option (set with `git config`) for this question. git-debrebase needs this information too since it also finds upstream
    tags. As does git-deborig.

    FWIW, this is a really nit-pick user experience bug report -- feel free
    to close if it is hard to solve. The workaround is trivial:

    git debpush --gbp --tag-only --upstream=upstream/3.0

    Right.

    Thanks for the report. This is precisely the kind of thing we would
    like to make nice and smooth. It's a shame that this particular one
    doesn't seem easy.

    Thanks for explanation!

    Btw, this upload resulted in a failure because the orig.tar SHA256
    checksum failed to match what's in the archive. Presumably
    'git-debpush' computed a different orig.tar file than was in the archive
    and also was in the pristine-tar branch.

    Is a 'git-debpush --pristine-tar' relevant?

    Sorry if my questions/reports are silly, I try to not want/need to
    understand any of the internals of how tag2upload works to simulate a
    dumb user.

    /Simon

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQNoBAEWCAMQFiEEo8ychwudMQq61M8vUXIrCP5HRaIFAmgkpU4UHHNpbW9uQGpv c2Vmc3Nvbi5vcmfCHCYAmDMEXJLOtBYJKwYBBAHaRw8BAQdACIcrZIvhrxDBkK9f V+QlTmXxo2naObDuGtw58YaxlOu0JVNpbW9uIEpvc2Vmc3NvbiA8c2ltb25Aam9z ZWZzc29uLm9yZz6IlgQTFggAPgIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgBYh BLHSvRN1vst4TPT4xNc89jjFPAa+BQJn0XQkBQkNZGbwAAoJENc89jjFPAa+BtIA /iR73CfBurG9y8pASh3cbGOMHpDZfMAtosu6jbpO69GHAP4p7l57d+iVty2VQMsx +3TCSAvZkpr4P/FuTzZ8JZe8BrgzBFySz4EWCSsGAQQB2kcPAQEHQOxTCIOaeXAx I2hIX4HK9bQTpNVei708oNr1Klm8qCGKiPUEGBYIACYCGwIWIQSx0r0Tdb7LeEz0 +MTXPPY4xTwGvgUCZ9F0SgUJDWRmSQCBdiAEGRYIAB0WIQSjzJyHC50xCrrUzy9R cisI/kdFogUCXJLPgQAKCRBRcisI/kdFoqdMAQCgH45aseZgIrwKOvUOA9QfsmeE 8GZHYNuFHmM9FEQS6AD6A4x5aYvoY6lo98pgtw2HPDhmcCXFItjXCrV4A0GmJA4J ENc89jjFPAa+wUUBAO64fbZek6FPlRK0DrlWsrjCXuLi6PUxyzCAY6lG2nhUAQC6 qobB9mkZlZ0qihy1x4JRtflqFcqqT9n7iUZkCDIiDbg4BFySz2oSCisGAQQBl1UB BQEBB0AxlRumDW6nZY7A+VCfek9VpEx6PJmdJyYPt3lNHMd6HAMBCAeIfgQYFggA JgIbDBYhBLHSvRN1vst4TPT4xNc89jjFPAa+BQJn0XTSBQkNZGboAAoJENc89jjF PAa+0M0BAPPRq73kLnHYNDMniVBOzUdi2XeF32idjEWWfjvyIJUOAP4wZ+ALxIeh is3Uw2BzGZE6ttXQ2Q+DeCJO3TPpIqaXDAAKCRBRcisI/kdFok9MAP0U9eRe8lOc PggvvMXyGOrgXiIe1l/fFQ/iUvccUoIyDwEApXHljMv+A+NupT7yZThESklZl8Tb GbzZwB7qhcQ6PQ4=KySc
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ian Jackson@21:1/5 to Sean Whitton on Wed May 14 16:40:01 2025
    Sean Whitton writes ("Re: Bug#1105759: git-debpush upstream tag confusion"):
    git-deborig has had this behaviour for a long time and it might be worth revisiting it. Perhaps it is being too cautious: perhaps it should
    always prefer an upstream/NN tag to NN or vNN if there is an upstream/NN present. How about that?

    This seems contrary to the key principle that it is better to stop
    with an error, doing nothing, than to risk doing the wrong thing.

    We could check if these tags all refer to the same commit.

    Ian.

    --
    Ian Jackson <ijackson@chiark.greenend.org.uk> These opinions are my own.

    Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
    that is a private address which bypasses my fierce spamfilter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean Whitton@21:1/5 to Simon Josefsson on Wed May 14 16:40:01 2025
    Hello,

    git-deborig has had this behaviour for a long time and it might be worth revisiting it. Perhaps it is being too cautious: perhaps it should
    always prefer an upstream/NN tag to NN or vNN if there is an upstream/NN present. How about that?

    On Wed 14 May 2025 at 04:14pm +02, Simon Josefsson wrote:

    Btw, this upload resulted in a failure because the orig.tar SHA256
    checksum failed to match what's in the archive. Presumably
    'git-debpush' computed a different orig.tar file than was in the archive
    and also was in the pristine-tar branch.

    Is a 'git-debpush --pristine-tar' relevant?

    I don't think so -- in every case where we might get something out of pristine-tar we can instead get it from the archive, and the latter is preferable.

    --
    Sean Whitton

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJNBAEBCgA3FiEEm5FwB64DDjbk/CSLaVt65L8GYkAFAmgkqPMZHHNwd2hpdHRv bkBzcHdoaXR0b24ubmFtZQAKCRBpW3rkvwZiQGAvD/0UQYYblvWASdwOTaFqAFEv je1Qwu6uOPf+w2sd/nClFJP4VurqLkU9tSzhR0GXGd4n7jLrTdsjOsSwhli08kbC huX1FR+vReQUn9wya/i0tCImBIHLtT1159vRZphHC+o93ZtC8ToeeXuW0VHTAVvq AbsPqzz+denR/uw+QaCIqaSCqBZWGnGJAV/En8VyPe8mJve8L1pjzgKRJS9zUkS8 4dKp1ex2FptkfpEHCT36ivChzZTwpZd0KpEN4KYTkEERwix94YN5MZC4XltwY9fw wDQUFS5lsoG5tQp3XOHj53wSnb15mr3/1jOBr4ZJgfrhcCAofwB+QfZWKeQQKuke YvgdjUVMSc5OR6KkoLOSs1jkVSwx0FHEa74Y39yDSlr9SxbjNzbfNZIMMlfE5wbs 9Hxj2Xz65iqp91As5A4hnUP4Fb+23H2H0e/oPzQYUJlLkRnENah0ugIyrR2cpvRH bunqE9KDvOzZP5jPTGnxHvYVj7NThYii21F9Dev3AIdA70D43hm1i/rpj+dL6wfP jUoFffbitqjwNVPgT2MuPPv0RMrpN6bS+HFaSP9xi0l+yd1pqwqybwq1aJsdEJOE HYuJXU6kqtT0F8++vUQks//V5Ywe7ReVDXWkR8G3xodVGd/xIlGd8evV12OzpDgh mkfm+HAeb4dCHjmk1iEEDQ==6y1y
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us
  • From Sean Whitton@21:1/5 to Ian Jackson on Wed May 14 16:50:02 2025
    Hello,

    On Wed 14 May 2025 at 03:33pm +01, Ian Jackson wrote:

    Sean Whitton writes ("Re: Bug#1105759: git-debpush upstream tag confusion"):
    git-deborig has had this behaviour for a long time and it might be worth
    revisiting it. Perhaps it is being too cautious: perhaps it should
    always prefer an upstream/NN tag to NN or vNN if there is an upstream/NN
    present. How about that?

    This seems contrary to the key principle that it is better to stop
    with an error, doing nothing, than to risk doing the wrong thing.

    True.

    We could check if these tags all refer to the same commit.

    Yes, that would make sense, but it would probably help only a minority
    of cases. You create the upstream/NN tag because the vNN tag doesn't
    point to the right place (e.g. you've done an gbp import-orig on top of
    it).

    --
    Sean Whitton

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJNBAEBCgA3FiEEm5FwB64DDjbk/CSLaVt65L8GYkAFAmgkqvUZHHNwd2hpdHRv bkBzcHdoaXR0b24ubmFtZQAKCRBpW3rkvwZiQL0+EACge5HPdrbFofKZNBaax8sH R8iKGVPzriQWKK0fFn7JNue5Nw8XrweV0IFsahulWH5Fv+N5UNLerlIWSC72SKee THUkEdqlKzNHWejOS5a7c3FAXx9WUdyUABA+5sxolBVftl4HxHa8MZ6wq3ZMVbzQ rHOmCBHCV3zskKxrIOv5KCt4yn2d9+DBtsJ/XNBOpphA30n6COv5N00Wn2yJMX4+ ScIuJK1DZNRt8i6n0EaYIhq6WKW6JW0Eqq4qdTIQNcuavxS+f1SQ+TuerNZF5QlN LvXms72HCgWJPpepCaHt5LKNPHZ6hJB+1/Poa5I9PM+5LQNKFzNGLvaFf1oEksmt xNZws/VKSrs/T8D1P/BTmjfUK5HtbhDPgVo1+/jGPVFeIOmGAtg/9ASdZf15G7ft UKbCy6H+AX2hRBpuDqfnNqg2WJX3q2Qfw13ZGwQz+yMvjVqAjr7qMvl7uiRBjUqr vEQXOYSBnkcwXADdaFqpcBPhiX2scyMsyPjbS7ORh4jTIkZ5xhYy6Jt7qO9dId2g RG2ekPk+RzGO6oMca/GTtVqinRch9UGaEWbe0rUMEGbfPrd0h6w+7JHqS//CEhhz SNfVES+rvMz3raIA+BPis1WoaV2WF+QUqsqjSg0fF19bNlSlOgp9aEYH5U3b+DkO QuHTVvrPsViPY38sszgdWA==ys40
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us