How to build package from source code?
What is the standard way to build rpm package from openstack source code.
e.g. nova package
from
https://github.com/openstack/nova
to rpm like
First time here? Check out the FAQ!
What is the standard way to build rpm package from openstack source code.
e.g. nova package
from
https://github.com/openstack/nova
to rpm like
You can use setup.py to build "vanilla" RPMs from the project source trees like this:
$ python setup.py bdist_rpm
The Anvil project ( http://anvil.readthedocs.org/en/latest/ ) aims to facilitate such orchestrated RPM builds for OpenStack projects. To get something closer to what RDO is distributing you can download and examine the SRPMs, for your example this would be:
These can then be extracted like so:
$ wget http://repos.fedorapeople.org/repos/openstack/openstack-havana/epel-6/openstack-nova-2013.2-0.19.b3.el6.src.rpm
$ rpm2cpio openstack-nova-2013.2-0.19.b3.el6.src.rpm | cpio -idmv
This will leave you with an extract of the files in the package typically including:
For example, from the above package:
0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
0002-remove-runtime-dep-on-python-pbr.patch
0003-Revert-Use-oslo.sphinx-and-remove-local-copy-of-doc-.patch
0004-Fix-compute_node_get_all-for-Nova-Baremetal.patch
nova-2013.2.b3.tar.gz
nova-dist.conf
nova-ifc-template
nova-polkit.pkla
nova-sudoers
nova.logrotate
openstack-nova-api.init
openstack-nova-api.upstart
openstack-nova-cells.init
openstack-nova-cells.upstart
openstack-nova-cert.init
openstack-nova-cert.upstart
openstack-nova-compute.init
openstack-nova-compute.upstart
openstack-nova-conductor.init
openstack-nova-conductor.upstart
openstack-nova-console.init
openstack-nova-console.upstart
openstack-nova-consoleauth.init
openstack-nova-consoleauth.upstart
openstack-nova-metadata-api.init
openstack-nova-metadata-api.upstart
openstack-nova-network.init
openstack-nova-network.upstart
openstack-nova-newdeps.patch
openstack-nova-novncproxy.init
openstack-nova-novncproxy.sysconfig
openstack-nova-novncproxy.upstart
openstack-nova-objectstore.init
openstack-nova-objectstore.upstart
openstack-nova-scheduler.init
openstack-nova-scheduler.upstart
openstack-nova-spicehtml5proxy.init
openstack-nova-spicehtml5proxy.upstart
openstack-nova-xvpvncproxy.init
openstack-nova-xvpvncproxy.upstart
openstack-nova.spec
To update this you would update the tarball and use rpmbuild -ba <SPECFILE>
to rebuild the package. Some edits to the SPEC may be required to ensure the name, version, and release of the source file match its expectations. You may also need to set up your RPM build environment for this, and other options listed above, to work - refer to http://wiki.centos.org/HowTos/SetupRp...
My understanding is we are actually building them in Koji (the Fedora build system) at the moment, e.g.: http://koji.fedoraproject.org/koji/packageinfo?packageID=12510 Each package has a git repository in dist-git, e.g. http://pkgs.fedoraproject.org/cgit/openstack-nova.git/
Asked: 2014-03-04 04:19:35 -0500
Seen: 1,658 times
Last updated: Mar 04 '14