%global gem_name gearchanger-mcollective-plugin %if 0%{?rhel} <= 6 && 0%{?fedora} <= 16 %{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')} %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 %global gem_spec %{gem_dir}/specifications %endif #end rhel <= 6 && fedora <= 16 Summary: GearChanger plugin for mcollective service Name: rubygem-%{gem_name} Version: 0.1.1 Release: 1%{?dist} Group: Development/Languages License: ASL 2.0 URL: https://openshift.redhat.com/community/open-source Source0: https://mirror.openshift.com/pub/crankcase/source/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %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(stickshift-common) Requires: rubygem(json) Requires: selinux-policy-targeted Requires: policycoreutils-python %if 0%{?fedora} >= 17 BuildRequires: rubygems-devel %endif BuildRequires: ruby BuildRequires: rubygems BuildArch: noarch Provides: rubygem(%{gem_name}) = %version %description GearChanger plugin for mcollective based node/gear manager %prep %setup -q %build # Build and install into the rubygem structure 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 cat < %{buildroot}/var/www/stickshift/broker/config/environments/plugin-config/gearchanger-mcollective-plugin.rb Broker::Application.configure do config.gearchanger = { :rpc_options => { :disctimeout => 5, :timeout => 60, :verbose => false, :progress_bar => false, :filter => {"identity" => [], "fact" => [], "agent" => [], "cf_class" => []}, :config => "/etc/mcollective/client.cfg" }, :districts => { :enabled => false, :require_for_app_create => false, :max_capacity => 6000, #Only used by district create :first_uid => 1000 }, :node_profile_enabled => false } end EOF %post chown root:apache /etc/mcollective/client.cfg chmod og+r /etc/mcollective/client.cfg %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %dir %{gem_dir} %doc Gemfile LICENSE %{gem_dir}/doc/%{gem_name}-%{version} %{gem_dir}/gems/%{gem_name}-%{version} %{gem_dir}/cache/%{gem_name}-%{version}.gem %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec /var/www/stickshift/broker/config/environments/plugin-config/gearchanger-mcollective-plugin.rb %changelog * 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)