Hi everybody,
I've been following the (long overdue) improvements concerning go packaging in fedora, and since I saw that packages are starting to make use of the new mechanisms, I wanted to finally check it out and started "converting" one of my own (one of ~50) golang packages (golang-github-AudriusButkevicius-cli). However, I came across a few stumbling blocks (and at least one bug) in the current implementation (please correct me if I am just doing it wrong):
1) The currently implemented macros have different names than the ones that were proposed at the "More Go Packaging" wiki page, which confused me. I had to look at a recently "converted" package to figure out the correct macro names. I guess the documentation just hasn't caught up yet here.
2) Additionally, I wasn't able to figure out why I have to set both "%gobaseipath" and "%provider_prefix".
3) The %gosource macro doesn't work correctly (at least for github sources). The "/archive/" part between the "import path" and "%{commit}" or "%{version}" is missing as far as I can see.
4) The downloaded tarball has potentially ambiguous names, for example one of my golang packages (github.com/AudriusButkevicius/cli) produces a "cli-%{shortcommit}" or "cli-%{version}.tar.gz" tarball when using %gosource, which is why I manually changed the link to AudriusButkevicius-cli-*.tar.gz back when I generated the .spec file with gofed. I suggest using both project and repository names for determining the tarball name to avoid confusion and name clashes.
5) I couldn't figure out how to correctly handle the "post-release snapshot" case, where both "Version" and "%commit" have to be set. The macros just generated a Release tag like for packaging a released version, ignoring the "commit" tag completely.
6) When I finally got the macros right enough for %prep, %build, and %install to proceed, the build failed due to missing debuginfo files (and warnings about duplicate files) - well, it's a source-only library package, how do I specify this with the new macros?
I hope those issues are only part of the "transitional period", because I'd really like to clean up my go package .spec files going forward.
The contents of the .spec file at the point where I gave up trying to get it to build successfully are available via this gist link: https://gist.github.com/decathorpe/366daeb50e889fcd9153eedb1b761804
Fabio
I've been following the (long overdue) improvements concerning go packaging in fedora, and since I saw that packages are starting to make use of the new mechanisms, I wanted to finally check it out and started "converting" one of my own (one of ~50) golang packages (golang-github-AudriusButkevicius-cli). However, I came across a few stumbling blocks (and at least one bug) in the current implementation (please correct me if I am just doing it wrong):
1) The currently implemented macros have different names than the ones that were proposed at the "More Go Packaging" wiki page, which confused me. I had to look at a recently "converted" package to figure out the correct macro names. I guess the documentation just hasn't caught up yet here.
2) Additionally, I wasn't able to figure out why I have to set both "%gobaseipath" and "%provider_prefix".
3) The %gosource macro doesn't work correctly (at least for github sources). The "/archive/" part between the "import path" and "%{commit}" or "%{version}" is missing as far as I can see.
4) The downloaded tarball has potentially ambiguous names, for example one of my golang packages (github.com/AudriusButkevicius/cli) produces a "cli-%{shortcommit}" or "cli-%{version}.tar.gz" tarball when using %gosource, which is why I manually changed the link to AudriusButkevicius-cli-*.tar.gz back when I generated the .spec file with gofed. I suggest using both project and repository names for determining the tarball name to avoid confusion and name clashes.
5) I couldn't figure out how to correctly handle the "post-release snapshot" case, where both "Version" and "%commit" have to be set. The macros just generated a Release tag like for packaging a released version, ignoring the "commit" tag completely.
6) When I finally got the macros right enough for %prep, %build, and %install to proceed, the build failed due to missing debuginfo files (and warnings about duplicate files) - well, it's a source-only library package, how do I specify this with the new macros?
I hope those issues are only part of the "transitional period", because I'd really like to clean up my go package .spec files going forward.
The contents of the .spec file at the point where I gave up trying to get it to build successfully are available via this gist link: https://gist.github.com/decathorpe/366daeb50e889fcd9153eedb1b761804
Fabio
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx