Execution rights on an object can corrupt local cache
Summary
Because we use linking of files form cache, when an object require execution rights, the execution rights leak into the local cache. This breaks reproducibility of builds, because a file might have no execution right or have it whether another artifact contains the same object with execution rights is on the local cache or not.
Steps to reproduce
- Have element
a.bstthat creates a filea. - Have element
b.bstthat build-depends ona.bst. - Build
b.bstand see that fileahas no execution rights. - Have element
c.bstthat build-depends ona.bst. It installsaandchmod +xit. - Build
b.bstagain.
What is the current bug behavior?
a has execution rights on the second build.
What is the expected correct behavior?
a does not have execution rights on the second build.
Relevant logs and/or screenshots
Possible fixes
Other relevant information
- BuildStream version affected: /milestone %BuildStream_v1.x