pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases/mongodb3 databases/mongodb3: Add, to amelior...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ddda081dc651
branches: trunk
changeset: 335679:ddda081dc651
user: gdt <gdt%pkgsrc.org@localhost>
date: Fri Jun 28 16:30:56 2019 +0000
description:
databases/mongodb3: Add, to ameliorate problems with mongodb 4
This is a copy of mongodb before the update to 4, with annotations to
explain why it exists. Reasons include:
- mongodb 4 is licensed under the Server Side Public License, to
which some have objected
- mongodb 4 requires c++17 (and hence gcc 8)
(ok to add during freeze by wiz@)
diffstat:
databases/mongodb3/DESCR | 9 +
databases/mongodb3/Makefile | 147 ++++++
databases/mongodb3/PLIST | 21 +
databases/mongodb3/distinfo | 34 +
databases/mongodb3/options.mk | 28 +
databases/mongodb3/patches/patch-SConstruct | 200 +++++++++
databases/mongodb3/patches/patch-debian_mongod.conf | 23 +
databases/mongodb3/patches/patch-src_mongo_base_initializer.h | 13 +
databases/mongodb3/patches/patch-src_mongo_db_dbwebserver.cpp | 20 +
databases/mongodb3/patches/patch-src_mongo_db_fts_unicode_string.cpp | 15 +
databases/mongodb3/patches/patch-src_mongo_db_matcher_expression__leaf.cpp | 20 +
databases/mongodb3/patches/patch-src_mongo_db_repl_isself.c | 24 +
databases/mongodb3/patches/patch-src_mongo_db_repl_master__slave.cpp | 20 +
databases/mongodb3/patches/patch-src_mongo_db_repl_oplog__fetcher.cpp | 15 +
databases/mongodb3/patches/patch-src_mongo_installer_msi_SConscript | 15 +
databases/mongodb3/patches/patch-src_mongo_platform_random.cpp | 14 +
databases/mongodb3/patches/patch-src_mongo_platform_stack__locator__dragonfly.cpp | 63 ++
databases/mongodb3/patches/patch-src_mongo_platform_stack__locator__netbsd.cpp | 63 ++
databases/mongodb3/patches/patch-src_mongo_shell_bench.cpp | 20 +
databases/mongodb3/patches/patch-src_mongo_shell_linenoise__utf8.h | 26 +
databases/mongodb3/patches/patch-src_mongo_util_intrusive__counter.h | 12 +
databases/mongodb3/patches/patch-src_mongo_util_net_miniwebserver.cpp | 20 +
databases/mongodb3/patches/patch-src_mongo_util_processinfo__dragonfly.cpp | 195 ++++++++
databases/mongodb3/patches/patch-src_mongo_util_processinfo__netbsd.cpp | 217 ++++++++++
databases/mongodb3/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c | 12 +
databases/mongodb3/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h | 120 +++++
databases/mongodb3/patches/patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h | 13 +
databases/mongodb3/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h | 20 +
databases/mongodb3/patches/patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h | 13 +
databases/mongodb3/patches/patch-src_third__party_s2_base_port.h | 27 +
databases/mongodb3/patches/patch-src_third__party_wiredtiger_SConscript | 28 +
databases/mongodb3/patches/patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h | 159 +++++++
databases/mongodb3/patches/patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h | 161 +++++++
33 files changed, 1787 insertions(+), 0 deletions(-)
diffs (truncated from 1920 to 300 lines):
diff -r 0017d7e5aaf9 -r ddda081dc651 databases/mongodb3/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mongodb3/DESCR Fri Jun 28 16:30:56 2019 +0000
@@ -0,0 +1,9 @@
+Mongo (from "humongous") is a high-performance, open source, schema-free,
+document-oriented database. It features: document data model with dynamic
+schemas; full, flexible index support and rich queries; auto-Sharding for
+horizontal scalability; built-in replication for high availability; text
+search; advanced security; aggregation Framework and MapReduce; large media
+storage with GridFS.
+
+This is an older version of mongodb, chosen to avoid the Server Side
+Public License and a need for a c++17 compiler.
\ No newline at end of file
diff -r 0017d7e5aaf9 -r ddda081dc651 databases/mongodb3/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mongodb3/Makefile Fri Jun 28 16:30:56 2019 +0000
@@ -0,0 +1,147 @@
+# $NetBSD: Makefile,v 1.1 2019/06/28 16:30:56 gdt Exp $
+
+# This package is intentionally old to avoid:
+# Server Side Public License
+# c++17 (and c++14 if 3.4.4 does not already need it)
+DISTNAME= mongodb-src-r3.4.4
+PKGNAME= ${DISTNAME:S/src-r//:S/-rc/rc/}
+PKGREVISION= 6
+CATEGORIES= databases
+MASTER_SITES= http://fastdl.mongodb.org/src/
+
+MAINTAINER= gdt%NetBSD.org@localhost
+HOMEPAGE= http://mongodb.org/
+COMMENT= NoSQL distributed document-oriented database
+LICENSE= gnu-agpl-v3 # Client and tools licensed under apache-2.0
+
+# MongoDB 3.4 onwards explicitly does not support 32-bit x86 platforms
+NOT_FOR_PLATFORM+= *-*-i386
+
+EXTRACT_USING= bsdtar
+
+NO_CONFIGURE= yes
+USE_LANGUAGES= c c++
+
+SCONS_ARGS= ${_MAKE_JOBS}
+SCONS_ARGS+= --use-system-boost
+SCONS_ARGS+= --use-system-pcre
+SCONS_ARGS+= --use-system-snappy
+SCONS_ARGS+= --use-system-tcmalloc
+SCONS_ARGS+= --use-system-yaml
+SCONS_ARGS+= --use-system-zlib
+SCONS_ARGS+= --js-engine=mozjs
+SCONS_ARGS+= --release
+
+PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 37 # not yet supported as of 3.0.4
+
+.include "../../mk/bsd.prefs.mk"
+
+# XXX this doesn't work for some reason
+#.if !empty(INSTALL_UNSTRIPPED:Uno:M[Yy][Ee][Ss])
+#SCONS_ARGS+= --nostrip
+#.endif
+
+GCC_REQD+= 5.3.0
+
+CPPFLAGS+= -fno-jump-tables
+
+.include "options.mk"
+
+SMF_METHODS+= mongodb
+
+BUILD_DEFS+= VARBASE
+BUILD_DEFS+= MONGODB_USER MONGODB_GROUP MONGODB_DBPATH
+BUILD_DEFS+= MONGODB_LOGPATH
+
+MONGODB_USER?= mongodb
+MONGODB_GROUP?= mongodb
+MONGODB_DBPATH?= ${VARBASE}/mongodb
+MONGODB_LOGPATH?= ${VARBASE}/log/mongodb
+
+PKG_USERS_VARS+= MONGODB_USER
+PKG_GROUPS_VARS+= MONGODB_GROUP
+
+PKG_GROUPS= ${MONGODB_GROUP}
+PKG_USERS= ${MONGODB_USER}:${MONGODB_GROUP}
+
+PKG_GECOS.${MONGODB_USER}= MongoDB database administrator
+PKG_HOME.${MONGODB_USER}= ${MONGODB_DBPATH}
+PKG_SHELL.${MONGODB_USER}= ${SH}
+
+OWN_DIRS_PERMS+= ${MONGODB_DBPATH} ${MONGODB_USER} ${MONGODB_GROUP} 0755
+OWN_DIRS_PERMS+= ${MONGODB_DBPATH}/journal ${MONGODB_USER} ${MONGODB_GROUP} 0755
+OWN_DIRS_PERMS+= ${MONGODB_LOGPATH} ${MONGODB_USER} ${MONGODB_GROUP} 0755
+
+FILES_SUBST+= MONGODB_USER=${MONGODB_USER}
+FILES_SUBST+= MONGODB_GROUP=${MONGODB_GROUP}
+FILES_SUBST+= MONGODB_DBPATH=${MONGODB_DBPATH}
+FILES_SUBST+= MONGODB_LOGPATH=${MONGODB_LOGPATH}
+
+# XXX No better idea how to pass CXXFLAGS and LDFLAGS to scons
+SUBST_CLASSES+= scons
+SUBST_STAGE.scons= pre-build
+SUBST_FILES.scons= SConstruct
+SUBST_VARS.scons= PREFIX CXXFLAGS LDFLAGS
+
+SUBST_CLASSES+= path
+SUBST_STAGE.path= pre-build
+SUBST_FILES.path= src/mongo/db/flushtest.cpp debian/mongod.conf
+SUBST_FILES.path+= debian/mongod.1 debian/mongo.1 src/mongo/shell/dbshell.cpp
+SUBST_SED.path= -e 's|/data/db|${MONGODB_DBPATH}|g'
+SUBST_SED.path+= -e 's|/etc|${PKG_SYSCONFDIR}|'
+SUBST_VARS.path= MONGODB_DBPATH MONGODB_LOGPATH
+
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.boost-libs}/lib
+
+MONGODB_MAN_FILES= bsondump.1 mongo.1 mongod.1 mongodump.1 mongoexport.1 \
+ mongofiles.1 mongoimport.1 mongooplog.1 mongoperf.1 \
+ mongorestore.1 mongos.1 mongosniff.1 mongostat.1 mongotop.1
+
+NOT_PAX_MPROTECT_SAFE+= bin/mongo bin/mongod
+
+RCD_SCRIPTS= mongodb
+
+INSTALLATION_DIRS+= share/doc/mongodb share/examples/mongodb ${PKGMANDIR}/man1
+
+CONF_FILES+= share/examples/mongodb/mongod.conf \
+ ${PKG_SYSCONFDIR}/mongod.conf
+
+post-extract:
+ chmod -R g-w ${WRKSRC}
+ cp -r ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/freebsd \
+ ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/dragonfly
+ cp -r ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/openbsd \
+ ${WRKSRC}/src/third_party/mozjs-45/platform/x86_64/netbsd
+ cp ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_openbsd.cpp \
+ ${WRKSRC}/src/mongo/db/ftdc/ftdc_system_stats_netbsd.cpp
+
+do-build:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} core
+
+do-install:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
+ --prefix=${DESTDIR}${PREFIX} install
+
+do-test:
+ cd ${WRKSRC} && ./test
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/mongodb
+.for file in ${MONGODB_MAN_FILES}
+ ${INSTALL_MAN} ${WRKSRC}/debian/${file} \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/debian/mongod.conf \
+ ${DESTDIR}${PREFIX}/share/examples/mongodb
+
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/py-boost/buildlink3.mk"
+.include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../devel/scons/buildlink3.mk"
+.include "../../devel/snappy/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../net/libpcap/buildlink3.mk"
+.include "../../textproc/yaml-cpp/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 0017d7e5aaf9 -r ddda081dc651 databases/mongodb3/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mongodb3/PLIST Fri Jun 28 16:30:56 2019 +0000
@@ -0,0 +1,21 @@
+@comment $NetBSD: PLIST,v 1.1 2019/06/28 16:30:56 gdt Exp $
+bin/mongo
+bin/mongod
+bin/mongoperf
+bin/mongos
+man/man1/bsondump.1
+man/man1/mongo.1
+man/man1/mongod.1
+man/man1/mongodump.1
+man/man1/mongoexport.1
+man/man1/mongofiles.1
+man/man1/mongoimport.1
+man/man1/mongooplog.1
+man/man1/mongoperf.1
+man/man1/mongorestore.1
+man/man1/mongos.1
+man/man1/mongosniff.1
+man/man1/mongostat.1
+man/man1/mongotop.1
+share/doc/mongodb/README
+share/examples/mongodb/mongod.conf
diff -r 0017d7e5aaf9 -r ddda081dc651 databases/mongodb3/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mongodb3/distinfo Fri Jun 28 16:30:56 2019 +0000
@@ -0,0 +1,34 @@
+$NetBSD: distinfo,v 1.1 2019/06/28 16:30:56 gdt Exp $
+
+SHA1 (mongodb-src-r3.4.4.tar.gz) = 6f9f2d8a3c1c2f4089fd03f8be0b86ff0431d955
+RMD160 (mongodb-src-r3.4.4.tar.gz) = 2a65f380204a92762ceea2be35dbe2c671e106f6
+SHA512 (mongodb-src-r3.4.4.tar.gz) = dbae89b49c363e7258021cd31385e4449bfdfdfd5adfcb1683e4431372731e58ec33bf8f7576d2d52659a52461bd6a32fbc67d5c6e36d52184ec1aabb345d940
+Size (mongodb-src-r3.4.4.tar.gz) = 39867133 bytes
+SHA1 (patch-SConstruct) = 6ec188274fb25614494ec192be7809a6a01962de
+SHA1 (patch-debian_mongod.conf) = e5074b5f7ad50560b99d652feab58da764ba542c
+SHA1 (patch-src_mongo_base_initializer.h) = add32c5940c922a98122d0e6883eb3ad52dc25c5
+SHA1 (patch-src_mongo_db_dbwebserver.cpp) = 1e7bb9588930742839d2bc9e26b33751a64f98c7
+SHA1 (patch-src_mongo_db_fts_unicode_string.cpp) = 98c5b1b39c07190f08ec9f22ec3002b0a803f72f
+SHA1 (patch-src_mongo_db_matcher_expression__leaf.cpp) = 52064034fabb5de63eccf87ddd140303c54f0312
+SHA1 (patch-src_mongo_db_repl_isself.c) = 82321c918b91ce1a68ce79c14589126aca6baf96
+SHA1 (patch-src_mongo_db_repl_master__slave.cpp) = 2f37f0819a2b2743df01f6b6ab0b3013b3b7d726
+SHA1 (patch-src_mongo_db_repl_oplog__fetcher.cpp) = e12dbfbd4e70ee210cdd4eb0582661666e8eb06a
+SHA1 (patch-src_mongo_installer_msi_SConscript) = 78424fa10f90470dd941b900ef8fd131d28f6e65
+SHA1 (patch-src_mongo_platform_random.cpp) = 59c31e55fc2dc5a2b82b8f16dacf8736d8354cdb
+SHA1 (patch-src_mongo_platform_stack__locator__dragonfly.cpp) = fb885c491e4de1cfbc2875620d854af726e5b45f
+SHA1 (patch-src_mongo_platform_stack__locator__netbsd.cpp) = 3b09e86b2401555b6ab4c31d14c0693d766119c2
+SHA1 (patch-src_mongo_shell_bench.cpp) = c0fd15347d35e37daf87b642148215dee3ab7220
+SHA1 (patch-src_mongo_shell_linenoise__utf8.h) = f975925f56125d48b5124894fa1adf1382a634d2
+SHA1 (patch-src_mongo_util_intrusive__counter.h) = 9f1af59e1bc86e33bf183a6dda1737007afc7a18
+SHA1 (patch-src_mongo_util_net_miniwebserver.cpp) = 3715e826b8d03793066a84b2c1680c32c6ee6368
+SHA1 (patch-src_mongo_util_processinfo__dragonfly.cpp) = 62c236ce820dfe81f45625b15e022cca0f2c10ee
+SHA1 (patch-src_mongo_util_processinfo__netbsd.cpp) = 6eabe5ffec4168bb9ba8a58b7d742772d38b4714
+SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_dpml__exception.c) = ef3b260e8a49227cbbabf427500b7c70bce15083
+SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_float128_op__system.h) = 39f6fba82e2870ee4a5d99785033621225a72a16
+SHA1 (patch-src_third__party_IntelRDFPMathLib20U1_LIBRARY_src_bid__functions.h) = d3a85d3a3b33691466c65cdf51c56f221429aea9
+SHA1 (patch-src_third__party_mozjs-38_platform_x86__64_netbsd_build_js-confdefs.h) = c2ad1041b5c1ff9fac9085d2a8963781f51873a8
+SHA1 (patch-src_third__party_mozjs-38_platform_x86__64_netbsd_include_js-config.h) = 7ddbb4e3bf4126a1be2195acc82ff859e8130a01
+SHA1 (patch-src_third__party_s2_base_port.h) = 892ce91b5aaa432f34e1e7c169b7fd6eea2a3e94
+SHA1 (patch-src_third__party_wiredtiger_SConscript) = 71fd2326a4e95fec674326225bce5ccf5793aa5a
+SHA1 (patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h) = 0b00da401f832d985107dfa5dcc6447db4beec6d
+SHA1 (patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h) = edd3c4e5784e52ad0078bcb7ef1e0902bc354285
diff -r 0017d7e5aaf9 -r ddda081dc651 databases/mongodb3/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mongodb3/options.mk Fri Jun 28 16:30:56 2019 +0000
@@ -0,0 +1,28 @@
+# $NetBSD: options.mk,v 1.1 2019/06/28 16:30:56 gdt Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.mongodb
+PKG_SUPPORTED_OPTIONS= ssl wiredtiger
+PKG_SUGGESTED_OPTIONS= #
+
+.if !empty(MACHINE_ARCH:Mx86_64)
+PKG_SUGGESTED_OPTIONS+= wiredtiger
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mssl)
+.include "../../security/openssl/buildlink3.mk"
+SCONS_ARGS+= --ssl
+.endif
+
+# The prospect of using databases/wiredtiger is unclear yet;
+# MongoDB doesn't provide guarantees for non-bundled WiredTiger:
+# https://groups.google.com/forum/#!msg/mongodb-dev/31FQSo4KVCI/Fx-WtJ9fzU4J
+.if !empty(PKG_OPTIONS:Mwiredtiger)
+. if empty(MACHINE_ARCH:Mx86_64)
+PKG_FAIL_REASON+= "WiredTiger is not supported on 32-bit platforms"
+. endif
+SCONS_ARGS+= --wiredtiger=on
+.else
+SCONS_ARGS+= --wiredtiger=off
+.endif
diff -r 0017d7e5aaf9 -r ddda081dc651 databases/mongodb3/patches/patch-SConstruct
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mongodb3/patches/patch-SConstruct Fri Jun 28 16:30:56 2019 +0000
@@ -0,0 +1,200 @@
+$NetBSD: patch-SConstruct,v 1.1 2019/06/28 16:30:56 gdt Exp $
+
+Add support for NetBSD/Dragonfly, fix locations.
+Respect LDFLAGS and CXXFLAGS
+
+--- SConstruct.orig 2017-04-20 21:43:42.000000000 +0000
++++ SConstruct
+@@ -30,7 +30,7 @@ EnsureSConsVersion( 2, 3, 0 )
+ def print_build_failures():
+ from SCons.Script import GetBuildFailures
+ for bf in GetBuildFailures():
+- print "%s failed: %s" % (bf.node, bf.errstr)
++ print("%s failed: %s" % (bf.node, bf.errstr))
+ atexit.register(print_build_failures)
+
+ def versiontuple(v):
+@@ -49,8 +49,12 @@ def get_running_os_name():
+ running_os = os.sys.platform
+ if running_os.startswith('linux'):
+ running_os = 'linux'
++ elif running_os.startswith('dragonfly'):
++ running_os = 'dragonfly'
+ elif running_os.startswith('freebsd'):
+ running_os = 'freebsd'
++ elif running_os.startswith('netbsd'):
++ running_os = 'netbsd'
+ elif running_os.startswith('openbsd'):
+ running_os = 'openbsd'
+ elif running_os == 'sunos5':
+@@ -68,7 +72,7 @@ def env_get_os_name_wrapper(self):
+
+ def is_os_raw(target_os, os_list_to_check):
+ okay = False
+- posix_os_list = [ 'linux', 'openbsd', 'freebsd', 'osx', 'solaris' ]
++ posix_os_list = [ 'linux', 'openbsd', 'freebsd', 'osx', 'solaris', 'dragonfly', 'netbsd' ]
+
Home |
Main Index |
Thread Index |
Old Index