--- vif     2010-12-20 16:39:46.000000000 +0000
+++ vif_modified 2010-11-19 23:24:37.000000000 +0000
@@ -213,6 +213,7 @@

         # xs-xen.pq.hq:91e986b8e49f netback-wait-for-hotplug
         xenstore-write "/local/domain/0/backend/vif/${DOMID}/${DEVID}/hotplug-status" "connected"
+       python /etc/xensource/scripts/vif_rules.py ${DOMID} online 2>&1 > /dev/null
     fi
     ;;

@@ -224,9 +225,11 @@

 remove)
     if [ "${TYPE}" = "vif" ] ;then
+       python /etc/xensource/scripts/vif_rules.py ${DOMID} offline 2>&1 > /dev/null
         xenstore-rm "${HOTPLUG}/hotplug"
     fi
     logger -t scripts-vif "${dev} has been removed"
     remove_from_bridge
     ;;
 esac
+

Remove the unnecessary insertion of whitespace. This happens to be enough to match this patch apply on recent versions of XenServer / Xen Cloud Platform.

--- vif     2010-12-20 16:39:46.000000000 +0000
+++ vif_modified 2010-11-19 23:24:37.000000000 +0000
@@ -213,6 +213,7 @@

         # xs-xen.pq.hq:91e986b8e49f netback-wait-for-hotplug
         xenstore-write "/local/domain/0/backend/vif/${DOMID}/${DEVID}/hotplug-status" "connected"
+       python /etc/xensource/scripts/vif_rules.py ${DOMID} online 2>&1 > /dev/null
     fi
     ;;

@@ -224,6 +225,7 @@

 remove)
     if [ "${TYPE}" = "vif" ] ;then
+       python /etc/xensource/scripts/vif_rules.py ${DOMID} offline 2>&1 > /dev/null
         xenstore-rm "${HOTPLUG}/hotplug"
     fi
     logger -t scripts-vif "${dev} has been removed"


779a780,781
>         # Hacky solution for adding timing out QEPCAD.
>         qex._expect.timeout = timeout

Fix the QEPCAD timeout patch

700c700
<                  memcells=None, server=None):
---
>                  memcells=None, server=None, timeout=None):
779a780,781
>         # Hacky solution for adding timing out QEPCAD.
>         qex._expect.timeout = timeout


diff --git a/tools/nasm-filter.sh b/tools/nasm-filter.sh
index 5ec9ba3..d5a10c0 100755
--- a/tools/nasm-filter.sh
+++ b/tools/nasm-filter.sh
@@ -1,6 +1,6 @@
 #/bin/sh

-# Filter out unnecessary options added by automake
+# Filter out unnecessary options added by automake and incompatible flags added by the conda build system.

 while [ -n "$*" ]; do
     case "$1" in
@@ -20,10 +20,13 @@ while [ -n "$*" ]; do
 	    options="$options $1"
 	    shift
 	    ;;
-	-I* | -i* )
-	    options="$options $1/"
-	    shift
-	    ;;
+	-isystem )  #-isystem *
+		shift
+		shift
+		;;
+	-f*'='* ) # Long debug prefixes
+		shift
+		;;
 	-D* ) # For defines we need to remove spaces
 	    case "$1" in
 		*' '* ) ;;

Fix oversight in patch. Original file kept as much as possible

diff --git a/tools/nasm-filter.sh b/tools/nasm-filter.sh
index 5ec9ba3..3588d0f 100755
--- a/tools/nasm-filter.sh
+++ b/tools/nasm-filter.sh
@@ -1,6 +1,6 @@
 #/bin/sh

-# Filter out unnecessary options added by automake
+# Filter out unnecessary options added by automake and incompatible flags added by the conda build system.

 while [ -n "$*" ]; do
     case "$1" in
@@ -20,10 +20,17 @@ while [ -n "$*" ]; do
 	    options="$options $1"
 	    shift
 	    ;;
+	-isystem )  #-isystem *
+		shift
+		shift
+		;;
 	-I* | -i* )
 	    options="$options $1/"
 	    shift
 	    ;;
+  	-f*'='* ) # Long debug prefixes
+		shift
+		;;
 	-D* ) # For defines we need to remove spaces
 	    case "$1" in
 		*' '* ) ;;


--- ../src-base/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
+++ ../src-work/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
@@ -3,6 +3,8 @@
 import java.util.Iterator;
 import java.util.Set;
 import java.util.logging.Logger;
+
+import cpw.mods.fml.server.FMLServerHandler;
 import net.minecraft.server.MinecraftServer;

 public class ConsoleCommandHandler
@@ -397,7 +399,7 @@
                                 var6.func_2_b("Ban list:" + this.func_40648_a(this.field_22116_b.func_40025_r(), ", "));
                             }
                         }
-                        else
+                        else if (!FMLServerHandler.instance().handleServerCommand(var2, var6.func_1_c(), var6))
                         {
                             field_22117_a.info("Unknown console command. Type \"help\" for help.");
                         }

Tweak Console handler patch so we're more friendly to forge

--- ../src-base/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
+++ ../src-work/minecraft_server/net/minecraft/src/ConsoleCommandHandler.java	0000-00-00 00:00:00.000000000 -0000
@@ -3,6 +3,8 @@
 import java.util.Iterator;
 import java.util.Set;
 import java.util.logging.Logger;
+
+import cpw.mods.fml.server.FMLServerHandler;
 import net.minecraft.server.MinecraftServer;

 public class ConsoleCommandHandler
@@ -397,6 +399,10 @@
                                 var6.func_2_b("Ban list:" + this.func_40648_a(this.field_22116_b.func_40025_r(), ", "));
                             }
                         }
+                        else if (FMLServerHandler.instance().handleServerCommand(var2, var6.func_1_c(), var6))
+                        {
+
+                        }
                         else
                         {
                             field_22117_a.info("Unknown console command. Type \"help\" for help.");


Index: tools/clang/lib/Sema/SemaLookup.cpp
===================================================================
--- tools/clang/lib/Sema/SemaLookup.cpp	(revision 47284)
+++ tools/clang/lib/Sema/SemaLookup.cpp	(working copy)
@@ -1207,8 +1207,14 @@
       }
   } else {
     // Perform C++ unqualified name lookup.
-    if (CppLookupName(R, S))
+    if (CppLookupName(R, S)) {
+      if (R.isSingleResult())
+        if (const TagDecl *TD = dyn_cast<TagDecl>(R.getFoundDecl())) {
+          if (!TD->isThisDeclarationADefinition() && ExternalSource)
+            ExternalSource->LookupUnqualified(R, S);
+        }
       return true;
+    }
   }

   // If we didn't find a use of this identifier, and if the identifier

Update the patch corresponding to the latest change in the vendor drop.

Index: tools/clang/lib/Sema/SemaLookup.cpp
===================================================================
--- tools/clang/lib/Sema/SemaLookup.cpp	(revision 47284)
+++ tools/clang/lib/Sema/SemaLookup.cpp	(working copy)
@@ -1207,8 +1207,14 @@
       }
   } else {
     // Perform C++ unqualified name lookup.
-    if (CppLookupName(R, S))
+    if (CppLookupName(R, S)) {
+      if (R.isSingleResult())
+        if (const TagDecl *TD = dyn_cast<TagDecl>(R.getFoundDecl())) {
+          if (!TD->getDefinition() && ExternalSource)
+            ExternalSource->LookupUnqualified(R, S);
+        }
       return true;
+    }
   }

   // If we didn't find a use of this identifier, and if the identifier


Fix coreutils 5.0 builds with automake 1.8.

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

--- coreutils-5.0/configure.ac~configure
+++ coreutils-5.0/configure.ac
@@ -15,6 +15,7 @@
 AC_PROG_GCC_TRADITIONAL
 AC_PROG_RANLIB
 AC_PROG_LN_S
+AC_PROG_YACC
 AC_AIX
 AC_MINIX

@@ -28,6 +29,8 @@
 	OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS hostid\$(EXEEXT)"
 	MAN="$MAN hostid.1")

+AC_FUNC_ALLOCA
+
 jm_MACROS

 AC_HEADER_TIOCGWINSZ()
--- coreutils-5.0/configure.ac	2004-01-23 14:49:55.000000000 -0500
+++ coreutils-5.0/configure.ac	2004-01-23 14:41:46.000000000 -0500
@@ -147,7 +147,7 @@
   fi
 fi

-AC_DEFUN(jm_DUMMY_1,
+AC_DEFUN([jm_DUMMY_1],
 [
   AC_REQUIRE([jm_PREREQ_READUTMP])
   if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
--- coreutils-5.0/m4/nanosleep.m4	2001-09-17 17:44:03.000000000 -0400
+++ coreutils-5.0/m4/nanosleep.m4	2004-01-23 14:47:18.000000000 -0500
@@ -12,6 +12,9 @@
  # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
  AC_SEARCH_LIBS(nanosleep, [rt posix4], [LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+ if test "$ac_cv_search_nanosleep" = "none required"; then
+  LIB_NANOSLEEP=
+ fi
  AC_SUBST(LIB_NANOSLEEP)

  AC_CACHE_CHECK([whether nanosleep works],


--- ../src_base/common/net/minecraft/src/BlockMushroom.java
+++ ../src_work/common/net/minecraft/src/BlockMushroom.java
@@ -1,6 +1,8 @@
 package net.minecraft.src;

 import java.util.Random;
+
+import net.minecraftforge.common.ForgeDirection;

 public class BlockMushroom extends BlockFlower
 {
@@ -94,7 +96,7 @@
         if (par3 >= 0 && par3 < 256)
         {
             int var5 = par1World.getBlockId(par2, par3 - 1, par4);
-            return var5 == Block.mycelium.blockID || par1World.getFullBlockLightValue(par2, par3, par4) < 13 && this.canThisPlantGrowOnThisBlockID(var5);
+            return var5 == Block.mycelium.blockID || par1World.getFullBlockLightValue(par2, par3, par4) < 13 && canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this);
         }
         else
         {

Fix issue where mushrooms would not check the proper soil block.

--- ../src_base/common/net/minecraft/src/BlockMushroom.java
+++ ../src_work/common/net/minecraft/src/BlockMushroom.java
@@ -1,6 +1,8 @@
 package net.minecraft.src;

 import java.util.Random;
+
+import net.minecraftforge.common.ForgeDirection;

 public class BlockMushroom extends BlockFlower
 {
@@ -94,7 +96,9 @@
         if (par3 >= 0 && par3 < 256)
         {
             int var5 = par1World.getBlockId(par2, par3 - 1, par4);
-            return var5 == Block.mycelium.blockID || par1World.getFullBlockLightValue(par2, par3, par4) < 13 && this.canThisPlantGrowOnThisBlockID(var5);
+            Block soil = Block.blocksList[var5];
+            return (var5 == Block.mycelium.blockID || par1World.getFullBlockLightValue(par2, par3, par4) < 13) &&
+                   (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this));
         }
         else
         {


--- opFns.js.orig	2016-09-27 10:00:02.000000000 +0100
+++ opFns.js	2016-09-27 10:00:59.000000000 +0100
@@ -6,6 +6,7 @@
 const logTable = require('./logTable.js')
 const ERROR = constants.ERROR
 const MAX_INT = 9007199254740991
+const fs = require('fs');

 // the opcode functions
 module.exports = {
@@ -507,6 +508,12 @@

     // add data
     log.push(mem)
+    //Added to allow tracking of instrumentation even for .call() and throw
+    let toWrite = {};
+    toWrite.address= log[0].toString('hex');
+    toWrite.topics = log[1].map(function(x){return x.toString('hex')})
+    toWrite.data = log[2].toString('hex');
+    fs.appendFileSync('./allFiredEvents', JSON.stringify(toWrite) + '\n')
     runState.logs.push(log)
   },

Remove gas cost for LOG opcode

--- opFns.js.orig	2016-07-04 17:29:54.000000000 +0100
+++ opFns.js	2016-09-30 12:30:33.000000000 +0100
@@ -6,6 +6,7 @@
 const logTable = require('./logTable.js')
 const ERROR = constants.ERROR
 const MAX_INT = 9007199254740991
+const fs = require('fs');

 // the opcode functions
 module.exports = {
@@ -499,7 +500,6 @@
     memLength = utils.bufferToInt(memLength)
     const numOfTopics = runState.opCode - 0xa0
     const mem = memLoad(runState, memOffset, memLength)
-    subGas(runState, new BN(numOfTopics * fees.logTopicGas.v + memLength * fees.logDataGas.v))

     // add address
     var log = [runState.address]
@@ -507,6 +507,12 @@

     // add data
     log.push(mem)
+    //Added to allow tracking of instrumentation even for .call() and throw
+    let toWrite = {};
+    toWrite.address= log[0].toString('hex');
+    toWrite.topics = log[1].map(function(x){return x.toString('hex')})
+    toWrite.data = log[2].toString('hex');
+    fs.appendFileSync('./allFiredEvents', JSON.stringify(toWrite) + '\n')
     runState.logs.push(log)
   },


Index: test/Makefile
===================================================================
--- test/Makefile	(revision 159991)
+++ test/Makefile	(working copy)
@@ -62,8 +62,17 @@
 	$(MAKE) -C $(PROJ_OBJ_DIR)/../tools/clang/test lit.site.cfg Unit/lit.site.cfg
 extra-site-cfgs:: clang-site-cfg
 endif
+
+ifeq ($(NOCLING)$(shell test -f $(PROJ_OBJ_DIR)/../tools/cling/Makefile && echo OK), OK)
+LIT_ALL_TESTSUITES += $(PROJ_OBJ_DIR)/../tools/cling/test
+
+# Force creation of Cling's lit.site.cfg.
+cling-lit-site-cfg: FORCE
+	$(MAKE) -C $(PROJ_OBJ_DIR)/../tools/cling/test lit.site.cfg
+extra-lit-site-cfgs:: cling-lit-site-cfg
 endif
 endif
+endif

 # ulimits like these are redundantly enforced by the buildbots, so
 # just removing them here won't work.

Update our patch in llvm test system.

Index: test/Makefile
===================================================================
--- test/Makefile	(revision 161655)
+++ test/Makefile	(working copy)
@@ -63,6 +63,15 @@
 extra-site-cfgs:: clang-site-cfg
 endif

+ifeq ($(NOCLING)$(shell test -f $(PROJ_OBJ_DIR)/../tools/cling/Makefile && echo OK), OK)
+LIT_ALL_TESTSUITES += $(PROJ_OBJ_DIR)/../tools/cling/test
+
+# Force creation of Cling's lit.site.cfg.
+cling-lit-site-cfg: FORCE
+	$(MAKE) -C $(PROJ_OBJ_DIR)/../tools/cling/test lit.site.cfg
+extra-lit-site-cfgs:: cling-lit-site-cfg
+endif
+
 ifeq ($(shell test -f $(PROJ_OBJ_DIR)/../tools/clang/tools/extra/Makefile && echo OK), OK)
 LIT_ALL_TESTSUITES += $(PROJ_OBJ_DIR)/../tools/clang/tools/extra/test


diff --git a/services/core/java/com/android/server/ServiceWatcher.java b/services/core/java/com/android/server/ServiceWatcher.java
index 383e25a..31ae918 100644
--- a/services/core/java/com/android/server/ServiceWatcher.java
+++ b/services/core/java/com/android/server/ServiceWatcher.java
@@ -92,8 +92,7 @@ public class ServiceWatcher implements ServiceConnection {
             String pkg = initialPackageNames.get(i);
             try {
                 HashSet<Signature> set = new HashSet<Signature>();
-                Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.MATCH_SYSTEM_ONLY
-                        | PackageManager.GET_SIGNATURES).signatures;
+                Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.GET_SIGNATURES).signatures;
                 set.addAll(Arrays.asList(sigs));
                 sigSets.add(set);
             } catch (NameNotFoundException e) {

Add description and license to patch file

Remove PackageManager.MATCH_SYSTEM_ONLY flag in ServiceWatcher
Patch for Android 7 "Nougat"

SPDX-FileCopyrightText: 2016, microg Project Team
SPDX-License-Identifier: CC0-1.0

diff --git a/services/core/java/com/android/server/ServiceWatcher.java b/services/core/java/com/android/server/ServiceWatcher.java
index 383e25a..31ae918 100644
--- a/services/core/java/com/android/server/ServiceWatcher.java
+++ b/services/core/java/com/android/server/ServiceWatcher.java
@@ -92,8 +92,7 @@ public class ServiceWatcher implements ServiceConnection {
             String pkg = initialPackageNames.get(i);
             try {
                 HashSet<Signature> set = new HashSet<Signature>();
-                Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.MATCH_SYSTEM_ONLY
-                        | PackageManager.GET_SIGNATURES).signatures;
+                Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.GET_SIGNATURES).signatures;
                 set.addAll(Arrays.asList(sigs));
                 sigSets.add(set);
             } catch (NameNotFoundException e) {


diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py
index 8d201ab..05960aa 100644
--- a/tests/comparators/test_rlib.py
+++ b/tests/comparators/test_rlib.py
@@ -81,9 +81,6 @@ def rlib_dis_expected_diff():
     if actual_ver >= "7.0":
         diff_file = "rlib_llvm_dis_expected_diff_7"

-    if actual_ver >= "10.0":
-        diff_file = "rlib_llvm_dis_expected_diff_10"
-
     return get_data(diff_file)

Fix the OpenPGP test which broke with pgpdump 0.34

diff --git a/tests/comparators/test_rlib.py b/tests/comparators/test_rlib.py
index 8d201ab..05960aa 100644
--- a/tests/comparators/test_rlib.py
+++ b/tests/comparators/test_rlib.py
@@ -81,9 +81,6 @@ def rlib_dis_expected_diff():
     if actual_ver >= "7.0":
         diff_file = "rlib_llvm_dis_expected_diff_7"

-    if actual_ver >= "10.0":
-        diff_file = "rlib_llvm_dis_expected_diff_10"
-
     return get_data(diff_file)

diff --git a/tests/data/pgp_signed_expected_diff b/tests/data/pgp_signed_expected_diff
index 7e90e428..9628efa0 100644
--- a/tests/data/pgp_signed_expected_diff
+++ b/tests/data/pgp_signed_expected_diff
@@ -5,11 +5,11 @@
  	Key ID - 0x1E953E27D4311E58
  	Next packet - other than one pass signature
  Old: Literal Data Packet(tag 11)(10255 bytes)
- 	Format - binary
+ 	Packet data format - binary
 -	Filename - test1.tar
--	File modified time - Tue Aug 25 11:47:35 UTC 2020
+-	Creation time - Tue Aug 25 11:47:35 UTC 2020
 +	Filename - test2.tar
-+	File modified time - Tue Aug 25 11:47:38 UTC 2020
++	Creation time - Tue Aug 25 11:47:38 UTC 2020
  	Literal - ...
  Old: Signature Packet(tag 2)(563 bytes)
  	Ver 4 - new


--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
@@ -161,7 +161,7 @@

             if (flag4 ^ flag5)
             {
-                flag1 = !flag4;
+                flag1 = flag5 && flag3; //Forge: Bug fix: Attempt to fill all downward space before expanding width
             }
             else
             {

Fix texture stitcher not using all avalible spaces.

--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
@@ -161,7 +161,7 @@

             if (flag4 ^ flag5)
             {
-                flag1 = !flag4;
+                flag1 = flag4; //Forge: Bug fix: Fixed inverted logic. flag1 = addNewColumn, flag4 = expandWidth
             }
             else
             {
@@ -183,7 +183,7 @@

         j = Math.max(p_94311_1_.func_94197_a(), p_94311_1_.func_94199_b());

-        if (MathHelper.func_151236_b((flag1 ? this.field_94315_d : this.field_94318_c) + j) > (flag1 ? this.field_94313_f : this.field_94316_e))
+        if (MathHelper.func_151236_b((!flag1 ? this.field_94315_d : this.field_94318_c) + j) > (!flag1 ? this.field_94313_f : this.field_94316_e)) //Forge: Width and height were swapped.
         {
             return false;
         }


--- voms-2_0_9-orig/configure.ac	2012-10-27 13:50:06.000000000 +0200
+++ voms-2_0_9/configure.ac	2013-02-06 11:41:23.765972707 +0100
@@ -105,7 +105,7 @@
 AC_SUBST(with_vomsuser)
 AC_PARSER_GEN

-AM_CONFIG_HEADER([src/autogen/config.h])
+AC_CONFIG_HEADER([src/autogen/config.h])

 if test "x$build_cpp_api" = "xyes" -o "x$build_interfaces" = "xyes"; then
 # both C and CPP

Update the AM_CONFIG_HEADER patch to use the correct name of the substitute macro

--- voms-2_0_9-orig/configure.ac	2012-10-27 13:50:06.000000000 +0200
+++ voms-2_0_9/configure.ac	2013-02-06 11:41:23.765972707 +0100
@@ -105,7 +105,7 @@
 AC_SUBST(with_vomsuser)
 AC_PARSER_GEN

-AM_CONFIG_HEADER([src/autogen/config.h])
+AC_CONFIG_HEADERS([src/autogen/config.h])

 if test "x$build_cpp_api" = "xyes" -o "x$build_interfaces" = "xyes"; then
 # both C and CPP


9c9
<     <Production>0</Production>           <!-- 1-running in production mode, 0-development mode (enable debugging framework) -->
---
>     <Production>1</Production>           <!-- 1-running in production mode, 0-development mode (enable debugging framework) -->
16d15
<     <Ports>8080-8090</Ports>                         <!-- List of ports that we can listen on (when running multiple MiServers -->
40c39
<     <TrapErrors>0</TrapErrors>    <!-- Valid: 0=Crash, 1=Trap and Log errors -->
---
>     <TrapErrors>1</TrapErrors>    <!-- Valid: 0=Crash, 1=Trap and Log errors -->
45c44
<     <UseHTTP>1</UseHTTP>          <!-- Valid: 0=use DrA generated HTML, 1=report HTTP 500 status -->
---
>     <UseHTTP>0</UseHTTP>          <!-- Valid: 0=use DrA generated HTML, 1=report HTTP 500 status -->

Update to exit on error

9c9
<     <Production>0</Production>           <!-- 1-running in production mode, 0-development mode (enable debugging framework) -->
---
>     <Production>1</Production>           <!-- 1-running in production mode, 0-development mode (enable debugging framework) -->
12c12
<     <CloseOnCrash>0</CloseOnCrash>       <!-- Set to 1 to force []OFF on an unhandled server error -->
---
>     <CloseOnCrash>1</CloseOnCrash>       <!-- Set to 1 to force []OFF on an unhandled server error -->
17d16
<     <Ports>8080-8090</Ports>                         <!-- List of ports that we can listen on (when running multiple MiServers -->
41c40
<     <TrapErrors>0</TrapErrors>    <!-- Valid: 0=Crash, 1=Trap and Log errors -->
---
>     <TrapErrors>1</TrapErrors>    <!-- Valid: 0=Crash, 1=Trap and Log errors -->
46c45
<     <UseHTTP>1</UseHTTP>          <!-- Valid: 0=use DrA generated HTML, 1=report HTTP 500 status -->
---
>     <UseHTTP>0</UseHTTP>          <!-- Valid: 0=use DrA generated HTML, 1=report HTTP 500 status -->


--- configure.ac.orig	2012-10-23 04:13:47.000000000 +0200
+++ configure.ac	2012-11-15 14:46:19.000000000 +0100
@@ -97,9 +97,10 @@
 AX_PTHREAD()

 LIBS="$PTHREAD_LIBS $LIBS"
-CFLAGS="$PTHREAD_CFLAGS $CFLAGS -fvisibility=hidden"
-CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
 CC="$PTHREAD_CC"
+AS_IF([ `$(CC) -dumpversion | cut -f1 -d.` -ge 4 ],
+      [CFLAGS="$PTHREAD_CFLAGS $CFLAGS -fvisibility=hidden" CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"],
+      [CFLAGS="$PTHREAD_CFLAGS $CFLAGS" CXXFLAGS="$CXXFLAGS"])

 AS_ECHO
 AS_ECHO "Checking for boost libraries:"

Update fix-visibility patch for libtorrent

--- configure.ac.orig	2012-10-23 04:13:47.000000000 +0200
+++ configure.ac	2012-11-21 07:55:14.000000000 +0100
@@ -97,10 +97,24 @@
 AX_PTHREAD()

 LIBS="$PTHREAD_LIBS $LIBS"
-CFLAGS="$PTHREAD_CFLAGS $CFLAGS -fvisibility=hidden"
-CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
 CC="$PTHREAD_CC"

+AS_ECHO "Checking for visibility support:"
+AC_CACHE_CHECK([for __attribute__((visibility("hidden")))],
+    ac_cv_hidden_visibility_attribute, [
+    echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1; }' > visibility_conftest.c
+    ac_cv_hidden_visibility_attribute=no
+    if AC_TRY_COMMAND(${CC-cc} -fvisibility=hidden -S visibility_conftest.c -o visibility_conftest.s 1>&AS_MESSAGE_LOG_FD);
+    then
+        AS_ECHO "found"
+        ac_cv_hidden_visibility_attribute=yes
+        CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+        CFLAGS="$CFLAGS -fvisibility=hidden"
+    fi
+    rm -f visibility_conftest.*
+])
+
 AS_ECHO
 AS_ECHO "Checking for boost libraries:"


--- lua/src/luaconf.h.orig	2016-03-16 15:53:05.433295367 +0100
+++ lua/src/luaconf.h	2016-03-16 15:53:21.497295811 +0100
@@ -654,7 +654,8 @@
 ** macro must include header 'locale.h'.)
 */
 #if !defined(lua_getlocaledecpoint)
-#define lua_getlocaledecpoint()		(localeconv()->decimal_point[0])
+//#define lua_getlocaledecpoint()		(localeconv()->decimal_point[0])
+#define lua_getlocaledecpoint()		'.'
 #endif

 /* }================================================================== */

Revert "Contribs: lua, simpler way to disable localeconv"

--- lua/src/llex.c.orig	2016-03-16 12:21:12.567664718 +0100
+++ lua/src/llex.c	2016-03-16 12:21:39.361675706 +0100
@@ -226,7 +226,7 @@
 */
 static void trydecpoint (LexState *ls, TValue *o) {
   char old = ls->decpoint;
-  ls->decpoint = lua_getlocaledecpoint();
+  //ls->decpoint = lua_getlocaledecpoint();
   buffreplace(ls, old, ls->decpoint);  /* try new decimal separator */
   if (luaO_str2num(luaZ_buffer(ls->buff), o) == 0) {
     /* format error with correct decimal point: no more options */


diff --git a/media/muxers/webm_muxer.cc b/media/muxers/webm_muxer.cc
index 0633baf60..c134f77ef 100644
--- a/media/muxers/webm_muxer.cc
+++ b/media/muxers/webm_muxer.cc
@@ -234,8 +234,6 @@ void WebmMuxer::AddVideoTrack(const gfx::Size& frame_size, double frame_rate) {
   DCHECK_EQ(0ull, video_track->crop_bottom());
   DCHECK_EQ(0.0f, video_track->frame_rate());

-  video_track->set_default_duration(base::Time::kNanosecondsPerSecond /
-                                    frame_rate);
   // Segment's timestamps should be in milliseconds, DCHECK it. See
   // http://www.webmproject.org/docs/container/#muxer-guidelines
   DCHECK_EQ(1000000ull, segment_.GetSegmentInfo()->timecode_scale());

Upgrade webm muxer patch to Chrome 54

diff --git a/media/muxers/webm_muxer.cc b/media/muxers/webm_muxer.cc
index 0024268..53d8348 100644
--- a/media/muxers/webm_muxer.cc
+++ b/media/muxers/webm_muxer.cc
@@ -234,8 +234,6 @@ void WebmMuxer::AddVideoTrack(const gfx::Size& frame_size, double frame_rate) {
   DCHECK_EQ(0ull, video_track->crop_bottom());
   DCHECK_EQ(0.0f, video_track->frame_rate());

-  video_track->set_default_duration(base::Time::kNanosecondsPerSecond /
-                                    frame_rate);
   // Segment's timestamps should be in milliseconds, DCHECK it. See
   // http://www.webmproject.org/docs/container/#muxer-guidelines
   DCHECK_EQ(1000000ull, segment_.GetSegmentInfo()->timecode_scale());


Description: by default pythonpy have a way of generating its binaries as
"entry points" in setup.py. This is not needed by the Debian package, as those
binaries are symlinked from the Python scripts on "/usr/share/".
Forwarded: not-needed
Author: Tiago Ilieve <tiago.ilieve@gmail.com>

--- a/setup.py
+++ b/setup.py
@@ -1,14 +1,5 @@
 #!/usr/bin/env python
 from setuptools import setup
-import sys
-
-py_entry = 'py%s = pythonpy.__main__:main'
-pycompleter_entry = 'pycompleter%s = pythonpy.pycompleter:main'
-endings = ('', sys.version[:1], sys.version[:3])
-entry_points_scripts = []
-for e in endings:
-    entry_points_scripts.append(py_entry % e)
-    entry_points_scripts.append(pycompleter_entry % e)

 setup(
     name='pythonpy',
@@ -21,7 +12,4 @@
     packages=['pythonpy', 'pythonpy.completion'],
     package_data={'pythonpy': ['completion/pycompletion.sh']},
     scripts=['pythonpy/find_pycompletion.sh'],
-    entry_points = {
-        'console_scripts': entry_points_scripts
-    },
 )

Fix wrong author e-mail in patch

Description: by default pythonpy have a way of generating its binaries as
"entry points" in setup.py. This is not needed by the Debian package, as those
binaries are symlinked from the Python scripts on "/usr/share/".
Forwarded: not-needed
Author: Tiago Ilieve <tiago.myhro@gmail.com>

--- a/setup.py
+++ b/setup.py
@@ -1,14 +1,5 @@
 #!/usr/bin/env python
 from setuptools import setup
-import sys
-
-py_entry = 'py%s = pythonpy.__main__:main'
-pycompleter_entry = 'pycompleter%s = pythonpy.pycompleter:main'
-endings = ('', sys.version[:1], sys.version[:3])
-entry_points_scripts = []
-for e in endings:
-    entry_points_scripts.append(py_entry % e)
-    entry_points_scripts.append(pycompleter_entry % e)

 setup(
     name='pythonpy',
@@ -21,7 +12,4 @@
     packages=['pythonpy', 'pythonpy.completion'],
     package_data={'pythonpy': ['completion/pycompletion.sh']},
     scripts=['pythonpy/find_pycompletion.sh'],
-    entry_points = {
-        'console_scripts': entry_points_scripts
-    },
 )


Index: page/FrameView.cpp
===================================================================
--- page/FrameView.cpp	(revision 106313)
+++ page/FrameView.cpp	(working copy)
@@ -157,10 +157,12 @@
             m_page = page;
             m_page->addScrollableArea(this);

+#if 0
             if (m_frame == m_page->mainFrame()) {
                 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
                 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
             }
+#endif
         }
     }
 }
Index: platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm
===================================================================
--- platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm	(revision 101144)
+++ platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm	(working copy)
@@ -356,9 +356,13 @@

 bool isScrollbarOverlayAPIAvailable()
 {
+#if 0
     static bool apiAvailable = [lookUpNSScrollerImpClass() respondsToSelector:@selector(scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp:)] &&
                                [lookUpNSScrollerImpPairClass() instancesRespondToSelector:@selector(scrollerStyle)];
     return apiAvailable;
+#else
+    return false;
+#endif
 }

 #endif // USE(WK_SCROLLBAR_PAINTER)

Update to Chromium revision 129376.

Index: page/FrameView.cpp
===================================================================
--- page/FrameView.cpp	(revision 112327)
+++ page/FrameView.cpp	(working copy)
@@ -159,10 +159,12 @@
     if (!page)
         return;

+#if 0
     if (m_frame == page->mainFrame()) {
         ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
         ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
     }
+#endif
 }

 PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm
===================================================================
--- platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm	(revision 101144)
+++ platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm	(working copy)
@@ -356,9 +356,13 @@

 bool isScrollbarOverlayAPIAvailable()
 {
+#if 0
     static bool apiAvailable = [lookUpNSScrollerImpClass() respondsToSelector:@selector(scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp:)] &&
                                [lookUpNSScrollerImpPairClass() instancesRespondToSelector:@selector(scrollerStyle)];
     return apiAvailable;
+#else
+    return false;
+#endif
 }

 #endif // USE(WK_SCROLLBAR_PAINTER)


diff --git a/requirements.txt b/requirements.txt
index e69de29..652997b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+boto3==1.17.*
+rastervision_pipeline==0.13
+awscli==1.19.*
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 2fb0a58..6ac077d 100644
--- a/setup.py
+++ b/setup.py
@@ -31,4 +31,10 @@ setup(
     'raster deep-learning ml computer-vision earth-observation geospatial geospatial-processing',
     packages=find_namespace_packages(exclude=['integration_tests*', 'tests*']),
     install_requires=install_requires,
-    zip_safe=False)
+    zip_safe=False,
+    entry_points={
+        'console_scripts': [
+            'rastervision=rastervision.aws_batch.aws_batch_runner:get_split_ind',
+        ],
+    }
+)

Add typing_extensions==3.10.0.0 to requirements patch

diff --git a/requirements.txt b/requirements.txt
index e69de29..652997b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+boto3==1.17.*
+rastervision_pipeline==0.13
+awscli==1.19.*
+typing_extensions==3.10.0.0
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 2fb0a58..6ac077d 100644
--- a/setup.py
+++ b/setup.py
@@ -31,4 +31,10 @@ setup(
     'raster deep-learning ml computer-vision earth-observation geospatial geospatial-processing',
     packages=find_namespace_packages(exclude=['integration_tests*', 'tests*']),
     install_requires=install_requires,
-    zip_safe=False)
+    zip_safe=False,
+    entry_points={
+        'console_scripts': [
+            'rastervision=rastervision.aws_batch.aws_batch_runner:get_split_ind',
+        ],
+    }
+)


Index: fValidation.php
===================================================================
--- fValidation.php	(revision 1042)
+++ fValidation.php	(working copy)
@@ -434,11 +434,10 @@
 	 * Adds a rule to make sure at least one field of multiple has a value
 	 *
 	 * @param  string $field    One of the fields to check for a value
-	 * @param  string $field_2  Another field to check for a value
 	 * @param  string ...
 	 * @return fValidation  The validation object, to allow for method chaining
 	 */
-	public function addOneOrMoreRule($field, $field_2)
+	public function addOneOrMoreRule($field)
 	{
 		$fields = func_get_args();
 		$this->one_or_more_rules[] = $fields;

Fix patching from outside directory

Index: flourish/fValidation.php
===================================================================
--- flourish/fValidation.php	(revision 1042)
+++ flourish/fValidation.php	(working copy)
@@ -434,11 +434,10 @@
 	 * Adds a rule to make sure at least one field of multiple has a value
 	 *
 	 * @param  string $field    One of the fields to check for a value
-	 * @param  string $field_2  Another field to check for a value
 	 * @param  string ...
 	 * @return fValidation  The validation object, to allow for method chaining
 	 */
-	public function addOneOrMoreRule($field, $field_2)
+	public function addOneOrMoreRule($field)
 	{
 		$fields = func_get_args();
 		$this->one_or_more_rules[] = $fields;


diff --git a/node_modules/react-native/Libraries/Image/AssetSourceResolver.js b/node_modules/react-native/Libraries/Image/AssetSourceResolver.js
index 624c622..bc67109 100644
--- a/node_modules/react-native/Libraries/Image/AssetSourceResolver.js
+++ b/node_modules/react-native/Libraries/Image/AssetSourceResolver.js
@@ -114,7 +114,12 @@ class AssetSourceResolver {
    */
   scaledAssetURLNearBundle(): ResolvedAssetSource {
     const path = this.jsbundleUrl || 'file://';
-    return this.fromSource(path + getScaledAssetPath(this.asset));
+    return this.fromSource(
+      // Assets can have relative paths outside of the project root.
+      // When bundling them we replace `../` with `_` to make sure they
+      // don't end up outside of the expected assets directory.
+      path + getScaledAssetPath(this.asset).replace(/\.\.\//g, '_'),
+    );
   }

   /**

Fix local Image rendering for iOS 14

diff --git a/node_modules/react-native/Libraries/Image/AssetSourceResolver.js b/node_modules/react-native/Libraries/Image/AssetSourceResolver.js
index 624c622..bc67109 100644
--- a/node_modules/react-native/Libraries/Image/AssetSourceResolver.js
+++ b/node_modules/react-native/Libraries/Image/AssetSourceResolver.js
@@ -114,7 +114,12 @@ class AssetSourceResolver {
    */
   scaledAssetURLNearBundle(): ResolvedAssetSource {
     const path = this.jsbundleUrl || 'file://';
-    return this.fromSource(path + getScaledAssetPath(this.asset));
+    return this.fromSource(
+      // Assets can have relative paths outside of the project root.
+      // When bundling them we replace `../` with `_` to make sure they
+      // don't end up outside of the expected assets directory.
+      path + getScaledAssetPath(this.asset).replace(/\.\.\//g, '_'),
+    );
   }

   /**
diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 21f1a06..0ff66f3 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -275,6 +275,8 @@ - (void)displayLayer:(CALayer *)layer
   if (_currentFrame) {
     layer.contentsScale = self.animatedImageScale;
     layer.contents = (__bridge id)_currentFrame.CGImage;
+  } else {
+    [super displayLayer:layer];
   }
 }


Do not link against system libspeechd on Ubuntu Wily

--- debian/rules
+++ debian/rules
@@ -57,7 +57,6 @@
 		use_gio=1 \
 		use_pulseaudio=1 \
 		linux_link_libpci=1 \
-		linux_link_libspeechd=1 \
 		fastbuild=1 \
 		disable_fatal_linker_warnings=1 \
 		tracing_like_official_build=1 \

Fix patch format for Ubuntu systems

# Do not link against system libspeechd on Ubuntu Wily

--- a/debian/rules
+++ b/debian/rules
@@ -57,7 +57,6 @@
 		use_gio=1 \
 		use_pulseaudio=1 \
 		linux_link_libpci=1 \
-		linux_link_libspeechd=1 \
 		fastbuild=1 \
 		disable_fatal_linker_warnings=1 \
 		tracing_like_official_build=1 \


36c36
<  * @param {EventListener|function(!Event):(boolean|undefined)} listener
---
>  * @param {EventListener} listener
46c46
<  * @param {EventListener|function(!Event):(boolean|undefined)} listener
---
>  * @param {EventListener} listener

Allow add/removeEventListener callbacks to return any type

36c36
<  * @param {EventListener|function(!Event):*} listener
---
>  * @param {EventListener} listener
46c46
<  * @param {EventListener|function(!Event):*} listener
---
>  * @param {EventListener} listener


Index: debian-groovy2/subprojects/groovy-testng/build.gradle
===================================================================
--- debian-groovy2.orig/subprojects/groovy-testng/build.gradle
+++ debian-groovy2/subprojects/groovy-testng/build.gradle
@@ -1,10 +1,10 @@
 dependencies {
     compile rootProject
-    runtime('org.testng:testng:6.8.13') {
+    runtime('org.testng:testng:6.8.8') {
         // exclude 'optional' beanshell even though testng's pom doesn't say optional
         exclude(group: 'org.beanshell', module: 'bsh')
         // and an older version of jcommander
         exclude(group: 'com.beust', module: 'jcommander')
     }
-    compile('com.beust:jcommander:1.47')
+    compile('com.beust:jcommander:1.35')
 }

Update testng requirements to 6.9.4

Index: debian-groovy2/subprojects/groovy-testng/build.gradle
===================================================================
--- debian-groovy2.orig/subprojects/groovy-testng/build.gradle
+++ debian-groovy2/subprojects/groovy-testng/build.gradle
@@ -1,10 +1,10 @@
 dependencies {
     compile rootProject
-    runtime('org.testng:testng:6.8.13') {
+    runtime('org.testng:testng:6.9.4') {
         // exclude 'optional' beanshell even though testng's pom doesn't say optional
         exclude(group: 'org.beanshell', module: 'bsh')
         // and an older version of jcommander
         exclude(group: 'com.beust', module: 'jcommander')
     }
-    compile('com.beust:jcommander:1.47')
+    compile('com.beust:jcommander:1.35')
 }


diff -Nur pptpd-1.4.0.orig/plugins/patchlevel.h pptpd-1.4.0/plugins/patchlevel.h
--- pptpd-1.4.0.orig/plugins/patchlevel.h	2013-02-18 16:05:46.000000000 -0600
+++ pptpd-1.4.0/plugins/patchlevel.h	2016-01-10 23:24:22.095247474 -0600
@@ -1,5 +1,5 @@
 /* upstream patchlevel.h,v 1.60 2004/01/13 04:46:52 paulus Exp */
 /* $Id: patchlevel.h,v 1.4 2005/02/24 01:25:34 quozl Exp $ */

-#define VERSION		"2.4.3"
-#define DATE		"13 Jan 2004"
+#define VERSION		"2.4.5"
+#define DATE		"17 Nov 2009"

Update a patch for pppd 2.4.7.


From a471cf4e4c73350e090eb2cd87ec959d138012e5 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 19 Mar 2020 11:54:26 -0700
Subject: [PATCH] Add enable/disable libudev

Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index cac271c..bd116eb 100755
--- a/configure
+++ b/configure
@@ -1539,6 +1539,10 @@ for opt do
   ;;
   --disable-plugins) plugins="no"
   ;;
+  --enable-libudev) libudev="yes"
+  ;;
+  --disable-libudev) libudev="no"
+  ;;
   *)
       echo "ERROR: unknown option $opt"
       echo "Try '$0 --help' for more information"
--
1.8.3.1

Fix patch puzz warning during do_patch

From 96f204df74f7dde5f4c9ad6e6eefc2d46219ccd9 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 19 Mar 2020 11:54:26 -0700
Subject: [PATCH] Add enable/disable libudev

Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>

%% original patch: 0001-Add-enable-disable-udev.patch
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index c9a4e73..75f9773 100755
--- a/configure
+++ b/configure
@@ -1606,6 +1606,10 @@ for opt do
   ;;
   --gdb=*) gdb_bin="$optarg"
   ;;
+  --enable-libudev) libudev="yes"
+  ;;
+  --disable-libudev) libudev="no"
+  ;;
   *)
       echo "ERROR: unknown option $opt"
       echo "Try '$0 --help' for more information"
--
2.7.4


--- a/arch/arm/dts/zynq-zed.dts
+++ b/arch/arm/dts/zynq-zed.dts
@@ -10,19 +10,17 @@
 #include "zynq-7000.dtsi"

 / {
-	model = "Zynq Zed Development Board";
+	model = "Canaan Z Controller";
 	compatible = "xlnx,zynq-zed", "xlnx,zynq-7000";

 	aliases {
-		ethernet0 = &gem0;
 		serial0 = &uart1;
-		spi0 = &qspi;
 		mmc0 = &sdhci0;
 	};

 	memory {
 		device_type = "memory";
-		reg = <0x0 0x20000000>;
+		reg = <0x0 0x40000000>;
 	};

 	chosen {
@@ -40,21 +38,6 @@
 	ps-clk-frequency = <33333333>;
 };

-&gem0 {
-	status = "okay";
-	phy-mode = "rgmii-id";
-	phy-handle = <&ethernet_phy>;
-
-	ethernet_phy: ethernet-phy@0 {
-		reg = <0>;
-	};
-};
-
-&qspi {
-	u-boot,dm-pre-reloc;
-	status = "okay";
-};
-
 &sdhci0 {
 	u-boot,dm-pre-reloc;
 	status = "okay";

Update dts for Z Controller U-Boot

--- a/arch/arm/dts/zynq-zed.dts
+++ b/arch/arm/dts/zynq-zed.dts
@@ -10,7 +10,7 @@
 #include "zynq-7000.dtsi"

 / {
-	model = "Zynq Zed Development Board";
+	model = "Canaan Z Controller";
 	compatible = "xlnx,zynq-zed", "xlnx,zynq-7000";

 	aliases {
@@ -22,7 +22,7 @@

 	memory {
 		device_type = "memory";
-		reg = <0x0 0x20000000>;
+		reg = <0x0 0x40000000>;
 	};

 	chosen {


--- ../src-base/minecraft/net/minecraft/client/resources/LanguageManager.java
+++ ../src-work/minecraft/net/minecraft/client/resources/LanguageManager.java
@@ -3,6 +3,8 @@
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+
+import cpw.mods.fml.common.registry.LanguageRegistry;
 import cpw.mods.fml.relauncher.Side;
 import cpw.mods.fml.relauncher.SideOnly;
 import java.io.IOException;
@@ -83,6 +85,7 @@
         }

         field_135049_a.func_135022_a(p_110549_1_, arraylist);
+        LanguageRegistry.instance().loadLanguageTable(field_135049_a.field_135032_a, this.field_135048_c);
         StringTranslate.func_135063_a(field_135049_a.field_135032_a);
     }

Move LaunguageRegistry call above normal asset loading to allow resource packs to override mod's language systems.

--- ../src-base/minecraft/net/minecraft/client/resources/LanguageManager.java
+++ ../src-work/minecraft/net/minecraft/client/resources/LanguageManager.java
@@ -3,6 +3,8 @@
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+
+import cpw.mods.fml.common.registry.LanguageRegistry;
 import cpw.mods.fml.relauncher.Side;
 import cpw.mods.fml.relauncher.SideOnly;
 import java.io.IOException;
@@ -82,6 +84,7 @@
             arraylist.add(this.field_135048_c);
         }

+        LanguageRegistry.instance().loadLanguageTable(field_135049_a.field_135032_a, this.field_135048_c);
         field_135049_a.func_135022_a(p_110549_1_, arraylist);
         StringTranslate.func_135063_a(field_135049_a.field_135032_a);
     }


--- include/apr.hw
+++ include/apr.hw
@@ -276,7 +276,7 @@
 #define APR_HAVE_IN_ADDR        1
 #define APR_HAVE_INET_ADDR      1
 #define APR_HAVE_INET_NETWORK   0
-#define APR_HAVE_IPV6           0
+#define APR_HAVE_IPV6           1
 #define APR_HAVE_MEMMOVE        1
 #define APR_HAVE_SETRLIMIT      0
 #define APR_HAVE_SIGACTION      0
@@ -340,7 +340,7 @@
 /* If we have a TCP implementation that can be "corked", what flag
  * do we use?
  */
-#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
+#define APR_TCP_NOPUSH_FLAG       0

 /* Is the TCP_NODELAY socket option inherited from listening sockets?
  */

Update patch for APR 1.5.1 (offset by 6 lines)

--- include/apr.hw
+++ include/apr.hw
@@ -282,7 +282,7 @@
 #define APR_HAVE_IN_ADDR        1
 #define APR_HAVE_INET_ADDR      1
 #define APR_HAVE_INET_NETWORK   0
-#define APR_HAVE_IPV6           0
+#define APR_HAVE_IPV6           1
 #define APR_HAVE_MEMMOVE        1
 #define APR_HAVE_SETRLIMIT      0
 #define APR_HAVE_SIGACTION      0
@@ -346,7 +346,7 @@
 /* If we have a TCP implementation that can be "corked", what flag
  * do we use?
  */
-#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
+#define APR_TCP_NOPUSH_FLAG       0

 /* Is the TCP_NODELAY socket option inherited from listening sockets?
  */


From 56bdaae91ead1973beeab9c2606d879e2369ecf5 Mon Sep 17 00:00:00 2001
From: JD <jean.daniel.michaud@gmail.com>
Date: Fri, 5 May 2017 13:36:24 +0200
Subject: [PATCH] Add CMakeLists.txt

---
 CMakeLists.txt | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..744c0db
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,20 @@
+cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+project(rc-switch)
+
+add_definitions(-std=c++03)
+
+#-----------------------------------------------------------------------
+# Setup Library
+#-----------------------------------------------------------------------
+add_library(rc-switch STATIC
+  RCSwitch.cpp
+)
+
+set_target_properties(rc-switch PROPERTIES PUBLIC_HEADER "RCSwitch.h")
+
+install(
+	TARGETS rc-switch
+	ARCHIVE DESTINATION lib
+	PUBLIC_HEADER DESTINATION include
+)
+
--
2.7.4

Add RPI variable definition for rcswitch compilation.

From 56bdaae91ead1973beeab9c2606d879e2369ecf5 Mon Sep 17 00:00:00 2001
From: JD <jean.daniel.michaud@gmail.com>
Date: Fri, 5 May 2017 13:36:24 +0200
Subject: [PATCH] Add CMakeLists.txt

---
 CMakeLists.txt | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..744c0db
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,20 @@
+cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
+project(rc-switch)
+
+add_definitions(-std=c++03)
+
+add_definitions(-DRPI)
+
+#-----------------------------------------------------------------------
+# Setup Library
+#-----------------------------------------------------------------------
+add_library(rc-switch STATIC
+  RCSwitch.cpp
+)
+
+set_target_properties(rc-switch PROPERTIES PUBLIC_HEADER "RCSwitch.h")
+
+install(
+	TARGETS rc-switch
+	ARCHIVE DESTINATION lib
+	PUBLIC_HEADER DESTINATION include
+)
+
--
2.7.4


*** /home/herbelin/.opam/3.07/build/ocaml/ocamldoc/remove_DEBUG	2003-07-27 11:13:43.000000000 +0200
--- a	2015-11-30 08:09:39.000000000 +0100
***************
*** 5,8 ****
  # respecting the cpp # line annotation conventions

  echo "# 1 \"$1\""
! sed -e '/DEBUG/s/.*//' "$1"
--- 5,8 ----
  # respecting the cpp # line annotation conventions

  echo "# 1 \"$1\""
! LC_ALL=C sed -e '/DEBUG/s/.*//' "$1"

Fix absolute path in OCaml 3.07 patch.


# Disables the dial registry's repeating discovery timer
# This caused unnecessary SSDP network spam

--- a/chrome/browser/media/router/discovery/dial/dial_registry.cc
+++ b/chrome/browser/media/router/discovery/dial/dial_registry.cc
@@ -192,10 +192,6 @@ void DialRegistry::StartPeriodicDiscover

   dial_ = CreateDialService();
   dial_->AddObserver(this);
-  DoDiscovery();
-  repeating_timer_.reset(new base::RepeatingTimer());
-  repeating_timer_->Start(FROM_HERE, refresh_interval_delta_, this,
-                          &DialRegistry::DoDiscovery);
 }

 void DialRegistry::DoDiscovery() {

Fix Dial `repeating_timer_` related crash

# Disables the dial registry's repeating discovery timer
# This caused unnecessary SSDP network spam

--- a/chrome/browser/media/router/discovery/dial/dial_registry.cc
+++ b/chrome/browser/media/router/discovery/dial/dial_registry.cc
@@ -192,10 +192,6 @@ void DialRegistry::StartPeriodicDiscover

   dial_ = CreateDialService();
   dial_->AddObserver(this);
-  DoDiscovery();
-  repeating_timer_.reset(new base::RepeatingTimer());
-  repeating_timer_->Start(FROM_HERE, refresh_interval_delta_, this,
-                          &DialRegistry::DoDiscovery);
 }

 void DialRegistry::DoDiscovery() {
@@ -209,8 +205,6 @@ void DialRegistry::StopPeriodicDiscovery
   if (!dial_)
     return;

-  repeating_timer_->Stop();
-  repeating_timer_.reset();
   dial_->RemoveObserver(this);
   ClearDialService();
 }


diff -burN opencv.orig/cmake/OpenCVInstallLayout.cmake opencv/cmake/OpenCVInstallLayout.cmake
--- opencv.orig/cmake/OpenCVInstallLayout.cmake	2019-10-10 00:53:14.000000000 +0200
+++ opencv/cmake/OpenCVInstallLayout.cmake	2021-04-23 09:26:03.858765137 +0200
@@ -23,7 +23,7 @@
 elseif(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)

   if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH)
-    ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/")
+    ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "") #"${OpenCV_ARCH}/${OpenCV_RUNTIME}/")
   else()
     message(STATUS "Can't detect runtime and/or arch")
     ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "")

Update windows patch for openCV

diff -burN opencv.orig/cmake/OpenCVInstallLayout.cmake opencv/cmake/OpenCVInstallLayout.cmake
--- opencv.orig/cmake/OpenCVInstallLayout.cmake	2021-06-08 09:30:22.007336301 +0200
+++ opencv/cmake/OpenCVInstallLayout.cmake	2021-06-08 09:30:54.279376480 +0200
@@ -23,7 +23,7 @@
 elseif(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)

   if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH)
-    ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/")
+    ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "") #"${OpenCV_ARCH}/${OpenCV_RUNTIME}/")
   else()
     message(STATUS "Can't detect runtime and/or arch")
     ocv_update(OPENCV_INSTALL_BINARIES_PREFIX "")


Index: sandbox/win/sandbox_win.gypi
===================================================================
--- sandbox/win/sandbox_win.gypi	(revision 194718)
+++ sandbox/win/sandbox_win.gypi	(working copy)
@@ -200,6 +200,21 @@
       },
     },
     {
+      'target_name': 'sandbox_static',
+      'type': 'static_library',
+      'variables': {
+        'sandbox_windows_target': 1,
+      },
+      'dependencies': [
+        '../testing/gtest.gyp:gtest',
+        '../base/base.gyp:base',
+        '../base/base.gyp:base_static',
+      ],
+      'include_dirs': [
+        '../..',
+      ],
+    },
+    {
       'target_name': 'sbox_integration_tests',
       'type': 'executable',
       'dependencies': [

Update sandbox_win.gypi patch for Chrome 30

Index: sandbox/win/sandbox_win.gypi
===================================================================
--- sandbox/win/sandbox_win.gypi	(revision 194718)
+++ sandbox/win/sandbox_win.gypi	(working copy)
@@ -204,6 +204,21 @@
       ],
     },
     {
+      'target_name': 'sandbox_static',
+      'type': 'static_library',
+      'variables': {
+        'sandbox_windows_target': 1,
+      },
+      'dependencies': [
+        '../testing/gtest.gyp:gtest',
+        '../base/base.gyp:base',
+        '../base/base.gyp:base_static',
+      ],
+      'include_dirs': [
+        '../..',
+      ],
+    },
+    {
       'target_name': 'sbox_integration_tests',
       'type': 'executable',
       'dependencies': [


From e41c3783d1fdbca9572fcb386c9c16663dc7cc63 Mon Sep 17 00:00:00 2001
From: Scott Ware <scott.r.ware@intel.com>
Date: Thu, 8 Nov 2018 14:08:34 +0000
Subject: [PATCH 2/3] Fix cmake build issues

Signed-off-by: Scott Ware <scott.r.ware@intel.com>
---
 iothub_client/CMakeLists.txt | 1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/iothub_client/CMakeLists.txt b/iothub_client/CMakeLists.txt
index 99e74dd..20eccd2 100644
--- a/iothub_client/CMakeLists.txt
+++ b/iothub_client/CMakeLists.txt
@@ -332,7 +332,6 @@ if(${use_amqp})
             ${iothub_client_amqp_ws_transport_c_files}
             ${iothub_client_amqp_ws_transport_h_files})

-        set(iothub_client_libs ${iothub_client_libs} uamqp)
     endif(build_as_dynamic)
 endif()

--
2.7.4

Make iothub_client_libs link to uamqp

From e41c3783d1fdbca9572fcb386c9c16663dc7cc63 Mon Sep 17 00:00:00 2001
From: Scott Ware <scott.r.ware@intel.com>
Date: Thu, 8 Nov 2018 14:08:34 +0000
Subject: [PATCH 2/3] Fix cmake build issues

Signed-off-by: Scott Ware <scott.r.ware@intel.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 iothub_client/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iothub_client/CMakeLists.txt b/iothub_client/CMakeLists.txt
index d04f7bd7..3616b432 100644
--- a/iothub_client/CMakeLists.txt
+++ b/iothub_client/CMakeLists.txt
@@ -332,7 +332,7 @@ if(${use_amqp})
             ${iothub_client_amqp_ws_transport_c_files}
             ${iothub_client_amqp_ws_transport_h_files})

-        set(iothub_client_libs ${iothub_client_libs} uamqp)
+        target_link_libraries(${iothub_client_libs} "-luamqp")
     endif(build_as_dynamic)
 endif()


# Ignores the whole idea folder
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

# The out folder may also exist in sub directories
# In GitHub's .gitignore, it is only excluded at the top level
out/

Remove patch included in upstream


From 2590abcf33efc2189ffec995d21d91ff27858ea4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 8 Apr 2016 23:54:48 +0000
Subject: [PATCH] juci: pin grunt to 0.4.1 for grunt-angular-gettext

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: git/package.json
===================================================================
--- git.orig/package.json
+++ git/package.json
@@ -5,7 +5,7 @@
     "JSON": "*",
     "express": "*",
     "body-parser": "*",
-    "grunt": "*",
+    "grunt": "~0.4.1",
     "grunt-angular-gettext": "*",
     "request": "*",
     "glob": "*",
@@ -18,7 +18,7 @@
     "array.prototype.find": "*",
 	"node-getopt": "*",
 	"gettext-parser": "*",
-	"underscore": "*",
+	"underscore": "~1.7.0",
 	"ws": "*",
 	"jquery-deferred": "*",
 	"express-ws": "*"

Refresh patch to match latest

From 2590abcf33efc2189ffec995d21d91ff27858ea4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 8 Apr 2016 23:54:48 +0000
Subject: [PATCH] juci: pin grunt to 0.4.1 for grunt-angular-gettext

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: git/package.json
===================================================================
--- git.orig/package.json
+++ git/package.json
@@ -16,7 +16,7 @@
     "array.prototype.find": "*",
 	"node-getopt": "*",
 	"gettext-parser": "*",
-	"underscore": "*",
+	"underscore": "~1.7.0",
 	"ws": "*",
 	"jquery-deferred": "*",
 	"express-ws": "*"


diff --git a/config/app.php b/config/app.php
index 1941d7c..039b0d4 100644
--- a/config/app.php
+++ b/config/app.php
@@ -167,6 +167,7 @@
         /*
          * Package Service Providers...
          */
+        Bugsnag\BugsnagLaravel\BugsnagServiceProvider::class,

         /*
          * Application Service Providers...
@@ -191,7 +192,7 @@
     */

     'aliases' => Facade::defaultAliases()->merge([
-        // ...
+        'Bugsnag' => Bugsnag\BugsnagLaravel\Facades\Bugsnag::class,
     ])->toArray(),

 ];

Update removed line in patch

diff --git a/config/app.php b/config/app.php
index 1941d7c..039b0d4 100644
--- a/config/app.php
+++ b/config/app.php
@@ -167,6 +167,7 @@
         /*
          * Package Service Providers...
          */
+        Bugsnag\BugsnagLaravel\BugsnagServiceProvider::class,

         /*
          * Application Service Providers...
@@ -191,7 +192,7 @@
     */

     'aliases' => Facade::defaultAliases()->merge([
-        // 'ExampleClass' => App\Example\ExampleClass::class,
+        'Bugsnag' => Bugsnag\BugsnagLaravel\Facades\Bugsnag::class,
     ])->toArray(),

 ];


--- app/config/nginx/nginx.conf.tpl	2017-09-16 13:06:09.000000000 +0700
+++ new/app/config/nginx/nginx.conf.tpl	2017-09-16 13:06:14.000000000 +0700
@@ -43,6 +43,11 @@
     error_log      /dev/null;
   }

+  # Common bundles
+  location ~* ^/([a-zA-Z0-9]+)\-[0-9A-Za-z]+\.(js|js.map|css|css.map)$ {
+    add_header 'X-Content-Type-Options' 'nosniff' always;
+    alias {{VAR_DIR}}/$1.$2;
+  }
+
   location @app {
     access_log  {{LOG_DIR}}/nginx-access.log {{PROJECT}} buffer=32k;

Update nginx patch for webpack addon

--- app/config/nginx/nginx.conf.tpl	2017-11-29 01:14:27.000000000 +0700
+++ new/app/config/nginx/nginx.conf.tpl	2018-03-30 02:05:47.000000000 +0700
@@ -43,6 +43,12 @@
     error_log      /dev/null;
   }

+  # Common bundles
+  location ~* ^/([a-zA-Z0-9]+)\-[0-9A-Za-z]+\.(js|js.map|css|css.map)$ {
+    add_header 'X-Content-Type-Options' 'nosniff' always;
+    alias {{VAR_DIR}}/$1.$2;
+  }
+
   location @app {
     access_log  {{LOG_DIR}}/nginx-access.log {{PROJECT}} buffer=32k;


--- bacula-1.36.0/platforms/suse/bacula-dir.in  2004-10-19 09:35:09.000000000 -0400
+++ bacula-1.36.0/platforms/suse/bacula-dir.sqlite.in   2004-10-31 09:17:40.000000000 -0500
@@ -11,10 +11,11 @@
 # Added rc.status functions 3/13/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 # Added LSB init info 10/14/2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 #
+# Configured for @DB_TYPE@ support
 ### BEGIN INIT INFO
 # Provides:                    bacula-dir
-# Required-Start:              $local_fs $network @DB_TYPE@
-# Required-Stop:               $local_fs $network @DB_TYPE@
+# Required-Start:              $local_fs $network
+# Required-Stop:               $local_fs $network
 # Default-Start:               3 5
 # Default-Stop:        0 1 2 6
 # Short-Description:   bacula director

Fix suse dir init script patch.

--- ../../../bacula-2.1.10/platforms/suse/bacula-dir.in	2007-03-30 17:46:04.000000000 -0400
+++ bacula-dir.in	2007-05-19 12:42:30.000000000 -0400
@@ -13,8 +13,8 @@
 #
 ### BEGIN INIT INFO
 # Provides:                     bacula-dir
-# Required-Start:               $local_fs $network @DB_TYPE@
-# Required-Stop:                $local_fs $network @DB_TYPE@
+# Required-Start:               $local_fs $network
+# Required-Stop:                $local_fs $network
 # Default-Start:                3 5
 # Default-Stop:         0 1 2 6
 # Short-Description:    bacula director


Index: tools/Makefile
===================================================================
--- tools/Makefile	(revision 135054)
+++ tools/Makefile	(working copy)
@@ -14,7 +14,7 @@

 # Build LLDB if present. Note LLDB must be built last as it depends on the
 # wider LLVM infrastructure (including Clang).
-OPTIONAL_DIRS := lldb
+OPTIONAL_DIRS := lldb cling

 # NOTE: The tools are organized into five groups of four consisting of one
 # large and three small executables. This is done to minimize memory load

Add make variable NOCLING which disables the cling build

Index: tools/Makefile
===================================================================
--- tools/Makefile	(revision 154661)
+++ tools/Makefile	(working copy)
@@ -22,6 +22,9 @@
 # Build LLDB if present. Note LLDB must be built last as it depends on the
 # wider LLVM infrastructure (including Clang).
 OPTIONAL_DIRS := lldb
+ifeq ($(NOCLING),)
+OPTIONAL_DIRS += cling
+endif

 # NOTE: The tools are organized into five groups of four consisting of one
 # large and three small executables. This is done to minimize memory load


index 9baaf6b..51cf452 100644
--- a/src/backports/zoneinfo/_tzpath.py
+++ b/src/backports/zoneinfo/_tzpath.py
@@ -22,17 +22,8 @@ def reset_tzpath(to=None):
         env_var = os.environ.get("PYTHONTZPATH", None)
         if env_var is not None:
             base_tzpath = _parse_python_tzpath(env_var)
-        elif sys.platform != "win32":
-            base_tzpath = [
-                "/usr/share/zoneinfo",
-                "/usr/lib/zoneinfo",
-                "/usr/share/lib/zoneinfo",
-                "/etc/zoneinfo",
-            ]
-
-            base_tzpath.sort(key=lambda x: not os.path.exists(x))
         else:
-            base_tzpath = ()
+            base_tzpath = [os.path.join(sys.prefix, "share", "zoneinfo")]

     TZPATH = tuple(base_tzpath)

--

Update patch to use `sys.base_prefix`

--- a/src/backports/zoneinfo/_tzpath.py
+++ b/src/backports/zoneinfo/_tzpath.py
@@ -22,17 +22,8 @@ def reset_tzpath(to=None):
         env_var = os.environ.get("PYTHONTZPATH", None)
         if env_var is not None:
             base_tzpath = _parse_python_tzpath(env_var)
-        elif sys.platform != "win32":
-            base_tzpath = [
-                "/usr/share/zoneinfo",
-                "/usr/lib/zoneinfo",
-                "/usr/share/lib/zoneinfo",
-                "/etc/zoneinfo",
-            ]
-
-            base_tzpath.sort(key=lambda x: not os.path.exists(x))
         else:
-            base_tzpath = ()
+            base_tzpath = [os.path.join(sys.base_prefix, "share", "zoneinfo")]

     TZPATH = tuple(base_tzpath)

--


diff --git a/salt/utils/rsax931.py b/salt/utils/rsax931.py
index f827cc6db8..b728595186 100644
--- a/salt/utils/rsax931.py
+++ b/salt/utils/rsax931.py
@@ -74,7 +74,7 @@
     """
     Attempt to load libcrypto.
     """
-    return cdll.LoadLibrary(_find_libcrypto())
+    return cdll.LoadLibrary('@libcrypto@')

 def _init_libcrypto():

Fix loading of libcrypto when using salt-ssh

--- a/salt/utils/rsax931.py	2021-11-24 00:39:57.940790184 +0100
+++ b/salt/utils/rsax931.py	2021-11-24 00:38:35.436728341 +0100
@@ -85,6 +85,10 @@
     """
     Attempt to load libcrypto.
     """
+    try:
+        return cdll.LoadLibrary('@libcrypto@')
+    except OSError:
+        pass
     return cdll.LoadLibrary(_find_libcrypto())


diff --git a/builtin-run.c b/builtin-run.c
index edcaf3e..f2f2d73 100644
--- a/builtin-run.c
+++ b/builtin-run.c
@@ -590,7 +591,7 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv)
 	}

 	if (kvm->cfg.using_rootfs) {
-		strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L,cache=loose rootfstype=9p");
+		strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L,cache=none rootfstype=9p");
 		if (kvm->cfg.custom_rootfs) {
 			kvm_run_set_sandbox(kvm);

Update LKVM patch to mount with mmap mode.

diff --git a/builtin-run.c b/builtin-run.c
index edcaf3e..f2f2d73 100644
--- a/builtin-run.c
+++ b/builtin-run.c
@@ -590,7 +591,7 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv)
 	}

 	if (kvm->cfg.using_rootfs) {
-		strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L,cache=loose rootfstype=9p");
+		strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L,cache=mmap rootfstype=9p");
 		if (kvm->cfg.custom_rootfs) {
 			kvm_run_set_sandbox(kvm);


# Description: fix FTBFS for gnu/kfreebsd
# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=664613
# Author: Serafeim Zanikolas <sez@debian.org>
# Last-Update: 2012-04-01
--- a/mk/inc
+++ b/mk/inc
@@ -2,6 +2,6 @@
 BINDIR=$(PREFIX)/bin
 CFLAGS=-Wall -Werror
 LDFLAGS=
-OS=$(shell uname -s | tr A-Z a-z)
+OS=$(shell uname -s | tr A-Z a-z | sed 's?gnu/kfreebsd?freebsd?')
 INSTALL=install
 TAR=tar

Refresh patch to apply on Makefile

# Description: fix FTBFS for gnu/kfreebsd
# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=664613
# Author: Serafeim Zanikolas <sez@debian.org>
# Last-Update: 2012-04-01
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 	-Wformat=2\

 LDFLAGS=
-OS=$(shell uname|tr A-Z a-z)
+OS=$(shell uname -s | tr A-Z a-z | sed 's?gnu/kfreebsd?freebsd?')
 INSTALL=install
 TAR=tar


Index: webkit/dom_storage/dom_storage_host.h
===================================================================
--- webkit/dom_storage/dom_storage_host.h	(revision 194718)
+++ webkit/dom_storage/dom_storage_host.h	(working copy)
@@ -64,6 +64,8 @@

   scoped_refptr<DomStorageContext> context_;
   AreaMap connections_;
+
+  DISALLOW_COPY_AND_ASSIGN(DomStorageHost);
 };

 }  // namespace dom_storage

Update DomStorageHost patch for Chrome 29

Index: webkit/browser/dom_storage/dom_storage_host.h
===================================================================
--- webkit/browser/dom_storage/dom_storage_host.h	(revision 194718)
+++ webkit/browser/dom_storage/dom_storage_host.h	(working copy)
@@ -65,6 +65,8 @@

   scoped_refptr<DomStorageContext> context_;
   AreaMap connections_;
+
+  DISALLOW_COPY_AND_ASSIGN(DomStorageHost);
 };

 }  // namespace dom_storage


--- ../src_base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src_work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -463,7 +463,8 @@
         {
             Enchantment enchantment = aenchantment[k];

-            if (enchantment != null && (enchantment.type.canEnchantItem(item) || flag))
+            flag = (par1ItemStack.itemID == Item.book.itemID) && enchantment.isAllowedOnBooks();
+            if (enchantment != null && (enchantment.canApplyAtEnchantingTable(par1ItemStack) || flag))
             {
                 for (int l = enchantment.getMinLevel(); l <= enchantment.getMaxLevel(); ++l)
                 {

Fix NPE in enchangint books.

--- ../src_base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src_work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -463,7 +463,10 @@
         {
             Enchantment enchantment = aenchantment[k];

-            if (enchantment != null && (enchantment.type.canEnchantItem(item) || flag))
+            if (enchantment == null) continue;
+
+            flag = (par1ItemStack.itemID == Item.book.itemID) && enchantment.isAllowedOnBooks();
+            if (enchantment.canApplyAtEnchantingTable(par1ItemStack) || flag)
             {
                 for (int l = enchantment.getMinLevel(); l <= enchantment.getMaxLevel(); ++l)
                 {


--- flatestubs.c	2016-03-13 20:03:44.000000000 +0000
+++ flatestubs.c	2016-03-13 20:02:13.000000000 +0000
@@ -19,6 +19,8 @@

 #include "miniz.c" //Modified to use miniz.c rather than zlib

+#include <stdint.h>
+
 #include <caml/mlvalues.h>
 #include <caml/alloc.h>
 #include <caml/callback.h>
@@ -170,7 +172,7 @@

 value camlzip_update_crc32(value crc, value buf, value pos, value len)
 {
-  return copy_int32(crc32((uint32) Int32_val(crc),
+  return copy_int32(crc32((uint32_t) Int32_val(crc),
                           &Byte_u(buf, Long_val(pos)),
                           Long_val(len)));
 }

Fix camlpdf patch to apply with -p1

--- a/flatestubs.c	2016-03-13 20:03:44.000000000 +0000
+++ b/flatestubs.c	2016-03-13 20:02:13.000000000 +0000
@@ -19,6 +19,8 @@

 #include "miniz.c" //Modified to use miniz.c rather than zlib

+#include <stdint.h>
+
 #include <caml/mlvalues.h>
 #include <caml/alloc.h>
 #include <caml/callback.h>
@@ -170,7 +172,7 @@

 value camlzip_update_crc32(value crc, value buf, value pos, value len)
 {
-  return copy_int32(crc32((uint32) Int32_val(crc),
+  return copy_int32(crc32((uint32_t) Int32_val(crc),
                           &Byte_u(buf, Long_val(pos)),
                           Long_val(len)));
 }


--- Makefile.inc1	2014-02-28 13:31:46.000000000 -0800
+++ Makefile.inc1-occam	2014-02-28 12:40:46.000000000 -0800
@@ -172,7 +172,7 @@
 .endif
 WORLDTMP=	${OBJTREE}${.CURDIR}/tmp
 # /usr/games added for fortune which depend on strfile
-BPATH=		${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games
+BPATH=		${OCCAM_HOME}/bin:${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games
 XPATH=		${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
 STRICTTMPPATH=	${BPATH}:${XPATH}
 TMPPATH=	${STRICTTMPPATH}:${PATH}

Update patch for freebsd 10.

--- Makefile.inc1	2014-02-28 13:31:46.000000000 -0800
+++ Makefile.inc1-occam	2014-02-28 12:40:46.000000000 -0800
@@ -177,7 +177,7 @@
 .endif
 WORLDTMP=	${OBJTREE}${.CURDIR}/tmp
 # /usr/games added for fortune which depend on strfile
-BPATH=		${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games:${WORLDTMP}/legacy/bin
+BPATH=		${OCCAM_HOME}/bin:${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games
 XPATH=		${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
 STRICTTMPPATH=	${BPATH}:${XPATH}
 TMPPATH=	${STRICTTMPPATH}:${PATH}


--- __init__.py	2014-01-16 13:26:31.000000000 +0100
+++ __init__.py.orig	2014-01-16 13:22:07.000000000 +0100
@@ -116,9 +116,10 @@
         except (ValueError, KeyError):
             num = 0
     elif 'bsd' in sys.platform or sys.platform == 'darwin':
-        comm = '/sbin/sysctl -n hw.ncpu'
         if sys.platform == 'darwin':
-            comm = '/usr/' + comm
+            comm = '/usr/sbin/sysctl -n hw.activecpu'
+	else:
+	    comm = '/sbin/sysctl -n hw.ncpu'
         try:
             with os.popen(comm) as p:
                 num = int(p.read())

Fix python patch, old one was not applied successfully.

--- __init__.py.orig	2014-01-17 17:02:03.000000000 +0100
+++ __init__.py	2014-01-17 17:03:27.000000000 +0100
@@ -116,9 +116,10 @@
         except (ValueError, KeyError):
             num = 0
     elif 'bsd' in sys.platform or sys.platform == 'darwin':
-        comm = '/sbin/sysctl -n hw.ncpu'
         if sys.platform == 'darwin':
-            comm = '/usr' + comm
+            comm = '/usr/sbin/sysctl -n hw.activecpu'
+	else:
+            comm = '/sbin/sysctl -n hw.ncpu'
         try:
             with os.popen(comm) as p:
                 num = int(p.read())


Description: Fixes GN boostrap with GCC compilers
Author: Pawel Hajdan, Jr <phajdan.jr@ch40m1um.qjz9zk>
Date:   Wed Jul 26 21:51:54 2017 +0000

--- a/base/numerics/safe_math_shared_impl.h
+++ b/base/numerics/safe_math_shared_impl.h
@@ -21,8 +21,7 @@
 #if !defined(__native_client__) &&                         \
     ((defined(__clang__) &&                                \
       ((__clang_major__ > 3) ||                            \
-       (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
-     (defined(__GNUC__) && __GNUC__ >= 5))
+       (__clang_major__ == 3 && __clang_minor__ >= 4))))
 #include "base/numerics/safe_math_clang_gcc_impl.h"
 #define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
 #else

Undo domain-substitution in patch description

Description: Fixes GN boostrap with GCC compilers
Author: Pawel Hajdan, Jr <phajdan.jr@chromium.org>
Date:   Wed Jul 26 21:51:54 2017 +0000

--- a/base/numerics/safe_math_shared_impl.h
+++ b/base/numerics/safe_math_shared_impl.h
@@ -21,8 +21,7 @@
 #if !defined(__native_client__) &&                         \
     ((defined(__clang__) &&                                \
       ((__clang_major__ > 3) ||                            \
-       (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
-     (defined(__GNUC__) && __GNUC__ >= 5))
+       (__clang_major__ == 3 && __clang_minor__ >= 4))))
 #include "base/numerics/safe_math_clang_gcc_impl.h"
 #define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
 #else


From be60b4f864c862e353079eea2659f3989e32ddd9 Mon Sep 17 00:00:00 2001
From: The Brain <the.brain@pinkyandthebrain.com>
Date: Sun, 3 Apr 2011 17:22:00 -0500
Subject: [PATCH] Thanks.

---
 hello.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hello.py b/hello.py
index 680b306..21dec4d 100644
--- a/hello.py
+++ b/hello.py
@@ -1,4 +1,4 @@
 #! /usr/bin/env python

 #Author: The Brain
-print "Goodbye world!"
+print "Hello world!"
--
1.7.2.5

Fix stored test data to remove mention to now-removed Author: line

From be60b4f864c862e353079eea2659f3989e32ddd9 Mon Sep 17 00:00:00 2001
From: The Brain <the.brain@pinkyandthebrain.com>
Date: Sun, 3 Apr 2011 17:22:00 -0500
Subject: [PATCH] Thanks.

---
 hello.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hello.py b/hello.py
index 680b306..21dec4d 100644
--- a/hello.py
+++ b/hello.py
@@ -1,3 +1,3 @@
 #! /usr/bin/env python

-print "Goodbye world!"
+print "Hello world!"
--
1.7.2.5


Add up to 3 subfields to item call number (was only adding 2)

This is a quick and dirty fix, should implement a proper loop
which handles an arbritary number of subfields.

See Koha bug #9156:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9156

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -148,9 +148,10 @@ sub generate_subfield_form {
             my $CNtag       = substr($pref_itemcallnumber, 0, 3);
             my $CNsubfield  = substr($pref_itemcallnumber, 3, 1);
             my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1);
+            my $CNsubfield3 = substr($pref_itemcallnumber, 5, 1);
             my $temp2 = $temp->field($CNtag);
             if ($temp2) {
-                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2));
+                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2).' '.($temp2->subfield($CNsubfield3));
                 #remove any trailing space incase one subfield is used
                 $value =~ s/^\s+|\s+$//g;
             }

Fix syntax error in previous commit

Add up to 3 subfields to item call number (was only adding 2)

This is a quick and dirty fix, should implement a proper loop
which handles an arbritary number of subfields.

See Koha bug #9156:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9156

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -148,9 +148,10 @@ sub generate_subfield_form {
             my $CNtag       = substr($pref_itemcallnumber, 0, 3);
             my $CNsubfield  = substr($pref_itemcallnumber, 3, 1);
             my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1);
+            my $CNsubfield3 = substr($pref_itemcallnumber, 5, 1);
             my $temp2 = $temp->field($CNtag);
             if ($temp2) {
-                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2));
+                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2)).' '.($temp2->subfield($CNsubfield3));
                 #remove any trailing space incase one subfield is used
                 $value =~ s/^\s+|\s+$//g;
             }


diff --git a/pcap/pcap.go b/pcap/pcap.go
index b8eb666..9a623cd 100644
--- a/pcap/pcap.go
+++ b/pcap/pcap.go
@@ -9,11 +9,12 @@ package pcap

 /*
 #cgo solaris LDFLAGS: -L /opt/local/lib -lpcap
-#cgo linux LDFLAGS: -lpcap
+#cgo linux CFLAGS: -I/opt/datadog-agent/embedded/include
+#cgo linux LDFLAGS: /opt/datadog-agent/embedded/lib/libpcap.a
 #cgo dragonfly LDFLAGS: -lpcap
 #cgo freebsd LDFLAGS: -lpcap
 #cgo openbsd LDFLAGS: -lpcap
-#cgo darwin LDFLAGS: -lpcap
+#cgo darwin LDFLAGS: /usr/local/Cellar/libpcap/1.7.4/lib/libpcap.a
 #cgo windows CFLAGS: -I C:/WpdPack/Include
 #cgo windows,386 LDFLAGS: -L C:/WpdPack/Lib -lwpcap
 #cgo windows,amd64 LDFLAGS: -L C:/WpdPack/Lib/x64 -lwpcap

Rename agent in pcap patch

diff --git a/pcap/pcap.go b/pcap/pcap.go
index b8eb666..9a623cd 100644
--- a/pcap/pcap.go
+++ b/pcap/pcap.go
@@ -9,11 +9,12 @@ package pcap

 /*
 #cgo solaris LDFLAGS: -L /opt/local/lib -lpcap
-#cgo linux LDFLAGS: -lpcap
+#cgo linux CFLAGS: -I/opt/stackstate-agent/embedded/include
+#cgo linux LDFLAGS: /opt/stackstate-agent/embedded/lib/libpcap.a
 #cgo dragonfly LDFLAGS: -lpcap
 #cgo freebsd LDFLAGS: -lpcap
 #cgo openbsd LDFLAGS: -lpcap
-#cgo darwin LDFLAGS: -lpcap
+#cgo darwin LDFLAGS: /usr/local/Cellar/libpcap/1.7.4/lib/libpcap.a
 #cgo windows CFLAGS: -I C:/WpdPack/Include
 #cgo windows,386 LDFLAGS: -L C:/WpdPack/Lib -lwpcap
 #cgo windows,amd64 LDFLAGS: -L C:/WpdPack/Lib/x64 -lwpcap


Index: configure
===================================================================
--- configure	(revision 5497)
+++ configure	(working copy)
@@ -47,6 +47,8 @@
   echo ""
   echo "Advanced options (experts only):"
   echo "  --source-path=PATH       path to source code [$source_path]"
+  echo "  --cross-compile          will be cross-compiling, so assume executables"
+  echo "                           will not run on this system [default=no]"
   echo "  --cross-prefix=PREFIX    use PREFIX for compilation tools [$cross_prefix]"
   echo "  --cc=CC                  use C compiler CC [$cc]"
   echo "  --make=MAKE              use specified make [$make]"
@@ -247,7 +249,7 @@
 }

 check_exec(){
-    check_ld "$@" && { test -n "$cross_prefix" || $TMPE; }
+    check_ld "$@" && { test -n "$cross_prefix" || test "cross_compile" = "yes" || $TMPE; }
 }

 require(){
@@ -286,6 +288,7 @@
 mandir=""
 bindir=""
 cross_prefix=""
+cross_compile="no"
 cc="gcc"
 ar="ar"
 ranlib="ranlib"
@@ -645,6 +648,8 @@
   ;;
   --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
   ;;
+  --cross-compile) cross_compile="yes"
+  ;;
   --cc=*) cc=`echo $opt | cut -d '=' -f 2-`
   ;;
   --make=*) make=`echo $opt | cut -d '=' -f 2`
@@ -1113,7 +1118,7 @@

 # ---
 # big/little-endian test
-if test -z "$cross_prefix" ; then
+if test -z "$cross_prefix" && test "$cross_compile" = "no" ; then
     check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
 #include <inttypes.h>
 int main(int argc, char ** argv){

Configure should check with cc and ld in separate commands, because they are when the thing is actually built.

Index: configure
===================================================================
--- configure   (revision 5634)
+++ configure   (working copy)
@@ -226,8 +226,10 @@
     log check_ld "$@"
     cat >$TMPC
     log_file $TMPC
-    log $cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs
-    $cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs >>$logfile 2>&1
+    log $cc $CFLAGS "$@" -c -o $TMPO $TMPC >>$logfile 2>&1
+    log $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs >>$logfile 2>&1
+    $cc $CFLAGS "$@" -c -o $TMPO $TMPC >>$logfile 2>&1
+    $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs >>$logfile 2>&1
 }


--- ../src_base/minecraft/net/minecraft/util/MovingObjectPosition.java
+++ ../src_work/minecraft/net/minecraft/util/MovingObjectPosition.java
@@ -27,6 +27,9 @@

     /** The hit entity */
     public Entity entityHit;
+
+    /** Used to determine what sub-segment is hit */
+    public int subHit = -1;

     public MovingObjectPosition(int par1, int par2, int par3, int par4, Vec3 par5Vec3)
     {

Add hitInfo field to MovingObjectPosition for when an int doesn't suffice

--- ../src_base/minecraft/net/minecraft/util/MovingObjectPosition.java
+++ ../src_work/minecraft/net/minecraft/util/MovingObjectPosition.java
@@ -27,7 +27,13 @@

     /** The hit entity */
     public Entity entityHit;
-
+
+    /** Used to determine what sub-segment is hit */
+    public int subHit = -1;
+
+    /** Used to add extra hit info */
+    public Object hitInfo = null;
+
     public MovingObjectPosition(int par1, int par2, int par3, int par4, Vec3 par5Vec3)
     {
         this.typeOfHit = EnumMovingObjectType.TILE;


--- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java
@@ -28,6 +28,8 @@
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;

+import net.minecraftforge.client.ForgeHooksClient;
+
 @SideOnly(Side.CLIENT)
 public class RenderEngine
 {
@@ -186,6 +188,7 @@

                 try
                 {
+                    ForgeHooksClient.onTextureLoadPre(par1Str);
                     int i = GLAllocation.generateTextureNames();
                     TextureFXManager.instance().bindTextureToName(par1Str, i);
                     boolean flag = par1Str.startsWith("%blur%");
@@ -216,6 +219,7 @@
                     }

                     this.textureMap.put(s1, Integer.valueOf(i));
+                    ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack());
                     return i;
                 }
                 catch (Exception exception)

Fix potential GL issue when atlas animations bind textures without informating RenderEngine.

--- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java
@@ -28,6 +28,8 @@
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.opengl.GL12;

+import net.minecraftforge.client.ForgeHooksClient;
+
 @SideOnly(Side.CLIENT)
 public class RenderEngine
 {
@@ -186,6 +188,7 @@

                 try
                 {
+                    ForgeHooksClient.onTextureLoadPre(par1Str);
                     int i = GLAllocation.generateTextureNames();
                     TextureFXManager.instance().bindTextureToName(par1Str, i);
                     boolean flag = par1Str.startsWith("%blur%");
@@ -216,6 +219,7 @@
                     }

                     this.textureMap.put(s1, Integer.valueOf(i));
+                    ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack());
                     return i;
                 }
                 catch (Exception exception)
@@ -417,6 +421,7 @@
     {
         this.textureMapBlocks.updateAnimations();
         this.textureMapItems.updateAnimations();
+        this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture.
     }

     /**
@@ -515,6 +520,7 @@
     {
         this.textureMapBlocks.refreshTextures();
         this.textureMapItems.refreshTextures();
+        this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture.
     }

     public Icon getMissingIcon(int par1)


diff --git a/setup.py b/setup.py
index 6667adc..79f7482 100644
--- a/setup.py
+++ b/setup.py
@@ -29,4 +29,5 @@ setup(name = 'sgp4',
         'Topic :: Scientific/Engineering :: Astronomy',
         ],
       packages = ['sgp4'],
+      package_data={'sgp4': ['tcppver.out', 'SGP4-VER.TLE']},
       )

Add LICENSE to package data

diff --git a/setup.py b/setup.py
index 6667adc..79f7482 100644
--- a/setup.py
+++ b/setup.py
@@ -29,4 +29,5 @@ setup(name = 'sgp4',
         'Topic :: Scientific/Engineering :: Astronomy',
         ],
       packages = ['sgp4'],
+      package_data={'sgp4': ['tcppver.out', 'SGP4-VER.TLE'], '': ['LICENSE'],},
       )


--- a/etc/keystone.conf
+++ b/etc/keystone.conf
@@ -78,7 +78,7 @@
 # SQLAlchemy connection string for the reference implementation registry
 # server. Any valid SQLAlchemy connection string is fine.
 # See: http://bit.ly/ideIpI
-sql_connection = sqlite:///keystone.db
+sql_connection = _DBC_URL_
 backend_entities = ['UserRoleAssociation', 'Endpoints', 'Role', 'Tenant',
                     'User', 'Credentials', 'EndpointTemplates', 'Token',
                     'Service']

Set good URL by default

--- a/etc/keystone.conf
+++ b/etc/keystone.conf
@@ -78,7 +78,7 @@
 # SQLAlchemy connection string for the reference implementation registry
 # server. Any valid SQLAlchemy connection string is fine.
 # See: http://bit.ly/ideIpI
-sql_connection = sqlite:///keystone.db
+sql_connection = sqlite:////var/lib/keystone/keystone.db
 backend_entities = ['UserRoleAssociation', 'Endpoints', 'Role', 'Tenant',
                     'User', 'Credentials', 'EndpointTemplates', 'Token',
                     'Service']


diff --git a/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx b/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx
index 9ec6e90..ba9d348 100644
--- a/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx
+++ b/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx
@@ -79,6 +79,7 @@
 #include <TColStd_MapOfInteger.hxx>
 #include <SortTools_ShellSortOfReal.hxx>
 #include <TCollection_CompareOfReal.hxx>
+#include <vector>

 static Standard_Integer LIMITE_TRIANGULATION = 1048576;

@@ -443,8 +444,12 @@ void BRepMesh_FastDiscret::Add(const TopoDS_Face& theface)

         //clear the structure of links
         const MeshDS_MapOfInteger& aLinks = structure->LinkOfDomain(nbDomains);
+        std::vector<int> toRemove;
         for(MeshDS_MapOfInteger::Iterator anIter(aLinks);anIter.More();anIter.Next())
-          structure->ForseRemoveLink(anIter.Key());
+            toRemove.push_back(anIter.Key());
+        for(i = 0; i < toRemove.size(); i++)
+            structure->ForseRemoveLink(toRemove[i]);
+
         for (i = 1; i <= myvemap.Extent(); i++)
            structure->ForseRemoveNode(myvemap.FindKey(i));

Make BRepMesh_FastDiscret patch more "Opencascade friendly".

diff --git a/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx b/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx
index 9ec6e90..9dc10bc 100644
--- a/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx
+++ b/ros/src/BRepMesh/BRepMesh_FastDiscret.cxx
@@ -443,8 +443,11 @@ void BRepMesh_FastDiscret::Add(const TopoDS_Face& theface)

         //clear the structure of links
         const MeshDS_MapOfInteger& aLinks = structure->LinkOfDomain(nbDomains);
+        TColStd_SequenceOfInteger toRemove;
         for(MeshDS_MapOfInteger::Iterator anIter(aLinks);anIter.More();anIter.Next())
-          structure->ForseRemoveLink(anIter.Key());
+          toRemove.Append(anIter.Key());
+        for (i = 1; i <= toRemove.Length(); i++)
+          structure->ForseRemoveLink(toRemove.Value(i));
         for (i = 1; i <= myvemap.Extent(); i++)
            structure->ForseRemoveNode(myvemap.FindKey(i));


Index: vobject/icalendar.py
===================================================================
--- vobject/icalendar.py	(revision 212)
+++ vobject/icalendar.py	(working copy)
@@ -1661,9 +1661,10 @@
                 else:
                     current.append(char)
             else:
-                state = "read normal"
+                #state = "read normal"
                 # leave unrecognized escaped characters for later passes
-                current.append('\\' + char)
+                #current.append('\\' + char)
+                raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))

         elif state == "end":    #an end state
             if len(current) or len(results) == 0:

Handle case of floating time DTSTART and UTC UNTIL.

Index: vobject/icalendar.py
===================================================================
--- vobject/icalendar.py	(revision 212)
+++ vobject/icalendar.py	(working copy)
@@ -426,6 +426,18 @@

                         if dtstart.tzinfo is not None:
                             until = until.astimezone(dtstart.tzinfo)
+
+                        # RFC2445 actually states that UNTIL must be a UTC value. Whilst the
+                        # changes above work OK, one problem case is if DTSTART is floating but
+                        # UNTIL is properly specified as UTC (or with a TZID). In that case dateutil
+                        # will fail datetime comparisons. There is no easy solution to this as
+                        # there is no obvious timezone (at this point) to do proper floating time
+                        # offset compisons. The best we can do is treat the UNTIL value as floating.
+                        # This could mean incorrect determination of the last instance. The better
+                        # solution here is to encourage clients to use COUNT rather than UNTIL
+                        # when DTSTART is floating.
+                        if dtstart.tzinfo is None:
+                            until = until.replace(tzinfo=None)

                         rule._until = until

@@ -1661,9 +1673,10 @@
                 else:
                     current.append(char)
             else:
-                state = "read normal"
+                #state = "read normal"
                 # leave unrecognized escaped characters for later passes
-                current.append('\\' + char)
+                #current.append('\\' + char)
+                raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))

         elif state == "end":    #an end state
             if len(current) or len(results) == 0:


diff --git a/profiles/apparmor/template.go b/profiles/apparmor/template.go
index ada33bf..001eace 100644
--- a/profiles/apparmor/template.go
+++ b/profiles/apparmor/template.go
@@ -42,5 +42,9 @@ profile {{.Name}} flags=(attach_disconnected,mediate_deleted) {
   # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
   ptrace (trace,read) peer=docker-default,
 {{end}}
+
+  # Ubuntu Snappy 15.04 tweaks
+  ptrace (readby, tracedby) peer="docker_docker{,-daemon}_*",
+  signal (receive) peer="docker_docker{,-daemon}_*",
 }
 `

Allow "dockerd" to ptrace/signal containers properly

diff --git a/profiles/apparmor/template.go b/profiles/apparmor/template.go
index ada33bf..001eace 100644
--- a/profiles/apparmor/template.go
+++ b/profiles/apparmor/template.go
@@ -42,5 +42,12 @@ profile {{.Name}} flags=(attach_disconnected,mediate_deleted) {
   # suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
   ptrace (trace,read) peer=docker-default,
 {{end}}
+
+  # Ubuntu Snappy 15.04 tweaks
+  ptrace (readby, tracedby) peer="docker_docker{,-daemon}_*",
+  signal (receive) peer="docker_docker{,-daemon}_*",
+  # Ubuntu Snappy 16-series tweaks
+  ptrace (readby, tracedby) peer="snap.docker.dockerd",
+  signal (receive) peer="snap.docker.dockerd",
 }
 `


Index: src/vidalia/CMakeLists.txt
===================================================================
--- src/vidalia/CMakeLists.txt	(revision 2423)
+++ src/vidalia/CMakeLists.txt	(working copy)
@@ -238,9 +238,16 @@
 endif(APPLE)
 add_dependencies(${vidalia_BIN} translations)

+## Link in miniupnpc
+find_library(MINIUPNPC
+    NAMES miniupnpc
+    PATHS ${MINIUPNPC_LIBRARY_DIR}
+)
+
 ## Link to the Qt libraries and other libraries built as a part of Vidalia
 target_link_libraries(${vidalia_BIN}
   ${QT_LIBRARIES}
+  ${MINIUPNPC}
   torcontrol
   util
 )

Add in dummy method for setting up UPnP (and a couple of items to note)

Index: src/vidalia/CMakeLists.txt
===================================================================
--- src/vidalia/CMakeLists.txt	(revision 2423)
+++ src/vidalia/CMakeLists.txt	(working copy)
@@ -238,9 +238,16 @@
 endif(APPLE)
 add_dependencies(${vidalia_BIN} translations)

+## Link in miniupnpc
+find_library(MINIUPNPC
+    NAMES miniupnpc
+    PATHS ${MINIUPNPC_LIBRARY_DIR}
+)
+
 ## Link to the Qt libraries and other libraries built as a part of Vidalia
 target_link_libraries(${vidalia_BIN}
   ${QT_LIBRARIES}
+  ${MINIUPNPC}
   torcontrol
   util
 )
Index: src/vidalia/config/serversettings.cpp
===================================================================
--- src/vidalia/config/serversettings.cpp	(revision 2423)
+++ src/vidalia/config/serversettings.cpp	(working copy)
@@ -130,6 +130,9 @@
   bool rc;

   if (isServerEnabled()) {
+    /* Configure UPnP device to forward DirPort and OrPort */
+    /* TODO: does isServerEnabled() return true when a server is just set up? */
+    configurePortForwarding();
     rc = torControl()->setConf(confValues(), errmsg);
   } else {
     QStringList resetKeys;
@@ -152,6 +155,14 @@
   return rc;
 }

+/* TODO: We should call this periodically, in case the router gets rebooted or forgets its UPnP settings */
+/** Configure UPnP device to forward DirPort and ORPort */
+void
+ServerSettings::configurePortForwarding()
+{
+  ;
+}
+
 /** Virtual method called when we retrieve a server-related setting from Tor.
  * Currently this just translates BandwidthFoo to RelayBandwidthFoo when
  * appropriate. */


Description: Use system JSON Spirit library
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2011-05-17
--- a/src/rpc.cpp
+++ b/src/rpc.cpp
@@ -12,9 +12,7 @@
 #include <boost/asio/ssl.hpp>
 typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> SSLStream;
 #endif
-#include "json/json_spirit_reader_template.h"
-#include "json/json_spirit_writer_template.h"
-#include "json/json_spirit_utils.h"
+#include <json_spirit.h>
 #define printf OutputDebugStringF
 // MinGW 3.4.5 gets "fatal error: had to relocate PCH" if the json headers are
 // precompiled in headers.h.  The problem might be when the pch file goes over
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -23,6 +23,7 @@
    -l boost_thread \
    -l db_cxx \
    -l ssl \
+   -l json_spirit \
    -l crypto

 ifdef USE_UPNP

Update Debian "Use system json-spirit" patch to apply

Description: Use system JSON Spirit library
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2012-07-05
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -12,9 +12,7 @@
 #include <boost/asio/ssl.hpp>
 typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> SSLStream;
 #endif
-#include "json/json_spirit_reader_template.h"
-#include "json/json_spirit_writer_template.h"
-#include "json/json_spirit_utils.h"
+#include <json_spirit.h>
 #define printf OutputDebugStringF
 // MinGW 3.4.5 gets "fatal error: had to relocate PCH" if the json headers are
 // precompiled in headers.h.  The problem might be when the pch file goes over
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -23,6 +23,7 @@
    -l boost_thread \
    -l db_cxx \
    -l ssl \
+   -l json_spirit \
    -l crypto

 ifdef USE_UPNP


Index: avahi-0.6.31/avahi-core/browse-service.c
===================================================================
--- avahi-core/browse-service.c	2010-08-25 20:51:38.983153000 -0400
+++ avahi-core/browse-service.c	2013-12-23 12:26:59.993833324 -0500
@@ -61,7 +61,9 @@
     flags &= AVAHI_LOOKUP_RESULT_CACHED | AVAHI_LOOKUP_RESULT_MULTICAST | AVAHI_LOOKUP_RESULT_WIDE_AREA;

     if (record) {
-        char service[AVAHI_LABEL_MAX], type[AVAHI_DOMAIN_NAME_MAX], domain[AVAHI_DOMAIN_NAME_MAX];
+        char service[AVAHI_LABEL_MAX] = {'\0',};
+        char type[AVAHI_DOMAIN_NAME_MAX] = {'\0',};
+        char domain[AVAHI_DOMAIN_NAME_MAX] = {'\0',};

         assert(record->key->type == AVAHI_DNS_TYPE_PTR);

Update avahi vars fix patch for proper quilt format.

--- a/avahi-core/browse-service.c
+++ b/avahi-core/browse-service.c
@@ -61,7 +61,9 @@ static void record_browser_callback(
     flags &= AVAHI_LOOKUP_RESULT_CACHED | AVAHI_LOOKUP_RESULT_MULTICAST | AVAHI_LOOKUP_RESULT_WIDE_AREA;

     if (record) {
-        char service[AVAHI_LABEL_MAX], type[AVAHI_DOMAIN_NAME_MAX], domain[AVAHI_DOMAIN_NAME_MAX];
+        char service[AVAHI_LABEL_MAX] = {'\0',};
+        char type[AVAHI_DOMAIN_NAME_MAX] = {'\0',};
+        char domain[AVAHI_DOMAIN_NAME_MAX] = {'\0',};

         assert(record->key->type == AVAHI_DNS_TYPE_PTR);


552c552
<  * @param {...*} var_args
---
>  * @param {...T} items
558c558
< function Array(var_args) {}
---
> function Array(items) {}
572,573c572,573
<  * @param {...*} var_args
<  * @return {!Array<?>}
---
>  * @param {...T} items
>  * @return {!Array<T>}
578c578
< Array.prototype.concat = function(var_args) {};
---
> Array.prototype.concat = function(items) {};
706c706
<  * @param {...*} var_args
---
>  * @param {...T} var_args
1984c1984
<  * @param {*} pattern
---
>  * @param {string} pattern
1995c1995
<  * @param {*} str The string to search.
---
>  * @param {string} str The string to search.
2003c2003
<  * @param {*} str The string to search.
---
>  * @param {string} str The string to search.

Fix Array type definition in BuiltinClosureTypeCleaner and clean-up diff file.


--- include/apr.hw
+++ include/apr.hw
@@ -276,7 +276,7 @@
 #define APR_HAVE_IN_ADDR        1
 #define APR_HAVE_INET_ADDR      1
 #define APR_HAVE_INET_NETWORK   0
-#define APR_HAVE_IPV6           0
+#define APR_HAVE_IPV6           1
 #define APR_HAVE_MEMMOVE        1
 #define APR_HAVE_SETRLIMIT      0
 #define APR_HAVE_SIGACTION      0
@@ -340,7 +340,7 @@
 /* If we have a TCP implementation that can be "corked", what flag
  * do we use?
  */
-#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
+#define APR_TCP_NOPUSH_FLAG       0

 /* Is the TCP_NODELAY socket option inherited from listening sockets?
  */

Update patch for APR 1.7.x

--- include/apr.hw
+++ include/apr.hw
@@ -367,7 +367,7 @@
 /* If we have a TCP implementation that can be "corked", what flag
  * do we use?
  */
-#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
+#define APR_TCP_NOPUSH_FLAG       0

 /* Is the TCP_NODELAY socket option inherited from listening sockets?
  */


--- test/Makefile.orig	2020-01-24 15:55:37.320406491 +0200
+++ test/Makefile	2020-01-24 15:55:52.316279494 +0200
@@ -1,4 +1,4 @@
-CC = gcc
+CC ?= gcc

 CFLAGS = -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra $(FAKETIME_COMPILE_CFLAGS)
 LDFLAGS = -lrt -lpthread

Add possibility to add to CFLAGS / LDFLAGS

--- test/Makefile.orig	2020-01-24 16:06:25.858716206 +0200
+++ test/Makefile	2020-01-24 16:06:52.438470272 +0200
@@ -1,7 +1,7 @@
-CC = gcc
+CC ?= gcc

-CFLAGS = -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra $(FAKETIME_COMPILE_CFLAGS)
-LDFLAGS = -lrt -lpthread
+CFLAGS = $(CFLAGS) -std=gnu99 -Wall -DFAKE_STAT -Werror -Wextra $(FAKETIME_COMPILE_CFLAGS)
+LDFLAGS = $(LDFLAGS) -lrt -lpthread

 SRC = timetest.c
 OBJ = ${SRC:.c=.o}


Index: vobject/icalendar.py
===================================================================
--- vobject/icalendar.py	(revision 219)
+++ vobject/icalendar.py	(working copy)
@@ -1622,11 +1622,19 @@

 # DQUOTE included to work around iCal's penchant for backslash escaping it,
 # although it isn't actually supposed to be escaped according to rfc2445 TEXT
-escapableCharList = '\\;,Nn"'

+# COLON included to work around Address Book's escaping it in vCard data,
+# despite the fact that it is similarly not supposed to be escaped.
+
+# Isn't it a bad idea to be lenient with \" ?
+if True:
+    escapableCharList = '\\;,Nn'
+else:
+    escapableCharList = '\\;:,Nn"'
+
 def stringToTextValues(s, listSeparator=',', charList=None, strict=False):
     """Returns list of strings."""
-
+
     if charList is None:
         charList = escapableCharList

@@ -1675,9 +1683,10 @@
                 else:
                     current.append(char)
             else:
-                state = "read normal"
+                #state = "read normal"
                 # leave unrecognized escaped characters for later passes
-                current.append('\\' + char)
+                #current.append('\\' + char)
+                raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))

         elif state == "end":    #an end state
             if len(current) or len(results) == 0:

Allow colon character to be escaped since this is breaking current clients. In the near future we'll have the server clean up these illegal escapes rather than reject them.

Index: vobject/icalendar.py
===================================================================
--- vobject/icalendar.py	(revision 219)
+++ vobject/icalendar.py	(working copy)
@@ -1622,11 +1622,15 @@

 # DQUOTE included to work around iCal's penchant for backslash escaping it,
 # although it isn't actually supposed to be escaped according to rfc2445 TEXT
-escapableCharList = '\\;,Nn"'

+# COLON included to work around Address Book's escaping it in vCard data,
+# despite the fact that it is similarly not supposed to be escaped.
+
+escapableCharList = '\\;:,Nn'
+
 def stringToTextValues(s, listSeparator=',', charList=None, strict=False):
     """Returns list of strings."""
-
+
     if charList is None:
         charList = escapableCharList

@@ -1675,9 +1679,10 @@
                 else:
                     current.append(char)
             else:
-                state = "read normal"
+                #state = "read normal"
                 # leave unrecognized escaped characters for later passes
-                current.append('\\' + char)
+                #current.append('\\' + char)
+                raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))

         elif state == "end":    #an end state
             if len(current) or len(results) == 0: