openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #14025
Bug#944738: jlink: Hash of module differs to expected hash recorded in java.base
On Fri, Sep 18, 2020 at 11:15:14AM +0100, Julian Gilbey wrote:
> I have located the source of the bug and have a patch to fix it.
>
> The cause is the use of dh_strip_nondeterminism late in the build
> process. This reorganises the jmod files, which in turn changes their
> SHA256 checksums. This would not be a problem, except that the
> checksums are saved in java.base.jmod *before* the use of
> dh_strip_nondeterminism. Performing this stripping immediately after
> each jmod file is created results in the checksums being consistent
> throughout.
>
> To do this:
>
> * add the attached patch to debian/patches (and to the quilt patch
> series); this calls strip-nondeterminism whenever a jmod file is
> created
Duh, I forgot to attach the patch. Attached this time!
Best wishes,
Julian
--- a/make/CreateJmods.gmk
+++ b/make/CreateJmods.gmk
@@ -228,7 +228,7 @@
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
- POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
+ POST_COMMAND := strip-nondeterminism $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) && $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
))
TARGETS += $(create_$(JMOD_FILE))
References