Change-Id: I938a87a984649c9e73f0591d83291620295dd831
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1859
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
... | ... |
@@ -83,6 +83,7 @@ micro-iso: check-tools $(PHOTON_STAGE) $(PHOTON_PACKAGES_MICRO) |
83 | 83 |
-l $(PHOTON_STAGE)/LOGS \ |
84 | 84 |
-r $(PHOTON_STAGE)/RPMS \ |
85 | 85 |
-p $(PHOTON_GENERATED_DATA_DIR)/$(MICRO_PACKAGE_LIST_FILE) \ |
86 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/$(MICRO_PACKAGE_LIST_FILE) \ |
|
86 | 87 |
-o $(PHOTON_STAGE)/common/data \ |
87 | 88 |
-d $(PHOTON_STAGE)/pkg_info.json \ |
88 | 89 |
-s $(PHOTON_DATA_DIR) \ |
... | ... |
@@ -118,6 +119,7 @@ minimal-iso: check-tools $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) |
118 | 118 |
-l $(PHOTON_STAGE)/LOGS \ |
119 | 119 |
-r $(PHOTON_STAGE)/RPMS \ |
120 | 120 |
-p $(PHOTON_GENERATED_DATA_DIR)/$(MINIMAL_PACKAGE_LIST_FILE) \ |
121 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/$(MINIMAL_PACKAGE_LIST_FILE) \ |
|
121 | 122 |
-o $(PHOTON_STAGE)/common/data \ |
122 | 123 |
-d $(PHOTON_STAGE)/pkg_info.json \ |
123 | 124 |
-s $(PHOTON_DATA_DIR) \ |
... | ... |
@@ -133,6 +135,7 @@ ostree-host-iso: check-tools $(PHOTON_STAGE) ostree-repo |
133 | 133 |
-l $(PHOTON_STAGE)/LOGS \ |
134 | 134 |
-r $(PHOTON_STAGE)/RPMS \ |
135 | 135 |
-p $(PHOTON_GENERATED_DATA_DIR)/build_install_options_ostreehost.json \ |
136 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/build_install_options_ostreehost.json \ |
|
136 | 137 |
-o $(PHOTON_STAGE)/common/data \ |
137 | 138 |
-s $(PHOTON_DATA_DIR) \ |
138 | 139 |
-f > \ |
... | ... |
@@ -147,6 +150,7 @@ live-iso: check-tools $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) minimal-iso |
147 | 147 |
-l $(PHOTON_STAGE)/LOGS \ |
148 | 148 |
-r $(PHOTON_STAGE)/RPMS \ |
149 | 149 |
-p $(PHOTON_GENERATED_DATA_DIR)/build_install_options_livecd.json \ |
150 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/build_install_options_livecd.json \ |
|
150 | 151 |
-o $(PHOTON_STAGE)/common/data \ |
151 | 152 |
-d $(PHOTON_STAGE)/pkg_info.json \ |
152 | 153 |
-s $(PHOTON_DATA_DIR) \ |
... | ... |
@@ -32,12 +32,6 @@ |
32 | 32 |
"include" : ["minimal"], |
33 | 33 |
"additional-files" : ["ostree-repo.tar.gz"] |
34 | 34 |
}, |
35 |
- "extra" : { |
|
36 |
- "title" : "Extra packages not installed but packed in ISO.", |
|
37 |
- "file" : "packages_extra.json", |
|
38 |
- "visible" : false, |
|
39 |
- "include" : [] |
|
40 |
- }, |
|
41 | 35 |
"appliance" : { |
42 | 36 |
"title" : "Minimal packages to support appliances.", |
43 | 37 |
"file" : "packages_appliance.json", |
... | ... |
@@ -18,12 +18,6 @@ |
18 | 18 |
"visible" : true, |
19 | 19 |
"include" : ["minimal"] |
20 | 20 |
}, |
21 |
- "extra" : { |
|
22 |
- "title" : "Extra packages not installed but packed in ISO.", |
|
23 |
- "file" : "packages_extra.json", |
|
24 |
- "visible" : false, |
|
25 |
- "include" : [] |
|
26 |
- }, |
|
27 | 21 |
"appliance" : { |
28 | 22 |
"title" : "Minimal packages to support appliances.", |
29 | 23 |
"file" : "packages_appliance.json", |
30 | 24 |
deleted file mode 100644 |
... | ... |
@@ -1,180 +0,0 @@ |
1 |
-{ |
|
2 |
- "packages":[ |
|
3 |
- "google-daemon", |
|
4 |
- "google-startup-scripts", |
|
5 |
- "autogen", |
|
6 |
- "cronie", |
|
7 |
- "ansible", |
|
8 |
- "gc", |
|
9 |
- "gnutls", |
|
10 |
- "guile", |
|
11 |
- "json-c", |
|
12 |
- "libestr", |
|
13 |
- "libgcrypt", |
|
14 |
- "liblogging", |
|
15 |
- "librelp", |
|
16 |
- "libtasn1", |
|
17 |
- "libunistring", |
|
18 |
- "nettle", |
|
19 |
- "ncurses-terminfo", |
|
20 |
- "cracklib-dicts", |
|
21 |
- "rsyslog", |
|
22 |
- "device-mapper-multipath", |
|
23 |
- "NetworkManager", |
|
24 |
- "NetworkManager-devel", |
|
25 |
- "dbus-glib", |
|
26 |
- "libndp", |
|
27 |
- "libnl", |
|
28 |
- "dbus-glib-devel", |
|
29 |
- "libndp-devel", |
|
30 |
- "libnl-devel", |
|
31 |
- "logrotate", |
|
32 |
- "sendmail", |
|
33 |
- "kpartx", |
|
34 |
- "autogen-libopts", |
|
35 |
- "autogen-libopts-devel", |
|
36 |
- "gc-devel", |
|
37 |
- "valgrind", |
|
38 |
- "gnutls-devel", |
|
39 |
- "guile-devel", |
|
40 |
- "json-c-devel", |
|
41 |
- "libestr-devel", |
|
42 |
- "libgcrypt-devel", |
|
43 |
- "liblogging-devel", |
|
44 |
- "librelp-devel", |
|
45 |
- "libtasn1-devel", |
|
46 |
- "libunistring-devel", |
|
47 |
- "nettle-devel", |
|
48 |
- "apache-ant", |
|
49 |
- "ant-contrib", |
|
50 |
- "apache-maven", |
|
51 |
- "apache-tomcat", |
|
52 |
- "jna", |
|
53 |
- "gnome-common", |
|
54 |
- "libgudev", |
|
55 |
- "geoip-api-c", |
|
56 |
- "geoip-api-c-devel", |
|
57 |
- "dhcp-client", |
|
58 |
- "dhcp-server", |
|
59 |
- "dhcp-libs", |
|
60 |
- "dhcp-devel", |
|
61 |
- "initscripts", |
|
62 |
- "net-tools", |
|
63 |
- "inotify-tools", |
|
64 |
- "jaxws-ri", |
|
65 |
- "commons-daemon", |
|
66 |
- "runit", |
|
67 |
- "python-pyasn1", |
|
68 |
- "WALinuxAgent", |
|
69 |
- "linux-esx", |
|
70 |
- "linux-sec", |
|
71 |
- "python-Twisted", |
|
72 |
- "python-zope.interface", |
|
73 |
- "python-ipaddr", |
|
74 |
- "pycrypto", |
|
75 |
- "chkconfig", |
|
76 |
- "libnss-ato", |
|
77 |
- "procmail", |
|
78 |
- "unixODBC", |
|
79 |
- "dmidecode", |
|
80 |
- "iperf", |
|
81 |
- "ipvsadm", |
|
82 |
- "distrib-compat", |
|
83 |
- "crash", |
|
84 |
- "systemtap", |
|
85 |
- "ktap", |
|
86 |
- "rubygem-backports", |
|
87 |
- "rubygem-builder", |
|
88 |
- "rubygem-highline", |
|
89 |
- "rubygem-terminal-table", |
|
90 |
- "rubygem-libxml-ruby", |
|
91 |
- "rubygem-zip", |
|
92 |
- "rubygem-trollop", |
|
93 |
- "rubygem-nokogiri", |
|
94 |
- "rubygem-mini_portile", |
|
95 |
- "rubygem-rbvmomi", |
|
96 |
- "compat-gdbm", |
|
97 |
- "tiptop", |
|
98 |
- "irqbalance", |
|
99 |
- "lttng-tools", |
|
100 |
- "userspace-rcu", |
|
101 |
- "dstat", |
|
102 |
- "libconfig", |
|
103 |
- "iptraf", |
|
104 |
- "pth", |
|
105 |
- "gnupg", |
|
106 |
- "libksba", |
|
107 |
- "linux-tools", |
|
108 |
- "nicstat", |
|
109 |
- "lldpad", |
|
110 |
- "mingetty", |
|
111 |
- "msr-tools", |
|
112 |
- "zip", |
|
113 |
- "consul", |
|
114 |
- "consul-template", |
|
115 |
- "nomad", |
|
116 |
- "vault", |
|
117 |
- "ntpstat", |
|
118 |
- "linux-oprofile", |
|
119 |
- "netcat", |
|
120 |
- "cgroup-utils", |
|
121 |
- "sysstat", |
|
122 |
- "blktrace", |
|
123 |
- "ethtool", |
|
124 |
- "ltrace", |
|
125 |
- "net-snmp", |
|
126 |
- "pcstat", |
|
127 |
- "libseccomp", |
|
128 |
- "sysdig", |
|
129 |
- "falco", |
|
130 |
- "zsh", |
|
131 |
- "iotop", |
|
132 |
- "libgd", |
|
133 |
- "lz4", |
|
134 |
- "lz4-devel", |
|
135 |
- "rsync", |
|
136 |
- "rng-tools", |
|
137 |
- "paramiko", |
|
138 |
- "vsftpd", |
|
139 |
- "ecdsa", |
|
140 |
- "kexec-tools", |
|
141 |
- "traceroute", |
|
142 |
- "bindutils", |
|
143 |
- "libusb", |
|
144 |
- "mc", |
|
145 |
- "python-pip", |
|
146 |
- "python-sqlalchemy", |
|
147 |
- "usbutils", |
|
148 |
- "dosfstools", |
|
149 |
- "efibootmgr", |
|
150 |
- "efivar", |
|
151 |
- "grub2-efi", |
|
152 |
- "pciutils", |
|
153 |
- "libatomic_ops", |
|
154 |
- "libatomic_ops-devel", |
|
155 |
- "tmux", |
|
156 |
- "nginx", |
|
157 |
- "kaigen-gothic-cjk", |
|
158 |
- "dialog", |
|
159 |
- "gnuplot", |
|
160 |
- "libwebp", |
|
161 |
- "libtiff", |
|
162 |
- "libpng", |
|
163 |
- "libjpeg-turbo", |
|
164 |
- "nasm", |
|
165 |
- "libssh2", |
|
166 |
- "libssh2-devel", |
|
167 |
- "libmnl", |
|
168 |
- "ipset", |
|
169 |
- "build-essential", |
|
170 |
- "micro-config-drive", |
|
171 |
- "ndsend", |
|
172 |
- "openscap", |
|
173 |
- "openscap-devel", |
|
174 |
- "openscap-python", |
|
175 |
- "openscap-perl", |
|
176 |
- "XML-XPath", |
|
177 |
- "GConf2", |
|
178 |
- "sshfs" |
|
179 |
- ] |
|
180 |
-} |
... | ... |
@@ -34,7 +34,7 @@ class PackageSelector(object): |
34 | 34 |
def get_packages_to_install(options, config_type, output_data_path): |
35 | 35 |
package_list = [] |
36 | 36 |
for install_option in options: |
37 |
- if install_option[0] == config_type: |
|
37 |
+ if install_option[0] == config_type: |
|
38 | 38 |
for include_type in install_option[1]["include"]: |
39 | 39 |
package_list = package_list + PackageSelector.get_packages_to_install(options, include_type, output_data_path) |
40 | 40 |
json_wrapper_package_list = JsonWrapper(os.path.join(output_data_path, install_option[1]["file"])) |
... | ... |
@@ -167,7 +167,6 @@ def make_src_iso(working_directory, src_iso_path, rpm_list): |
167 | 167 |
process = subprocess.Popen(['rm', '-rf', options.working_directory]) |
168 | 168 |
retval = process.wait() |
169 | 169 |
|
170 |
- |
|
171 | 170 |
if __name__ == '__main__': |
172 | 171 |
usage = "Usage: %prog [options] <config file> <tools path>" |
173 | 172 |
parser = OptionParser(usage) |
... | ... |
@@ -183,9 +182,9 @@ if __name__ == '__main__': |
183 | 183 |
parser.add_option("-f", "--force", action="store_true", dest="force", default=False) |
184 | 184 |
parser.add_option("-p", "--package-list-file", dest="package_list_file", default="../common/data/build_install_options_all.json") |
185 | 185 |
parser.add_option("-m", "--stage-path", dest="stage_path", default="../stage") |
186 |
- parser.add_option("-c", "--dracut-configuration", dest="dracut_configuration_file", default="../common/data/dracut_configuration.json") |
|
187 | 186 |
parser.add_option("-s", "--json-data-path", dest="json_data_path", default="../stage/common/data/") |
188 |
- parser.add_option("-d", "--pkg-to_rpm-map-file", dest="pkg_to_rpm_map_file", default="../stage/pkg_info.json") |
|
187 |
+ parser.add_option("-d", "--pkg-to-rpm-map-file", dest="pkg_to_rpm_map_file", default="../stage/pkg_info.json") |
|
188 |
+ parser.add_option("-c", "--pkg-to-be-copied-conf-file", dest="pkg_to_be_copied_conf_file") |
|
189 | 189 |
|
190 | 190 |
(options, args) = parser.parse_args() |
191 | 191 |
# Cleanup the working directory |
... | ... |
@@ -195,7 +194,7 @@ if __name__ == '__main__': |
195 | 195 |
sys.exit(0) |
196 | 196 |
|
197 | 197 |
if options.src_iso_path: |
198 |
- rpm_list = create_rpm_list_to_be_copied_to_iso(options.pkg_to_rpm_map_file, options.package_list_file, 4, options.output_data_path) |
|
198 |
+ rpm_list = create_rpm_list_to_be_copied_to_iso(options.pkg_to_rpm_map_file, options.pkg_to_be_copied_conf_file, 4, options.output_data_path) |
|
199 | 199 |
make_src_iso(options.working_directory, options.src_iso_path, rpm_list) |
200 | 200 |
|
201 | 201 |
else: |
... | ... |
@@ -220,8 +219,6 @@ if __name__ == '__main__': |
220 | 220 |
print "Unexpected failure, please check the logs" |
221 | 221 |
sys.exit(1) |
222 | 222 |
|
223 |
- config['initrd_dir'] = "/boot" |
|
224 |
- |
|
225 | 223 |
config['iso_system'] = False |
226 | 224 |
config['vmdk_install'] = True |
227 | 225 |
|
... | ... |
@@ -253,13 +250,6 @@ if __name__ == '__main__': |
253 | 253 |
|
254 | 254 |
config['packages'] = packages |
255 | 255 |
|
256 |
- if options.iso_path: |
|
257 |
- if os.path.isfile(options.dracut_configuration_file): |
|
258 |
- json_wrapper_package_list = JsonWrapper(options.dracut_configuration_file) |
|
259 |
- dracut_configuration_list_json = json_wrapper_package_list.read() |
|
260 |
- config["dracut_configuration"]=dracut_configuration_list_json["dracut_configuration"] |
|
261 |
- |
|
262 |
- |
|
263 | 256 |
if (os.path.isdir(options.working_directory)): |
264 | 257 |
process = subprocess.Popen(['rm', '-rf', options.working_directory]) |
265 | 258 |
retval = process.wait() |
... | ... |
@@ -275,7 +265,7 @@ if __name__ == '__main__': |
275 | 275 |
|
276 | 276 |
# Making the iso if needed |
277 | 277 |
if options.iso_path: |
278 |
- rpm_list = " ".join(create_rpm_list_to_be_copied_to_iso(options.pkg_to_rpm_map_file, options.package_list_file, 3, options.output_data_path)) |
|
278 |
+ rpm_list = " ".join(create_rpm_list_to_be_copied_to_iso(options.pkg_to_rpm_map_file, options.pkg_to_be_copied_conf_file, 3, options.output_data_path)) |
|
279 | 279 |
files_to_copy = " ".join(create_additional_file_list_to_copy_in_iso(os.path.abspath(options.stage_path), options.package_list_file)) |
280 | 280 |
live_cd = get_live_cd_status_string(options.package_list_file) |
281 | 281 |
process = subprocess.Popen(['./mk-install-iso.sh', '-w', options.working_directory, options.iso_path, options.rpm_path, options.package_list_file, rpm_list, options.stage_path, files_to_copy, live_cd, options.json_data_path]) |