summaryrefslogtreecommitdiff
path: root/app-admin/puppet-agent
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/puppet-agent
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/puppet-agent')
-rw-r--r--app-admin/puppet-agent/Manifest15
-rw-r--r--app-admin/puppet-agent/files/43e2c935252b995134ce353e5e6312cf77aea480.patch329
-rw-r--r--app-admin/puppet-agent/files/mcollective.initd18
-rw-r--r--app-admin/puppet-agent/files/mcollective.service14
-rw-r--r--app-admin/puppet-agent/files/puppet-agent.conf.tmpfilesd1
-rw-r--r--app-admin/puppet-agent/files/puppet.initd29
-rw-r--r--app-admin/puppet-agent/files/puppet.service14
-rw-r--r--app-admin/puppet-agent/metadata.xml15
-rw-r--r--app-admin/puppet-agent/puppet-agent-1.10.7.ebuild111
-rw-r--r--app-admin/puppet-agent/puppet-agent-5.1.0-r1.ebuild104
10 files changed, 650 insertions, 0 deletions
diff --git a/app-admin/puppet-agent/Manifest b/app-admin/puppet-agent/Manifest
new file mode 100644
index 000000000000..38b2787eff82
--- /dev/null
+++ b/app-admin/puppet-agent/Manifest
@@ -0,0 +1,15 @@
+AUX 43e2c935252b995134ce353e5e6312cf77aea480.patch 13696 SHA256 16adf7c701ee44ea7b33cc4bfdf089e965454237f30eed1525ba104016e80fba SHA512 f2f76fe892c8f83a85285b34fc6177db7198af4289e4f3350784a6f08fc50a69e74a5bc714aacae3c8a1fed6a3be930c9f517b354ac49108a4ec185f17bcd513 WHIRLPOOL 409d49b27c2424d8ef46e12d9375f6751fbf14ae5b6ff9f5b46cdacf8d3d567b06ca3e21cb5e0f757d2084947ecccfab35952394088cc003bef61fce56fee196
+AUX mcollective.initd 469 SHA256 6a576f0b0a627102b2295b0c715e020dbb0789efde64ec6e291d5850300b7feb SHA512 f8356e70bdc879f1ca9e8528c0109db890e26e2b843bd454a08350fd3bfeafabfcf30ba6b5d39e0b843e3d063221a220fc8af80f42d2360a73b5f7bd95e6d462 WHIRLPOOL 8f2b6b9649146f0083c0eca15a4f21fed631e4f104c5870e1e44c787d9787c7994b217f90b3efdda9e015e487382fc7cf856e4a7af919798caceafdbe9e0cfc0
+AUX mcollective.service 390 SHA256 2ba4d9ae263897a901805dac0e2b899786ee5a92fb08c133ec99681824f02e0c SHA512 28fdc1f094d8995c806e2bfbd5b5ba8299603e19d379270be009f69b5ae186abfde65d1b7d0c0213e686f0c1cf944731a22b1ebbef1bb8c12edaf298b6c05901 WHIRLPOOL 5665177f6da26b0793a1890ac15180076dc035d00e4f99914065b607c5ae0c3de3416ffbcfc720f250e15a841acdec06893361fd42d8628b30d99031ba5ea3f8
+AUX puppet-agent.conf.tmpfilesd 39 SHA256 41ea7cfc1eea6f7c125560236da8fee3fb340d5b995a746ad0d0d56100d6e6a7 SHA512 24a2d8a49ec805da87953be60b1fefbca7e5b441f7f2865f43306526c2715aa1704705029fe45bf981786ea13cffbfd1c9b9502db416fc21534f87b17e348ab5 WHIRLPOOL 04acbc8c88abdb55db32e9f9a3bc5162724b3739e7073a508ff468097a68e0166794920c18a504e6d03f6d30a635095ee43674e98ed60facafc71e5ccf8837b0
+AUX puppet.initd 765 SHA256 5157630d3856c2cec4e22a19fb7e2d1471ff34aaacbb10f3d97fba702cc71772 SHA512 d40522b2060e4d4d72e60cca17860d029223e442e69982b6c553b72c4bd6d8b0d6be22baa496486cd0d9e99d6ed55789cba565186979fcd6cf3e49acb8a45171 WHIRLPOOL c5a9e8605141e4bceb5ce77ca2ca7de0452c110cc058ea139a01c3658b89374f2d23835dbd4ee6fd4edbbcc756257270302c358acd04b1d4708803fa1a864f3c
+AUX puppet.service 355 SHA256 9ffee4138261d0abd9a45a38d23b16cc8beb6a90aca05d1a64efea5b5ddc2edc SHA512 a4dfb4f510413f0c4cbdcac911d35c33659d661b1dd52f2f9fe296fcff53f8ea4b2270dcb0b56d0128d629e15ffffd1e2c75a4ae338c47233194a035965fe2d6 WHIRLPOOL 0f64879163051ce1cb4d4ca1d17e11e9dd7abca890824a15621b635a7c1fc391010c190952b63db637c08a0eb8130bb0f9147a378206916c3e71d43e1fb8758a
+DIST puppet-agent_1.10.7-1xenial_amd64.deb 16449418 SHA256 a23169ff2adeff419436f738a991d3026c3f06b993a9824922d26a125a53fd0f SHA512 5c73eea444186cbd0d52e42a20858964db6e7f2b6e537274b5b0a44499cc2bb0622a4eb6a55fa10dcc3946bdae3bb00b9d228aa5d1d444cc53aeefddf11f7b5b WHIRLPOOL 5eb0c71bc630ad878f2731353c93195b4e686ff0d48796fff0b700550f8f8ab69d039c818a557bdf231ecb08b85e8529706f280b19bae031a24f2687e50ae32b
+DIST puppet-agent_1.10.7-1xenial_i386.deb 16182468 SHA256 ee60570ec29561adfded01fec2017756d5f921c08677a530149b0da2ead1f29f SHA512 7d5a41af7619fe008fec5302e23482d688692affaeded4b0b2f4e693168c2ef6995beee5e2410a9cb2e7f99650119e9c5f8007ed65709ad623654bdd6c09e402 WHIRLPOOL 81d7a325d2c675f2392dfc16f1d3a411c6e7a2e449844b90358d0a97c31cc3ccdbf6a8a891bd818017b9504e898fe8aed2d12233dae4822f125f7ab2230ceb1d
+DIST puppet-agent_5.1.0-1xenial_amd64.deb 15141786 SHA256 1a3ad0ef1a5e4026927f3ae010e9a48b9c1e31dfb8e0691d01383d29f3b14644 SHA512 a210d225591328e2c041aad1dd7cfdac614531e1ceb524c3e35d3330962111bdc66408268550072e53190d6a10a7c8244b0bfa8a12b81f023883831c1fcbd070 WHIRLPOOL 34dc5cfcf6bb3500b89451078734d5d7a03a53a0be9e5501d6ded574cf2b6dbafe207db87aa919fd9cdadb6c2a0a05191854be3245d477e035fe7d52778cf527
+DIST puppet-agent_5.1.0-1xenial_i386.deb 15596316 SHA256 41a4d70b3ff87352d9aa5594d2b65176f9854b38b21c738321e6d7dd516ccf25 SHA512 9e364fc50baa081cc808c0e0277d6625f6064dad7d56fba352d552e9398e7197405a8c3e15fac4f569dfa11c7c4657261f06b8c90f04bef6fcc6a9794d94e927 WHIRLPOOL e54f2a75b753f94b5dff8d230776afad6193f446d8156d2d2e10d9248732a607a83fa79fe01c4fae36ad8f3cf4ddb453906cf2f4fda87e3e414ede4fa893c58e
+EBUILD puppet-agent-1.10.7.ebuild 3499 SHA256 1097408bfba9ee47a6d6e25c5ac631221b303bd2a72c87ebba7539a05a595107 SHA512 22bd5df84895605e506ce0b9ee000bf72208b1e24c3907834c744613d341430336ee8abc0125f94af8accbf22057e739612a939e18b4206fbd122848d1446366 WHIRLPOOL 07cac34b6b1259cfb9af1cb695730869a7bfeb23ac52a45add1485de334e95b95366421d774ddb51c24edc18e00b55adcea845b55771ef60b9bb317123f67529
+EBUILD puppet-agent-5.1.0-r1.ebuild 3290 SHA256 11dce268631acad8339cd951bafc5e5f7c1d9b7e106441c1db1312f9e8ed89b9 SHA512 9babb71d75b321e7d795ffbdcf8f6c3986bbbc302e6f70331f145eaa72dd7192d39e50587f9604927db08bdd2b705d89b8caff49bf914e35b3e5dbb58de5d22c WHIRLPOOL a9dacee439fccfabcd05cacf308f53da604d776e465b5254915b02c149566d07a237ce282603164af14f6844c4a6440b050fcd158127a9d7d8a1093a163a173b
+MISC ChangeLog 12414 SHA256 43b79bfdeb14a8a8c06df8809dac296ae71e59e85e5243bcdd578dd99c3c3f7b SHA512 4ad26d58ea469acd9c510f6582175ecb0a58954cc7eb2c8c90c2736e227fce04f9d196cce20b64a52153323058d6f5a2831de364251803d8eb0656b15ea4cafc WHIRLPOOL 16dab8e7506da0d6bb98f91d08c1890c12e9152baa7f15c4e1ad01f210845acfb55cbe3c8bde1a1b71559cb60d84ea436c24798290802891e3047d024b66edfb
+MISC ChangeLog-2015 1925 SHA256 14cec0025e9af42a203c9a087daf7d2bce1dd92aec66445814fe3ba58fb55611 SHA512 f5c921d2ee0079c50c6618d8efa13438d07fe0626133269c8be9b5dd7f7a3aa6d2d1643d445d5e1d527094b2d814c0d5858974e5b38dd475dcb9d0271162ec72 WHIRLPOOL 92882e38ab2de443b8c4edb81327915b6ac76d1df5bd4306827ad92704bfe844ceda17c4abc81210de36718ad6d51eade549d720035e46ef6e719262f0441354
+MISC metadata.xml 502 SHA256 93c372bb207d39c92f64f58733dce40b0156cbbc0b9464c91826e0885e4edcd3 SHA512 aedf4322173910c202b105d904e4528c6b6bb949fc05ed95c4a8d9a74133f5c7391ae30d7675bfa36a3f85880c971aff6e4a57ffdcde57b3b63c02dbed083a95 WHIRLPOOL db08ec51b5c3ce9b2cd5599e002301ea345072eac18b51486161b665970d0032297365e3001060d716d29c13696a664c4be68b5a6d17043ec8b204a0adce7ac3
diff --git a/app-admin/puppet-agent/files/43e2c935252b995134ce353e5e6312cf77aea480.patch b/app-admin/puppet-agent/files/43e2c935252b995134ce353e5e6312cf77aea480.patch
new file mode 100644
index 000000000000..619c5dd68cba
--- /dev/null
+++ b/app-admin/puppet-agent/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/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/portage.rb
++++ b/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/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-agent/files/mcollective.initd b/app-admin/puppet-agent/files/mcollective.initd
new file mode 100644
index 000000000000..6500cd878815
--- /dev/null
+++ b/app-admin/puppet-agent/files/mcollective.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MCOLLECTIVE_PID_DIR="${MCOLLECTIVE_PID_DIR:-/var/run/puppetlabs}"
+
+command="/usr/sbin/mcollectived"
+pidfile="${MCOLLECTIVE_PID_DIR}/mcollectived.pid"
+
+command_args="--pidfile ${pidfile} --config=/etc/puppetlabs/mcollective/server.cfg --daemonize"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath --directory "${MCOLLECTIVE_PID_DIR}"
+}
diff --git a/app-admin/puppet-agent/files/mcollective.service b/app-admin/puppet-agent/files/mcollective.service
new file mode 100644
index 000000000000..9a6fdefb8ca8
--- /dev/null
+++ b/app-admin/puppet-agent/files/mcollective.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The Marionette Collective
+After=network.target
+
+[Service]
+Type=forking
+StandardOutput=syslog
+StandardError=syslog
+ExecStart=/usr/sbin/mcollectived --config=/etc/puppetlabs/mcollective/server.cfg --pidfile=/var/run/puppetlabs/mcollective.pid --daemonize
+ExecReload=/bin/kill -USR1 $MAINPID
+PIDFile=/var/run/puppetlabs/mcollective.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-admin/puppet-agent/files/puppet-agent.conf.tmpfilesd b/app-admin/puppet-agent/files/puppet-agent.conf.tmpfilesd
new file mode 100644
index 000000000000..42d082111940
--- /dev/null
+++ b/app-admin/puppet-agent/files/puppet-agent.conf.tmpfilesd
@@ -0,0 +1 @@
+d /var/run/puppetlabs 0755 root root -
diff --git a/app-admin/puppet-agent/files/puppet.initd b/app-admin/puppet-agent/files/puppet.initd
new file mode 100644
index 000000000000..1c366bcf9641
--- /dev/null
+++ b/app-admin/puppet-agent/files/puppet.initd
@@ -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/puppetlabs/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 puppetserver 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 HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/app-admin/puppet-agent/files/puppet.service b/app-admin/puppet-agent/files/puppet.service
new file mode 100644
index 000000000000..61b03134b331
--- /dev/null
+++ b/app-admin/puppet-agent/files/puppet.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Puppet agent
+Wants=basic.target
+After=basic.target network.target
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/puppetagent
+EnvironmentFile=-/etc/sysconfig/puppet
+EnvironmentFile=-/etc/default/puppet
+ExecStart=/opt/puppetlabs/puppet/bin/puppet agent $PUPPET_EXTRA_OPTS --no-daemonize
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-admin/puppet-agent/metadata.xml b/app-admin/puppet-agent/metadata.xml
new file mode 100644
index 000000000000..423c18e429e6
--- /dev/null
+++ b/app-admin/puppet-agent/metadata.xml
@@ -0,0 +1,15 @@
+<?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>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <use>
+ <flag name="puppetdb">Adds puppetdb support</flag>
+ <flag name="experimental">Add patches for things in testing</flag>
+ </use>
+ <longdescription lang="en">
+ Collection of puppet utils, clients and batteries included.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-admin/puppet-agent/puppet-agent-1.10.7.ebuild b/app-admin/puppet-agent/puppet-agent-1.10.7.ebuild
new file mode 100644
index 000000000000..300ebc50b6d6
--- /dev/null
+++ b/app-admin/puppet-agent/puppet-agent-1.10.7.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils systemd unpacker user
+
+DESCRIPTION="general puppet client utils along with mcollective hiera and facter"
+HOMEPAGE="https://puppetlabs.com/"
+SRC_BASE="http://apt.puppetlabs.com/pool/xenial/PC1/${PN:0:1}/${PN}/${PN}_${PV}-1xenial"
+SRC_URI="
+ amd64? ( ${SRC_BASE}_amd64.deb )
+ x86? ( ${SRC_BASE}_i386.deb )
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="experimental puppetdb selinux"
+RESTRICT="strip"
+
+CDEPEND="!app-admin/augeas
+ !app-admin/mcollective
+ !app-admin/puppet
+ !dev-ruby/hiera
+ !dev-ruby/facter
+ !app-emulation/virt-what"
+
+DEPEND="
+ ${CDEPEND}"
+RDEPEND="${CDEPEND}
+ app-portage/eix
+ sys-apps/dmidecode
+ sys-libs/glibc
+ >=sys-libs/readline-6.0
+ <sys-libs/readline-7.0
+ selinux? (
+ sys-libs/libselinux[ruby]
+ sec-policy/selinux-puppet
+ )
+ puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )"
+
+S=${WORKDIR}
+
+QA_PREBUILT="
+ /opt/puppetlabs/puppet
+ /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/mathn/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/io/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/dl/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/racc/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/enc/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/json/ext/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/rbconfig/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/digest/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/*
+ /opt/puppetlabs/puppet/lib/engines/*
+ /opt/puppetlabs/puppet/lib/virt-what/*
+ /opt/puppetlabs/puppet/lib/*
+ /opt/puppetlabs/puppet/bin/*"
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /var/run/puppet puppet
+}
+
+src_prepare() {
+ if use experimental; then
+ epatch "${FILESDIR}/43e2c935252b995134ce353e5e6312cf77aea480.patch"
+ fi
+}
+
+src_install() {
+ # conf.d
+ doconfd etc/default/puppet
+ doconfd etc/default/mcollective
+ doconfd etc/default/pxp-agent
+ # logrotate.d
+ insinto /etc/logrotate.d
+ doins etc/logrotate.d/mcollective
+ doins etc/logrotate.d/pxp-agent
+ # puppet itself
+ insinto /etc/puppetlabs
+ doins -r etc/puppetlabs/*
+ # logdir for systemd
+ dodir var/log/puppetlabs/puppet/
+ fperms 0750 var/log/puppetlabs/puppet/
+ # the rest
+ insinto /opt
+ dodir opt/puppetlabs/puppet/cache
+ doins -r opt/*
+ fperms 0750 /opt/puppetlabs/puppet/cache
+ # init
+ newinitd "${FILESDIR}/puppet.initd" puppet
+ newinitd "${FILESDIR}/mcollective.initd" mcollective
+ systemd_dounit lib/systemd/system/puppet.service
+ systemd_dounit lib/systemd/system/mcollective.service
+ systemd_dounit lib/systemd/system/pxp-agent.service
+ systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
+ # symlinks
+ chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
+ chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
+ dosym ../../opt/puppetlabs/bin/facter /usr/bin/facter
+ dosym ../../opt/puppetlabs/bin/hiera /usr/bin/hiera
+ dosym ../../opt/puppetlabs/bin/mco /usr/bin/mco
+ dosym ../../opt/puppetlabs/bin/puppet /usr/bin/puppet
+ dosym ../../opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
+ dosym ../../opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
+ dosym ../../opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
+ dosym ../../opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
+ dosym ../../opt/puppetlabs/puppet/bin/extlookup2hiera /usr/bin/extlookup2hiera
+}
diff --git a/app-admin/puppet-agent/puppet-agent-5.1.0-r1.ebuild b/app-admin/puppet-agent/puppet-agent-5.1.0-r1.ebuild
new file mode 100644
index 000000000000..1bb845bea050
--- /dev/null
+++ b/app-admin/puppet-agent/puppet-agent-5.1.0-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils systemd unpacker user
+
+DESCRIPTION="general puppet client utils along with mcollective hiera and facter"
+HOMEPAGE="https://puppetlabs.com/"
+SRC_BASE="http://apt.puppetlabs.com/pool/xenial/puppet5/${PN:0:1}/${PN}/${PN}_${PV}-1xenial"
+SRC_URI="
+ amd64? ( ${SRC_BASE}_amd64.deb )
+ x86? ( ${SRC_BASE}_i386.deb )
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="puppetdb selinux"
+RESTRICT="strip"
+
+CDEPEND="!app-admin/augeas
+ !app-admin/mcollective
+ !app-admin/puppet
+ !dev-ruby/hiera
+ !dev-ruby/facter
+ !app-emulation/virt-what"
+
+DEPEND="
+ ${CDEPEND}"
+RDEPEND="${CDEPEND}
+ app-portage/eix
+ sys-apps/dmidecode
+ sys-libs/glibc
+ >=sys-libs/readline-6.0
+ <sys-libs/readline-7.0
+ selinux? (
+ sys-libs/libselinux[ruby]
+ sec-policy/selinux-puppet
+ )
+ puppetdb? ( >=dev-ruby/puppetdb-termini-5.0.1 )"
+
+S=${WORKDIR}
+
+QA_PREBUILT="
+ /opt/puppetlabs/puppet
+ /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/mathn/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/io/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/dl/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/racc/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/enc/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/json/ext/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/rbconfig/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/digest/*
+ /opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/*
+ /opt/puppetlabs/puppet/lib/engines/*
+ /opt/puppetlabs/puppet/lib/virt-what/*
+ /opt/puppetlabs/puppet/lib/*
+ /opt/puppetlabs/puppet/bin/*"
+
+pkg_setup() {
+ enewgroup puppet
+ enewuser puppet -1 -1 /var/run/puppet puppet
+}
+
+src_install() {
+ # conf.d
+ doconfd etc/default/puppet
+ doconfd etc/default/mcollective
+ doconfd etc/default/pxp-agent
+ # logrotate.d
+ insinto /etc/logrotate.d
+ doins etc/logrotate.d/mcollective
+ doins etc/logrotate.d/pxp-agent
+ # puppet itself
+ insinto /etc/puppetlabs
+ doins -r etc/puppetlabs/*
+ # logdir for systemd
+ dodir var/log/puppetlabs/puppet/
+ fperms 0750 var/log/puppetlabs/puppet/
+ # the rest
+ insinto /opt
+ dodir opt/puppetlabs/puppet/cache
+ doins -r opt/*
+ fperms 0750 /opt/puppetlabs/puppet/cache
+ # init
+ newinitd "${FILESDIR}/puppet.initd" puppet
+ newinitd "${FILESDIR}/mcollective.initd" mcollective
+ systemd_dounit lib/systemd/system/puppet.service
+ systemd_dounit lib/systemd/system/mcollective.service
+ systemd_dounit lib/systemd/system/pxp-agent.service
+ systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
+ # symlinks
+ chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
+ chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
+ dosym ../../opt/puppetlabs/bin/facter /usr/bin/facter
+ dosym ../../opt/puppetlabs/bin/hiera /usr/bin/hiera
+ dosym ../../opt/puppetlabs/bin/mco /usr/bin/mco
+ dosym ../../opt/puppetlabs/bin/puppet /usr/bin/puppet
+ dosym ../../opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
+ dosym ../../opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
+ dosym ../../opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
+ dosym ../../opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
+}