= bug description =
The Fedora package building infrastructure (koji) is currently unable to build packages for Fedora 18 and Rawhide for a not insignificant number of packages. The packages in question are those using the %{!?rhel:0} macro, which the current version of fedpkg (1.11) fails to parse correctly.
= bug analysis =
Looking at a log of a failed build:
http://kojipkgs.fedoraproject.org//work/tasks/6686/4806686/root.log
we can see that the build fails while executing "fedpkg sources" with the following error:
{{{ DEBUG util.py:307: Executing command: ['fedpkg', 'sources'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n ""', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} DEBUG util.py:257: Downloading globus_gram_job_manager-13.51.tar.gz DEBUG util.py:257: error: /tmp/scmroot/globus-gram-job-manager/globus-gram-job-manager.spec:73: bad %if condition DEBUG util.py:257: error: query of specfile /tmp/scmroot/globus-gram-job-manager/globus-gram-job-manager.spec failed, can't parse DEBUG util.py:257: Could not execute sources: need more than 0 values to unpack DEBUG util.py:347: Child return code was: 1 }}}
It is possible to reproduce the problem locally getting the same error on a Fedora 18 installation running "fedpkg sources" for an affected package.
{{{ $ fedpkg sources Downloading voms-2.0.9.tar.gz error: /home/ellert/Fedora-GIT/voms/voms.spec:36: bad %if condition error: query of specfile /home/ellert/Fedora-GIT/voms/voms.spec failed, can't parse
Could not execute sources: need more than 0 values to unpack }}}
If the patch attached to the bugzilla report about this fedpkg bug:
https://bugzilla.redhat.com/show_bug.cgi?id=876308
is applied to the local Fedora 18 installation the command no longer fails:
{{{ $ fedpkg sources Downloading voms-2.0.9.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 542k 100 542k 0 0 181k 0 0:00:02 0:00:02 --:--:-- 239k }}}
= fix recommendation =
The bug was reported in bugzilla more than 5 week ago and the solution and patch have been available for 4 weeks, but no update has yet been made available. The recommended fix is to encourage the package maintainer to provide an updated package. Or if this is not possible to find a proven packager that can create the update.
I'll try and get this fix moving along, lets track it in bugzilla bug.