The problem is that hyphens are an illegal character in version strings for RPM spec files. So to fix this the version string in bin/release.py must be changed from:
version = '5.0.0-rc1'
to:
version = '5.0.0_rc1'
or:
version = '5.0.0.rc1'
Now the rpmbuild process will run.
I opened a bug:
https://bugs.launchpad.net/openerp/+bug/306037
I still found another problem though:
Code:
$ python setup.py bdist_rpm
...
running build_scripts
creating build/scripts-2.5
copying openerp-server -> build/scripts-2.5
changing mode of build/scripts-2.5/openerp-server from 644 to 755
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.25605
+ umask 022
+ cd /home/greno/build/python-dist/openerp-server-5.0.0-rc1.1/build/bdist.linux-i686/rpm/BUILD
+ cd openerp-server-5.0.0_rc1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ python setup.py install --root=/var/tmp/openerp-server-5.0.0_rc1-1-buildroot --record=INSTALLED_FILES
/usr/lib/python2.5/distutils/dist.py:263: UserWarning: Unknown distribution option: 'console'
warnings.warn(msg)
running install
running build
running build_py
running build_scripts
copying openerp-server -> build/scripts-2.5
changing mode of build/scripts-2.5/openerp-server from 644 to 755
running install_lib
running install_scripts
copying build/scripts-2.5/openerp-server -> /var/tmp/openerp-server-5.0.0_rc1-1-buildroot/usr/bin
changing mode of /var/tmp/openerp-server-5.0.0_rc1-1-buildroot/usr/bin/openerp-server to 755
running install_data
error: can't copy 'bin/import_xml.rng': doesn't exist or not a regular file
error: Bad exit status from /var/tmp/rpm-tmp.25605 (%install)
I checked this file and it's there and readable. I see this in setup.py in data_files():
Code:
files.append(('.', [(opj('bin', 'import_xml.rng'))]))
...
files.append((openerp_site_packages, [('bin/import_xml.rng')]))
So why can't it find it?
I opened a bug:
https://bugs.launchpad.net/openerp/+bug/306039
Regards,
Gerry