I want to create a SRPM locally with fedpkg.
Koji is extremely slow to respond. So is fedpkg srpm.
fedpkg srpm
$ fedpkg --verbose --debug --release rawhide srpm Creating repo object from /home/churchyard/rpmbuild/fedora-scm/python-sqlalchemy Initiating a koji session to https://koji.fedoraproject.org/kojihub (stuck here)
Why is this querying Koji at all? It's rather annoying.
When I am completelly offline, this works fine:
$ fedpkg --verbose --debug --release rawhide srpm Creating repo object from /home/churchyard/rpmbuild/fedora-scm/python-sqlalchemy Initiating a koji session to https://koji.fedoraproject.org/kojihub Unable to query Koji to find rawhide target. Continue offline. ...
Can I force that somehow? Or would a nicer timeout solve this?
Hi, Yes, for your case, we could avoid connecting to Koji. The method https://pagure.io/fedpkg/blob/master/f/fedpkg/init.py#_239 is trying to connect every time to determine the correct rawhide target. For rawhide, there is a heuristic already implemented, but Koji was prioritised. With --offline arg to srpm (and sources), Koji can be avoided. But some branches (like 'epel10') rely on some macros from Koji, and in this case Koji connection is needed.
--offline
srpm
sources
https://pagure.io/rpkg/pull-request/743 https://pagure.io/fedpkg/pull-request/602
Potentially, even some timeout (as you suggested) for Koji connections might be a solution as well. I will think about it further.
Commit 7412f0c6 fixes this issue
Commit 122602a2 fixes this issue
Thanks.
Metadata Update from @onosek: - Issue set to the milestone: 1.47