From af45f6a7cb10bc582a6490d7c1466fef512322fb Mon Sep 17 00:00:00 2001 From: Tomáš Mózes Date: Fri, 20 Aug 2021 14:57:19 +0000 Subject: dev-db/mongodb: fix building with glibc-2.34 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch taken from https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/43608/11/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Do-not-use-MINSIGSTKSZ.patch Closes: https://bugs.gentoo.org/806773 Signed-off-by: Tomáš Mózes Closes: https://github.com/gentoo/gentoo/pull/22052 Signed-off-by: Alexys Jacob --- dev-db/mongodb/files/mongodb-5.0.2-fix-scons.patch | 32 ++++++++++++++++++++++ .../mongodb/files/mongodb-5.0.2-glibc-2.34.patch | 16 +++++++++++ .../mongodb/files/mongodb-5.0.2-no-compass.patch | 12 ++++++++ .../files/mongodb-5.0.2-skip-no-exceptions.patch | 13 +++++++++ .../files/mongodb-5.0.2-skip-reqs-check.patch | 24 ++++++++++++++++ dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch | 32 ---------------------- .../mongodb/files/mongodb-5.0.3-no-compass.patch | 12 -------- .../files/mongodb-5.0.3-skip-no-exceptions.patch | 13 --------- .../files/mongodb-5.0.3-skip-reqs-check.patch | 24 ---------------- 9 files changed, 97 insertions(+), 81 deletions(-) create mode 100644 dev-db/mongodb/files/mongodb-5.0.2-fix-scons.patch create mode 100644 dev-db/mongodb/files/mongodb-5.0.2-glibc-2.34.patch create mode 100644 dev-db/mongodb/files/mongodb-5.0.2-no-compass.patch create mode 100644 dev-db/mongodb/files/mongodb-5.0.2-skip-no-exceptions.patch create mode 100644 dev-db/mongodb/files/mongodb-5.0.2-skip-reqs-check.patch delete mode 100644 dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch delete mode 100644 dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch delete mode 100644 dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch delete mode 100644 dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch (limited to 'dev-db/mongodb/files') diff --git a/dev-db/mongodb/files/mongodb-5.0.2-fix-scons.patch b/dev-db/mongodb/files/mongodb-5.0.2-fix-scons.patch new file mode 100644 index 000000000000..2d1a2f9312bb --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.2-fix-scons.patch @@ -0,0 +1,32 @@ +diff --git a/SConstruct b/SConstruct +index 115de78a..613110b7 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -2366,7 +2366,6 @@ if env.TargetOSIs('posix'): + + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fasynchronous-unwind-tables", +- "-ggdb" if not env.TargetOSIs('emscripten') else "-g", + "-Wall", + "-Wsign-compare", + "-Wno-unknown-pragmas", +@@ -2422,6 +2421,8 @@ if env.TargetOSIs('posix'): + + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # On OS X, clang doesn't want the pthread flag at link time, or it + # issues warnings which make it impossible for us to declare link +@@ -2473,8 +2474,8 @@ if env.TargetOSIs('posix'): + ], + ) + +- #make scons colorgcc friendly +- for key in ('HOME', 'TERM'): ++ #make scons colorgcc, distcc, ccache friendly ++ for key in ('HOME', 'PATH', 'TERM'): + try: + env['ENV'][key] = os.environ[key] + except KeyError: diff --git a/dev-db/mongodb/files/mongodb-5.0.2-glibc-2.34.patch b/dev-db/mongodb/files/mongodb-5.0.2-glibc-2.34.patch new file mode 100644 index 000000000000..b9c5241be374 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.2-glibc-2.34.patch @@ -0,0 +1,16 @@ +diff --git a/src/mongo/stdx/thread.h b/src/mongo/stdx/thread.h +index 7b15bb56..4d8f73ad 100644 +--- a/src/mongo/stdx/thread.h ++++ b/src/mongo/stdx/thread.h +@@ -105,10 +105,7 @@ private: + // . N Y : 4,344 | 13,048 | 7,352 + // . Y Y : 4,424 | 13,672 | 8,392 + // ( https://jira.mongodb.org/secure/attachment/233569/233569_stacktrace-writeup.txt ) +- static constexpr std::size_t kMongoMinSignalStackSize = std::size_t{64} << 10; +- +- static constexpr std::size_t kStackSize = +- std::max(kMongoMinSignalStackSize, std::size_t{MINSIGSTKSZ}); ++ static constexpr std::size_t kStackSize = std::size_t{64} << 10; + std::unique_ptr _stackStorage = std::make_unique(kStackSize); + + #else // !MONGO_HAS_SIGALTSTACK diff --git a/dev-db/mongodb/files/mongodb-5.0.2-no-compass.patch b/dev-db/mongodb/files/mongodb-5.0.2-no-compass.patch new file mode 100644 index 000000000000..777251577298 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.2-no-compass.patch @@ -0,0 +1,12 @@ +diff --git a/src/mongo/installer/SConscript b/src/mongo/installer/SConscript +index 5bd89fe9..489e70ac 100644 +--- a/src/mongo/installer/SConscript ++++ b/src/mongo/installer/SConscript +@@ -7,7 +7,6 @@ env = env.Clone() + + env.SConscript( + dirs=[ +- 'compass', + 'msi', + ], + exports=[ diff --git a/dev-db/mongodb/files/mongodb-5.0.2-skip-no-exceptions.patch b/dev-db/mongodb/files/mongodb-5.0.2-skip-no-exceptions.patch new file mode 100644 index 000000000000..ae69befcea82 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.2-skip-no-exceptions.patch @@ -0,0 +1,13 @@ +diff --git a/SConstruct b/SConstruct +index 613110b7..4987e24e 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -2958,7 +2958,7 @@ def doConfigure(myenv): + + # This warning was added in clang-5 and incorrectly flags our implementation of + # exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804 +- AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") ++ #AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") + + # Enable sized deallocation support. + AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation') diff --git a/dev-db/mongodb/files/mongodb-5.0.2-skip-reqs-check.patch b/dev-db/mongodb/files/mongodb-5.0.2-skip-reqs-check.patch new file mode 100644 index 000000000000..823d481c208f --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.2-skip-reqs-check.patch @@ -0,0 +1,24 @@ +diff --git a/buildscripts/scons.py b/buildscripts/scons.py +index 534fca32..c38f64df 100755 +--- a/buildscripts/scons.py ++++ b/buildscripts/scons.py +@@ -19,13 +19,13 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scons') + sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path + + # pylint: disable=C0413 +-from mongo.pip_requirements import verify_requirements, MissingRequirements ++#from mongo.pip_requirements import verify_requirements, MissingRequirements + +-try: +- verify_requirements('etc/pip/compile-requirements.txt') +-except MissingRequirements as ex: +- print(ex) +- sys.exit(1) ++#try: ++# verify_requirements('etc/pip/compile-requirements.txt') ++#except MissingRequirements as ex: ++# print(ex) ++# sys.exit(1) + + try: + import SCons.Script diff --git a/dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch b/dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch deleted file mode 100644 index 2d1a2f9312bb..000000000000 --- a/dev-db/mongodb/files/mongodb-5.0.3-fix-scons.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/SConstruct b/SConstruct -index 115de78a..613110b7 100644 ---- a/SConstruct -+++ b/SConstruct -@@ -2366,7 +2366,6 @@ if env.TargetOSIs('posix'): - - # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. - env.Append( CCFLAGS=["-fasynchronous-unwind-tables", -- "-ggdb" if not env.TargetOSIs('emscripten') else "-g", - "-Wall", - "-Wsign-compare", - "-Wno-unknown-pragmas", -@@ -2422,6 +2421,8 @@ if env.TargetOSIs('posix'): - - # env.Append( " -Wconversion" ) TODO: this doesn't really work yet - env.Append( CXXFLAGS=["-Woverloaded-virtual"] ) -+ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) -+ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) - - # On OS X, clang doesn't want the pthread flag at link time, or it - # issues warnings which make it impossible for us to declare link -@@ -2473,8 +2474,8 @@ if env.TargetOSIs('posix'): - ], - ) - -- #make scons colorgcc friendly -- for key in ('HOME', 'TERM'): -+ #make scons colorgcc, distcc, ccache friendly -+ for key in ('HOME', 'PATH', 'TERM'): - try: - env['ENV'][key] = os.environ[key] - except KeyError: diff --git a/dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch b/dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch deleted file mode 100644 index 777251577298..000000000000 --- a/dev-db/mongodb/files/mongodb-5.0.3-no-compass.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/mongo/installer/SConscript b/src/mongo/installer/SConscript -index 5bd89fe9..489e70ac 100644 ---- a/src/mongo/installer/SConscript -+++ b/src/mongo/installer/SConscript -@@ -7,7 +7,6 @@ env = env.Clone() - - env.SConscript( - dirs=[ -- 'compass', - 'msi', - ], - exports=[ diff --git a/dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch b/dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch deleted file mode 100644 index ae69befcea82..000000000000 --- a/dev-db/mongodb/files/mongodb-5.0.3-skip-no-exceptions.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SConstruct b/SConstruct -index 613110b7..4987e24e 100644 ---- a/SConstruct -+++ b/SConstruct -@@ -2958,7 +2958,7 @@ def doConfigure(myenv): - - # This warning was added in clang-5 and incorrectly flags our implementation of - # exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804 -- AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") -+ #AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions") - - # Enable sized deallocation support. - AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation') diff --git a/dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch b/dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch deleted file mode 100644 index 823d481c208f..000000000000 --- a/dev-db/mongodb/files/mongodb-5.0.3-skip-reqs-check.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/buildscripts/scons.py b/buildscripts/scons.py -index 534fca32..c38f64df 100755 ---- a/buildscripts/scons.py -+++ b/buildscripts/scons.py -@@ -19,13 +19,13 @@ SITE_TOOLS_DIR = os.path.join(MONGODB_ROOT, 'site_scons') - sys.path = [SCONS_DIR, SITE_TOOLS_DIR] + sys.path - - # pylint: disable=C0413 --from mongo.pip_requirements import verify_requirements, MissingRequirements -+#from mongo.pip_requirements import verify_requirements, MissingRequirements - --try: -- verify_requirements('etc/pip/compile-requirements.txt') --except MissingRequirements as ex: -- print(ex) -- sys.exit(1) -+#try: -+# verify_requirements('etc/pip/compile-requirements.txt') -+#except MissingRequirements as ex: -+# print(ex) -+# sys.exit(1) - - try: - import SCons.Script -- cgit v1.2.3-65-gdbad