On 3/27/25 2:46 AM, Zdenek Dohnal via golang wrote:
FTR it is because podman uses vendor/modules.txt which is used by script Alejandro sent in the other email.
It's actually because podman enables modules mode (https://src.fedoraproject.org/rpms/podman/blob/rawhide/f/podman.spec#_10). This metadata is only added to the binary in modules mode. We disable modules mode by default, because it's not compatible with the approach we use to build dependencies as separate -devel packages.
ipp-usb does not use the file, dependencies are generated from go.mod file, and 'go version -m' does not show such deps.
%go_generate_buildrequires doesn't read the go.mod file either. That's why the version constraints aren't honored. The dependencies are generated by analyzing the sources with [0] and extracting the used import paths and then generating goipath(IMPORT_PATH) dependencies which are automatically Provided by golang-*-devel packages based on the files that they contain (thanks to [1] and [2]). -devel packages are split by import paths instead of based on module boundaries and some modules may be split up into multiple packages to avoid bootstrap loops or combined into a single package when a single source repo contains multiple modules. I was not around Fedora when the the tooling was originally developed, but I believe it predates Go modules.
[0] https://pagure.io/golist [1] https://pagure.io/go-rpm-macros/blob/master/f/rpm/fileattrs/go.attr [2] https://pagure.io/go-rpm-macros/blob/master/f/bin/go-rpm-integration -- _______________________________________________ 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