From c3b72c3d7c1557a83da48937306709c17404fa27 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 13 Mar 2014 16:07:38 -0700 Subject: [PATCH 1/5] Added a force_url option for packages that do not have nice URLs --- lib/spack/spack/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 24c3ffd35b..9ea0498a87 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -321,6 +321,9 @@ class SomePackage(Package): """Controls whether install and uninstall check deps before running.""" ignore_dependencies = False + """Dirty hack for forcing packages with uninterpretable URLs""" + force_url = False + def __init__(self, spec): # These attributes are required for all packages. @@ -552,11 +555,15 @@ def url_version(self, version): override this, e.g. for boost versions where you need to ensure that there are _'s in the download URL. """ + if self.force_url: + return self.default_version return str(version) def url_for_version(self, version): """Gives a URL that you can download a new version of this package from.""" + if self.force_url: + return self.url return url.substitute_version(self.__class__.url, self.url_version(version)) From 5d96844e5768db120854bdae36cd223198824ccc Mon Sep 17 00:00:00 2001 From: Matthew LeGendre Date: Thu, 13 Mar 2014 15:50:33 -0700 Subject: [PATCH 2/5] Add launchmon package to spack --- lib/spack/spack/packages/launchmon.py | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/spack/spack/packages/launchmon.py diff --git a/lib/spack/spack/packages/launchmon.py b/lib/spack/spack/packages/launchmon.py new file mode 100644 index 0000000000..7f9c2d611d --- /dev/null +++ b/lib/spack/spack/packages/launchmon.py @@ -0,0 +1,37 @@ +############################################################################## +# Copyright (c) 2014, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Written by Matthew LeGendre, legendre1@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://scalability-llnl.github.io/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 General Public License (as published by +# the Free Software Foundation) version 2.1 dated 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 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 Launchmon(Package): + homepage = "http://sourceforge.net/projects/launchmon" + url = "http://sourceforge.net/code-snapshots/svn/l/la/launchmon/code/launchmon-code-481-branches-launchmon-1.0-release.zip" + list_url = "http://sourceforge.net/p/launchmon/code/HEAD/tree" + + versions = {'1.0.0' : 'e35a7ec62859741cd7dc6237321e7f19'} + + def install(self, spec, prefix): + configure("--prefix=" + prefix) + make() + make("install") From 7d655b5407a2b57503d0f008fb1fd369b6e55713 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 13 Mar 2014 16:09:42 -0700 Subject: [PATCH 3/5] Add force_url option to launchmon for unversioned URL --- lib/spack/spack/packages/launchmon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/packages/launchmon.py b/lib/spack/spack/packages/launchmon.py index 7f9c2d611d..c1a69f67bf 100644 --- a/lib/spack/spack/packages/launchmon.py +++ b/lib/spack/spack/packages/launchmon.py @@ -27,9 +27,10 @@ class Launchmon(Package): homepage = "http://sourceforge.net/projects/launchmon" url = "http://sourceforge.net/code-snapshots/svn/l/la/launchmon/code/launchmon-code-481-branches-launchmon-1.0-release.zip" + force_url = True list_url = "http://sourceforge.net/p/launchmon/code/HEAD/tree" - versions = {'1.0.0' : 'e35a7ec62859741cd7dc6237321e7f19'} + versions = {'1.0.0' : 'a0e5bfb7d82dc708d58bdbf93697886c'} def install(self, spec, prefix): configure("--prefix=" + prefix) From bb9c5a19cf7ba9f5aea754a3d00fabde89ed6d02 Mon Sep 17 00:00:00 2001 From: Matthew LeGendre Date: Thu, 13 Mar 2014 16:38:34 -0700 Subject: [PATCH 4/5] Add build fix patch to launchmon --- .../{launchmon.py => launchmon/__init__.py} | 1 + .../packages/launchmon/patch.lmon_install_dir | 131 ++++++++++++++++++ 2 files changed, 132 insertions(+) rename lib/spack/spack/packages/{launchmon.py => launchmon/__init__.py} (97%) create mode 100644 lib/spack/spack/packages/launchmon/patch.lmon_install_dir diff --git a/lib/spack/spack/packages/launchmon.py b/lib/spack/spack/packages/launchmon/__init__.py similarity index 97% rename from lib/spack/spack/packages/launchmon.py rename to lib/spack/spack/packages/launchmon/__init__.py index c1a69f67bf..6871a55798 100644 --- a/lib/spack/spack/packages/launchmon.py +++ b/lib/spack/spack/packages/launchmon/__init__.py @@ -31,6 +31,7 @@ class Launchmon(Package): list_url = "http://sourceforge.net/p/launchmon/code/HEAD/tree" versions = {'1.0.0' : 'a0e5bfb7d82dc708d58bdbf93697886c'} + patch('patch.lmon_install_dir', level=0) def install(self, spec, prefix): configure("--prefix=" + prefix) diff --git a/lib/spack/spack/packages/launchmon/patch.lmon_install_dir b/lib/spack/spack/packages/launchmon/patch.lmon_install_dir new file mode 100644 index 0000000000..4a647e8e60 --- /dev/null +++ b/lib/spack/spack/packages/launchmon/patch.lmon_install_dir @@ -0,0 +1,131 @@ +Index: launchmon/src/linux/lmon_api/Makefile.am +=================================================================== +--- launchmon/src/linux/lmon_api/Makefile.am (revision 481) ++++ launchmon/src/linux/lmon_api/Makefile.am (working copy) +@@ -80,13 +80,10 @@ + libmonfeapi_la_CFLAGS = $(AM_CFLAGS) + libmonfeapi_la_CXXFLAGS = $(AM_CXXFLAGS) + +-libmonfeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ +- -L$(top_srcdir)/@GCRYPTLOC@ \ +- -L$(top_srcdir)/@GPGERRLOC@ \ +- $(AM_LDFLAGS) \ +- -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ ++libmonfeapi_la_LDFLAGS = $(AM_LDFLAGS) \ ++ -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ + +-libmonfeapi_la_LIBADD = @LIBPTHREAD@ @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ @LIBRT@ ++libmonfeapi_la_LIBADD = @LIBPTHREAD@ $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ @LIBRT@ + + libmonbeapi_la_SOURCES = lmon_be.cxx \ + lmon_daemon_internal.cxx \ +@@ -113,13 +110,10 @@ + libmonbeapi_la_CFLAGS = $(AM_CFLAGS) + libmonbeapi_la_CXXFLAGS = $(AM_CXXFLAGS) + +-libmonbeapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ +- -L$(top_srcdir)/@GCRYPTLOC@ \ +- -L$(top_srcdir)/@GPGERRLOC@ \ +- $(AM_LDFLAGS) \ ++libmonbeapi_la_LDFLAGS = $(AM_LDFLAGS) \ + -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ + +-libmonbeapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ ++libmonbeapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ + + + # +@@ -146,10 +140,8 @@ + + libmonmwapi_la_CXXFLAGS = $(AM_CXXFLAGS) + +-libmonmwapi_la_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ \ +- -L$(top_srcdir)/@GCRYPTLOC@ \ +- -L$(top_srcdir)/@GPGERRLOC@ \ +- $(AM_LDFLAGS) \ ++libmonmwapi_la_LDFLAGS = $(AM_LDFLAGS) \ + -version-info @LMON_CURRENT@:@LMON_REVISION@:@LMON_AGE@ + +-libmonmwapi_la_LIBADD = @LIBCOMM@ @LIBGCRYPT@ @LIBGPGERR@ ++ ++libmonmwapi_la_LIBADD = $(top_builddir)/@COMMLOC@/@LIBCOMM@ $(top_builddir)/@GCRYPTLOC@/@LIBGCRYPT@ $(top_builddir)/@GPGERRLOC@/@LIBGPGERR@ +Index: tools/cobo/test/Makefile.am +=================================================================== +--- tools/cobo/test/Makefile.am (revision 481) ++++ tools/cobo/test/Makefile.am (working copy) +@@ -37,12 +37,12 @@ + + client_SOURCES = client.c + +-client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++client_LDFLAGS = + +-client_LDADD = @LIBCOMM@ ++client_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ + + server_rsh_SOURCES = server_rsh.c + +-server_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++server_rsh_LDFLAGS = + +-server_rsh_LDADD = @LIBCOMM@ ++server_rsh_LDADD = $(top_srcdir)/@COMMLOC@/@LIBCOMM@ +Index: tools/pmgr_collective/test/Makefile.am +=================================================================== +--- tools/pmgr_collective/test/Makefile.am (revision 481) ++++ tools/pmgr_collective/test/Makefile.am (working copy) +@@ -31,18 +31,18 @@ + ## Jun 10 2008 DHA: Copied from the old Makefile. + ## + +-INCLUDES = -I$(top_srcdir)/@COMMLOC@ ++INCLUDES = + + noinst_PROGRAMS = client mpirun_rsh + + client_SOURCES = client.c + +-client_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++client_LDFLAGS = + +-client_LDADD = @LIBCOMM@ ++client_LDADD = @COMMLOC@/@LIBCOMM@ + + mpirun_rsh_SOURCES = mpirun_rsh.c + +-mpirun_rsh_LDFLAGS = -L$(top_srcdir)/@COMMLOC@ ++mpirun_rsh_LDFLAGS = + +-mpirun_rsh_LDADD = @LIBCOMM@ ++mpirun_rsh_LDADD = @COMMLOC@/@LIBCOMM@ +Index: config/x_ac_bootfabric.m4 +=================================================================== +--- config/x_ac_bootfabric.m4 (revision 481) ++++ config/x_ac_bootfabric.m4 (working copy) +@@ -63,7 +63,7 @@ + #AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) + #AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) + #AC_SUBST(COMMLOC, tools/pmgr_collective/src) +- #AC_SUBST(LIBCOMM, -lpmgr_collective) ++ #AC_SUBST(LIBCOMM, libcobo.la) + #else + commfab_found="no" + AC_MSG_ERROR([--with-bootfabric=pmgr is given, but pmgr_collective has been deprecated]) +@@ -87,7 +87,7 @@ + AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) + AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) + AC_SUBST(COMMLOC, tools/cobo/src) +- AC_SUBST(LIBCOMM, -lcobo) ++ AC_SUBST(LIBCOMM, libcobo.la) + + if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then + AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) +@@ -117,7 +117,7 @@ + AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV]) + AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV]) + AC_SUBST(COMMLOC, tools/cobo/src) +- AC_SUBST(LIBCOMM, -lcobo) ++ AC_SUBST(LIBCOMM, libcobo.la) + + if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then + AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) From 759d33ac5baa97b5fdac7929c60728c15b5f24b5 Mon Sep 17 00:00:00 2001 From: "Gregory L. Lee" Date: Fri, 14 Mar 2014 12:04:27 -0700 Subject: [PATCH 5/5] fixes for launchmon build --- lib/spack/spack/packages/launchmon/__init__.py | 8 +++++++- .../packages/launchmon/patch.lmon_install_dir | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/packages/launchmon/__init__.py b/lib/spack/spack/packages/launchmon/__init__.py index 6871a55798..e2b82610fd 100644 --- a/lib/spack/spack/packages/launchmon/__init__.py +++ b/lib/spack/spack/packages/launchmon/__init__.py @@ -30,10 +30,16 @@ class Launchmon(Package): force_url = True list_url = "http://sourceforge.net/p/launchmon/code/HEAD/tree" - versions = {'1.0.0' : 'a0e5bfb7d82dc708d58bdbf93697886c'} + #versions = {'1.0.0' : 'a0e5bfb7d82dc708d58bdbf93697886c'} + versions = {'1.0.0' : '9d1184397d3081b94e2c0577c3c605e5'} patch('patch.lmon_install_dir', level=0) def install(self, spec, prefix): configure("--prefix=" + prefix) + + # TODO: remove once Jira SPACK-19 is fixed + import shutil + shutil.copy2('/usr/bin/libtool', 'libtool') + make() make("install") diff --git a/lib/spack/spack/packages/launchmon/patch.lmon_install_dir b/lib/spack/spack/packages/launchmon/patch.lmon_install_dir index 4a647e8e60..8a1d93fdc9 100644 --- a/lib/spack/spack/packages/launchmon/patch.lmon_install_dir +++ b/lib/spack/spack/packages/launchmon/patch.lmon_install_dir @@ -129,3 +129,19 @@ Index: config/x_ac_bootfabric.m4 if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then AC_DEFINE(COBO_BEGIN_PORT, $with_cobo_port, [Define a beginning port for COBO_BASED]) +Index: config/x_ac_gcrpyt.m4 +=================================================================== +--- config/x_ac_gcrypt.m4 2011-10-22 00:50:38.000000000 -0700 ++++ config/x_ac_gcrypt.patched.m4 2014-03-14 11:33:59.189220000 -0700 +@@ -55,8 +55,8 @@ + AC_CONFIG_SUBDIRS([tools/libgpg-error]) + AC_SUBST(GPGERRLOC, [tools/libgpg-error/src]) + AC_SUBST(GCRYPTLOC, [tools/libgcrypt/src]) +- AC_SUBST(LIBGCRYPT, [-lgcrypt]) +- AC_SUBST(LIBGPGERR, [-lgpg-error]) ++ AC_SUBST(LIBGCRYPT, [libgcrypt.la]) ++ AC_SUBST(LIBGPGERR, [libgpg-error.la]) + gcrypt_configured="yes" + else + AC_MSG_ERROR([tools/libgpg-error or tools/libgcrypt not found]) +