Hi Alejandro!
On 3/21/25 13:55, Alejandro Saez Morollon wrote:
I'm not really sure if I understand the problem, but hope these two
things help:
First, this is not exactly what you want to do, but we have a script
in the rpms/golang package to generate the provides, maybe you can
draw inspiration from it:
https://src.fedoraproject.org/rpms/golang/blob/rawhide/f/bundled-deps.sh
This would work nicely if it worked over rpms or over found
buildrequires, not text list shipped with the project :( , but it is a
good reference!
Second, regarding the %go_generate_buildrequires macro, have you tried
using go2rpm (again, I checked your golang packages, and it seems you
generated them years ago with an old version of go2rpm), in the most
recent versions it uses go_generate_buildrequires by default.
Just in case there are some issues in the way you are invoking the macro.
Unfortunately the macro generates buildrequires based on go.mod content,
install them and not-golang-package-modules are present in srpm, but the
current golang version which was bundled in is not present...
But this got me to the latest attempt (pseudocode):
for i in 'golang(github.com/OpenPrinting/goipp)' golang
do
ver=`rpm -q --whatprovides $i | xargs rpm -q --queryformat "%{version}-%{release}" | python3 -c
'import sys; print("{}".format(sys.stdin.read().rsplit(".", 1)[0]));'`
echo "Provides: bundled($i) = $ver"
done
The list for the loop might be output of commands from
%go_generate_buildrequires or such + golang, so it could be generated
automatically for every Go package.
Zdenek
Thank you in advance!
Zdenek
--
Zdenek Dohnal
Senior Software Engineer
Red Hat, BRQ-TPBC
--
_______________________________________________
golang mailing list -- golang@lists.fedoraproject.org
To unsubscribe send an email to golang-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/golang@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue
--
Zdenek Dohnal
Senior Software Engineer
Red Hat, BRQ-TPBC
--
_______________________________________________
golang mailing list -- golang@lists.fedoraproject.org
To unsubscribe send an email to golang-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/golang@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue