[dev-db/mongodb] updates

removed 5, no longer in scope,
updated 6 and refreshed patches, mostly no change, revert to older configs for now to minimize diff to tree
refreshed 7 on top of 6, pending update
This commit is contained in:
Robert Förster 2025-04-14 18:29:56 +02:00
parent 087c4ca311
commit 9bcea35893
13 changed files with 81 additions and 238 deletions

View File

@ -1,3 +1,2 @@
DIST mongodb-5.0.31.gh.tar.gz 57334718 BLAKE2B 2594d29df996b27eff85baf923b57ffec17b47ab5bb90cdb6899178fc20b6e0c45649ad67cbc175ced76a079e13c495a6bffb39f813127aed6c4841df6c50d7e SHA512 126815f9bab0f0bd7095ce3032acc373a3f5f1e6b7c111026c4319e1a4c44b526d1f364ffeacdc982d4e2ed3073e6f2f1f24cce9f3126f90f7308a7e13b56242
DIST mongodb-6.0.20.gh.tar.gz 87674161 BLAKE2B 6b900dec8b1ed5d62f77c87f13d7ddee4a03180f1e56f617bee436f7bf083185b3490220c27626293e31ed12c83740485cafdfe68e280a97a4eab51f4a69997c SHA512 77029dd8ae59817cb7b733124e91a9885bcc8b3c11446bc0bc7fcfaa4c8568b3de88e5eebbe4c72054c07107b5845aabe4c0e5f712f60b692c1088ce3e3e28a1
DIST mongodb-6.0.21.gh.tar.gz 87688509 BLAKE2B 38bd6a62298567e2e190ccd3c3878812dde487b139e0bce2b2e5eaff83d34f474f1e62e9fed782cb0d9a50af2be9d5c5014b3a0f052b4bc5eb40a82089f0e93d SHA512 eb0fa9fe4eb27e6bb9c03ba9fc88f12c58633629e7a281442b517c4b563bc48edf19eb65d47e31748548a30510ac75b2ed0de2080f737190099fe1f9a2253de7
DIST mongodb-7.0.15.gh.tar.gz 87140137 BLAKE2B e569fa4bbfdc631060071868872da57258ee1b43a6d79efb431baa33c88da405bc52f9b2b95290dbc93bc09b49cb0413b6013bdefba37a4e9acd75fccfe85e77 SHA512 79c7c3651944e37c624f8bfeb79d161b3f3f67ed8243f114f0ed943ced5f9734ef464b15a575ee6d83892728fb2b584fd943ff0dc8576c290a170c374331e6d8

View File

@ -0,0 +1,25 @@
From 01c202b65f136450e0bd3f516d7268322e9beafc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com>
Date: Fri, 11 Apr 2025 18:50:10 +0200
Subject: [PATCH] replace change_extension by replace_extension
---
src/mongo/db/storage/backup_block.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mongo/db/storage/backup_block.cpp b/src/mongo/db/storage/backup_block.cpp
index 9b8dc29f209..a8b86398665 100644
--- a/src/mongo/db/storage/backup_block.cpp
+++ b/src/mongo/db/storage/backup_block.cpp
@@ -59,7 +59,7 @@ std::string extractIdentFromPath(const boost::filesystem::path& dbpath,
// Remove the file extension and convert to generic form (i.e. replace "\" with "/"
// on windows, no-op on unix).
- return boost::filesystem::change_extension(identWithExtension, "").generic_string();
+ return boost::filesystem::path(identWithExtension).replace_extension("").generic_string();
}
} // namespace details
--
2.49.0

View File

@ -0,0 +1,26 @@
From 2605c36cf9a5c3e49d59dcd36ee5b57ab3437922 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Valenduc?= <francoisvalenduc@gmail.com>
Date: Mon, 17 Feb 2025 21:57:45 +0100
Subject: [PATCH] add boost include
---
src/mongo/db/storage/backup_block.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mongo/db/storage/backup_block.cpp b/src/mongo/db/storage/backup_block.cpp
index 9b8dc29f209..6328a727fbe 100644
--- a/src/mongo/db/storage/backup_block.cpp
+++ b/src/mongo/db/storage/backup_block.cpp
@@ -30,6 +30,9 @@
#include "mongo/db/storage/backup_block.h"
#include <boost/filesystem.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/path.hpp>
#include <set>
#include "mongo/base/string_data.h"
--
2.45.3

View File

@ -1,213 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
SCONS_MIN_VERSION="3.3.1"
CHECKREQS_DISK_BUILD="2400M"
CHECKREQS_DISK_USR="512M"
CHECKREQS_MEMORY="1024M"
inherit check-reqs eapi9-ver flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
MY_PV=r${PV/_rc/-rc}
MY_P=mongo-${MY_PV}
DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
HOMEPAGE="https://www.mongodb.com"
SRC_URI="https://github.com/mongodb/mongo/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="Apache-2.0 SSPL-1"
SLOT="0"
KEYWORDS="~amd64 ~arm64 -riscv"
CPU_FLAGS="cpu_flags_x86_avx"
IUSE="debug kerberos mongosh ssl +tools ${CPU_FLAGS}"
# https://github.com/mongodb/mongo/wiki/Test-The-Mongodb-Server
# resmoke needs python packages not yet present in Gentoo
RESTRICT="test"
RDEPEND="acct-group/mongodb
acct-user/mongodb
>=app-arch/snappy-1.1.7:=
app-arch/zstd:=
>=dev-cpp/yaml-cpp-0.6.2:=
dev-libs/boost:=[nls]
>=dev-libs/libpcre-8.42[cxx]
dev-libs/snowball-stemmer:=
net-misc/curl
>=sys-libs/zlib-1.2.12:=
kerberos? ( dev-libs/cyrus-sasl[kerberos] )
ssl? (
>=dev-libs/openssl-1.0.1g:0=
)"
DEPEND="${RDEPEND}
${PYTHON_DEPS}
sys-libs/ncurses:0=
sys-libs/readline:0=
debug? ( dev-debug/valgrind )"
BDEPEND="
$(python_gen_any_dep '
>=dev-build/scons-3.1.1[${PYTHON_USEDEP}]
dev-python/cheetah3[${PYTHON_USEDEP}]
dev-python/psutil[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
')
"
PDEPEND="
mongosh? ( app-admin/mongosh-bin )
tools? ( >=app-admin/mongo-tools-100 )
"
PATCHES=(
"${FILESDIR}/${PN}-4.4.1-boost.patch"
"${FILESDIR}/${PN}-5.0.30-gcc-11.patch"
"${FILESDIR}/${PN}-5.0.2-fix-scons.patch"
"${FILESDIR}/${PN}-5.0.2-no-compass.patch"
"${FILESDIR}/${PN}-5.0.2-skip-no-exceptions.patch"
"${FILESDIR}/${PN}-5.0.2-skip-reqs-check.patch"
"${FILESDIR}/${PN}-5.0.2-boost-1.79.patch"
"${FILESDIR}/${PN}-5.0.5-no-force-lld.patch"
"${FILESDIR}/${PN}-4.4.10-boost-1.81.patch"
"${FILESDIR}/${PN}-5.0.5-boost-1.81-extra.patch"
"${FILESDIR}/${PN}-5.0.16-arm64-assert.patch"
"${FILESDIR}/${PN}-4.4.29-no-enterprise.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85-extra.patch"
"${FILESDIR}/${PN}-5.0.30-gcc-15.patch"
"${FILESDIR}/${PN}-5.0.26-scons.patch"
"${FILESDIR}/${PN}-5.0.26-mozjs-remove-unused-constructor.patch"
)
python_check_deps() {
python_has_version -b ">=dev-build/scons-3.1.1[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/cheetah3[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/psutil[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]"
}
pkg_pretend() {
# Bug 809692 + 890294
if use amd64 && ! use cpu_flags_x86_avx; then
ewarn "MongoDB 5.0 requires use of the AVX instruction set."
ewarn "This ebuild will use --experimental-optimization=-sandybridge which"
ewarn "will result in an experimental build of MongoDB as per upstream."
ewarn "https://docs.mongodb.com/v5.0/administration/production-notes/"
fi
if [[ -n ${REPLACING_VERSIONS} ]]; then
if ver_replacing -lt 4.4; then
ewarn "To upgrade from a version earlier than the 4.4-series, you must"
ewarn "successively upgrade major releases until you have upgraded"
ewarn "to 4.4-series. Then upgrade to 5.0 series."
else
ewarn "Be sure to set featureCompatibilityVersion to 4.4 before upgrading."
fi
fi
}
src_prepare() {
default
# remove bundled libs
rm -r src/third_party/{boost,pcre-*,snappy-*,yaml-cpp,zlib-*} || die
# remove compass
rm -r src/mongo/installer/compass || die
}
src_configure() {
# https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
# --use-system-icu fails tests
# --use-system-tcmalloc is strongly NOT recommended:
# for MONGO_GIT_HASH use GitOrigin-RevId from the commit of the tag
scons_opts=(
AR="$(tc-getAR)"
CC="$(tc-getCC)"
CXX="$(tc-getCXX)"
CCFLAGS="${CXXFLAGS}"
VERBOSE=1
VARIANT_DIR=gentoo
MONGO_VERSION="${PV}"
MONGO_GIT_HASH="973237567d45610d6976d5d489dfaaef6a52c2f9"
--disable-warnings-as-errors
--force-jobs # Reapply #906897, fix #935274
--jobs="$(makeopts_jobs)"
--use-system-boost
--use-system-pcre
--use-system-snappy
--use-system-stemmer
--use-system-yaml
--use-system-zlib
--use-system-zstd
)
use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300
use amd64 && scons_opts+=( --experimental-optimization=-sandybridge ) # Bug 890294
use debug && scons_opts+=( --dbg=on )
use kerberos && scons_opts+=( --use-sasl-client )
scons_opts+=( --ssl=$(usex ssl on off) )
# Needed to avoid forcing FORTIFY_SOURCE
# Gentoo's toolchain applies these anyway
scons_opts+=( --runtime-hardening=off )
# gold is an option here but we don't really do that anymore
if tc-ld-is-lld; then
scons_opts+=( --linker=lld )
else
scons_opts+=( --linker=bfd )
fi
# respect mongoDB upstream's basic recommendations
# see bug #536688 and #526114
if ! use debug; then
filter-flags '-m*'
filter-flags '-O?'
fi
default
}
src_compile() {
PREFIX="${EPREFIX}/usr" ./buildscripts/scons.py "${scons_opts[@]}" install-devcore || die
}
src_install() {
dobin build/install/bin/{mongo,mongod,mongos}
doman debian/mongo*.1
dodoc README docs/building.md
newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
newinitd "${FILESDIR}/mongos.initd-r3" mongos
newconfd "${FILESDIR}/mongos.confd-r3" mongos
insinto /etc
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"
insinto /etc/logrotate.d/
newins "${FILESDIR}/${PN}.logrotate" ${PN}
# see bug #526114
pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
diropts -m0750 -o mongodb -g mongodb
keepdir /var/log/${PN}
}
pkg_postinst() {
ewarn "Make sure to read the release notes and follow the upgrade process:"
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
}

View File

@ -63,21 +63,23 @@ BDEPEND="
"
PATCHES=(
"${FILESDIR}/${PN}-6.0.20-gcc-11.patch"
"${FILESDIR}/${PN}-6.0.21-gcc-11.patch"
"${FILESDIR}/${PN}-5.0.2-no-compass.patch"
"${FILESDIR}/${PN}-5.0.2-skip-reqs-check.patch"
"${FILESDIR}/${PN}-6.0.20-boost-1.79.patch"
"${FILESDIR}/${PN}-6.0.20-sconstruct-changes.patch"
"${FILESDIR}/${PN}-6.0.20-gcc-12.patch"
"${FILESDIR}/${PN}-6.0.20-gcc-13.patch"
"${FILESDIR}/${PN}-6.0.21-boost-1.79.patch"
"${FILESDIR}/${PN}-6.0.21-sconstruct-changes.patch"
"${FILESDIR}/${PN}-6.0.21-gcc-12.patch"
"${FILESDIR}/${PN}-6.0.21-gcc-13.patch"
"${FILESDIR}/${PN}-4.4.10-boost-1.81.patch"
"${FILESDIR}/${PN}-5.0.16-arm64-assert.patch"
"${FILESDIR}/${PN}-4.4.29-no-enterprise.patch"
"${FILESDIR}/${PN}-5.0.26-boost-1.85.patch"
"${FILESDIR}/${PN}-6.0.20-boost-1.85.patch"
"${FILESDIR}/${PN}-6.0.21-boost-1.85.patch"
"${FILESDIR}/${PN}-5.0.30-gcc-15.patch"
"${FILESDIR}/${PN}-5.0.26-scons.patch"
"${FILESDIR}/${PN}-6.0.20-mozjs-remove-unused-constructor.patch"
"${FILESDIR}/${PN}-6.0.21-mozjs-remove-unused-constructor.patch"
"${FILESDIR}/${PN}-6.0.21-boost-filesystem-1.85.patch"
"${FILESDIR}/${PN}-6.0.21-boost-filesystem-1.85-2.patch"
)
python_check_deps() {
@ -93,19 +95,20 @@ python_check_deps() {
pkg_pretend() {
# Bug 809692 + 890294
if use amd64 && ! use cpu_flags_x86_avx; then
ewarn "MongoDB 6.0 requires use of the AVX instruction set."
ewarn "MongoDB $(ver_cut 2) requires use of the AVX instruction set."
ewarn "This ebuild will use --experimental-optimization=-sandybridge which"
ewarn "will result in an experimental build of MongoDB as per upstream."
ewarn "https://docs.mongodb.com/v6.0/administration/production-notes/"
ewarn "https://docs.mongodb.com/v$(ver_cut 2)/administration/production-notes/"
fi
local oldver=$(($(ver_cut 1) - 1))
if [[ -n ${REPLACING_VERSIONS} ]]; then
if ver_replacing -lt 5.0; then
ewarn "To upgrade from a version earlier than the 5.0-series, you must"
if ver_replacing -lt ${oldver}.0; then
ewarn "To upgrade from a version earlier than the ${oldver}.0-series, you must"
ewarn "successively upgrade major releases until you have upgraded"
ewarn "to 5.0-series. Then upgrade to 6.0 series."
ewarn "to ${oldver}.0-series. Then upgrade to $(ver_cut 2) series."
else
ewarn "Be sure to set featureCompatibilityVersion to 5.0 before upgrading."
ewarn "Be sure to set featureCompatibilityVersion to ${oldver}.0 before upgrading."
fi
fi
}
@ -132,7 +135,7 @@ src_configure() {
VERBOSE=1
VARIANT_DIR=gentoo
MONGO_VERSION="${PV}"
MONGO_GIT_HASH="a7ada5ff3a4d8a1e2ed88f86bd6b3d1d16cb43c6"
MONGO_GIT_HASH="be2ab84df04dd10fcecc8efd8f4e0c5e7640dec8"
--disable-warnings-as-errors
--force-jobs # Reapply #906897, fix #935274

View File

@ -70,7 +70,9 @@ PATCHES=(
"${FILESDIR}/${PN}-7.0.15-system-boost.patch"
"${FILESDIR}/${PN}-7.0.15-gcc-15.patch"
"${FILESDIR}/${PN}-5.0.26-scons.patch"
"${FILESDIR}/${PN}-6.0.20-mozjs-remove-unused-constructor.patch"
"${FILESDIR}/${PN}-6.0.21-mozjs-remove-unused-constructor.patch"
"${FILESDIR}/${PN}-6.0.21-boost-filesystem-1.85.patch"
"${FILESDIR}/${PN}-6.0.21-boost-filesystem-1.85-2.patch"
)
python_check_deps() {
@ -86,19 +88,20 @@ python_check_deps() {
pkg_pretend() {
# Bug 809692 + 890294
if use amd64 && ! use cpu_flags_x86_avx; then
ewarn "MongoDB 7.0 requires use of the AVX instruction set."
ewarn "MongoDB $(ver_cut 2) requires use of the AVX instruction set."
ewarn "This ebuild will use --experimental-optimization=-sandybridge which"
ewarn "will result in an experimental build of MongoDB as per upstream."
ewarn "https://docs.mongodb.com/v7.0/administration/production-notes/"
ewarn "https://docs.mongodb.com/v$(ver_cut 2)/administration/production-notes/"
fi
local oldver=$(($(ver_cut 1) - 1))
if [[ -n ${REPLACING_VERSIONS} ]]; then
if ver_replacing -lt 6.0; then
ewarn "To upgrade from a version earlier than the 6.0-series, you must"
if ver_replacing -lt ${oldver}.0; then
ewarn "To upgrade from a version earlier than the ${oldver}.0-series, you must"
ewarn "successively upgrade major releases until you have upgraded"
ewarn "to 6.0-series. Then upgrade to 7.0 series."
ewarn "to ${oldver}.0-series. Then upgrade to $(ver_cut 2) series."
else
ewarn "Be sure to set featureCompatibilityVersion to 6.0 before upgrading."
ewarn "Be sure to set featureCompatibilityVersion to ${oldver}.0 before upgrading."
fi
fi
}
@ -183,8 +186,8 @@ src_install() {
newconfd "${FILESDIR}/mongos.confd-r3" mongos
insinto /etc
newins "${FILESDIR}/${PN}.conf-r4" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r3" mongos.conf
newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
newins "${FILESDIR}/mongos.conf-r2" mongos.conf
systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service"