|
22 | 22 | "11": "11.0.25+9", |
23 | 23 | "17": "17.0.13+11", |
24 | 24 | "21": "21.0.5+11", |
| 25 | + "24": "24.0.1+9", |
25 | 26 | } |
26 | 27 |
|
27 | 28 |
|
@@ -114,23 +115,49 @@ def _post_process(self, target: InstallTarget) -> None: |
114 | 115 |
|
115 | 116 | # Build a custom JRE with only the necessary bits to minimise disk footprint |
116 | 117 | LOG.debug("Optimising JRE installation") |
117 | | - cmd = ( |
118 | | - "bin/jlink --add-modules " |
| 118 | + |
| 119 | + base_modules = [ |
119 | 120 | # Required modules |
120 | | - "java.base,java.desktop,java.instrument,java.management," |
121 | | - "java.naming,java.scripting,java.sql,java.xml,jdk.compiler," |
| 121 | + "java.base", |
| 122 | + "java.desktop", |
| 123 | + "java.instrument", |
| 124 | + "java.management", |
| 125 | + "java.naming", |
| 126 | + "java.scripting", |
| 127 | + "java.sql", |
| 128 | + "java.xml", |
| 129 | + "jdk.compiler", |
122 | 130 | # jdk.unsupported contains sun.misc.Unsafe which is required by some dependencies |
123 | | - "jdk.unsupported," |
| 131 | + "jdk.unsupported", |
124 | 132 | # Additional cipher suites |
125 | | - "jdk.crypto.cryptoki," |
| 133 | + "jdk.crypto.cryptoki", |
126 | 134 | # Archive support |
127 | | - "jdk.zipfs," |
| 135 | + "jdk.zipfs", |
128 | 136 | # Required by MQ broker |
129 | | - "jdk.httpserver,jdk.management,jdk.management.agent," |
| 137 | + "jdk.httpserver", |
| 138 | + "jdk.management", |
| 139 | + "jdk.management.agent", |
130 | 140 | # Required by Spark and Hadoop |
131 | | - "java.security.jgss,jdk.security.auth," |
| 141 | + "java.security.jgss", |
| 142 | + "jdk.security.auth", |
| 143 | + # Include required locales |
| 144 | + "jdk.localedata", |
| 145 | + ] |
| 146 | + |
| 147 | + # Add version-specific modules, not all versions require/support the same set |
| 148 | + version_specific_modules = { |
| 149 | + "24": ["jdk.incubator.vector"], # Required for Trino latest version |
| 150 | + } |
| 151 | + |
| 152 | + modules = base_modules + version_specific_modules.get(self.version, []) |
| 153 | + modules_str = ",".join(modules) |
| 154 | + |
| 155 | + cmd = ( |
| 156 | + "bin/jlink " |
| 157 | + # Add modules |
| 158 | + f"--add-modules {modules_str} " |
132 | 159 | # Include required locales |
133 | | - "jdk.localedata --include-locales en " |
| 160 | + "--include-locales en " |
134 | 161 | # Supplementary args |
135 | 162 | "--compress 2 --strip-debug --no-header-files --no-man-pages " |
136 | 163 | # Output directory |
|
0 commit comments