beryx / badass-runtime-plugin

Create a custom runtime image of your non-modular application
https://badass-runtime-plugin.beryx.org
Apache License 2.0
162 stars 21 forks source link

Symlinks converted to regular files on merge #110

Open averms opened 2 years ago

averms commented 2 years ago

Looking at the jre/legal folder in build/:

├── legal
│   ├── java.base
│   │   ├── ADDITIONAL_LICENSE_INFO
│   │   ├── aes.md
│   │   ├── asm.md
│   │   ├── ASSEMBLY_EXCEPTION
│   │   ├── cldr.md
│   │   ├── c-libutl.md
│   │   ├── icu.md
│   │   ├── LICENSE
│   │   ├── public_suffix.md
│   │   └── unicode.md
│   └── jdk.unsupported
│       ├── ADDITIONAL_LICENSE_INFO -> ../java.base/ADDITIONAL_LICENSE_INFO
│       ├── ASSEMBLY_EXCEPTION -> ../java.base/ASSEMBLY_EXCEPTION
│       └── LICENSE -> ../java.base/LICENSE

We can see that the license files in jdk.unsupported link to the ones in java.base. After merging to the image folder in build/ we get

├── legal
│   ├── java.base
│   │   ├── ADDITIONAL_LICENSE_INFO
│   │   ├── aes.md
│   │   ├── asm.md
│   │   ├── ASSEMBLY_EXCEPTION
│   │   ├── cldr.md
│   │   ├── c-libutl.md
│   │   ├── icu.md
│   │   ├── LICENSE
│   │   ├── public_suffix.md
│   │   └── unicode.md
│   └── jdk.unsupported
│       ├── ADDITIONAL_LICENSE_INFO
│       ├── ASSEMBLY_EXCEPTION
│       └── LICENSE

The license files in jdk.unsupported are turned into regular files with 777 permissions. I imagine the symlink removal is on purpose (symlinks in zip files don't work with Windows anyway), but why are the permissions changed?

hakanai commented 1 year ago

There's an open issue about symlink copying for Gradle itself: https://github.com/gradle/gradle/issues/3982

It wouldn't surprise me if this is just another casualty of that.

It might be possible to work around it, but the best outcome is they fix it.