aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-10-26 18:59:28 -0400
committerLeo Famulari <leo@famulari.name>2016-10-26 19:00:06 -0400
commit02c73adcdf0f29dbecd9a1bb3c9be3626cd5dea9 (patch)
treefb8fadc87f5b82dc35f44831af8b79eec37887b3 /gnu/packages/patches
parenta19da40630138acea7169491a6926e00cf7d301b (diff)
parent5d73e3000030006b00e7e6644f3ced5d6176376e (diff)
downloadguix-02c73adcdf0f29dbecd9a1bb3c9be3626cd5dea9.tar
guix-02c73adcdf0f29dbecd9a1bb3c9be3626cd5dea9.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/coda-use-system-libs.patch46
-rw-r--r--gnu/packages/patches/hdf-eos2-build-shared.patch25
-rw-r--r--gnu/packages/patches/hdf-eos2-fortrantests.patch329
-rw-r--r--gnu/packages/patches/hdf-eos2-remove-gctp.patch55
-rw-r--r--gnu/packages/patches/linux-libre-4.1-CVE-2016-5195.patch99
-rw-r--r--gnu/packages/patches/mupdf-CVE-2016-8674.patch165
-rw-r--r--gnu/packages/patches/musl-CVE-2016-8859.patch81
-rw-r--r--gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch46
8 files changed, 701 insertions, 145 deletions
diff --git a/gnu/packages/patches/coda-use-system-libs.patch b/gnu/packages/patches/coda-use-system-libs.patch
new file mode 100644
index 0000000000..fbf8441958
--- /dev/null
+++ b/gnu/packages/patches/coda-use-system-libs.patch
@@ -0,0 +1,46 @@
+Remove dependencies on bundled zlib, pcre and expat.
+
+diff --git a/Makefile.in b/Makefile.in
+index 4360a26..80f9f59 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -210,8 +210,7 @@ coda_matlab_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ @BUILD_MATLAB_TRUE@@SUBPACKAGE_MODE_FALSE@ -rpath \
+ @BUILD_MATLAB_TRUE@@SUBPACKAGE_MODE_FALSE@ $(matlabmexexecdir)
+ am__DEPENDENCIES_1 =
+-libcoda_la_DEPENDENCIES = @LTLIBOBJS@ libexpat_internal.la \
+- libpcre_internal.la libz_internal.la $(am__DEPENDENCIES_1) \
++libcoda_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+ am__libcoda_la_SOURCES_DIST = libcoda/coda-ascbin-cursor.c \
+ libcoda/coda-ascbin.h libcoda/coda-ascii-cursor.c \
+@@ -306,8 +305,7 @@ libcoda_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libcoda_la_LDFLAGS) $(LDFLAGS) -o $@
+ @SUBPACKAGE_MODE_FALSE@am_libcoda_la_rpath = -rpath $(libdir)
+-am__DEPENDENCIES_2 = @LTLIBOBJS@ libexpat_internal.la \
+- libpcre_internal.la libz_internal.la $(am__DEPENDENCIES_1) \
++am__DEPENDENCIES_2 = @LTLIBOBJS@ $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
+ libcoda_internal_la_DEPENDENCIES = $(am__DEPENDENCIES_2)
+ am__libcoda_internal_la_SOURCES_DIST = libcoda/coda-ascbin-cursor.c \
+@@ -898,8 +896,8 @@ INSTALL_DATA_HOOK_TARGETS = $(am__append_1)
+ UNINSTALL_HOOK_TARGETS =
+ CLEAN_LOCAL_TARGETS = $(am__append_11)
+ ALL_LOCAL_TARGETS =
+-@SUBPACKAGE_MODE_FALSE@noinst_LTLIBRARIES = libcoda_internal.la libexpat_internal.la libpcre_internal.la libz_internal.la
+-@SUBPACKAGE_MODE_TRUE@noinst_LTLIBRARIES = libcoda_internal.la libexpat_internal.la libpcre_internal.la libz_internal.la
++@SUBPACKAGE_MODE_FALSE@noinst_LTLIBRARIES = libcoda_internal.la
++@SUBPACKAGE_MODE_TRUE@noinst_LTLIBRARIES = libcoda_internal.la
+
+ # libraries (+ related files)
+ @SUBPACKAGE_MODE_FALSE@lib_LTLIBRARIES = libcoda.la
+@@ -1048,7 +1046,7 @@ libcoda_hdf5_files = \
+
+ libcoda_la_CPPFLAGS = -Ilibcoda/expat -I$(srcdir)/libcoda/expat -Ilibcoda/pcre -I$(srcdir)/libcoda/pcre -Ilibcoda/zlib -I$(srcdir)/libcoda/zlib $(AM_CPPFLAGS)
+ libcoda_la_LDFLAGS = -no-undefined -version-info $(LIBCODA_CURRENT):$(LIBCODA_REVISION):$(LIBCODA_AGE)
+-libcoda_la_LIBADD = @LTLIBOBJS@ libexpat_internal.la libpcre_internal.la libz_internal.la $(HDF4LIBS) $(HDF5LIBS)
++libcoda_la_LIBADD = @LTLIBOBJS@ $(HDF4LIBS) $(HDF5LIBS)
+ libcoda_internal_la_SOURCES = libcoda/coda-ascbin-cursor.c \
+ libcoda/coda-ascbin.h libcoda/coda-ascii-cursor.c \
+ libcoda/coda-ascii-internal.h libcoda/coda-ascii.c \
diff --git a/gnu/packages/patches/hdf-eos2-build-shared.patch b/gnu/packages/patches/hdf-eos2-build-shared.patch
new file mode 100644
index 0000000000..71112e38c2
--- /dev/null
+++ b/gnu/packages/patches/hdf-eos2-build-shared.patch
@@ -0,0 +1,25 @@
+Changes necessary for shared library linking to succeed.
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 9534473..12411bf 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -73,7 +73,7 @@ LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+ CCLD = $(CC)
+-LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
++LINK = HDF4_USE_SHLIB=yes $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ SOURCES = $(libhdfeos_la_SOURCES)
+ DIST_SOURCES = $(libhdfeos_la_SOURCES)
+@@ -125,8 +125,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+
+-# Set LDFLAGS to alow the HDF-EOS library to use extern variables from HDF4
+-LDFLAGS = -Wl,-single_module
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+ LIBTOOL = @LIBTOOL@
+
diff --git a/gnu/packages/patches/hdf-eos2-fortrantests.patch b/gnu/packages/patches/hdf-eos2-fortrantests.patch
new file mode 100644
index 0000000000..adecc184cb
--- /dev/null
+++ b/gnu/packages/patches/hdf-eos2-fortrantests.patch
@@ -0,0 +1,329 @@
+Fix multi-line string formatting in fortran test programs (reported upstream).
+
+diff --git a/samples/appendfield.f b/samples/appendfield.f
+index 42c4b6b..58257f7 100644
+--- a/samples/appendfield.f
++++ b/samples/appendfield.f
+@@ -22,8 +22,8 @@ c
+ inarray(i) = i
+ enddo
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer_o
+- 1f_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+ swid = swattach(swfid, "Swath1")
+
+
+diff --git a/samples/definefields.f b/samples/definefields.f
+index 89859e4..f3b3497 100644
+--- a/samples/definefields.f
++++ b/samples/definefields.f
+@@ -24,8 +24,8 @@ c DFACC_RDWR accesscode in the open statement. The SWopen
+ c routine returns the swath fileid, swfid, which is used to
+ c identify the file in subsequent routines.
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+
+ c
+diff --git a/samples/definegdflds.f b/samples/definegdflds.f
+index 177422e..1b7fcf6 100644
+--- a/samples/definegdflds.f
++++ b/samples/definegdflds.f
+@@ -21,8 +21,8 @@
+ fillval1=-7.0
+ fillval2=-9999.0
+
+- gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
+- 1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+
+ gdid1 = gdattach(gdfid, "UTMGrid")
+diff --git a/samples/definelevels.f b/samples/definelevels.f
+index 2496d5f..64b2842 100644
+--- a/samples/definelevels.f
++++ b/samples/definelevels.f
+@@ -32,8 +32,8 @@ c DFACC_RDWR access code in the open statement. The ptopen
+ c routine returns the point fileid, ptfid, which is used to
+ c identify the file in subsequent routines.
+
+- ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
++ 1 "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+
+ c
+diff --git a/samples/inquiregrid.f b/samples/inquiregrid.f
+index 8110461..8ce71e4 100644
+--- a/samples/inquiregrid.f
++++ b/samples/inquiregrid.f
+@@ -18,8 +18,8 @@
+
+
+
+- gdfid = gdopen('GridFile_created_with_hadeos_sample_file_writer_
+- 1of_HDFEOS2_version_219_or_higher_release.hdf', DFACC_READ)
++ gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+
+
+ if (gdfid .ne. -1) then
+diff --git a/samples/inquireswath.f b/samples/inquireswath.f
+index 899ee59..78c292b 100644
+--- a/samples/inquireswath.f
++++ b/samples/inquireswath.f
+@@ -24,8 +24,8 @@ c
+ c Open the Swath File for read only access
+ c
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+
+
+ if (swfid .NE. -1) then
+diff --git a/samples/readdimscalegrid.f b/samples/readdimscalegrid.f
+index fed5540..a0bb48a 100644
+--- a/samples/readdimscalegrid.f
++++ b/samples/readdimscalegrid.f
+@@ -34,8 +34,8 @@
+ ! * id, gdfid, which is used to identify the file in subsequent routines.
+ ! */
+
+- gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
+- 1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+ ! /*
+ ! * If the grid file cannot be found, gdopen will return -1 for the file
+diff --git a/samples/readdimscaleswath.f b/samples/readdimscaleswath.f
+index 97b6264..1b61624 100644
+--- a/samples/readdimscaleswath.f
++++ b/samples/readdimscaleswath.f
+@@ -33,8 +33,8 @@
+ ! * id, swfid, which is used to identify the file in subsequent routines.
+ ! */
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+ ! /*
+ ! * If the swath file cannot be found, swopen will return -1 for the file
+diff --git a/samples/readfields.f b/samples/readfields.f
+index 873b30a..29d42f0 100644
+--- a/samples/readfields.f
++++ b/samples/readfields.f
+@@ -21,8 +21,8 @@ c
+ c Open the HDF swath file, "SwathFile.hdf"
+ c
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+
+
+ if (swfid .NE. -1) then
+diff --git a/samples/readgdflds.f b/samples/readgdflds.f
+index e5fe85f..ff2bd86 100644
+--- a/samples/readgdflds.f
++++ b/samples/readgdflds.f
+@@ -9,8 +9,8 @@
+ integer DFNT_FLOAT32
+ parameter (DFNT_FLOAT32=5)
+
+- gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
+- 1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+ if (gdfid .ne. -1) then
+
+diff --git a/samples/readlevels.f b/samples/readlevels.f
+index a7fd033..f349398 100644
+--- a/samples/readlevels.f
++++ b/samples/readlevels.f
+@@ -36,8 +36,8 @@ c
+ c Open the HDF swath file, "PointFile.hdf".
+ c
+
+- ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
++ ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
++ + "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+
+ c
+ c Read Simple Point
+@@ -47,6 +47,8 @@ c
+ status = ptlevinfo(ptid, 0, fldlist, fldtype, fldorder)
+ n = ptnrecs(ptid, 0)
+
++ write(*,*) n
++
+ do 5 i=1,n
+ recs(i) = i - 1
+ 5 continue
+diff --git a/samples/setupgrid.f b/samples/setupgrid.f
+index be5408c..cf4bd04 100644
+--- a/samples/setupgrid.f
++++ b/samples/setupgrid.f
+@@ -34,8 +34,8 @@ c code in the open statement. The GDopen routine returns the grid
+ c file id, gdfid, which is used to identify the file in subsequent
+ c routines in the library.
+ c
+- gdfid = gdopen('GridFile_created_with_hadeos_sample_file_writer_of
+- 1_HDFEOS2_version_219_or_higher_release.hdf',DFACC_CREATE)
++ gdfid = gdopen('GridFile_created_with_hadeos_sample_file_writer_"//
++ 1"of_HDFEOS2_version_219_or_higher_release.hdf',DFACC_CREATE)
+
+ c
+ c Create UTM Grid
+diff --git a/samples/setupswath.f b/samples/setupswath.f
+index d0289d6..fbaa0bb 100644
+--- a/samples/setupswath.f
++++ b/samples/setupswath.f
+@@ -22,8 +22,8 @@ c code in the open statement. The SWopen routine returns the swath
+ c file id, swfid, which is used to identify the file in subsequent
+ c routines in the library.
+ c
+- swfid = swopen('SwathFile_created_with_hadeos_sample_file_writer_o
+- 1f_HDFEOS2_version_219_or_higher_release.hdf',DFACC_CREATE)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf",DFACC_CREATE)
+
+ c
+ c The first of these, SWcreate, creates the swath, "Swath1", within the
+diff --git a/samples/subsetgrid.f b/samples/subsetgrid.f
+index c57e541..087e5b1 100644
+--- a/samples/subsetgrid.f
++++ b/samples/subsetgrid.f
+@@ -22,8 +22,8 @@ c
+ c Open the HDF grid file, "GridFile.hdf"
+ c
+
+- gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
+- 1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
++ gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+
+ if (gdfid .NE. -1) then
+
+diff --git a/samples/subsetpoint.f b/samples/subsetpoint.f
+index 9e72c5f..2e76d7d 100644
+--- a/samples/subsetpoint.f
++++ b/samples/subsetpoint.f
+@@ -21,8 +21,8 @@ c
+ c Open the HDF point file, "PointFile.hdf"
+ c
+
+- ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
++ ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
++ 1 "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+
+ if (ptfid .NE. -1) then
+
+diff --git a/samples/subsetswath.f b/samples/subsetswath.f
+index dcee609..9af8a46 100644
+--- a/samples/subsetswath.f
++++ b/samples/subsetswath.f
+@@ -28,8 +28,8 @@ c
+ c Open the HDF swath file, "SwathFile.hdf"
+ c
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_READ)
+
+ if (swfid .NE. -1) then
+
+diff --git a/samples/writedimscalegrid.f b/samples/writedimscalegrid.f
+index 09688d8..42013fe 100644
+--- a/samples/writedimscalegrid.f
++++ b/samples/writedimscalegrid.f
+@@ -29,8 +29,8 @@
+ ! * id, gdfid, which is used to identify the file in subsequent routines.
+ ! */
+
+- gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
+- 1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+ ! /*
+ ! * If the grid file cannot be found, gdopen will return -1 for the file
+diff --git a/samples/writedimscaleswath.f b/samples/writedimscaleswath.f
+index 1151671..1a911a6 100644
+--- a/samples/writedimscaleswath.f
++++ b/samples/writedimscaleswath.f
+@@ -31,8 +31,8 @@
+ ! * id, swfid, which is used to identify the file in subsequent routines.
+ ! */
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_write
+- 1r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+ ! /*
+ ! * If the swath file cannot be found, swopen will return -1 for the file
+diff --git a/samples/writefields.f b/samples/writefields.f
+index a743661..862b96c 100644
+--- a/samples/writefields.f
++++ b/samples/writefields.f
+@@ -31,8 +31,8 @@ c
+ c Open the HDF swath file, "SwathFile.hdf"
+ c
+
+- swfid = swopen("SwathFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ swfid = swopen("SwathFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+
+ if (swfid .NE. -1) then
+diff --git a/samples/writegdflds.f b/samples/writegdflds.f
+index d1540b3..81aef75 100644
+--- a/samples/writegdflds.f
++++ b/samples/writegdflds.f
+@@ -23,8 +23,8 @@
+ enddo
+
+
+- gdfid = gdopen("GridFile_created_with_hadeos_sample_file_writer_
+- 1of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ gdfid = gdopen("GridFile_created_with_hadeos_sample_file_write"//
++ 1"r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+ if (gdfid .ne. -1) then
+
+diff --git a/samples/writelevels.f b/samples/writelevels.f
+index 88e7780..cb40c9e 100644
+--- a/samples/writelevels.f
++++ b/samples/writelevels.f
+@@ -32,8 +32,8 @@ c
+ c Open the HDF point file, "PointFile.hdf".
+ c
+
+- ptfid = ptopen("PointFile_created_with_hadeos_sample_file_writer
+- 1_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
++ ptfid = ptopen("PointFile_created_with_hadeos_sample_file_write"//
++ + "r_of_HDFEOS2_version_219_or_higher_release.hdf", DFACC_RDWR)
+
+
+ c
+--
+2.10.0
+
diff --git a/gnu/packages/patches/hdf-eos2-remove-gctp.patch b/gnu/packages/patches/hdf-eos2-remove-gctp.patch
new file mode 100644
index 0000000000..0776c0685e
--- /dev/null
+++ b/gnu/packages/patches/hdf-eos2-remove-gctp.patch
@@ -0,0 +1,55 @@
+Don't build the GCTP bundled with the source and link with the
+system's -lgctp instead. We also remove references to the
+"testdrivers" directory, which is not distributed together with the
+source, causing autoreconf to fail.
+
+diff --git a/Makefile.in b/Makefile.in
+index d468af2..90428a7 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -206,7 +206,7 @@ LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
+ @TESTDRIVERS_CONDITIONAL_TRUE@TESTDRIVERS = testdrivers
+ @INSTALL_INCLUDE_CONDITIONAL_FALSE@INCLUDE =
+ @INSTALL_INCLUDE_CONDITIONAL_TRUE@INCLUDE = include
+-SUBDIRS = gctp src $(INCLUDE) samples $(TESTDRIVERS)
++SUBDIRS = src $(INCLUDE) samples $(TESTDRIVERS)
+ all: all-recursive
+
+ .SUFFIXES:
+diff --git a/include/Makefile.in b/include/Makefile.in
+index 9938b23..afb7f40 100644
+--- a/include/Makefile.in
++++ b/include/Makefile.in
+@@ -190,7 +190,7 @@ LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
+ # Boilerplate include
+
+ # Headers to install
+-include_HEADERS = HE2_config.h HdfEosDef.h HDFEOSVersion.h cfortHdf.h ease.h
++include_HEADERS = HdfEosDef.h HDFEOSVersion.h cfortHdf.h ease.h
+ all: HE2_config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+diff --git a/samples/Makefile.in b/samples/Makefile.in
+index 9da6e28..6a6186c 100644
+--- a/samples/Makefile.in
++++ b/samples/Makefile.in
+@@ -108,7 +108,6 @@ AppendField_SOURCES = AppendField.c
+ AppendField_OBJECTS = AppendField.$(OBJEXT)
+ AppendField_LDADD = $(LDADD)
+ am__DEPENDENCIES_1 = $(top_builddir)/src/libhdfeos.la
+-am__DEPENDENCIES_2 = $(top_builddir)/gctp/src/libGctp.la
+ AppendField_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
+ DefineFields_SOURCES = DefineFields.c
+ DefineFields_OBJECTS = DefineFields.$(OBJEXT)
+@@ -481,7 +480,7 @@ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ LIBHDFEOS2 = $(top_builddir)/src/libhdfeos.la
+-LIBGCTP = $(top_builddir)/gctp/src/libGctp.la
++LIBGCTP =
+
+ # Boilerplate definitions file
+
+--
+2.10.0
+
diff --git a/gnu/packages/patches/linux-libre-4.1-CVE-2016-5195.patch b/gnu/packages/patches/linux-libre-4.1-CVE-2016-5195.patch
deleted file mode 100644
index 37a41f61e4..0000000000
--- a/gnu/packages/patches/linux-libre-4.1-CVE-2016-5195.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-Fix CVE-2016-5195, a.k.a. Dirty COW.
-Backported to linux-libre-4.1.x by Mark H Weaver <mhw@netris.org>.
-
-From 18652320ea99913c95e7130d654be7f1da6b694f Mon Sep 17 00:00:00 2001
-From: Linus Torvalds <torvalds@linux-foundation.org>
-Date: Thu, 13 Oct 2016 13:07:36 -0700
-Subject: [PATCH] mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
-
-commit 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619 upstream.
-
-This is an ancient bug that was actually attempted to be fixed once
-(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
-get_user_pages() race for write access") but that was then undone due to
-problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").
-
-In the meantime, the s390 situation has long been fixed, and we can now
-fix it by checking the pte_dirty() bit properly (and do it better). The
-s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
-software dirty bits") which made it into v3.9. Earlier kernels will
-have to look at the page state itself.
-
-Also, the VM has become more scalable, and what used a purely
-theoretical race back then has become easier to trigger.
-
-To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
-we already did a COW" rather than play racy games with FOLL_WRITE that
-is very fundamental, and then use the pte dirty flag to validate that
-the FOLL_COW flag is still valid.
-
-Reported-and-tested-by: Phil "not Paul" Oester <kernel@linuxace.com>
-Acked-by: Hugh Dickins <hughd@google.com>
-Reviewed-by: Michal Hocko <mhocko@suse.com>
-Cc: Andy Lutomirski <luto@kernel.org>
-Cc: Kees Cook <keescook@chromium.org>
-Cc: Oleg Nesterov <oleg@redhat.com>
-Cc: Willy Tarreau <w@1wt.eu>
-Cc: Nick Piggin <npiggin@gmail.com>
-Cc: Greg Thelen <gthelen@google.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/linux/mm.h | 1 +
- mm/gup.c | 14 ++++++++++++--
- 2 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 6b85ec6..7cadf0a 100644
---- a/include/linux/mm.h
-+++ b/include/linux/mm.h
-@@ -2064,6 +2064,7 @@ static inline struct page *follow_page(struct vm_area_struct *vma,
- #define FOLL_NUMA 0x200 /* force NUMA hinting page fault */
- #define FOLL_MIGRATION 0x400 /* wait for page to replace migration entry */
- #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */
-+#define FOLL_COW 0x4000 /* internal GUP flag */
-
- typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
- void *data);
-diff --git a/mm/gup.c b/mm/gup.c
-index 6297f6b..e6de9e7 100644
---- a/mm/gup.c
-+++ b/mm/gup.c
-@@ -32,6 +32,16 @@ static struct page *no_page_table(struct vm_area_struct *vma,
- return NULL;
- }
-
-+/*
-+ * FOLL_FORCE can write to even unwritable pte's, but only
-+ * after we've gone through a COW cycle and they are dirty.
-+ */
-+static inline bool can_follow_write_pte(pte_t pte, unsigned int flags)
-+{
-+ return pte_write(pte) ||
-+ ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pte_dirty(pte));
-+}
-+
- static struct page *follow_page_pte(struct vm_area_struct *vma,
- unsigned long address, pmd_t *pmd, unsigned int flags)
- {
-@@ -66,7 +76,7 @@ retry:
- }
- if ((flags & FOLL_NUMA) && pte_protnone(pte))
- goto no_page;
-- if ((flags & FOLL_WRITE) && !pte_write(pte)) {
-+ if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, flags)) {
- pte_unmap_unlock(ptep, ptl);
- return NULL;
- }
-@@ -315,7 +325,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
- * reCOWed by userspace write).
- */
- if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE))
-- *flags &= ~FOLL_WRITE;
-+ *flags |= FOLL_COW;
- return 0;
- }
-
---
-2.10.1
-
diff --git a/gnu/packages/patches/mupdf-CVE-2016-8674.patch b/gnu/packages/patches/mupdf-CVE-2016-8674.patch
new file mode 100644
index 0000000000..2a35619761
--- /dev/null
+++ b/gnu/packages/patches/mupdf-CVE-2016-8674.patch
@@ -0,0 +1,165 @@
+Fix CVE-2016-8674 (use-after-free in pdf_to_num()).
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8674
+https://security-tracker.debian.org/tracker/CVE-2016-8674
+
+Patch adapted from upstream source repository:
+http://git.ghostscript.com/?p=mupdf.git;h=1e03c06456d997435019fb3526fa2d4be7dbc6ec
+
+diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h
+index f8ef0cd..e8345b7 100644
+--- a/include/mupdf/pdf/document.h
++++ b/include/mupdf/pdf/document.h
+@@ -258,6 +258,10 @@ struct pdf_document_s
+ fz_font **type3_fonts;
+
+ pdf_resource_tables *resources;
++
++ int orphans_max;
++ int orphans_count;
++ pdf_obj **orphans;
+ };
+
+ /*
+diff --git a/include/mupdf/pdf/object.h b/include/mupdf/pdf/object.h
+index 346a2f1..02d4119 100644
+--- a/include/mupdf/pdf/object.h
++++ b/include/mupdf/pdf/object.h
+@@ -109,6 +109,7 @@ pdf_obj *pdf_dict_gets(fz_context *ctx, pdf_obj *dict, const char *key);
+ pdf_obj *pdf_dict_getsa(fz_context *ctx, pdf_obj *dict, const char *key, const char *abbrev);
+ void pdf_dict_put(fz_context *ctx, pdf_obj *dict, pdf_obj *key, pdf_obj *val);
+ void pdf_dict_put_drop(fz_context *ctx, pdf_obj *dict, pdf_obj *key, pdf_obj *val);
++void pdf_dict_get_put_drop(fz_context *ctx, pdf_obj *dict, pdf_obj *key, pdf_obj *val, pdf_obj **old_val);
+ void pdf_dict_puts(fz_context *ctx, pdf_obj *dict, const char *key, pdf_obj *val);
+ void pdf_dict_puts_drop(fz_context *ctx, pdf_obj *dict, const char *key, pdf_obj *val);
+ void pdf_dict_putp(fz_context *ctx, pdf_obj *dict, const char *path, pdf_obj *val);
+diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c
+index f2e4551..a0d0d8e 100644
+--- a/source/pdf/pdf-object.c
++++ b/source/pdf/pdf-object.c
+@@ -1240,9 +1240,13 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev)
+ return pdf_dict_get(ctx, obj, abbrev);
+ }
+
+-void
+-pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
++static void
++pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val, pdf_obj **old_val)
+ {
++
++ if (old_val)
++ *old_val = NULL;
++
+ RESOLVE(obj);
+ if (obj >= PDF_OBJ__LIMIT)
+ {
+@@ -1282,7 +1286,10 @@ pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
+ {
+ pdf_obj *d = DICT(obj)->items[i].v;
+ DICT(obj)->items[i].v = pdf_keep_obj(ctx, val);
+- pdf_drop_obj(ctx, d);
++ if (old_val)
++ *old_val = d;
++ else
++ pdf_drop_obj(ctx, d);
+ }
+ }
+ else
+@@ -1305,10 +1312,27 @@ pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
+ }
+
+ void
++pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
++{
++ pdf_dict_get_put(ctx, obj, key, val, NULL);
++}
++
++void
+ pdf_dict_put_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val)
+ {
+ fz_try(ctx)
+- pdf_dict_put(ctx, obj, key, val);
++ pdf_dict_get_put(ctx, obj, key, val, NULL);
++ fz_always(ctx)
++ pdf_drop_obj(ctx, val);
++ fz_catch(ctx)
++ fz_rethrow(ctx);
++}
++
++void
++pdf_dict_get_put_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val, pdf_obj **old_val)
++{
++ fz_try(ctx)
++ pdf_dict_get_put(ctx, obj, key, val, old_val);
+ fz_always(ctx)
+ pdf_drop_obj(ctx, val);
+ fz_catch(ctx)
+diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c
+index fdd4648..212c8b7 100644
+--- a/source/pdf/pdf-repair.c
++++ b/source/pdf/pdf-repair.c
+@@ -259,6 +259,27 @@ pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int num, int gen)
+ }
+ }
+
++static void
++orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj)
++{
++ if (doc->orphans_count == doc->orphans_max)
++ {
++ int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32);
++
++ fz_try(ctx)
++ {
++ doc->orphans = fz_resize_array(ctx, doc->orphans, new_max, sizeof(*doc->orphans));
++ doc->orphans_max = new_max;
++ }
++ fz_catch(ctx)
++ {
++ pdf_drop_obj(ctx, obj);
++ fz_rethrow(ctx);
++ }
++ }
++ doc->orphans[doc->orphans_count++] = obj;
++}
++
+ void
+ pdf_repair_xref(fz_context *ctx, pdf_document *doc)
+ {
+@@ -520,12 +541,13 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc)
+ /* correct stream length for unencrypted documents */
+ if (!encrypt && list[i].stm_len >= 0)
+ {
++ pdf_obj *old_obj = NULL;
+ dict = pdf_load_object(ctx, doc, list[i].num, list[i].gen);
+
+ length = pdf_new_int(ctx, doc, list[i].stm_len);
+- pdf_dict_put(ctx, dict, PDF_NAME_Length, length);
+- pdf_drop_obj(ctx, length);
+-
++ pdf_dict_get_put_drop(ctx, dict, PDF_NAME_Length, length, &old_obj);
++ if (old_obj)
++ orphan_object(ctx, doc, old_obj);
+ pdf_drop_obj(ctx, dict);
+ }
+ }
+diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
+index 3de1cd2..6682741 100644
+--- a/source/pdf/pdf-xref.c
++++ b/source/pdf/pdf-xref.c
+@@ -1626,6 +1626,12 @@ pdf_close_document(fz_context *ctx, pdf_document *doc)
+
+ pdf_drop_resource_tables(ctx, doc);
+
++ for (i = 0; i < doc->orphans_count; i++)
++ {
++ pdf_drop_obj(ctx, doc->orphans[i]);
++ }
++ fz_free(ctx, doc->orphans);
++
+ fz_free(ctx, doc);
+ }
+
+--
+2.10.1
+
diff --git a/gnu/packages/patches/musl-CVE-2016-8859.patch b/gnu/packages/patches/musl-CVE-2016-8859.patch
new file mode 100644
index 0000000000..7bb5b892dd
--- /dev/null
+++ b/gnu/packages/patches/musl-CVE-2016-8859.patch
@@ -0,0 +1,81 @@
+Fix CVE-2016-8859:
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8859
+
+Patch copied from upstream source repository:
+
+http://git.musl-libc.org/cgit/musl/commit/?id=c3edc06d1e1360f3570db9155d6b318ae0d0f0f7
+
+From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Thu, 6 Oct 2016 18:34:58 -0400
+Subject: [PATCH] fix missing integer overflow checks in regexec buffer size
+ computations
+
+most of the possible overflows were already ruled out in practice by
+regcomp having already succeeded performing larger allocations.
+however at least the num_states*num_tags multiplication can clearly
+overflow in practice. for safety, check them all, and use the proper
+type, size_t, rather than int.
+
+also improve comments, use calloc in place of malloc+memset, and
+remove bogus casts.
+---
+ src/regex/regexec.c | 23 ++++++++++++++++++-----
+ 1 file changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/src/regex/regexec.c b/src/regex/regexec.c
+index 16c5d0a..dd52319 100644
+--- a/src/regex/regexec.c
++++ b/src/regex/regexec.c
+@@ -34,6 +34,7 @@
+ #include <wchar.h>
+ #include <wctype.h>
+ #include <limits.h>
++#include <stdint.h>
+
+ #include <regex.h>
+
+@@ -206,11 +207,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
+
+ /* Allocate memory for temporary data required for matching. This needs to
+ be done for every matching operation to be thread safe. This allocates
+- everything in a single large block from the stack frame using alloca()
+- or with malloc() if alloca is unavailable. */
++ everything in a single large block with calloc(). */
+ {
+- int tbytes, rbytes, pbytes, xbytes, total_bytes;
++ size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
+ char *tmp_buf;
++
++ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that
++ * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
++ if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
++ goto error_exit;
++
++ /* Likewise check rbytes. */
++ if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next)))
++ goto error_exit;
++
++ /* Likewise check pbytes. */
++ if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos)))
++ goto error_exit;
++
+ /* Compute the length of the block we need. */
+ tbytes = sizeof(*tmp_tags) * num_tags;
+ rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
+@@ -221,10 +235,9 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
+ + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
+
+ /* Allocate the memory. */
+- buf = xmalloc((unsigned)total_bytes);
++ buf = calloc(total_bytes, 1);
+ if (buf == NULL)
+ return REG_ESPACE;
+- memset(buf, 0, (size_t)total_bytes);
+
+ /* Get the various pointers within tmp_buf (properly aligned). */
+ tmp_tags = (void *)buf;
+--
+2.10.1
+
diff --git a/gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch b/gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch
deleted file mode 100644
index 9ddfd4fe10..0000000000
--- a/gnu/packages/patches/notmuch-emacs-25-compatibility-fix.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-This fixes a test failure with emacs-25. Picked from
-https://git.notmuchmail.org/git?p=notmuch;a=commit;h=f575a346df09c82691bb9e7c462836d982fe31f7
-
-From f575a346df09c82691bb9e7c462836d982fe31f7 Mon Sep 17 00:00:00 2001
-From: David Bremner <david@tethera.net>
-Date: Sun, 9 Oct 2016 19:30:44 -0300
-Subject: [PATCH] emacs/show: force notmuch-show-buttonise-links to act on
- lines
-
-This seems to fix a problem with emacs 25 creating partial buttons by
-calling n-s-b-l with a region that does not include the whole button.
-I'm not 100% sure it's legit to act outside the region passed by
-jit-lock, but goto-address-fontify-region (where I borrowed the code
-from) already does this, so this patch to not make things worse.
----
- emacs/notmuch-show.el | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
-index 641398d..e7d16f8 100644
---- a/emacs/notmuch-show.el
-+++ b/emacs/notmuch-show.el
-@@ -1174,13 +1174,15 @@ This also turns id:\"<message id>\"-parts and mid: links into
- buttons for a corresponding notmuch search."
- (goto-address-fontify-region start end)
- (save-excursion
-- (let (links)
-- (goto-char start)
-- (while (re-search-forward notmuch-id-regexp end t)
-+ (let (links
-+ (beg-line (progn (goto-char start) (line-beginning-position)))
-+ (end-line (progn (goto-char end) (line-end-position))))
-+ (goto-char beg-line)
-+ (while (re-search-forward notmuch-id-regexp end-line t)
- (push (list (match-beginning 0) (match-end 0)
- (match-string-no-properties 0)) links))
-- (goto-char start)
-- (while (re-search-forward notmuch-mid-regexp end t)
-+ (goto-char beg-line)
-+ (while (re-search-forward notmuch-mid-regexp end-line t)
- (let* ((mid-cid (match-string-no-properties 1))
- (mid (save-match-data
- (string-match "^[^/]*" mid-cid)
---
-2.10.1
-