Flux v0.11.1 - v0.11.3 (#13199)

* flux: add `url_for_version` to support their C4 repo model

Flux uses a fork of ZeroMQ's Collective Code Construction Contract
(https://github.com/flux-framework/rfc/blob/master/spec_1.adoc).
This model requires a repository fork for every stable release that has
patch releases.  For example, 0.8.0 and 0.9.0 are both tags within the
main repository, but 0.8.1 and 0.9.5 would be releases on the v0.8 and
v0.9 forks, respectively.

* flux: add latest versions

* flux: remove master from `when=@0.X:,master` statements

Now that #1983 has been merged, master > 0.X.0.

* flux-core: remove extraneous `99` patch version in `when` range

Replace `when=@:0.11.99` with `when=@:0.11` since the intention is to
include all patch versions of `0.11`.

* flux-core: fix `setup_build_environment` after changes in #13411

In #13411, `setup_environment` was split into `setup_build_environment`
and `setup_run_environment`, with the `spack_env` and `run_env`
arguments being changed to `env`.  Somehow the flux package was the only
one to not have its `spack_env` references in the function changed to
`env`.

* flux: add runtime environment variables that Flux checks

with older versions of Flux (i.e, 0.0:0.13), FLUX_CONNECTOR_PATH must be
set by spack to prevent failures in certain
scenarios (https://github.com/flux-framework/flux-core/issues/2456).

the flux binary also sets some other environment variables, which can be
listed by running `flux -v start`.  I added a few of those just to be
sure that the Spack-installed paths are used, rather than
system-installed ones.

* flux: add optional testing dependencies to maximize test coverage

Install optional dependencies to ensure that only spack-installed
software is detected and that all tests are run when `spack install
--test` is used.

Flux's test suite will test for the existance of valgrind, jq, and any
MPI installation.  If it detects them (even if they are system-installed
and outside the spack environment), it will run optional tests against
them.  I noticed on my machine that the valgrind tests were running
against the system-install valgrind.

* flux-sched: switch to new `setup_run_environment` API
This commit is contained in:
Stephen Herbein 2019-11-04 07:58:40 -08:00 committed by Adam J. Stewart
parent 903b0071cf
commit 19410461b7
2 changed files with 87 additions and 21 deletions

View File

@ -14,7 +14,10 @@ class FluxCore(AutotoolsPackage):
url = "https://github.com/flux-framework/flux-core/releases/download/v0.8.0/flux-core-0.8.0.tar.gz"
git = "https://github.com/flux-framework/flux-core.git"
version('master', branch='master')
version('master', branch='master')
version('0.11.3', sha256='91b5d7dca8fc28a77777c4e4cb8717fc3dc2c174e70611740689a71901c6de7e')
version('0.11.2', sha256='ab8637428cd9b74b2dff4842d10e0fc4acc8213c4e51f31d32a4cbfbdf730412')
version('0.11.1', sha256='3c8495db0f3b701f6dfe3e2a75aed794fc561e9f28284e8c02ac67693bfe890e')
version('0.11.0', sha256='a4d8ff92e79b4ca19d556395bb8c5f8dc02fd9d5a8cc38c4a2c66867a96de5ea')
version('0.10.0', sha256='a70cdd228077af60c9443a5c69d3da932e447dd11697f5fef9028c48dabb3041')
version('0.9.0', sha256='7b5b4aa72704b3c4432136b9e515e0d663568e6dbfc3ecd2f91c83b65841104e')
@ -29,8 +32,8 @@ class FluxCore(AutotoolsPackage):
depends_on("libzmq@4.0.4:")
depends_on("czmq")
depends_on("czmq@2.2:3.99", when="@0.1:0.6.99")
depends_on("czmq@3.0.1:", when="@0.7:,master")
depends_on("czmq@2.2:3.99", when="@0.1:0.6")
depends_on("czmq@3.0.1:", when="@0.7:")
depends_on("hwloc@1.11.1:1.99")
depends_on("hwloc +cuda", when='+cuda')
# Provide version hints for lua so that the concretizer succeeds when no
@ -42,15 +45,15 @@ class FluxCore(AutotoolsPackage):
depends_on("munge", when="@0.1.0:0.10.0")
depends_on("python", type=('build', 'run'))
depends_on("python@2.7:2.99", when="@0.1.0:0.11.0")
depends_on("python@2.7:", when="@0.11.1:,master")
depends_on("python@2.7:", when="@0.11.1:")
depends_on("py-cffi", type=('build', 'run'))
depends_on("py-six", type=('build', 'run'), when="@0.11.0:,master")
depends_on("py-pyyaml", type=('build', 'run'), when="@0.11.0:,master")
depends_on("py-jsonschema", type=('build', 'run'), when="@master")
depends_on("py-six", type=('build', 'run'), when="@0.11.0:")
depends_on("py-pyyaml", type=('build', 'run'), when="@0.11.0:")
depends_on("py-jsonschema", type=('build', 'run'), when="@0.12.0:")
depends_on("jansson")
depends_on("pkgconfig")
depends_on("yaml-cpp", when="@:0.11.0")
depends_on("lz4", when="@0.11.0:,master")
depends_on("yaml-cpp", when="@:0.11")
depends_on("lz4", when="@0.11.0:")
# versions up to 0.8.0 uses pylint to check Flux's python binding
# later versions provide a configure flag and disable the check by default
@ -63,6 +66,29 @@ class FluxCore(AutotoolsPackage):
depends_on("automake", type='build', when='@master')
depends_on("libtool", type='build', when='@master')
# Testing Dependencies
depends_on("mpich pmi=pmi", type="test")
depends_on("valgrind", type="test")
depends_on("jq", type="test", when='@0.12.0:')
def url_for_version(self, version):
'''
Flux uses a fork of ZeroMQ's Collective Code Construction Contract
(https://github.com/flux-framework/rfc/blob/master/spec_1.adoc).
This model requires a repository fork for every stable release that has
patch releases. For example, 0.8.0 and 0.9.0 are both tags within the
main repository, but 0.8.1 and 0.9.5 would be releases on the v0.8 and
v0.9 forks, respectively.
Rather than provide an explicit URL for each patch release, make Spack
aware of this repo structure.
'''
if version[-1] == 0:
url = "https://github.com/flux-framework/flux-core/releases/download/v{0}/flux-core-{0}.tar.gz"
else:
url = "https://github.com/flux-framework/flux-core-v{1}/releases/download/v{0}/flux-core-{0}.tar.gz"
return url.format(version.up_to(3), version.up_to(2))
def setup(self):
pass
@ -97,7 +123,7 @@ def lua_lib_dir(self):
def setup_build_environment(self, env):
# Ensure ./fluxometer.lua can be found during flux's make check
spack_env.append_path('LUA_PATH', './?.lua', separator=';')
env.append_path('LUA_PATH', './?.lua', separator=';')
def setup_run_environment(self, env):
env.prepend_path(
@ -118,6 +144,26 @@ def setup_run_environment(self, env):
env.prepend_path('FLUX_MODULE_PATH', self.prefix.lib.flux.modules)
env.prepend_path('FLUX_EXEC_PATH', self.prefix.libexec.flux.cmd)
env.prepend_path('FLUX_RC_PATH', self.prefix.etc.flux)
env.prepend_path('FLUX_RC1_PATH', self.prefix.etc.flux.rc1)
env.prepend_path('FLUX_RC3_PATH', self.prefix.etc.flux.rc3)
env.prepend_path(
'FLUX_CONNECTOR_PATH',
self.prefix.lib.flux.connectors
)
env.prepend_path(
'FLUX_PMI_LIBRARY_PATH',
os.path.join(self.prefix.lib.flux, "libpmi.so")
)
# Wreck was removed in 0.12
if self.version < Version("0.12.0"):
env.prepend_path(
'FLUX_WREXECD_PATH',
self.prefix.libexec.flux.wrexecd
)
env.prepend_path(
'FLUX_WRECK_LUA_PATTERN',
os.path.join(self.prefix.etc.wreck, "lua.d", "*.lua")
)
def configure_args(self):
args = ['--enable-pylint=no']

View File

@ -15,6 +15,7 @@ class FluxSched(AutotoolsPackage):
git = "https://github.com/flux-framework/flux-sched.git"
version('master', branch='master')
version('0.7.1', sha256='a35e555a353feed6b7b814ae83d05362356f9ee33ffa75d7dfb7e2fe86c21294')
version('0.7.0', sha256='69267a3aaacaedd9896fd90cfe17aef266cba4fb28c77f8123d95a31ce739a7b')
version('0.6.0', sha256='3301d4c10810414228e5969b84b75fe1285abb97453070eb5a77f386d8184f8d')
version('0.5.0', sha256='d6347f5c85c12c76364dccb39d63c007094ca9cbbbae4e8f4e98d8b1c0b07e89')
@ -26,9 +27,9 @@ class FluxSched(AutotoolsPackage):
variant('cuda', default=False, description='Build dependencies with support for CUDA')
depends_on("boost+graph@1.53.0,1.59.0:", when='@0.5.0:,master')
depends_on("py-pyyaml", when="@0.7.0:,master")
depends_on("libxml2@2.9.1:", when="@0.6.0,master")
depends_on("boost+graph@1.53.0,1.59.0:", when='@0.5.0:')
depends_on("py-pyyaml", when="@0.7.0:")
depends_on("libxml2@2.9.1:", when="@0.6.0")
depends_on("yaml-cpp", when="@0.7.0:")
depends_on("libuuid")
depends_on("pkgconfig")
@ -39,6 +40,7 @@ class FluxSched(AutotoolsPackage):
depends_on("flux-core@0.9.0", when='@0.5.0')
depends_on("flux-core@0.10.0", when='@0.6.0')
depends_on("flux-core@0.11.0", when='@0.7.0')
depends_on("flux-core@0.11.2:0.11.99", when='@0.7.1')
depends_on("flux-core@master", when='@master')
# Need autotools when building on master:
@ -46,6 +48,24 @@ class FluxSched(AutotoolsPackage):
depends_on("automake", type='build', when='@master')
depends_on("libtool", type='build', when='@master')
def url_for_version(self, version):
'''
Flux uses a fork of ZeroMQ's Collective Code Construction Contract
(https://github.com/flux-framework/rfc/blob/master/spec_1.adoc).
This model requires a repository fork for every stable release that has
patch releases. For example, 0.8.0 and 0.9.0 are both tags within the
main repository, but 0.8.1 and 0.9.5 would be releases on the v0.8 and
v0.9 forks, respectively.
Rather than provide an explicit URL for each patch release, make Spack
aware of this repo structure.
'''
if version[-1] == 0:
url = "https://github.com/flux-framework/flux-sched/releases/download/v{0}/flux-sched-{0}.tar.gz"
else:
url = "https://github.com/flux-framework/flux-sched-v{1}/releases/download/v{0}/flux-sched-{0}.tar.gz"
return url.format(version.up_to(3), version.up_to(2))
def setup(self):
pass
@ -86,18 +106,18 @@ def lua_share_dir(self):
def lua_lib_dir(self):
return os.path.join('lib', 'lua', str(self.lua_version))
def setup_environment(self, spack_env, run_env):
run_env.prepend_path(
def setup_run_environment(self, env):
env.prepend_path(
'LUA_PATH',
os.path.join(self.spec.prefix, self.lua_share_dir, '?.lua'),
separator=';')
run_env.prepend_path(
env.prepend_path(
'LUA_CPATH',
os.path.join(self.spec.prefix, self.lua_lib_dir, '?.so'),
separator=';')
run_env.prepend_path('FLUX_MODULE_PATH', self.prefix.lib.flux.modules)
run_env.prepend_path('FLUX_MODULE_PATH',
self.prefix.lib.flux.modules.sched)
run_env.prepend_path('FLUX_EXEC_PATH', self.prefix.libexec.flux.cmd)
run_env.prepend_path('FLUX_RC_EXTRA', self.prefix.etc.flux)
env.prepend_path('FLUX_MODULE_PATH', self.prefix.lib.flux.modules)
env.prepend_path('FLUX_MODULE_PATH',
self.prefix.lib.flux.modules.sched)
env.prepend_path('FLUX_EXEC_PATH', self.prefix.libexec.flux.cmd)
env.prepend_path('FLUX_RC_EXTRA', self.prefix.etc.flux)