summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/README.Debian17
-rw-r--r--debian/README.source13
-rw-r--r--debian/changelog308
-rw-r--r--debian/control104
-rw-r--r--debian/copyright230
-rw-r--r--debian/gbp.conf6
-rw-r--r--debian/manpages/mongo.162
-rw-r--r--debian/manpages/mongod.116
-rw-r--r--debian/manpages/mongodump.136
-rw-r--r--debian/manpages/mongoexport.151
-rw-r--r--debian/manpages/mongofiles.152
-rw-r--r--debian/manpages/mongoimport.163
-rw-r--r--debian/manpages/mongorestore.136
-rw-r--r--debian/manpages/mongos.139
-rw-r--r--debian/manpages/mongosniff.130
-rw-r--r--debian/manpages/mongostat.139
-rw-r--r--debian/mongodb-clients.dirs1
-rw-r--r--debian/mongodb-clients.install7
-rw-r--r--debian/mongodb-clients.lintian-overrides30
-rw-r--r--debian/mongodb-clients.manpages8
-rw-r--r--debian/mongodb-dev.dirs2
-rw-r--r--debian/mongodb-dev.install2
-rw-r--r--debian/mongodb-server.dirs4
-rw-r--r--debian/mongodb-server.install3
-rw-r--r--debian/mongodb-server.lintian-overrides10
-rw-r--r--debian/mongodb-server.manpages2
-rw-r--r--debian/mongodb-server.mongodb.init237
-rw-r--r--debian/mongodb-server.postinst55
-rw-r--r--debian/mongodb-server.postrm39
-rw-r--r--debian/mongodb-server.prerm41
-rw-r--r--debian/mongodb.conf90
-rw-r--r--debian/patches/0001-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch22
-rw-r--r--debian/patches/0002-return-empty-TERM-if-not-set-Closes-620910.patch22
-rw-r--r--debian/patches/0003-Ignore-unused-but-set-variables-and-params-Closes-62.patch23
-rw-r--r--debian/patches/0004-use-system-wide-pcre.patch37
-rw-r--r--debian/patches/series4
-rwxr-xr-xdebian/rules25
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch7
39 files changed, 1774 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..2d2b506
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,17 @@
+MongoDB for Debian
+------------------
+
+Binds only to localhost
+
+ As mongo needs some tuning to become secure, it binds to localhost by
+ default. You can change this behavior in /etc/mongodb.conf by
+ editing/removing/commenting out bind_ip line.
+
+Why only for x86 and amd64?
+
+ The mongodb server depends on both little-endianness and unaligned memory
+ access, which I believe means it can only work on i386 and amd64. We believe
+ that the mongodb will be useful even it is not available for all Debian
+ supported platforms.
+
+-- Antonin Kral <A.Kral@sh.cvut.cz>, Fri, 12 Feb 2010 09:19, +0100
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..f57974e
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,13 @@
+gbp
+===
+
+Use of git-import-orig is highly encouraged.
+
+
+debian/gbp.conf
+===============
+
+debian/* files from upstream tarball are filtered out because the merge is really
+difficult to maintain.
+It is up to the maintainer to check manually for upstream changes in debian dir,
+especially man pages.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..1062867
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,308 @@
+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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> Sat, 18 Jun 2011 21:25:25 +0200
+
+mongodb (1:1.8.1-2) unstable; urgency=low
+
+ * Depend on libboost 1.46
+
+ -- Antonin Kral <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <roberto@connexer.com> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <roberto@connexer.com> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <A.Kral@sh.cvut.cz> 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 <richard@10gen.com>
+ * [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 <A.Kral@sh.cvut.cz> Fri, 29 Jan 2010 19:48:45 +0100
+
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..cbba977
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,104 @@
+Source: mongodb
+Section: database
+Priority: optional
+Maintainer: Antonin Kral <A.Kral@sh.cvut.cz>
+Uploaders: Roberto C. Sanchez <roberto@connexer.com>, Jérémy Lal <kapouer@melix.org>
+Build-Depends: debhelper (>= 7), cdbs (>= 0.4.73~), libpcre3, libpcre3-dev, scons, libreadline-dev, libboost-dev, libboost-thread-dev, libboost-filesystem-dev, libboost-program-options-dev, libboost-date-time-dev, python-pymongo
+Standards-Version: 3.9.2
+Vcs-Git: git://github.com/bobek/mongo-debian.git
+Vcs-Browser: https://github.com/bobek/mongo-debian
+Homepage: http://www.mongodb.org
+
+Package: mongodb
+Architecture: i386 amd64
+Depends: mongodb-server, mongodb-dev, ${shlibs:Depends}, ${misc:Depends}
+Description: object/document-oriented database (metapackage)
+ 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 (Q209)
+ .
+ High performance, scalability, and reasonable depth of
+ functionality are the goals for the project.
+ .
+ This is a metapackage that depends on all the mongodb parts.
+
+Package: mongodb-server
+Architecture: i386 amd64
+Depends: mongodb-clients, ${shlibs:Depends}, ${misc:Depends}, adduser
+Description: object/document-oriented database (server package)
+ 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 (Q209)
+ .
+ High performance, scalability, and reasonable depth of
+ functionality are the goals for the project.
+ .
+ This package contains the server itself.
+
+Package: mongodb-clients
+Architecture: i386 amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: object/document-oriented database (client apps)
+ 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 (Q209)
+ .
+ High performance, scalability, and reasonable depth of
+ functionality are the goals for the project.
+ .
+ This package contains the various client applications.
+
+Package: mongodb-dev
+Section: libdevel
+Architecture: i386 amd64
+Depends: mongodb-server, libboost-dev, ${shlibs:Depends}, ${misc:Depends}
+Description: object/document-oriented database (development)
+ 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 (Q209)
+ .
+ High performance, scalability, and reasonable depth of
+ functionality are the goals for the project.
+ .
+ Development headers and libraries.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2a9aea5
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,230 @@
+This package was debianized
+ by Kristina Chodorow <kristina@10gen.com>
+ and Antonin Kral <A.Kral@bobek.cz>
+
+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 <kristina@10gen.com>, Antonin Kral <A.Kral@bobek.cz> and Roberto C. Sanchez <roberto@connexer.com>. 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
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..5c29941
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,6 @@
+[DEFAULT]
+pristine-tar = True
+
+[git-import-orig]
+filter = ['debian/*','lib/*']
+filter-pristine-tar = True
diff --git a/debian/manpages/mongo.1 b/debian/manpages/mongo.1
new file mode 100644
index 0000000..89f4881
--- /dev/null
+++ b/debian/manpages/mongo.1
@@ -0,0 +1,62 @@
+.\" Documentation for the MongoDB shell
+.TH MONGO "1" "June 2009" "10gen" "Mongo Database"
+.SH "NAME"
+mongo \- the Mongo command\-line tool
+.SH "SYNOPSIS"
+\fBmongo [\fIOPTIONS\fR] [\fIDB_ADDRESS\fR] [\fIFILE+\fR]\fR
+.SH "DESCRIPTION"
+.PP
+\fBmongo\fR
+is a JavaScript shell (with GNU
+readline
+capabilities). It supports interactive and non\-interactive use. When used interactively, JavaScript can be used to query the database or perform any other function normally available with SpiderMonkey. Database output is displayed in JSON format.
+.PP
+If JavaScript files are specified on the command line, the shell will run non\-interactively, running each one in sequence and then exiting.
+.SH "EXAMPLES"
+.TP
+.B mongo
+start the shell, connecting to the server at localhost:27017 and using the test database
+.TP
+.B mongo foo
+start the shell using the foo database at localhost:27017
+.TP
+.B mongo 192.169.0.5/foo
+start the shell using the foo database at 192.169.0.5:27017
+.TP
+.B mongo 192.169.0.5:9999/foo
+start the shell using the foo database at 192.169.0.5:9999
+.TP
+.B mongo script1.js script2.js script3.js
+run three scripts and exit
+.SH "OPTIONS"
+.TP
+.B \-\-shell
+run the shell after executing files
+.TP
+.B \-\-help
+show usage information
+.TP
+.B \-\-host HOST
+server to connect to (default HOST=localhost)
+.TP
+.B \-\-port PORT
+port to connect to (default PORT=27017)
+.TP
+.B \-\-nodb
+do not connect to mongod
+.TP
+.B \-\-eval SCRIPT
+evaluate JavaScript
+.TP
+.B \-u USERNAME
+specify user to log in as
+.TP
+.B \-pPASSWORD
+specify password of user (notice there is no space)
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Kristina Chodorow
diff --git a/debian/manpages/mongod.1 b/debian/manpages/mongod.1
new file mode 100644
index 0000000..7b86359
--- /dev/null
+++ b/debian/manpages/mongod.1
@@ -0,0 +1,16 @@
+.\" Documentation for the MongoDB shell
+.TH MONGOD "1" "June 2009" "10gen" "Mongo Database"
+.SH "NAME"
+mongod \- the Mongo Daemon
+.SH "SYNOPSIS"
+.SH "DESCRIPTION"
+.PP
+\fBmongod\fR
+is a core MongoDB daemon. You are not supposed to call it directly, please refer to the wiki if necessary.
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Antonin Kral
diff --git a/debian/manpages/mongodump.1 b/debian/manpages/mongodump.1
new file mode 100644
index 0000000..5cb33ce
--- /dev/null
+++ b/debian/manpages/mongodump.1
@@ -0,0 +1,36 @@
+.\" Documentation for the MongoDB dump tool
+.TH MONGODUMP "1" "June 2009" "10gen" "Mongo Database"
+.SH "NAME"
+mongodump \- the Mongo dump tool
+.SH "SYNOPSIS"
+\fBmongodump [\fIOPTIONS\fR]\fR
+.SH "DESCRIPTION"
+.PP
+\fBmongodump\fR
+is a tool to output a binary representation of a database. It is mostly used for doing hot backups of a database.
+.SH "OPTIONS"
+.TP
+.B \-\-help
+show usage information
+.TP
+.B \-h, \-\-host HOST
+server to connect to (default HOST=localhost)
+.TP
+.B \-d, \-\-db DATABASE
+database to use
+.TP
+.B \-c, \-\-c COLLECTION
+collection to use
+.TP
+.B \-o, \-\-out FILE
+output file, if not specified, stdout is used
+.TP
+.B \-\-dbpath PATH
+directly access mongod data files in this path, instead of connecting to a mongod instance
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Kristina Chodorow
diff --git a/debian/manpages/mongoexport.1 b/debian/manpages/mongoexport.1
new file mode 100644
index 0000000..1996b36
--- /dev/null
+++ b/debian/manpages/mongoexport.1
@@ -0,0 +1,51 @@
+.\" Documentation for the MongoDB shell
+.TH MONGOEXPORT "1" "June 2009" "10gen" "Mongo Database"
+.SH "NAME"
+mongoexport \- the Mongo export tool
+.SH "SYNOPSIS"
+\fBmongoexport [\fIOPTIONS\fR]\fR
+.SH "DESCRIPTION"
+.PP
+\fBmongoexport\fR
+is a tool to export a MongoDB collection to either JSON or CSV. The query can be filtered or a list of fields to output can be given.
+.PP
+If the output is CSV, the fields must be specified in order.
+.SH "EXAMPLES"
+.TP
+.B mongoexport -d test -c test1 --csv -f "name,num"
+export documents from test.test1 in CSV format
+.SH "OPTIONS"
+.TP
+.B \-\-help
+show usage information
+.TP
+.B \-h, \-\-host HOST
+server to connect to (default HOST=localhost)
+.TP
+.B \-d, \-\-db DATABASE
+database to use
+.TP
+.B \-c, \-\-c COLLECTION
+collection to use
+.TP
+.B \-q, \-\-query QUERY
+query filter
+.TP
+.B \-f, \-\-fields FIELDS
+comma\-separated list of field names
+.TP
+.B \-\-csv
+export to CSV instead of JSON
+.TP
+.B \-o, \-\-out FILE
+output file, if not specified, stdout is used
+.TP
+.B \-\-dbpath PATH
+directly access mongod data files in this path, instead of connecting to a mongod instance
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Kristina Chodorow
diff --git a/debian/manpages/mongofiles.1 b/debian/manpages/mongofiles.1
new file mode 100644
index 0000000..4d7c0c5
--- /dev/null
+++ b/debian/manpages/mongofiles.1
@@ -0,0 +1,52 @@
+.\" Documentation for the MongoDB dump tool
+.TH MONGOFILES "1" "June 2009" "10gen" "Mongo Database"
+.SH "NAME"
+mongofiles \- a simple GridFS interface
+.SH "SYNOPSIS"
+\fBmongofiles [\fIOPTIONS\fR]\fR
+.SH "DESCRIPTION"
+.PP
+\fBmongofiles\fR
+is used to list, get, and insert files in the database.
+.SH "EXAMPLES"
+.TP
+.B mongofiles list
+lists files in test.fs.files
+.TP
+.B mongofiles put README.txt
+inserts the file README.txt into the collection test.fs.files
+.TP
+.B mongofiles get photo.jpg
+retrieves photo.jpg from test.fs.files and saves it locally
+.SH "OPTIONS"
+.TP
+.B \-\-help
+show usage information
+.TP
+.B \-h, \-\-host HOST
+mongo host to which to connect
+.TP
+.B \-d, \-\-db DB
+database to use (default DB=test)
+.TP
+.B \-c, \-\-collection COLLECTION (default COLLECTION=fs.files)
+collection to use
+.TP
+.B \-\-command [list\||\|search\||\|put\||\|get]
+execute a command
+.TP
+.B \-\-file FILE
+filename for get or put
+.TP
+.B list
+list all files. takes an optional filename. the file has to start with the filename
+.TP
+.B search
+search all files for something that contains the string
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Kristina Chodorow
diff --git a/debian/manpages/mongoimport.1 b/debian/manpages/mongoimport.1
new file mode 100644
index 0000000..a1d3751
--- /dev/null
+++ b/debian/manpages/mongoimport.1
@@ -0,0 +1,63 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
+.TH MONGOIMPORT "1" "January 2010" "10gen" "Mongo Database"
+.SH "NAME"
+mongoimport \- the Mongo import tool
+.SH "SYNOPSIS"
+\fBmongoimport [\fIOPTIONS\fR]\fR
+.SH "DESCRIPTION"
+.PP
+\fBmongoimport\fR
+is a tool to import a MongoDB collection from JSON, CSV, or TSV. The query can be filtered or a list of fields to input can be given.
+.\".SH "EXAMPLES"
+.\".TP
+.\".B mongoimport -d test -c test1 --csv -f "name,num"
+.\"import documents from test.test1 in CSV format
+.SS "OPTIONS"
+.TP
+\fB\-\-help\fR
+show usage information
+.TP
+.B \-h, \-\-host HOST
+server to connect to (default HOST=localhost)
+.TP
+.B \-d, \-\-db DATABASE
+database to use
+.TP
+.B \-c, \-\-c COLLECTION
+collection to use (some commands)
+.TP
+.B \-\-dbpath PATH
+directly access mongod data files in this path,
+instead of connecting to a mongod instance
+.TP
+.B \-v, \-\-verbose
+be more verbose (include multiple times for more
+verbosity e.g. \fB\-vvvvv\fR)
+.TP
+.B \-f, \-\-fields NAMES
+comma separated list of field names e.g. \fB\-f\fR name,age
+.TP
+.B \-\-fieldFile FILE
+file with fields names \- 1 per line
+.TP
+.B \-\-ignoreBlanks
+if given, empty fields in csv and tsv will be ignored
+.TP
+.B \-\-type TYPE
+type of file to import. default: json (json,csv,tsv)
+.TP
+.B \-\-file FILE
+file to import from; if not specified stdin is used
+.TP
+.B \-\-drop
+drop collection first
+.TP
+.B \-\-headerline
+CSV,TSV only \- use first line as headers
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Kristina Chodorow
diff --git a/debian/manpages/mongorestore.1 b/debian/manpages/mongorestore.1
new file mode 100644
index 0000000..5f207b0
--- /dev/null
+++ b/debian/manpages/mongorestore.1
@@ -0,0 +1,36 @@
+.\" Documentation for the MongoDB dump tool
+.TH MONGORESTORE "1" "June 2009" "10gen" "Mongo Database"
+.SH "NAME"
+mongorestore \- the Mongo restoration tool
+.SH "SYNOPSIS"
+\fBmongorestore [\fIOPTIONS\fR]\fR
+.SH "DESCRIPTION"
+.PP
+\fBmongorestore\fR
+is a tool to use the output from mongodump to restore a database.
+.SH "OPTIONS"
+.TP
+.B \-\-help
+show usage information
+.TP
+.B \-h, \-\-host HOST
+server to connect to (default HOST=localhost)
+.TP
+.B \-d, \-\-db DATABASE
+database to use
+.TP
+.B \-c, \-\-c COLLECTION
+collection to use
+.TP
+.B \-\-dir PATH
+directory from which to restore
+.TP
+.B \-\-dbpath PATH
+directly access mongod data files in this path, instead of connecting to a mongod instance
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Kristina Chodorow
diff --git a/debian/manpages/mongos.1 b/debian/manpages/mongos.1
new file mode 100644
index 0000000..74d01c6
--- /dev/null
+++ b/debian/manpages/mongos.1
@@ -0,0 +1,39 @@
+.\" Documentation for the MongoDB dump tool
+.TH MONGOS "1" "June 2009" "10gen" "Mongo Database"
+.SH "NAME"
+mongos \- the Mongo sharding server
+.SH "SYNOPSIS"
+\fBmongos [\fIOPTIONS\fR]\fR
+.SH "DESCRIPTION"
+.PP
+\fBmongos\fR
+is used to setup, configure, and get information about sharded databases.
+.SH "EXAMPLES"
+.PP
+.B ./mongod --port 9999 --dbpath /data/db/a # first server
+.PP
+.B ./mongod --port 9998 --dbpath /data/db/b # second server
+.PP
+.B ./mongos --configdb localhost:9999 # mongos
+.PP
+starts three servers to set up sharding
+.SH "OPTIONS"
+.TP
+.B \-\-help
+show usage information
+.TP
+.B \-\-port N
+port on which to listen
+.TP
+.B \-\-configdb DATABASE+
+one or more databases to use as the configuration databases
+.TP
+.B \-v+
+verbosity
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Kristina Chodorow
diff --git a/debian/manpages/mongosniff.1 b/debian/manpages/mongosniff.1
new file mode 100644
index 0000000..b6f1063
--- /dev/null
+++ b/debian/manpages/mongosniff.1
@@ -0,0 +1,30 @@
+.TH MONGOSNIFF "1" "Jan 2010" "10gen" "Mongo Database"
+.SH "NAME"
+mongosniff \- the Mongo packet analyzer
+.SH "SYNOPSIS"
+\fBmongosniff [\fIOPTIONS\fR] [\fI<port0> <port1> ...\fR]
+.SH "DESCRIPTION"
+.PP
+\fBmongosniff\fR
+is a analyzer tool for analyzing packets coming to your database.
+.PP
+.SH "OPTIONS"
+.TP
+.B \-\-forward
+Forward all parsed request messages to mongod instance at specified host:port
+.TP
+.B \-\-source
+Source of traffic to sniff, either a network interface or a file containing previously captured packets, in pcap format. If no source is specified, mongosniff will attempt to sniff from one of the machine's network interfaces.
+.TP
+.B \-\-help
+print a short help message.
+.TP
+.B <port0>
+These parameters are used to filter sniffing. By default, only port 27017 is sniffed.
+.SH "COPYRIGHT"
+.PP
+Copyright 2007\-2009 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Antonin Kral
diff --git a/debian/manpages/mongostat.1 b/debian/manpages/mongostat.1
new file mode 100644
index 0000000..e219060
--- /dev/null
+++ b/debian/manpages/mongostat.1
@@ -0,0 +1,39 @@
+.\" Documentation for the MongoDB shell
+.TH MONGOSTAT "1" "March 2010" "10gen" "Mongo Database"
+.SH "NAME"
+mongostat \- view statistics on a running mongod instance
+.SH "SYNOPSIS"
+\fBmongostat [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.PP
+\fBmongostat\fR
+prints statistics on a running mongod instance.
+.SH "OPTIONS"
+.TP
+.B \-\-help
+show usage information
+.TP
+.B \-h, \-\-host HOST
+mongo host to connect to (use "left,right" for pairs)
+\" .TP
+\" .B \-\-port PORT
+\" port to connect to (default PORT=27017)
+.TP
+.B \-d, \-\-db ARG
+db to use
+.TP
+.B \-c, \-\-collection ARG
+collection to use (some commands)
+.TP
+.B \-u, \-\-username USERNAME
+specify user to log in as
+.TP
+.B \-p, \-\-password PASSWORD
+specify password of user (notice there is no space)
+.SH "COPYRIGHT"
+.PP
+Copyright 2010 10gen
+.SH "SEE ALSO"
+For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org.
+.SH "AUTHOR"
+Eliot Horowitz
diff --git a/debian/mongodb-clients.dirs b/debian/mongodb-clients.dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/mongodb-clients.dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/mongodb-clients.install b/debian/mongodb-clients.install
new file mode 100644
index 0000000..d0eda52
--- /dev/null
+++ b/debian/mongodb-clients.install
@@ -0,0 +1,7 @@
+debian/tmp/usr/bin/mongo
+debian/tmp/usr/bin/mongodump
+debian/tmp/usr/bin/mongoexport
+debian/tmp/usr/bin/mongofiles
+debian/tmp/usr/bin/mongoimport
+debian/tmp/usr/bin/mongorestore
+debian/tmp/usr/bin/mongostat
diff --git a/debian/mongodb-clients.lintian-overrides b/debian/mongodb-clients.lintian-overrides
new file mode 100644
index 0000000..5eb21a7
--- /dev/null
+++ b/debian/mongodb-clients.lintian-overrides
@@ -0,0 +1,30 @@
+# Agreed with upstream, that redefining rpath is necessary as xulrunner used to
+# change API without changing so-name
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongo /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongodump /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongoexport /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongofiles /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongoimport /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongorestore /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongostat /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongo /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongodump /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongoexport /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongofiles /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongoimport /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongorestore /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongostat /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongo /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongodump /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongoexport /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongofiles /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongoimport /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongorestore /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongostat /usr/lib/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongo /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongodump /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongoexport /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongofiles /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongoimport /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongorestore /usr/lib64/xulrunner-1.9.1
+mongodb-clients: binary-or-shlib-defines-rpath usr/bin/mongostat /usr/lib64/xulrunner-1.9.1
diff --git a/debian/mongodb-clients.manpages b/debian/mongodb-clients.manpages
new file mode 100644
index 0000000..1e0e2f1
--- /dev/null
+++ b/debian/mongodb-clients.manpages
@@ -0,0 +1,8 @@
+debian/manpages/mongo.1
+debian/manpages/mongodump.1
+debian/manpages/mongoexport.1
+debian/manpages/mongofiles.1
+debian/manpages/mongoimport.1
+debian/manpages/mongorestore.1
+debian/manpages/mongosniff.1
+debian/manpages/mongostat.1
diff --git a/debian/mongodb-dev.dirs b/debian/mongodb-dev.dirs
new file mode 100644
index 0000000..da07fdd
--- /dev/null
+++ b/debian/mongodb-dev.dirs
@@ -0,0 +1,2 @@
+usr/include
+usr/lib
diff --git a/debian/mongodb-dev.install b/debian/mongodb-dev.install
new file mode 100644
index 0000000..c29ed4e
--- /dev/null
+++ b/debian/mongodb-dev.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/include
+debian/tmp/usr/lib
diff --git a/debian/mongodb-server.dirs b/debian/mongodb-server.dirs
new file mode 100644
index 0000000..3baae15
--- /dev/null
+++ b/debian/mongodb-server.dirs
@@ -0,0 +1,4 @@
+etc
+usr/bin
+var/lib/mongodb
+var/log/mongodb
diff --git a/debian/mongodb-server.install b/debian/mongodb-server.install
new file mode 100644
index 0000000..9d6e113
--- /dev/null
+++ b/debian/mongodb-server.install
@@ -0,0 +1,3 @@
+debian/mongodb.conf etc
+debian/tmp/usr/bin/mongod
+debian/tmp/usr/bin/mongos
diff --git a/debian/mongodb-server.lintian-overrides b/debian/mongodb-server.lintian-overrides
new file mode 100644
index 0000000..2436014
--- /dev/null
+++ b/debian/mongodb-server.lintian-overrides
@@ -0,0 +1,10 @@
+# Agreed with upstream, that redefining rpath is necessary as xulrunner used to
+# change API without changing so-name
+mongodb-server: binary-or-shlib-defines-rpath ./usr/bin/mongod /usr/lib/xulrunner-1.9.1
+mongodb-server: binary-or-shlib-defines-rpath ./usr/bin/mongos /usr/lib/xulrunner-1.9.1
+mongodb-server: binary-or-shlib-defines-rpath ./usr/bin/mongod /usr/lib64/xulrunner-1.9.1
+mongodb-server: binary-or-shlib-defines-rpath ./usr/bin/mongos /usr/lib64/xulrunner-1.9.1
+mongodb-server: binary-or-shlib-defines-rpath usr/bin/mongod /usr/lib/xulrunner-1.9.1
+mongodb-server: binary-or-shlib-defines-rpath usr/bin/mongos /usr/lib/xulrunner-1.9.1
+mongodb-server: binary-or-shlib-defines-rpath usr/bin/mongod /usr/lib64/xulrunner-1.9.1
+mongodb-server: binary-or-shlib-defines-rpath usr/bin/mongos /usr/lib64/xulrunner-1.9.1
diff --git a/debian/mongodb-server.manpages b/debian/mongodb-server.manpages
new file mode 100644
index 0000000..ac4a0fc
--- /dev/null
+++ b/debian/mongodb-server.manpages
@@ -0,0 +1,2 @@
+debian/manpages/mongod.1
+debian/manpages/mongos.1
diff --git a/debian/mongodb-server.mongodb.init b/debian/mongodb-server.mongodb.init
new file mode 100644
index 0000000..5c5f879
--- /dev/null
+++ b/debian/mongodb-server.mongodb.init
@@ -0,0 +1,237 @@
+#!/bin/sh
+#
+# init.d script with LSB support.
+#
+# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# This is free software; you may redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License with
+# the Debian operating system, in /usr/share/common-licenses/GPL; if
+# not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+#
+### BEGIN INIT INFO
+# Provides: mongodb
+# Required-Start: $network $local_fs $remote_fs
+# Required-Stop: $network $local_fs $remote_fs
+# Should-Start: $named
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: An object/document-oriented database
+# Description: 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 (Q209)
+# .
+# This package is build with V8 JavaScript engine.
+# .
+# High performance, scalability, and reasonable depth of
+# functionality are the goals for the project.
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/mongod
+DESC=database
+
+# Default defaults. Can be overridden by the /etc/default/$NAME
+NAME=mongodb
+CONF=/etc/mongodb.conf
+PIDFILE=/var/run/$NAME.pid
+ENABLE_MONGODB=yes
+
+# Include mongodb defaults if available
+if [ -f /etc/default/$NAME ] ; then
+ . /etc/default/$NAME
+fi
+
+if test ! -x $DAEMON; then
+ echo "Could not find $DAEMON"
+ exit 0
+fi
+
+if test "x$ENABLE_MONGODB" != "xyes"; then
+ exit 0
+fi
+
+. /lib/lsb/init-functions
+
+STARTTIME=1
+DIETIME=10 # Time to wait for the server to die, in seconds
+ # If this value is set too low you might not
+ # let some servers to die gracefully and
+ # 'restart' will not work
+
+DAEMONUSER=${DAEMONUSER:-mongodb}
+DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF run"}
+
+set -e
+
+
+running_pid() {
+# Check if a given process pid's cmdline matches a given name
+ pid=$1
+ name=$2
+ [ -z "$pid" ] && return 1
+ [ ! -d /proc/$pid ] && return 1
+ cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+ # Is this the expected server
+ [ "$cmd" != "$name" ] && return 1
+ return 0
+}
+
+running() {
+# Check if the process is running looking at /proc
+# (works for all users)
+
+ # No pidfile, probably no daemon present
+ [ ! -f "$PIDFILE" ] && return 1
+ pid=`cat $PIDFILE`
+ running_pid $pid $DAEMON || return 1
+ return 0
+}
+
+start_server() {
+# Start the process using the wrapper
+ start-stop-daemon --background --start --quiet --pidfile $PIDFILE \
+ --make-pidfile --chuid $DAEMONUSER \
+ --exec $DAEMON -- $DAEMON_OPTS
+ errcode=$?
+ return $errcode
+}
+
+stop_server() {
+# Stop the process using the wrapper
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --user $DAEMONUSER \
+ --exec $DAEMON
+ errcode=$?
+ return $errcode
+}
+
+force_stop() {
+# Force the process to die killing it manually
+ [ ! -e "$PIDFILE" ] && return
+ if running ; then
+ kill -15 $pid
+ # Is it really dead?
+ sleep "$DIETIME"s
+ if running ; then
+ kill -9 $pid
+ sleep "$DIETIME"s
+ if running ; then
+ echo "Cannot kill $NAME (pid=$pid)!"
+ exit 1
+ fi
+ fi
+ fi
+ rm -f $PIDFILE
+}
+
+
+case "$1" in
+ start)
+ log_daemon_msg "Starting $DESC" "$NAME"
+ # Check if it's running first
+ if running ; then
+ log_progress_msg "apparently already running"
+ log_end_msg 0
+ exit 0
+ fi
+ if start_server ; then
+ # NOTE: Some servers might die some time after they start,
+ # this code will detect this issue if STARTTIME is set
+ # to a reasonable value
+ [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time
+ if running ; then
+ # It's ok, the server started and is running
+ log_end_msg 0
+ else
+ # It is not running after we did start
+ log_end_msg 1
+ fi
+ else
+ # Either we could not start it
+ log_end_msg 1
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ if running ; then
+ # Only stop the server if we see it running
+ errcode=0
+ stop_server || errcode=$?
+ log_end_msg $errcode
+ else
+ # If it's not running don't do anything
+ log_progress_msg "apparently not running"
+ log_end_msg 0
+ exit 0
+ fi
+ ;;
+ force-stop)
+ # First try to stop gracefully the program
+ $0 stop
+ if running; then
+ # If it's still running try to kill it more forcefully
+ log_daemon_msg "Stopping (force) $DESC" "$NAME"
+ errcode=0
+ force_stop || errcode=$?
+ log_end_msg $errcode
+ fi
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ errcode=0
+ stop_server || errcode=$?
+ # Wait some sensible amount, some server need this
+ [ -n "$DIETIME" ] && sleep $DIETIME
+ start_server || errcode=$?
+ [ -n "$STARTTIME" ] && sleep $STARTTIME
+ running || errcode=$?
+ log_end_msg $errcode
+ ;;
+ status)
+
+ log_daemon_msg "Checking status of $DESC" "$NAME"
+ if running ; then
+ log_progress_msg "running"
+ log_end_msg 0
+ else
+ log_progress_msg "apparently not running"
+ log_end_msg 1
+ exit 1
+ fi
+ ;;
+ # MongoDB can't reload its configuration.
+ reload)
+ log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
+ log_warning_msg "cannot re-read the config file (use restart)."
+ ;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/mongodb-server.postinst b/debian/mongodb-server.postinst
new file mode 100644
index 0000000..4d0e786
--- /dev/null
+++ b/debian/mongodb-server.postinst
@@ -0,0 +1,55 @@
+#!/bin/sh
+# postinst script for mongodb
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ # create a mongodb group and user
+ if ! grep -q mongodb /etc/passwd; then
+ adduser --system --no-create-home mongodb
+ addgroup --system mongodb
+ adduser mongodb mongodb
+ fi
+
+ # create db -- note: this should agree with dbpath in mongodb.conf
+ mkdir -p /var/lib/mongodb
+ chown -R mongodb:mongodb /var/lib/mongodb
+
+ # create logdir -- note: this should agree with logpath in mongodb.conf
+ mkdir -p /var/log/mongodb
+ chown -R mongodb:mongodb /var/log/mongodb
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/mongodb-server.postrm b/debian/mongodb-server.postrm
new file mode 100644
index 0000000..4bbb708
--- /dev/null
+++ b/debian/mongodb-server.postrm
@@ -0,0 +1,39 @@
+#!/bin/sh
+# postrm script for mongodb
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/mongodb-server.prerm b/debian/mongodb-server.prerm
new file mode 100644
index 0000000..9507ade
--- /dev/null
+++ b/debian/mongodb-server.prerm
@@ -0,0 +1,41 @@
+#!/bin/sh
+# prerm script for mongodb
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+echo "arg: $1"
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/mongodb.conf b/debian/mongodb.conf
new file mode 100644
index 0000000..d14966e
--- /dev/null
+++ b/debian/mongodb.conf
@@ -0,0 +1,90 @@
+# mongodb.conf
+
+# Where to store the data.
+dbpath=/var/lib/mongodb
+
+#where to log
+logpath=/var/log/mongodb/mongodb.log
+
+logappend=true
+
+bind_ip = 127.0.0.1
+#port = 27017
+
+# Enables periodic logging of CPU utilization and I/O wait
+#cpu = true
+
+# Turn on/off security. Off is currently the default
+#noauth = true
+#auth = true
+
+# Verbose logging output.
+#verbose = true
+
+# Inspect all client data for validity on receipt (useful for
+# developing drivers)
+#objcheck = true
+
+# Enable db quota management
+#quota = true
+
+# Set oplogging level where n is
+# 0=off (default)
+# 1=W
+# 2=R
+# 3=both
+# 7=W+some reads
+#oplog = 0
+
+# Diagnostic/debugging option
+#nocursors = true
+
+# Ignore query hints
+#nohints = true
+
+# Disable the HTTP interface (Defaults to localhost:27018).
+#nohttpinterface = true
+
+# Turns off server-side scripting. This will result in greatly limited
+# functionality
+#noscripting = true
+
+# Turns off table scans. Any query that would do a table scan fails.
+#notablescan = true
+
+# Disable data file preallocation.
+#noprealloc = true
+
+# Specify .ns file size for new databases.
+# nssize = <size>
+
+# Accout token for Mongo monitoring server.
+#mms-token = <token>
+
+# Server name for Mongo monitoring server.
+#mms-name = <server-name>
+
+# Ping interval for Mongo monitoring server.
+#mms-interval = <seconds>
+
+# Replication Options
+
+# in replicated mongo databases, specify here whether this is a slave or master
+#slave = true
+#source = master.example.com
+# Slave only: specify a single database to replicate
+#only = master.example.com
+# or
+#master = true
+#source = slave.example.com
+
+# Address of a server to pair with.
+#pairwith = <server:port>
+# Address of arbiter server.
+#arbiter = <server:port>
+# Automatically resync if slave data is stale
+#autoresync
+# Custom size for replication operation log.
+#oplogSize = <MB>
+# Size limit for in-memory storage of op ids.
+#opIdMem = <bytes>
diff --git a/debian/patches/0001-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch b/debian/patches/0001-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch
new file mode 100644
index 0000000..5fed695
--- /dev/null
+++ b/debian/patches/0001-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch
@@ -0,0 +1,22 @@
+From: Antonin Kral <a.kral@bobek.cz>
+Date: Tue, 5 Apr 2011 10:19:25 +0200
+Subject: install libs to /usr/lib not /usr/lib64 (Closes: #588557)
+
+---
+ SConstruct | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 4e46052..f98eb27 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -495,7 +495,7 @@ elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:
+
+ if os.uname()[4] == "x86_64" and not force32:
+ linux64 = True
+- nixLibPrefix = "lib64"
++ nixLibPrefix = "lib"
+ env.Append( LIBPATH=["/usr/lib64" , "/lib64" ] )
+ env.Append( LIBS=["pthread"] )
+
+--
diff --git a/debian/patches/0002-return-empty-TERM-if-not-set-Closes-620910.patch b/debian/patches/0002-return-empty-TERM-if-not-set-Closes-620910.patch
new file mode 100644
index 0000000..be0629b
--- /dev/null
+++ b/debian/patches/0002-return-empty-TERM-if-not-set-Closes-620910.patch
@@ -0,0 +1,22 @@
+From: Antonin Kral <a.kral@bobek.cz>
+Date: Tue, 5 Apr 2011 10:19:55 +0200
+Subject: return empty TERM if not set (Closes: #620910)
+
+---
+ SConstruct | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index f98eb27..7417daa 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -684,7 +684,7 @@ if nix:
+
+ #make scons colorgcc friendly
+ env['ENV']['HOME'] = os.environ['HOME']
+- env['ENV']['TERM'] = os.environ['TERM']
++ env['ENV']['TERM'] = os.environ.get('TERM', '')
+
+ if linux and has_option( "sharedclient" ):
+ env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
+--
diff --git a/debian/patches/0003-Ignore-unused-but-set-variables-and-params-Closes-62.patch b/debian/patches/0003-Ignore-unused-but-set-variables-and-params-Closes-62.patch
new file mode 100644
index 0000000..f597cbb
--- /dev/null
+++ b/debian/patches/0003-Ignore-unused-but-set-variables-and-params-Closes-62.patch
@@ -0,0 +1,23 @@
+From: Antonin Kral <a.kral@bobek.cz>
+Date: Wed, 14 Sep 2011 17:26:58 +0200
+Subject: Ignore unused but set variables and params (Closes: #625401)
+
+---
+ SConstruct | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 7417daa..05d0dfe 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -674,7 +674,8 @@ if nix:
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux:
+ env.Append( CPPFLAGS=" -Werror " )
+- if not has_option('clang'):
++ env.Append( CPPFLAGS=" -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter " ) # ignore new gcc 4.6 warnings
++ if not has_option('clang'):
+ env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's
+
+ env.Append( CPPDEFINES="_FILE_OFFSET_BITS=64" )
+--
diff --git a/debian/patches/0004-use-system-wide-pcre.patch b/debian/patches/0004-use-system-wide-pcre.patch
new file mode 100644
index 0000000..82851e0
--- /dev/null
+++ b/debian/patches/0004-use-system-wide-pcre.patch
@@ -0,0 +1,37 @@
+From: Antonin Kral <a.kral@bobek.cz>
+Date: Thu, 15 Sep 2011 09:41:07 +0200
+Subject: use system-wide pcre
+
+---
+ SConstruct | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 05d0dfe..ababc34 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -493,6 +493,10 @@ elif "linux2" == os.sys.platform or "linux3" == os.sys.platform:
+ linux = True
+ platform = "linux"
+
++ # use system-wide pcre
++ env.Append( CPPPATH=["/usr/include"] )
++ env.Append( LIBS=["pcrecpp", "pcre"] )
++
+ if os.uname()[4] == "x86_64" and not force32:
+ linux64 = True
+ nixLibPrefix = "lib"
+@@ -761,7 +765,11 @@ if not windows:
+ for x in os.listdir( "third_party" ):
+ if not x.endswith( ".py" ) or x.find( "#" ) >= 0:
+ continue
+-
++
++ # use system-wide pcre
++ if x.find('pcre') >= 0:
++ continue
++
+ shortName = x.rpartition( "." )[0]
+ path = "third_party/%s" % x
+
+--
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a018508
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+0001-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch
+0002-return-empty-TERM-if-not-set-Closes-620910.patch
+0003-Ignore-unused-but-set-variables-and-params-Closes-62.patch
+0004-use-system-wide-pcre.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b45d63b
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,25 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/utils.mk
+include /usr/share/cdbs/1/class/scons.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+DEB_DH_INSTALLINIT_ARGS = --name=mongodb
+
+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
+
+DEB_SCONS_BUILD_TARGET = all
+DEB_SCONS_INSTALL_OPTIONS += --prefix=$(CURDIR)/debian/tmp/usr --full
+DEB_SCONS_CHECK_TARGET = --smokedbprefix=$(CURDIR)/debian/tmp-test smoke
+
+clean::
+ find . -name "*.pyc" -delete
+ rm -f buildinfo.cpp
+ rm -rf debian/tmp-test
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..d19337b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,7 @@
+# Compulsory line, this is a version 3 file
+version=3
+
+# examination of the downloads page content as the directory listing is not allowed anymore
+# Forced regexp to match only to the current stable release
+http://www.mongodb.org/display/DOCS/Downloads \
+ http://.*mongodb\.org/src/mongodb-src-r(1\.6[\d\.]+)\.tar\.gz