Not only my first post here but also my first steps in packaging golang stuff especially for RHEL9 so bear with me.
I read the docs about go-vendor-tools and did some test in packaging some srpm for EL9.
I got the helm package (that has already a vendor source tar) packaged on EL9 by commenting some go-vendor-tools specific line out (just license stuff). And I noticed that the "Provides: bundled()" lines are automagically generated.
I now went a little further and took a package without a vendor tar source file and build the corresponding vendor.tgz and build it then for EL9 but in this case no "Provides: bundled()" where included.
So, I can include the Provides manually (echo vendor/modules.txt | /usr/lib/rpm/go_mod_vendor.prov) but what triggers this automagically, like in the helm package?
On 9/4/24 5:31 AM, Leon Fauster wrote:
Not only my first post here but also my first steps in packaging golang stuff especially for RHEL9 so bear with me.
I read the docs about go-vendor-tools and did some test in packaging some srpm for EL9.
I got the helm package (that has already a vendor source tar) packaged on EL9 by commenting some go-vendor-tools specific line out (just license stuff). And I noticed that the "Provides: bundled()" lines are automagically generated.
I now went a little further and took a package without a vendor tar source file and build the corresponding vendor.tgz and build it then for EL9 but in this case no "Provides: bundled()" where included.
So, I can include the Provides manually (echo vendor/modules.txt | /usr/lib/rpm/go_mod_vendor.prov) but what triggers this automagically, like in the helm package?
You have to add `%license vendor/modules.txt` to the `%files` section, and then the generator will kick in.
Am 04.09.24 um 22:55 schrieb Maxwell G:
On 9/4/24 5:31 AM, Leon Fauster wrote:
I now went a little further and took a package without a vendor tar source file and build the corresponding vendor.tgz and build it then for EL9 but in this case no "Provides: bundled()" where included.
So, I can include the Provides manually (echo vendor/modules.txt | /usr/lib/rpm/go_mod_vendor.prov) but what triggers this automagically, like in the helm package?
You have to add `%license vendor/modules.txt` to the `%files` section, and then the generator will kick in.
Ah, that one was hidden :-) Thanks! Just one more thing: I notice differences while comparing the outputs of the generator and my scripts:
8,9c8,9 < bundled(golang(github.com/Azure/azure-sdk-for-go)) = 59.2.0 < bundled(golang(github.com/Azure/go-autorest)) = 14.2.0 ---
bundled(golang(github.com/Azure/azure-sdk-for-go)) = 59.2.0+incompatible bundled(golang(github.com/Azure/go-autorest)) = 14.2.0+incompatible
18c18 < bundled(golang(github.com/Azure/go-ntlmssp)) = 0.0.0.20200615164410.66371956d46c ---
bundled(golang(github.com/Azure/go-ntlmssp)) = 6637195
I assume its intentional but is it? (the right side is from the rpm generator)
golang@lists.fedoraproject.org