Browse code

Create minimai ISO with less then 300MB of iso size. Usage: sudo make minimal

To achieve that seperated all installation types into individual json files. And created a new higher level configuration file that will have installation options and their repective package list file.
This will also allow us to easily add new installation type and remove it.
Another goal is that we could provide this new config files to Build system to ONLY build the packages that are going to packaged inside the ISO.

Touseef Liaqat authored on 2015/06/28 07:23:18
Showing 16 changed files
... ...
@@ -30,19 +30,32 @@ PHOTON_PUBLISH_RPMS := publish-rpms
30 30
 endif
31 31
 
32 32
 .PHONY : all iso clean photon-build-machine photon-vagrant-build photon-vagrant-local \
33
-check check-bison check-g++ check-gawk check-createrepo check-vagrant check-packer check-packer-ovf-plugin check-package-list \
33
+check check-bison check-g++ check-gawk check-createrepo check-vagrant check-packer check-packer-ovf-plugin check-sanity \
34 34
 clean-install clean-chroot
35 35
 
36 36
 all: iso
37 37
 
38
+minimal: check $(PHOTON_STAGE) $(PHOTON_PACKAGES)
39
+	@echo "Building Photon ISO..."
40
+	@cp -f $(PHOTON_INSTALLER_DIR)/build_install_options_minimal.json $(PHOTON_INSTALLER_DIR)/install_options.json
41
+	@cd $(PHOTON_INSTALLER_DIR) && \
42
+        $(PHOTON_INSTALLER) -i $(PHOTON_STAGE)/photon-minimal.iso \
43
+                -w $(PHOTON_STAGE)/photon_iso \
44
+                -l $(PHOTON_STAGE)/LOGS \
45
+                -r $(PHOTON_STAGE)/RPMS \
46
+                -p $(PHOTON_INSTALLER_DIR)/install_options.json \
47
+                -f > \
48
+                $(PHOTON_LOGS_DIR)/installer.log 2>&1
49
+
38 50
 iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES)
39 51
 	@echo "Building Photon ISO..."
52
+	@cp -f $(PHOTON_INSTALLER_DIR)/build_install_options_all.json $(PHOTON_INSTALLER_DIR)/install_options.json
40 53
 	@cd $(PHOTON_INSTALLER_DIR) && \
41 54
         sudo $(PHOTON_INSTALLER) -i $(PHOTON_STAGE)/photon.iso \
42 55
                 -w $(PHOTON_STAGE)/photon_iso \
43 56
                 -l $(PHOTON_STAGE)/LOGS \
44 57
                 -r $(PHOTON_STAGE)/RPMS \
45
-                -p $(PHOTON_INSTALLER_PACKAGE_LIST) \
58
+                -p $(PHOTON_INSTALLER_DIR)/install_options.json \
46 59
                 -f > \
47 60
                 $(PHOTON_LOGS_DIR)/installer.log 2>&1
48 61
 
... ...
@@ -155,7 +168,7 @@ photon-vagrant-local: check-packer check-vagrant
155 155
 		echo "Unable to find $(PHOTON_STAGE)/photon.iso ... aborting build"; \
156 156
 	fi
157 157
 
158
-check: check-bison check-g++ check-gawk check-createrepo check-texinfo check-package-list
158
+check: check-bison check-g++ check-gawk check-createrepo check-texinfo check-sanity
159 159
 
160 160
 check-bison:
161 161
 	@command -v bison >/dev/null 2>&1 || { echo "Package bison not installed. Aborting." >&2; exit 1; }
... ...
@@ -175,8 +188,8 @@ check-createrepo:
175 175
 check-vagrant: check-packer
176 176
 	@command -v $(VAGRANT) >/dev/null 2>&1 || { echo "Vagrant not installed or wrong path, expecting $(VAGRANT). Aborting" >&2; exit 1; }
177 177
 
178
-check-package-list:
179
-	@json_pp -t null < installer/package_list.json >/dev/null 2>&1 || { echo "Invalid installer/package_list.json. Aborting" >&2; exit 1; }
178
+check-sanity:
179
+	$(SRCROOT)/support/sanity_check.sh
180 180
 
181 181
 ifeq ($(VAGRANT_BUILD),vcloudair)
182 182
 check-packer: check-packer-ovf-plugin
... ...
@@ -201,5 +214,3 @@ check-packer-ovf-plugin:
201 201
                               -x $(PHOTON_SRCS_DIR) \
202 202
                               -p $(PHOTON_PUBLISH_RPMS_DIR) \
203 203
                               -l $(PHOTON_LOGS_DIR)
204
-                              
205
-
... ...
@@ -7,13 +7,11 @@
7 7
 
8 8
     "bootstrap_packages": ["filesystem"],
9 9
 
10
-    "packages": ["glibc", "zlib", "binutils", "gmp", "mpfr", "libgcc", "libstdc++","libgomp", 
10
+    "packages": ["glibc", "zlib", "binutils", "gmp", "mpfr", "libgcc", "libstdc++","libgomp",
11 11
                 "pkg-config", "ncurses", "bash", "bzip2", "cracklib", "cracklib-dicts", "shadow",
12 12
                 "procps-ng", "iana-etc", "readline", "coreutils", "bc", "libtool", "inetutils",
13 13
                 "findutils", "xz", "grub", "iproute2", "util-linux", "linux",
14 14
                 "attr", "libcap", "kmod", "expat", "dbus", "file",
15
-                "sed", "grep", "cpio", "gzip"
16
-                "dracut", "dracut-tools"
17
-
18
-]
15
+                "sed", "grep", "cpio", "gzip",
16
+                "dracut", "dracut-tools"]
19 17
 }
20 18
new file mode 100644
... ...
@@ -0,0 +1,33 @@
0
+{
1
+    "iso_packages" : {
2
+        "order" : 0,
3
+        "type" : "iso",
4
+        "title" : "ISO Packages",
5
+        "file" : "packages_iso.json",
6
+        "visible" : false
7
+    },
8
+    "micro_packages" : {
9
+        "order" : 1,
10
+        "type" : "micro",
11
+        "title" : "1. Photon Micro",
12
+        "file" : "packages_micro.json",
13
+        "visible" : true
14
+
15
+    },
16
+    "minimal_packages" : {
17
+        "order" : 2,
18
+        "type" : "minimal",
19
+        "title" : "2. Photon Minimal",
20
+        "file" : "packages_minimal.json",
21
+        "visible" : true
22
+    },
23
+    "full_packages" : {
24
+        "order" : 3,
25
+        "type" : "full",
26
+        "title" : "3. Photon Full",
27
+        "file" : "packages_full.json",
28
+        "visible" : true
29
+    }
30
+}
31
+
32
+
0 33
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+{
1
+    "iso_packages" : {
2
+        "order" : 0,
3
+        "type" : "iso",
4
+        "title" : "ISO Packages",
5
+        "file" : "packages_iso.json",
6
+        "visible" : false
7
+    },
8
+    "minimal_packages" : {
9
+        "order" : 1,
10
+        "type" : "micro",
11
+        "title" : "Photon Minimal",
12
+        "file" : "packages_minimal.json",
13
+        "visible" : true
14
+    }
15
+}
0 16
\ No newline at end of file
... ...
@@ -33,20 +33,22 @@ class CustomPackageSelector(object):
33 33
         self.window = Window(self.win_height, self.win_width, self.maxy, self.maxx, 'Select your Packages', True, self.package_menu)
34 34
 
35 35
     def load_package_list(self):
36
-        json_wrapper_package_list = JsonWrapper("package_list.json");
37
-        self.package_list_json = json_wrapper_package_list.read()
36
+        json_wrapper_package_list = JsonWrapper("packages_full.json");
37
+        package_list_json = json_wrapper_package_list.read()
38 38
 
39
-        for package in self.package_list_json["optional_packages"]:
39
+        for package in package_list_json["packages"]:
40 40
             self.menu_items.append((package, self.exit_function))
41 41
         self.package_menu = Menu(self.menu_starty,  self.maxx, self.menu_items, height = 18, selector_menu = True)
42 42
 
43 43
 
44 44
     def exit_function(self,  selected_indexes):
45
+        json_wrapper_package_list = JsonWrapper("packages_miniaml.json");
46
+        package_list_json = json_wrapper_package_list.read()
45 47
         selected_items = []
46 48
         for index in selected_indexes:
47 49
             selected_items.append(self.menu_items[index][0])
48 50
 
49
-        self.install_config['packages'] = self.package_list_json["minimal_packages"] + selected_items
51
+        self.install_config['packages'] = package_list_json["packages"] + selected_items
50 52
         return ActionResult(True, None)
51 53
 
52 54
     def display(self, params):
... ...
@@ -11,10 +11,10 @@
11 11
 #	End
12 12
 #
13 13
 
14
-set -o errexit		# exit if error...insurance ;)
15
-set -o nounset		# exit if variable not initalized
16
-set +h			# disable hashall
17
-PRGNAME=${0##*/}	# script name minus the path
14
+set -o errexit          # exit if error...insurance ;)
15
+set -o nounset          # exit if variable not initalized
16
+set +h                  # disable hashall
17
+PRGNAME=${0##*/}	    # script name minus the path
18 18
 source config.inc		#	configuration parameters
19 19
 source function.inc		#	commonn functions
20 20
 LOGFILE=/var/log/"${PRGNAME}-${LOGFILE}"	#	set log file name
... ...
@@ -29,6 +29,7 @@ fi
29 29
 ISO_OUTPUT_NAME=$1
30 30
 RPMS_PATH=$2
31 31
 PACKAGE_LIST_FILE=$3
32
+RPM_LIST=$4
32 33
 
33 34
 #- Step 3 Setting up the boot loader
34 35
 WORKINGDIR=${BUILDROOT}
... ...
@@ -87,7 +88,15 @@ sed -i "s/root:.*/root:x:0:0:root:\/root:\/bin\/bootphotoninstaller/g" ${BUILDRO
87 87
 
88 88
 mkdir -p ${BUILDROOT}/mnt/photon-root/photon-chroot
89 89
 rm -rf ${BUILDROOT}/RPMS
90
-cp -r ${RPMS_PATH} ${WORKINGDIR}/
90
+
91
+#cp -r ${RPMS_PATH} ${WORKINGDIR}/
92
+(
93
+cd ${RPMS_PATH}
94
+mkdir ${WORKINGDIR}/RPMS
95
+for rpm_name in $RPM_LIST; do
96
+    cp --parent `find . -name "$rpm_name-[0-9]*" -type f` ${WORKINGDIR}/RPMS/;
97
+done
98
+)
91 99
 
92 100
 #creating rpm repo in cd..
93 101
 createrepo --database ${WORKINGDIR}/RPMS
... ...
@@ -8,17 +8,19 @@ enabled = True
8 8
 def execute(name, ks_config, config, root):
9 9
 
10 10
     if ks_config:
11
-        package_list = JsonWrapper("package_list.json").read()
11
+        package_list_micro = JsonWrapper("packages_micro.json").read()
12
+        package_list_minimal = JsonWrapper("packages_minimal.json").read()
13
+        package_list_full = JsonWrapper("packages_full.json").read()
12 14
 
13 15
         if ks_config['type'] == 'micro':
14
-            packages = package_list["micro_packages"]
16
+            packages = package_list_micro["packages"]
15 17
         elif ks_config['type'] == 'minimal':
16
-            packages = package_list["minimal_packages"]
18
+            packages = package_list_minimal["packages"]
17 19
         elif ks_config['type'] == 'full':
18
-            packages = package_list["minimal_packages"] + package_list["optional_packages"]
20
+            packages = package_list_minimal["packages"] + package_list_full["packages"]
19 21
         else:
20 22
             #TODO: error
21 23
             packages = []
22 24
 
23
-        config['type'] = ks_config['type']        
25
+        config['type'] = ks_config['type']
24 26
         config["packages"] = packages
25 27
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+{
1
+    "packages":["unzip", "gmp-devel", "sudo", "bzip2-devel", "XML-Parser", "intltool", "mercurial", "libsigc++", "boost", 
2
+                "libgomp-devel", "libstdc++-devel", "libgcc-devel", "gcc", "bison", "gdb", "libpipeline", "python2-devel", 
3
+                "python2-tools", "linux-api-headers","gawk","check", "libltdl", "libltdl-devel", "pcre-devel", "glib-devel", 
4
+                "glibc-devel", "glibc-lang", "zlib-devel", "gettext", "git", "git-lang", "autoconf", "perl", "perl-DBI","perl-Config-IniFiles",
5
+                "perl-DBIx-Simple", "perl-DBD-SQLite","perl-Exporter-Tiny","perl-JSON-XS","perl-List-MoreUtils","perl-Module-Install",
6
+                "perl-Module-ScanDeps","perl-Types-Serialiser","perl-WWW-Curl","perl-YAML-Tiny","perl-YAML","perl-common-sense","perl-libintl","tcsh",
7
+                "gobject-introspection", "gobject-introspection-devel", "gobject-introspection-python", "procps-ng-devel", 
8
+                "bash-lang", "kbd", "coreutils-lang", "libxslt", "docbook-xml", "docbook-xsl", "gtk-doc", "popt-devel", "texinfo", "tar", 
9
+                "kubernetes", "cyrus-sasl", "openldap", "binutils-devel", "python-iniparse", "psmisc", "etcd", "openssl-devel", 
10
+                "util-linux-lang", "db-docs", "linux-dev", "linux-docs", "mpc", "json-glib", "json-glib-devel", 
11
+                "automake", "libpcap", "tcpdump", "elfutils-libelf-devel", "elfutils", "elfutils-devel", "elfutils-devel-static", "elfutils-libelf-devel-static", 
12
+                "go", "grub-lang", "diffutils", "groff", "man-db", "mpfr-devel", "man-pages", 
13
+                "hawkey-devel", "python-hawkey", "busybox", "libxml2-devel", "ruby", "readline-devel", "wget", "cifs-utils", 
14
+                "Linux-PAM-lang", "make", "bindutils", "gperf", "lua-devel", "which", "less",  
15
+                "cmake", "gpgme-devel", "parted", "vim", "xz-devel", "xerces-c-devel", "xml-security-c-devel", 
16
+                "nss-devel", "ncurses-devel", "tzdata", "itstool", "sed-lang", "gptfdisk", "ntp", "flex", "patch", "m4", "dracut", "dracut-tools", 
17
+                "libarchive", "libsoup", "asciidoc", "mkinitcpio",
18
+                "ostree", "tdnf-devel", "librepo-devel", "libhif", "libhif-devel", "rpm-ostree", "createrepo", "glibmm", "deltarpm", "cdrkit", "dparted", "libgsystem",
19
+                "rpm-ostree-toolbox","libsepol","libselinux","device-mapper-libs","device-mapper",
20
+                "acl","btrfs-progs","btrfs-progs-devel","device-mapper-devel","device-mapper-event","device-mapper-event-devel",
21
+                "device-mapper-event-libs","libacl","libacl-devel","libselinux-devel","libselinux-python","libselinux-utils","libsepol-devel",
22
+                "libaio","libaio-devel","thin-provisioning-tools","lvm2","lvm2-devel","lvm2-libs","lvm2-python-libs","lzo","lzo-devel","lzo-minilzo","swig",
23
+                "rpm-devel","pycurl","urlgrabber","yum-metadata-parser","yum", "rocket", "strace", "cracklib-python",
24
+                "haveged", "haveged-devel",
25
+                "postgresql", "openjdk", "apr", "apr-util", "httpd", "openvswitch", "eventlog", "syslog-ng", "zookeeper", "fuse"]
26
+}
27
+
28
+
0 29
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+{
1
+    "packages":["glibc", "zlib", "filesystem",
2
+                "binutils", "gmp", "mpfr", "libgcc", "libstdc++", 
3
+                "sed", "bzip2", "pkg-config", "readline", "ncurses", "bash",
4
+                "cracklib", "cracklib-dicts", "cracklib-python", "shadow", "procps-ng", 
5
+                "coreutils", "iana-etc", "grep", "bc", "libtool",
6
+                "inetutils", "findutils",
7
+                "xz", "grub", "iproute2", "kmod",
8
+                "util-linux", "e2fsprogs",
9
+                "libffi", "expat",
10
+                "linux", "cpio",
11
+                "Linux-PAM", "attr", "libcap", "systemd", "dbus",
12
+                "elfutils-libelf", "sqlite-autoconf", "nspr", "nss", "popt", "lua", "rpm",
13
+                "gptfdisk", "tar", "gzip", "openssl", "python2", "python2-libs", "python-requests",
14
+                "pcre", "glib", "parted", "libsigc++", "XML-Parser", "glibmm", "dparted",
15
+                "libgsystem", "ostree"]
16
+}
17
+
18
+
0 19
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+{
1
+    "packages":["glibc","zlib", "filesystem",
2
+                "gmp", "mpfr", "libgcc", "libstdc++",
3
+                "bzip2", "pkg-config", "ncurses", "cracklib", "cracklib-dicts", "shadow", "procps-ng", "e2fsprogs",
4
+                "iana-etc", "readline", "coreutils", "bash", "bc", "libtool",
5
+                "inetutils",
6
+                "xz", "grub", "iproute2", "kbd", "kmod", "libpipeline",
7
+                "util-linux",
8
+                "openssl", "libffi", "expat",
9
+                "linux", "curl",
10
+                "iptables", "ca-certificates",
11
+                "Linux-PAM", "attr", "libcap", "systemd", "dbus",
12
+                "sqlite-autoconf", "elfutils-libelf", "elfutils-libelf-devel",
13
+                "nspr", "nss", "popt", "lua", "rpm", "openssh",
14
+                "db", "libsolv", "libgpg-error", "hawkey", "libassuan", "gpgme", "librepo", "pcre", "glib", "tdnf",
15
+                "photon-release"
16
+                ]
17
+}
18
+
19
+
0 20
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+{
1
+    "packages":["glibc", "zlib", "filesystem", "binutils", "gmp", "mpfr", "libgcc", "libstdc++","libgomp", 
2
+                "pkg-config", "ncurses", "readline", "bash", "bzip2", "cracklib", "cracklib-dicts", "shadow", "procps-ng", "iana-etc", "coreutils", "bc", "libtool", "inetutils",
3
+                "findutils", "xz", "grub", "iproute2", "util-linux", "openssl", "kmod", "linux", "ca-certificates", "curl", "iptables", "Linux-PAM",
4
+                "attr", "libcap", "systemd", "expat", "dbus", "file", "e2fsprogs", "elfutils-libelf", "lua", "popt", "sqlite-autoconf", "nspr", "nss", "rpm",
5
+                "openssh", "libffi", "gdbm", "python2", "python2-libs", "pcre", "glib", "libxml2",
6
+                "photon-release",
7
+                "sed", "grep", "cpio", "gzip", "nano", "db", "libsolv", "libgpg-error", "hawkey", "libassuan", "gpgme", "librepo", "tdnf",
8
+                "libdnet", "xerces-c", "xml-security-c", "libmspack", "open-vm-tools",
9
+                "docker","bridge-utils",
10
+                "libyaml", "PyYAML", "python-requests", "python-prettytable", "python-jsonpointer", "python-jsonpatch", "python-six", "python-configobj", "cloud-init",
11
+		         "krb5", "e2fsprogs-devel"]
12
+}
13
+
14
+
... ...
@@ -30,15 +30,18 @@ class PackageSelector(object):
30 30
         self.window = Window(self.win_height, self.win_width, self.maxy, self.maxx, 'Select Installation', True, self.package_menu)
31 31
 
32 32
     def load_package_list(self):
33
-        json_wrapper_package_list = JsonWrapper("package_list.json");
34
-        self.package_list_json = json_wrapper_package_list.read()
35
-
36
-        self.package_menu_items =   [
37
-                                        ('1. Photon OS (Micro)', self.exit_function, ['micro', self.package_list_json["micro_packages"]]),
38
-                                        ('2. Photon Container OS (Minimal)', self.exit_function, ['minimal', self.package_list_json["minimal_packages"]]),
39
-                                        ('3. Photon Full OS (All)', self.exit_function, ['full', self.package_list_json["minimal_packages"] + self.package_list_json["optional_packages"]]),
40
-                                        ('4. Photon Custom OS', self.custom_packages, ['custom', None])
41
-                                    ]
33
+        json_wrapper_option_list = JsonWrapper("install_options.json")
34
+        option_list_json = json_wrapper_option_list.read()
35
+        options_sorted = sorted(option_list_json.items(), key=lambda item: item[1]['order'])
36
+
37
+        self.package_menu_items = []
38
+
39
+        for install_option in options_sorted:
40
+            if install_option[1]["visible"] == True:
41
+                json_wrapper_package_list = JsonWrapper(install_option[1]["file"])
42
+                package_list_json = json_wrapper_package_list.read()
43
+                self.package_menu_items.append((install_option[1]["title"], self.exit_function, [install_option[1]["type"], package_list_json["packages"]] ))
44
+
42 45
         self.package_menu = Menu(self.menu_starty,  self.maxx, self.package_menu_items)
43 46
 
44 47
     def exit_function(self,  selected_item_params):
... ...
@@ -79,6 +79,16 @@ def create_vmdk_and_partition(config, vmdk_path):
79 79
             count += 1
80 80
     
81 81
     return partitions_data, count == 2
82
+def create_rpm_list_to_copy_in_iso(build_install_option):
83
+    json_wrapper_option_list = JsonWrapper(build_install_option)
84
+    option_list_json = json_wrapper_option_list.read()
85
+    options_sorted = sorted(option_list_json.items(), key=lambda item: item[1]['order'])
86
+    packages = []
87
+    for install_option in options_sorted:
88
+        json_wrapper_package_list = JsonWrapper(install_option[1]["file"])
89
+        package_list_json = json_wrapper_package_list.read()
90
+        packages = packages + package_list_json["packages"]
91
+    return packages
82 92
 
83 93
 if __name__ == '__main__':
84 94
     usage = "Usage: %prog [options] <config file> <tools path>"
... ...
@@ -135,15 +145,21 @@ if __name__ == '__main__':
135 135
 
136 136
 
137 137
     # Check the installation type
138
-    package_list = JsonWrapper(options.package_list_file).read()
138
+    package_list_iso = JsonWrapper("packages_iso.json").read()
139
+    package_list_micro = JsonWrapper("packages_micro.json").read()
140
+    package_list_minimal = JsonWrapper("packages_minimal.json").read()
141
+    package_list_full = JsonWrapper("packages_full.json").read()
142
+
143
+
144
+
139 145
     if config['iso_system']:
140
-        packages = package_list["iso_packages"]
146
+        packages = package_list_iso["packages"]
141 147
     elif config['type'] == 'micro':
142
-        packages = package_list["micro_packages"]
148
+        packages = package_list_micro["packages"]
143 149
     elif config['type'] == 'minimal':
144
-        packages = package_list["minimal_packages"]
150
+        packages = package_list_minimal["packages"]
145 151
     elif config['type'] == 'full':
146
-        packages = package_list["minimal_packages"] + package_list["optional_packages"]
152
+        packages = package_list_minimal["packages"] + package_list_full["packages"]
147 153
     else:
148 154
         #TODO: error
149 155
         packages = []
... ...
@@ -173,7 +189,8 @@ if __name__ == '__main__':
173 173
 
174 174
     # Making the iso if needed
175 175
     if config['iso_system']:
176
-        process = subprocess.Popen(['./mk-install-iso.sh', '-w', options.working_directory, options.iso_path, options.rpm_path, options.package_list_file])
176
+        rpm_list = " ".join(create_rpm_list_to_copy_in_iso(options.package_list_file))
177
+        process = subprocess.Popen(['./mk-install-iso.sh', '-w', options.working_directory, options.iso_path, options.rpm_path, options.package_list_file, rpm_list])
177 178
         retval = process.wait()
178 179
 
179 180
     # Cleaning up for vmdk
180 181
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-"[]"
2 1
\ No newline at end of file
... ...
@@ -135,7 +135,7 @@ class PackageManager(object):
135 135
         statusEvent=threading.Event()
136 136
         numWorkerThreads=self.calculatePossibleNumWorkerThreads()
137 137
         if numWorkerThreads > 8:
138
-            numWorkerThreads = 8
138
+            numWorkerThreads = 1
139 139
         if numWorkerThreads == 0:
140 140
             self.logger.error("Unable to create worker threads. Terminating the package manager.")
141 141
             raise Exception("No Space.")
142 142
new file mode 100755
... ...
@@ -0,0 +1,8 @@
0
+#!/bin/bash
1
+
2
+# Sanify check for all json files.
3
+echo "Sanity check for all json files..."
4
+for i in `find . -name "*.json" -type f -not -path "*stage*"`; do echo $i; json_pp -t null < $i || break -1 ; done
5
+
6
+echo "Checking all python code is compilable..."
7
+for i in `find . -name "*.py" -type f -not -path "*stage*"`; do echo $i; python -m py_compile $i || break -1 ; done