From 5ceff01406677e022b4e6d0bb424f5ac39d874b0 Mon Sep 17 00:00:00 2001 From: Ronald Klop Date: Mon, 17 Feb 2025 11:23:16 +0100 Subject: [PATCH] databases/mongodb70: add flavor for RPI-compatible version The default flavor is the upstream supported version. For older ARM CPUs we have an -armv80a flavor now. MongoDB is known to be used by net-mgmt/unifi* users on this hardware. MongoDB 6.0 is planned to go out of support in July 2025 [1], so this is preparation to make MongoDB 7.0 the default dependency for Unifi. [1] https://www.mongodb.com/legal/support-policy/lifecycles --- UPDATING | 14 ++++++++++++++ databases/mongodb70/Makefile | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/UPDATING b/UPDATING index 47ad5430c5d2..24b108f10f44 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,20 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20250217: + AFFECTS: users of databases/mongodb70 + AUTHOR: ronald@FreeBSD.org + + MongoDB on non-LSE ARM CPUs like Raspberry Pi 4 works but is + unsupported upstream and can give corruption on high concurrency. + Please read https://jira.mongodb.org/browse/SERVER-71772 for details. + + Port mongodb70 is flavored to create two packages: + mongodb70 and mongodb70-armv80a + + Please install mongodb70-armv80a on RPI4 or similar ARM systems as pkg + mongodb70 will fail on runtime with unsupported instruction error. + 20250208: AFFECTS: users of net-mgmt/netbox AUTHOR: kai@FreeBSD.org diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile index 5a625bf82487..44019fedb7ae 100644 --- a/databases/mongodb70/Makefile +++ b/databases/mongodb70/Makefile @@ -38,6 +38,9 @@ LIB_DEPENDS= libcurl.so:ftp/curl \ libyaml-cpp.so:devel/yaml-cpp \ libzstd.so:archivers/zstd +FLAVORS= default armv80a +armv80a_PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}-armv80a + USES= compiler:c++20-lang cpe python:build scons shebangfix ssl # gmake is used while running ${WRKSRC}/src/third_party/mozjs/gen-config.sh USES+= gmake pkgconfig @@ -90,6 +93,9 @@ GROUPS= mongodb OPTIONS_DEFINE= LTO NOAVX SASL OPTIONS_DEFINE_aarch64= ARMV80A OPTIONS_DEFAULT= NOAVX SASL +.if ${FLAVOR:U} == armv80a +OPTIONS_SET+= ARMV80A +.endif # MongoDB on non-LSE ARM cpu like Raspberry Pi can work but is unsupported upstream. # Can give corruption on high concurrency. @@ -110,6 +116,10 @@ SASL_MAKE_ARGS= --use-sasl-client .include +.if ${FLAVOR:U} == armv80a && ${ARCH} != aarch64 +IGNORE= flavor armv80a is only valid on aarch64 +.endif + ALL_TARGET= install-core # This ports is only following the Major Release.