| When I run `sudo ./gradlew clean`, it works fine. My suspicion
is that it's related to $JAVA_HOME being symlinked to something
not owned by my current user (/home/zck/.guix-profile is a symlink
to /var/guix/profiles/per-user/zck/guix-profile/, | which is a
symlink to /var/guix/profiles/per-user/zck/guix-profile-20-link/,
which is a symlink to
/gnu/store/c483gnpwwcmcwdbdba25q3c7x1g79mzm-profile/, which is
owned by root/guixbuild, although this directory has permissions
to read and execute for all users).
|
| Further supporting my suspicion that JAVA_HOME shouldn't be the
guix profile is that I would think either guix or java should
manage the directory, but not both.
|
|So my question is: what's going on here? What do I need to change
to be able to run gradle as my current user? Thanks.
name = NSS
nssLibraryDirectory = /gnu/store/p2d98rbmb5sl7xgca8rf96k6zq51cww6-nss-3.27.1/lib/nss
nssDbMode = noDb
attributes = compatibility
handleStartupErrors = ignoreMultipleInitialisationHowever this settings to take effect the JDK needs one more setting in another file: "jdk_base_dir/jre/lib/security/java.security" i.e. the same directory as "nss.cfg". Read the comments in the begging of the file to get a glimpse of what is configured there. If you look VERY closely around "List of providers and their security settings" you will see this:
security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfgThis file exists(I'm not sure about this - I think I've found some file without the setting) in Guix but doesn't have the correct location of the NSS library set.
-Djava.security.properties=java.securityThe contents of the custom "java.security" are copied from the original file. Only the line for the "nss.cfg" is changed:
security.provider.9=sun.security.pkcs11.SunPKCS11 nss.cfgThe contents of the custom "nss.cfg"
name=NSS
nssLibraryDirectory=/var/guix/profiles/per-user/zloster/guix-profile/lib/nss
nssDbMode=noDb
attributes=compatibilityMost probably this is not the most appropriate way to configure the JDK/NSS relation in Guix but for a workaround it is fine.
-- Поздрави, | Best regards, Радослав Петров | Radoslav Petrov