Skip to content

Commit 68f2c23

Browse files
committed
Upgrade JNA to 5.10.0 (elastic#80617)
This commit upgrades JNA to 5.10.0. The primary reason for this upgrade is to adopt a newer version of `libffi` which supports the `LIBFFI_TMPDIR` environment variable so that we can change the location of temporary executables and resolve elastic#77014. This commit also switches to the upstream JNA releases rather than using the specially-repackaged ones we've used in the past.
1 parent 89bcde3 commit 68f2c23

File tree

10 files changed

+9
-11
lines changed

10 files changed

+9
-11
lines changed

build-tools-internal/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ dependencies {
217217
api 'com.netflix.nebula:gradle-extra-configurations-plugin:5.0.1'
218218
api 'com.netflix.nebula:gradle-info-plugin:9.2.0'
219219
api 'org.apache.rat:apache-rat:0.11'
220-
api "org.elasticsearch:jna:5.7.0-1"
220+
api "net.java.dev.jna:jna:${versions.getProperty('jna')}"
221221
api 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
222222
// for our ide tweaking
223223
api 'gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:0.7'

build-tools-internal/version.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ supercsv = 2.4.0
1717
log4j = 2.11.1
1818
slf4j = 1.6.2
1919

20-
# when updating the JNA version, also update the version in buildSrc/build.gradle
21-
jna = 5.7.0-1
20+
jna = 5.10.0
2221

2322
netty = 4.1.66.Final
2423
joda = 2.10.10

build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private static void configureDependencies(final Project project) {
170170
dependencies.add("compileOnly", "org.locationtech.jts:jts-core:" + VersionProperties.getVersions().get("jts"));
171171
dependencies.add("compileOnly", "org.apache.logging.log4j:log4j-api:" + VersionProperties.getVersions().get("log4j"));
172172
dependencies.add("compileOnly", "org.apache.logging.log4j:log4j-core:" + VersionProperties.getVersions().get("log4j"));
173-
dependencies.add("compileOnly", "org.elasticsearch:jna:" + VersionProperties.getVersions().get("jna"));
173+
dependencies.add("compileOnly", "net.java.dev.jna:jna:" + VersionProperties.getVersions().get("jna"));
174174
}
175175

176176
/**

server/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ dependencies {
104104
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
105105
api "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional
106106

107-
// repackaged jna with native bits linked against all elastic supported platforms
108-
api "org.elasticsearch:jna:${versions.jna}"
107+
api "net.java.dev.jna:jna:${versions.jna}"
109108

110109
testImplementation(project(":test:framework")) {
111110
// tests use the locally compiled version of server

server/licenses/jna-5.10.0.jar.sha1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7cf4c87dd802db50721db66947aa237d7ad09418

server/licenses/jna-5.7.0-1.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

x-pack/plugin/sql/qa/server/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies {
3232
api "org.jline:jline-reader:${jlineVersion}"
3333
api "org.jline:jline-style:${jlineVersion}"
3434

35-
testRuntimeOnly "org.elasticsearch:jna:${versions.jna}"
35+
testRuntimeOnly "net.java.dev.jna:jna:${versions.jna}"
3636
}
3737

3838
// this is just a test fixture used by other projects and not in production
@@ -96,7 +96,7 @@ subprojects {
9696
testRuntimeOnly "org.jline:jline-reader:${jlineVersion}"
9797
testRuntimeOnly "org.jline:jline-style:${jlineVersion}"
9898

99-
testRuntimeOnly "org.elasticsearch:jna:${versions.jna}"
99+
testRuntimeOnly "net.java.dev.jna:jna:${versions.jna}"
100100

101101
// spatial dependency
102102
testRuntimeOnly project(path: xpackModule('spatial'))

x-pack/plugin/sql/sql-cli/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies {
3030
api xpackProject('plugin:sql:sql-action')
3131
api project(":libs:elasticsearch-cli")
3232
api project(':libs:elasticsearch-x-content')
33-
runtimeOnly "org.elasticsearch:jna:${versions.jna}"
33+
runtimeOnly "net.java.dev.jna:jna:${versions.jna}"
3434
testImplementation project(":test:framework")
3535
}
3636

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7cf4c87dd802db50721db66947aa237d7ad09418

x-pack/plugin/sql/sql-cli/licenses/jna-5.7.0-1.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)