wiki:SourceRPMS

There are source RPMs available in the Fedora koji system at http://koji.fedoraproject.org/koji/packageinfo?packageID=1421. These can be used to produce binary RPMs packages. The three necessary packages are:

  • python-zope-interface
  • python-twisted
  • buildbot

You will likely want these optional dependencies as well:

  • python-twisted-web - for the waterfall display
  • python-twisted-mail - for status emailers

Building RPMs

It's most convenient to build in a non-root environment that can be created as follows:

$ mkdir -p ~/rpms/{sources,build,rpms}
$ cat > ~/.rpmmacros <<EOF
%_topdir        $HOME/rpms
%_builddir      %{_topdir}/build
%_sourcedir     %{_topdir}/sources/%{name}-%{version}
%_specdir       %{_sourcedir}

# Put directly into rpms directory, not srpms or rpms/%{arch}
%_rpmfilename   %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%_rpmdir        %{_topdir}/rpms
%_srcrpmdir     %{_topdir}/rpms
EOF

Note that with the <<EOF syntax, this produces a file with $HOME expanded. rpmbuild does not expand environmental variables for you.

A command sequence like the following should produce all necessary RPMs:

$ rpmbuild --rebuild --define 'dist .centos4' http://rosalyn.dyn.slamb.org/yum/centos4/SRPMS/python-zope-interface-3.0.1-3.centos4.slamb.src.rpm
$ sudo rpm -Uvh ~/rpms/rpms/python-zope-interface-3.0.1-3.centos4.slamb.x86_64.rpm
$ rpmbuild --rebuild --define 'dist .centos4' http://rosalyn.dyn.slamb.org/yum/centos4/SRPMS/python-twisted-2.4.0-1.centos4.slamb.src.rpm
$ sudo rpm -Uvh ~/rpms/rpms/http://rosalyn.dyn.slamb.org/yum/centos4/SRPMS/python-twisted-2.4.0-1.centos4.slamb.x86_64.rpm
$ rpmbuild --rebuild --define 'dist .centos4' http://rosalyn.dyn.slamb.org/yum/centos4/SRPMS/buildbot-0.7.5-1.centos4.slamb.src.rpm

Note the mixed build and installation commands - later RPMs dependent on former ones to build (test) as well as to run.

You can change the --define 'dist .centos4' to match your distribution or omit it entirely. It can be convenient to have the distribution name in the release (and thus filename) of packages built for that distribution.

You can examine each spec file and make alterations as follows:

$ cd ~/rpms/sources/buildbot-*
$ vim buildbot.spec
$ rpmbuild -ba buildbot.spec

Distribution Specific Notes

CentOS

You must have python-devel installed to rebuild the Fedora srpm on a CentOS box ... python-devel should be in CentOS's default yum repositories. The following srpms pulled from Fedora and rebuild on a CentOS box is required before you can install buildbot as of 0.7.7

Rebuilt buildbot 0.8.6 from source rpm taken from Fedora 16 here: http://download.fedoraproject.org/pub/fedora/linux/updates/16/SRPMS/buildbot-0.8.6-2.fc16.src.rpm for Centos 6.3. Just installed rpm -i buildbot-0.8.6-2.fc16.src.rpm into my rpmbuild folder which put a .spec file to /SPECS and all tar.gz files to the /SOURCES. Please install all build requires listed in spec file, be careful for python-sphinx install python-sphinx10.noarch and create a symbolik link: ln -s /usr/bin/sphinx-1.0-build /usr/bin/sphinx-build in order for sphinx to generate the docs without error. Also do not build with 'buildbot_test' part it is not going to work as there is some problems in current package of python-sqlalchemy. So comment it out form the spec file. With all this it builds successfully and installs with no issues. I hooked that worker to the build-master and it builds with no problems.

python-twisted-core-2.5.0-4.fc9.src.rpm
python-twisted-mail-0.4.0-4.fc9.src.rpm
python-twisted-names-0.4.0-3.fc9.src.rpm
python-twisted-web-0.7.0-3.fc9.src.rpm
python-twisted-words-0.5.0-3.fc9.src.rpm

External links

Last modified 5 months ago Last modified on Jan 4, 2017, 1:59:07 AM