mixlib-install 3.12.20 → 3.12.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mixlib/install/backend/package_router.rb +1 -2
- data/lib/mixlib/install/generator/powershell/scripts/helpers.ps1.erb +11 -7
- data/lib/mixlib/install/options.rb +12 -5
- data/lib/mixlib/install/product.rb +3 -0
- data/lib/mixlib/install/product_matrix.rb +10 -0
- data/lib/mixlib/install/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9d54877c6f3a04cf9ea38a02994bb283892b0dfdc5a0c68a773d278b96d0da8
|
4
|
+
data.tar.gz: 910ffe3c2679ec01b086fc0201fdc9489d242b3b1af44f83f19e6dba66c6616d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fdfcf10f2632d0119bc3f3d2717f1130c5afa806921fe99c1e5a6d1a62ce03d06d76e5e936aeb69e6bbed2722440906f3bf088cc797b1bb778f57919280fb2a
|
7
|
+
data.tar.gz: 0dacdb5d86913a580522149c4b8537efb0f5ced5f1c3d337e39087ecdaf481f5114f0e8701797ca045bef264746f440fd23f3c4ad15a6836c6b96299ae949091
|
@@ -30,7 +30,6 @@ module Mixlib
|
|
30
30
|
class Install
|
31
31
|
class Backend
|
32
32
|
class PackageRouter < Base
|
33
|
-
ENDPOINT = Mixlib::Install::Dist::PRODUCT_ENDPOINT.freeze
|
34
33
|
|
35
34
|
COMPAT_DOWNLOAD_URL_ENDPOINT = "http://packages.chef.io".freeze
|
36
35
|
|
@@ -269,7 +268,7 @@ EOF
|
|
269
268
|
end
|
270
269
|
|
271
270
|
def endpoint
|
272
|
-
@endpoint ||=
|
271
|
+
@endpoint ||= PRODUCT_MATRIX.lookup(options.product_name, options.product_version).api_url
|
273
272
|
end
|
274
273
|
|
275
274
|
def omnibus_project
|
@@ -2,13 +2,17 @@
|
|
2
2
|
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'
|
3
3
|
|
4
4
|
function Get-PlatformVersion {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
'
|
5
|
+
[version]$osVersion = (Get-Win32OS).version
|
6
|
+
|
7
|
+
$platform_version = switch ($osVersion) {
|
8
|
+
# Windows Server build numbers from: https://betawiki.net/wiki/Microsoft_Windows
|
9
|
+
{ $_ -ge [version]'10.0.20145' } { '2022'; break }
|
10
|
+
{ $_ -ge [version]'10.0.17609' } { '2019'; break }
|
11
|
+
{ $_ -ge [version]'10.0.0' } { '2016'; break }
|
12
|
+
{ $_ -ge [version]'6.3.0' } { '2012r2'; break }
|
13
|
+
{ $_ -ge [version]'6.2.0' } { '2012'; break }
|
14
|
+
{ $_ -ge [version]'6.1.0' } { '2008r2'; break }
|
15
|
+
{ $_ -ge [version]'6.0.0' } { '2008'; break }
|
12
16
|
}
|
13
17
|
|
14
18
|
if(Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Server\ServerLevels') {
|
@@ -26,7 +26,7 @@ module Mixlib
|
|
26
26
|
class Options
|
27
27
|
class InvalidOptions < ArgumentError; end
|
28
28
|
|
29
|
-
attr_reader :options, :errors, :original_platform_version
|
29
|
+
attr_reader :options, :errors, :original_platform_version, :supported_product_names
|
30
30
|
|
31
31
|
SUPPORTED_ARCHITECTURES = %w{
|
32
32
|
aarch64
|
@@ -46,8 +46,6 @@ module Mixlib
|
|
46
46
|
:unstable,
|
47
47
|
]
|
48
48
|
|
49
|
-
SUPPORTED_PRODUCT_NAMES = PRODUCT_MATRIX.products
|
50
|
-
|
51
49
|
SUPPORTED_SHELL_TYPES = [
|
52
50
|
:ps1,
|
53
51
|
:sh,
|
@@ -77,6 +75,15 @@ module Mixlib
|
|
77
75
|
# Store original options in cases where we must remap
|
78
76
|
@original_platform_version = options[:platform_version]
|
79
77
|
|
78
|
+
# Eval extra products definition
|
79
|
+
extra_products = ENV.fetch("EXTRA_PRODUCTS_FILE", nil)
|
80
|
+
unless extra_products.nil?
|
81
|
+
PRODUCT_MATRIX.instance_eval(::File.read(extra_products), extra_products)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Store supported product names
|
85
|
+
@supported_product_names = PRODUCT_MATRIX.products
|
86
|
+
|
80
87
|
resolve_platform_version_compatibility_mode!
|
81
88
|
|
82
89
|
map_windows_versions!
|
@@ -189,10 +196,10 @@ Must be one of: #{SUPPORTED_ARCHITECTURES.join(", ")}
|
|
189
196
|
end
|
190
197
|
|
191
198
|
def validate_product_names
|
192
|
-
unless
|
199
|
+
unless @supported_product_names.include? product_name
|
193
200
|
errors << <<-EOS
|
194
201
|
Unknown product name #{product_name}.
|
195
|
-
Must be one of: #{
|
202
|
+
Must be one of: #{@supported_product_names.join(", ")}
|
196
203
|
EOS
|
197
204
|
end
|
198
205
|
end
|
@@ -36,6 +36,7 @@ module Mixlib
|
|
36
36
|
:omnibus_project,
|
37
37
|
:github_repo,
|
38
38
|
:downloads_product_page_url,
|
39
|
+
:api_url,
|
39
40
|
]
|
40
41
|
|
41
42
|
#
|
@@ -86,6 +87,8 @@ module Mixlib
|
|
86
87
|
"#{Mixlib::Install::Dist::DOWNLOADS_PAGE}/#{product_key}"
|
87
88
|
when :github_repo
|
88
89
|
"#{Mixlib::Install::Dist::GITHUB_ORG}/#{product_key}"
|
90
|
+
when :api_url
|
91
|
+
ENV.fetch("PACKAGE_ROUTER_ENDPOINT", Mixlib::Install::Dist::PRODUCT_ENDPOINT)
|
89
92
|
else
|
90
93
|
nil
|
91
94
|
end
|
@@ -47,6 +47,16 @@ PRODUCT_MATRIX = Mixlib::Install::ProductMatrix.new do
|
|
47
47
|
package_name "chef"
|
48
48
|
end
|
49
49
|
|
50
|
+
product "chef-foundation" do
|
51
|
+
product_name "Chef Foundation"
|
52
|
+
package_name "chef-foundation"
|
53
|
+
end
|
54
|
+
|
55
|
+
product "chef-universal" do
|
56
|
+
product_name "Chef Infra Client MacOS Universal"
|
57
|
+
package_name "universal-package"
|
58
|
+
end
|
59
|
+
|
50
60
|
product "chef-backend" do
|
51
61
|
product_name "Chef Backend"
|
52
62
|
package_name "chef-backend"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixlib-install
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.12.
|
4
|
+
version: 3.12.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom May
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mixlib-shellout
|