machinery-tool 1.19.0 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +8 -0
  4. data/html/{upgrade.html.haml → exception.html.haml} +2 -6
  5. data/lib/html.rb +10 -6
  6. data/lib/renderer.rb +5 -0
  7. data/lib/server.rb +12 -2
  8. data/lib/system_description.rb +4 -2
  9. data/lib/version.rb +1 -1
  10. data/machinery-helper/version.go +1 -1
  11. data/man/generated/machinery.1.gz +0 -0
  12. data/manual/site/sitemap.xml +23 -23
  13. data/plugins/changed_config_files/schema/system-description-changed-config-files.schema-v9.json +160 -0
  14. data/plugins/changed_managed_files/schema/system-description-changed-managed-files.schema-v9.json +160 -0
  15. data/plugins/environment/schema/system-description-environment.schema-v9.json +17 -0
  16. data/plugins/groups/groups_renderer.rb +2 -0
  17. data/plugins/groups/schema/system-description-groups.schema-v9.json +49 -0
  18. data/plugins/os/schema/system-description-os.schema-v9.json +21 -0
  19. data/plugins/packages/packages_renderer.rb +2 -0
  20. data/plugins/packages/schema/system-description-packages.schema-v9.json +115 -0
  21. data/plugins/patterns/schema/system-description-patterns.schema-v9.json +58 -0
  22. data/plugins/repositories/repositories_renderer.rb +2 -0
  23. data/plugins/repositories/schema/system-description-repositories.schema-v9.json +165 -0
  24. data/plugins/services/schema/system-description-services.schema-v9.json +93 -0
  25. data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v9.json +124 -0
  26. data/plugins/users/schema/system-description-users.schema-v9.json +86 -0
  27. data/plugins/users/users_renderer.rb +4 -0
  28. data/schema/migrations/migrate7to8.rb +1 -1
  29. data/schema/migrations/migrate8to9.rb +35 -0
  30. data/schema/system-description-global.schema-v9.json +43 -0
  31. data/tools/go.rb +18 -6
  32. metadata +16 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d349debbcb3d723bc63b0d88e167c740eefba7d
4
- data.tar.gz: 7916e14996d43eaa7573874248a41e5eb951f70c
3
+ metadata.gz: 19148ad851542ec6f2b171ffcab79b0d06b81486
4
+ data.tar.gz: ba8adee56e97a903430afd5afc57a2997191c721
5
5
  SHA512:
6
- metadata.gz: 72c3fb80b1ff276026fe17984ec495ae0ac5b3f5d4f6ce09a459eacb5cd7a968196f1074024a27d0e79e94ab1d9b6bb5973afb42b6deb924bd5c7457a94c32ee
7
- data.tar.gz: 11a7aa1ebd52c08682c01367814b6c114b21685424bc0b94d70c23ed4ce9f2ce711f5277ab6565d0d9f30ec97c29e991d447518566964f178569d1911dc9ed04
6
+ metadata.gz: c40d861d81c6c2f1a3e35a83ea26cc8d0ed4fadd0c94e9cf3a83a3b38fe5b942be7e356a86c6e3368cb1457c4767a069056ead6fb42d10a2a9abd59a17992fc3
7
+ data.tar.gz: 4c4e9ef61bac58ba3284368dbac84b81d43d50395a394bf523232b972c930e156a40c925478e364b087aa11f370648b643a5d3cd944c91a6c81d580a7a008227
data/.git_revision CHANGED
@@ -1 +1 @@
1
- 2b9173e39c9aa1b627b29893d7374eae4378e029
1
+ d0bee698f4e775076d7d4f619d68bb8e347444c5
data/NEWS CHANGED
@@ -1,6 +1,14 @@
1
1
  # Machinery Release Notes
2
2
 
3
3
 
4
+ ## Version 1.20.0 - Fri Apr 22 16:39:04 CEST 2016 - thardeck@suse.de
5
+
6
+ * Added explanation for 'N/A' fields for each scope (gh#SUSE/machinery#1904)
7
+ * Added support of the ARM architectures "armv6l", "armv7l" and "aarch64" to
8
+ our machinery-helper (This requires at least Go version 1.5)
9
+ * Introduce format version 9 which fixes a migration issue (gh#SUSE/machinery#2041)
10
+ https://github.com/SUSE/machinery/blob/master/docs/System-Description-Format.md#version-9
11
+
4
12
  ## Version 1.19.0 - Mon Apr 04 17:06:37 CEST 2016 - thardeck@suse.de
5
13
 
6
14
  * Rename config-files inspector to changed-config-files inspector to be more
@@ -2,7 +2,7 @@
2
2
  %html
3
3
  %head
4
4
  %title
5
- Machinery Error: incompatible system description
5
+ Machinery Error
6
6
  %meta{ :charset => 'utf-8' }
7
7
  %link{ :href => "assets/machinery-base.css", :rel => "stylesheet", :type => "text/css" }
8
8
  %link{ :href => "assets/machinery.css", :rel => "stylesheet", :type => "text/css" }
@@ -23,11 +23,7 @@
23
23
  .col-xs-1
24
24
  .col-xs-10
25
25
  %h1
26
- System Description incompatible!
27
- .row
28
- .col-xs-1
29
- .col-xs-4
30
- Incompatible format version of system description
26
+ = render_exception_title
31
27
  .col-xs-10.nav-buttons
32
28
  %small.pull-right
33
29
  created by
data/lib/html.rb CHANGED
@@ -58,12 +58,6 @@ EOF
58
58
  Server.run! do
59
59
  Thread.new { block.call }
60
60
  end
61
- rescue Errno::EADDRINUSE
62
- servefailed_error = <<-EOF.chomp
63
- Port #{Server.settings.port} is already in use.
64
- You have to stop the already running server on port #{Server.settings.port} first or if you're serving a description with the `serve` command, you can also use the `--port` option.
65
- EOF
66
- raise Machinery::Errors::ServeFailed, servefailed_error
67
61
  rescue SocketError => e
68
62
  servefailed_error = <<-EOF.chomp
69
63
  Cannot start server on #{opts[:ip]}:#{Server.settings.port}.
@@ -81,6 +75,16 @@ You are not allowed to start the server on port #{Server.settings.port}. You nee
81
75
  ERROR: #{e.message}
82
76
  EOF
83
77
  raise Machinery::Errors::ServeFailed, servefailed_error
78
+ rescue Errno::EADDRINUSE, RuntimeError => e
79
+ # If eventmachine is installed it will be used for handling the server. And eventmachine
80
+ # raises RuntimeError instead of Errno::EADDRINUSE, so we have to handle these as well
81
+ raise(e) if e.is_a?(RuntimeError) && !(e.to_s.index("port is in use"))
82
+
83
+ servefailed_error = <<-EOF.chomp
84
+ Port #{Server.settings.port} is already in use.
85
+ You have to stop the already running server on port #{Server.settings.port} first or if you're serving a description with the `serve` command, you can also use the `--port` option.
86
+ EOF
87
+ raise Machinery::Errors::ServeFailed, servefailed_error
84
88
  end
85
89
  remove_output_redirection
86
90
  rescue => e
data/lib/renderer.rb CHANGED
@@ -266,4 +266,9 @@ class Renderer
266
266
  yield
267
267
  @indent -= 2
268
268
  end
269
+
270
+ def na_note(s)
271
+ Machinery::Ui.puts "Note: 'N/A' represents a missing #{s} which could not\n" \
272
+ "be gathered during inspection.\n"
273
+ end
269
274
  end
data/lib/server.rb CHANGED
@@ -335,9 +335,10 @@ class Server < Sinatra::Base
335
335
  rescue Machinery::Errors::SystemDescriptionNotFound => e
336
336
  session[:error] = e.to_s
337
337
  redirect "/"
338
- rescue Machinery::Errors::SystemDescriptionIncompatible => e
338
+ rescue Machinery::Errors::SystemDescriptionIncompatible, \
339
+ Machinery::Errors::SystemDescriptionError => e
339
340
  @error = e
340
- haml File.read(File.join(Machinery::ROOT, "html/upgrade.html.haml"))
341
+ haml File.read(File.join(Machinery::ROOT, "html/exception.html.haml"))
341
342
  else
342
343
  diffs_dir = @description.scope_file_store("analyze/changed_config_files_diffs").path
343
344
  if @description.changed_config_files && diffs_dir
@@ -361,4 +362,13 @@ class Server < Sinatra::Base
361
362
  session.clear
362
363
  end
363
364
  end
365
+
366
+ def render_exception_title
367
+ case @error
368
+ when Machinery::Errors::SystemDescriptionIncompatible
369
+ return "System Description incompatible!"
370
+ when Machinery::Errors::SystemDescriptionError
371
+ return "System Description broken!"
372
+ end
373
+ end
364
374
  end
@@ -26,7 +26,7 @@
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 = 8
29
+ CURRENT_FORMAT_VERSION = 9
30
30
  EXTRACTABLE_SCOPES = [
31
31
  "changed_managed_files",
32
32
  "changed_config_files",
@@ -94,7 +94,9 @@ class SystemDescription < Machinery::Object
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
97
- raise Machinery::Errors::SystemDescriptionError.new
97
+ raise Machinery::Errors::SystemDescriptionError.new(
98
+ "#{name}: This description is broken."
99
+ )
98
100
  end
99
101
  end
100
102
 
data/lib/version.rb CHANGED
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Machinery
19
19
 
20
- VERSION = "1.19.0"
20
+ VERSION = "1.20.0"
21
21
 
22
22
  end
@@ -2,4 +2,4 @@
2
2
 
3
3
  package main
4
4
 
5
- const VERSION = "2b9173e39c9aa1b627b29893d7374eae4378e029"
5
+ const VERSION = "d0bee698f4e775076d7d4f619d68bb8e347444c5"
Binary file
@@ -4,7 +4,7 @@
4
4
 
5
5
  <url>
6
6
  <loc>None/docs/</loc>
7
- <lastmod>2016-04-04</lastmod>
7
+ <lastmod>2016-04-22</lastmod>
8
8
  <changefreq>daily</changefreq>
9
9
  </url>
10
10
 
@@ -13,25 +13,25 @@
13
13
 
14
14
  <url>
15
15
  <loc>None/machinery_main_general.1/</loc>
16
- <lastmod>2016-04-04</lastmod>
16
+ <lastmod>2016-04-22</lastmod>
17
17
  <changefreq>daily</changefreq>
18
18
  </url>
19
19
 
20
20
  <url>
21
21
  <loc>None/machinery_main_scopes.1/</loc>
22
- <lastmod>2016-04-04</lastmod>
22
+ <lastmod>2016-04-22</lastmod>
23
23
  <changefreq>daily</changefreq>
24
24
  </url>
25
25
 
26
26
  <url>
27
27
  <loc>None/machinery_main_usecases.1/</loc>
28
- <lastmod>2016-04-04</lastmod>
28
+ <lastmod>2016-04-22</lastmod>
29
29
  <changefreq>daily</changefreq>
30
30
  </url>
31
31
 
32
32
  <url>
33
33
  <loc>None/machinery_security_implications.1/</loc>
34
- <lastmod>2016-04-04</lastmod>
34
+ <lastmod>2016-04-22</lastmod>
35
35
  <changefreq>daily</changefreq>
36
36
  </url>
37
37
 
@@ -41,109 +41,109 @@
41
41
 
42
42
  <url>
43
43
  <loc>None/machinery-analyze.1/</loc>
44
- <lastmod>2016-04-04</lastmod>
44
+ <lastmod>2016-04-22</lastmod>
45
45
  <changefreq>daily</changefreq>
46
46
  </url>
47
47
 
48
48
  <url>
49
49
  <loc>None/machinery-build.1/</loc>
50
- <lastmod>2016-04-04</lastmod>
50
+ <lastmod>2016-04-22</lastmod>
51
51
  <changefreq>daily</changefreq>
52
52
  </url>
53
53
 
54
54
  <url>
55
55
  <loc>None/machinery-compare.1/</loc>
56
- <lastmod>2016-04-04</lastmod>
56
+ <lastmod>2016-04-22</lastmod>
57
57
  <changefreq>daily</changefreq>
58
58
  </url>
59
59
 
60
60
  <url>
61
61
  <loc>None/machinery-config.1/</loc>
62
- <lastmod>2016-04-04</lastmod>
62
+ <lastmod>2016-04-22</lastmod>
63
63
  <changefreq>daily</changefreq>
64
64
  </url>
65
65
 
66
66
  <url>
67
67
  <loc>None/machinery-copy.1/</loc>
68
- <lastmod>2016-04-04</lastmod>
68
+ <lastmod>2016-04-22</lastmod>
69
69
  <changefreq>daily</changefreq>
70
70
  </url>
71
71
 
72
72
  <url>
73
73
  <loc>None/machinery-deploy.1/</loc>
74
- <lastmod>2016-04-04</lastmod>
74
+ <lastmod>2016-04-22</lastmod>
75
75
  <changefreq>daily</changefreq>
76
76
  </url>
77
77
 
78
78
  <url>
79
79
  <loc>None/machinery-export-autoyast.1/</loc>
80
- <lastmod>2016-04-04</lastmod>
80
+ <lastmod>2016-04-22</lastmod>
81
81
  <changefreq>daily</changefreq>
82
82
  </url>
83
83
 
84
84
  <url>
85
85
  <loc>None/machinery-export-kiwi.1/</loc>
86
- <lastmod>2016-04-04</lastmod>
86
+ <lastmod>2016-04-22</lastmod>
87
87
  <changefreq>daily</changefreq>
88
88
  </url>
89
89
 
90
90
  <url>
91
91
  <loc>None/machinery-inspect.1/</loc>
92
- <lastmod>2016-04-04</lastmod>
92
+ <lastmod>2016-04-22</lastmod>
93
93
  <changefreq>daily</changefreq>
94
94
  </url>
95
95
 
96
96
  <url>
97
97
  <loc>None/machinery-inspect-docker.1/</loc>
98
- <lastmod>2016-04-04</lastmod>
98
+ <lastmod>2016-04-22</lastmod>
99
99
  <changefreq>daily</changefreq>
100
100
  </url>
101
101
 
102
102
  <url>
103
103
  <loc>None/machinery-list.1/</loc>
104
- <lastmod>2016-04-04</lastmod>
104
+ <lastmod>2016-04-22</lastmod>
105
105
  <changefreq>daily</changefreq>
106
106
  </url>
107
107
 
108
108
  <url>
109
109
  <loc>None/machinery-man.1/</loc>
110
- <lastmod>2016-04-04</lastmod>
110
+ <lastmod>2016-04-22</lastmod>
111
111
  <changefreq>daily</changefreq>
112
112
  </url>
113
113
 
114
114
  <url>
115
115
  <loc>None/machinery-move.1/</loc>
116
- <lastmod>2016-04-04</lastmod>
116
+ <lastmod>2016-04-22</lastmod>
117
117
  <changefreq>daily</changefreq>
118
118
  </url>
119
119
 
120
120
  <url>
121
121
  <loc>None/machinery-remove.1/</loc>
122
- <lastmod>2016-04-04</lastmod>
122
+ <lastmod>2016-04-22</lastmod>
123
123
  <changefreq>daily</changefreq>
124
124
  </url>
125
125
 
126
126
  <url>
127
127
  <loc>None/machinery-serve.1/</loc>
128
- <lastmod>2016-04-04</lastmod>
128
+ <lastmod>2016-04-22</lastmod>
129
129
  <changefreq>daily</changefreq>
130
130
  </url>
131
131
 
132
132
  <url>
133
133
  <loc>None/machinery-show.1/</loc>
134
- <lastmod>2016-04-04</lastmod>
134
+ <lastmod>2016-04-22</lastmod>
135
135
  <changefreq>daily</changefreq>
136
136
  </url>
137
137
 
138
138
  <url>
139
139
  <loc>None/machinery-upgrade-format.1/</loc>
140
- <lastmod>2016-04-04</lastmod>
140
+ <lastmod>2016-04-22</lastmod>
141
141
  <changefreq>daily</changefreq>
142
142
  </url>
143
143
 
144
144
  <url>
145
145
  <loc>None/machinery-validate.1/</loc>
146
- <lastmod>2016-04-04</lastmod>
146
+ <lastmod>2016-04-22</lastmod>
147
147
  <changefreq>daily</changefreq>
148
148
  </url>
149
149
 
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+
4
+ "type": "object",
5
+ "required": [
6
+ "_elements"
7
+ ],
8
+ "properties": {
9
+ "_attributes": {
10
+ "type": "object",
11
+ "required": [
12
+ "extracted"
13
+ ],
14
+ "properties": {
15
+ "extracted": {
16
+ "type": "boolean"
17
+ }
18
+ }
19
+ },
20
+ "_elements": {
21
+ "type": "array",
22
+ "items" : {
23
+ "type": "object",
24
+ "required": ["name", "package_name", "package_version"],
25
+ "properties": {
26
+ "name": {
27
+ "type": "string"
28
+ },
29
+ "package_name": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "package_version": {
34
+ "type": "string",
35
+ "minLength": 1
36
+ }
37
+ },
38
+ "oneOf": [
39
+ { "$ref": "#/definitions/file_changed" },
40
+ { "$ref": "#/definitions/file_error" }
41
+ ]
42
+ }
43
+ }
44
+ },
45
+ "definitions": {
46
+ "file_changed": {
47
+ "required": ["status"],
48
+ "properties": {
49
+ "status": {
50
+ "enum": ["changed"]
51
+ }
52
+ },
53
+ "oneOf": [
54
+ { "$ref": "#/definitions/file_changed_modified" },
55
+ { "$ref": "#/definitions/link_changed_modified" },
56
+ { "$ref": "#/definitions/file_changed_deleted" }
57
+ ]
58
+ },
59
+ "file_changed_modified": {
60
+ "required": ["changes", "mode", "user", "group", "type"],
61
+ "properties": {
62
+ "changes": {
63
+ "type": "array",
64
+ "items": {
65
+ "enum": [
66
+ "size",
67
+ "mode",
68
+ "md5",
69
+ "device_number",
70
+ "link_path",
71
+ "user",
72
+ "group",
73
+ "time",
74
+ "capabilities",
75
+ "replaced",
76
+ "other_rpm_changes"
77
+ ]
78
+ },
79
+ "minItems": 1
80
+ },
81
+ "mode": {
82
+ "type": "string",
83
+ "pattern": "^[0-7]{3,4}$"
84
+ },
85
+ "user": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "group": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "type": {
94
+ "enum": ["file", "dir"]
95
+ }
96
+ }
97
+ },
98
+ "link_changed_modified": {
99
+ "required": ["target", "changes", "mode", "user", "group", "type"],
100
+ "properties": {
101
+ "changes": {
102
+ "type": "array",
103
+ "items": {
104
+ "enum": [
105
+ "size",
106
+ "mode",
107
+ "md5",
108
+ "device_number",
109
+ "link_path",
110
+ "user",
111
+ "group",
112
+ "time",
113
+ "capabilities",
114
+ "replaced",
115
+ "other_rpm_changes"
116
+ ]
117
+ },
118
+ "minItems": 1
119
+ },
120
+ "mode": {
121
+ "type": "string",
122
+ "pattern": "^[0-7]{3,4}$"
123
+ },
124
+ "user": {
125
+ "type": "string",
126
+ "minLength": 1
127
+ },
128
+ "group": {
129
+ "type": "string",
130
+ "minLength": 1
131
+ },
132
+ "type": {
133
+ "enum": ["link"]
134
+ },
135
+ "target": {
136
+ "type": "string"
137
+ }
138
+ }
139
+ },
140
+ "file_changed_deleted": {
141
+ "required": ["changes"],
142
+ "properties": {
143
+ "changes": {
144
+ "enum": [["deleted"]]
145
+ }
146
+ }
147
+ },
148
+ "file_error": {
149
+ "required": ["status", "error_message"],
150
+ "properties": {
151
+ "status": {
152
+ "enum": ["error"]
153
+ },
154
+ "error_message": {
155
+ "type": "string"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }