|
msg127942 - (view) |
Author: James (purpleidea) |
Date: 2011-02-04 21:19 |
Hi distutils,
When I run:
./setup.py bdist --formats=rpm
on my source directory, I get the error:
rpm -ba --define _topdir /home/james/code/scantran/build/bdist.linux-x86_64/rpm --clean build/bdist.linux-x86_64/rpm/SPECS/scantran.spec
-ba: unknown option
error: command 'rpm' failed with exit status 1
It seems the problem can be fixed by installing the rpm-build package (on fedora 14 anyways) and so perhaps something should be done so that this is more obvious...
HTH,
James
|
|
msg127943 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-02-04 21:23 |
Does this mean that there is one rpm command that does not have all options, and that rpm-build overwrites that command with another one that does the right thing?
|
|
msg127944 - (view) |
Author: James (purpleidea) |
Date: 2011-02-04 21:32 |
In the source for distutils it seems to attempt to use 'rpmbuild' if it exists, but otherwise falls back on regular 'rpm', however in my rpm:
$ rpm --version
RPM version 4.8.1
this fails as there is no -ba option.
James
|
|
msg127945 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-02-04 21:37 |
What is your OS name and version? Is that rpm version considered obsolete or not?
|
|
msg127948 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2011-02-04 22:45 |
"rpm -ba" is very old. I think it's been at least since 2002 that "-ba" was supported by rpm.
I believe bdist_rpm is calling "rpmbuild -ba", and if that doesn't exist, then "rpm -ba" is a transition strategy until all systems supported "rpmbuild". This transition period should be over. Unfortunately today it's far more likely that "rpm -ba" will not be what you want to call, but "rpm" will almost always be found, giving this error.
Most systems (certain RedHat based) ship rpmbuild as a separate command. RedHat installs it via the rpm-build package.
I'd suggest just switching bdist_rpm to always use rpmbuild. Then at least the error would be that rpmbuild isn't found.
|
|
msg127958 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-02-05 01:01 |
This is a gray area between bugfix and bahavior change forbidden by the feature freeze. Would it be okay for you to add a note in the docs and close this report?
|
|
msg127959 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-02-05 01:02 |
> Would it be okay for you to add a note in the docs and close this report?
I meant to ask whether you would agree with that outcome, not that you should do the work (you’re welcome to provide a patch if you want to, but that’s not required).
|
|
msg128005 - (view) |
Author: James (purpleidea) |
Date: 2011-02-05 17:41 |
I'll write a docs and script patch for this next week...
I'm happy to do the work,
Thanks for the comments.
James
|
|
msg128052 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-02-06 12:02 |
Thanks for volunteering. I will review and apply when the py3k branch is unfrozen.
> I'll write a docs and script patch for this next week...
Note that I proposed to patch the docs only.
|
|
msg128053 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-02-06 12:05 |
BTW, it may be useful to point people to http://pypi.python.org/pypi/pypi2rpm, which contains an updated command, bdist_rpm2.
|
|
msg153098 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-02-11 05:25 |
Given that we’ve made changes to distutils for Debian multiarch or Mac OS X compiler breakage, I now think that switching distutils to only use rpmbuild would be reasonable.
|
|
msg155120 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-03-07 20:54 |
More info on rpm vs. rpmbuild: http://bugs.python.org/issue1533164#msg82592
|
|
msg175042 - (view) |
Author: Peter Eisentraut (petere) |
Date: 2012-11-07 04:50 |
I ran into a similar instance of this problem today and would like to add my support for just getting rid of the "rpm" calls and just call "rpmbuild" in all cases. The last release where "rpm" was used for building was more than 10 years ago.
|
|
msg177241 - (view) |
Author: Eric V. Smith (eric.smith) *  |
Date: 2012-12-09 22:02 |
I agree on just switching to rpmbuild, at least for 3.4.
|
|
| Date |
User |
Action |
Args |
| 2012-12-09 22:02:45 | eric.smith | set | messages:
+ msg177241 |
| 2012-11-07 04:50:19 | petere | set | nosy:
+ petere messages:
+ msg175042
|
| 2012-03-07 20:55:03 | eric.araujo | set | title: bdist_rpm fails -> bdist_rpm should use rpmbuild, not rpm |
| 2012-03-07 20:54:46 | eric.araujo | set | keywords:
+ easy
messages:
+ msg155120 stage: needs patch |
| 2012-02-11 05:25:58 | eric.araujo | set | messages:
+ msg153098 versions:
- Python 3.1 |
| 2011-02-06 12:05:29 | eric.araujo | set | nosy:
eric.smith, tarek, eric.araujo, purpleidea messages:
+ msg128053 |
| 2011-02-06 12:02:01 | eric.araujo | set | assignee: tarek -> eric.araujo messages:
+ msg128052 nosy:
eric.smith, tarek, eric.araujo, purpleidea |
| 2011-02-05 17:41:12 | purpleidea | set | nosy:
eric.smith, tarek, eric.araujo, purpleidea messages:
+ msg128005 |
| 2011-02-05 01:02:30 | eric.araujo | set | nosy:
eric.smith, tarek, eric.araujo, purpleidea messages:
+ msg127959 |
| 2011-02-05 01:01:18 | eric.araujo | set | nosy:
eric.smith, tarek, eric.araujo, purpleidea messages:
+ msg127958 versions:
+ Python 3.1, Python 3.2, Python 3.3 |
| 2011-02-04 22:45:24 | eric.smith | set | nosy:
+ eric.smith messages:
+ msg127948
|
| 2011-02-04 21:37:33 | eric.araujo | set | nosy:
tarek, eric.araujo, purpleidea messages:
+ msg127945 |
| 2011-02-04 21:32:13 | purpleidea | set | nosy:
tarek, eric.araujo, purpleidea messages:
+ msg127944 |
| 2011-02-04 21:23:41 | eric.araujo | set | nosy:
tarek, eric.araujo, purpleidea messages:
+ msg127943 |
| 2011-02-04 21:19:22 | purpleidea | create | |