machinery-tool 1.21.0 → 1.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +8 -0
  4. data/html/index.html.haml +8 -7
  5. data/html/partials/changed_config_files.html.haml +1 -1
  6. data/html/partials/changed_managed_files.html.haml +1 -1
  7. data/html/partials/unmanaged_files.html.haml +2 -2
  8. data/lib/cli.rb +26 -4
  9. data/lib/diff_widget.rb +73 -0
  10. data/lib/dpkg_database.rb +16 -1
  11. data/lib/haml_helpers.rb +60 -0
  12. data/lib/kiwi_config.rb +7 -0
  13. data/lib/machinery.rb +3 -0
  14. data/lib/man_task.rb +3 -2
  15. data/lib/move_task.rb +1 -0
  16. data/lib/remote_system.rb +4 -0
  17. data/lib/server.rb +2 -105
  18. data/lib/static_html.rb +75 -0
  19. data/lib/system.rb +2 -1
  20. data/lib/system_description.rb +10 -0
  21. data/lib/version.rb +1 -1
  22. data/machinery-helper/version.go +1 -1
  23. data/man/generated/machinery.1.gz +0 -0
  24. data/manual/docs/README.md +8 -16
  25. data/manual/docs/docs.md +42 -4
  26. data/manual/docs/index.html +6 -2
  27. data/manual/docs/machinery-analyze.1.md +6 -10
  28. data/manual/docs/machinery-build.1.md +7 -11
  29. data/manual/docs/machinery-compare.1.md +5 -10
  30. data/manual/docs/machinery-config.1.md +4 -7
  31. data/manual/docs/machinery-copy.1.md +5 -10
  32. data/manual/docs/machinery-deploy.1.md +8 -12
  33. data/manual/docs/machinery-export-autoyast.1.md +10 -17
  34. data/manual/docs/machinery-export-html.1.md +32 -0
  35. data/manual/docs/machinery-export-kiwi.1.md +7 -12
  36. data/manual/docs/{machinery-inspect-docker.1.md → machinery-inspect-container.1.md} +10 -15
  37. data/manual/docs/machinery-inspect.1.md +10 -15
  38. data/manual/docs/machinery-list.1.md +4 -8
  39. data/manual/docs/machinery-man.1.md +4 -6
  40. data/manual/docs/machinery-move.1.md +4 -8
  41. data/manual/docs/machinery-remove.1.md +5 -10
  42. data/manual/docs/machinery-serve.1.md +5 -9
  43. data/manual/docs/machinery-show.1.md +7 -11
  44. data/manual/docs/machinery-upgrade-format.1.md +5 -9
  45. data/manual/docs/machinery-validate.1.md +4 -8
  46. data/manual/docs/machinery_main_general.1.md +33 -51
  47. data/manual/docs/machinery_main_scopes.1.md +13 -14
  48. data/manual/docs/{machinery_security_implications.1.md → machinery_main_security_implications.1.md} +15 -15
  49. data/manual/docs/machinery_main_usecases.1.md +2 -30
  50. data/manual/mkdocs.yml +9 -9
  51. data/manual/site/docs/index.html +71 -25
  52. data/manual/site/index.html +6 -2
  53. data/manual/site/machinery-analyze.1/index.html +34 -27
  54. data/manual/site/machinery-build.1/index.html +35 -28
  55. data/manual/site/machinery-compare.1/index.html +33 -26
  56. data/manual/site/machinery-config.1/index.html +32 -25
  57. data/manual/site/machinery-copy.1/index.html +33 -27
  58. data/manual/site/machinery-deploy.1/index.html +36 -29
  59. data/manual/site/machinery-export-autoyast.1/index.html +38 -32
  60. data/manual/site/machinery-export-html.1/index.html +175 -0
  61. data/manual/site/machinery-export-kiwi.1/index.html +35 -28
  62. data/manual/site/machinery-inspect-container.1/index.html +249 -0
  63. data/manual/site/machinery-inspect.1/index.html +38 -31
  64. data/manual/site/machinery-list.1/index.html +32 -25
  65. data/manual/site/machinery-man.1/index.html +32 -26
  66. data/manual/site/machinery-move.1/index.html +32 -25
  67. data/manual/site/machinery-remove.1/index.html +33 -26
  68. data/manual/site/machinery-serve.1/index.html +33 -26
  69. data/manual/site/machinery-show.1/index.html +35 -28
  70. data/manual/site/machinery-upgrade-format.1/index.html +33 -26
  71. data/manual/site/machinery-validate.1/index.html +32 -25
  72. data/manual/site/machinery_main_general.1/index.html +63 -70
  73. data/manual/site/machinery_main_scopes.1/index.html +41 -36
  74. data/manual/site/machinery_main_security_implications.1/index.html +228 -0
  75. data/manual/site/machinery_main_usecases.1/index.html +30 -48
  76. data/manual/site/mkdocs/search_index.json +246 -201
  77. data/manual/site/sitemap.xml +40 -30
  78. data/plugins/os/os_inspector.rb +1 -1
  79. data/plugins/packages/packages.yml +1 -1
  80. data/plugins/patterns/patterns.yml +2 -5
  81. data/plugins/repositories/repositories.yml +2 -2
  82. data/plugins/unmanaged_files/unmanaged_files.yml +3 -3
  83. data/plugins/unmanaged_files/unmanaged_files_renderer.rb +1 -1
  84. metadata +11 -5
  85. data/manual/docs/subcommand-template.1.md +0 -46
@@ -0,0 +1,175 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <link href="../custom.css" rel="stylesheet">
6
+ </head>
7
+ <body id="manpage">
8
+ <div id="back">
9
+ <a href="..">
10
+ <img src="../hand3.png" class="hand3"/>
11
+ <div class="goback">Go back to the web site</div>
12
+ </a>
13
+ </div>
14
+ <div class="mp">
15
+ <div class="nav">
16
+ <ul>
17
+
18
+
19
+ <li class="">
20
+ <a href="../docs/">Welcome</a>
21
+ </li>
22
+
23
+
24
+
25
+
26
+ <li class="">
27
+ <a href="../machinery_main_general.1/">General Overview</a>
28
+ </li>
29
+
30
+
31
+
32
+
33
+ <li class="">
34
+ <a href="../machinery_main_scopes.1/">Scopes</a>
35
+ </li>
36
+
37
+
38
+
39
+
40
+ <li class="">
41
+ <a href="../machinery_main_usecases.1/">Use cases</a>
42
+ </li>
43
+
44
+
45
+
46
+
47
+ <li class="">
48
+ <a href="../machinery_main_security_implications.1/">Security Implications</a>
49
+ </li>
50
+
51
+
52
+
53
+
54
+ <li>Commands
55
+ <ul>
56
+
57
+ <li class="">
58
+ <a href="../machinery-analyze.1/">Analyze</a>
59
+ </li>
60
+
61
+ <li class="">
62
+ <a href="../machinery-build.1/">Build</a>
63
+ </li>
64
+
65
+ <li class="">
66
+ <a href="../machinery-compare.1/">Compare</a>
67
+ </li>
68
+
69
+ <li class="">
70
+ <a href="../machinery-config.1/">Config</a>
71
+ </li>
72
+
73
+ <li class="">
74
+ <a href="../machinery-copy.1/">Copy</a>
75
+ </li>
76
+
77
+ <li class="">
78
+ <a href="../machinery-deploy.1/">Deploy</a>
79
+ </li>
80
+
81
+ <li class="">
82
+ <a href="../machinery-export-autoyast.1/">Export AutoYaST</a>
83
+ </li>
84
+
85
+ <li class="">
86
+ <a href="../machinery-export-kiwi.1/">Export Kiwi</a>
87
+ </li>
88
+
89
+ <li class="current">
90
+ <a href="./">Export HTML</a>
91
+ </li>
92
+
93
+ <li class="">
94
+ <a href="../machinery-inspect.1/">Inspect</a>
95
+ </li>
96
+
97
+ <li class="">
98
+ <a href="../machinery-inspect-container.1/">Inspect Container</a>
99
+ </li>
100
+
101
+ <li class="">
102
+ <a href="../machinery-list.1/">List</a>
103
+ </li>
104
+
105
+ <li class="">
106
+ <a href="../machinery-man.1/">Man</a>
107
+ </li>
108
+
109
+ <li class="">
110
+ <a href="../machinery-move.1/">Move</a>
111
+ </li>
112
+
113
+ <li class="">
114
+ <a href="../machinery-remove.1/">Remove</a>
115
+ </li>
116
+
117
+ <li class="">
118
+ <a href="../machinery-serve.1/">Serve</a>
119
+ </li>
120
+
121
+ <li class="">
122
+ <a href="../machinery-show.1/">Show</a>
123
+ </li>
124
+
125
+ <li class="">
126
+ <a href="../machinery-upgrade-format.1/">Upgrade Format</a>
127
+ </li>
128
+
129
+ <li class="">
130
+ <a href="../machinery-validate.1/">Validate</a>
131
+ </li>
132
+
133
+ </ul>
134
+ </li>
135
+
136
+
137
+
138
+ </ul>
139
+ </div>
140
+ <div class="content">
141
+ <h1 id="export-html-export-system-description-as-html">export-html — Export System Description as HTML</h1>
142
+ <h2 id="synopsis">Synopsis</h2>
143
+ <p><code>machinery export-html</code> -d | --html-dir=DIRECTORY NAME
144
+ --force</p>
145
+ <p><code>machinery</code> help export-html</p>
146
+ <h2 id="description">Description</h2>
147
+ <p>The <code>export-html</code> subcommand exports a stored system description as HTML.</p>
148
+ <h2 id="arguments">Arguments</h2>
149
+ <ul>
150
+ <li><code>NAME</code> (required):
151
+ Name of the system description.</li>
152
+ </ul>
153
+ <h2 id="options">Options</h2>
154
+ <ul>
155
+ <li>
156
+ <p><code>-d DIRECTORY</code>, <code>--html-dir=DIRECTORY</code> (required):
157
+ Write the HTML page and assets to this directory. The directory will
158
+ be created if it does not exist yet.</p>
159
+ </li>
160
+ <li>
161
+ <p><code>--force</code> (optional):
162
+ Delete the directory if it exists and recreate it.</p>
163
+ </li>
164
+ </ul>
165
+ <h2 id="examples">Examples</h2>
166
+ <ul>
167
+ <li>
168
+ <p>Export the <code>myhost</code> system description to <code>/tmp/myhost-html</code>:</p>
169
+ <p>$ <code>machinery</code> export-html --html-dir=/tmp myhost</p>
170
+ </li>
171
+ </ul>
172
+ </div>
173
+ </div>
174
+ </body>
175
+ </html>
@@ -23,26 +23,29 @@
23
23
 
24
24
 
25
25
 
26
- <li>Home
27
- <ul>
28
-
29
- <li class="">
30
- <a href="../machinery_main_general.1/">General</a>
31
- </li>
32
-
33
- <li class="">
34
- <a href="../machinery_main_scopes.1/">Scopes</a>
35
- </li>
36
-
37
- <li class="">
38
- <a href="../machinery_main_usecases.1/">Use cases</a>
39
- </li>
40
-
41
- <li class="">
42
- <a href="../machinery_security_implications.1/">Security Implications</a>
43
- </li>
44
-
45
- </ul>
26
+ <li class="">
27
+ <a href="../machinery_main_general.1/">General Overview</a>
28
+ </li>
29
+
30
+
31
+
32
+
33
+ <li class="">
34
+ <a href="../machinery_main_scopes.1/">Scopes</a>
35
+ </li>
36
+
37
+
38
+
39
+
40
+ <li class="">
41
+ <a href="../machinery_main_usecases.1/">Use cases</a>
42
+ </li>
43
+
44
+
45
+
46
+
47
+ <li class="">
48
+ <a href="../machinery_main_security_implications.1/">Security Implications</a>
46
49
  </li>
47
50
 
48
51
 
@@ -83,12 +86,16 @@
83
86
  <a href="./">Export Kiwi</a>
84
87
  </li>
85
88
 
89
+ <li class="">
90
+ <a href="../machinery-export-html.1/">Export HTML</a>
91
+ </li>
92
+
86
93
  <li class="">
87
94
  <a href="../machinery-inspect.1/">Inspect</a>
88
95
  </li>
89
96
 
90
97
  <li class="">
91
- <a href="../machinery-inspect-docker.1/">Inspect Docker</a>
98
+ <a href="../machinery-inspect-container.1/">Inspect Container</a>
92
99
  </li>
93
100
 
94
101
  <li class="">
@@ -132,19 +139,19 @@
132
139
  </div>
133
140
  <div class="content">
134
141
  <h1 id="export-kiwi-export-system-description-as-kiwi-image-description">export-kiwi — Export System Description as KIWI Image Description</h1>
135
- <h2 id="synopsis">SYNOPSIS</h2>
136
- <p><code>machinery export-kiwi</code> -k | --kiwi-dir NAME
142
+ <h2 id="synopsis">Synopsis</h2>
143
+ <p><code>machinery export-kiwi</code> -k | --kiwi-dir=DIRECTORY NAME
137
144
  --force</p>
138
145
  <p><code>machinery</code> help export-kiwi</p>
139
- <h2 id="description">DESCRIPTION</h2>
146
+ <h2 id="description">Description</h2>
140
147
  <p>The <code>export-kiwi</code> subcommand exports a stored system description as a KIWI
141
148
  image description.</p>
142
- <h2 id="arguments">ARGUMENTS</h2>
149
+ <h2 id="arguments">Arguments</h2>
143
150
  <ul>
144
151
  <li><code>NAME</code> (required):
145
152
  Name of the system description.</li>
146
153
  </ul>
147
- <h2 id="options">OPTIONS</h2>
154
+ <h2 id="options">Options</h2>
148
155
  <ul>
149
156
  <li>
150
157
  <p><code>-k KIWI_DIR</code>, <code>--kiwi-dir=KIWI_DIR</code> (required):
@@ -153,10 +160,10 @@ image description.</p>
153
160
  </li>
154
161
  <li>
155
162
  <p><code>--force</code> (optional):
156
- Overwrite existing system description</p>
163
+ Overwrite an existing output directory.</p>
157
164
  </li>
158
165
  </ul>
159
- <h2 id="examples">EXAMPLES</h2>
166
+ <h2 id="examples">Examples</h2>
160
167
  <ul>
161
168
  <li>
162
169
  <p>Export the <code>myhost</code> system description to <code>/tmp/myhost-kiwi</code>:</p>
@@ -0,0 +1,249 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <link href="../custom.css" rel="stylesheet">
6
+ </head>
7
+ <body id="manpage">
8
+ <div id="back">
9
+ <a href="..">
10
+ <img src="../hand3.png" class="hand3"/>
11
+ <div class="goback">Go back to the web site</div>
12
+ </a>
13
+ </div>
14
+ <div class="mp">
15
+ <div class="nav">
16
+ <ul>
17
+
18
+
19
+ <li class="">
20
+ <a href="../docs/">Welcome</a>
21
+ </li>
22
+
23
+
24
+
25
+
26
+ <li class="">
27
+ <a href="../machinery_main_general.1/">General Overview</a>
28
+ </li>
29
+
30
+
31
+
32
+
33
+ <li class="">
34
+ <a href="../machinery_main_scopes.1/">Scopes</a>
35
+ </li>
36
+
37
+
38
+
39
+
40
+ <li class="">
41
+ <a href="../machinery_main_usecases.1/">Use cases</a>
42
+ </li>
43
+
44
+
45
+
46
+
47
+ <li class="">
48
+ <a href="../machinery_main_security_implications.1/">Security Implications</a>
49
+ </li>
50
+
51
+
52
+
53
+
54
+ <li>Commands
55
+ <ul>
56
+
57
+ <li class="">
58
+ <a href="../machinery-analyze.1/">Analyze</a>
59
+ </li>
60
+
61
+ <li class="">
62
+ <a href="../machinery-build.1/">Build</a>
63
+ </li>
64
+
65
+ <li class="">
66
+ <a href="../machinery-compare.1/">Compare</a>
67
+ </li>
68
+
69
+ <li class="">
70
+ <a href="../machinery-config.1/">Config</a>
71
+ </li>
72
+
73
+ <li class="">
74
+ <a href="../machinery-copy.1/">Copy</a>
75
+ </li>
76
+
77
+ <li class="">
78
+ <a href="../machinery-deploy.1/">Deploy</a>
79
+ </li>
80
+
81
+ <li class="">
82
+ <a href="../machinery-export-autoyast.1/">Export AutoYaST</a>
83
+ </li>
84
+
85
+ <li class="">
86
+ <a href="../machinery-export-kiwi.1/">Export Kiwi</a>
87
+ </li>
88
+
89
+ <li class="">
90
+ <a href="../machinery-export-html.1/">Export HTML</a>
91
+ </li>
92
+
93
+ <li class="">
94
+ <a href="../machinery-inspect.1/">Inspect</a>
95
+ </li>
96
+
97
+ <li class="current">
98
+ <a href="./">Inspect Container</a>
99
+ </li>
100
+
101
+ <li class="">
102
+ <a href="../machinery-list.1/">List</a>
103
+ </li>
104
+
105
+ <li class="">
106
+ <a href="../machinery-man.1/">Man</a>
107
+ </li>
108
+
109
+ <li class="">
110
+ <a href="../machinery-move.1/">Move</a>
111
+ </li>
112
+
113
+ <li class="">
114
+ <a href="../machinery-remove.1/">Remove</a>
115
+ </li>
116
+
117
+ <li class="">
118
+ <a href="../machinery-serve.1/">Serve</a>
119
+ </li>
120
+
121
+ <li class="">
122
+ <a href="../machinery-show.1/">Show</a>
123
+ </li>
124
+
125
+ <li class="">
126
+ <a href="../machinery-upgrade-format.1/">Upgrade Format</a>
127
+ </li>
128
+
129
+ <li class="">
130
+ <a href="../machinery-validate.1/">Validate</a>
131
+ </li>
132
+
133
+ </ul>
134
+ </li>
135
+
136
+
137
+
138
+ </ul>
139
+ </div>
140
+ <div class="content">
141
+ <h1 id="inspect-container-inspect-container">inspect-container — Inspect Container</h1>
142
+ <h2 id="synopsis">Synopsis</h2>
143
+ <p><code>machinery inspect-container</code> [OPTIONS] IMAGENAME</p>
144
+ <p><code>machinery inspect-container</code> [OPTIONS] IMAGEID</p>
145
+ <p><code>machinery</code> help inspect-container</p>
146
+ <h2 id="description">Description</h2>
147
+ <p>The <code>inspect-container</code> command inspects a container image. It creates and starts the container from the provided image before inspection
148
+ and generates a system description from the gathered data. After the inspection the container will be killed and removed again.
149
+ This approach ensures that no containers and images are affected by the inspection.</p>
150
+ <p>Right now the container inspection only supports Docker images.</p>
151
+ <p>The system data is structured into scopes, controlled by the
152
+ <code>--scope</code> option.</p>
153
+ <p><strong>Note</strong>:
154
+ Machinery will always inspect all specified scopes, and skip scopes which
155
+ trigger errors.</p>
156
+ <h2 id="arguments">Arguments</h2>
157
+ <ul>
158
+ <li><code>IMAGENAME / IMAGEID</code> (required):
159
+ The name or ID of the image to be inspected. The provided name or ID will also be
160
+ used as the name of the stored system description unless another name is
161
+ provided with the <code>--name</code> option.</li>
162
+ </ul>
163
+ <h2 id="options">Options</h2>
164
+ <ul>
165
+ <li>
166
+ <p><code>-n NAME</code>, <code>--name=NAME</code> (optional):
167
+ Store the system description under the specified name.</p>
168
+ </li>
169
+ <li>
170
+ <p><code>-s SCOPE</code>, <code>--scope=SCOPE</code> (optional):
171
+ Inspect image for specified scope.
172
+ See the <a href="../machinery_main_scopes.1/">Scope section</a> for more information.</p>
173
+ </li>
174
+ <li>
175
+ <p><code>-e SCOPE</code>, <code>--ignore-scope=IGNORE-SCOPE</code> (optional):
176
+ Inspect image for all scopes except the specified scope.
177
+ See the <a href="../machinery_main_scopes.1/">Scope section</a> for more information.</p>
178
+ </li>
179
+ <li>
180
+ <p><code>-x</code>, <code>--extract-files</code> (optional):
181
+ Extract changed configuration and unmanaged files from the inspected container.
182
+ Shortcut for the combination of <code>--extract-changed-config-files</code>,
183
+ <code>--extract-unmanaged-files</code>, and <code>--extract-changed-managed-files</code></p>
184
+ </li>
185
+ <li>
186
+ <p><code>--extract-changed-config-files</code> (optional):
187
+ Extract changed configuration files from the inspected image.</p>
188
+ </li>
189
+ <li>
190
+ <p><code>--extract-unmanaged-files</code> (optional):
191
+ Extract unmanaged files from the inspected image.</p>
192
+ </li>
193
+ <li>
194
+ <p><code>--extract-changed-managed-files</code> (optional):
195
+ Extract changed managed files from inspected image.</p>
196
+ </li>
197
+ <li>
198
+ <p><code>--skip-files</code> (optional):
199
+ Do not consider given files or directories during inspection. Either provide
200
+ one file or directory name or a list of names separated by commas. You can
201
+ also point to a file which contains a list of files to filter (one per line)
202
+ by adding an '@' before the path, e.g.</p>
203
+ <p>$ <code>machinery</code> inspect-container --skip-files=@/path/to/filter_file myimage</p>
204
+ <p>If a filename contains a comma it needs to be escaped, e.g.</p>
205
+ <p>$ <code>machinery</code> inspect-container --skip-files=/file\,with_comma myimage</p>
206
+ <p><strong>Note</strong>: File or directory names are not expanded, e.g. '../path' is taken
207
+ literally and not expanded.</p>
208
+ </li>
209
+ <li>
210
+ <p><code>--verbose</code> (optional):
211
+ Display the filters which are used during inspection.</p>
212
+ </li>
213
+ </ul>
214
+ <h2 id="prerequisites">Prerequisites</h2>
215
+ <ul>
216
+ <li>
217
+ <p>Inspecting a container requires an image specified by the name or ID.</p>
218
+ </li>
219
+ <li>
220
+ <p>The image to be inspected needs to have the following commands:</p>
221
+ <ul>
222
+ <li><code>rpm</code> or <code>dpkg</code></li>
223
+ <li><code>zypper</code>, <code>yum</code> or <code>apt-cache</code></li>
224
+ <li><code>rsync</code></li>
225
+ <li><code>cat</code></li>
226
+ <li><code>sed</code></li>
227
+ <li><code>find</code></li>
228
+ </ul>
229
+ </li>
230
+ </ul>
231
+ <h2 id="examples">Examples</h2>
232
+ <ul>
233
+ <li>
234
+ <p>Inspect Docker container <code>myimage</code> and save system description under name 'MyContainer':</p>
235
+ <p>$ <code>machinery</code> inspect-container --name=MyContainer myimage</p>
236
+ </li>
237
+ <li>
238
+ <p>Inspect Docker container <code>076f46c1bef1</code> and save system description under name 'MySecondContainer':</p>
239
+ <p>$ <code>machinery</code> inspect-container --name=MySecondContainer 076f46c1bef1</p>
240
+ </li>
241
+ <li>
242
+ <p>Extract changed managed files and save them:</p>
243
+ <p>$ <code>machinery</code> inspect-container --scope=changed-managed-files --extract-files myimage</p>
244
+ </li>
245
+ </ul>
246
+ </div>
247
+ </div>
248
+ </body>
249
+ </html>