machinery-tool 1.18.0 → 1.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.git_revision +1 -1
- data/NEWS +17 -0
- data/bin/machinery +10 -2
- data/html/comparison.html.haml +1 -1
- data/html/index.html.haml +2 -2
- data/html/partials/{config_files.html.haml → changed_config_files.html.haml} +10 -10
- data/html/partials/compare/changed_config_files.html.haml +48 -0
- data/html/partials/compare/{config_file_list.html.haml → changed_config_files_list.html.haml} +0 -0
- data/html/partials/compare/unmanaged_file_list.html.haml +1 -1
- data/html/partials/compare/unmanaged_files.html.haml +2 -2
- data/html/partials/patterns.html.haml +5 -0
- data/html/upgrade.html.haml +49 -0
- data/lib/{analyze_config_file_diffs_task.rb → analyze_changed_config_files_diffs_task.rb} +8 -8
- data/lib/autoyast.rb +12 -13
- data/lib/build_task.rb +2 -2
- data/lib/cli.rb +39 -32
- data/lib/compare_task.rb +1 -1
- data/lib/config_base.rb +1 -1
- data/lib/deploy_task.rb +4 -4
- data/lib/docker_system.rb +1 -1
- data/lib/element_filter.rb +3 -3
- data/lib/export_task.rb +3 -3
- data/lib/file_validator.rb +8 -5
- data/lib/filter.rb +5 -5
- data/lib/filter_option_parser.rb +3 -3
- data/lib/hint.rb +9 -4
- data/lib/html.rb +3 -3
- data/lib/inspect_task.rb +3 -3
- data/lib/json_schema_monkey_patch.rb +2 -2
- data/lib/json_validation_error_cleaner.rb +1 -1
- data/lib/json_validator.rb +2 -2
- data/lib/kiwi_config.rb +39 -14
- data/lib/list_task.rb +1 -1
- data/lib/local_system.rb +4 -4
- data/lib/machinery.rb +1 -1
- data/lib/machinery_logger.rb +4 -4
- data/lib/manifest.rb +5 -5
- data/lib/migration.rb +4 -4
- data/lib/object.rb +6 -10
- data/lib/remove_task.rb +1 -1
- data/lib/renderer.rb +5 -5
- data/lib/scope_file_access_archive.rb +2 -2
- data/lib/scope_file_access_flat.rb +3 -3
- data/lib/scope_file_store.rb +3 -3
- data/lib/serve_html_task.rb +15 -2
- data/lib/server.rb +32 -12
- data/lib/system.rb +1 -1
- data/lib/system_description.rb +16 -14
- data/lib/system_description_store.rb +5 -6
- data/lib/ui.rb +1 -1
- data/lib/upgrade_format_task.rb +2 -2
- data/lib/version.rb +1 -1
- data/lib/workload_mapper.rb +11 -11
- data/lib/zypper.rb +1 -1
- data/machinery-helper/Rakefile +1 -1
- data/machinery-helper/version.go +1 -1
- data/man/generated/machinery.1.gz +0 -0
- data/manual/docs/machinery-analyze.1.md +3 -3
- data/manual/docs/machinery-compare.1.md +2 -2
- data/manual/docs/machinery-inspect-docker.1.md +1 -1
- data/manual/docs/machinery-inspect.1.md +4 -1
- data/manual/docs/machinery-show.1.md +2 -2
- data/manual/docs/machinery_main_general.1.md +1 -1
- data/manual/docs/machinery_main_scopes.1.md +8 -6
- data/manual/site/machinery-analyze.1/index.html +3 -3
- data/manual/site/machinery-compare.1/index.html +2 -2
- data/manual/site/machinery-inspect-docker.1/index.html +1 -1
- data/manual/site/machinery-inspect.1/index.html +3 -1
- data/manual/site/machinery-show.1/index.html +2 -2
- data/manual/site/machinery_main_general.1/index.html +1 -1
- data/manual/site/machinery_main_scopes.1/index.html +8 -6
- data/manual/site/mkdocs/search_index.json +17 -17
- data/manual/site/sitemap.xml +23 -23
- data/plugins/{config_files/config_files.yml → changed_config_files/changed_config_files.yml} +3 -3
- data/plugins/{config_files/config_files_inspector.rb → changed_config_files/changed_config_files_inspector.rb} +14 -10
- data/plugins/{config_files/config_files_model.rb → changed_config_files/changed_config_files_model.rb} +1 -1
- data/plugins/{config_files/config_files_renderer.rb → changed_config_files/changed_config_files_renderer.rb} +9 -9
- data/plugins/{config_files/schema/system-description-config-files.schema-v1.json → changed_config_files/schema/system-description-changed-config-files.schema-v1.json} +0 -0
- data/plugins/{config_files/schema/system-description-config-files.schema-v2.json → changed_config_files/schema/system-description-changed-config-files.schema-v2.json} +0 -0
- data/plugins/{config_files/schema/system-description-config-files.schema-v3.json → changed_config_files/schema/system-description-changed-config-files.schema-v3.json} +0 -0
- data/plugins/{config_files/schema/system-description-config-files.schema-v4.json → changed_config_files/schema/system-description-changed-config-files.schema-v4.json} +0 -0
- data/plugins/{config_files/schema/system-description-config-files.schema-v5.json → changed_config_files/schema/system-description-changed-config-files.schema-v5.json} +0 -0
- data/plugins/{config_files/schema/system-description-config-files.schema-v6.json → changed_config_files/schema/system-description-changed-config-files.schema-v6.json} +0 -0
- data/plugins/{config_files/schema/system-description-config-files.schema-v7.json → changed_config_files/schema/system-description-changed-config-files.schema-v7.json} +0 -0
- data/plugins/changed_config_files/schema/system-description-changed-config-files.schema-v8.json +160 -0
- data/plugins/changed_managed_files/changed_managed_files_inspector.rb +6 -2
- data/plugins/changed_managed_files/changed_managed_files_renderer.rb +1 -1
- data/plugins/changed_managed_files/schema/system-description-changed-managed-files.schema-v8.json +160 -0
- data/plugins/environment/schema/system-description-environment.schema-v8.json +17 -0
- data/plugins/groups/groups_inspector.rb +1 -1
- data/plugins/groups/groups_renderer.rb +1 -1
- data/plugins/groups/schema/system-description-groups.schema-v8.json +49 -0
- data/plugins/os/os_inspector.rb +6 -6
- data/plugins/os/os_renderer.rb +1 -1
- data/plugins/os/schema/system-description-os.schema-v8.json +21 -0
- data/plugins/packages/packages_inspector.rb +1 -1
- data/plugins/packages/schema/system-description-packages.schema-v8.json +115 -0
- data/plugins/patterns/patterns.yml +5 -3
- data/plugins/patterns/patterns_inspector.rb +4 -3
- data/plugins/patterns/patterns_renderer.rb +5 -1
- data/plugins/patterns/schema/system-description-patterns.schema-v8.json +58 -0
- data/plugins/repositories/repositories_inspector.rb +2 -1
- data/plugins/repositories/schema/system-description-repositories.schema-v8.json +165 -0
- data/plugins/services/schema/system-description-services.schema-v8.json +93 -0
- data/plugins/services/services.yml +1 -1
- data/plugins/services/services_inspector.rb +1 -1
- data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v8.json +124 -0
- data/plugins/unmanaged_files/unmanaged_files_inspector.rb +9 -4
- data/plugins/unmanaged_files/unmanaged_files_model.rb +12 -5
- data/plugins/unmanaged_files/unmanaged_files_renderer.rb +1 -1
- data/plugins/users/schema/system-description-users.schema-v8.json +86 -0
- data/plugins/users/users_inspector.rb +7 -7
- data/schema/migrations/migrate1to2.rb +4 -4
- data/schema/migrations/migrate2to3.rb +1 -1
- data/schema/migrations/migrate3to4.rb +9 -9
- data/schema/migrations/migrate7to8.rb +47 -0
- data/schema/system-description-global.schema-v8.json +43 -0
- data/workload_mapper/rails/setup/setup.rb.erb +1 -1
- data/workload_mapper/wordpress/setup/setup.rb.erb +1 -1
- metadata +31 -17
- data/html/partials/compare/config_files.html.haml +0 -48
data/lib/serve_html_task.rb
CHANGED
@@ -16,8 +16,21 @@
|
|
16
16
|
# you may find current contact information at www.suse.com
|
17
17
|
|
18
18
|
class ServeHtmlTask
|
19
|
+
def assemble_url(opts)
|
20
|
+
host = if !opts[:public]
|
21
|
+
"127.0.0.1"
|
22
|
+
else
|
23
|
+
begin
|
24
|
+
Socket.gethostbyname(Socket.gethostname).first
|
25
|
+
rescue SocketError
|
26
|
+
Socket.gethostname
|
27
|
+
end
|
28
|
+
end
|
29
|
+
"http://#{host}:#{opts[:port]}/"
|
30
|
+
end
|
31
|
+
|
19
32
|
def serve(system_description_store, opts)
|
20
|
-
url =
|
33
|
+
url = assemble_url(opts)
|
21
34
|
Machinery::Ui.use_pager = false
|
22
35
|
Machinery::Ui.puts <<EOF
|
23
36
|
Trying to start a web server for serving a view on all system descriptions.
|
@@ -26,7 +39,7 @@ The overview of all descriptions is accessible at:
|
|
26
39
|
|
27
40
|
#{url}
|
28
41
|
|
29
|
-
A specific
|
42
|
+
A specific description with the name NAME is accessible at:
|
30
43
|
|
31
44
|
#{url}NAME
|
32
45
|
|
data/lib/server.rb
CHANGED
@@ -50,7 +50,7 @@ class Server < Sinatra::Base
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def scope_meta_info(scope)
|
53
|
-
return ""
|
53
|
+
return "" unless @description[scope]
|
54
54
|
|
55
55
|
" (" \
|
56
56
|
"inspected host: '#{@description[scope].meta.hostname}', " \
|
@@ -229,6 +229,7 @@ class Server < Sinatra::Base
|
|
229
229
|
urls: %w[/site],
|
230
230
|
try: ["index.html"]
|
231
231
|
|
232
|
+
enable :sessions
|
232
233
|
|
233
234
|
get "/descriptions/:id/files/:scope/*" do
|
234
235
|
description = SystemDescription.load(params[:id], settings.system_description_store)
|
@@ -251,6 +252,7 @@ class Server < Sinatra::Base
|
|
251
252
|
end
|
252
253
|
|
253
254
|
get "/" do
|
255
|
+
check_session_for_error
|
254
256
|
descriptions = settings.system_description_store.list
|
255
257
|
@all_descriptions = Hash.new
|
256
258
|
|
@@ -298,11 +300,11 @@ class Server < Sinatra::Base
|
|
298
300
|
elsif @description_a[scope] || @description_b[scope]
|
299
301
|
@meta[:uninspected] ||= Hash.new
|
300
302
|
|
301
|
-
|
303
|
+
unless @description_a[scope]
|
302
304
|
@meta[:uninspected][@description_a.name] ||= Array.new
|
303
305
|
@meta[:uninspected][@description_a.name] << scope
|
304
306
|
end
|
305
|
-
|
307
|
+
unless @description_b[scope]
|
306
308
|
@meta[:uninspected][@description_b.name] ||= Array.new
|
307
309
|
@meta[:uninspected][@description_b.name] << scope
|
308
310
|
end
|
@@ -328,17 +330,35 @@ class Server < Sinatra::Base
|
|
328
330
|
end
|
329
331
|
|
330
332
|
get "/:id" do
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
333
|
+
begin
|
334
|
+
@description = SystemDescription.load(params[:id], settings.system_description_store)
|
335
|
+
rescue Machinery::Errors::SystemDescriptionNotFound => e
|
336
|
+
session[:error] = e.to_s
|
337
|
+
redirect "/"
|
338
|
+
rescue Machinery::Errors::SystemDescriptionIncompatible => e
|
339
|
+
@error = e
|
340
|
+
haml File.read(File.join(Machinery::ROOT, "html/upgrade.html.haml"))
|
341
|
+
else
|
342
|
+
diffs_dir = @description.scope_file_store("analyze/changed_config_files_diffs").path
|
343
|
+
if @description.changed_config_files && diffs_dir
|
344
|
+
# Enrich description with the config file diffs
|
345
|
+
@description.changed_config_files.each do |file|
|
346
|
+
path = File.join(diffs_dir, file.name + ".diff")
|
347
|
+
file.diff = diff_to_object(File.read(path)) if File.exist?(path)
|
348
|
+
end
|
339
349
|
end
|
350
|
+
|
351
|
+
haml File.read(File.join(Machinery::ROOT, "html/index.html.haml"))
|
340
352
|
end
|
353
|
+
end
|
354
|
+
|
355
|
+
private
|
341
356
|
|
342
|
-
|
357
|
+
def check_session_for_error
|
358
|
+
if session[:error]
|
359
|
+
@errors ||= Array.new
|
360
|
+
@errors.push(session[:error])
|
361
|
+
session.clear
|
362
|
+
end
|
343
363
|
end
|
344
364
|
end
|
data/lib/system.rb
CHANGED
data/lib/system_description.rb
CHANGED
@@ -26,10 +26,10 @@
|
|
26
26
|
# The sub directories storing the data for specific scopes are handled by the
|
27
27
|
# ScopeFileStore class.
|
28
28
|
class SystemDescription < Machinery::Object
|
29
|
-
CURRENT_FORMAT_VERSION =
|
29
|
+
CURRENT_FORMAT_VERSION = 8
|
30
30
|
EXTRACTABLE_SCOPES = [
|
31
31
|
"changed_managed_files",
|
32
|
-
"
|
32
|
+
"changed_config_files",
|
33
33
|
"unmanaged_files"
|
34
34
|
]
|
35
35
|
|
@@ -49,7 +49,7 @@ class SystemDescription < Machinery::Object
|
|
49
49
|
description = from_hash(name, store, manifest.to_hash)
|
50
50
|
description.validate_file_data!
|
51
51
|
|
52
|
-
|
52
|
+
unless options[:skip_format_compatibility]
|
53
53
|
description.validate_format_compatibility
|
54
54
|
end
|
55
55
|
|
@@ -62,12 +62,12 @@ class SystemDescription < Machinery::Object
|
|
62
62
|
# loading of the system description succeeds.
|
63
63
|
def load(name, store, options = {})
|
64
64
|
manifest = Manifest.load(name, store.manifest_path(name))
|
65
|
-
manifest.validate
|
65
|
+
manifest.validate unless options[:skip_validation]
|
66
66
|
|
67
67
|
description = from_hash(name, store, manifest.to_hash)
|
68
|
-
description.validate_file_data
|
68
|
+
description.validate_file_data unless options[:skip_validation]
|
69
69
|
|
70
|
-
description.validate_format_compatibility
|
70
|
+
description.validate_format_compatibility unless options[:skip_format_compatibility]
|
71
71
|
|
72
72
|
description
|
73
73
|
end
|
@@ -90,7 +90,7 @@ class SystemDescription < Machinery::Object
|
|
90
90
|
begin
|
91
91
|
json_format_version = hash["meta"]["format_version"] if hash["meta"]
|
92
92
|
description = SystemDescription.new(name, store, hash)
|
93
|
-
rescue NameError, TypeError
|
93
|
+
rescue NameError, TypeError, RuntimeError
|
94
94
|
if json_format_version && json_format_version != SystemDescription::CURRENT_FORMAT_VERSION
|
95
95
|
raise Machinery::Errors::SystemDescriptionIncompatible.new(name, json_format_version)
|
96
96
|
else
|
@@ -148,7 +148,7 @@ class SystemDescription < Machinery::Object
|
|
148
148
|
end
|
149
149
|
|
150
150
|
def validate_format_compatibility
|
151
|
-
|
151
|
+
unless compatible?
|
152
152
|
raise Machinery::Errors::SystemDescriptionIncompatible.new(name, format_version)
|
153
153
|
end
|
154
154
|
end
|
@@ -197,7 +197,7 @@ class SystemDescription < Machinery::Object
|
|
197
197
|
SystemDescription.validate_name(name)
|
198
198
|
@store.directory_for(name)
|
199
199
|
path = @store.manifest_path(name)
|
200
|
-
created = !File.
|
200
|
+
created = !File.exist?(path)
|
201
201
|
File.write(path, to_json)
|
202
202
|
File.chmod(0600, path) if created
|
203
203
|
end
|
@@ -207,7 +207,7 @@ class SystemDescription < Machinery::Object
|
|
207
207
|
end
|
208
208
|
|
209
209
|
def set_filter_definitions(command, filter)
|
210
|
-
|
210
|
+
unless ["inspect"].include?(command)
|
211
211
|
raise Machinery::Errors::MachineryError.new(
|
212
212
|
"Storing the filter for command '#{command}' is not supported."
|
213
213
|
)
|
@@ -221,12 +221,14 @@ class SystemDescription < Machinery::Object
|
|
221
221
|
end
|
222
222
|
|
223
223
|
def assert_scopes(*scopes)
|
224
|
-
missing = scopes.select { |scope| !self[scope] }
|
224
|
+
missing = scopes.select { |scope| !self[scope] }.map { |scope|
|
225
|
+
Machinery::Ui.internal_scope_list_to_string(scope)
|
226
|
+
}
|
225
227
|
|
226
228
|
unless missing.empty?
|
227
229
|
raise Machinery::Errors::SystemDescriptionError.new(
|
228
230
|
"The system description misses the following" \
|
229
|
-
" #{Machinery.pluralize(missing.size, "scope")}
|
231
|
+
" #{Machinery.pluralize(missing.size, "scope")}: #{missing.join(",")}."
|
230
232
|
)
|
231
233
|
end
|
232
234
|
end
|
@@ -254,7 +256,7 @@ class SystemDescription < Machinery::Object
|
|
254
256
|
|
255
257
|
def validate_file_data
|
256
258
|
errors = FileValidator.new(to_hash, description_path).validate
|
257
|
-
|
259
|
+
unless errors.empty?
|
258
260
|
Machinery::Ui.warn("Warning: File validation errors:")
|
259
261
|
Machinery::Ui.warn("Error validating description '#{@name}'\n\n")
|
260
262
|
Machinery::Ui.warn(errors.join("\n"))
|
@@ -263,7 +265,7 @@ class SystemDescription < Machinery::Object
|
|
263
265
|
|
264
266
|
def validate_file_data!
|
265
267
|
errors = FileValidator.new(to_hash, description_path).validate
|
266
|
-
|
268
|
+
unless errors.empty?
|
267
269
|
e = Machinery::Errors::SystemDescriptionValidationFailed.new(errors)
|
268
270
|
e.header = "Error validating description '#{@name}'"
|
269
271
|
raise e
|
@@ -51,8 +51,9 @@ class SystemDescriptionStore
|
|
51
51
|
|
52
52
|
def list
|
53
53
|
Dir["#{@base_path}/*"].
|
54
|
-
select { |item| File.
|
55
|
-
|
54
|
+
select { |item| File.exist?(manifest_path(File.basename(item))) }.map { |item|
|
55
|
+
File.basename(item)
|
56
|
+
}.sort
|
56
57
|
end
|
57
58
|
|
58
59
|
def remove(name)
|
@@ -124,9 +125,7 @@ class SystemDescriptionStore
|
|
124
125
|
private
|
125
126
|
|
126
127
|
def create_dir(dir, mode = 0700)
|
127
|
-
unless Dir.
|
128
|
-
FileUtils.mkdir_p(dir, mode: mode)
|
129
|
-
end
|
128
|
+
FileUtils.mkdir_p(dir, mode: mode) unless Dir.exist?(dir)
|
130
129
|
end
|
131
130
|
|
132
131
|
def get_backup_name(description_name)
|
@@ -142,7 +141,7 @@ class SystemDescriptionStore
|
|
142
141
|
end
|
143
142
|
|
144
143
|
def validate_existence_of_description(description_name)
|
145
|
-
|
144
|
+
unless list.include?(description_name)
|
146
145
|
raise Machinery::Errors::SystemDescriptionNotFound.new(
|
147
146
|
"System description '#{description_name}' does not exist."
|
148
147
|
)
|
data/lib/ui.rb
CHANGED
data/lib/upgrade_format_task.rb
CHANGED
@@ -50,7 +50,7 @@ class UpgradeFormatTask
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
|
53
|
+
unless errors.empty?
|
54
54
|
Machinery.logger.error errors.join("\n")
|
55
55
|
exception = Machinery::Errors::UpgradeFailed.new("\n" + errors.join("\n") +
|
56
56
|
Hint.to_string(:upgrade_format_force, name: name || "--all"))
|
@@ -61,7 +61,7 @@ class UpgradeFormatTask
|
|
61
61
|
if migrations_done > 0
|
62
62
|
Machinery::Ui.puts(
|
63
63
|
"Upgraded #{migrations_done} " \
|
64
|
-
"#{Machinery
|
64
|
+
"#{Machinery.pluralize(migrations_done, "system description", "system descriptions")}."
|
65
65
|
)
|
66
66
|
else
|
67
67
|
Machinery::Ui.puts "No system descriptions were upgraded."
|
data/lib/version.rb
CHANGED
data/lib/workload_mapper.rb
CHANGED
@@ -62,14 +62,14 @@ class WorkloadMapper
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def identify_workloads(system_description)
|
65
|
-
system_description.assert_scopes("services", "unmanaged_files", "
|
65
|
+
system_description.assert_scopes("services", "unmanaged_files", "changed_config_files")
|
66
66
|
|
67
|
-
["unmanaged_files", "
|
68
|
-
if
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
67
|
+
["unmanaged_files", "changed_config_files"].each do |scope|
|
68
|
+
next if system_description.scope_extracted?(scope)
|
69
|
+
|
70
|
+
raise Machinery::Errors::SystemDescriptionError.new(
|
71
|
+
"Required scope: '#{scope}' was not extracted. Can't continue."
|
72
|
+
)
|
73
73
|
end
|
74
74
|
|
75
75
|
workloads = {}
|
@@ -94,19 +94,19 @@ class WorkloadMapper
|
|
94
94
|
|
95
95
|
def extract(system_description, workloads, path)
|
96
96
|
Dir.mktmpdir do |dir|
|
97
|
-
|
97
|
+
unless workloads.select { |_, w| w["data"] }.empty?
|
98
98
|
system_description.unmanaged_files.export_files_as_tarballs(dir)
|
99
99
|
workloads.each do |workload, config|
|
100
100
|
config.fetch("data", {}).each do |origin, destination|
|
101
101
|
file = system_description.unmanaged_files.find { |f| f.name == origin }
|
102
|
-
file ||= system_description.
|
102
|
+
file ||= system_description.changed_config_files.find { |f| f.name == origin }
|
103
103
|
if file && file.directory?
|
104
104
|
tgz_file = File.join(dir, "trees", "#{origin.chop}.tgz")
|
105
105
|
output_path = File.join(path, workload, destination)
|
106
106
|
FileUtils.mkdir_p(output_path)
|
107
107
|
strip_number = origin.split("/").size - 1
|
108
108
|
Cheetah.run("tar", "zxf", tgz_file, "-C", output_path, "--strip=#{strip_number}")
|
109
|
-
|
109
|
+
copy_workload_changed_config_files(workload, output_path)
|
110
110
|
end
|
111
111
|
if file && file.file?
|
112
112
|
output_path = File.join(path, workload, destination, origin)
|
@@ -121,7 +121,7 @@ class WorkloadMapper
|
|
121
121
|
|
122
122
|
private
|
123
123
|
|
124
|
-
def
|
124
|
+
def copy_workload_changed_config_files(workload, path)
|
125
125
|
FileUtils.cp_r(File.join(workload_mapper_path, workload, "config", "."), path)
|
126
126
|
end
|
127
127
|
|
data/lib/zypper.rb
CHANGED
@@ -77,7 +77,7 @@ class Zypper
|
|
77
77
|
raw_xml = call_zypper "-x", "download", package, stdout: :capture
|
78
78
|
|
79
79
|
xml = REXML::Document.new(raw_xml)
|
80
|
-
xml.elements["//localfile"].attributes["path"]
|
80
|
+
xml.elements["//localfile"].attributes["path"] if xml.elements["//localfile"]
|
81
81
|
end
|
82
82
|
|
83
83
|
def version
|
data/machinery-helper/Rakefile
CHANGED
@@ -24,5 +24,5 @@ HELPER_DIR = File.expand_path(File.dirname(__FILE__))
|
|
24
24
|
desc "Build the helper if needed"
|
25
25
|
task :build do
|
26
26
|
helper_builder = HelperBuilder.new(HELPER_DIR)
|
27
|
-
raise "Error: Build of Machinery helper failed"
|
27
|
+
raise "Error: Build of Machinery helper failed" unless helper_builder.run_build
|
28
28
|
end
|
data/machinery-helper/version.go
CHANGED
Binary file
|
@@ -12,8 +12,8 @@
|
|
12
12
|
The `analyze` subcommand analyzes an existing system description and enriches
|
13
13
|
it with additional information. Supported operations are:
|
14
14
|
|
15
|
-
* `config-
|
16
|
-
Generates the diffs between the extracted changed
|
15
|
+
* `changed-config-files-diffs`:
|
16
|
+
Generates the diffs between the extracted changed configuration files from the
|
17
17
|
system and the original versions from the RPM packages.
|
18
18
|
The diffs can be shown using `machinery show --show-diffs`
|
19
19
|
|
@@ -34,4 +34,4 @@ it with additional information. Supported operations are:
|
|
34
34
|
|
35
35
|
* Analyze the config file diffs for the `myhost` system description:
|
36
36
|
|
37
|
-
$ `machinery` analyze myhost --operation=config-
|
37
|
+
$ `machinery` analyze myhost --operation=changed-config-files-diffs
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
## SYNOPSIS
|
5
5
|
|
6
|
-
`machinery compare` [-s SCOPE | --scope=SCOPE] [-e
|
6
|
+
`machinery compare` [-s SCOPE | --scope=SCOPE] [-e IGNORE-SCOPE | --ignore-scope=IGNORE-SCOPE] [--no-pager] [--show-all] [--html] NAME1 NAME2
|
7
7
|
|
8
8
|
`machinery` help compare
|
9
9
|
|
@@ -29,7 +29,7 @@ be used to limit the output to the given scopes.
|
|
29
29
|
Limit output to the specified scope.
|
30
30
|
See the [Scope section](#Scopes) for more information.
|
31
31
|
|
32
|
-
* `-e SCOPE`, `--
|
32
|
+
* `-e SCOPE`, `--ignore-scope=IGNORE-SCOPE` (optional):
|
33
33
|
Skip output of the specified scope.
|
34
34
|
See the [Scope section](#Scopes) for more information.
|
35
35
|
|
@@ -43,7 +43,7 @@ trigger errors.
|
|
43
43
|
Inspect image for specified scope.
|
44
44
|
See the [Scope section](#Scopes) for more information.
|
45
45
|
|
46
|
-
* `-e SCOPE`, `--
|
46
|
+
* `-e SCOPE`, `--ignore-scope=IGNORE-SCOPE` (optional):
|
47
47
|
Inspect image for all scopes except the specified scope.
|
48
48
|
See the [Scope section](#Scopes) for more information.
|
49
49
|
|
@@ -20,6 +20,9 @@ The system data is structured into scopes, controlled by the
|
|
20
20
|
Machinery will always inspect all specified scopes, and skip scopes which
|
21
21
|
trigger errors.
|
22
22
|
|
23
|
+
**Note**:
|
24
|
+
Tasks on Debian-like systems are treated as patterns.
|
25
|
+
|
23
26
|
|
24
27
|
## ARGUMENTS
|
25
28
|
|
@@ -38,7 +41,7 @@ trigger errors.
|
|
38
41
|
Inspect system for specified scope.
|
39
42
|
See the [Scope section](machinery_main_scopes.1/index.html) for more information.
|
40
43
|
|
41
|
-
* `-e SCOPE`, `--
|
44
|
+
* `-e SCOPE`, `--ignore-scope=IGNORE-SCOPE` (optional):
|
42
45
|
Inspect system for all scopes except the specified scope.
|
43
46
|
See the [Scope section](machinery_main_scopes.1/index.html) for more information.
|
44
47
|
|