#3338 closed (fixed)
build_rpm problems
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Keywords: | build_rpm | |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I build Django rpms on different python versions and different rpm versions.
I always struggled over the INSTALLED_FILES where directories not prefixed with %dir any longer.
This stopps some rpm build process to stop packaging since files under those directories resulted in an 'File listed twice' error.
A simple rpm_install-script will fix this.
Attachments (4)
Change History (15)
by , 18 years ago
Attachment: | build_rpm.diff added |
---|
by , 18 years ago
Attachment: | MANIFEST.in.diff added |
---|
I forgot that MANIFEST.in needs to include docs and scripts
by , 18 years ago
Attachment: | MANIFEST.in.2.diff added |
---|
html-files and js/images etc also needs to be packed into sdist
follow-up: 2 comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
When I try running python setup.py bdist_rpm
, I get the following error:
tar -cf dist/Django-0.96-pre.tar Django-0.96-pre gzip -f9 dist/Django-0.96-pre.tar removing 'Django-0.96-pre' (and everything under it) copying dist/Django-0.96-pre.tar.gz -> build/bdist.linux-i686/rpm/SOURCES building RPMs rpmbuild -ba --define _topdir /home/gdub/bzr/django/build_rpm-3338/build/bdist.linux-i686/rpm --clean build/bdist.linux-i686/rpm/SPECS/Django.spec error: File /home/gdub/bzr/django/build_rpm-3338/build/bdist.linux-i686/rpm/SOURCES/Django-0.96_pre.tar.gz: No such file or directory error: command 'rpmbuild' failed with exit status 1
It appears that the version set in the spec file is 0.96_pre
, and can't file the tar file with this name. Instead it's getting named ./build/bdist.linux-i686/rpm/SOURCES/Django-0.96-pre.tar.gz
. I've never built a python package into an RPM. Do you know what's going on here?
comment:2 by , 18 years ago
Replying to Gary Wilson <gary.wilson@gmail.com>:
When I try running
python setup.py bdist_rpm
, I get the following error:
tar -cf dist/Django-0.96-pre.tar Django-0.96-pre gzip -f9 dist/Django-0.96-pre.tar removing 'Django-0.96-pre' (and everything under it) copying dist/Django-0.96-pre.tar.gz -> build/bdist.linux-i686/rpm/SOURCES building RPMs rpmbuild -ba --define _topdir /home/gdub/bzr/django/build_rpm-3338/build/bdist.linux-i686/rpm --clean build/bdist.linux-i686/rpm/SPECS/Django.spec error: File /home/gdub/bzr/django/build_rpm-3338/build/bdist.linux-i686/rpm/SOURCES/Django-0.96_pre.tar.gz: No such file or directory error: command 'rpmbuild' failed with exit status 1It appears that the version set in the spec file is
0.96_pre
, and can't file the tar file with this name. Instead it's getting named./build/bdist.linux-i686/rpm/SOURCES/Django-0.96-pre.tar.gz
. I've never built a python package into an RPM. Do you know what's going on here?
Yes, I can verify this. In the setup.py the version is build with hyphens '-', this works fine for sdist command, but this is not allowd in the version number syntax of an rpm. I run the setup.py with version build like this:
Index: setup.py =================================================================== --- setup.py (Revision 4386) +++ setup.py (Arbeitskopie) @@ -33,7 +33,7 @@ file_info[0] = '/PURELIB/%s' % file_info[0] # Dynamically calculate the version based on django.VERSION. -version = "%d.%d-%s" % (__import__('django').VERSION) +version = "0.95.4386" setup( name = "Django",
comment:3 by , 18 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
If underscore works with both, maybe we should change the version in setup.py
to use an underscore instead of a hyphen. No matter the case, the attached patch fixes this ticket, so I'm marking as ready.
comment:4 by , 18 years ago
comment:5 by , 18 years ago
Triage Stage: | Ready for checkin → Design decision needed |
---|
We still need to work out whether to change our version number of change the rpm packaging script to put the right tarball name in the SPEC file and replace hyphens with something else in the package name. I'm not sure about the right approach there at the moment. I've checked in the work so far, though.
comment:7 by , 18 years ago
Summary: | [patch] build_rpm throws 'File listed twice' errors → build_rpm problems |
---|
Making the title reflect the ticket contents.
comment:8 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:9 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It appears that this is broken again in 1.1 beta 1.
comment:10 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This bug was fixed 2 years ago, if you think there's a new issue open a new ticket.
rpm_install script and setup.cfg update