summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-03-01 21:09:17 +0000
committerRobin Gloster <mail@glob.in>2016-03-01 21:09:17 +0000
commitd47857c3d900c559dfb5134645311bd78b41a34e (patch)
tree2c0a02d76ce72b5210ea0f0cc97b7343d1bef5fb /pkgs/servers
parent1bbb2f0cf3f1303abd40e7bc801e7582b74f3c62 (diff)
parent02891a0de97d965be5b792c60d8287794d3c2e5f (diff)
downloadnixlib-d47857c3d900c559dfb5134645311bd78b41a34e.tar
nixlib-d47857c3d900c559dfb5134645311bd78b41a34e.tar.gz
nixlib-d47857c3d900c559dfb5134645311bd78b41a34e.tar.bz2
nixlib-d47857c3d900c559dfb5134645311bd78b41a34e.tar.lz
nixlib-d47857c3d900c559dfb5134645311bd78b41a34e.tar.xz
nixlib-d47857c3d900c559dfb5134645311bd78b41a34e.tar.zst
nixlib-d47857c3d900c559dfb5134645311bd78b41a34e.zip
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/nosql/rethinkdb/default.nix2
-rw-r--r--pkgs/servers/nosql/rethinkdb/glibc-2.23.patch111
-rw-r--r--pkgs/servers/plex/default.nix12
-rw-r--r--pkgs/servers/samba/4.x.nix19
4 files changed, 127 insertions, 17 deletions
diff --git a/pkgs/servers/nosql/rethinkdb/default.nix b/pkgs/servers/nosql/rethinkdb/default.nix
index 4566a6702069..f1b57546c7d7 100644
--- a/pkgs/servers/nosql/rethinkdb/default.nix
+++ b/pkgs/servers/nosql/rethinkdb/default.nix
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
     sha256 = "0zs07g7arrrvm85mqbkffyzgd255qawn64r6iqdws25lj1kq2qim";
   };
 
+  patches = [ ./glibc-2.23.patch ];
+
   postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
     sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' external/v8_3.30.33.16/build/gyp/pylib/gyp/xcode_emulation.py
 
diff --git a/pkgs/servers/nosql/rethinkdb/glibc-2.23.patch b/pkgs/servers/nosql/rethinkdb/glibc-2.23.patch
new file mode 100644
index 000000000000..818ea1245648
--- /dev/null
+++ b/pkgs/servers/nosql/rethinkdb/glibc-2.23.patch
@@ -0,0 +1,111 @@
+From 84be09f314c4cbf88b4ac8fe9dbff1d36f0f5781 Mon Sep 17 00:00:00 2001
+From: Daniel Mewes <daniel@rethinkdb.com>
+Date: Fri, 5 Feb 2016 18:45:28 -0800
+Subject: [PATCH] Alpinelinux compilation fixes
+
+by @clandmeter
+---
+ src/containers/buffer_group.hpp                            |  1 +
+ src/containers/printf_buffer.hpp                           |  1 +
+ src/errors.cc                                              |  2 +-
+ src/rdb_protocol/geo/s2/util/math/exactfloat/exactfloat.cc |  4 ++--
+ src/rdb_protocol/geo/s2/util/math/mathlimits.h             | 12 ++++++------
+ src/threading.hpp                                          |  2 ++
+ 6 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/src/containers/buffer_group.hpp b/src/containers/buffer_group.hpp
+index 865c5cb..0403db6 100644
+--- a/src/containers/buffer_group.hpp
++++ b/src/containers/buffer_group.hpp
+@@ -3,6 +3,7 @@
+ #define CONTAINERS_BUFFER_GROUP_HPP_
+ 
+ #include <stdlib.h>
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <vector>
+ 
+diff --git a/src/containers/printf_buffer.hpp b/src/containers/printf_buffer.hpp
+index b7a5154..76959f3 100644
+--- a/src/containers/printf_buffer.hpp
++++ b/src/containers/printf_buffer.hpp
+@@ -5,6 +5,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <sys/types.h>
+ 
+ // Cannot include utils.hpp, we are included by utils.hpp.
+ #include "errors.hpp"
+diff --git a/src/errors.cc b/src/errors.cc
+index d40c04f..39efc9f 100644
+--- a/src/errors.cc
++++ b/src/errors.cc
+@@ -89,7 +89,7 @@ void report_fatal_error(const char *file, int line, const char *msg, ...) {
+ }
+ 
+ const char *errno_string_maybe_using_buffer(int errsv, char *buf, size_t buflen) {
+-#ifdef _GNU_SOURCE
++#ifdef __GLIBC__
+     return strerror_r(errsv, buf, buflen);
+ #elif defined(_WIN32)
+     UNUSED errno_t res = strerror_s(buf, buflen, errsv);
+diff --git a/src/rdb_protocol/geo/s2/util/math/exactfloat/exactfloat.cc b/src/rdb_protocol/geo/s2/util/math/exactfloat/exactfloat.cc
+index 3b07392..aa1a1d3 100644
+--- a/src/rdb_protocol/geo/s2/util/math/exactfloat/exactfloat.cc
++++ b/src/rdb_protocol/geo/s2/util/math/exactfloat/exactfloat.cc
+@@ -110,9 +110,9 @@ static int BN_ext_count_low_zero_bits(const BIGNUM* bn) {
+ ExactFloat::ExactFloat(double v) {
+   BN_init(&bn_);
+   sign_ = signbit(v) ? -1 : 1;
+-  if (isnan(v)) {
++  if (std::isnan(v)) {
+     set_nan();
+-  } else if (isinf(v)) {
++  } else if (std::isinf(v)) {
+     set_inf(sign_);
+   } else {
+     // The following code is much simpler than messing about with bit masks,
+diff --git a/src/rdb_protocol/geo/s2/util/math/mathlimits.h b/src/rdb_protocol/geo/s2/util/math/mathlimits.h
+index 5148422..86af72d 100644
+--- a/src/rdb_protocol/geo/s2/util/math/mathlimits.h
++++ b/src/rdb_protocol/geo/s2/util/math/mathlimits.h
+@@ -14,7 +14,7 @@
+ #define UTIL_MATH_MATHLIMITS_H__
+ 
+ #include <string.h>
+-#include <math.h>
++#include <cmath>
+ #include <cfloat>
+ 
+ #include "rdb_protocol/geo/s2/base/basictypes.h"
+@@ -195,11 +195,11 @@ DECL_UNSIGNED_INT_LIMITS(unsigned long long int)
+   static bool IsNegInf(const Type x) { return _fpclass(x) == _FPCLASS_NINF; }
+ #else
+ #define DECL_FP_LIMIT_FUNCS \
+-  static bool IsFinite(const Type x) { return !isinf(x)  &&  !isnan(x); } \
+-  static bool IsNaN(const Type x) { return isnan(x); } \
+-  static bool IsInf(const Type x) { return isinf(x); } \
+-  static bool IsPosInf(const Type x) { return isinf(x)  &&  x > 0; } \
+-  static bool IsNegInf(const Type x) { return isinf(x)  &&  x < 0; }
++  static bool IsFinite(const Type x) { return !std::isinf(x)  &&  !std::isnan(x); } \
++  static bool IsNaN(const Type x) { return std::isnan(x); } \
++  static bool IsInf(const Type x) { return std::isinf(x); } \
++  static bool IsPosInf(const Type x) { return std::isinf(x)  &&  x > 0; } \
++  static bool IsNegInf(const Type x) { return std::isinf(x)  &&  x < 0; }
+ #endif
+ 
+ // We can't put floating-point constant values in the header here because
+diff --git a/src/threading.hpp b/src/threading.hpp
+index 14fc6a8..9bf033f 100644
+--- a/src/threading.hpp
++++ b/src/threading.hpp
+@@ -1,6 +1,8 @@
+ #ifndef THREADING_HPP_
+ #define THREADING_HPP_
+ 
++#include <sys/types.h>
++#include <unistd.h>
+ #include <functional>
+ #include <vector>
+ 
diff --git a/pkgs/servers/plex/default.nix b/pkgs/servers/plex/default.nix
index aa27f6dd5324..799fea0fe508 100644
--- a/pkgs/servers/plex/default.nix
+++ b/pkgs/servers/plex/default.nix
@@ -5,13 +5,13 @@
 
 let
   plexpkg = if enablePlexPass then {
-    version = "0.9.15.5.1712";
-    vsnHash = "ba5070a";
-    sha256 = "0nwcjlfbs8dacp6wzmga75hkx16ngyaqrmdhcx8vqvgwm8l31rxs";
+    version = "0.9.15.6.1714";
+    vsnHash = "7be11e1";
+    sha256 = "1kyk41qnbm8w5bvnisp3d99cf0r72wvlggfi9h4np7sq4p8ksa0g";
   } else {
-    version = "0.9.15.3.1674";
-    vsnHash = "f46e7e6";
-    sha256 = "086njnjcmknmbn90mmvf60ls7q73g2m955yk621jjdngs4ybvm19";
+    version = "0.9.15.6.1714";
+    vsnHash = "7be11e1";
+    sha256 = "1kyk41qnbm8w5bvnisp3d99cf0r72wvlggfi9h4np7sq4p8ksa0g";
   };
 
 in stdenv.mkDerivation rec {
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix
index 8fcc1a4a9731..4ef47122c289 100644
--- a/pkgs/servers/samba/4.x.nix
+++ b/pkgs/servers/samba/4.x.nix
@@ -5,7 +5,6 @@
 , gnutls, libgcrypt, libgpgerror
 , ncurses, libunwind, libibverbs, librdmacm, systemd
 
-, enableKerberos ? false
 , enableInfiniband ? false
 , enableLDAP ? false
 , enablePrinting ? false
@@ -34,10 +33,9 @@ stdenv.mkDerivation rec {
   buildInputs =
     [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
       docbook_xml_dtd_45 */ readline talloc ntdb tdb tevent ldb popt iniparser
-      libbsd libarchive zlib acl fam libiconv gettext libunwind
+      libbsd libarchive zlib acl fam libiconv gettext libunwind kerberos
     ]
     ++ optionals stdenv.isLinux [ libaio pam systemd ]
-    ++ optional enableKerberos kerberos
     ++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
     ++ optional enableLDAP openldap
     ++ optional (enablePrinting && stdenv.isLinux) cups
@@ -58,23 +56,22 @@ stdenv.mkDerivation rec {
   configureFlags =
     [ "--with-static-modules=NONE"
       "--with-shared-modules=ALL"
+      "--with-system-mitkrb5"
       "--enable-fhs"
       "--sysconfdir=/etc"
       "--localstatedir=/var"
-      "--bundled-libraries=${if enableKerberos && kerberos != null &&
-        kerberos.implementation == "heimdal" then "NONE" else "com_err"}"
+      "--bundled-libraries=NONE"
       "--private-libraries=NONE"
-      "--builtin-libraries=replace"
+      "--builtin-libraries=NONE"
     ]
-    ++ optional (enableKerberos && kerberos != null &&
-      kerberos.implementation == "krb5") "--with-system-mitkrb5"
     ++ optional (!enableDomainController) "--without-ad-dc"
     ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ];
 
   enableParallelBuilding = true;
 
-  stripAllList = [ "bin" "sbin" ];
-
+  # Some libraries don't have /lib/samba in RPATH but need it.
+  # Use find -type f -executable -exec echo {} \; -exec sh -c 'ldd {} | grep "not found"' \;
+  # Looks like a bug in installer scripts.
   postFixup = ''
     export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)"
     read -r -d "" SCRIPT << EOF || true
@@ -85,7 +82,7 @@ stdenv.mkDerivation rec {
     patchelf --set-rpath "\$ALL_LIBS" "\$BIN" 2>/dev/null || exit $?;
     patchelf --shrink-rpath "\$BIN";
     EOF
-    find $out -type f -exec $SHELL -c "$SCRIPT" \;
+    find $out -type f -name \*.so -exec $SHELL -c "$SCRIPT" \;
   '';
 
   meta = with stdenv.lib; {