diff options
author | Pablo Saavedra <psaavedra@igalia.com> | 2018-02-15 23:33:24 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-02-20 17:05:27 -0500 |
commit | aae8b860aa07b249ec85cfa6031043950df462c7 (patch) | |
tree | 103ae91ea58bbc156f62f881880d8be5cce97f61 /recipes-support | |
parent | 992463503e844fe40f3bb2a56df5db0cb715942e (diff) | |
download | meta-cloud-services-aae8b860aa07b249ec85cfa6031043950df462c7.tar.gz |
Puppet upstream upgrade to 5.4.0
* Upstream to 5.4.0 [1][2][3][4][5]
* Puppet 5 recipe is the official Puppet agent version
with support for Ruby 2.4 [6]
* Updated reference versions in the README file
* Hiera isn’t separate from Puppet anymore [7].
* Do not install extlookup2hiera, it has been removed upstream
* Hiera began as an independent Ruby library that worked with
Puppet. Over time, it became a requirement and was even included
in the puppet-agent package, but it was limited by its original
design.
* Removed puppet_3.7.3.bb recipe
* Drop the superseded patches
* Added init script
* Added systemd script
Facter 2.5 upstream release
* Puppet 5 relays on Facter 3.10. Facter 3.10 reworks Facter 2.X
code [8] in native code instead of Ruby gem. Facter 2.5 is
still compatible with 5 series to help with Puppet 5 testing.
* facter before 2.4.0 uses a deprecated Puppet settings API
making `facter --puppet` no longer work with Puppet 4 or
higher [9].
* Community, partner, and some of Puppet's internal testing
workflows continue to use (ruby) Facter 2.4 [10], instead of
native Facter 3, which is not (yet) available as a gem.
* To help with Puppet 5 testing, we need to do a maintenance
release in the Facter 2 series.
[1] https://docs.puppet.com/puppet/5.0/release_notes.html
[2] https://docs.puppet.com/puppet/5.1/release_notes.html
[3] https://docs.puppet.com/puppet/5.2/release_notes.html
[4] https://docs.puppet.com/puppet/5.3/release_notes.html
[5] https://docs.puppet.com/puppet/5.4/release_notes.html
[6] https://puppet.com/docs/puppet/4.10/hiera_intro.html
[7] https://tickets.puppetlabs.com/browse/PA-1107
[8] https://github.com/puppetlabs/facter/tree/3.10.x
[9] http://metadata.ftp-master.debian.org/changelogs/main/p/puppet/puppet_5.1.0-1_changelog
[10] https://tickets.puppetlabs.com/browse/FACT-1630
Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-support')
-rw-r--r-- | recipes-support/facter/facter_2.5.0.bb (renamed from recipes-support/facter/facter_2.3.0.bb) | 4 | ||||
-rw-r--r-- | recipes-support/puppet/README | 12 | ||||
-rw-r--r-- | recipes-support/puppet/puppet/MAINT-Fix-duplicate-key-which-ruby-2.2-complains-abo.patch | 30 | ||||
-rw-r--r-- | recipes-support/puppet/puppet/add_puppet_gemspec.patch | 2 | ||||
-rw-r--r-- | recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch | 37 | ||||
-rw-r--r-- | recipes-support/puppet/puppet/puppet.init | 72 | ||||
-rw-r--r-- | recipes-support/puppet/puppet/puppet.service | 10 | ||||
-rw-r--r-- | recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch | 35 | ||||
-rw-r--r-- | recipes-support/puppet/puppet_5.4.0.bb (renamed from recipes-support/puppet/puppet_3.7.3.bb) | 30 |
9 files changed, 114 insertions, 118 deletions
diff --git a/recipes-support/facter/facter_2.3.0.bb b/recipes-support/facter/facter_2.5.0.bb index b5a46e7..ef04e93 100644 --- a/recipes-support/facter/facter_2.3.0.bb +++ b/recipes-support/facter/facter_2.5.0.bb | |||
@@ -7,8 +7,8 @@ SRC_URI = " \ | |||
7 | http://downloads.puppetlabs.com/facter/facter-${PV}.tar.gz \ | 7 | http://downloads.puppetlabs.com/facter/facter-${PV}.tar.gz \ |
8 | file://add_facter_gemspec.patch \ | 8 | file://add_facter_gemspec.patch \ |
9 | " | 9 | " |
10 | SRC_URI[md5sum] = "7bb6dbeaef86cd79300b4723c06932bc" | 10 | SRC_URI[md5sum] = "58b6b609f19d1c146c600c4dc6e7fa39" |
11 | SRC_URI[sha256sum] = "a91ea915b276172e002a8670684e5c6be7df1dfdd55db6937d27fffad70c5e51" | 11 | SRC_URI[sha256sum] = "47ccbfb8a69e4d48c3c88e47ac1ae754fcc583d4090fa9d838461b3ede7b07cb" |
12 | 12 | ||
13 | inherit ruby | 13 | inherit ruby |
14 | 14 | ||
diff --git a/recipes-support/puppet/README b/recipes-support/puppet/README index 2de808a..8befb15 100644 --- a/recipes-support/puppet/README +++ b/recipes-support/puppet/README | |||
@@ -6,11 +6,17 @@ state of your IT infrastructure, then automatically enforces the correct state. | |||
6 | 6 | ||
7 | Basic Requirements | 7 | Basic Requirements |
8 | ------------------------ | 8 | ------------------------ |
9 | Ruby 1.8.7 or later | 9 | Ruby 2.4 or later |
10 | Facter 1.7.0 or later | 10 | Facter 3.10.0 or later |
11 | Hiera 1.0 or later | 11 | Hiera 5 or later [1] |
12 | The json gem (any modern version) | 12 | The json gem (any modern version) |
13 | 13 | ||
14 | [1] Hiera isn’t separate from Puppet anymore | ||
15 | Hiera began as an independent Ruby library that worked with Puppet. | ||
16 | Over time, it became a requirement and was even included in the | ||
17 | puppet-agent package, but it was limited by its original design. | ||
18 | |||
19 | https://puppet.com/docs/puppet/4.10/hiera_intro.html | ||
14 | 20 | ||
15 | Simple Demo | 21 | Simple Demo |
16 | ------------------------ | 22 | ------------------------ |
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 696c642..0000000 --- a/recipes-support/puppet/puppet/MAINT-Fix-duplicate-key-which-ruby-2.2-complains-abo.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 05dad9b1d30a8ff1e8e4a06bc5eaf0b19dab43e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jasper Lievisse Adriaanse <jasper@humppa.nl> | ||
3 | Date: Fri, 24 Jul 2015 20:18:08 +0200 | ||
4 | Subject: [PATCH] (MAINT) Fix duplicate key which ruby 2.2 complains about | ||
5 | |||
6 | commit 05dad9b1d30a8ff1e8e4a06bc5eaf0b19dab43e2 from | ||
7 | https://github.com/puppetlabs/puppet.git | ||
8 | |||
9 | --- | ||
10 | lib/puppet/defaults.rb | 4 ---- | ||
11 | 1 file changed, 4 deletions(-) | ||
12 | |||
13 | diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb | ||
14 | index eeefefa..b591697 100644 | ||
15 | --- a/lib/puppet/defaults.rb | ||
16 | +++ b/lib/puppet/defaults.rb | ||
17 | @@ -486,10 +486,6 @@ module Puppet | ||
18 | :default => "stomp", | ||
19 | :desc => "Which type of queue to use for asynchronous processing.", | ||
20 | }, | ||
21 | - :queue_type => { | ||
22 | - :default => "stomp", | ||
23 | - :desc => "Which type of queue to use for asynchronous processing.", | ||
24 | - }, | ||
25 | :queue_source => { | ||
26 | :default => "stomp://localhost:61613/", | ||
27 | :desc => "Which type of queue to use for asynchronous processing. If your stomp server requires | ||
28 | -- | ||
29 | 2.1.4 | ||
30 | |||
diff --git a/recipes-support/puppet/puppet/add_puppet_gemspec.patch b/recipes-support/puppet/puppet/add_puppet_gemspec.patch index a5c8e3b..50c215c 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 | |||
17 | + s.license = 'Apache 2.0' | 17 | + s.license = 'Apache 2.0' |
18 | + | 18 | + |
19 | + s.bindir = 'bin' | 19 | + s.bindir = 'bin' |
20 | + s.executables = ['puppet', 'extlookup2hiera'] | 20 | + s.executables = ['puppet'] |
21 | + s.require_path = 'lib' | 21 | + s.require_path = 'lib' |
22 | + s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*') | 22 | + s.files = %w(LICENSE README.md Rakefile) + Dir.glob('{lib,spec}/**/*') |
23 | +end | 23 | +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 73e1769..0000000 --- a/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From d183826136ca77847da5f3e460f2e460faabc5be Mon Sep 17 00:00:00 2001 | ||
2 | From: Kylo Ginsberg <kylo@puppetlabs.com> | ||
3 | Date: Mon, 22 Dec 2014 10:11:38 -0800 | ||
4 | Subject: [PATCH] (maint) Change spec test to pass on ruby 2.2 | ||
5 | |||
6 | commit d183826136ca77847da5f3e460f2e460faabc5be from | ||
7 | https://github.com/puppetlabs/puppet.git | ||
8 | |||
9 | Prior to this change, this spec test failed on ruby 2.2.0-rc1 with: | ||
10 | |||
11 | Failure/Error: Time.stubs(:now).returns(Time.parse("2011-01-06 12:00:00 UTC")) | ||
12 | NoMethodError: | ||
13 | undefined method `utc_offset' for nil:NilClass | ||
14 | |||
15 | I didn't track down the root cause of this failure, but just | ||
16 | normalized this stub to use Time.utc, which (along with Time.local) | ||
17 | is the more common way of stubbing Time objects in the codebase. | ||
18 | --- | ||
19 | spec/unit/reports/store_spec.rb | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/spec/unit/reports/store_spec.rb b/spec/unit/reports/store_spec.rb | ||
23 | index 7f94f7d..f56eccd 100755 | ||
24 | --- a/spec/unit/reports/store_spec.rb | ||
25 | +++ b/spec/unit/reports/store_spec.rb | ||
26 | @@ -24,7 +24,7 @@ describe processor do | ||
27 | end | ||
28 | |||
29 | it "should write the report to the file in YAML" do | ||
30 | - Time.stubs(:now).returns(Time.parse("2011-01-06 12:00:00 UTC")) | ||
31 | + Time.stubs(:now).returns(Time.utc(2011,01,06,12,00,00)) | ||
32 | @report.process | ||
33 | |||
34 | File.read(File.join(Puppet[:reportdir], @report.host, "201101061200.yaml")).should == @report.to_yaml | ||
35 | -- | ||
36 | 2.1.4 | ||
37 | |||
diff --git a/recipes-support/puppet/puppet/puppet.init b/recipes-support/puppet/puppet/puppet.init new file mode 100644 index 0000000..64ab32e --- /dev/null +++ b/recipes-support/puppet/puppet/puppet.init | |||
@@ -0,0 +1,72 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # chkconfig: 35 20 80 | ||
4 | # description: The puppet agent connects to a puppet master, requests a | ||
5 | # catalog of resources, and configures the local system. | ||
6 | # | ||
7 | |||
8 | # Get function from functions library | ||
9 | . /etc/init.d/functions | ||
10 | |||
11 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
12 | DAEMON=/usr/bin/puppet | ||
13 | DAEMON_OPTS="agent --server master --no-daemonize" | ||
14 | NAME="agent" | ||
15 | DESC="puppet agent" | ||
16 | PIDFILE="/var/run/${NAME}.pid" | ||
17 | PID=`test -f $PIDFILE && cat $PIDFILE` | ||
18 | RETVAL=0 | ||
19 | |||
20 | test -x $DAEMON || exit 0 | ||
21 | |||
22 | [ -r /etc/default/puppet ] && . /etc/default/puppet | ||
23 | |||
24 | reload_puppet_agent() { | ||
25 | start-stop-daemon --stop --quiet --signal HUP --pidfile $PIDFILE | ||
26 | } | ||
27 | |||
28 | start_puppet_agent() { | ||
29 | start-stop-daemon --start --quiet --pidfile $PIDFILE \ | ||
30 | --startas $DAEMON -- $NAME $DAEMON_OPTS | ||
31 | } | ||
32 | |||
33 | stop_puppet_agent() { | ||
34 | start-stop-daemon --stop --retry TERM/10/KILL/5 --quiet --oknodo --pidfile $PIDFILE | ||
35 | } | ||
36 | |||
37 | status_puppet_agent() { | ||
38 | status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}" | ||
39 | } | ||
40 | |||
41 | case "$1" in | ||
42 | start) | ||
43 | echo -n "Starting $DESC" | ||
44 | start_puppet_agent | ||
45 | log_end_msg $? | ||
46 | ;; | ||
47 | stop) | ||
48 | echo -n "Stopping $DESC" | ||
49 | stop_puppet_agent | ||
50 | log_end_msg $? | ||
51 | ;; | ||
52 | reload) | ||
53 | echo -n "Reloading $DESC" | ||
54 | reload_puppet_agent | ||
55 | log_end_msg $? | ||
56 | ;; | ||
57 | status) | ||
58 | status_puppet_agent | ||
59 | ;; | ||
60 | restart|force-reload) | ||
61 | echo -n "Restarting $DESC" | ||
62 | stop_puppet_agent | ||
63 | start_puppet_agent | ||
64 | log_end_msg $? | ||
65 | ;; | ||
66 | *) | ||
67 | echo "Usage: $0 {start|stop|status|restart|force-reload|reload}" >&2 | ||
68 | exit 1 | ||
69 | ;; | ||
70 | esac | ||
71 | |||
72 | exit 0 | ||
diff --git a/recipes-support/puppet/puppet/puppet.service b/recipes-support/puppet/puppet/puppet.service new file mode 100644 index 0000000..c49dacf --- /dev/null +++ b/recipes-support/puppet/puppet/puppet.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=Puppet agent | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/usr/bin/puppet agent --server master --no-daemonize | ||
7 | ExecReload=/bin/kill -HUP $MAINPID | ||
8 | |||
9 | [Install] | ||
10 | 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 1cd5e25..0000000 --- a/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From fca1579d62d5b978375511e062b9c18f4413dd5a Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Thu, 20 Aug 2015 14:06:32 -0400 | ||
4 | Subject: [PATCH] safe_yaml: syck isn't available for Ruby >= 2.0.0 | ||
5 | |||
6 | This change was taken from various puppet forks but does not exist in | ||
7 | puppet upstream as they drop support for YAML on the network as part | ||
8 | of work to fix PUP-3272. | ||
9 | |||
10 | https://tickets.puppetlabs.com/browse/PUP-3272 | ||
11 | |||
12 | Community versions of this change: | ||
13 | https://github.com/kylog/puppet/commit/42b2e77ec24dfbbf2317d08615a35127afbc4782 | ||
14 | |||
15 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
16 | --- | ||
17 | lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb b/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb | ||
21 | index 8670ace..722dd3e 100644 | ||
22 | --- a/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb | ||
23 | +++ b/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb | ||
24 | @@ -3,7 +3,7 @@ require "yaml" | ||
25 | # This needs to be defined up front in case any internal classes need to base | ||
26 | # their behavior off of this. | ||
27 | module SafeYAML | ||
28 | - YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck" | ||
29 | + YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck") | ||
30 | end | ||
31 | |||
32 | require "set" | ||
33 | -- | ||
34 | 2.1.4 | ||
35 | |||
diff --git a/recipes-support/puppet/puppet_3.7.3.bb b/recipes-support/puppet/puppet_5.4.0.bb index 3e8f869..54574e4 100644 --- a/recipes-support/puppet/puppet_3.7.3.bb +++ b/recipes-support/puppet/puppet_5.4.0.bb | |||
@@ -1,37 +1,41 @@ | |||
1 | SUMMARY = "Open source Puppet is a configuration management system" | 1 | SUMMARY = "Open source Puppet is a configuration management system" |
2 | HOMEPAGE = "https://puppetlabs.com/puppet/puppet-open-source" | 2 | HOMEPAGE = "https://puppetlabs.com/puppet/puppet-open-source" |
3 | LICENSE = "Apache-2.0" | 3 | LICENSE = "Apache-2.0" |
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f257790c70561550fd666c6e0044fd89" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7c9045ec00cc0d6b6e0e09ee811da4a0" |
5 | 5 | ||
6 | SRC_URI = " \ | 6 | SRC_URI = " \ |
7 | https://downloads.puppetlabs.com/puppet/puppet-${PV}.tar.gz \ | 7 | https://downloads.puppetlabs.com/puppet/puppet-${PV}.tar.gz \ |
8 | file://add_puppet_gemspec.patch \ | 8 | file://add_puppet_gemspec.patch \ |
9 | file://puppet.conf \ | 9 | file://puppet.conf \ |
10 | file://maint-Change-spec-test-to-pass-on-ruby-2.2.patch \ | 10 | file://puppet.init \ |
11 | file://MAINT-Fix-duplicate-key-which-ruby-2.2-complains-abo.patch \ | 11 | file://puppet.service \ |
12 | file://safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch \ | ||
13 | " | 12 | " |
14 | SRC_URI[md5sum] = "cc294da1d51df07bcc7f6cf78bd90ce0" | 13 | SRC_URI[md5sum] = "e26702fbfb464121d8d60e639ea254d9" |
15 | SRC_URI[sha256sum] = "4a3bd7ddb51072c3dd898a8de158cde204a2d8fd0b84e8ac806b84c074348637" | 14 | SRC_URI[sha256sum] = "8db3a89c9ced01b43c57f89e42d099a763d02f38bcea5d6c73e1245556932bb2" |
16 | 15 | ||
17 | inherit ruby | 16 | inherit ruby update-rc.d systemd |
18 | 17 | ||
19 | DEPENDS += " \ | 18 | DEPENDS += " \ |
20 | ruby \ | 19 | ruby \ |
21 | facter \ | 20 | facter \ |
22 | hiera \ | ||
23 | " | 21 | " |
24 | 22 | ||
25 | RDEPENDS_${PN} += " \ | 23 | RDEPENDS_${PN} += " \ |
26 | ruby \ | 24 | ruby \ |
27 | facter \ | 25 | facter \ |
28 | hiera \ | ||
29 | ruby-shadow \ | 26 | ruby-shadow \ |
30 | bash \ | 27 | bash \ |
31 | " | 28 | " |
32 | 29 | ||
33 | RUBY_INSTALL_GEMS = "puppet-${PV}.gem" | 30 | RUBY_INSTALL_GEMS = "puppet-${PV}.gem" |
34 | 31 | ||
32 | INITSCRIPT_NAME = "${BPN}" | ||
33 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
34 | |||
35 | SYSTEMD_AUTO_ENABLE = "enable" | ||
36 | SYSTEMD_PACKAGES = "${PN}" | ||
37 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | ||
38 | |||
35 | do_install_append() { | 39 | do_install_append() { |
36 | install -d ${D}${sysconfdir}/puppet | 40 | install -d ${D}${sysconfdir}/puppet |
37 | install -d ${D}${sysconfdir}/puppet/manifests | 41 | install -d ${D}${sysconfdir}/puppet/manifests |
@@ -39,6 +43,12 @@ do_install_append() { | |||
39 | 43 | ||
40 | install -m 655 ${S}/conf/auth.conf ${D}${sysconfdir}/puppet/ | 44 | install -m 655 ${S}/conf/auth.conf ${D}${sysconfdir}/puppet/ |
41 | install -m 655 ${S}/conf/fileserver.conf ${D}${sysconfdir}/puppet/ | 45 | install -m 655 ${S}/conf/fileserver.conf ${D}${sysconfdir}/puppet/ |
42 | install -m 655 ${S}/conf/tagmail.conf ${D}${sysconfdir}/puppet/ | 46 | install -m 655 ${S}/conf/environment.conf ${D}${sysconfdir}/puppet/ |
43 | install -m 655 ${WORKDIR}/puppet.conf ${D}${sysconfdir}/puppet/ | 47 | install -m 655 ${WORKDIR}/puppet.conf ${D}${sysconfdir}/puppet/ |
48 | |||
49 | install -d ${D}${systemd_unitdir}/system | ||
50 | install -m 0644 ${WORKDIR}/puppet.service ${D}${systemd_unitdir}/system | ||
51 | |||
52 | install -d ${D}${sysconfdir}/init.d | ||
53 | install -m 0755 ${WORKDIR}/puppet.init ${D}${sysconfdir}/init.d/puppet | ||
44 | } | 54 | } |