On Tuesday, 1 September 2020 01:03:57 CEST Germano Massullo wrote: > Good day everybody. As some from #fedora-golang channel may know, Fabian > Affolter and I, we are releasing for the first time Bettercap to Fedora > repository. By the way we are getting this build error and we have no > idea about how to fix it > FAILED: BuildError: The following noarch package built differently on > different architectures: > golang-github-bettercap-devel-2.28-4.fc34.noarch.rpm > Since the problem seemed to be s390x architecture, we tried using > "ExcludeArch: s390x" but it did not work. > What should we do? If you want, feel free to use your proven packager > super powers to fix it > Thank you for your time >
It's caused by a specific Requirement in an amd64 only file: rg "github.com/chifflier/nfqueue-go/nfqueue" modules/packet_proxy/packet_proxy_linux_amd64.go 14: "github.com/chifflier/nfqueue-go/nfqueue" Check out how I deal with it in golang-x-crypto: https://src.fedoraproject.org/rpms/golang-x-crypto/blob/master/f/golang-x-crypto.spec Although this might not work for you. In the case of crypto I can safely remove golang.org/x/sys/cpu because the package is added through another import path (golang.org/x/sys/unix). In your case you might need to add a Requires: golang(github.com/chifflier/nfqueue-go/nfqueue) to godevelheader so it has the same deps on all packages and keep amd64 working. So you need to use both workaround. First exclude github.com/chifflier/nfqueue- go/nfqueue from automatic requires: # Avoid noarch package built differently on different architectures %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(github.com/chifflier/nfqueue-go/nfqueue\\)$ Then re-add it through godevelheader for all arches: %global godevelheader %{expand: Requires: pkgconfig(libnetfilter_queue) Requires: golang(github.com/chifflier/nfqueue-go/nfqueue) } And voilà: https://koji.fedoraproject.org/koji/taskinfo?taskID=50547046 F33: https://koji.fedoraproject.org/koji/taskinfo?taskID=50547130 If you want other branches, just git merge master in the one you want. Best Regards, Robert-André _______________________________________________ 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