mixlib-install 3.12.20 → 3.12.23
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 +5 -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: 687fca4a38f2f4399c6cdbbcb83ee07d700ed88e0c0780a4e7669e8f6bee90c3
|
4
|
+
data.tar.gz: 07752cab13343e0d2c811ce49b9d46afef365784ac60c9a538688c2ad519b1f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72882b68c9bc0ddb6d54e8a3eeff527248dd4d6cab241ecc9278fd74cb869fa861cc1de4ef2fe2eb3631138ef112317e65f0dc70c26132c58cad66ad78074965
|
7
|
+
data.tar.gz: c39c0155192848b29405b0df348dd4e1eba26707b8e9f359dc44ecd55c1bb32e4d76cc02fd7f343e73021630cee76a77485c3f64a060973ce929539f6c659de3
|
@@ -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,11 @@ PRODUCT_MATRIX = Mixlib::Install::ProductMatrix.new do
|
|
47
47
|
package_name "chef"
|
48
48
|
end
|
49
49
|
|
50
|
+
product "chef-universal" do
|
51
|
+
product_name "Chef Infra Client MacOS Universal"
|
52
|
+
package_name "universal-package"
|
53
|
+
end
|
54
|
+
|
50
55
|
product "chef-backend" do
|
51
56
|
product_name "Chef Backend"
|
52
57
|
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.23
|
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-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mixlib-shellout
|