Silverblue: Specified path 'elements' must not lead outside of the project directory

Summary

On Silverblue, /home is a simlink to /var/home. And this causes issue in detecting that files are inside project.

Steps to reproduce

On non Silverblue system, you can easily reproduce this way:

ln -s $HOME/.cache /tmp/cache
export XDG_CACHE_HOME=/tmp/cache
bst build ...

Building Freedesktop SDK, you get error:

/tmp/cache/buildstream/build/bootstrap-junction-2atdruz7/project.conf [line 15 column 14]: Specified path 'elements' must not lead outside of the project directory

What is the current bug behavior?

An error when the requested file is actually inside the project.

This issue was found by @seppo.yliolli.

What is the expected correct behavior?

No error.

Relevant logs and/or screenshots

Possible fixes

Other relevant information

This affects 1.2.1.

Work-around in Silverblue is to define XDG_CACHE_HOME=/var/$HOME/.cache.

  • BuildStream version affected: /milestone %BuildStream_v1.x

Edited by Valentin David