mixlib-install 3.12.1 → 3.12.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/mixlib/install.rb +1 -1
- data/lib/mixlib/install/backend/package_router.rb +4 -4
- data/lib/mixlib/install/cli.rb +2 -2
- data/lib/mixlib/install/generator/base.rb +3 -3
- data/lib/mixlib/install/generator/bourne/scripts/helpers.sh.erb +2 -2
- data/lib/mixlib/install/generator/bourne/scripts/platform_detection.sh +1 -1
- data/lib/mixlib/install/script_generator.rb +1 -1
- data/lib/mixlib/install/util.rb +2 -2
- 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: e9292398c41cc34a46a603c508a55b865da85bf161780dc19892fe9ae3607319
|
4
|
+
data.tar.gz: 767131ab311ea5ef51c3aef89f40beca0634aabacb6d0c4cdd60a9ba233cec49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c4f472513b0f4a61463f6314781f59c088b934a5ac8a9f812152dc4ae70f25647ce164e9856f4f7dc62ec4c3eccb3c34ddda2a990c56f1368476d25cc8e8dc
|
7
|
+
data.tar.gz: b6d9ff5a37a56484aa7028aa61421ffde2a6acd2f32d97cde6abfed658c74cb63402999b98d28f5e2d3999102ac8b9ff3aa868da7bef1afd5b33568e24c28cba
|
data/Gemfile
CHANGED
data/lib/mixlib/install.rb
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
require "json"
|
19
|
+
require "json" unless defined?(JSON)
|
20
20
|
require_relative "../artifact_info"
|
21
21
|
require_relative "base"
|
22
22
|
require_relative "../product"
|
@@ -24,7 +24,7 @@ require_relative "../product_matrix"
|
|
24
24
|
require_relative "../util"
|
25
25
|
require_relative "../dist"
|
26
26
|
require "mixlib/versioning"
|
27
|
-
require "net/http"
|
27
|
+
require "net/http" unless defined?(Net::HTTP)
|
28
28
|
|
29
29
|
module Mixlib
|
30
30
|
class Install
|
@@ -78,7 +78,7 @@ EOF
|
|
78
78
|
|
79
79
|
# Filter out the partial builds if we are in :unstable channel
|
80
80
|
# In other channels we do not need to do this since all builds are
|
81
|
-
# always complete.
|
81
|
+
# always complete. In fact we should not do this since for some arcane
|
82
82
|
# builds like Chef Client 10.X we do not have build record created in
|
83
83
|
# artifactory.
|
84
84
|
if options.channel == :unstable
|
@@ -245,7 +245,7 @@ EOF
|
|
245
245
|
private
|
246
246
|
|
247
247
|
# Converts Array<Hash> where the Hash is a key pair and
|
248
|
-
# value pair to a
|
248
|
+
# value pair to a simplified key/pair Hash
|
249
249
|
#
|
250
250
|
def map_properties(properties)
|
251
251
|
return {} if properties.nil?
|
data/lib/mixlib/install/cli.rb
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
#
|
14
14
|
|
15
15
|
require_relative "../install"
|
16
|
-
require "thor"
|
16
|
+
require "thor" unless defined?(Thor)
|
17
17
|
|
18
18
|
module Mixlib
|
19
19
|
class Install
|
@@ -67,7 +67,7 @@ If no earlier version is found the earliest version available will be set.",
|
|
67
67
|
desc: "Print artifact attributes",
|
68
68
|
type: :boolean
|
69
69
|
def download(product_name)
|
70
|
-
# Set
|
70
|
+
# Set minimum options
|
71
71
|
mixlib_install_options = {
|
72
72
|
channel: options[:channel].to_sym,
|
73
73
|
product_name: product_name,
|
@@ -15,8 +15,8 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
17
|
|
18
|
-
require "erb"
|
19
|
-
require "ostruct"
|
18
|
+
require "erb" unless defined?(Erb)
|
19
|
+
require "ostruct" unless defined?(OpenStruct)
|
20
20
|
require_relative "../util"
|
21
21
|
require_relative "../dist"
|
22
22
|
|
@@ -45,7 +45,7 @@ module Mixlib
|
|
45
45
|
script_path = File.join(script_base_path, name)
|
46
46
|
|
47
47
|
# If there is an erb template we render it, otherwise we just read
|
48
|
-
# and
|
48
|
+
# and return the contents of the script
|
49
49
|
if File.exist? "#{script_path}.erb"
|
50
50
|
# Default values to use incase they are not set in the context
|
51
51
|
context[:project_name] ||= Mixlib::Install::Dist::PROJECT_NAME.freeze
|
@@ -87,7 +87,7 @@ http_404_error() {
|
|
87
87
|
echo "In order to test the version parameter, adventurous users may take the Metadata URL"
|
88
88
|
echo "below and modify the '&v=<number>' parameter until you successfully get a URL that"
|
89
89
|
echo "does not 404 (e.g. via curl or wget). You should be able to use '&v=11' or '&v=12'"
|
90
|
-
echo "
|
90
|
+
echo "successfully."
|
91
91
|
echo ""
|
92
92
|
echo "If you cannot fix this problem by setting the bootstrap_version, it probably means"
|
93
93
|
echo "that $platform is not supported."
|
@@ -215,7 +215,7 @@ do_checksum() {
|
|
215
215
|
checksum=`shasum -a 256 $1 | awk '{ print $1 }'`
|
216
216
|
return `test "x$checksum" = "x$2"`
|
217
217
|
else
|
218
|
-
echo "WARNING: could not find a valid checksum program, pre-install shasum or sha256sum in your O/S image to get
|
218
|
+
echo "WARNING: could not find a valid checksum program, pre-install shasum or sha256sum in your O/S image to get validation..."
|
219
219
|
return 0
|
220
220
|
fi
|
221
221
|
}
|
@@ -48,7 +48,7 @@ elif test -f "/etc/redhat-release"; then
|
|
48
48
|
platform_version=`sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release`
|
49
49
|
|
50
50
|
if test "$platform" = "xenserver"; then
|
51
|
-
# Current XenServer 6.2 is based on CentOS 5, platform is not reset to "el" server should
|
51
|
+
# Current XenServer 6.2 is based on CentOS 5, platform is not reset to "el" server should handle response
|
52
52
|
platform="xenserver"
|
53
53
|
else
|
54
54
|
# FIXME: use "redhat"
|
@@ -226,7 +226,7 @@ module Mixlib
|
|
226
226
|
# Conditionally prefixes a command with a sudo command.
|
227
227
|
#
|
228
228
|
# @param command [String] command to be prefixed
|
229
|
-
# @return [String] the command,
|
229
|
+
# @return [String] the command, conditionally prefixed with sudo
|
230
230
|
# @api private
|
231
231
|
def sudo(script)
|
232
232
|
use_sudo ? "#{sudo_command} #{script}" : script
|
data/lib/mixlib/install/util.rb
CHANGED
@@ -109,7 +109,7 @@ module Mixlib
|
|
109
109
|
# invoked on a remote instance or locally.
|
110
110
|
#
|
111
111
|
# This method uses the Bourne shell (/bin/sh) to maximize the chance of
|
112
|
-
# cross platform portability on
|
112
|
+
# cross platform portability on Unix-like systems.
|
113
113
|
#
|
114
114
|
# @param [String] the command
|
115
115
|
# @return [String] a wrapped command string
|
@@ -129,7 +129,7 @@ module Mixlib
|
|
129
129
|
require_relative "version"
|
130
130
|
user_agents = %W{mixlib-install/#{Mixlib::Install::VERSION}}
|
131
131
|
user_agents << headers
|
132
|
-
# Ensure that if the default user agent is
|
132
|
+
# Ensure that if the default user agent is already set it doesn't get duplicated
|
133
133
|
user_agents.flatten.compact.uniq.join(" ")
|
134
134
|
end
|
135
135
|
|
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.3
|
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: 2020-
|
12
|
+
date: 2020-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mixlib-shellout
|