RFR: 8336498: [macos] [build]: install-file macro may run into permission denied error
Lutz Schmidt
lucy at openjdk.org
Thu Jul 18 15:23:32 UTC 2024
On Thu, 18 Jul 2024 14:16:21 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:
>> Looks trivial. Can you hint on how to reproduce the issue? E.g. for which file I should remove the user write permission to get the build failing?
>
> Thank you for the review, @RealCLanger !
>
> Creating a reproducer is not completely trivial. There are two file properties that must be true at the same time:
>
> 1. The destination file must be read-only after copying
> 2. The destination file must have extended attributes attached.
>
> You can prepare any source file accordingly (file mode and attributes are copied with the command parameters used). In my setup, `make/langtools/tools/propertiesparser/resources/templates.properties` has an extended attribute, but r/w permissions. If I change those to r/o, the build will fail without the fix.
>
> According to my experience, it is unpredictable which files will satisfy the above requirements. On good days, no file has attributes attached while being r/o. On bad days, there are multiple such files.
> Hello @RealLucy, On a general note, after removing the extended attributes, should we consider switching the permissions of that file back to the original?
Yes, I had that thought. But what was the original state? How could we remember it? Was the file r/w already before? I did not want to over-engineer the fix, so I kept it as simple as possible.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20203#issuecomment-2236848028
More information about the build-dev
mailing list