-
Notifications
You must be signed in to change notification settings - Fork 6
[pkg] fix: drop dependency on ca-certificates-java #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pkg] fix: drop dependency on ca-certificates-java #61
Conversation
Related to ev3dev-lang-java/ev3dev-lang-java#728 (comment) The problem is that ca-certificates-java relies on jri-N-ev3 for the java-command; however jri-N-ev3 also depends on ca-certificates java. The proper fix would be to specify a self-dependency as outlined in adoptium/installer#105 (comment) . This will probably somehow break the dependency cycle so that jri-N-ev3 is installed first and only then the ca-certificates-java package gets installed. This is nice, but the installation failure damages the system cacerts file and simple --reinstall is *not* enough to fix this, instead AFAIK all java packages have to be uninstalled and then reinstalled again. Let's instead ship the cacerts that ship with other AdoptOpenJDK builds. This will fix cacerts error from the start. If the user wants to use ca-certificates-java, this actually makes it possible to do so - they just need to install the package after jri-N-ev3 and then symlink /usr/lib/jvm/jri-N-ev3/lib/security/cacerts to /etc/ssl/certs/java/cacerts which is managed by ca-certificates-java. Nothing is perfect, though. The potential issue with Adopt's CA certificates is that they seem pretty old (~ 3 years). It seems that this is going to change: adoptium/adoptium-support#13 This change will however impact the JDK build script and not the packaging script.
|
I need to understand better the change.
|
This is because JDK is self-contained and so it does not have cacerts symlinked to /etc/ssl/certs/java/cacerts (location on Debian where the cacerts are managed by ca-certificates-java).
No, there will be no effect from this PR, as the JDK bundles the cacerts that were used when building Java. This change just brings the certificates from JDK to JRI too. |
|
I have not included the installation failure, here it is: The "fix" does not really work, as the trust store is corrupted: CA certificate database corruption can be discovered by running this command: Compared to |
|
I am going to read in detail the comments, tomorow, I will approve it. |
|
Note: Good engineering research :) |
|
I have created an alternative fix for the issue: #64. However it has its issues too. |
|
Wait, tomorrow we will discuss. 2 CPUS process better the issues. |
|
Continuing in ev3dev-lang-java/ev3dev-lang-java#731 |
|
Hi @JakubVanek, what is the value for this particular PR. I observe that the build remove the dependency wit cacerts but later, it is necessary another PR. Why not merge all PR in a unique PR. It could be better to understand the whole picture. This one is clear: Remove the dependency. |
Yes, it makes things a little more complicated, but it follows single reponsibility principle. (another summary: ev3dev-lang-java/ev3dev-lang-java#731 (comment))
#61 and #64 are two different solutions to one problem, #62 is a solution to another problem that we haven't yet experienced but might (outdated cacerts in JDK/JRI tarpkg)
This is not that clear, ev3dev-lang-java/ev3dev-lang-java#731 (comment) lists the pros and cons. |
|
reopening |
Related to ev3dev-lang-java/ev3dev-lang-java#728 (comment)
The problem is that the
ca-certificates-javapackage relies onjri-N-ev3for thejavacommand; howeverjri-N-ev3also depends onca-certificates java.The proper fix would be to specify a self-dependency as outlined in adoptium/installer#105 (comment). This will probably somehow break the dependency cycle so that
jri-N-ev3is installed first and only then theca-certificates-javapackage gets installed.This is nice, but the installation failure damages the system
cacertsfile and simpleapt install --reinstallis not enough to fix this, instead AFAIK all java packages have to be uninstalled and then reinstalled again.Let's instead ship the cacerts that ship with other AdoptOpenJDK builds. This will fix cacerts error from the start. If the user wants to use
ca-certificates-java, this actually makes it possible to do so -they just need to install the package after
jri-N-ev3and then symlink/usr/lib/jvm/jri-N-ev3/lib/security/cacertsto/etc/ssl/certs/java/cacertswhich is managed byca-certificates-java.Nothing is perfect, though. The potential issue with Adopt's CA certificates is that they seem pretty old (~ 3 years). It seems that this is going to change: adoptium/adoptium-support#13 That change will however impact the JDK build script and not the packaging script.