From e85113faf6e06fd0b6cb6b99ed023b7101420905 Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Thu, 25 May 2017 16:14:47 -0700 Subject: [PATCH 01/31] updating mfem version (#4362) * updating mfem version * changing mfem tarball extension to .tar.gz --- var/spack/repos/builtin/packages/mfem/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index b3fe5197a06..a2d6bdc7ffe 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -50,6 +50,10 @@ class Mfem(Package): # If this quick verification procedure fails, additional discussion # will be required to verify the new version. + version('3.3', + 'b17bd452593aada93dc0fee748fcfbbf4f04ce3e7d77fdd0341cc9103bcacd0b', + url='http://goo.gl/Vrpsns', extension='.tar.gz') + version('3.2', '2938c3deed4ec4f7fd5b5f5cfe656845282e86e2dcd477d292390058b7b94340', url='http://goo.gl/Y9T75B', extension='.tar.gz') @@ -173,9 +177,7 @@ def install(self, spec, prefix): ss_lib += (' -lumfpack -lcholmod -lcolamd' + ' -lamd -lcamd -lccolamd -lsuitesparseconfig') - no_librt_archs = ['darwin-i686', 'darwin-x86_64'] - no_rt = any(map(lambda a: spec.satisfies('=' + a), - no_librt_archs)) + no_rt = spec.satisfies('platform=darwin') if not no_rt: ss_lib += ' -lrt' ss_lib += (' ' + metis_lib + ' ' + lapack_lib) From d13eac310a7b65d6ae30e2739cce3c086e9da1b0 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Thu, 25 May 2017 16:15:19 -0700 Subject: [PATCH 02/31] Add info for fastqc@0.11.4 (#4357) * Add info for fastqc@0.11.4 * Delete the bamutil package (included by mistake) The bamutil package was included by mistake, the commit deletes it. --- var/spack/repos/builtin/packages/fastqc/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/fastqc/package.py b/var/spack/repos/builtin/packages/fastqc/package.py index a9e352e101f..21b607c90ab 100644 --- a/var/spack/repos/builtin/packages/fastqc/package.py +++ b/var/spack/repos/builtin/packages/fastqc/package.py @@ -34,6 +34,7 @@ class Fastqc(Package): url = "http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.5.zip" version('0.11.5', '3524f101c0ab0bae77c7595983170a76') + version('0.11.4', '104ff2e0e9aebf5bee1f6b068a059b0d') depends_on('jdk', type='run') depends_on('perl') # for fastqc "script", any perl will do From 7bdf7a74afa7b9f2791159c55a2bf014c81415a7 Mon Sep 17 00:00:00 2001 From: Douglas Duckworth Date: Thu, 25 May 2017 23:19:59 -0400 Subject: [PATCH 03/31] added libdrm 2.4.75 per #4316 (#4359) * added libdrm 2.4.75 per #4316 * removed 'list_url' --- var/spack/repos/builtin/packages/libdrm/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/libdrm/package.py b/var/spack/repos/builtin/packages/libdrm/package.py index 750d3361d96..781e7928846 100644 --- a/var/spack/repos/builtin/packages/libdrm/package.py +++ b/var/spack/repos/builtin/packages/libdrm/package.py @@ -34,6 +34,7 @@ class Libdrm(Package): homepage = "http://dri.freedesktop.org/libdrm/" url = "http://dri.freedesktop.org/libdrm/libdrm-2.4.59.tar.gz" + version('2.4.75', '743c16109d91a2539dfc9cc56130d695') version('2.4.70', 'a8c275bce5f3d71a5ca25e8fb60df084') version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6') version('2.4.33', '86e4e3debe7087d5404461e0032231c8') From e5f5e98fc4961be3ab731add187072021be2f9e3 Mon Sep 17 00:00:00 2001 From: Nils Deppe Date: Fri, 26 May 2017 08:46:11 -0400 Subject: [PATCH 04/31] Add master as install option for yaml-cpp (#4364) --- var/spack/repos/builtin/packages/yaml-cpp/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/yaml-cpp/package.py b/var/spack/repos/builtin/packages/yaml-cpp/package.py index e600d470a95..cc22b3420d3 100644 --- a/var/spack/repos/builtin/packages/yaml-cpp/package.py +++ b/var/spack/repos/builtin/packages/yaml-cpp/package.py @@ -32,6 +32,7 @@ class YamlCpp(CMakePackage): url = "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.tar.gz" version('0.5.3', '4e47733d98266e46a1a73ae0a72954eb') + version('develop', git='https://github.com/jbeder/yaml-cpp', branch='master') variant('shared', default=True, description='Enable build of shared libraries') From 71cc4e2ad1f413be1abde48e7de0df1328e0e37d Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Fri, 26 May 2017 08:46:14 -0700 Subject: [PATCH 05/31] Add info for jdk@7u80 (not downloadable) (#4363) * Add info for jdk@7u80 (not downloadable) Add version info for jdk@7u80. Oracle does't seem to be distributing it any longer so there's no reasonable URL to provide, but for those of us who already have the tarball this is useful. * Flake8 cleanup --- var/spack/repos/builtin/packages/jdk/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index 6651ab02bce..02c44e9337f 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -54,6 +54,10 @@ class Jdk(Package): version('8u66', '88f31f3d642c3287134297b8c10e61bf', url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz", curl_options=curl_options) + # The 7u80 tarball is not readily available from Oracle. If you have + # the tarball, add it to your mirror as mirror/jdk/jdk-7u80.tar.gz and + # away you go. + version('7u80', '6152f8a7561acf795ca4701daa10a965') def install(self, spec, prefix): distutils.dir_util.copy_tree(".", prefix) From f38d250e508ef933a6f0bf1e0e5be89c23e20559 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 26 May 2017 13:31:04 -0400 Subject: [PATCH 06/31] gpg: add 'spack gpg subcommand (#3845) - Add a `spack gpg` subcommand in anticipation of signed binaries. - GPG keys are stored in var/spack/gpg, and the spack gpg command manages them. - Docs are included on the command. --- .travis.yml | 2 + lib/spack/docs/basic_usage.rst | 64 +++++++++ lib/spack/docs/getting_started.rst | 1 + lib/spack/spack/__init__.py | 7 + lib/spack/spack/cmd/gpg.py | 168 ++++++++++++++++++++++ lib/spack/spack/test/cmd/gpg.py | 181 ++++++++++++++++++++++++ lib/spack/spack/util/gpg.py | 120 ++++++++++++++++ var/spack/gpg.mock/README.md | 3 + var/spack/gpg.mock/data/content.txt | 1 + var/spack/gpg.mock/data/content.txt.asc | 17 +++ var/spack/gpg.mock/keys/external.key | 30 ++++ var/spack/gpg/README.md | 5 + 12 files changed, 599 insertions(+) create mode 100644 lib/spack/spack/cmd/gpg.py create mode 100644 lib/spack/spack/test/cmd/gpg.py create mode 100644 lib/spack/spack/util/gpg.py create mode 100644 var/spack/gpg.mock/README.md create mode 100644 var/spack/gpg.mock/data/content.txt create mode 100644 var/spack/gpg.mock/data/content.txt.asc create mode 100644 var/spack/gpg.mock/keys/external.key create mode 100644 var/spack/gpg/README.md diff --git a/.travis.yml b/.travis.yml index c89bcf1275e..ef3ec362c41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,12 +71,14 @@ addons: - gfortran - mercurial - graphviz + - gnupg2 # Work around Travis's lack of support for Python on OSX before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew ls --versions python > /dev/null || brew install python; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew ls --versions gcc > /dev/null || brew install gcc; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew ls --versions gnupg2 > /dev/null || brew install gnupg2; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then virtualenv venv; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source venv/bin/activate; fi diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index f25247579b1..6eba26a4b5b 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -276,6 +276,70 @@ Seeing installed packages We know that ``spack list`` shows you the names of available packages, but how do you figure out which are already installed? +.. _cmd-spack-gpg: + +^^^^^^^^^^^^^ +``spack gpg`` +^^^^^^^^^^^^^ + +Spack has support for signing and verifying packages using GPG keys. A +separate keyring is used for Spack, so any keys available in the user's home +directory are not used. + +^^^^^^^^^^^^^^^^^^ +``spack gpg init`` +^^^^^^^^^^^^^^^^^^ + +When Spack is first installed, its keyring is empty. Keys stored in +:file:`var/spack/gpg` are the default keys for a Spack installation. These +keys may be imported by running ``spack gpg init``. This will import the +default keys into the keyring as trusted keys. + +------------- +Trusting keys +------------- + +Additional keys may be added to the keyring using +``spack gpg trust ``. Once a key is trusted, packages signed by the +owner of they key may be installed. + +------------- +Creating keys +------------- + +You may also create your own key so that you may sign your own packages using +``spack gpg create ``. By default, the key has no expiration, +but it may be set with the ``--expires `` flag (see the ``gnupg2`` +documentation for accepted date formats). It is also recommended to add a +comment as to the use of the key using the ``--comment `` flag. The +public half of the key can also be exported for sharing with others so that +they may use packages you have signed using the ``--export `` flag. +Secret keys may also be later exported using the +``spack gpg export [...]`` command. + +------------ +Listing keys +------------ + +In order to list the keys available in the keyring, the +``spack gpg list`` command will list trusted keys with the ``--trusted`` flag +and keys available for signing using ``--signing``. If you would like to +remove keys from your keyring, ``spack gpg untrust ``. Key IDs can be +email addresses, names, or (best) fingerprints. + +------------------------------ +Signing and Verifying Packages +------------------------------ + +In order to sign a package, ``spack gpg sign `` should be used. By +default, the signature will be written to ``.asc``, but that may be +changed by using the ``--output `` flag. If there is only one signing +key available, it will be used, but if there is more than one, the key to use +must be specified using the ``--key `` flag. The ``--clearsign`` flag +may also be used to create a signed file which contains the contents, but it +is not recommended. Signed packages may be verified by using +``spack gpg verify ``. + .. _cmd-spack-find: ^^^^^^^^^^^^^^ diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst index 971d42cea08..75c2f662b5b 100644 --- a/lib/spack/docs/getting_started.rst +++ b/lib/spack/docs/getting_started.rst @@ -14,6 +14,7 @@ before Spack is run: 1. Python 2 (2.6 or 2.7) or 3 (3.3 - 3.6) 2. A C/C++ compiler 3. The ``git`` and ``curl`` commands. +4. If using the ``gpg`` subcommand, ``gnupg2`` is required. These requirements can be easily installed on most modern Linux systems; on Macintosh, XCode is required. Spack is designed to run on HPC diff --git a/lib/spack/spack/__init__.py b/lib/spack/spack/__init__.py index 27283d10a96..057c54d6650 100644 --- a/lib/spack/spack/__init__.py +++ b/lib/spack/spack/__init__.py @@ -68,6 +68,13 @@ etc_path = join_path(prefix, "etc") +# GPG paths. +gpg_keys_path = join_path(var_path, "gpg") +mock_gpg_data_path = join_path(var_path, "gpg.mock", "data") +mock_gpg_keys_path = join_path(var_path, "gpg.mock", "keys") +gpg_path = join_path(opt_path, "spack", "gpg") + + #----------------------------------------------------------------------------- # Initial imports (only for use in this file -- see __all__ below.) #----------------------------------------------------------------------------- diff --git a/lib/spack/spack/cmd/gpg.py b/lib/spack/spack/cmd/gpg.py new file mode 100644 index 00000000000..ff511b65208 --- /dev/null +++ b/lib/spack/spack/cmd/gpg.py @@ -0,0 +1,168 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack.util.gpg import Gpg +import spack +import os + +description = "handle GPG actions for spack" +section = "developer" +level = "long" + + +def setup_parser(subparser): + setup_parser.parser = subparser + subparsers = subparser.add_subparsers(help='GPG sub-commands') + + verify = subparsers.add_parser('verify') + verify.add_argument('package', type=str, + help='the package to verify') + verify.add_argument('signature', type=str, nargs='?', + help='the signature file') + verify.set_defaults(func=gpg_verify) + + trust = subparsers.add_parser('trust') + trust.add_argument('keyfile', type=str, + help='add a key to the trust store') + trust.set_defaults(func=gpg_trust) + + untrust = subparsers.add_parser('untrust') + untrust.add_argument('--signing', action='store_true', + help='allow untrusting signing keys') + untrust.add_argument('keys', nargs='+', type=str, + help='remove keys from the trust store') + untrust.set_defaults(func=gpg_untrust) + + sign = subparsers.add_parser('sign') + sign.add_argument('--output', metavar='DEST', type=str, + help='the directory to place signatures') + sign.add_argument('--key', metavar='KEY', type=str, + help='the key to use for signing') + sign.add_argument('--clearsign', action='store_true', + help='if specified, create a clearsign signature') + sign.add_argument('package', type=str, + help='the package to sign') + sign.set_defaults(func=gpg_sign) + + create = subparsers.add_parser('create') + create.add_argument('name', type=str, + help='the name to use for the new key') + create.add_argument('email', type=str, + help='the email address to use for the new key') + create.add_argument('--comment', metavar='COMMENT', type=str, + default='GPG created for Spack', + help='a description for the intended use of the key') + create.add_argument('--expires', metavar='EXPIRATION', type=str, + default='0', help='when the key should expire') + create.add_argument('--export', metavar='DEST', type=str, + help='export the public key to a file') + create.set_defaults(func=gpg_create) + + list = subparsers.add_parser('list') + list.add_argument('--trusted', action='store_true', + help='list trusted keys') + list.add_argument('--signing', action='store_true', + help='list keys which may be used for signing') + list.set_defaults(func=gpg_list) + + init = subparsers.add_parser('init') + init.set_defaults(func=gpg_init) + init.set_defaults(import_dir=spack.gpg_keys_path) + + export = subparsers.add_parser('export') + export.add_argument('location', type=str, + help='where to export keys') + export.add_argument('keys', nargs='*', + help='the keys to export; ' + 'all secret keys if unspecified') + export.set_defaults(func=gpg_export) + + +def gpg_create(args): + if args.export: + old_sec_keys = Gpg.signing_keys() + Gpg.create(name=args.name, email=args.email, + comment=args.comment, expires=args.expires) + if args.export: + new_sec_keys = set(Gpg.signing_keys()) + new_keys = new_sec_keys.difference(old_sec_keys) + Gpg.export_keys(args.export, *new_keys) + + +def gpg_export(args): + keys = args.keys + if not keys: + keys = Gpg.signing_keys() + Gpg.export_keys(args.location, *keys) + + +def gpg_list(args): + Gpg.list(args.trusted, args.signing) + + +def gpg_sign(args): + key = args.key + if key is None: + keys = Gpg.signing_keys() + if len(keys) == 1: + key = keys[0] + elif not keys: + raise RuntimeError('no signing keys are available') + else: + raise RuntimeError('multiple signing keys are available; ' + 'please choose one') + output = args.output + if not output: + output = args.package + '.asc' + # TODO: Support the package format Spack creates. + Gpg.sign(key, args.package, output, args.clearsign) + + +def gpg_trust(args): + Gpg.trust(args.keyfile) + + +def gpg_init(args): + for root, _, filenames in os.walk(args.import_dir): + for filename in filenames: + if not filename.endswith('.key'): + continue + Gpg.trust(os.path.join(root, filename)) + + +def gpg_untrust(args): + Gpg.untrust(args.signing, *args.keys) + + +def gpg_verify(args): + # TODO: Support the package format Spack creates. + signature = args.signature + if signature is None: + signature = args.package + '.asc' + Gpg.verify(signature, args.package) + + +def gpg(parser, args): + if args.func: + args.func(args) diff --git a/lib/spack/spack/test/cmd/gpg.py b/lib/spack/spack/test/cmd/gpg.py new file mode 100644 index 00000000000..cc6d57d91e3 --- /dev/null +++ b/lib/spack/spack/test/cmd/gpg.py @@ -0,0 +1,181 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +import argparse +import os.path + +import pytest +import spack +import spack.cmd.gpg as gpg +import spack.util.gpg as gpg_util +from spack.util.executable import ProcessError + + +@pytest.fixture(scope='function') +def testing_gpg_directory(tmpdir): + old_gpg_path = gpg_util.GNUPGHOME + gpg_util.GNUPGHOME = str(tmpdir.join('gpg')) + yield + gpg_util.GNUPGHOME = old_gpg_path + + +def has_gnupg2(): + try: + gpg_util.Gpg.gpg()('--version') + return True + except Exception: + return False + + +@pytest.mark.usefixtures('testing_gpg_directory') +@pytest.mark.skipif(not has_gnupg2(), + reason='These tests require gnupg2') +def test_gpg(tmpdir): + parser = argparse.ArgumentParser() + gpg.setup_parser(parser) + + # Verify a file with an empty keyring. + args = parser.parse_args(['verify', os.path.join( + spack.mock_gpg_data_path, 'content.txt')]) + with pytest.raises(ProcessError): + gpg.gpg(parser, args) + + # Import the default key. + args = parser.parse_args(['init']) + args.import_dir = spack.mock_gpg_keys_path + gpg.gpg(parser, args) + + # List the keys. + # TODO: Test the output here. + args = parser.parse_args(['list', '--trusted']) + gpg.gpg(parser, args) + args = parser.parse_args(['list', '--signing']) + gpg.gpg(parser, args) + + # Verify the file now that the key has been trusted. + args = parser.parse_args(['verify', os.path.join( + spack.mock_gpg_data_path, 'content.txt')]) + gpg.gpg(parser, args) + + # Untrust the default key. + args = parser.parse_args(['untrust', 'Spack testing']) + gpg.gpg(parser, args) + + # Now that the key is untrusted, verification should fail. + args = parser.parse_args(['verify', os.path.join( + spack.mock_gpg_data_path, 'content.txt')]) + with pytest.raises(ProcessError): + gpg.gpg(parser, args) + + # Create a file to test signing. + test_path = tmpdir.join('to-sign.txt') + with open(str(test_path), 'w+') as fout: + fout.write('Test content for signing.\n') + + # Signing without a private key should fail. + args = parser.parse_args(['sign', str(test_path)]) + with pytest.raises(RuntimeError) as exc_info: + gpg.gpg(parser, args) + assert exc_info.value.args[0] == 'no signing keys are available' + + # Create a key for use in the tests. + keypath = tmpdir.join('testing-1.key') + args = parser.parse_args(['create', + '--comment', 'Spack testing key', + '--export', str(keypath), + 'Spack testing 1', + 'spack@googlegroups.com']) + gpg.gpg(parser, args) + keyfp = gpg_util.Gpg.signing_keys()[0] + + # List the keys. + # TODO: Test the output here. + args = parser.parse_args(['list', '--trusted']) + gpg.gpg(parser, args) + args = parser.parse_args(['list', '--signing']) + gpg.gpg(parser, args) + + # Signing with the default (only) key. + args = parser.parse_args(['sign', str(test_path)]) + gpg.gpg(parser, args) + + # Verify the file we just verified. + args = parser.parse_args(['verify', str(test_path)]) + gpg.gpg(parser, args) + + # Export the key for future use. + export_path = tmpdir.join('export.testing.key') + args = parser.parse_args(['export', str(export_path)]) + gpg.gpg(parser, args) + + # Create a second key for use in the tests. + args = parser.parse_args(['create', + '--comment', 'Spack testing key', + 'Spack testing 2', + 'spack@googlegroups.com']) + gpg.gpg(parser, args) + + # List the keys. + # TODO: Test the output here. + args = parser.parse_args(['list', '--trusted']) + gpg.gpg(parser, args) + args = parser.parse_args(['list', '--signing']) + gpg.gpg(parser, args) + + test_path = tmpdir.join('to-sign-2.txt') + with open(str(test_path), 'w+') as fout: + fout.write('Test content for signing.\n') + + # Signing with multiple signing keys is ambiguous. + args = parser.parse_args(['sign', str(test_path)]) + with pytest.raises(RuntimeError) as exc_info: + gpg.gpg(parser, args) + assert exc_info.value.args[0] == \ + 'multiple signing keys are available; please choose one' + + # Signing with a specified key. + args = parser.parse_args(['sign', '--key', keyfp, str(test_path)]) + gpg.gpg(parser, args) + + # Untrusting signing keys needs a flag. + args = parser.parse_args(['untrust', 'Spack testing 1']) + with pytest.raises(ProcessError): + gpg.gpg(parser, args) + + # Untrust the key we created. + args = parser.parse_args(['untrust', '--signing', keyfp]) + gpg.gpg(parser, args) + + # Verification should now fail. + args = parser.parse_args(['verify', str(test_path)]) + with pytest.raises(ProcessError): + gpg.gpg(parser, args) + + # Trust the exported key. + args = parser.parse_args(['trust', str(export_path)]) + gpg.gpg(parser, args) + + # Verification should now succeed again. + args = parser.parse_args(['verify', str(test_path)]) + gpg.gpg(parser, args) diff --git a/lib/spack/spack/util/gpg.py b/lib/spack/spack/util/gpg.py new file mode 100644 index 00000000000..ccaf33519b8 --- /dev/null +++ b/lib/spack/spack/util/gpg.py @@ -0,0 +1,120 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## + +import os + +import spack +from spack.util.executable import Executable + + +GNUPGHOME = spack.gpg_path + + +class Gpg(object): + @staticmethod + def gpg(): + # TODO: Support loading up a GPG environment from a built gpg. + gpg = Executable('gpg2') + if not os.path.exists(GNUPGHOME): + os.makedirs(GNUPGHOME) + os.chmod(GNUPGHOME, 0o700) + gpg.add_default_env('GNUPGHOME', GNUPGHOME) + return gpg + + @classmethod + def create(cls, **kwargs): + r, w = os.pipe() + r = os.fdopen(r, 'r') + w = os.fdopen(w, 'w') + w.write(''' + Key-Type: rsa + Key-Length: 4096 + Key-Usage: sign + Name-Real: %(name)s + Name-Email: %(email)s + Name-Comment: %(comment)s + Expire-Date: %(expires)s + %%no-protection + %%commit + ''' % kwargs) + w.close() + cls.gpg()('--gen-key', '--batch', input=r) + r.close() + + @classmethod + def signing_keys(cls): + keys = [] + output = cls.gpg()('--list-secret-keys', '--with-colons', + '--fingerprint', output=str) + for line in output.split('\n'): + if line.startswith('fpr'): + keys.append(line.split(':')[9]) + return keys + + @classmethod + def export_keys(cls, location, *keys): + cls.gpg()('--armor', '--export', '--output', location, *keys) + + @classmethod + def trust(cls, keyfile): + cls.gpg()('--import', keyfile) + + @classmethod + def untrust(cls, signing, *keys): + args = [ + '--yes', + '--batch', + ] + if signing: + signing_args = args + ['--delete-secret-keys'] + list(keys) + cls.gpg()(*signing_args) + args.append('--delete-keys') + args.extend(keys) + cls.gpg()(*args) + + @classmethod + def sign(cls, key, file, output, clearsign=False): + args = [ + '--armor', + '--default-key', key, + '--output', output, + file, + ] + if clearsign: + args.insert(0, '--clearsign') + else: + args.insert(0, '--detach-sign') + cls.gpg()(*args) + + @classmethod + def verify(cls, signature, file): + cls.gpg()('--verify', signature, file) + + @classmethod + def list(cls, trusted, signing): + if trusted: + cls.gpg()('--list-public-keys') + if signing: + cls.gpg()('--list-secret-keys') diff --git a/var/spack/gpg.mock/README.md b/var/spack/gpg.mock/README.md new file mode 100644 index 00000000000..95215a86347 --- /dev/null +++ b/var/spack/gpg.mock/README.md @@ -0,0 +1,3 @@ +# Mock GPG directory + +This directory contains keys and data used in the testing Spack. diff --git a/var/spack/gpg.mock/data/content.txt b/var/spack/gpg.mock/data/content.txt new file mode 100644 index 00000000000..6ab0f567cfb --- /dev/null +++ b/var/spack/gpg.mock/data/content.txt @@ -0,0 +1 @@ +This file has a signature signed by an external key. diff --git a/var/spack/gpg.mock/data/content.txt.asc b/var/spack/gpg.mock/data/content.txt.asc new file mode 100644 index 00000000000..75931561133 --- /dev/null +++ b/var/spack/gpg.mock/data/content.txt.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCAAGBQJZELiKAAoJENygJBhApdriPvgP/0shBTmx4jg6QaI0zyie8a+R ++L/o9iIV4MqvBI5g+Ti+nktoCSxSOPOYFW4af740A7/43wIML9LK+gIhx/QbCrMb +bNqzyIry9/L6PK1cCuXvd10CT+MCF1P0hdaMtKihdBYB3J8f5y1i30z+a8YWsRsX +tPMVF/HunlpAkSWIpjmbJzFPT1R/UiBHl4VJ+mM3NNZYNIq8ZhKUiXwlQkZ8R8zg +M0IEFkwfFtp7JxnhG7jR0k63cNm3KSocAJpwENy46RKGsAvwvqTzRh4T2MlmQIjH +TC1MA8alJvtSdBHpkKffSU8jLewKHe1H48nc9NifMy04Ni8fSlGZe14Oe7Krqla0 +qWs+XHrGCmSleyiRUQes1MKQ7NhumKEoEaU+q0/c+lUDILZp1TlfvTPg2fzng4M/ +YF6+f+wqM+xY6z1/IloOMHis5oALjARSO88ldrLU4DQp/6jTKJO/+I4uWhMnPkMW ++a3GLWl1CShReHKbWZTLFtdQATZXA8M6wQ8FAsLOmRLb0AlEQ28A8fHrBCCdU2xj +tSG++U1ZUo64cMYQmIMsvIApnkTh7qCkDjaVBP1to3qc83YHncxorydz9ERpuDvP +d1IOHlJyUSM4+sLkCPvH9QyTaJn/x7D/VraznEiptGON7G6G9AgyAzIgYamm1Kwh +UDhbQDFDhLLvUSDGzO3l +=kwo9 +-----END PGP SIGNATURE----- diff --git a/var/spack/gpg.mock/keys/external.key b/var/spack/gpg.mock/keys/external.key new file mode 100644 index 00000000000..d08c90ea7f3 --- /dev/null +++ b/var/spack/gpg.mock/keys/external.key @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2 + +mQINBFkQuFIBEAC7DiUM7jQ01kaGX+4nguzVeYquBRYoEUiObl5UIVSavMn4I7Oy +aytG+qR26tUpunjEB6ftIQMJSyPKueclUJBaQ9lzQ3WpFC3ItpBNkMxHpiqPa9DX +ddMk2QtJt4TlCWJEdnhR/92mMF+vf7B5/OvFvKOi0P+AwzBHC8IKTxml/UosmeVI +Cs69FzRDXyqQxQAkATmuDmHXPaC6RkDmpVRe3ej+Kr+Xu4vcb/EBHg/vcZkFdSmi +hyOj21/8LQZzcwTg4TSgHzKqbjPtIEQM3NNksvcFYlq2X0ad4cBcxa1Hj5xV8oS/ +bdYOFSdsh3QRROcEeKYVQZhvCR12qS93P4b2egbamBxCQK0Sn6QPIjlR6+Ya2/6p +/hHddF+YVA6HJ22QZjaORf9lImYfYMs1ka2GtgkczOeaFEfcJ96nIa8Qb1jcrOon +/3k/l+Ae09HRCcGB2DgKXw7S+CXKt46Oadp3bIDAyceotGnrG3cVA6A9Lwqy6U/5 +ywry8ETu3wlIR3EAIwM0a/3xCPg3cC/bt9rSqsFcmXyxltGI2CBTWcTqcyjW4VAw +nVI8otBd4yNdimhpxLfx6AaMjA+D+OSltnAZUrp1fSFVhWLpTxLbcTv+HJ/g4U+x ++PAsQ79Hzmzvy/8nOvIprGzY4LCmBPbLUB47Yu761HhYQhkuJiYP1R/GzQARAQAB +tDpTcGFjayB0ZXN0aW5nIChTcGFjayB0ZXN0aW5nIGtleSkgPHNwYWNrQGdvb2ds +ZWdyb3Vwcy5jb20+iQI3BBMBCAAhBQJZELhSAhsDBQsJCAcCBhUICQoLAgQWAgMB +Ah4BAheAAAoJENygJBhApdriOnUP/iLC1ZxyBP3STSVgBBTS1L6FnRAc9ya6eXNT +EwLLoSL0I0srs0sThmhyW38ZamsXYDhggaetShxemcO0BoNAii/oNK9yQoXNF4f6 +7wg2ZxCDuDjp/3VsbiI+kNlH2kj1tQ/M53ak9nYhmwLJFfKzjQBWJiyTwYZwO3MB +QvXBvLIKj6IDS20o+7jbOq8F243vo5/uNHc/6C9eC3i4jzXWVlln2+iN/e5sVt+X +ZiggLK2Goj5CZ7ZjZQvdoH4wKbSPLBg0Lh5FYSih9p0wx0UTEoi0jPqFUDw81duz +IyxjbGASSaUxoz16C2U/olPEAAXeBe4266jRQwTrn+sEIX5FD+RGoryXQ97pV5up +I9wb2anVAMHOf20iYep3vYTjnFG/81ykODm8+I4D/Jj0EEe1E2b0D+7RQ9xKNYxC +fDgY3isXBFzmS6O4h8N27P06yfzQX+zvjPrrHRB7ka2pmDT3M421p2wN0n9aCq1J +8+M5UdpF98A38oosyE53KcItoCUFLgEP3KrWPwvpDUC2sNQAOFiHeitzc+v1iwmD +RScdefCQ8qc2JJdCqMG6M0tlFy6Tw1o0eBYOhhDGa0rq/PQ4NewR2dj+yDXXBGJy +ElR0VChqniMCyd2Q4SDPnhcVrWPTYSKL1MpsL0lXED8TGOdoAHHmQNU8MWhqmdBy +zcWArNUY +=yVqw +-----END PGP PUBLIC KEY BLOCK----- diff --git a/var/spack/gpg/README.md b/var/spack/gpg/README.md new file mode 100644 index 00000000000..122d24f8412 --- /dev/null +++ b/var/spack/gpg/README.md @@ -0,0 +1,5 @@ +# GPG Keys + +This directory contains keys that should be trusted by this installation of +Spack. They are imported when running `spack gpg init`, but may also be +imported manually with `spack gpg trust path/to/key`. From 6f0ac9d54cc8494cdb4a002c7a203622dfe656eb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 26 May 2017 16:37:06 -0500 Subject: [PATCH 07/31] Add --configure-args/vars support to RPackage (#4289) * Add --configure-args/vars support to RPackage * Docstring formatting change --- lib/spack/spack/build_systems/r.py | 36 ++++++++++++++++--- lib/spack/spack/cmd/create.py | 6 +++- .../repos/builtin/packages/r-rmpi/package.py | 33 ++++++++++------- 3 files changed, 57 insertions(+), 18 deletions(-) diff --git a/lib/spack/spack/build_systems/r.py b/lib/spack/spack/build_systems/r.py index 618ba398e17..a659f75b986 100644 --- a/lib/spack/spack/build_systems/r.py +++ b/lib/spack/spack/build_systems/r.py @@ -30,7 +30,10 @@ class RPackage(PackageBase): - """Specialized class for packages that are built using R + """Specialized class for packages that are built using R. + + For more information on the R build system, see: + https://stat.ethz.ch/R-manual/R-devel/library/utils/html/INSTALL.html This class provides a single phase that can be overridden: @@ -49,12 +52,37 @@ class RPackage(PackageBase): depends_on('r', type=('build', 'run')) + def configure_args(self, spec, prefix): + """Arguments to pass to install via ``--configure-args``.""" + return [] + + def configure_vars(self, spec, prefix): + """Arguments to pass to install via ``--configure-vars``.""" + return [] + def install(self, spec, prefix): """Installs an R package.""" - inspect.getmodule(self).R( - 'CMD', 'INSTALL', + + config_args = self.configure_args(spec, prefix) + config_vars = self.configure_vars(spec, prefix) + + args = [ + 'CMD', + 'INSTALL' + ] + + if config_args: + args.append('--configure-args={0}'.format(' '.join(config_args))) + + if config_vars: + args.append('--configure-vars={0}'.format(' '.join(config_vars))) + + args.extend([ '--library={0}'.format(self.module.r_lib_dir), - self.stage.source_path) + self.stage.source_path + ]) + + inspect.getmodule(self).R(*args) # Check that self.prefix is there after installation run_after('install')(PackageBase.sanity_check_prefix) diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index 89ba050a538..648400e41e3 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -265,7 +265,11 @@ class RPackageTemplate(PackageTemplate): # depends_on('r-foo', type=('build', 'run'))""" body = """\ - # FIXME: Override install() if necessary.""" + def configure_args(self, spec, prefix): + # FIXME: Add arguments to pass to install via --configure-args + # FIXME: If not needed delete this function + args = [] + return args""" def __init__(self, name, *args): # If the user provided `--name r-rcpp`, don't rename it r-r-rcpp diff --git a/var/spack/repos/builtin/packages/r-rmpi/package.py b/var/spack/repos/builtin/packages/r-rmpi/package.py index 7b955545d8f..4ef46791ec1 100644 --- a/var/spack/repos/builtin/packages/r-rmpi/package.py +++ b/var/spack/repos/builtin/packages/r-rmpi/package.py @@ -38,18 +38,25 @@ class RRmpi(RPackage): depends_on('mpi') depends_on('r@2.15.1:') - def install(self, spec, prefix): - if 'mpich' in spec: - Rmpi_type = 'MPICH' - elif 'mvapich' in spec: - Rmpi_type = 'MVAPICH' - else: + # The following MPI types are not supported + conflicts('^intel-mpi') + conflicts('^intel-parallel-studio') + conflicts('^mvapich2') + conflicts('^spectrum-mpi') + + def configure_args(self, spec, prefix): + mpi_name = spec['mpi'].name + + # The type of MPI. Supported values are: + # OPENMPI, LAM, MPICH, MPICH2, or CRAY + if mpi_name == 'openmpi': Rmpi_type = 'OPENMPI' + elif mpi_name == 'mpich': + Rmpi_type = 'MPICH2' + else: + raise InstallError('Unsupported MPI type') - my_mpi = spec['mpi'] - - R('CMD', 'INSTALL', - '--configure-args=--with-Rmpi-type=%s' % Rmpi_type + - ' --with-mpi=%s' % my_mpi.prefix, - '--library={0}'.format(self.module.r_lib_dir), - self.stage.source_path) + return [ + '--with-Rmpi-type={0}'.format(Rmpi_type), + '--with-mpi={0}'.format(spec['mpi'].prefix), + ] From d3a82ce63215c048358650c55feeaecf5625bbf6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 26 May 2017 22:05:54 -0500 Subject: [PATCH 08/31] Fix typo in mod_to_class docstring (#4371) --- lib/spack/spack/util/naming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/util/naming.py b/lib/spack/spack/util/naming.py index 18142bd83f1..e70b0a6ce05 100644 --- a/lib/spack/spack/util/naming.py +++ b/lib/spack/spack/util/naming.py @@ -57,7 +57,7 @@ def mod_to_class(mod_name): * Class names use the CapWords convention. Regular source code follows these convetions. Spack is a bit - more liberal with its Package names nad Compiler names: + more liberal with its Package names and Compiler names: * They can contain '-' as well as '_', but cannot start with '-'. * They can start with numbers, e.g. "3proxy". From e7ad79fbed69555704857322063ad456eef6c632 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 26 May 2017 22:06:24 -0500 Subject: [PATCH 09/31] Add latest version of NCO (#4370) --- var/spack/repos/builtin/packages/nco/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/nco/package.py b/var/spack/repos/builtin/packages/nco/package.py index 7e52380f626..aeccee7a74f 100644 --- a/var/spack/repos/builtin/packages/nco/package.py +++ b/var/spack/repos/builtin/packages/nco/package.py @@ -30,8 +30,9 @@ class Nco(AutotoolsPackage): netCDF-accessible formats""" homepage = "http://nco.sourceforge.net/" - url = "https://github.com/nco/nco/archive/4.6.6.tar.gz" + url = "https://github.com/nco/nco/archive/4.6.7.tar.gz" + version('4.6.7', 'b04c92aa715d3fad3ebebd1fd178ce32') version('4.6.6', 'df6fa47aaf6e41adfc0631912a7a341f') version('4.6.5', '2afd34a6bb5ff6c7ed39cf40c917b6e4') version('4.6.4', '22f4e779d0011a9c0db90fda416c8e45') From a9feeefdb93c7766d02e264bbdd7f070c2d6ec83 Mon Sep 17 00:00:00 2001 From: eklee15 Date: Fri, 26 May 2017 23:06:55 -0400 Subject: [PATCH 10/31] Added pgi support for mumps (#4369) --- var/spack/repos/builtin/packages/mumps/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/mumps/package.py b/var/spack/repos/builtin/packages/mumps/package.py index c5bd783f393..f28941fda37 100644 --- a/var/spack/repos/builtin/packages/mumps/package.py +++ b/var/spack/repos/builtin/packages/mumps/package.py @@ -178,8 +178,8 @@ def write_makefile_inc(self): # TODO: change the value to the correct one according to the # compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER - if self.compiler.name == 'intel': - # Intel Fortran compiler provides the main() function so + if self.compiler.name == 'intel' or self.compiler.name == 'pgi': + # Intel & PGI Fortran compiler provides the main() function so # C examples linked with the Fortran compiler require a # hack defined by _DMAIN_COMP (see examples/c_example.c) makefile_conf.append("CDEFS = -DAdd_ -DMAIN_COMP") From c0fff6722dadfa7ef576d3bcc815f98ce33a7d03 Mon Sep 17 00:00:00 2001 From: eklee15 Date: Fri, 26 May 2017 23:07:24 -0400 Subject: [PATCH 11/31] added -c11 flag for pgi compiler for TSL (#4367) --- var/spack/repos/builtin/packages/parmetis/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/parmetis/package.py b/var/spack/repos/builtin/packages/parmetis/package.py index b07c796dd76..c66829f94e4 100644 --- a/var/spack/repos/builtin/packages/parmetis/package.py +++ b/var/spack/repos/builtin/packages/parmetis/package.py @@ -70,7 +70,9 @@ def install(self, spec, prefix): '-DGKLIB_PATH:PATH=%s/GKlib' % spec['metis'].prefix.include, '-DMETIS_PATH:PATH=%s' % spec['metis'].prefix, '-DCMAKE_C_COMPILER:STRING=%s' % spec['mpi'].mpicc, - '-DCMAKE_CXX_COMPILER:STRING=%s' % spec['mpi'].mpicxx + '-DCMAKE_CXX_COMPILER:STRING=%s' % spec['mpi'].mpicxx, + '-DCMAKE_C_FLAGS:STRING=%s' % ( + '-c11' if '%pgi' in spec else ''), ]) if '+shared' in spec: From 248fc92a459d8587dc3b61a98642b945d8b98f7c Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Fri, 26 May 2017 20:08:00 -0700 Subject: [PATCH 12/31] Fix bwa url's (#4366) * Fix bwa url's Work around varying github URLs. See #4365 for details. * Restore main url entry @adamjstewart pointed out that the package still needs a main url so that `spack versions` works. --- var/spack/repos/builtin/packages/bwa/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/bwa/package.py b/var/spack/repos/builtin/packages/bwa/package.py index 8b7f33aeaa9..6b326ae6fe5 100644 --- a/var/spack/repos/builtin/packages/bwa/package.py +++ b/var/spack/repos/builtin/packages/bwa/package.py @@ -31,7 +31,8 @@ class Bwa(Package): homepage = "http://github.com/lh3/bwa" url = "https://github.com/lh3/bwa/releases/download/v0.7.15/bwa-0.7.15.tar.bz2" - version('0.7.15', 'fcf470a46a1dbe2f96a1c5b87c530554') + version('0.7.15', 'fcf470a46a1dbe2f96a1c5b87c530554', + url="https://github.com/lh3/bwa/releases/download/v0.7.15/bwa-0.7.15.tar.bz2") version('0.7.12', 'e24a587baaad411d5da89516ad7a261a', url='https://github.com/lh3/bwa/archive/0.7.12.tar.gz') From 1d80a879960191ad82cb8d78b58ef58d04537b2b Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Fri, 26 May 2017 20:08:40 -0700 Subject: [PATCH 13/31] Fix mummerplot when ^perl@5.20: (#4348) * Fix mummerplot when ^perl@5.20: Calling defined() on a hash has been deprecated for ages. It became an error in perl@5.20. If we're building with a perl where it's illegal, we should fix it. * Simplify call to filter_file Treat the first arg to filter_file as a string rather than a regex, so that we don't have to figure out the escapes. * Patch mummerplot for *any* perl version. --- var/spack/repos/builtin/packages/mummer/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/mummer/package.py b/var/spack/repos/builtin/packages/mummer/package.py index 222aab54b79..b8cd61531c7 100644 --- a/var/spack/repos/builtin/packages/mummer/package.py +++ b/var/spack/repos/builtin/packages/mummer/package.py @@ -39,6 +39,14 @@ class Mummer(Package): patch('Makefile.patch') patch('scripts-Makefile.patch') + def patch(self): + """Fix mummerplot's use of defined on hashes (deprecated + since perl@5.10, made illegal in perl@5.20.""" + + kwargs = {'string': True} + filter_file('defined (%', '(%', 'scripts/mummerplot.pl', + **kwargs) + def install(self, spec, prefix): if self.run_tests: make('check') From 1b07d949aeb88c31f7618eaed391a27839f4abb4 Mon Sep 17 00:00:00 2001 From: eklee15 Date: Sat, 27 May 2017 07:49:21 -0400 Subject: [PATCH 14/31] Added pgi support for suite-sparse package (#4340) * Added pgi support for suite-sparse package * Patch modified * added 'CFOPENMP={0}'.format(self.compiler.openmp_flag) for -mp flag --- .../repos/builtin/packages/suite-sparse/package.py | 6 +++++- .../repos/builtin/packages/suite-sparse/pgi.patch | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/suite-sparse/pgi.patch diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index ae2a99e7371..7884e540ba5 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -53,6 +53,9 @@ class SuiteSparse(Package): patch('tbb_453.patch', when='@4.5.3:+tbb') + # This patch removes unsupported flags for pgi compiler + patch('pgi.patch', when='%pgi') + def install(self, spec, prefix): # The build system of SuiteSparse is quite old-fashioned. # It's basically a plain Makefile which include an header @@ -74,7 +77,8 @@ def install(self, spec, prefix): 'CUDA=no', 'CUDA_PATH={0}'.format( spec['cuda'].prefix if '+cuda' in spec else '' - ) + ), + 'CFOPENMP={0}'.format(self.compiler.openmp_flag) ]) if '+pic' in spec: diff --git a/var/spack/repos/builtin/packages/suite-sparse/pgi.patch b/var/spack/repos/builtin/packages/suite-sparse/pgi.patch new file mode 100644 index 00000000000..f615a576747 --- /dev/null +++ b/var/spack/repos/builtin/packages/suite-sparse/pgi.patch @@ -0,0 +1,12 @@ +--- a/SuiteSparse_config/SuiteSparse_config.mk ++++ b/SuiteSparse_config/SuiteSparse_config.mk +@@ -89,7 +89,8 @@ + + # The CF macro is used by SuiteSparse Makefiles as a combination of + # CFLAGS, CPPFLAGS, TARGET_ARCH, and system-dependent settings. +- CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fexceptions -fPIC ++ #CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fexceptions -fPIC ++ CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fPIC + + #--------------------------------------------------------------------------- + # OpenMP is used in CHOLMOD From f9ac965fb9ed251819c80541bb1bd8542c416952 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 27 May 2017 12:51:03 -0500 Subject: [PATCH 15/31] Document known issue with R concretization (#4313) --- lib/spack/docs/known_issues.rst | 40 +++++++++++++++++++ var/spack/repos/builtin/packages/r/package.py | 2 + 2 files changed, 42 insertions(+) diff --git a/lib/spack/docs/known_issues.rst b/lib/spack/docs/known_issues.rst index a68033dba69..2756f596914 100644 --- a/lib/spack/docs/known_issues.rst +++ b/lib/spack/docs/known_issues.rst @@ -37,6 +37,46 @@ A workaround is to explicitly activate the variant related to the dependency: See https://github.com/LLNL/spack/issues/397 for further details. +--------------------------------------------------- +Variants are not properly forwarded to dependencies +--------------------------------------------------- + +**Status:** Expected to be fixed in the next release + +Sometimes, a variant of a package can also affect how its dependencies are +built. For example, in order to build MPI support for a package, it may +require that its dependencies are also built with MPI support. In the +``package.py``, this looks like: + +.. code-block:: python + + depends_on('hdf5~mpi', when='~mpi') + depends_on('hdf5+mpi', when='+mpi') + +Spack handles this situation properly for *immediate* dependencies, and +builds ``hdf5`` with the same variant you used for the package that +depends on it. However, for *indirect* dependencies (dependencies of +dependencies), Spack does not backtrack up the DAG far enough to handle +this. Users commonly run into this situation when trying to build R with +X11 support: + +.. code-block:: console + + $ spack install r+X + ... + ==> Error: Invalid spec: 'cairo@1.14.8%gcc@6.2.1+X arch=linux-fedora25-x86_64 ^bzip2@1.0.6%gcc@6.2.1+shared arch=linux-fedora25-x86_64 ^font-util@1.3.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^fontconfig@2.12.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^freetype@2.7.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^gettext@0.19.8.1%gcc@6.2.1+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-fedora25-x86_64 ^glib@2.53.1%gcc@6.2.1~libmount arch=linux-fedora25-x86_64 ^inputproto@2.3.2%gcc@6.2.1 arch=linux-fedora25-x86_64 ^kbproto@1.0.7%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libffi@3.2.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libpng@1.6.29%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libpthread-stubs@0.4%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libx11@1.6.5%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxau@1.0.8%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxcb@1.12%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxdmcp@1.1.2%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxext@1.3.3%gcc@6.2.1 arch=linux-fedora25-x86_64 ^libxml2@2.9.4%gcc@6.2.1~python arch=linux-fedora25-x86_64 ^libxrender@0.9.10%gcc@6.2.1 arch=linux-fedora25-x86_64 ^ncurses@6.0%gcc@6.2.1~symlinks arch=linux-fedora25-x86_64 ^openssl@1.0.2k%gcc@6.2.1 arch=linux-fedora25-x86_64 ^pcre@8.40%gcc@6.2.1+utf arch=linux-fedora25-x86_64 ^pixman@0.34.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^pkg-config@0.29.2%gcc@6.2.1+internal_glib arch=linux-fedora25-x86_64 ^python@2.7.13%gcc@6.2.1+shared~tk~ucs4 arch=linux-fedora25-x86_64 ^readline@7.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^renderproto@0.11.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^sqlite@3.18.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^tar^util-macros@1.19.1%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xcb-proto@1.12%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xextproto@7.3.0%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xproto@7.0.31%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xtrans@1.3.5%gcc@6.2.1 arch=linux-fedora25-x86_64 ^xz@5.2.3%gcc@6.2.1 arch=linux-fedora25-x86_64 ^zlib@1.2.11%gcc@6.2.1+pic+shared arch=linux-fedora25-x86_64'. + Package cairo requires variant ~X, but spec asked for +X + +A workaround is to explicitly activate the variants of dependencies as well: + +.. code-block:: console + + $ spack install r+X ^cairo+X ^pango+X + +See https://github.com/LLNL/spack/issues/267 and +https://github.com/LLNL/spack/issues/2546 for further details. + + --------------------------------- ``spack extensions`` doesn't work --------------------------------- diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index 4ae8caab238..5c092e30e5e 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -74,6 +74,8 @@ class R(AutotoolsPackage): depends_on('cairo+X', when='+X') depends_on('cairo~X', when='~X') depends_on('pango') + depends_on('pango+X', when='+X') + depends_on('pango~X', when='~X') depends_on('freetype') depends_on('tcl') depends_on('tk') From 50e729173ba49f0c95ae98266caca16b119f481a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 27 May 2017 22:02:25 +0200 Subject: [PATCH 16/31] arpack: add 3.5.0 (#4375) --- var/spack/repos/builtin/packages/arpack-ng/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index ebaeb1da1da..5da29828b29 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -56,6 +56,7 @@ class ArpackNg(Package): homepage = 'https://github.com/opencollab/arpack-ng' url = 'https://github.com/opencollab/arpack-ng/archive/3.3.0.tar.gz' + version('3.5.0', '9762c9ae6d739a9e040f8201b1578874') version('3.4.0', 'ae9ca13f2143a7ea280cb0e2fd4bfae4') version('3.3.0', 'ed3648a23f0a868a43ef44c97a21bad5') From f14041d6c1902ea18d74690374074a8d0d256ffe Mon Sep 17 00:00:00 2001 From: Douglas Duckworth Date: Sat, 27 May 2017 16:02:39 -0400 Subject: [PATCH 17/31] added STAR aligner package (#4368) * added STAR aligner package * fixed flake errors * PATH NOW WORKS * STAR install now works * star install now perfected --- .../repos/builtin/packages/star/package.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/star/package.py diff --git a/var/spack/repos/builtin/packages/star/package.py b/var/spack/repos/builtin/packages/star/package.py new file mode 100644 index 00000000000..87c30733e47 --- /dev/null +++ b/var/spack/repos/builtin/packages/star/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Star(Package): + """STAR is an ultrafast universal RNA-seq aligner.""" + + homepage = "https://github.com/alexdobin/STAR" + url = "https://github.com/alexdobin/STAR/archive/2.5.3a.tar.gz" + + version('2.5.3a', 'baf8d1b62a50482cfa13acb7652dc391') + + def install(self, spec, prefix): + with working_dir('source'): + make('STAR', 'STARlong') + mkdirp(prefix.bin) + install('STAR', prefix.bin) + install('STARlong', prefix.bin) From d0d7768b90674ad200509a7ce71e8f3adb97604e Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 27 May 2017 23:35:05 +0200 Subject: [PATCH 18/31] Petsc and Slepc -- add new versions (#4378) * petsc: add 3.7.6 * slepc: add 3.7.4 * hypre: remove whitespace --- var/spack/repos/builtin/packages/hypre/package.py | 2 +- var/spack/repos/builtin/packages/petsc/package.py | 1 + var/spack/repos/builtin/packages/slepc/package.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 67a636de447..9af1fecd8c0 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -36,7 +36,7 @@ class Hypre(Package): url = "http://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz" version('develop', git='https://github.com/LLNL/hypre', tag='master') - version('xsdk-0.2.0', git='https://github.com/LLNL/hypre', tag='xsdk-0.2.0') + version('xsdk-0.2.0', git='https://github.com/LLNL/hypre', tag='xsdk-0.2.0') version('2.11.2', 'd507943a1a3ce5681c3308e2f3a6dd34') version('2.11.1', '3f02ef8fd679239a6723f60b7f796519') version('2.10.1', 'dc048c4cabb3cd549af72591474ad674') diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 7d41297f32e..c379365dcb7 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -40,6 +40,7 @@ class Petsc(Package): version('develop', git='https://bitbucket.org/petsc/petsc.git', tag='master') version('xsdk-0.2.0', git='https://bitbucket.org/petsc/petsc.git', tag='xsdk-0.2.0') + version('3.7.6', '977aa84b85aa3146c695592cd0a11057') version('3.7.5', 'f00f6e6a3bac39052350dd47194b58a3') version('3.7.4', 'aaf94fa54ef83022c14091f10866eedf') version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34') diff --git a/var/spack/repos/builtin/packages/slepc/package.py b/var/spack/repos/builtin/packages/slepc/package.py index 70db52ba2b7..2e5bd086929 100644 --- a/var/spack/repos/builtin/packages/slepc/package.py +++ b/var/spack/repos/builtin/packages/slepc/package.py @@ -34,6 +34,7 @@ class Slepc(Package): homepage = "http://www.grycap.upv.es/slepc" url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz" + version('3.7.4', '2fb782844e3bc265a8d181c3c3e2632a4ca073111c874c654f1365d33ca2eb8a') version('3.7.3', '3ef9bcc645a10c1779d56b3500472ceb66df692e389d635087d30e7c46424df9') version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2') version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876') From 0b252d540218b2dd8af98c184f30952894479d9a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 27 May 2017 23:35:17 +0200 Subject: [PATCH 19/31] tbb: add 2017.6 (#4377) --- var/spack/repos/builtin/packages/tbb/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/tbb/package.py b/var/spack/repos/builtin/packages/tbb/package.py index a4e15e708b3..518d7a86bd2 100644 --- a/var/spack/repos/builtin/packages/tbb/package.py +++ b/var/spack/repos/builtin/packages/tbb/package.py @@ -36,6 +36,8 @@ class Tbb(Package): # Only version-specific URL's work for TBB # can also use https://github.com/01org/tbb/releases/ + version('2017.6', '5b0909fbb1741724f7a0ce83232f50b166788af0', + url='https://github.com/01org/tbb/archive/2017_U6.tar.gz') version('2017.5', '26f720729d322913912e99d1e4a36bd10625d3ca', url='https://github.com/01org/tbb/archive/2017_U5.tar.gz') version('2017.3', '2c451a5bcf6fc31487b98b4b29651c369874277c', From 87ebb0fc157731ac2a52aeb9ce09ad375ad8103d Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 27 May 2017 23:35:32 +0200 Subject: [PATCH 20/31] oce: add 0.18.1 (#4376) --- var/spack/repos/builtin/packages/oce/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/oce/package.py b/var/spack/repos/builtin/packages/oce/package.py index 950621da40a..840b50f4a8a 100644 --- a/var/spack/repos/builtin/packages/oce/package.py +++ b/var/spack/repos/builtin/packages/oce/package.py @@ -34,6 +34,7 @@ class Oce(Package): homepage = "https://github.com/tpaviot/oce" url = "https://github.com/tpaviot/oce/archive/OCE-0.18.tar.gz" + version('0.18.1', '2a7597f4243ee1f03245aeeb02d00956') version('0.18', '226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993') version('0.17.2', 'bf2226be4cd192606af677cf178088e5') version('0.17.1', '36c67b87093c675698b483454258af91') @@ -59,7 +60,7 @@ class Oce(Package): # reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643 if (platform.system() == "Darwin") and ( '.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12'): - patch('sierra.patch', when='@0.17.2:0.18') + patch('sierra.patch', when='@0.17.2:0.18.0') def install(self, spec, prefix): options = [] From 7ea0e143c5e923b80b0c3fa3db321cc93adf02fd Mon Sep 17 00:00:00 2001 From: Milton Woods Date: Mon, 29 May 2017 02:17:16 +1000 Subject: [PATCH 21/31] python: RPATH on Cray (#4209) * python: ensure that distutils sets valid compiler options for RPATH on cray * python: add cray-rpath patches for python@2.3:3.0.1 and python@3.1: * python: in patch(..., when="@a:b platform=c"), limit b must be specified * python: assume that python@4 will break the cray patches --- .../builtin/packages/python/cray-rpath-2.3.patch | 12 ++++++++++++ .../builtin/packages/python/cray-rpath-3.1.patch | 15 +++++++++++++++ .../repos/builtin/packages/python/package.py | 4 ++++ 3 files changed, 31 insertions(+) create mode 100644 var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch create mode 100644 var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch diff --git a/var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch b/var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch new file mode 100644 index 00000000000..54a85cc64a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch @@ -0,0 +1,12 @@ +--- a/Lib/distutils/unixccompiler.py 2003-06-02 05:27:40.000000000 +1000 ++++ b/Lib/distutils/unixccompiler.py 2017-05-13 13:52:45.554213616 +1000 +@@ -208,7 +208,8 @@ + elif compiler[:3] == "gcc" or compiler[:3] == "g++": + return "-Wl,-R" + dir + else: +- return "-R" + dir ++ # Patched by spack to use gcc syntax by default: ++ return "-Wl,-R" + dir + + def library_option(self, lib): + return "-l" + lib diff --git a/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch b/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch new file mode 100644 index 00000000000..f203bbbaa5f --- /dev/null +++ b/var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch @@ -0,0 +1,15 @@ +--- a/Lib/distutils/unixccompiler.py 2009-05-09 21:55:12.000000000 +1000 ++++ b/Lib/distutils/unixccompiler.py 2017-05-13 14:30:18.077518999 +1000 +@@ -299,10 +299,8 @@ + else: + return "-Wl,-R" + dir + else: +- # No idea how --enable-new-dtags would be passed on to +- # ld if this system was using GNU ld. Don't know if a +- # system like this even exists. +- return "-R" + dir ++ # Patched by spack to use gcc syntax by default: ++ return "-Wl,-R" + dir + + def library_option(self, lib): + return "-l" + lib diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index c5f0f23d6d6..e7dede8ecc2 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -92,6 +92,10 @@ class Python(AutotoolsPackage): # Patch does not work for Python 3.1 patch('ncurses.patch', when='@:2.8,3.2:') + # Ensure that distutils chooses correct compiler option for RPATH on cray: + patch('cray-rpath-2.3.patch', when="@2.3:3.0.1 platform=cray") + patch('cray-rpath-3.1.patch', when="@3.1:3.99 platform=cray") + _DISTUTIL_VARS_TO_SAVE = ['LDSHARED'] _DISTUTIL_CACHE_FILENAME = 'sysconfig.json' _distutil_vars = None From 62daeaa525b1ae7b1f5da1c48d957430787be280 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 29 May 2017 13:36:18 -0700 Subject: [PATCH 22/31] Add package for bamutil (#4387) *Minimally* tested on CentOS 7. Stole the `install_target` bit from zip.... --- .../packages/bamutil/libstatgen-issue-9.patch | 11 +++++ .../repos/builtin/packages/bamutil/package.py | 45 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 var/spack/repos/builtin/packages/bamutil/libstatgen-issue-9.patch create mode 100644 var/spack/repos/builtin/packages/bamutil/package.py diff --git a/var/spack/repos/builtin/packages/bamutil/libstatgen-issue-9.patch b/var/spack/repos/builtin/packages/bamutil/libstatgen-issue-9.patch new file mode 100644 index 00000000000..23435f7c3c9 --- /dev/null +++ b/var/spack/repos/builtin/packages/bamutil/libstatgen-issue-9.patch @@ -0,0 +1,11 @@ +--- a/libStatGen/general/PedigreeLoader.cpp 2017-05-29 11:08:07.627528417 -0700 ++++ b/libStatGen/general/PedigreeLoader.cpp 2017-05-29 11:08:36.247547411 -0700 +@@ -636,7 +636,7 @@ + return 2; + default : + { +- bool result = atoi(code); ++ int result = atoi(code); + + if (result != 0 && result != 1 && result != 2) + { diff --git a/var/spack/repos/builtin/packages/bamutil/package.py b/var/spack/repos/builtin/packages/bamutil/package.py new file mode 100644 index 00000000000..1c1268f7f1d --- /dev/null +++ b/var/spack/repos/builtin/packages/bamutil/package.py @@ -0,0 +1,45 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Bamutil(MakefilePackage): + """bamUtil is a repository that contains several programs + that perform operations on SAM/BAM files. All of these programs + are built into a single executable, bam. + """ + + homepage = "http://genome.sph.umich.edu/wiki/BamUtil" + url = "http://genome.sph.umich.edu/w/images/7/70/BamUtilLibStatGen.1.0.13.tgz" + + version('1.0.13', '08b7d0bb1d60be104a11f0e54ddf4a79') + + # Looks like this will be fixed in 1.0.14. + # https://github.com/statgen/libStatGen/issues/9 + patch('libstatgen-issue-9.patch', when='@1.0.13:') + + @property + def install_targets(self): + return ['install', 'INSTALLDIR={0}'.format(self.prefix.bin)] From e31f80988c50f0d4db863ee0cfe5b3f23fdf5e73 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 29 May 2017 13:47:31 -0700 Subject: [PATCH 23/31] Add support for an older version of STAR (#4385) What the user wants, the user etc.... Add info for STAR@2.4.2a. It's URL looks different, so added a URL for it. This broke the URL for the current version, so added a URL for it also (known bug). *Minimally* tested on CentOS 7. --- var/spack/repos/builtin/packages/star/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/star/package.py b/var/spack/repos/builtin/packages/star/package.py index 87c30733e47..a70dfb00bbc 100644 --- a/var/spack/repos/builtin/packages/star/package.py +++ b/var/spack/repos/builtin/packages/star/package.py @@ -31,7 +31,10 @@ class Star(Package): homepage = "https://github.com/alexdobin/STAR" url = "https://github.com/alexdobin/STAR/archive/2.5.3a.tar.gz" - version('2.5.3a', 'baf8d1b62a50482cfa13acb7652dc391') + version('2.5.3a', 'baf8d1b62a50482cfa13acb7652dc391', + url='https://github.com/alexdobin/STAR/archive/2.5.3a.tar.gz') + version('2.4.2a', '8b9345f2685a5ec30731e0868e86d506', + url='https://github.com/alexdobin/STAR/archive/STAR_2.4.2a.tar.gz') def install(self, spec, prefix): with working_dir('source'): From e3eaba80b1b48788e0c80e581650c33a3f729836 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 29 May 2017 14:59:30 -0700 Subject: [PATCH 24/31] Ensure Config.pm has correct setting for cc (#4345) * Ensure Config.pm has correct setting for cc Run a filter after install so that Config.pm records the compiler that Spack built the package with. If this isn't done, $Config{cc} will be set to Spack's cc wrapper script. * Also patch compilers Config_heavy.pl This patch sets ld=gcc, which appears to work. I'm not sure if there's a good way to get at the ld that Spack uses. * Clean up quoting * Fix pattern for Config.pm Does not start at beginning of line... --- .../repos/builtin/packages/perl/package.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 10895f60894..ef1c11289f0 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -31,6 +31,7 @@ # Date: September 6, 2015 # from spack import * +import os class Perl(Package): # Perl doesn't use Autotools, it should subclass Package @@ -160,3 +161,33 @@ def setup_dependent_package(self, module, dependent_spec): # if it does not exist already. if dependent_spec.package.is_extension: mkdirp(module.perl_lib_dir) + + @run_after('install') + def filter_config_dot_pm(self): + """Run after install so that Config.pm records the compiler that Spack + built the package with. If this isn't done, $Config{cc} will + be set to Spack's cc wrapper script. + """ + + kwargs = {'ignore_absent': True, 'backup': False, 'string': False} + + # Find the actual path to the installed Config.pm file. + perl = Executable(join_path(prefix.bin, 'perl')) + config_dot_pm = perl('-MModule::Loaded', '-MConfig', '-e', + 'print is_loaded(Config)', output=str) + + match = 'cc *=>.*' + substitute = "cc => '{cc}',".format(cc=self.compiler.cc) + filter_file(match, substitute, config_dot_pm, **kwargs) + + # And the path Config_heavy.pl + d = os.path.dirname(config_dot_pm) + config_heavy = join_path(d, 'Config_heavy.pl') + + match = '^cc=.*' + substitute = "cc='{cc}'".format(cc=self.compiler.cc) + filter_file(match, substitute, config_heavy, **kwargs) + + match = '^ld=.*' + substitute = "ld='{ld}'".format(ld=self.compiler.cc) + filter_file(match, substitute, config_heavy, **kwargs) From d7622b32f10e157a0f998083664072e98222228b Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 30 May 2017 13:56:20 +0200 Subject: [PATCH 25/31] Close #4388 libaio fetch (#4392) fetch libaio via the debian mirrors, the same way as archlinux builds it (from original, unmodified sources): https://git.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/libaio&id=a8ec32dd3988668809e6c6affe678db04db3fc76 --- var/spack/repos/builtin/packages/libaio/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/libaio/package.py b/var/spack/repos/builtin/packages/libaio/package.py index 735ced047be..c34ac13e609 100644 --- a/var/spack/repos/builtin/packages/libaio/package.py +++ b/var/spack/repos/builtin/packages/libaio/package.py @@ -28,10 +28,10 @@ class Libaio(Package): """This is the linux native Asynchronous I/O interface library.""" - homepage = "https://git.fedorahosted.org/cgit/libaio.git" - url = "https://git.fedorahosted.org/cgit/libaio.git/snapshot/libaio-0.3.110-1.tar.gz" + homepage = "http://lse.sourceforge.net/io/aio.html" + url = "https://ftp.de.debian.org/debian/pool/main/liba/libaio/libaio_0.3.110.orig.tar.gz" - version('0.3.110-1', 'eb6b1b435afadb5b80c5dd80984249f6') + version('0.3.110', '2a35602e43778383e2f4907a4ca39ab8') def install(self, spec, prefix): # libaio is not supported on OS X From 1b7c29cdfecd7179c40fc33ba880c2023383e584 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 30 May 2017 13:56:44 +0200 Subject: [PATCH 26/31] Fix #3851 xmlto fetch (#4393) xmlto migrated to https://pagure.io/xmlto --- var/spack/repos/builtin/packages/xmlto/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/xmlto/package.py b/var/spack/repos/builtin/packages/xmlto/package.py index 2ed392b9b86..35f41d72e93 100644 --- a/var/spack/repos/builtin/packages/xmlto/package.py +++ b/var/spack/repos/builtin/packages/xmlto/package.py @@ -31,8 +31,8 @@ class Xmlto(AutotoolsPackage): without remembering many long options and searching for the syntax of the backends.""" - homepage = "http://cyberelk.net/tim/software/xmlto/" - url = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-0.0.28.tar.gz" + homepage = "https://pagure.io/xmlto" + url = "https://releases.pagure.org/xmlto/xmlto-0.0.28.tar.gz" version('0.0.28', 'a1fefad9d83499a15576768f60f847c6') From 115fec334663682cf67b7469a73943c07dff6c47 Mon Sep 17 00:00:00 2001 From: Diana Bite Date: Tue, 30 May 2017 12:57:28 +0100 Subject: [PATCH 27/31] zeromq: Fix invocation when building with clang. (#4395) --- var/spack/repos/builtin/packages/zeromq/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/zeromq/package.py b/var/spack/repos/builtin/packages/zeromq/package.py index 51fff7222d4..938bb857fb4 100644 --- a/var/spack/repos/builtin/packages/zeromq/package.py +++ b/var/spack/repos/builtin/packages/zeromq/package.py @@ -41,4 +41,8 @@ class Zeromq(AutotoolsPackage): depends_on("libsodium@:1.0.3", when='@:4.1.2') def configure_args(self): - return ['--with-libsodium'] + config_args = ['--with-libsodium'] + if 'clang' in self.compiler.cc: + config_args.append("CFLAGS=-Wno-gnu") + config_args.append("CXXFLAGS=-Wno-gnu") + return config_args From 8297244446e5505c888cf462442af3b9d5de0932 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Tue, 30 May 2017 04:59:37 -0700 Subject: [PATCH 28/31] Add package for vcftools@0.1.14 (#4389) * Add package for vcftools@0.1.14 The package munges the various perl scripts so that their sbang lines point to the depended upon perl (perhaps with Spack sbanger in the dance) instead of relying on `/usr/bin/env perl`. As it stands it installs its Perl libraries into `prefix/lib` and then depends on `setup_environment` to prepend that dir onto PERL5LIB. See my [vcftools issue 80](https://github.com/vcftools/vcftools/issues/80) for a discussion about fixing its non-functional attempt at isolating itself from PERL5LIB shenanigans. * perl dependency should be build/run --- .../builtin/packages/vcftools/package.py | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 var/spack/repos/builtin/packages/vcftools/package.py diff --git a/var/spack/repos/builtin/packages/vcftools/package.py b/var/spack/repos/builtin/packages/vcftools/package.py new file mode 100644 index 00000000000..3f2f01dbff1 --- /dev/null +++ b/var/spack/repos/builtin/packages/vcftools/package.py @@ -0,0 +1,75 @@ +############################################################################## +# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Vcftools(AutotoolsPackage): + """VCFtools is a program package designed for working with VCF files, + such as those generated by the 1000 Genomes Project. The aim of + VCFtools is to provide easily accessible methods for working + with complex genetic variation data in the form of VCF files. + """ + + homepage = "https://vcftools.github.io/" + url = "https://github.com/vcftools/vcftools/releases/download/v0.1.14/vcftools-0.1.14.tar.gz" + + # this is "a pre-release" + # version('0.1.15', '61045197848dea20a0158d2faf02e5be') + version('0.1.14', 'a110662535651caa6cc8c876216a9f77') + + depends_on('perl', type=('build', 'run')) + depends_on('zlib') + + # this needs to be in sync with what setup_environment adds to + # PERL5LIB below + def configure_args(self): + return ['--with-pmdir=lib'] + + @run_before('install') + def filter_sbang(self): + """Run before install so that the standard Spack sbang install hook + can fix up the path to the perl binary. + """ + + with working_dir('src/perl'): + match = '^#!/usr/bin/env perl' + perl = join_path(self.spec['perl'].prefix.bin, 'perl') + substitute = "#!{perl}".format(perl=perl) + # tab-to-vcf added in 0.1.15 + files = ['fill-aa', 'fill-an-ac', 'fill-fs', + 'fill-ref-md5', 'tab-to-vcf', 'vcf-annotate', + 'vcf-compare', 'vcf-concat', 'vcf-consensus', + 'vcf-contrast', 'vcf-convert', + 'vcf-fix-newlines', 'vcf-fix-ploidy', + 'vcf-indel-stats', 'vcf-isec', 'vcf-merge', + 'vcf-phased-join', 'vcf-query', + 'vcf-shuffle-cols', 'vcf-sort', 'vcf-stats', + 'vcf-subset', 'vcf-to-tab', 'vcf-tstv', + 'vcf-validator', ] + kwargs = {'ignore_absent': True, 'backup': False, 'string': False} + filter_file(match, substitute, *files, **kwargs) + + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('PERL5LIB', join_path(self.prefix, 'lib')) From c23ccb58e1a5ba81077890a10f03bf009fc7b2be Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 30 May 2017 16:37:34 +0200 Subject: [PATCH 29/31] Package: Wt (#4384) * Package: libharu (PDF) C++ PDF generation library, necessary for wt * Package: WT Adds `wt` "witty", a Qt-like C++ web framework for GUIs --- .../repos/builtin/packages/libharu/package.py | 51 ++++++++++ .../repos/builtin/packages/wt/package.py | 95 +++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libharu/package.py create mode 100644 var/spack/repos/builtin/packages/wt/package.py diff --git a/var/spack/repos/builtin/packages/libharu/package.py b/var/spack/repos/builtin/packages/libharu/package.py new file mode 100644 index 00000000000..54477fc7b5b --- /dev/null +++ b/var/spack/repos/builtin/packages/libharu/package.py @@ -0,0 +1,51 @@ +############################################################################## +# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * +import os + + +class Libharu(AutotoolsPackage): + """libharu - free PDF library. + + Haru is a free, cross platform, open-sourced software library for + generating PDF.""" + + homepage = "http://libharu.org" + url = "https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz" + + version('2.3.0', '4f916aa49c3069b3a10850013c507460') + version('2.2.0', 'b65a6fc33a0bdad89bec6b7def101f01') + version('master', branch='master', + git='https://github.com/libharu/libharu.git') + + def autoreconf(self, spec, prefix): + """execute their autotools wrapper script""" + if os.path.exists('./buildconf.sh'): + bash = which('bash') + bash('./buildconf.sh', '--force') + + def url_for_version(self, version): + url = 'https://github.com/libharu/libharu/archive/RELEASE_{0}.tar.gz' + return url.format(version.underscored) diff --git a/var/spack/repos/builtin/packages/wt/package.py b/var/spack/repos/builtin/packages/wt/package.py new file mode 100644 index 00000000000..91e80394f5e --- /dev/null +++ b/var/spack/repos/builtin/packages/wt/package.py @@ -0,0 +1,95 @@ +############################################################################## +# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the LICENSE file for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class Wt(CMakePackage): + """Wt, C++ Web Toolkit. + + Wt is a C++ library for developing web applications.""" + + homepage = "http://www.webtoolkit.eu/wt" + url = "https://github.com/emweb/wt/archive/3.3.7.tar.gz" + + version('3.3.7', '09858901f2dcf5c3d36a9237daba3e3f') + version('master', branch='master', + git='https://github.com/emweb/wt.git') + + # wt builds in parallel, but requires more than 5 GByte RAM per -j + # which most machines do not provide and crash the build + parallel = False + + variant('openssl', default=True, + description='SSL and WebSockets support in the built-in httpd, ' + 'the HTTP(S) client, and additional cryptographic ' + 'hashes in the authentication module') + variant('libharu', default=True, description='painting to PDF') + # variant('graphicsmagick', default=True, + # description='painting to PNG, GIF') + variant('sqlite', default=False, description='create SQLite3 DBO') + variant('mariadb', default=False, description='create MariaDB/MySQL DBO') + variant('postgresql', default=False, description='create PostgreSQL DBO') + # variant('firebird', default=False, description='create Firebird DBO') + variant('pango', default=True, + description='improved font support in PDF and raster image ' + 'painting') + variant('zlib', default=True, + description='compression in the built-in httpd') + # variant('fastcgi', default=False, + # description='FastCGI connector via libfcgi++') + + depends_on('boost@1.46.1:') + depends_on('openssl', when='+openssl') + depends_on('libharu', when='+libharu') + depends_on('sqlite', when='+sqlite') + depends_on('mariadb', when='+mariadb') + depends_on('postgresql', when='+postgresql') + depends_on('pango', when='+pango') + depends_on('zlib', when='+zlib') + + def cmake_args(self): + spec = self.spec + + cmake_args = [ + '-DBUILD_EXAMPLES:BOOL=OFF', + '-DCONNECTOR_FCGI:BOOL=OFF', + '-DENABLE_OPENGL:BOOL=OFF', + '-DENABLE_QT4:BOOL=OFF' + ] + cmake_args.extend([ + '-DENABLE_SSL:BOOL={0}'.format(( + 'ON' if '+openssl' in spec else 'OFF')), + '-DENABLE_HARU:BOOL={0}'.format(( + 'ON' if '+libharu' in spec else 'OFF')), + '-DENABLE_PANGO:BOOL={0}'.format(( + 'ON' if '+pango' in spec else 'OFF')), + '-DENABLE_SQLITE:BOOL={0}'.format(( + 'ON' if '+sqlite' in spec else 'OFF')), + '-DENABLE_MYSQL:BOOL={0}'.format(( + 'ON' if '+mariadb' in spec else 'OFF')), + '-DENABLE_POSTGRES:BOOL={0}'.format(( + 'ON' if '+postgres' in spec else 'OFF')) + ]) + return cmake_args From 336d988cc6bad73bc582789c278bdeb2d770def2 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 30 May 2017 10:16:43 -0500 Subject: [PATCH 30/31] Add every version of OpenMPI (#4372) --- .../repos/builtin/packages/openmpi/package.py | 108 +++++++++++++++--- 1 file changed, 91 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 14deb97bdf4..2ab75859180 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -66,26 +66,96 @@ class Openmpi(AutotoolsPackage): homepage = "http://www.open-mpi.org" url = "https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2" list_url = "http://www.open-mpi.org/software/ompi/" - list_depth = 2 - version('2.1.1', 'ae542f5cf013943ffbbeb93df883731b') - version('2.1.0', '4838a5973115c44e14442c01d3f21d52') - version('2.0.2', 'ecd99aa436a1ca69ce936a96d6a3fa48') - version('2.0.1', '6f78155bd7203039d2448390f3b51c96') - version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674') - version('1.10.6', '2e65008c1867b1f47c32f9f814d41706') - version('1.10.5', 'd32ba9530a869d9c1eae930882ea1834') - version('1.10.4', '9d2375835c5bc5c184ecdeb76c7c78ac') - version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b') - version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c') - version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e') - version('1.10.0', '280cf952de68369cebaca886c5ce0304') - version('1.8.8', '0dab8e602372da1425e9242ae37faf8c') - version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475') + # Current + version('2.1.1', 'ae542f5cf013943ffbbeb93df883731b') # libmpi.so.20.10.1 + version('2.1.0', '4838a5973115c44e14442c01d3f21d52') # libmpi.so.20.10.0 + + # Still supported + version('2.0.2', 'ecd99aa436a1ca69ce936a96d6a3fa48') # libmpi.so.20.0.2 + version('2.0.1', '6f78155bd7203039d2448390f3b51c96') # libmpi.so.20.0.1 + version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674') # libmpi.so.20.0.0 + + version('1.10.7', 'c87c613f9acb1a4eee21fa1ac8042579') # libmpi.so.12.0.7 + version('1.10.6', '2e65008c1867b1f47c32f9f814d41706') # libmpi.so.12.0.6 + version('1.10.5', 'd32ba9530a869d9c1eae930882ea1834') # libmpi.so.12.0.5 + version('1.10.4', '9d2375835c5bc5c184ecdeb76c7c78ac') # libmpi.so.12.0.4 + version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b') # libmpi.so.12.0.3 + version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c') # libmpi.so.12.0.2 + version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e') # libmpi.so.12.0.1 + version('1.10.0', '280cf952de68369cebaca886c5ce0304') # libmpi.so.12.0.0 + + # Retired + version('1.8.8', '0dab8e602372da1425e9242ae37faf8c') # libmpi.so.1.6.3 + version('1.8.7', '2485ed6fa0fab9bb5b4e7a9f63718630') # libmpi.so.1.6.2 + version('1.8.6', 'eb569e7dc97eeaa5b1876cccf114f377') # libmpi.so.1.6.1 + version('1.8.5', '93e958914ff0e4d9634d668d2d48c793') # libmpi.so.1.6.0 + version('1.8.4', '93b7ea2c4ebae76947f942579608ae4a') # libmpi.so.1.6.0 + version('1.8.3', '2067d00853e0c33d498153fc7d268d2b') # libmpi.so.1.6.0 + version('1.8.2', '339a9fc199563bacbb359875ce8c9e20') # libmpi.so.1.5.2 + version('1.8.1', '0e12c24a28a605f681ff9a19a1aca2f1') # libmpi.so.1.5.0 + version('1.8', '5999cfb177a50c480b5d0bced379aff1') # libmpi.so.1.5.0 + + version('1.7.5', '321ab81147ac69a5bbca72652fb3b468') # libmpi.so.1.4.0 + version('1.7.4', '4aea4fb00f8956dd56ccf50e5784e03f') # libmpi.so.1.3.0 + version('1.7.3', '7d0779f73c43eb1d098ad037d60649bc') # libmpi.so.1.2.0 + version('1.7.2', 'b897b92100bd13b367e651df483421d5') # libmpi.so.1.1.2 + version('1.7.1', 'f25b446a9dcbbd6a105a99d926d34441') # libmpi.so.1.1.1 + version('1.7', 'c0e3c4b3bfcd8b8bbd027f6f4c164acb') # libmpi.so.1.1.0 + + version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475') # libmpi.so.1.0.8 + version('1.6.4', '62119579ab92b2592cd96b6a9d2a8cc3') # libmpi.so.1.0.7 + version('1.6.3', 'eedb73155a7a40b0b07718494298fb25') # libmpi.so.1.0.6 + version('1.6.2', '219754715a8e40beb468bbc8f0b3251a') # libmpi.so.1.0.3 + version('1.6.1', '33d2782c20ff6be79130a703b85da8f0') # libmpi.so.1.0.3 + version('1.6', 'dd6f5bd4b3cb14d93bbf530e50e46e60') # libmpi.so.1.0.3 + + # Ancient + version('1.5.5', 'f882fd61ff89db856bfd8f0dfa42e1bd') # libmpi.so.1.0.3 + version('1.5.4', '51153d794c49ce6d275dba2793ab0c68') # libmpi.so.1.0.2 + version('1.5.3', '0eb8ec2aa05c74a4bc7602b01847131e') # libmpi.so.1.0.1 + version('1.5.2', 'faaee6a2777bf607d7fa1297c0b3a9ed') # libmpi.so.1.0.1 + version('1.5.1', '3f9409f5d3b617c04dea48ba8fbd703a') # libmpi.so.1.0.0 + version('1.5', '86bf5f9ef7337231abbca3350b31f112') # libmpi.so.1.0.0 + + version('1.4.5', '84ddd2772f46d35da79e1db8a274c99d') # libmpi.so.0.0.4 + version('1.4.4', 'e58a1ea7b8af62453aaa0ddaee5f26a0') # libmpi.so.0.0.3 + version('1.4.3', 'd2ead141c43b915343f5c5a18f3b5016') # libmpi.so.0.0.2 + version('1.4.2', '53b26fa2586aedaf73cf40effbfcc2f3') # libmpi.so.0.0.2 + version('1.4.1', '28a820c85e02973809df881fdeddd15e') # libmpi.so.0.0.1 + version('1.4', '9786ec0698afed9498ce43dc3978a435') # libmpi.so.0.0.1 + + version('1.3.4', '978c29f3b671856daa0fc67459b73e01') # libmpi.so.0.0.1 + version('1.3.3', 'f6cdc9c195daa8571b2e509e952d6755') # libmpi.so.0.0.0 + version('1.3.2', '75781dc31255cd841701c065e239d994') # libmpi.so.0.0.0 + version('1.3.1', 'd759523b0752139872c534714d641d64') # libmpi.so.0.0.0 + version('1.3', 'efbba7d652d1e430d456f65d7a2e339b') # libmpi.so.0.0.0 + + version('1.2.9', '78c2aebbb746610ed12bdedcc2b6ec0e') # libmpi.so.0.0.0 + version('1.2.8', '7f2d5af02101c5f01173f4f6de296549') # libmpi.so.0.0.0 + version('1.2.7', 'b5ae3059fba71eba4a89a2923da8223f') # libmpi.so.0.0.0 + version('1.2.6', 'f126793b68e71f5ec4a192c40675af2d') # libmpi.so.0.0.0 + version('1.2.5', 'c6e82aab6cdcd425bf29217e8317d7dc') # libmpi.so.0.0.0 + version('1.2.4', '311b38c597f54d8d6b277225ef458666') # libmpi.so.0.0.0 + version('1.2.3', 'ae980bb00f9686934a1143701cc041e4') # libmpi.so.0.0.0 + version('1.2.2', '7f553317e388c4efe479e908b66f910d') # libmpi.so.0.0.0 + version('1.2.1', 'ceaa42891edba2324a94fdd0b87e46ca') # libmpi.so.0.0.0 + version('1.2', '37e8d4edad54a8d8c3127fbef87ebda1') # libmpi.so.0.0.0 + + version('1.1.5', '6aada92896a1830ece6d3ba1e66a17fa') # libmpi.so.0.0.0 + version('1.1.4', '28940b182156478fa442397b0c9660e1') # libmpi.so.0.0.0 + version('1.1.3', 'bbaa7fe9d556212d877d872544a31569') # libmpi.so.0.0.0 + version('1.1.2', '53877ec8bca5f6e505496b6b94b1d850') # libmpi.so.0.0.0 + version('1.1.1', '498b9322ae0ad512026a008a30c7e0b5') # libmpi.so.0.0.0 + version('1.1', '821af8bbb7a8e85ec707cb4c3b6bcbf6') # libmpi.so.0.0.0 + + version('1.0.2', 'fd32861d643f9fe539a01d0d5b836f41') # libmpi.so.0.0.0 + version('1.0.1', '8abccca5cdddc81a6d9d9e22b3bb6db9') # libmpi.so.0.0.0 + version('1.0', 'f5dcb5d3a98f2e5a9c2a0caaef54d806') # libmpi.so.0.0.0 patch('ad_lustre_rwcontig_open_source.patch', when="@1.6.5") patch('llnl-platforms.patch', when="@1.6.5") - patch('configure.patch', when="@1.10.0:1.10.1") + patch('configure.patch', when="@1.10.1") patch('fix_multidef_pmi_class.patch', when="@2.0.0:2.0.1") variant( @@ -120,6 +190,10 @@ class Openmpi(AutotoolsPackage): depends_on('jdk', when='+java') depends_on('sqlite', when='+sqlite3@:1.11') + conflicts('fabrics=psm2', when='@:1.8') # PSM2 support was added in 1.10.0 + conflicts('fabrics=pmi', when='@:1.5.4') # PMI support was added in 1.5.5 + conflicts('fabrics=mxm', when='@:1.5.3') # MXM support was added in 1.5.4 + def url_for_version(self, version): return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % ( version.up_to(2), version) @@ -236,7 +310,7 @@ def configure_args(self): config_args.append('--disable-mpi-thread-multiple') # CUDA support - if spec.satisfies('@1.6:'): + if spec.satisfies('@1.7:'): if '+cuda' in spec: config_args.append('--with-cuda={0}'.format( spec['cuda'].prefix)) From d9d5135ec9f1ef71fa6604406a2efe46668821ea Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 30 May 2017 13:37:56 -0500 Subject: [PATCH 31/31] Fix spack info bug for Python 3 (#4391) --- lib/spack/spack/cmd/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/cmd/info.py b/lib/spack/spack/cmd/info.py index 62de5484af1..f0cddad2e23 100644 --- a/lib/spack/spack/cmd/info.py +++ b/lib/spack/spack/cmd/info.py @@ -25,7 +25,7 @@ from __future__ import print_function import textwrap -import itertools +from six.moves import zip_longest from llnl.util.tty.colify import * import spack import spack.fetch_strategy as fs @@ -119,7 +119,7 @@ def lines(self): v.description, width=self.column_widths[2] ) - for t in itertools.izip_longest( + for t in zip_longest( name, allowed, description, fillvalue='' ): yield " " + self.fmt % t