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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Erik Joelsson
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

Reply | Threaded
Open this post in threaded view
|

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

Alan Bateman


On 08/11/2017 00:58, Erik Joelsson wrote:

> 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.
I've seen this several times so good to have this fixed. The change
looks good.

-Alan
Reply | Threaded
Open this post in threaded view
|

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

Tim Bell
Erik:

On 11/07/17 23:05, Alan Bateman wrote:

>
>
> On 08/11/2017 00:58, Erik Joelsson wrote:
>> 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.
> I've seen this several times so good to have this fixed. The change
> looks good.
>
> -Alan

Looks good to me as well.

/Tim