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/findutils-localstatedir.patch14
-rw-r--r--gnu/packages/patches/gawk-shell.patch18
-rw-r--r--gnu/packages/patches/gcc-arm-link-spec-fix.patch4
-rw-r--r--gnu/packages/patches/guile-linux-syscalls.patch6
-rw-r--r--gnu/packages/patches/patch-hurd-path-max.patch48
-rw-r--r--gnu/packages/patches/sed-hurd-path-max.patch34
-rw-r--r--gnu/packages/patches/tar-d_ino_in_dirent-fix.patch33
7 files changed, 147 insertions, 10 deletions
diff --git a/gnu/packages/patches/findutils-localstatedir.patch b/gnu/packages/patches/findutils-localstatedir.patch
new file mode 100644
index 0000000000..c774303cf1
--- /dev/null
+++ b/gnu/packages/patches/findutils-localstatedir.patch
@@ -0,0 +1,14 @@
+Do not try to create $localstatedir (aka. /var) since we don't have
+write access.
+
+--- findutils-4.4.2/locate/Makefile.in	2015-06-04 12:40:52.690935795 +0200
++++ findutils-4.4.2/locate/Makefile.in	2015-06-04 12:41:32.087286685 +0200
+@@ -1212,7 +1212,7 @@ updatedb: updatedb.sh Makefile
+ 	chmod +x $@
+ 
+ install-data-hook:
+-	$(top_srcdir)/build-aux/mkinstalldirs $(DESTDIR)$(localstatedir)
++	true
+ 
+ dblocation.texi: Makefile
+ 	echo '@set LOCATE_DB $(LOCATE_DB)' > $@
diff --git a/gnu/packages/patches/gawk-shell.patch b/gnu/packages/patches/gawk-shell.patch
index 89b8540a8d..80e9c65475 100644
--- a/gnu/packages/patches/gawk-shell.patch
+++ b/gnu/packages/patches/gawk-shell.patch
@@ -2,9 +2,9 @@ As for libc's `system', change Awk to look for `sh' in $PATH.  This patch is
 only meant to be used during bootstrapping, where we don't know in advance the
 absolute file name of `sh'.
 
---- gawk-4.0.0/io.c	2011-05-18 20:47:29.000000000 +0200
-+++ gawk-4.0.0/io.c	2012-12-18 15:56:06.000000000 +0100
-@@ -1759,7 +1759,7 @@ two_way_open(const char *str, struct red
+--- gawk-4.1.3/io.c	2015-05-19 15:37:20.000000000 +0200
++++ gawk-4.1.3/io.c	2015-06-09 18:39:36.918414881 +0200
+@@ -1945,7 +1945,7 @@ two_way_open(const char *str, struct red
  
  			signal(SIGPIPE, SIG_DFL);
  
@@ -13,22 +13,22 @@ absolute file name of `sh'.
  			_exit(errno == ENOENT ? 127 : 126);
  
  		case -1:
-@@ -1924,7 +1924,7 @@ use_pipes:
- 		    || close(ctop[0]) == -1 || close(ctop[1]) == -1)
+@@ -2129,7 +2129,7 @@ use_pipes:
  			fatal(_("close of pipe failed (%s)"), strerror(errno));
  		/* stderr does NOT get dup'ed onto child's stdout */
+ 		signal(SIGPIPE, SIG_DFL);
 -		execl("/bin/sh", "sh", "-c", str, NULL);
 +		execlp("sh", "sh", "-c", str, NULL);
  		_exit(errno == ENOENT ? 127 : 126);
  	}
- #endif /* NOT __EMX__ */
-@@ -2074,7 +2074,7 @@ gawk_popen(const char *cmd, struct redir
- 			fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno));
+ #endif /* NOT __EMX__, NOT __MINGW32__ */
+@@ -2323,7 +2323,7 @@ gawk_popen(const char *cmd, struct redir
  		if (close(p[0]) == -1 || close(p[1]) == -1)
  			fatal(_("close of pipe failed (%s)"), strerror(errno));
+ 		signal(SIGPIPE, SIG_DFL);
 -		execl("/bin/sh", "sh", "-c", cmd, NULL);
 +		execlp("sh", "sh", "-c", cmd, NULL);
  		_exit(errno == ENOENT ? 127 : 126);
  	}
- #endif /* NOT __EMX__ */
+ #endif /* NOT __EMX__, NOT __MINGW32__ */
 
diff --git a/gnu/packages/patches/gcc-arm-link-spec-fix.patch b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
index 0ffe8a1810..e00ed1bac0 100644
--- a/gnu/packages/patches/gcc-arm-link-spec-fix.patch
+++ b/gnu/packages/patches/gcc-arm-link-spec-fix.patch
@@ -1,6 +1,10 @@
 Do not pass -dynamic-linker to linker when !shared.
 Fixes <http://bugs.gnu.org/20102>.
 
+ARM 'link' spec issue reported at
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65711 and
+https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01387.html.
+
 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
diff --git a/gnu/packages/patches/guile-linux-syscalls.patch b/gnu/packages/patches/guile-linux-syscalls.patch
index 57c7f2589d..25a5e90e35 100644
--- a/gnu/packages/patches/guile-linux-syscalls.patch
+++ b/gnu/packages/patches/guile-linux-syscalls.patch
@@ -7,12 +7,13 @@ diff --git a/libguile/posix.c b/libguile/posix.c
 index 324f21b..cbee94d 100644
 --- a/libguile/posix.c
 +++ b/libguile/posix.c
-@@ -2286,6 +2286,261 @@ scm_init_popen (void)
+@@ -2245,6 +2245,263 @@ scm_init_popen (void)
  }
  #endif
  
 +
 +/* Linux! */
++#ifdef __linux__
 +
 +#include <sys/mount.h>
 +#include "libguile/foreign.h"
@@ -265,7 +266,10 @@ index 324f21b..cbee94d 100644
 +  return scm_from_short (ifr.ifr_flags);
 +}
 +#undef FUNC_NAME
++#endif
 +
  void
  scm_init_posix ()
  {
+-- 
+2.4.1
diff --git a/gnu/packages/patches/patch-hurd-path-max.patch b/gnu/packages/patches/patch-hurd-path-max.patch
new file mode 100644
index 0000000000..81e37930c2
--- /dev/null
+++ b/gnu/packages/patches/patch-hurd-path-max.patch
@@ -0,0 +1,48 @@
+See <http://lists.gnu.org/archive/html/bug-patch/2015-06/msg00009.html>
+
+From 0507dfad5f060161f01840067e1bb1615257b636 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
+Date: Mon, 8 Jun 2015 17:27:56 +0200
+Subject: [PATCH] Do not rely on PATH_MAX when reading a symlink target.
+
+* src/util.c (move_file, copy_file): Use 'fromst->st_size + 1' and
+'tost->st_size + 1' for the allocation, and 'fromst->st_size' and
+'tost->st_size' instead of PATH_MAX.  Fixes compilation on GNU/Hurd.
+---
+ src/util.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/util.c b/src/util.c
+index 82a7e37..c4c0f9d 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -460,12 +460,12 @@ move_file (char const *from, bool *from_needs_removal,
+ 
+ 	  /* FROM contains the contents of the symlink we have patched; need
+ 	     to convert that back into a symlink. */
+-	  char *buffer = xmalloc (PATH_MAX);
++	  char *buffer = xmalloc (fromst->st_size + 1);
+ 	  int fd, size = 0, i;
+ 
+ 	  if ((fd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0)
+ 	    pfatal ("Can't reopen file %s", quotearg (from));
+-	  while ((i = read (fd, buffer + size, PATH_MAX - size)) > 0)
++	  while ((i = read (fd, buffer + size, fromst->st_size - size)) > 0)
+ 	    size += i;
+ 	  if (i != 0 || close (fd) != 0)
+ 	    read_fatal ();
+@@ -610,9 +610,9 @@ copy_file (char const *from, char const *to, struct stat *tost,
+ 
+   if (S_ISLNK (mode))
+     {
+-      char *buffer = xmalloc (PATH_MAX);
++      char *buffer = xmalloc (tost->st_size + 1);
+ 
+-      if (safe_readlink (from, buffer, PATH_MAX) < 0)
++      if (safe_readlink (from, buffer, tost->st_size) < 0)
+ 	pfatal ("Can't read %s %s", "symbolic link", from);
+       if (safe_symlink (buffer, to) != 0)
+ 	pfatal ("Can't create %s %s", "symbolic link", to);
+-- 
+2.4.2
+
diff --git a/gnu/packages/patches/sed-hurd-path-max.patch b/gnu/packages/patches/sed-hurd-path-max.patch
new file mode 100644
index 0000000000..5226cba4cb
--- /dev/null
+++ b/gnu/packages/patches/sed-hurd-path-max.patch
@@ -0,0 +1,34 @@
+7bb8d35d0330161a5af5341471d0c183a067e8c2
+Author: Jose E. Marchesi <jemarch@gnu.org>
+Date:   Sun Oct 6 14:43:38 2013 +0200
+
+    Set PATH_MAX to some constant in case it is not defined in system
+    headers.
+    
+    2013-10-06  Jose E. Marchesi  <jemarch@gnu.org>
+    
+    	* basicdefs.h (PATH_MAX): Defined to some constant in case it is
+    	not defined by system headers.
+    	* sed/utils.c: Do not include pathmax.h anymore.
+    	* bootstrap.conf (gnulib_modules): Do not use the gnulib module
+    	pathmax.
+
+diff --git a/basicdefs.h b/basicdefs.h
+index 0d28a97..09f5beb 100644
+--- a/basicdefs.h
++++ b/basicdefs.h
+@@ -40,6 +41,13 @@ typedef unsigned long countT;
+ #define obstack_chunk_alloc  ck_malloc
+ #define obstack_chunk_free   free
+ 
++/* MAX_PATH is not defined in some platforms, most notably GNU/Hurd.
++   In that case we define it here to some constant.  Note however that
++   this relies in the fact that sed does reallocation if a buffer
++   needs to be larger than PATH_MAX.  */
++#ifndef PATH_MAX
++# define PATH_MAX 200
++#endif
+ 
+ /* handle misdesigned <ctype.h> macros (snarfed from lib/regex.c) */
+ /* Jim Meyering writes:
+ 
diff --git a/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch
new file mode 100644
index 0000000000..39d8e2b20a
--- /dev/null
+++ b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch
@@ -0,0 +1,33 @@
+commit e9ddc08da0982f36581ae5a8c7763453ff41cfe8
+Author: Sergey Poznyakoff <gray@gnu.org>
+Date:   Thu Sep 25 00:22:16 2014 +0300
+
+    Bugfixes.
+    
+    * doc/tar.1: Fix typo in font spec.
+    * src/tar.c (sort_mode_arg, sort_mode_flag): Protect "inode"
+    (SAVEDIR_SORT_INODE) with D_INO_IN_DIRENT
+
+diff --git a/src/tar.c b/src/tar.c
+index 225c624..f8102e0 100644
+--- a/src/tar.c
++++ b/src/tar.c
+@@ -1341,14 +1341,18 @@ static char filename_terminator;
+ static char const *const sort_mode_arg[] = {
+   "none",
+   "name",
++#if D_INO_IN_DIRENT
+   "inode",
++#endif
+   NULL
+ };
+ 
+ static int sort_mode_flag[] = {
+     SAVEDIR_SORT_NONE,
+     SAVEDIR_SORT_NAME,
++#if D_INO_IN_DIRENT
+     SAVEDIR_SORT_INODE
++#endif
+ };
+ 
+ ARGMATCH_VERIFY (sort_mode_arg, sort_mode_flag);
\ No newline at end of file