summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ. Liu <zhixu.liu@gmail.com>2024-09-05 11:51:10 +0800
committerSam James <sam@gentoo.org>2024-12-11 09:50:49 +0000
commit20ccbb46873b4a3380962d427aa09483b7b4791e (patch)
tree538d7443c85e1250cfedf012c0a03bfb646982fd
parentnet-vpn/strongswan: Add eap-radius plugin. (diff)
downloadgentoo-20ccbb46873b4a3380962d427aa09483b7b4791e.tar.gz
gentoo-20ccbb46873b4a3380962d427aa09483b7b4791e.tar.bz2
gentoo-20ccbb46873b4a3380962d427aa09483b7b4791e.zip
dev-db/mongodb: add PATH to Environment, otherwise build failed w/ clang
Closes: https://bugs.gentoo.org/829340 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/38444 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-db/mongodb/files/mongodb-5.0.26-scons.patch27
-rw-r--r--dev-db/mongodb/mongodb-5.0.26.ebuild1
2 files changed, 28 insertions, 0 deletions
diff --git a/dev-db/mongodb/files/mongodb-5.0.26-scons.patch b/dev-db/mongodb/files/mongodb-5.0.26-scons.patch
new file mode 100644
index 000000000000..2bb9c527ab2d
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-5.0.26-scons.patch
@@ -0,0 +1,27 @@
+https://jira.mongodb.org/browse/SERVER-94430 Upstream respond:
+
+> we intentionally do not ingest the environment PATH as this makes build
+> reproducibility and hermiticity much harder. Instead, you should set the
+> absolute paths to the tools you want to use on the command line, instead of
+> relying on the PATH.
+
+Gentoo bug https://bugs.gentoo.org/829340
+
+In Gentoo, we have LLVM slotted and we put clang in /usr/lib/llvm/18/bin (or
+whatever), not in /usr/bin, and if upstream strip PATH and construct it
+themselves, they surely won't contain this location.
+
+So we add PATH backup for scons.
+diff --git a/SConstruct b/SConstruct
+index 3d831c9..f07feeb 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1201,7 +1201,7 @@ envDict = dict(BUILD_ROOT=buildDir,
+ if get_option('build-tools') == 'next':
+ SCons.Tool.DefaultToolpath.insert(0, os.path.abspath('site_scons/site_tools/next'))
+
+-env = Environment(variables=env_vars, **envDict)
++env = Environment(variables=env_vars, ENV={'PATH': os.environ['PATH']}, **envDict)
+ del envDict
+
+ if get_option('cache-signature-mode') == 'validate':
diff --git a/dev-db/mongodb/mongodb-5.0.26.ebuild b/dev-db/mongodb/mongodb-5.0.26.ebuild
index ae30891c4a94..63bff8b4aa91 100644
--- a/dev-db/mongodb/mongodb-5.0.26.ebuild
+++ b/dev-db/mongodb/mongodb-5.0.26.ebuild
@@ -76,6 +76,7 @@ PATCHES=(
"${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.26-scons.patch"
)
python_check_deps() {