summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/curl-gss-api-fix.patch38
-rw-r--r--gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch16
-rw-r--r--gnu/packages/patches/curl-support-capath-on-gnutls.patch102
-rw-r--r--gnu/packages/patches/elfutils-tests-ptrace.patch64
-rw-r--r--gnu/packages/patches/gcc-arm-link-spec-fix.patch16
-rw-r--r--gnu/packages/patches/geoclue-config.patch25
-rw-r--r--gnu/packages/patches/ghostscript-runpath.patch17
-rw-r--r--gnu/packages/patches/gnutls-fix-duplicate-manpages.patch30
-rw-r--r--gnu/packages/patches/libtool-skip-tests2.patch33
-rw-r--r--gnu/packages/patches/openssl-runpath.patch15
-rw-r--r--gnu/packages/patches/python-fix-tests.patch53
-rw-r--r--gnu/packages/patches/qt4-ldflags.patch18
-rw-r--r--gnu/packages/patches/qt5-runpath.patch25
-rw-r--r--gnu/packages/patches/upower-builddir.patch44
14 files changed, 456 insertions, 40 deletions
diff --git a/gnu/packages/patches/curl-gss-api-fix.patch b/gnu/packages/patches/curl-gss-api-fix.patch
deleted file mode 100644
index ea838ae8c7..0000000000
--- a/gnu/packages/patches/curl-gss-api-fix.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Copied from upstream:
-https://github.com/bagder/curl/commit/5c0e66d63214e0306197c5a3f162441e074f3401.patch
-
-From 5c0e66d63214e0306197c5a3f162441e074f3401 Mon Sep 17 00:00:00 2001
-From: Steve Holme <steve_holme@hotmail.com>
-Date: Thu, 8 Jan 2015 19:23:53 +0000
-Subject: [PATCH] sasl_gssapi: Fixed build on NetBSD with built-in GSS-API
-
-Bug: http://curl.haxx.se/bug/view.cgi?id=1469
-Reported-by: Thomas Klausner
----
- lib/curl_sasl_gssapi.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/curl_sasl_gssapi.c b/lib/curl_sasl_gssapi.c
-index 6dda0e9..a50646a 100644
---- a/lib/curl_sasl_gssapi.c
-+++ b/lib/curl_sasl_gssapi.c
-@@ -6,6 +6,7 @@
-  *                             \___|\___/|_| \_\_____|
-  *
-  * Copyright (C) 2014, Steve Holme, <steve_holme@hotmail.com>.
-+ * Copyright (C) 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
-  *
-  * This software is licensed as described in the file COPYING, which
-  * you should have received as part of this distribution. The terms
-@@ -126,7 +127,7 @@ CURLcode Curl_sasl_create_gssapi_user_message(struct SessionHandle *data,
- 
-     /* Import the SPN */
-     gss_major_status = gss_import_name(&gss_minor_status, &spn_token,
--                                       gss_nt_service_name, &krb5->spn);
-+                                       GSS_C_NT_HOSTBASED_SERVICE, &krb5->spn);
-     if(GSS_ERROR(gss_major_status)) {
-       Curl_gss_log_error(data, gss_minor_status, "gss_import_name() failed: ");
- 
--- 
-2.2.1
-
diff --git a/gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch b/gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch
new file mode 100644
index 0000000000..d2391d461d
--- /dev/null
+++ b/gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch
@@ -0,0 +1,16 @@
+This patch updates 'configure' as autoreconf would have done after
+applying curl-support-capath-on-gnutls.patch.
+
+--- a/configure       2015-03-22 01:11:23.178743705 +0100
++++ b/configure       2015-02-25 00:05:37.000000000 +0100
+@@ -23952,8 +24432,8 @@
+         ca="$want_ca"
+     capath="no"
+   elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
+-        if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
+-      as_fn_error $? "--with-ca-path only works with openSSL or PolarSSL" "$LINENO" 5
++        if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
++      as_fn_error $? "--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL" "$LINENO" 5
+     fi
+     capath="$want_capath"
+     ca="no"
diff --git a/gnu/packages/patches/curl-support-capath-on-gnutls.patch b/gnu/packages/patches/curl-support-capath-on-gnutls.patch
new file mode 100644
index 0000000000..d05dd021e8
--- /dev/null
+++ b/gnu/packages/patches/curl-support-capath-on-gnutls.patch
@@ -0,0 +1,102 @@
+This patch adds support for CURLOPT_CAPATH to the GnuTLS backend.
+
+From 5a1614cecdd57cab8b4ae3e9bc19dfff5ba77e80 Mon Sep 17 00:00:00 2001
+From: Alessandro Ghedini <alessandro@ghedini.me>
+Date: Sun, 8 Mar 2015 20:11:06 +0100
+Subject: [PATCH] gtls: add support for CURLOPT_CAPATH
+
+---
+ acinclude.m4                       |  4 ++--
+ docs/libcurl/opts/CURLOPT_CAPATH.3 |  5 ++---
+ lib/vtls/gtls.c                    | 22 ++++++++++++++++++++++
+ lib/vtls/gtls.h                    |  3 +++
+ 4 files changed, 29 insertions(+), 5 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 6ed7ffb..ca01869 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2615,8 +2615,8 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
+     capath="no"
+   elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
+     dnl --with-ca-path given
+-    if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
+-      AC_MSG_ERROR([--with-ca-path only works with openSSL or PolarSSL])
++    if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
++      AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL])
+     fi
+     capath="$want_capath"
+     ca="no"
+diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.3 b/docs/libcurl/opts/CURLOPT_CAPATH.3
+index 642953d..6695f9f 100644
+--- a/docs/libcurl/opts/CURLOPT_CAPATH.3
++++ b/docs/libcurl/opts/CURLOPT_CAPATH.3
+@@ -43,9 +43,8 @@ All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+ .SH EXAMPLE
+ TODO
+ .SH AVAILABILITY
+-This option is OpenSSL-specific and does nothing if libcurl is built to use
+-GnuTLS. NSS-powered libcurl provides the option only for backward
+-compatibility.
++This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS
++backend provides the option only for backward compatibility.
+ .SH RETURN VALUE
+ Returns CURLE_OK if TLS enabled, and CURLE_UNKNOWN_OPTION if not, or
+ CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
+index 05aef19..c792540 100644
+--- a/lib/vtls/gtls.c
++++ b/lib/vtls/gtls.c
+@@ -97,6 +97,10 @@ static bool gtls_inited = FALSE;
+ #  if (GNUTLS_VERSION_NUMBER >= 0x03020d)
+ #    define HAS_OCSP
+ #  endif
++
++#  if (GNUTLS_VERSION_NUMBER >= 0x030306)
++#    define HAS_CAPATH
++#  endif
+ #endif
+ 
+ #ifdef HAS_OCSP
+@@ -462,6 +466,24 @@ gtls_connect_step1(struct connectdata *conn,
+             rc, data->set.ssl.CAfile);
+   }
+ 
++#ifdef HAS_CAPATH
++  if(data->set.ssl.CApath) {
++    /* set the trusted CA cert directory */
++    rc = gnutls_certificate_set_x509_trust_dir(conn->ssl[sockindex].cred,
++                                                data->set.ssl.CApath,
++                                                GNUTLS_X509_FMT_PEM);
++    if(rc < 0) {
++      infof(data, "error reading ca cert file %s (%s)\n",
++            data->set.ssl.CAfile, gnutls_strerror(rc));
++      if(data->set.ssl.verifypeer)
++        return CURLE_SSL_CACERT_BADFILE;
++    }
++    else
++      infof(data, "found %d certificates in %s\n",
++            rc, data->set.ssl.CApath);
++  }
++#endif
++
+   if(data->set.ssl.CRLfile) {
+     /* set the CRL list file */
+     rc = gnutls_certificate_set_x509_crl_file(conn->ssl[sockindex].cred,
+diff --git a/lib/vtls/gtls.h b/lib/vtls/gtls.h
+index c3867e5..af1cb5b 100644
+--- a/lib/vtls/gtls.h
++++ b/lib/vtls/gtls.h
+@@ -54,6 +54,9 @@ bool Curl_gtls_cert_status_request(void);
+ /* Set the API backend definition to GnuTLS */
+ #define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS
+ 
++/* this backend supports the CAPATH option */
++#define have_curlssl_ca_path 1
++
+ /* API setup for GnuTLS */
+ #define curlssl_init Curl_gtls_init
+ #define curlssl_cleanup Curl_gtls_cleanup
+-- 
+2.2.1
+
diff --git a/gnu/packages/patches/elfutils-tests-ptrace.patch b/gnu/packages/patches/elfutils-tests-ptrace.patch
new file mode 100644
index 0000000000..cd46999063
--- /dev/null
+++ b/gnu/packages/patches/elfutils-tests-ptrace.patch
@@ -0,0 +1,64 @@
+This patch allows us to skip tests that require PTRACE_ATTACH in situations
+where PTRACE_ATTACH is only allowed when CAP_SYS_PTRACE is held (i.e., for
+root, by default.)
+
+Reported at <https://bugzilla.redhat.com/show_bug.cgi?id=1210966>.
+
+--- elfutils-0.161/tests/run-deleted.sh	2015-04-11 16:38:33.028556235 +0200
++++ elfutils-0.161/tests/run-deleted.sh	2015-04-11 16:46:15.012442185 +0200
+@@ -17,6 +17,15 @@
+ 
+ . $srcdir/backtrace-subr.sh
+ 
++# Check whether the Yama policy allows us to use PTRACE_ATTACH.
++if [ -f /proc/sys/kernel/yama/ptrace_scope ]
++then
++    if [ `cat /proc/sys/kernel/yama/ptrace_scope` -ne 0 ]
++    then
++	exit 77
++    fi
++fi
++
+ tempfiles deleted deleted-lib.so
+ cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so .
+ 
+--- elfutils-0.161/tests/vdsosyms.c	2015-04-11 16:40:20.633461110 +0200
++++ elfutils-0.161/tests/vdsosyms.c	2015-04-11 16:45:06.611866677 +0200
+@@ -23,6 +23,8 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
+ #include <unistd.h>
+ #include ELFUTILS_HEADER(dwfl)
+ 
+@@ -68,6 +70,7 @@ module_callback (Dwfl_Module *mod, void
+ int
+ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
+ {
++  static const char ptrace_scope_file[] = "/proc/sys/kernel/yama/ptrace_scope";
+   static char *debuginfo_path;
+   static const Dwfl_Callbacks proc_callbacks =
+     {
+@@ -76,6 +79,20 @@ main (int argc __attribute__ ((unused)),
+ 
+       .find_elf = dwfl_linux_proc_find_elf,
+     };
++
++  /* Check whether the Yama policy allows us to use PTRACE_ATTACH.  */
++  int ptrace_scope = open (ptrace_scope_file, O_RDONLY);
++  if (ptrace_scope >= 0)
++    {
++      char buf[10];
++      int count = read (ptrace_scope, buf, sizeof buf);
++      assert (count > 0);
++      if (buf[0] != '0')
++	/* We're not allowed, so skip this test.  */
++	return 77;
++      close (ptrace_scope);
++    }
++
+   Dwfl *dwfl = dwfl_begin (&proc_callbacks);
+   if (dwfl == NULL)
+     error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1));
diff --git a/gnu/packages/patches/gcc-arm-link-spec-fix.patch b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
new file mode 100644
index 0000000000..0ffe8a1810
--- /dev/null
+++ b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
@@ -0,0 +1,16 @@
+Do not pass -dynamic-linker to linker when !shared.
+Fixes <http://bugs.gnu.org/20102>.
+
+Patch by Ludovic Courtès <ludo@gnu.org>.
+
+--- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig	2015-04-08 20:31:20.376900478 +0200
++++ gcc-4.8.4/gcc/config/arm/linux-elf.h	2015-04-08 20:31:36.437014437 +0200
+@@ -65,7 +65,7 @@
+    %{symbolic:-Bsymbolic} \
+    %{!static: \
+      %{rdynamic:-export-dynamic} \
+-     -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
++     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
+    -X \
+    %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+    SUBTARGET_EXTRA_LINK_SPEC
diff --git a/gnu/packages/patches/geoclue-config.patch b/gnu/packages/patches/geoclue-config.patch
new file mode 100644
index 0000000000..dd35b90be5
--- /dev/null
+++ b/gnu/packages/patches/geoclue-config.patch
@@ -0,0 +1,25 @@
+Allow the configuration file to be specified via an environment variable.
+
+--- geoclue-2.1.10/src/gclue-config.c	2015-04-07 09:50:07.721074380 +0200
++++ geoclue-2.1.10/src/gclue-config.c	2015-04-07 10:27:26.613171960 +0200
+@@ -235,6 +235,11 @@
+ gclue_config_init (GClueConfig *config)
+ {
+         GError *error = NULL;
++	const char *config_file_path;
++
++	config_file_path = g_getenv ("GEOCLUE_CONFIG_FILE");
++	if (config_file_path == NULL)
++	  config_file_path = CONFIG_FILE_PATH;
+ 
+         config->priv =
+                 G_TYPE_INSTANCE_GET_PRIVATE (config,
+@@ -242,7 +247,7 @@
+                                             GClueConfigPrivate);
+         config->priv->key_file = g_key_file_new ();
+         g_key_file_load_from_file (config->priv->key_file,
+-                                   CONFIG_FILE_PATH,
++                                   config_file_path,
+                                    0,
+                                    &error);
+         if (error != NULL) {
diff --git a/gnu/packages/patches/ghostscript-runpath.patch b/gnu/packages/patches/ghostscript-runpath.patch
new file mode 100644
index 0000000000..c7dcfd4529
--- /dev/null
+++ b/gnu/packages/patches/ghostscript-runpath.patch
@@ -0,0 +1,17 @@
+This patch adds $(libdir) to the RUNPATH of 'gsc' and 'gsx'.
+
+--- gnu-ghostscript-9.14.0/base/unix-dll.mak	2015-04-05 15:12:45.386957927 +0200
++++ gnu-ghostscript-9.14.0/base/unix-dll.mak	2015-04-05 15:12:49.222982359 +0200
+@@ -91,11 +91,11 @@ $(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR)
+ # Build the small Ghostscript loaders, with Gtk+ and without
+ $(GSSOC_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER)
+ 	$(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \
+-	-L$(BINDIR) -l$(GS_SO_BASE)
++	-L$(BINDIR) -l$(GS_SO_BASE) -Wl,-rpath=$(libdir)
+ 
+ $(GSSOX_XE): $(GS_SO) $(PSSRC)$(SOC_LOADER)
+ 	$(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \
+-	-L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS)
++	-L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS) -Wl,-rpath=$(libdir)
+ 
+ # ------------------------- Recursive make targets ------------------------- #
diff --git a/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch b/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch
new file mode 100644
index 0000000000..95a25560e5
--- /dev/null
+++ b/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch
@@ -0,0 +1,30 @@
+Remove duplicate manpage entries from Makefile.
+
+--- gnutls-3.4.0/doc/manpages/Makefile.am.orig	2015-04-06 04:48:30.000000000 -0400
++++ gnutls-3.4.0/doc/manpages/Makefile.am	2015-04-12 16:52:58.029694525 -0400
+@@ -134,11 +134,8 @@
+ APIMANS += gnutls_certificate_get_peers_subkey_id.3
+ APIMANS += gnutls_certificate_get_trust_list.3
+ APIMANS += gnutls_certificate_get_verify_flags.3
+-APIMANS += gnutls_certificate_get_verify_flags.3
+-APIMANS += gnutls_certificate_get_x509_crt.3
+ APIMANS += gnutls_certificate_get_x509_crt.3
+ APIMANS += gnutls_certificate_get_x509_key.3
+-APIMANS += gnutls_certificate_get_x509_key.3
+ APIMANS += gnutls_certificate_send_x509_rdn_sequence.3
+ APIMANS += gnutls_certificate_server_set_request.3
+ APIMANS += gnutls_certificate_set_dh_params.3
+--- gnutls-3.4.0/doc/manpages/Makefile.in.orig	2015-04-08 02:08:30.000000000 -0400
++++ gnutls-3.4.0/doc/manpages/Makefile.in	2015-04-12 16:53:13.319694530 -0400
+@@ -1275,11 +1275,8 @@
+ 	gnutls_certificate_get_peers_subkey_id.3 \
+ 	gnutls_certificate_get_trust_list.3 \
+ 	gnutls_certificate_get_verify_flags.3 \
+-	gnutls_certificate_get_verify_flags.3 \
+-	gnutls_certificate_get_x509_crt.3 \
+ 	gnutls_certificate_get_x509_crt.3 \
+ 	gnutls_certificate_get_x509_key.3 \
+-	gnutls_certificate_get_x509_key.3 \
+ 	gnutls_certificate_send_x509_rdn_sequence.3 \
+ 	gnutls_certificate_server_set_request.3 \
+ 	gnutls_certificate_set_dh_params.3 \
diff --git a/gnu/packages/patches/libtool-skip-tests2.patch b/gnu/packages/patches/libtool-skip-tests2.patch
new file mode 100644
index 0000000000..c9d61e3b41
--- /dev/null
+++ b/gnu/packages/patches/libtool-skip-tests2.patch
@@ -0,0 +1,33 @@
+Skip the nopic test on ARM and MIPS systems.
+
+--- libtool-2.4.6/tests/demo.at.orig	2015-01-16 13:52:04.000000000 -0500
++++ libtool-2.4.6/tests/demo.at	2015-02-16 10:48:51.435851966 -0500
+@@ -510,7 +510,7 @@
+ AT_SETUP([force non-PIC objects])
+ 
+ AT_CHECK([case $host in
+-hppa*|x86_64*|s390*)
++hppa*|x86_64*|s390*|arm*|mips*)
+   # These hosts cannot use non-PIC shared libs
+   exit 77 ;;
+ *-solaris*|*-sunos*)
+--- libtool-2.4.6/tests/testsuite.orig	2015-02-15 11:15:25.000000000 -0500
++++ libtool-2.4.6/tests/testsuite	2015-02-16 10:50:58.736483216 -0500
+@@ -8741,7 +8741,7 @@
+ 
+ { set +x
+ $as_echo "$at_srcdir/demo.at:535: case \$host in
+-hppa*|x86_64*|s390*)
++hppa*|x86_64*|s390*|arm*|mips*)
+   # These hosts cannot use non-PIC shared libs
+   exit 77 ;;
+ *-solaris*|*-sunos*)
+@@ -8766,7 +8766,7 @@
+ "
+ at_fn_check_prepare_notrace 'a `...` command substitution' "demo.at:535"
+ ( $at_check_trace; case $host in
+-hppa*|x86_64*|s390*)
++hppa*|x86_64*|s390*|arm*|mips*)
+   # These hosts cannot use non-PIC shared libs
+   exit 77 ;;
+ *-solaris*|*-sunos*)
diff --git a/gnu/packages/patches/openssl-runpath.patch b/gnu/packages/patches/openssl-runpath.patch
new file mode 100644
index 0000000000..fa7c0b9962
--- /dev/null
+++ b/gnu/packages/patches/openssl-runpath.patch
@@ -0,0 +1,15 @@
+This patch makes the build system pass -Wl,-rpath=$out/lib even for
+libraries (it already does so for executables, thanks to 'DO_GNU_APP'
+in 'Makefile.shared'.)
+
+--- openssl-1.0.2a/Makefile.shared	2015-04-05 01:07:35.357602454 +0200
++++ openssl-1.0.2a/Makefile.shared	2015-04-05 01:09:50.474513303 +0200
+@@ -106,7 +106,7 @@ LINK_SO=	\
+     LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
+     LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
+     LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
+-    $${SHAREDCMD} $${SHAREDFLAGS} \
++    $${SHAREDCMD} $${SHAREDFLAGS} -Wl,-rpath,$(LIBRPATH) \
+ 	-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
+ 	$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
+   ) && $(SYMLINK_SO)
diff --git a/gnu/packages/patches/python-fix-tests.patch b/gnu/packages/patches/python-fix-tests.patch
index 70e4aa05d5..82c19980f9 100644
--- a/gnu/packages/patches/python-fix-tests.patch
+++ b/gnu/packages/patches/python-fix-tests.patch
@@ -64,8 +64,8 @@ http://bugs.python.org/issue20868 .
      @unittest.skipUnless(support.is_resource_enabled('network'),
                           'network is not enabled')
      def test_idna(self):
---- Lib/test/test_multiprocessing.py	2014-04-06 23:12:27.575235000 +0200
-+++ Lib/test/test_multiprocessing.py	2014-04-06 23:13:04.827235000 +0200
+--- Lib/test/_test_multiprocessing.py	2014-04-06 23:12:27.575235000 +0200
++++ Lib/test/_test_multiprocessing.py	2014-04-06 23:13:04.827235000 +0200
 @@ -1016,6 +1016,7 @@
          if pid is not None:
              os.kill(pid, signal.SIGINT)
@@ -112,3 +112,52 @@ http://bugs.python.org/issue20868 .
      def test_issue_8959_a(self):
          from ctypes.util import find_library
          libc_path = find_library("c")
+--- Tools/scripts/run_tests.py.orig	2015-04-06 03:52:17.484000000 +0200
++++ Tools/scripts/run_tests.py	2015-04-06 03:52:25.880000000 +0200
+@@ -47,7 +47,7 @@
+     if threading and not any(is_multiprocess_flag(arg) for arg in regrtest_args):
+         args.extend(['-j', '0'])  # Use all CPU cores
+     if not any(is_resource_use_flag(arg) for arg in regrtest_args):
+-        args.extend(['-u', 'all,-largefile,-audio,-gui'])
++        args.extend(['-u', 'all,-largefile,-audio,-gui,-network'])
+     args.extend(regrtest_args)
+     print(' '.join(args))
+     os.execv(sys.executable, args)
+--- Lib/distutils/tests/test_archive_util.py.orig	2015-04-06 04:08:49.288000000 +0200
++++ Lib/distutils/tests/test_archive_util.py	2015-04-06 04:09:34.396000000 +0200
+@@ -282,6 +282,7 @@
+         finally:
+             del ARCHIVE_FORMATS['xxx']
+
++    @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
+     def test_make_archive_owner_group(self):
+         # testing make_archive with owner and group, with various combinations
+         # this works even if there's not gid/uid support
+@@ -310,6 +311,7 @@
+
+     @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib")
+     @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
++    @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
+     def test_tarfile_root_owner(self):
+         tmpdir, tmpdir2, base_name =  self._create_files()
+         old_dir = os.getcwd()
+--- Lib/distutils/tests/test_sdist.py.orig	2015-04-06 04:10:05.264000000 +0200
++++ Lib/distutils/tests/test_sdist.py	2015-04-06 04:10:21.448000000 +0200
+@@ -435,6 +435,7 @@
+                      "The tar command is not found")
+     @unittest.skipIf(find_executable('gzip') is None,
+                      "The gzip command is not found")
++    @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
+     def test_make_distribution_owner_group(self):
+         # now building a sdist
+         dist, cmd = self.get_cmd()
+--- Lib/test/test_resource.py.orig	2015-04-06 21:30:24.708000000 +0200
++++ Lib/test/test_resource.py	2015-04-06 23:07:27.220000000 +0200
+@@ -146,6 +146,7 @@
+
+     @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
+     @support.requires_linux_version(2, 6, 36)
++    @unittest.skipIf(True, "Bug: the PermissionError is not raised")
+     def test_prlimit(self):
+         self.assertRaises(TypeError, resource.prlimit)
+         if os.geteuid() != 0:
diff --git a/gnu/packages/patches/qt4-ldflags.patch b/gnu/packages/patches/qt4-ldflags.patch
new file mode 100644
index 0000000000..0d6398018a
--- /dev/null
+++ b/gnu/packages/patches/qt4-ldflags.patch
@@ -0,0 +1,18 @@
+Explicitly link against libicui18n so that libQtCore.so always finds it.
+
+--- qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro	2015-04-15 12:01:41.661862663 +0200
++++ qt-everywhere-opensource-src-4.8.6/src/corelib/corelib.pro	2015-04-15 12:03:57.954586336 +0200
+@@ -19,6 +19,13 @@ include(codecs/codecs.pri)
+ include(statemachine/statemachine.pri)
+ include(xml/xml.pri)
+ 
++# Explicitly link with icui18n, which is dlopened by libQtCore.so.
++# We cannot do this by setting LDFLAGS because that then overrides
++# other LDFLAGS: <https://bugreports.qt.io/browse/QTBUG-5471>.
++# XXX: According to the Nixpkgs recipe, this may be necessary for
++# further libraries (cups, gtk-x11-2.0, libgdk-x11-2.0).
++LIBS_PRIVATE += -licui18n
++
+ !qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
+ qpa:mac {
+     !ios {
diff --git a/gnu/packages/patches/qt5-runpath.patch b/gnu/packages/patches/qt5-runpath.patch
new file mode 100644
index 0000000000..a6cbb26ff9
--- /dev/null
+++ b/gnu/packages/patches/qt5-runpath.patch
@@ -0,0 +1,25 @@
+Allow the use of DT_RUNPATH.  This fixes a bug whereby libQt5WebEngineCore.so
+ends up having an empty RUNPATH.
+
+--- qt-everywhere-opensource-src-5.4.1/qtwebengine/src/3rdparty/chromium/build/common.gypi	2015-04-14 10:21:09.330925545 +0200
++++ qt-everywhere-opensource-src-5.4.1/qtwebengine/src/3rdparty/chromium/build/common.gypi	2015-04-14 10:21:38.735106097 +0200
+@@ -4142,19 +4142,6 @@
+               '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
+             ],
+           }],
+-          # Some binutils 2.23 releases may or may not have new dtags enabled,
+-          # but they are all compatible with --disable-new-dtags,
+-          # because the new dynamic tags are not created by default.
+-          ['binutils_version>=223', {
+-            # Newer binutils don't set DT_RPATH unless you disable "new" dtags
+-            # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
+-            # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags
+-            # inside this file to allow usage of --no-as-needed and removal of
+-            # this flag.
+-            'ldflags': [
+-              '-Wl,--disable-new-dtags',
+-            ],
+-          }]
+         ],
+       },
+     }],
diff --git a/gnu/packages/patches/upower-builddir.patch b/gnu/packages/patches/upower-builddir.patch
new file mode 100644
index 0000000000..13cef5876a
--- /dev/null
+++ b/gnu/packages/patches/upower-builddir.patch
@@ -0,0 +1,44 @@
+Remove explicit set of UPOWER_CONF_FILE_NAME in up-self-test.c;
+instead the harness should set it.  In Guix we set it explicitly; the
+right thing is to use AM_TEST_ENVIRONMENT and regenerate the
+makefiles, but we can't regenerate because current autotools carp on
+some things, so we patch the Makefile.in instead.
+
+Also fix to not try to create /var/lib/upower if /var isn't writable.
+
+Patch by Andy Wingo <wingo@igalia.com>
+
+--- upower-0.99.2.orig/src/Makefile.in	2014-12-18 10:32:01.000000000 +0100
++++ upower-0.99.2/src/Makefile.in	2015-04-04 19:49:28.020843678 +0200
+@@ -780,6 +780,7 @@
+ 
+ @UP_BUILD_TESTS_TRUE@up_self_test_CFLAGS = $(AM_CFLAGS) $(WARNINGFLAGS_C)
+ @UP_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = $(DBUS_LAUNCH)
++@UP_BUILD_TESTS_TRUE@AM_TESTS_ENVIRONMENT = UPOWER_CONF_FILE_NAME=$(top_srcdir)/etc/UPower.conf
+ dbusservicedir = $(datadir)/dbus-1/system-services
+ dbusservice_in_files = org.freedesktop.UPower.service.in
+ dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
+@@ -1789,7 +1790,7 @@
+ @HAVE_SYSTEMDSYSTEMUNITDIR_TRUE@	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+ 
+ install-data-hook:
+-	if test -w $(DESTDIR)$(prefix)/; then \
++	if test -w $(DESTDIR)$(localstatedir)/; then \
+ 		mkdir -p $(DESTDIR)$(historydir); \
+ 	fi
+ 
+--- upower-0.99.2.orig/src/up-self-test.c	2014-07-17 09:46:15.000000000 +0200
++++ upower-0.99.2/src/up-self-test.c	2015-04-04 18:43:04.952741927 +0200
+@@ -295,12 +295,6 @@
+ #endif
+ 	g_test_init (&argc, &argv, NULL);
+ 
+-	/* make check, vs. make distcheck */
+-	if (g_file_test ("../etc/UPower.conf", G_FILE_TEST_EXISTS))
+-		g_setenv ("UPOWER_CONF_FILE_NAME", "../etc/UPower.conf", TRUE);
+-	else
+-		g_setenv ("UPOWER_CONF_FILE_NAME", "../../etc/UPower.conf", TRUE);
+-
+ 	/* tests go here */
+ 	g_test_add_func ("/power/backend", up_test_backend_func);
+ 	g_test_add_func ("/power/device", up_test_device_func);