JENKINS-14351: jna-posix 1.0.3 is quite old and no longer maintained. jnr-posix is still in active development.
[JENKINS-14351] Drop old jna-posix library and use jnr-posix (2.5.2) …
core » jenkins_main_trunk #857 UNSTABLE
Looks like there's a problem with this pull request
I am a little nervous about swapping the library since plugins might have been using it, but I hope they are using only the Jenkins classes.
To what extent has this been tested other than it compiles?
To be completely honest, it has not been tested very much. Basically only I am using it on my private jenkins instance with very few plugins installed.
You might be right that switching to library with slightly incompatible API could cause problems in some plugins. I will try to investigate and test it more and will come back with results.
Anyway, thanks for your time.
I think we want to do this, I am just wondering what sanity checks are needed. I have been encouraging people running Java 6 on AIX or HP/UX (who suffer from the current implementation of symlink handling in Util) to evaluate this PR as it might be very useful on those platforms.
By the way SurefireArchiverUnitTest.testArchiveResults is now skipped on the PR builder so do not worry about that test failure.
Comments in JENKINS-13202 suggest that this change would be helpful to AIX users at least, though none have stepped forward to test.
This pull request is not currently mergeable, by the way; need to git merge master.
git merge master
If you are nervous about breaking anyone relying on the old library being present, why not just leave the jna-posix library on the classpath (i.e. <scope>runtime</scope>) and get the version out with the switch over out. Then after a couple of releases drop the jna-posix altogether
Merge remote-tracking branch 'upstream/master'
core » jenkins_main_trunk #901 SUCCESS
This pull request looks good
Downloaded jenkins.war and build permalinks work on JDK 6 on Ubuntu. Not sure if that means anything—was probably using JNA anyway.
jenkins-all grepping turns up no plugin usages of PosixException, so we can safely ignore that, and in fact delete the getErrorCode method as an implementation detail—we do not want to “leak” this library into the Jenkins API.
For org.jruby.ext.posix there are a couple usages:
and in fact clicking the Test button for Unix user/group database gives an error:
Seems that these plugins need to explicitly declare their jn*-posix dependency and not just assume core will provide it. Since pam-auth-plugin is bundled this would add to the jenkins.war download size, though at least jna-posix-1.0.3.jar seems pretty small.
There are also usages from tmpcleaner-plugin but it seems it declares its own dependency so that is no problem.
It is worse than I thought. These plugins all use PosixAPI, which is changed incompatibly in the branch:
Looks like this class needs to be @Deprecated but left alone. I will try to rework the branch accordingly.