[rubygem-openshift-origin-controller] Initial import for Fedora

Brenton Leanhardt brenton at fedoraproject.org
Wed Aug 22 13:33:57 UTC 2012


commit f8696c519ddd0373ef9841ba4710e33bb7edbe98
Author: Brenton Leanhardt <bleanhar at redhat.com>
Date:   Wed Aug 22 09:33:21 2012 -0400

    Initial import for Fedora

 .gitignore                                         |    1 +
 ...ft-origin-controller_add_mongo_to_gemspec.patch |   27 ++++
 openshift-origin-controller_fix_test_deps.patch    |   19 +++
 ...-origin-controller_stickshift-common-load.patch |    9 +
 rubygem-openshift-origin-controller.spec           |  160 ++++++++++++++++++++
 sources                                            |    1 +
 6 files changed, 217 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f5fb8d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/openshift-origin-controller-0.14.15.gem
diff --git a/openshift-origin-controller_add_mongo_to_gemspec.patch b/openshift-origin-controller_add_mongo_to_gemspec.patch
new file mode 100644
index 0000000..32f5c94
--- /dev/null
+++ b/openshift-origin-controller_add_mongo_to_gemspec.patch
@@ -0,0 +1,27 @@
+diff -ur openshift-origin-controller-0.14.15/openshift-origin-controller.gemspec openshift-origin-controller-0.14.15.new/openshift-origin-controller.gemspec
+--- openshift-origin-controller-0.14.15/openshift-origin-controller.gemspec	2012-08-22 09:17:38.329528526 -0400
++++ openshift-origin-controller-0.14.15.new/openshift-origin-controller.gemspec	2012-08-22 09:19:56.464141200 -0400
+@@ -24,6 +24,7 @@
+     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+       s.add_runtime_dependency(%q<openshift-origin-common>, [">= 0"])
+       s.add_runtime_dependency(%q<state_machine>, [">= 0"])
++      s.add_runtime_dependency(%q<mongo>, [">= 0"])
+       s.add_development_dependency(%q<open4>, [">= 0"])
+       s.add_development_dependency(%q<activesupport>, ["~> 3.0.13"])
+       s.add_development_dependency(%q<json>, ["= 1.4.6"])
+@@ -38,6 +39,7 @@
+       s.add_dependency(%q<activesupport>, ["~> 3.0.13"])
+       s.add_dependency(%q<json>, ["= 1.4.6"])
+       s.add_dependency(%q<dnsruby>, [">= 0"])
++      s.add_dependency(%q<mongo>, [">= 0"])
+       s.add_dependency(%q<openshift-origin-common>, [">= 0"])
+       s.add_dependency(%q<state_machine>, [">= 0"])
+       s.add_dependency(%q<open4>, [">= 0"])
+@@ -53,6 +55,7 @@
+     s.add_dependency(%q<activesupport>, ["~> 3.0.13"])
+     s.add_dependency(%q<json>, ["= 1.4.6"])
+     s.add_dependency(%q<dnsruby>, [">= 0"])
++    s.add_dependency(%q<mongo>, [">= 0"])
+     s.add_dependency(%q<openshift-origin-common>, [">= 0"])
+     s.add_dependency(%q<state_machine>, [">= 0"])
+     s.add_dependency(%q<open4>, [">= 0"])
diff --git a/openshift-origin-controller_fix_test_deps.patch b/openshift-origin-controller_fix_test_deps.patch
new file mode 100644
index 0000000..8fc7c88
--- /dev/null
+++ b/openshift-origin-controller_fix_test_deps.patch
@@ -0,0 +1,19 @@
+diff -ur openshift-origin-controller-0.14.15/openshift-origin-controller.gemspec openshift-origin-controller-0.14.15.new/openshift-origin-controller.gemspec
+--- openshift-origin-controller-0.14.15/openshift-origin-controller.gemspec	2012-08-20 11:11:11.027947517 -0400
++++ openshift-origin-controller-0.14.15.new/openshift-origin-controller.gemspec	2012-08-20 11:14:09.246165714 -0400
+@@ -22,12 +22,11 @@
+     s.specification_version = 3
+ 
+     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+-      s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.13"])
+-      s.add_runtime_dependency(%q<json>, ["= 1.4.6"])
+-      s.add_runtime_dependency(%q<dnsruby>, [">= 0"])
+       s.add_runtime_dependency(%q<openshift-origin-common>, [">= 0"])
+       s.add_runtime_dependency(%q<state_machine>, [">= 0"])
+-      s.add_runtime_dependency(%q<open4>, [">= 0"])
++      s.add_development_dependency(%q<open4>, [">= 0"])
++      s.add_development_dependency(%q<activesupport>, ["~> 3.0.13"])
++      s.add_development_dependency(%q<json>, ["= 1.4.6"])
+       s.add_development_dependency(%q<rake>, [">= 0"])
+       s.add_development_dependency(%q<rspec>, [">= 0"])
+       s.add_development_dependency(%q<bundler>, [">= 0"])
diff --git a/openshift-origin-controller_stickshift-common-load.patch b/openshift-origin-controller_stickshift-common-load.patch
new file mode 100644
index 0000000..0a6f84b
--- /dev/null
+++ b/openshift-origin-controller_stickshift-common-load.patch
@@ -0,0 +1,9 @@
+diff -ur openshift-origin-controller-0.14.15/lib/stickshift-controller.rb openshift-origin-controller-0.14.15.new/lib/stickshift-controller.rb
+--- openshift-origin-controller-0.14.15/lib/stickshift-controller.rb	2012-08-21 11:38:16.970667193 -0400
++++ openshift-origin-controller-0.14.15.new/lib/stickshift-controller.rb	2012-08-21 11:39:05.279737949 -0400
+@@ -1,4 +1,4 @@
+-require "openshift-origin-common"
++require "stickshift-common"
+ 
+ module StickShift
+   module Controller
diff --git a/rubygem-openshift-origin-controller.spec b/rubygem-openshift-origin-controller.spec
new file mode 100644
index 0000000..b0298c3
--- /dev/null
+++ b/rubygem-openshift-origin-controller.spec
@@ -0,0 +1,160 @@
+%global gem_name openshift-origin-controller
+
+# Conditionally set required macros for distros without rubygems-devel This can
+# be removed once https://bugzilla.redhat.com/show_bug.cgi?id=788001 is
+# resolved.
+%if 0%{?el6}%{?fc16}
+%global rubyabi 1.8
+%global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
+%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
+%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
+%global gem_libdir %{gem_instdir}/lib
+%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
+%endif
+
+
+Summary:        Rails engine for the OpenShift Broker API
+Name:           rubygem-%{gem_name}
+Version:        0.14.15
+Release:        10%{?dist}
+Group:          Development/Tools
+License:        ASL 2.0
+URL:            http://openshift.redhat.com
+Source0:        http://mirror.openshift.com/pub/openshift-origin/source/rubygem-%{gem_name}/%{gem_name}-%{version}.gem
+# https://github.com/openshift/crankcase/pull/390
+Patch0:         openshift-origin-controller_fix_test_deps.patch
+# This patch is actually not needed upstream.  The OpenShift team is in the
+# process of renaming the packages for Fedora.  Once the packages are accepted
+# the packages will be renamed on the master branch to match Fedora.
+#https://github.com/openshift/crankcase/blob/master/stickshift/controller/lib/stickshift-controller.rb
+Patch1:         openshift-origin-controller_stickshift-common-load.patch
+# https://github.com/openshift/crankcase/pull/422
+Patch2:         openshift-origin-controller_add_mongo_to_gemspec.patch
+Requires:       ruby(abi) >= 1.8
+Requires:       rubygems
+Requires:       rubygem(state_machine)
+Requires:       rubygem(openshift-origin-common)
+Requires:       rubygem(mongo)
+
+%if 0%{?rhel} == 6
+BuildRequires:  rubygems
+%else
+BuildRequires:  rubygems-devel
+%endif
+BuildArch:      noarch
+Provides:       rubygem(%{gem_name}) = %version
+
+%description
+This packages contains a Rails engine that provides the majority of the
+OpenShift Broker API.
+
+%prep
+gem unpack %{SOURCE0}
+%setup -q -D -T -n  %{gem_name}-%{version}
+
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
+
+# Note: The patching of the spec file must happen after the 'gem spec' command.
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+mkdir -p .%{gem_dir}
+
+# Create the gem as gem install only works on a gem file
+gem build %{gem_name}.gemspec
+
+gem install -V \
+        --local \
+        --install-dir ./%{gem_dir} \
+        --bindir ./%{_bindir} \
+        --force \
+        --rdoc \
+        %{gem_name}-%{version}.gem
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
+rm -rf %{buildroot}%{gem_instdir}/test
+
+# https://github.com/openshift/crankcase/pull/344
+chmod 0644 %{buildroot}%{gem_libdir}/stickshift-controller/app/models/application.rb
+chmod 0644 %{buildroot}%{gem_libdir}/stickshift-controller/app/models/gear.rb
+chmod 0644 %{buildroot}%{gem_libdir}/stickshift-controller/app/controllers/base_controller.rb
+
+%files
+%dir %{gem_instdir}
+%{gem_instdir}/Gemfile
+%{gem_instdir}/Rakefile
+%{gem_libdir}
+%{gem_instdir}/%{gem_name}.gemspec
+%{gem_spec}
+%doc %{gem_instdir}/LICENSE
+%doc %{gem_instdir}/COPYRIGHT
+%doc %{gem_docdir}
+%doc %{gem_instdir}/README.md
+%exclude %{gem_cache}
+%exclude %{gem_instdir}/%{name}.spec
+
+%changelog
+* Wed Aug 22 2012 Brenton Leanhardt <bleanhar at redhat.com> - 0.14.15-10
+- Patched gemspec to add rubygem-mongo dependency
+
+* Tue Aug 21 2012 Brenton Leanhardt <bleanhar at redhat.com> - 0.14.15-9
+- Adding rubygem-mongo require
+- Patching openshift-origin-common load
+
+* Mon Aug 20 2012 Brenton Leanhardt <bleanhar at redhat.com> - 0.14.15-8
+- Properly recreate the gemspec with 'gem spec'
+- Dropped upstreamed openshift-origin-controller_gemspec_fixes.patch
+
+* Fri Aug 17 2012 Brenton Leanhardt <bleanhar at redhat.com> - 0.14.15-7
+- Fixed prep and build sections
+- Removed ruby-devel BuildRequire
+- Removed useless CONFIGURE_ARGS variable
+- Proper usage of gem_libdir and gem_instdir in install section
+- Correctly incorrect usage of doc directive and fixed incorrect gem_libdir
+  exclusion
+
+* Thu Aug 16 2012 Brenton Leanhardt <bleanhar at redhat.com> - 0.14.15-6
+- Using rubygem-devel macros
+- Removed open4, and json requirement and patched gemspec.  These were used
+  only for tests.
+- Remove unneeded activemodel require
+
+* Fri Aug 10 2012 Brenton Leanhardt <bleanhar at redhat.com> 0.14.15-5
+- Added patch to fix project homepage
+
+* Tue Aug 07 2012 Brenton Leanhardt <bleanhar at redhat.com> 0.14.15-4
+- Removed tests
+- Fixed file modes
+
+* Mon Aug 06 2012 Brenton Leanhardt <bleanhar at redhat.com> 0.14.15-3
+- Removed unneeded BuildRoot tag
+- Removed unneeded clean section
+- Removed unneeded defattr usage
+- Removed unneeded cached gem
+- Removed unneeded highline, parseconfig and json_pure BuildRequires
+- Fixed the Source0 URL
+
+* Thu Aug 02 2012 Troy Dawson <tdawson at redhat.com> 0.14.15-1
+- Renamed package to openshift-origin-node
+- Updated to the latest upstream stable release
+- Added LICENSE and COPYRIGHT to doc
+
+* Fri Jul 20 2012 Brenton Leanhardt <bleanhar at redhat.com> 0.14.4-1
+- Latest upstream release
+- Switched Source0 to gem
+
+* Wed Jul 18 2012 Brenton Leanhardt <bleanhar at redhat.com> 0.14.2-1
+- Added ruby-devel and rubygem-devel build requires and replaced the
+  ruby_sitelib and geminstdir macros with the standard macros.
+- Renamed %%gemname to %%gem_name so %%geminstdir will work correctly.
+- Fixed several file mode problems with libraries
+- Rebased to the latest upstream version
+
+* Mon Jul 09 2012 Brenton Leanhardt <bleanhar at redhat.com> 0.14.1-1
+- Initial package creation for Fedora
+- Removed rcov
diff --git a/sources b/sources
index e69de29..80dbb0d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+256a9e7d72de5b2c0a151698a32eddb3  openshift-origin-controller-0.14.15.gem


More information about the scm-commits mailing list