%global gem_name openshift-origin-msg-broker-mcollective %if 0%{?rhel} <= 6 && 0%{?fedora} <= 16 %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec %endif #end rhel <= 6 && fedora <= 16 Summary: OpenShift Origin plugin for mcollective service Name: rubygem-%{gem_name} Version: 0.1.1 Release: 9%{?dist} Group: Development/Languages License: ASL 2.0 URL: https://openshift.redhat.com/community/open-source Source0: https://mirror.openshift.com/pub/openshift-origin/source/%{name}/%{gem_name}-%{version}.gem # The original upstream spec file contained a heredoc that populated a config # file that is actually ruby code. This file is simply the contents of that # heredoc and the following bug has been filed to have this fixed upstream: # https://bugzilla.redhat.com/show_bug.cgi?id=846407 Source1: config-gearchanger-mcollective-plugin.rb # Renaming patch, will go upstream with renaming push Patch0: rubygem-openshift-origin-msg-broker-mcollective-rename-fix.patch %if 0%{?rhel} <= 6 && 0%{?fedora} <= 16 Requires: ruby(abi) = 1.8 %endif %if 0%{?fedora} >= 17 Requires: ruby(abi) = 1.9.1 %endif Requires: rubygems Requires: mcollective Requires: mcollective-client Requires: qpid-cpp-server Requires: qpid-cpp-client Requires: ruby-qpid #Requires: qpid-tools Requires: rubygem(openshift-origin-common) Requires: rubygem(json) %if 0%{?fedora} >= 17 BuildRequires: rubygems-devel %endif BuildRequires: ruby BuildRequires: rubygems BuildArch: noarch Provides: rubygem(%{gem_name}) = %version %description OpenShift Origin plugin for mcollective based node/gear manager %package doc Summary: OpenShift Origin plugin for mcollective docs %description doc OpenShift Origin plugin for mcollective based node/gear manager ri documentation %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} %patch0 -p1 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec # rename lib to correct name mv lib/gearchanger-mcollective-plugin.rb lib/openshift-origin-msg-broker-mcollective.rb sed -i -e 's|\"lib/gearchanger-mcollective-plugin.rb\"|\"lib/openshift-origin-msg-broker-mcollective.rb\"|' %{gem_name}.gemspec %build # Build and install into the rubygem structure mkdir -p ./%{gem_dir} gem build %{gem_name}.gemspec gem install -V \ --local \ --install-dir ./%{gem_dir} \ --bindir ./%{_bindir} \ --force %{gem_name}-%{version}.gem %install rm -rf %{buildroot} mkdir -p %{buildroot}%{gem_dir} cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_var}/www/stickshift/broker/config/environments/plugin-config install -m0644 %{SOURCE1} %{buildroot}%{_var}/www/stickshift/broker/config/environments/plugin-config/gearchanger-mcollective-plugin.rb %files %doc %{gem_instdir}/Gemfile %doc %{gem_instdir}/LICENSE %doc %{gem_instdir}/README.md %doc %{gem_instdir}/COPYRIGHT %{gem_instdir} %{gem_cache} %{gem_spec} %{_var}/www/stickshift/broker/config/environments/plugin-config/gearchanger-mcollective-plugin.rb %files doc %{gem_docdir} %changelog * Fri Sep 07 2012 Adam Miller - 0.1.1-9 - Removed ghost perms on mcollective config, fixed in BZ#853574 * Wed Aug 22 2012 Troy Dawson - 0.1.1-8 - Renamed libraries to correct name * Wed Aug 22 2012 Troy Dawson - 0.1.1-7 - Fixed ruby abi requires * Tue Aug 21 2012 Troy Dawson - 0.1.1-6 - Switched over to build from a gem * Fri Aug 17 2012 Adam Miller - 0.1.1-5 - Removed unneeded ruby_sitelib - moved license and readme to original location - removed policycoreutils-python and selinux-policy-targeted as deps - changed stickshift-common dep to openshift-origin-common for F18 pkg naming - added doc subpackage * Thu Aug 16 2012 Adam Miller - 0.1.1-4 - Removed buildroot, clean, and defattrs - using the gem macros defined * Tue Aug 07 2012 Adam Miller - 0.1.1-3 - Removed heredoc, added as patch/file, relayed upstream RH BZ#846407 - fixed persmissions of ghost config file * Wed Aug 01 2012 Adam Miller 0.1.1-2 - rename for Fedora * Wed Jul 11 2012 Adam Miller 0.1.1-1 - bump_minor_versions for sprint 15 (admiller@redhat.com) * Wed Jul 11 2012 Adam Miller 0.0.9-1 - mcollective-plugin pkg doesn't require qpid-cpp-server or mcollective, only -client (admiller@redhat.com) * Tue Jul 10 2012 Adam Miller 0.0.8-1 - Merge pull request #211 from kraman/dev/kraman/bugs/835489 (dmcphers@redhat.com) - Add modify application dns and use where applicable (dmcphers@redhat.com) - Bugz 835489. Fixing location for district config file and adding in missing node_profile_enabled blocks (kraman@gmail.com) * Tue Jul 10 2012 Adam Miller - 0.0.7-2 - Update spec file for RHEL6+Fedora16 as well as Fedora17+ * Tue Jul 10 2012 Adam Miller 0.0.7-1 - Bug 838786 (dmcphers@redhat.com) * Mon Jul 09 2012 Dan McPherson 0.0.6-1 - cleanup specs (dmcphers@redhat.com) * Mon Jul 09 2012 Dan McPherson 0.0.5-1 - fix for bug#837579 - handle better messaging on find_available_node failure (rchopra@redhat.com) * Thu Jul 05 2012 Adam Miller 0.0.4-1 - Fix for BZ 837522. (mpatel@redhat.com) * Tue Jul 03 2012 Adam Miller 0.0.3-1 - fixed a couple typos (admiller@redhat.com) - Automatic commit of package [rubygem-gearchanger-mcollective-plugin] release [0.0.1-1]. (kraman@gmail.com) - Fix typo and remove dependency. (mpatel@redhat.com) - MCollective updates - Added mcollective-qpid plugin - Added mcollective- gearchanger plugin - Added mcollective agent and facter plugins - Added option to support ignoring node profile - Added systemu dependency for mcollective-client (kraman@gmail.com) * Tue Jul 03 2012 Adam Miller - fixed a couple typos (admiller@redhat.com) - Automatic commit of package [rubygem-gearchanger-mcollective-plugin] release [0.0.1-1]. (kraman@gmail.com) - Fix typo and remove dependency. (mpatel@redhat.com) - MCollective updates - Added mcollective-qpid plugin - Added mcollective- gearchanger plugin - Added mcollective agent and facter plugins - Added option to support ignoring node profile - Added systemu dependency for mcollective-client (kraman@gmail.com)