Browse code

Merge branch 'master' of https://github.com/vmware/photon

archive authored on 2018/11/06 23:30:24
Showing 250 changed files
... ...
@@ -72,9 +72,15 @@ PUBLISH_BUILD_DEPENDENCIES :=
72 72
 endif
73 73
 
74 74
 ifdef WEIGHTS
75
-PACKAGE_WEIGHTS_PATH = --package-weights-path $(WEIGHTS)
75
+PACKAGE_WEIGHTS = --package-weights-path $(SRCROOT)/common/data/packageWeights.json
76 76
 else
77
-PACKAGE_WEIGHTS_PATH =
77
+PACKAGE_WEIGHTS =
78
+endif
79
+
80
+ifdef PKG_BUILD_OPTIONS
81
+PACKAGE_BUILD_OPTIONS = --pkg-build-option-file $(PKG_BUILD_OPTIONS)
82
+else
83
+PACKAGE_BUILD_OPTIONS =
78 84
 endif
79 85
 
80 86
 TOOLS_BIN := $(SRCROOT)/tools/bin
... ...
@@ -115,192 +121,192 @@ packages-minimal: check-tools $(PHOTON_STAGE) $(PHOTON_PUBLISH_RPMS) $(PHOTON_SO
115 115
 	@echo "Building all minimal RPMS..."
116 116
 	@echo ""
117 117
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
118
-        $(PHOTON_PACKAGE_BUILDER) \
119
-                --spec-path $(PHOTON_SPECS_DIR) \
120
-                --rpm-path $(PHOTON_RPMS_DIR) \
121
-                --source-path $(PHOTON_SRCS_DIR) \
122
-                --build-root-path $(PHOTON_CHROOT_PATH) \
123
-                --packages-json-input $(PHOTON_DATA_DIR)/packages_minimal.json \
124
-                --log-path $(PHOTON_LOGS_DIR) \
125
-                --log-level $(LOGLEVEL) \
126
-                --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
127
-                --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
128
-                --dist-tag $(PHOTON_DIST_TAG) \
129
-                --build-number $(PHOTON_BUILD_NUMBER) \
130
-                --release-version $(PHOTON_RELEASE_VERSION) \
131
-                $(PHOTON_RPMCHECK_FLAGS) \
118
+	$(PHOTON_PACKAGE_BUILDER) \
119
+		--spec-path $(PHOTON_SPECS_DIR) \
120
+		--rpm-path $(PHOTON_RPMS_DIR) \
121
+		--source-path $(PHOTON_SRCS_DIR) \
122
+		--build-root-path $(PHOTON_CHROOT_PATH) \
123
+		--packages-json-input $(PHOTON_DATA_DIR)/packages_minimal.json \
124
+		--log-path $(PHOTON_LOGS_DIR) \
125
+		--log-level $(LOGLEVEL) \
126
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
127
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
128
+		--dist-tag $(PHOTON_DIST_TAG) \
129
+		--build-number $(PHOTON_BUILD_NUMBER) \
130
+		--release-version $(PHOTON_RELEASE_VERSION) \
131
+		$(PHOTON_RPMCHECK_FLAGS) \
132 132
 		$(PUBLISH_BUILD_DEPENDENCIES) \
133
-		$(PACKAGE_WEIGHTS_PATH) \
134
-                --threads ${THREADS}
133
+		$(PACKAGE_WEIGHTS) \
134
+		--threads ${THREADS}
135 135
 
136 136
 packages: check-docker-py check-tools $(PHOTON_STAGE) $(PHOTON_PUBLISH_XRPMS) $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES) $(CONTAIN) check-spec-files generate-dep-lists
137 137
 	@echo "Building all RPMS..."
138 138
 	@echo ""
139 139
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
140
-        $(PHOTON_PACKAGE_BUILDER) \
141
-                --build-type $(PHOTON_BUILD_TYPE) \
142
-                --spec-path $(PHOTON_SPECS_DIR) \
143
-                --rpm-path $(PHOTON_RPMS_DIR) \
144
-                --source-rpm-path $(PHOTON_SRPMS_DIR) \
145
-                --source-path $(PHOTON_SRCS_DIR) \
146
-                --build-root-path $(PHOTON_CHROOT_PATH) \
147
-                --log-path $(PHOTON_LOGS_DIR) \
148
-                --log-level $(LOGLEVEL) \
149
-                --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
150
-                --publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
151
-                --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
152
-                --dist-tag $(PHOTON_DIST_TAG) \
153
-                --build-number $(PHOTON_BUILD_NUMBER) \
154
-                --release-version $(PHOTON_RELEASE_VERSION) \
155
-                --pkginfo-file $(PHOTON_STAGE)/pkg_info.json \
156
-                --pkg-build-option-file $(PHOTON_DATA_DIR)/pkg_build_options.json \
157
-                $(PHOTON_RPMCHECK_FLAGS) \
158
-		        $(PHOTON_KAT_BUILD_FLAGS) \
159
-		        $(PUBLISH_BUILD_DEPENDENCIES) \
160
-		        $(PACKAGE_WEIGHTS_PATH) \
161
-                --threads ${THREADS}
140
+	$(PHOTON_PACKAGE_BUILDER) \
141
+		--build-type $(PHOTON_BUILD_TYPE) \
142
+		--spec-path $(PHOTON_SPECS_DIR) \
143
+		--rpm-path $(PHOTON_RPMS_DIR) \
144
+		--source-rpm-path $(PHOTON_SRPMS_DIR) \
145
+		--source-path $(PHOTON_SRCS_DIR) \
146
+		--build-root-path $(PHOTON_CHROOT_PATH) \
147
+		--log-path $(PHOTON_LOGS_DIR) \
148
+		--log-level $(LOGLEVEL) \
149
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
150
+		--publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
151
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
152
+		--dist-tag $(PHOTON_DIST_TAG) \
153
+		--build-number $(PHOTON_BUILD_NUMBER) \
154
+		--release-version $(PHOTON_RELEASE_VERSION) \
155
+		--pkginfo-file $(PHOTON_STAGE)/pkg_info.json \
156
+		$(PACKAGE_BUILD_OPTIONS) \
157
+		$(PHOTON_RPMCHECK_FLAGS) \
158
+		$(PHOTON_KAT_BUILD_FLAGS) \
159
+		$(PUBLISH_BUILD_DEPENDENCIES) \
160
+		$(PACKAGE_WEIGHTS) \
161
+		--threads ${THREADS}
162 162
 
163 163
 packages-docker: check-docker-py check-docker-service check-tools $(PHOTON_STAGE) $(PHOTON_PUBLISH_XRPMS) $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES) $(CONTAIN) generate-dep-lists
164 164
 	@echo "Building all RPMS..."
165 165
 	@echo ""
166 166
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
167
-        $(PHOTON_PACKAGE_BUILDER) \
168
-                --build-type $(PHOTON_BUILD_TYPE) \
169
-                --spec-path $(PHOTON_SPECS_DIR) \
170
-                --rpm-path $(PHOTON_RPMS_DIR) \
171
-                --source-rpm-path $(PHOTON_SRPMS_DIR) \
172
-                --source-path $(PHOTON_SRCS_DIR) \
173
-                --build-root-path $(PHOTON_CHROOT_PATH) \
174
-                --log-path $(PHOTON_LOGS_DIR) \
175
-                --log-level $(LOGLEVEL) \
176
-                --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
177
-                --publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
178
-                --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
179
-                --dist-tag $(PHOTON_DIST_TAG) \
180
-                --build-number $(PHOTON_BUILD_NUMBER) \
181
-                --release-version $(PHOTON_RELEASE_VERSION) \
182
-                --pkginfo-file $(PHOTON_STAGE)/pkg_info.json \
183
-                --pkg-build-option-file $(PHOTON_DATA_DIR)/pkg_build_options.json \
184
-                $(PHOTON_RPMCHECK_FLAGS) \
185
-		        $(PUBLISH_BUILD_DEPENDENCIES) \
186
-		        $(PACKAGE_WEIGHTS_PATH) \
187
-                --threads ${THREADS}
167
+	$(PHOTON_PACKAGE_BUILDER) \
168
+		--build-type $(PHOTON_BUILD_TYPE) \
169
+		--spec-path $(PHOTON_SPECS_DIR) \
170
+		--rpm-path $(PHOTON_RPMS_DIR) \
171
+		--source-rpm-path $(PHOTON_SRPMS_DIR) \
172
+		--source-path $(PHOTON_SRCS_DIR) \
173
+		--build-root-path $(PHOTON_CHROOT_PATH) \
174
+		--log-path $(PHOTON_LOGS_DIR) \
175
+		--log-level $(LOGLEVEL) \
176
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
177
+		--publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
178
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
179
+		--dist-tag $(PHOTON_DIST_TAG) \
180
+		--build-number $(PHOTON_BUILD_NUMBER) \
181
+		--release-version $(PHOTON_RELEASE_VERSION) \
182
+		--pkginfo-file $(PHOTON_STAGE)/pkg_info.json \
183
+		$(PACKAGE_BUILD_OPTIONS) \
184
+		$(PHOTON_RPMCHECK_FLAGS) \
185
+		$(PUBLISH_BUILD_DEPENDENCIES) \
186
+		$(PACKAGE_WEIGHTS) \
187
+		--threads ${THREADS}
188 188
 
189 189
 updated-packages: check-tools $(PHOTON_STAGE) $(PHOTON_PUBLISH_XRPMS) $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES) $(CONTAIN) generate-dep-lists
190 190
 	@echo "Building only updated RPMS..."
191 191
 	@echo ""
192 192
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
193
-        $(PHOTON_PACKAGE_BUILDER) \
194
-                --spec-path $(PHOTON_SPECS_DIR) \
195
-                --rpm-path $(PHOTON_UPDATED_RPMS_DIR) \
196
-                --source-path $(PHOTON_SRCS_DIR) \
197
-                --build-root-path $(PHOTON_CHROOT_PATH) \
198
-                --log-path $(PHOTON_LOGS_DIR) \
199
-                --log-level $(LOGLEVEL) \
200
-                --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
201
-                --publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
202
-                --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
203
-                --dist-tag $(PHOTON_DIST_TAG) \
204
-                --build-number $(PHOTON_BUILD_NUMBER) \
205
-                --release-version $(PHOTON_RELEASE_VERSION) \
206
-                --input-RPMS-path $(PHOTON_INPUT_RPMS_DIR) \
207
-                $(PHOTON_KAT_BUILD_FLAGS) \
208
-                $(PHOTON_RPMCHECK_FLAGS) \
209
-		        $(PUBLISH_BUILD_DEPENDENCIES) \
210
-		        $(PACKAGE_WEIGHTS_PATH) \
211
-                --threads ${THREADS}
193
+	$(PHOTON_PACKAGE_BUILDER) \
194
+		--spec-path $(PHOTON_SPECS_DIR) \
195
+		--rpm-path $(PHOTON_UPDATED_RPMS_DIR) \
196
+		--source-path $(PHOTON_SRCS_DIR) \
197
+		--build-root-path $(PHOTON_CHROOT_PATH) \
198
+		--log-path $(PHOTON_LOGS_DIR) \
199
+		--log-level $(LOGLEVEL) \
200
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
201
+		--publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
202
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
203
+		--dist-tag $(PHOTON_DIST_TAG) \
204
+		--build-number $(PHOTON_BUILD_NUMBER) \
205
+		--release-version $(PHOTON_RELEASE_VERSION) \
206
+		--input-RPMS-path $(PHOTON_INPUT_RPMS_DIR) \
207
+		$(PHOTON_KAT_BUILD_FLAGS) \
208
+		$(PHOTON_RPMCHECK_FLAGS) \
209
+		$(PUBLISH_BUILD_DEPENDENCIES) \
210
+		$(PACKAGE_WEIGHTS) \
211
+		--threads ${THREADS}
212 212
 
213 213
 tool-chain-stage1: check-tools $(PHOTON_STAGE) $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES) $(CONTAIN) generate-dep-lists
214 214
 	@echo "Building all RPMS..."
215 215
 	@echo ""
216 216
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
217
-        $(PHOTON_PACKAGE_BUILDER) \
218
-                --spec-path $(PHOTON_SPECS_DIR) \
219
-                --rpm-path $(PHOTON_RPMS_DIR) \
220
-                --source-rpm-path $(PHOTON_SRPMS_DIR) \
221
-                --source-path $(PHOTON_SRCS_DIR) \
222
-                --build-root-path $(PHOTON_CHROOT_PATH) \
223
-                --log-path $(PHOTON_LOGS_DIR) \
224
-                --log-level $(LOGLEVEL) \
225
-                --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
226
-                --threads ${THREADS} \
227
-                --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
228
-                --dist-tag $(PHOTON_DIST_TAG) \
229
-                --build-number $(PHOTON_BUILD_NUMBER) \
230
-                --release-version $(PHOTON_RELEASE_VERSION) \
231
-                $(PHOTON_RPMCHECK_FLAGS) \
232
-                --tool-chain-stage stage1
217
+	$(PHOTON_PACKAGE_BUILDER) \
218
+		--spec-path $(PHOTON_SPECS_DIR) \
219
+		--rpm-path $(PHOTON_RPMS_DIR) \
220
+		--source-rpm-path $(PHOTON_SRPMS_DIR) \
221
+		--source-path $(PHOTON_SRCS_DIR) \
222
+		--build-root-path $(PHOTON_CHROOT_PATH) \
223
+		--log-path $(PHOTON_LOGS_DIR) \
224
+		--log-level $(LOGLEVEL) \
225
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
226
+		--threads ${THREADS} \
227
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
228
+		--dist-tag $(PHOTON_DIST_TAG) \
229
+		--build-number $(PHOTON_BUILD_NUMBER) \
230
+		--release-version $(PHOTON_RELEASE_VERSION) \
231
+		$(PHOTON_RPMCHECK_FLAGS) \
232
+		--tool-chain-stage stage1
233 233
 
234 234
 tool-chain-stage2: check-tools $(PHOTON_STAGE) $(PHOTON_PUBLISH_RPMS) $(PHOTON_SOURCES) $(CONTAIN) generate-dep-lists
235 235
 	@echo "Building all RPMS..."
236 236
 	@echo ""
237 237
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
238
-        $(PHOTON_PACKAGE_BUILDER) \
239
-                --spec-path $(PHOTON_SPECS_DIR) \
240
-                --rpm-path $(PHOTON_RPMS_DIR) \
241
-                --source-rpm-path $(PHOTON_SRPMS_DIR) \
242
-                --source-path $(PHOTON_SRCS_DIR) \
243
-                --build-root-path $(PHOTON_CHROOT_PATH) \
244
-                --log-path $(PHOTON_LOGS_DIR) \
245
-                --log-level $(LOGLEVEL) \
246
-                --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
247
-                --threads ${THREADS} \
248
-                --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
249
-                --dist-tag $(PHOTON_DIST_TAG) \
250
-                --build-number $(PHOTON_BUILD_NUMBER) \
251
-                --release-version $(PHOTON_RELEASE_VERSION) \
252
-                $(PHOTON_RPMCHECK_FLAGS) \
253
-                --tool-chain-stage stage2
238
+	$(PHOTON_PACKAGE_BUILDER) \
239
+		--spec-path $(PHOTON_SPECS_DIR) \
240
+		--rpm-path $(PHOTON_RPMS_DIR) \
241
+		--source-rpm-path $(PHOTON_SRPMS_DIR) \
242
+		--source-path $(PHOTON_SRCS_DIR) \
243
+		--build-root-path $(PHOTON_CHROOT_PATH) \
244
+		--log-path $(PHOTON_LOGS_DIR) \
245
+		--log-level $(LOGLEVEL) \
246
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
247
+		--threads ${THREADS} \
248
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
249
+		--dist-tag $(PHOTON_DIST_TAG) \
250
+		--build-number $(PHOTON_BUILD_NUMBER) \
251
+		--release-version $(PHOTON_RELEASE_VERSION) \
252
+		$(PHOTON_RPMCHECK_FLAGS) \
253
+		--tool-chain-stage stage2
254 254
 
255 255
 %: check-tools $(PHOTON_PUBLISH_RPMS) $(PHOTON_PUBLISH_XRPMS) $(PHOTON_SOURCES) $(CONTAIN) check-spec-files $(eval PKG_NAME = $@)
256 256
 	$(eval PKG_NAME = $@)
257 257
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
258
-        $(PHOTON_PACKAGE_BUILDER) --install-package $(PKG_NAME)\
259
-                  --build-type $(PHOTON_BUILD_TYPE) \
260
-                  --build-root-path $(PHOTON_CHROOT_PATH) \
261
-                  --spec-path $(PHOTON_SPECS_DIR) \
262
-                  --rpm-path $(PHOTON_RPMS_DIR) \
263
-                  --source-rpm-path $(PHOTON_SRPMS_DIR) \
264
-                  --source-path $(PHOTON_SRCS_DIR) \
265
-                  --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
266
-                  --publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
267
-                  --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
268
-                  --log-level $(LOGLEVEL) \
269
-                  --dist-tag $(PHOTON_DIST_TAG) \
270
-                  --build-number $(PHOTON_BUILD_NUMBER) \
271
-                  --release-version $(PHOTON_RELEASE_VERSION) \
272
-                  --pkg-build-option-file $(PHOTON_DATA_DIR)/pkg_build_options.json \
273
-                  $(PHOTON_RPMCHECK_FLAGS) \
274
-                  $(PHOTON_KAT_BUILD_FLAGS) \
275
-                  --log-path $(PHOTON_LOGS_DIR) \
276
-                  --threads ${THREADS}
258
+	$(PHOTON_PACKAGE_BUILDER) --install-package $(PKG_NAME)\
259
+		--build-type $(PHOTON_BUILD_TYPE) \
260
+		--build-root-path $(PHOTON_CHROOT_PATH) \
261
+		--spec-path $(PHOTON_SPECS_DIR) \
262
+		--rpm-path $(PHOTON_RPMS_DIR) \
263
+		--source-rpm-path $(PHOTON_SRPMS_DIR) \
264
+		--source-path $(PHOTON_SRCS_DIR) \
265
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
266
+		--publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
267
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
268
+		--log-level $(LOGLEVEL) \
269
+		--dist-tag $(PHOTON_DIST_TAG) \
270
+		--build-number $(PHOTON_BUILD_NUMBER) \
271
+		--release-version $(PHOTON_RELEASE_VERSION) \
272
+		$(PACKAGE_BUILD_OPTIONS) \
273
+		$(PHOTON_RPMCHECK_FLAGS) \
274
+		$(PHOTON_KAT_BUILD_FLAGS) \
275
+		--log-path $(PHOTON_LOGS_DIR) \
276
+		--threads ${THREADS}
277 277
 
278 278
 check: packages
279
-    ifeq ($(RPMCHECK),enable_stop_on_error)
280
-	    $(eval rpmcheck_stop_on_error = -q)
281
-    endif
279
+	ifeq ($(RPMCHECK),enable_stop_on_error)
280
+		$(eval rpmcheck_stop_on_error = -q)
281
+	endif
282 282
 	@echo "Testing all RPMS ..."
283 283
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
284
-        $(PHOTON_PACKAGE_BUILDER) \
285
-                --build-type $(PHOTON_BUILD_TYPE) \
286
-                --spec-path $(PHOTON_SPECS_DIR) \
287
-                --rpm-path $(PHOTON_RPMS_DIR) \
288
-                --source-rpm-path $(PHOTON_SRPMS_DIR) \
289
-                --source-path $(PHOTON_SRCS_DIR) \
290
-                --build-root-path $(PHOTON_CHROOT_PATH) \
291
-                --log-path $(PHOTON_LOGS_DIR) \
292
-                --log-level $(LOGLEVEL) \
293
-                --publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
294
-                --publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
295
-                --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
296
-                --dist-tag $(PHOTON_DIST_TAG) \
297
-                --build-number $(PHOTON_BUILD_NUMBER) \
298
-                --release-version $(PHOTON_RELEASE_VERSION) \
299
-                --pkginfo-file $(PHOTON_STAGE)/pkg_info.json \
300
-                --pkg-build-option-file $(PHOTON_DATA_DIR)/pkg_build_options.json \
301
-                --enable-rpmcheck \
302
-                $(rpmcheck_stop_on_error) \
303
-                --threads ${THREADS}
284
+	$(PHOTON_PACKAGE_BUILDER) \
285
+		--build-type $(PHOTON_BUILD_TYPE) \
286
+		--spec-path $(PHOTON_SPECS_DIR) \
287
+		--rpm-path $(PHOTON_RPMS_DIR) \
288
+		--source-rpm-path $(PHOTON_SRPMS_DIR) \
289
+		--source-path $(PHOTON_SRCS_DIR) \
290
+		--build-root-path $(PHOTON_CHROOT_PATH) \
291
+		--log-path $(PHOTON_LOGS_DIR) \
292
+		--log-level $(LOGLEVEL) \
293
+		--publish-RPMS-path $(PHOTON_PUBLISH_RPMS_DIR) \
294
+		--publish-XRPMS-path $(PHOTON_PUBLISH_XRPMS_DIR) \
295
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
296
+		--dist-tag $(PHOTON_DIST_TAG) \
297
+		--build-number $(PHOTON_BUILD_NUMBER) \
298
+		--release-version $(PHOTON_RELEASE_VERSION) \
299
+		--pkginfo-file $(PHOTON_STAGE)/pkg_info.json \
300
+		$(PACKAGE_BUILD_OPTIONS) \
301
+		--enable-rpmcheck \
302
+		$(rpmcheck_stop_on_error) \
303
+		--threads ${THREADS}
304 304
 
305 305
 #-------------------------------------------------------------------------------
306 306
 
... ...
@@ -311,37 +317,37 @@ all: iso photon-docker-image k8s-docker-images cloud-image-all src-iso
311 311
 iso: check-tools $(PHOTON_STAGE) $(PHOTON_PACKAGES)
312 312
 	@echo "Building Photon Full ISO..."
313 313
 	@cd $(PHOTON_INSTALLER_DIR) && \
314
-        sudo $(PHOTON_INSTALLER) \
315
-                --iso-path $(PHOTON_STAGE)/photon-$(PHOTON_RELEASE_VERSION)-$(PHOTON_BUILD_NUMBER).iso \
316
-                --debug-iso-path $(PHOTON_STAGE)/photon-$(PHOTON_RELEASE_VERSION)-$(PHOTON_BUILD_NUMBER).debug.iso \
317
-                --working-directory $(PHOTON_STAGE)/photon_iso \
318
-                --log-path $(PHOTON_STAGE)/LOGS \
319
-                --log-level $(LOGLEVEL) \
320
-                --rpm-path $(PHOTON_STAGE)/RPMS \
321
-                --srpm-path $(PHOTON_STAGE)/SRPMS \
322
-                --package-list-file $(PHOTON_GENERATED_DATA_DIR)/$(FULL_PACKAGE_LIST_FILE) \
323
-                --output-data-path $(PHOTON_STAGE)/common/data \
324
-                --pkg-to-rpm-map-file $(PHOTON_STAGE)/pkg_info.json \
325
-                --json-data-path $(PHOTON_DATA_DIR) \
326
-                --force > \
327
-                $(PHOTON_LOGS_DIR)/installer.log 2>&1
314
+	sudo $(PHOTON_INSTALLER) \
315
+		--iso-path $(PHOTON_STAGE)/photon-$(PHOTON_RELEASE_VERSION)-$(PHOTON_BUILD_NUMBER).iso \
316
+		--debug-iso-path $(PHOTON_STAGE)/photon-$(PHOTON_RELEASE_VERSION)-$(PHOTON_BUILD_NUMBER).debug.iso \
317
+		--working-directory $(PHOTON_STAGE)/photon_iso \
318
+		--log-path $(PHOTON_STAGE)/LOGS \
319
+		--log-level $(LOGLEVEL) \
320
+		--rpm-path $(PHOTON_STAGE)/RPMS \
321
+		--srpm-path $(PHOTON_STAGE)/SRPMS \
322
+		--package-list-file $(PHOTON_GENERATED_DATA_DIR)/$(FULL_PACKAGE_LIST_FILE) \
323
+		--output-data-path $(PHOTON_STAGE)/common/data \
324
+		--pkg-to-rpm-map-file $(PHOTON_STAGE)/pkg_info.json \
325
+		--json-data-path $(PHOTON_DATA_DIR) \
326
+		--force > \
327
+		$(PHOTON_LOGS_DIR)/installer.log 2>&1
328 328
 
329 329
 src-iso: check-tools $(PHOTON_STAGE) $(PHOTON_PACKAGES)
330 330
 	@echo "Building Photon Full Source ISO..."
331 331
 	@cd $(PHOTON_INSTALLER_DIR) && \
332
-        sudo $(PHOTON_INSTALLER) \
333
-                --src-iso-path $(PHOTON_STAGE)/photon-$(PHOTON_RELEASE_VERSION)-$(PHOTON_BUILD_NUMBER).src.iso \
334
-                --working-directory $(PHOTON_STAGE)/photon_iso \
335
-                --log-path $(PHOTON_STAGE)/LOGS \
336
-                --log-level $(LOGLEVEL) \
337
-                --rpm-path $(PHOTON_STAGE)/RPMS \
338
-                --srpm-path $(PHOTON_STAGE)/SRPMS \
339
-                --package-list-file $(PHOTON_GENERATED_DATA_DIR)/$(FULL_PACKAGE_LIST_FILE) \
340
-                --output-data-path $(PHOTON_STAGE)/common/data \
341
-                --pkg-to-rpm-map-file $(PHOTON_STAGE)/pkg_info.json \
342
-                --json-data-path $(PHOTON_DATA_DIR) \
343
-                --force > \
344
-                $(PHOTON_LOGS_DIR)/sourceiso-installer.log 2>&1
332
+	sudo $(PHOTON_INSTALLER) \
333
+		--src-iso-path $(PHOTON_STAGE)/photon-$(PHOTON_RELEASE_VERSION)-$(PHOTON_BUILD_NUMBER).src.iso \
334
+		--working-directory $(PHOTON_STAGE)/photon_iso \
335
+		--log-path $(PHOTON_STAGE)/LOGS \
336
+		--log-level $(LOGLEVEL) \
337
+		--rpm-path $(PHOTON_STAGE)/RPMS \
338
+		--srpm-path $(PHOTON_STAGE)/SRPMS \
339
+		--package-list-file $(PHOTON_GENERATED_DATA_DIR)/$(FULL_PACKAGE_LIST_FILE) \
340
+		--output-data-path $(PHOTON_STAGE)/common/data \
341
+		--pkg-to-rpm-map-file $(PHOTON_STAGE)/pkg_info.json \
342
+		--json-data-path $(PHOTON_DATA_DIR) \
343
+		--force > \
344
+		$(PHOTON_LOGS_DIR)/sourceiso-installer.log 2>&1
345 345
 
346 346
 cloud-image: check-kpartx $(PHOTON_STAGE) $(VIXDISKUTIL) $(IMGCONVERTER) $(PHOTON_PACKAGES)
347 347
 	@echo "Building cloud image $(IMG_NAME)..."
... ...
@@ -392,9 +398,9 @@ k8s-docker-images: start-docker photon-docker-image
392 392
 packages-cached:
393 393
 	@echo "Using cached RPMS..."
394 394
 	@$(RM) -f $(PHOTON_RPMS_DIR_NOARCH)/* && \
395
-     $(RM) -f $(PHOTON_RPMS_DIR_ARCH)/* && \
396
-     $(CP) -f $(PHOTON_CACHE_PATH)/RPMS/noarch/* $(PHOTON_RPMS_DIR_NOARCH)/ && \
397
-     $(CP) -f $(PHOTON_CACHE_PATH)/RPMS/$(ARCH)/* $(PHOTON_RPMS_DIR_ARCH)/
395
+	$(RM) -f $(PHOTON_RPMS_DIR_ARCH)/* && \
396
+	$(CP) -f $(PHOTON_CACHE_PATH)/RPMS/noarch/* $(PHOTON_RPMS_DIR_NOARCH)/ && \
397
+	$(CP) -f $(PHOTON_CACHE_PATH)/RPMS/$(ARCH)/* $(PHOTON_RPMS_DIR_ARCH)/
398 398
 
399 399
 sources:
400 400
 	@$(MKDIR) -p $(PHOTON_SRCS_DIR)
... ...
@@ -417,13 +423,13 @@ publish-rpms-cached:
417 417
 	@echo "Using cached toolchain rpms..."
418 418
 	@$(MKDIR) -p $(PHOTON_PUBLISH_RPMS_DIR)/{$(ARCH),noarch} && \
419 419
 	cd $(PHOTON_PULL_PUBLISH_RPMS_DIR) && \
420
-        $(PHOTON_PULL_PUBLISH_RPMS) $(PHOTON_PUBLISH_RPMS_DIR) $(PHOTON_PUBLISH_RPMS_PATH)
420
+	$(PHOTON_PULL_PUBLISH_RPMS) $(PHOTON_PUBLISH_RPMS_DIR) $(PHOTON_PUBLISH_RPMS_PATH)
421 421
 
422 422
 publish-x-rpms-cached:
423 423
 	@echo "Using cached X toolchain rpms..."
424 424
 	@$(MKDIR) -p $(PHOTON_PUBLISH_XRPMS_DIR)/{$(ARCH),noarch} && \
425 425
 	cd $(PHOTON_PULL_PUBLISH_RPMS_DIR) && \
426
-        $(PHOTON_PULL_PUBLISH_X_RPMS) $(PHOTON_PUBLISH_XRPMS_DIR) $(PHOTON_PUBLISH_XRPMS_PATH)
426
+	$(PHOTON_PULL_PUBLISH_X_RPMS) $(PHOTON_PUBLISH_XRPMS_DIR) $(PHOTON_PUBLISH_XRPMS_PATH)
427 427
 
428 428
 $(PHOTON_STAGE):
429 429
 	@echo "Creating staging folder..."
... ...
@@ -543,47 +549,47 @@ generate-dep-lists:
543 543
 pkgtree:
544 544
 	@cd $(PHOTON_SPECDEPS_DIR) && \
545 545
 		$(PHOTON_SPECDEPS) \
546
-        --spec-path $(PHOTON_SPECS_DIR) \
547
-        --log-level $(LOGLEVEL) \
548
-        --input-type pkg \
549
-        --pkg $(pkg)
546
+	--spec-path $(PHOTON_SPECS_DIR) \
547
+	--log-level $(LOGLEVEL) \
548
+	--input-type pkg \
549
+	--pkg $(pkg)
550 550
 
551 551
 imgtree:
552 552
 	@cd $(PHOTON_SPECDEPS_DIR) && \
553 553
 		$(PHOTON_SPECDEPS) \
554
-        --spec-path $(PHOTON_SPECS_DIR) \
555
-        --log-level $(LOGLEVEL) \
556
-        --input-type json \
557
-        --file $(PHOTON_DATA_DIR)/build_install_options_$(img).json
554
+	--spec-path $(PHOTON_SPECS_DIR) \
555
+	--log-level $(LOGLEVEL) \
556
+	--input-type json \
557
+	--file $(PHOTON_DATA_DIR)/build_install_options_$(img).json
558 558
 
559 559
 who-needs:
560 560
 	@cd $(PHOTON_SPECDEPS_DIR) && \
561 561
 		$(PHOTON_SPECDEPS) \
562
-        --spec-path $(PHOTON_SPECS_DIR) \
563
-        --log-level $(LOGLEVEL) \
564
-        --input-type who-needs \
565
-        --pkg $(pkg)
562
+	--spec-path $(PHOTON_SPECS_DIR) \
563
+	--log-level $(LOGLEVEL) \
564
+	--input-type who-needs \
565
+	--pkg $(pkg)
566 566
 
567 567
 print-upward-deps:
568 568
 	@cd $(PHOTON_SPECDEPS_DIR) && \
569 569
 		$(PHOTON_SPECDEPS) \
570
-        --spec-path $(PHOTON_SPECS_DIR) \
571
-        --input-type print-upward-deps \
572
-        --pkg $(pkg)
570
+	--spec-path $(PHOTON_SPECS_DIR) \
571
+	--input-type print-upward-deps \
572
+	--pkg $(pkg)
573 573
 
574 574
 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
575 575
 
576 576
 generate-yaml-files: check-tools $(PHOTON_STAGE) $(PHOTON_PACKAGES)
577 577
 	@echo "Generating yaml files for packages ..."
578 578
 	@cd $(PHOTON_PKG_BUILDER_DIR) && \
579
-        $(PHOTON_GENERATE_OSS_FILES) --generate-yaml-files \
580
-                              --spec-path $(PHOTON_SPECS_DIR) \
581
-                              --source-rpm-path $(PHOTON_SRPMS_DIR) \
582
-                              --log-path $(PHOTON_LOGS_DIR) \
583
-                              --dist-tag $(PHOTON_DIST_TAG) \
584
-                              --log-level $(LOGLEVEL) \
585
-                              --pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
586
-                              --pkg-blacklist-file $(PHOTON_PKG_BLACKLIST_FILE)
579
+	$(PHOTON_GENERATE_OSS_FILES) --generate-yaml-files \
580
+		--spec-path $(PHOTON_SPECS_DIR) \
581
+		--source-rpm-path $(PHOTON_SRPMS_DIR) \
582
+		--log-path $(PHOTON_LOGS_DIR) \
583
+		--dist-tag $(PHOTON_DIST_TAG) \
584
+		--log-level $(LOGLEVEL) \
585
+		--pullsources-config $(PHOTON_PULLSOURCES_CONFIG) \
586
+		--pkg-blacklist-file $(PHOTON_PKG_BLACKLIST_FILE)
587 587
 
588 588
 # Input args: BASE_COMMIT= (optional)
589 589
 #
... ...
@@ -597,5 +603,5 @@ generate-yaml-files: check-tools $(PHOTON_STAGE) $(PHOTON_PACKAGES)
597 597
 # - local changes (if no commits specified)
598 598
 clean-stage-for-incremental-build:
599 599
 	@test -n "$$(git diff --name-only $(BASE_COMMIT) @ | grep SPECS)" && $(PHOTON_SPECDEPS) --spec-path $(PHOTON_SPECS_DIR) -i remove-upward-deps -p $$(echo `git diff --name-only $(BASE_COMMIT) @ | grep .spec | xargs -n1 basename 2>/dev/null` | tr ' ' :) ||:
600
-	@test -n "$$(git diff --name-only $(BASE_COMMIT) @ | grep '^support')" && $(RM) -rf $(PHOTON_RPMS_DIR) ||:
600
+	@test -n "$$(git diff --name-only @~1 @ | grep '^support')" && { echo "Remove all staged RPMs"; $(RM) -rf $(PHOTON_RPMS_DIR); } ||:
601 601
 
... ...
@@ -1,33 +1,35 @@
1
-Summary:	Contains programs for compressing and decompressing files
2
-Name:		bzip2
3
-Version:	1.0.6
4
-Release:	8%{?dist}
5
-License:	BSD
6
-URL:		http://www.bzip.org/
7
-Group:		System Environment/Base
8
-Vendor:		VMware, Inc.
9
-Distribution: Photon
10
-Source0:		http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
11
-Provides:    libbz2.so.1()(64bit)
1
+Summary:        Contains programs for compressing and decompressing files
2
+Name:           bzip2
3
+Version:        1.0.6
4
+Release:        9%{?dist}
5
+License:        BSD
6
+URL:            http://www.bzip.org/
7
+Group:          System Environment/Base
8
+Vendor:         VMware, Inc.
9
+Distribution:   Photon
10
+Source0:        http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
11
+Provides:       libbz2.so.1()(64bit)
12 12
 %define sha1 bzip2=3f89f861209ce81a6bab1fd1998c0ef311712002
13
-Patch0:		http://www.linuxfromscratch.org/patches/lfs/7.2/bzip2-1.0.6-install_docs-1.patch
13
+Patch0:         http://www.linuxfromscratch.org/patches/lfs/7.2/bzip2-1.0.6-install_docs-1.patch
14 14
 Patch1:         CVE-2016-3189.patch
15 15
 Requires:       bzip2-libs = %{version}-%{release}
16
+Conflicts:      toybox
17
+
16 18
 %description
17 19
 The Bzip2 package contains programs for compressing and
18 20
 decompressing files.  Compressing text files with bzip2 yields a much better
19 21
 compression percentage than with the traditional gzip.
20 22
 
21
-%package	devel
22
-Summary:	Header and development files for bzip2
23
-Requires:	bzip2
24
-%description	devel
25
-It contains the libraries and header files to create applications 
23
+%package        devel
24
+Summary:        Header and development files for bzip2
25
+Requires:       bzip2
26
+%description    devel
27
+It contains the libraries and header files to create applications
26 28
 
27 29
 %package libs
28
-Summary: Libraries for bzip2
29
-Group:      System Environment/Libraries
30
-%description libs
30
+Summary:        Libraries for bzip2
31
+Group:          System Environment/Libraries
32
+%description    libs
31 33
 This package contains minimal set of shared bzip2 libraries.
32 34
 
33 35
 %prep
... ...
@@ -36,10 +38,12 @@ This package contains minimal set of shared bzip2 libraries.
36 36
 %patch1 -p1
37 37
 sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
38 38
 sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
39
+
39 40
 %build
40 41
 make VERBOSE=1 %{?_smp_mflags} -f Makefile-libbz2_so
41 42
 make clean
42 43
 make VERBOSE=1 %{?_smp_mflags}
44
+
43 45
 %install
44 46
 make PREFIX=%{buildroot}/usr install
45 47
 install -vdm 0755 %{buildroot}/%{_lib}
... ...
@@ -52,10 +56,13 @@ rm -v %{buildroot}%{_bindir}/{bunzip2,bzcat}
52 52
 ln -sv bzip2 %{buildroot}/usr/bin/bunzip2
53 53
 ln -sv bzip2 %{buildroot}/usr/bin/bzcat
54 54
 find %{buildroot} -name '*.a'  -delete
55
+
55 56
 %check
56 57
 make %{?_smp_mflags} check
58
+
57 59
 %post	-p /sbin/ldconfig
58 60
 %postun	-p /sbin/ldconfig
61
+
59 62
 %files
60 63
 %defattr(-,root,root)
61 64
 %{_bindir}/bzcat
... ...
@@ -87,19 +94,21 @@ make %{?_smp_mflags} check
87 87
 %{_lib}/libbz2.so.*
88 88
 
89 89
 %changelog
90
+*   Tue Oct 2 2018 Michelle Wang <michellew@vmware.com> 1.0.6-9
91
+-   Add conflicts toybox.
90 92
 *   Sun Jun 04 2017 Bo Gan <ganb@vmware.com> 1.0.6-8
91
--   Fix symlink
93
+-   Fix symlink.
92 94
 *   Fri Apr 14 2017 Alexey Makhalov <amakhalov@vmware.com> 1.0.6-7
93
--   Added -libs subpackage
95
+-   Added -libs subpackage.
94 96
 *   Fri Oct 21 2016 Kumar Kaushik <kaushikk@vmware.com> 1.0.6-6
95 97
 -   Fixing security bug CVE-2016-3189.
96 98
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0.6-5
97
--   GA - Bump release of all rpms
99
+-   GA - Bump release of all rpms.
98 100
 *   Tue Nov 10 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 1.0.6-4
99 101
 -   Providing libbz2.so.1, miror fix for devel provides.
100 102
 *   Fri Jun 5 2015 Divya Thaluru <dthaluru@vmware.com> 1.0.6-3
101
--   Adding bzip2 package run time required package for bzip2-devel package 
103
+-   Adding bzip2 package run time required package for bzip2-devel package.
102 104
 *   Mon May 18 2015 Touseef Liaqat <tliaqat@vmware.com> 1.0.6-2
103 105
 -   Update according to UsrMove.
104 106
 *   Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 1.0.6-1
105
--   Initial build.	First version
107
+-   Initial build First version.
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Programs that show the differences between files or directories
2 2
 Name:		diffutils
3 3
 Version:	3.6
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	GPLv3+
6 6
 URL:		http://www.gnu.org/software/diffutils
7 7
 Group:		System Environment/Base
... ...
@@ -9,21 +9,26 @@ Vendor:		VMware, Inc.
9 9
 Distribution:	Photon
10 10
 Source0:	http://ftp.gnu.org/gnu/diffutils/%{name}-%{version}.tar.xz
11 11
 %define sha1 diffutils=1287a553868b808ebfff3790a5cdc6fdf7cb2886
12
-BuildRequires:	coreutils
12
+BuildRequires:  coreutils
13
+Conflicts:      toybox
14
+
13 15
 %description
14 16
 The Diffutils package contains programs that show the
15 17
 differences between files or directories.
16 18
 %prep
17 19
 %setup -q
18 20
 sed -i 's:= @mkdir_p@:= /bin/mkdir -p:' po/Makefile.in.in
21
+
19 22
 %build
20
-./configure \
21
-	--prefix=%{_prefix} \
22
-	--disable-silent-rules
23
+
24
+%configure --disable-silent-rules
25
+
23 26
 make %{?_smp_mflags}
27
+
24 28
 %install
25 29
 make DESTDIR=%{buildroot} install
26 30
 rm -rf %{buildroot}%{_infodir}
31
+
27 32
 %find_lang %{name}
28 33
 
29 34
 %check
... ...
@@ -34,16 +39,19 @@ make %{?_smp_mflags} check
34 34
 %defattr(-,root,root)
35 35
 %{_bindir}/*
36 36
 %{_mandir}/*/*
37
+
37 38
 %changelog
39
+*       Tue Oct 2 2018 Michelle Wang <michellew@vmware.com> 3.6-2
40
+-       Add conflicts toybox.
38 41
 *       Fri Aug 03 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 3.6-1
39
--       Update to version 3.6 to get it to build with gcc 7.3
42
+-       Update to version 3.6 to get it to build with gcc 7.3.
40 43
 *       Wed Apr 19 2017 Bo Gan <ganb@vmware.com> 3.5-1
41
--       Update to 3.5
44
+-       Update to 3.5.
42 45
 *       Wed Oct 05 2016 ChangLee <changlee@vmware.com> 3.3-4
43
--       Modified %check
44
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.3-3
45
--	GA - Bump release of all rpms
46
-*	Wed Jun 3 2015 Divya Thaluru <dthaluru@vmware.com> 3.3-2
47
--	Adding coreutils package to build requires
48
-*	Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 3.3-1
49
--	Initial build.	First version
46
+-       Modified %check.
47
+*       Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.3-3
48
+-       GA Bump release of all rpms.
49
+*       Wed Jun 3 2015 Divya Thaluru <dthaluru@vmware.com> 3.3-2
50
+-       Adding coreutils package to build requires.
51
+*       Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 3.3-1
52
+-       Initial build First version.
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Contains the utilities for the ext2 file system
2 2
 Name:           e2fsprogs
3 3
 Version:        1.44.3
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        GPLv2+
6 6
 URL:            http://e2fsprogs.sourceforge.net
7 7
 Group:          System Environment/Base
... ...
@@ -10,9 +10,10 @@ Distribution:   Photon
10 10
 Source0:        http://prdownloads.sourceforge.net/e2fsprogs/%{name}-%{version}.tar.gz
11 11
 %define sha1    e2fsprogs=bfe11b75fee61c4d3795ac27eea11f9f7843294b
12 12
 Requires:       %{name}-libs = %{version}-%{release}
13
+Conflicts:      toybox
14
+
13 15
 %description
14
-The E2fsprogs package contains the utilities for handling
15
-the ext2 file system.
16
+The E2fsprogs package contains the utilities for handling the ext2 file system.
16 17
 
17 18
 %package    libs
18 19
 Summary:    contains libraries used by other packages
... ...
@@ -23,7 +24,7 @@ It contains the libraries: libss and libcom_err
23 23
 Summary:    Header and development files for e2fsprogs
24 24
 Requires:   %{name} = %{version}
25 25
 %description    devel
26
-It contains the libraries and header files to create applications 
26
+It contains the libraries and header files to create applications
27 27
 
28 28
 %package lang
29 29
 Summary: Additional language files for e2fsprogs
... ...
@@ -34,16 +35,13 @@ These are the additional language files of e2fsprogs
34 34
 
35 35
 %prep
36 36
 %setup -q
37
-install -vdm 755 build
38 37
 sed -i -e 's|^LD_LIBRARY_PATH.*|&:/tools/lib|' tests/test_config
39 38
 
40 39
 %build
41
-cd build
42 40
 LIBS=-L/tools/lib \
43 41
 CFLAGS=-I/tools/include \
44 42
 PKG_CONFIG_PATH=/tools/lib/pkgconfig \
45
-../configure \
46
-    --prefix=%{_prefix} \
43
+%configure \
47 44
     --with-root-prefix='' \
48 45
     --enable-elf-shlibs \
49 46
     --disable-libblkid \
... ...
@@ -55,20 +53,18 @@ PKG_CONFIG_PATH=/tools/lib/pkgconfig \
55 55
 make %{?_smp_mflags}
56 56
 
57 57
 %install
58
-pushd build
59 58
 make DESTDIR=%{buildroot} install
60 59
 make DESTDIR=%{buildroot} install-libs
61 60
 chmod -v u+w %{buildroot}/%{_libdir}/{libcom_err,libe2p,libext2fs,libss}.a
62 61
 rm -rf %{buildroot}%{_infodir}
63
-popd
64 62
 %find_lang %{name}
65 63
 
66 64
 %check
67
-cd build
68 65
 make %{?_smp_mflags} check
69 66
 
70 67
 %post
71 68
 /sbin/ldconfig
69
+
72 70
 %postun
73 71
 /sbin/ldconfig
74 72
 
... ...
@@ -88,21 +84,17 @@ make %{?_smp_mflags} check
88 88
 %{_mandir}/man1/*
89 89
 %{_mandir}/man5/*
90 90
 %{_sbindir}/*
91
-/lib/libext2fs.so.2.4
92
-/lib/libe2p.so.2.3
93
-/lib/libe2p.so.2
94
-/lib/libext2fs.so.2
95
-/sbin/*
91
+%{_libdir}/libext2fs.so.2.4
92
+%{_libdir}/libe2p.so.2.3
93
+%{_libdir}/libe2p.so.2
94
+%{_libdir}/libext2fs.so.2
96 95
 %{_libdir}/libe2p.so
97 96
 %{_libdir}/libext2fs.so
98 97
 
99 98
 %files libs
100
-/lib/libss.so.2
101
-/lib/libcom_err.so.2.1
102
-/lib/libss.so.2.0
103
-/lib/libcom_err.so.2
104
-%{_libdir}/libcom_err.so
105 99
 %{_libdir}/libss.so
100
+%{_libdir}/libss.so.*
101
+%{_libdir}/libcom_err.*
106 102
 
107 103
 %files devel
108 104
 %{_includedir}/ss/ss_err.h
... ...
@@ -135,28 +127,29 @@ make %{?_smp_mflags} check
135 135
 %defattr(-,root,root)
136 136
 
137 137
 %changelog
138
+*   Tue Oct 2 2018 Michelle Wang <michellew@vmware.com> 1.44.3-2
139
+-   Add conflicts toybox.
138 140
 *   Mon Sep 10 2018 Alexey Makhalov <amakhalov@vmware.com> 1.44.3-1
139
--   Version update to fix compilation issue againts glibc-2.28
141
+-   Version update to fix compilation issue againts glibc-2.28.
140 142
 *   Tue May 02 2017 Anish Swaminathan <anishs@vmware.com> 1.43.4-2
141 143
 -   Add lang package.
142 144
 *   Mon Apr 03 2017 Chang Lee <changlee@vmware.com> 1.43.4-1
143
--   Updated to version 1.43.4
145
+-   Updated to version 1.43.4.
144 146
 *   Wed Dec 07 2016 Xiaolin Li <xiaolinl@vmware.com> 1.42.13-5
145 147
 -   Moved man3 to devel subpackage.
146 148
 *   Wed Nov 16 2016 Alexey Makhalov <amakhalov@vmware.com> 1.42.13-4
147
--   Create libs subpackage for krb5
149
+-   Create libs subpackage for krb5.
148 150
 *   Tue Sep 20 2016 Alexey Makhalov <amakhalov@vmware.com> 1.42.13-3
149
--   Use symlinks - save a diskspace
151
+-   Use symlinks - save a diskspace.
150 152
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.42.13-2
151
--   GA - Bump release of all rpms
153
+-   GA - Bump release of all rpms.
152 154
 *   Tue Jan 12 2016 Xiaolin Li <xiaolinl@vmware.com> 1.42.13-1
153
--   Updated to version 1.42.13
155
+-   Updated to version 1.42.13.
154 156
 *   Wed Dec 09 2015 Anish Swaminathan <anishs@vmware.com> 1.42.9-4
155 157
 -   Edit post script.
156 158
 *   Tue Nov 10 2015 Xiaolin Li <xiaolinl@vmware.com> 1.42.9-3
157
--   Handled locale files with macro find_lang
159
+-   Handled locale files with macro find_lang.
158 160
 *   Mon May 18 2015 Touseef Liaqat <tliaqat@vmware.com> 1.42.9-2
159 161
 -   Update according to UsrMove.
160 162
 *   Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 1.42.9-1
161
--   Initial build. First version
162
-
163
+-   Initial build First version.
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Key table files, console fonts, and keyboard utilities
2 2
 Name:		kbd
3 3
 Version:	2.0.4
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	GPLv2
6 6
 URL:		http://ftp.altlinux.org/pub/people/legion/kbd
7 7
 Group:		Applications/System
... ...
@@ -11,20 +11,22 @@ Source0:	http://ftp.altlinux.org/pub/people/legion/kbd/%{name}-%{version}.tar.xz
11 11
 %define sha1 kbd=cf5d45c62d6af70b8b1f210d89193b52f5efb05d
12 12
 Patch0:		kbd-2.0.4-backspace-1.patch
13 13
 BuildRequires:	check >= 0.9.4
14
+Conflicts:      toybox
15
+
14 16
 %description
15 17
 The Kbd package contains key-table files, console fonts, and keyboard utilities.
18
+
16 19
 %prep
17 20
 %setup -q
18 21
 %patch0 -p1
19 22
 sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure
20 23
 sed -i 's/resizecons.8 //'  docs/man/man8/Makefile.in
24
+
21 25
 %build
22 26
 PKG_CONFIG_PATH=/tools/lib/pkgconfig \
23
-./configure \
24
-	--prefix=%{_prefix} \
25
-	--disable-vlock \
26
-	--disable-silent-rules
27
+%configure --disable-vlock --disable-silent-rules
27 28
 make %{?_smp_mflags}
29
+
28 30
 %install
29 31
 make DESTDIR=%{buildroot} install
30 32
 install -vdm 755 %{buildroot}%{_defaultdocdir}/%{name}-%{version}
... ...
@@ -46,14 +48,17 @@ make %{?_smp_mflags} check
46 46
 %{_datarootdir}/keymaps/*
47 47
 %{_datarootdir}/unimaps/*
48 48
 %{_mandir}/*/*
49
+
49 50
 %changelog
51
+*   Tue Oct 2 2018 Michelle Wang <michellew@vmware.com> 2.0.4-3
52
+-   Add conflict toybox.
50 53
 *   Mon Sep 11 2017 Anish Swaminathan <anishs@vmware.com> 2.0.4-2
51
--   Remove FAQs from main package
54
+-   Remove FAQs from main package.
52 55
 *   Mon Apr 03 2017 Divya Thaluru <dthaluru@vmware.com> 2.0.4-1
53
--   Updated to version 2.0.4
56
+-   Updated to version 2.0.4.
54 57
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.0.3-2
55
--   GA - Bump release of all rpms
58
+-   GA - Bump release of all rpms.
56 59
 *   Wed Jan 13 2016 Xiaolin Li <xiaolinl@vmware.com> 2.0.3-1
57
--   Updated to version 2.0.3
60
+-   Updated to version 2.0.3.
58 61
 *   Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 2.0.1-1
59
--   Initial build. First version
62
+-   Initial build First version.
... ...
@@ -83,87 +83,97 @@ Subject: [PATCH 2/3] Added PAX_RANDKSTACK
83 83
 Signed-off-by: Him Kalyan Bordoloi<bordoloih@vmware.com>
84 84
 
85 85
 ---
86
- arch/x86/entry/entry_64.S    | 17 +++++++++++++++--
87
- arch/x86/kernel/process_64.c | 17 +++++++++++++++++
86
+ arch/x86/entry/entry_64.S    | 37 +++++++++++++++++++++++++++++++++++++
87
+ arch/x86/kernel/process_64.c | 15 +++++++++++++++
88 88
  security/Kconfig             | 16 ++++++++++++++++
89
- 3 files changed, 48 insertions(+), 2 deletions(-)
89
+ 3 files changed, 68 insertions(+)
90 90
 
91 91
 diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
92
-index 8ae7ffd..9c1daeb 100644
92
+index 8ae7ffd..f7c721d 100644
93 93
 --- a/arch/x86/entry/entry_64.S
94 94
 +++ b/arch/x86/entry/entry_64.S
95
-@@ -53,6 +53,14 @@ ENTRY(native_usergs_sysret64)
95
+@@ -53,6 +53,15 @@ ENTRY(native_usergs_sysret64)
96 96
  END(native_usergs_sysret64)
97 97
  #endif /* CONFIG_PARAVIRT */
98 98
  
99
-+.macro pax_rand_kstack
100 99
 +#ifdef CONFIG_PAX_RANDKSTACK
100
++.macro PAX_RAND_KSTACK
101
++	movq	%rsp, %rdi
101 102
 +	call	pax_randomize_kstack
102 103
 +	movq    %rsp, %rdi
103 104
 +	movq    %rax, %rsp
104
-+#endif
105 105
 +.endm
106
++#endif
106 107
 +
107 108
  .macro TRACE_IRQS_FLAGS flags:req
108 109
  #ifdef CONFIG_TRACE_IRQFLAGS
109 110
  	btl	$9, \flags		/* interrupts off? */
110
-@@ -233,9 +241,20 @@ GLOBAL(entry_SYSCALL_64_after_hwframe)
111
+@@ -233,9 +242,28 @@ GLOBAL(entry_SYSCALL_64_after_hwframe)
111 112
  	TRACE_IRQS_OFF
112 113
  
113 114
  	/* IRQs are off. */
114
--	movq	%rax, %rdi
115
--	movq	%rsp, %rsi
116 115
 +
117 116
 +	/*
118 117
 +	 * do_syscall_64 expects syscall-nr (pt_regs->orig_ax) as the first
119 118
 +	 * argument (%rdi) and pointer to pt_regs as the second argument (%rsi).
120 119
 +	 */
120
++#ifdef CONFIG_PAX_RANDKSTACK
121 121
 +	pushq	%rax
122
++	movq	%rsp, %rdi
122 123
 +	call	pax_randomize_kstack
123 124
 +	popq	%rdi
124 125
 +	movq    %rsp, %rsi
125 126
 +	movq    %rax, %rsp
126 127
 +
127 128
 +	pushq	%rsi
129
++#else
130
+ 	movq	%rax, %rdi
131
+ 	movq	%rsp, %rsi
132
++#endif
128 133
  	call	do_syscall_64		/* returns with IRQs disabled */
134
++#ifdef CONFIG_PAX_RANDKSTACK
129 135
 +	popq	%rsp
136
++#endif
130 137
  
131 138
  	TRACE_IRQS_IRETQ		/* we're about to change IF */
132 139
  
133
-@@ -401,8 +420,11 @@ ENTRY(ret_from_fork)
140
+@@ -401,8 +429,17 @@ ENTRY(ret_from_fork)
134 141
  
135 142
  2:
136 143
  	UNWIND_HINT_REGS
137
--	movq	%rsp, %rdi
138
-+	pax_rand_kstack
144
++#ifdef CONFIG_PAX_RANDKSTACK
145
++	PAX_RAND_KSTACK
139 146
 +	pushq	%rdi
147
++#else
148
+ 	movq	%rsp, %rdi
149
++#endif
140 150
  	call	syscall_return_slowpath	/* returns with IRQs disabled */
151
++#ifdef CONFIG_PAX_RANDKSTACK
141 152
 +	popq	%rsp
153
++#endif
142 154
 +
143 155
  	TRACE_IRQS_ON			/* user mode is traced as IRQS on */
144 156
  	jmp	swapgs_restore_regs_and_return_to_usermode
145 157
  
146 158
 diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
147
-index 0091a73..a73aab3 100644
159
+index 0091a73..31b697c 100644
148 160
 --- a/arch/x86/kernel/process_64.c
149 161
 +++ b/arch/x86/kernel/process_64.c
150
-@@ -61,6 +61,23 @@
162
+@@ -61,6 +61,21 @@
151 163
  
152 164
  __visible DEFINE_PER_CPU(unsigned long, rsp_scratch);
153 165
  
154 166
 +#ifdef CONFIG_PAX_RANDKSTACK
155
-+unsigned long pax_randomize_kstack(void)
167
++unsigned long pax_randomize_kstack(struct pt_regs *regs)
156 168
 +{
157
-+        struct task_struct *task = current;
158
-+        unsigned long time;
159
-+        unsigned long sp1;
160
-+
169
++	unsigned long time;
170
++	unsigned long sp1;
161 171
 +
162
-+        if (!randomize_va_space)
163
-+                return (unsigned long)task_pt_regs(task);
172
++	if (!randomize_va_space)
173
++		return (unsigned long)regs;
164 174
 +
165
-+        time = rdtsc() & 0xFUL;
166
-+        sp1 = (unsigned long)task_pt_regs(task) - (time << 4);
175
++	time = rdtsc() & 0xFUL;
176
++	sp1 = (unsigned long)regs - (time << 4);
167 177
 +	return sp1;
168 178
 +}
169 179
 +#endif
... ...
@@ -198,3 +208,5 @@ index 564e975..7ef4ec8 100644
198 198
  endif
199 199
  
200 200
  source security/keys/Kconfig
201
+-- 
202
+2.7.4
... ...
@@ -34,7 +34,7 @@ Subject: [PATCH 3/3] Added rap_plugin
34 34
  arch/x86/crypto/twofish-x86_64-asm_64-3way.S       |   2 +-
35 35
  arch/x86/crypto/twofish-x86_64-asm_64.S            |   4 +-
36 36
  arch/x86/entry/Makefile                            |   2 +
37
- arch/x86/entry/common.c                            |  61 +++
37
+ arch/x86/entry/common.c                            |  51 ++
38 38
  arch/x86/events/amd/iommu.h                        |   2 +-
39 39
  arch/x86/include/asm/e820/api.h                    |   2 +-
40 40
  arch/x86/include/asm/fixmap.h                      |   2 +-
... ...
@@ -104,7 +104,7 @@ Subject: [PATCH 3/3] Added rap_plugin
104 104
  kernel/sched/core.c                                |   4 +-
105 105
  kernel/sched/deadline.c                            |   4 +-
106 106
  kernel/sched/rt.c                                  |   4 +-
107
- kernel/sched/sched.h                               |   8 +-
107
+ kernel/sched/sched.h                               |   9 +-
108 108
  mm/filemap.c                                       |   6 +-
109 109
  mm/readahead.c                                     |   2 +-
110 110
  net/bridge/br_private.h                            |   3 +-
... ...
@@ -117,7 +117,7 @@ Subject: [PATCH 3/3] Added rap_plugin
117 117
  scripts/gcc-plugins/rap_plugin/rap_plugin.c        | 534 ++++++++++++++++++++
118 118
  scripts/gcc-plugins/rap_plugin/sip.c               |  96 ++++
119 119
  security/Kconfig                                   |  18 +
120
- 113 files changed, 2506 insertions(+), 750 deletions(-)
120
+ 113 files changed, 2496 insertions(+), 751 deletions(-)
121 121
  create mode 100644 scripts/gcc-plugins/rap_plugin/Makefile
122 122
  create mode 100644 scripts/gcc-plugins/rap_plugin/rap.h
123 123
  create mode 100644 scripts/gcc-plugins/rap_plugin/rap_fptr_pass.c
... ...
@@ -125,7 +125,6 @@ Subject: [PATCH 3/3] Added rap_plugin
125 125
  create mode 100644 scripts/gcc-plugins/rap_plugin/rap_plugin.c
126 126
  create mode 100644 scripts/gcc-plugins/rap_plugin/sip.c
127 127
 
128
-
129 128
 diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
130 129
 index d27a506..25fbe8f 100644
131 130
 --- a/arch/x86/crypto/aesni-intel_asm.S
... ...
@@ -1094,39 +1093,28 @@ index 06fc70c..03f4755 100644
1094 1094
 +CFLAGS_REMOVE_syscall_32.o = $(RAP_PLUGIN_ABS_CFLAGS)
1095 1095
 +CFLAGS_REMOVE_syscall_64.o = $(RAP_PLUGIN_ABS_CFLAGS)
1096 1096
 diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
1097
-index 3b2490b..589aae7 100644
1097
+index 3b2490b..0806da8 100644
1098 1098
 --- a/arch/x86/entry/common.c
1099 1099
 +++ b/arch/x86/entry/common.c
1100
-@@ -286,8 +286,28 @@ __visible void do_syscall_64(unsigned long nr, struct pt_regs *regs)
1101
- 	 */
1100
+@@ -287,7 +287,17 @@ __visible void do_syscall_64(unsigned long nr, struct pt_regs *regs)
1102 1101
  	nr &= __SYSCALL_MASK;
1103 1102
  	if (likely(nr < NR_syscalls)) {
1103
+ 		nr = array_index_nospec(nr, NR_syscalls);
1104 1104
 +#ifdef CONFIG_PAX_RAP
1105
-+		asm volatile("movq %[param1],%%rdi\n\t"
1106
-+			"movq %[param2],%%rsi\n\t"
1107
-+			"movq %[param3],%%rdx\n\t"
1108
-+			"movq %[param4],%%rcx\n\t"
1109
-+			"movq %[param5],%%r8\n\t"
1110
-+			"movq %[param6],%%r9\n\t"
1105
++		asm volatile("movq %[param],%%rdi\n\t"
1111 1106
 +			"call *%P[syscall]\n\t"
1112 1107
 +			"mov %%rax,%[result]\n\t"
1113 1108
 +			: [result] "=m" (regs->ax)
1114 1109
 +			: [syscall] "m" (sys_call_table[nr]),
1115
-+			[param1] "m" (regs->di),
1116
-+			[param2] "m" (regs->si),
1117
-+			[param3] "m" (regs->dx),
1118
-+			[param4] "m" (regs->r10),
1119
-+			[param5] "m" (regs->r8),
1120
-+			[param6] "m" (regs->r9)
1121
-+			: "ax", "di", "si", "dx", "cx", "r8", "r9", "r10", "r11", "memory");
1110
++			[param] "m" (regs)
1111
++			: "ax", "di", "memory");
1122 1112
 +#else
1123
- 		nr = array_index_nospec(nr, NR_syscalls);
1124 1113
  		regs->ax = sys_call_table[nr](regs);
1125 1114
 +#endif
1126 1115
  	}
1127 1116
  
1128 1117
  	syscall_return_slowpath(regs);
1129
-@@ -331,10 +351,51 @@ static __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs)
1118
+@@ -331,10 +341,51 @@ static __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs)
1130 1119
  		 * the high bits are zero.  Make sure we zero-extend all
1131 1120
  		 * of the args.
1132 1121
  		 */
... ...
@@ -5527,7 +5515,7 @@ index c7742dc..39668dc 100644
5527 5527
  
5528 5528
  	unsigned char		idle_balance;
5529 5529
  
5530
-@@ -1088,7 +1092,7 @@ init_numa_balancing(unsigned long clone_flags, struct task_struct *p)
5530
+@@ -1088,7 +1091,7 @@ init_numa_balancing(unsigned long clone_flags, struct task_struct *p)
5531 5531
  
5532 5532
  static inline void
5533 5533
  queue_balance_callback(struct rq *rq,
... ...
@@ -5536,7 +5524,7 @@ index c7742dc..39668dc 100644
5536 5536
  		       void (*func)(struct rq *rq))
5537 5537
  {
5538 5538
  	lockdep_assert_held(&rq->lock);
5539
-@@ -1096,7 +1100,7 @@ queue_balance_callback(struct rq *rq,
5539
+@@ -1096,7 +1099,7 @@ queue_balance_callback(struct rq *rq,
5540 5540
  	if (unlikely(head->next))
5541 5541
  		return;
5542 5542
  
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        Kernel
3 3
 Name:           linux-secure
4 4
 Version:        4.18.9
5
-Release:        2%{?kat_build:.%kat_build}%{?dist}
5
+Release:        3%{?kat_build:.%kat_build}%{?dist}
6 6
 License:        GPLv2
7 7
 URL:            http://www.kernel.org/
8 8
 Group:          System Environment/Kernel
... ...
@@ -233,6 +233,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
233 233
 /usr/src/linux-headers-%{uname_r}
234 234
 
235 235
 %changelog
236
+*   Tue Oct 30 2018 Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 4.18.9-3
237
+-   Fix PAX randkstack and RAP plugin patches to avoid boot panic.
236 238
 *   Mon Oct 22 2018 Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 4.18.9-2
237 239
 -   Use updated steal time accounting patch.
238 240
 *   Tue Sep 25 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.18.9-1
... ...
@@ -262,7 +264,7 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
262 262
 -   Version update
263 263
 *   Wed Oct 11 2017 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.53-3
264 264
 -   Add patch "KVM: Don't accept obviously wrong gsi values via
265
-    KVM_IRQFD" to fix CVE-2017-1000252.
265
+-   KVM_IRQFD" to fix CVE-2017-1000252.
266 266
 *   Tue Oct 10 2017 Alexey Makhalov <amakhalov@vmware.com> 4.9.53-2
267 267
 -   Build hang (at make oldconfig) fix.
268 268
 *   Thu Oct 05 2017 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.9.53-1
... ...
@@ -285,7 +287,7 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
285 285
 *   Wed Aug 09 2017 Alexey Makhalov <amakhalov@vmware.com> 4.9.41-2
286 286
 -   Fix CVE-2017-7542
287 287
 -   [bugfix] Added ccm,gcm,ghash,lzo crypto modules to avoid
288
-    panic on modprobe tcrypt
288
+-   panic on modprobe tcrypt
289 289
 *   Mon Aug 07 2017 Alexey Makhalov <amakhalov@vmware.com> 4.9.41-1
290 290
 -   Version update
291 291
 *   Fri Aug 04 2017 Bo Gan <ganb@vmware.com> 4.9.38-6
... ...
@@ -313,7 +315,7 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
313 313
 -   Fix CVE-2017-1000364 ("stack clash") and CVE-2017-9605
314 314
 *   Thu Jun 8 2017 Alexey Makhalov <amakhalov@vmware.com> 4.9.31-1
315 315
 -   Fix CVE-2017-8890, CVE-2017-9074, CVE-2017-9075, CVE-2017-9076
316
-    CVE-2017-9077 and CVE-2017-9242
316
+-   CVE-2017-9077 and CVE-2017-9242
317 317
 -   [feature] IPV6 netfilter NAT table support
318 318
 *   Fri May 26 2017 Alexey Makhalov <amakhalov@vmware.com> 4.9.30-1
319 319
 -   Fix CVE-2017-7487 and CVE-2017-9059
... ...
@@ -340,11 +342,11 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
340 340
 -   .config: disable XEN guest (needs rap_plugin verification)
341 341
 *   Wed Feb 22 2017 Alexey Makhalov <amakhalov@vmware.com> 4.9.9-2
342 342
 -   rap_plugin improvement: throw error on function type casting
343
-    function signatures were cleaned up using this feature.
343
+-   function signatures were cleaned up using this feature.
344 344
 -   Added RAP_ENTRY for asm functions.
345 345
 *   Thu Feb 09 2017 Alexey Makhalov <amakhalov@vmware.com> 4.9.9-1
346 346
 -   Update to linux-4.9.9 to fix CVE-2016-10153, CVE-2017-5546,
347
-    CVE-2017-5547, CVE-2017-5548 and CVE-2017-5576.
347
+-   CVE-2017-5547, CVE-2017-5548 and CVE-2017-5576.
348 348
 -   Added aufs support.
349 349
 -   Added PAX_RANDKSTACK feature.
350 350
 -   Extra func signatures cleanup to fix 1809717 and 1809722.
... ...
@@ -358,7 +360,7 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
358 358
 *   Mon Dec 12 2016 Alexey Makhalov <amakhalov@vmware.com> 4.9.0-1
359 359
 -   Update to linux-4.9.0
360 360
 -   Add paravirt stolen time accounting feature (from linux-esx),
361
-    but disable it by default (no-vmw-sta cmdline parameter)
361
+-   but disable it by default (no-vmw-sta cmdline parameter)
362 362
 -   Use vmware_io_delay() to keep "void fn(void)" signature
363 363
 *   Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 4.8.0-2
364 364
 -   Expand `uname -r` with release number
... ...
@@ -369,4 +371,4 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
369 369
 -   .config: add netfilter_xt_match_{cgroup,ipvs} support
370 370
 -   .config: disable /dev/mem
371 371
 *   Mon Oct 17 2016 Alexey Makhalov <amakhalov@vmware.com> 4.8.0-1
372
-    Initial commit.
372
+-   Initial commit.
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Management tools and libraries relating to cryptography
2 2
 Name:           openssl
3 3
 Version:        1.0.2p
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        OpenSSL
6 6
 URL:            http://www.openssl.org
7 7
 Group:          System Environment/Security
... ...
@@ -10,6 +10,10 @@ Distribution:   Photon
10 10
 Source0:        http://www.openssl.org/source/%{name}-%{version}.tar.gz
11 11
 %define sha1    openssl=f34b5322e92415755c7d58bf5d0d5cf37666382c
12 12
 Source1:        rehash_ca_certificates.sh
13
+%if 0%{?with_fips:1}
14
+Source100:      openssl-fips-2.0.9-lin64.tar.gz
15
+%define sha1    openssl-fips=e834d3678fb190f9483f48f037fb17041abba6a1
16
+%endif
13 17
 Patch0:         c_rehash.patch
14 18
 Patch1:         openssl-ipv6apps.patch
15 19
 Patch2:         openssl-init-conslidate.patch
... ...
@@ -21,7 +25,7 @@ Requires:       bash glibc libgcc
21 21
 
22 22
 %description
23 23
 The OpenSSL package contains management tools and libraries relating
24
-to cryptography. These are useful for providing cryptography 
24
+to cryptography. These are useful for providing cryptography
25 25
 functions to other packages, such as OpenSSH, email applications and
26 26
 web browsers (for accessing HTTPS sites).
27 27
 
... ...
@@ -59,19 +63,26 @@ Perl scripts that convert certificates and keys to various formats.
59 59
 %patch3 -p1
60 60
 
61 61
 %build
62
+%if 0%{?with_fips:1}
63
+tar xf %{SOURCE100} --no-same-owner -C ..
64
+# Do not package it to src.rpm
65
+:> %{SOURCE100}
66
+%endif
62 67
 export CFLAGS="%{optflags}"
63 68
 ./config \
64
-    --prefix=%{_prefix} \
69
+    --prefix=/usr \
65 70
     --libdir=lib \
66 71
     --openssldir=/%{_sysconfdir}/ssl \
67 72
     shared \
68 73
     zlib-dynamic \
69
-    %{?_with_fips} \
74
+%if 0%{?with_fips:1}
75
+    fips --with-fipsdir=%{_builddir}/openssl-fips-2.0.9 \
76
+%endif
70 77
     -Wa,--noexecstack "${CFLAGS}" "${LDFLAGS}"
71 78
 # does not support -j yet
72 79
 make
73 80
 %install
74
-[ %{buildroot} != "/"] && rm -rf %{buildroot}/*
81
+[ %{buildroot} != "/" ] && rm -rf %{buildroot}/*
75 82
 make INSTALL_PREFIX=%{buildroot} MANDIR=/usr/share/man MANSUFFIX=ssl install
76 83
 install -p -m 755 -D %{SOURCE1} %{buildroot}%{_bindir}/
77 84
 ln -sf libssl.so.1.0.0 %{buildroot}%{_libdir}/libssl.so.1.0.2
... ...
@@ -118,6 +129,8 @@ rm -rf %{buildroot}/*
118 118
 /%{_bindir}/rehash_ca_certificates.sh
119 119
 
120 120
 %changelog
121
+*   Wed Oct 17 2018 Alexey Makhalov <amakhalov@vmware.com> 1.0.2p-2
122
+-   Move fips logic to spec file
121 123
 *   Fri Aug 17 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 1.0.2p-1
122 124
 -   Upgrade to 1.0.2p
123 125
 *   Wed Mar 21 2018 Dheeraj Shetty <dheerajs@vmware.com> 1.0.2n-2
... ...
@@ -1,39 +1,39 @@
1
-Summary:	GNU Parted manipulates partition tables
2
-Name:		parted
3
-Version:	3.2
4
-Release:	6%{?dist}
5
-License:	GPLv3+
6
-URL:		http://ftp.gnu.org/gnu/parted/parted-3.2.tar.xz
7
-Group:		Applications/System
8
-Vendor:		VMware, Inc.
9
-Distribution:	Photon
10
-Source0:	http://ftp.gnu.org/gnu/parted/%{name}-%{version}.tar.xz
1
+Summary:        GNU Parted manipulates partition tables
2
+Name:           parted
3
+Version:        3.2
4
+Release:        7%{?dist}
5
+License:        GPLv3+
6
+URL:            http://ftp.gnu.org/gnu/parted/parted-3.2.tar.xz
7
+Group:          Applications/System
8
+Vendor:         VMware, Inc.
9
+Distribution:   Photon
10
+Source0:        http://ftp.gnu.org/gnu/parted/%{name}-%{version}.tar.xz
11 11
 %define sha1 parted=8cabb2d6789badec15c857dcc003d0dd931a818b
12
+Conflicts:      toybox
13
+
12 14
 %description
13 15
 This is useful for creating space for new operating systems,
14 16
 reorganizing disk usage, copying data on hard disks and disk imaging.
15 17
 The package contains a library, libparted, as well as well as a
16 18
 command-line frontend, parted, which can also be used in scripts.
19
+
17 20
 %prep
18 21
 %setup -q
19 22
 %build
20 23
 #Add a header to allow building with glibc-2.28 or later
21 24
 sed -i '/utsname.h/a#include <sys/sysmacros.h>' libparted/arch/linux.c &&
22
-./configure \
23
-	--prefix=%{_prefix} \
24
-	--bindir=%{_bindir} \
25
-	--infodir=%{_infodir}/%{name}-%{version} \
26
-	--without-readline \
27
-	--disable-debug \
28
-	--disable-nls \
29
-	--disable-device-mapper
25
+
26
+%configure --without-readline --disable-debug \
27
+	   --disable-nls --disable-device-mapper
30 28
 make %{?_smp_mflags}
29
+
31 30
 %install
32 31
 make DESTDIR=%{buildroot} install
33 32
 
34 33
 %post	-p /sbin/ldconfig
35 34
 %postun	-p /sbin/ldconfig
36
-%files 
35
+
36
+%files
37 37
 %defattr(-,root,root)
38 38
 %{_sbindir}/*
39 39
 %{_libdir}/*.a
... ...
@@ -42,18 +42,21 @@ make DESTDIR=%{buildroot} install
42 42
 %{_libdir}/*.so.*
43 43
 %{_libdir}/pkgconfig/*.pc
44 44
 %{_includedir}/*
45
-%{_infodir}/%{name}-%{version}/*
45
+%{_infodir}/*
46 46
 %{_datadir}/*
47
+
47 48
 %changelog
48
-* Sun Sep 09 2018 Alexey Makhalov <amakhalov@vmware.com> 3.2-6
49
-- Fix compilation issue against glibc-2.28
50
-* Wed Aug 16 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.2-5
51
-- Fix summary and description
52
-* Tue Jun 06 2017 ChangLee <changlee@vmware.com> 3.2-4
53
-- Remove %check
54
-* Fri Oct 07 2016 ChangLee <changlee@vmware.com> 3.2-3
55
-- Modified %check
56
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.2-2
57
-- GA - Bump release of all rpms