diff options
Diffstat (limited to 'recipes-support/puppet/puppet')
6 files changed, 83 insertions, 103 deletions
diff --git a/recipes-support/puppet/puppet/MAINT-Fix-duplicate-key-which-ruby-2.2-complains-abo.patch b/recipes-support/puppet/puppet/MAINT-Fix-duplicate-key-which-ruby-2.2-complains-abo.patch deleted file mode 100644 index 696c642d..00000000 --- a/recipes-support/puppet/puppet/MAINT-Fix-duplicate-key-which-ruby-2.2-complains-abo.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 05dad9b1d30a8ff1e8e4a06bc5eaf0b19dab43e2 Mon Sep 17 00:00:00 2001 -From: Jasper Lievisse Adriaanse <jasper@humppa.nl> -Date: Fri, 24 Jul 2015 20:18:08 +0200 -Subject: [PATCH] (MAINT) Fix duplicate key which ruby 2.2 complains about - -commit 05dad9b1d30a8ff1e8e4a06bc5eaf0b19dab43e2 from -https://github.com/puppetlabs/puppet.git - ---- - lib/puppet/defaults.rb | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb -index eeefefa..b591697 100644 ---- a/lib/puppet/defaults.rb -+++ b/lib/puppet/defaults.rb -@@ -486,10 +486,6 @@ module Puppet - :default => "stomp", - :desc => "Which type of queue to use for asynchronous processing.", - }, -- :queue_type => { -- :default => "stomp", -- :desc => "Which type of queue to use for asynchronous processing.", -- }, - :queue_source => { - :default => "stomp://localhost:61613/", - :desc => "Which type of queue to use for asynchronous processing. If your stomp server requires --- -2.1.4 - diff --git a/recipes-support/puppet/puppet/add_puppet_gemspec.patch b/recipes-support/puppet/puppet/add_puppet_gemspec.patch index a5c8e3b3..50c215cf 100644 --- a/recipes-support/puppet/puppet/add_puppet_gemspec.patch +++ b/recipes-support/puppet/puppet/add_puppet_gemspec.patch @@ -17,7 +17,7 @@ diff -urN puppet-3.7.3_ori/puppet.gemspec puppet-3.7.3/puppet.gemspec + s.license = 'Apache 2.0' + + s.bindir = 'bin' -+ s.executables = ['puppet', 'extlookup2hiera'] ++ s.executables = ['puppet'] + s.require_path = 'lib' + s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*') +end diff --git a/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch b/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch deleted file mode 100644 index 73e17697..00000000 --- a/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch +++ /dev/null @@ -1,37 +0,0 @@ -From d183826136ca77847da5f3e460f2e460faabc5be Mon Sep 17 00:00:00 2001 -From: Kylo Ginsberg <kylo@puppetlabs.com> -Date: Mon, 22 Dec 2014 10:11:38 -0800 -Subject: [PATCH] (maint) Change spec test to pass on ruby 2.2 - -commit d183826136ca77847da5f3e460f2e460faabc5be from -https://github.com/puppetlabs/puppet.git - -Prior to this change, this spec test failed on ruby 2.2.0-rc1 with: - - Failure/Error: Time.stubs(:now).returns(Time.parse("2011-01-06 12:00:00 UTC")) - NoMethodError: - undefined method `utc_offset' for nil:NilClass - -I didn't track down the root cause of this failure, but just -normalized this stub to use Time.utc, which (along with Time.local) -is the more common way of stubbing Time objects in the codebase. ---- - spec/unit/reports/store_spec.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/spec/unit/reports/store_spec.rb b/spec/unit/reports/store_spec.rb -index 7f94f7d..f56eccd 100755 ---- a/spec/unit/reports/store_spec.rb -+++ b/spec/unit/reports/store_spec.rb -@@ -24,7 +24,7 @@ describe processor do - end - - it "should write the report to the file in YAML" do -- Time.stubs(:now).returns(Time.parse("2011-01-06 12:00:00 UTC")) -+ Time.stubs(:now).returns(Time.utc(2011,01,06,12,00,00)) - @report.process - - File.read(File.join(Puppet[:reportdir], @report.host, "201101061200.yaml")).should == @report.to_yaml --- -2.1.4 - diff --git a/recipes-support/puppet/puppet/puppet.init b/recipes-support/puppet/puppet/puppet.init new file mode 100644 index 00000000..64ab32ee --- /dev/null +++ b/recipes-support/puppet/puppet/puppet.init @@ -0,0 +1,72 @@ +#!/bin/bash +# +# chkconfig: 35 20 80 +# description: The puppet agent connects to a puppet master, requests a +# catalog of resources, and configures the local system. +# + +# Get function from functions library +. /etc/init.d/functions + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/bin/puppet +DAEMON_OPTS="agent --server master --no-daemonize" +NAME="agent" +DESC="puppet agent" +PIDFILE="/var/run/${NAME}.pid" +PID=`test -f $PIDFILE && cat $PIDFILE` +RETVAL=0 + +test -x $DAEMON || exit 0 + +[ -r /etc/default/puppet ] && . /etc/default/puppet + +reload_puppet_agent() { + start-stop-daemon --stop --quiet --signal HUP --pidfile $PIDFILE +} + +start_puppet_agent() { + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --startas $DAEMON -- $NAME $DAEMON_OPTS +} + +stop_puppet_agent() { + start-stop-daemon --stop --retry TERM/10/KILL/5 --quiet --oknodo --pidfile $PIDFILE +} + +status_puppet_agent() { + status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}" +} + +case "$1" in + start) + echo -n "Starting $DESC" + start_puppet_agent + log_end_msg $? + ;; + stop) + echo -n "Stopping $DESC" + stop_puppet_agent + log_end_msg $? + ;; + reload) + echo -n "Reloading $DESC" + reload_puppet_agent + log_end_msg $? + ;; + status) + status_puppet_agent + ;; + restart|force-reload) + echo -n "Restarting $DESC" + stop_puppet_agent + start_puppet_agent + log_end_msg $? + ;; +*) + echo "Usage: $0 {start|stop|status|restart|force-reload|reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-support/puppet/puppet/puppet.service b/recipes-support/puppet/puppet/puppet.service new file mode 100644 index 00000000..c49dacfd --- /dev/null +++ b/recipes-support/puppet/puppet/puppet.service @@ -0,0 +1,10 @@ +[Unit] +Description=Puppet agent +After=network.target + +[Service] +ExecStart=/usr/bin/puppet agent --server master --no-daemonize +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch b/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch deleted file mode 100644 index 1cd5e25a..00000000 --- a/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch +++ /dev/null @@ -1,35 +0,0 @@ -From fca1579d62d5b978375511e062b9c18f4413dd5a Mon Sep 17 00:00:00 2001 -From: Mark Asselstine <mark.asselstine@windriver.com> -Date: Thu, 20 Aug 2015 14:06:32 -0400 -Subject: [PATCH] safe_yaml: syck isn't available for Ruby >= 2.0.0 - -This change was taken from various puppet forks but does not exist in -puppet upstream as they drop support for YAML on the network as part -of work to fix PUP-3272. - -https://tickets.puppetlabs.com/browse/PUP-3272 - -Community versions of this change: -https://github.com/kylog/puppet/commit/42b2e77ec24dfbbf2317d08615a35127afbc4782 - -Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> ---- - lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb b/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb -index 8670ace..722dd3e 100644 ---- a/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb -+++ b/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb -@@ -3,7 +3,7 @@ require "yaml" - # This needs to be defined up front in case any internal classes need to base - # their behavior off of this. - module SafeYAML -- YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck" -+ YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck") - end - - require "set" --- -2.1.4 - |