RFR: JDK-8190744: xattr: No such file LICENSE files

Erik Joelsson erik.joelsson at oracle.com
Wed Nov 8 00:58:27 UTC 2017


After my recent changes to the install-file macro and using of 
SetupCopyFiles to generate the mac specific images, we have started 
seeing errors like this in the build on mac:

xattr: No such file: 
/d/jdk/open/build/macosx-x86_64-normal-server-release/images/jre-bundle/jre-10.jre/Contents/Home/legal/java.activation/LICENSE

This is caused by xattr being run on a symlink whose target does not yet 
exist, which in turn is caused by concurrent execution. The simple fix 
is to tell xattr to process the symlink itself rather than the target, 
using the -s switch.

Bug: https://bugs.openjdk.java.net/browse/JDK-8190744

Patch:

diff -r be620a591379 make/common/MakeBase.gmk
--- a/make/common/MakeBase.gmk  Mon Oct 30 21:23:10 2017 +0100
+++ b/make/common/MakeBase.gmk  Tue Nov 07 16:55:19 2017 -0800
@@ -529,7 +529,7 @@
         $(call MakeDir, $(@D))
         $(RM) '$(call DecodeSpace, $@)'
         $(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'
-       if [ -n "`$(XATTR) -l '$(call DecodeSpace, $@)'`" ]; then 
$(XATTR) -c '$(call DecodeSpace, $@)'; fi
+       if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then 
$(XATTR) -cs '$(call DecodeSpace, $@)'; fi
    endef
  else
    define install-file

/Erik




More information about the build-dev mailing list