openvox 9.0.0.pre.alpha2 → 9.0.0.pre.beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +56 -1
- data/Gemfile +2 -2
- data/lib/puppet/defaults.rb +4 -35
- data/lib/puppet/functions/regsubst.rb +1 -13
- data/lib/puppet/generate/type.rb +5 -1
- data/lib/puppet/graph/simple_graph.rb +1 -1
- data/lib/puppet/http/service.rb +18 -0
- data/lib/puppet/module_tool/metadata.rb +1 -1
- data/lib/puppet/pal/pal_impl.rb +0 -24
- data/lib/puppet/pops/serialization/to_data_converter.rb +1 -1
- data/lib/puppet/provider/package/pacman.rb +1 -1
- data/lib/puppet/resource/type.rb +8 -8
- data/lib/puppet/settings/base_setting.rb +1 -1
- data/lib/puppet/settings.rb +1 -41
- data/lib/puppet/ssl/certificate.rb +4 -0
- data/lib/puppet/ssl/state_machine.rb +6 -0
- data/lib/puppet/transaction.rb +1 -1
- data/lib/puppet/type/file/ensure.rb +14 -5
- data/lib/puppet/type/file/source.rb +1 -7
- data/lib/puppet/util/tag_set.rb +1 -1
- data/lib/puppet/util.rb +6 -1
- data/lib/puppet/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce0f85e1980517f7be9a5e3e6308b94140de11733c1a39ed07ab30cbca804e5d
|
|
4
|
+
data.tar.gz: b2c717b84df3a263e78c9a84016805944572f3b696221c548ab3eed6c48c525a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6d0c65c00dfed8d324c34ad12af907229ebfec1f62bd1bb26c25e236191d182756c22163c2e53e639c3ee6f23ccd172af8b2cffc114cb92b02e223117993e2b
|
|
7
|
+
data.tar.gz: ea2caa0bfe374d77c08b5a178b8b09ee76b4220c0bd939904c6e05c28adf3e2cfa5fbe275b758cd20e2f3596018263a8679796f89fc0d04f31efeb6276cebc37
|
data/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [9.0.0-alpha2](https://github.com/openvoxproject/openvox/tree/9.0.0-alpha2) (2026-07-14)
|
|
6
|
+
|
|
7
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.28.1...9.0.0-alpha2)
|
|
8
|
+
|
|
9
|
+
**Breaking changes:**
|
|
10
|
+
|
|
11
|
+
- More secure default server setting [\#536](https://github.com/OpenVoxProject/openvox/pull/536) ([corporate-gadfly](https://github.com/corporate-gadfly))
|
|
12
|
+
- Raise minimum Ruby version to 3.2.0 [\#442](https://github.com/OpenVoxProject/openvox/pull/442) ([silug](https://github.com/silug))
|
|
13
|
+
- Remove legacy PAL script eval APIs [\#393](https://github.com/OpenVoxProject/openvox/pull/393) ([silug](https://github.com/silug))
|
|
14
|
+
- Remove regsubst encoding argument [\#391](https://github.com/OpenVoxProject/openvox/pull/391) ([silug](https://github.com/silug))
|
|
15
|
+
- Remove pluginsync setting [\#389](https://github.com/OpenVoxProject/openvox/pull/389) ([silug](https://github.com/silug))
|
|
16
|
+
- Remove configprint setting [\#374](https://github.com/OpenVoxProject/openvox/pull/374) ([silug](https://github.com/silug))
|
|
17
|
+
|
|
18
|
+
**Fixed bugs:**
|
|
19
|
+
|
|
20
|
+
- Update ca\_last\_update/crl\_last\_update on HTTP 304 [\#524](https://github.com/OpenVoxProject/openvox/pull/524) ([bastelfreak](https://github.com/bastelfreak))
|
|
21
|
+
- Copy input mtime to files generated by puppet generate types [\#522](https://github.com/OpenVoxProject/openvox/pull/522) ([silug](https://github.com/silug))
|
|
22
|
+
- Tolerate concurrent creation of directories [\#506](https://github.com/OpenVoxProject/openvox/pull/506) ([Sharpie](https://github.com/Sharpie))
|
|
23
|
+
- Fix handling of Puppet::Pops serialization issues [\#502](https://github.com/OpenVoxProject/openvox/pull/502) ([seanmil](https://github.com/seanmil))
|
|
24
|
+
- Fix regex node lookup regression from PUP-11515 [\#481](https://github.com/OpenVoxProject/openvox/pull/481) ([corporate-gadfly](https://github.com/corporate-gadfly))
|
|
25
|
+
|
|
26
|
+
**Closed issues:**
|
|
27
|
+
|
|
28
|
+
- \[Deprecation\] Fine-Grained `filetimeout` Control [\#345](https://github.com/OpenVoxProject/openvox/issues/345)
|
|
29
|
+
|
|
30
|
+
**Merged pull requests:**
|
|
31
|
+
|
|
32
|
+
- CI: Speed up JRuby and Windows spec runs [\#525](https://github.com/OpenVoxProject/openvox/pull/525) ([silug](https://github.com/silug))
|
|
33
|
+
- Add arm64 support to acceptance [\#495](https://github.com/OpenVoxProject/openvox/pull/495) ([jpartlow](https://github.com/jpartlow))
|
|
34
|
+
- Remove filetimeout deprecation warning [\#419](https://github.com/OpenVoxProject/openvox/pull/419) ([silug](https://github.com/silug))
|
|
35
|
+
- Remove source\_permissions deprecation warning [\#418](https://github.com/OpenVoxProject/openvox/pull/418) ([silug](https://github.com/silug))
|
|
36
|
+
- add runtime deprecation warnings to Puppet::Util ENV wrappers [\#417](https://github.com/OpenVoxProject/openvox/pull/417) ([silug](https://github.com/silug))
|
|
37
|
+
|
|
38
|
+
## [8.28.1](https://github.com/openvoxproject/openvox/tree/8.28.1) (2026-07-07)
|
|
39
|
+
|
|
40
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/9.0.0-alpha2...8.28.1)
|
|
41
|
+
|
|
42
|
+
**Fixed bugs:**
|
|
43
|
+
|
|
44
|
+
- \[Bug\]: ca\_refresh\_interval is not respected — agent refreshes CA on every run when server responds 304 [\#435](https://github.com/OpenVoxProject/openvox/issues/435)
|
|
45
|
+
- \[Bug\]: Puppet 8 introduced a regex node definition regression [\#14](https://github.com/OpenVoxProject/openvox/issues/14)
|
|
46
|
+
|
|
47
|
+
**Closed issues:**
|
|
48
|
+
|
|
49
|
+
- \[Deprecation\] `Puppet::SSL::Certificate` Class [\#344](https://github.com/OpenVoxProject/openvox/issues/344)
|
|
50
|
+
- \[Deprecation\] PAL Script Evaluation APIs [\#343](https://github.com/OpenVoxProject/openvox/issues/343)
|
|
51
|
+
- \[Deprecation\] `source_permissions` File Parameter [\#340](https://github.com/OpenVoxProject/openvox/issues/340)
|
|
52
|
+
- \[Deprecation\] `pluginsync` Setting [\#339](https://github.com/OpenVoxProject/openvox/issues/339)
|
|
53
|
+
- \[Deprecation\] `configprint` Setting [\#337](https://github.com/OpenVoxProject/openvox/issues/337)
|
|
54
|
+
- \[Deprecation\] `regsubst()` Encoding Argument [\#336](https://github.com/OpenVoxProject/openvox/issues/336)
|
|
55
|
+
|
|
5
56
|
## [9.0.0-alpha2](https://github.com/openvoxproject/openvox/tree/9.0.0-alpha2) (2026-06-10)
|
|
6
57
|
|
|
7
|
-
[Full Changelog](https://github.com/openvoxproject/openvox/compare/
|
|
58
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.28.0...9.0.0-alpha2)
|
|
8
59
|
|
|
9
60
|
**Breaking changes:**
|
|
10
61
|
|
|
@@ -27,6 +78,10 @@ All notable changes to this project will be documented in this file.
|
|
|
27
78
|
- CI: Use bot account for backports [\#472](https://github.com/OpenVoxProject/openvox/pull/472) ([bastelfreak](https://github.com/bastelfreak))
|
|
28
79
|
- Add JRuby 10.0.5.0 and 10.1.0.0 to test matrix [\#463](https://github.com/OpenVoxProject/openvox/pull/463) ([silug](https://github.com/silug))
|
|
29
80
|
|
|
81
|
+
## [8.28.0](https://github.com/openvoxproject/openvox/tree/8.28.0) (2026-06-10)
|
|
82
|
+
|
|
83
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/9.0.0-alpha1...8.28.0)
|
|
84
|
+
|
|
30
85
|
## [9.0.0-alpha1](https://github.com/openvoxproject/openvox/tree/9.0.0-alpha1) (2026-05-20)
|
|
31
86
|
|
|
32
87
|
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.27.0...9.0.0-alpha1)
|
data/Gemfile
CHANGED
|
@@ -45,11 +45,11 @@ end
|
|
|
45
45
|
group(:test) do
|
|
46
46
|
# 1.16.0 - 1.16.2 are broken on Windows
|
|
47
47
|
gem 'ffi', '>= 1.15.5', '< 2', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2', require: false
|
|
48
|
-
gem "json-schema", '>= 2', '<
|
|
48
|
+
gem "json-schema", '>= 2', '< 7', require: false
|
|
49
49
|
gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 13.0')
|
|
50
50
|
gem "rspec", "~> 3.1", require: false
|
|
51
51
|
gem "rspec-expectations", ["~> 3.9", "!= 3.9.3"]
|
|
52
|
-
gem "rspec-its", "~>
|
|
52
|
+
gem "rspec-its", "~> 2.0", require: false
|
|
53
53
|
gem 'rspec-mocks', '< 3.13.3', require: false # breaking change afterwards: https://github.com/rspec/rspec-mocks/pull/1596
|
|
54
54
|
gem 'vcr', '~> 6.1', require: false
|
|
55
55
|
gem 'webmock', '~> 3.0', require: false
|
data/lib/puppet/defaults.rb
CHANGED
|
@@ -318,14 +318,6 @@ module Puppet
|
|
|
318
318
|
sense when specified on the command line as `--genmanifest`. Takes into account arguments specified
|
|
319
319
|
on the CLI.",
|
|
320
320
|
},
|
|
321
|
-
:configprint => {
|
|
322
|
-
:default => "",
|
|
323
|
-
:deprecated => :completely,
|
|
324
|
-
:desc => "Prints the value of a specific configuration setting. If the name of a
|
|
325
|
-
setting is provided for this, then the value is printed and puppet
|
|
326
|
-
exits. Comma-separate multiple values. For a list of all values,
|
|
327
|
-
specify 'all'. This setting is deprecated, the 'puppet config' command replaces this functionality.",
|
|
328
|
-
},
|
|
329
321
|
:color => {
|
|
330
322
|
:default => "ansi",
|
|
331
323
|
:type => :string,
|
|
@@ -694,21 +686,8 @@ module Puppet
|
|
|
694
686
|
:type => :duration,
|
|
695
687
|
:desc => "The minimum time to wait between checking for updates in
|
|
696
688
|
configuration files. This timeout determines how quickly Puppet checks whether
|
|
697
|
-
a file (such as manifests or puppet.conf) has changed on disk.
|
|
698
|
-
|
|
699
|
-
service to pick up changes to its internal configuration. Currently we do not
|
|
700
|
-
accept a value of 'unlimited'. To reparse files within an environment in
|
|
701
|
-
Puppet Server please use the environment_cache endpoint",
|
|
702
|
-
:hook => proc do |val|
|
|
703
|
-
unless [0, 15, '15s'].include?(val)
|
|
704
|
-
Puppet.deprecation_warning(<<-WARNING)
|
|
705
|
-
Fine grained control of filetimeouts is deprecated. In future
|
|
706
|
-
releases this value will only determine if file content is cached.
|
|
707
|
-
|
|
708
|
-
Valid values are 0 (never cache) and 15 (15 second minimum wait time).
|
|
709
|
-
WARNING
|
|
710
|
-
end
|
|
711
|
-
end
|
|
689
|
+
a file (such as manifests or puppet.conf) has changed on disk. To reparse files
|
|
690
|
+
within an environment in Puppet Server please use the environment_cache endpoint",
|
|
712
691
|
},
|
|
713
692
|
:environment_timeout => {
|
|
714
693
|
:default => "0",
|
|
@@ -863,7 +842,7 @@ names.
|
|
|
863
842
|
**Note:** The list of alternate names is locked in when the server's
|
|
864
843
|
certificate is signed. If you need to change the list later, you can't just
|
|
865
844
|
change this setting; you also need to regenerate the certificate. For more
|
|
866
|
-
information on that process, see the
|
|
845
|
+
information on that process, see the
|
|
867
846
|
[cert regen docs](https://puppet.com/docs/puppet/latest/ssl_regenerate_certificates.html).
|
|
868
847
|
|
|
869
848
|
To see all the alternate names your servers are using, log into your CA server
|
|
@@ -1650,7 +1629,7 @@ EOT
|
|
|
1650
1629
|
:desc => "The root directory of devices' $confdir.",
|
|
1651
1630
|
},
|
|
1652
1631
|
:server => {
|
|
1653
|
-
:default =>
|
|
1632
|
+
:default => Puppet.features.root? ? 'puppet' : '', # use an empty string so dependent settings can resolve without crashing
|
|
1654
1633
|
:desc => "The primary Puppet server to which the Puppet agent should connect. This setting is ignored when `server_list` is specified.",
|
|
1655
1634
|
},
|
|
1656
1635
|
:server_list => {
|
|
@@ -2035,16 +2014,6 @@ EOT
|
|
|
2035
2014
|
is used for retrieval, so anything that is a valid file source can
|
|
2036
2015
|
be used here.",
|
|
2037
2016
|
},
|
|
2038
|
-
:pluginsync => {
|
|
2039
|
-
:default => true,
|
|
2040
|
-
:type => :boolean,
|
|
2041
|
-
:desc => "Whether plugins should be synced with the central server. This setting is
|
|
2042
|
-
deprecated.",
|
|
2043
|
-
:hook => proc { |_value|
|
|
2044
|
-
#TRANSLATORS 'pluginsync' is a setting and should not be translated
|
|
2045
|
-
Puppet.deprecation_warning(_("Setting 'pluginsync' is deprecated."))
|
|
2046
|
-
}
|
|
2047
|
-
},
|
|
2048
2017
|
:pluginsignore => {
|
|
2049
2018
|
:default => ".svn CVS .git .hg",
|
|
2050
2019
|
:desc => "What files to ignore when pulling down plugins.",
|
|
@@ -19,11 +19,7 @@ Puppet::Functions.create_function(:regsubst) do
|
|
|
19
19
|
# - *I* Ignore case in regexps
|
|
20
20
|
# - *M* Multiline regexps
|
|
21
21
|
# - *G* Global replacement; all occurrences of the regexp in each target string will be replaced. Without this, only the first occurrence will be replaced.
|
|
22
|
-
# @param encoding [Enum['N','E','S','U']]
|
|
23
|
-
# Deprecated and ignored parameter, included only for compatibility.
|
|
24
22
|
# @return [Array[String], String] The result of the substitution. Result type is the same as for the target parameter.
|
|
25
|
-
# @deprecated
|
|
26
|
-
# This method has the optional encoding parameter, which is ignored.
|
|
27
23
|
# @example Get the third octet from the node's IP address:
|
|
28
24
|
# ```puppet
|
|
29
25
|
# $i3 = regsubst($ipaddress,'^(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)$','\\3')
|
|
@@ -33,7 +29,6 @@ Puppet::Functions.create_function(:regsubst) do
|
|
|
33
29
|
param 'String', :pattern
|
|
34
30
|
param 'Variant[String,Hash[String,String]]', :replacement
|
|
35
31
|
optional_param 'Optional[Pattern[/^[GEIM]*$/]]', :flags
|
|
36
|
-
optional_param "Enum['N','E','S','U']", :encoding
|
|
37
32
|
end
|
|
38
33
|
|
|
39
34
|
# @param target [String, Array[String]]
|
|
@@ -65,14 +60,7 @@ Puppet::Functions.create_function(:regsubst) do
|
|
|
65
60
|
optional_param 'Pattern[/^G?$/]', :flags
|
|
66
61
|
end
|
|
67
62
|
|
|
68
|
-
def regsubst_string(target, pattern, replacement, flags = nil
|
|
69
|
-
if encoding
|
|
70
|
-
Puppet.warn_once(
|
|
71
|
-
'deprecations', 'regsubst_function_encoding',
|
|
72
|
-
_("The regsubst() function's encoding argument has been ignored since Ruby 1.9 and will be removed in a future release")
|
|
73
|
-
)
|
|
74
|
-
end
|
|
75
|
-
|
|
63
|
+
def regsubst_string(target, pattern, replacement, flags = nil)
|
|
76
64
|
re_flags = 0
|
|
77
65
|
operation = :sub
|
|
78
66
|
unless flags.nil?
|
data/lib/puppet/generate/type.rb
CHANGED
|
@@ -45,11 +45,14 @@ module Puppet
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# Determines if the output file is up-to-date with respect to the input file.
|
|
48
|
+
# Generated files are stamped with their input's mtime, so the output is
|
|
49
|
+
# up-to-date only on an exact match; an input with older timestamps (e.g.
|
|
50
|
+
# a module downgrade) also triggers regeneration.
|
|
48
51
|
# @param [String, nil] The path to output to, or nil if determined by input
|
|
49
52
|
# @return [Boolean] Returns true if the output is up-to-date or false if not.
|
|
50
53
|
def up_to_date?(outputdir)
|
|
51
54
|
f = effective_output_path(outputdir)
|
|
52
|
-
Puppet::FileSystem.exist?(f) && (Puppet::FileSystem.stat(@path) <=> Puppet::FileSystem.stat(f))
|
|
55
|
+
Puppet::FileSystem.exist?(f) && (Puppet::FileSystem.stat(@path) <=> Puppet::FileSystem.stat(f)) == 0
|
|
53
56
|
end
|
|
54
57
|
|
|
55
58
|
# Gets the filename of the output file.
|
|
@@ -240,6 +243,7 @@ module Puppet
|
|
|
240
243
|
Puppet::FileSystem.open(effective_output_path, nil, 'w:UTF-8') do |file|
|
|
241
244
|
file.write(result)
|
|
242
245
|
end
|
|
246
|
+
Puppet::FileSystem.touch(effective_output_path, mtime: Puppet::FileSystem.stat(input.path).mtime)
|
|
243
247
|
rescue Exception => e
|
|
244
248
|
@bad_input = true
|
|
245
249
|
Puppet.log_exception(e, _("Failed to generate '%{effective_output_path}': %{message}") % { effective_output_path: effective_output_path, message: e.message })
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative '../../puppet/external/dot'
|
|
4
4
|
require_relative '../../puppet/relationship'
|
|
5
|
-
require 'set'
|
|
5
|
+
require 'set' # rubocop:disable Lint/RedundantRequireStatement
|
|
6
6
|
|
|
7
7
|
# A hopefully-faster graph class to replace the use of GRATR.
|
|
8
8
|
class Puppet::Graph::SimpleGraph
|
data/lib/puppet/http/service.rb
CHANGED
|
@@ -32,6 +32,24 @@ class Puppet::HTTP::Service
|
|
|
32
32
|
#
|
|
33
33
|
# @api private
|
|
34
34
|
def self.create_service(client, session, name, server = nil, port = nil)
|
|
35
|
+
# this is the entry point for creating all services, check and issue warning here.
|
|
36
|
+
unless Puppet.settings.set_by_config? :server
|
|
37
|
+
if Puppet.features.root?
|
|
38
|
+
Puppet.deprecation_warning('OpenVox will not default to `server=puppet` as of version 9.0. Please update your configuration appropriately.')
|
|
39
|
+
else
|
|
40
|
+
Puppet.deprecation_warning('OpenVox no longer defaults to `server=puppet` when running as a non-privileged user. (Did you mean to run as root?)')
|
|
41
|
+
|
|
42
|
+
case name
|
|
43
|
+
when :ca
|
|
44
|
+
raise ArgumentError, 'Neither `server` nor `ca_server` is specified.' unless Puppet.settings.set_by_config? :ca_server
|
|
45
|
+
when :report
|
|
46
|
+
raise ArgumentError, 'Neither `server` nor `report_server` is specified.' unless Puppet.settings.set_by_config? :report_server
|
|
47
|
+
when :fileserver, :puppet, :puppetserver
|
|
48
|
+
raise ArgumentError, 'Required setting `server` is not specified.'
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
35
53
|
case name
|
|
36
54
|
when :ca
|
|
37
55
|
Puppet::HTTP::Service::Ca.new(client, session, server, port)
|
|
@@ -4,7 +4,7 @@ require_relative '../../puppet/module_tool'
|
|
|
4
4
|
require_relative '../../puppet/network/format_support'
|
|
5
5
|
require 'uri'
|
|
6
6
|
require_relative '../../puppet/util/json'
|
|
7
|
-
require 'set'
|
|
7
|
+
require 'set' # rubocop:disable Lint/RedundantRequireStatement
|
|
8
8
|
|
|
9
9
|
module Puppet::ModuleTool
|
|
10
10
|
# This class provides a data structure representing a module's metadata.
|
data/lib/puppet/pal/pal_impl.rb
CHANGED
|
@@ -107,30 +107,6 @@ module Pal
|
|
|
107
107
|
Puppet[:code] = previous_code_value
|
|
108
108
|
end
|
|
109
109
|
|
|
110
|
-
# Evaluates a Puppet Language script string.
|
|
111
|
-
# @param code_string [String] a snippet of Puppet Language source code
|
|
112
|
-
# @return [Object] what the Puppet Language code_string evaluates to
|
|
113
|
-
# @deprecated Use {#with_script_compiler} and then evaluate_string on the given compiler - to be removed in 1.0 version
|
|
114
|
-
#
|
|
115
|
-
def self.evaluate_script_string(code_string)
|
|
116
|
-
# prevent the default loading of Puppet[:manifest] which is the environment's manifest-dir by default settings
|
|
117
|
-
# by setting code_string to 'undef'
|
|
118
|
-
with_script_compiler do |compiler|
|
|
119
|
-
compiler.evaluate_string(code_string)
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
# Evaluates a Puppet Language script (.pp) file.
|
|
124
|
-
# @param manifest_file [String] a file with Puppet Language source code
|
|
125
|
-
# @return [Object] what the Puppet Language manifest_file contents evaluates to
|
|
126
|
-
# @deprecated Use {#with_script_compiler} and then evaluate_file on the given compiler - to be removed in 1.0 version
|
|
127
|
-
#
|
|
128
|
-
def self.evaluate_script_manifest(manifest_file)
|
|
129
|
-
with_script_compiler do |compiler|
|
|
130
|
-
compiler.evaluate_file(manifest_file)
|
|
131
|
-
end
|
|
132
|
-
end
|
|
133
|
-
|
|
134
110
|
# Defines a context in which multiple operations in an env with a catalog producing compiler can be performed
|
|
135
111
|
# in a given block.
|
|
136
112
|
# The calls that takes place to PAL inside of the given block are all with the same instance of the compiler.
|
|
@@ -305,7 +305,7 @@ module Serialization
|
|
|
305
305
|
if tos.empty?
|
|
306
306
|
semantic = Puppet::Pops::SemanticError.new(issue, nil, EMPTY_HASH)
|
|
307
307
|
else
|
|
308
|
-
file, line = stacktrace
|
|
308
|
+
file, line = Puppet::Pops::PuppetStack.stacktrace
|
|
309
309
|
semantic = Puppet::Pops::SemanticError.new(issue, nil, { :file => file, :line => line })
|
|
310
310
|
end
|
|
311
311
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative '../../../puppet/provider/package'
|
|
4
|
-
require 'set'
|
|
4
|
+
require 'set' # rubocop:disable Lint/RedundantRequireStatement
|
|
5
5
|
require 'uri'
|
|
6
6
|
|
|
7
7
|
Puppet::Type.type(:package).provide :pacman, :parent => Puppet::Provider::Package do
|
data/lib/puppet/resource/type.rb
CHANGED
|
@@ -34,13 +34,13 @@ class Puppet::Resource::Type
|
|
|
34
34
|
EMPTY_ARRAY = [].freeze
|
|
35
35
|
|
|
36
36
|
LOOKAROUND_OPERATORS = {
|
|
37
|
-
"(" => '
|
|
38
|
-
"?" => "
|
|
39
|
-
"<" => "
|
|
40
|
-
">" => "
|
|
41
|
-
"!" => "
|
|
42
|
-
"=" => "
|
|
43
|
-
")" => '
|
|
37
|
+
"(" => 'lp',
|
|
38
|
+
"?" => "qu",
|
|
39
|
+
"<" => "lt",
|
|
40
|
+
">" => "gt",
|
|
41
|
+
"!" => "ex",
|
|
42
|
+
"=" => "eq",
|
|
43
|
+
")" => 'rp'
|
|
44
44
|
}.freeze
|
|
45
45
|
|
|
46
46
|
attr_accessor :file, :line, :doc, :code, :parent, :resource_type_collection, :override
|
|
@@ -206,7 +206,7 @@ class Puppet::Resource::Type
|
|
|
206
206
|
|
|
207
207
|
def name
|
|
208
208
|
if type == :node && name_is_regex?
|
|
209
|
-
# Normalize
|
|
209
|
+
# Normalize lookaround regex pattern to a unique, lookup-safe lowercase string.
|
|
210
210
|
internal_name = @name.source.downcase.gsub(/\(\?[^)]*\)/) do |str|
|
|
211
211
|
str.gsub(/./) { |ch| LOOKAROUND_OPERATORS[ch] || ch }
|
|
212
212
|
end
|
data/lib/puppet/settings.rb
CHANGED
|
@@ -512,45 +512,6 @@ class Puppet::Settings
|
|
|
512
512
|
@config.include?(name)
|
|
513
513
|
end
|
|
514
514
|
|
|
515
|
-
# Prints the contents of a config file with the available config settings, or it
|
|
516
|
-
# prints a single value of a config setting.
|
|
517
|
-
def print_config_options
|
|
518
|
-
if Puppet::Util::Log.sendlevel?(:info)
|
|
519
|
-
Puppet::Util::Log.newdestination(:console)
|
|
520
|
-
message = _("Using --configprint is deprecated. Use 'puppet config <subcommand>' instead.")
|
|
521
|
-
Puppet.deprecation_warning(message)
|
|
522
|
-
end
|
|
523
|
-
|
|
524
|
-
env = value(:environment)
|
|
525
|
-
val = value(:configprint)
|
|
526
|
-
if val == "all"
|
|
527
|
-
hash = {}
|
|
528
|
-
each do |name, _obj|
|
|
529
|
-
val = value(name, env)
|
|
530
|
-
val = val.inspect if val == ""
|
|
531
|
-
hash[name] = val
|
|
532
|
-
end
|
|
533
|
-
hash.sort { |a, b| a[0].to_s <=> b[0].to_s }.each do |name, v|
|
|
534
|
-
puts "#{name} = #{v}"
|
|
535
|
-
end
|
|
536
|
-
else
|
|
537
|
-
val.split(/\s*,\s*/).sort.each do |v|
|
|
538
|
-
if include?(v)
|
|
539
|
-
# if there is only one value, just print it for back compatibility
|
|
540
|
-
if v == val
|
|
541
|
-
puts value(val, env)
|
|
542
|
-
break
|
|
543
|
-
end
|
|
544
|
-
puts "#{v} = #{value(v, env)}"
|
|
545
|
-
else
|
|
546
|
-
puts "invalid setting: #{v}"
|
|
547
|
-
return false
|
|
548
|
-
end
|
|
549
|
-
end
|
|
550
|
-
end
|
|
551
|
-
true
|
|
552
|
-
end
|
|
553
|
-
|
|
554
515
|
def generate_config
|
|
555
516
|
puts to_config
|
|
556
517
|
true
|
|
@@ -562,14 +523,13 @@ class Puppet::Settings
|
|
|
562
523
|
end
|
|
563
524
|
|
|
564
525
|
def print_configs
|
|
565
|
-
return print_config_options if value(:configprint) != ""
|
|
566
526
|
return generate_config if value(:genconfig)
|
|
567
527
|
|
|
568
528
|
generate_manifest if value(:genmanifest)
|
|
569
529
|
end
|
|
570
530
|
|
|
571
531
|
def print_configs?
|
|
572
|
-
(value(:
|
|
532
|
+
(value(:genconfig) || value(:genmanifest)) && true
|
|
573
533
|
end
|
|
574
534
|
|
|
575
535
|
# The currently configured run mode that is preferred for constructing the application configuration.
|
|
@@ -9,6 +9,10 @@ require_relative '../../puppet/ssl/base'
|
|
|
9
9
|
# the case).
|
|
10
10
|
#
|
|
11
11
|
# @deprecated Use {Puppet::SSL::SSLProvider} instead.
|
|
12
|
+
# This class and its associated helpers are still
|
|
13
|
+
# necessary as they enable FIPS-mode OpenVox Server
|
|
14
|
+
# to populate trusted data when `require 'openssl'`
|
|
15
|
+
# is not available.
|
|
12
16
|
class Puppet::SSL::Certificate < Puppet::SSL::Base
|
|
13
17
|
# This is defined from the base class
|
|
14
18
|
wraps OpenSSL::X509::Certificate
|
|
@@ -121,6 +121,10 @@ class Puppet::SSL::StateMachine
|
|
|
121
121
|
rescue Puppet::HTTP::ResponseError => e
|
|
122
122
|
if e.response.code == 304
|
|
123
123
|
Puppet.info(_("CA certificate is unmodified, using existing CA certificate"))
|
|
124
|
+
# 304 confirms the local CA is current, so reset the TTL.
|
|
125
|
+
# Otherwise ca_last_update (backed by ca.pem mtime) never advances
|
|
126
|
+
# past the initial download and needs_refresh? triggers on every run.
|
|
127
|
+
@cert_provider.ca_last_update = Time.now
|
|
124
128
|
else
|
|
125
129
|
Puppet.info(_("Failed to refresh CA certificate, using existing CA certificate: %{message}") % { message: e.message })
|
|
126
130
|
end
|
|
@@ -219,6 +223,8 @@ class Puppet::SSL::StateMachine
|
|
|
219
223
|
rescue Puppet::HTTP::ResponseError => e
|
|
220
224
|
if e.response.code == 304
|
|
221
225
|
Puppet.info(_("CRL is unmodified, using existing CRL"))
|
|
226
|
+
# 304 confirms the local CRL is current, so reset the TTL.
|
|
227
|
+
@cert_provider.crl_last_update = Time.now
|
|
222
228
|
else
|
|
223
229
|
Puppet.info(_("Failed to refresh CRL, using existing CRL: %{message}") % { message: e.message })
|
|
224
230
|
end
|
data/lib/puppet/transaction.rb
CHANGED
|
@@ -5,7 +5,7 @@ require_relative '../puppet/util/tagging'
|
|
|
5
5
|
require_relative '../puppet/util/skip_tags'
|
|
6
6
|
require_relative '../puppet/application'
|
|
7
7
|
require 'digest/sha1'
|
|
8
|
-
require 'set'
|
|
8
|
+
require 'set' # rubocop:disable Lint/RedundantRequireStatement
|
|
9
9
|
|
|
10
10
|
# the class that actually walks our resource/property tree, collects the changes,
|
|
11
11
|
# and performs them
|
|
@@ -86,12 +86,21 @@ module Puppet
|
|
|
86
86
|
raise Puppet::Error,
|
|
87
87
|
"Cannot create #{@resource[:path]}; parent directory #{parent} does not exist"
|
|
88
88
|
end
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
begin
|
|
90
|
+
if mode
|
|
91
|
+
Puppet::Util.withumask(0o00) do
|
|
92
|
+
Dir.mkdir(@resource[:path], symbolic_mode_to_int(mode, 0o755, true))
|
|
93
|
+
end
|
|
94
|
+
else
|
|
95
|
+
Dir.mkdir(@resource[:path])
|
|
92
96
|
end
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
rescue Errno::EEXIST
|
|
98
|
+
# Another process may have created the directory concurrently. If it
|
|
99
|
+
# really is a directory now, treat that as success.
|
|
100
|
+
#
|
|
101
|
+
# Directory mode, and other properties, will be checked and enforced by
|
|
102
|
+
# the call to `property_fix`.
|
|
103
|
+
raise unless Puppet::FileSystem.directory?(@resource[:path])
|
|
95
104
|
end
|
|
96
105
|
@resource.send(:property_fix)
|
|
97
106
|
return :directory_created
|
|
@@ -368,13 +368,7 @@ module Puppet
|
|
|
368
368
|
defaultto :ignore
|
|
369
369
|
newvalues(:use, :use_when_creating, :ignore)
|
|
370
370
|
munge do |value|
|
|
371
|
-
value
|
|
372
|
-
if @resource.file && @resource.line && value != :ignore
|
|
373
|
-
# TRANSLATORS "source_permissions" is a parameter name and should not be translated
|
|
374
|
-
Puppet.puppet_deprecation_warning(_("The `source_permissions` parameter is deprecated. Explicitly set `owner`, `group`, and `mode`."), file: @resource.file, line: @resource.line)
|
|
375
|
-
end
|
|
376
|
-
|
|
377
|
-
value
|
|
371
|
+
value ? value.to_sym : :ignore
|
|
378
372
|
end
|
|
379
373
|
end
|
|
380
374
|
end
|
data/lib/puppet/util/tag_set.rb
CHANGED
data/lib/puppet/util.rb
CHANGED
|
@@ -44,6 +44,7 @@ module Util
|
|
|
44
44
|
# @deprecated Use ENV instead
|
|
45
45
|
# @api private
|
|
46
46
|
def get_env(name, mode = default_env)
|
|
47
|
+
Puppet.deprecation_warning(_("Puppet::Util.get_env is deprecated and will be removed in a future version. Use ENV[] directly instead."))
|
|
47
48
|
ENV.fetch(name, nil)
|
|
48
49
|
end
|
|
49
50
|
module_function :get_env
|
|
@@ -51,6 +52,7 @@ module Util
|
|
|
51
52
|
# @deprecated Use ENV instead
|
|
52
53
|
# @api private
|
|
53
54
|
def get_environment(mode = default_env)
|
|
55
|
+
Puppet.deprecation_warning(_("Puppet::Util.get_environment is deprecated and will be removed in a future version. Use ENV.to_hash directly instead."))
|
|
54
56
|
ENV.to_hash
|
|
55
57
|
end
|
|
56
58
|
module_function :get_environment
|
|
@@ -58,6 +60,7 @@ module Util
|
|
|
58
60
|
# @deprecated Use ENV instead
|
|
59
61
|
# @api private
|
|
60
62
|
def clear_environment(mode = default_env)
|
|
63
|
+
Puppet.deprecation_warning(_("Puppet::Util.clear_environment is deprecated and will be removed in a future version. Use ENV.clear directly instead."))
|
|
61
64
|
ENV.clear
|
|
62
65
|
end
|
|
63
66
|
module_function :clear_environment
|
|
@@ -65,6 +68,7 @@ module Util
|
|
|
65
68
|
# @deprecated Use ENV instead
|
|
66
69
|
# @api private
|
|
67
70
|
def set_env(name, value = nil, mode = default_env)
|
|
71
|
+
Puppet.deprecation_warning(_("Puppet::Util.set_env is deprecated and will be removed in a future version. Use ENV[]= directly instead."))
|
|
68
72
|
ENV[name] = value
|
|
69
73
|
end
|
|
70
74
|
module_function :set_env
|
|
@@ -72,7 +76,8 @@ module Util
|
|
|
72
76
|
# @deprecated Use ENV instead
|
|
73
77
|
# @api private
|
|
74
78
|
def merge_environment(env_hash, mode = default_env)
|
|
75
|
-
ENV.merge!
|
|
79
|
+
Puppet.deprecation_warning(_("Puppet::Util.merge_environment is deprecated and will be removed in a future version. Use ENV.merge! directly instead."))
|
|
80
|
+
ENV.merge!(env_hash.transform_keys(&:to_s))
|
|
76
81
|
end
|
|
77
82
|
module_function :merge_environment
|
|
78
83
|
|
data/lib/puppet/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openvox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.0.0.pre.
|
|
4
|
+
version: 9.0.0.pre.beta1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenVox Project
|
|
@@ -1359,14 +1359,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
1359
1359
|
requirements:
|
|
1360
1360
|
- - ">="
|
|
1361
1361
|
- !ruby/object:Gem::Version
|
|
1362
|
-
version: 3.
|
|
1362
|
+
version: 3.2.0
|
|
1363
1363
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1364
1364
|
requirements:
|
|
1365
1365
|
- - ">"
|
|
1366
1366
|
- !ruby/object:Gem::Version
|
|
1367
1367
|
version: 1.3.1
|
|
1368
1368
|
requirements: []
|
|
1369
|
-
rubygems_version: 4.0.
|
|
1369
|
+
rubygems_version: 4.0.16
|
|
1370
1370
|
specification_version: 4
|
|
1371
1371
|
summary: OpenVox, a community implementation of Puppet -- an automated configuration
|
|
1372
1372
|
management tool
|