Hide Forgot
Description of problem: fedpkg in rawhide fails to download sources during koji build. Version-Release number of selected component (if applicable): 0.5.5.0-1.fc16 Actual results: Koji build fails - see: https://koji.fedoraproject.org/koji/getfile?taskID=2831521&name=root.log DEBUG util.py:281: Executing command: ['fedpkg', 'sources'] DEBUG util.py:247: Could not download sources: sh: ruby: command not found DEBUG util.py:320: Child returncode was: 1 Expected results: Building the exact same specfile works fine in F15, F14, F13, EL6 and EL5: https://koji.fedoraproject.org/koji/getfile?taskID=2831523&name=root.log https://koji.fedoraproject.org/koji/getfile?taskID=2831527&name=root.log https://koji.fedoraproject.org/koji/getfile?taskID=2831529&name=root.log https://koji.fedoraproject.org/koji/getfile?taskID=2831531&name=root.log https://koji.fedoraproject.org/koji/getfile?taskID=2831533&name=root.log DEBUG util.py:281: Executing command: ['fedpkg', 'sources'] DEBUG util.py:247: Downloading root-5.28.00.tar.gz DEBUG util.py:320: Child returncode was: 0 Additional info: The F16 version of fedpkg seems to be confused by this line in the specfile: %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')} This line is taken from the Ruby packaging guidelines: http://fedoraproject.org/wiki/Packaging/Ruby#Ruby_packages_with_binary_content.2Fshared_libraries
It works fine for other builds. Perhaps the ruby guidelines need updating (or fix whatever is supposed to provide ruby_sitearch). that macro should be made safer, in case ruby isn't present (like when srpm is being generated), change to something like: %{!?ruby_sitearch:%global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]' 2>/dev/null || echo "ruby_not_present")}
fedpkg does now parse the spec in order to gain information such as the package name, so if your spec parsing fails in a minimal environment that's going to be a bad thing. It was a bad thing already, now it's just explicitly bad :) I would recommend you fix up the spec so that it'll parse (rpm -q --specfile foo.spec) in a minimal environment.
Did you change your minds about this? With 0.5.5.0-2.fc16 it works again: DEBUG util.py:281: Executing command: ['fedpkg', 'sources'] DEBUG util.py:247: sh: ruby: command not found DEBUG util.py:247: Downloading root-5.28.00.tar.gz DEBUG util.py:320: Child returncode was: 0
Sortof. I still say that if the spec doesn't parse and causes rpm -q to fail that fedpkg rightly fails. However I discovered in my code that if rpm spits out anything to stderr we were considering that a failure, which wasn't right. I've fixed that so that we can return clean if rpm returns clean.