openvox 8.20.0 → 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 +8 -0
- data/install.rb +15 -54
- data/lib/puppet/version.rb +1 -1
- metadata +1 -1
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,6 +2,14 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [8.21.0](https://github.com/openvoxproject/openvox/tree/8.21.0) (2025-07-09)
|
6
|
+
|
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
|
+
|
5
13
|
## [8.20.0](https://github.com/openvoxproject/openvox/tree/8.20.0) (2025-06-27)
|
6
14
|
|
7
15
|
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.19.2...8.20.0)
|
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/version.rb
CHANGED