Bugfix: stage directory permissions and cleaning (#12733)

* This updates stage names to use "spack-stage-" as a prefix.
  This avoids removing non-Spack directories in "spack clean" as
  c141e99 did (in this case so long as they don't contain the
  prefix "spack-stage-"), and also addresses a follow-up issue
  where Spack stage directories were not removed.
* Spack now does more-stringent checking of expected permissions for
  staging directories. For a given stage root that includes a user
  component, all directories before the user component that are
  created by Spack are expected to match the permissions of their
  parent; the user component and all deeper directories are expected
  to be accessible to the user (read/write/execute).
This commit is contained in:
Tamara Dahlgren
2019-10-16 14:55:37 -07:00
committed by Peter Scheibel
parent e17df2e8f5
commit 1ef71376f2
9 changed files with 294 additions and 80 deletions

View File

@@ -91,9 +91,10 @@ the selected ``build_stage`` path.
.. warning:: We highly recommend specifying ``build_stage`` paths that
distinguish between staging and other activities to ensure
``spack clean`` does not inadvertently remove unrelated files.
This can be accomplished by using a combination of ``spack`` and or
``stage`` in each path as shown in the default settings and documented
examples.
Spack prepends ``spack-stage-`` to temporary staging directory names to
reduce this risk. Using a combination of ``spack`` and or ``stage`` in
each specified path, as shown in the default settings and documented
examples, will add another layer of protection.
By default, Spack's ``build_stage`` is configured like this:

View File

@@ -856,10 +856,11 @@ from this file system with the following ``config.yaml``:
It is important to distinguish the build stage directory from other
directories in your scratch space to ensure ``spack clean`` does not
inadvertently remove unrelated files. This can be accomplished by
including a combination of ``spack`` and or ``stage`` in each path
as shown in the default settings and documented examples. See
:ref:`config-yaml` for details.
inadvertently remove unrelated files. Spack prepends ``spack-stage-``
to temporary staging directory names to reduce this risk. Using a
combination of ``spack`` and or ``stage`` in each specified path, as
shown in the default settings and documented examples, will add
another layer of protection. See :ref:`config-yaml` for details.
On systems with compilers that absolutely *require* environment variables