Bug 1404134

Summary: Fedora Rawhide build chroot are broken because of changes in koji
Product: [Internal] Red Hat Internal Copr Reporter: Pavel Raiskup <praiskup>
Component: builderAssignee: Pavel Raiskup <praiskup>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: clime, msuchy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-13 12:35:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pavel Raiskup 2016-12-13 07:23:16 UTC
`fedpkg-copr srpm` for some reason contacts koji (when --dist master is used).
But koji hangs on http://, so one needs to reconfigure to use https://.

This however leads to error:

  $ fedpkg-copr --dist master srpm
  error: line 5: Illegal char '-' (0x2d) in: Release:     0.fc26-pending
  error: query of specfile
  /tmp/build_package_repo/rhcopr-ping/rhcopr-ping.spec failed, can't parse
  Could not execute srpm: Could not get n-v-r-e from '\n\n'

That's because fedpkg (koji?) set's dist tag to something like
'.fc26-staging', and rpm claims dash should be in dist tag.

This can be worked-around by:

 $ fedpkg-copr sources
 Downloading README.xz
 ######################################################################## 100.0%
 $ rpmbuild  -bs *.spec --define '_sourcedir
 /tmp/build_package_repo/rhcopr-ping' \
     --define 'dist .whatever_without_dash'

Possibly we could avoid using 'fedpkg-copr' at all, at least in Internal
Copr.  I guess upstream is not using 'master' branch/dist now, but rather
'f26' -- but rather CCing upstream maintainers to let them know.

Comment 1 Pavel Raiskup 2016-12-13 07:32:15 UTC
(In reply to Pavel Raiskup from comment #0)
> `fedpkg-copr srpm` for some reason contacts koji (when --dist master is
> used).

Right, because we need to translate 'master' to 'f26' (that info is not
hardwired in fedpkg.

Comment 2 Pavel Raiskup 2016-12-13 09:30:46 UTC
Fedpkg upstream PR:
https://pagure.io/fedpkg/pull-request/88

Comment 3 Pavel Raiskup 2016-12-13 12:35:14 UTC
Quick test against fedora rawhide succeeded:
https://copr.devel.redhat.com/coprs/praiskup/ping/build/6619/