You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by Chris Lalancette <cl...@redhat.com> on 2011/05/24 00:01:05 UTC

[PATCH 0/2]: Deltacloud core spec file updates

All,
     Attached is a short series to clean up the spec files for the deltacloud
core.  The important bit is 2/2, which creates sub-packages for each of the
available core backends.  These sub-packages, in turn, bring in the required
dependencies for that particular deltacloud driver to work.  Please review.

Thanks,
Chris Lalancette


[PATCH 1/2] Remove rubygem-deltacloud-core.spec

Posted by Chris Lalancette <cl...@redhat.com>.
It's just confusing to have 2 specs lying around.

Signed-off-by: Chris Lalancette <cl...@redhat.com>
---
 server/support/fedora/rubygem-deltacloud-core.spec |  127 --------------------
 1 files changed, 0 insertions(+), 127 deletions(-)
 delete mode 100644 server/support/fedora/rubygem-deltacloud-core.spec

diff --git a/server/support/fedora/rubygem-deltacloud-core.spec b/server/support/fedora/rubygem-deltacloud-core.spec
deleted file mode 100644
index 23a766d..0000000
--- a/server/support/fedora/rubygem-deltacloud-core.spec
+++ /dev/null
@@ -1,127 +0,0 @@
-%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname deltacloud-core
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
-
-Summary: Deltacloud REST API
-Name: rubygem-%{gemname}
-Version: 0.3.0
-Release: 1%{?dist}
-Group: Development/Languages
-License: ASL 2.0 and MIT
-URL: http://incubator.apache.org/deltacloud
-Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: rubygems
-Requires: ruby(abi) = 1.8
-Requires: rubygem(haml)
-Requires: rubygem(sinatra) >= 1.0
-Requires: rubygem(rack) >= 1.1.0
-Requires: rubygem(thin)
-Requires: rubygem(json) >= 1.4.0
-Requires(post): chkconfig
-Requires(preun): chkconfig
-Requires(preun): initscripts
-Requires(postun): initscripts
-BuildRequires: rubygems
-BuildRequires: ruby(abi) = 1.8
-BuildRequires: rubygem(json) >= 1.4.0
-BuildRequires: rubygem(rake) >= 0.8.7
-BuildRequires: rubygem(rack-test) >= 0.5.0
-BuildRequires: rubygem(rspec) >= 1.3.0
-BuildArch: noarch
-Provides: rubygem(%{gemname}) = %{version}
-
-%description
-The Deltacloud API is built as a service-based REST API.
-You do not directly link a Deltacloud library into your program to use it.
-Instead, a client speaks the Deltacloud API over HTTP to a server
-which implements the REST interface.
-
-%package doc
-Summary: Documentation for %{name}
-Group: Documentation
-Requires:%{name} = %{version}-%{release}
-
-%description doc
-Documentation for %{name}
-
-%prep
-
-%build
-
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-mkdir -p %{buildroot}%{_initddir}
-gem install --local --install-dir %{buildroot}%{gemdir} \
-            --force --rdoc %{SOURCE0}
-mkdir -p %{buildroot}/%{_bindir}
-mkdir -p %{buildroot}/config
-mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
-mv %{buildroot}%{geminstdir}/support/fedora/%{gemname} %{buildroot}%{_initddir}
-mv -f %{buildroot}%{geminstdir}/support/fedora/deltacloudd %{buildroot}%{geminstdir}/bin
-rmdir %{buildroot}%{gemdir}/bin
-find %{buildroot}%{geminstdir}/bin -type f | xargs chmod 755
-find %{buildroot}%{geminstdir}/lib -type f | xargs chmod -x
-chmod 755 %{buildroot}%{_initddir}/%{gemname}
-
-%check
-pushd %{geminstdir}
-rake test:mock
-popd
-
-%clean
-rm -rf %{buildroot}
-
-%post
-# This adds the proper /etc/rc*.d links for the script
-/sbin/chkconfig --add %{gemname}
-
-%preun
-if [ $1 -eq 0 ] ; then
-    /sbin/service %{gemname} stop >/dev/null 2>&1
-    /sbin/chkconfig --del %{gemname}
-fi
-
-%postun
-if [ "$1" -ge "1" ] ; then
-    /sbin/service %{gemname} condrestart >/dev/null 2>&1 || :
-fi
-
-%files
-%defattr(-, root, root, -)
-%{_initddir}/%{gemname}
-%{_bindir}/deltacloudd
-%dir %{geminstdir}/
-%{geminstdir}/bin
-%{geminstdir}/LICENSE
-%{geminstdir}/NOTICE
-%{geminstdir}/DISCLAIMER
-%{geminstdir}/config.ru
-%{geminstdir}/*.rb
-%{geminstdir}/Rakefile
-%{geminstdir}/views
-%{geminstdir}/lib
-%{geminstdir}/public/images
-%{geminstdir}/public/stylesheets
-%{geminstdir}/public/favicon.ico
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
-%{geminstdir}/config/drivers.yaml
-# MIT
-%{gemdir}/gems/%{gemname}-%{version}/public/javascripts
-
-%files doc
-%defattr(-, root, root, -)
-%{gemdir}/doc/%{gemname}-%{version}
-%{geminstdir}/tests
-%{geminstdir}/support
-%{geminstdir}/%{gemname}.gemspec
-
-%changelog
-* Fri Apr  8 2011 David Lutterkort <lu...@redhat.com> - 0.3.0-1
-- - Renamed COPYING to LICENSE, include NOTICE and DISCLAIMER
-
-* Mon Jan 31 2011 Michal Fojtik <mf...@redhat.com> - 0.2.0-1
-- Initial package
-- 
1.7.4.4


Re: [PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Michal Fojtik <mf...@redhat.com>.
On May 26, 2011, at 4:20 PM, Chris Lalancette wrote:

> On 05/25/11 - 08:40:10PM, Michal Fojtik wrote:
>> On May 24, 2011, at 12:01 AM, Chris Lalancette wrote:
>> 
>> Please note, that spec file imported in support directory is a little
>> bit outdated.
>> 
>> You can find the latest one here:
>> 
>> http://mifo.sk/fedora/deltacloud-core/master/deltacloud-core.spec
>> (http://mifo.sk/fedora/deltacloud-core/master/ contains all patches)
>> 
>> However, I like this idea so ACK (but please update that spec
>> using the latest Fedora one).
> 
> Hey Michal,
>     So I went ahead and updated the specfile in the svn repository to match
> the one from fedora, and then added my changes on top.  However, there is one
> bit I don't understand from the fedora spec.  For some reason the fedora spec
> includes a second Source file, Source1, which contains deltacloudd-fedora.
> Is there some reason that we aren't using the deltacloudd from the svn
> repository?

Yes, reason is:

root_path = File.join('/', 'usr', 'share', 'deltacloud-core')

In Fedora we're installing deltacloud-core to /usr/share instead of GEMPATH.

Also we're not longer using 'gem install' method but instead we 'unpacking' content
of gem and then installing it on the right place.

This executor is created automatically by 'gem install' to trigger the real executor
located in GEMPATH. Using 'gem unpack' method there is no executor for starting
deltacloudd located in /usr/share/deltacloud-core.

I agree that having just one file for starting API will be best solution, however this
require updating our 'deltacloudd' to support executing core from different locations.

  -- Michal

------------------------------------------------------
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org


Re: [PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Michal Fojtik <mf...@redhat.com>.
On May 26, 2011, at 4:20 PM, Chris Lalancette wrote:

> On 05/25/11 - 08:40:10PM, Michal Fojtik wrote:
>> On May 24, 2011, at 12:01 AM, Chris Lalancette wrote:
>> 
>> Please note, that spec file imported in support directory is a little
>> bit outdated.
>> 
>> You can find the latest one here:
>> 
>> http://mifo.sk/fedora/deltacloud-core/master/deltacloud-core.spec
>> (http://mifo.sk/fedora/deltacloud-core/master/ contains all patches)
>> 
>> However, I like this idea so ACK (but please update that spec
>> using the latest Fedora one).
> 
> Hey Michal,
>     So I went ahead and updated the specfile in the svn repository to match
> the one from fedora, and then added my changes on top.  However, there is one
> bit I don't understand from the fedora spec.  For some reason the fedora spec
> includes a second Source file, Source1, which contains deltacloudd-fedora.
> Is there some reason that we aren't using the deltacloudd from the svn
> repository?

Also I pushed latest Fedora spec/launchers to SVN (server/support/fedora)
so feel free to merge/rebase against them. Once it will be done I will
update deltacloud-core spec file in Fedora and push a new update.

Please don't forget to bump up release version :-)

  -- Michal

> 
> -- 
> Chris Lalancette

------------------------------------------------------
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org


Re: [PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Chris Lalancette <cl...@redhat.com>.
On 05/25/11 - 08:40:10PM, Michal Fojtik wrote:
> On May 24, 2011, at 12:01 AM, Chris Lalancette wrote:
> 
> Please note, that spec file imported in support directory is a little
> bit outdated.
> 
> You can find the latest one here:
> 
> http://mifo.sk/fedora/deltacloud-core/master/deltacloud-core.spec
> (http://mifo.sk/fedora/deltacloud-core/master/ contains all patches)
> 
> However, I like this idea so ACK (but please update that spec
> using the latest Fedora one).

Hey Michal,
     So I went ahead and updated the specfile in the svn repository to match
the one from fedora, and then added my changes on top.  However, there is one
bit I don't understand from the fedora spec.  For some reason the fedora spec
includes a second Source file, Source1, which contains deltacloudd-fedora.
Is there some reason that we aren't using the deltacloudd from the svn
repository?

-- 
Chris Lalancette

Re: [PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Michal Fojtik <mi...@mifo.sk>.
On May 24, 2011, at 12:01 AM, Chris Lalancette wrote:

Please note, that spec file imported in support directory is a little
bit outdated.

You can find the latest one here:

http://mifo.sk/fedora/deltacloud-core/master/deltacloud-core.spec
(http://mifo.sk/fedora/deltacloud-core/master/ contains all patches)

However, I like this idea so ACK (but please update that spec
using the latest Fedora one).

 -- Michal

> These subpackages will bring in all of the dependencies
> necessary to run the core to connect to the various
> backends.
> 
> Signed-off-by: Chris Lalancette <cl...@redhat.com>
> ---
> server/support/fedora/deltacloud-core.spec |  127 +++++++++++++++++++++++++++-
> 1 files changed, 125 insertions(+), 2 deletions(-)
> 
> diff --git a/server/support/fedora/deltacloud-core.spec b/server/support/fedora/deltacloud-core.spec
> index c4b783d..90a207d 100644
> --- a/server/support/fedora/deltacloud-core.spec
> +++ b/server/support/fedora/deltacloud-core.spec
> @@ -5,7 +5,7 @@
> Summary: Deltacloud REST API
> Name: deltacloud-core
> Version: 0.3.0
> -Release: 1%{?dist}
> +Release: 2%{?dist}
> Group: Development/Languages
> License: ASL 2.0 and MIT
> URL: http://incubator.apache.org/deltacloud
> @@ -50,11 +50,101 @@ which implements the REST interface.
> %package doc
> Summary: Documentation for %{name}
> Group: Documentation
> -Requires:%{name} = %{version}-%{release}
> +Requires: %{name} = %{version}-%{release}
> 
> %description doc
> Documentation for %{name}
> 
> +%package ec2
> +Summary: Deltacloud Core for EC2
> +Requires: %{name} = %{version}-%{release}
> +Requires: rubygem(aws)
> +
> +%description ec2
> +The ec2 sub-package brings in all dependencies necessary to use deltacloud
> +core to connect to EC2.
> +
> +%package azure
> +Summary: Deltacloud Core for Azure
> +Requires: %{name} = %{version}-%{release}
> +Requires: rubygem(waz-blobs)
> +
> +%description azure
> +The azure sub-package brings in all dependencies necessary to use deltacloud
> +core to connect to Azure.
> +
> +%package gogrid
> +Summary: Deltacloud Core for GoGrid
> +Requires: %{name} = %{version}-%{release}
> +
> +%description gogrid
> +The gogrid sub-package brings in all dependencies necessary to use deltacloud
> +core to connect to GoGrid.
> +
> +%package mock
> +Summary: Deltacloud Core for Mock
> +Requires: %{name} = %{version}-%{release}
> +
> +%description mock
> +The mock sub-package brings in all dependencies necessary to use deltacloud
> +core to connect to Mock.
> +
> +%package opennebula
> +Summary: Deltacloud Core for OpenNebula
> +Requires: %{name} = %{version}-%{release}
> +
> +%description opennebula
> +The opennebula sub-package brings in all dependencies necessary to use
> +deltacloud core to connect to OpenNebula.
> +
> +%package rackspace
> +Summary: Deltacloud Core for Rackspace
> +Requires: %{name} = %{version}-%{release}
> +Requires: rubygem(cloudfiles)
> +Requires: rubygem(cloudservers)
> +
> +%description rackspace
> +The rackspace sub-package brings in all dependencies necessary to use deltacloud
> +core to connect to Rackspace.
> +
> +%package rhevm
> +Summary: Deltacloud Core for RHEV-M
> +Requires: %{name} = %{version}-%{release}
> +Requires: rubygem(nokogiri)
> +Requires: rubygem(rest-client)
> +
> +%description rhevm
> +The rhevm sub-package brings in all dependencies necessary to use deltacloud
> +core to connect to RHEV-M.
> +
> +%package rimuhosting
> +Summary: Deltacloud Core for Rimuhosting
> +Requires: %{name} = %{version}-%{release}
> +
> +%description rimuhosting
> +The rimuhosting sub-package brings in all dependencies necessary to use
> +deltacloud core to connect to Rimuhosting.
> +
> +%package sbc
> +Summary: Deltacloud Core for SBC
> +Requires: %{name} = %{version}-%{release}
> +Requires: rubygem(nokogiri)
> +
> +%description sbc
> +The sbc sub-package brings in all dependencies necessary to use deltacloud core
> +to connect to SBC.
> +
> +%package terremark
> +Summary: Deltacloud Core for Terremark
> +Requires: %{name} = %{version}-%{release}
> +Requires: rubygem(nokogiri)
> +Requires: rubygem(fog)
> +Requires: rubygem(excon)
> +
> +%description terremark
> +The terremark sub-package brings in all dependencies necessary to use deltacloud
> +core to connect to Terremark.
> +
> %prep
> 
> %build
> @@ -128,7 +218,40 @@ fi
> %{geminstdir}/support
> %{geminstdir}/deltacloud-core.gemspec
> 
> +%files ec2
> +%defattr(-, root, root, -)
> +
> +%files azure
> +%defattr(-, root, root, -)
> +
> +%files gogrid
> +%defattr(-, root, root, -)
> +
> +%files mock
> +%defattr(-, root, root, -)
> +
> +%files opennebula
> +%defattr(-, root, root, -)
> +
> +%files rackspace
> +%defattr(-, root, root, -)
> +
> +%files rhevm
> +%defattr(-, root, root, -)
> +
> +%files rimuhosting
> +%defattr(-, root, root, -)
> +
> +%files sbc
> +%defattr(-, root, root, -)
> +
> +%files terremark
> +%defattr(-, root, root, -)
> +
> %changelog
> +* Thu May 19 2011 Chris Lalancette <cl...@redhat.com> - 0.3.0-2
> +- Create sub-packages to bring in dependencies
> +
> * Fri Apr  8 2011 David Lutterkort <lu...@redhat.com> - 0.3.0-1
> - Renamed COPYING to LICENSE, include NOTICE and DISCLAIMER
> 
> -- 
> 1.7.4.4
> 


Re: [PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Chris Lalancette <cl...@redhat.com>.
On 05/24/11 - 03:59:56PM, Justin Clift wrote:
> On 24/05/2011, at 8:01 AM, Chris Lalancette wrote:
> <snip>
> > Version: 0.3.0
> > -Release: 1%{?dist}
> > +Release: 2%{?dist}
> 
> Not reviewing the patch or anything, just noticed
> the release numbers while sort of idly looking.
> 
> The official Fedora releases are already at 0.3.0-5,
> so should this be "Release: 6%{?dist}" or something?
> 
> Regards and best wishes,

Ah, good question.  I'm happy to change it; I'll let lutter comment on what
he wants to do here.

Thanks,
-- 
Chris Lalancette

Re: [PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Justin Clift <jc...@redhat.com>.
On 24/05/2011, at 8:01 AM, Chris Lalancette wrote:
<snip>
> Version: 0.3.0
> -Release: 1%{?dist}
> +Release: 2%{?dist}

Not reviewing the patch or anything, just noticed
the release numbers while sort of idly looking.

The official Fedora releases are already at 0.3.0-5,
so should this be "Release: 6%{?dist}" or something?

Regards and best wishes,

Justin Clift

--
Aeolus Community Manager
http://www.aeolusproject.org



Re: [PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Chris Lalancette <cl...@redhat.com>.
On 05/23/11 - 06:01:07PM, Chris Lalancette wrote:
> These subpackages will bring in all of the dependencies
> necessary to run the core to connect to the various
> backends.
> 
> Signed-off-by: Chris Lalancette <cl...@redhat.com>
> ---
>  server/support/fedora/deltacloud-core.spec |  127 +++++++++++++++++++++++++++-
>  1 files changed, 125 insertions(+), 2 deletions(-)

Besides jclift's comment on the Release number (which is easy enough to
change), any other comments on this?

-- 
Chris Lalancette

[PATCH 2/2] Create subpackages in the RPM spec file.

Posted by Chris Lalancette <cl...@redhat.com>.
These subpackages will bring in all of the dependencies
necessary to run the core to connect to the various
backends.

Signed-off-by: Chris Lalancette <cl...@redhat.com>
---
 server/support/fedora/deltacloud-core.spec |  127 +++++++++++++++++++++++++++-
 1 files changed, 125 insertions(+), 2 deletions(-)

diff --git a/server/support/fedora/deltacloud-core.spec b/server/support/fedora/deltacloud-core.spec
index c4b783d..90a207d 100644
--- a/server/support/fedora/deltacloud-core.spec
+++ b/server/support/fedora/deltacloud-core.spec
@@ -5,7 +5,7 @@
 Summary: Deltacloud REST API
 Name: deltacloud-core
 Version: 0.3.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Development/Languages
 License: ASL 2.0 and MIT
 URL: http://incubator.apache.org/deltacloud
@@ -50,11 +50,101 @@ which implements the REST interface.
 %package doc
 Summary: Documentation for %{name}
 Group: Documentation
-Requires:%{name} = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
 
 %description doc
 Documentation for %{name}
 
+%package ec2
+Summary: Deltacloud Core for EC2
+Requires: %{name} = %{version}-%{release}
+Requires: rubygem(aws)
+
+%description ec2
+The ec2 sub-package brings in all dependencies necessary to use deltacloud
+core to connect to EC2.
+
+%package azure
+Summary: Deltacloud Core for Azure
+Requires: %{name} = %{version}-%{release}
+Requires: rubygem(waz-blobs)
+
+%description azure
+The azure sub-package brings in all dependencies necessary to use deltacloud
+core to connect to Azure.
+
+%package gogrid
+Summary: Deltacloud Core for GoGrid
+Requires: %{name} = %{version}-%{release}
+
+%description gogrid
+The gogrid sub-package brings in all dependencies necessary to use deltacloud
+core to connect to GoGrid.
+
+%package mock
+Summary: Deltacloud Core for Mock
+Requires: %{name} = %{version}-%{release}
+
+%description mock
+The mock sub-package brings in all dependencies necessary to use deltacloud
+core to connect to Mock.
+
+%package opennebula
+Summary: Deltacloud Core for OpenNebula
+Requires: %{name} = %{version}-%{release}
+
+%description opennebula
+The opennebula sub-package brings in all dependencies necessary to use
+deltacloud core to connect to OpenNebula.
+
+%package rackspace
+Summary: Deltacloud Core for Rackspace
+Requires: %{name} = %{version}-%{release}
+Requires: rubygem(cloudfiles)
+Requires: rubygem(cloudservers)
+
+%description rackspace
+The rackspace sub-package brings in all dependencies necessary to use deltacloud
+core to connect to Rackspace.
+
+%package rhevm
+Summary: Deltacloud Core for RHEV-M
+Requires: %{name} = %{version}-%{release}
+Requires: rubygem(nokogiri)
+Requires: rubygem(rest-client)
+
+%description rhevm
+The rhevm sub-package brings in all dependencies necessary to use deltacloud
+core to connect to RHEV-M.
+
+%package rimuhosting
+Summary: Deltacloud Core for Rimuhosting
+Requires: %{name} = %{version}-%{release}
+
+%description rimuhosting
+The rimuhosting sub-package brings in all dependencies necessary to use
+deltacloud core to connect to Rimuhosting.
+
+%package sbc
+Summary: Deltacloud Core for SBC
+Requires: %{name} = %{version}-%{release}
+Requires: rubygem(nokogiri)
+
+%description sbc
+The sbc sub-package brings in all dependencies necessary to use deltacloud core
+to connect to SBC.
+
+%package terremark
+Summary: Deltacloud Core for Terremark
+Requires: %{name} = %{version}-%{release}
+Requires: rubygem(nokogiri)
+Requires: rubygem(fog)
+Requires: rubygem(excon)
+
+%description terremark
+The terremark sub-package brings in all dependencies necessary to use deltacloud
+core to connect to Terremark.
+
 %prep
 
 %build
@@ -128,7 +218,40 @@ fi
 %{geminstdir}/support
 %{geminstdir}/deltacloud-core.gemspec
 
+%files ec2
+%defattr(-, root, root, -)
+
+%files azure
+%defattr(-, root, root, -)
+
+%files gogrid
+%defattr(-, root, root, -)
+
+%files mock
+%defattr(-, root, root, -)
+
+%files opennebula
+%defattr(-, root, root, -)
+
+%files rackspace
+%defattr(-, root, root, -)
+
+%files rhevm
+%defattr(-, root, root, -)
+
+%files rimuhosting
+%defattr(-, root, root, -)
+
+%files sbc
+%defattr(-, root, root, -)
+
+%files terremark
+%defattr(-, root, root, -)
+
 %changelog
+* Thu May 19 2011 Chris Lalancette <cl...@redhat.com> - 0.3.0-2
+- Create sub-packages to bring in dependencies
+
 * Fri Apr  8 2011 David Lutterkort <lu...@redhat.com> - 0.3.0-1
 - Renamed COPYING to LICENSE, include NOTICE and DISCLAIMER
 
-- 
1.7.4.4