code:
This patch addresses two heap overflow bugs in raptor2:

http://seclists.org/oss-sec/2017/q2/424

Patch copied from libreoffice:

https://github.com/LibreOffice/core/blob/master/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1

From 590681e546cd9aa18d57dc2ea1858cb734a3863f Mon Sep 17 00:00:00 2001
From: Dave Beckett <dave@dajobe.org>
Date: Sun, 16 Apr 2017 23:15:12 +0100
Subject: [PATCH] Calcualte max nspace declarations correctly for XML writer

(raptor_xml_writer_start_element_common): Calculate max including for
each attribute a potential name and value.

Fixes Issues #0000617 http://bugs.librdf.org/mantis/view.php?id=617
and #0000618 http://bugs.librdf.org/mantis/view.php?id=618
---
 src/raptor_xml_writer.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
index 693b946..0d3a36a 100644
--- a/src/raptor_xml_writer.c
+++ b/src/raptor_xml_writer.c
@@ -181,9 +181,10 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
   size_t nspace_declarations_count = 0;
   unsigned int i;

-  /* max is 1 per element and 1 for each attribute + size of declared */
   if(nstack) {
-    int nspace_max_count = element->attribute_count+1;
+    int nspace_max_count = element->attribute_count * 2; /* attr and value */
+    if(element->name->nspace)
+      nspace_max_count++;
     if(element->declared_nspaces)
       nspace_max_count += raptor_sequence_size(element->declared_nspaces);
     if(element->xml_language)
@@ -237,7 +238,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
         }
       }

-      /* Add the attribute + value */
+      /* Add the attribute's value */
       nspace_declarations[nspace_declarations_count].declaration=
         raptor_qname_format_as_xml(element->attributes[i],
                                    &nspace_declarations[nspace_declarations_count].length);
--
2.9.3


code:
diff --git a/rp-private.h b/rp-private.h
index b4c7dad..0c7193e 100644
--- a/rp-private.h
+++ b/rp-private.h
@@ -36,7 +36,7 @@
 #define LONG_SHIFT ((LONG_LENGTH == 16) ? 4 : \
                     (LONG_LENGTH == 32) ? 5 : \
 		    (LONG_LENGTH == 64) ? 6 : 0)
-#define LONG_MASK (~(-1L<<LONG_SHIFT))
+#define LONG_MASK (~(-(1L<<LONG_SHIFT)))

 /* Check if SSE instructions can be used.
    We assume that one SSE word of 128 bit is two long's,
diff --git a/sturm.c b/sturm.c
index c78d7c6..5fd2cf5 100644
--- a/sturm.c
+++ b/sturm.c
@@ -27,7 +27,6 @@
  ***********************************************************************/

 #include "ratpoints.h"
-
 /**************************************************************************
  * Arguments of _ratpoints_compute_sturm() : (from the args argument)     *
  *                                                                        *
@@ -53,7 +52,7 @@
 /* A helper function: evaluate the polynomial in cofs[] of given degree
   at num/2^denexp and return the sign. */

-static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
+static long eval_sign(const ratpoints_args *args, const mpz_t *cofs, long degree,
                       long num, long denexp)
 {
   long n, e, s;
@@ -70,11 +69,80 @@ static long eval_sign(ratpoints_args *args, mpz_t *cofs, long degree,
   return(s);
 }

+static const    long max = (long)(((unsigned long)(-1))>>1);
+static const    long min = (long)(-(((unsigned long)(-1))>>1));
+    /* recursive helper function */
+static void iterate(long nl, long nr, long del, long der, long cleft, long cright,
+                 long sl, long sr, long depth,
+		 ratpoints_interval **iptr, const ratpoints_interval *ivlo,
+		 const ratpoints_args *args, const long k, const long sturm_degs[],
+                 const mpz_t sturm[][args->degree + 1])
+    { /* nl/2^del, nr/2^der : interval left/right endpoints,
+         cleft, cright: sign change counts at endpoints,
+         sl, sr: signs at endpoints,
+         depth: iteration depth */
+     long iter = args->sturm;
+      if(cleft == cright && sl < 0) { return; }
+         /* here we know the polynomial is negative on the interval */
+      if((cleft == cright && sl > 0) || depth >= iter)
+      /* we have to add/extend an interval if we either know that
+         the polynomial is positive on the interval (first condition)
+         or the maximal iteration depth has been reached (second condition) */
+      { double l = ((double)nl)/((double)(1<<del));
+        double u = ((double)nr)/((double)(1<<der));
+        if(*iptr == ivlo)
+        { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+        else
+        { if(((*iptr)-1)->up == l) /* extend interval */
+          { ((*iptr)-1)->up = u; }
+          else /* new interval */
+          { (*iptr)->low = l; (*iptr)->up  = u; (*iptr)++; }
+        }
+        return;
+      }
+      /* now we must split the interval and evaluate the sturm sequence
+         at the midpoint */
+      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
+        if(nl == min)
+        { if(nr == max) { nm = 0; dem = 0; }
+          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
+        }
+        else
+        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
+          else /* "normal" case */
+          { if(del == der) /* then both are zero */
+            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
+              else { nm = nl+nr; dem = 1; }
+            }
+            else /* here one de* is greater */
+            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
+              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
+            }
+          }
+        }
+        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
+        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
+        if(s0*s1 == -1) { cmid++; }
+        s = (s1 == 0) ? s0 : s1;
+        for(n = 2; n <= k; n++)
+        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
+          if(s2 == -s) { cmid++; s = s2; }
+          else if(s2 != 0) { s = s2; }
+        }
+        /* now recurse */
+        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
+                sl, (s0==0) ? -s1 : s0, depth+1,
+                iptr, ivlo, args, k, sturm_degs, sturm);
+        iterate(nm, nr, dem, der, cmid, cright,
+                (s0==0) ? s1 : s0, sr, depth+1,
+		iptr, ivlo, args, k, sturm_degs, sturm);
+      }
+    } /* end iterate() */
+
 long _ratpoints_compute_sturm(ratpoints_args *args)
 {
   mpz_t *cofs = args->cof;
   long degree = args->degree;
-  long iter = args->sturm;
   ratpoints_interval *ivlist = args->domain;
   long num_iv = args->num_inter;
   long n, m, k, new_num;
@@ -165,75 +233,12 @@ long _ratpoints_compute_sturm(ratpoints_args *args)
   /* recall: typedef struct {double low; double up;} ratpoints_interval; */
   { ratpoints_interval ivlocal[1 + (degree>>1)];
     ratpoints_interval *iptr = &ivlocal[0];
-    long max = (long)(((unsigned long)(-1))>>1);
-    long min = -max;
     long num_intervals;
     long slcf = mpz_cmp_si(cofs[degree], 0);

-    /* recursive helper function */
-    void iterate(long nl, long nr, long del, long der, long cleft, long cright,
-                 long sl, long sr, long depth)
-    { /* nl/2^del, nr/2^der : interval left/right endpoints,
-         cleft, cright: sign change counts at endpoints,
-         sl, sr: signs at endpoints,
-         depth: iteration depth */
-      if(cleft == cright && sl < 0) { return; }
-         /* here we know the polynomial is negative on the interval */
-      if((cleft == cright && sl > 0) || depth >= iter)
-      /* we have to add/extend an interval if we either know that
-         the polynomial is positive on the interval (first condition)
-         or the maximal iteration depth has been reached (second condition) */
-      { double l = ((double)nl)/((double)(1<<del));
-        double u = ((double)nr)/((double)(1<<der));
-        if(iptr == &ivlocal[0])
-        { iptr->low = l; iptr->up  = u; iptr++; }
-        else
-        { if((iptr-1)->up == l) /* extend interval */
-          { (iptr-1)->up = u; }
-          else /* new interval */
-          { iptr->low = l; iptr->up  = u; iptr++; }
-        }
-        return;
-      }
-      /* now we must split the interval and evaluate the sturm sequence
-         at the midpoint */
-      { long nm, dem, s0, s1, s2, s, cmid = 0, n;
-        if(nl == min)
-        { if(nr == max) { nm = 0; dem = 0; }
-          else { nm = (nr == 0) ? -1 : 2*nr; dem = 0; }
-        }
-        else
-        { if(nr == max) { nm = (nl == 0) ? 1 : 2*nl; dem = 0; }
-          else /* "normal" case */
-          { if(del == der) /* then both are zero */
-            { if(((nl+nr) & 1) == 0) { nm = (nl+nr)>>1; dem = 0; }
-              else { nm = nl+nr; dem = 1; }
-            }
-            else /* here one de* is greater */
-            { if(del > der) { nm = nl + (nr<<(del-der)); dem = del+1; }
-              else { nm = (nl<<(der-del)) + nr; dem = der+1; }
-            }
-          }
-        }
-        s0 = eval_sign(args, sturm[0], sturm_degs[0], nm, dem);
-        s1 = eval_sign(args, sturm[1], sturm_degs[1], nm, dem);
-        if(s0*s1 == -1) { cmid++; }
-        s = (s1 == 0) ? s0 : s1;
-        for(n = 2; n <= k; n++)
-        { s2 = eval_sign(args, sturm[n], sturm_degs[n], nm, dem);
-          if(s2 == -s) { cmid++; s = s2; }
-          else if(s2 != 0) { s = s2; }
-        }
-        /* now recurse */
-        iterate(nl, nm, del, dem, cleft, (s0==0) ? (cmid+1) : cmid,
-                sl, (s0==0) ? -s1 : s0, depth+1);
-        iterate(nm, nr, dem, der, cmid, cright,
-                (s0==0) ? s1 : s0, sr, depth+1);
-      }
-    } /* end iterate() */
-
     iterate(min, max, 0, 0, count2, count1,
-            (degree & 1) ? -slcf : slcf, slcf, 0);
+            (degree & 1) ? -slcf : slcf, slcf, 0,
+	    &iptr, &ivlocal[0], args, k, sturm_degs, sturm);
     num_intervals = iptr - &ivlocal[0];
     /* intersect with given intervals */
     { ratpoints_interval local_copy[num_iv];

repo_name: maximed/guix

license: mit


code:
Use $SHELL instead of hardcoding /bin/sh in ratpoison.

Patch by Mark H Weaver <mhw@netris.org>.

--- ratpoison/src/actions.c.orig	2014-09-14 16:46:08.000000000 +0200
+++ ratpoison/src/actions.c	2015-08-06 15:00:54.951575260 +0200
@@ -228,12 +228,12 @@
   add_command ("escape",        cmd_escape,     1, 1, 1,
                "Key: ", arg_KEY);
   add_command ("exec",          cmd_exec,       1, 1, 1,
-               "/bin/sh -c ", arg_SHELLCMD);
+               "$SHELL -c ", arg_SHELLCMD);
   add_command ("execa",		cmd_execa,	1, 1, 1,
-	       "/bin/sh -c ", arg_SHELLCMD);
+	       "$SHELL -c ", arg_SHELLCMD);
   add_command ("execf",		cmd_execf,	2, 2, 2,
 	       "frame to execute in:", arg_FRAME,
-	       "/bin/sh -c ", arg_SHELLCMD);
+	       "$SHELL -c ", arg_SHELLCMD);
   add_command ("fdump",         cmd_fdump,      1, 0, 0,
                "", arg_NUMBER);
   add_command ("focus",         cmd_next_frame, 0, 0, 0);
@@ -367,7 +367,7 @@
   add_command ("unsetenv",      cmd_unsetenv,   1, 1, 1,
                "Variable: ", arg_STRING);
   add_command ("verbexec",      cmd_verbexec,   1, 1, 1,
-               "/bin/sh -c ", arg_SHELLCMD);
+               "$SHELL -c ", arg_SHELLCMD);
   add_command ("version",       cmd_version,    0, 0, 0);
   add_command ("vsplit",        cmd_v_split,    1, 0, 0,
                "Split: ", arg_STRING);
@@ -2671,6 +2671,9 @@
   pid = fork();
   if (pid == 0)
     {
+      char *shell_path;
+      char *shell_name;
+
       /* Some process setup to make sure the spawned process runs
          in its own session. */
       putenv(current_screen()->display_string);
@@ -2700,7 +2703,18 @@
       /* raw means don't run it through sh.  */
       if (raw)
         execl (cmd, cmd, (char *)NULL);
-      execl("/bin/sh", "sh", "-c", cmd, (char *)NULL);
+
+      shell_path = getenv ("SHELL");
+      if (shell_path == NULL)
+        shell_path = "/bin/sh";
+
+      shell_name = strrchr (shell_path, '/');
+      if (shell_name == NULL)
+        shell_name = shell_path;
+      else
+        shell_name++;
+
+      execl(shell_path, shell_name, "-c", cmd, (char *)NULL);
       _exit(EXIT_FAILURE);
     }

--- ratpoison/src/events.c.orig	2014-09-14 16:46:23.000000000 +0200
+++ ratpoison/src/events.c	2015-08-06 15:02:17.287578780 +0200
@@ -919,7 +919,7 @@
             {
               /* Report any child that didn't return 0. */
               if (cur->status != 0)
-                marked_message_printf (0,0, "/bin/sh -c \"%s\" finished (%d)",
+                marked_message_printf (0,0, "$SHELL -c \"%s\" finished (%d)",
                                        cur->cmd, cur->status);
               list_del  (&cur->node);
               free (cur->cmd);
--- ratpoison/src/messages.h.orig	2014-04-09 01:22:08.000000000 +0200
+++ ratpoison/src/messages.h	2015-08-06 15:04:14.759583801 +0200
@@ -39,7 +39,7 @@

 #define MESSAGE_PROMPT_SWITCH_TO_WINDOW "Switch to window: "
 #define MESSAGE_PROMPT_NEW_WINDOW_NAME  "Set window's title to: "
-#define MESSAGE_PROMPT_SHELL_COMMAND    "/bin/sh -c "
+#define MESSAGE_PROMPT_SHELL_COMMAND    "$SHELL -c "
 #define MESSAGE_PROMPT_COMMAND          ":"
 #define MESSAGE_PROMPT_SWITCH_WM        "Switch to wm: "
 #define MESSAGE_PROMPT_XTERM_COMMAND    MESSAGE_PROMPT_SHELL_COMMAND TERM_PROG " -e "


code:
http://git.savannah.gnu.org/cgit/rcs.git/patch/?id=8883c4f5a29be18e9ea09bd27a7b660830de45bb

From 8883c4f5a29be18e9ea09bd27a7b660830de45bb Mon Sep 17 00:00:00 2001
From: Thien-Thi Nguyen <ttn@gnu.org>
Date: Fri, 23 Oct 2020 09:23:49 -0400
Subject: [v] Don't test signal handling if stdin not ok.

<https://mail.gnu.org/archive/html/bug-rcs/2020-10/msg00014.html>

* tests/t632: If stdin is not open and connected to
a tty, skip the signal handling portion of the test.
---
 tests/ChangeLog | 9 +++++++++
 tests/t632      | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index c3715c0..0565058 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,12 @@
+2020-10-23  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	[v] Don't test signal handling if stdin not ok.
+
+	<https://mail.gnu.org/archive/html/bug-rcs/2020-10/msg00014.html>
+
+	* t632: If stdin is not open and connected to
+	a tty, skip the signal handling portion of the test.
+
 2020-10-20  Thien-Thi Nguyen  <ttn@gnu.org>

 	Release: 5.10.0
diff --git a/tests/t632 b/tests/t632
index df6acc9..677ec8c 100644
--- a/tests/t632
+++ b/tests/t632
@@ -40,6 +40,15 @@ echo | co -l -I $w \
 # (This is skipped if GNU coreutils timeout(1) is not available.)
 ##

+# <https://mail.gnu.org/archive/html/bug-rcs/2020-10/msg00014.html>
+# The timeout test needs co(1) to block on input.
+# If stdin is not open and connected to a tty, skip out.
+if test -t 0 ; then
+    echo STDIN OK
+else
+    exit 0
+fi
+
 # TODO: Don't be lame!  Pick one:
 # (a) Mimic timeout(1) w/ sh commands.
 # (b) Incorporate heart of timeout(1) into ./btdt and use that.
--
cgit v1.2.1


code:
From: fis <ybbs.daans@hotmail.com>
Date: Sat, 20 Jan 2018 07:42:38 +0800
Subject: [PATCH] rct.cmake: Add missing headers.

---
 rct.cmake | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/rct.cmake b/rct.cmake
index 323e7b9..3e0ac6b 100644
--- a/rct.cmake
+++ b/rct.cmake
@@ -339,7 +339,27 @@ if (NOT RCT_NO_INSTALL)
     rct/Timer.h
     rct/Value.h
     rct/WriteLocker.h
+    rct/CpuUsage.h
+    rct/DataFile.h
+    rct/Date.h
+    rct/EmbeddedLinkedList.h
+    rct/FinishMessage.h
+    rct/Flags.h
+    rct/Hash.h
+    rct/LinkedList.h
+    rct/Map.h
+    rct/MemoryMappedFile.h
+    rct/OnDestruction.h
+    rct/QuitMessage.h
+    rct/ResponseMessage.h
+    rct/ScriptEngine.h
+    rct/StackBuffer.h
+    rct/WindowsUnicodeConversion.h
     DESTINATION include/rct)

+  install(FILES
+    json/json.hpp
+    DESTINATION include/rct/json)
+
   install(EXPORT "rct" DESTINATION lib/cmake)
 endif ()
--
2.13.6


code:
Fix CVE-2014-2524:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2524
http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00057.html

Patch copied from:
https://ftp.gnu.org/gnu/readline/readline-6.3-patches/readline63-003

			   READLINE PATCH REPORT
			   =====================

Readline-Release: 6.3
Patch-ID: readline63-003

Bug-Reported-by:
Bug-Reference-ID:
Bug-Reference-URL:

Bug-Description:

There are debugging functions in the readline release that are theoretically
exploitable as security problems.  They are not public functions, but have
global linkage.

Patch (apply with `patch -p0'):

*** ../readline-6.3/util.c	2013-09-02 13:36:12.000000000 -0400
--- util.c	2014-03-20 10:25:53.000000000 -0400
***************
*** 477,480 ****
--- 479,483 ----
  }

+ #if defined (DEBUG)
  #if defined (USE_VARARGS)
  static FILE *_rl_tracefp;
***************
*** 539,542 ****
--- 542,546 ----
  }
  #endif
+ #endif /* DEBUG */


code:
This patch is to make sure that `libncurses' is among the `NEEDED'
dependencies of `libreadline.so' and `libhistory.so'.

Failing to do that, applications linking against Readline are
forced to explicitly link against libncurses as well; in addition,
this trick doesn't work when using GNU ld's `--as-needed'.

--- shlib/Makefile.in	2009-01-06 18:03:22.000000000 +0100
+++ shlib/Makefile.in	2009-07-27 14:43:25.000000000 +0200
@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
 SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
 SHOBJ_LIBS = @SHOBJ_LIBS@

-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@
+SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncurses
 SHLIB_LIBS = @SHLIB_LIBS@

 SHLIB_DOT = @SHLIB_DOT@


code:
Purity: don't look for library dependencies (of the form `-lfoo') in
/lib and /usr/lib.  Likewise, when searching for included Makefiles,
don't look in /usr/include and friends.

Borrowed from similar patch for GNU Make and adjusted for Remake.

--- remake-4.3+dbg-1.5/src/read.c.orig	2020-03-14 17:06:16.000000000 -0500
+++ remake-4.3+dbg-1.5/src/read.c	2020-07-31 22:34:03.862383862 -0500
@@ -104,7 +104,7 @@
 # define INCLUDEDIR "."
 #endif
     INCLUDEDIR,
-#ifndef _AMIGA
+#if 0
     "/usr/gnu/include",
     "/usr/local/include",
     "/usr/include",
--- remake-4.3+dbg-1.5/src/remake.c.orig	2020-03-14 17:06:16.000000000 -0500
+++ remake-4.3+dbg-1.5/src/remake.c	2020-07-31 22:34:26.798330508 -0500
@@ -1665,8 +1665,10 @@
 {
   static const char *dirs[] =
     {
+#if 0
       "/lib",
       "/usr/lib",
+#endif
 #if defined(WINDOWS32) && !defined(LIBDIR)
 /*
  * This is completely up to the user at product install time. Just define


code:
See also [Arch] and [Gentoo] for similar patches in other distros.
[Arch] https://github.com/archlinux/svntogit-community/blob/packages/renpy/trunk/renpy-system-fribidi.patch
[Gentoo] https://gitweb.gentoo.org/repo/gentoo.git/tree/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch

Index: renpy-7.4.0-source/module/renpybidicore.c
===================================================================
--- renpy-7.4.0-source.orig/module/renpybidicore.c
+++ renpy-7.4.0-source/module/renpybidicore.c
@@ -1,9 +1,3 @@
 #include <Python.h>
-
-#ifdef RENPY_BUILD
 #include <fribidi.h>
-#else
-#include <fribidi-src/lib/fribidi.h>
-#endif
-
 #include <stdlib.h>

 #ifndef alloca
Index: renpy-7.4.0-source/module/setup.py
===================================================================
--- renpy-7.4.0-source.orig/module/setup.py
+++ renpy-7.4.0-source/module/setup.py
@@ -125,30 +125,13 @@ cython(
     sdl + [ png, 'z', 'm' ])

 FRIBIDI_SOURCES = """
-fribidi-src/lib/fribidi.c
-fribidi-src/lib/fribidi-arabic.c
-fribidi-src/lib/fribidi-bidi.c
-fribidi-src/lib/fribidi-bidi-types.c
-fribidi-src/lib/fribidi-deprecated.c
-fribidi-src/lib/fribidi-joining.c
-fribidi-src/lib/fribidi-joining-types.c
-fribidi-src/lib/fribidi-mem.c
-fribidi-src/lib/fribidi-mirroring.c
-fribidi-src/lib/fribidi-run.c
-fribidi-src/lib/fribidi-shape.c
 renpybidicore.c
 """.split()
 cython(
     "_renpybidi",
     FRIBIDI_SOURCES,
-    includes=[
-        BASE + "/fribidi-src/",
-        BASE + "/fribidi-src/lib/",
-        ],
-    define_macros=[
-        ("FRIBIDI_ENTRY", ""),
-        ("HAVE_CONFIG_H", "1"),
-        ])
+    includes=["/usr/include/fribidi"],
+    libs=["fribidi"])

 cython("_renpysteam", language="c++", compile_if=steam_sdk, libs=["steam_api"])


code:
Author: Tobias Geerinckx-Rice <me@tobias.gr>
Upstream issue: <https://gitlab.com/esr/reposurgeon/merge_requests/101>

Two files required to build the documentation (including man pages) are
not included in the latest reposurgeon release, breaking ‘make all’.

Luckily, they are tiny:

--- a/docbook-extra.xml	1970-01-01 01:00:00.000000000 +0100
+++ b/docbook-extra.xml	2018-01-25 00:17:18.236727017 +0100
@@ -0,0 +1,5 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:param name="variablelist.term.separator"></xsl:param>
+<xsl:param name="variablelist.term.break.after">1</xsl:param>
+</xsl:stylesheet>
diff -Naur reposurgeon-3.43/nofooter.conf reposurgeon-3.43-b/nofooter.conf
--- a/nofooter.conf	1970-01-01 01:00:00.000000000 +0100
+++ b/nofooter.conf	2018-01-25 00:23:15.384498847 +0100
@@ -0,0 +1,2 @@
+[footer-text]
+


code:
From f308dc91660954ab88bb41868c0b9809592923e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@member.fsf.org>
Date: Sat, 20 Feb 2021 20:37:39 +0800
Subject: [PATCH] Allow set libretro_directory via environment variable

---
 retroarch.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/retroarch.c b/retroarch.c
index 6a88c3108e..6807c12b5b 100644
--- a/retroarch.c
+++ b/retroarch.c
@@ -36038,6 +36038,15 @@ static void retroarch_parse_input_and_config(
 #endif
       config_load(&p_rarch->g_extern);

+   /* Override settings via environment variables */
+   if (getenv("LIBRETRO_DIRECTORY")) {
+      settings_t *settings = p_rarch->configuration_settings;
+      retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY, NULL);
+      configuration_set_string(settings,
+            settings->paths.directory_libretro,
+            getenv("LIBRETRO_DIRECTORY"));
+   }
+
    /* Second pass: All other arguments override the config file */
    optind = 1;

--
2.30.0


code:
diff -r -u Ri-li-2.0.1.orig/src/audio.cc Ri-li-2.0.1/src/audio.cc
--- Ri-li-2.0.1.orig/src/audio.cc	2012-01-22 00:40:56.928609371 -0800
+++ Ri-li-2.0.1/src/audio.cc	2012-01-22 00:28:33.360636539 -0800
@@ -22,8 +22,8 @@
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

 #include <stdlib.h>
-#include <iostream.h>
-#include <string.h>
+#include <iostream>
+#include <string>

 #include "audio.h"
 #include "utils.h"
@@ -57,7 +57,7 @@
   char PathFile[512];

   if(Mix_OpenAudio(22050,AUDIO_S16,1,1024)) {
-    cerr <<"Enable to init Sound card ! "<<SDL_GetError()<<endl;
+    std::cerr <<"Enable to init Sound card ! "<<SDL_GetError()<<std::endl;
     return false;
   }

diff -r -u Ri-li-2.0.1.orig/src/ecran.cc Ri-li-2.0.1/src/ecran.cc
--- Ri-li-2.0.1.orig/src/ecran.cc	2007-11-02 04:48:16.000000000 -0700
+++ Ri-li-2.0.1/src/ecran.cc	2012-01-22 00:13:54.422798653 -0800
@@ -21,7 +21,7 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
diff -r -u Ri-li-2.0.1.orig/src/editeur.cc Ri-li-2.0.1/src/editeur.cc
--- Ri-li-2.0.1.orig/src/editeur.cc	2007-11-02 04:48:17.000000000 -0700
+++ Ri-li-2.0.1/src/editeur.cc	2012-01-22 00:28:59.632635579 -0800
@@ -25,10 +25,10 @@
 #include <windows.h>
 #endif

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include <SDL/SDL.h>

@@ -374,7 +374,7 @@

     // Sauve le niveau
     if(Niveau.Save()==false) {
-      cerr <<"ERREUR Saving levels!"<<endl;
+      std::cerr <<"ERREUR Saving levels!"<<std::endl;
       exit(-1);
     }

diff -r -u Ri-li-2.0.1.orig/src/jeux.cc Ri-li-2.0.1/src/jeux.cc
--- Ri-li-2.0.1.orig/src/jeux.cc	2007-11-02 04:48:17.000000000 -0700
+++ Ri-li-2.0.1/src/jeux.cc	2012-01-22 00:14:08.422798143 -0800
@@ -25,10 +25,10 @@
 #include <windows.h>
 #endif

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include <SDL/SDL.h>

diff -r -u Ri-li-2.0.1.orig/src/loco.cc Ri-li-2.0.1/src/loco.cc
--- Ri-li-2.0.1.orig/src/loco.cc	2007-11-02 04:48:18.000000000 -0700
+++ Ri-li-2.0.1/src/loco.cc	2012-01-22 00:14:17.878797797 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include "preference.h"
 #include "loco.h"
diff -r -u Ri-li-2.0.1.orig/src/main.cc Ri-li-2.0.1/src/main.cc
--- Ri-li-2.0.1.orig/src/main.cc	2007-11-02 04:48:19.000000000 -0700
+++ Ri-li-2.0.1/src/main.cc	2012-01-22 00:29:40.080634136 -0800
@@ -23,8 +23,8 @@

 #include <stdio.h>
 #include <stdlib.h>
-#include <iostream.h>
-#include <string.h>
+#include <iostream>
+#include <string>
 #include <SDL/SDL.h>
 #include <SDL/SDL_mixer.h>

@@ -115,7 +115,7 @@

   // Initilise SDL
   if( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_AUDIO|SDL_INIT_NOPARACHUTE) < 0 ) {
-    cerr <<"Impossible d'initialiser SDL:"<<SDL_GetError()<<endl;
+    std::cerr <<"Impossible d'initialiser SDL:"<<SDL_GetError()<<std::endl;
     exit(-1);
   }
   // Ferme le programme correctement quant quit
@@ -125,7 +125,7 @@
   sdlVideoInfo=(SDL_VideoInfo*)SDL_GetVideoInfo();

   if(sdlVideoInfo->vfmt->BitsPerPixel==8) {
-    cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<endl;
+    std::cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<std::endl;
     exit(-1);
   }

@@ -145,7 +145,7 @@
   sdlVideo=SDL_SetVideoMode(800,600,sdlVideoInfo->vfmt->BitsPerPixel,vOption);

   if(sdlVideo==NULL) {
-    cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<endl;
+    std::cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<std::endl;
     exit(-1);
   }
   // Change le nom de la fenetre
diff -r -u Ri-li-2.0.1.orig/src/menu.cc Ri-li-2.0.1/src/menu.cc
--- Ri-li-2.0.1.orig/src/menu.cc	2007-11-02 04:48:19.000000000 -0700
+++ Ri-li-2.0.1/src/menu.cc	2012-01-22 00:30:04.752633198 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include "preference.h"
 #include "menu.h"
 #include "sprite.h"
@@ -92,7 +92,7 @@
   // Teste la resolution video
   sdlVideoInfo=(SDL_VideoInfo*)SDL_GetVideoInfo();
   if(sdlVideoInfo->vfmt->BitsPerPixel==8) {
-    cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<endl;
+    std::cerr <<"Impossible d'utiliser 8bits pour la vid�o !"<<std::endl;
     exit(-1);
   }

@@ -112,7 +112,7 @@
   if(Pref.FullScreen) vOption|=SDL_FULLSCREEN;
   sdlVideo=SDL_SetVideoMode(800,600,sdlVideoInfo->vfmt->BitsPerPixel,vOption);
   if(sdlVideo==NULL) {
-    cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<endl;
+    std::cerr <<"Impossible de passer dans le mode vid�o 800x600 !"<<std::endl;
     exit(-1);
   }

diff -r -u Ri-li-2.0.1.orig/src/mouse.cc Ri-li-2.0.1/src/mouse.cc
--- Ri-li-2.0.1.orig/src/mouse.cc	2007-11-02 04:48:20.000000000 -0700
+++ Ri-li-2.0.1/src/mouse.cc	2012-01-22 00:14:36.438797120 -0800
@@ -21,7 +21,7 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include "mouse.h"
 #include "preference.h"
diff -r -u Ri-li-2.0.1.orig/src/sprite.cc Ri-li-2.0.1/src/sprite.cc
--- Ri-li-2.0.1.orig/src/sprite.cc	2007-11-02 04:48:20.000000000 -0700
+++ Ri-li-2.0.1/src/sprite.cc	2012-01-22 00:30:43.640631779 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>
 #include <math.h>
 #include "sprite.h"
 #include "preference.h"
@@ -84,7 +84,7 @@
   strcpy(PathFile,Langue[Pref.Langue]);
   GetPath(PathFile);
   if(FileExiste(PathFile)==false) {
-    cerr <<"Impossible de trouver "<<Langue[Pref.Langue]<<endl;
+    std::cerr <<"Impossible de trouver "<<Langue[Pref.Langue]<<std::endl;
     return false;
   }
   L=ChargeFichier(PathFile,Buf);
@@ -128,7 +128,7 @@
   // *** Charge le fichier des langues ***
   // *************************************
   if(FileExiste(PathFile)==false) {
-    cerr <<"Impossible de trouver 'language.dat'"<<endl;
+    std::cerr <<"Impossible de trouver 'language.dat'"<<std::endl;
     return false;
   }
   L=ChargeFichier(PathFile,Buf);
@@ -163,7 +163,7 @@
   strcpy(PathFile,"sprites.dat");
   GetPath(PathFile);
   if(FileExiste(PathFile)==false) {
-    cerr <<"Impossible de trouver 'sprites.dat'"<<endl;
+    std::cerr <<"Impossible de trouver 'sprites.dat'"<<std::endl;
     return false;
   }
   L=ChargeFichier(PathFile,Buf);
@@ -352,7 +352,7 @@
     Image[i]=SDL_CreateRGBSurface((Dim[i].bpp-3)*SDL_SRCALPHA,Dim[i].L,Dim[i].H,Dim[i].bpp*8,
 				  0xff,0xff00,0xff0000,0xff000000*(Dim[i].bpp-3));
     if(Image[i]<=NULL) {
-      cerr <<"Impossible de cr�er une Surface SDL!"<<endl;
+      std::cerr <<"Impossible de cr�er une Surface SDL!"<<std::endl;
       return false;
     }

@@ -486,7 +486,7 @@
   Image[0]=SDL_CreateRGBSurface((Dim[0].bpp-3)*SDL_SRCALPHA,Dim[0].L,Dim[0].H,Dim[0].bpp*8,
 				0xff,0xff00,0xff0000,0xff000000*(Dim[0].bpp-3));
   if(Image[0]<=NULL) {
-    cerr <<"Impossible de cr�er une Surface SDL!"<<endl;
+    std::cerr <<"Impossible de cr�er une Surface SDL!"<<std::endl;
     return false;
   }
   return true;
diff -r -u Ri-li-2.0.1.orig/src/tableau.cc Ri-li-2.0.1/src/tableau.cc
--- Ri-li-2.0.1.orig/src/tableau.cc	2007-11-02 04:48:21.000000000 -0700
+++ Ri-li-2.0.1/src/tableau.cc	2012-01-22 00:14:50.710796598 -0800
@@ -21,7 +21,7 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
 #include "preference.h"
diff -r -u Ri-li-2.0.1.orig/src/utils.cc Ri-li-2.0.1/src/utils.cc
--- Ri-li-2.0.1.orig/src/utils.cc	2007-11-02 04:48:22.000000000 -0700
+++ Ri-li-2.0.1/src/utils.cc	2012-01-22 00:31:30.944630051 -0800
@@ -21,10 +21,10 @@
 //    with this program; if not, write to the Free Software Foundation, Inc.,
 //    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

-#include <iostream.h>
+#include <iostream>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <string>

 #ifdef WINDOWS
 #include <windows.h>
@@ -77,7 +77,7 @@

   file=fopen(Path,"r");
   if(!file) {
-    cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<endl;
+    std::cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<std::endl;
     perror("fopen");
     return -1;
   }
@@ -93,7 +93,7 @@

   Buf=new unsigned char [L+1];
   if(Buf==NULL) {
-    cerr <<"ERREUR: Memoire insuffisante!"<<endl;
+    std::cerr <<"ERREUR: Memoire insuffisante!"<<std::endl;
     fclose(file);
     return -1;
   }
@@ -104,7 +104,7 @@
   while(Compt>1024) {
     AfficheChargeur();
     if( fread(Po,1,1024,file) != 1024 ) {
-      cerr <<"ERREUR de lecture du fichier '"<<Path<<"'"<<endl;
+      std::cerr <<"ERREUR de lecture du fichier '"<<Path<<"'"<<std::endl;
       perror("fread");
       fclose(file);
       delete [] Buf;
@@ -131,13 +131,13 @@

   file=_lopen(Path,OF_READ);
   if(file==-1) {
-    cerr <<"Impossible d'ouvrir "<<Path<<endl;
+    std::cerr <<"Impossible d'ouvrir "<<Path<<std::endl;
     exit(-1);
   }

   long L=(long)_llseek(file,0,SEEK_END);
   if(L==-1) {
-    cerr <<"Impossible de trouver la longueur du fichier"<<endl;
+    std::cerr <<"Impossible de trouver la longueur du fichier"<<std::endl;
     perror("lseek");
     _lclose(file);
     return -1;
@@ -146,7 +146,7 @@

   Buf=new unsigned char [L+1];
   if(Buf==NULL) {
-    cerr <<"ERREUR: Memoire insuffisante!"<<endl;
+    std::cerr <<"ERREUR: Memoire insuffisante!"<<std::endl;
     _lclose(file);
     return -1;
   }
@@ -169,14 +169,14 @@

   file=fopen(Path,"w");
   if(!file) {
-    cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<endl;
+    std::cerr <<"ERREUR: Impossible d'ouvrir '"<<Path<<"'"<<std::endl;
     perror("fopen");
     return false;
   }

   while(L>512) {
     if( fwrite(Buf,1,512,file) != 512 ) {
-      cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<endl;
+      std::cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<std::endl;
       perror("fwrite");
       fclose(file);
       return false;
@@ -187,7 +187,7 @@

   if(L>0) {
     if( fwrite(Buf,1,(size_t)L,file) != (size_t)L ) {
-      cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<endl;
+      std::cerr <<"ERREUR d'ecriture du fichier '"<<Path<<"'"<<std::endl;
       perror("fwrite");
       fclose(file);
       return false;
@@ -208,7 +208,7 @@

   file=_lcreat(Path,0);
   if(!file) {
-    cerr <<"ERREUR: Impossible de cr�er le fichier '"<<Path<<"'"<<endl;
+    std::cerr <<"ERREUR: Impossible de cr�er le fichier '"<<Path<<"'"<<std::endl;
     return false;
   }

@@ -216,7 +216,7 @@
   _lclose(file);

   if(Lec!=L) {
-    cerr <<"Probl�me d'ecriture du fichier '"<<Path<<"' ecris="<<Lec<<" au lieux de ="<<L<<endl;
+    std::cerr <<"Probl�me d'ecriture du fichier '"<<Path<<"' ecris="<<Lec<<" au lieux de ="<<L<<std::endl;
     return false;
   }

@@ -250,7 +250,7 @@
   sprintf(Path,"/usr/share/games/Ri-li/%s",Provi);
   if(FileExiste(Path)) return;

-  cerr <<"Impossible de trouver le fichier '"<<Provi<<endl;
+  std::cerr <<"Impossible de trouver le fichier '"<<Provi<<std::endl;
   exit(-1);
 }
 #endif
@@ -266,7 +266,7 @@
   sprintf(Path,"PROGDIR:%s",Provi);
   if(FileExiste(Path)) return;

-  cerr <<"Impossible de trouver le fichier '"<<Path<<endl;
+  std::cerr <<"Impossible de trouver le fichier '"<<Path<<std::endl;
   exit(-1);
 }
 #endif
@@ -282,7 +282,7 @@
   sprintf(Path,"Ri-li.app/Contents/Resources/%s",Provi);
   if(FileExiste(Path)) return;

-  cerr <<"Impossible de trouver le fichier '"<<Path<<endl;
+  std::cerr <<"Impossible de trouver le fichier '"<<Path<<std::endl;
   exit(-1);
 }
 #endif


code:
This patch adds a header file that is present in the ripperx git and needed
for inclusion, but missing in the distribution tarball.

diff -u -r -N ripperx-2.8.0.orig/src/gtk_cpp_workaround.h ripperx-2.8.0/src/gtk_cpp_workaround.h
--- ripperx-2.8.0.orig/src/gtk_cpp_workaround.h	1970-01-01 01:00:00.000000000 +0100
+++ ripperx-2.8.0/src/gtk_cpp_workaround.h	2015-07-24 21:09:16.548476337 +0200
@@ -0,0 +1,39 @@
+#ifndef gtk_cpp_workaround_h
+#define gtk_cpp_workaround_h
+#ifdef __cplusplus
+//proto is wrong, override here for C++
+namespace
+{
+
+inline void gtk_table_attach (GtkTable *table,
+		       GtkWidget *child,
+		       guint left_attach,
+		       guint right_attach,
+		       guint top_attach,
+		       guint bottom_attach,
+		       //GtkAttachOptions xoptions,
+		       //GtkAttachOptions yoptions,
+		       guint xoptions, guint yoptions,
+		       guint xpadding,
+		       guint ypadding
+		       )
+{
+  gtk_table_attach(table,
+		   child,
+		   left_attach,
+		   right_attach,
+		   top_attach,
+		   bottom_attach,
+		   (GtkAttachOptions)xoptions,
+		   (GtkAttachOptions)yoptions,
+		   xpadding,
+		   ypadding
+		   );
+
+    };
+
+
+}
+
+#endif
+#endif


code:
From b4326f4649ceb146d5cc74f8579b68d8dc8f51e6 Mon Sep 17 00:00:00 2001
From: Justus Winter <teythoon@avior.uberspace.de>
Date: Mon, 27 Jul 2020 14:00:25 +0200
Subject: [PATCH 3/3] Add external version.cmake.

This file is maintained in an external repository.  It is only
included in released versions.  For building snapshots of RNP, a fixed
snapshot of version.cmake is downloaded on demand.  To avoid this,
this patch explicitly provides the file.
---
 cmake/version.cmake | 146 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 146 insertions(+)
 create mode 100644 cmake/version.cmake

diff --git a/cmake/version.cmake b/cmake/version.cmake
new file mode 100644
index 00000000..514027aa
--- /dev/null
+++ b/cmake/version.cmake
@@ -0,0 +1,146 @@
+# Copyright (c) 2018 Ribose Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+# desired length of commit hash
+set(GIT_REV_LEN 7)
+
+# call git, store output in var (can fail)
+macro(_git var)
+  execute_process(
+    COMMAND "${GIT_EXECUTABLE}" ${ARGN}
+    WORKING_DIRECTORY "${source_dir}"
+    RESULT_VARIABLE _git_ec
+    OUTPUT_VARIABLE ${var}
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    ERROR_QUIET
+  )
+endmacro()
+
+# call git, store output in var (can not fail)
+macro(git var)
+  _git(${var} ${ARGN})
+  if (NOT _git_ec EQUAL 0)
+    string(REPLACE ";" " " args "${ARGN}")
+    message(FATAL_ERROR "Failed to execute: git ${args}")
+  endif()
+endmacro()
+
+function(extract_version_info version var_prefix)
+  # extract the main components
+  #   v1.9.0-3-g5b92266+1546836556
+  #   v1.9.0-3-g5b92266-dirty+1546836556
+  string(REGEX MATCH "^v?([0-9]+\\.[0-9]+\\.[0-9]+)(-([0-9]+)-g([0-9a-f]+)(-dirty)?)?(\\+([0-9]+))?$" matches "${version}")
+  if (NOT matches)
+    message(FATAL_ERROR "Failed to extract version components.")
+  endif()
+  set(${var_prefix}_VERSION "${CMAKE_MATCH_1}" PARENT_SCOPE) # 1.9.0
+  if (NOT CMAKE_MATCH_3)
+    set(CMAKE_MATCH_3 "0")
+  endif()
+  set(${var_prefix}_VERSION_NCOMMITS "${CMAKE_MATCH_3}" PARENT_SCOPE) # 3
+  if (NOT CMAKE_MATCH_4)
+    set(CMAKE_MATCH_4 "0")
+  endif()
+  set(${var_prefix}_VERSION_GIT_REV "${CMAKE_MATCH_4}" PARENT_SCOPE) # 5b92266
+  if (CMAKE_MATCH_5 STREQUAL "-dirty")
+    set(${var_prefix}_VERSION_IS_DIRTY TRUE PARENT_SCOPE)
+  else()
+    set(${var_prefix}_VERSION_IS_DIRTY FALSE PARENT_SCOPE)
+  endif()
+  # timestamp is optional, default to 0
+  if (NOT CMAKE_MATCH_7)
+    set(CMAKE_MATCH_7 "0")
+  endif()
+  set(${var_prefix}_VERSION_COMMIT_TIMESTAMP "${CMAKE_MATCH_7}" PARENT_SCOPE) # 1546836556
+endfunction()
+
+function(determine_version source_dir var_prefix)
+  if (EXISTS "${source_dir}/.git")
+    # for GIT_EXECUTABLE
+    find_package(Git REQUIRED)
+    # get a description of the version, something like:
+    #   v1.9.1-0-g38ffe82        (a tagged release)
+    #   v1.9.1-0-g38ffe82-dirty  (a tagged release with local modifications)
+    #   v1.9.0-3-g5b92266        (post-release snapshot)
+    #   v1.9.0-3-g5b92266-dirty  (post-release snapshot with local modifications)
+    _git(version describe --abbrev=${GIT_REV_LEN} --match "v[0-9]*" --long --dirty)
+    if (NOT _git_ec EQUAL 0)
+      # no annotated tags, fake one
+      git(revision rev-parse --short=${GIT_REV_LEN} --verify HEAD)
+      set(version "v0.0.0-0-g${revision}")
+      # check if dirty (this won't detect untracked files, but should be ok)
+      _git(changes diff-index --quiet HEAD --)
+      if (NOT _git_ec EQUAL 0)
+        string(APPEND version "-dirty")
+      endif()
+      # append the commit timestamp of the most recent commit (only
+      # in non-release branches -- typically master)
+      git(commit_timestamp show -s --format=%ct)
+      string(APPEND version "+${commit_timestamp}")
+    endif()
+  else()
+    # same as above, but used for snapshots
+    file(STRINGS "${source_dir}/version.txt" version)
+  endif()
+  set(local_prefix "_determine_ver")
+  extract_version_info("${version}" "${local_prefix}")
+  foreach(suffix VERSION VERSION_NCOMMITS VERSION_GIT_REV VERSION_IS_DIRTY VERSION_COMMIT_TIMESTAMP)
+    if (NOT DEFINED ${local_prefix}_${suffix})
+      message(FATAL_ERROR "Unable to determine version.")
+    endif()
+    set(${var_prefix}_${suffix} "${${local_prefix}_${suffix}}" PARENT_SCOPE)
+    message(STATUS "${var_prefix}_${suffix}: ${${local_prefix}_${suffix}}")
+  endforeach()
+  # Set VERSION_SUFFIX and VERSION_FULL. When making changes, be aware that
+  # this is used in packaging as well and will affect ordering.
+  # | state            | version_full                |
+  # |------------------------------------------------|
+  # | exact tag        | 0.9.0                       |
+  # | exact tag, dirty | 0.9.0+git20180604           |
+  # | after tag        | 0.9.0+git20180604.1.085039f |
+  # | no tag           | 0.0.0+git20180604.2ee02af   |
+  string(TIMESTAMP date "%Y%m%d" UTC)
+  set(version_suffix "")
+  if ((NOT ${local_prefix}_VERSION_NCOMMITS EQUAL 0) OR (${local_prefix}_VERSION STREQUAL "0.0.0"))
+    # 0.9.0+git20150604.4.289818b
+    string(APPEND version_suffix "+git${date}")
+    if (NOT ${local_prefix}_VERSION_NCOMMITS EQUAL 0)
+      string(APPEND version_suffix ".${${local_prefix}_VERSION_NCOMMITS}")
+    endif()
+    string(APPEND version_suffix ".${${local_prefix}_VERSION_GIT_REV}")
+  else()
+    if (${local_prefix}_VERSION_IS_DIRTY)
+      # 0.9.0+git20150604
+      string(APPEND version_suffix "+git${date}")
+    endif()
+  endif()
+  set(version_full "${${local_prefix}_VERSION}${version_suffix}")
+  # set the results
+  set(${var_prefix}_VERSION_SUFFIX "${version_suffix}" PARENT_SCOPE)
+  set(${var_prefix}_VERSION_FULL "${version_full}" PARENT_SCOPE)
+  # for informational purposes
+  message(STATUS "${var_prefix}_VERSION_SUFFIX: ${version_suffix}")
+  message(STATUS "${var_prefix}_VERSION_FULL: ${version_full}")
+endfunction()
+
--
2.20.1


code:
From 40e53d639d86337cf58be3a2b9750b6c97a3c740 Mon Sep 17 00:00:00 2001
From: Justus Winter <teythoon@avior.uberspace.de>
Date: Tue, 21 Jul 2020 16:10:21 +0200
Subject: [PATCH 2/2] Disable ruby-rnp tests.

Prevents cmake from cloning the ruby-rnp repository in order to run its tests.
---
 src/tests/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index d3c4fbe6..e7e1965e 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -125,7 +125,7 @@ gtest_discover_tests(rnp_tests

 # ruby-rnp
 # cruby does not currently play nice with ASaN et al.
-if (NOT ENABLE_SANITIZERS AND BUILD_SHARED_LIBS AND NOT WIN32)
+if (NOT ENABLE_SANITIZERS AND BUILD_SHARED_LIBS AND NOT WIN32 AND IGNORE)
   include(ExternalProject)
   set(_sourcedir "${CMAKE_BINARY_DIR}/ruby-rnp")
   if (DEFINED ENV{RUBY_RNP_INSTALL})
--
2.20.1


code:
From 4b4697c8dd66bd2b1e4d6b831bbde46e27d62c46 Mon Sep 17 00:00:00 2001
From: Justus Winter <teythoon@avior.uberspace.de>
Date: Tue, 21 Jul 2020 16:10:12 +0200
Subject: [PATCH 1/2] Unbundle googletest.

---
 src/tests/CMakeLists.txt          | 2 +-
 src/tests/gtest-CMakeLists.txt.in | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 0a841666..d3c4fbe6 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -53,7 +53,7 @@ endif()
 # maintain compiler/linker settings on Windows
 set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
 # add to our build (provides gtest_main target)
-add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/googletest-src
                  ${CMAKE_CURRENT_BINARY_DIR}/googletest-build
                  EXCLUDE_FROM_ALL)

diff --git a/src/tests/gtest-CMakeLists.txt.in b/src/tests/gtest-CMakeLists.txt.in
index a43e8e5d..3cc0ddd5 100644
--- a/src/tests/gtest-CMakeLists.txt.in
+++ b/src/tests/gtest-CMakeLists.txt.in
@@ -4,9 +4,9 @@ project(googletest-download NONE)

 include(ExternalProject)
 ExternalProject_Add(googletest
-  GIT_REPOSITORY    https://github.com/google/googletest.git
-  GIT_TAG           c43f710
-  SOURCE_DIR        "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
+#  GIT_REPOSITORY    https://github.com/google/googletest.git
+#  GIT_TAG           c43f710
+  SOURCE_DIR        "${CMAKE_CURRENT_SOURCE_DIR}/googletest-src"
   BINARY_DIR        "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
   CONFIGURE_COMMAND ""
   BUILD_COMMAND     ""
--
2.20.1


code:
Fix CVE-2017-8779:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8779

Patch copied from the bug reporter's 3rd-party repository:

https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt

diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
index 5862c26..e11f61b 100644
--- a/src/rpcb_svc_com.c
+++ b/src/rpcb_svc_com.c
@@ -48,6 +48,7 @@
 #include <rpc/rpc.h>
 #include <rpc/rpcb_prot.h>
 #include <rpc/svc_dg.h>
+#include <rpc/rpc_com.h>
 #include <netconfig.h>
 #include <errno.h>
 #include <syslog.h>
@@ -432,7 +433,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp /*__unused*/,
 static bool_t
 xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)
 {
-	return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0));
+	return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), RPC_MAXDATASIZE));
 }

 /*


code:
Unbundle RCT and use our own copy.

--- rtags-2.16/src/CMakeLists.txt	2018-01-23 10:36:17.645855140 +0100
+++ rtags-2.16/src/CMakeLists.txt	2018-01-23 10:38:14.605234740 +0100
@@ -105,12 +105,6 @@ if (LUA_ENABLED)
         CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DCMAKE_GENERATOR=${CMAKE_GENERATOR})
 endif ()

-set(RCT_RTTI_ENABLED 1)
-set(RCT_NO_INSTALL 1)
-set(RCT_NO_LIBRARY 1)
-# Everyting which as been set either in rct/rct.cmake or rct/compiler.cmake
-# doesn't need to be set in this file again.
-include(rct/rct.cmake)

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing=2 -Wcast-qual -fPIC")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-aliasing=2 -Wcast-qual -fPIC")
@@ -128,8 +122,7 @@ add_definitions(
     "-DRTAGS_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
     "-DCLANG_LIBDIR=${LIBCLANG_LIBDIR}"
     "-DCLANG_VERSION=${LIBCLANG_VERSION_STRING}"
-    "-DOS_${CMAKE_SYSTEM_NAME}"
-    ${RCT_DEFINITIONS})
+    "-DOS_${CMAKE_SYSTEM_NAME}")

 if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
     add_definitions(-D__LONG_LONG_SUPPORTED)
@@ -172,8 +165,7 @@ set(RTAGS_SOURCES
     Symbol.cpp
     SymbolInfoJob.cpp
     Token.cpp
-    TokensJob.cpp
-    ${RCT_SOURCES})
+    TokensJob.cpp)

 if (LUA_ENABLED)
     list(APPEND RTAGS_SOURCES AST.cpp)
@@ -195,10 +187,10 @@ endif ()

 include_directories(
     ${CMAKE_CURRENT_LIST_DIR}
-    ${RCT_INCLUDE_DIRS}
     ${CMAKE_CURRENT_LIST_DIR}/selene/include
     ${CMAKE_CURRENT_BINARY_DIR}/lua-prefix/src/lua-build
-    ${CMAKE_CURRENT_LIST_DIR}/lua/src)
+    ${CMAKE_CURRENT_LIST_DIR}/lua/src
+    ${CMAKE_CURRENT_BINARY_DIR}/include)

 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
     set(START_GROUP "")
@@ -223,17 +215,17 @@ else ()
 endif()

 # RCT_LIBRARIES and stdc++ library must be at the end
-set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++ ${RCT_LIBRARIES})
+set(RTAGS_LIBRARIES ${RTAGS_LIBRARIES} -lstdc++)
 add_executable(rc rc.cpp)
-target_link_libraries(rc ${RTAGS_LIBRARIES})
+target_link_libraries(rc ${RTAGS_LIBRARIES} rct)

 add_executable(rdm rdm.cpp)
-target_link_libraries(rdm ${RTAGS_LIBRARIES})
+target_link_libraries(rdm ${RTAGS_LIBRARIES} rct)

 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)

 add_executable(rp rp.cpp)
-target_link_libraries(rp ${RTAGS_LIBRARIES})
+target_link_libraries(rp ${RTAGS_LIBRARIES} rct)

 if (CYGWIN)
     EnsureLibraries(rdm rct)


code:
Fix test failures that occur when nokogiri is using system libxml:

  https://github.com/rgrove/sanitize/issues/198

Taken from upstream:
https://github.com/rgrove/sanitize/commit/21da9b62baf9ea659811d92e6b574130aee57eba

diff --git a/test/test_malicious_html.rb b/test/test_malicious_html.rb
index 2c23074..0756de0 100644
--- a/test/test_malicious_html.rb
+++ b/test/test_malicious_html.rb
@@ -135,6 +135,8 @@
   # The relevant libxml2 code is here:
   # <https://github.com/GNOME/libxml2/commit/960f0e275616cadc29671a218d7fb9b69eb35588>
   describe 'unsafe libxml2 server-side includes in attributes' do
+    using_unpatched_libxml2 = Nokogiri::VersionInfo.instance.libxml2_using_system?
+
     tag_configs = [
       {
         tag_name: 'a',
@@ -166,6 +168,8 @@
         input = %[<#{tag_name} #{attr_name}='examp<!--" onmouseover=alert(1)>-->le.com'>foo</#{tag_name}>]

         it 'should escape unsafe characters in attributes' do
+          skip "behavior should only exist in nokogiri's patched libxml" if using_unpatched_libxml2
+
           # This uses Nokogumbo's HTML-compliant serializer rather than
           # libxml2's.
           @s.fragment(input).
@@ -191,6 +195,8 @@
         input = %[<#{tag_name} #{attr_name}='examp<!--" onmouseover=alert(1)>-->le.com'>foo</#{tag_name}>]

         it 'should not escape characters unnecessarily' do
+          skip "behavior should only exist in nokogiri's patched libxml" if using_unpatched_libxml2
+
           # This uses Nokogumbo's HTML-compliant serializer rather than
           # libxml2's.
           @s.fragment(input).


code:
See https://github.com/thepowersgang/mrustc/archive/v0.8.0.tar.gz

--- rustc-1.19.0-src-orig/src/libcore/intrinsics.rs
+++ rustc-1.19.0-src/src/libcore/intrinsics.rs
@@ -678,5 +678,9 @@
     pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;

+    /// Obtain the length of a slice pointer
+    #[cfg(rust_compiler="mrustc")]
+    pub fn mrustc_slice_len<T>(pointer: *const [T]) -> usize;
+
     /// Gets a static string slice containing the name of a type.
     pub fn type_name<T: ?Sized>() -> &'static str;

--- rustc-1.19.0-src-orig/src/libcore/slice/mod.rs
+++ rustc-1.19.0-src/src/libcore/slice/mod.rs
@@ -413,6 +413,8 @@
     #[inline]
     fn len(&self) -> usize {
-        unsafe {
-            mem::transmute::<&[T], Repr<T>>(self).len
-        }
+        #[cfg(not(rust_compiler="mrustc"))]
+        let rv = unsafe { mem::transmute::<&[T], Repr<T>>(self).len };
+        #[cfg(rust_compiler="mrustc")]
+        let rv = unsafe { ::intrinsics::mrustc_slice_len(self) };
+        rv
     }


code:
GDB responds with some overly detailed lines - which makes the tests fail.
Patch rust to accept those instead.
See <https://github.com/rust-lang/rust/issues/54178>.
diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
--- orig/rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs	2018-09-13 10:24:33.775565159 +0200
+++ rustc-1.25.0-src/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs	2018-09-13 10:25:56.322513658 +0200
@@ -19,36 +19,36 @@

 // gdb-command:print eight_bytes1
 // gdbg-check:$1 = {{RUST$ENUM$DISR = Variant1, __0 = 100}, {RUST$ENUM$DISR = Variant1, __0 = 100}}
-// gdbr-check:$1 = generic_enum_with_different_disr_sizes::Enum::Variant1(100)
+// gdbr-check:$1 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant1(100)

 // gdb-command:print four_bytes1
 // gdbg-check:$2 = {{RUST$ENUM$DISR = Variant1, __0 = 101}, {RUST$ENUM$DISR = Variant1, __0 = 101}}
-// gdbr-check:$2 = generic_enum_with_different_disr_sizes::Enum::Variant1(101)
+// gdbr-check:$2 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant1(101)

 // gdb-command:print two_bytes1
 // gdbg-check:$3 = {{RUST$ENUM$DISR = Variant1, __0 = 102}, {RUST$ENUM$DISR = Variant1, __0 = 102}}
-// gdbr-check:$3 = generic_enum_with_different_disr_sizes::Enum::Variant1(102)
+// gdbr-check:$3 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant1(102)

 // gdb-command:print one_byte1
 // gdbg-check:$4 = {{RUST$ENUM$DISR = Variant1, __0 = 65 'A'}, {RUST$ENUM$DISR = Variant1, __0 = 65 'A'}}
-// gdbr-check:$4 = generic_enum_with_different_disr_sizes::Enum::Variant1(65)
+// gdbr-check:$4 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant1(65)

 // gdb-command:print eight_bytes2
 // gdbg-check:$5 = {{RUST$ENUM$DISR = Variant2, __0 = 100}, {RUST$ENUM$DISR = Variant2, __0 = 100}}
-// gdbr-check:$5 = generic_enum_with_different_disr_sizes::Enum::Variant2(100)
+// gdbr-check:$5 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant2(100)

 // gdb-command:print four_bytes2
 // gdbg-check:$6 = {{RUST$ENUM$DISR = Variant2, __0 = 101}, {RUST$ENUM$DISR = Variant2, __0 = 101}}
-// gdbr-check:$6 = generic_enum_with_different_disr_sizes::Enum::Variant2(101)
+// gdbr-check:$6 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant2(101)

 // gdb-command:print two_bytes2
 // gdbg-check:$7 = {{RUST$ENUM$DISR = Variant2, __0 = 102}, {RUST$ENUM$DISR = Variant2, __0 = 102}}
-// gdbr-check:$7 = generic_enum_with_different_disr_sizes::Enum::Variant2(102)
+// gdbr-check:$7 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant2(102)

 // gdb-command:print one_byte2
 // gdbg-check:$8 = {{RUST$ENUM$DISR = Variant2, __0 = 65 'A'}, {RUST$ENUM$DISR = Variant2, __0 = 65 'A'}}
-// gdbr-check:$8 = generic_enum_with_different_disr_sizes::Enum::Variant2(65)
+// gdbr-check:$8 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant2(65)

 // gdb-command:continue

diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs
--- orig/rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs	2018-09-13 10:24:33.775565159 +0200
+++ rustc-1.25.0-src/src/test/debuginfo/generic-struct-style-enum.rs	2018-09-13 10:27:43.353108111 +0200
@@ -19,15 +19,15 @@

 // gdb-command:print case1
 // gdbg-check:$1 = {{RUST$ENUM$DISR = Case1, a = 0, b = 31868, c = 31868, d = 31868, e = 31868}, {RUST$ENUM$DISR = Case1, [...]}, {RUST$ENUM$DISR = Case1, [...]}}
-// gdbr-check:$1 = generic_struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}
+// gdbr-check:$1 = generic_struct_style_enum::Regular<u16, u32, i64>::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}

 // gdb-command:print case2
 // gdbg-check:$2 = {{RUST$ENUM$DISR = Case2, [...]}, {RUST$ENUM$DISR = Case2, a = 0, b = 286331153, c = 286331153}, {RUST$ENUM$DISR = Case2, [...]}}
-// gdbr-check:$2 = generic_struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153}
+// gdbr-check:$2 = generic_struct_style_enum::Regular<i16, u32, i64>::Case2{a: 0, b: 286331153, c: 286331153}

 // gdb-command:print case3
 // gdbg-check:$3 = {{RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, a = 0, b = 6438275382588823897}}
-// gdbr-check:$3 = generic_struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897}
+// gdbr-check:$3 = generic_struct_style_enum::Regular<u16, i32, u64>::Case3{a: 0, b: 6438275382588823897}

 // gdb-command:print univariant
 // gdbg-check:$4 = {{a = -1}}
diff -ur orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs
--- orig/rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs	2018-09-13 10:24:33.775565159 +0200
+++ rustc-1.25.0-src/src/test/debuginfo/generic-tuple-style-enum.rs	2018-09-13 10:28:26.328546298 +0200
@@ -21,15 +21,15 @@

 // gdb-command:print case1
 // gdbg-check:$1 = {{RUST$ENUM$DISR = Case1, __0 = 0, __1 = 31868, __2 = 31868, __3 = 31868, __4 = 31868}, {RUST$ENUM$DISR = Case1, [...]}, {RUST$ENUM$DISR = Case1, [...]}}
-// gdbr-check:$1 = generic_tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868)
+// gdbr-check:$1 = generic_tuple_style_enum::Regular<u16, u32, u64>::Case1(0, 31868, 31868, 31868, 31868)

 // gdb-command:print case2
 // gdbg-check:$2 = {{RUST$ENUM$DISR = Case2, [...]}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 286331153, __2 = 286331153}, {RUST$ENUM$DISR = Case2, [...]}}
-// gdbr-check:$2 = generic_tuple_style_enum::Regular::Case2(0, 286331153, 286331153)
+// gdbr-check:$2 = generic_tuple_style_enum::Regular<i16, i32, i64>::Case2(0, 286331153, 286331153)

 // gdb-command:print case3
 // gdbg-check:$3 = {{RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, [...]}, {RUST$ENUM$DISR = Case3, __0 = 0, __1 = 6438275382588823897}}
-// gdbr-check:$3 = generic_tuple_style_enum::Regular::Case3(0, 6438275382588823897)
+// gdbr-check:$3 = generic_tuple_style_enum::Regular<i16, i32, i64>::Case3(0, 6438275382588823897)

 // gdb-command:print univariant
 // gdbg-check:$4 = {{__0 = -1}}
--- orig/rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs	2018-09-13 10:24:33.783565071 +0200
+++ rustc-1.25.0-src/src/test/debuginfo/nil-enum.rs	2018-10-26 18:19:20.404564587 +0200
@@ -17,11 +17,11 @@

 // gdb-command:print first
 // gdbg-check:$1 = {<No data fields>}
-// gdbr-check:$1 = <error reading variable>
+// gdbr-check:$1 = nil_enum::ANilEnum

 // gdb-command:print second
 // gdbg-check:$2 = {<No data fields>}
-// gdbr-check:$2 = <error reading variable>
+// gdbr-check:$2 = nil_enum::AnotherNilEnum

 #![allow(unused_variables)]
 #![feature(omit_gdb_pretty_printer_section)]


code:
Tweak some gdb tests which were broken during LLVM upgrades.
This has been subsequently fixed upstream in later rustc versions,
but still needed to bootstrap some earlier versions of the compiler.

diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs
--- rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs	2019-02-04 12:49:34.055483896 -0800
+++ rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs	2019-02-04 13:01:10.915950356 -0800
@@ -18,15 +18,15 @@

 // gdb-command:print *the_a_ref
 // gdbg-check:$1 = TheA
-// gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA
+// gdbr-check:$1 = borrowed_c_style_enum::TheA

 // gdb-command:print *the_b_ref
 // gdbg-check:$2 = TheB
-// gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB
+// gdbr-check:$2 = borrowed_c_style_enum::TheB

 // gdb-command:print *the_c_ref
 // gdbg-check:$3 = TheC
-// gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC
+// gdbr-check:$3 = borrowed_c_style_enum::TheC

 // === LLDB TESTS ==================================================================================
diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs
--- rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs	2019-02-04 12:49:34.051483727 -0800
+++ rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs	2019-02-04 13:02:00.981997525 -0800
@@ -19,31 +19,31 @@

 // gdb-command:print tuple_interior_padding
 // gdbg-check:$1 = {__0 = 0, __1 = OneHundred}
-// gdbr-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred)
+// gdbr-check:$1 = (0, c_style_enum_in_composite::OneHundred)

 // gdb-command:print tuple_padding_at_end
 // gdbg-check:$2 = {__0 = {__0 = 1, __1 = OneThousand}, __1 = 2}
-// gdbr-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2)
+// gdbr-check:$2 = ((1, c_style_enum_in_composite::OneThousand), 2)

 // gdb-command:print tuple_different_enums
 // gdbg-check:$3 = {__0 = OneThousand, __1 = MountainView, __2 = OneMillion, __3 = Vienna}
-// gdbr-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna)
+// gdbr-check:$3 = (c_style_enum_in_composite::OneThousand, c_style_enum_in_composite::MountainView, c_style_enum_in_composite::OneMillion, c_style_enum_in_composite::Vienna)

 // gdb-command:print padded_struct
 // gdbg-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
-// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5}
+// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::OneMillion, c: 4, d: c_style_enum_in_composite::Toronto, e: 5}

 // gdb-command:print packed_struct
 // gdbg-check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8}
-// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8}
+// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::OneHundred, c: 7, d: c_style_enum_in_composite::Vienna, e: 8}

 // gdb-command:print non_padded_struct
 // gdbg-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
-// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto}
+// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::OneMillion, b: c_style_enum_in_composite::MountainView, c: c_style_enum_in_composite::OneThousand, d: c_style_enum_in_composite::Toronto}

 // gdb-command:print struct_with_drop
 // gdbg-check:$7 = {__0 = {a = OneHundred, b = Vienna}, __1 = 9}
-// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9)
+// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::OneHundred, b: c_style_enum_in_composite::Vienna}, 9)

 // === LLDB TESTS ==================================================================================

diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
--- rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs	2019-02-04 12:49:34.043483393 -0800
+++ rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs	2019-02-04 13:02:17.954691634 -0800
@@ -27,15 +27,15 @@

 // gdb-command: print c_style_enum1
 // gdbg-check:$3 = CStyleEnumVar1
-// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar1
+// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar1

 // gdb-command: print c_style_enum2
 // gdbg-check:$4 = CStyleEnumVar2
-// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar2
+// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar2

 // gdb-command: print c_style_enum3
 // gdbg-check:$5 = CStyleEnumVar3
-// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar3
+// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar3

 #![allow(dead_code, unused_variables)]


code:
Patch will be included upstream in 1.47: https://github.com/rust-lang/rust/pull/74416
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
index e64aafa599f..12575ac4358 100644
--- a/src/librustc_codegen_ssa/back/linker.rs
+++ b/src/librustc_codegen_ssa/back/linker.rs
@@ -28,7 +28,7 @@ use rustc_target::spec::{LinkOutputKind, LinkerFlavor, LldFlavor};
 pub fn disable_localization(linker: &mut Command) {
     // No harm in setting both env vars simultaneously.
     // Unix-style linkers.
-    linker.env("LC_ALL", "C");
+    linker.env("LC_ALL", "en_US.UTF-8");
     // MSVC's `link.exe`.
     linker.env("VSLANG", "1033");
 }


code:
https://github.com/rust-lang/rust/pull/74416
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs
index 3df956c465e..f45fee45be4 100644
--- a/compiler/rustc_codegen_ssa/src/back/linker.rs
+++ b/compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -28,7 +28,7 @@
 pub fn disable_localization(linker: &mut Command) {
     // No harm in setting both env vars simultaneously.
     // Unix-style linkers.
-    linker.env("LC_ALL", "C");
+    linker.env("LC_ALL", "en_US.UTF-8");
     // MSVC's `link.exe`.
     linker.env("VSLANG", "1033");
 }


code:
Bootstrap tests failed with local stage0 cargo and rustc
Backported changes from https://github.com/rust-lang/rust/pull/51977

From 0834d9d771e912f51deca6c25699e44734624546 Mon Sep 17 00:00:00 2001
From: Nikolai Merinov <nikolai.merinov@member.fsf.org>
Date: Mon, 2 Jul 2018 01:45:35 +0500
Subject: [PATCH] bootstrap: tests should use rustc from config.toml

Tests should always use "rustc" and "cargo" from config.toml instead
of assuming that stage0 binaries was downloaded to build directory.
---
 src/bootstrap/bootstrap.py | 2 ++
 src/bootstrap/config.rs    | 6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 487440becf..1701f7b83a 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -788,6 +788,8 @@ def bootstrap(help_triggered):
     env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
     env["BOOTSTRAP_PYTHON"] = sys.executable
     env["BUILD_DIR"] = build.build_dir
+    env["CARGO"] = build.cargo()
+    env["RUSTC"] = build.rustc()
     run(args, env=env, verbose=build.verbose)

diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 6dd6291be2..d1a0deb583 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -23,7 +23,6 @@ use std::cmp;

 use num_cpus;
 use toml;
-use util::exe;
 use cache::{INTERNER, Interned};
 use flags::Flags;
 pub use flags::Subcommand;
@@ -362,9 +361,8 @@ impl Config {
         config.src = Config::path_from_python("SRC");
         config.out = Config::path_from_python("BUILD_DIR");

-        let stage0_root = config.out.join(&config.build).join("stage0/bin");
-        config.initial_rustc = stage0_root.join(exe("rustc", &config.build));
-        config.initial_cargo = stage0_root.join(exe("cargo", &config.build));
+        config.initial_rustc = Config::path_from_python("RUSTC");
+        config.initial_cargo = Config::path_from_python("CARGO");

         config
     }
--
2.17.1


code:
Doctest coresimd::x86::__m256 failed on processors withouth "avx" feature.
Backported patch with changes from https://github.com/rust-lang-nursery/stdsimd/issues/481

--- rustc-1.26.2-src-orig/src/stdsimd/coresimd/x86/mod.rs	1970-01-01 05:00:00.000000000 +0500
+++ rustc-1.26.2-src/src/stdsimd/coresimd/x86/mod.rs	2018-06-22 00:01:55.142026720 +0500
@@ -293,13 +293,13 @@
     /// use std::arch::x86_64::*;
     ///
     /// # fn main() {
-    /// # #[target_feature(enable = "sse")]
+    /// # #[target_feature(enable = "avx")]
     /// # unsafe fn foo() {
     /// let eight_zeros = _mm256_setzero_ps();
     /// let eight_ones = _mm256_set1_ps(1.0);
     /// let eight_floats = _mm256_set_ps(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0);
     /// # }
-    /// # if is_x86_feature_detected!("sse") { unsafe { foo() } }
+    /// # if is_x86_feature_detected!("avx") { unsafe { foo() } }
     /// # }
     /// ```
     pub struct __m256(f32, f32, f32, f32, f32, f32, f32, f32);


code:
 Cargo.toml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 1f3e1b6..36bc816 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,11 +43,6 @@
 version = "0.3.2"
 optional = true

-[dependencies.blas-src]
-version = "0.2.0"
-optional = true
-default-features = false
-
 [dependencies.cblas-sys]
 version = "0.1.4"
 optional = true
@@ -91,7 +86,7 @@
 default-features = false

 [features]
-blas = ["cblas-sys", "blas-src"]
+blas = ["cblas-sys"]
 docs = ["approx", "serde", "rayon"]
 serde-1 = ["serde"]
 test = ["test-blas-openblas-sys"]


code:
From ed09f3c91e915c3b436854a7936566edceb3e8de Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Tue, 15 Dec 2020 10:09:45 +0200
Subject: [PATCH] remove blas-src dependency

---
 Cargo.toml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 1f3e1b6..36bc816 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,10 +37,6 @@ debug = true
 name = "ndarray"
 test = true
 bench = false
-[dependencies.blas-src]
-version = "0.2.0"
-optional = true
-default-features = false

 [dependencies.cblas-sys]
 version = "0.1.4"
@@ -78,7 +74,7 @@ default-features = false
 version = "0.1"

 [features]
-blas = ["cblas-sys", "blas-src"]
+blas = ["cblas-sys"]
 docs = ["rustc-serialize", "serde-1"]
 serde-1 = ["serde"]
 test = ["test-blas-openblas-sys"]
--
2.29.2


code:
Subject: nettle: clear out "vendored" feature cruft from build.rs
From: Daniel Kahn Gillmor's avatarDaniel Kahn Gillmor <dkg@fifthhorseman.net>

https://salsa.debian.org/rust-team/debcargo-conf/-/commit/b608e6beaa1d38c14fc16ad53780d94954a91900
https://sources.debian.org/src/rust-nettle/7.0.0-1/debian/patches/disable-vendor.diff/
--- a/Cargo.toml	1969-12-31 19:00:00.000000000 -0500
+++ b/Cargo.toml	2019-10-23 19:12:01.076181971 -0400
@@ -35,4 +35,4 @@
 version = "1"

 [features]
-vendored = ["nettle-sys/vendored"]
+vendored = []


code:
Subject: nettle-sys: clear out "vendored" feature cruft from build.rs
From: Daniel Kahn Gillmor's avatarDaniel Kahn Gillmor <dkg@fifthhorseman.net>

https://salsa.debian.org/rust-team/debcargo-conf/-/commit/0c71150ad26bb66a8396dcdab055181af232ddc5
https://sources.debian.org/src/rust-nettle-sys/2.0.4-3/debian/patches/disable-vendor.diff/
--- a/Cargo.toml	2019-10-23 13:08:07.000000000 -0400
+++ b/Cargo.toml	2019-10-23 14:08:46.644064014 -0400
@@ -29,12 +29,9 @@
 version = "0.51.1"
 default-features = false

-[build-dependencies.nettle-src]
-version = "3.5.1-0"
-optional = true
-
 [build-dependencies.pkg-config]
 version = "0.3"

 [features]
 vendored = ["nettle-src"]
+nettle-src = []
diff --git a/build.rs b/build.rs
index 44f7af3..ede4b2f 100644
--- a/build.rs
+++ b/build.rs
@@ -1,7 +1,5 @@
 extern crate bindgen;
 extern crate pkg_config;
-#[cfg(feature = "vendored")]
-extern crate nettle_src;

 use std::env;
 use std::fs;
@@ -36,14 +34,6 @@ fn main() {
     println!("cargo:rerun-if-env-changed=NETTLE_STATIC");
     println!("cargo:rerun-if-env-changed={}", NETTLE_PREGENERATED_BINDINGS);

-    #[cfg(feature = "vendored")]
-    {
-        let artifacts = nettle_src::Build::new().build();
-        println!("cargo:vendored=1");
-        env::set_var("PKG_CONFIG_PATH",
-                     artifacts.lib_dir().join("pkgconfig"));
-    }
-
     let nettle = pkg_config::probe_library("nettle hogweed").unwrap();

     let mode = match env::var_os("NETTLE_STATIC") {


code:
https://sources.debian.org/data/main/r/rust-openssl-sys/0.9.53-1/debian/patches/disable-vendor.patch
"MIT" licensed according to debian/copyright file
slightly modified to only change the vendored openssl-src dependency

--- a/Cargo.toml
+++ b/Cargo.toml
@@ -31,14 +31,11 @@
 [build-dependencies.cc]
 version = "1.0"

-[build-dependencies.openssl-src]
-version = "111.0.1"
-optional = true
-
 [build-dependencies.pkg-config]
 version = "0.3.9"

 [features]
 vendored = ["openssl-src"]
+openssl-src = []
 [target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
 version = "0.2"


code:
From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001
From: Tim Ryan <id@timryan.org>
Date: Mon, 14 May 2018 06:22:21 -0400
Subject: [PATCH] Support reproducible builds by forcing window.search to use
 stable key ordering. (#692)
See <https://github.com/rust-lang-nursery/mdBook/pull/692>
---
 src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
index d49772f8b..1ee66a511 100644
--- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
+++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs
@@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result<String> {
         searchoptions,
         index,
     };
+
+    // By converting to serde_json::Value as an intermediary, we use a
+    // BTreeMap internally and can force a stable ordering of map keys.
+    let json_contents = serde_json::to_value(&json_contents)?;
     let json_contents = serde_json::to_string(&json_contents)?;

     Ok(format!("window.search = {};", json_contents))


code:
From 454ccd986b61799908a6898a55d0480911f15306 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow@samba.org>
Date: Mon, 21 Sep 2020 07:48:43 +0200
Subject: [PATCH] s3: fix fcntl waf configure check

RN: Fix fcntl waf configure check
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14503

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep 21 07:26:54 UTC 2020 on sn-devel-184
---
 source3/wscript | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/source3/wscript b/source3/wscript
index 840ed430c0f..d3ef346eecd 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1244,7 +1244,7 @@ err:

 int main(void)
 {
-        uint64_t *hint, get_hint;
+        uint64_t hint, get_hint;
         int fd;

         fd = open(DATA, O_RDONLY | O_CREAT | O_EXCL);
@@ -1252,8 +1252,8 @@ int main(void)
             goto err;
         }

-        *hint = RWH_WRITE_LIFE_SHORT;
-        int ret = fcntl(fd, F_SET_RW_HINT, hint);
+        hint = RWH_WRITE_LIFE_SHORT;
+        int ret = fcntl(fd, F_SET_RW_HINT, &hint);
         if (ret == -1) {
             goto err;
         }
@@ -1267,8 +1267,8 @@ int main(void)
             goto err;
         }

-        *hint = RWH_WRITE_LIFE_EXTREME;
-        ret = fcntl(fd, F_SET_FILE_RW_HINT, hint);
+        hint = RWH_WRITE_LIFE_EXTREME;
+        ret = fcntl(fd, F_SET_FILE_RW_HINT, &hint);
         if (ret == -1) {
             goto err;
         }
--
2.28.0


code:
Don't refer to x86-specific function on other architectures to avoid linker error.

Submitted upstream at <https://marc.info/?l=linux-bluetooth&m=160857625608440&w=2>

diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c
--- a/sbc/sbc_primitives.c
+++ b/sbc/sbc_primitives.c
@@ -593,7 +593,9 @@ static int sbc_calc_scalefactors_j(

 static void sbc_init_primitives_x86(struct sbc_encoder_state *state)
 {
+#if defined(__x86_64__) || defined(__i386__)
 	__builtin_cpu_init();
+#endif

 #ifdef SBC_BUILD_WITH_MMX_SUPPORT
 	if (__builtin_cpu_supports("mmx"))


code:
commit 9920bf86604b536c735b6478488a3cb89413e000
Author: Guillaume Le Vaillant <glv@posteo.net>
Date:   Tue Dec 1 09:38:41 2020 +0100

    Fix some type declarations

    This allows compiling with SBCL 2.0.11 which is less tolerant with wrong type
    declarations.

diff --git a/som/src/lvq_pak.lisp b/som/src/lvq_pak.lisp
index 1a062cc..4006ed6 100644
--- a/som/src/lvq_pak.lisp
+++ b/som/src/lvq_pak.lisp
@@ -53,7 +53,7 @@
      (current :accessor entries-current :initarg :current :initform 0
               :documentation "index of current data-entry inside data-entries")
      (entries :accessor entries-entries :initarg :entries :initform nil
-              :type #-ccl cons #+ccl list
+              :type #-ccl (or null cons) #+ccl list
               :documentation "list of data-entries")
      (num-loaded :accessor entries-num-loaded :initarg :num-loaded :initform nil
                  :documentation "number of lines loaded in entries list")
diff --git a/statistics/src/rand/rand.lisp b/statistics/src/rand/rand.lisp
index 3cd806a..c8f9952 100644
--- a/statistics/src/rand/rand.lisp
+++ b/statistics/src/rand/rand.lisp
@@ -154,7 +154,7 @@
        (xn (make-array (1+ n) :element-type 'double-float)))
   (declare (type double-float r v d)
            (type fixnum k n n-minus-1)
-           (type (vector double-float *) xn))
+           (type (simple-array double-float (*)) xn))
   ;; build xn
   (setf (aref xn n) (* v (exp (/ (* r r) 2))))
   (setf (aref xn (1- n)) r)
@@ -233,8 +233,8 @@
          (base (expt 2 (- +bit-operation-m+ k 1))))
     (declare (type double-float r v d)
              (type fixnum k n n-minus-1 base)
-             (type (vector double-float *) wn fn)
-             (type (vector fixnum *) kn))
+             (type (simple-array double-float (*)) wn fn)
+             (type (simple-array fixnum (*)) kn))
     ;; build arrays
     (setf (aref wn (- n 1)) (/ (* v (exp (/ (* r r) 2))) base))
     (setf (aref wn (- n 2)) (/ r base))
@@ -347,8 +347,8 @@
          (base (expt 2 (- +bit-operation-m+ k))))
     (declare (type double-float r v d)
              (type fixnum k n n-minus-1 base)
-             (type (vector double-float *) wn fn)
-             (type (vector fixnum *) kn))
+             (type (simple-array double-float (*)) wn fn)
+             (type (simple-array fixnum (*)) kn))
     ;; build arrays
     (setf (aref wn (- n 1)) (/ (* v (exp (/ (* r r) 2))) base))
     (setf (aref wn (- n 2)) (/ r base))
@@ -546,8 +546,8 @@
          (base (expt 2 (- +bit-operation-m+ k 1))))
     (declare (type double-float r v tr1 tr2)
              (type fixnum k n n-minus-1 base)
-             (type (vector double-float *) wn fn)
-             (type (vector fixnum *) kn))
+             (type (simple-array double-float (*)) wn fn)
+             (type (simple-array fixnum (*)) kn))
     ;; build arrays
     (setf (aref wn (- n 1)) (/ (* v (+ 1 (* r r))) base))
     (setf (aref wn (- n 2)) (/ r base))
@@ -663,8 +663,8 @@
        (base (expt 2 (- +bit-operation-m+ k))))
   (declare (type double-float r v)
            (type fixnum k n n-minus-1 base)
-           (type (vector double-float *) wn fn)
-           (type (vector fixnum *) kn))
+           (type (simple-array double-float (*)) wn fn)
+           (type (simple-array fixnum (*)) kn))
   ;; build arrays
   (setf (aref wn (- n 1)) (/ (* v (exp r)) base))
   (setf (aref wn (- n 2)) (/ r base))
@@ -804,8 +804,8 @@
          (base (expt 2 (- +bit-operation-m+ k 1))))
     (declare (type double-float r v)
              (type fixnum k n n-minus-1 base)
-             (type (vector double-float *) wn fn)
-             (type (vector fixnum *) kn))
+             (type (simple-array double-float (*)) wn fn)
+             (type (simple-array fixnum (*)) kn))
     ;; build arrays
     (setf (aref wn (- n 1)) (/ (* v (exp r)) base))
     (setf (aref wn (- n 2)) (/ r base))
@@ -2083,8 +2083,8 @@
        (base (expt 2 (- +bit-operation-m+ k 1))))
   (declare (type double-float r v tr)
            (type fixnum k n n-minus-1 base)
-           (type (vector double-float *) wn fn)
-           (type (vector fixnum *) kn))
+           (type (simple-array double-float (*)) wn fn)
+           (type (simple-array fixnum (*)) kn))
   ;; build arrays
   (setf (aref wn (- n 1)) (/ (* (expt (+ 1d0 tr) 2) v) tr base))
   (setf (aref wn (- n 2)) (/ r base))
@@ -2383,7 +2383,7 @@
                ans)))
     (declare (type double-float s a d)
              (type vector tix)
-             (type (vector fixnum *) si))
+             (type (simple-array fixnum (*)) si))
     (values tix si)))

 (defun binomial-table-lookup (tix si)
@@ -2415,7 +2415,7 @@
          (b (expt 2 k)))
     (declare (type double-float s a)
              (type fixnum nsq k b)
-             (type (vector double-float *) pbins))
+             (type (simple-array double-float (*)) pbins))
     ;; build pbins
     (setf (aref pbins 0) (int-power (- 1d0 probability) size))
     (loop for i from 1 to size do
@@ -2438,7 +2438,7 @@
                                do (incf j tx)) :initial-element -1 :element-type 'fixnum))
           (thetan 0d0))
       (declare (type double-float w thetan)
-               (type (vector fixnum *) table))
+               (type (simple-array fixnum (*)) table))
       (loop with j = 0
             for x from 0
             for pbin across pbins
@@ -2454,8 +2454,8 @@
             (vi (make-array nsq :element-type 'double-float
                             :initial-contents (loop for i from 0 to size collect (dfloat (/ (+ i 1) nsq)))))
             (c (dfloat (/ nsq))))
-        (declare (type (vector fixnum *) ki)
-                 (type (vector double-float *) vi)
+        (declare (type (simple-array fixnum (*)) ki)
+                 (type (simple-array double-float (*)) vi)
                  (type double-float c))
         (loop repeat size do
               (let ((maxp 0)
@@ -2658,7 +2658,7 @@
           (thetan 0d0)
           (sum 0d0))
       (declare (type double-float w thetan sum)
-               (type (vector fixnum *) table))
+               (type (simple-array fixnum (*)) table))
       (loop with j = 0
           for x from 0
           for pgeo across pgeos
@@ -2675,8 +2675,8 @@
             (vi (make-array nsq :element-type 'double-float
                             :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq)))))
             (c (dfloat (/ nsq))))
-        (declare (type (vector fixnum *) ki)
-                 (type (vector double-float *) vi)
+        (declare (type (simple-array fixnum (*)) ki)
+                 (type (simple-array double-float (*)) vi)
                  (type double-float c))
         (loop repeat (1- nsq) do
               (let ((maxp 0)
@@ -2911,7 +2911,7 @@
            (sum 0d0))
       (declare (type double-float w thetan sum pl pu)
                (type fixnum nsq d)
-               (type (vector fixnum *) table))
+               (type (simple-array fixnum (*)) table))
       (unless (= xl 0)
         (setf pps (subseq pps xl)))
       (loop with j = 0
@@ -2930,8 +2930,8 @@
             (vi (make-array nsq :element-type 'double-float
                             :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq)))))
             (c (dfloat (/ nsq))))
-        (declare (type (vector fixnum *) ki)
-                 (type (vector double-float *) vi)
+        (declare (type (simple-array fixnum (*)) ki)
+                 (type (simple-array double-float (*)) vi)
                  (type double-float c))
         (loop repeat (1- nsq) do
               (let ((maxp 0)
@@ -3174,7 +3174,7 @@
          (k 7)
          (b (expt 2 k)))
     (declare (type fixnum a1 a2 nsq k b)
-             (type (vector double-float *) phs))
+             (type (simple-array double-float (*)) phs))
     ;; build phs
     (setf (aref phs 0)
       (/ (dfloat (the fixnum (* (combination successes a1) (combination (- elements successes) (- samples a1)))))
@@ -3200,7 +3200,7 @@
           (table (make-array b :initial-element -1 :element-type 'fixnum))
           (thetan 0d0))
       (declare (type double-float w thetan)
-               (type (vector fixnum *) table))
+               (type (simple-array fixnum (*)) table))
       (loop with j = 0
           for x from a1
           for i from 0
@@ -3217,8 +3217,8 @@
             (vi (make-array nsq :element-type 'double-float
                             :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq)))))
             (c (dfloat (/ nsq))))
-        (declare (type (vector fixnum *) ki)
-                 (type (vector double-float *) vi)
+        (declare (type (simple-array fixnum (*)) ki)
+                 (type (simple-array double-float (*)) vi)
                  (type double-float c))
         (loop repeat (1- nsq) do
               (let ((maxp 0)
@@ -3442,7 +3442,7 @@
            (sum 0d0))
       (declare (type double-float w thetan sum pl pu)
                (type fixnum nsq d)
-               (type (vector fixnum *) table))
+               (type (simple-array fixnum (*)) table))
       (unless (= xl 0)
         (setf pnbs (subseq pnbs xl)))
       (loop with j = 0
@@ -3461,8 +3461,8 @@
             (vi (make-array nsq :element-type 'double-float
                             :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq)))))
             (c (dfloat (/ nsq))))
-        (declare (type (vector fixnum *) ki)
-                 (type (vector double-float *) vi)
+        (declare (type (simple-array fixnum (*)) ki)
+                 (type (simple-array double-float (*)) vi)
                  (type double-float c))
         (loop repeat (1- nsq) do
               (let ((maxp 0)
diff --git a/time-series/src/ts-read-data.lisp b/time-series/src/ts-read-data.lisp
index 09ad933..a692514 100644
--- a/time-series/src/ts-read-data.lisp
+++ b/time-series/src/ts-read-data.lisp
@@ -5,7 +5,7 @@
   ((frequency :initarg :frequency
               :accessor ts-freq
               :initform nil
-              :type number)
+              :type (or null number))
    (start :initarg :start :accessor ts-start :initform nil)
    (end :initarg :end :accessor ts-end :initform nil)
    (ts-type :initarg :ts-type :accessor ts-type :initform nil)
diff --git a/time-series/src/ts-state-space-model.lisp b/time-series/src/ts-state-space-model.lisp
index 4dbf56a..ad9e5cc 100644
--- a/time-series/src/ts-state-space-model.lisp
+++ b/time-series/src/ts-state-space-model.lisp
@@ -348,8 +348,8 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (eval-when (:execute :compile-toplevel :load-toplevel)
  (defclass trend-model (gaussian-stsp-model)
-   ((diff-k :initarg :diff-k :initform nil :type integer :accessor diff-k)
-    (tau^2 :initarg :tau^2 :initform nil :type number :accessor tau^2)
+   ((diff-k :initarg :diff-k :initform nil :type (or null integer) :accessor diff-k)
+    (tau^2 :initarg :tau^2 :initform nil :type (or null number) :accessor tau^2)
     (aic :initarg :aic :initform +nan+ :type number))
    (:documentation "- parent: gaussian-stsp-model
 - accessors:
@@ -492,9 +492,9 @@
 ; seasonal model ;
 ;;;;;;;;;;;;;;;;;;
 (defclass seasonal-model (gaussian-stsp-model)
-  ((s-deg  :initarg :s-deg :initform nil :type fixnum :accessor s-deg)
-   (s-freq  :initarg :s-freq :initform nil :type fixnum :accessor s-freq)
-   (tau^2 :initarg :tau^2 :initform nil :type number :accessor tau^2))
+  ((s-deg  :initarg :s-deg :initform nil :type (or null fixnum) :accessor s-deg)
+   (s-freq  :initarg :s-freq :initform nil :type (or null fixnum) :accessor s-freq)
+   (tau^2 :initarg :tau^2 :initform nil :type (or null number) :accessor tau^2))
   (:documentation "- parent: gaussian-stsp-model
 - accessors
   - s-deg  : Degree for seasonal model
@@ -593,8 +593,8 @@
 ; seasonal-adjustment-model ;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (defclass seasonal-adjustment-model (gaussian-stsp-model)
-  ((trend :initarg :trend :initform nil :type trend-model :accessor trend-model)
-   (seasonal :initarg :seasonal :initform nil :type seasonal-model :accessor seasonal-model))
+  ((trend :initarg :trend :initform nil :type (or null trend-model) :accessor trend-model)
+   (seasonal :initarg :seasonal :initform nil :type (or null seasonal-model) :accessor seasonal-model))
   (:documentation "Standard seasonal adjustment model ( Trend + Seasonal )
 - parent: gaussian-stsp-model
 - accessors


code:
From f11c3f094ed5ca727ec819983425b6641db8227c Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Wed, 13 Feb 2019 09:32:11 -0600
Subject: [PATCH] BLACS: Remove use of long-deprecated MPI1 functions.

* BLACS/SRC/blacs_get_.c: 'MPI_Attr_get' -> 'MPI_Comm_get_attr'.
* BLACS/SRC/cgamn2d_.c, BLACS/SRC/cgamx2d_.c, BLACS/SRC/dgamn2d_.c,
BLACS/SRC/dgamx2d_.c, BLACS/SRC/igamn2d_.c, BLACS/SRC/igamx2d_.c,
BLACS/SRC/sgamn2d_.c, BLACS/SRC/sgamx2d_.c, BLACS/SRC/zgamn2d_.c,
BLACS/SRC/zgamx2d_.c: 'MPI_Type_struct' -> 'MPI_Type_create_struct'.
---
 BLACS/SRC/blacs_get_.c | 2 +-
 BLACS/SRC/cgamn2d_.c   | 2 +-
 BLACS/SRC/cgamx2d_.c   | 2 +-
 BLACS/SRC/dgamn2d_.c   | 2 +-
 BLACS/SRC/dgamx2d_.c   | 2 +-
 BLACS/SRC/igamn2d_.c   | 2 +-
 BLACS/SRC/igamx2d_.c   | 2 +-
 BLACS/SRC/sgamn2d_.c   | 2 +-
 BLACS/SRC/sgamx2d_.c   | 2 +-
 BLACS/SRC/zgamn2d_.c   | 2 +-
 BLACS/SRC/zgamx2d_.c   | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/BLACS/SRC/blacs_get_.c b/BLACS/SRC/blacs_get_.c
index e979767..d4b04cf 100644
--- a/BLACS/SRC/blacs_get_.c
+++ b/BLACS/SRC/blacs_get_.c
@@ -23,7 +23,7 @@ F_VOID_FUNC blacs_get_(int *ConTxt, int *what, int *val)
    case SGET_MSGIDS:
       if (BI_COMM_WORLD == NULL) Cblacs_pinfo(val, &val[1]);
       iptr = &val[1];
-      ierr=MPI_Attr_get(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val);
+      ierr=MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, (BVOID **) &iptr,val);
       val[0] = 0;
       val[1] = *iptr;
       break;
diff --git a/BLACS/SRC/cgamn2d_.c b/BLACS/SRC/cgamn2d_.c
index 2db6ccb..6958f32 100644
--- a/BLACS/SRC/cgamn2d_.c
+++ b/BLACS/SRC/cgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC cgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/cgamx2d_.c b/BLACS/SRC/cgamx2d_.c
index 707c0b6..f802d01 100644
--- a/BLACS/SRC/cgamx2d_.c
+++ b/BLACS/SRC/cgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC cgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/dgamn2d_.c b/BLACS/SRC/dgamn2d_.c
index dff23b4..a2627ac 100644
--- a/BLACS/SRC/dgamn2d_.c
+++ b/BLACS/SRC/dgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC dgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/dgamx2d_.c b/BLACS/SRC/dgamx2d_.c
index a51f731..2a644d0 100644
--- a/BLACS/SRC/dgamx2d_.c
+++ b/BLACS/SRC/dgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC dgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/igamn2d_.c b/BLACS/SRC/igamn2d_.c
index 16bc003..f6a7859 100644
--- a/BLACS/SRC/igamn2d_.c
+++ b/BLACS/SRC/igamn2d_.c
@@ -218,7 +218,7 @@ F_VOID_FUNC igamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/igamx2d_.c b/BLACS/SRC/igamx2d_.c
index 8165cbe..a7cfcc6 100644
--- a/BLACS/SRC/igamx2d_.c
+++ b/BLACS/SRC/igamx2d_.c
@@ -218,7 +218,7 @@ F_VOID_FUNC igamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/sgamn2d_.c b/BLACS/SRC/sgamn2d_.c
index d6c95e5..569c797 100644
--- a/BLACS/SRC/sgamn2d_.c
+++ b/BLACS/SRC/sgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC sgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/sgamx2d_.c b/BLACS/SRC/sgamx2d_.c
index 4b0af6f..8897ece 100644
--- a/BLACS/SRC/sgamx2d_.c
+++ b/BLACS/SRC/sgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC sgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/zgamn2d_.c b/BLACS/SRC/zgamn2d_.c
index 9de2b23..37897df 100644
--- a/BLACS/SRC/zgamn2d_.c
+++ b/BLACS/SRC/zgamn2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC zgamn2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
diff --git a/BLACS/SRC/zgamx2d_.c b/BLACS/SRC/zgamx2d_.c
index 414c381..0e9d474 100644
--- a/BLACS/SRC/zgamx2d_.c
+++ b/BLACS/SRC/zgamx2d_.c
@@ -221,7 +221,7 @@ F_VOID_FUNC zgamx2d_(int *ConTxt, F_CHAR scope, F_CHAR top, int *m, int *n,
       {
 #endif
       i = 2;
-      ierr=MPI_Type_struct(i, len, disp, dtypes, &MyType);
+      ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
       ierr=MPI_Type_commit(&MyType);
       bp->N = bp2->N = 1;
       bp->dtype = bp2->dtype = MyType;
--
2.20.1


code:
The test case below relies on /etc/groups and similar info that is
not available in chroot builds, so skip it.

--- scheme48-1.9/scheme/posix/check.scm	2013-05-11 21:55:36.000000000 +0200
+++ scheme48-1.9/scheme/posix/check.scm	2013-05-11 21:55:40.000000000 +0200
@@ -229,29 +229,7 @@

 ; This assumes that we are not running as root and that / is owned by root.

-(define-test-case users&groups posix-core-tests
-  (let ((my-info (get-file-info directory-name))
-	(root-info (get-file-info "/")))
-    (let ((my-user (user-id->user-info (file-info-owner my-info)))
-	  (root-user (user-id->user-info (file-info-owner root-info)))
-	  (my-group (group-id->group-info (file-info-group my-info)))
-	  (root-group (group-id->group-info (file-info-group root-info))))
-      (let ((my-other-user (name->user-info (user-info-name my-user)))
-	    (my-other-group (name->group-info (group-info-name my-group))))
-	(check-that (file-info-owner my-info)
-		    (is user-id=? (user-info-id my-user)))
-	(check-that (file-info-owner root-info)
-		    (opposite (is user-id=? (user-info-id my-user))))
-	(check-that (file-info-group my-info)
-		    (is group-id=? (group-info-id my-group)))
-	;; doesn't work reliably
-	;; (specifically, if the user is member of wheel)
-	;; (check (not (group-id=? (file-info-group root-info)
-	;;		(group-info-id my-group))))
-	(check-that (os-string->string (user-info-name root-user))
-		    (member-of '("root"
-				 "bin" ; AIX
-				 )))))))
+

 (define-test-case environment posix-core-tests
   (let ((env (reverse (environment-alist))))


code:
Fixes make with -j, otherwise scotch.h may not be generated by the time make
tries to compile library_graph_diam.o et al.

Reported upstream at
https://gforge.inria.fr/tracker/index.php?func=detail&aid=21651&group_id=248&atid=1081

diff --git a/src/libscotch/Makefile b/src/libscotch/Makefile
index 9898894..b0ee14c 100644
--- a/src/libscotch/Makefile
+++ b/src/libscotch/Makefile
@@ -2229,6 +2229,28 @@ library_graph_color_f$(OBJ)	:	library_graph_color_f.c			\
 					common.h				\
 					scotch.h

+library_graph_diam$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					graph.h					\
+					scotch.h
+
+library_graph_diam_f$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					scotch.h
+
+library_graph_induce$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					graph.h					\
+					scotch.h
+
+library_graph_induce_f$(OBJ)	:	library_graph_diam.c			\
+					module.h				\
+					common.h				\
+					scotch.h
+
 library_graph_io_chac$(OBJ)	:	library_graph_io_chac.c			\
 					module.h				\
 					common.h				\


code:
diff --git a/src/libscotch/library.h b/src/libscotch/library.h
index 1891c19..ecc0533 100644
--- a/src/libscotch/library.h
+++ b/src/libscotch/library.h
@@ -67,6 +67,8 @@

 /*+ Integer type. +*/

+#include <stdint.h>
+
 typedef DUMMYIDX SCOTCH_Idx;

 typedef DUMMYINT SCOTCH_Num;
diff --git a/src/libscotchmetis/library_metis.h b/src/libscotchmetis/library_metis.h
index e6767e1..04e71c3 100644
--- a/src/libscotchmetis/library_metis.h
+++ b/src/libscotchmetis/library_metis.h
@@ -99,6 +99,7 @@ typedef enum {
 */

 #ifndef SCOTCH_H                                  /* In case "scotch.h" not included before */
+#include <stdint.h>
 typedef DUMMYINT SCOTCH_Num;
 #endif /* SCOTCH_H */

diff --git a/src/libscotchmetis/library_parmetis.h b/src/libscotchmetis/library_parmetis.h
index 6d2f0b0..3c803fc 100644
--- a/src/libscotchmetis/library_parmetis.h
+++ b/src/libscotchmetis/library_parmetis.h
@@ -106,6 +106,7 @@ typedef enum {
 */

 #ifndef SCOTCH_H                                  /* In case "scotch.h" not included before */
+#include <stdint.h>
 typedef DUMMYINT SCOTCH_Num;
 #endif /* SCOTCH_H */