-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to get upstream source if tag is not <version> or v<version> #139
Comments
Hello @nodens, I have stumbled upon the same issue while trying to package a library that was named wrongly: The upstream maintainer has released a tag named "v" for the latest version, and after realizing his mistake, has created another v1.x.x version. Despite of that, dh-make-golang try to use the version named v (provided by the git describe --abbrev=0 --tags --exclude /v command) and always fails because later on, dh-make-golang remove the 'v' prefix, ending then with an empty string as package version. I think the proper way would be to add a version flag parameter to the make command, to be able to retrieve the specific upstream version. Version flag will be the name of the git tag to use. I know that there is a git_revision parameter, but it's not working in my case, because the revision will correspond to the both two tags This will solve our issue, as well as provide the ability for a maintainer to package a specific version of upstream, not necessarily latest. What do you think about it? |
I think it's nice to be able to specify the exact tag we want. But then, we might end up with the wrong version string, e.g. in my case That said, again, it'd be nice to be able to specify the exact tag, it's just that I'm not sure it's a complete fix for this issue. |
Hello back @nodens, I've just stumbled across the same issue for another package.
You are totally right, it does not cover the case wrong named tag at all. I can provide another fix for that once my original PR is merged. One of your proposal:
Seems the best idea for me. Once the 2 PR got merged we will cover these two scenarios:
What do you think about this? |
Hi, sorry I took so long to reply - I was away from Go packaging for a while. Actually I'm not sure what the best would be. Having a way to force a specific tag and specify the version seems to be what we need here. FTR, since I still have the issue with lxd (now tagged lxd-4.0.4), I just end up using IMO dh-make-golang should be a bit more flexible, and allow user to provide tag, version, and tarball url if needed. Cheers! |
A bit of clarification is needed: With commit 581a5e8, dh-make-golang v0.4.0 and up can now fetch github.com/lxc/lxd correctly:
But I like the idea proposed in PR #140 Allow to make package from specific upstream tag too, as some Go repos use multiple release tag prefixes for the different modules or subpackages that they contain. Probably (I was feeling guilty that my commit 581a5e8 in November 2020 seems to have overriden #140, but on a closer look, #140 was closed without merging in October 2020, and the code of the PR is no longer accessible, and it was before I started working on commit 581a5e8, so all is good! No need to feel guilty! Haha!) |
Hi,
While giving a try on github.com/lxc/lxd, wanting to package the new 4.0.0 version, I stumbled upon the following issue:
indeed, the upstream tag being lxd-, dh-make-golang fails at getting the version right.
A way to solve this could be
v
(probably easiest)This is, in a way, related to issue #31 and PR #34
Cheers,
The text was updated successfully, but these errors were encountered: