Comment 7 for bug 1583250

Revision history for this message
Kyle Fazzari (kyrofa) wrote : Re: upstream use of build-time defined DATADIR incompatible with snaps relocation

Ideally upstreams would be made more relocatable, but that shouldn't be a requirement to get it snapped.

The short-term workaround is as Zygmunt mentioned-- use /snap/<name>/current in the prefix and organize. This is not a long-term solution as this path may not be consistent long-term, either due to future snapd developments or even snap renames.

On the snapcraft side we can improve things by creating a part that utilizes LD_PRELOAD and can be used by such unrelocatable projects. This is not a silver bullet as it doesn't work in all cases, but it will be an improvement. We'll try to re-prioritize our tasking to get to this sooner rather than later.

It may also be possible to deal with some of this pain with bind mounts in snap-confine, but that's more Zygmunt's area of expertise.