Bug 676744 - fedpkg in rawhide (F16) fails to download sources
Summary: fedpkg in rawhide (F16) fails to download sources
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-packager
Version: rawhide
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-11 00:56 UTC by Mattias Ellert
Modified: 2013-01-10 06:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-11 19:49:36 UTC
Type: ---


Attachments (Terms of Use)

Description Mattias Ellert 2011-02-11 00:56:41 UTC
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

Comment 1 Rex Dieter 2011-02-11 15:09:52 UTC
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")}

Comment 2 Jesse Keating 2011-02-11 19:49:36 UTC
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.

Comment 3 Mattias Ellert 2011-02-12 12:45:22 UTC
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

Comment 4 Jesse Keating 2011-02-12 21:18:51 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.