debian/0000775000000000000000000000000012314744660007177 5ustar debian/install0000664000000000000000000000033712267740055010574 0ustar /usr/bin/mongod /usr/lib/juju/bin /usr/bin/mongos /usr/lib/juju/bin /usr/bin/mongoexport /usr/lib/juju/bin /usr/bin/mongodump /usr/lib/juju/bin /usr/bin/mongorestore /usr/lib/juju/bin /usr/bin/mongoimport /usr/lib/juju/bin debian/tests/0000775000000000000000000000000012267772065010350 5ustar debian/tests/binaries0000775000000000000000000000042612267772032012066 0ustar #!/bin/bash set -e status=0 for cmd in mongod mongos mongoimport mongoexport mongodump mongorestore; do if [ -x /usr/lib/juju/bin/$cmd ]; then echo "$cmd binary found at /usr/lib/juju/bin/$cmd" else echo "$cmd binary missing" status=1 fi done exit $status debian/tests/control0000664000000000000000000000004612267733665011756 0ustar Tests: binaries Depends: juju-mongodb debian/copyright0000664000000000000000000002504112267733665011146 0ustar This package was debianized by Kristina Chodorow and Antonin Kral It was downloaded from http://www.mongodb.org Upstream Authors: Eliot Horowitz Dwight Merriman Aaron Staple Michael Dirolf Kristina Chodorow Debian Maintainers: Antonin Kral Roberto C. Sanchez Copyright: Copyright (c) 2009 10gen License: Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0 On a Debian system, the license can be found at /usr/share/common-licenses/Apache-2.0 AGPL 3.0 http://www.fsf.org/licensing/licenses/agpl-3.0.html The Debian packaging is Copyright (c) 2009, 2010, Kristina Chodorow , Antonin Kral and Roberto C. Sanchez . It is licensed under the AGPL, but will be relicensed under Apache License 2.0. Some parts of MongoDB are licensed under the AGPL, others are Apache 2.0. Please see individual source files for details. MongoDB uses third-party libraries or other resources that may be distributed under licenses different than the MongoDB software. Feel free to open a bug report if you find component which has different license and is not covered here. Your use of the source code for the these components is subject to the terms and conditions of the following licenses. License Notice for SCONS ------------------------ /usr/share/common-licenses/GPL-2 SCONS and it components, generated code and utilities (e.g. gch.py) are licensed under GPL 2. License Notice for Boost ------------------------ http://www.boost.org/LICENSE_1_0.txt Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License Notice for V8 --------------------- http://code.google.com/p/v8/source/browse/trunk/LICENSE This license applies to all parts of V8 that are not externally maintained libraries. The externally maintained libraries used by V8 are: - Jscre, located under third_party/jscre. This code is copyrighted by the University of Cambridge and Apple Inc. and released under a 2-clause BSD license. - Dtoa, located under third_party/dtoa. This code is copyrighted by David M. Gay and released under an MIT license. - Strongtalk assembler, the basis of the files assembler-arm-inl.h, assembler-arm.cc, assembler-arm.h, assembler-ia32-inl.h, assembler-ia32.cc, assembler-ia32.h, assembler.cc and assembler.h. This code is copyrighted by Sun Microsystems Inc. and released under a 3-clause BSD license. These libraries have their own licenses; we recommend you read them, as their terms may differ from the terms below. Copyright 2006-2008, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License Notice for PCRE ----------------------- http://www.pcre.org/licence.txt PCRE LICENCE ------------ PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Release 7 of PCRE is distributed under the terms of the "BSD" licence, as specified below. The documentation for PCRE, supplied in the "doc" directory, is distributed under the same terms as the software itself. The basic library functions are written in C and are freestanding. Also included in the distribution is a set of C++ wrapper functions. THE BASIC LIBRARY FUNCTIONS --------------------------- Written by: Philip Hazel Email local part: ph10 Email domain: cam.ac.uk University of Cambridge Computing Service, Cambridge, England. Copyright (c) 1997-2008 University of Cambridge All rights reserved. THE C++ WRAPPER FUNCTIONS ------------------------- Contributed by: Google Inc. Copyright (c) 2007-2008, Google Inc. All rights reserved. THE "BSD" LICENCE ----------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the name of Google Inc. nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License for md5 implementation ------------------------------ md5 algorithm implementation (utils/md5.[ch]) is licensed under modified BSD License. Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com License exception for linking MongoDB with OpenSSL -------------------------------------------------- MongoDB have granted the following license exception for the AGPL licensed components of MongoDB to support use with OpenSSL; AGPL and OpenSSL are not compatible licenses without this exception. As a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file and distribute linked combinations including the program with the OpenSSL library. You must comply with the GNU Affero General Public License in all respects for all of the code used other than as permitted herein. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it here. See the following upstream commit for full details: https://github.com/mongodb/mongo/commit/5a282cc42c381c6103b1c903c745c64ea6af9f5b debian/source/0000775000000000000000000000000012267772065010506 5ustar debian/source/format0000664000000000000000000000001412267733665011717 0ustar 3.0 (quilt) debian/changelog0000664000000000000000000005447212314744660011065 0ustar juju-mongodb (2.4.9-0ubuntu3) trusty; urgency=medium * d/p/0099-Pagesize-hacks.patch: Apply some hacks for non-4k pages. -- Adam Conrad Thu, 27 Mar 2014 00:47:53 -0600 juju-mongodb (2.4.9-0ubuntu2) trusty; urgency=medium * d/tests/binaries: Drop check for mongo binary. -- James Page Wed, 22 Jan 2014 16:39:13 +0000 juju-mongodb (2.4.9-0ubuntu1) trusty; urgency=medium * New upstream point release. * d/p/0003-SERVER-12064-Use-gcc-atomic-builtins-if-available.patch: Dropped - not really needed for this version on mongodb. * d/install: Don't ship mongo binary, its broken without a JS engine (LP: #1270098). * d/p/0005-disable-jstests.patch: Dropped in preference to updates to d/p/0001-Add-option-to-disable-javascript.patch - rebased on revised upstream pull request. * d/rules: Don't strip binaries during build so we get a ddeb. -- James Page Wed, 22 Jan 2014 14:52:36 +0000 juju-mongodb (2.4.8-0ubuntu6) trusty; urgency=medium * Switch back to running standard smoke test suite, minus jstests: - d/rules: Use smoke target for test execution. - d/patches/0005-disable-jstests.patch: Disable jstests suite. -- James Page Tue, 07 Jan 2014 21:51:41 +0000 juju-mongodb (2.4.8-0ubuntu5) trusty; urgency=medium * Enable better support for alternative architectures: - 0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch 0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch 0003-SERVER-12064-Use-gcc-atomic-builtins-if-available.patch: Cherry picked changes from Robie Basak to enable atomic operations on non-Intel architectures. - 0004-Support-ppc64el-builds.patch: Add support for detection of powerpc64 as a 64-bit platform. - d/control: Enable arm64 and ppc64el architectures. -- James Page Tue, 07 Jan 2014 16:47:27 +0000 juju-mongodb (2.4.8-0ubuntu4) trusty; urgency=medium * Disable javascript scripting support: - d/rules: Pass --disable-scripting, drop config options for v8 and sm, only run C++ based tests during smoke testing. - d/p/0001-Add-option-to-disable-javascript.patch: Cherry picked changes from Michael Hudson to add support for disabling javascript support. -- James Page Tue, 07 Jan 2014 14:48:30 +0000 juju-mongodb (2.4.8-0ubuntu3) trusty; urgency=medium * d/rules: Ignore test failures when testing with spidermonkey scripting engine for the time being. * d/control: Drop dependency on adduser as its not required. -- James Page Thu, 19 Dec 2013 16:37:23 +0000 juju-mongodb (2.4.8-0ubuntu2) trusty; urgency=medium * d/rules: Use spidermonkey as scripting engine for architectures that don't currently have v8 support. * d/tests/binaries: Fix exit code handling to resolve autopkg test failure. * d/rules: Ignore errors from scons clean. -- James Page Tue, 17 Dec 2013 08:33:20 +0000 juju-mongodb (2.4.8-0ubuntu1) trusty; urgency=low * Create new binary only MongoDB package for use by Juju, supporting plans for inclusion of juju-core in Ubuntu main: - d/control: Add new juju-mongodb package, drop all others. - d/control: Use embedded v8 to avoid general inclusion in main. - d/control,d/p/series: Drop use of system libstemmer in preference to embedded version. - d/tests/*: Drop existing tests and add new binary path check for juju-mongodb. - d/install: Install mongod and mongos + assorted client tools to juju namespaced path. - d/*: Drop mongodb-* related packaging files, no longer needed. - d/control: Use google-perftools on armhf architecture. -- James Page Thu, 05 Dec 2013 16:07:10 +0000 mongodb (1:2.4.8-2) unstable; urgency=low * Sync with Ubuntu (closes: #730203). [ James Page ] * d/control: Enable armhf across all binary packages. * d/control,tests: Add DEP-8 tests. * d/p/0011-Use-a-signed-char-to-store-BSONType-enumerations.patch: Fixup build failure on ARM due to missing signed'ness of char cast. [ Rogério Brito ] * debian/control: Add more details to the long descriptions. -- Laszlo Boszormenyi (GCS) Fri, 22 Nov 2013 18:09:38 +0100 mongodb (1:2.4.8-1) unstable; urgency=low * New upstream release. * Add armhf architecture to the supported build systems. * Build with SSL enabled. * Update Standards-Version to 3.9.5 . [ Viktar Vauchkevich ] * Add systemd support (closes: #717321). [ James Page ] * d/copyright: Add details of MongoDB AGPL+OpenSSL license exception to support continued use of MongoDB with SSL support enabled (LP: #1175028). * d/mongodb.conf: Add example SSL configuration options. * d/mongodb-server.mongodb.upstart: Add upstart configuration. -- Laszlo Boszormenyi (GCS) Wed, 13 Nov 2013 07:55:06 +0000 mongodb (1:2.4.6-1) unstable; urgency=low * New upstream release. * Change package priority to optional. * Update Standards-Version to 3.9.4 . * Fix typedefs FTBFS with 0009-ignore-unused-local-typedefs.patch (closes: #701324), thanks to James Page * Fix integer comparision FTBFS with 0010-fix-integer-signs.patch (closes: #724100). * Rework packaging with short debhelper format instead of cdbs. * Compile with system V8 library. * Move packaging to Debian servers. * New maintainer (closes: #725854). -- Laszlo Boszormenyi (GCS) Tue, 24 Sep 2013 12:31:11 +0000 mongodb (1:2.4.5-1) unstable; urgency=critical * new upstream release https://jira.mongodb.org/browse/SERVER/fixforversion/12519 * CVE-2013-4650 - fix allows remote authenticated users to obtain internal system privileges (Closes: #715007). * CVE-2013-2132 and CVE-2013-4142 - Remotely triggered segmentation fault in Javascript engine (Closes: #717173). * Force use of TIME_UTC_ boost macro (Closes: #710639). * Use gcc and g++ 4.7 to avoid #701324 which is still pending. * Remove build directory (Closes: #715015). * Currently uses embedded V8 as the one in Debian is too old. -- Antonin Kral Wed, 17 Jul 2013 16:23:43 +0200 mongodb (1:2.4.3-1) unstable; urgency=low [ Jeff Epler ] * [2a15682] kfreebsd does not have tcmalloc * [b66002a] enable building packages on kfreebsd [ Rogério Brito ] * [44bbe5b] debian/control: Make mongodb arch all, instead of arch-specific. * [50e5786] debian/patches: Add preparation for kFreeBSD. * [164ec3b] debian/patches: Regenerate the patches from patch queue. Thanks to Pino Toscano and Jeff Epler (Closes: #703061) * [b960dca] debian/control: Remove libpcre3 from build-depends. * [8e53a7e] debian/copyright: Wrap long lines. * [f33d197] debian/control: Make the mongodb metapackage arch-dependent. * [1771ce7] debian/control: Set priority of packages to extra. * [198f7bb] debian/control: Mark libgoogle-perftools-dev as linux-amd64 linux-i386. * [02826cb] debian/patches: Take some patches for ARM from Ubuntu. * [bfa912d] debian/patches: Remove patch that substituted install with installs. [ Antonin Kral ] * [a618d03] new upstream release https://jira.mongodb.org/browse/SERVER/fixforversion/12426 -- Antonin Kral Wed, 24 Apr 2013 21:10:53 +0200 mongodb (1:2.4.2-1) unstable; urgency=low * new upstream release https://jira.mongodb.org/browse/SERVER/fixforversion/12405 -- Antonin Kral Wed, 17 Apr 2013 21:52:17 +0200 mongodb (1:2.4.1-3) unstable; urgency=low [ Rogério Brito ] * [ab6f6c3] debian/control: Retouch the package descriptions. * [d44e3d4] d/{control,copyright}: Normalize fields with wrap-and-sort. * [8287fd7] d/control: Add more build-deps to avoid use of embedded libraries. * [17fcb2c] d/control: Add more build-deps for compliant packages. * [e239a9f] debian/rules: Use as many system libraries as possible. * [3326d9e] Add a small note to README.Debian to document differences from upstream. * [df784a3] debian/README.source: Be more descriptive on the workflow. * [d85c075] debian/patches: Add patch to use the system libstemmer library. * [3f4c7e7] gitignore: Ignore quilt's state directory. * [12d4a68] Add README.Debian file to mongodb-server. (Closes: #705054) * [99320d3] debian/control: Augment descriptions of packages. * [5d10dbf] Add bsondump to the clients package. (Closes: #679018) * [434c5da] Add newer/more clients to the mongodb-clients package. * [68bd0b9] Remove unused lintian overrides. (Closes: #705060) [ Antonin Kral ] * [04a8783] SERVER-5307 New man pages generated from docs by samk@10gen * [2237007] lintian override for grotty bug -- Antonin Kral Wed, 17 Apr 2013 11:58:03 +0200 mongodb (1:2.4.1-2) unstable; urgency=low * set version of mongodb-server in mongodb metapackage (Closes:#703580) * [d041ec8] fixes parsing of parallel option, (Closes:#702797) * [348ff81] update watch file, thanks Bart, (Closes:#688781) -- Antonin Kral Sun, 24 Mar 2013 19:13:21 +0100 mongodb (1:2.4.1-1) unstable; urgency=low * New upstream release 2.4.1 https://jira.mongodb.org/browse/SERVER/fixforversion/12402 -- Antonin Kral Sat, 23 Mar 2013 13:41:03 +0100 mongodb (1:2.2.2-1) unstable; urgency=low * New upstream release 2.2.2 https://jira.mongodb.org/browse/SERVER/fixforversion/11886 -- Antonin Kral Wed, 28 Nov 2012 09:34:58 +0100 mongodb (1:2.2.0-1) unstable; urgency=low * New upstream release 2.2.0 http://jira.mongodb.org/browse/SERVER/fixforversion/11496 http://blog.mongodb.org/post/30451575525/mongodb-2-2-released -- Antonin Kral Wed, 29 Aug 2012 21:06:20 +0200 mongodb (1:2.0.7-1) unstable; urgency=low * New upstream release 2.0.7 https://jira.mongodb.org/browse/SERVER/fixforversion/11201 -- Antonin Kral Fri, 10 Aug 2012 14:58:19 +0200 mongodb (1:2.0.6-1) unstable; urgency=low * New upstream release 2.0.6 https://jira.mongodb.org/browse/SERVER/fixforversion/11165 -- Antonin Kral Tue, 05 Jun 2012 19:52:28 +0200 mongodb (1:2.0.5-2) unstable; urgency=low * Removed mongodb-server as dependency of mongodb-dev (Closes:#672634) -- Antonin Kral Sun, 27 May 2012 13:00:38 +0200 mongodb (1:2.0.5-1) unstable; urgency=low * New upstream release 2.0.5 https://jira.mongodb.org/browse/SERVER/fixforversion/11137 -- Antonin Kral Thu, 10 May 2012 07:05:43 +0200 mongodb (1:2.0.4-1) unstable; urgency=low * New upstream release 2.0.4 https://jira.mongodb.org/browse/SERVER/fixforversion/11107 -- Antonin Kral Fri, 30 Mar 2012 21:41:35 +0200 mongodb (1:2.0.3-2) unstable; urgency=low * Enable journaling by default (Closes:#664080) -- Antonin Kral Thu, 15 Mar 2012 16:48:06 +0100 mongodb (1:2.0.3-1) unstable; urgency=low * New upstream release 2.0.3 https://jira.mongodb.org/browse/SERVER/fixforversion/11001 * added debian/copat * added Replaces clause from Ubuntu patch -- Antonin Kral Thu, 01 Mar 2012 14:14:34 +0100 mongodb (1:2.0.2-5) unstable; urgency=low * Allow parallel build, patch courtesy of Andre Ferraz (Closes:#646759) -- Antonin Kral Thu, 16 Feb 2012 10:25:06 +0100 mongodb (1:2.0.2-4) unstable; urgency=low * Move socket from /tmp to /var/run/mongodb (Closes: #658177) -- Antonin Kral Wed, 01 Feb 2012 14:53:12 +0100 mongodb (1:2.0.2-3) unstable; urgency=low * Describe jsonArray option for mongoimport in manpage (Closes: 656444) -- Antonin Kral Thu, 19 Jan 2012 14:11:14 +0100 mongodb (1:2.0.2-2) unstable; urgency=low * added logrotate for mongodb-server (Closes: #656065) -- Antonin Kral Mon, 16 Jan 2012 10:46:36 +0100 mongodb (1:2.0.2-1) unstable; urgency=low * New upstream release 2.0.2 https://jira.mongodb.org/browse/SERVER/fixforversion/10991 -- Antonin Kral Thu, 15 Dec 2011 11:26:24 +0100 mongodb (1:2.0.0-2) unstable; urgency=low * need to reupload package to get it build on i386 which failed because of cdbs error -- Antonin Kral Sun, 25 Sep 2011 20:22:08 +0200 mongodb (1:2.0.0-1) unstable; urgency=low * New upstream release 2.0.0 (Closes: #641646) http://blog.mongodb.org/post/10126837729/mongodb-2-0-released * proper Spider Monkey is embedded (Closes: #637370, #572870, #631054) * currently linking against system libpcre3 -- Antonin Kral Wed, 14 Sep 2011 17:09:16 +0200 mongodb (1:1.8.3-1) unstable; urgency=low * New upstream release 1.8.3 https://jira.mongodb.org/browse/SERVER/fixforversion/10390 -- Antonin Kral Tue, 23 Aug 2011 08:48:57 +0200 mongodb (1:1.8.2-2) unstable; urgency=low * [2e1c3ff] (Closes: #625401) ignore unused-but-set-{variable,parameter} * [0e9611d] (Closes: #572870, #631054) switch to v8 as javascript engine * [bbf5935] (Closes: #634484) use dbpath and logpath from config file not forcing in init.d * [bf8d466] update description * [cbe2d99] Imported Upstream version 1.8.3 -- Antonin Kral Tue, 23 Aug 2011 08:48:17 +0200 mongodb (1:1.8.2-1) unstable; urgency=low * New upstream release 1.8.2 https://jira.mongodb.org/browse/SERVER/fixforversion/10263 -- Antonin Kral Sat, 18 Jun 2011 21:25:25 +0200 mongodb (1:1.8.1-2) unstable; urgency=low * Depend on libboost 1.46 -- Antonin Kral Tue, 31 May 2011 13:19:30 +0200 mongodb (1:1.8.1-1) unstable; urgency=low * Upstream 1.8.1 http://jira.mongodb.org/browse/SERVER/fixforversion/10260 -- Antonin Kral Thu, 07 Apr 2011 07:38:17 +0200 mongodb (1:1.8.0-2) unstable; urgency=low * return empty TERM if not set (Closes: #620910) -- Antonin Kral Tue, 05 Apr 2011 10:21:26 +0200 mongodb (1:1.8.0-1) unstable; urgency=low * Upstream 1.8.0 http://blog.mongodb.org/post/3903149313/mongodb-1-8-released -- Antonin Kral Thu, 17 Mar 2011 00:10:27 +0100 mongodb (1:1.6.5-3) unstable; urgency=low [ Jérémy Lal ] * Switch to cdbs, cleanup. * Use debian/gbp.conf to filter out debian/* files from upstream tarball. [ Antonin Kral ] * [ab13e0b] added Vcs-* to debian/control * [eb35fc8] added Jeremy as co-maintainer -- Antonin Kral Thu, 24 Feb 2011 08:36:10 +0100 mongodb (1:1.6.5-2) unstable; urgency=low * Clean up Boost packages in Build-Depends * Add libboost-dev to mongodb-dev Depends line -- Roberto C. Sanchez Mon, 24 Jan 2011 20:17:29 -0500 mongodb (1:1.6.5-1) unstable; urgency=low * Upstream 1.6.5 http://jira.mongodb.org/browse/SERVER/fixforversion/10207 -- Antonin Kral Fri, 10 Dec 2010 13:10:04 +0100 mongodb (1:1.6.3-1) unstable; urgency=low * [0ad0c09] Imported Upstream version 1.6.3 http://jira.mongodb.org/browse/SERVER/fixforversion/10190 * replica_sets slavedelay, rollback * sharding optimization for larger than ram data sets -- Antonin Kral Fri, 24 Sep 2010 19:04:25 +0200 mongodb (1:1.6.2-1) unstable; urgency=low * [90ef97f] Imported Upstream version 1.6.2 http://jira.mongodb.org/browse/SERVER/fixforversion/10187 -- Antonin Kral Thu, 02 Sep 2010 17:41:00 +0200 mongodb (1:1.6.1-1) unstable; urgency=low * [3b9581e] Imported Upstream version 1.6.1 http://jira.mongodb.org/browse/SERVER/fixforversion/10183 * [5866afb] updated watch file fot 1.6.x version -- Antonin Kral Wed, 18 Aug 2010 09:33:36 +0200 mongodb (1:1.6.0-1) unstable; urgency=low * [7645618] Imported Upstream version 1.6.0 http://jira.mongodb.org/browse/SERVER/fixforversion/10182 * [7ae74af] install libs to /usr/lib not /usr/lib64 * [45c6766] use prefix and smokedbprefix -- Antonin Kral Wed, 11 Aug 2010 13:19:25 +0200 mongodb (1:1.4.4-3) unstable; urgency=low * [1576744] added libreadline-dev to build-deps (Closes: #589163) -- Antonin Kral Thu, 15 Jul 2010 21:41:49 +0200 mongodb (1:1.4.4-2) unstable; urgency=low * [3bd69dc] install libs to /usr/lib not /usr/lib64 (Closes: #588557) -- Antonin Kral Fri, 09 Jul 2010 21:26:05 +0200 mongodb (1:1.4.4-1) unstable; urgency=low * [5c6a221] Imported Upstream version 1.4.4 * upstream change log is at http://jira.mongodb.org/browse/SERVER/fixforversion/10166 * [68c73c3] removed not needed files from upstream * [c1546df] debian policy to 3.9.0 -- Antonin Kral Wed, 30 Jun 2010 09:32:45 +0200 mongodb (1:1.4.3-2) unstable; urgency=low * [64bca3c] Updated copyright information as requested by Richard Kreuter -- Antonin Kral Mon, 07 Jun 2010 08:27:36 +0200 mongodb (1:1.4.3-1) unstable; urgency=low * New upstream version 1.4.3 * Change log 1.4.3 http://jira.mongodb.org/browse/SERVER/fixforversion/10156 * added log to dirs to fix piuparts error -- Antonin Kral Sun, 30 May 2010 10:14:05 +0200 mongodb (1:1.4.2-3) unstable; urgency=low * Clean up debian/copyright * Fix various typos * Generally make lintian happy * Change section of mongodb-dev from database to libdevel (now matches archive override file) * Properly express copyrights * Fix typo in manpage * Remove unused lintian override. * Install usr/lib64 instead of usr/lib in mongodb-dev * updated watch file to actually work and report available stable releases -- Antonin Kral Tue, 11 May 2010 22:21:13 +0200 mongodb (1:1.4.2-2) unstable; urgency=low * Split single binary package into mongodb-server, mongodb-dev, and mongodb-clients. -- Roberto C. Sanchez Thu, 06 May 2010 21:20:52 -0400 mongodb (1:1.4.2-1) unstable; urgency=low * [4770a09] New upstream version 1.4.2 * changelog for 1.4.1 http://jira.mongodb.org/browse/SERVER/fixforversion/10144 * changelog for 1.4.2 http://jira.mongodb.org/browse/SERVER/fixforversion/10155 -- Antonin Kral Tue, 27 Apr 2010 19:55:04 +0200 mongodb (1:1.4.0-2) unstable; urgency=low * added Roberto C. Sanchez as co-maintainer -- Antonin Kral Fri, 09 Apr 2010 21:40:49 +0200 mongodb (1:1.4.0-1) unstable; urgency=low * [0ca01a9] Imported Upstream version 1.4.0 * [76c18ea] removed not needed files for debian * [c1578d9] merged changes from debianization from 1.2.4 * full upstream changelog http://jira.mongodb.org/secure/IssueNavigator.jspa?requestId=10080 * upstream release notes http://www.mongodb.org/display/DOCS/1.4+Release+Notes -- Antonin Kral Thu, 25 Mar 2010 19:44:59 +0100 mongodb (1:1.2.4-1) unstable; urgency=low * [c3803a1] Imported Upstream version 1.2.4 * [ab4e0c8] removal of unnecessary files for Debian from upstream source * changelog for upstream at http://jira.mongodb.org/browse/SERVER/fixforversion/10130 -- Antonin Kral Wed, 17 Mar 2010 10:18:01 +0100 mongodb (1:1.2.2-4) unstable; urgency=low * ensure removal of upstart script as upload of repacked source is failing -- Antonin Kral Wed, 10 Mar 2010 07:29:38 +0100 mongodb (1:1.2.2-3) unstable; urgency=low * [aced2f4] removed unnecessary dependency (Closes: #572873) * [ce78acd] Added call for tests to ensure correct build (Closes: #570106) -- Antonin Kral Sun, 07 Mar 2010 21:07:37 +0100 mongodb (1:1.2.2-2) unstable; urgency=low * [49232f8] removed upstart, it is buggy + not supported in Debian (Closes: #572812) -- Antonin Kral Sat, 06 Mar 2010 22:55:17 +0100 mongodb (1:1.2.2-1) unstable; urgency=low * this commit introduces stable version of MongoDB to Debian, hopefully to be included in upcoming stable (Closes: #570148) * [2fede57] Upstream release 1.2.2, based on commit fc3d3acafc253da085f7d0cdcd91059cc9bcd8e3 * [d21668d] versionString changed from "1.2.3-" to "1.2.2" * [5a8e160] removed debian/files * [26f3ec2] removed empty preinst * [5d12fec] removed unnecessary jars * [978f619] removed unused lib * [7157b84] Changed maintainer of the package * [0a939b5] mongo should build only on i386 and amd64 * [f3e7db5] generate list of manpages * [bcd0d12] database section is probably more appropriate * [7bec42f] clarification of licensing terms * [c74fd7d] bumped standards version * [357da67] merged the rest of debian changes from 1.3 -- Antonin Kral Wed, 17 Feb 2010 08:50:07 +0100 mongodb (1.3.1-3) unstable; urgency=low * [ff792f5] Reordered Build-Depends to enable automated with buildd (Closes: #570072) * [4d5a2c1] Added support of nostrip and debug DEB_BUILD_OPTIONS (Closes: #570077) * [cbc4e8b] Describe why is mongodb available for some architectures only (Closes: #570076) -- Antonin Kral Tue, 16 Feb 2010 21:59:56 +0100 mongodb (1.3.1-2) unstable; urgency=low * [efabc21] change order of build deps of xul-runner to fix sbuild (Closes: #569417) * [55e3c9b] added support for mongod config file * [88a7135] added README.Debian with note about bind_ip set to localhost -- Antonin Kral Fri, 12 Feb 2010 09:37:23 +0100 mongodb (1.3.1-1) unstable; urgency=low * Initial release (Closes: #523937) * [5cd4d87] rebuild original sources to remove debian/files * [4a84263] Removed empty preinst * [9698ffb] Changed maintainer of the package * [4486a47] mongo should build only on i386 and amd64 * [5842c04] no need for creating home-dir for mongo user * [f47e39e] Added missing manpages * [987cd73] generate list of manpages * [e3336d8] used more specific build-depeneds, thanks to Richard Kreuter * [ba8697c] removed unnecessary jars dir with its content * [91fe1cf] cover licensing terms of used components * [d59c02f] init.d cleanup * [78d712b] cover licensing terms of utils/md5.[ch] * [a696359] removed lib/ from upstream -- Antonin Kral Fri, 29 Jan 2010 19:48:45 +0100 debian/compat0000664000000000000000000000000212267733665010407 0ustar 9 debian/rules0000775000000000000000000000375112267750217010267 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_SCONS_OPTIONS := ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) DEB_SCONS_OPTIONS := --d=DEBUGBUILD endif ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) DEB_SCONS_OPTIONS := --d=DEBUGBUILD endif ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS))) PROCS=$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) DEB_SCONS_OPTIONS += -j$(PROCS) endif HARDENING_OPTIONS = CC="$(CC)" CFLAGS="$(CFLAGS)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" COMMON_OPTIONS = --use-system-snappy --use-system-pcre \ --use-system-boost --ssl --nostrip $(DEB_SCONS_OPTIONS) gperftools_archs = amd64 i386 armhf ifneq (,$(filter $(DEB_HOST_ARCH), $(gperftools_archs))) COMMON_OPTIONS += --allocator=tcmalloc --use-system-tcmalloc else COMMON_OPTIONS += --allocator=system endif export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) # NOTE: disable javascript scripting support COMMON_OPTIONS += --disable-scripting DEB_SCONS_CLEAN = --directory="." $(HARDENING_OPTIONS) . --keep-going --clean \ $(COMMON_OPTIONS) DEB_SCONS_BUILD = --directory="." $(HARDENING_OPTIONS) all $(COMMON_OPTIONS) DEB_SCONS_CHECK = --smokedbprefix=$(CURDIR)/debian/tmp-test smoke \ $(COMMON_OPTIONS) DEB_SCONS_INSTALL = --directory="." $(HARDENING_OPTIONS) \ --prefix=$(CURDIR)/debian/tmp/usr install --full $(COMMON_OPTIONS) override_dh_clean: scons $(DEB_SCONS_CLEAN) || : find $(CURDIR)/ -name "*.pyc" -delete rm -rf $(CURDIR)/debian/tmp-test/ rm -rf $(CURDIR)/.scons/ rm -rf $(CURDIR)/build/ rm -f $(CURDIR)/failfile.smoke $(CURDIR)/smoke-last.json dh_clean override_dh_auto_build: scons $(DEB_SCONS_BUILD) ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) override_dh_auto_test: scons $(DEB_SCONS_CHECK) endif override_dh_auto_install: scons $(DEB_SCONS_INSTALL) %: dh $@ --parallel .PHONY: override_dh_clean override_dh_auto_build override_dh_auto_test \ override_dh_auto_install debian/control0000664000000000000000000000303012267733665010610 0ustar Source: juju-mongodb Section: database Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) Uploaders: Jérémy Lal Build-Depends: debhelper (>= 9), libboost-date-time-dev, libboost-dev (>> 1.50), libboost-filesystem-dev, libboost-program-options-dev, libboost-thread-dev, libgoogle-perftools-dev [linux-amd64 linux-i386 armhf], libpcap-dev, libpcre3-dev, libreadline-dev, libsnappy-dev, libssl-dev, python-pymongo, scons Standards-Version: 3.9.5 Homepage: http://www.mongodb.org XS-Testsuite: autopkgtest Package: juju-mongodb Architecture: amd64 i386 armhf arm64 ppc64el Depends: ${misc:Depends}, ${shlibs:Depends} Description: MongoDB object/document-oriented database for Juju MongoDB is a high-performance, open source, schema-free document-oriented data store that's easy to deploy, manage and use. It's network accessible, written in C++ and offers the following features: . * Collection oriented storage - easy storage of object-style data * Full index support, including on inner objects * Query profiling * Replication and fail-over support * Efficient storage of binary data including large objects (e.g. videos) * Auto-sharding for cloud-level scalability . High performance, scalability, and reasonable depth of functionality are the goals for the project. . This package provides the mongod and mongos binaries for use within Juju, the service orchestration for Ubuntu. debian/watch0000664000000000000000000000037712267733665010251 0ustar version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|BETA|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/ \ http://www.mongodb.org/downloads .*/mongodb-src-r(\d.*)\.(?:tgz|tar\.(?:gz|bz2|xz)) # Bart Martens Sun, 10 Feb 2013 07:18:34 +0000 debian/README.Debian0000664000000000000000000000041112267733665011246 0ustar MongoDB for Juju ---------------- This package provides a binary executable only distribution of mongodb for use with Juju, the service orchestration tool for Ubuntu. This package may be upgraded during the lifecycle of a release and should only be used by Juju. debian/patches/0000775000000000000000000000000012314744626010630 5ustar debian/patches/0001-Create-kfreebsd-like-linux-in-most-respects.patch0000664000000000000000000000174212267733665022522 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:15:18 -0500 Subject: Create kfreebsd like linux in most respects --- SConstruct | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 5fb0e83..f3ac3f9 100644 --- a/SConstruct +++ b/SConstruct @@ -344,6 +344,8 @@ libdeps.setup_environment( env ) if env['PYSYSPLATFORM'] == 'linux3': env['PYSYSPLATFORM'] = 'linux2' +if 'gnukfreebsd' in env['PYSYSPLATFORM']: + env['PYSYSPLATFORM'] = 'linux2' if 'freebsd' in env['PYSYSPLATFORM']: env['PYSYSPLATFORM'] = 'freebsd' @@ -524,7 +526,7 @@ if "darwin" == os.sys.platform: env.Append( EXTRACPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) ) env.Append( EXTRALIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) ) -elif os.sys.platform.startswith("linux"): +elif os.sys.platform.startswith("linux") or os.sys.platform.startswith("gnukfreebsd"): linux = True platform = "linux" debian/patches/0006-Fix-ARM-alignment-problems.patch0000664000000000000000000000404012267733665017202 0ustar From: Robie Basak Date: Sat, 20 Apr 2013 22:05:50 -0300 Subject: Fix ARM alignment problems This is a temporary workaround. We avoid double alignment issues by using memcpy to make sure that all doubles are aligned before accessing them. Last-Update: 2013-03-15 --- src/mongo/bson/bsonelement.h | 16 +++++++++++++++- src/mongo/db/key.cpp | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h index f094ab9..1ecb47f 100644 --- a/src/mongo/bson/bsonelement.h +++ b/src/mongo/bson/bsonelement.h @@ -17,7 +17,7 @@ #pragma once -#include // strlen +#include // strlen, memcpy #include #include @@ -529,13 +529,27 @@ namespace mongo { } inline double BSONElement::numberDouble() const { +#if defined(__arm__) + int int_result; + long long long_long_result; +#endif switch( type() ) { case NumberDouble: return _numberDouble(); case NumberInt: +#if defined(__arm__) + memcpy(&int_result, value(), sizeof(int_result)); + return int_result; +#else return *reinterpret_cast< const int* >( value() ); +#endif case NumberLong: +#if defined(__arm__) + memcpy(&long_long_result, value(), sizeof(long_long_result)); + return (double)long_long_result; +#else return (double) *reinterpret_cast< const long long* >( value() ); +#endif default: return 0; } diff --git a/src/mongo/db/key.cpp b/src/mongo/db/key.cpp index 3d9eaa7..95959d8 100644 --- a/src/mongo/db/key.cpp +++ b/src/mongo/db/key.cpp @@ -406,7 +406,7 @@ namespace mongo { p += 8; break; case cdouble: - b.append("", (double&) *p); + b.append("", (reinterpret_cast< const PackedDouble& >(*p)).d); p += sizeof(double); break; case cint: debian/patches/0009-ignore-unused-local-typedefs.patch0000664000000000000000000000227112267733665017746 0ustar Description: Disable unused-local-typedefs errors Disables new unused-local-typedefs as found in gcc 4.8 . Based on commit to trunk upstream. Author: James Page Origin: https://github.com/mongodb/mongo/commit/2d30f0b562c1925a52670e767c2c0222189fb8f0 --- a/SConstruct +++ b/SConstruct @@ -715,6 +715,7 @@ if nix: env.Append( CCFLAGS=["-Werror", "-pipe"] ) if not has_option('clang'): env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's + env.Append( CXXFLAGS=["-Wno-unused-local-typedefs"] ) # New in gcc 4.8 env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) --- a/src/third_party/v8/SConscript +++ b/src/third_party/v8/SConscript @@ -51,7 +51,8 @@ LIBRARY_FLAGS = { '-W', '-Wno-unused-parameter', '-Woverloaded-virtual', - '-Wnon-virtual-dtor'] + '-Wnon-virtual-dtor', + '-Wno-unused-local-typedefs'] }, 'mode:debug': { 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'], debian/patches/0008-Use-system-libstemmer.patch0000664000000000000000000000111212267733665016460 0ustar From: Antonin Kral Date: Wed, 17 Jul 2013 19:35:02 +0200 Subject: Use system libstemmer --- SConstruct | 1 - 1 file changed, 1 deletion(-) diff --git a/SConstruct b/SConstruct index f3ac3f9..2c888f3 100644 --- a/SConstruct +++ b/SConstruct @@ -802,7 +802,6 @@ if not use_system_version_of_library("boost"): CPPDEFINES=['BOOST_ALL_NO_LIB']) env.Prepend(CPPPATH=['$BUILD_DIR/third_party/s2']) -env.Prepend(CPPPATH=['$BUILD_DIR/third_party/libstemmer_c/include']) env.Append( CPPPATH=['$EXTRACPPPATH'], LIBPATH=['$EXTRALIBPATH'] ) debian/patches/0099-Pagesize-hacks.patch0000664000000000000000000000356012314744614015107 0ustar diff --git a/src/mongo/util/logfile.cpp b/src/mongo/util/logfile.cpp index fa53690..28562b2 100644 --- a/src/mongo/util/logfile.cpp +++ b/src/mongo/util/logfile.cpp @@ -26,6 +26,7 @@ #include "mongo/util/startup_test.h" #include "mongo/util/text.h" +#define PAGESIZE sysconf(_SC_PAGESIZE) using namespace mongoutils; @@ -36,16 +41,16 @@ namespace mongo { if( 0 && debug ) { try { LogFile f("logfile_test"); - void *p = malloc(16384); + void *p = malloc(4*PAGESIZE); char *buf = (char*) p; - buf += 4095; + buf += PAGESIZE - 1; buf = (char*) (((size_t)buf)&(~0xfff)); memset(buf, 'z', 8192); - buf[8190] = '\n'; - buf[8191] = 'B'; + buf[2 * PAGESIZE - 2] = '\n'; + buf[2 * PAGESIZE - 1] = 'B'; buf[0] = 'A'; - f.synchronousAppend(buf, 8192); - f.synchronousAppend(buf, 8192); + f.synchronousAppend(buf, 2 * PAGESIZE); + f.synchronousAppend(buf, 2 * PAGESIZE); free(p); } catch(DBException& e ) { @@ -226,7 +231,11 @@ namespace mongo { fassert( 16144, charsToWrite >= 0 ); fassert( 16142, _fd >= 0 ); - fassert( 16143, reinterpret_cast( buf ) % g_minOSPageSizeBytes == 0 ); // aligned + +// Disabling alignment test on PPC64 due to a 64kB page size on PPC64 instead of 4kB on x86 +#ifndef __PPC64__ + fassert( 16143, reinterpret_cast( buf ) % g_minOSPageSizeBytes == 0 ); // aligned +#endif #ifdef POSIX_FADV_DONTNEED const off_t pos = lseek(_fd, 0, SEEK_CUR); // doesn't actually seek, just get current position debian/patches/0001-Add-option-to-disable-javascript.patch0000664000000000000000000001244412267750105020413 0ustar Description: Add option to disable script integration Origin: https://github.com/mongodb/mongo/pull/591 --- a/SConscript.buildinfo +++ b/SConscript.buildinfo @@ -8,7 +8,7 @@ import sys import buildscripts.utils -Import('env windows usev8 usesm') +Import('env windows usev8') def getSysInfo(): if windows: @@ -41,8 +41,6 @@ def generate_buildinfo(env, target, sour if usev8: js_engine = "V8" - elif usesm: - js_engine = "SpiderMonkey" else: js_engine = "Unknown" --- a/SConstruct +++ b/SConstruct @@ -172,8 +172,7 @@ add_option( "asio" , "Use Asynchronous I add_option( "ssl" , "Enable SSL" , 0 , True ) # library choices -add_option( "usesm" , "use spider monkey for javascript" , 0 , True ) -add_option( "usev8" , "use v8 for javascript" , 0 , True ) +add_option( "disable-scripting" , "do not build support for javascript" , 0 , True ) # mongo feature options add_option( "noshell", "don't build shell" , 0 , True ) @@ -273,10 +272,10 @@ static = has_option( "static" ) debugBuild = has_option( "debugBuild" ) or has_option( "debugBuildAndLogging" ) debugLogging = has_option( "debugBuildAndLogging" ) -noshell = has_option( "noshell" ) -usesm = has_option( "usesm" ) -usev8 = has_option( "usev8" ) +disable_scripting = has_option( "disable-scripting" ) + +noshell = has_option( "noshell" ) asio = has_option( "asio" ) @@ -425,7 +424,9 @@ if boostVersion is None: else: boostVersion = "-" + boostVersion -if ( not ( usesm or usev8 or justClientLib) ): +if disable_scripting or justClientLib: + usev8 = False +else: usev8 = True options_topass["usev8"] = True @@ -768,9 +769,6 @@ if nix: print( "removing precompiled headers" ) os.unlink( env.File("$BUILD_DIR/mongo/pch.h.$GCHSUFFIX").abspath ) # gcc uses the file if it exists -if usesm: - env.Append( CPPDEFINES=["JS_C_STRINGS_ARE_UTF8"] ) - if "uname" in dir(os): hacks = buildscripts.findHacks( os.uname() ) if hacks is not None: @@ -1138,7 +1136,8 @@ Export("shellEnv") Export("testEnv") Export("has_option use_system_version_of_library") Export("installSetup") -Export("usesm usev8") +Export("usev8") +Export("disable_scripting") Export("darwin windows solaris linux freebsd nix") Export('module_sconscripts') Export("debugBuild") --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -6,11 +6,12 @@ import os import itertools from buildscripts import utils +Import("disable_scripting") Import("env") Import("shellEnv") Import("testEnv") Import("has_option") -Import("usesm usev8") +Import("usev8") Import("installSetup") Import("enforce_glibc") Import("darwin windows solaris linux nix") @@ -310,11 +311,7 @@ env.StaticLibrary('bson_template_evaluat env.CppUnitTest('bson_template_evaluator_test', ['scripting/bson_template_evaluator_test.cpp'], LIBDEPS=['bson_template_evaluator']) -if usesm: - env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_spidermonkey.cpp', - 'scripting/sm_db.cpp'], - LIBDEPS=['$BUILD_DIR/third_party/js-1.7/js', 'bson_template_evaluator']) -elif usev8: +if usev8: env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_v8.cpp', 'scripting/v8_db.cpp', 'scripting/v8_utils.cpp', @@ -676,7 +673,9 @@ env.StaticLibrary('mocklib', [ test = testEnv.Install( '#/', testEnv.Program("test", - [ f for f in Glob("dbtests/*.cpp") if not str(f).endswith('framework.cpp') ], + [ f for f in Glob("dbtests/*.cpp") + if not str(f).endswith('framework.cpp') and + not (str(f).endswith('jstests.cpp') and disable_scripting)], LIBDEPS = [ "mongocommon", "serveronly", --- a/src/mongo/scripting/engine_none.cpp +++ b/src/mongo/scripting/engine_none.cpp @@ -21,4 +21,8 @@ namespace mongo { void ScriptEngine::setup() { // noop } + + std::string ScriptEngine::getInterpreterVersionString() { + return "none"; + } } --- a/src/third_party/SConscript +++ b/src/third_party/SConscript @@ -1,6 +1,6 @@ # -*- mode: python -*- -Import("env use_system_version_of_library windows darwin usesm usev8") +Import("env use_system_version_of_library windows darwin usev8") env.SConscript( [ "murmurhash3/SConscript", @@ -34,18 +34,7 @@ else: env.SConscript('snappy/SConscript') env.StaticLibrary('shim_snappy', ['shim_snappy.cpp'], LIBDEPS=['snappy/snappy']) -if usesm: - if use_system_version_of_library("sm"): - env.StaticLibrary("shim_spidermonkey", ['shim_spidermonkey.cpp'], SYSLIBDEPS=['js']) - else: - if windows: - env.Append(CPPDEFINES=['XP_WIN']) - else: - env.Append(CPPDEFINES=['XP_UNIX']) - env.Append(CPPPATH='$BUILD_DIR/third_party/js-1.7') - env.SConscript('js-1.7/SConscript') - env.StaticLibrary('shim_spidermonkey', ['shim_spidermonkey.cpp'], LIBDEPS=['js-1.7/js']) -elif usev8: +if usev8: if use_system_version_of_library("v8"): env.StaticLibrary("shim_v8", ['shim_v8.cpp'], SYSLIBDEPS=['v8']) else: debian/patches/0005-ARM-support-for-ASM-operations-in-MongoDB.patch0000664000000000000000000001246412267733665021655 0ustar From: Robie Basak Date: Sat, 20 Apr 2013 22:05:50 -0300 Subject: ARM support for ASM operations in MongoDB This is a modified version of Jon Masters' ARM patch. I have replaced some of the calls whose return value semantics didn't quite match the existing x86 assembler. Original-Author: Jon Masters Origin: http://lists.fedoraproject.org/pipermail/arm/2013-February/005388.html Last-Update: 2013-03-15 --- src/mongo/platform/atomic_intrinsics_gcc.h | 69 +++++++++++++++++++++++++++++- src/mongo/platform/bits.h | 2 +- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/src/mongo/platform/atomic_intrinsics_gcc.h b/src/mongo/platform/atomic_intrinsics_gcc.h index f8f96f0..da36685 100644 --- a/src/mongo/platform/atomic_intrinsics_gcc.h +++ b/src/mongo/platform/atomic_intrinsics_gcc.h @@ -14,14 +14,19 @@ */ /** - * Implementation of the AtomicIntrinsics::* operations for IA-32 and AMD64 systems using a - * GCC-compatible compiler toolchain. + * Implementation of the AtomicIntrinsics::* operations for IA-32, AMD64, and 32-bit ARM + * systems using a GCC-compatible compiler toolchain. */ #pragma once #include +#if defined(__arm__) +typedef int (__kuser_cmpxchg_t)(int oldval, int newval, volatile int *ptr); +#define __kuser_cmpxchg (*(__kuser_cmpxchg_t *)0xffff0fc0) +#endif + namespace mongo { /** @@ -37,31 +42,58 @@ namespace mongo { static T compareAndSwap(volatile T* dest, T expected, T newValue) { T result; + +#if defined(__i386__) || defined(__x86_64__) asm volatile ("lock cmpxchg %[src], %[dest]" : [dest] "+m" (*dest), "=a" (result) : [src] "r" (newValue), "a" (expected) : "memory", "cc"); +#endif + +#if defined(__arm__) + result = __sync_val_compare_and_swap(dest, expected, newValue); +#endif + return result; } static T swap(volatile T* dest, T newValue) { T result = newValue; + +#if defined(__i386__) || defined(__x86_64__) // No need for "lock" prefix on "xchg". asm volatile ("xchg %[r], %[dest]" : [dest] "+m" (*dest), [r] "+r" (result) : : "memory"); +#endif + +#if defined(__arm__) + __sync_synchronize(); + result = __sync_lock_test_and_set(dest, newValue); +#endif + return result; } static T load(volatile const T* value) { + +#if defined(__i386__) || defined(__x86_64__) asm volatile ("mfence" ::: "memory"); T result = *value; asm volatile ("mfence" ::: "memory"); +#endif + +#if defined(__arm__) + asm volatile("mcr p15, 0, r0, c7, c10, 5"); + T result = *value; + asm volatile("mcr p15, 0, r0, c7, c10, 5"); +#endif + return result; } @@ -70,19 +102,44 @@ namespace mongo { } static void store(volatile T* dest, T newValue) { + +#if defined(__i386__) || defined(__x86_64__) asm volatile ("mfence" ::: "memory"); *dest = newValue; asm volatile ("mfence" ::: "memory"); +#endif + +#if defined(__arm__) + asm volatile("mcr p15, 0, r0, c7, c10, 5"); + *dest = newValue; + asm volatile("mcr p15, 0, r0, c7, c10, 5"); +#endif + } static T fetchAndAdd(volatile T* dest, T increment) { T result = increment; + +#if defined(__i386__) || defined(__x86_64__) asm volatile ("lock xadd %[src], %[dest]" : [dest] "+m" (*dest), [src] "+r" (result) : : "memory", "cc"); +#endif + +#if defined(__arm__) + int old; + + do { + old = (int)(*dest); + } while(__kuser_cmpxchg((int)old, (int)(old+increment), + (volatile int *)dest)); + + result = old; +#endif + return result; } @@ -105,6 +162,8 @@ namespace mongo { public: static T compareAndSwap(volatile T* dest, T expected, T newValue) { T result = expected; + +#if defined(__i386__) || defined(__x86_64__) asm volatile ("push %%eax\n" "push %%ebx\n" "push %%ecx\n" @@ -125,6 +184,12 @@ namespace mongo { "D" (&result), "d" (&newValue) : "memory", "cc"); +#endif + +#if defined(__arm__) + result = __sync_val_compare_and_swap(dest, expected, newValue); +#endif + return result; } diff --git a/src/mongo/platform/bits.h b/src/mongo/platform/bits.h index 7afc428..75343dd 100644 --- a/src/mongo/platform/bits.h +++ b/src/mongo/platform/bits.h @@ -21,7 +21,7 @@ #if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) #define MONGO_PLATFORM_64 -#elif defined(__i386__) || defined(_WIN32) +#elif defined(__i386__) || defined(_WIN32) || defined(__arm__) #define MONGO_PLATFORM_32 #else #error "unknown platform" debian/patches/0011-Use-a-signed-char-to-store-BSONType-enumerations.patch0000664000000000000000000000256012267733665023261 0ustar From a1689790db10139d09c4fb29f500470564faabde Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Mon, 6 May 2013 23:01:56 +0100 Subject: [PATCH] SERVER-9680 Use a signed char to store BSONType enumerations MinKey is defined as -1, so a signed char must be used to store BSONType enumerations. Using a char to store a negative value results in undefined behaviour. On i386 and amd64 architectures it happens to work because on these platforms a char is generally signed, but this is not guaranteed. This fixes a build failure on ARM, where chars are unsigned by default, and using MinKey (defined as -1) results in a compiler error. --- src/mongo/bson/bson_validate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo/bson/bson_validate.cpp b/src/mongo/bson/bson_validate.cpp index 9ac0bcb..88e6d48 100644 --- a/src/mongo/bson/bson_validate.cpp +++ b/src/mongo/bson/bson_validate.cpp @@ -130,8 +130,8 @@ Status validateElementInfo(Buffer* buffer, ValidationState::State* nextState) { Status status = Status::OK(); - char type; - if ( !buffer->readNumber(&type) ) + signed char type; + if ( !buffer->readNumber(&type) ) return Status( ErrorCodes::InvalidBSON, "invalid bson" ); if ( type == EOO ) { -- 1.8.1.6 debian/patches/0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch0000664000000000000000000004073012267733665023240 0ustar From f625b0737634fa96ddfcf18d8316863ee1cf6cfa Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Tue, 10 Dec 2013 12:57:01 +0000 Subject: [PATCH 1/3] SERVER-12064 Atomic operations for gcc non-Intel architectures Add support for non-Intel architectures by using gcc builtins where possible, but only on non-Intel builds. This permits builds to continue to work on Intel architectures even with older gcc versions that do not have the builtins. atomic_intrinsics_gcc.h contains non-portable Intel assembly, so move it to atomic_intrinsics_gcc_intel.h and add an atomic_intrinsics_gcc_generic.h equivalent that uses only modern gcc builtins. Adjust atomic_intrinsics.h to use atomic_intrinsics_gcc_intel.h in the Intel case, and atomic_instrinsics_gcc_generic.h in an additional "otherwise" case. This does not change behaviour or compatibility in the common IA-32 and x86_64 cases. The previously existing code will continue to be used in these cases. An older gcc without the modern gcc builtins will continue to be able to build on these architectures because the previously existing assembly will be used. This does make this code fully portable to any architecture supported by a modern gcc, since the new, generic code will be used in this case. (cherry picked from commit 5c26dfa8330bb048fb929f8332f1424c4e3b431d) --- src/mongo/platform/atomic_intrinsics.h | 6 +- src/mongo/platform/atomic_intrinsics_gcc.h | 166 --------------------- src/mongo/platform/atomic_intrinsics_gcc_generic.h | 70 +++++++++ src/mongo/platform/atomic_intrinsics_gcc_intel.h | 166 +++++++++++++++++++++ 4 files changed, 241 insertions(+), 167 deletions(-) delete mode 100644 src/mongo/platform/atomic_intrinsics_gcc.h create mode 100644 src/mongo/platform/atomic_intrinsics_gcc_generic.h create mode 100644 src/mongo/platform/atomic_intrinsics_gcc_intel.h diff --git a/src/mongo/platform/atomic_intrinsics.h b/src/mongo/platform/atomic_intrinsics.h index cee70db..23b7b6b 100644 --- a/src/mongo/platform/atomic_intrinsics.h +++ b/src/mongo/platform/atomic_intrinsics.h @@ -43,7 +43,11 @@ #if defined(_WIN32) #include "mongo/platform/atomic_intrinsics_win32.h" #elif defined(__GNUC__) -#include "mongo/platform/atomic_intrinsics_gcc.h" +#if defined(__i386__) || defined(__x86_64__) +#include "mongo/platform/atomic_intrinsics_gcc_intel.h" +#else +#include "mongo/platform/atomic_intrinsics_gcc_generic.h" +#endif #else #error "Unsupported os/compiler family" #endif diff --git a/src/mongo/platform/atomic_intrinsics_gcc.h b/src/mongo/platform/atomic_intrinsics_gcc.h deleted file mode 100644 index f8f96f0..0000000 --- a/src/mongo/platform/atomic_intrinsics_gcc.h +++ /dev/null @@ -1,166 +0,0 @@ -/* Copyright 2012 10gen Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Implementation of the AtomicIntrinsics::* operations for IA-32 and AMD64 systems using a - * GCC-compatible compiler toolchain. - */ - -#pragma once - -#include - -namespace mongo { - - /** - * Instantiation of AtomicIntrinsics<> for all word types T where sizeof <= sizeof(void *). - * - * On 32-bit systems, this handles 8-, 16- and 32-bit word types. On 64-bit systems, - * it handles 8-, 16, 32- and 64-bit types. - */ - template - class AtomicIntrinsics { - public: - - static T compareAndSwap(volatile T* dest, T expected, T newValue) { - - T result; - asm volatile ("lock cmpxchg %[src], %[dest]" - : [dest] "+m" (*dest), - "=a" (result) - : [src] "r" (newValue), - "a" (expected) - : "memory", "cc"); - return result; - } - - static T swap(volatile T* dest, T newValue) { - - T result = newValue; - // No need for "lock" prefix on "xchg". - asm volatile ("xchg %[r], %[dest]" - : [dest] "+m" (*dest), - [r] "+r" (result) - : - : "memory"); - return result; - } - - static T load(volatile const T* value) { - asm volatile ("mfence" ::: "memory"); - T result = *value; - asm volatile ("mfence" ::: "memory"); - return result; - } - - static T loadRelaxed(volatile const T* value) { - return *value; - } - - static void store(volatile T* dest, T newValue) { - asm volatile ("mfence" ::: "memory"); - *dest = newValue; - asm volatile ("mfence" ::: "memory"); - } - - static T fetchAndAdd(volatile T* dest, T increment) { - - T result = increment; - asm volatile ("lock xadd %[src], %[dest]" - : [dest] "+m" (*dest), - [src] "+r" (result) - : - : "memory", "cc"); - return result; - } - - private: - AtomicIntrinsics(); - ~AtomicIntrinsics(); - }; - - /** - * Instantiation of AtomicIntrinsics where sizeof exceeds sizeof(void*). - * - * On 32-bit systems, this handles the 64-bit word type. Not used on 64-bit systems. - * - * Note that the implementations of swap, store and fetchAndAdd spin until they succeed. This - * implementation is thread-safe, but may have poor performance in high-contention environments. - * However, no superior solution exists for IA-32 (32-bit x86) systems. - */ - template - class AtomicIntrinsics::type> { - public: - static T compareAndSwap(volatile T* dest, T expected, T newValue) { - T result = expected; - asm volatile ("push %%eax\n" - "push %%ebx\n" - "push %%ecx\n" - "push %%edx\n" - "mov (%%edx), %%ebx\n" - "mov 4(%%edx), %%ecx\n" - "mov (%%edi), %%eax\n" - "mov 4(%%edi), %%edx\n" - "lock cmpxchg8b (%%esi)\n" - "mov %%eax, (%%edi)\n" - "mov %%edx, 4(%%edi)\n" - "pop %%edx\n" - "pop %%ecx\n" - "pop %%ebx\n" - "pop %%eax\n" - : - : "S" (dest), - "D" (&result), - "d" (&newValue) - : "memory", "cc"); - return result; - } - - static T swap(volatile T* dest, T newValue) { - - T expected; - T actual; - do { - expected = *dest; - actual = compareAndSwap(dest, expected, newValue); - } while (actual != expected); - return actual; - } - - static T load(volatile const T* value) { - return compareAndSwap(const_cast(value), T(0), T(0)); - } - - static void store(volatile T* dest, T newValue) { - swap(dest, newValue); - } - - static T fetchAndAdd(volatile T* dest, T increment) { - - T expected; - T actual; - do { - expected = load(dest); - actual = compareAndSwap(dest, expected, expected + increment); - } while (actual != expected); - return actual; - } - - private: - AtomicIntrinsics(); - ~AtomicIntrinsics(); - }; - -} // namespace mongo diff --git a/src/mongo/platform/atomic_intrinsics_gcc_generic.h b/src/mongo/platform/atomic_intrinsics_gcc_generic.h new file mode 100644 index 0000000..64a2499 --- /dev/null +++ b/src/mongo/platform/atomic_intrinsics_gcc_generic.h @@ -0,0 +1,70 @@ +/* Copyright 2012 10gen Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Implementation of the AtomicIntrinsics::* operations for systems on any + * architecture using a new enough GCC-compatible compiler toolchain. + */ + +#pragma once + +#include + +namespace mongo { + + /** + * Instantiation of AtomicIntrinsics<> for all word types T. + */ + template + class AtomicIntrinsics { + public: + + static T compareAndSwap(volatile T* dest, T expected, T newValue) { + __atomic_compare_exchange(dest, &expected, &newValue, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); + return expected; + } + + static T swap(volatile T* dest, T newValue) { + T result; + __atomic_exchange(dest, &newValue, &result, __ATOMIC_SEQ_CST); + return result; + } + + static T load(volatile const T* value) { + T result; + __atomic_load(value, &result, __ATOMIC_SEQ_CST); + return result; + } + + static T loadRelaxed(volatile const T* value) { + T result; + __atomic_load(value, &result, __ATOMIC_RELAXED); + return result; + } + + static void store(volatile T* dest, T newValue) { + __atomic_store(dest, &newValue, __ATOMIC_SEQ_CST); + } + + static T fetchAndAdd(volatile T* dest, T increment) { + return __atomic_fetch_add(dest, increment, __ATOMIC_SEQ_CST); + } + + private: + AtomicIntrinsics(); + ~AtomicIntrinsics(); + }; + +} // namespace mongo diff --git a/src/mongo/platform/atomic_intrinsics_gcc_intel.h b/src/mongo/platform/atomic_intrinsics_gcc_intel.h new file mode 100644 index 0000000..f8f96f0 --- /dev/null +++ b/src/mongo/platform/atomic_intrinsics_gcc_intel.h @@ -0,0 +1,166 @@ +/* Copyright 2012 10gen Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Implementation of the AtomicIntrinsics::* operations for IA-32 and AMD64 systems using a + * GCC-compatible compiler toolchain. + */ + +#pragma once + +#include + +namespace mongo { + + /** + * Instantiation of AtomicIntrinsics<> for all word types T where sizeof <= sizeof(void *). + * + * On 32-bit systems, this handles 8-, 16- and 32-bit word types. On 64-bit systems, + * it handles 8-, 16, 32- and 64-bit types. + */ + template + class AtomicIntrinsics { + public: + + static T compareAndSwap(volatile T* dest, T expected, T newValue) { + + T result; + asm volatile ("lock cmpxchg %[src], %[dest]" + : [dest] "+m" (*dest), + "=a" (result) + : [src] "r" (newValue), + "a" (expected) + : "memory", "cc"); + return result; + } + + static T swap(volatile T* dest, T newValue) { + + T result = newValue; + // No need for "lock" prefix on "xchg". + asm volatile ("xchg %[r], %[dest]" + : [dest] "+m" (*dest), + [r] "+r" (result) + : + : "memory"); + return result; + } + + static T load(volatile const T* value) { + asm volatile ("mfence" ::: "memory"); + T result = *value; + asm volatile ("mfence" ::: "memory"); + return result; + } + + static T loadRelaxed(volatile const T* value) { + return *value; + } + + static void store(volatile T* dest, T newValue) { + asm volatile ("mfence" ::: "memory"); + *dest = newValue; + asm volatile ("mfence" ::: "memory"); + } + + static T fetchAndAdd(volatile T* dest, T increment) { + + T result = increment; + asm volatile ("lock xadd %[src], %[dest]" + : [dest] "+m" (*dest), + [src] "+r" (result) + : + : "memory", "cc"); + return result; + } + + private: + AtomicIntrinsics(); + ~AtomicIntrinsics(); + }; + + /** + * Instantiation of AtomicIntrinsics where sizeof exceeds sizeof(void*). + * + * On 32-bit systems, this handles the 64-bit word type. Not used on 64-bit systems. + * + * Note that the implementations of swap, store and fetchAndAdd spin until they succeed. This + * implementation is thread-safe, but may have poor performance in high-contention environments. + * However, no superior solution exists for IA-32 (32-bit x86) systems. + */ + template + class AtomicIntrinsics::type> { + public: + static T compareAndSwap(volatile T* dest, T expected, T newValue) { + T result = expected; + asm volatile ("push %%eax\n" + "push %%ebx\n" + "push %%ecx\n" + "push %%edx\n" + "mov (%%edx), %%ebx\n" + "mov 4(%%edx), %%ecx\n" + "mov (%%edi), %%eax\n" + "mov 4(%%edi), %%edx\n" + "lock cmpxchg8b (%%esi)\n" + "mov %%eax, (%%edi)\n" + "mov %%edx, 4(%%edi)\n" + "pop %%edx\n" + "pop %%ecx\n" + "pop %%ebx\n" + "pop %%eax\n" + : + : "S" (dest), + "D" (&result), + "d" (&newValue) + : "memory", "cc"); + return result; + } + + static T swap(volatile T* dest, T newValue) { + + T expected; + T actual; + do { + expected = *dest; + actual = compareAndSwap(dest, expected, newValue); + } while (actual != expected); + return actual; + } + + static T load(volatile const T* value) { + return compareAndSwap(const_cast(value), T(0), T(0)); + } + + static void store(volatile T* dest, T newValue) { + swap(dest, newValue); + } + + static T fetchAndAdd(volatile T* dest, T increment) { + + T expected; + T actual; + do { + expected = load(dest); + actual = compareAndSwap(dest, expected, expected + increment); + } while (actual != expected); + return actual; + } + + private: + AtomicIntrinsics(); + ~AtomicIntrinsics(); + }; + +} // namespace mongo -- 1.8.5.2 debian/patches/0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch0000664000000000000000000000206412267733665021160 0ustar From 2baec7b9f63ada09dcb1488290064685e83d9d16 Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Tue, 10 Dec 2013 14:05:01 +0000 Subject: [PATCH 2/3] SERVER-12065 Support ARM and AArch64 builds Detect platforms that define __arm__ and __aarch64__ as 32-bit and 64-bit platforms respectively. (cherry picked from commit c777d0f6a803d3d1b6390fc2cb85d7c13318f030) --- src/mongo/platform/bits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo/platform/bits.h b/src/mongo/platform/bits.h index 7afc428..860bfbd 100644 --- a/src/mongo/platform/bits.h +++ b/src/mongo/platform/bits.h @@ -19,9 +19,9 @@ // figure out if we're on a 64 or 32 bit system -#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) +#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) || defined(__aarch64__) #define MONGO_PLATFORM_64 -#elif defined(__i386__) || defined(_WIN32) +#elif defined(__i386__) || defined(_WIN32) || defined(__arm__) #define MONGO_PLATFORM_32 #else #error "unknown platform" -- 1.8.5.2 debian/patches/0004-Support-ppc64el-builds.patch0000664000000000000000000000110212267733665016443 0ustar Description: Add support for detection of powerpc64 platform Author: James Page Forwarded: no --- a/src/mongo/platform/bits.h +++ b/src/mongo/platform/bits.h @@ -19,7 +19,7 @@ // figure out if we're on a 64 or 32 bit system -#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__amd64__) || defined(_WIN64) || defined(__aarch64__) || defined(__powerpc64__) #define MONGO_PLATFORM_64 #elif defined(__i386__) || defined(_WIN32) || defined(__arm__) #define MONGO_PLATFORM_32 debian/patches/0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch0000664000000000000000000000145512267733665022742 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:16:31 -0500 Subject: All platforms but Windows find hash in std::tr1 --- src/third_party/s2/hash.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/third_party/s2/hash.h b/src/third_party/s2/hash.h index a255f2c..d399bb8 100644 --- a/src/third_party/s2/hash.h +++ b/src/third_party/s2/hash.h @@ -7,10 +7,10 @@ #include "mongo/platform/unordered_set.h" #define hash_set mongo::unordered_set -#if defined OS_LINUX || defined OS_MACOSX || defined __sunos__ || defined __freebsd__ +#if ! defined OS_WINDOWS #define HASH_NAMESPACE_START namespace std { namespace tr1 { #define HASH_NAMESPACE_END }} -#elif defined OS_WINDOWS +#else #define HASH_NAMESPACE_START namespace std { #define HASH_NAMESPACE_END } #endif debian/patches/0007-Use-TIME_UTC_-macro.patch0000664000000000000000000000126512267733665015512 0ustar From: Antonin Kral Date: Wed, 17 Jul 2013 17:07:36 +0200 Subject: Use TIME_UTC_ macro --- src/mongo/util/time_support.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/mongo/util/time_support.h b/src/mongo/util/time_support.h index 47c7d87..9df70e1 100644 --- a/src/mongo/util/time_support.h +++ b/src/mongo/util/time_support.h @@ -96,10 +96,6 @@ namespace mongo { struct tm *gmtime(const time_t *timep); struct tm *localtime(const time_t *timep); -#if defined(MONGO_BOOST_TIME_UTC_HACK) || (BOOST_VERSION >= 105000) #define MONGO_BOOST_TIME_UTC boost::TIME_UTC_ -#else -#define MONGO_BOOST_TIME_UTC boost::TIME_UTC -#endif } // namespace mongo debian/patches/0002-kfreebsd-has-dev-urandom.patch0000664000000000000000000000131112267733665017011 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:16:19 -0500 Subject: kfreebsd has /dev/urandom --- src/mongo/platform/random.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongo/platform/random.cpp b/src/mongo/platform/random.cpp index d1a620d..04f2826 100644 --- a/src/mongo/platform/random.cpp +++ b/src/mongo/platform/random.cpp @@ -105,7 +105,7 @@ namespace mongo { return new WinSecureRandom(); } -#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) class InputStreamSecureRandom : public SecureRandom { public: debian/patches/series0000664000000000000000000000130012314744626012037 0ustar 0001-Create-kfreebsd-like-linux-in-most-respects.patch 0002-kfreebsd-has-dev-urandom.patch 0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch 0004-kfreebsd-does-not-have-sys-prctl.h.patch #0005-ARM-support-for-ASM-operations-in-MongoDB.patch 0006-Fix-ARM-alignment-problems.patch 0007-Use-TIME_UTC_-macro.patch #0008-Use-system-libstemmer.patch 0009-ignore-unused-local-typedefs.patch 0010-fix-integer-signs.patch 0011-Use-a-signed-char-to-store-BSONType-enumerations.patch 0001-Add-option-to-disable-javascript.patch 0001-SERVER-12064-Atomic-operations-for-gcc-non-Intel-arc.patch 0002-SERVER-12065-Support-ARM-and-AArch64-builds.patch 0004-Support-ppc64el-builds.patch 0099-Pagesize-hacks.patch debian/patches/0004-kfreebsd-does-not-have-sys-prctl.h.patch0000664000000000000000000000160512267733665020664 0ustar From: Jeff Epler Date: Fri, 19 Apr 2013 08:16:47 -0500 Subject: kfreebsd does not have MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change was reviewed by Pino Toscano in: https://github.com/rbrito/mongo-debian/pull/2/files#r3884772 and edited by Rogério Theodoro de Brito accordingly. --- src/third_party/v8/src/platform-linux.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/third_party/v8/src/platform-linux.cc b/src/third_party/v8/src/platform-linux.cc index 5da9000..61ed5de 100644 --- a/src/third_party/v8/src/platform-linux.cc +++ b/src/third_party/v8/src/platform-linux.cc @@ -31,7 +31,9 @@ #include #include #include +#ifdef __linux__ #include +#endif #include #include #include debian/patches/0010-fix-integer-signs.patch0000664000000000000000000000500512267733665015601 0ustar Description: make ints unsigned to match boost library argc should be unsigned everywhere, negative values have no sense Author: Laszlo Boszormenyi (GCS) Bug-Debian: http://bugs.debian.org/724100 Last-Update: 2013-10-13 --- --- mongodb-2.4.6.orig/src/mongo/db/auth/privilege_set.cpp +++ mongodb-2.4.6/src/mongo/db/auth/privilege_set.cpp @@ -79,7 +79,7 @@ namespace mongo { resourceSearchList[1] = nsToDatabaseSubstring(desiredPrivilege.getResource()); ActionSet unmetRequirements = desiredPrivilege.getActions(); - for (int i = 0; i < boost::size(resourceSearchList); ++i) { + for (unsigned int i = 0; i < boost::size(resourceSearchList); ++i) { ResourcePrivilegeCacheEntry* entry = _lookupEntry(resourceSearchList[i]); if (NULL == entry) continue; --- mongodb-2.4.6.orig/src/mongo/db/cmdline_test.cpp +++ mongodb-2.4.6/src/mongo/db/cmdline_test.cpp @@ -71,7 +71,7 @@ namespace { "KEEP", "--servicePasswordFake=KEEP" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); testCensoringArgv(argv, argv, argc); } @@ -88,7 +88,7 @@ namespace { "--servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first", @@ -120,7 +120,7 @@ namespace { "-servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first", @@ -152,7 +152,7 @@ namespace { "KEEP", "--servicePasswordFake=KEEP" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); testCensoringVector(argv, argv, argc); } @@ -169,7 +169,7 @@ namespace { "--servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first", @@ -201,7 +201,7 @@ namespace { "-servicePassword", "get out of dodge" }; - const int argc = boost::size(argv); + const unsigned int argc = boost::size(argv); const char* const expected[] = { "first",