`HardLinkStager`: use `unix_mode` node property to set special permissions for userchroot
Description
Currently HardLinkStager sets the permissions of staged directories to 0755. That is to suppport buildbox-run-userchroot by circumventing a limitation of userchroot, but introduces some issues: #44 (closed).
With the changes proposed in buildbox-run-userchroot!36 (merged), a property will be set in root directories to explicitly signal casd of that special case.
To avoid breaking the current version of buildbox-run-userchroot, this MR does not remove the workaround yet, so all directories will still be chmoded to 0755 regardless of the unix_mode property. That transition will be done at a later date with a separate MR.
Changes proposed in this merge request:
-
HardLinkStager::stageDirectoriesRecursively(): if root directory hasnode_properties_unix_mode == 0755, chmod the stage directory accordingly
Issues addressed
Addresses #44 (closed)
Edited by Santiago Gil