On Wed, 23 Oct 2024 12:32:44 GMT, Erik Joelsson <er...@openjdk.org> wrote:

>> make/common/FileUtils.gmk line 141:
>> 
>>> 139:           $(CHMOD) -h u+w '$(call DecodeSpace, $@)'; \
>>> 140:          $(XATTR) -cs '$(call DecodeSpace, $@)'; \
>>> 141:        fi
>> 
>> What about running chmod only against real files?
>> 
>>      else \
>>        $(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
>>        if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then \
>>             $(CHMOD) -h u+w '$(call DecodeSpace, $@)'; \
>>          $(XATTR) -cs '$(call DecodeSpace, $@)'; \
>>        fi \
>>      fi
>> 
>> And maybe add an explaining comment after line 122:
>> 
>>   # The above fixup actions are only necessary if the file is actually 
>> copied.
>>   # When creating just a softlink, we rely on the softlink target being 
>> fixed when copied.
>
> The user reporting this issue actually had an attribute on the softlink 
> itself, which I think we want to remove, so I would rather operate on the 
> softlink. I haven't investigated how the attribute appeared on the softlink, 
> but the purpose of this code is to clear away any unexpected attributes from 
> files in the image.

This phenomenon is exploiting all possible facets...
In that case, massaging the softlink is necessary, I agree.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21649#discussion_r1812762529

Reply via email to