summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2020-02-17 16:27:29 -0600
committerMatthew Thode <prometheanfire@gentoo.org>2020-02-17 16:36:19 -0600
commit1c544caeae45b7f1a3fff9269a2e468afff1135c (patch)
treedf5e05997c67363bda77006ee5bea6e0135f9c79
parentdev-ruby/facter: 3.14.8 bump (diff)
downloadgentoo-1c544caeae45b7f1a3fff9269a2e468afff1135c.tar.gz
gentoo-1c544caeae45b7f1a3fff9269a2e468afff1135c.tar.bz2
gentoo-1c544caeae45b7f1a3fff9269a2e468afff1135c.zip
app-admin/puppet: cleanup 4.x and move to infra-overlay
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
-rw-r--r--app-admin/puppet/Manifest1
-rw-r--r--app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch329
-rw-r--r--app-admin/puppet/files/puppet-fix-tests-4.7.0.patch18
-rw-r--r--app-admin/puppet/files/puppet.init40
-rw-r--r--app-admin/puppet/files/puppetmaster.init37
-rw-r--r--app-admin/puppet/metadata.xml1
-rw-r--r--app-admin/puppet/puppet-4.10.12.ebuild177
7 files changed, 0 insertions, 603 deletions
diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest
index c79ffb7b7bad..ace06e379dd5 100644
--- a/app-admin/puppet/Manifest
+++ b/app-admin/puppet/Manifest
@@ -1,4 +1,3 @@
-DIST puppet-4.10.12.tar.gz 3022218 BLAKE2B 03757857868b1544078ae5e40d6e438631c788f1b01a3e62ba90e477b754601d2c085228e084363ff20ee39728b02ebe8ca83e17f7c79dddae1c3968aef4e320 SHA512 ff7accf70b1d4de7282cf3b41246151c49c4758a41ace56a470e4723749638027011cf170747e66fa5812280e1612e754e12d92dd35fa6c93171f7187bb9cfa2
DIST puppet-5.5.17.tar.gz 3090402 BLAKE2B 7722ec4196ee766c29eddd7dc73539a4a5a0e4cc781a84af25210488328b5ae01178ca64e8eef14152cbeca06dc8fe145b5e39ce6a120d7689fc32cbbbe16f9f SHA512 95c6cd836a9f732ccfe2d8b83096e79c32428c43390c0826663f896ca1388e1fe3b55d93a5a7548831e95de85247db717866c36786d591e207341c734d70168b
DIST puppet-5.5.18.tar.gz 2984835 BLAKE2B d5a1d023d3d26e04ccc81efa772131c06fc7ace8ec59c7efa97bddb775bb492d3256290824a87d54df5c28862cbba98c58cf41bb4a0c27a4128701652c06eee0 SHA512 86f210ee783ca36340b22463cd4ac237d8dc1c6a35526530af0696bb3f0373b0b22f690d3e3f8e31655ea182a33eb60b66b5826bd6c4d1b0059a8e46152416e6
DIST puppet-6.12.0.tar.gz 2825392 BLAKE2B fdb7007ca337654f5ee89cd6f3beae300c3eb952570eaf1aa9baad407b84b418916e42aed63855bbb250f1d367be12f98261df54253f6438d33950134ef01cce SHA512 bcb77699f4a4a058ea0fa47ee2b449f19053e3ae859e3e30c65a57ad65fc052a4f05d7a932b9cc4b9974b36dc343ac482258ad8d5a44a151362df474b82c11fe
diff --git a/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch b/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch
deleted file mode 100644
index 09b345e8bc97..000000000000
--- a/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch
+++ /dev/null
@@ -1,329 +0,0 @@
-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/puppet-fix-tests-4.7.0.patch b/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch
deleted file mode 100644
index 7d62e0c1f786..000000000000
--- a/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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.init b/app-admin/puppet/files/puppet.init
deleted file mode 100644
index d30367ad3fb2..000000000000
--- a/app-admin/puppet/files/puppet.init
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/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/puppetmaster.init b/app-admin/puppet/files/puppetmaster.init
deleted file mode 100644
index 687003752329..000000000000
--- a/app-admin/puppet/files/puppetmaster.init
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/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/metadata.xml b/app-admin/puppet/metadata.xml
index e6af7c47ff3b..1bc7eb60719d 100644
--- a/app-admin/puppet/metadata.xml
+++ b/app-admin/puppet/metadata.xml
@@ -35,6 +35,5 @@
<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.12.ebuild b/app-admin/puppet/puppet-4.10.12.ebuild
deleted file mode 100644
index 7e3b54d90ab3..000000000000
--- a/app-admin/puppet/puppet-4.10.12.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# 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 eutils user ruby-fakegem versionator
-
-DESCRIPTION="A system automation and configuration management software."
-HOMEPAGE="https://puppet.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
-# )"
-
-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() {
- :
-}
-
-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
-
- 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
-}