openvox 8.19.2 → 8.21.0
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 +38 -13
- data/Gemfile +4 -3
- data/README.md +3 -3
- data/Rakefile +7 -4
- data/install.rb +15 -54
- data/lib/puppet/configurer.rb +13 -12
- data/lib/puppet/face/facts.rb +9 -1
- data/lib/puppet/version.rb +1 -1
- data/tasks/vox.rake +23 -0
- metadata +20 -26
- data/tasks/tag.rake +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5350747e91f48038164954b5b9a3d243900ce54fb8290454cce3b76cb5ce1198
|
4
|
+
data.tar.gz: 824f2f3091e878863fb0dd40a5eea4733f0e1d033bc667947a5a3defc028f12d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fd89223b530093afa90b6da3b7e11160525893cb76142fe0feae14cf9cfffd2892439c417f98fc3ee4f9484a501a18ea9e656be7093197a8217fdc2e65b6788
|
7
|
+
data.tar.gz: 875ebeba054f6adeb70baede78f3c41e7b5e6f2d616d083e427617f279714926d4403468a972bb5875a66d87d45e842d7a9bf4cc6e64148cca50e257ccf58c7a
|
data/CHANGELOG.md
CHANGED
@@ -2,36 +2,61 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
-
## [8.
|
5
|
+
## [8.21.0](https://github.com/openvoxproject/openvox/tree/8.21.0) (2025-07-09)
|
6
6
|
|
7
|
-
[Full Changelog](https://github.com/openvoxproject/
|
7
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.20.0...8.21.0)
|
8
|
+
|
9
|
+
**Implemented enhancements:**
|
10
|
+
|
11
|
+
- Remove facter from install.rb [\#147](https://github.com/OpenVoxProject/openvox/pull/147) ([ekohl](https://github.com/ekohl))
|
12
|
+
|
13
|
+
## [8.20.0](https://github.com/openvoxproject/openvox/tree/8.20.0) (2025-06-27)
|
14
|
+
|
15
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.19.2...8.20.0)
|
16
|
+
|
17
|
+
**Implemented enhancements:**
|
18
|
+
|
19
|
+
- Switch from facter to openfact [\#142](https://github.com/OpenVoxProject/openvox/pull/142) ([smortex](https://github.com/smortex))
|
20
|
+
- \(PUP-12083\) Update soft limit warning for fact value & name length [\#137](https://github.com/OpenVoxProject/openvox/pull/137) ([bastelfreak](https://github.com/bastelfreak))
|
21
|
+
|
22
|
+
**Fixed bugs:**
|
23
|
+
|
24
|
+
- Maintain consistent JSON formatting [\#132](https://github.com/OpenVoxProject/openvox/pull/132) ([bastelfreak](https://github.com/bastelfreak))
|
25
|
+
|
26
|
+
**Merged pull requests:**
|
27
|
+
|
28
|
+
- cleanup gem metadata after Perforce-\>OpenVoxProject migration [\#140](https://github.com/OpenVoxProject/openvox/pull/140) ([smortex](https://github.com/smortex))
|
29
|
+
|
30
|
+
## [8.19.2](https://github.com/openvoxproject/openvox/tree/8.19.2) (2025-06-06)
|
31
|
+
|
32
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.19.1...8.19.2)
|
8
33
|
|
9
34
|
**Fixed bugs:**
|
10
35
|
|
11
|
-
- server\_facts: Switch implementation-\>serverimplementation [\#107](https://github.com/OpenVoxProject/
|
12
|
-
- Reflect Ruby 3.4 stack trace changes [\#100](https://github.com/OpenVoxProject/
|
13
|
-
- Add base64 as gem dependencies for Ruby 3.4 [\#98](https://github.com/OpenVoxProject/
|
14
|
-
- Add racc gem dependency [\#89](https://github.com/OpenVoxProject/
|
36
|
+
- server\_facts: Switch implementation-\>serverimplementation [\#107](https://github.com/OpenVoxProject/openvox/pull/107) ([binford2k](https://github.com/binford2k))
|
37
|
+
- Reflect Ruby 3.4 stack trace changes [\#100](https://github.com/OpenVoxProject/openvox/pull/100) ([ekohl](https://github.com/ekohl))
|
38
|
+
- Add base64 as gem dependencies for Ruby 3.4 [\#98](https://github.com/OpenVoxProject/openvox/pull/98) ([ekohl](https://github.com/ekohl))
|
39
|
+
- Add racc gem dependency [\#89](https://github.com/OpenVoxProject/openvox/pull/89) ([ekohl](https://github.com/ekohl))
|
15
40
|
|
16
|
-
## [8.19.1](https://github.com/openvoxproject/
|
41
|
+
## [8.19.1](https://github.com/openvoxproject/openvox/tree/8.19.1) (2025-06-03)
|
17
42
|
|
18
|
-
[Full Changelog](https://github.com/openvoxproject/
|
43
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.19.0...8.19.1)
|
19
44
|
|
20
45
|
**Fixed bugs:**
|
21
46
|
|
22
|
-
- Fix invalid gemspec in AIO package [\#91](https://github.com/OpenVoxProject/
|
47
|
+
- Fix invalid gemspec in AIO package [\#91](https://github.com/OpenVoxProject/openvox/pull/91) ([smortex](https://github.com/smortex))
|
23
48
|
|
24
|
-
## [8.19.0](https://github.com/openvoxproject/
|
49
|
+
## [8.19.0](https://github.com/openvoxproject/openvox/tree/8.19.0) (2025-05-30)
|
25
50
|
|
26
|
-
[Full Changelog](https://github.com/openvoxproject/
|
51
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.18.1...8.19.0)
|
27
52
|
|
28
53
|
**Implemented enhancements:**
|
29
54
|
|
30
|
-
- Add `implementation` fact to agent and server. [\#63](https://github.com/OpenVoxProject/
|
55
|
+
- Add `implementation` fact to agent and server. [\#63](https://github.com/OpenVoxProject/openvox/pull/63) ([ffrank](https://github.com/ffrank))
|
31
56
|
|
32
57
|
**Fixed bugs:**
|
33
58
|
|
34
|
-
- Replace `erase` with `remove`, since it's no longer supported with DNF5 [\#68](https://github.com/OpenVoxProject/
|
59
|
+
- Replace `erase` with `remove`, since it's no longer supported with DNF5 [\#68](https://github.com/OpenVoxProject/openvox/pull/68) ([Stricken1670](https://github.com/Stricken1670))
|
35
60
|
|
36
61
|
|
37
62
|
|
data/Gemfile
CHANGED
@@ -13,10 +13,10 @@ def location_for(place, fake_version = nil)
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# Make sure these gem requirements are in sync with the gempspec. Specifically,
|
16
|
-
# the runtime_dependencies in
|
17
|
-
# (like
|
16
|
+
# the runtime_dependencies in openvox.gemspec match the runtime dependencies here
|
17
|
+
# (like openfact, semantic_puppet, and puppet-resource_api)
|
18
18
|
|
19
|
-
gem "
|
19
|
+
gem "openfact", *location_for(ENV['OPENFACT_LOCATION'] || ["~> 5.0"])
|
20
20
|
gem "semantic_puppet", *location_for(ENV['SEMANTIC_PUPPET_LOCATION'] || ["~> 1.0"])
|
21
21
|
gem "puppet-resource_api", *location_for(ENV['RESOURCE_API_LOCATION'] || ["~> 1.5"])
|
22
22
|
|
@@ -47,6 +47,7 @@ group(:test) do
|
|
47
47
|
gem "rspec", "~> 3.1", require: false
|
48
48
|
gem "rspec-expectations", ["~> 3.9", "!= 3.9.3"]
|
49
49
|
gem "rspec-its", "~> 1.1", require: false
|
50
|
+
gem 'rspec-mocks', '< 3.13.3', require: false # breaking change afterwards: https://github.com/rspec/rspec-mocks/pull/1596
|
50
51
|
gem 'vcr', '~> 6.1', require: false
|
51
52
|
gem 'webmock', '~> 3.0', require: false
|
52
53
|
gem 'webrick', '~> 1.7', require: false
|
data/README.md
CHANGED
@@ -36,9 +36,9 @@ rest of the [developer documents](docs/index.md).
|
|
36
36
|
|
37
37
|
## Licensing
|
38
38
|
|
39
|
-
See [LICENSE](LICENSE) file. OpenVox is licensed by
|
40
|
-
implementation of Puppet.
|
41
|
-
Puppet itself is licensed by Puppet, Inc. under the Apache license. Puppet, Inc. can be contacted at: info@puppet.com
|
39
|
+
See [LICENSE](LICENSE) file. OpenVox is licensed by the OpenVox Project as a community maintained
|
40
|
+
implementation of Puppet. The OpenVox Project can be contacted at: openvox@voxpupuli.org.
|
41
|
+
Puppet itself is licensed by Puppet, Inc. under the Apache license. Puppet, Inc. can be contacted at: info@puppet.com.
|
42
42
|
|
43
43
|
## Support
|
44
44
|
|
data/Rakefile
CHANGED
@@ -59,7 +59,7 @@ end
|
|
59
59
|
namespace :pl_ci do
|
60
60
|
desc 'Build puppet gems'
|
61
61
|
task :gem_build, [:gemspec] do |t, args|
|
62
|
-
args.with_defaults(gemspec: '
|
62
|
+
args.with_defaults(gemspec: 'openvox.gemspec')
|
63
63
|
stdout, stderr, status = Open3.capture3(<<~END)
|
64
64
|
gem build #{args.gemspec} --platform x86-mingw32 && \
|
65
65
|
gem build #{args.gemspec} --platform x64-mingw32 && \
|
@@ -79,11 +79,11 @@ namespace :pl_ci do
|
|
79
79
|
# this is taken from `rake package:nightly_gem`
|
80
80
|
extended_dot_version = %x{git describe --tags --dirty --abbrev=7}.chomp.tr('-', '.')
|
81
81
|
|
82
|
-
# we must create tempfile in the same directory as
|
82
|
+
# we must create tempfile in the same directory as openvox.gemspec, since
|
83
83
|
# it uses __dir__ to determine which files to include
|
84
84
|
require 'tempfile'
|
85
85
|
Tempfile.create('gemspec', __dir__) do |dst|
|
86
|
-
File.open('
|
86
|
+
File.open('openvox.gemspec', 'r') do |src|
|
87
87
|
src.readlines.each do |line|
|
88
88
|
if line.match?(/version\s*=\s*['"][0-9.]+['"]/)
|
89
89
|
line = "spec.version = '#{extended_dot_version}'"
|
@@ -158,7 +158,7 @@ begin
|
|
158
158
|
All notable changes to this project will be documented in this file.
|
159
159
|
HEADER
|
160
160
|
config.user = "openvoxproject"
|
161
|
-
config.project = "
|
161
|
+
config.project = "openvox"
|
162
162
|
config.exclude_labels = %w[dependencies duplicate question invalid wontfix wont-fix modulesync skip-changelog]
|
163
163
|
config.since_tag = "8.18.1"
|
164
164
|
config.future_release = Puppet::PUPPETVERSION
|
@@ -169,3 +169,6 @@ rescue LoadError
|
|
169
169
|
abort("Run `bundle install --with release` to install the `github_changelog_generator` gem.")
|
170
170
|
end
|
171
171
|
end
|
172
|
+
|
173
|
+
desc 'Prepare for a release'
|
174
|
+
task 'release:prepare' => [:changelog]
|
data/install.rb
CHANGED
@@ -36,8 +36,7 @@ require 'tempfile'
|
|
36
36
|
require 'optparse'
|
37
37
|
require 'ostruct'
|
38
38
|
|
39
|
-
|
40
|
-
MIN_FACTER_VERSION = 1.5
|
39
|
+
IS_WINDOWS = RUBY_PLATFORM.match?(/(mswin|mingw)/)
|
41
40
|
|
42
41
|
InstallOptions = OpenStruct.new
|
43
42
|
|
@@ -82,13 +81,7 @@ def do_man(man, strip = 'man/')
|
|
82
81
|
FileUtils.makedirs(om, mode: 0755, verbose: true)
|
83
82
|
FileUtils.chmod(0755, om)
|
84
83
|
FileUtils.install(mf, omf, mode: 0644, preserve: true, verbose: true)
|
85
|
-
|
86
|
-
# --no-check-prereqs/without facter the default gzip behavior still applies
|
87
|
-
unless $osname == "Solaris"
|
88
|
-
gzip = %x{which gzip}
|
89
|
-
gzip.chomp!
|
90
|
-
%x{#{gzip} --force --no-name #{omf}}
|
91
|
-
end
|
84
|
+
%x{gzip --force --no-name #{omf}}
|
92
85
|
end
|
93
86
|
end
|
94
87
|
|
@@ -103,33 +96,11 @@ def do_locales(locale, strip = 'locales/')
|
|
103
96
|
end
|
104
97
|
end
|
105
98
|
|
106
|
-
# Verify that all of the prereqs are installed
|
107
|
-
def check_prereqs
|
108
|
-
PREREQS.each { |pre|
|
109
|
-
begin
|
110
|
-
require pre
|
111
|
-
if pre == "facter"
|
112
|
-
# to_f isn't quite exact for strings like "1.5.1" but is good
|
113
|
-
# enough for this purpose.
|
114
|
-
facter_version = Facter.version.to_f
|
115
|
-
if facter_version < MIN_FACTER_VERSION
|
116
|
-
puts "Facter version: #{facter_version}; minimum required: #{MIN_FACTER_VERSION}; cannot install"
|
117
|
-
exit(-1)
|
118
|
-
end
|
119
|
-
end
|
120
|
-
rescue LoadError
|
121
|
-
puts "Could not load #{pre}; cannot install"
|
122
|
-
exit(-1)
|
123
|
-
end
|
124
|
-
}
|
125
|
-
end
|
126
|
-
|
127
99
|
##
|
128
100
|
# Prepare the file installation.
|
129
101
|
#
|
130
102
|
def prepare_installation
|
131
103
|
InstallOptions.configs = true
|
132
|
-
InstallOptions.check_prereqs = true
|
133
104
|
InstallOptions.batch_files = true
|
134
105
|
|
135
106
|
ARGV.options do |opts|
|
@@ -174,9 +145,6 @@ def prepare_installation
|
|
174
145
|
opts.on('--mandir[=OPTIONAL]', 'Installation directory for man pages', 'overrides RbConfig::CONFIG["mandir"]') do |mandir|
|
175
146
|
InstallOptions.mandir = mandir
|
176
147
|
end
|
177
|
-
opts.on('--[no-]check-prereqs', 'Prevents validation of prerequisite libraries', 'Default on') do |prereq|
|
178
|
-
InstallOptions.check_prereqs = prereq
|
179
|
-
end
|
180
148
|
opts.on('--no-batch-files', 'Prevents installation of batch files for windows', 'Default off') do |batch_files|
|
181
149
|
InstallOptions.batch_files = false
|
182
150
|
end
|
@@ -201,16 +169,9 @@ def prepare_installation
|
|
201
169
|
RbConfig::CONFIG['bindir'] = "/usr/bin"
|
202
170
|
end
|
203
171
|
|
204
|
-
# Here we only set $osname if we have opted to check for prereqs.
|
205
|
-
# Otherwise facter won't be guaranteed to be present.
|
206
|
-
if InstallOptions.check_prereqs
|
207
|
-
check_prereqs
|
208
|
-
$osname = Facter.value('os.name')
|
209
|
-
end
|
210
|
-
|
211
172
|
if not InstallOptions.configdir.nil?
|
212
173
|
configdir = InstallOptions.configdir
|
213
|
-
elsif
|
174
|
+
elsif IS_WINDOWS
|
214
175
|
configdir = File.join(ENV['ALLUSERSPROFILE'], "PuppetLabs", "puppet", "etc")
|
215
176
|
else
|
216
177
|
configdir = "/etc/puppetlabs/puppet"
|
@@ -218,7 +179,7 @@ def prepare_installation
|
|
218
179
|
|
219
180
|
if not InstallOptions.codedir.nil?
|
220
181
|
codedir = InstallOptions.codedir
|
221
|
-
elsif
|
182
|
+
elsif IS_WINDOWS
|
222
183
|
codedir = File.join(ENV['ALLUSERSPROFILE'], "PuppetLabs", "code")
|
223
184
|
else
|
224
185
|
codedir = "/etc/puppetlabs/code"
|
@@ -226,7 +187,7 @@ def prepare_installation
|
|
226
187
|
|
227
188
|
if not InstallOptions.vardir.nil?
|
228
189
|
vardir = InstallOptions.vardir
|
229
|
-
elsif
|
190
|
+
elsif IS_WINDOWS
|
230
191
|
vardir = File.join(ENV['ALLUSERSPROFILE'], "PuppetLabs", "puppet", "cache")
|
231
192
|
else
|
232
193
|
vardir = "/opt/puppetlabs/puppet/cache"
|
@@ -234,7 +195,7 @@ def prepare_installation
|
|
234
195
|
|
235
196
|
if not InstallOptions.publicdir.nil?
|
236
197
|
publicdir = InstallOptions.publicdir
|
237
|
-
elsif
|
198
|
+
elsif IS_WINDOWS
|
238
199
|
publicdir = File.join(ENV['ALLUSERSPROFILE'], "PuppetLabs", "puppet", "public")
|
239
200
|
else
|
240
201
|
publicdir = "/opt/puppetlabs/puppet/public"
|
@@ -242,7 +203,7 @@ def prepare_installation
|
|
242
203
|
|
243
204
|
if not InstallOptions.rundir.nil?
|
244
205
|
rundir = InstallOptions.rundir
|
245
|
-
elsif
|
206
|
+
elsif IS_WINDOWS
|
246
207
|
rundir = File.join(ENV['ALLUSERSPROFILE'], "PuppetLabs", "puppet", "var", "run")
|
247
208
|
else
|
248
209
|
rundir = "/var/run/puppetlabs"
|
@@ -250,7 +211,7 @@ def prepare_installation
|
|
250
211
|
|
251
212
|
if not InstallOptions.logdir.nil?
|
252
213
|
logdir = InstallOptions.logdir
|
253
|
-
elsif
|
214
|
+
elsif IS_WINDOWS
|
254
215
|
logdir = File.join(ENV['ALLUSERSPROFILE'], "PuppetLabs", "puppet", "var", "log")
|
255
216
|
else
|
256
217
|
logdir = "/var/log/puppetlabs/puppet"
|
@@ -265,7 +226,7 @@ def prepare_installation
|
|
265
226
|
if not InstallOptions.localedir.nil?
|
266
227
|
localedir = InstallOptions.localedir
|
267
228
|
else
|
268
|
-
if
|
229
|
+
if IS_WINDOWS
|
269
230
|
localedir = File.join(ENV['PROGRAMFILES'], "Puppet Labs", "Puppet", "puppet", "share", "locale")
|
270
231
|
else
|
271
232
|
localedir = "/opt/puppetlabs/puppet/share/locale"
|
@@ -339,7 +300,7 @@ end
|
|
339
300
|
# by stripping the drive letter, but only if the basedir is not empty.
|
340
301
|
#
|
341
302
|
def join(basedir, dir)
|
342
|
-
return "#{basedir}#{dir[2..-1]}" if
|
303
|
+
return "#{basedir}#{dir[2..-1]}" if IS_WINDOWS and basedir.length > 0 and dir.length > 2
|
343
304
|
|
344
305
|
"#{basedir}#{dir}"
|
345
306
|
end
|
@@ -360,14 +321,14 @@ def install_binfile(from, op_file, target)
|
|
360
321
|
|
361
322
|
File.open(from) do |ip|
|
362
323
|
File.open(tmp_file.path, "w") do |op|
|
363
|
-
op.puts "#!#{ruby}" unless
|
324
|
+
op.puts "#!#{ruby}" unless IS_WINDOWS
|
364
325
|
contents = ip.readlines
|
365
326
|
contents.shift if contents[0] =~ /^#!/
|
366
327
|
op.write contents.join
|
367
328
|
end
|
368
329
|
end
|
369
330
|
|
370
|
-
if
|
331
|
+
if IS_WINDOWS && InstallOptions.batch_files
|
371
332
|
installed_wrapper = false
|
372
333
|
|
373
334
|
unless File.extname(from) =~ /\.(cmd|bat)/
|
@@ -415,14 +376,14 @@ FileUtils.cd File.dirname(__FILE__) do
|
|
415
376
|
|
416
377
|
prepare_installation
|
417
378
|
|
418
|
-
if
|
379
|
+
if IS_WINDOWS
|
419
380
|
windows_bins = glob(%w{ext/windows/*bat})
|
420
381
|
end
|
421
382
|
|
422
383
|
do_configs(configs, InstallOptions.config_dir) if InstallOptions.configs
|
423
384
|
do_bins(bins, InstallOptions.bin_dir)
|
424
|
-
do_bins(windows_bins, InstallOptions.bin_dir, 'ext/windows/') if
|
385
|
+
do_bins(windows_bins, InstallOptions.bin_dir, 'ext/windows/') if IS_WINDOWS && InstallOptions.batch_files
|
425
386
|
do_libs(libs)
|
426
387
|
do_locales(locales)
|
427
|
-
do_man(man) unless
|
388
|
+
do_man(man) unless IS_WINDOWS
|
428
389
|
end
|
data/lib/puppet/configurer.rb
CHANGED
@@ -135,36 +135,37 @@ class Puppet::Configurer
|
|
135
135
|
Puppet.warning _("The current total number of fact values: %{size} exceeds the fact values limit: %{max_size}") % { size: size, max_size: max_number }
|
136
136
|
end
|
137
137
|
|
138
|
-
def warn_fact_name_length(name, max_length)
|
139
|
-
Puppet.warning _("Fact %{name} with length:
|
138
|
+
def warn_fact_name_length(name, max_length, fact_name_length)
|
139
|
+
Puppet.warning _("Fact %{name} with length: %{length} exceeds the fact name length limit: %{limit}") % { name: name, length: fact_name_length, limit: max_length }
|
140
140
|
end
|
141
141
|
|
142
142
|
def warn_number_of_top_level_facts(size, max_number)
|
143
143
|
Puppet.warning _("The current number of top level facts: %{size} exceeds the top facts limit: %{max_size}") % { size: size, max_size: max_number }
|
144
144
|
end
|
145
145
|
|
146
|
-
def warn_fact_value_length(value, max_length)
|
147
|
-
Puppet.warning _("Fact value
|
146
|
+
def warn_fact_value_length(name, value, max_length)
|
147
|
+
Puppet.warning _("Fact %{name} with value %{value} with the value length: %{length} exceeds the value length limit: %{max_length}") % { name: name, value: value, length: value.to_s.bytesize, max_length: max_length }
|
148
148
|
end
|
149
149
|
|
150
150
|
def warn_fact_payload_size(payload, max_size)
|
151
|
-
Puppet.warning _("Payload with the current size of:
|
151
|
+
Puppet.warning _("Payload with the current size of: %{payload} exceeds the payload size limit: %{max_size}") % { payload: payload, max_size: max_size }
|
152
152
|
end
|
153
153
|
|
154
|
-
def check_fact_name_length(
|
154
|
+
def check_fact_name_length(fact_path, number_of_dots)
|
155
155
|
max_length = Puppet[:fact_name_length_soft_limit]
|
156
156
|
return if max_length.zero?
|
157
157
|
|
158
|
+
name_without_dots = fact_path.join()
|
158
159
|
# rough byte size estimations of fact path as a postgresql btree index
|
159
|
-
size_as_btree_index = 8 + (number_of_dots * 2) +
|
160
|
-
warn_fact_name_length(
|
160
|
+
size_as_btree_index = 8 + (number_of_dots * 2) + name_without_dots.to_s.bytesize
|
161
|
+
warn_fact_name_length(fact_path.join('.'), max_length, size_as_btree_index) if size_as_btree_index > max_length
|
161
162
|
end
|
162
163
|
|
163
|
-
def check_fact_values_length(values)
|
164
|
+
def check_fact_values_length(name, values)
|
164
165
|
max_length = Puppet[:fact_value_length_soft_limit]
|
165
166
|
return if max_length.zero?
|
166
167
|
|
167
|
-
warn_fact_value_length(values, max_length) if values.to_s.bytesize > max_length
|
168
|
+
warn_fact_value_length(name, values, max_length) if values.to_s.bytesize > max_length
|
168
169
|
end
|
169
170
|
|
170
171
|
def check_top_level_number_limit(size)
|
@@ -204,8 +205,8 @@ class Puppet::Configurer
|
|
204
205
|
path.pop
|
205
206
|
end
|
206
207
|
else
|
207
|
-
check_fact_name_length(path
|
208
|
-
check_fact_values_length(object)
|
208
|
+
check_fact_name_length(path, path.size)
|
209
|
+
check_fact_values_length(path.join('.'), object)
|
209
210
|
@number_of_facts += 1
|
210
211
|
end
|
211
212
|
end
|
data/lib/puppet/face/facts.rb
CHANGED
@@ -167,7 +167,15 @@ Puppet::Indirector::Face.define(:facts, '0.0.1') do
|
|
167
167
|
|
168
168
|
case result
|
169
169
|
when Array, Hash
|
170
|
-
|
170
|
+
# JSON < 2.8.0 would pretty print empty arrays and hashes with newlines
|
171
|
+
# Maintain that behavior for our users for now
|
172
|
+
if result.is_a?(Array) && result.empty?
|
173
|
+
"[\n\n]"
|
174
|
+
elsif result.is_a?(Hash) && result.empty?
|
175
|
+
"{\n}"
|
176
|
+
else
|
177
|
+
Puppet::Util::Json.dump(result, :pretty => true)
|
178
|
+
end
|
171
179
|
else # one of VALID_TYPES above
|
172
180
|
result
|
173
181
|
end
|
data/lib/puppet/version.rb
CHANGED
data/tasks/vox.rake
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
namespace :vox do
|
2
|
+
desc 'Update the version in preparation for a release'
|
3
|
+
task 'version:bump:full', [:version] do |_, args|
|
4
|
+
abort 'You must provide a tag.' if args[:version].nil? || args[:version].empty?
|
5
|
+
version = args[:version]
|
6
|
+
abort "#{version} does not appear to be a valid version string in x.y.z format" unless Gem::Version.correct?(version)
|
7
|
+
|
8
|
+
# Update lib/puppet/version.rb and openvox.gemspec
|
9
|
+
puts "Setting version to #{version}"
|
10
|
+
|
11
|
+
data = File.read('lib/puppet/version.rb')
|
12
|
+
new_data = data.sub(/PUPPETVERSION = '\d+\.\d+\.\d+(\.rc\d+)?'/, "PUPPETVERSION = '#{version}'")
|
13
|
+
warn 'Failed to update version in lib/puppet/version.rb' if data == new_data
|
14
|
+
|
15
|
+
File.write('lib/puppet/version.rb', new_data)
|
16
|
+
|
17
|
+
data = File.read('openvox.gemspec')
|
18
|
+
new_data = data.sub(/spec.version = "\d+\.\d+\.\d+(\.rc\d+)?"/, "spec.version = \"#{version}\"")
|
19
|
+
warn 'Failed to update version in openvox.gemspec' if data == new_data
|
20
|
+
|
21
|
+
File.write('openvox.gemspec', new_data)
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openvox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- OpenVox Project
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
10
|
date: 2012-08-17 00:00:00.000000000 Z
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
version: '0.1'
|
19
19
|
- - "<"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
21
|
+
version: '0.4'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
version: '0.1'
|
29
29
|
- - "<"
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: '0.
|
31
|
+
version: '0.4'
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: benchmark
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -77,26 +77,6 @@ dependencies:
|
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '1.0'
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: facter
|
82
|
-
requirement: !ruby/object:Gem::Requirement
|
83
|
-
requirements:
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 4.3.0
|
87
|
-
- - "<"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '5'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 4.3.0
|
97
|
-
- - "<"
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '5'
|
100
80
|
- !ruby/object:Gem::Dependency
|
101
81
|
name: fast_gettext
|
102
82
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,6 +139,20 @@ dependencies:
|
|
159
139
|
- - "~>"
|
160
140
|
- !ruby/object:Gem::Version
|
161
141
|
version: '1.13'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: openfact
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - "~>"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '5.0'
|
149
|
+
type: :runtime
|
150
|
+
prerelease: false
|
151
|
+
version_requirements: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - "~>"
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '5.0'
|
162
156
|
- !ruby/object:Gem::Dependency
|
163
157
|
name: ostruct
|
164
158
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,7 +226,7 @@ dependencies:
|
|
232
226
|
description: |
|
233
227
|
OpenVox is a community implementation of Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs administrative tasks
|
234
228
|
(such as adding users, installing packages, and updating server configurations) based on a centralized specification.
|
235
|
-
email: openvox@voxpupuli.org
|
229
|
+
email: openvox@voxpupuli.org
|
236
230
|
executables:
|
237
231
|
- puppet
|
238
232
|
extensions: []
|
@@ -1339,7 +1333,7 @@ files:
|
|
1339
1333
|
- man/man8/puppet-script.8
|
1340
1334
|
- man/man8/puppet-ssl.8
|
1341
1335
|
- man/man8/puppet.8
|
1342
|
-
- tasks/
|
1336
|
+
- tasks/vox.rake
|
1343
1337
|
homepage: https://github.com/OpenVoxProject/puppet
|
1344
1338
|
licenses:
|
1345
1339
|
- Apache-2.0
|
data/tasks/tag.rake
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
namespace :vox do
|
2
|
-
desc 'Update version, create tag, and push to origin'
|
3
|
-
task :tag, [:tag] do |_, args|
|
4
|
-
abort 'You must provide a tag.' if args[:tag].nil? || args[:tag].empty?
|
5
|
-
version = args[:tag]
|
6
|
-
abort "#{version} does not appear to be a valid version string in x.y.z format" unless Gem::Version.correct?(version)
|
7
|
-
|
8
|
-
# Update lib/puppet/version.rb and puppet.gemspec
|
9
|
-
puts "Setting version to #{version}"
|
10
|
-
data = File.read('lib/puppet/version.rb')
|
11
|
-
data = data.sub(/PUPPETVERSION = '\d+\.\d+\.\d+'/, "PUPPETVERSION = '#{version}'")
|
12
|
-
File.write('lib/puppet/version.rb', data)
|
13
|
-
data = File.read('puppet.gemspec')
|
14
|
-
data = data.sub(/spec.version = "\d+\.\d+\.\d+"/, "spec.version = \"#{version}\"")
|
15
|
-
File.write('puppet.gemspec', data)
|
16
|
-
run_command("git add lib/puppet/version.rb && git add puppet.gemspec && git commit -m 'Set version to #{version}'")
|
17
|
-
|
18
|
-
# Run git command to get short SHA and one line description of the commit on HEAD
|
19
|
-
branch = run_command('git rev-parse --abbrev-ref HEAD')
|
20
|
-
sha = run_command('git rev-parse --short HEAD')
|
21
|
-
msg = run_command('git log -n 1 --pretty=%B')
|
22
|
-
|
23
|
-
puts "Branch: #{branch}"
|
24
|
-
puts "SHA: #{sha}"
|
25
|
-
puts "Commit: #{msg}"
|
26
|
-
|
27
|
-
run_command("git tag -a #{version} -m '#{version}'")
|
28
|
-
|
29
|
-
unless !ENV['NOPUSH'].nil?
|
30
|
-
puts "Pushing to origin"
|
31
|
-
run_command("git push origin && git push origin #{version}")
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|