Skip to content

Commit 74f3e69

Browse files
author
Daniel D. Daugherty
committed
8277071: [BACKOUT] JDK-8276743 Make openjdk build Zip Archive generation "reproducible"
Reviewed-by: erikj
1 parent b85500e commit 74f3e69

File tree

4 files changed

+7
-261
lines changed

4 files changed

+7
-261
lines changed

make/Main.gmk

+5-5
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ $(eval $(call SetupTarget, vscode-project-ccls, \
324324
# aren't built until after libjava and libjvm are available to link to.
325325
$(eval $(call SetupTarget, demos-jdk, \
326326
MAKEFILE := CompileDemos, \
327-
DEPS := java.base-libs exploded-image buildtools-jdk, \
327+
DEPS := java.base-libs exploded-image, \
328328
))
329329

330330
$(eval $(call SetupTarget, test-image-demos-jdk, \
@@ -383,12 +383,12 @@ bootcycle-images:
383383

384384
$(eval $(call SetupTarget, zip-security, \
385385
MAKEFILE := ZipSecurity, \
386-
DEPS := buildtools-jdk java.base-java java.security.jgss-java java.security.jgss-libs, \
386+
DEPS := java.base-java java.security.jgss-java java.security.jgss-libs, \
387387
))
388388

389389
$(eval $(call SetupTarget, zip-source, \
390390
MAKEFILE := ZipSource, \
391-
DEPS := buildtools-jdk gensrc, \
391+
DEPS := gensrc, \
392392
))
393393

394394
$(eval $(call SetupTarget, jrtfs-jar, \
@@ -508,13 +508,13 @@ $(eval $(call SetupTarget, docs-jdk-index, \
508508
$(eval $(call SetupTarget, docs-zip, \
509509
MAKEFILE := Docs, \
510510
TARGET := docs-zip, \
511-
DEPS := docs-jdk buildtools-jdk, \
511+
DEPS := docs-jdk, \
512512
))
513513

514514
$(eval $(call SetupTarget, docs-specs-zip, \
515515
MAKEFILE := Docs, \
516516
TARGET := docs-specs-zip, \
517-
DEPS := docs-jdk-specs buildtools-jdk, \
517+
DEPS := docs-jdk-specs, \
518518
))
519519

520520
$(eval $(call SetupTarget, update-build-docs, \

make/ToolsJdk.gmk

-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_class
8282
TOOL_GENERATEEMOJIDATA = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
8383
build.tools.generateemojidata.GenerateEmojiData
8484

85-
TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
86-
build.tools.makezipreproducible.MakeZipReproducible
8785

8886
# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
8987
# and nbproject/project.properties in the same dir. Needs to be looked at.

make/common/ZipArchive.gmk

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,6 @@
2626
ifndef _ZIP_ARCHIVE_GMK
2727
_ZIP_ARCHIVE_GMK := 1
2828

29-
# Depends on build tools for MakeZipReproducible
30-
include ../ToolsJdk.gmk
31-
3229
ifeq (,$(_MAKEBASE_GMK))
3330
$(error You must include MakeBase.gmk prior to including ZipArchive.gmk)
3431
endif
@@ -137,8 +134,6 @@ define SetupZipArchiveBody
137134
# dir is very small.
138135
# If zip has nothing to do, it returns 12 and would fail the build. Check for 12
139136
# and only fail if it's not.
140-
# For reproducible builds set the zip access & modify times to SOURCE_DATE_EPOCH
141-
# by using a ziptmp folder to generate final zip from using MakeZipReproducible.
142137
$$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
143138
$$(call LogWarn, Updating $$($1_NAME))
144139
$$(call MakeTargetDir)
@@ -168,18 +163,7 @@ define SetupZipArchiveBody
168163
$$($1_ZIP_EXCLUDES_$$s) \
169164
|| test "$$$$?" = "12" \
170165
))$$(NEWLINE) \
171-
) true
172-
ifeq ($(ENABLE_REPRODUCIBLE_BUILD), true)
173-
$$(call ExecuteWithLog, \
174-
$$(SUPPORT_OUTPUTDIR)/makezipreproducible/$$(patsubst $$(OUTPUTDIR)/%,%, $$@), \
175-
($(RM) $$(SUPPORT_OUTPUTDIR)/ziptmp/$1/tmp.zip && \
176-
$(MKDIR) -p $$(SUPPORT_OUTPUTDIR)/ziptmp/$1 && \
177-
$(TOOL_MAKEZIPREPRODUCIBLE) -f $$(SUPPORT_OUTPUTDIR)/ziptmp/$1/tmp.zip \
178-
-t $(SOURCE_DATE_EPOCH) $$@ && \
179-
$(RM) $$@ && \
180-
$(MV) $$(SUPPORT_OUTPUTDIR)/ziptmp/$1/tmp.zip $$@ \
181-
))
182-
endif
166+
) true \
183167
$(TOUCH) $$@
184168

185169
# Add zip to target list

make/jdk/src/classes/build/tools/makezipreproducible/MakeZipReproducible.java

-236
This file was deleted.

0 commit comments

Comments
 (0)