On mardi 27 février 2018 15:49:44 CET Fabio Valentini wrote:
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".
Yes this is redondant. I was prefering to use %forgeurl if necessary.
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.
I sent a PR for this.
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 have the same problem, looking at the log it seems every command is run twice? Thus it
lists the files twice.
Also the file list is containing folders than should't be there:
%%dir "//usr/share/gocode/src/bazil.org/fuse//builddir"
%%dir "//usr/share/gocode/src/bazil.org/fuse//builddir/build"
%%dir "//usr/share/gocode/src/bazil.org/fuse//builddir/build/BUILD"
%%dir
"//usr/share/gocode/src/bazil.org/fuse//builddir/build/BUILD/fuse-371fbbdaa8987b715bdd21d6adc4c9b20155f748"
%%dir
"//usr/share/gocode/src/bazil.org/fuse//builddir/build/BUILD/fuse-371fbbdaa8987b715bdd21d6adc4c9b20155f748/_build"
%%dir
"//usr/share/gocode/src/bazil.org/fuse//builddir/build/BUILD/fuse-371fbbdaa8987b715bdd21d6adc4c9b20155f748/_build/src"
%%dir
"//usr/share/gocode/src/bazil.org/fuse//builddir/build/BUILD/fuse-371fbbdaa8987b715bdd21d6adc4c9b20155f748/_build/src/bazil.org"
These seems to be remnant from the build process and shouldn't be included.