From c699e907fc436ecc2b153520040e5967f25dc7de Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 24 Jun 2021 02:19:20 +0200 Subject: Update command to setup tutorial (#24488) --- lib/spack/spack/cmd/tutorial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/tutorial.py b/lib/spack/spack/cmd/tutorial.py index 6c0aa40a4a..1912a6f4d3 100644 --- a/lib/spack/spack/cmd/tutorial.py +++ b/lib/spack/spack/cmd/tutorial.py @@ -26,7 +26,7 @@ level = "long" # tutorial configuration parameters tutorial_branch = "releases/v0.16" -tutorial_mirror = "s3://spack-binaries-prs/tutorial/ecp21/mirror" +tutorial_mirror = "file:///mirror" tutorial_key = os.path.join(spack.paths.share_path, "keys", "tutorial.pub") # configs to remove @@ -78,7 +78,7 @@ def tutorial(parser, args): # Note that checkout MUST be last. It changes Spack under our feet. # If you don't put this last, you'll get import errors for the code # that follows (exacerbated by the various lazy singletons we use) - tty.msg("Ensuring we're on the releases/v0.15 branch") + tty.msg("Ensuring we're on the releases/v0.16 branch") git = which("git", required=True) with working_dir(spack.paths.prefix): git("checkout", tutorial_branch) -- cgit v1.2.3-70-g09d2 From 9120856c01bae7d57867e7b05fb7b292ed3ccacb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 3 Jul 2021 00:20:09 -0500 Subject: Fix fetching for Python 3.9.6 (#24686) When using Python 3.9.6, Spack is no longer able to fetch anything. Commands like `spack fetch` and `spack install` all break. Python 3.9.6 includes a [new change](https://github.com/python/cpython/pull/25853/files#diff-b3712475a413ec972134c0260c8f1eb1deefb66184f740ef00c37b4487ef873eR462) that means that `scheme` must be a string, it cannot be None. The solution is to use an empty string like the method default. Fixes #24644. Also see https://github.com/Homebrew/homebrew-core/pull/80175 where this issue was discovered by CI. Thanks @branchvincent for reporting such a serious issue before any actual users encountered it! Co-authored-by: Todd Gamblin --- lib/spack/spack/util/url.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/util/url.py b/lib/spack/spack/util/url.py index ab5503229f..3a3e0dfec7 100644 --- a/lib/spack/spack/util/url.py +++ b/lib/spack/spack/util/url.py @@ -11,8 +11,8 @@ import itertools import os.path import re -from six import string_types import six.moves.urllib.parse as urllib_parse +from six import string_types import spack.util.path @@ -151,21 +151,21 @@ def join(base_url, path, *extra, **kwargs): for x in itertools.chain((base_url, path), extra)] n = len(paths) last_abs_component = None - scheme = None + scheme = '' for i in range(n - 1, -1, -1): obj = urllib_parse.urlparse( - paths[i], scheme=None, allow_fragments=False) + paths[i], scheme='', allow_fragments=False) scheme = obj.scheme # in either case the component is absolute - if scheme is not None or obj.path.startswith('/'): - if scheme is None: + if scheme or obj.path.startswith('/'): + if not scheme: # Without a scheme, we have to go back looking for the # next-last component that specifies a scheme. for j in range(i - 1, -1, -1): obj = urllib_parse.urlparse( - paths[j], scheme=None, allow_fragments=False) + paths[j], scheme='', allow_fragments=False) if obj.scheme: paths[i] = '{SM}://{NL}{PATH}'.format( -- cgit v1.2.3-70-g09d2 From 6b0c775448354ae15ed356530539c983339b5594 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Thu, 19 Nov 2020 11:06:45 +0100 Subject: clang/llvm: fix version detection (#19978) This PR fixes two problems with clang/llvm's version detection. clang's version output looks like this: ``` clang version 11.0.0 Target: x86_64-unknown-linux-gnu ``` This caused clang's version to be misdetected as: ``` clang@11.0.0 Target: ``` This resulted in errors when trying to actually use it as a compiler. When using `spack external find`, we couldn't determine the compiler version, resulting in errors like this: ``` ==> Warning: "llvm@11.0.0+clang+lld+lldb" has been detected on the system but will not be added to packages.yaml [reason=c compiler not found for llvm@11.0.0+clang+lld+lldb] ``` Changing the regex to only match until the end of the line fixes these problems. Fixes: #19473 --- lib/spack/spack/compilers/clang.py | 6 +++--- lib/spack/spack/test/compilers/detection.py | 6 +++++- var/spack/repos/builtin/packages/llvm/package.py | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py index 5eb08cbf0a..63aefdda72 100644 --- a/lib/spack/spack/compilers/clang.py +++ b/lib/spack/spack/compilers/clang.py @@ -159,11 +159,11 @@ class Clang(Compiler): match = re.search( # Normal clang compiler versions are left as-is - r'clang version ([^ )]+)-svn[~.\w\d-]*|' + r'clang version ([^ )\n]+)-svn[~.\w\d-]*|' # Don't include hyphenated patch numbers in the version # (see https://github.com/spack/spack/pull/14365 for details) - r'clang version ([^ )]+?)-[~.\w\d-]*|' - r'clang version ([^ )]+)', + r'clang version ([^ )\n]+?)-[~.\w\d-]*|' + r'clang version ([^ )\n]+)', output ) if match: diff --git a/lib/spack/spack/test/compilers/detection.py b/lib/spack/spack/test/compilers/detection.py index 47e078f242..4652500b5d 100644 --- a/lib/spack/spack/test/compilers/detection.py +++ b/lib/spack/spack/test/compilers/detection.py @@ -96,7 +96,11 @@ def test_apple_clang_version_detection( ('clang version 8.0.0-3 (tags/RELEASE_800/final)\n' 'Target: aarch64-unknown-linux-gnu\n' 'Thread model: posix\n' - 'InstalledDir: /usr/bin\n', '8.0.0') + 'InstalledDir: /usr/bin\n', '8.0.0'), + ('clang version 11.0.0\n' + 'Target: aarch64-unknown-linux-gnu\n' + 'Thread model: posix\n' + 'InstalledDir: /usr/bin\n', '11.0.0') ]) def test_clang_version_detection(version_str, expected_version): version = spack.compilers.clang.Clang.extract_version_from_output( diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 84c2c88499..570ce32fb2 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -244,11 +244,11 @@ class Llvm(CMakePackage, CudaPackage): def determine_version(cls, exe): version_regex = re.compile( # Normal clang compiler versions are left as-is - r'clang version ([^ )]+)-svn[~.\w\d-]*|' + r'clang version ([^ )\n]+)-svn[~.\w\d-]*|' # Don't include hyphenated patch numbers in the version # (see https://github.com/spack/spack/pull/14365 for details) - r'clang version ([^ )]+?)-[~.\w\d-]*|' - r'clang version ([^ )]+)|' + r'clang version ([^ )\n]+?)-[~.\w\d-]*|' + r'clang version ([^ )\n]+)|' # LLDB r'lldb version ([^ )\n]+)|' # LLD -- cgit v1.2.3-70-g09d2 From 0f486080b38a4cc9bbe6b9fca05c181dcbe3d3ca Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 15 Mar 2021 13:11:27 -0500 Subject: Fix use of quotes in Python build system (#22279) --- lib/spack/spack/build_systems/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index 2616642732..83b50d6b37 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -252,7 +252,7 @@ class PythonPackage(PackageBase): '--install-purelib=%s' % pure_site_packages_dir, '--install-platlib=%s' % plat_site_packages_dir, '--install-scripts=bin', - '--install-data=""', + '--install-data=', '--install-headers=%s' % inc_dir ] -- cgit v1.2.3-70-g09d2 From 7f29dd238f43a99c74a0967e5392ecc0ef69c8ab Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 20 May 2021 14:35:35 +0200 Subject: Cray: fix extracting paths from module files (#23472) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tiziano Müller --- lib/spack/spack/test/module_parsing.py | 6 ++++++ lib/spack/spack/util/module_cmd.py | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/spack/spack/test/module_parsing.py b/lib/spack/spack/test/module_parsing.py index 8dc06b058b..068b40762b 100644 --- a/lib/spack/spack/test/module_parsing.py +++ b/lib/spack/spack/test/module_parsing.py @@ -123,3 +123,9 @@ def test_get_argument_from_module_line(): for bl in bad_lines: with pytest.raises(ValueError): get_path_args_from_module_line(bl) + + +def test_lmod_quote_parsing(): + lines = ['setenv("SOME_PARTICULAR_DIR","-L/opt/cray/pe/mpich/8.1.4/gtl/lib")'] + result = get_path_from_module_contents(lines, 'some-module') + assert '/opt/cray/pe/mpich/8.1.4/gtl' == result diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index bc994fd4b4..18522002ce 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -195,9 +195,13 @@ def get_path_from_module_contents(text, module_name): def match_flag_and_strip(line, flag, strip=[]): flag_idx = line.find(flag) if flag_idx >= 0: - end = line.find(' ', flag_idx) - if end >= 0: - path = line[flag_idx + len(flag):end] + # Search for the first occurence of any separator marking the end of + # the path. + separators = (' ', '"', "'") + occurrences = [line.find(s, flag_idx) for s in separators] + indices = [idx for idx in occurrences if idx >= 0] + if indices: + path = line[flag_idx + len(flag):min(indices)] else: path = line[flag_idx + len(flag):] path = strip_path(path, strip) -- cgit v1.2.3-70-g09d2 From 2ae92ebdbb5b431088dbf2de3c01432b2c5bf36c Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 28 May 2021 00:18:30 -0700 Subject: Use AWS CloudFront for source mirror (#23978) Spack's source mirror was previously in a plain old S3 bucket. That will still work, but we can do better. This switches to AWS's CloudFront CDN for hosting the mirror. CloudFront is 16x faster (or more) than the old bucket. - [x] change mirror to https://mirror.spack.io --- etc/spack/defaults/mirrors.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/spack/defaults/mirrors.yaml b/etc/spack/defaults/mirrors.yaml index 6afc897e61..4db4f7dedb 100644 --- a/etc/spack/defaults/mirrors.yaml +++ b/etc/spack/defaults/mirrors.yaml @@ -1,2 +1,2 @@ mirrors: - spack-public: https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/ + spack-public: https://mirror.spack.io -- cgit v1.2.3-70-g09d2 From 77e633efa1a33bd87c580ed506656fe57c0b8b73 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 24 Aug 2021 14:08:34 -0700 Subject: locks: only open lockfiles once instead of for every lock held (#24794) This adds lockfile tracking to Spack's lock mechanism, so that we ensure that there is only one open file descriptor per inode. The `fcntl` locks that Spack uses are associated with an inode and a process. This is convenient, because if a process exits, it releases its locks. Unfortunately, this also means that if you close a file, *all* locks associated with that file's inode are released, regardless of whether the process has any other open file descriptors on it. Because of this, we need to track open lock files so that we only close them when a process no longer needs them. We do this by tracking each lockfile by its inode and process id. This has several nice properties: 1. Tracking by pid ensures that, if we fork, we don't inadvertently track the parent process's lockfiles. `fcntl` locks are not inherited across forks, so we'll just track new lockfiles in the child. 2. Tracking by inode ensures that referencs are counted per inode, and that we don't inadvertently close a file whose inode still has open locks. 3. Tracking by both pid and inode ensures that we only open lockfiles the minimum number of times necessary for the locks we have. Note: as mentioned elsewhere, these locks aren't thread safe -- they're designed to work in Python and assume the GIL. Tasks: - [x] Introduce an `OpenFileTracker` class to track open file descriptors by inode. - [x] Reference-count open file descriptors and only close them if they're no longer needed (this avoids inadvertently releasing locks that should not be released). --- lib/spack/llnl/util/lock.py | 147 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 127 insertions(+), 20 deletions(-) diff --git a/lib/spack/llnl/util/lock.py b/lib/spack/llnl/util/lock.py index 5fd7163e2e..396f941616 100644 --- a/lib/spack/llnl/util/lock.py +++ b/lib/spack/llnl/util/lock.py @@ -26,6 +26,126 @@ lock_type = {fcntl.LOCK_SH: 'read', fcntl.LOCK_EX: 'write'} true_fn = lambda: True +class OpenFile(object): + """Record for keeping track of open lockfiles (with reference counting). + + There's really only one ``OpenFile`` per inode, per process, but we record the + filehandle here as it's the thing we end up using in python code. You can get + the file descriptor from the file handle if needed -- or we could make this track + file descriptors as well in the future. + """ + def __init__(self, fh): + self.fh = fh + self.refs = 0 + + +class OpenFileTracker(object): + """Track open lockfiles, to minimize number of open file descriptors. + + The ``fcntl`` locks that Spack uses are associated with an inode and a process. + This is convenient, because if a process exits, it releases its locks. + Unfortunately, this also means that if you close a file, *all* locks associated + with that file's inode are released, regardless of whether the process has any + other open file descriptors on it. + + Because of this, we need to track open lock files so that we only close them when + a process no longer needs them. We do this by tracking each lockfile by its + inode and process id. This has several nice properties: + + 1. Tracking by pid ensures that, if we fork, we don't inadvertently track the parent + process's lockfiles. ``fcntl`` locks are not inherited across forks, so we'll + just track new lockfiles in the child. + 2. Tracking by inode ensures that referencs are counted per inode, and that we don't + inadvertently close a file whose inode still has open locks. + 3. Tracking by both pid and inode ensures that we only open lockfiles the minimum + number of times necessary for the locks we have. + + Note: as mentioned elsewhere, these locks aren't thread safe -- they're designed to + work in Python and assume the GIL. + """ + + def __init__(self): + """Create a new ``OpenFileTracker``.""" + self._descriptors = {} + + def get_fh(self, path): + """Get a filehandle for a lockfile. + + This routine will open writable files for read/write even if you're asking + for a shared (read-only) lock. This is so that we can upgrade to an exclusive + (write) lock later if requested. + + Arguments: + path (str): path to lock file we want a filehandle for + """ + # Open writable files as 'r+' so we can upgrade to write later + os_mode, fh_mode = (os.O_RDWR | os.O_CREAT), 'r+' + + pid = os.getpid() + open_file = None # OpenFile object, if there is one + stat = None # stat result for the lockfile, if it exists + + try: + # see whether we've seen this inode/pid before + stat = os.stat(path) + key = (stat.st_ino, pid) + open_file = self._descriptors.get(key) + + except OSError as e: + if e.errno != errno.ENOENT: # only handle file not found + raise + + # path does not exist -- fail if we won't be able to create it + parent = os.path.dirname(path) or '.' + if not os.access(parent, os.W_OK): + raise CantCreateLockError(path) + + # if there was no already open file, we'll need to open one + if not open_file: + if stat and not os.access(path, os.W_OK): + # we know path exists but not if it's writable. If it's read-only, + # only open the file for reading (and fail if we're trying to get + # an exclusive (write) lock on it) + os_mode, fh_mode = os.O_RDONLY, 'r' + + fd = os.open(path, os_mode) + fh = os.fdopen(fd, fh_mode) + open_file = OpenFile(fh) + + # if we just created the file, we'll need to get its inode here + if not stat: + inode = os.fstat(fd).st_ino + key = (inode, pid) + + self._descriptors[key] = open_file + + open_file.refs += 1 + return open_file.fh + + def release_fh(self, path): + """Release a filehandle, only closing it if there are no more references.""" + try: + inode = os.stat(path).st_ino + except OSError as e: + if e.errno != errno.ENOENT: # only handle file not found + raise + inode = None # this will not be in self._descriptors + + key = (inode, os.getpid()) + open_file = self._descriptors.get(key) + assert open_file, "Attempted to close non-existing lock path: %s" % path + + open_file.refs -= 1 + if not open_file.refs: + del self._descriptors[key] + open_file.fh.close() + + +#: Open file descriptors for locks in this process. Used to prevent one process +#: from opening the sam file many times for different byte range locks +file_tracker = OpenFileTracker() + + def _attempts_str(wait_time, nattempts): # Don't print anything if we succeeded on the first try if nattempts <= 1: @@ -46,7 +166,8 @@ class Lock(object): Note that this is for managing contention over resources *between* processes and not for managing contention between threads in a process: the functions of this object are not thread-safe. A process also must not - maintain multiple locks on the same file. + maintain multiple locks on the same file (or, more specifically, on + overlapping byte ranges in the same file). """ def __init__(self, path, start=0, length=0, default_timeout=None, @@ -151,25 +272,10 @@ class Lock(object): # Create file and parent directories if they don't exist. if self._file is None: - parent = self._ensure_parent_directory() + self._ensure_parent_directory() + self._file = file_tracker.get_fh(self.path) - # Open writable files as 'r+' so we can upgrade to write later - os_mode, fd_mode = (os.O_RDWR | os.O_CREAT), 'r+' - if os.path.exists(self.path): - if not os.access(self.path, os.W_OK): - if op == fcntl.LOCK_SH: - # can still lock read-only files if we open 'r' - os_mode, fd_mode = os.O_RDONLY, 'r' - else: - raise LockROFileError(self.path) - - elif not os.access(parent, os.W_OK): - raise CantCreateLockError(self.path) - - fd = os.open(self.path, os_mode) - self._file = os.fdopen(fd, fd_mode) - - elif op == fcntl.LOCK_EX and self._file.mode == 'r': + if op == fcntl.LOCK_EX and self._file.mode == 'r': # Attempt to upgrade to write lock w/a read-only file. # If the file were writable, we'd have opened it 'r+' raise LockROFileError(self.path) @@ -282,7 +388,8 @@ class Lock(object): """ fcntl.lockf(self._file, fcntl.LOCK_UN, self._length, self._start, os.SEEK_SET) - self._file.close() + + file_tracker.release_fh(self.path) self._file = None self._reads = 0 self._writes = 0 -- cgit v1.2.3-70-g09d2 From 0e85d7011eb21e17252c114141531be380d38ed3 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Sat, 12 Jun 2021 01:23:13 -0700 Subject: Ensure all roots of an installed environment are marked explicit in db (#24277) --- lib/spack/spack/environment.py | 7 +++++++ lib/spack/spack/test/cmd/env.py | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index 7f7625f2e6..6d0033d646 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -1420,6 +1420,13 @@ class Environment(object): # DB read transaction to reduce time spent in this case. specs_to_install = self.uninstalled_specs() + # ensure specs already installed are marked explicit + all_specs = [cs for _, cs in self.concretized_specs()] + specs_installed = [s for s in all_specs if s.package.installed] + with spack.store.db.write_transaction(): # do all in one transaction + for spec in specs_installed: + spack.store.db.update_explicit(spec, True) + if not specs_to_install: tty.msg('All of the packages are already installed') return diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index f43ea4ff32..ac96b5f606 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -176,6 +176,27 @@ def test_env_install_single_spec(install_mockery, mock_fetch): assert e.specs_by_hash[e.concretized_order[0]].name == 'cmake-client' +def test_env_roots_marked_explicit(install_mockery, mock_fetch): + install = SpackCommand('install') + install('dependent-install') + + # Check one explicit, one implicit install + dependent = spack.store.db.query(explicit=True) + dependency = spack.store.db.query(explicit=False) + assert len(dependent) == 1 + assert len(dependency) == 1 + + env('create', 'test') + with ev.read('test') as e: + # make implicit install a root of the env + e.add(dependency[0].name) + e.concretize() + e.install_all() + + explicit = spack.store.db.query(explicit=True) + assert len(explicit) == 2 + + def test_env_modifications_error_on_activate( install_mockery, mock_fetch, monkeypatch, capfd): env('create', 'test') -- cgit v1.2.3-70-g09d2 From 073c92d526949d8f91b6f556456cf89c649f188d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 9 Jul 2021 17:45:46 +0200 Subject: docker: Fix CentOS 6 build on Docker Hub (#24804) This change make yum usable again on CentOS 6 --- share/spack/docker/centos-6.dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index 1ba58d66af..f192c54427 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -9,6 +9,9 @@ ENV DOCKERFILE_BASE=centos \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker +# Make yum usable again with CentOS 6 +RUN curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo + RUN yum update -y \ && yum install -y epel-release \ && yum update -y \ -- cgit v1.2.3-70-g09d2 From aebc8f6ce5674e545b22a38362c981b89a878e89 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 10 Jul 2021 02:45:30 +0200 Subject: docker: remove boto3 from CentOS 6 since it requires and updated pip (#24813) --- share/spack/docker/centos-6.dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index f192c54427..b0186f2ff8 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -35,7 +35,6 @@ RUN yum update -y \ tcl \ unzip \ which \ - && pip install boto3 \ && rm -rf /var/cache/yum \ && yum clean all -- cgit v1.2.3-70-g09d2 From 4cd6381ed579c211c1655e6818310af838cddece Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 21 Sep 2021 10:03:33 +0200 Subject: Remove centos:6 image references This was EOL November 30th, 2020. I believe the "builds" are failing on develop because of it. --- lib/spack/docs/containers.rst | 3 -- lib/spack/spack/container/images.json | 7 ---- lib/spack/spack/schema/container.py | 3 +- share/spack/docker/centos-6.dockerfile | 74 ---------------------------------- 4 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 share/spack/docker/centos-6.dockerfile diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst index f5bd5602bc..67e70421da 100644 --- a/lib/spack/docs/containers.rst +++ b/lib/spack/docs/containers.rst @@ -126,9 +126,6 @@ are currently supported are summarized in the table below: * - Ubuntu 18.04 - ``ubuntu:18.04`` - ``spack/ubuntu-bionic`` - * - CentOS 6 - - ``centos:6`` - - ``spack/centos6`` * - CentOS 7 - ``centos:7`` - ``spack/centos7`` diff --git a/lib/spack/spack/container/images.json b/lib/spack/spack/container/images.json index cb495908c9..9461d576d1 100644 --- a/lib/spack/spack/container/images.json +++ b/lib/spack/spack/container/images.json @@ -21,13 +21,6 @@ "build_tags": { "develop": "latest" } - }, - "centos:6": { - "os_package_manager": "yum", - "build": "spack/centos6", - "build_tags": { - "develop": "latest" - } } }, "os_package_managers": { diff --git a/lib/spack/spack/schema/container.py b/lib/spack/spack/schema/container.py index 7e14efd75c..b9ee1dd538 100644 --- a/lib/spack/spack/schema/container.py +++ b/lib/spack/spack/schema/container.py @@ -12,8 +12,7 @@ _stages_from_dockerhub = { 'type': 'string', 'enum': ['ubuntu:18.04', 'ubuntu:16.04', - 'centos:7', - 'centos:6'] + 'centos:7'] }, 'spack': { 'type': 'string', diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile deleted file mode 100644 index b0186f2ff8..0000000000 --- a/share/spack/docker/centos-6.dockerfile +++ /dev/null @@ -1,74 +0,0 @@ -FROM centos:6 -MAINTAINER Spack Maintainers - -ENV DOCKERFILE_BASE=centos \ - DOCKERFILE_DISTRO=centos \ - DOCKERFILE_DISTRO_VERSION=6 \ - SPACK_ROOT=/opt/spack \ - DEBIAN_FRONTEND=noninteractive \ - CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ - container=docker - -# Make yum usable again with CentOS 6 -RUN curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo - -RUN yum update -y \ - && yum install -y epel-release \ - && yum update -y \ - && yum --enablerepo epel groupinstall -y "Development Tools" \ - && yum --enablerepo epel install -y \ - curl \ - findutils \ - gcc-c++ \ - gcc \ - gcc-gfortran \ - git \ - gnupg2 \ - hostname \ - iproute \ - Lmod \ - make \ - patch \ - python \ - python-pip \ - python-setuptools \ - tcl \ - unzip \ - which \ - && rm -rf /var/cache/yum \ - && yum clean all - -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - -RUN mkdir -p /root/.spack \ - && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ - /root/.spack/modules.yaml \ - && rm -rf /root/*.* /run/nologin $SPACK_ROOT/.git - -# [WORKAROUND] -# https://superuser.com/questions/1241548/ -# xubuntu-16-04-ttyname-failed-inappropriate-ioctl-for-device#1253889 -RUN [ -f ~/.profile ] \ - && sed -i 's/mesg n/( tty -s \\&\\& mesg n || true )/g' ~/.profile \ - || true - -WORKDIR /root -SHELL ["docker-shell"] - -# TODO: add a command to Spack that (re)creates the package cache -RUN spack spec hdf5+mpi - -ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"] -CMD ["interactive-shell"] -- cgit v1.2.3-70-g09d2 From 7caa844d49818d8c73ab3d1a6e4c100047386310 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 17 Sep 2021 13:42:57 +0200 Subject: Fix style tests --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 195c783726..b4f0488428 100644 --- a/.flake8 +++ b/.flake8 @@ -29,4 +29,4 @@ # [flake8] ignore = E129,E221,E241,E272,E731,W503,W504,F999,N801,N813,N814 -max-line-length = 79 +max-line-length = 88 -- cgit v1.2.3-70-g09d2 From 3b55c2e7158fd1d1f395a0ef32984759a6836e29 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 17 Sep 2021 16:37:21 +0200 Subject: Bump version and update changelog --- CHANGELOG.md | 12 ++++++++++++ lib/spack/spack/__init__.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d67ac073d6..cad069d2c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# v0.16.3 (2021-09-21) + +* clang/llvm: fix version detection (#19978) +* Fix use of quotes in Python build system (#22279) +* Cray: fix extracting paths from module files (#23472) +* Use AWS CloudFront for source mirror (#23978) +* Ensure all roots of an installed environment are marked explicit in db (#24277) +* Fix fetching for Python 3.8 and 3.9 (#24686) +* locks: only open lockfiles once instead of for every lock held (#24794) +* Remove the EOL centos:6 docker image + + # v0.16.2 (2021-05-22) * Major performance improvement for `spack load` and other commands. (#23661) diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index cefee1203f..0a014b3e30 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -5,7 +5,7 @@ #: major, minor, patch version for Spack, in a tuple -spack_version_info = (0, 16, 2) +spack_version_info = (0, 16, 3) #: String containing Spack version joined with .'s spack_version = '.'.join(str(v) for v in spack_version_info) -- cgit v1.2.3-70-g09d2