machinery-tool 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/NEWS +16 -0
- data/bin/machinery +1 -1
- data/export_helpers/merge_users_and_groups.pl.erb +1 -1
- data/export_helpers/unmanaged_files_autoyast_excludes +10 -0
- data/export_helpers/{unmanaged_files_build_excludes → unmanaged_files_kiwi_excludes} +1 -0
- data/helpers/changed_managed_files.sh +1 -1
- data/helpers/yum_repositories.py +37 -0
- data/html/assets/machinery.js +76 -57
- data/html/assets/reset.png +0 -0
- data/html/index.html.haml +6 -2
- data/lib/analyze_config_file_diffs_task.rb +5 -4
- data/lib/array.rb +1 -1
- data/lib/autoyast.rb +16 -8
- data/lib/build_task.rb +2 -1
- data/lib/changed_rpm_files_helper.rb +1 -1
- data/lib/cli.rb +13 -9
- data/lib/compare_task.rb +1 -1
- data/lib/config.rb +1 -1
- data/lib/config_base.rb +1 -1
- data/lib/config_task.rb +1 -1
- data/lib/constants.rb +1 -1
- data/lib/copy_task.rb +1 -1
- data/lib/current_user.rb +1 -1
- data/lib/deploy_task.rb +4 -1
- data/lib/exceptions.rb +5 -2
- data/lib/export_task.rb +8 -2
- data/lib/exporter.rb +1 -1
- data/lib/file_validator.rb +107 -0
- data/lib/generate_html_task.rb +1 -1
- data/lib/helper.rb +18 -1
- data/lib/hint.rb +1 -1
- data/lib/html.rb +8 -3
- data/lib/inspect_task.rb +3 -4
- data/lib/inspector.rb +1 -1
- data/lib/json_validation_error_cleaner.rb +78 -0
- data/lib/json_validator.rb +86 -0
- data/lib/kiwi_config.rb +6 -4
- data/lib/list_task.rb +33 -39
- data/lib/local_system.rb +20 -27
- data/lib/logged_cheetah.rb +1 -1
- data/lib/machinery.rb +5 -2
- data/lib/machinery_logger.rb +1 -1
- data/lib/manifest.rb +16 -5
- data/lib/migration.rb +40 -10
- data/lib/mountpoints.rb +1 -1
- data/lib/object.rb +10 -11
- data/lib/remote_system.rb +1 -1
- data/lib/remove_task.rb +19 -14
- data/lib/renderer.rb +6 -5
- data/lib/renderer_helper.rb +1 -1
- data/lib/rpm.rb +1 -1
- data/lib/scope_file_store.rb +1 -1
- data/lib/scope_mixin.rb +1 -1
- data/lib/show_task.rb +1 -1
- data/lib/system.rb +9 -2
- data/lib/system_description.rb +45 -55
- data/lib/system_description_memory_store.rb +1 -1
- data/lib/system_description_store.rb +29 -58
- data/lib/tarball.rb +18 -12
- data/lib/ui.rb +1 -1
- data/lib/upgrade_format_task.rb +12 -11
- data/lib/validate_task.rb +5 -2
- data/lib/version.rb +2 -2
- data/lib/zypper.rb +15 -11
- data/man/generated/machinery.1.gz +0 -0
- data/man/generated/machinery.1.html +20 -10
- data/plugins/inspect/changed_managed_files_inspector.rb +1 -1
- data/plugins/inspect/config_files_inspector.rb +1 -1
- data/plugins/inspect/groups_inspector.rb +1 -1
- data/plugins/inspect/os_inspector.rb +19 -1
- data/plugins/inspect/packages_inspector.rb +1 -1
- data/plugins/inspect/patterns_inspector.rb +14 -30
- data/plugins/inspect/repositories_inspector.rb +137 -77
- data/plugins/inspect/services_inspector.rb +42 -19
- data/plugins/inspect/unmanaged_files_inspector.rb +1 -1
- data/plugins/inspect/users_inspector.rb +1 -1
- data/plugins/model/changed_managed_files_model.rb +1 -1
- data/plugins/model/config_files_model.rb +1 -1
- data/plugins/model/file_scope.rb +2 -2
- data/plugins/model/groups_model.rb +1 -1
- data/plugins/model/os_model.rb +60 -8
- data/plugins/model/packages_model.rb +1 -1
- data/plugins/model/patterns_model.rb +1 -1
- data/plugins/model/repositories_model.rb +1 -1
- data/plugins/model/services_model.rb +1 -1
- data/plugins/model/unmanaged_files_model.rb +1 -1
- data/plugins/model/users_model.rb +1 -1
- data/plugins/schema/v3/system-description-changed-managed-files.schema.json +92 -0
- data/plugins/schema/v3/system-description-config-files.schema.json +92 -0
- data/plugins/schema/v3/system-description-groups.schema.json +30 -0
- data/plugins/schema/v3/system-description-os.schema.json +21 -0
- data/plugins/schema/v3/system-description-packages.schema.json +34 -0
- data/plugins/schema/v3/system-description-patterns.schema.json +24 -0
- data/plugins/schema/v3/system-description-repositories.schema.json +45 -0
- data/plugins/schema/v3/system-description-services.schema.json +30 -0
- data/plugins/schema/v3/system-description-unmanaged-files.schema.json +138 -0
- data/plugins/schema/v3/system-description-users.schema.json +61 -0
- data/plugins/show/changed_managed_files_renderer.rb +1 -1
- data/plugins/show/config_files_renderer.rb +2 -2
- data/plugins/show/groups_renderer.rb +1 -1
- data/plugins/show/os_renderer.rb +1 -1
- data/plugins/show/packages_renderer.rb +1 -1
- data/plugins/show/patterns_renderer.rb +1 -1
- data/plugins/show/repositories_renderer.rb +8 -3
- data/plugins/show/services_renderer.rb +1 -1
- data/plugins/show/unmanaged_files_renderer.rb +1 -1
- data/plugins/show/users_renderer.rb +1 -1
- data/schema/migrations/migrate1to2.rb +1 -1
- data/schema/migrations/migrate2to3.rb +42 -0
- data/schema/v3/system-description-global.schema.json +31 -0
- metadata +147 -130
- data/lib/system_description_validator.rb +0 -216
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53f3e1829f050fd550e3440debba26aa7a809d02
|
|
4
|
+
data.tar.gz: 5826ca3868fbadec1b75b6ecd43b179653818abd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 63953c2f507e6191a4c7bced722aeb749469d4c549efabb1d60709fca0162bb09a807501e001c8ee38167c530cc0095a980f0b8ba8b635d5f82b5ed0fca1b88f
|
|
7
|
+
data.tar.gz: d5ea80efa210b5a35ac2d696e065f52fd2749636949ddef90f64fe8ff39ec30e79fe51555a197176d5ea38b619547e7d6176b86bfb8e41e650ed4836e281c67a
|
data/NEWS
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# Machinery Release Notes
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## Version 1.4.0 - Wed Feb 18 16:51:43 CET 2015 - thardeck@suse.de
|
|
5
|
+
|
|
6
|
+
* Support inspection of Red Hat Enterprise Linux 6 systems
|
|
7
|
+
* Introduce system description format version 3 (see https://github.com/SUSE/machinery/wiki/System-Description-Format#version-3)
|
|
8
|
+
* Usability improvements of the HTML view (gh#SUSE/machinery#359)
|
|
9
|
+
* Speed up `machinery list` command
|
|
10
|
+
|
|
11
|
+
## Version 1.3.0 - Mon Jan 26 16:00:08 CET 2015 - chuller@novell.com
|
|
12
|
+
|
|
13
|
+
* Added support for inspecting System z systems
|
|
14
|
+
* Added support for inspecting POWER LE systems
|
|
15
|
+
* Added support to run Machinery on System z
|
|
16
|
+
* Added support to run Machinery on POWER LE
|
|
17
|
+
* Handle system description errors as warnings
|
|
18
|
+
* Added `machinery upgrade-format --force` command
|
|
19
|
+
|
|
4
20
|
## Version 1.2.0 - Mon Dec 22 15:06:20 CET 2014 - aduffeck@suse.de
|
|
5
21
|
|
|
6
22
|
* Added AutoYaST export for system descriptions
|
data/bin/machinery
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
# Copyright (c) 2013-2015 SUSE LLC
|
|
3
|
+
#
|
|
4
|
+
# This program is free software; you can redistribute it and/or
|
|
5
|
+
# modify it under the terms of version 3 of the GNU General Public License as
|
|
6
|
+
# published by the Free Software Foundation.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License
|
|
14
|
+
# along with this program; if not, contact SUSE LLC.
|
|
15
|
+
#
|
|
16
|
+
# To contact SUSE about this file by physical or electronic mail,
|
|
17
|
+
# you may find current contact information at www.suse.com
|
|
18
|
+
|
|
19
|
+
import yum
|
|
20
|
+
import json
|
|
21
|
+
|
|
22
|
+
yb = yum.YumBase()
|
|
23
|
+
|
|
24
|
+
repositories = []
|
|
25
|
+
|
|
26
|
+
for repo in yb.repos.sort():
|
|
27
|
+
repo_dict = dict()
|
|
28
|
+
repo_dict["alias"] = repo.id
|
|
29
|
+
repo_dict["name"] = repo.name
|
|
30
|
+
repo_dict["type"] = "rpm-md"
|
|
31
|
+
repo_dict["url"] = repo.baseurl[0] if repo.baseurl else ""
|
|
32
|
+
repo_dict["enabled"] = repo.enabled
|
|
33
|
+
repo_dict["gpgcheck"] = repo.gpgcheck
|
|
34
|
+
repo_dict["package_manager"] = "yum"
|
|
35
|
+
repositories.append(repo_dict)
|
|
36
|
+
|
|
37
|
+
print(json.dumps(repositories))
|
data/html/assets/machinery.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
$(document).ready(function () {
|
|
2
2
|
// Render the system description
|
|
3
|
-
var description = getDescription()
|
|
3
|
+
var description = getDescription();
|
|
4
4
|
|
|
5
|
-
templates = {}
|
|
5
|
+
templates = {};
|
|
6
6
|
scopes = [
|
|
7
7
|
"os",
|
|
8
8
|
"changed_managed_files",
|
|
@@ -14,26 +14,26 @@ $(document).ready(function () {
|
|
|
14
14
|
"patterns",
|
|
15
15
|
"repositories",
|
|
16
16
|
"services"
|
|
17
|
-
]
|
|
17
|
+
];
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
// Enrich description with meta information summaries
|
|
21
|
-
description.meta_info = {}
|
|
21
|
+
description.meta_info = {};
|
|
22
22
|
$.each(scopes, function(index, scope) {
|
|
23
23
|
if(description.meta[scope]) {
|
|
24
24
|
description.meta_info[scope] = " (" +
|
|
25
25
|
"inspected host: '" + description.meta[scope].hostname + "', " +
|
|
26
|
-
"at: " + new Date(description.meta[scope].modified).toLocaleString() + ")"
|
|
26
|
+
"at: " + new Date(description.meta[scope].modified).toLocaleString() + ")";
|
|
27
27
|
}
|
|
28
|
-
})
|
|
28
|
+
});
|
|
29
29
|
|
|
30
30
|
$.each(scopes, function(index, scope) {
|
|
31
|
-
templates[scope] = Hogan.compile($("#scope_" + scope).html())
|
|
32
|
-
})
|
|
33
|
-
template = Hogan.compile($('#content').html())
|
|
31
|
+
templates[scope] = Hogan.compile($("#scope_" + scope).html());
|
|
32
|
+
});
|
|
33
|
+
template = Hogan.compile($('#content').html());
|
|
34
34
|
$("#content_container").html(
|
|
35
35
|
template.render(description, templates)
|
|
36
|
-
)
|
|
36
|
+
);
|
|
37
37
|
|
|
38
38
|
// Implement filter functionality
|
|
39
39
|
var run_when_done_typing = (function(){
|
|
@@ -42,74 +42,82 @@ $(document).ready(function () {
|
|
|
42
42
|
clearTimeout(timer);
|
|
43
43
|
timer = setTimeout(callback, timeout);
|
|
44
44
|
};
|
|
45
|
-
})()
|
|
45
|
+
})();
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
47
|
+
var filterdocument = function() {
|
|
48
|
+
window.scrollTo(0, 0);
|
|
49
|
+
var rows = $("body").find("tr");
|
|
50
|
+
if($("#filter").val() == "") {
|
|
51
|
+
rows.show();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
var filters = $("#filter").val().split(" ");
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
57
|
+
rows
|
|
58
|
+
.hide()
|
|
59
|
+
.filter(function() {
|
|
60
|
+
var $t = $(this);
|
|
61
|
+
for(var i = 0; i < filters.length; ++i) {
|
|
62
|
+
if($t.is(":contains('" + filters[i] + "')")) {
|
|
63
|
+
return true;
|
|
66
64
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
})
|
|
68
|
+
.show();
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
$("#filter").keyup(function() {
|
|
72
|
+
run_when_done_typing(function() {
|
|
73
|
+
filterdocument();
|
|
70
74
|
}, 500)
|
|
71
|
-
})
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
clearFilter = function() {
|
|
78
|
+
$("#filter").val("");
|
|
79
|
+
filterdocument();
|
|
80
|
+
};
|
|
72
81
|
|
|
73
82
|
// Align content below floating menu
|
|
74
|
-
var header_height = $("#nav-bar").height() + 20
|
|
75
|
-
$("#content_container").css("margin-top", header_height)
|
|
76
|
-
$("a.scope_anchor").css("height", header_height)
|
|
77
|
-
$("a.scope_anchor").css("margin-top", -header_height)
|
|
83
|
+
var header_height = $("#nav-bar").height() + 20;
|
|
84
|
+
$("#content_container").css("margin-top", header_height);
|
|
85
|
+
$("a.scope_anchor").css("height", header_height);
|
|
86
|
+
$("a.scope_anchor").css("margin-top", -header_height);
|
|
78
87
|
|
|
79
88
|
$('.scope_logo_big').each(function(){
|
|
80
|
-
var icon = $(this)
|
|
89
|
+
var icon = $(this);
|
|
81
90
|
$(window).scroll(function() {
|
|
82
91
|
icon.removeClass('fixed');
|
|
83
|
-
var pos = icon.offset()
|
|
92
|
+
var pos = icon.offset();
|
|
84
93
|
var top_pos = $(this).scrollTop() + header_height;
|
|
85
|
-
console.log(pos, top_pos)
|
|
86
94
|
if(top_pos >= pos.top && icon.css('position') == 'static') {
|
|
87
95
|
icon.addClass('fixed').css("top", header_height);
|
|
88
96
|
} else if(top_pos <= pos.top && icon.hasClass('fixed')) {
|
|
89
97
|
icon.removeClass('fixed');
|
|
90
98
|
}
|
|
91
99
|
})
|
|
92
|
-
})
|
|
100
|
+
});
|
|
93
101
|
|
|
94
102
|
// Hook up the toggle links
|
|
95
103
|
$('.toggle').click(function(){
|
|
96
|
-
$(this).closest('.scope').find('.scope_content').collapse('toggle')
|
|
97
|
-
$(this).toggleClass("collapsed")
|
|
98
|
-
})
|
|
104
|
+
$(this).closest('.scope').find('.scope_content').collapse('toggle');
|
|
105
|
+
$(this).toggleClass("collapsed");
|
|
106
|
+
});
|
|
99
107
|
|
|
100
108
|
$("#collapse-all").click(function(){
|
|
101
|
-
$(".scope_content").collapse('hide')
|
|
102
|
-
$(".toggle").addClass("collapsed")
|
|
103
|
-
$(this).hide()
|
|
104
|
-
$("#expand-all").show()
|
|
105
|
-
})
|
|
109
|
+
$(".scope_content").collapse('hide');
|
|
110
|
+
$(".toggle").addClass("collapsed");
|
|
111
|
+
$(this).hide();
|
|
112
|
+
$("#expand-all").show();
|
|
113
|
+
});
|
|
106
114
|
|
|
107
115
|
$("#expand-all").click(function(){
|
|
108
|
-
$(".scope_content").collapse('show')
|
|
109
|
-
$(".toggle").removeClass("collapsed")
|
|
110
|
-
$(this).hide()
|
|
111
|
-
$("#collapse-all").show()
|
|
112
|
-
})
|
|
116
|
+
$(".scope_content").collapse('show');
|
|
117
|
+
$(".toggle").removeClass("collapsed");
|
|
118
|
+
$(this).hide();
|
|
119
|
+
$("#collapse-all").show();
|
|
120
|
+
});
|
|
113
121
|
|
|
114
122
|
$("img").popover({
|
|
115
123
|
trigger: "hover",
|
|
@@ -121,11 +129,11 @@ $(document).ready(function () {
|
|
|
121
129
|
html: true,
|
|
122
130
|
template: '<div class="popover diff-popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>',
|
|
123
131
|
content: function() {
|
|
124
|
-
file = $(this).data("config-file")
|
|
125
|
-
return $('*[data-config-file-diff="' + file + '"]').html()
|
|
132
|
+
file = $(this).data("config-file");
|
|
133
|
+
return $('*[data-config-file-diff="' + file + '"]').html();
|
|
126
134
|
},
|
|
127
135
|
title: function() {
|
|
128
|
-
return "Changes for '" + $(this).data("config-file") + "'"
|
|
136
|
+
return "Changes for '" + $(this).data("config-file") + "'";
|
|
129
137
|
}
|
|
130
138
|
}).on("mouseenter",function () {
|
|
131
139
|
clearTimeout(counter);
|
|
@@ -145,4 +153,15 @@ $(document).ready(function () {
|
|
|
145
153
|
}
|
|
146
154
|
}, 500);
|
|
147
155
|
});
|
|
148
|
-
|
|
156
|
+
|
|
157
|
+
// Tooltips for service states
|
|
158
|
+
$("td.systemd_enabled, td.systemd_enabled-runtime").attr("title", 'Enabled through a symlink in .wants directory (permanently or just in /run).')
|
|
159
|
+
$("td.systemd_linked, td.systemd_linked-runtime").attr("title", 'Made available through a symlink to the unit file (permanently or just in /run).')
|
|
160
|
+
$("td.systemd_masked, td.systemd_masked-runtime").attr("title", 'Disabled entirely (permanently or just in /run).')
|
|
161
|
+
$("td.systemd_static").attr("title", 'Unit file is not enabled, and has no provisions for enabling in the "[Install]" section.')
|
|
162
|
+
$("td.systemd_indirect").attr("title", 'Unit file itself is not enabled, but it has a non-empty Also= setting in the "[Install]" section, listing other unit files that might be enabled.')
|
|
163
|
+
$("td.systemd_disabled").attr("title", 'Unit file is not enabled.')
|
|
164
|
+
$("td.sysvinit_on").attr("title", 'Service is enabled')
|
|
165
|
+
$("td.sysvinit_off").attr("title", 'Service is disabled')
|
|
166
|
+
|
|
167
|
+
});
|
|
Binary file
|
data/html/index.html.haml
CHANGED
|
@@ -263,7 +263,8 @@
|
|
|
263
263
|
%td {{name}}
|
|
264
264
|
%td {{alias}}
|
|
265
265
|
%td {{type}}
|
|
266
|
-
%td
|
|
266
|
+
%td
|
|
267
|
+
%a{:href => "{{url}}" } {{url}}
|
|
267
268
|
%td {{enabled}}
|
|
268
269
|
%td {{autorefresh}}
|
|
269
270
|
%td {{gpgcheck}}
|
|
@@ -414,7 +415,8 @@
|
|
|
414
415
|
{{#services.services}}
|
|
415
416
|
%tr
|
|
416
417
|
%td {{name}}
|
|
417
|
-
%td
|
|
418
|
+
%td{:class=>"{{services.init_system}}_{{state}}"}
|
|
419
|
+
{{state}}
|
|
418
420
|
{{/services.services}}
|
|
419
421
|
{{/services.services.length}}
|
|
420
422
|
|
|
@@ -466,4 +468,6 @@
|
|
|
466
468
|
Machinery
|
|
467
469
|
.filter-input
|
|
468
470
|
%input#filter{:placeholder => "Type To Filter"}/
|
|
471
|
+
%img{:src => "assets/reset.png", :titel => "Reset Filter", :onclick=>"clearFilter()" }
|
|
472
|
+
|
|
469
473
|
#content_container
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2013-
|
|
1
|
+
# Copyright (c) 2013-2015 SUSE LLC
|
|
2
2
|
#
|
|
3
3
|
# This program is free software; you can redistribute it and/or
|
|
4
4
|
# modify it under the terms of version 3 of the GNU General Public License as
|
|
@@ -17,17 +17,18 @@
|
|
|
17
17
|
|
|
18
18
|
class AnalyzeConfigFileDiffsTask
|
|
19
19
|
def analyze(description)
|
|
20
|
+
description.assert_scopes("os")
|
|
21
|
+
description.validate_analysis_compatibility
|
|
20
22
|
description.assert_scopes(
|
|
21
23
|
"repositories",
|
|
22
|
-
"config_files"
|
|
23
|
-
"os"
|
|
24
|
+
"config_files"
|
|
24
25
|
)
|
|
25
26
|
if !description.scope_extracted?("config_files")
|
|
26
27
|
raise Machinery::Errors::MissingExtractedFiles.new(description, ["config_files"])
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
with_repositories(description) do |zypper|
|
|
30
|
-
file_store = description.scope_file_store("
|
|
31
|
+
file_store = description.scope_file_store("analyze/config_file_diffs")
|
|
31
32
|
file_store.create
|
|
32
33
|
diffs_path = file_store.path
|
|
33
34
|
extracted_files_path = description.scope_file_store("config_files").path
|
data/lib/array.rb
CHANGED
data/lib/autoyast.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2013-
|
|
1
|
+
# Copyright (c) 2013-2015 SUSE LLC
|
|
2
2
|
#
|
|
3
3
|
# This program is free software; you can redistribute it and/or
|
|
4
4
|
# modify it under the terms of version 3 of the GNU General Public License as
|
|
@@ -16,25 +16,33 @@
|
|
|
16
16
|
# you may find current contact information at www.suse.com
|
|
17
17
|
|
|
18
18
|
class Autoyast < Exporter
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
19
21
|
def initialize(description)
|
|
22
|
+
@name = "autoyast"
|
|
20
23
|
@chroot_scripts = []
|
|
21
24
|
@system_description = description
|
|
22
25
|
@system_description.assert_scopes(
|
|
23
26
|
"repositories",
|
|
24
27
|
"packages"
|
|
25
28
|
)
|
|
29
|
+
if !description.users
|
|
30
|
+
Machinery::Ui.puts(
|
|
31
|
+
"\nWarning: Exporting a description without the scope 'users' as AutoYaST" \
|
|
32
|
+
" profile will result in a root account without a password which prevents" \
|
|
33
|
+
" logging in.\n" \
|
|
34
|
+
"So either inspect or add the scope 'users' before the export or" \
|
|
35
|
+
" add a section for the root user to the AutoYaST profile."
|
|
36
|
+
)
|
|
37
|
+
end
|
|
26
38
|
end
|
|
27
39
|
|
|
28
40
|
def write(output_dir)
|
|
29
41
|
FileUtils.cp(
|
|
30
|
-
File.join(Machinery::ROOT, "export_helpers/
|
|
42
|
+
File.join(Machinery::ROOT, "export_helpers/unmanaged_files_#{@name}_excludes"),
|
|
31
43
|
output_dir
|
|
32
44
|
)
|
|
33
|
-
|
|
34
|
-
File.open(File.join(output_dir, "unmanaged_files_build_excludes"), "a") do |file|
|
|
35
|
-
file.puts "var/log/*"
|
|
36
|
-
end
|
|
37
|
-
FileUtils.chmod(0600, File.join(output_dir, "unmanaged_files_build_excludes"))
|
|
45
|
+
FileUtils.chmod(0600, File.join(output_dir, "unmanaged_files_#{@name}_excludes"))
|
|
38
46
|
FileUtils.cp(
|
|
39
47
|
File.join(Machinery::ROOT, "export_helpers/autoyast_export_readme.md"),
|
|
40
48
|
File.join(output_dir, "README.md")
|
|
@@ -279,7 +287,7 @@ class Autoyast < Exporter
|
|
|
279
287
|
|
|
280
288
|
base = Pathname(@system_description.scope_file_store("unmanaged_files").path)
|
|
281
289
|
@chroot_scripts << <<-EOF
|
|
282
|
-
curl -o '/mnt/tmp/filter' "`cat /tmp/description_url`/
|
|
290
|
+
curl -o '/mnt/tmp/filter' "`cat /tmp/description_url`/unmanaged_files_#{@name}_excludes"
|
|
283
291
|
EOF
|
|
284
292
|
|
|
285
293
|
Dir["#{base}/**/*.tgz"].sort.each do |path|
|
data/lib/build_task.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2013-
|
|
1
|
+
# Copyright (c) 2013-2015 SUSE LLC
|
|
2
2
|
#
|
|
3
3
|
# This program is free software; you can redistribute it and/or
|
|
4
4
|
# modify it under the terms of version 3 of the GNU General Public License as
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
class BuildTask
|
|
19
19
|
def build(system_description, output_path, options = {})
|
|
20
|
+
LocalSystem.validate_architecture("x86_64")
|
|
20
21
|
LocalSystem.validate_build_compatibility(system_description)
|
|
21
22
|
LocalSystem.validate_existence_of_package("kiwi")
|
|
22
23
|
LocalSystem.validate_existence_of_package("kiwi-desc-vmxboot")
|