Source: mongodb
Version: 2.4.10-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd

Hi,

Currently GNU/Hurd is  not in the architecture list for mongodb. The
first attached patch, rules.patch, adds Hurd to it. The second patch,
0012-support-gnu.patch, adds support for the gnu platform. For two
missing functions in GNU/Hurd, msync and posix_fadvise, warnings are
issued during the build and in the testsuite. Hopefully they should not
create problems when running mongodb-{server,clients}.

Thanks!


--- a/debian/control	2014-04-16 00:02:32.000000000 +0200
+++ b/debian/control	2014-05-09 01:11:00.000000000 +0200
@@ -28,7 +28,7 @@
 XS-Testsuite: autopkgtest
 
 Package: mongodb
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el
+Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 hurd-any armhf ppc64el
 Depends:
  mongodb-dev,
  mongodb-server (>= 1:2.4.1-2),
@@ -54,7 +54,7 @@
  the server, the clients and the development files (headers and library).
 
 Package: mongodb-server
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el
+Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 hurd-any armhf ppc64el
 Depends:
  adduser,
  mongodb-clients,
@@ -82,7 +82,7 @@
  server/load-balancer (mongos).
 
 Package: mongodb-clients
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el
+Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 hurd-any armhf ppc64el
 Depends:
  ${misc:Depends},
  ${shlibs:Depends}
@@ -109,7 +109,7 @@
 
 Package: mongodb-dev
 Section: libdevel
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf ppc64el
+Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 hurd-any armhf ppc64el
 Depends:
  libboost-dev,
  ${misc:Depends}
--- a/SConstruct	2014-05-09 00:54:25.000000000 +0200
+++ b/SConstruct	2014-05-09 13:27:08.000000000 +0200
@@ -348,6 +348,8 @@
     env['PYSYSPLATFORM'] = 'linux2'
 if 'freebsd' in env['PYSYSPLATFORM']:
     env['PYSYSPLATFORM'] = 'freebsd'
+if 'gnu0' in env['PYSYSPLATFORM']:
+    env['PYSYSPLATFORM'] = 'gnu'
 
 if os.sys.platform == 'win32':
     env['OS_FAMILY'] = 'win'
@@ -526,7 +528,7 @@
        env.Append( EXTRACPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
        env.Append( EXTRALIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) )
 
-elif os.sys.platform.startswith("linux") or os.sys.platform.startswith("gnukfreebsd"):
+elif os.sys.platform.startswith("linux") or os.sys.platform.startswith("gnukfreebsd") or os.sys.platform.startswith("gnu0"):
     linux = True
     platform = "linux"
 
--- a/src/mongo/platform/random.cpp	2014-05-09 00:54:25.000000000 +0200
+++ b/src/mongo/platform/random.cpp	2014-05-09 01:30:24.000000000 +0200
@@ -105,7 +105,7 @@
         return new WinSecureRandom();
     }
 
-#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
+#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
 
     class InputStreamSecureRandom : public SecureRandom {
     public:

Reply via email to