Java snap upload automated review error

Bug #1599281 reported by Søren Jepsen
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Dayon!
New
Undecided
Unassigned
snapcraft (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

After uploading a Snap for arm architecture containing a jar packaged with the java/jar plugin, i get the following error from the automated review process:

package contains external symlinks: usr/lib/jvm/java-8-openjdk-armhf/jre/lib/security/cacerts lint-snap-v2_external_symlinks

command "ls -l prime/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/security/" shows the following:
lrwxrwxrwx 3 ubuntu ubuntu 66 Jul 5 09:02 blacklisted.certs -> ../../../../../../../etc/java-8-openjdk/security/blacklisted.certs
lrwxrwxrwx 3 ubuntu ubuntu 27 Apr 23 10:34 cacerts -> /etc/ssl/certs/java/cacerts
lrwxrwxrwx 3 ubuntu ubuntu 60 Jul 5 09:02 java.policy -> ../../../../../../../etc/java-8-openjdk/security/java.policy
lrwxrwxrwx 3 ubuntu ubuntu 62 Jul 5 09:02 java.security -> ../../../../../../../etc/java-8-openjdk/security/java.security
-rw-r--r-- 3 ubuntu ubuntu 645 Apr 23 10:29 local_policy.jar
lrwxrwxrwx 3 ubuntu ubuntu 56 Jul 5 09:02 nss.cfg -> ../../../../../../../etc/java-8-openjdk/security/nss.cfg
-rw-r--r-- 3 ubuntu ubuntu 627 Apr 23 10:29 US_export_policy.jar

It appears openjdk-8-jre-headless contains an absolute symlink - not allowed by the automated review process.

Package is built using:
Description: Ubuntu 16.04 LTS
Release: 16.04

Kyle Fazzari (kyrofa)
summary: - Snap upload automated review error
+ Java snap upload automated review error
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I might point out that I've seen this dangling symlink myself and it can result in https errors and the snap failing to work under some circumstances, so the review tools are reporting a real error in the snap.

I have to manually unpack the snap (unsquashfs ./name.snap), remove the symlink, copy the real files that it expects into place and then repack the snap (snapcraft snap ./squashfs-root). I'm not sure what the correct solution for the plugin in, but this is a workaround for this bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapcraft (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Do you still see this with Snapcraft 3.x?

Changed in snapcraft (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapcraft (Ubuntu) because there has been no activity for 60 days.]

Changed in snapcraft (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Reto Galante (regal) wrote :

package contains external symlinks: usr/lib/jvm/java-11-openjdk-amd64/lib/security/blacklisted.certs lint-snap-v2_external_symlinks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.