diff --git a/containers/builder/Dockerfile b/containers/builder/Dockerfile index 1d6e0adcdc6d425a98bafb1089be9fe9dc9624b9..3adcd9f1595aa9261e24b4ec9a2532a7d0a64654 100644 --- a/containers/builder/Dockerfile +++ b/containers/builder/Dockerfile @@ -1,6 +1,6 @@ # Builder with Argonne EIC software # -FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_spack:snapshot-20201117 +FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_spack:snapshot-20210111 LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ name="eic_builder" \ @@ -11,7 +11,7 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ ENV DOCKERFILE_BASE=debian \ DOCKERFILE_DISTRO=debian \ - DOCKERFILE_DISTRO_VERSION=20201117-testing \ + DOCKERFILE_DISTRO_VERSION=20210111-testing \ SPACK_ROOT=/opt/spack \ DEBIAN_FRONTEND=noninteractive \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ @@ -28,10 +28,6 @@ RUN apt-get -yqq update \ ## Setup our environment definition COPY spack.yaml /opt/spack-environment/spack.yaml -## Utility script to update the build cache -## TODO: move this upstream to debian_spack -COPY update_buildcache.sh /usr/sbin/update_buildcache - ## Ensure an up-to-date custom package list ## TODO: We should just remove this from the upstream container ## and only initialize the custom packages here for more diff --git a/containers/builder/spack.yaml b/containers/builder/spack.yaml index 068782a2b235d910de425cddcf6b4eca58b1c7be..f215c3147563acbefded3d3fea4f4180e39f9f60 100644 --- a/containers/builder/spack.yaml +++ b/containers/builder/spack.yaml @@ -1,6 +1,6 @@ spack: specs: - - cmake@3.18.4 + - cmake@3.18.1 - fmt@7.1.2 cxxstd=17 - spdlog@1.5.0 - nlohmann-json@3.9.1 @@ -23,7 +23,7 @@ spack: - podio@0.13 - geant4@10.6.2 cxxstd=17 +opengl +vecgeom +x11 +qt ^qt +opengl - dd4hep@1.14.1 +geant4 +assimp +hepmc3 +ipo - - acts@1.02.0 +dd4hep +digitization +identification +json +tgeo +ipo ^eigen@3.3.7 + - acts@1.02.0 +dd4hep +digitization +identification +json +tgeo +ipo - gaudi@34.0 - dawn@3_91a - dawncut@1_54a diff --git a/containers/builder/update_buildcache.sh b/containers/builder/update_buildcache.sh deleted file mode 100755 index a82d9c7a9e288b070786fbde2af7d6e62ffd0ad0..0000000000000000000000000000000000000000 --- a/containers/builder/update_buildcache.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -## Update the spack buildcache with the contents of this image -## Note: this needs to be run manually from the CI machine with -## all relevant directories mounted into the image. - -## info of spack installation on CI machine -GLOBAL_SPACK_ROOT=/lab/opt/spack -LOCAL_SPACK_ROOT=/opt/spack -SPACK_MIRROR=$GLOBAL_SPACK_ROOT/var/mirror - -## two use cases: -## 1. arguments supplied --> update the packages in the arguments -## 2. no arguments supplied --> update all packages - -function print_the_help() { - echo "USAGE: $0 [-h] [packages ...]" - echo "" - echo " Update the spack buildcache with contents of this image." - echo " If no packages are supplied on the command line, create" - echo " cache for *all* packages in this image" - exit -} - - -positional=("$@") -while [ $# -gt 0 ]; do - key="$1" - case $key in - *-h|--help) - print_the_help - exit 0 - shift - ;; - *) # unknown option, do nothing - shift - ;; - esac -done -set -- "${positional[@]}" - -## setup GPG to sign packages -rm -rf $LOCAL_SPACK_ROOT/opt/spack/gpg -cp -r $GLOBAL_SPACK_ROOT/opt/spack/gpg $LOCAL_SPACK_ROOT/opt/spack/gpg - -## case 1: no argument --> export all -if [ $# -eq 0 ]; then - ## list all available packages - spack find > tmp.manifest.txt - - ## trim off the first line, trim off the version info - ## and replace newlines with spaces - tail -n +2 tmp.manifest.txt | sed "s/@.+//" | tr '\n' ' ' > tmp.packages.txt - rm tmp.manifest.txt -## case 2: update requested packages only -else - echo $@ > tmp.packages.txt -fi - -## now generate the buildcache (this will take a while) -cat tmp.packages.txt | xargs spack buildcache create -a -f -d $SPACK_MIRROR -spack buildcache update-index -d /lab/opt/spack/var/mirror -rm tmp.packages.txt - -## That's all! diff --git a/containers/release/Dockerfile.in b/containers/release/Dockerfile.in index 4888e53f3ea9e19c168595cd03dc40250c8a8825..86147aa56fd552b0abe2936259c15a8c459cf9dd 100644 --- a/containers/release/Dockerfile.in +++ b/containers/release/Dockerfile.in @@ -11,7 +11,7 @@ RUN cd /opt/spack-environment && spack env activate . && spack gc -y #grep 'x-executable\|x-archive\|x-sharedlib' | \ #awk -F: '{print $1}' | xargs strip -s -FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_minimal:testing-20201117 +FROM eicweb.phy.anl.gov:4567/containers/image_recipes/debian_minimal:testing-20210111 LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ name="eic" \ group="eic" \ @@ -22,7 +22,7 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ ## @ENV@ will be automatically expanded to auto-load the ## runtime environment ENV DOCKERFILE_DISTRO=debian \ - DOCKERFILE_DISTRO_VERSION=20201117-testing \ + DOCKERFILE_DISTRO_VERSION=20210111-testing \ DEBIAN_FRONTEND=noninteractive \ @ENV@ diff --git a/gitlab-ci/docker/Makefile b/gitlab-ci/docker/Makefile index 867602f655b2056037b2e3ed3bd46d94bce5a151..1d3521f89025e663516b057fcbb37181942e4988 100644 --- a/gitlab-ci/docker/Makefile +++ b/gitlab-ci/docker/Makefile @@ -55,21 +55,25 @@ publish-stable: login @echo 'publish $(STABLE) to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' docker tag $(APP_NAME):$(VERSION) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(STABLE) docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(STABLE) + docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(STABLE) publish-latest: login @echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' docker tag $(APP_NAME):$(VERSION) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest + docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest publish-version: login @echo 'publish $(STABLE) to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' docker tag $(APP_NAME):$(VERSION) $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) + docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) publish-unstable: login @echo 'publish unstable to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)' docker tag $(APP_NAME):$(VERSION)-unstable $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable + docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):unstable version: ## Output the current version @echo $(VERSION) diff --git a/spack/packages/acts/README.md b/spack/packages/acts/README.md deleted file mode 100644 index 554d057d7670b2b9902cf0cfd0528585a2b89ab2..0000000000000000000000000000000000000000 --- a/spack/packages/acts/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This is merely an older version of the spack file to fix an issue where the older version -of acts somehow does not correctly build anymore with the new package file. This should be -removed when we upgrade acts. diff --git a/spack/packages/eigen/package.py b/spack/packages/eigen/package.py new file mode 100644 index 0000000000000000000000000000000000000000..d133f9f01a3aa65d06920aa5abd32a25d2ee6c4e --- /dev/null +++ b/spack/packages/eigen/package.py @@ -0,0 +1,52 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class Eigen(CMakePackage): + """Eigen is a C++ template library for linear algebra matrices, + vectors, numerical solvers, and related algorithms. + """ + + homepage = 'http://eigen.tuxfamily.org/' + url = 'https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz' + + version('3.3.8', sha256='146a480b8ed1fb6ac7cd33fec9eb5e8f8f62c3683b3f850094d9d5c35a92419a') + version('3.3.7', sha256='d56fbad95abf993f8af608484729e3d87ef611dd85b3380a8bad1d5cbc373a57') + version('3.3.6', sha256='e7cd8c94d6516d1ada9893ccc7c9a400fcee99927c902f15adba940787104dba') + version('3.3.5', sha256='383407ab3d0c268074e97a2cbba84ac197fd24532f014aa2adc522355c1aa2d0') + version('3.3.4', sha256='c5ca6e3442fb48ae75159ca7568854d9ba737bc351460f27ee91b6f3f9fd1f3d') + version('3.3.3', sha256='fd72694390bd8e81586205717d2cf823e718f584b779a155db747d1e68481a2e') + version('3.3.2', sha256='8d7611247fba1236da4dee7a64607017b6fb9ca5e3f0dc44d480e5d33d5663a5') + version('3.3.1', sha256='50dd21a8997fce0857b27a126811ae8ee7619984ab5425ecf33510cec649e642') + version('3.3.0', sha256='de82e01f97e1a95f121bd3ace87aa1237818353c14e38f630a65f5ba2c92f0e1') + version('3.2.10', sha256='0920cb60ec38de5fb509650014eff7cc6d26a097c7b38c7db4b1aa5df5c85042') + version('3.2.9', sha256='f683b20259ad72c3d384c00278166dd2a42d99b78dcd589ed4a6ca74bbb4ca07') + version('3.2.8', sha256='64c54781cfe9eefef2792003ab04b271d4b2ec32eda6e9cdf120d7aad4ebb282') + version('3.2.7', sha256='0ea9df884873275bf39c2965d486fa2d112f3a64b97b60b45b8bc4bb034a36c1') + version('3.2.6', sha256='e097b8dcc5ad30d40af4ad72d7052e3f78639469baf83cffaadc045459cda21f') + version('3.2.5', sha256='8068bd528a2ff3885eb55225c27237cf5cda834355599f05c2c85345db8338b4') + + # there is a bug in 3.3.8 that provokes a compile error in dependent packages, see https://gitlab.com/libeigen/eigen/-/issues/2011 + patch('https://gitlab.com/libeigen/eigen/-/commit/6d822a1052fc665f06dc51b4729f6a38e0da0546.diff', when='@3.3.8', + sha256='62590e9b33a8f72b608a72b87147a306e7cb20766ea53c6b8e0a183fa6cb7635') + + # From http://eigen.tuxfamily.org/index.php?title=Main_Page#Requirements + # "Eigen doesn't have any dependencies other than the C++ standard + # library." + variant('build_type', default='RelWithDebInfo', + description='The build type to build', + values=('Debug', 'Release', 'RelWithDebInfo')) + + # TODO: latex and doxygen needed to produce docs with make doc + # TODO: Other dependencies might be needed to test this package + + def setup_run_environment(self, env): + env.prepend_path('CPATH', self.prefix.include.eigen3) + + @property + def headers(self): + headers = find_all_headers(self.prefix.include) + headers.directories = [self.prefix.include.eigen3] + return headers diff --git a/spack/packages/xcb-proto/package.py b/spack/packages/xcb-proto/package.py new file mode 100644 index 0000000000000000000000000000000000000000..51cbd5b71f514897cbed100fbb34bc27c1c9ac70 --- /dev/null +++ b/spack/packages/xcb-proto/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class XcbProto(AutotoolsPackage): + """xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to + generate the majority of its code and API.""" + + homepage = "http://xcb.freedesktop.org/" + url = "http://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.gz" + + version('1.13', sha256='0698e8f596e4c0dbad71d3dc754d95eb0edbb42df5464e0f782621216fa33ba7') + version('1.12', sha256='cfa49e65dd390233d560ce4476575e4b76e505a0e0bacdfb5ba6f8d0af53fd59') + version('1.11', sha256='d12152193bd71aabbdbb97b029717ae6d5d0477ab239614e3d6193cc0385d906') + + # TODO: uncomment once build deps can be resolved separately + # See #7646, #4145, #4063, and #2548 for details + # extends('python') + + patch('xcb-proto-1.12-schema-1.patch', when='@1.12') + + ## using fractions.gcd has been deprecated since python 3.5 + ## always apply fix + patch('python-fix.patch') diff --git a/spack/packages/xcb-proto/python-fix.patch b/spack/packages/xcb-proto/python-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..353abcce684a5b6366428bedcb46723e53ad476c --- /dev/null +++ b/spack/packages/xcb-proto/python-fix.patch @@ -0,0 +1,30 @@ +diff --git a/xcbgen/align.py b/xcbgen/align.py +index d4c12ee..cc39764 100644 +--- a/xcbgen/align.py ++++ b/xcbgen/align.py +@@ -2,7 +2,7 @@ + This module contains helper classes for alignment arithmetic and checks + ''' + +-from fractions import gcd ++import math + + class Alignment(object): + +@@ -73,14 +73,14 @@ class Alignment(object): + def combine_with(self, other): + # returns the alignment that is guaranteed when + # both, self or other, can happen +- new_align = gcd(self.align, other.align) ++ new_align = math.gcd(self.align, other.align) + new_offset_candidate1 = self.offset % new_align + new_offset_candidate2 = other.offset % new_align + if new_offset_candidate1 == new_offset_candidate2: + new_offset = new_offset_candidate1 + else: + offset_diff = abs(new_offset_candidate2 - new_offset_candidate1) +- new_align = gcd(new_align, offset_diff) ++ new_align = math.gcd(new_align, offset_diff) + new_offset_candidate1 = self.offset % new_align + new_offset_candidate2 = other.offset % new_align + assert new_offset_candidate1 == new_offset_candidate2 diff --git a/spack/packages/xcb-proto/xcb-proto-1.12-schema-1.patch b/spack/packages/xcb-proto/xcb-proto-1.12-schema-1.patch new file mode 100644 index 0000000000000000000000000000000000000000..2a0b69255c4e6d8b91280c36cfb594b73586c514 --- /dev/null +++ b/spack/packages/xcb-proto/xcb-proto-1.12-schema-1.patch @@ -0,0 +1,52 @@ +Submitted By: Bruce Dubbs <bdubbs at linuxfromscratch dot org> +Date: 2016-06-01 +Initial Package Version: 1.12 +Upstream Status: Not Committed +Origin: https://lists.freedesktop.org/archives/xcb/2016-February/010676.html +Description: Fixes make check + + +--- a/src/xcb.xsd ++++ b/src/xcb.xsd +@@ -44,6 +44,15 @@ authorization from the authors. + <xsd:complexType> + <xsd:attribute name="bytes" type="xsd:integer" use="optional" /> + <xsd:attribute name="align" type="xsd:integer" use="optional" /> ++ <xsd:attribute name="serialize" type="xsd:boolean" use="optional" /> ++ </xsd:complexType> ++ </xsd:element> ++ ++ <!-- Alignment --> ++ <xsd:element name="required_start_align" > ++ <xsd:complexType> ++ <xsd:attribute name="align" type="xsd:integer" use="required" /> ++ <xsd:attribute name="offset" type="xsd:integer" use="optional" /> + </xsd:complexType> + </xsd:element> + +@@ -76,14 +85,13 @@ authorization from the authors. + <xsd:sequence> + <!-- switch(expression) --> + <xsd:group ref="expression" minOccurs="1" maxOccurs="1" /> ++ <xsd:element ref="required_start_align" minOccurs="0" maxOccurs="1" /> + <xsd:choice> + <!-- bitcase expression - bit test --> + <xsd:element name="bitcase" type="caseexpr" minOccurs="0" maxOccurs="unbounded" /> + <!-- case expression - value test --> + <xsd:element name="case" type="caseexpr" minOccurs="0" maxOccurs="unbounded" /> + </xsd:choice> +- <!-- default: --> +- <xsd:group ref="fields" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> +@@ -201,6 +209,7 @@ authorization from the authors. + <xsd:element ref="field" /> + <xsd:element ref="list" /> + <xsd:element ref="fd" /> ++ <xsd:element ref="required_start_align" /> + </xsd:choice> + </xsd:group> + + +