diff options
Diffstat (limited to 'app-admin/puppet-agent')
-rw-r--r-- | app-admin/puppet-agent/Manifest | 16 | ||||
-rw-r--r-- | app-admin/puppet-agent/files/43e2c935252b995134ce353e5e6312cf77aea480.patch | 329 | ||||
-rw-r--r-- | app-admin/puppet-agent/files/mcollective.initd | 18 | ||||
-rw-r--r-- | app-admin/puppet-agent/files/mcollective.service | 14 | ||||
-rw-r--r-- | app-admin/puppet-agent/files/puppet-agent.conf.tmpfilesd | 1 | ||||
-rw-r--r-- | app-admin/puppet-agent/files/puppet.initd | 29 | ||||
-rw-r--r-- | app-admin/puppet-agent/files/puppet.service | 14 | ||||
-rw-r--r-- | app-admin/puppet-agent/metadata.xml | 15 | ||||
-rw-r--r-- | app-admin/puppet-agent/puppet-agent-1.10.12.ebuild | 111 | ||||
-rw-r--r-- | app-admin/puppet-agent/puppet-agent-5.5.1.ebuild | 85 | ||||
-rw-r--r-- | app-admin/puppet-agent/puppet-agent-5.5.3.ebuild | 85 |
11 files changed, 717 insertions, 0 deletions
diff --git a/app-admin/puppet-agent/Manifest b/app-admin/puppet-agent/Manifest new file mode 100644 index 000000000000..b0c982f2fb85 --- /dev/null +++ b/app-admin/puppet-agent/Manifest @@ -0,0 +1,16 @@ +AUX 43e2c935252b995134ce353e5e6312cf77aea480.patch 13696 BLAKE2B 5ec41526e04402a38b33d5f106f63810e5295e1f8016fe4e9bc20a83ec36435d0d5d3b75ae6fc4cbede8644176c0fb4692bb17996926f512f8787a6d88f20f1b SHA512 f2f76fe892c8f83a85285b34fc6177db7198af4289e4f3350784a6f08fc50a69e74a5bc714aacae3c8a1fed6a3be930c9f517b354ac49108a4ec185f17bcd513 +AUX mcollective.initd 469 BLAKE2B caf0474a121950d72d6e6edac6ccc2ad12f47e916970cea005a29680078d560ef67b277c1308e3d62435b4aee1d264bc8774bd4e4a6e3047079b35f87c72f6c4 SHA512 f8356e70bdc879f1ca9e8528c0109db890e26e2b843bd454a08350fd3bfeafabfcf30ba6b5d39e0b843e3d063221a220fc8af80f42d2360a73b5f7bd95e6d462 +AUX mcollective.service 390 BLAKE2B 3d032bfbcc0499af0beafae05c008b420f3b598c4906e57a587e9a400f76a9d918d7d7c4c8543e3abd61f68e29e5e1b8a6ecb99e9bbdfaa34aae7b1a54d5c71f SHA512 28fdc1f094d8995c806e2bfbd5b5ba8299603e19d379270be009f69b5ae186abfde65d1b7d0c0213e686f0c1cf944731a22b1ebbef1bb8c12edaf298b6c05901 +AUX puppet-agent.conf.tmpfilesd 39 BLAKE2B 5ad1c862fec60701bdd18fb5f968d53b54b04e585b47941dbddcf2aab14d83af741e41c6f9e2ab359d6f4004bcd4f9215b34a6ac556882de4c12bb92da8f89b4 SHA512 24a2d8a49ec805da87953be60b1fefbca7e5b441f7f2865f43306526c2715aa1704705029fe45bf981786ea13cffbfd1c9b9502db416fc21534f87b17e348ab5 +AUX puppet.initd 765 BLAKE2B 4b48126506cbafe50bccd364a5aab10e57fb2412795122d3520d75f6034c92bcfaa0fff2cf7d19d40fa251f3a9009c32660474d2ef24c2481e93c04bc16b2979 SHA512 d40522b2060e4d4d72e60cca17860d029223e442e69982b6c553b72c4bd6d8b0d6be22baa496486cd0d9e99d6ed55789cba565186979fcd6cf3e49acb8a45171 +AUX puppet.service 355 BLAKE2B 96b24396f6b91181c13ef66cb06ff8197135d0bceefe4b01bdeb461d337b369c7fb7721ccbb2bf8680c0e8029d281d1bb0d5eafc7de6393f8fe058b7e67285de SHA512 a4dfb4f510413f0c4cbdcac911d35c33659d661b1dd52f2f9fe296fcff53f8ea4b2270dcb0b56d0128d629e15ffffd1e2c75a4ae338c47233194a035965fe2d6 +DIST puppet-agent_1.10.12-1stretch_amd64.deb 15443166 BLAKE2B 74c8465fd8cc98ca114acdc600c3f259072d64765cdd8308092b7177233d44656f429407520ead2e02494951f57f1c79b5dfe8c76b2dd7bba7c1316426746df8 SHA512 1391530be340ad0439260f7bd3df8ad251ffaa02fc2f358e4ff2189b8c64a0b2d0caab9f84b84b26ebe2176decef2a39d3114f6433ba6eacd962ff45e1e04c43 +DIST puppet-agent_1.10.12-1stretch_i386.deb 16308082 BLAKE2B 6606c15aac51b28e9e8011168563dff9069b6b065f861c01f4fc768064fe266f83211fbc8fefebfe4bdf81c6220b5daa19f66a9214bd1f2ff53a3b1a2e87128a SHA512 fce0a3ac12afcc293fbdf3cc990407b82592228ed8ed609f4b98c17cea35c8e5ff5f47287880601fa80ac2f7fa608dfe00b3594a906d52bc2bd2e04117ccb856 +DIST puppet-agent_5.5.1-1stretch_amd64.deb 17325604 BLAKE2B 1fab815d5d238cb6a05da91a4a9645644915493b2117ff29b8ba258edab18084394c8054f37c5bcbee9bf903dabce5741d7ef4be0a94a0ec8c13ac4b825b8bca SHA512 c4c7ce50cf576a6b12ecee8b9a6c7969512b3625e7ea0f16cc4cd367cebee5271cdaf7cc084fe4d344b42ab6e200664fe7b167acd9cd0da23d2ff3cd9028d6f7 +DIST puppet-agent_5.5.1-1stretch_i386.deb 18063690 BLAKE2B ea7c7068e57da1249c1b1c7232e1af673840b0c8c7e5795574ffcb1861c68683ac9f21f8f4216272130b12a61bb8b324e49d6bf7f0c3d314857fd2591a7ad6ff SHA512 1a64616191a5143b150fe1d145ea786233ab763e87d5fe86bd1b3306fa73bab60d2f3d5c0bb7fcb6fe7c700a47a4c94c72eef1509732b18a5caf0fcd7f060602 +DIST puppet-agent_5.5.3-1stretch_amd64.deb 17272112 BLAKE2B 5e052f837184b1d1dd5965ccb18e3a52dc88ea6ba85c0c3c5222ffe50e32e0a72a6f14274f5dd6c1bd63b3a160affa8a6b3399ac75e27d9cc2c267a1e1c0e89d SHA512 1629b3535b900081676647f64c17e3c0d23df38525d90d5f3993877d0749d18cf55f72fb20c47e20a63d18c2c7ad95cc0f179449c386ce3b8ec8a6d0f40243e7 +DIST puppet-agent_5.5.3-1stretch_i386.deb 18189670 BLAKE2B a8791926a5ce08edad363670ab5269fcef208c3137db4126f33295fd7fdd447620578445eb0a9396e263fed8612981581cef0c5f6d3e51634722c01c79e2c9dc SHA512 83a1f472c4af97a48703ca61a00740fc7806155732bd488d3f9d757f969dca0a19cec014dad0bb5e6d8b5384d32c2d906ad0e8438efeeae5fdd39524cc11f6f8 +EBUILD puppet-agent-1.10.12.ebuild 3479 BLAKE2B 6db65113a8203216068167672257270fefdcad43a897c6b25400be1949beb573b335feca32c268223ab288e340ae2edf53e4fc39a445d1c9bfc5ad37f9c7340a SHA512 1be819f7fb14d2d3aa47d23919feba678445cd605fe31f43b090bfbe3ab9a3ee4db7868553f7cf3a5c85b49d5cca0caa2580e1347ec278df91fe8495df42873c +EBUILD puppet-agent-5.5.1.ebuild 2481 BLAKE2B 763dc1a03051af2be4472342dcfad9304649f7fde6d83889c93cae0b7b7521d6c28cf17cf8227f553a0a409a705678070b8e83161871f5d116302803868c92d2 SHA512 b1811874ca9c554896a16c8f134a8b4b84217192924f999a5a0c9d72630776c50de5f0ef16be82559e6f97548332a23ca0e68618b64bdc623bc27745c70229a0 +EBUILD puppet-agent-5.5.3.ebuild 2481 BLAKE2B 763dc1a03051af2be4472342dcfad9304649f7fde6d83889c93cae0b7b7521d6c28cf17cf8227f553a0a409a705678070b8e83161871f5d116302803868c92d2 SHA512 b1811874ca9c554896a16c8f134a8b4b84217192924f999a5a0c9d72630776c50de5f0ef16be82559e6f97548332a23ca0e68618b64bdc623bc27745c70229a0 +MISC metadata.xml 502 BLAKE2B 9eaaec32ba54988999831d4d873dff6c525b42ede2da3cc9a5b67359299233f2ffdafa04a949df6aa58d764e36beaf8ce64c053a306f6e055a245b207e8f2aaa SHA512 aedf4322173910c202b105d904e4528c6b6bb949fc05ed95c4a8d9a74133f5c7391ae30d7675bfa36a3f85880c971aff6e4a57ffdcde57b3b63c02dbed083a95 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.12.ebuild b/app-admin/puppet-agent/puppet-agent-1.10.12.ebuild new file mode 100644 index 000000000000..22bc1d19c4ac --- /dev/null +++ b/app-admin/puppet-agent/puppet-agent-1.10.12.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +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/stretch/PC1/${PN:0:1}/${PN}/${PN}_${PV}-1stretch" +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 + eapply_user +} + +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/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.5.1.ebuild b/app-admin/puppet-agent/puppet-agent-5.5.1.ebuild new file mode 100644 index 000000000000..784b06891e1d --- /dev/null +++ b/app-admin/puppet-agent/puppet-agent-5.5.1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +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/stretch/puppet5/${PN:0:1}/${PN}/${PN}_${PV}-1stretch" +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:0/7 + sys-libs/ncurses:0[tinfo] + selinux? ( + sys-libs/libselinux[ruby] + sec-policy/selinux-puppet + ) + puppetdb? ( >=dev-ruby/puppetdb-termini-5.0.1 )" + +S=${WORKDIR} + +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/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 +} diff --git a/app-admin/puppet-agent/puppet-agent-5.5.3.ebuild b/app-admin/puppet-agent/puppet-agent-5.5.3.ebuild new file mode 100644 index 000000000000..784b06891e1d --- /dev/null +++ b/app-admin/puppet-agent/puppet-agent-5.5.3.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +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/stretch/puppet5/${PN:0:1}/${PN}/${PN}_${PV}-1stretch" +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:0/7 + sys-libs/ncurses:0[tinfo] + selinux? ( + sys-libs/libselinux[ruby] + sec-policy/selinux-puppet + ) + puppetdb? ( >=dev-ruby/puppetdb-termini-5.0.1 )" + +S=${WORKDIR} + +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/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 +} |