Snapcraft includes files from installed snaps in new snap

Bug #1670100 reported by Mark Shuttleworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Critical
Sergio Schvezov

Bug Description

I was very surprised to see these files in a new snap I just made:

squashfs-root/snap
squashfs-root/snap/conjure-up
squashfs-root/snap/conjure-up/108
squashfs-root/snap/conjure-up/108/usr
squashfs-root/snap/conjure-up/108/usr/lib
squashfs-root/snap/conjure-up/108/usr/lib/x86_64-linux-gnu
squashfs-root/snap/conjure-up/108/usr/lib/x86_64-linux-gnu/libdb-5.3.so
squashfs-root/snap/core
squashfs-root/snap/core/current
squashfs-root/snap/core/current/usr
squashfs-root/snap/core/current/usr/lib
squashfs-root/snap/core/current/usr/lib/x86_64-linux-gnu
squashfs-root/snap/core/current/usr/lib/x86_64-linux-gnu/libnl-route-3.so.200

I can't think of any good reason for those files to be there. Conjure-up is not a dependency of this new snap in any way.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Can I see the snapcraft project that caused this please?

Changed in snapcraft:
importance: Undecided → Critical
status: New → Incomplete
assignee: nobody → Sergio Schvezov (sergiusens)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Just tested some random snaps after installing conjure-up. Would be interested in seeing the project that causes this or some steps to reproduce.

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

This happens when creating a snap with classic confinement where the library paths are fixed to a path with `/snap/`. An easy reproducer is to build snapcraft as a snap.

Where this happens is in the code that fetches dependencies (basically running ldd on every binary). My first approach involved disabling this for classic confinement but that is a much more impacting change for people (breakage will happen).

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: Confirmed → Fix Committed
milestone: none → 2.29
Changed in snapcraft:
status: Fix Committed → Fix Released
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.