Append +ds suffix to upstream version when repacking - #298
Conversation
|
It is not evident to me why Note: Git commit does not follow project conventions, you could just write |
|
isn't the suggested suffix (as per note that i have no clue about team policy here, so please disregard my comment if it is off. |
|
Thanks for the reviews! Logic and Timing Suffix Convention Commit Message |
8915e54 to
42840db
Compare
|
Thanks for the explanation about The repackaged suffix does not seem to be defined in the Debian Policy. Both the Developers Reference and the uscan man page mention |
Thanks for the detailed review!
Ready for another look. |
What lintian tag are you referring to exactly? At least the man page for
So the digit is not that strange. I think this digit can help in more complex packages, to indicate that the repacked tarball has changed when e.g. more files have been removed from it. This is uncommon and maybe not that important, but I don't think this digit hurts and I think it is better to not change something for no reason. Otherwise great addition to dh-make-golang, I've been bitten by this already. |
i guess |
|
Reverted back to the correct one! |
There is no clear "correct" one. It is true that |
|
I do not have any strong opinion, I was simply against changing something for no reason. In this case the Lintian tag |
|
@aviralgarg05 I advertised this on the mailing list https://lists.debian.org/debian-go/2026/02/msg00097.html to get more opinions so we can finalize and merge this. Meanwhile, if you have time, please consider reviewing other open PRs by other people so to motivate them to review yours. Thanks! |
|
After thinking about this and re-reading the comments above, I think we should not have the digit and thus probably the optimal is to have |
When vendorDirs or Godeps are detected, append the +ds suffix to the upstream version. This ensures consistency between the generated debian/changelog, debian/watch, and orig tarball naming. The +ds suffix (without digit) follows the Lintian anticipated-repack-count recommendation and aligns with uscan defaults. Fixes: Debian#141
1093917 to
58fbe05
Compare
|
I was planning to merge this now, but in addition to the actual commit it has an extra merge commit. Can you rebase on latest 'master' or do you want me to merge this manually? |
|
I think using +ds1 as default is better, it's just one more digit, and makes any potential repackaging bump uniform. This does not need to be a mistake, it can well be due to not needing vendored modules anymore for example, because they have been uploaded as separate packages. |
|
It also maps to other similar version designators where we do not start them w/o any version, but with 1, such as +nmu1, or +b1 or similar, which means having a uniform generic pattern means less rules to have to explain or remember, and thus more consistent overall versioning behavior. |
|
As discussed above, there is always also a Debian revision, so having extra digit is not necessary. E.g. after version |
|
They are different things, one is the upstream marker the other the packaging revision after a repack iteration the revision gets reset, from 1.0.0+ds1-1 you'd go into 1.0.0+ds2-1 (not -2). If I saw a revision skip I'd wonder what happened here, and I'd be prompted to try to check the BTS or git history, which in this case would be useless, and inconclusive. This goes back to avoiding to use strange and non-uniform versioning schemes, which either need explanation or documentation in the changelog or whareve, instead of using the obvious. Optimizing the version scheme to avoid a single character, at the cost of making this non-uniform and unobvious seems like the wrong thing to be optimizing on. |
Description
This PR resolves the issue where the upstream version/tag used in the initial packaging was not aligned with the
debian/watchfile expectations when repacking is involved.Previously,
dh-make-golangwould correctly configuredebian/watchwithrepacksuffix=+ds1if it detected that vendor directories or Godeps needed to be removed. However, the initial package version (used for the.orig.tarname and the firstdebian/changelogentry) did not include this suffix, leading to a mismatch that caused issues for tools likeuscanandgbp.Changes:
+ds1suffix to the upstream version whenever repacking is detected (len(u.vendorDirs) > 0 || u.hasGodeps).package_version+ds1.orig.tar.xz.debian/changelogentry starts withversion+ds1-1.debian/watchfile (which expects+ds1for repacked tarballs) is perfectly aligned with the package state.Related Issue
Fixes #141
Verification Performed
go test ./...and confirmed all tests pass.go build.go vet ./....gofmt -s.u.versionmodification happens after the upstream source analysis but before the Git repository and template generation, ensuring the correct version propagates to all generated files.Checklist
fix-issue-141-version-alignment