summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-11-11 22:30:34 +0100
committerVladimír Čunát <vcunat@gmail.com>2013-11-11 22:32:46 +0100
commit85d21a696347dcef08b60ee87c60455a43560b66 (patch)
tree2ee1c8078c1a31e11695db82b81e1a9ccdfc5069 /pkgs
parentd4e210539bd3897c02e69ba86f5e4badceff7cd9 (diff)
downloadnixlib-85d21a696347dcef08b60ee87c60455a43560b66.tar
nixlib-85d21a696347dcef08b60ee87c60455a43560b66.tar.gz
nixlib-85d21a696347dcef08b60ee87c60455a43560b66.tar.bz2
nixlib-85d21a696347dcef08b60ee87c60455a43560b66.tar.lz
nixlib-85d21a696347dcef08b60ee87c60455a43560b66.tar.xz
nixlib-85d21a696347dcef08b60ee87c60455a43560b66.tar.zst
nixlib-85d21a696347dcef08b60ee87c60455a43560b66.zip
libxml2: bump 2.9.0 -> 2.9.1 (CVE-2013-1969)
And drop patch that has been merged upstream.
Close #1199.
Hack around python install problems (the rest is from bjornfor).
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/libxml2/default.nix25
-rw-r--r--pkgs/development/libraries/libxml2/pthread-once-init.patch35
2 files changed, 15 insertions, 45 deletions
diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix
index c2012a444394..5ead83011c8c 100644
--- a/pkgs/development/libraries/libxml2/default.nix
+++ b/pkgs/development/libraries/libxml2/default.nix
@@ -2,20 +2,17 @@
 
 assert pythonSupport -> python != null;
 
-stdenv.mkDerivation rec {
-  name = "libxml2-2.9.0";
+#TODO: share most stuff between python and non-python builds, perhaps via multiple-output
+
+stdenv.mkDerivation (rec {
+  name = "libxml2-2.9.1";
 
   src = fetchurl {
     url = "ftp://xmlsoft.org/libxml2/${name}.tar.gz";
-    sha256 = "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd";
+    sha256 = "1nqgd1qqmg0cg09mch78m2ac9klj9n87blilx4kymi7jcv5n8g7x";
   };
 
-  patches = [ ./pthread-once-init.patch ];
-
-  configureFlags = stdenv.lib.optionalString pythonSupport "--with-python=${python}";
-
-  buildInputs = (stdenv.lib.optional pythonSupport [ python ])
-
+  buildInputs = stdenv.lib.optional pythonSupport python
     # Libxml2 has an optional dependency on liblzma.  However, on impure
     # platforms, it may end up using that from /usr/lib, and thus lack a
     # RUNPATH for that, leading to undefined references for its users.
@@ -36,4 +33,12 @@ stdenv.mkDerivation rec {
     platforms = stdenv.lib.platforms.unix;
     maintainers = [ stdenv.lib.maintainers.eelco ];
   };
-}
+
+} // stdenv.lib.optionalAttrs pythonSupport {
+  configureFlags = "--with-python=${python}";
+
+  # this is a pair of ugly hacks to make python stuff install into the right place
+  preInstall = ''substituteInPlace python/libxml2mod.la --replace "${python}" "$out"'';
+  installFlags = ''pythondir="$(out)/lib/${python.libPrefix}/site-packages"'';
+})
+
diff --git a/pkgs/development/libraries/libxml2/pthread-once-init.patch b/pkgs/development/libraries/libxml2/pthread-once-init.patch
deleted file mode 100644
index fadfc27a9118..000000000000
--- a/pkgs/development/libraries/libxml2/pthread-once-init.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-http://git.gnome.org/browse/libxml2/commit/?id=3f6cfbd1d38d0634a2ddcb9a0a13e1b5a2195a5e
-
-From 3f6cfbd1d38d0634a2ddcb9a0a13e1b5a2195a5e Mon Sep 17 00:00:00 2001
-From: Friedrich Haubensak <hsk@fli-leibniz.de>
-Date: Wed, 12 Sep 2012 15:34:53 +0000
-Subject: Fix a thread portability problem
-
-cannot compile libxml2-2.9.0 using studio 12.1 compiler on solaris 10
-
-I.M.O. structure initializer (as PTHREAD_ONCE_INIT) cannot be used in
-a structure assignment anyway
----
-diff --git a/threads.c b/threads.c
-index f206149..7e85a26 100644
---- a/threads.c
-+++ b/threads.c
-@@ -146,6 +146,7 @@ struct _xmlRMutex {
- static pthread_key_t globalkey;
- static pthread_t mainthread;
- static pthread_once_t once_control = PTHREAD_ONCE_INIT;
-+static pthread_once_t once_control_init = PTHREAD_ONCE_INIT;
- static pthread_mutex_t global_init_lock = PTHREAD_MUTEX_INITIALIZER;
- #elif defined HAVE_WIN32_THREADS
- #if defined(HAVE_COMPILER_TLS)
-@@ -915,7 +916,7 @@ xmlCleanupThreads(void)
- #ifdef HAVE_PTHREAD_H
-     if ((libxml_is_threaded)  && (pthread_key_delete != NULL))
-         pthread_key_delete(globalkey);
--    once_control = PTHREAD_ONCE_INIT;
-+    once_control = once_control_init;
- #elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
-     if (globalkey != TLS_OUT_OF_INDEXES) {
-         xmlGlobalStateCleanupHelperParams *p;
---
-cgit v0.9.0.2