diff options
author | Toyohisa Kameyama <kameyama@riken.jp> | 2021-04-08 21:07:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 14:07:43 +0200 |
commit | d805be02eca72de2fd332392db97eda3b8dbd893 (patch) | |
tree | d3f728e7e0d3d8a0615089368e5958db98f635fa /lib | |
parent | da88c0e6ffe7a5aca3934bd28e6a13568d2e7a4f (diff) | |
download | spack-d805be02eca72de2fd332392db97eda3b8dbd893.tar.gz spack-d805be02eca72de2fd332392db97eda3b8dbd893.tar.bz2 spack-d805be02eca72de2fd332392db97eda3b8dbd893.tar.xz spack-d805be02eca72de2fd332392db97eda3b8dbd893.zip |
autotools: ensure config.guess and config.sub are writeable before patching them (#19837)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/build_systems/autotools.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index 6b47e3edea..bce9afebf7 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -6,6 +6,7 @@ import inspect import itertools import os import os.path +import stat from subprocess import PIPE from subprocess import check_call from typing import List # novm @@ -174,7 +175,10 @@ class AutotoolsPackage(PackageBase): # Copy the good files over the bad ones for abs_path in to_be_patched: name = os.path.basename(abs_path) + mode = os.stat(abs_path).st_mode + os.chmod(abs_path, stat.S_IWUSR) fs.copy(substitutes[name], abs_path) + os.chmod(abs_path, mode) @run_before('configure') def _set_autotools_environment_variables(self): |