This reverts commit ba859111863c96ba6fda9883d82f460450724a36.
Sharath George authored on 2015/08/14 09:46:20... | ... |
@@ -29,6 +29,9 @@ else |
29 | 29 |
PHOTON_SOURCES ?= sources |
30 | 30 |
endif |
31 | 31 |
|
32 |
+PHOTON_MINIMAL_DEPLIST := minimal-dep-list |
|
33 |
+PHOTON_MICRO_DEPLIST := micro-dep-list |
|
34 |
+PHOTON_FULL_DEPLIST := full-dep-list |
|
32 | 35 |
PREPARE_OUT_DATADIR := prepare-out-datadir |
33 | 36 |
|
34 | 37 |
ifdef PHOTON_PUBLISH_RPMS_PATH |
... | ... |
@@ -51,7 +54,7 @@ all: iso minimal-iso docker-image ostree-host-iso live-iso cloud-image-all |
51 | 51 |
micro: micro-iso |
52 | 52 |
@: |
53 | 53 |
|
54 |
-micro-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MICRO) |
|
54 |
+micro-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MICRO) $(PHOTON_MICRO_DEPLIST) |
|
55 | 55 |
@echo "Building Photon Micro ISO..." |
56 | 56 |
@cd $(PHOTON_INSTALLER_DIR) && \ |
57 | 57 |
$(PHOTON_INSTALLER) -i $(PHOTON_STAGE)/photon-micro.iso \ |
... | ... |
@@ -59,10 +62,18 @@ micro-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MICRO) |
59 | 59 |
-l $(PHOTON_STAGE)/LOGS \ |
60 | 60 |
-r $(PHOTON_STAGE)/RPMS \ |
61 | 61 |
-p $(PHOTON_DATA_DIR)/build_install_options_micro.json \ |
62 |
- -s $(PHOTON_SPECS_DIR) \ |
|
63 | 62 |
-f > \ |
64 | 63 |
$(PHOTON_LOGS_DIR)/installer.log 2>&1 |
65 | 64 |
|
65 |
+$(PHOTON_MICRO_DEPLIST): check $(PREPARE_OUT_DATADIR) |
|
66 |
+ @echo "Generating the install time dependency list for micro installation" |
|
67 |
+ @cd $(PHOTON_SPECDEPS_DIR) && \ |
|
68 |
+ $(PHOTON_SPECDEPS) \ |
|
69 |
+ -s $(PHOTON_SPECS_DIR) \ |
|
70 |
+ -t $(PHOTON_STAGE) \ |
|
71 |
+ --input-type=json --file packages_micro.json -d json -t $(PHOTON_STAGE) -a $(PHOTON_DATA_DIR) |
|
72 |
+ @echo "generated the json file with all dependencies for micro installation" |
|
73 |
+ |
|
66 | 74 |
deptree-micro: |
67 | 75 |
@cd $(PHOTON_SPECDEPS_DIR) && \ |
68 | 76 |
$(PHOTON_SPECDEPS) \ |
... | ... |
@@ -95,7 +106,7 @@ deptree-minimal: |
95 | 95 |
-t $(PHOTON_STAGE) \ |
96 | 96 |
-i json -f packages_minimal.json -a $(PHOTON_DATA_DIR) |
97 | 97 |
|
98 |
-minimal-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) |
|
98 |
+minimal-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) $(PHOTON_MINIMAL_DEPLIST) |
|
99 | 99 |
@echo "Building Photon Minimal ISO..." |
100 | 100 |
@cd $(PHOTON_INSTALLER_DIR) && \ |
101 | 101 |
$(PHOTON_INSTALLER) -i $(PHOTON_STAGE)/photon-minimal.iso \ |
... | ... |
@@ -103,7 +114,6 @@ minimal-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) |
103 | 103 |
-l $(PHOTON_STAGE)/LOGS \ |
104 | 104 |
-r $(PHOTON_STAGE)/RPMS \ |
105 | 105 |
-p $(PHOTON_DATA_DIR)/build_install_options_minimal.json \ |
106 |
- -s $(PHOTON_SPECS_DIR) \ |
|
107 | 106 |
-f > \ |
108 | 107 |
$(PHOTON_LOGS_DIR)/installer.log 2>&1 |
109 | 108 |
|
... | ... |
@@ -115,7 +125,6 @@ ostree-host-iso: check $(PHOTON_STAGE) ostree-repo |
115 | 115 |
-l $(PHOTON_STAGE)/LOGS \ |
116 | 116 |
-r $(PHOTON_STAGE)/RPMS \ |
117 | 117 |
-p $(PHOTON_DATA_DIR)/build_install_options_ostreehost.json \ |
118 |
- -s $(PHOTON_SPECS_DIR) \ |
|
119 | 118 |
-f > \ |
120 | 119 |
$(PHOTON_LOGS_DIR)/installer.log 2>&1 |
121 | 120 |
|
... | ... |
@@ -127,10 +136,18 @@ live-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES_MINIMAL) minimal-iso |
127 | 127 |
-l $(PHOTON_STAGE)/LOGS \ |
128 | 128 |
-r $(PHOTON_STAGE)/RPMS \ |
129 | 129 |
-p $(PHOTON_GENERATED_DATA_DIR)/build_install_options_livecd.json \ |
130 |
- -s $(PHOTON_SPECS_DIR) \ |
|
131 | 130 |
-f > \ |
132 | 131 |
$(PHOTON_LOGS_DIR)/installer.log 2>&1 |
133 | 132 |
|
133 |
+$(PHOTON_MINIMAL_DEPLIST): $(PREPARE_OUT_DATADIR) |
|
134 |
+ @echo "Generating the install time dependency list for minimal installation" |
|
135 |
+ @cd $(PHOTON_SPECDEPS_DIR) && \ |
|
136 |
+ $(PHOTON_SPECDEPS) \ |
|
137 |
+ -s $(PHOTON_SPECS_DIR) \ |
|
138 |
+ -t $(PHOTON_STAGE) \ |
|
139 |
+ --input-type=json --file packages_minimal.json -d json -a $(PHOTON_DATA_DIR) |
|
140 |
+ @echo "generated the json file with all dependencies for minimal installation" |
|
141 |
+ |
|
134 | 142 |
packages-minimal: check $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES) |
135 | 143 |
@echo "Building all RPMS..." |
136 | 144 |
@cd $(PHOTON_PKG_BUILDER_DIR) && \ |
... | ... |
@@ -146,7 +163,7 @@ packages-minimal: check $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES) |
146 | 146 |
-d $(PHOTON_DIST_TAG) \ |
147 | 147 |
-t ${THREADS} |
148 | 148 |
|
149 |
-iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES) ostree-repo |
|
149 |
+iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES) ostree-repo $(PHOTON_FULL_DEPLIST) |
|
150 | 150 |
@echo "Building Photon FUll ISO..." |
151 | 151 |
@cd $(PHOTON_INSTALLER_DIR) && \ |
152 | 152 |
sudo $(PHOTON_INSTALLER) -i $(PHOTON_STAGE)/photon.iso \ |
... | ... |
@@ -154,10 +171,18 @@ iso: check $(PHOTON_STAGE) $(PHOTON_PACKAGES) ostree-repo |
154 | 154 |
-l $(PHOTON_STAGE)/LOGS \ |
155 | 155 |
-r $(PHOTON_STAGE)/RPMS \ |
156 | 156 |
-p $(PHOTON_DATA_DIR)/build_install_options_all.json \ |
157 |
- -s $(PHOTON_SPECS_DIR) \ |
|
158 | 157 |
-f > \ |
159 | 158 |
$(PHOTON_LOGS_DIR)/installer.log 2>&1 |
160 | 159 |
|
160 |
+$(PHOTON_FULL_DEPLIST): $(PHOTON_MINIMAL_DEPLIST) |
|
161 |
+ @echo "Generating the install time dependency list for full installation" |
|
162 |
+ @cd $(PHOTON_SPECDEPS_DIR) && \ |
|
163 |
+ $(PHOTON_SPECDEPS) \ |
|
164 |
+ -s $(PHOTON_SPECS_DIR) \ |
|
165 |
+ -t $(PHOTON_STAGE) \ |
|
166 |
+ --input-type=json --file packages_full.json -d json -a $(PHOTON_DATA_DIR) |
|
167 |
+ @echo "generated the json file with all dependencies for full installation" |
|
168 |
+ |
|
161 | 169 |
deptree-full: |
162 | 170 |
@cd $(PHOTON_SPECDEPS_DIR) && \ |
163 | 171 |
$(PHOTON_SPECDEPS) \ |
... | ... |
@@ -250,7 +275,7 @@ prepare-out-datadir: |
250 | 250 |
$(MKDIR) -p $(PHOTON_GENERATED_DATA_DIR) |
251 | 251 |
$(CP) $(PHOTON_DATA_DIR)/*.json $(PHOTON_GENERATED_DATA_DIR) |
252 | 252 |
|
253 |
-$(PHOTON_STAGE): $(PREPARE_OUT_DATADIR) |
|
253 |
+$(PHOTON_STAGE): |
|
254 | 254 |
@echo "Creating staging folder..." |
255 | 255 |
$(MKDIR) -p $(PHOTON_STAGE) |
256 | 256 |
@echo "Creating chroot path..." |
... | ... |
@@ -11,9 +11,6 @@ import random |
11 | 11 |
import string |
12 | 12 |
import subprocess |
13 | 13 |
import sys |
14 |
-sys.path.append('../support/SpecDeps/') |
|
15 |
-from SpecData import SerializableSpecObject |
|
16 |
-from SpecData import SerializedSpecObjects |
|
17 | 14 |
import os |
18 | 15 |
from jsonwrapper import JsonWrapper |
19 | 16 |
from packageselector import PackageSelector |
... | ... |
@@ -131,7 +128,6 @@ if __name__ == '__main__': |
131 | 131 |
parser.add_option("-f", "--force", action="store_true", dest="force", default=False) |
132 | 132 |
parser.add_option("-p", "--package-list-file", dest="package_list_file", default="../common/data/build_install_options_all.json") |
133 | 133 |
parser.add_option("-m", "--stage-path", dest="stage_path", default="../stage") |
134 |
- parser.add_option("-s", "--spec-path", dest="spec_path", default="../SPECS") |
|
135 | 134 |
|
136 | 135 |
(options, args) = parser.parse_args() |
137 | 136 |
if options.iso_path: |
... | ... |
@@ -181,12 +177,6 @@ if __name__ == '__main__': |
181 | 181 |
options_sorted = option_list_json.items() |
182 | 182 |
base_path = os.path.dirname(options.package_list_file) |
183 | 183 |
|
184 |
- # Generate the package dependencies based on package_list_file |
|
185 |
- specDependencyGenerator = SerializedSpecObjects(base_path, options.stage_path) |
|
186 |
- for install_option in options_sorted: |
|
187 |
- if install_option[1]["visible"] == True: |
|
188 |
- specDependencyGenerator.readSpecsAndConvertToSerializableObjects(options.spec_path, "json", install_option[1]["file"], "json") |
|
189 |
- |
|
190 | 184 |
packages = [] |
191 | 185 |
additional_files_to_copy_from_stage_to_iso = [] |
192 | 186 |
if config['iso_system'] == True: |
... | ... |
@@ -63,7 +63,6 @@ fi |
63 | 63 |
PASSWORD=`date | md5sum | cut -f 1 -d ' '` |
64 | 64 |
sed -i "s/PASSWORD/$PASSWORD/" $VMDK_CONFIG_SAFE_FILE |
65 | 65 |
cat $VMDK_CONFIG_SAFE_FILE |
66 |
-cp $SRC_ROOT/support/SpecDeps/*.py $INSTALLER_PATH/installer |
|
67 | 66 |
./photonInstaller.py -p build_install_options_$IMG_NAME.json -r $PHOTON_STAGE_PATH/RPMS -v $INSTALLER_PATH/photon-${IMG_NAME} -o $GENERATED_DATA_PATH -f $VMDK_CONFIG_SAFE_FILE |
68 | 67 |
rm $VMDK_CONFIG_SAFE_FILE |
69 | 68 |
|