You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rebuild JRI11.0.6 for Debian repositories with CAcert fixes #731
Currently the jri-11-ev3 package in ev3dev does not install properly, it leaves itself half-configured and with a damaged trust store (this unfortunately ships in the ev3dev image). I think that it would be a good idea to:
On the other hand, the minimal upgrade command to install fixed JRI with its own CA certificates is not that different; we only get away from the need to purge the packages.
sudo apt update
sudo apt install jri-11-ev3 # this works as a single-package update too
Countering the previous argument, now that JRI debpkgs are available from Jenkins, the update by an end-user to a newer version can also be made like this:
When installing on an ev3dev system with damaged system trust store, the clean reinstallation of ca-certificates-java would have to be done separately with ev3dev-lang-java/openjdk-ev3#64. With ev3dev-lang-java/openjdk-ev3#61, the system trust store would not be used anymore, instead the Mozilla/OpenJDK cacerts would be used.
drops Debian-style integration with system CA certificate store
integration = Java keystore is automatically generated from CA certificates stored in /etc/ssl/certs
this could confuse some users that would rely on this
instead of storing the CA certificates in the system and running update-ca-certificates, users would have to update the /usr/lib/jvm/jri-N-ev3/lib/security/cacerts file manually via keytool/other util
but it fixes new and existing installations with new packages by ignoring the damaged /etc/ssl/certs/java/cacerts and instead shipping with a separate non-automatically-generated trust store (the one that ships with JDK/JRI tarpkg)
it trusts SSL certificates stored in /etc/ssl/certs/java/cacerts truststore/keystore by default
these are auto-generated by the ca-certificates-java package from certificates configured in the system
the certs that are in there usually come from Mozilla's CA certificate list
this does not currently work because of buggy integration between ca-certificates-java and jri-11-ev3EDIT: that causes an issue during the ca-certificates-java installation and keystore creation
ca-certificates-java includes a Java utility for generating the keystore
this requires a configured JRI package to be present
but the JRI package is marked as Depends on ca-certificates-java too
→ there needs to be a self-dependency specified for the JRI package so that DPKG configures it first and so /usr/bin/java is available
unfortunately, the bug triggers creation of a broken keystore
it "appears" to be working, but file command reports it as "data", not as "Java Keystore" and it seems that Java programs using TLS/SSL cannot use it
the keystore is created only during clean installation of ca-certificates-java, not on update/simple reinstall
this means that without adding some custom bug-detection and fixup scripts, we are not able to fix the system keystore without removing ca-certificates-java and installing it back manually
JDK/JRI tarpkg
it trusts SSL certificates in a file embedded in the tarball
it works, but we need to choose which certificate database to use
however, it seems that this file is not used anymore by AdoptOpenJDK builds, they probably use OpenJDK CA certificates directly, so this area should be changed in our builds anyways
OpenJDK CA certificates
they are the standard
they are similar but different from the browser ones
it seems that AdoptOpenJDK may move to Mozilla's CA certificates as they are updated more often
this fixes CA certificates in JRI debpkg by not using system-managed /etc/ssl/certs/java/cacerts and rather shipping and using the same cacerts as the ones in JDK/JRI tarpkg
we lose Debian-style integration with system CA certificate store
this may confuse some users if they relied on it
instead of storing the CA certificates in the system and running update-ca-certificates, users would have to update the /usr/lib/jvm/jri-N-ev3/lib/security/cacerts file manually via keytool/other util
on the other hand, simple upgrade of jri-N-ev3 to any newer major or minor version would fix the problem directly, although _ only for that version_
this can be done by downloading JRI debpkg from Jenkins and installing it via DPKG
alternatively apt-get update && apt-get dist-upgrade would work too
this fixes CA certificates in JRI debpkg by ensuring that /etc/ssl/certs/java/cacerts gets generated correctly, but it cannot (yet) fix the broken state
it keeps the Debian-style integration and fixes it so that it works properly
this can only fix new installation (= ev3dev images because JRI is pre-installed)
users can fix the existing trust stores in old versions by running the following commands (even without any of the PRs being merged)
Source of CA certificates (these change the CA certificates that ship with JDK/JRI tarpkg and that would ship with JRI debpkg if ev3dev-lang-java/openjdk-ev3#61 is picked):
So, we need to build again the package. Is it possible to create a build to add the certificates inside? I read your comments and JRI has some issues linking with ca-certificates-java, so add the same certificates that from OpenJDK on the JRI. I am not sure if Mozilla CA certificates but we could begin with that certificates and evolve later. In the solution, we need to add few test to guarantee that we solved the issue.
If "current build" == jri-11-ev3 package/debpkg currently uploaded to ev3dev repository, then yes, it doesn't support SSL out of the box.
So, we need to build again the package.
Yes. For this, I'd locally force the OpenJDK source version to jdk-11.0.6+10 (last version in ev3dev repository) and with that I would locally perform a new full openjdk-ev3 build and then I would package that into a new JRI debpkg.
Is it possible to create a build to add the certificates inside?
Yup, this is what ev3dev-lang-java/openjdk-ev3#61 should enable. Any build done after the pull request is merged should support SSL properly.
I read your comments and JRI has some issues linking with ca-certificates-java, so add the same certificates that from OpenJDK on the JRI.
In the solution, we need to add few test to guarantee that we solved the issue.
There is currently no mechanism for this, but I suppose as a stop-gap measure for short tests like this we could add a new phase to the Jenkins build job. To do this properly, a separate Jenkins job with tests should be chained after the build succeeds (this was the idea behind the "Pipelines" folder, although that route is not necessary). By doing it like so, we allow jobs doing testing to be scheduled on a less-powerful Jenkins node so that computing resources are not wasted. AdoptOpenJDK Jenkins has a test/ci.role.test node tag for this purpose.
close the PR that we are not going to merge and merge 2 pending PR into one to analyse better the change. Include tests for the support. Later, we will do together the publication on ev3dev repository
close the PR that we are not going to merge and merge 2 pending PR into one to analyse better the change. Include tests for the support. Later, we will do together the publication on ev3dev repository
Try to review if OpenJDK has some tests for SSH. This is the reason that the software add tests in the software life cycle. Meanwhile, I will review the rest of commits.
I am sorry, but I will not add full testing support to openjdk-ev3. I do not want to resume my activities in it, I just wanted to help with one issue where the cause was unknown.
This project was created to develop robots with Java.
When you develop software with Java, the creation of software includes code + testing.
The same with the JVM.
Try to add in the build an initial testing support, TRY IT @JakubVanek
I did for OpenJDK10.
Today it is the SSL, tomorrow will be another stuff because the build itself is not enough.
I am not sure how many commits do you need to learn the importance about testing but I gave you 3 years to learn that value so now, the tolerance is zero.
You are welcome to return if you want to help and this is your real intention but here, exist some Engineering rules. I try to be clear in this aspect.
I've thought about the concept a little today and I don't think that it would bring much value currently anyway. If the tests are added, some of them will certainly fail. Then there are two possibilities - either suppressing the problematic ones or fixing them. The first option reduces the value of the tests to only regression detection. That may indeed be useful, but it only stops the quality from getting lower. The second option brings more benefits, but it requires a commitment to fix the failing tests and an active maintainership. I do not want to take up such a commitment to this project, so a third party would have to do the fixing and that does not seem very likely.
if you remember in OpenJDK10 the infra was emulated but now we are compiling in a better environment so the test should pass. The previous comment is about the second option. Try to add the execution.
Activity
JakubVanek commentedon May 26, 2020
Clean Java installation equals to running the following:
This is (as far as I remember) quite slow on EV3, so this solution is not ideal.
JakubVanek commentedon May 26, 2020
On the other hand, the minimal upgrade command to install fixed JRI with its own CA certificates is not that different; we only get away from the need to purge the packages.
JakubVanek commentedon May 26, 2020
Hmm, it seems that the cert store could be fixed also by the following command:
This sways my opinion towards going with ev3dev-lang-java/openjdk-ev3#64 instead of ev3dev-lang-java/openjdk-ev3#61
That would keep the cacerts split between tarpkg and debpkg:
JakubVanek commentedon May 26, 2020
Countering the previous argument, now that JRI debpkgs are available from Jenkins, the update by an end-user to a newer version can also be made like this:
When installing on an ev3dev system with damaged system trust store, the clean reinstallation of
ca-certificates-javawould have to be done separately with ev3dev-lang-java/openjdk-ev3#64. With ev3dev-lang-java/openjdk-ev3#61, the system trust store would not be used anymore, instead the Mozilla/OpenJDK cacerts would be used.JakubVanek commentedon May 26, 2020
Summary:
ev3dev-lang-java/openjdk-ev3#61 drop dependency on ca-certificates-java
update-ca-certificates, users would have to update the /usr/lib/jvm/jri-N-ev3/lib/security/cacerts file manually via keytool/other utilev3dev-lang-java/openjdk-ev3#64 add jri-N-ev3 self-dep to fix ca-certificates-java
ca-certificates-javapackage has to be removed and then reinstalledJakubVanek commentedon May 26, 2020
Java is not the only runtime that can use autogenerated key/trust stores, Mono/C# does this too.
Mechanism: http://manpages.ubuntu.com/manpages/xenial/man8/update-ca-certificates.8.html (Java puts a hook in /etc/ca-certificates/update.d)
JakubVanek commentedon May 27, 2020
Summary of the 61, 62 &
6364 PRs: ev3dev-lang-java/openjdk-ev3#61 (comment)JakubVanek commentedon May 27, 2020
Current status:
ca-certificates-javapackage from certificates configured in the systemca-certificates-javaandjri-11-ev3EDIT: that causes an issue during theca-certificates-javainstallation and keystore creationca-certificates-javaincludes a Java utility for generating the keystoreca-certificates-javatoo/usr/bin/javais availablefilecommand reports it as "data", not as "Java Keystore" and it seems that Java programs using TLS/SSL cannot use itca-certificates-java, not on update/simple reinstallca-certificates-javaand installing it back manuallyJakubVanek commentedon May 27, 2020
How the PRs relate to the current status:
JRI debpkg problems:
/etc/ssl/certs/java/cacertsand rather shipping and using the same cacerts as the ones in JDK/JRI tarpkgupdate-ca-certificates, users would have to update the /usr/lib/jvm/jri-N-ev3/lib/security/cacerts file manually via keytool/other utiljri-N-ev3to any newer major or minor version would fix the problem directly, although _ only for that version_apt-get update && apt-get dist-upgradewould work too/etc/ssl/certs/java/cacertsgets generated correctly, but it cannot (yet) fix the broken statesudo dpkg --purge --force-all ca-certificates-java sudo apt-get download ca-certificates-java sudo dpkg -i ./ca-certificates-java*Source of CA certificates (these change the CA certificates that ship with JDK/JRI tarpkg and that would ship with JRI debpkg if ev3dev-lang-java/openjdk-ev3#61 is picked):
mk-ca-bundle.plscript that downloads newest information from Mozilla's Mercurial repositoryjabrena commentedon May 28, 2020
Hi @JakubVanek, I will do a short summary:
So, we need to build again the package. Is it possible to create a build to add the certificates inside? I read your comments and JRI has some issues linking with
ca-certificates-java, so add the same certificates that from OpenJDK on the JRI. I am not sure if Mozilla CA certificates but we could begin with that certificates and evolve later. In the solution, we need to add few test to guarantee that we solved the issue.I will close tomorrow, previous PR. We only need one PR with the solution, not multiple PR.
https://github.com/ev3dev-lang-java/openjdk-ev3/pulls
Juan Antonio
JakubVanek commentedon May 28, 2020
Hi @jabrena,
If "current build" ==
jri-11-ev3package/debpkg currently uploaded to ev3dev repository, then yes, it doesn't support SSL out of the box.Yes. For this, I'd locally force the OpenJDK source version to
jdk-11.0.6+10(last version in ev3dev repository) and with that I would locally perform a new full openjdk-ev3 build and then I would package that into a new JRI debpkg.Yup, this is what ev3dev-lang-java/openjdk-ev3#61 should enable. Any build done after the pull request is merged should support SSL properly.
I assume that OpenJDK == JDK/JRI tarpkg. In that case, the ev3dev-lang-java/openjdk-ev3#61 should be merged and ev3dev-lang-java/openjdk-ev3#64 should be closed.
I agree, at worst we can revert such a change. To go this way, ev3dev-lang-java/openjdk-ev3#62 should be merged and ev3dev-lang-java/openjdk-ev3#65 should be closed.
There is currently no mechanism for this, but I suppose as a stop-gap measure for short tests like this we could add a new phase to the Jenkins
buildjob. To do this properly, a separate Jenkins job with tests should be chained after the build succeeds (this was the idea behind the "Pipelines" folder, although that route is not necessary). By doing it like so, we allow jobs doing testing to be scheduled on a less-powerful Jenkins node so that computing resources are not wasted. AdoptOpenJDK Jenkins has atest/ci.role.testnode tag for this purpose.If you want to close all pull requests there, then that is in my opinion adding extra unnecessary work.
As far as the current decision goes, you'd only need to close ev3dev-lang-java/openjdk-ev3#64 and ev3dev-lang-java/openjdk-ev3#65 (rejected solutions for two different issues) and merge ev3dev-lang-java/openjdk-ev3#61 and ev3dev-lang-java/openjdk-ev3#62 (accepted solutions for two different issues).
Jakub
jabrena commentedon May 28, 2020
Hi @JakubVanek,
close the PR that we are not going to merge and merge 2 pending PR into one to analyse better the change. Include tests for the support. Later, we will do together the publication on
ev3devrepositoryJakubVanek commentedon May 28, 2020
ev3dev-lang-java/openjdk-ev3#66 created, but I will not add the tests yet.
jabrena commentedon May 28, 2020
Try to review if OpenJDK has some tests for SSH. This is the reason that the software add tests in the software life cycle. Meanwhile, I will review the rest of commits.
JakubVanek commentedon May 29, 2020
I have decided to go with a minimum viable testing, it is now added to the PR.
1 remaining item
jabrena commentedon May 29, 2020
Hi @JakubVanek,
OpenJDK has a specific test suite:
https://github.com/AdoptOpenJDK/openjdk-tests
What is the stopper to not use the official OpenJDK test suite with SSL support out of the box?
Juan Antonio
jabrena commentedon May 29, 2020
Please read the following articles about Testing before replying:
jabrena commentedon May 29, 2020
And the following articles from AdoptOpenJDK:
jabrena commentedon May 29, 2020
JakubVanek commentedon May 29, 2020
I am sorry, but I will not add full testing support to openjdk-ev3. I do not want to resume my activities in it, I just wanted to help with one issue where the cause was unknown.
JakubVanek commentedon May 29, 2020
One is that I have given up write rights in AdoptOpenJDK Jenkins and I do not want to gain them back.
JakubVanek commentedon May 29, 2020
To clarify: full testing suite would take a long time to run and thus it would likely require new jobs in Jenkins.
jabrena commentedon May 29, 2020
This project was created to develop robots with Java.
When you develop software with Java, the creation of software includes
code + testing.The same with the JVM.
Try to add in the build an initial testing support, TRY IT @JakubVanek
I did for OpenJDK10.
Today it is the SSL, tomorrow will be another stuff because the build itself is not enough.
JakubVanek commentedon May 29, 2020
There is still the Azul's Zulu Community build which now advertises ARMv5 support and it undergoes extensive testing: https://www.azul.com/downloads/zulu-community/?architecture=arm-32-bit-sf&package=jdk
Disclaimer: I did not communicate with anyone from Azul or anyone related to their JVM in the past year.
jabrena commentedon May 29, 2020
Sorry @JakubVanek,
That distribution only supports LTS versions and and we build all versions. This is the key difference, so it is not an alternative for this issue.
JakubVanek commentedon May 29, 2020
Oki, however I still do not plan to engage in the project actively.
jabrena commentedon May 30, 2020
It is a pity to hear it.
I am not sure how many commits do you need to learn the importance about testing but I gave you 3 years to learn that value so now, the tolerance is zero.
You are welcome to return if you want to help and this is your real intention but here, exist some Engineering rules. I try to be clear in this aspect.
I recommend another article to read:
https://martinfowler.com/bliki/TechnicalDebt.html
Juan Antonio
JakubVanek commentedon Jun 15, 2020
Hi,
I've thought about the concept a little today and I don't think that it would bring much value currently anyway. If the tests are added, some of them will certainly fail. Then there are two possibilities - either suppressing the problematic ones or fixing them. The first option reduces the value of the tests to only regression detection. That may indeed be useful, but it only stops the quality from getting lower. The second option brings more benefits, but it requires a commitment to fix the failing tests and an active maintainership. I do not want to take up such a commitment to this project, so a third party would have to do the fixing and that does not seem very likely.
Best regards,
Jakub
jabrena commentedon Jun 16, 2020
Hi @JakubVanek,
if you remember in OpenJDK10 the infra was emulated but now we are compiling in a better environment so the test should pass. The previous comment is about the second option. Try to add the execution.
Here existed the previous work:
Try to execute only
make jdk_mathonly as a Pilot and later, we will review the results.Note: I celebrate that you review the case, you are doing a good job in this area. :)