Skip to content

Commit

Permalink
Upgrade JNA to 5.10.0 (elastic#80617) (elastic#80647)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DaveCTurner authored Nov 11, 2021
1 parent 89bcde3 commit ff91b80
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build-tools-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ dependencies {
api 'com.netflix.nebula:gradle-extra-configurations-plugin:5.0.1'
api 'com.netflix.nebula:gradle-info-plugin:9.2.0'
api 'org.apache.rat:apache-rat:0.11'
api "org.elasticsearch:jna:5.7.0-1"
api "net.java.dev.jna:jna:${versions.getProperty('jna')}"
api 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
// for our ide tweaking
api 'gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:0.7'
Expand Down
3 changes: 1 addition & 2 deletions build-tools-internal/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ supercsv = 2.4.0
log4j = 2.11.1
slf4j = 1.6.2

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

netty = 4.1.66.Final
joda = 2.10.10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private static void configureDependencies(final Project project) {
dependencies.add("compileOnly", "org.locationtech.jts:jts-core:" + VersionProperties.getVersions().get("jts"));
dependencies.add("compileOnly", "org.apache.logging.log4j:log4j-api:" + VersionProperties.getVersions().get("log4j"));
dependencies.add("compileOnly", "org.apache.logging.log4j:log4j-core:" + VersionProperties.getVersions().get("log4j"));
dependencies.add("compileOnly", "org.elasticsearch:jna:" + VersionProperties.getVersions().get("jna"));
dependencies.add("compileOnly", "net.java.dev.jna:jna:" + VersionProperties.getVersions().get("jna"));
}

/**
Expand Down
3 changes: 1 addition & 2 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ dependencies {
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
api "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional

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

testImplementation(project(":test:framework")) {
// tests use the locally compiled version of server
Expand Down
1 change: 1 addition & 0 deletions server/licenses/jna-5.10.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7cf4c87dd802db50721db66947aa237d7ad09418
1 change: 0 additions & 1 deletion server/licenses/jna-5.7.0-1.jar.sha1

This file was deleted.

4 changes: 2 additions & 2 deletions x-pack/plugin/sql/qa/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
api "org.jline:jline-reader:${jlineVersion}"
api "org.jline:jline-style:${jlineVersion}"

testRuntimeOnly "org.elasticsearch:jna:${versions.jna}"
testRuntimeOnly "net.java.dev.jna:jna:${versions.jna}"
}

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

testRuntimeOnly "org.elasticsearch:jna:${versions.jna}"
testRuntimeOnly "net.java.dev.jna:jna:${versions.jna}"

// spatial dependency
testRuntimeOnly project(path: xpackModule('spatial'))
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugin/sql/sql-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
api xpackProject('plugin:sql:sql-action')
api project(":libs:elasticsearch-cli")
api project(':libs:elasticsearch-x-content')
runtimeOnly "org.elasticsearch:jna:${versions.jna}"
runtimeOnly "net.java.dev.jna:jna:${versions.jna}"
testImplementation project(":test:framework")
}

Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/sql/sql-cli/licenses/jna-5.10.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7cf4c87dd802db50721db66947aa237d7ad09418
1 change: 0 additions & 1 deletion x-pack/plugin/sql/sql-cli/licenses/jna-5.7.0-1.jar.sha1

This file was deleted.

0 comments on commit ff91b80

Please sign in to comment.