I noticed that a package I recently submitted (golang-sr-spc-log) has some odd Provides: values. I can't figure out how they're getting generated this way, or why. From the build log[1]:
Provides: golang(git.sr.ht/~spc/go-log/go-log-0.1.0) = 0.1.0-1.fc34 [...]
Why is the package version (0.1.0) appended to the import path name? I looked at the only other package hosted on git.sr.ht (golang-sr-sircmpwn-getopt), and it does not have the versioned provides. From the build log[2]:
Provides: golang(git.sr.ht/~sircmpwn/getopt) = 0-0.1.20210615git23622cc.fc34 [...]
Investigating the go-rpm-macros some, I found that the go-rpm-integration script claims[3] that it will "tag" the provides with a version if called with the "-v" flag. I discovered that go-rpm-integration is used in the %__go_provides macro in fileattrs/go.attr[4]. However, now I'm stuck. What expands the macro (if it is even a macro) in go.attr and invokes it? Where in all these layers of macros, Lua scripts and bash scripts is the "-v" flag getting appended to the call to go-rpm-integration?
~link
1: https://kojipkgs.fedoraproject.org//packages/golang-sr-spc-log/0.1.0/1.fc34/... 2: https://kojipkgs.fedoraproject.org//packages/golang-sr-sircmpwn-getopt/0/0.1... 3: https://pagure.io/go-rpm-macros/blob/master/f/bin/go-rpm-integration#_64 4: https://pagure.io/go-rpm-macros/blob/master/f/rpm/fileattrs/go.attr#_5
For posterity, it seems that in order for git.sr.ht-based forge sources to work correctly, the %topdir macro needs to be defined too. That fixed the strange Provides: and fixed the installation path of the source files into /usr/share/gocode.
On Wed, 28 Jul 2021 at 12:56, Link Dupont link@sub-pop.net wrote:
I noticed that a package I recently submitted (golang-sr-spc-log) has some odd Provides: values. I can't figure out how they're getting generated this way, or why. From the build log[1]:
Provides: golang(git.sr.ht/~spc/go-log/go-log-0.1.0) = 0.1.0-1.fc34 [...]
Why is the package version (0.1.0) appended to the import path name? I looked at the only other package hosted on git.sr.ht (golang-sr-sircmpwn-getopt), and it does not have the versioned provides. From the build log[2]:
Provides: golang(git.sr.ht/~sircmpwn/getopt) = 0-0.1.20210615git23622cc.fc34 [...]
Investigating the go-rpm-macros some, I found that the go-rpm-integration script claims[3] that it will "tag" the provides with a version if called with the "-v" flag. I discovered that go-rpm-integration is used in the %__go_provides macro in fileattrs/go.attr[4]. However, now I'm stuck. What expands the macro (if it is even a macro) in go.attr and invokes it? Where in all these layers of macros, Lua scripts and bash scripts is the "-v" flag getting appended to the call to go-rpm-integration?
It seems you've figured out what you needed, but for clarity, those files are parsed and called from RPM directly: http://rpm.org/user_doc/dependency_generators.html
~link
1: https://kojipkgs.fedoraproject.org//packages/golang-sr-spc-log/0.1.0/1.fc34/... 2: https://kojipkgs.fedoraproject.org//packages/golang-sr-sircmpwn-getopt/0/0.1... 3: https://pagure.io/go-rpm-macros/blob/master/f/bin/go-rpm-integration#_64 4: https://pagure.io/go-rpm-macros/blob/master/f/rpm/fileattrs/go.attr#_5
On Wed, Jul 28 2021 at 06:40:01 PM -0400, Elliott Sales de Andrade quantum.analyst@gmail.com wrote:
It seems you've figured out what you needed, but for clarity, those files are parsed and called from RPM directly: http://rpm.org/user_doc/dependency_generators.html
Oh interesting. So to affect the call to %__go_provides, for example, I would need to define %goprovflags in my spec file?
golang@lists.fedoraproject.org