Merge remote branch 'origin/develop' into develop
This commit is contained in:
commit
0bf4ebd682
@ -71,12 +71,14 @@ addons:
|
|||||||
- gfortran
|
- gfortran
|
||||||
- mercurial
|
- mercurial
|
||||||
- graphviz
|
- graphviz
|
||||||
|
- gnupg2
|
||||||
|
|
||||||
# Work around Travis's lack of support for Python on OSX
|
# Work around Travis's lack of support for Python on OSX
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
|
- 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 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 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 virtualenv venv; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source venv/bin/activate; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source venv/bin/activate; fi
|
||||||
|
|
||||||
|
@ -276,6 +276,70 @@ Seeing installed packages
|
|||||||
We know that ``spack list`` shows you the names of available packages,
|
We know that ``spack list`` shows you the names of available packages,
|
||||||
but how do you figure out which are already installed?
|
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 <keyfile>``. 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 <name> <email>``. By default, the key has no expiration,
|
||||||
|
but it may be set with the ``--expires <date>`` 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 <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 <keyfile>`` flag.
|
||||||
|
Secret keys may also be later exported using the
|
||||||
|
``spack gpg export <location> [<key>...]`` 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 <keyid>``. Key IDs can be
|
||||||
|
email addresses, names, or (best) fingerprints.
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
Signing and Verifying Packages
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
In order to sign a package, ``spack gpg sign <file>`` should be used. By
|
||||||
|
default, the signature will be written to ``<file>.asc``, but that may be
|
||||||
|
changed by using the ``--output <file>`` 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 <keyid>`` 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 <file>``.
|
||||||
|
|
||||||
.. _cmd-spack-find:
|
.. _cmd-spack-find:
|
||||||
|
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
@ -14,6 +14,7 @@ before Spack is run:
|
|||||||
1. Python 2 (2.6 or 2.7) or 3 (3.3 - 3.6)
|
1. Python 2 (2.6 or 2.7) or 3 (3.3 - 3.6)
|
||||||
2. A C/C++ compiler
|
2. A C/C++ compiler
|
||||||
3. The ``git`` and ``curl`` commands.
|
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;
|
These requirements can be easily installed on most modern Linux systems;
|
||||||
on Macintosh, XCode is required. Spack is designed to run on HPC
|
on Macintosh, XCode is required. Spack is designed to run on HPC
|
||||||
|
@ -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.
|
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
|
``spack extensions`` doesn't work
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
@ -68,6 +68,13 @@
|
|||||||
etc_path = join_path(prefix, "etc")
|
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.)
|
# Initial imports (only for use in this file -- see __all__ below.)
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
@ -30,7 +30,10 @@
|
|||||||
|
|
||||||
|
|
||||||
class RPackage(PackageBase):
|
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:
|
This class provides a single phase that can be overridden:
|
||||||
|
|
||||||
@ -49,12 +52,37 @@ class RPackage(PackageBase):
|
|||||||
|
|
||||||
depends_on('r', type=('build', 'run'))
|
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):
|
def install(self, spec, prefix):
|
||||||
"""Installs an R package."""
|
"""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),
|
'--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
|
# Check that self.prefix is there after installation
|
||||||
run_after('install')(PackageBase.sanity_check_prefix)
|
run_after('install')(PackageBase.sanity_check_prefix)
|
||||||
|
@ -265,7 +265,11 @@ class RPackageTemplate(PackageTemplate):
|
|||||||
# depends_on('r-foo', type=('build', 'run'))"""
|
# depends_on('r-foo', type=('build', 'run'))"""
|
||||||
|
|
||||||
body = """\
|
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):
|
def __init__(self, name, *args):
|
||||||
# If the user provided `--name r-rcpp`, don't rename it r-r-rcpp
|
# If the user provided `--name r-rcpp`, don't rename it r-r-rcpp
|
||||||
|
168
lib/spack/spack/cmd/gpg.py
Normal file
168
lib/spack/spack/cmd/gpg.py
Normal file
@ -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)
|
@ -25,7 +25,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import textwrap
|
import textwrap
|
||||||
import itertools
|
from six.moves import zip_longest
|
||||||
from llnl.util.tty.colify import *
|
from llnl.util.tty.colify import *
|
||||||
import spack
|
import spack
|
||||||
import spack.fetch_strategy as fs
|
import spack.fetch_strategy as fs
|
||||||
@ -119,7 +119,7 @@ def lines(self):
|
|||||||
v.description,
|
v.description,
|
||||||
width=self.column_widths[2]
|
width=self.column_widths[2]
|
||||||
)
|
)
|
||||||
for t in itertools.izip_longest(
|
for t in zip_longest(
|
||||||
name, allowed, description, fillvalue=''
|
name, allowed, description, fillvalue=''
|
||||||
):
|
):
|
||||||
yield " " + self.fmt % t
|
yield " " + self.fmt % t
|
||||||
|
181
lib/spack/spack/test/cmd/gpg.py
Normal file
181
lib/spack/spack/test/cmd/gpg.py
Normal file
@ -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)
|
120
lib/spack/spack/util/gpg.py
Normal file
120
lib/spack/spack/util/gpg.py
Normal file
@ -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')
|
@ -57,7 +57,7 @@ def mod_to_class(mod_name):
|
|||||||
* Class names use the CapWords convention.
|
* Class names use the CapWords convention.
|
||||||
|
|
||||||
Regular source code follows these convetions. Spack is a bit
|
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 contain '-' as well as '_', but cannot start with '-'.
|
||||||
* They can start with numbers, e.g. "3proxy".
|
* They can start with numbers, e.g. "3proxy".
|
||||||
|
3
var/spack/gpg.mock/README.md
Normal file
3
var/spack/gpg.mock/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Mock GPG directory
|
||||||
|
|
||||||
|
This directory contains keys and data used in the testing Spack.
|
1
var/spack/gpg.mock/data/content.txt
Normal file
1
var/spack/gpg.mock/data/content.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
This file has a signature signed by an external key.
|
17
var/spack/gpg.mock/data/content.txt.asc
Normal file
17
var/spack/gpg.mock/data/content.txt.asc
Normal file
@ -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-----
|
30
var/spack/gpg.mock/keys/external.key
Normal file
30
var/spack/gpg.mock/keys/external.key
Normal file
@ -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-----
|
5
var/spack/gpg/README.md
Normal file
5
var/spack/gpg/README.md
Normal file
@ -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`.
|
@ -56,6 +56,7 @@ class ArpackNg(Package):
|
|||||||
homepage = 'https://github.com/opencollab/arpack-ng'
|
homepage = 'https://github.com/opencollab/arpack-ng'
|
||||||
url = 'https://github.com/opencollab/arpack-ng/archive/3.3.0.tar.gz'
|
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.4.0', 'ae9ca13f2143a7ea280cb0e2fd4bfae4')
|
||||||
version('3.3.0', 'ed3648a23f0a868a43ef44c97a21bad5')
|
version('3.3.0', 'ed3648a23f0a868a43ef44c97a21bad5')
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
{
|
45
var/spack/repos/builtin/packages/bamutil/package.py
Normal file
45
var/spack/repos/builtin/packages/bamutil/package.py
Normal file
@ -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)]
|
@ -31,7 +31,8 @@ class Bwa(Package):
|
|||||||
homepage = "http://github.com/lh3/bwa"
|
homepage = "http://github.com/lh3/bwa"
|
||||||
url = "https://github.com/lh3/bwa/releases/download/v0.7.15/bwa-0.7.15.tar.bz2"
|
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',
|
version('0.7.12', 'e24a587baaad411d5da89516ad7a261a',
|
||||||
url='https://github.com/lh3/bwa/archive/0.7.12.tar.gz')
|
url='https://github.com/lh3/bwa/archive/0.7.12.tar.gz')
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ class Fastqc(Package):
|
|||||||
url = "http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.5.zip"
|
url = "http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.5.zip"
|
||||||
|
|
||||||
version('0.11.5', '3524f101c0ab0bae77c7595983170a76')
|
version('0.11.5', '3524f101c0ab0bae77c7595983170a76')
|
||||||
|
version('0.11.4', '104ff2e0e9aebf5bee1f6b068a059b0d')
|
||||||
|
|
||||||
depends_on('jdk', type='run')
|
depends_on('jdk', type='run')
|
||||||
depends_on('perl') # for fastqc "script", any perl will do
|
depends_on('perl') # for fastqc "script", any perl will do
|
||||||
|
@ -36,7 +36,7 @@ class Hypre(Package):
|
|||||||
url = "http://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz"
|
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('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.2', 'd507943a1a3ce5681c3308e2f3a6dd34')
|
||||||
version('2.11.1', '3f02ef8fd679239a6723f60b7f796519')
|
version('2.11.1', '3f02ef8fd679239a6723f60b7f796519')
|
||||||
version('2.10.1', 'dc048c4cabb3cd549af72591474ad674')
|
version('2.10.1', 'dc048c4cabb3cd549af72591474ad674')
|
||||||
|
@ -54,6 +54,10 @@ class Jdk(Package):
|
|||||||
version('8u66', '88f31f3d642c3287134297b8c10e61bf',
|
version('8u66', '88f31f3d642c3287134297b8c10e61bf',
|
||||||
url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz",
|
url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz",
|
||||||
curl_options=curl_options)
|
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):
|
def install(self, spec, prefix):
|
||||||
distutils.dir_util.copy_tree(".", prefix)
|
distutils.dir_util.copy_tree(".", prefix)
|
||||||
|
@ -28,10 +28,10 @@
|
|||||||
class Libaio(Package):
|
class Libaio(Package):
|
||||||
"""This is the linux native Asynchronous I/O interface library."""
|
"""This is the linux native Asynchronous I/O interface library."""
|
||||||
|
|
||||||
homepage = "https://git.fedorahosted.org/cgit/libaio.git"
|
homepage = "http://lse.sourceforge.net/io/aio.html"
|
||||||
url = "https://git.fedorahosted.org/cgit/libaio.git/snapshot/libaio-0.3.110-1.tar.gz"
|
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):
|
def install(self, spec, prefix):
|
||||||
# libaio is not supported on OS X
|
# libaio is not supported on OS X
|
||||||
|
@ -34,6 +34,7 @@ class Libdrm(Package):
|
|||||||
homepage = "http://dri.freedesktop.org/libdrm/"
|
homepage = "http://dri.freedesktop.org/libdrm/"
|
||||||
url = "http://dri.freedesktop.org/libdrm/libdrm-2.4.59.tar.gz"
|
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.70', 'a8c275bce5f3d71a5ca25e8fb60df084')
|
||||||
version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6')
|
version('2.4.59', '105ac7af1afcd742d402ca7b4eb168b6')
|
||||||
version('2.4.33', '86e4e3debe7087d5404461e0032231c8')
|
version('2.4.33', '86e4e3debe7087d5404461e0032231c8')
|
||||||
|
51
var/spack/repos/builtin/packages/libharu/package.py
Normal file
51
var/spack/repos/builtin/packages/libharu/package.py
Normal file
@ -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)
|
@ -50,6 +50,10 @@ class Mfem(Package):
|
|||||||
# If this quick verification procedure fails, additional discussion
|
# If this quick verification procedure fails, additional discussion
|
||||||
# will be required to verify the new version.
|
# will be required to verify the new version.
|
||||||
|
|
||||||
|
version('3.3',
|
||||||
|
'b17bd452593aada93dc0fee748fcfbbf4f04ce3e7d77fdd0341cc9103bcacd0b',
|
||||||
|
url='http://goo.gl/Vrpsns', extension='.tar.gz')
|
||||||
|
|
||||||
version('3.2',
|
version('3.2',
|
||||||
'2938c3deed4ec4f7fd5b5f5cfe656845282e86e2dcd477d292390058b7b94340',
|
'2938c3deed4ec4f7fd5b5f5cfe656845282e86e2dcd477d292390058b7b94340',
|
||||||
url='http://goo.gl/Y9T75B', extension='.tar.gz')
|
url='http://goo.gl/Y9T75B', extension='.tar.gz')
|
||||||
@ -173,9 +177,7 @@ def install(self, spec, prefix):
|
|||||||
ss_lib += (' -lumfpack -lcholmod -lcolamd' +
|
ss_lib += (' -lumfpack -lcholmod -lcolamd' +
|
||||||
' -lamd -lcamd -lccolamd -lsuitesparseconfig')
|
' -lamd -lcamd -lccolamd -lsuitesparseconfig')
|
||||||
|
|
||||||
no_librt_archs = ['darwin-i686', 'darwin-x86_64']
|
no_rt = spec.satisfies('platform=darwin')
|
||||||
no_rt = any(map(lambda a: spec.satisfies('=' + a),
|
|
||||||
no_librt_archs))
|
|
||||||
if not no_rt:
|
if not no_rt:
|
||||||
ss_lib += ' -lrt'
|
ss_lib += ' -lrt'
|
||||||
ss_lib += (' ' + metis_lib + ' ' + lapack_lib)
|
ss_lib += (' ' + metis_lib + ' ' + lapack_lib)
|
||||||
|
@ -39,6 +39,14 @@ class Mummer(Package):
|
|||||||
patch('Makefile.patch')
|
patch('Makefile.patch')
|
||||||
patch('scripts-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):
|
def install(self, spec, prefix):
|
||||||
if self.run_tests:
|
if self.run_tests:
|
||||||
make('check')
|
make('check')
|
||||||
|
@ -178,8 +178,8 @@ def write_makefile_inc(self):
|
|||||||
|
|
||||||
# TODO: change the value to the correct one according to the
|
# TODO: change the value to the correct one according to the
|
||||||
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
|
# compiler possible values are -DAdd_, -DAdd__ and/or -DUPPER
|
||||||
if self.compiler.name == 'intel':
|
if self.compiler.name == 'intel' or self.compiler.name == 'pgi':
|
||||||
# Intel Fortran compiler provides the main() function so
|
# Intel & PGI Fortran compiler provides the main() function so
|
||||||
# C examples linked with the Fortran compiler require a
|
# C examples linked with the Fortran compiler require a
|
||||||
# hack defined by _DMAIN_COMP (see examples/c_example.c)
|
# hack defined by _DMAIN_COMP (see examples/c_example.c)
|
||||||
makefile_conf.append("CDEFS = -DAdd_ -DMAIN_COMP")
|
makefile_conf.append("CDEFS = -DAdd_ -DMAIN_COMP")
|
||||||
|
@ -30,8 +30,9 @@ class Nco(AutotoolsPackage):
|
|||||||
netCDF-accessible formats"""
|
netCDF-accessible formats"""
|
||||||
|
|
||||||
homepage = "http://nco.sourceforge.net/"
|
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.6', 'df6fa47aaf6e41adfc0631912a7a341f')
|
||||||
version('4.6.5', '2afd34a6bb5ff6c7ed39cf40c917b6e4')
|
version('4.6.5', '2afd34a6bb5ff6c7ed39cf40c917b6e4')
|
||||||
version('4.6.4', '22f4e779d0011a9c0db90fda416c8e45')
|
version('4.6.4', '22f4e779d0011a9c0db90fda416c8e45')
|
||||||
|
@ -34,6 +34,7 @@ class Oce(Package):
|
|||||||
homepage = "https://github.com/tpaviot/oce"
|
homepage = "https://github.com/tpaviot/oce"
|
||||||
url = "https://github.com/tpaviot/oce/archive/OCE-0.18.tar.gz"
|
url = "https://github.com/tpaviot/oce/archive/OCE-0.18.tar.gz"
|
||||||
|
|
||||||
|
version('0.18.1', '2a7597f4243ee1f03245aeeb02d00956')
|
||||||
version('0.18', '226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993')
|
version('0.18', '226e45e77c16a4a6e127c71fefcd171410703960ae75c7ecc7eb68895446a993')
|
||||||
version('0.17.2', 'bf2226be4cd192606af677cf178088e5')
|
version('0.17.2', 'bf2226be4cd192606af677cf178088e5')
|
||||||
version('0.17.1', '36c67b87093c675698b483454258af91')
|
version('0.17.1', '36c67b87093c675698b483454258af91')
|
||||||
@ -59,7 +60,7 @@ class Oce(Package):
|
|||||||
# reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643
|
# reported 27 Sep 2016 https://github.com/tpaviot/oce/issues/643
|
||||||
if (platform.system() == "Darwin") and (
|
if (platform.system() == "Darwin") and (
|
||||||
'.'.join(platform.mac_ver()[0].split('.')[:2]) == '10.12'):
|
'.'.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):
|
def install(self, spec, prefix):
|
||||||
options = []
|
options = []
|
||||||
|
@ -66,26 +66,96 @@ class Openmpi(AutotoolsPackage):
|
|||||||
homepage = "http://www.open-mpi.org"
|
homepage = "http://www.open-mpi.org"
|
||||||
url = "https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2"
|
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_url = "http://www.open-mpi.org/software/ompi/"
|
||||||
list_depth = 2
|
|
||||||
|
|
||||||
version('2.1.1', 'ae542f5cf013943ffbbeb93df883731b')
|
# Current
|
||||||
version('2.1.0', '4838a5973115c44e14442c01d3f21d52')
|
version('2.1.1', 'ae542f5cf013943ffbbeb93df883731b') # libmpi.so.20.10.1
|
||||||
version('2.0.2', 'ecd99aa436a1ca69ce936a96d6a3fa48')
|
version('2.1.0', '4838a5973115c44e14442c01d3f21d52') # libmpi.so.20.10.0
|
||||||
version('2.0.1', '6f78155bd7203039d2448390f3b51c96')
|
|
||||||
version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674')
|
# Still supported
|
||||||
version('1.10.6', '2e65008c1867b1f47c32f9f814d41706')
|
version('2.0.2', 'ecd99aa436a1ca69ce936a96d6a3fa48') # libmpi.so.20.0.2
|
||||||
version('1.10.5', 'd32ba9530a869d9c1eae930882ea1834')
|
version('2.0.1', '6f78155bd7203039d2448390f3b51c96') # libmpi.so.20.0.1
|
||||||
version('1.10.4', '9d2375835c5bc5c184ecdeb76c7c78ac')
|
version('2.0.0', 'cdacc800cb4ce690c1f1273cb6366674') # libmpi.so.20.0.0
|
||||||
version('1.10.3', 'e2fe4513200e2aaa1500b762342c674b')
|
|
||||||
version('1.10.2', 'b2f43d9635d2d52826e5ef9feb97fd4c')
|
version('1.10.7', 'c87c613f9acb1a4eee21fa1ac8042579') # libmpi.so.12.0.7
|
||||||
version('1.10.1', 'f0fcd77ed345b7eafb431968124ba16e')
|
version('1.10.6', '2e65008c1867b1f47c32f9f814d41706') # libmpi.so.12.0.6
|
||||||
version('1.10.0', '280cf952de68369cebaca886c5ce0304')
|
version('1.10.5', 'd32ba9530a869d9c1eae930882ea1834') # libmpi.so.12.0.5
|
||||||
version('1.8.8', '0dab8e602372da1425e9242ae37faf8c')
|
version('1.10.4', '9d2375835c5bc5c184ecdeb76c7c78ac') # libmpi.so.12.0.4
|
||||||
version('1.6.5', '03aed2a4aa4d0b27196962a2a65fc475')
|
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('ad_lustre_rwcontig_open_source.patch', when="@1.6.5")
|
||||||
patch('llnl-platforms.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")
|
patch('fix_multidef_pmi_class.patch', when="@2.0.0:2.0.1")
|
||||||
|
|
||||||
variant(
|
variant(
|
||||||
@ -120,6 +190,10 @@ class Openmpi(AutotoolsPackage):
|
|||||||
depends_on('jdk', when='+java')
|
depends_on('jdk', when='+java')
|
||||||
depends_on('sqlite', when='+sqlite3@:1.11')
|
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):
|
def url_for_version(self, version):
|
||||||
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (
|
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (
|
||||||
version.up_to(2), version)
|
version.up_to(2), version)
|
||||||
@ -236,7 +310,7 @@ def configure_args(self):
|
|||||||
config_args.append('--disable-mpi-thread-multiple')
|
config_args.append('--disable-mpi-thread-multiple')
|
||||||
|
|
||||||
# CUDA support
|
# CUDA support
|
||||||
if spec.satisfies('@1.6:'):
|
if spec.satisfies('@1.7:'):
|
||||||
if '+cuda' in spec:
|
if '+cuda' in spec:
|
||||||
config_args.append('--with-cuda={0}'.format(
|
config_args.append('--with-cuda={0}'.format(
|
||||||
spec['cuda'].prefix))
|
spec['cuda'].prefix))
|
||||||
|
@ -70,7 +70,9 @@ def install(self, spec, prefix):
|
|||||||
'-DGKLIB_PATH:PATH=%s/GKlib' % spec['metis'].prefix.include,
|
'-DGKLIB_PATH:PATH=%s/GKlib' % spec['metis'].prefix.include,
|
||||||
'-DMETIS_PATH:PATH=%s' % spec['metis'].prefix,
|
'-DMETIS_PATH:PATH=%s' % spec['metis'].prefix,
|
||||||
'-DCMAKE_C_COMPILER:STRING=%s' % spec['mpi'].mpicc,
|
'-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:
|
if '+shared' in spec:
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
# Date: September 6, 2015
|
# Date: September 6, 2015
|
||||||
#
|
#
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
|
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 it does not exist already.
|
||||||
if dependent_spec.package.is_extension:
|
if dependent_spec.package.is_extension:
|
||||||
mkdirp(module.perl_lib_dir)
|
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)
|
||||||
|
@ -40,6 +40,7 @@ class Petsc(Package):
|
|||||||
version('develop', git='https://bitbucket.org/petsc/petsc.git', tag='master')
|
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('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.5', 'f00f6e6a3bac39052350dd47194b58a3')
|
||||||
version('3.7.4', 'aaf94fa54ef83022c14091f10866eedf')
|
version('3.7.4', 'aaf94fa54ef83022c14091f10866eedf')
|
||||||
version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34')
|
version('3.7.2', '50da49867ce7a49e7a0c1b37f4ec7b34')
|
||||||
|
12
var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch
Normal file
12
var/spack/repos/builtin/packages/python/cray-rpath-2.3.patch
Normal file
@ -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
|
15
var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch
Normal file
15
var/spack/repos/builtin/packages/python/cray-rpath-3.1.patch
Normal file
@ -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
|
@ -92,6 +92,10 @@ class Python(AutotoolsPackage):
|
|||||||
# Patch does not work for Python 3.1
|
# Patch does not work for Python 3.1
|
||||||
patch('ncurses.patch', when='@:2.8,3.2:')
|
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_VARS_TO_SAVE = ['LDSHARED']
|
||||||
_DISTUTIL_CACHE_FILENAME = 'sysconfig.json'
|
_DISTUTIL_CACHE_FILENAME = 'sysconfig.json'
|
||||||
_distutil_vars = None
|
_distutil_vars = None
|
||||||
|
@ -38,18 +38,25 @@ class RRmpi(RPackage):
|
|||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
depends_on('r@2.15.1:')
|
depends_on('r@2.15.1:')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
# The following MPI types are not supported
|
||||||
if 'mpich' in spec:
|
conflicts('^intel-mpi')
|
||||||
Rmpi_type = 'MPICH'
|
conflicts('^intel-parallel-studio')
|
||||||
elif 'mvapich' in spec:
|
conflicts('^mvapich2')
|
||||||
Rmpi_type = 'MVAPICH'
|
conflicts('^spectrum-mpi')
|
||||||
else:
|
|
||||||
|
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'
|
Rmpi_type = 'OPENMPI'
|
||||||
|
elif mpi_name == 'mpich':
|
||||||
|
Rmpi_type = 'MPICH2'
|
||||||
|
else:
|
||||||
|
raise InstallError('Unsupported MPI type')
|
||||||
|
|
||||||
my_mpi = spec['mpi']
|
return [
|
||||||
|
'--with-Rmpi-type={0}'.format(Rmpi_type),
|
||||||
R('CMD', 'INSTALL',
|
'--with-mpi={0}'.format(spec['mpi'].prefix),
|
||||||
'--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)
|
|
||||||
|
@ -74,6 +74,8 @@ class R(AutotoolsPackage):
|
|||||||
depends_on('cairo+X', when='+X')
|
depends_on('cairo+X', when='+X')
|
||||||
depends_on('cairo~X', when='~X')
|
depends_on('cairo~X', when='~X')
|
||||||
depends_on('pango')
|
depends_on('pango')
|
||||||
|
depends_on('pango+X', when='+X')
|
||||||
|
depends_on('pango~X', when='~X')
|
||||||
depends_on('freetype')
|
depends_on('freetype')
|
||||||
depends_on('tcl')
|
depends_on('tcl')
|
||||||
depends_on('tk')
|
depends_on('tk')
|
||||||
|
@ -34,6 +34,7 @@ class Slepc(Package):
|
|||||||
homepage = "http://www.grycap.upv.es/slepc"
|
homepage = "http://www.grycap.upv.es/slepc"
|
||||||
url = "http://slepc.upv.es/download/download.php?filename=slepc-3.6.2.tar.gz"
|
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.3', '3ef9bcc645a10c1779d56b3500472ceb66df692e389d635087d30e7c46424df9')
|
||||||
version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2')
|
version('3.7.1', '670216f263e3074b21e0623c01bc0f562fdc0bffcd7bd42dd5d8edbe73a532c2')
|
||||||
version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876')
|
version('3.6.3', '384939d009546db37bc05ed81260c8b5ba451093bf891391d32eb7109ccff876')
|
||||||
|
44
var/spack/repos/builtin/packages/star/package.py
Normal file
44
var/spack/repos/builtin/packages/star/package.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
##############################################################################
|
||||||
|
# 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',
|
||||||
|
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'):
|
||||||
|
make('STAR', 'STARlong')
|
||||||
|
mkdirp(prefix.bin)
|
||||||
|
install('STAR', prefix.bin)
|
||||||
|
install('STARlong', prefix.bin)
|
@ -53,6 +53,9 @@ class SuiteSparse(Package):
|
|||||||
|
|
||||||
patch('tbb_453.patch', when='@4.5.3:+tbb')
|
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):
|
def install(self, spec, prefix):
|
||||||
# The build system of SuiteSparse is quite old-fashioned.
|
# The build system of SuiteSparse is quite old-fashioned.
|
||||||
# It's basically a plain Makefile which include an header
|
# It's basically a plain Makefile which include an header
|
||||||
@ -74,7 +77,8 @@ def install(self, spec, prefix):
|
|||||||
'CUDA=no',
|
'CUDA=no',
|
||||||
'CUDA_PATH={0}'.format(
|
'CUDA_PATH={0}'.format(
|
||||||
spec['cuda'].prefix if '+cuda' in spec else ''
|
spec['cuda'].prefix if '+cuda' in spec else ''
|
||||||
)
|
),
|
||||||
|
'CFOPENMP={0}'.format(self.compiler.openmp_flag)
|
||||||
])
|
])
|
||||||
|
|
||||||
if '+pic' in spec:
|
if '+pic' in spec:
|
||||||
|
12
var/spack/repos/builtin/packages/suite-sparse/pgi.patch
Normal file
12
var/spack/repos/builtin/packages/suite-sparse/pgi.patch
Normal file
@ -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
|
@ -36,6 +36,8 @@ class Tbb(Package):
|
|||||||
|
|
||||||
# Only version-specific URL's work for TBB
|
# Only version-specific URL's work for TBB
|
||||||
# can also use https://github.com/01org/tbb/releases/
|
# 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',
|
version('2017.5', '26f720729d322913912e99d1e4a36bd10625d3ca',
|
||||||
url='https://github.com/01org/tbb/archive/2017_U5.tar.gz')
|
url='https://github.com/01org/tbb/archive/2017_U5.tar.gz')
|
||||||
version('2017.3', '2c451a5bcf6fc31487b98b4b29651c369874277c',
|
version('2017.3', '2c451a5bcf6fc31487b98b4b29651c369874277c',
|
||||||
|
75
var/spack/repos/builtin/packages/vcftools/package.py
Normal file
75
var/spack/repos/builtin/packages/vcftools/package.py
Normal file
@ -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'))
|
95
var/spack/repos/builtin/packages/wt/package.py
Normal file
95
var/spack/repos/builtin/packages/wt/package.py
Normal file
@ -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 <njob>
|
||||||
|
# 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
|
@ -31,8 +31,8 @@ class Xmlto(AutotoolsPackage):
|
|||||||
without remembering many long options and searching for the syntax of the
|
without remembering many long options and searching for the syntax of the
|
||||||
backends."""
|
backends."""
|
||||||
|
|
||||||
homepage = "http://cyberelk.net/tim/software/xmlto/"
|
homepage = "https://pagure.io/xmlto"
|
||||||
url = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-0.0.28.tar.gz"
|
url = "https://releases.pagure.org/xmlto/xmlto-0.0.28.tar.gz"
|
||||||
|
|
||||||
version('0.0.28', 'a1fefad9d83499a15576768f60f847c6')
|
version('0.0.28', 'a1fefad9d83499a15576768f60f847c6')
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ class YamlCpp(CMakePackage):
|
|||||||
url = "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.tar.gz"
|
url = "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.tar.gz"
|
||||||
|
|
||||||
version('0.5.3', '4e47733d98266e46a1a73ae0a72954eb')
|
version('0.5.3', '4e47733d98266e46a1a73ae0a72954eb')
|
||||||
|
version('develop', git='https://github.com/jbeder/yaml-cpp', branch='master')
|
||||||
|
|
||||||
variant('shared', default=True,
|
variant('shared', default=True,
|
||||||
description='Enable build of shared libraries')
|
description='Enable build of shared libraries')
|
||||||
|
@ -41,4 +41,8 @@ class Zeromq(AutotoolsPackage):
|
|||||||
depends_on("libsodium@:1.0.3", when='@:4.1.2')
|
depends_on("libsodium@:1.0.3", when='@:4.1.2')
|
||||||
|
|
||||||
def configure_args(self):
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user