Skip to content

Remove junction `path` configuration from junctions

The path configuration in a junction allows one to specify a subdirectory of the source repository where the project.conf of the desired project resides.

This configuration is redundant and unneeded, I think we should remove it.

Consider the two following examples, which are essentially exactly the same:

Using path

kind: junction

sources:
- kind: git
  url: example.com/repo.git

config:
  path: subdir

Using directory

kind: junction

sources:
- kind: git
  url: example.com/repo.git
  directory: subdir

History

Looking at e2574285, it seems that this configuration was added quite some time ago.

If I recall correctly, freedesktop-sdk had a bug where it was referring to resources outside of the toplevel directory of it's BuildStream projects, essentially exploiting the lack of validation in BuildStream ensuring that local files referenced in the project do not escape the toplevel project directory.

I presume that this path was added as a workaround for freedesktop-sdk junctions such that we could stage the repository, load the project from a subdirectory, and consequently allow it to still access files outside of the project (as the full repository would be staged, not only the subdirectory holding the project).

Since that time, we have added validation of local file paths which ensure this never happens, so this should no longer be an issue and we should be able to safely remove this redundant configuration.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information