@ignatenkobrain  `rpm-build-4.14.2.1-7.fc31+buildreqs.1.x86_64` works for me:

```console
$  grep BuildRequires ~/fedora/rpm/golist/golist.spec
<NOTHING>

$ LANG=C.utf8 rpmbuild -ba  ~/fedora/rpm/golist/golist.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.t0kf16
+ umask 022
+ cd /var/lib/builder/rpmbuild/BUILD

[…]

Executing(buildreqs): /bin/sh -e /var/tmp/rpm-tmp.sOlg54
+ umask 022
+ cd /var/lib/builder/rpmbuild/BUILD
+ cd /var/lib/builder/rpmbuild/BUILD
+ cd golist-263dcfff17382fb43c241ae46a555f8072576526
++ 
GOPATH=/var/lib/builder/rpmbuild/BUILD/golist-263dcfff17382fb43c241ae46a555f8072576526/_build:/usr/share/gocode
++ golist --imported --package-path pagure.io/golist --skip-self
++ 
GOPATH=/var/lib/builder/rpmbuild/BUILD/golist-263dcfff17382fb43c241ae46a555f8072576526/_build:/usr/share/gocode
++ golist --imported --package-path pagure.io/golist --skip-self --tests
+ sort -u
+ xargs '-I{}' echo 'golang({})'
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.wgrBm6
+ umask 022
+ cd /var/lib/builder/rpmbuild/BUILD
+ cd golist-263dcfff17382fb43c241ae46a555f8072576526

[…]

Wrote: 
/var/lib/builder/rpmbuild/SRPMS/golist-0.9.1-0.5.20190410git263dcff.fc31.src.rpm
Wrote: 
/var/lib/builder/rpmbuild/RPMS/x86_64/golist-0.9.1-0.5.20190410git263dcff.fc31.x86_64.rpm
Wrote: 
/var/lib/builder/rpmbuild/RPMS/noarch/golang-pagure-golist-devel-0.9.1-0.5.20190410git263dcff.fc31.noarch.rpm
Wrote: 
/var/lib/builder/rpmbuild/RPMS/x86_64/golist-debugsource-0.9.1-0.5.20190410git263dcff.fc31.x86_64.rpm
Wrote: 
/var/lib/builder/rpmbuild/RPMS/x86_64/golist-debuginfo-0.9.1-0.5.20190410git263dcff.fc31.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.BuGRl7
+ umask 022
+ cd /var/lib/builder/rpmbuild/BUILD
+ cd golist-263dcfff17382fb43c241ae46a555f8072576526
+ /usr/bin/rm -rf 
/var/lib/builder/rpmbuild/BUILDROOT/golist-0.9.1-0.5.20190410git263dcff.fc31.x86_64
+ exit 0

$ rpm -qp --requires 
/var/lib/builder/rpmbuild/SRPMS/golist-0.9.1-0.5.20190410git263dcff.fc31.src.rpm
go-rpm-macros
golang(github.com/urfave/cli)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(DynamicBuildRequires) <= 4.15.0-1
rpmlib(FileDigests) <= 4.6.0-1
```

@xsuchy I couldn't locate a pre-built mock to test with, and I'm out of time, 
so that will be all for today.

The tested spec is 
[here](https://copr-be.cloud.fedoraproject.org/results/nim/macros-ng/fedora-rawhide-x86_64/00881747-golist/golist.spec).
 It needs the rest of the 
[copr](https://copr.fedorainfracloud.org/coprs/nim/macros-ng/). (And, BTW, I’m 
real sick of carrying the remainder of [redhat-rpm-config 
PR51](https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51)).

Unless I made a mistake somewhere, with this copr all Fedora golang packages 
that do not inhibit a BuildRequires or force it to a specific version, should 
rebuild by:
 * removing the following lines:
```rpm
BuildRequires: golang(foo)
```
* and adding
```rpm
%generate_buildrequires
%go_generate_buildrequires
```

And now I’ll switch to finishing the macro glue for my Go module dynamic 
BuildRequires generator, so I can test it too. Unlike this generator it will 
handle complex upstream versioning constrains and should require less shell 
massaging.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/593#issuecomment-483029345
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to