TL;DR: I repurposed this from the gPhoto2 snap, since darktable uses libgphoto2 to do tethering and camera/memory card import. That seemed to be the easiest way to figure out how to support "what gPhoto2 does" as I mentioned in #27.
The layout is required due to the way ilibgphoto2 looks up camera drivers. Without the layout, it can't find the libraries it expects to find in subdirectories of /usr/lib when unconfined, and then it can't find a connected camera.
One caveat: memory cards mounted as removable storage show up twice; once as /media/$USER/card and once as /var/lib/snapd/hostfs/media/$USER/card, and apparmor denies any access to the latter.
TL;DR: I repurposed this from the gPhoto2 snap, since darktable uses libgphoto2 to do tethering and camera/memory card import. That seemed to be the easiest way to figure out how to support "what gPhoto2 does" as I mentioned in #27.
The layout is required due to the way ilibgphoto2 looks up camera drivers. Without the layout, it can't find the libraries it expects to find in subdirectories of /usr/lib when unconfined, and then it can't find a connected camera.
One caveat: memory cards mounted as removable storage show up twice; once as /media/$USER/card and once as /var/lib/snapd/hostfs/media/$USER/card, and apparmor denies any access to the latter.