summaryrefslogtreecommitdiff
path: root/app-admin/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/puppet')
-rw-r--r--app-admin/puppet/Manifest19
-rw-r--r--app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch329
-rw-r--r--app-admin/puppet/files/50puppet-mode-gentoo.el6
-rw-r--r--app-admin/puppet/files/puppet-fix-tests-4.7.0.patch18
-rw-r--r--app-admin/puppet/files/puppet-systemd.patch10
-rw-r--r--app-admin/puppet/files/puppet.init40
-rw-r--r--app-admin/puppet/files/puppet.init-4.x29
-rw-r--r--app-admin/puppet/files/puppetmaster.confd18
-rw-r--r--app-admin/puppet/files/puppetmaster.init37
-rw-r--r--app-admin/puppet/files/puppetmaster.init-4.x37
-rw-r--r--app-admin/puppet/files/tmpfiles.d1
-rw-r--r--app-admin/puppet/metadata.xml36
-rw-r--r--app-admin/puppet/puppet-4.10.11.ebuild196
-rw-r--r--app-admin/puppet/puppet-4.10.12.ebuild196
-rw-r--r--app-admin/puppet/puppet-5.5.1.ebuild144
-rw-r--r--app-admin/puppet/puppet-5.5.2.ebuild144
16 files changed, 1260 insertions, 0 deletions
diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest
new file mode 100644
index 000000000000..b71c56b88173
--- /dev/null
+++ b/app-admin/puppet/Manifest
@@ -0,0 +1,19 @@
+AUX 43e2c935252b995134ce353e5e6312cf77aea480.patch 13618 BLAKE2B 91727c30b968b41dc8f6bb2ca217d5b9ccc2b5d08872be5a65a45b7f8bc37130255df139a17b7ca09b39b5b1a0b9ddcd6c54d2448148495cf493e7a085d2f0f5 SHA512 65b303c957a29bb5782a2b849944fba029dea3a533c25d4c17830391b5e4963fef304c0be876f5e7892b1a0eb4da16390d4ab1e39f459c05ecbb7100c9c0a9ca
+AUX 50puppet-mode-gentoo.el 217 BLAKE2B 632d02667437b04642b7d3510d5010a3a7952ccd6aaa301a463c629c5dd6320c847e9f05425bd5882681a471761d0fe501ccf6860faa33b9e5458a761dad40a1 SHA512 3fbe7045df9ac9d30520020d4df454a03f02989bbcaa4bae0c632f86f6e6d3fd2eeb3bed84d864077c2b85b65586406525fa621a262ec363f53d714a093f6d1a
+AUX puppet-fix-tests-4.7.0.patch 1102 BLAKE2B e5c98627620f9f76f1421a13969dba3b1d279a63cdb65fc28713a9a2849c8e8cd0e42a30c9058e341d5bbabd3d24ae17c050fa551566e6c61301b83396a0b80a SHA512 81485af1a218b5616195ed80b3fc963c42d56265477be9a636c0e915a18771ff93e12cdbded45ce90da17ce72be4ea4881b5ad8e9d5a997be271df3cd2e8a2c8
+AUX puppet-systemd.patch 481 BLAKE2B 8ca58755e5c3a235c60eed11c98e20bbd3cb27c81531709b27981ee61f6f5dea63d2487d49761ff84e7590b608c170bcd369fe7ef3700a5df1bd03b29c66ec71 SHA512 08bb997cedea378efa4614e4b2ff04acdd68cdc376fde422677b64dc56b8256ecf7221210c20529bb5a9a49fa8c92f67667c7acd6ac64b665e79639318a3df97
+AUX puppet.init 917 BLAKE2B 0ebbcdd8c9d4154984130ba3f597969f5f070f65f246770583663df4f192052a0ed666d09d4d417864457814d6a680ac4f327dc2a83b774da3a3c0d4efea1c8d SHA512 6bd2e1c21abaa5149b853f1732a6bb84335a8b4ae4129db52da463597691fd983d347bc04aad69724034d37f953f50c6aa5316d517b9efed2414db8e3d94d7bf
+AUX puppet.init-4.x 764 BLAKE2B 997fef3e95718f3e0f46fa2ab5994ac994a585bcfe728a9dcdfb3ccd5b76e6fd879a4160dce1402803713344fc2082b43e3116b468e9b49fd1b17a043040f860 SHA512 170100981c7e24284a12a208cede1a73afbaeab73315fd15a7337d416825c6d26a29ee272244d39764ad4086bc6a6f99cdc56ed6a600282d6ff9ed74794bfaf8
+AUX puppetmaster.confd 640 BLAKE2B 78d85ee9b2c413c59eadef3498a8a2e2ee6c6d029bf76655a4897fdf128fb38950ff8e62abfa806785906fdae648c544310b75f9a33694ce1fbc0c31fe4f04a8 SHA512 deb4004dd8448c503099a0cdfcbbfa8e2efed5dc088539bbce5c9db4337f2910b625598402b72db42d68a0a9b6d3570c18fb314f3c9406fa67f946c38c9bf44d
+AUX puppetmaster.init 1090 BLAKE2B 367b678860b955003ff8d79e69cd8c4a6d652ae738bec3c3314a3586b485ddafbfd9609e6f589472cd7c12b234e9ca1fa3cf492c1649b03c371ad29384df6555 SHA512 cb8b63aecee163c680449edfa63f9070582d3c1c924e3692dc7c18a7f84e166e9e4d88abae44d6e828eb3d4ab57b0d3a1f64e3a69453fa30d5559e4ae1716975
+AUX puppetmaster.init-4.x 1108 BLAKE2B 1793d3d881de2c1808159f940bf1e758c2e7fad8fc8eca3c0199828b2c0119547cd744c49f79334de1bc0a7227c0791a5b3645eedb51d3fa8be5822487354b1a SHA512 e177109d90f5954e7cd1968db1d0e0d0e2c6e98bc4d53d0ae0a816d181e304e1b7555f65d8807b98df9f0f8cf7ebafc9d8cca9c32574fb7127c4b480d23b5cc6
+AUX tmpfiles.d 39 BLAKE2B 2c9a992bf709a384ae02395299ddeb2febf3cd83b924acd97d0ca7fbc17dac273cb27c926790708c0d929f62282dec0477f167ed2e5fc1418a9ff5d130f246f1 SHA512 2dfec45e6f762ce0431d55b1a826e707e970defacbe050df838b66b347e7423eac78a35248c74908e7b52fa84cde5129ce3f562f64dac357f0368a3bc0b719a1
+DIST puppet-4.10.11.tar.gz 3022878 BLAKE2B d3eec840bb1c46e0dfbbc9dad598b362049a76c7ee60b4ff314e7ba2ce19613f834baced94afbbf499b513391107c4229be5f40c275d0724b200358722db0e96 SHA512 5eaac8bd973d0013e7774c9bda81524332f2b3b0177c04e78554bfb0815697b4b296d5dd11a04f7fad782ad975b350b149b1cd97fc5f06974952314f163f1b40
+DIST puppet-4.10.12.tar.gz 3022218 BLAKE2B 03757857868b1544078ae5e40d6e438631c788f1b01a3e62ba90e477b754601d2c085228e084363ff20ee39728b02ebe8ca83e17f7c79dddae1c3968aef4e320 SHA512 ff7accf70b1d4de7282cf3b41246151c49c4758a41ace56a470e4723749638027011cf170747e66fa5812280e1612e754e12d92dd35fa6c93171f7187bb9cfa2
+DIST puppet-5.5.1.tar.gz 3035639 BLAKE2B 2930ca9eb928d7c6a69ea76673fc4d002e230bf6dbcd28764e8d5bd504ae11326dc856ed64480e13c9eb1d683ad5e8ef64fc9e217942b59d90c6a0bc98e0197c SHA512 20bf7094193f30cfc7a91244275fc79eef0296036ffbc6bbe405e9ca75123b722be6855c746ef8cd35f80bd7a7308408a9205d064f0f910e11877e4db0ebdabc
+DIST puppet-5.5.2.tar.gz 3036714 BLAKE2B 8be2c2fa7b66a2fd8d413f01afad22f7e0724c31a0a92b777f1b61e2139f14f3284a11cfb52fea8833556208d8bb3e99f20b1ed4fa2816809eaa4b92fa730cd5 SHA512 4995b6b6d1b75d68dd4c8eba37585c0afa88f9c6b78857e837886ea72b373c884182adf8791e0c9f2a5079f22681a40073e512e6b727ecfcaff463c8024cf5db
+EBUILD puppet-4.10.11.ebuild 5633 BLAKE2B f75ee3a7cb27288448f341a560e20b3b1246c37a690846bfda63d0ee9ea41600606a986160bb1967ad7c279a4d2204b54af1e45204e43725b4c1438ceb81e7a4 SHA512 90e2636f668b3227ece18ff03a16c28e7791c6ec192a87ca89395a03bc9182abdabb43ac6fc5261da7c4afd68caefaabe81549d39e7fd018cc0b5f307baded2f
+EBUILD puppet-4.10.12.ebuild 5628 BLAKE2B bfca2da4591b9589a1b3e42e8a06d91d75a77ca05a57910544caad33b540fd1c8c0b7fa6be4b11ab67ee693daf7486fee9f63115679a513c09ef1e15b3727152 SHA512 e5fd6431a729d205ba1f6360cb2f46f877de7f27a7bc1cf299f1ec2a487a2d2a374d0c059294b1bf08d31b7187b420297b368d474fc0dcc243787b8cea19a431
+EBUILD puppet-5.5.1.ebuild 3833 BLAKE2B 1fe39216139f93fc68ae0965596931a4d1ad1114d78353001a710d790a9fbdbe041f14ca3a04e7393c4355da33d3b2501e3e168d306aa0232bdc4fcd2547e134 SHA512 553ed1eea1b8acd1da19be01a7ff7f9d420c9c8b03b38bcdab125f1f02dde6b164caea44019fc3557f8d61ae3f22da925e30dd858402841714d6c17462cff98e
+EBUILD puppet-5.5.2.ebuild 3833 BLAKE2B 8a69323f2c1edf94a9dd384a695e3c2d2ba20fff0956cdda51ed853ca9e730c2c051324d0867baea4f71672337e41ec6c42b504edcdaf3f459d120080b3bea5e SHA512 b66520e6d78a3fe5bc8ae5151074133340db60eb402ac4d6f92f4add28b28b3d8280befc0aa74bb4935c9347e35ec240a6afa1bd67db23b1f15a46ad81b2d8ad
+MISC metadata.xml 1514 BLAKE2B 54902aeb644661563205d2200b71fdb6c0191839643968ae3249b1438996bc6b2846fbc4f9487dd83c28e9501407153fcc21255ad7ed6356aca3fb9121ab6abb SHA512 3ae8d47ac2a12085ec4adcb43d0428dc0b85fb561bbda39afd01ba7466417a24f9630d37c8461f99ec1aa3eb4f118cab0cb31703f486ab6d3a65798119277c64
diff --git a/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch b/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch
new file mode 100644
index 000000000000..09b345e8bc97
--- /dev/null
+++ b/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch
@@ -0,0 +1,329 @@
+diff --git a/lib/puppet/provider/package/portage.rb b/lib/puppet/provider/package/portage.rb
+index 374667c..12160c6 100644
+--- a/lib/puppet/provider/package/portage.rb
++++ b/lib/puppet/provider/package/portage.rb
+@@ -2,14 +2,19 @@
+ require 'fileutils'
+
+ Puppet::Type.type(:package).provide :portage, :parent => Puppet::Provider::Package do
+- desc "Provides packaging support for Gentoo's portage system."
++ desc "Provides packaging support for Gentoo's portage system.
+
+- has_features :versionable, :reinstallable
++ This provider supports the `install_options` and `uninstall_options` attributes, which allows command-line
++ flags to be passed to emerge. These options should be specified as a string (e.g. '--flag'), a hash
++ (e.g. {'--flag' => 'value'}), or an array where each element is either a string or a hash."
++
++ has_features :install_options, :purgeable, :reinstallable, :uninstall_options, :versionable, :virtual_packages
+
+ {
+- :emerge => "/usr/bin/emerge",
+- :eix => "/usr/bin/eix",
+- :update_eix => "/usr/bin/eix-update",
++ :emerge => '/usr/bin/emerge',
++ :eix => '/usr/bin/eix',
++ :qatom_bin => '/usr/bin/qatom',
++ :update_eix => '/usr/bin/eix-update',
+ }.each_pair do |name, path|
+ has_command(name, path) do
+ environment :HOME => '/'
+@@ -24,15 +29,18 @@ def self.instances
+ result_format = self.eix_result_format
+ result_fields = self.eix_result_fields
+
++ limit = self.eix_limit
+ version_format = self.eix_version_format
+ slot_versions_format = self.eix_slot_versions_format
++ installed_versions_format = self.eix_installed_versions_format
++ installable_versions_format = self.eix_install_versions_format
+ begin
+- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
++ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
+ update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
+
+ search_output = nil
+- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
+- search_output = eix *(self.eix_search_arguments + ["--installed"])
++ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
++ search_output = eix *(self.eix_search_arguments + ['--installed'])
+ end
+
+ packages = []
+@@ -57,65 +65,123 @@ def self.instances
+
+ def install
+ should = @resource.should(:ensure)
+- name = package_name
+- unless should == :present or should == :latest
+- # We must install a specific version
+- name = package_atom_with_version(should)
++ cmd = %w{}
++ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
++ name = qatom[:pfx] + name if qatom[:pfx]
++ name = name + '-' + qatom[:pv] if qatom[:pv]
++ name = name + '-' + qatom[:pr] if qatom[:pr]
++ name = name + qatom[:slot] if qatom[:slot]
++ cmd << '--update' if [:latest].include?(should)
++ cmd += install_options if @resource[:install_options]
++ cmd << name
++ emerge *cmd
++ end
++
++ def uninstall
++ should = @resource.should(:ensure)
++ cmd = %w{--rage-clean}
++ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
++ name = qatom[:pfx] + name if qatom[:pfx]
++ name = name + '-' + qatom[:pv] if qatom[:pv]
++ name = name + '-' + qatom[:pr] if qatom[:pr]
++ name = name + qatom[:slot] if qatom[:slot]
++ cmd += uninstall_options if @resource[:uninstall_options]
++ cmd << name
++ if [:purged].include?(should)
++ Puppet::Util.withenv :CONFIG_PROTECT => "-*" do
++ emerge *cmd
++ end
++ else
++ emerge *cmd
+ end
+- emerge name
+ end
+
+- # The common package name format.
+- def package_name
+- @resource[:category] ? "#{@resource[:category]}/#{@resource[:name]}" : @resource[:name]
++ def reinstall
++ self.install
+ end
+
+- def package_name_without_slot
+- package_name.sub(self.class.slot_pattern, '')
++ def update
++ self.install
+ end
+
+- def package_slot
+- if match = package_name.match(self.class.slot_pattern)
+- match[1]
++ def qatom
++ output_format = self.qatom_output_format
++ result_format = self.qatom_result_format
++ result_fields = self.qatom_result_fields
++ @atom ||= begin
++ search_output = nil
++ package_info = {}
++ # do the search
++ search_output = qatom_bin *([@resource[:name], '--format', output_format])
++ # verify if the search found anything
++ match = result_format.match(search_output)
++ if match
++ result_fields.zip(match.captures) do |field, value|
++ # some fields can be empty or (null) (if we are not passed a category in the package name for instance)
++ if value == '(null)'
++ package_info[field] = nil
++ elsif !value or value.empty?
++ package_info[field] = nil
++ else
++ package_info[field] = value
++ end
++ end
++ end
++ @atom = package_info
++ rescue Puppet::ExecutionFailure => detail
++ raise Puppet::Error.new(detail)
+ end
+ end
+
+- def package_atom_with_version(version)
+- if slot = package_slot
+- "=#{package_name_without_slot}-#{version}:#{package_slot}"
+- else
+- "=#{package_name}-#{version}"
+- end
++ def qatom_output_format
++ '"[%{CATEGORY}] [%{PN}] [%{PV}] [%[PR]] [%[SLOT]] [%[pfx]] [%[sfx]]"'
+ end
+
+- def uninstall
+- emerge "--unmerge", package_name
++ def qatom_result_format
++ /^\"\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\](.*)\"$/
+ end
+
+- def reinstall
+- self.install
++ def qatom_result_fields
++ [:category, :pn, :pv, :pr, :slot, :pfx, :sfx]
+ end
+
+- def update
+- self.install
++ def self.get_sets
++ @sets ||= begin
++ @sets = emerge *(['--list-sets'])
++ end
+ end
+
+ def query
++ limit = self.class.eix_limit
+ result_format = self.class.eix_result_format
+ result_fields = self.class.eix_result_fields
+
+ version_format = self.class.eix_version_format
+ slot_versions_format = self.class.eix_slot_versions_format
+- search_field = package_name_without_slot.count('/') > 0 ? "--category-name" : "--name"
+- search_value = package_name_without_slot
++ installed_versions_format = self.class.eix_installed_versions_format
++ installable_versions_format = self.class.eix_install_versions_format
++ search_field = qatom[:category] ? '--category-name' : '--name'
++ search_value = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
++
++ @eix_result ||= begin
++ # package sets
++ package_sets = []
++ self.class.get_sets.each_line do |package_set|
++ package_sets << package_set.to_s.strip
++ end
+
+- begin
+- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
++ if @resource[:name].match(/^@/)
++ if package_sets.include?(@resource[:name][1..-1].to_s)
++ return({:name => "#{@resource[:name]}", :ensure => '9999', :version_available => nil, :installed_versions => nil, :installable_versions => "9999,"})
++ end
++ end
++
++ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
+ update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
+
+ search_output = nil
+- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
+- search_output = eix *(self.class.eix_search_arguments + ["--exact",search_field,search_value])
++ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
++ search_output = eix *(self.class.eix_search_arguments + ['--exact',search_field,search_value])
+ end
+
+ packages = []
+@@ -127,10 +193,19 @@ def query
+ result_fields.zip(match.captures) do |field, value|
+ package[field] = value unless !value or value.empty?
+ end
+- if package_slot
+- package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], package_slot)
+- package[:ensure] = eix_get_version_for_slot(package[:installed_slots], package_slot)
++ # dev-lang python [3.4.5] [3.5.2] [2.7.12:2.7,3.4.5:3.4] [2.7.12:2.7,3.4.5:3.4,3.5.2:3.5] https://www.python.org/ An interpreted, interactive, object-oriented programming language
++ # version_available is what we CAN install / update to
++ # ensure is what is currently installed
++ # This DOES NOT choose to install/upgrade or not, just provides current info
++ # prefer checking versions to slots as versions are finer grained
++ if qatom[:pv]
++ package[:version_available] = eix_get_version_for_versions(package[:installable_versions], qatom[:pv])
++ package[:ensure] = eix_get_version_for_versions(package[:installed_versions], qatom[:pv])
++ elsif qatom[:slot]
++ package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], qatom[:slot])
++ package[:ensure] = eix_get_version_for_slot(package[:installed_slots], qatom[:slot])
+ end
++
+ package[:ensure] = package[:ensure] ? package[:ensure] : :absent
+ packages << package
+ end
+@@ -138,10 +213,9 @@ def query
+
+ case packages.size
+ when 0
+- not_found_value = "#{@resource[:category] ? @resource[:category] : "<unspecified category>"}/#{@resource[:name]}"
+- raise Puppet::Error.new("No package found with the specified name [#{not_found_value}]")
++ raise Puppet::Error.new("No package found with the specified name [#{@resource[:name]}]")
+ when 1
+- return packages[0]
++ @eix_result = packages[0]
+ else
+ raise Puppet::Error.new("More than one package with the specified name [#{search_value}], please use the category parameter to disambiguate")
+ end
+@@ -155,39 +229,73 @@ def latest
+ end
+
+ private
++ def eix_get_version_for_versions(versions, target)
++ # [2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] 3.5.2
++ return nil if versions.nil?
++ versions = versions.split(',')
++ # [2.7.10-r1 2.7.12 3.4.3-r1 3.4.5 3.5.2]
++ versions.find { |version| version == target }
++ # 3.5.2
++ end
++
++ private
+ def eix_get_version_for_slot(versions_and_slots, slot)
++ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5] 3.5
+ return nil if versions_and_slots.nil?
+- versions_and_slots = versions_and_slots.split(",")
+- versions_and_slots.map! { |version_and_slot| version_and_slot.split(":") }
+- version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot }
++ versions_and_slots = versions_and_slots.split(',')
++ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5]
++ versions_and_slots.map! { |version_and_slot| version_and_slot.split(':') }
++ # [2.7.12: 2.7
++ # 3.4.5: 3.4
++ # 3.5.2: 3.5]
++ version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot[1..-1] }
++ # [3.5.2: 3.5]
+ version_for_slot.first if version_for_slot
+- end
+-
+- def self.slot_pattern
+- /:([\w+.\/*=-]+)$/
++ # 3.5.2
+ end
+
+ def self.eix_search_format
+- "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
++ "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<installedversions:INSTALLEDVERSIONS>] [<availableversions:STABLEVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
+ end
+
+ def self.eix_result_format
+- /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
++ /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
+ end
+
+ def self.eix_result_fields
+- [:category, :name, :ensure, :version_available, :installed_slots, :slot_versions_available, :vendor, :description]
++ # ensure:[3.4.5], version_available:[3.5.2], installed_slots:[2.7.12:2.7,3.4.5:3.4], installable_versions:[2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] slot_versions_available:[2.7.12:2.7,3.4.5:3.4,3.5.2:3.5]
++ [:category, :name, :ensure, :version_available, :installed_slots, :installed_versions, :installable_versions, :slot_versions_available, :vendor, :description]
+ end
+
+ def self.eix_version_format
+- "{last}<version>{}"
++ '{last}<version>{}'
+ end
+
+ def self.eix_slot_versions_format
+- "{!first},{}<version>:<slot>"
++ '{!first},{}<version>:<slot>'
++ end
++
++ def self.eix_installed_versions_format
++ '{!first},{}<version>'
++ end
++
++ def self.eix_install_versions_format
++ '{!first}{!last},{}{}{isstable}<version>{}'
++ end
++
++ def self.eix_limit
++ '0'
+ end
+
+ def self.eix_search_arguments
+- ["--nocolor", "--pure-packages", "--format",self.eix_search_format]
++ ['--nocolor', '--pure-packages', '--format', self.eix_search_format]
++ end
++
++ def install_options
++ join_options(@resource[:install_options])
++ end
++
++ def uninstall_options
++ join_options(@resource[:uninstall_options])
+ end
+ end
diff --git a/app-admin/puppet/files/50puppet-mode-gentoo.el b/app-admin/puppet/files/50puppet-mode-gentoo.el
new file mode 100644
index 000000000000..64c38ae5a31d
--- /dev/null
+++ b/app-admin/puppet/files/50puppet-mode-gentoo.el
@@ -0,0 +1,6 @@
+
+;;; puppet-mode site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'puppet-mode "puppet-mode" "Major mode for editing puppet manifests")
+(add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode))
diff --git a/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch b/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch
new file mode 100644
index 000000000000..7d62e0c1f786
--- /dev/null
+++ b/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch
@@ -0,0 +1,18 @@
+--- spec/unit/network/http/api/indirected_routes_spec.rb 2016-10-11 13:24:09.500955469 -0500
++++ spec/unit/network/http/api/indirected_routes_spec.rb.new 2016-10-11 13:24:00.501700977 -0500
+@@ -139,15 +139,6 @@
+ indirection, _, _, _ = handler.uri2indirection("GET", uri_escaped, params)
+ end
+
+- it "should not pass through an environment to check_authorization and fail if the environment is unknown" do
+- handler.expects(:check_authorization).with(anything,
+- anything,
+- Not(has_entry(:environment)))
+- expect(lambda { handler.uri2indirection("GET",
+- "#{master_url_prefix}/node/bar",
+- {:environment => 'bogus'}) }).to raise_error(not_found_error)
+- end
+-
+ it "should not URI unescape the indirection key as passed through to a call to check_authorization" do
+ handler.expects(:check_authorization).with(anything,
+ anything,
diff --git a/app-admin/puppet/files/puppet-systemd.patch b/app-admin/puppet/files/puppet-systemd.patch
new file mode 100644
index 000000000000..72d7d69a2f77
--- /dev/null
+++ b/app-admin/puppet/files/puppet-systemd.patch
@@ -0,0 +1,10 @@
+--- ext/systemd/puppet.service 2017-02-02 18:28:58.000000000 -0600
++++ ext/systemd/puppet.service 2017-03-09 10:56:59.091489324 -0600
+@@ -17,7 +17,7 @@
+ EnvironmentFile=-/etc/sysconfig/puppetagent
+ EnvironmentFile=-/etc/sysconfig/puppet
+ EnvironmentFile=-/etc/default/puppet
+-ExecStart=/opt/puppetlabs/puppet/bin/puppet agent $PUPPET_EXTRA_OPTS --no-daemonize
++ExecStart=/usr/bin/puppet agent $PUPPET_EXTRA_OPTS --no-daemonize
+ ExecReload=/bin/kill -HUP $MAINPID
+ KillMode=process
diff --git a/app-admin/puppet/files/puppet.init b/app-admin/puppet/files/puppet.init
new file mode 100644
index 000000000000..d30367ad3fb2
--- /dev/null
+++ b/app-admin/puppet/files/puppet.init
@@ -0,0 +1,40 @@
+#!/sbin/openrc-run
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount net
+ use dns logger puppetmaster netmount nfsmount
+}
+
+checkconfig() {
+ if [ ! -d "${PUPPET_PID_DIR}" ] ; then
+ eerror "Please make sure PUPPET_PID_DIR is defined and points to a existing directory"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ local options=""
+ [ -n "${PUPPET_EXTRA_OPTS}" ] && options="${options} ${PUPPET_EXTRA_OPTS}"
+
+ ebegin "Starting puppet"
+ start-stop-daemon --start --quiet \
+ --pidfile "${PUPPET_PID_DIR}/agent.pid" \
+ --exec /usr/bin/puppetd -- ${options}
+ eend $? "Failed to start puppet"
+}
+
+stop() {
+ ebegin "Stopping puppet"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${PUPPET_PID_DIR}/agent.pid"
+ local ret=$?
+ eend ${ret} "Failed to stop puppet"
+ rm -f "${PUPPET_PID_DIR}/agent.pid"
+ return ${ret}
+}
diff --git a/app-admin/puppet/files/puppet.init-4.x b/app-admin/puppet/files/puppet.init-4.x
new file mode 100644
index 000000000000..f7106e6f0294
--- /dev/null
+++ b/app-admin/puppet/files/puppet.init-4.x
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PUPPET_PID_DIR="${PUPPET_PID_DIR:-/var/run/puppet}"
+
+pidfile="${PUPPET_PID_DIR}/puppet.pid"
+PUPPET_LOG_DIR="/var/log/puppet"
+
+command="/usr/bin/puppet"
+extra_started_commands="reload"
+
+command_args="agent --pidfile ${pidfile} --confdir /etc/puppetlabs/puppet ${PUPPET_EXTRA_OPTS}"
+
+depend() {
+ need localmount
+ use dns logger puppetmaster netmount nfsmount
+}
+
+start_pre() {
+ checkpath --directory --owner puppet:puppet "${PUPPET_PID_DIR}"
+ checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
+}
+
+reload() {
+ ebegin "Reloading $RC_SVCNAME"
+ start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/app-admin/puppet/files/puppetmaster.confd b/app-admin/puppet/files/puppetmaster.confd
new file mode 100644
index 000000000000..afecf479a6a1
--- /dev/null
+++ b/app-admin/puppet/files/puppetmaster.confd
@@ -0,0 +1,18 @@
+# Location of PID files
+PUPPETMASTER_PID_DIR="/var/run/puppet"
+
+# Where to log general messages to.
+# Specify syslog to send log messages to the system log.
+#PUPPETMASTER_LOG="syslog"
+
+# You may specify other parameters to the puppetmaster here
+#PUPPETMASTER_EXTRA_OPTS="--noca"
+
+# You may specify an alternate port on which puppetmaster should listen.
+# Default is: 8140
+#PUPPETMASTER_PORT="8140"
+
+# To start multiple servers:
+# # cp /etc/conf.d/puppetmaster /etc/conf.d/puppetmaster.master_8141
+# # ln -s puppetmaster /etc/init.d/puppetmaster.master_8141
+# # ${EDITOR} /etc/conf.d/puppetmaster.master_8141 (set 8141 to PUPPETMASTER_PORT)
diff --git a/app-admin/puppet/files/puppetmaster.init b/app-admin/puppet/files/puppetmaster.init
new file mode 100644
index 000000000000..687003752329
--- /dev/null
+++ b/app-admin/puppet/files/puppetmaster.init
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ "${SVCNAME}" = "puppetmaster" ] ; then
+ PUPPETMASTER_PID="master"
+else
+ PUPPETMASTER_PID="${SVCNAME#*.}"
+fi
+PUPPETMASTER_PID_DIR="${PUPPETMASTER_PID_DIR:-/var/run/puppet}"
+pidfile="${PUPPETMASTER_PID_DIR}/${PUPPETMASTER_PID}.pid"
+PUPPET_LOG_DIR="/var/log/puppet"
+
+command_args="master --pidfile ${pidfile} ${PUPPETMASTER_EXTRA_OPTS}"
+if [ -n "${PUPPETMASTER_PORT}" ] ; then
+ command_args="${command_args} --masterport ${PUPPETMASTER_PORT}"
+fi
+
+command="/usr/bin/puppet"
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ use dns logger slapd netmount nfsmount
+}
+
+start_pre() {
+ checkpath --directory --owner puppet:puppet "${PUPPETMASTER_PID_DIR}"
+ checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
+ checkpath --file --owner puppet:puppet --mode 640 "${PUPPET_LOG_DIR}/masterhttp.log"
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $? "Failed to stop ${SVCNAME}"
+}
diff --git a/app-admin/puppet/files/puppetmaster.init-4.x b/app-admin/puppet/files/puppetmaster.init-4.x
new file mode 100644
index 000000000000..286f7e67579a
--- /dev/null
+++ b/app-admin/puppet/files/puppetmaster.init-4.x
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ "${SVCNAME}" = "puppetmaster" ] ; then
+ PUPPETMASTER_PID="master"
+else
+ PUPPETMASTER_PID="${SVCNAME#*.}"
+fi
+PUPPETMASTER_PID_DIR="${PUPPETMASTER_PID_DIR:-/var/run/puppet}"
+pidfile="${PUPPETMASTER_PID_DIR}/${PUPPETMASTER_PID}.pid"
+PUPPET_LOG_DIR="/var/log/puppet"
+
+command_args="master --pidfile ${pidfile} --confdir /etc/puppetlabs/puppet ${PUPPETMASTER_EXTRA_OPTS}"
+if [ -n "${PUPPETMASTER_PORT}" ] ; then
+ command_args="${command_args} --masterport ${PUPPETMASTER_PORT}"
+fi
+
+command="/usr/bin/puppet"
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ use dns logger slapd netmount nfsmount
+}
+
+start_pre() {
+ checkpath --directory --owner puppet:puppet "${PUPPETMASTER_PID_DIR}"
+ checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
+ checkpath --file --owner puppet:puppet --mode 640 "${PUPPET_LOG_DIR}/masterhttp.log"
+}
+
+reload() {
+ ebegin "Reloading $RC_SVCNAME"
+ start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/app-admin/puppet/files/tmpfiles.d b/app-admin/puppet/files/tmpfiles.d
new file mode 100644
index 000000000000..cd33231df7f7
--- /dev/null
+++ b/app-admin/puppet/files/tmpfiles.d
@@ -0,0 +1 @@
+D /var/run/puppet 0755 puppet puppet -
diff --git a/app-admin/puppet/metadata.xml b/app-admin/puppet/metadata.xml
new file mode 100644
index 000000000000..fcc0764c44d5
--- /dev/null
+++ b/app-admin/puppet/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>sysadmin@gentoo.org</email>
+ <name>Gentoo Sysadmin Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Centralised configuration management for networks
+ Puppet lets you centrally manage every important aspect of your system
+ using a cross-platform specification language that manages all the
+ separate elements normally aggregated in different files, like users,
+ cron jobs, and hosts, along with obviously discrete elements like
+ packages, services, and files.
+
+ Puppet's simple declarative specification language provides powerful
+ classing abilities for drawing out the similarities between hosts while
+ allowing them to be as specific as necessary, and it handles dependency
+ and prerequisite relationships between objects clearly and explicitly.
+ </longdescription>
+ <use>
+<!-- <flag name='puppetdb'>Enable puppetdb support</flag> -->
+ <flag name="augeas">Enable augeas support</flag>
+ <flag name="diff">Enable diff support</flag>
+ <flag name="rrdtool">Enable rrdtool support</flag>
+ <flag name="shadow">Enable shadow support</flag>
+ <flag name="experimental">Add patches for things in testing</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-admin/puppet/puppet-4.10.11.ebuild b/app-admin/puppet/puppet-4.10.11.ebuild
new file mode 100644
index 000000000000..81ed04a87ac6
--- /dev/null
+++ b/app-admin/puppet/puppet-4.10.11.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+USE_RUBY="ruby22 ruby23 ruby24"
+
+#RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_EXTRAINSTALL="locales"
+
+inherit xemacs-elisp-common eutils user ruby-fakegem versionator
+
+DESCRIPTION="A system automation and configuration management software."
+HOMEPAGE="http://puppetlabs.com/"
+SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 x86"
+IUSE="augeas diff doc emacs experimental ldap rrdtool selinux shadow sqlite vim-syntax xemacs"
+RESTRICT="test"
+
+ruby_add_rdepend "
+ >=dev-ruby/gettext-setup-0.10:0
+ >=dev-ruby/hiera-2.0
+ >=dev-ruby/locale-2.1
+ >=dev-ruby/rgen-0.6.5
+ dev-ruby/json:=
+ >=dev-ruby/facter-3.0.0
+ augeas? ( dev-ruby/ruby-augeas )
+ diff? ( dev-ruby/diff-lcs )
+ doc? ( dev-ruby/rdoc )
+ ldap? ( dev-ruby/ruby-ldap )
+ shadow? ( dev-ruby/ruby-shadow )
+ sqlite? ( dev-ruby/sqlite3 )
+ virtual/ruby-ssl"
+
+# ruby_add_bdepend "
+# test? (
+# dev-ruby/mocha:0.14
+# =dev-ruby/rack-1*
+# dev-ruby/rspec-its
+# dev-ruby/rspec-collection_matchers
+# >=dev-ruby/vcr-2.9:2
+# >=dev-ruby/webmock-1.24:0
+# )"
+
+DEPEND+=" ${DEPEND}
+ xemacs? ( app-editors/xemacs )"
+RDEPEND+=" ${RDEPEND}
+ rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
+ selinux? (
+ sys-libs/libselinux[ruby]
+ sec-policy/selinux-puppet
+ )
+ vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
+ >=app-portage/eix-0.18.0"
+PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
+
+SITEFILE="50${PN}-mode-gentoo.el"
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /var/lib/puppet puppet
+}
+
+all_ruby_prepare() {
+ # Avoid spec that require unpackaged json-schema.
+ rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
+
+ # can't be run within portage.
+ epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch"
+
+ # fix systemd path
+ epatch "${FILESDIR}/puppet-systemd.patch"
+
+ if use experimental; then
+ epatch "${FILESDIR}/43e2c935252b995134ce353e5e6312cf77aea480.patch"
+ fi
+
+ # Use working version of mocha
+ sed -i -e '1igem "mocha", "~>0.14.0"; gem "rack", "~>1.0"' spec/spec_helper.rb || die
+
+ # Avoid specs that can only run in the puppet.git repository. This
+ # should be narrowed down to the specific specs.
+ rm spec/integration/parser/compiler_spec.rb || die
+
+ # Avoid failing specs that need further investigation.
+ sed -i -e '/should resolve external facts/,/^ end/ s:^:#:' \
+ spec/integration/indirector/facts/facter_spec.rb || die
+ sed -i -e "/describe 'cfacter'/,/^ end/ s:^:#:" spec/unit/defaults_spec.rb || die
+ rm -f spec/unit/indirector/ldap_spec.rb \
+ spec/unit/parser/functions/create_resources_spec.rb || die
+
+ # Avoid specs that rely on tools from other OSs
+ rm -f spec/unit/provider/package/{dnf,tdnf,yum}_spec.rb \
+ spec/unit/provider/user/directoryservice_spec.rb || die
+
+ # Avoid specs that depend on hiera-eyaml to avoid circular
+ # dependencies
+ rm -f spec/unit/functions/lookup_spec.rb || die
+
+ # Avoid specs that fail due to an unpackaged file
+ sed -i -e '/when loading pp resource types using auto loading/,/^ end/ s:^:#:' spec/unit/pops/loaders/loaders_spec.rb || die
+}
+
+all_ruby_compile() {
+ if use xemacs ; then
+ # Create a separate version for xemacs to be able to install
+ # emacs and xemacs in parallel.
+ mkdir ext/xemacs
+ cp ext/emacs/* ext/xemacs/
+ xemacs-elisp-compile ext/xemacs/puppet-mode.el
+ fi
+}
+
+each_ruby_install() {
+ each_fakegem_install
+# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ # systemd stuffs
+ insinto /usr/lib/systemd/system
+ doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
+
+ # tmpfiles stuff
+ insinto /usr/lib/tmpfiles.d
+ newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
+
+ # openrc init stuff
+ newinitd "${FILESDIR}"/puppet.init-4.x puppet
+ newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
+ newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
+
+ keepdir /etc/puppetlabs/puppet/ssl
+
+ keepdir /var/lib/puppet/facts
+ keepdir /var/lib/puppet/files
+ fowners -R puppet:puppet /var/lib/puppet
+
+ fperms 0750 /var/lib/puppet
+
+ fperms 0750 /etc/puppetlabs
+ fperms 0750 /etc/puppetlabs/puppet
+ fperms 0750 /etc/puppetlabs/puppet/ssl
+ fowners -R :puppet /etc/puppetlabs
+ fowners -R :puppet /var/lib/puppet
+
+ if use xemacs ; then
+ xemacs-elisp-install ${PN} ext/xemacs/puppet-mode.el*
+ xemacs-elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ if use ldap ; then
+ insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
+ fi
+
+ # ext and examples files
+ for f in $(find ext examples -type f) ; do
+ docinto "$(dirname ${f})"; dodoc "${f}"
+ done
+}
+
+pkg_postinst() {
+ elog
+ elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
+ elog "cause puppet to hang while installing packages."
+ elog
+ elog "Portage Puppet module with Gentoo-specific resources:"
+ elog "http://forge.puppetlabs.com/gentoo/portage"
+ elog
+
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [ "$(get_major_version $v)" = "3" ]; then
+ elog
+ elog "If you're upgrading from 3.x then please move everything in /etc/puppet to"
+ elog "/etc/puppetlabs/puppet"
+ elog "Also, puppet now uses config directories for modules and manifests."
+ elog "See https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_agent.html"
+ elog "and https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_server.html"
+ elog "for more information."
+ elog
+ fi
+ done
+
+ use xemacs && xemacs-elisp-site-regen
+}
+
+pkg_postrm() {
+ use xemacs && xemacs-elisp-site-regen
+}
diff --git a/app-admin/puppet/puppet-4.10.12.ebuild b/app-admin/puppet/puppet-4.10.12.ebuild
new file mode 100644
index 000000000000..3fe620df7b36
--- /dev/null
+++ b/app-admin/puppet/puppet-4.10.12.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+USE_RUBY="ruby23 ruby24"
+
+#RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_EXTRAINSTALL="locales"
+
+inherit xemacs-elisp-common eutils user ruby-fakegem versionator
+
+DESCRIPTION="A system automation and configuration management software."
+HOMEPAGE="http://puppetlabs.com/"
+SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+IUSE="augeas diff doc emacs experimental ldap rrdtool selinux shadow sqlite vim-syntax xemacs"
+RESTRICT="test"
+
+ruby_add_rdepend "
+ >=dev-ruby/gettext-setup-0.10:0
+ >=dev-ruby/hiera-2.0
+ >=dev-ruby/locale-2.1
+ >=dev-ruby/rgen-0.6.5
+ dev-ruby/json:=
+ >=dev-ruby/facter-3.0.0
+ augeas? ( dev-ruby/ruby-augeas )
+ diff? ( dev-ruby/diff-lcs )
+ doc? ( dev-ruby/rdoc )
+ ldap? ( dev-ruby/ruby-ldap )
+ shadow? ( dev-ruby/ruby-shadow )
+ sqlite? ( dev-ruby/sqlite3 )
+ virtual/ruby-ssl"
+
+# ruby_add_bdepend "
+# test? (
+# dev-ruby/mocha:0.14
+# =dev-ruby/rack-1*
+# dev-ruby/rspec-its
+# dev-ruby/rspec-collection_matchers
+# >=dev-ruby/vcr-2.9:2
+# >=dev-ruby/webmock-1.24:0
+# )"
+
+DEPEND+=" ${DEPEND}
+ xemacs? ( app-editors/xemacs )"
+RDEPEND+=" ${RDEPEND}
+ rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
+ selinux? (
+ sys-libs/libselinux[ruby]
+ sec-policy/selinux-puppet
+ )
+ vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
+ >=app-portage/eix-0.18.0"
+PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
+
+SITEFILE="50${PN}-mode-gentoo.el"
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /var/lib/puppet puppet
+}
+
+all_ruby_prepare() {
+ # Avoid spec that require unpackaged json-schema.
+ rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
+
+ # can't be run within portage.
+ epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch"
+
+ # fix systemd path
+ epatch "${FILESDIR}/puppet-systemd.patch"
+
+ if use experimental; then
+ epatch "${FILESDIR}/43e2c935252b995134ce353e5e6312cf77aea480.patch"
+ fi
+
+ # Use working version of mocha
+ sed -i -e '1igem "mocha", "~>0.14.0"; gem "rack", "~>1.0"' spec/spec_helper.rb || die
+
+ # Avoid specs that can only run in the puppet.git repository. This
+ # should be narrowed down to the specific specs.
+ rm spec/integration/parser/compiler_spec.rb || die
+
+ # Avoid failing specs that need further investigation.
+ sed -i -e '/should resolve external facts/,/^ end/ s:^:#:' \
+ spec/integration/indirector/facts/facter_spec.rb || die
+ sed -i -e "/describe 'cfacter'/,/^ end/ s:^:#:" spec/unit/defaults_spec.rb || die
+ rm -f spec/unit/indirector/ldap_spec.rb \
+ spec/unit/parser/functions/create_resources_spec.rb || die
+
+ # Avoid specs that rely on tools from other OSs
+ rm -f spec/unit/provider/package/{dnf,tdnf,yum}_spec.rb \
+ spec/unit/provider/user/directoryservice_spec.rb || die
+
+ # Avoid specs that depend on hiera-eyaml to avoid circular
+ # dependencies
+ rm -f spec/unit/functions/lookup_spec.rb || die
+
+ # Avoid specs that fail due to an unpackaged file
+ sed -i -e '/when loading pp resource types using auto loading/,/^ end/ s:^:#:' spec/unit/pops/loaders/loaders_spec.rb || die
+}
+
+all_ruby_compile() {
+ if use xemacs ; then
+ # Create a separate version for xemacs to be able to install
+ # emacs and xemacs in parallel.
+ mkdir ext/xemacs
+ cp ext/emacs/* ext/xemacs/
+ xemacs-elisp-compile ext/xemacs/puppet-mode.el
+ fi
+}
+
+each_ruby_install() {
+ each_fakegem_install
+# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ # systemd stuffs
+ insinto /usr/lib/systemd/system
+ doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
+
+ # tmpfiles stuff
+ insinto /usr/lib/tmpfiles.d
+ newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
+
+ # openrc init stuff
+ newinitd "${FILESDIR}"/puppet.init-4.x puppet
+ newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
+ newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
+
+ keepdir /etc/puppetlabs/puppet/ssl
+
+ keepdir /var/lib/puppet/facts
+ keepdir /var/lib/puppet/files
+ fowners -R puppet:puppet /var/lib/puppet
+
+ fperms 0750 /var/lib/puppet
+
+ fperms 0750 /etc/puppetlabs
+ fperms 0750 /etc/puppetlabs/puppet
+ fperms 0750 /etc/puppetlabs/puppet/ssl
+ fowners -R :puppet /etc/puppetlabs
+ fowners -R :puppet /var/lib/puppet
+
+ if use xemacs ; then
+ xemacs-elisp-install ${PN} ext/xemacs/puppet-mode.el*
+ xemacs-elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ if use ldap ; then
+ insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
+ fi
+
+ # ext and examples files
+ for f in $(find ext examples -type f) ; do
+ docinto "$(dirname ${f})"; dodoc "${f}"
+ done
+}
+
+pkg_postinst() {
+ elog
+ elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
+ elog "cause puppet to hang while installing packages."
+ elog
+ elog "Portage Puppet module with Gentoo-specific resources:"
+ elog "http://forge.puppetlabs.com/gentoo/portage"
+ elog
+
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [ "$(get_major_version $v)" = "3" ]; then
+ elog
+ elog "If you're upgrading from 3.x then please move everything in /etc/puppet to"
+ elog "/etc/puppetlabs/puppet"
+ elog "Also, puppet now uses config directories for modules and manifests."
+ elog "See https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_agent.html"
+ elog "and https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_server.html"
+ elog "for more information."
+ elog
+ fi
+ done
+
+ use xemacs && xemacs-elisp-site-regen
+}
+
+pkg_postrm() {
+ use xemacs && xemacs-elisp-site-regen
+}
diff --git a/app-admin/puppet/puppet-5.5.1.ebuild b/app-admin/puppet/puppet-5.5.1.ebuild
new file mode 100644
index 000000000000..646ad4fb5351
--- /dev/null
+++ b/app-admin/puppet/puppet-5.5.1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+USE_RUBY="ruby22 ruby23 ruby24"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_TASK_DOC="doc:all"
+
+RUBY_FAKEGEM_EXTRAINSTALL="locales"
+
+inherit eutils user ruby-fakegem versionator
+
+DESCRIPTION="A system automation and configuration management software."
+HOMEPAGE="http://puppetlabs.com/"
+SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 x86"
+IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax"
+RESTRICT="test"
+
+ruby_add_rdepend "
+ dev-ruby/hiera
+ dev-ruby/json:=
+ >=dev-ruby/facter-3.0.0
+ augeas? ( dev-ruby/ruby-augeas )
+ diff? ( dev-ruby/diff-lcs )
+ doc? ( dev-ruby/rdoc )
+ ldap? ( dev-ruby/ruby-ldap )
+ shadow? ( dev-ruby/ruby-shadow )
+ sqlite? ( dev-ruby/sqlite3 )
+ virtual/ruby-ssl
+ dev-ruby/hocon"
+
+ruby_add_bdepend "
+ doc? ( dev-ruby/yard )
+ test? (
+ dev-ruby/mocha
+ dev-ruby/rack
+ dev-ruby/rspec-its
+ )"
+# this should go in the above lists, but isn't because of test deps not being keyworded
+# dev-ruby/rspec-collection_matchers
+
+RDEPEND+=" ${RDEPEND}
+ rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
+ selinux? (
+ sys-libs/libselinux[ruby]
+ sec-policy/selinux-puppet
+ )
+ vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
+ >=app-portage/eix-0.18.0"
+PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /var/lib/puppet puppet
+}
+
+all_ruby_prepare() {
+ # Avoid spec that require unpackaged json-schema.
+ rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
+
+ # can't be run within portage.
+ epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch"
+
+ # fix systemd path
+ epatch "${FILESDIR}/puppet-systemd.patch"
+
+ # Avoid specs that can only run in the puppet.git repository. This
+ # should be narrowed down to the specific specs.
+ rm spec/integration/parser/compiler_spec.rb || die
+
+ # Avoid failing spec that need further investigation.
+ rm spec/unit/module_tool/metadata_spec.rb || die
+}
+
+each_ruby_install() {
+ each_fakegem_install
+# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ # systemd stuffs
+ insinto /usr/lib/systemd/system
+ doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
+
+ # tmpfiles stuff
+ insinto /usr/lib/tmpfiles.d
+ newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
+
+ # openrc init stuff
+ newinitd "${FILESDIR}"/puppet.init-4.x puppet
+ newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
+ newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
+
+ keepdir /etc/puppetlabs/puppet/ssl
+
+ keepdir /var/lib/puppet/facts
+ keepdir /var/lib/puppet/files
+ fowners -R puppet:puppet /var/lib/puppet
+
+ fperms 0750 /var/lib/puppet
+
+ fperms 0750 /etc/puppetlabs
+ fperms 0750 /etc/puppetlabs/puppet
+ fperms 0750 /etc/puppetlabs/puppet/ssl
+ fowners -R :puppet /etc/puppetlabs
+ fowners -R :puppet /var/lib/puppet
+
+ if use ldap ; then
+ insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
+ fi
+
+ # ext and examples files
+ for f in $(find ext examples -type f) ; do
+ docinto "$(dirname ${f})"; dodoc "${f}"
+ done
+}
+
+pkg_postinst() {
+ elog
+ elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
+ elog "cause puppet to hang while installing packages."
+ elog
+ elog "Portage Puppet module with Gentoo-specific resources:"
+ elog "http://forge.puppetlabs.com/gentoo/portage"
+ elog
+
+ for v in ${REPLACING_VERSIONS}; do
+ if [ "$(get_major_version $v)" = "4" ]; then
+ elog
+ elog "Please see the following url for the release notes for puppet-5"
+ elog "https://docs.puppet.com/puppet/5.0/release_notes.html#if-youre-upgrading-from-puppet-4x"
+ elog
+ fi
+ done
+}
diff --git a/app-admin/puppet/puppet-5.5.2.ebuild b/app-admin/puppet/puppet-5.5.2.ebuild
new file mode 100644
index 000000000000..8aa23c0b2c8c
--- /dev/null
+++ b/app-admin/puppet/puppet-5.5.2.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+USE_RUBY="ruby23 ruby24 ruby25"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_TASK_DOC="doc:all"
+
+RUBY_FAKEGEM_EXTRAINSTALL="locales"
+
+inherit eutils user ruby-fakegem versionator
+
+DESCRIPTION="A system automation and configuration management software."
+HOMEPAGE="http://puppetlabs.com/"
+SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 x86"
+IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax"
+RESTRICT="test"
+
+ruby_add_rdepend "
+ dev-ruby/hiera
+ dev-ruby/json:=
+ >=dev-ruby/facter-3.0.0
+ augeas? ( dev-ruby/ruby-augeas )
+ diff? ( dev-ruby/diff-lcs )
+ doc? ( dev-ruby/rdoc )
+ ldap? ( dev-ruby/ruby-ldap )
+ shadow? ( dev-ruby/ruby-shadow )
+ sqlite? ( dev-ruby/sqlite3 )
+ virtual/ruby-ssl
+ dev-ruby/hocon"
+
+ruby_add_bdepend "
+ doc? ( dev-ruby/yard )
+ test? (
+ dev-ruby/mocha
+ dev-ruby/rack
+ dev-ruby/rspec-its
+ )"
+# this should go in the above lists, but isn't because of test deps not being keyworded
+# dev-ruby/rspec-collection_matchers
+
+RDEPEND+=" ${RDEPEND}
+ rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
+ selinux? (
+ sys-libs/libselinux[ruby]
+ sec-policy/selinux-puppet
+ )
+ vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
+ >=app-portage/eix-0.18.0"
+PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /var/lib/puppet puppet
+}
+
+all_ruby_prepare() {
+ # Avoid spec that require unpackaged json-schema.
+ rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
+
+ # can't be run within portage.
+ epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch"
+
+ # fix systemd path
+ epatch "${FILESDIR}/puppet-systemd.patch"
+
+ # Avoid specs that can only run in the puppet.git repository. This
+ # should be narrowed down to the specific specs.
+ rm spec/integration/parser/compiler_spec.rb || die
+
+ # Avoid failing spec that need further investigation.
+ rm spec/unit/module_tool/metadata_spec.rb || die
+}
+
+each_ruby_install() {
+ each_fakegem_install
+# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ # systemd stuffs
+ insinto /usr/lib/systemd/system
+ doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
+
+ # tmpfiles stuff
+ insinto /usr/lib/tmpfiles.d
+ newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
+
+ # openrc init stuff
+ newinitd "${FILESDIR}"/puppet.init-4.x puppet
+ newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
+ newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
+
+ keepdir /etc/puppetlabs/puppet/ssl
+
+ keepdir /var/lib/puppet/facts
+ keepdir /var/lib/puppet/files
+ fowners -R puppet:puppet /var/lib/puppet
+
+ fperms 0750 /var/lib/puppet
+
+ fperms 0750 /etc/puppetlabs
+ fperms 0750 /etc/puppetlabs/puppet
+ fperms 0750 /etc/puppetlabs/puppet/ssl
+ fowners -R :puppet /etc/puppetlabs
+ fowners -R :puppet /var/lib/puppet
+
+ if use ldap ; then
+ insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
+ fi
+
+ # ext and examples files
+ for f in $(find ext examples -type f) ; do
+ docinto "$(dirname ${f})"; dodoc "${f}"
+ done
+}
+
+pkg_postinst() {
+ elog
+ elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
+ elog "cause puppet to hang while installing packages."
+ elog
+ elog "Portage Puppet module with Gentoo-specific resources:"
+ elog "http://forge.puppetlabs.com/gentoo/portage"
+ elog
+
+ for v in ${REPLACING_VERSIONS}; do
+ if [ "$(get_major_version $v)" = "4" ]; then
+ elog
+ elog "Please see the following url for the release notes for puppet-5"
+ elog "https://docs.puppet.com/puppet/5.0/release_notes.html#if-youre-upgrading-from-puppet-4x"
+ elog
+ fi
+ done
+}