In /usr/lib/jvm/openjdk-bin-17/lib/security and /usr/lib/jvm/openjdk-bin-21/lib/security the link to the cacert file is set to cacerts -> ../../../../etc/ssl/certs/java/cacerts which points to /usr/lib/etc/ssl/certs/java/cacerts The real path for the cacert file is obviously: /etc/ssl/certs/java/cacerts When staarting a program in user space which relies on the cacerts it reurns: [...] Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty [...] After fixing the link: ln -s /etc/ssl/certs/java/cacerts ./cacerts in that directories it works fine.
How to reproduce? Please describe step-by-step.
For me, the symlink is corrrect. $ ls -hal /usr/lib/jvm/openjdk-bin-21/lib/security total 244K drwxr-xr-x 2 root root 94 Jul 24 12:56 . drwxr-xr-x 5 root root 4.0K Jul 24 12:56 .. -rw-r--r-- 1 root root 2.5K Jul 17 00:40 blocked.certs lrwxrwxrwx 1 root root 38 Jul 24 12:42 cacerts -> ../../../../etc/ssl/certs/java/cacerts -rw-r--r-- 1 root root 11K Jul 17 00:40 default.policy -rw-r--r-- 1 root root 224K Jul 17 00:40 public_suffix_list.dat $ realpath /usr/lib/jvm/openjdk-bin-21/lib/security/cacerts /etc/ssl/certs/java/cacerts Please include emerge --info.
The ebuild does: local dest="/opt/${P}" local ddest="${ED}/${dest#/}" [...] dosym -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts which looks a bit odd but not necessarily wrong. More information is needed.
Created attachment 902447 [details] emerge --info
Created attachment 902484 [details] cacert screenshot
readlink -f /usr/lib/jvm/openjdk-bin-21/lib/security/cacerts > empty realpath /usr/lib/jvm/openjdk-bin-21/lib/security/cacerts realpath: /usr/lib/jvm/openjdk-bin-21/lib/security/cacerts: No such file or directory
> ls -hal /usr/lib/jvm/openjdk-bin-21/lib/security total 248K drwxr-xr-x 2 root root 4,0K Sep 9 19:29 . drwxr-xr-x 5 root root 4,0K Sep 9 19:29 .. -rw-r--r-- 1 root root 2,5K Jul 17 01:40 blocked.certs lrwxrwxrwx 1 root root 38 Sep 9 19:28 cacerts -> ../../../../etc/ssl/certs/java/cacerts -rw-r--r-- 1 root root 11K Jul 17 01:40 default.policy -rw-r--r-- 1 root root 224K Jul 17 01:40 public_suffix_list.da which is the same as your output. But if my math is correct the link goes 4 nodes up which is security => lib => openjdk-bin-21 => jvm, so /usr/lib still remains, doesn't it? Is your /etc in /usr/lib or linked in it?
OK, got it. I moved opt to another drive and linked it to /home/opt/ > realpath /opt/ /home/opt That's why the link isn't working anymore. If i move it back to /opt it works fine. Is it possible to fix that linking?