[one-users] Getting opennebula rpms to build on CentOS 5 / Fedora 17

Simon J Mudd sjmudd at pobox.com
Thu Jan 3 16:54:42 PST 2013


Hello,

I'm trying to get Opennebula RPMs to build on CentOS 5 based on the rpms
which are available here: https://nazar.karan.org/git/misc/opennebula.git
and the branch that Jaime Melis wrote for CentOS 6, as I don't currently
have access to a CentOS 6 box to use for OpenNebula testing.

Looking first to get the CentOS 5 rpms to build I've made the following
preliminary changes which look to be going the right way, and plan
afterwards to fix these so that the build will work on _either_ CentOS 5
or 6:

diff --git a/SPECS/opennebula.spec b/SPECS/opennebula.spec
index 4780bf1..5fe6236 100644
--- a/SPECS/opennebula.spec
+++ b/SPECS/opennebula.spec
@@ -17,6 +17,13 @@
 %define oneadmin_home /var/lib/one
 %define oneadmin_uid 9869
 %define oneadmin_gid 9869
+# On CentOS 5 %{_initddir} does not exist. See: bug https://bugzilla.redhat.com/show_bug.cgi?id=455279
+# - if not defined set it to the %{_initrddir} macro value.
+%if 0%{?_initddir:1}
+# Nothing to do as %{_initddir} is defined
+%else
+%define _initddir %{_initrddir}
+%endif
 
 Name: opennebula
 Summary: Cloud computing solution for Data Center Virtualization
@@ -42,7 +49,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 ################################################################################
 
 BuildRequires: gcc-c++
-BuildRequires: libcurl-devel
+# centos 5 uses curl-devl as libcurl-devel does not exist
+BuildRequires: curl-devel
 BuildRequires: libxml2-devel
 BuildRequires: xmlrpc-c-devel
 BuildRequires: openssl-devel
@@ -53,7 +61,8 @@ BuildRequires: ruby
 BuildRequires: scons
 BuildRequires: sqlite-devel
 BuildRequires: xmlrpc-c
-BuildRequires: java-1.7.0-openjdk-devel
+## java-1.7.0 appears not to be available for centos 5
+BuildRequires: java-1.6.0-openjdk-devel
 
 ################################################################################
 # Requires
@@ -150,6 +159,7 @@ Ruby interface for OpenNebula.
 
 %package sunstone
 Summary: Browser based UI for administrating a OpenNebula cloud
+Group: System
 Requires: %{name}-common = %{version}
 Requires: %{name}-ruby = %{version}
 
@@ -585,6 +595,198 @@ rm -f /etc/sysconfig/network-scripts/ifcfg-eth*
 /usr/lib/one/ruby/cloud/econe/EC2QueryClient.rb
 /usr/lib/one/ruby/cloud/occi/OCCIClient.rb
 
+# Seem to not be defined anywhere ... but not sure which package they should
+# be in.
+%{oneadmin_home}/remotes/auth/dummy/authenticate
+%{oneadmin_home}/remotes/auth/ldap/authenticate
+%{oneadmin_home}/remotes/auth/plain/authenticate
+%{oneadmin_home}/remotes/auth/server_cipher/authenticate
+%{oneadmin_home}/remotes/auth/server_x509/authenticate
+%{oneadmin_home}/remotes/auth/ssh/authenticate
... long list of files here.
+%{oneadmin_home}/remotes/vnm/vmware/VMware.rb
+%{oneadmin_home}/remotes/vnm/vmware/clean
+%{oneadmin_home}/remotes/vnm/vmware/post
+%{oneadmin_home}/remotes/vnm/vmware/pre
+
 ################################################################################
 # Changelog
 ################################################################################

The rpmbuild still fails with:

...
Requires(post): /bin/sh
Requires: bridge-utils config(opennebula-node-kvm) = 3.8.1-2.6 libvirt nfs-utils opennebula-common = 3.8.1 openssh-clients openssh-server qemu-kvm ruby
Processing files: opennebula-context-3.8.1-2.6
Provides: config(opennebula-context) = 3.8.1-2.6
Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh
Requires: /bin/bash config(opennebula-context) = 3.8.1-2.6
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/sjmudd/RPM/TMP/opennebula-3.8.1-2.6-root


RPM build errors:
    File not found by glob: /home/sjmudd/RPM/TMP/opennebula-3.8.1-2.6-root/usr/com/one/*
$

So I still seem to be missing something. Can anyone point me to what might be wrong,
as basically I'm still pretty unfamiliar with OpenNebula?  To which package should the
%{oneadmin_home}/remotes files be packaged, and what's this .../usr/com/one/* prefix?

Thanks for any pointers as I'd really like to be able to package OpenNebula on CentOS 5
and afterwards Fedora 17 and seem pretty close.

Regards,

Simon


More information about the Users mailing list