Hey guys,
My snap compiles without error while uploading the snap I get the following error:
Issues while processing snap:g
- package contains external symlinks: usr/lib/jvm/java-11-openjdk-amd64/lib/security/blacklisted.certs -> /etc/java-11-openjdk/security/blacklisted.certs, usr/lib/jvm/java-11-openjdk-amd64/lib/security/cacerts -> /etc/ssl/certs/java/cacerts
Full execution log: '/home/what/.cache/snapcraft/log/snapcraft-20220826-223551.059121.log'
so I removed the following files in the priming step :
override-prime: |
snapcraftctl prime
rm -vf usr/lib/jvm/java-11-openjdk-amd64/lib/security/blacklisted.certs
rm -vf usr/lib/jvm/java-11-openjdk-amd64/lib/security/cacerts
is there and alternative method to resolve this issue ?
my snapcraft.yaml
Hi,
If I look around to other Java snapcraft.yaml who use ca-certificates, it looks like they opt to copy them in override-build:
cp /etc/ssl/certs/java/cacerts $SNAPCRAFT_PART_INSTALL/usr/lib/jvm/java-11-openjdk/lib/security/cacerts
cp /etc/ssl/certs/java/cacerts $SNAPCRAFT_PART_INSTALL/etc/ssl/certs/java/cacerts`
Removing them would work as well, however, aren’t they needed for your application?
Kind regards,
Brecht
1 Like
Hey @BrechtNr,
adding the following lines from the Jenkins snapcraft.yaml worked
mv $SNAPCRAFT_PART_INSTALL/usr/lib/jvm/java-11-openjdk-* $SNAPCRAFT_PART_INSTALL/usr/lib/jvm/java-11-openjdk
rm $SNAPCRAFT_PART_INSTALL/usr/lib/jvm/java-11-openjdk/lib/security/cacerts
cp /etc/ssl/certs/java/cacerts $SNAPCRAFT_PART_INSTALL/usr/lib/jvm/java-11-openjdk/lib/security/cacerts
cp /etc/ssl/certs/java/cacerts $SNAPCRAFT_PART_INSTALL/etc/ssl/certs/java/cacerts
also changed the java home environment to
environment:
JAVA_HOME: $SNAP/usr/lib/jvm/java-11-openjdk/
PATH: $JAVA_HOME/bin:$PATH
thanks