machinery-tool 1.23.1 → 1.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +5 -5
  2. data/.git_revision +1 -1
  3. data/NEWS +11 -0
  4. data/export_helpers/kiwi_export_readme.md +3 -3
  5. data/export_helpers/merge_users_and_groups.pl.erb +1 -1
  6. data/lib/build_task.rb +5 -3
  7. data/lib/deploy_task.rb +0 -1
  8. data/lib/exceptions.rb +13 -0
  9. data/lib/kiwi_config.rb +3 -9
  10. data/lib/machinery_helper.rb +15 -1
  11. data/lib/remote_system.rb +4 -2
  12. data/lib/system_description.rb +0 -9
  13. data/lib/version.rb +1 -1
  14. data/machinery-helper/version.go +1 -1
  15. data/man/generated/machinery.1.gz +0 -0
  16. data/manual/docs/index.html +2 -8
  17. data/manual/docs/machinery.ymp +10 -10
  18. data/manual/mkdocs.yml +3 -1
  19. data/manual/site/404.html +145 -0
  20. data/manual/site/css/base.css +324 -0
  21. data/manual/site/css/bootstrap-custom.min.css +1 -0
  22. data/manual/site/css/fixed-positioning.css +0 -0
  23. data/manual/site/css/font-awesome.min.css +4 -0
  24. data/manual/site/docs/index.html +25 -70
  25. data/manual/site/fonts/fontawesome-webfont.eot +0 -0
  26. data/manual/site/fonts/fontawesome-webfont.svg +2671 -0
  27. data/manual/site/fonts/fontawesome-webfont.ttf +0 -0
  28. data/manual/site/fonts/fontawesome-webfont.woff +0 -0
  29. data/manual/site/fonts/fontawesome-webfont.woff2 +0 -0
  30. data/manual/site/fonts/glyphicons-halflings-regular.eot +0 -0
  31. data/manual/site/fonts/glyphicons-halflings-regular.svg +288 -0
  32. data/manual/site/fonts/glyphicons-halflings-regular.ttf +0 -0
  33. data/manual/site/fonts/glyphicons-halflings-regular.woff +0 -0
  34. data/manual/site/fonts/glyphicons-halflings-regular.woff2 +0 -0
  35. data/manual/site/img/favicon.ico +0 -0
  36. data/manual/site/img/grid.png +0 -0
  37. data/manual/site/index.html +135 -396
  38. data/manual/site/js/base.js +216 -0
  39. data/manual/site/js/bootstrap-3.0.3.min.js +7 -0
  40. data/manual/site/js/jquery-1.10.2.min.js +6 -0
  41. data/manual/site/js/jquery.nicescroll.min.js +0 -0
  42. data/manual/site/js/jquery.pageslide.min.js +0 -0
  43. data/manual/site/js/parallaxImg.js +0 -0
  44. data/manual/site/machinery-analyze.1/index.html +25 -54
  45. data/manual/site/machinery-build.1/index.html +25 -85
  46. data/manual/site/machinery-compare.1/index.html +25 -87
  47. data/manual/site/machinery-config.1/index.html +25 -62
  48. data/manual/site/machinery-copy.1/index.html +25 -50
  49. data/manual/site/machinery-deploy.1/index.html +25 -87
  50. data/manual/site/machinery-export-autoyast.1/index.html +25 -74
  51. data/manual/site/machinery-export-html.1/index.html +25 -55
  52. data/manual/site/machinery-export-kiwi.1/index.html +25 -56
  53. data/manual/site/machinery-inspect-container.1/index.html +25 -129
  54. data/manual/site/machinery-inspect.1/index.html +25 -172
  55. data/manual/site/machinery-list.1/index.html +25 -67
  56. data/manual/site/machinery-man.1/index.html +25 -34
  57. data/manual/site/machinery-move.1/index.html +25 -49
  58. data/manual/site/machinery-remove.1/index.html +25 -62
  59. data/manual/site/machinery-serve.1/index.html +25 -61
  60. data/manual/site/machinery-show.1/index.html +25 -86
  61. data/manual/site/machinery-upgrade-format.1/index.html +25 -60
  62. data/manual/site/machinery-validate.1/index.html +25 -48
  63. data/manual/site/machinery.ymp +10 -10
  64. data/manual/site/machinery_main_general.1/index.html +25 -133
  65. data/manual/site/machinery_main_scopes.1/index.html +25 -129
  66. data/manual/site/machinery_main_security_implications.1/index.html +25 -108
  67. data/manual/site/machinery_main_usecases.1/index.html +25 -44
  68. data/manual/site/search/lunr.js +2986 -0
  69. data/manual/site/search/main.js +96 -0
  70. data/manual/site/search/search_index.json +1 -0
  71. data/manual/site/search/worker.js +128 -0
  72. data/manual/site/sitemap.xml +48 -87
  73. data/manual/site/sitemap.xml.gz +0 -0
  74. data/plugins/os/os_model.rb +0 -29
  75. data/tools/go.rb +14 -20
  76. metadata +32 -17
  77. data/manual/site/mkdocs/js/lunr.min.js +0 -7
  78. data/manual/site/mkdocs/js/mustache.min.js +0 -1
  79. data/manual/site/mkdocs/js/require.js +0 -36
  80. data/manual/site/mkdocs/js/search-results-template.mustache +0 -4
  81. data/manual/site/mkdocs/js/search.js +0 -88
  82. data/manual/site/mkdocs/js/text.js +0 -390
  83. data/manual/site/mkdocs/search_index.json +0 -869
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6ed904e69d49b3e93f3856cbd07b3cb91fab6e97
4
- data.tar.gz: 62517703522da01d4778c3c15a1b7e3a9a37b29b
2
+ SHA256:
3
+ metadata.gz: f19976fc2cd485e40e924ca5d471ae7d02af64443b99d44e10fa62e6b6433175
4
+ data.tar.gz: 7b79b1b6dd3f7dad21febe96778d67dcd371271803b1ca2ecbe503a54462f54f
5
5
  SHA512:
6
- metadata.gz: 01683b8723d95685ed43ccdabcb655f3f5e75eb729511a5b62b6c7bfc18db023c34a62e654fd40f402f9ab5177597f7f4e7b9b84a57660e91e26304724fa0893
7
- data.tar.gz: 2acfffcbd8dec94d924e1eda8136ef2cd063e9f60260a92c99053dad596cefc6e945fea27c4d8ac24a5795c138c7ec48e72e6a9908c73d61a00bd9ea50387b25
6
+ metadata.gz: dedaef9777f8160c200668fa035d4379bb3170e2040b7fa7da7777877a91737f3ac0c8052a077907825a53ef91c80470214065ce2c7011d603708ae0153077e3
7
+ data.tar.gz: f2f3031be5d4fceca617ce9a0983d7c33b7f41ce402d7a3659b2268ff5386798d706b64fe8be8945fb5be8800b399cf87a48310abb4a2c6ec583c69f89cc5662
data/.git_revision CHANGED
@@ -1 +1 @@
1
- bbde951b3b681befceba3223d2c0678ff6213da9
1
+ e489dbe0ef8a31fd814f1d8d8bc97725fa57c96a
data/NEWS CHANGED
@@ -1,6 +1,17 @@
1
1
  # Machinery Release Notes
2
2
 
3
3
 
4
+ ## Version 1.24.0 - Tue Jul 02 15:22:38 CEST 2019 - thardeck@suse.de
5
+
6
+ * Switch image building support from legacy Kiwi to Kiwi Next Generation
7
+ * Allow newer json-schema releases than 2.2.5. Newer versions slow down parsing
8
+ of manifests but newer Ruby versions have issues with old json schema releases.
9
+ The performance issue is known upstream: (gh#ruby-json-schema/json-schema#261)
10
+ * Fix machinery helper go version parsing (bsc#1125785)
11
+ * Improve parsing of SSH exceptions (gh#SUSE/machinery#2257)
12
+ * Allow inspection of old 32-bit systems even when their architecture is
13
+ reported as i586 or i386
14
+
4
15
  ## Version 1.23.1 - Fri Nov 24 17:33:39 CET 2017 - thardeck@suse.de
5
16
 
6
17
  * Allow inspection of old 32-bit systems which have no
@@ -5,18 +5,18 @@ Machinery.
5
5
 
6
6
  The user is expected to be familiar with using Kiwi, otherwise
7
7
  `machinery build` is recommended.
8
- Details on Kiwi can be found at http://opensuse.github.com/kiwi
8
+ Details on Kiwi can be found at https://suse.github.com/kiwi
9
9
 
10
10
 
11
11
  ## Creating the image
12
12
 
13
13
  The following command builds the image:
14
14
 
15
- `sudo /usr/sbin/kiwi --build EXPORTED_DIRECTORY --destdir OUTPUT_DIRECTORY`
15
+ `sudo kiwi-ng system build --description EXPORTED_DIRECTORY --target-dir OUTPUT_DIRECTORY`
16
16
 
17
17
 
18
18
  For example if the exported kiwi description is stored under "/tmp/export"
19
19
  and the image should be saved under "/tmp/image" the command would look like
20
20
  this:
21
21
 
22
- `sudo /usr/sbin/kiwi --build /tmp/export --destdir /tmp/image`
22
+ `sudo kiwi-ng system build --description /tmp/export --target-dir /tmp/image`
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env perl
1
+ #!/usr/bin/perl
2
2
 
3
3
  # Copyright (c) 2013-2016 SUSE LLC
4
4
  #
data/lib/build_task.rb CHANGED
@@ -18,8 +18,9 @@
18
18
  class Machinery::BuildTask
19
19
  def build(system_description, output_path, options = {})
20
20
  Machinery::LocalSystem.validate_architecture("x86_64")
21
- Machinery::LocalSystem.validate_existence_of_packages(["kiwi", "kiwi-desc-vmxboot"])
22
- system_description.validate_build_compatibility
21
+ Machinery::LocalSystem.validate_existence_of_packages(
22
+ ["python3-kiwi", "kiwi-image-vmx-requires"]
23
+ )
23
24
 
24
25
  tmp_config_dir = Dir.mktmpdir("machinery-config", "/tmp")
25
26
  tmp_image_dir = Dir.mktmpdir("machinery-image", "/tmp")
@@ -110,7 +111,8 @@ class Machinery::BuildTask
110
111
 
111
112
  def kiwi_wrapper(tmp_config_dir, tmp_image_dir, output_path, image_extension)
112
113
  script = "#!/bin/bash\n"
113
- script << "/usr/sbin/kiwi --build '#{tmp_config_dir}' --destdir '#{tmp_image_dir}' --logfile '#{tmp_image_dir}/kiwi-terminal-output.log'\n"
114
+ script << "/usr/bin/kiwi-ng --logfile='#{tmp_image_dir}/kiwi-terminal-output.log' system"
115
+ script << " build --description='#{tmp_config_dir}' --target-dir='#{tmp_image_dir}'\n"
114
116
  script << "if [ $? -eq 0 ]; then\n"
115
117
  script << " mv '#{tmp_image_dir}/'*.#{image_extension} '#{output_path}'\n"
116
118
  script << " rm -rf '#{tmp_image_dir}'\n"
data/lib/deploy_task.rb CHANGED
@@ -21,7 +21,6 @@ class Machinery::DeployTask
21
21
  Machinery::LocalSystem.validate_existence_of_packages(
22
22
  ["python-glanceclient", "kiwi", "kiwi-desc-vmxboot"]
23
23
  )
24
- description.validate_build_compatibility
25
24
 
26
25
  unless File.exist?(cloud_config)
27
26
  raise(Machinery::Errors::DeployFailed,
data/lib/exceptions.rb CHANGED
@@ -153,6 +153,19 @@ module Machinery
153
153
  end
154
154
  end
155
155
 
156
+ # An error for inspecting a remote system as a non-root user
157
+ class SudoPasswordRequired < MachineryError
158
+ def initialize(host)
159
+ @host = host
160
+ end
161
+
162
+ def to_s
163
+ "`sudo` can be used only on #{@host}, when no password is required." \
164
+ " Make sure that you have the following line in `etc/sudoers` on the remote host:\n" \
165
+ " machinery ALL=(ALL) NOPASSWD: ALL"
166
+ end
167
+ end
168
+
156
169
  class MigrationError < MachineryError; end
157
170
 
158
171
  class InvalidFilter < MachineryError; end
data/lib/kiwi_config.rb CHANGED
@@ -233,9 +233,7 @@ EOF
233
233
  xml.type(
234
234
  image: "vmx",
235
235
  filesystem: "ext3",
236
- installiso: "true",
237
- boot: @system_description.os.kiwi_boot,
238
- format: "qcow2", bootloader: @system_description.os.kiwi_bootloader
236
+ format: "qcow2"
239
237
  )
240
238
  end
241
239
 
@@ -377,12 +375,8 @@ EOF
377
375
  end
378
376
 
379
377
  def enable_dhcp(output_location)
380
- if @system_description.os.is_a?(Machinery::OsSles11)
381
- write_dhcp_network_config(output_location, "eth0")
382
- else
383
- write_dhcp_network_config(output_location, "lan0")
384
- write_persistent_net_rules(output_location)
385
- end
378
+ write_dhcp_network_config(output_location, "lan0")
379
+ write_persistent_net_rules(output_location)
386
380
  puts "DHCP in built image will be enabled for the first device"
387
381
  end
388
382
 
@@ -34,7 +34,9 @@ class MachineryHelper
34
34
  end
35
35
 
36
36
  def local_helper_path
37
- File.join(local_helpers_path, "machinery-helper-#{@system.arch}")
37
+ File.join(
38
+ local_helpers_path, "machinery-helper-#{compatible_helper_arch(@system.arch)}"
39
+ )
38
40
  end
39
41
 
40
42
  def remote_helper_path
@@ -86,4 +88,16 @@ class MachineryHelper
86
88
  options[:privileged] = true
87
89
  @system.run_command(remote_helper_path, subcommand, *args, options)
88
90
  end
91
+
92
+ private
93
+
94
+ def compatible_helper_arch(system_arch)
95
+ if ["i586", "i386"].include?(system_arch)
96
+ "i686"
97
+ elsif system_arch == "armv6l"
98
+ "armv7l"
99
+ else
100
+ system_arch
101
+ end
102
+ end
89
103
  end
data/lib/remote_system.rb CHANGED
@@ -197,7 +197,7 @@ class Machinery::RemoteSystem < Machinery::System
197
197
  # and raises an Machinery::Errors::SshConnectionFailed exception when it's not successful.
198
198
  def check_connection
199
199
  Machinery::LoggedCheetah.run(*build_command(:ssh), "-q", "-o", "BatchMode=yes",
200
- "#{remote_user}@#{host}", ":")
200
+ "#{remote_user}@#{host}", "LC_ALL=#{locale}", ":")
201
201
  rescue Cheetah::ExecutionFailed
202
202
  raise Machinery::Errors::SshConnectionFailed.new(
203
203
  "Could not establish SSH connection to host '#{host}'. Please make sure that " \
@@ -210,12 +210,14 @@ class Machinery::RemoteSystem < Machinery::System
210
210
  def check_sudo
211
211
  check_requirement("sudo", "-h")
212
212
  Machinery::LoggedCheetah.run(*build_command(:ssh), "-q", "-o", "BatchMode=yes",
213
- "#{remote_user}@#{host}", "sudo", "id")
213
+ "#{remote_user}@#{host}", "LC_ALL=#{locale}", "sudo", "id")
214
214
  rescue Cheetah::ExecutionFailed => e
215
215
  if e.stderr && e.stderr.include?("password is required")
216
216
  raise Machinery::Errors::InsufficientPrivileges.new(remote_user, host)
217
217
  elsif e.stderr && e.stderr.include?("you must have a tty to run sudo")
218
218
  raise Machinery::Errors::SudoMissingTTY.new(host)
219
+ elsif e.stderr && e.stderr.include?("no tty present and no askpass program specified")
220
+ raise Machinery::Errors::SudoPasswordRequired.new(host)
219
221
  else
220
222
  raise e
221
223
  end
@@ -166,15 +166,6 @@ class Machinery::SystemDescription < Machinery::Object
166
166
  end
167
167
  end
168
168
 
169
- def validate_build_compatibility
170
- kiwi_template_path = "/usr/share/kiwi/image/#{os.kiwi_boot}"
171
- unless Dir.exist?(kiwi_template_path)
172
- raise Machinery::Errors::BuildFailed.new("The execution of the build script failed. " \
173
- "Building of operating system '#{os.display_name}' can't be accomplished because the " \
174
- "kiwi template file in `#{kiwi_template_path}` does not exist.")
175
- end
176
- end
177
-
178
169
  def to_hash
179
170
  meta = {}
180
171
  meta["format_version"] = self.format_version if self.format_version
data/lib/version.rb CHANGED
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Machinery
19
19
 
20
- VERSION = "1.23.1"
20
+ VERSION = "1.24.0"
21
21
 
22
22
  end
@@ -2,4 +2,4 @@
2
2
 
3
3
  package main
4
4
 
5
- const VERSION = "bbde951b3b681befceba3223d2c0678ff6213da9"
5
+ const VERSION = "e489dbe0ef8a31fd814f1d8d8bc97725fa57c96a"
Binary file
@@ -83,12 +83,6 @@
83
83
  <a class="btn btn-default" href="http://github.com/SUSE/machinery">Get the source</a>
84
84
  </div>
85
85
  </div>
86
-
87
- <div>
88
- <div class="git">
89
- <a class="btn btn-default" href="https://machinery-project.blogspot.de/">Machinery Blog</a>
90
- </div>
91
- </div>
92
86
  </div>
93
87
 
94
88
  <div>
@@ -364,8 +358,8 @@
364
358
  </div>
365
359
 
366
360
  <div class="col-md-offset-3 col-md-6 footer">
367
- <a href="mailto:machinery@lists.suse.com">Questions, Feedback, Suggestions</a>
368
- <div class="credit">© <a href="http://suse.com">SUSE</a> 2014-2016</div>
361
+ <a href="https://github.com/SUSE/machinery/issues">Questions, Feedback, Suggestions</a>
362
+ <div class="credit">© <a href="http://suse.com">SUSE</a> 2014-2018</div>
369
363
  </div>
370
364
 
371
365
 
@@ -1,13 +1,13 @@
1
1
  <metapackage xmlns:os="http://opensuse.org/Standards/One_Click_Install" xmlns="http://opensuse.org/Standards/One_Click_Install">
2
2
 
3
- <!-- openSUSE Leap 42.1 -->
4
- <group distversion="openSUSE Leap 42.1">
3
+ <!-- openSUSE Leap 15.1 -->
4
+ <group distversion="openSUSE Leap 15.1">
5
5
  <repositories>
6
6
  <repository recommended="false">
7
- <name>openSUSE Leap 42.1</name>
8
- <summary>Test setup for openSUSE Leap 42.1</summary>
7
+ <name>openSUSE Leap 15.1</name>
8
+ <summary>Test setup for openSUSE Leap 15.1</summary>
9
9
  <description></description>
10
- <url>http://download.opensuse.org/distribution/leap/42.1/repo/oss/</url>
10
+ <url>http://download.opensuse.org/distribution/leap/15.1/repo/oss/</url>
11
11
  </repository>
12
12
  </repositories>
13
13
  <software>
@@ -21,14 +21,14 @@ universal system description.</description>
21
21
  </software>
22
22
  </group>
23
23
 
24
- <!-- openSUSE Leap 42.2 -->
25
- <group distversion="openSUSE Leap 42.2">
24
+ <!-- openSUSE Leap 15.0 -->
25
+ <group distversion="openSUSE Leap 15.0">
26
26
  <repositories>
27
27
  <repository recommended="false">
28
- <name>openSUSE Leap 42.2</name>
29
- <summary>Test setup for openSUSE Leap 42.2</summary>
28
+ <name>openSUSE Leap 15.0</name>
29
+ <summary>Test setup for openSUSE Leap 15.0</summary>
30
30
  <description></description>
31
- <url>http://download.opensuse.org/distribution/leap/42.2/repo/oss/</url>
31
+ <url>http://download.opensuse.org/distribution/leap/15.0/repo/oss/</url>
32
32
  </repository>
33
33
  </repositories>
34
34
  <software>
data/manual/mkdocs.yml CHANGED
@@ -25,6 +25,8 @@ pages:
25
25
  - Show: machinery-show.1.md
26
26
  - "Upgrade Format": machinery-upgrade-format.1.md
27
27
  - Validate: machinery-validate.1.md
28
- theme_dir: 'custom_theme'
28
+ theme:
29
+ name: mkdocs
30
+ custom_dir: custom_theme
29
31
  extra_templates:
30
32
  - 'index.html'
@@ -0,0 +1,145 @@
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="">
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
+
142
+ </div>
143
+ </div>
144
+ </body>
145
+ </html>