summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authoriarspider <iarspider@gmail.com>2022-11-09 00:10:29 +0100
committerGitHub <noreply@github.com>2022-11-08 16:10:29 -0700
commit05fd39477e723b051f9b830d3c39ac0a74f9234d (patch)
treeb0376dc8171829d57cebac22302699844db1f568 /var
parente53a19a08d7be15f762e6115745b05f88058fc9f (diff)
downloadspack-05fd39477e723b051f9b830d3c39ac0a74f9234d.tar.gz
spack-05fd39477e723b051f9b830d3c39ac0a74f9234d.tar.bz2
spack-05fd39477e723b051f9b830d3c39ac0a74f9234d.tar.xz
spack-05fd39477e723b051f9b830d3c39ac0a74f9234d.zip
Add checksum for py-protobuf 4.21.7, protobuf 21.7; remove protobuf and py-protobuf 2.x (#32977)
* Add checksum for py-protobuf 4.21.7, protobuf 21.7 * Update var/spack/repos/builtin/packages/protobuf/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update package.py * Update var/spack/repos/builtin/packages/protobuf/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/protobuf/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update package.py * Update package.py * Delete protoc2.5.0_aarch64.patch * Update package.py * Restore but deprecate py-protobuf 3.0.0a/b; deprecate py-tensorflow 0.x * Fix audit Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/protobuf/package.py50
-rw-r--r--var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch113
-rw-r--r--var/spack/repos/builtin/packages/py-protobuf/package.py23
-rw-r--r--var/spack/repos/builtin/packages/py-tensorflow/package.py48
4 files changed, 59 insertions, 175 deletions
diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py
index c0fbeeaa8c..ab78a88944 100644
--- a/var/spack/repos/builtin/packages/protobuf/package.py
+++ b/var/spack/repos/builtin/packages/protobuf/package.py
@@ -9,12 +9,13 @@ import spack.util.web
from spack.package import *
-class Protobuf(Package):
+class Protobuf(CMakePackage):
"""Google's data interchange format."""
homepage = "https://developers.google.com/protocol-buffers"
url = "https://github.com/protocolbuffers/protobuf/archive/v3.18.0.tar.gz"
+ version("3.21.7", sha256="ce2fbea3c78147a41b2a922485d283137845303e5e1b6cbd7ece94b96ade7031")
version("3.21.5", sha256="d7d204a59fd0d2d2387bd362c2155289d5060f32122c4d1d922041b61191d522")
version("3.21.4", sha256="85d42d4485f36f8cec3e475a3b9e841d7d78523cd775de3a86dba77081f4ca25")
version("3.21.3", sha256="c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126")
@@ -65,11 +66,6 @@ class Protobuf(Package):
version("3.2.0", sha256="a839d3f1519ff9d68ab908de5a0f269650ef1fc501c10f6eefd4cae51d29b86f")
version("3.1.0", sha256="fb2a314f4be897491bb2446697be693d489af645cb0e165a85e7e64e07eb134d")
version("3.0.2", sha256="a0a265bcc9d4e98c87416e59c33afc37cede9fb277292523739417e449b18c1e")
- version(
- "2.5.0",
- sha256="c2665a7aa2ac1a206e61b28e014486e3de59009ea2be2bde9182e0847f38b62f",
- deprecated=True,
- )
variant("shared", default=True, description="Enables the build of shared libraries")
variant(
@@ -79,12 +75,7 @@ class Protobuf(Package):
values=("Debug", "Release", "RelWithDebInfo"),
)
- depends_on("cmake", when="@3.0.2:", type="build")
depends_on("zlib")
- depends_on("autoconf", type="build", when="@2.5.0")
- depends_on("automake", type="build", when="@2.5.0")
- depends_on("libtool", type="build", when="@2.5.0")
- depends_on("m4", type="build", when="@2.5.0")
conflicts("%gcc@:4.6", when="@3.6.0:") # Requires c++11
conflicts("%gcc@:4.6", when="@3.2.0:3.3.0") # Breaks
@@ -97,12 +88,6 @@ class Protobuf(Package):
# See https://github.com/protocolbuffers/protobuf/pull/7197
patch("intel-v2.patch", when="@3.7:3.11.4 %intel")
- patch(
- "protoc2.5.0_aarch64.patch",
- sha256="7b44fcdb794f421174d619f83584e00a36012a16da09079e2fad9c12f7337451",
- when="@2.5.0 target=aarch64:",
- )
-
# See https://github.com/protocolbuffers/protobuf/issues/9916
patch(
"https://github.com/protocolbuffers/protobuf/pull/9936.patch?full_index=1",
@@ -133,28 +118,9 @@ class Protobuf(Package):
args.extend(["-DCMAKE_MACOSX_RPATH=ON"])
return args
- @when("@3.0.2:")
- def install(self, spec, prefix):
- args = self.cmake_args()
- args.extend(std_cmake_args)
-
- source_directory = join_path(self.stage.source_path, "cmake")
- build_directory = join_path(source_directory, "build")
-
- with working_dir(build_directory, create=True):
- cmake(source_directory, *args)
- make()
- make("install")
-
- def configure_args(self):
- args = []
- args.append("--prefix=%s" % self.prefix)
- return args
-
- @when("@2.5.0")
- def install(self, spec, prefix):
- args = self.configure_args()
- autoreconf("-ifv")
- configure(*args)
- make()
- make("install")
+ @property
+ def root_cmakelists_dir(self):
+ if self.spec.satisfies("@:3.20"):
+ return join_path(self.stage.source_path, "cmake")
+ else:
+ return self.stage.source_path
diff --git a/var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch b/var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch
deleted file mode 100644
index aa1ebc6a9a..0000000000
--- a/var/spack/repos/builtin/packages/protobuf/protoc2.5.0_aarch64.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-diff -uprN /src/google/protobuf/stubs/atomicops_internals_arm_gcc.h /src/google/protobuf/stubs/atomicops_internals_arm_gcc.h
---- /src/google/protobuf/subs/atomicops_internals_arm_gcc.h 2018-08-03 08:50:58.579413324 +0000
-+++ /src/google/protobuf/stubs/atomicops_internals_arm_gcc.h 2018-08-03 08:50:58.711413322 +0000
-@@ -68,6 +68,30 @@ inline Atomic32 NoBarrier_CompareAndSwap
- } while (prev_value == old_value);
- return prev_value;
- }
-+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
-+ Atomic64 old_value,
-+ Atomic64 new_value) {
-+ Atomic64 prev;
-+ int32_t temp;
-+
-+ __asm__ __volatile__ ( // NOLINT
-+ "0: \n\t"
-+ "ldxr %[prev], %[ptr] \n\t"
-+ "cmp %[prev], %[old_value] \n\t"
-+ "bne 1f \n\t"
-+ "stxr %w[temp], %[new_value], %[ptr] \n\t"
-+ "cbnz %w[temp], 0b \n\t"
-+ "1: \n\t"
-+ : [prev]"=&r" (prev),
-+ [temp]"=&r" (temp),
-+ [ptr]"+Q" (*ptr)
-+ : [old_value]"IJr" (old_value),
-+ [new_value]"r" (new_value)
-+ : "cc", "memory"
-+ ); // NOLINT
-+
-+ return prev;
-+}
-
- inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
- Atomic32 new_value) {
-@@ -105,6 +129,15 @@ inline Atomic32 Acquire_CompareAndSwap(v
- return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
- }
-
-+inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
-+ Atomic64 old_value,
-+ Atomic64 new_value) {
-+ Atomic64 prev = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-+ MemoryBarrier();
-+
-+ return prev;
-+}
-+
- inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
- Atomic32 old_value,
- Atomic32 new_value) {
-@@ -115,8 +148,11 @@ inline void NoBarrier_Store(volatile Ato
- *ptr = value;
- }
-
--inline void MemoryBarrier() {
-+/*inline void MemoryBarrier() {
- pLinuxKernelMemoryBarrier();
-+}*/
-+inline void MemoryBarrier() {
-+ __asm__ __volatile__ ("dmb ish" ::: "memory"); // NOLINT
- }
-
- inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
-@@ -129,6 +165,15 @@ inline void Release_Store(volatile Atomi
- *ptr = value;
- }
-
-+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
-+ __asm__ __volatile__ ( // NOLINT
-+ "stlr %x[value], %[ptr] \n\t"
-+ : [ptr]"=Q" (*ptr)
-+ : [value]"r" (value)
-+ : "memory"
-+ ); // NOLINT
-+}
-+
- inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
- return *ptr;
- }
-@@ -139,6 +184,19 @@ inline Atomic32 Acquire_Load(volatile co
- return value;
- }
-
-+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
-+ Atomic64 value;
-+
-+ __asm__ __volatile__ ( // NOLINT
-+ "ldar %x[value], %[ptr] \n\t"
-+ : [value]"=r" (value)
-+ : [ptr]"Q" (*ptr)
-+ : "memory"
-+ ); // NOLINT
-+
-+ return value;
-+}
-+
- inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
- return *ptr;
-diff -uprN /src/google/protobuf/stubs/platform_macros.h /src/google/protobuf/stubs/platform_macros.h
---- /src/google/protobuf/stubs/platform_macros.h 2018-08-03 08:50:58.543413325 +0000
-+++ /src/google/protobuf/stubs/platform_macros.h 2018-08-03 08:50:58.595413324 +0000
-@@ -57,6 +57,9 @@
- #elif defined(__ppc__)
- #define GOOGLE_PROTOBUF_ARCH_PPC 1
- #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
-+#elif defined(__aarch64__)
-+#define GOOGLE_PROTOBUF_ARCH_ARM 1
-+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
- #else
- #error Host architecture was not detected as supported by protobuf
- #endif
-
diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py
index 28b99194be..ea263f13fc 100644
--- a/var/spack/repos/builtin/packages/py-protobuf/package.py
+++ b/var/spack/repos/builtin/packages/py-protobuf/package.py
@@ -19,6 +19,7 @@ class PyProtobuf(PythonPackage):
variant("cpp", default=False, description="Enable the cpp implementation")
+ version("4.21.7", sha256="71d9dba03ed3432c878a801e2ea51e034b0ea01cf3a4344fb60166cb5f6c8757")
version("4.21.5", sha256="eb1106e87e095628e96884a877a51cdb90087106ee693925ec0a300468a9be3a")
version(
"3.20.1",
@@ -63,12 +64,16 @@ class PyProtobuf(PythonPackage):
deprecated=True,
)
version("3.0.0", sha256="ecc40bc30f1183b418fe0ec0c90bc3b53fa1707c4205ee278c6b90479e5b6ff5")
- version("3.0.0b2", sha256="d5b560bbc4b7d97cc2455c05cad9299d9db02d7bd11193b05684e3a86303c229")
- version("3.0.0a3", sha256="b61622de5048415bfd3f2d812ad64606438ac9e25009ae84191405fe58e522c1")
- version("2.6.1", sha256="8faca1fb462ee1be58d00f5efb4ca4f64bde92187fe61fde32615bbee7b3e745")
- version("2.5.0", sha256="58292c459598c9297258bf57acc055f701c727f0154a86af8c0947dde37d8172")
- version("2.4.1", sha256="df30b98acb6ef892da8b4776175510cff2131908fd0526b6bad960c55a830a1b")
- version("2.3.0", sha256="374bb047874a506507912c3717d0ce62affbaa9a22bcb494d63d60326a0867b5")
+ version(
+ "3.0.0b2",
+ sha256="d5b560bbc4b7d97cc2455c05cad9299d9db02d7bd11193b05684e3a86303c229",
+ deprecated=True,
+ )
+ version(
+ "3.0.0a3",
+ sha256="b61622de5048415bfd3f2d812ad64606438ac9e25009ae84191405fe58e522c1",
+ deprecated=True,
+ )
depends_on("python@3.5:", when="@3.18:", type=("build", "run"))
depends_on("python@3.7:", when="@3.20:", type=("build", "run"))
@@ -84,12 +89,6 @@ class PyProtobuf(PythonPackage):
# Handle the 3.x series releases
for ver in list(range(1, 8)) + list(range(9, 21)):
depends_on("protobuf@3." + str(ver), when="+cpp @3." + str(ver))
- # Handle the 2.x series releases
- for ver in list(range(3, 7)):
- if ver == 5:
- depends_on("protobuf@2." + str(ver), when="+cpp @2." + str(ver))
- else:
- conflicts("+cpp", when="@2." + str(ver))
@property
def build_directory(self):
diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py
index 5c2bcb759a..8247cd1ceb 100644
--- a/var/spack/repos/builtin/packages/py-tensorflow/package.py
+++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py
@@ -115,14 +115,46 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage):
version("1.1.0", sha256="aad4470f52fa59f54de7b9a2da727429e6755d91d756f245f952698c42a60027")
version("1.0.1", sha256="deea3c65e0703da96d9c3f1162e464c51d37659dd129396af134e9e8f1ea8c05")
version("1.0.0", sha256="db8b3b8f4134b7c9c1b4165492ad5d5bb78889fcd99ffdffc325e97da3e8c677")
- version("0.12.0", sha256="13a1d4e98c82eae7e26fe75384de1517d6126f63ba5d302392ec02ac3ae4b1b9")
- version("0.11.0", sha256="24242ff696234bb1e58d09d45169b148525ccb706f980a4a92ddd3b82c7546dc")
- version("0.10.0", sha256="f32df04e8f7186aaf6723fc5396733b2f6c2fd6fe4a53a54a68b80f3ec855680")
- version("0.9.0", sha256="3128c396af19518c642d3e590212291e1d93c5b047472a10cf3245b53adac9c9")
- version("0.8.0", sha256="f201ba7fb7609a6416968d4e1920d87d67be693b5bc7d34b6b4a79860a9a8a4e")
- version("0.7.1", sha256="ef34121432f7a522cf9f99a56cdd86e370cc5fa3ee31255ca7cb17f36b8dfc0d")
- version("0.7.0", sha256="43dd3051f947aa66e6fc09dac2f86a2efe2e019736bbd091c138544b86d717ce")
- version("0.6.0", sha256="f86ace45e99053b09749cd55ab79c57274d8c7460ae763c5e808d81ffbc3b657")
+ version(
+ "0.12.0",
+ sha256="13a1d4e98c82eae7e26fe75384de1517d6126f63ba5d302392ec02ac3ae4b1b9",
+ deprecated=True,
+ )
+ version(
+ "0.11.0",
+ sha256="24242ff696234bb1e58d09d45169b148525ccb706f980a4a92ddd3b82c7546dc",
+ deprecated=True,
+ )
+ version(
+ "0.10.0",
+ sha256="f32df04e8f7186aaf6723fc5396733b2f6c2fd6fe4a53a54a68b80f3ec855680",
+ deprecated=True,
+ )
+ version(
+ "0.9.0",
+ sha256="3128c396af19518c642d3e590212291e1d93c5b047472a10cf3245b53adac9c9",
+ deprecated=True,
+ )
+ version(
+ "0.8.0",
+ sha256="f201ba7fb7609a6416968d4e1920d87d67be693b5bc7d34b6b4a79860a9a8a4e",
+ deprecated=True,
+ )
+ version(
+ "0.7.1",
+ sha256="ef34121432f7a522cf9f99a56cdd86e370cc5fa3ee31255ca7cb17f36b8dfc0d",
+ deprecated=True,
+ )
+ version(
+ "0.7.0",
+ sha256="43dd3051f947aa66e6fc09dac2f86a2efe2e019736bbd091c138544b86d717ce",
+ deprecated=True,
+ )
+ version(
+ "0.6.0",
+ sha256="f86ace45e99053b09749cd55ab79c57274d8c7460ae763c5e808d81ffbc3b657",
+ deprecated=True,
+ )
variant("mkl", default=False, description="Build with MKL support")
variant("jemalloc", default=False, description="Build with jemalloc as malloc support")