process-in-process: overhaul package recipe (#32347)
This commit is contained in:
parent
e2468c8928
commit
14e99a1a5d
1 changed files with 132 additions and 116 deletions
|
@ -9,14 +9,25 @@
|
||||||
class ProcessInProcess(Package):
|
class ProcessInProcess(Package):
|
||||||
"""Process-in-Process"""
|
"""Process-in-Process"""
|
||||||
|
|
||||||
homepage = "https://github.com/RIKEN-SysSoft/PiP"
|
# we cannot install pip-gdb (pip-aware gdb)
|
||||||
git = "https://github.com/RIKEN-SysSoft/PiP.git"
|
# since the ncureses package cannot be installed by using Spack
|
||||||
|
# --> https://github.com/spack/spack/issues/8675
|
||||||
|
variant("pipgdb", default=False, sticky=True, description="PiP-gdb")
|
||||||
|
|
||||||
|
homepage = "https://github.com/procinproc/procinproc.github.io"
|
||||||
|
git = "https://github.com/procinproc/PiP.git"
|
||||||
|
|
||||||
maintainers = ["ahori"]
|
maintainers = ["ahori"]
|
||||||
|
|
||||||
|
conflicts("platform=darwin", msg="Darwin is not supported.")
|
||||||
|
conflicts("platform=windows", msg="Windows is not supported.")
|
||||||
|
|
||||||
# PiP version 1 is obsolete
|
# PiP version 1 is obsolete
|
||||||
|
version("1", branch="pip-1", deprecated=True)
|
||||||
|
# PiP version 2 is stable one
|
||||||
version("2", branch="pip-2", preferred=True)
|
version("2", branch="pip-2", preferred=True)
|
||||||
version("3", branch="pip-3") # experimental
|
# PiP version 3 is experimental and unstable yet
|
||||||
|
version("3", branch="pip-3", deprecated=True)
|
||||||
|
|
||||||
conflicts("%gcc@:3", when="os=centos7")
|
conflicts("%gcc@:3", when="os=centos7")
|
||||||
conflicts("%gcc@5:", when="os=centos7")
|
conflicts("%gcc@5:", when="os=centos7")
|
||||||
|
@ -28,22 +39,26 @@ class ProcessInProcess(Package):
|
||||||
conflicts("%gcc@9:", when="os=rhel8")
|
conflicts("%gcc@9:", when="os=rhel8")
|
||||||
|
|
||||||
# packages required for building PiP-gdb
|
# packages required for building PiP-gdb
|
||||||
depends_on("texinfo", type="build")
|
with when("+pipgdb"):
|
||||||
depends_on("systemtap")
|
depends_on("ncurses")
|
||||||
|
depends_on("texinfo")
|
||||||
|
depends_on("systemtap")
|
||||||
|
depends_on("libxml2")
|
||||||
|
depends_on("pigz")
|
||||||
|
|
||||||
# resources for PiP version 2
|
# resources for PiP version 2
|
||||||
# PiP-glibc resource
|
# PiP-glibc resource
|
||||||
# for rhel/centos 7
|
# for rhel/centos 7
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.17-260.el7.pip.branch",
|
branch="centos/glibc-2.17-260.el7.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@2 os=centos7",
|
when="@2 os=centos7",
|
||||||
)
|
)
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.17-260.el7.pip.branch",
|
branch="centos/glibc-2.17-260.el7.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@2 os=rhel7",
|
when="@2 os=rhel7",
|
||||||
|
@ -51,133 +66,135 @@ class ProcessInProcess(Package):
|
||||||
# for rhel/centos 8
|
# for rhel/centos 8
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@2 os=centos8",
|
when="@2 os=centos8",
|
||||||
)
|
)
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@2 os=rhel8",
|
when="@2 os=rhel8",
|
||||||
)
|
)
|
||||||
|
|
||||||
# PiP-gdb resource
|
with when("+pipgdb"):
|
||||||
# for rhel/centos 7
|
# PiP-gdb resource
|
||||||
resource(
|
# for rhel/centos 7
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
||||||
when="@2 os=centos7",
|
destination="PiP-gdb",
|
||||||
)
|
when="@2 os=centos7",
|
||||||
resource(
|
)
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
||||||
when="@2 os=rhel7",
|
destination="PiP-gdb",
|
||||||
)
|
when="@2 os=rhel7",
|
||||||
# for rhel/centos 8
|
)
|
||||||
resource(
|
# for rhel/centos 8
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-8.2-12.el8.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-8.2-12.el8.pip.branch",
|
||||||
when="@2 os=centos8",
|
destination="PiP-gdb",
|
||||||
)
|
when="@2 os=centos8",
|
||||||
resource(
|
)
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-8.2-12.el8.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-8.2-12.el8.pip.branch",
|
||||||
when="@2 os=rhel8",
|
destination="PiP-gdb",
|
||||||
)
|
when="@2 os=rhel8",
|
||||||
|
)
|
||||||
|
|
||||||
# resources for PiP version 3
|
# resources for PiP version 3
|
||||||
# PiP-glibc resource
|
# PiP-glibc resource
|
||||||
# for rhel/centos 7
|
# for rhel/centos 7
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.17-260.el7.pip.branch",
|
branch="centos/glibc-2.17-260.el7.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@3 os=centos7",
|
when="@3 os=centos7",
|
||||||
)
|
)
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.17-260.el7.pip.branch",
|
branch="centos/glibc-2.17-260.el7.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@3 os=rhel7",
|
when="@3 os=rhel7",
|
||||||
)
|
)
|
||||||
# for rhel/centos 8
|
# for rhel/centos 8
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@3 os=centos8",
|
when="@3 os=centos8",
|
||||||
)
|
)
|
||||||
resource(
|
resource(
|
||||||
name="PiP-glibc",
|
name="PiP-glibc",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-glibc.git",
|
git="https://github.com/procinproc/PiP-glibc.git",
|
||||||
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
branch="centos/glibc-2.28-72.el8_1.1.pip.branch",
|
||||||
destination="PiP-glibc",
|
destination="PiP-glibc",
|
||||||
when="@3 os=rhel8",
|
when="@3 os=rhel8",
|
||||||
)
|
)
|
||||||
|
|
||||||
# PiP-gdb resource
|
with when("+pipgdb"):
|
||||||
# for rhel/centos 7
|
# PiP-gdb resource
|
||||||
resource(
|
# for rhel/centos 7
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
||||||
when="@3 os=centos7",
|
destination="PiP-gdb",
|
||||||
)
|
when="@3 os=centos7",
|
||||||
resource(
|
)
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-7.6.1-94.el7.pip.branch",
|
||||||
when="@3 os=rhel7",
|
destination="PiP-gdb",
|
||||||
)
|
when="@3 os=rhel7",
|
||||||
# for rhel/centos 8
|
)
|
||||||
resource(
|
# for rhel/centos 8
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-8.2-12.el8.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-8.2-12.el8.pip.branch",
|
||||||
when="@3 os=centos8",
|
destination="PiP-gdb",
|
||||||
)
|
when="@3 os=centos8",
|
||||||
resource(
|
)
|
||||||
name="PiP-gdb",
|
resource(
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-gdb.git",
|
name="PiP-gdb",
|
||||||
branch="centos/gdb-8.2-12.el8.pip.branch",
|
git="https://github.com/procinproc/PiP-gdb.git",
|
||||||
destination="PiP-gdb",
|
branch="centos/gdb-8.2-12.el8.pip.branch",
|
||||||
when="@3 os=rhel8",
|
destination="PiP-gdb",
|
||||||
)
|
when="@3 os=rhel8",
|
||||||
|
)
|
||||||
|
|
||||||
# PiP testsuite (agnostic with PiP and OS versions)
|
# PiP testsuite (agnostic with PiP and OS versions)
|
||||||
resource(
|
resource(
|
||||||
name="PiP-Testsuite",
|
name="PiP-Testsuite",
|
||||||
git="https://github.com/RIKEN-SysSoft/PiP-Testsuite.git",
|
git="https://github.com/procinproc/PiP-Testsuite.git",
|
||||||
destination="PiP-Testsuite",
|
destination="PiP-Testsuite",
|
||||||
)
|
)
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
"Install Process-in-Process including PiP-glibc, PiP-gdb"
|
"Install Process-in-Process including PiP-glibc (, PiP-gdb)"
|
||||||
|
|
||||||
# checking os and arch
|
# checking os and arch
|
||||||
arch = self.spec.architecture
|
arch = self.spec.architecture
|
||||||
target = self.spec.target
|
target = self.spec.target
|
||||||
if arch.os not in ["centos7", "rhel7", "centos8", "rhel8"]:
|
if arch.os not in ["centos7", "rhel7", "centos8", "rhel8"]:
|
||||||
raise InstallError("PIP only supports rhel/centos 7 and 8")
|
raise InstallError("PiP only supports rhel/centos 7 and 8")
|
||||||
if target.family not in ["x86_64", "aarch64"]:
|
if target.family not in ["x86_64", "aarch64"]:
|
||||||
raise InstallError("PIP only supports x86_64 and aarch64")
|
raise InstallError("PiP only supports x86_64 and aarch64")
|
||||||
|
|
||||||
bash = which("bash")
|
bash = which("bash")
|
||||||
|
|
||||||
|
@ -194,6 +211,14 @@ def install(self, spec, prefix):
|
||||||
# installing already-doxygen-ed documents (man pages, html, ...)
|
# installing already-doxygen-ed documents (man pages, html, ...)
|
||||||
make("doc")
|
make("doc")
|
||||||
|
|
||||||
|
with when("+pipgdb" in spec):
|
||||||
|
# installing PiP-gdb
|
||||||
|
with working_dir(join_path("PiP-gdb", "PiP-gdb")):
|
||||||
|
# build.sh does build and install
|
||||||
|
bash("build.sh", "--prefix=%s" % prefix, "--with-pip=%s" % prefix)
|
||||||
|
# testing PiP-gdb
|
||||||
|
bash("test.sh", parallel=False)
|
||||||
|
|
||||||
# testing PiP by using PiP-Testsuite (another repo), no need install
|
# testing PiP by using PiP-Testsuite (another repo), no need install
|
||||||
with working_dir(join_path("PiP-Testsuite", "PiP-Testsuite")):
|
with working_dir(join_path("PiP-Testsuite", "PiP-Testsuite")):
|
||||||
bash("configure", "--with-pip=%s" % prefix)
|
bash("configure", "--with-pip=%s" % prefix)
|
||||||
|
@ -201,12 +226,3 @@ def install(self, spec, prefix):
|
||||||
make()
|
make()
|
||||||
# and run the test programs
|
# and run the test programs
|
||||||
make("test10", parallel=False)
|
make("test10", parallel=False)
|
||||||
|
|
||||||
# installing PiP-gdb
|
|
||||||
with working_dir(join_path("PiP-gdb", "PiP-gdb")):
|
|
||||||
# build.sh does build and install
|
|
||||||
bash("build.sh", "--prefix=%s" % prefix, "--with-pip=%s" % prefix)
|
|
||||||
# testing PiP-gdb
|
|
||||||
bash("test.sh", parallel=False)
|
|
||||||
|
|
||||||
# all done !!
|
|
||||||
|
|
Loading…
Reference in a new issue