Change-Id: I3b4bc4f2a6a23fa7f1fa562a8eef7ae735b10419
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1987
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
| ... | ... |
@@ -72,6 +72,7 @@ micro-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MICRO) |
| 72 | 72 |
-l $(PHOTON_STAGE)/LOGS \ |
| 73 | 73 |
-r $(PHOTON_STAGE)/RPMS \ |
| 74 | 74 |
-p $(PHOTON_GENERATED_DATA_DIR)/$(MICRO_PACKAGE_LIST_FILE) \ |
| 75 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/$(MICRO_PACKAGE_LIST_FILE) \ |
|
| 75 | 76 |
-o $(PHOTON_STAGE)/common/data \ |
| 76 | 77 |
-d $(PHOTON_STAGE)/pkg_info.json \ |
| 77 | 78 |
-s $(PHOTON_DATA_DIR) \ |
| ... | ... |
@@ -107,6 +108,7 @@ minimal-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) |
| 107 | 107 |
-l $(PHOTON_STAGE)/LOGS \ |
| 108 | 108 |
-r $(PHOTON_STAGE)/RPMS \ |
| 109 | 109 |
-p $(PHOTON_GENERATED_DATA_DIR)/$(MINIMAL_PACKAGE_LIST_FILE) \ |
| 110 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/$(MINIMAL_PACKAGE_LIST_FILE) \ |
|
| 110 | 111 |
-o $(PHOTON_STAGE)/common/data \ |
| 111 | 112 |
-d $(PHOTON_STAGE)/pkg_info.json \ |
| 112 | 113 |
-s $(PHOTON_DATA_DIR) \ |
| ... | ... |
@@ -122,6 +124,7 @@ ostree-host-iso: check $(PHOTON_STAGE) ostree-repo |
| 122 | 122 |
-l $(PHOTON_STAGE)/LOGS \ |
| 123 | 123 |
-r $(PHOTON_STAGE)/RPMS \ |
| 124 | 124 |
-p $(PHOTON_GENERATED_DATA_DIR)/build_install_options_ostreehost.json \ |
| 125 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/build_install_options_ostreehost.json \ |
|
| 125 | 126 |
-o $(PHOTON_STAGE)/common/data \ |
| 126 | 127 |
-s $(PHOTON_DATA_DIR) \ |
| 127 | 128 |
-f > \ |
| ... | ... |
@@ -136,6 +139,7 @@ live-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) minimal-iso |
| 136 | 136 |
-l $(PHOTON_STAGE)/LOGS \ |
| 137 | 137 |
-r $(PHOTON_STAGE)/RPMS \ |
| 138 | 138 |
-p $(PHOTON_GENERATED_DATA_DIR)/build_install_options_livecd.json \ |
| 139 |
+ -c $(PHOTON_GENERATED_DATA_DIR)/build_install_options_livecd.json \ |
|
| 139 | 140 |
-o $(PHOTON_STAGE)/common/data \ |
| 140 | 141 |
-d $(PHOTON_STAGE)/pkg_info.json \ |
| 141 | 142 |
-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,135 +0,0 @@ |
| 1 |
-{
|
|
| 2 |
- "packages":[ |
|
| 3 |
- "google-daemon", |
|
| 4 |
- "google-startup-scripts", |
|
| 5 |
- "autogen", |
|
| 6 |
- "cronie", |
|
| 7 |
- "gc", |
|
| 8 |
- "gnutls", |
|
| 9 |
- "guile", |
|
| 10 |
- "json-c", |
|
| 11 |
- "libestr", |
|
| 12 |
- "libgcrypt", |
|
| 13 |
- "liblogging", |
|
| 14 |
- "librelp", |
|
| 15 |
- "libtasn1", |
|
| 16 |
- "libunistring", |
|
| 17 |
- "nettle", |
|
| 18 |
- "rsyslog", |
|
| 19 |
- "device-mapper-multipath", |
|
| 20 |
- "NetworkManager", |
|
| 21 |
- "NetworkManager-devel", |
|
| 22 |
- "dbus-glib", |
|
| 23 |
- "libndp", |
|
| 24 |
- "libnl", |
|
| 25 |
- "dbus-glib-devel", |
|
| 26 |
- "libndp-devel", |
|
| 27 |
- "libnl-devel", |
|
| 28 |
- "logrotate", |
|
| 29 |
- "sendmail", |
|
| 30 |
- "kpartx", |
|
| 31 |
- "autogen-libopts", |
|
| 32 |
- "autogen-libopts-devel", |
|
| 33 |
- "gc-devel", |
|
| 34 |
- "gnutls-devel", |
|
| 35 |
- "guile-devel", |
|
| 36 |
- "json-c-devel", |
|
| 37 |
- "libestr-devel", |
|
| 38 |
- "libgcrypt-devel", |
|
| 39 |
- "liblogging-devel", |
|
| 40 |
- "librelp-devel", |
|
| 41 |
- "libtasn1-devel", |
|
| 42 |
- "libunistring-devel", |
|
| 43 |
- "nettle-devel", |
|
| 44 |
- "apache-ant", |
|
| 45 |
- "ant-contrib", |
|
| 46 |
- "apache-maven", |
|
| 47 |
- "apache-tomcat", |
|
| 48 |
- "jna", |
|
| 49 |
- "gnome-common", |
|
| 50 |
- "libgudev", |
|
| 51 |
- "dhcp-client", |
|
| 52 |
- "dhcp-server", |
|
| 53 |
- "dhcp-libs", |
|
| 54 |
- "dhcp-devel", |
|
| 55 |
- "initscripts", |
|
| 56 |
- "net-tools", |
|
| 57 |
- "inotify-tools", |
|
| 58 |
- "jaxws-ri", |
|
| 59 |
- "commons-daemon", |
|
| 60 |
- "runit", |
|
| 61 |
- "python-pyasn1", |
|
| 62 |
- "WALinuxAgent", |
|
| 63 |
- "linux-esx", |
|
| 64 |
- "python-Twisted", |
|
| 65 |
- "python-zope.interface", |
|
| 66 |
- "python-ipaddr", |
|
| 67 |
- "pycrypto", |
|
| 68 |
- "chkconfig", |
|
| 69 |
- "libnss-ato", |
|
| 70 |
- "procmail", |
|
| 71 |
- "dmidecode", |
|
| 72 |
- "iperf", |
|
| 73 |
- "distrib-compat", |
|
| 74 |
- "crash", |
|
| 75 |
- "systemtap", |
|
| 76 |
- "ktap", |
|
| 77 |
- "rubygem-backports", |
|
| 78 |
- "rubygem-builder", |
|
| 79 |
- "rubygem-highline", |
|
| 80 |
- "rubygem-terminal-table", |
|
| 81 |
- "rubygem-libxml-ruby", |
|
| 82 |
- "rubygem-zip", |
|
| 83 |
- "rubygem-trollop", |
|
| 84 |
- "rubygem-nokogiri", |
|
| 85 |
- "rubygem-mini_portile", |
|
| 86 |
- "rubygem-rbvmomi", |
|
| 87 |
- "compat-gdbm", |
|
| 88 |
- "tiptop", |
|
| 89 |
- "libssh2", |
|
| 90 |
- "libssh2-devel", |
|
| 91 |
- "irqbalance", |
|
| 92 |
- "lttng-tools", |
|
| 93 |
- "userspace-rcu", |
|
| 94 |
- "dstat", |
|
| 95 |
- "libconfig", |
|
| 96 |
- "iptraf", |
|
| 97 |
- "linux-tools", |
|
| 98 |
- "nicstat", |
|
| 99 |
- "lldpad", |
|
| 100 |
- "mingetty", |
|
| 101 |
- "msr-tools", |
|
| 102 |
- "zip", |
|
| 103 |
- "ntpstat", |
|
| 104 |
- "linux-oprofile", |
|
| 105 |
- "netcat", |
|
| 106 |
- "cgroup-utils", |
|
| 107 |
- "sysstat", |
|
| 108 |
- "blktrace", |
|
| 109 |
- "ethtool", |
|
| 110 |
- "ltrace", |
|
| 111 |
- "net-snmp", |
|
| 112 |
- "pcstat", |
|
| 113 |
- "libseccomp", |
|
| 114 |
- "sysdig", |
|
| 115 |
- "iotop", |
|
| 116 |
- "rsync", |
|
| 117 |
- "strongswan", |
|
| 118 |
- "paramiko", |
|
| 119 |
- "vsftpd", |
|
| 120 |
- "ecdsa", |
|
| 121 |
- "kexec-tools", |
|
| 122 |
- "traceroute", |
|
| 123 |
- "bindutils", |
|
| 124 |
- "libusb", |
|
| 125 |
- "usbutils", |
|
| 126 |
- "dosfstools", |
|
| 127 |
- "efibootmgr", |
|
| 128 |
- "efivar", |
|
| 129 |
- "grub2-efi", |
|
| 130 |
- "pciutils", |
|
| 131 |
- "nginx", |
|
| 132 |
- "kaigen-gothic-cjk", |
|
| 133 |
- "python-pip" |
|
| 134 |
- ] |
|
| 135 |
-} |
| ... | ... |
@@ -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]) |