Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/puppet/, app-admin/puppet/files/
Date: Mon, 17 Feb 2020 22:36:32
Message-Id: 1581978979.1c544caeae45b7f1a3fff9269a2e468afff1135c.prometheanfire@gentoo
1 commit: 1c544caeae45b7f1a3fff9269a2e468afff1135c
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 17 22:27:29 2020 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 17 22:36:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c544cae
7
8 app-admin/puppet: cleanup 4.x and move to infra-overlay
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
12
13 app-admin/puppet/Manifest | 1 -
14 .../43e2c935252b995134ce353e5e6312cf77aea480.patch | 329 ---------------------
15 .../puppet/files/puppet-fix-tests-4.7.0.patch | 18 --
16 app-admin/puppet/files/puppet.init | 40 ---
17 app-admin/puppet/files/puppetmaster.init | 37 ---
18 app-admin/puppet/metadata.xml | 1 -
19 app-admin/puppet/puppet-4.10.12.ebuild | 177 -----------
20 7 files changed, 603 deletions(-)
21
22 diff --git a/app-admin/puppet/Manifest b/app-admin/puppet/Manifest
23 index c79ffb7b7ba..ace06e379dd 100644
24 --- a/app-admin/puppet/Manifest
25 +++ b/app-admin/puppet/Manifest
26 @@ -1,4 +1,3 @@
27 -DIST puppet-4.10.12.tar.gz 3022218 BLAKE2B 03757857868b1544078ae5e40d6e438631c788f1b01a3e62ba90e477b754601d2c085228e084363ff20ee39728b02ebe8ca83e17f7c79dddae1c3968aef4e320 SHA512 ff7accf70b1d4de7282cf3b41246151c49c4758a41ace56a470e4723749638027011cf170747e66fa5812280e1612e754e12d92dd35fa6c93171f7187bb9cfa2
28 DIST puppet-5.5.17.tar.gz 3090402 BLAKE2B 7722ec4196ee766c29eddd7dc73539a4a5a0e4cc781a84af25210488328b5ae01178ca64e8eef14152cbeca06dc8fe145b5e39ce6a120d7689fc32cbbbe16f9f SHA512 95c6cd836a9f732ccfe2d8b83096e79c32428c43390c0826663f896ca1388e1fe3b55d93a5a7548831e95de85247db717866c36786d591e207341c734d70168b
29 DIST puppet-5.5.18.tar.gz 2984835 BLAKE2B d5a1d023d3d26e04ccc81efa772131c06fc7ace8ec59c7efa97bddb775bb492d3256290824a87d54df5c28862cbba98c58cf41bb4a0c27a4128701652c06eee0 SHA512 86f210ee783ca36340b22463cd4ac237d8dc1c6a35526530af0696bb3f0373b0b22f690d3e3f8e31655ea182a33eb60b66b5826bd6c4d1b0059a8e46152416e6
30 DIST puppet-6.12.0.tar.gz 2825392 BLAKE2B fdb7007ca337654f5ee89cd6f3beae300c3eb952570eaf1aa9baad407b84b418916e42aed63855bbb250f1d367be12f98261df54253f6438d33950134ef01cce SHA512 bcb77699f4a4a058ea0fa47ee2b449f19053e3ae859e3e30c65a57ad65fc052a4f05d7a932b9cc4b9974b36dc343ac482258ad8d5a44a151362df474b82c11fe
31
32 diff --git a/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch b/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch
33 deleted file mode 100644
34 index 09b345e8bc9..00000000000
35 --- a/app-admin/puppet/files/43e2c935252b995134ce353e5e6312cf77aea480.patch
36 +++ /dev/null
37 @@ -1,329 +0,0 @@
38 -diff --git a/lib/puppet/provider/package/portage.rb b/lib/puppet/provider/package/portage.rb
39 -index 374667c..12160c6 100644
40 ---- a/lib/puppet/provider/package/portage.rb
41 -+++ b/lib/puppet/provider/package/portage.rb
42 -@@ -2,14 +2,19 @@
43 - require 'fileutils'
44 -
45 - Puppet::Type.type(:package).provide :portage, :parent => Puppet::Provider::Package do
46 -- desc "Provides packaging support for Gentoo's portage system."
47 -+ desc "Provides packaging support for Gentoo's portage system.
48 -
49 -- has_features :versionable, :reinstallable
50 -+ This provider supports the `install_options` and `uninstall_options` attributes, which allows command-line
51 -+ flags to be passed to emerge. These options should be specified as a string (e.g. '--flag'), a hash
52 -+ (e.g. {'--flag' => 'value'}), or an array where each element is either a string or a hash."
53 -+
54 -+ has_features :install_options, :purgeable, :reinstallable, :uninstall_options, :versionable, :virtual_packages
55 -
56 - {
57 -- :emerge => "/usr/bin/emerge",
58 -- :eix => "/usr/bin/eix",
59 -- :update_eix => "/usr/bin/eix-update",
60 -+ :emerge => '/usr/bin/emerge',
61 -+ :eix => '/usr/bin/eix',
62 -+ :qatom_bin => '/usr/bin/qatom',
63 -+ :update_eix => '/usr/bin/eix-update',
64 - }.each_pair do |name, path|
65 - has_command(name, path) do
66 - environment :HOME => '/'
67 -@@ -24,15 +29,18 @@ def self.instances
68 - result_format = self.eix_result_format
69 - result_fields = self.eix_result_fields
70 -
71 -+ limit = self.eix_limit
72 - version_format = self.eix_version_format
73 - slot_versions_format = self.eix_slot_versions_format
74 -+ installed_versions_format = self.eix_installed_versions_format
75 -+ installable_versions_format = self.eix_install_versions_format
76 - begin
77 -- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
78 -+ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
79 - update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
80 -
81 - search_output = nil
82 -- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
83 -- search_output = eix *(self.eix_search_arguments + ["--installed"])
84 -+ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
85 -+ search_output = eix *(self.eix_search_arguments + ['--installed'])
86 - end
87 -
88 - packages = []
89 -@@ -57,65 +65,123 @@ def self.instances
90 -
91 - def install
92 - should = @resource.should(:ensure)
93 -- name = package_name
94 -- unless should == :present or should == :latest
95 -- # We must install a specific version
96 -- name = package_atom_with_version(should)
97 -+ cmd = %w{}
98 -+ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
99 -+ name = qatom[:pfx] + name if qatom[:pfx]
100 -+ name = name + '-' + qatom[:pv] if qatom[:pv]
101 -+ name = name + '-' + qatom[:pr] if qatom[:pr]
102 -+ name = name + qatom[:slot] if qatom[:slot]
103 -+ cmd << '--update' if [:latest].include?(should)
104 -+ cmd += install_options if @resource[:install_options]
105 -+ cmd << name
106 -+ emerge *cmd
107 -+ end
108 -+
109 -+ def uninstall
110 -+ should = @resource.should(:ensure)
111 -+ cmd = %w{--rage-clean}
112 -+ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
113 -+ name = qatom[:pfx] + name if qatom[:pfx]
114 -+ name = name + '-' + qatom[:pv] if qatom[:pv]
115 -+ name = name + '-' + qatom[:pr] if qatom[:pr]
116 -+ name = name + qatom[:slot] if qatom[:slot]
117 -+ cmd += uninstall_options if @resource[:uninstall_options]
118 -+ cmd << name
119 -+ if [:purged].include?(should)
120 -+ Puppet::Util.withenv :CONFIG_PROTECT => "-*" do
121 -+ emerge *cmd
122 -+ end
123 -+ else
124 -+ emerge *cmd
125 - end
126 -- emerge name
127 - end
128 -
129 -- # The common package name format.
130 -- def package_name
131 -- @resource[:category] ? "#{@resource[:category]}/#{@resource[:name]}" : @resource[:name]
132 -+ def reinstall
133 -+ self.install
134 - end
135 -
136 -- def package_name_without_slot
137 -- package_name.sub(self.class.slot_pattern, '')
138 -+ def update
139 -+ self.install
140 - end
141 -
142 -- def package_slot
143 -- if match = package_name.match(self.class.slot_pattern)
144 -- match[1]
145 -+ def qatom
146 -+ output_format = self.qatom_output_format
147 -+ result_format = self.qatom_result_format
148 -+ result_fields = self.qatom_result_fields
149 -+ @atom ||= begin
150 -+ search_output = nil
151 -+ package_info = {}
152 -+ # do the search
153 -+ search_output = qatom_bin *([@resource[:name], '--format', output_format])
154 -+ # verify if the search found anything
155 -+ match = result_format.match(search_output)
156 -+ if match
157 -+ result_fields.zip(match.captures) do |field, value|
158 -+ # some fields can be empty or (null) (if we are not passed a category in the package name for instance)
159 -+ if value == '(null)'
160 -+ package_info[field] = nil
161 -+ elsif !value or value.empty?
162 -+ package_info[field] = nil
163 -+ else
164 -+ package_info[field] = value
165 -+ end
166 -+ end
167 -+ end
168 -+ @atom = package_info
169 -+ rescue Puppet::ExecutionFailure => detail
170 -+ raise Puppet::Error.new(detail)
171 - end
172 - end
173 -
174 -- def package_atom_with_version(version)
175 -- if slot = package_slot
176 -- "=#{package_name_without_slot}-#{version}:#{package_slot}"
177 -- else
178 -- "=#{package_name}-#{version}"
179 -- end
180 -+ def qatom_output_format
181 -+ '"[%{CATEGORY}] [%{PN}] [%{PV}] [%[PR]] [%[SLOT]] [%[pfx]] [%[sfx]]"'
182 - end
183 -
184 -- def uninstall
185 -- emerge "--unmerge", package_name
186 -+ def qatom_result_format
187 -+ /^\"\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\](.*)\"$/
188 - end
189 -
190 -- def reinstall
191 -- self.install
192 -+ def qatom_result_fields
193 -+ [:category, :pn, :pv, :pr, :slot, :pfx, :sfx]
194 - end
195 -
196 -- def update
197 -- self.install
198 -+ def self.get_sets
199 -+ @sets ||= begin
200 -+ @sets = emerge *(['--list-sets'])
201 -+ end
202 - end
203 -
204 - def query
205 -+ limit = self.class.eix_limit
206 - result_format = self.class.eix_result_format
207 - result_fields = self.class.eix_result_fields
208 -
209 - version_format = self.class.eix_version_format
210 - slot_versions_format = self.class.eix_slot_versions_format
211 -- search_field = package_name_without_slot.count('/') > 0 ? "--category-name" : "--name"
212 -- search_value = package_name_without_slot
213 -+ installed_versions_format = self.class.eix_installed_versions_format
214 -+ installable_versions_format = self.class.eix_install_versions_format
215 -+ search_field = qatom[:category] ? '--category-name' : '--name'
216 -+ search_value = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
217 -+
218 -+ @eix_result ||= begin
219 -+ # package sets
220 -+ package_sets = []
221 -+ self.class.get_sets.each_line do |package_set|
222 -+ package_sets << package_set.to_s.strip
223 -+ end
224 -
225 -- begin
226 -- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
227 -+ if @resource[:name].match(/^@/)
228 -+ if package_sets.include?(@resource[:name][1..-1].to_s)
229 -+ return({:name => "#{@resource[:name]}", :ensure => '9999', :version_available => nil, :installed_versions => nil, :installable_versions => "9999,"})
230 -+ end
231 -+ end
232 -+
233 -+ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
234 - update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
235 -
236 - search_output = nil
237 -- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
238 -- search_output = eix *(self.class.eix_search_arguments + ["--exact",search_field,search_value])
239 -+ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
240 -+ search_output = eix *(self.class.eix_search_arguments + ['--exact',search_field,search_value])
241 - end
242 -
243 - packages = []
244 -@@ -127,10 +193,19 @@ def query
245 - result_fields.zip(match.captures) do |field, value|
246 - package[field] = value unless !value or value.empty?
247 - end
248 -- if package_slot
249 -- package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], package_slot)
250 -- package[:ensure] = eix_get_version_for_slot(package[:installed_slots], package_slot)
251 -+ # 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
252 -+ # version_available is what we CAN install / update to
253 -+ # ensure is what is currently installed
254 -+ # This DOES NOT choose to install/upgrade or not, just provides current info
255 -+ # prefer checking versions to slots as versions are finer grained
256 -+ if qatom[:pv]
257 -+ package[:version_available] = eix_get_version_for_versions(package[:installable_versions], qatom[:pv])
258 -+ package[:ensure] = eix_get_version_for_versions(package[:installed_versions], qatom[:pv])
259 -+ elsif qatom[:slot]
260 -+ package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], qatom[:slot])
261 -+ package[:ensure] = eix_get_version_for_slot(package[:installed_slots], qatom[:slot])
262 - end
263 -+
264 - package[:ensure] = package[:ensure] ? package[:ensure] : :absent
265 - packages << package
266 - end
267 -@@ -138,10 +213,9 @@ def query
268 -
269 - case packages.size
270 - when 0
271 -- not_found_value = "#{@resource[:category] ? @resource[:category] : "<unspecified category>"}/#{@resource[:name]}"
272 -- raise Puppet::Error.new("No package found with the specified name [#{not_found_value}]")
273 -+ raise Puppet::Error.new("No package found with the specified name [#{@resource[:name]}]")
274 - when 1
275 -- return packages[0]
276 -+ @eix_result = packages[0]
277 - else
278 - raise Puppet::Error.new("More than one package with the specified name [#{search_value}], please use the category parameter to disambiguate")
279 - end
280 -@@ -155,39 +229,73 @@ def latest
281 - end
282 -
283 - private
284 -+ def eix_get_version_for_versions(versions, target)
285 -+ # [2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] 3.5.2
286 -+ return nil if versions.nil?
287 -+ versions = versions.split(',')
288 -+ # [2.7.10-r1 2.7.12 3.4.3-r1 3.4.5 3.5.2]
289 -+ versions.find { |version| version == target }
290 -+ # 3.5.2
291 -+ end
292 -+
293 -+ private
294 - def eix_get_version_for_slot(versions_and_slots, slot)
295 -+ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5] 3.5
296 - return nil if versions_and_slots.nil?
297 -- versions_and_slots = versions_and_slots.split(",")
298 -- versions_and_slots.map! { |version_and_slot| version_and_slot.split(":") }
299 -- version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot }
300 -+ versions_and_slots = versions_and_slots.split(',')
301 -+ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5]
302 -+ versions_and_slots.map! { |version_and_slot| version_and_slot.split(':') }
303 -+ # [2.7.12: 2.7
304 -+ # 3.4.5: 3.4
305 -+ # 3.5.2: 3.5]
306 -+ version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot[1..-1] }
307 -+ # [3.5.2: 3.5]
308 - version_for_slot.first if version_for_slot
309 -- end
310 --
311 -- def self.slot_pattern
312 -- /:([\w+.\/*=-]+)$/
313 -+ # 3.5.2
314 - end
315 -
316 - def self.eix_search_format
317 -- "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
318 -+ "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<installedversions:INSTALLEDVERSIONS>] [<availableversions:STABLEVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
319 - end
320 -
321 - def self.eix_result_format
322 -- /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
323 -+ /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
324 - end
325 -
326 - def self.eix_result_fields
327 -- [:category, :name, :ensure, :version_available, :installed_slots, :slot_versions_available, :vendor, :description]
328 -+ # 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]
329 -+ [:category, :name, :ensure, :version_available, :installed_slots, :installed_versions, :installable_versions, :slot_versions_available, :vendor, :description]
330 - end
331 -
332 - def self.eix_version_format
333 -- "{last}<version>{}"
334 -+ '{last}<version>{}'
335 - end
336 -
337 - def self.eix_slot_versions_format
338 -- "{!first},{}<version>:<slot>"
339 -+ '{!first},{}<version>:<slot>'
340 -+ end
341 -+
342 -+ def self.eix_installed_versions_format
343 -+ '{!first},{}<version>'
344 -+ end
345 -+
346 -+ def self.eix_install_versions_format
347 -+ '{!first}{!last},{}{}{isstable}<version>{}'
348 -+ end
349 -+
350 -+ def self.eix_limit
351 -+ '0'
352 - end
353 -
354 - def self.eix_search_arguments
355 -- ["--nocolor", "--pure-packages", "--format",self.eix_search_format]
356 -+ ['--nocolor', '--pure-packages', '--format', self.eix_search_format]
357 -+ end
358 -+
359 -+ def install_options
360 -+ join_options(@resource[:install_options])
361 -+ end
362 -+
363 -+ def uninstall_options
364 -+ join_options(@resource[:uninstall_options])
365 - end
366 - end
367
368 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
369 deleted file mode 100644
370 index 7d62e0c1f78..00000000000
371 --- a/app-admin/puppet/files/puppet-fix-tests-4.7.0.patch
372 +++ /dev/null
373 @@ -1,18 +0,0 @@
374 ---- spec/unit/network/http/api/indirected_routes_spec.rb 2016-10-11 13:24:09.500955469 -0500
375 -+++ spec/unit/network/http/api/indirected_routes_spec.rb.new 2016-10-11 13:24:00.501700977 -0500
376 -@@ -139,15 +139,6 @@
377 - indirection, _, _, _ = handler.uri2indirection("GET", uri_escaped, params)
378 - end
379 -
380 -- it "should not pass through an environment to check_authorization and fail if the environment is unknown" do
381 -- handler.expects(:check_authorization).with(anything,
382 -- anything,
383 -- Not(has_entry(:environment)))
384 -- expect(lambda { handler.uri2indirection("GET",
385 -- "#{master_url_prefix}/node/bar",
386 -- {:environment => 'bogus'}) }).to raise_error(not_found_error)
387 -- end
388 --
389 - it "should not URI unescape the indirection key as passed through to a call to check_authorization" do
390 - handler.expects(:check_authorization).with(anything,
391 - anything,
392
393 diff --git a/app-admin/puppet/files/puppet.init b/app-admin/puppet/files/puppet.init
394 deleted file mode 100644
395 index d30367ad3fb..00000000000
396 --- a/app-admin/puppet/files/puppet.init
397 +++ /dev/null
398 @@ -1,40 +0,0 @@
399 -#!/sbin/openrc-run
400 -# Copyright 1999-2010 Gentoo Foundation
401 -# Distributed under the terms of the GNU General Public License v2
402 -
403 -depend() {
404 - need localmount net
405 - use dns logger puppetmaster netmount nfsmount
406 -}
407 -
408 -checkconfig() {
409 - if [ ! -d "${PUPPET_PID_DIR}" ] ; then
410 - eerror "Please make sure PUPPET_PID_DIR is defined and points to a existing directory"
411 - return 1
412 - fi
413 -
414 - return 0
415 -}
416 -
417 -start() {
418 - checkconfig || return $?
419 -
420 - local options=""
421 - [ -n "${PUPPET_EXTRA_OPTS}" ] && options="${options} ${PUPPET_EXTRA_OPTS}"
422 -
423 - ebegin "Starting puppet"
424 - start-stop-daemon --start --quiet \
425 - --pidfile "${PUPPET_PID_DIR}/agent.pid" \
426 - --exec /usr/bin/puppetd -- ${options}
427 - eend $? "Failed to start puppet"
428 -}
429 -
430 -stop() {
431 - ebegin "Stopping puppet"
432 - start-stop-daemon --stop --quiet \
433 - --pidfile "${PUPPET_PID_DIR}/agent.pid"
434 - local ret=$?
435 - eend ${ret} "Failed to stop puppet"
436 - rm -f "${PUPPET_PID_DIR}/agent.pid"
437 - return ${ret}
438 -}
439
440 diff --git a/app-admin/puppet/files/puppetmaster.init b/app-admin/puppet/files/puppetmaster.init
441 deleted file mode 100644
442 index 68700375232..00000000000
443 --- a/app-admin/puppet/files/puppetmaster.init
444 +++ /dev/null
445 @@ -1,37 +0,0 @@
446 -#!/sbin/openrc-run
447 -# Copyright 1999-2013 Gentoo Foundation
448 -# Distributed under the terms of the GNU General Public License v2
449 -
450 -if [ "${SVCNAME}" = "puppetmaster" ] ; then
451 - PUPPETMASTER_PID="master"
452 -else
453 - PUPPETMASTER_PID="${SVCNAME#*.}"
454 -fi
455 -PUPPETMASTER_PID_DIR="${PUPPETMASTER_PID_DIR:-/var/run/puppet}"
456 -pidfile="${PUPPETMASTER_PID_DIR}/${PUPPETMASTER_PID}.pid"
457 -PUPPET_LOG_DIR="/var/log/puppet"
458 -
459 -command_args="master --pidfile ${pidfile} ${PUPPETMASTER_EXTRA_OPTS}"
460 -if [ -n "${PUPPETMASTER_PORT}" ] ; then
461 - command_args="${command_args} --masterport ${PUPPETMASTER_PORT}"
462 -fi
463 -
464 -command="/usr/bin/puppet"
465 -extra_started_commands="reload"
466 -
467 -depend() {
468 - need localmount
469 - use dns logger slapd netmount nfsmount
470 -}
471 -
472 -start_pre() {
473 - checkpath --directory --owner puppet:puppet "${PUPPETMASTER_PID_DIR}"
474 - checkpath --directory --owner puppet:puppet --mode 750 ${PUPPET_LOG_DIR}
475 - checkpath --file --owner puppet:puppet --mode 640 "${PUPPET_LOG_DIR}/masterhttp.log"
476 -}
477 -
478 -reload() {
479 - ebegin "Reloading ${SVCNAME}"
480 - start-stop-daemon --signal HUP --pidfile "${pidfile}"
481 - eend $? "Failed to stop ${SVCNAME}"
482 -}
483
484 diff --git a/app-admin/puppet/metadata.xml b/app-admin/puppet/metadata.xml
485 index e6af7c47ff3..1bc7eb60719 100644
486 --- a/app-admin/puppet/metadata.xml
487 +++ b/app-admin/puppet/metadata.xml
488 @@ -35,6 +35,5 @@
489 <flag name="diff">Enable diff support</flag>
490 <flag name="rrdtool">Enable rrdtool support</flag>
491 <flag name="shadow">Enable shadow support</flag>
492 - <flag name="experimental">Add patches for things in testing</flag>
493 </use>
494 </pkgmetadata>
495
496 diff --git a/app-admin/puppet/puppet-4.10.12.ebuild b/app-admin/puppet/puppet-4.10.12.ebuild
497 deleted file mode 100644
498 index 7e3b54d90ab..00000000000
499 --- a/app-admin/puppet/puppet-4.10.12.ebuild
500 +++ /dev/null
501 @@ -1,177 +0,0 @@
502 -# Copyright 1999-2019 Gentoo Authors
503 -# Distributed under the terms of the GNU General Public License v2
504 -
505 -EAPI="6"
506 -
507 -USE_RUBY="ruby23 ruby24"
508 -
509 -#RUBY_FAKEGEM_RECIPE_TEST="rspec3"
510 -
511 -RUBY_FAKEGEM_EXTRAINSTALL="locales"
512 -
513 -inherit eutils user ruby-fakegem versionator
514 -
515 -DESCRIPTION="A system automation and configuration management software."
516 -HOMEPAGE="https://puppet.com/"
517 -SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
518 -
519 -LICENSE="Apache-2.0 GPL-2"
520 -SLOT="0"
521 -KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 x86"
522 -IUSE="augeas diff doc emacs experimental ldap rrdtool selinux shadow sqlite vim-syntax xemacs"
523 -RESTRICT="test"
524 -
525 -ruby_add_rdepend "
526 - >=dev-ruby/gettext-setup-0.10:0
527 - >=dev-ruby/hiera-2.0
528 - >=dev-ruby/locale-2.1
529 - >=dev-ruby/rgen-0.6.5
530 - dev-ruby/json:=
531 - >=dev-ruby/facter-3.0.0
532 - augeas? ( dev-ruby/ruby-augeas )
533 - diff? ( dev-ruby/diff-lcs )
534 - doc? ( dev-ruby/rdoc )
535 - ldap? ( dev-ruby/ruby-ldap )
536 - shadow? ( dev-ruby/ruby-shadow )
537 - sqlite? ( dev-ruby/sqlite3 )
538 - virtual/ruby-ssl"
539 -
540 -# ruby_add_bdepend "
541 -# test? (
542 -# dev-ruby/mocha:0.14
543 -# =dev-ruby/rack-1*
544 -# dev-ruby/rspec-its
545 -# dev-ruby/rspec-collection_matchers
546 -# >=dev-ruby/vcr-2.9:2
547 -# >=dev-ruby/webmock-1.24:0
548 -# )"
549 -
550 -RDEPEND+=" ${RDEPEND}
551 - rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
552 - selinux? (
553 - sys-libs/libselinux[ruby]
554 - sec-policy/selinux-puppet
555 - )
556 - vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
557 - >=app-portage/eix-0.18.0"
558 -PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
559 -
560 -SITEFILE="50${PN}-mode-gentoo.el"
561 -
562 -pkg_setup() {
563 - enewgroup puppet
564 - enewuser puppet -1 -1 /var/lib/puppet puppet
565 -}
566 -
567 -all_ruby_prepare() {
568 - # Avoid spec that require unpackaged json-schema.
569 - rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
570 -
571 - # can't be run within portage.
572 - epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch"
573 -
574 - # fix systemd path
575 - epatch "${FILESDIR}/puppet-systemd.patch"
576 -
577 - if use experimental; then
578 - epatch "${FILESDIR}/43e2c935252b995134ce353e5e6312cf77aea480.patch"
579 - fi
580 -
581 - # Use working version of mocha
582 - sed -i -e '1igem "mocha", "~>0.14.0"; gem "rack", "~>1.0"' spec/spec_helper.rb || die
583 -
584 - # Avoid specs that can only run in the puppet.git repository. This
585 - # should be narrowed down to the specific specs.
586 - rm spec/integration/parser/compiler_spec.rb || die
587 -
588 - # Avoid failing specs that need further investigation.
589 - sed -i -e '/should resolve external facts/,/^ end/ s:^:#:' \
590 - spec/integration/indirector/facts/facter_spec.rb || die
591 - sed -i -e "/describe 'cfacter'/,/^ end/ s:^:#:" spec/unit/defaults_spec.rb || die
592 - rm -f spec/unit/indirector/ldap_spec.rb \
593 - spec/unit/parser/functions/create_resources_spec.rb || die
594 -
595 - # Avoid specs that rely on tools from other OSs
596 - rm -f spec/unit/provider/package/{dnf,tdnf,yum}_spec.rb \
597 - spec/unit/provider/user/directoryservice_spec.rb || die
598 -
599 - # Avoid specs that depend on hiera-eyaml to avoid circular
600 - # dependencies
601 - rm -f spec/unit/functions/lookup_spec.rb || die
602 -
603 - # Avoid specs that fail due to an unpackaged file
604 - sed -i -e '/when loading pp resource types using auto loading/,/^ end/ s:^:#:' spec/unit/pops/loaders/loaders_spec.rb || die
605 -}
606 -
607 -all_ruby_compile() {
608 - :
609 -}
610 -
611 -each_ruby_install() {
612 - each_fakegem_install
613 -# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
614 -}
615 -
616 -all_ruby_install() {
617 - all_fakegem_install
618 -
619 - # systemd stuffs
620 - insinto /usr/lib/systemd/system
621 - doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
622 -
623 - # tmpfiles stuff
624 - insinto /usr/lib/tmpfiles.d
625 - newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
626 -
627 - # openrc init stuff
628 - newinitd "${FILESDIR}"/puppet.init-4.x puppet
629 - newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
630 - newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
631 -
632 - keepdir /etc/puppetlabs/puppet/ssl
633 -
634 - keepdir /var/lib/puppet/facts
635 - keepdir /var/lib/puppet/files
636 - fowners -R puppet:puppet /var/lib/puppet
637 -
638 - fperms 0750 /var/lib/puppet
639 -
640 - fperms 0750 /etc/puppetlabs
641 - fperms 0750 /etc/puppetlabs/puppet
642 - fperms 0750 /etc/puppetlabs/puppet/ssl
643 - fowners -R :puppet /etc/puppetlabs
644 - fowners -R :puppet /var/lib/puppet
645 -
646 - if use ldap ; then
647 - insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
648 - fi
649 -
650 - # ext and examples files
651 - for f in $(find ext examples -type f) ; do
652 - docinto "$(dirname ${f})"; dodoc "${f}"
653 - done
654 -}
655 -
656 -pkg_postinst() {
657 - elog
658 - elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
659 - elog "cause puppet to hang while installing packages."
660 - elog
661 - elog "Portage Puppet module with Gentoo-specific resources:"
662 - elog "http://forge.puppetlabs.com/gentoo/portage"
663 - elog
664 -
665 - local v
666 - for v in ${REPLACING_VERSIONS}; do
667 - if [ "$(get_major_version $v)" = "3" ]; then
668 - elog
669 - elog "If you're upgrading from 3.x then please move everything in /etc/puppet to"
670 - elog "/etc/puppetlabs/puppet"
671 - elog "Also, puppet now uses config directories for modules and manifests."
672 - elog "See https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_agent.html"
673 - elog "and https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_server.html"
674 - elog "for more information."
675 - elog
676 - fi
677 - done
678 -}