diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-06-26 13:51:26 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-06-26 13:51:26 +0200 |
commit | a167873c67a17df8175f896750de2d905d0fae04 (patch) | |
tree | e84bd2845b5456ef67e7337f54bdb3cc2e5b7512 /gnu/packages/patches | |
parent | 7c3bea7e6299e1026c7964c83986a6b6c220879a (diff) | |
parent | 7c7323e432620a42f896056f076020a748c1fd6d (diff) | |
download | guix-a167873c67a17df8175f896750de2d905d0fae04.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
3 files changed, 429 insertions, 0 deletions
diff --git a/gnu/packages/patches/dovecot-trees-support-dovecot-2.3.patch b/gnu/packages/patches/dovecot-trees-support-dovecot-2.3.patch new file mode 100644 index 0000000000..314f6b6de0 --- /dev/null +++ b/gnu/packages/patches/dovecot-trees-support-dovecot-2.3.patch @@ -0,0 +1,60 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Mon, 25 Jun 2018 00:34:52 +0200 +Subject: dovecot-trees: Fix build with dovecot 2.3. + +The following patch was taken verbatim from the upstream repository[0] +and will be included in the next release. + +[0]: https://0xacab.org/riseuplabs/trees/commit/e136c32a044701d68b0235b8405357c5fca62a11 +--- +From e136c32a044701d68b0235b8405357c5fca62a11 Mon Sep 17 00:00:00 2001 +From: David Goulet <dgoulet@ev0ke.net> +Date: Tue, 10 Apr 2018 13:48:01 -0400 +Subject: [PATCH] Support dovecot 2.3 + +Untested but it builds now properly. Thanks to "smorks" for the report! + +Fixes #16 + +Signed-off-by: David Goulet <dgoulet@ev0ke.net> +--- + src/trees-istream.c | 4 ++++ + src/trees-ostream.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/src/trees-istream.c b/src/trees-istream.c +index b08ff16..e94be7d 100644 +--- a/src/trees-istream.c ++++ b/src/trees-istream.c +@@ -431,5 +431,9 @@ trees_istream_create(struct istream *input, + sstream->out_byte_count = 0; + #endif + ++#if DOVECOT_PREREQ(2, 3) ++ return i_stream_create(&sstream->istream, input, i_stream_get_fd(input), 0); ++#else + return i_stream_create(&sstream->istream, input, i_stream_get_fd(input)); ++#endif /* DOVECOT_PREREQ */ + } +diff --git a/src/trees-ostream.c b/src/trees-ostream.c +index 1b25a91..0cb7867 100644 +--- a/src/trees-ostream.c ++++ b/src/trees-ostream.c +@@ -174,7 +174,14 @@ trees_ostream_sendv(struct ostream_private *stream, + static int + trees_ostream_flush(struct ostream_private *stream) + { ++ /* This is pretty ugly but unfortunately between 2.2 and 2.3, Dovecot changed ++ * the expected value to be non zero in 2.3+ . */ ++#if DOVECOT_PREREQ(2, 3) ++ ssize_t result = 1; ++#else + ssize_t result = 0; ++#endif /* DOVECOT_PREREQ */ ++ + struct trees_ostream *sstream = (struct trees_ostream *) stream; + + if (sstream->flushed) { +-- +2.17.1 + diff --git a/gnu/packages/patches/java-commons-collections-fix-java8.patch b/gnu/packages/patches/java-commons-collections-fix-java8.patch new file mode 100644 index 0000000000..322fd7f699 --- /dev/null +++ b/gnu/packages/patches/java-commons-collections-fix-java8.patch @@ -0,0 +1,299 @@ +From e760d181abd20ecb98654af63faec7b2a4d61189 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits@gmail.com> +Date: Mon, 25 Jun 2018 15:02:25 +0200 +Subject: [PATCH] Rename removes in maps to fix java8. + +* src/java/org/apache/commons/collections/MultiHashMap.java: +Rename "V MultiHashMap#remove(K, V)" +to "boolean MulitHashMap#removeMapping(K, V)". +* src/java/org/apache/commons/collections/MultiMap.java: +Rename "V MultiMap#remove(K, V)" +to "boolean MultiMap#removeMapping(K, V)". +* src/java/org/apache/commons/collections/map/MultiKeyMap.java: +Rename "V MultiKeyMap#remove(...)" +to "V MultiKeyMap#removeMultiKey(...)". +* src/java/org/apache/commons/collections/map/MultiValueMap.java: +Rename "V MultiValueMap#remove(K, V)" +to "boolean MultiValueMap#removeMapping(K, V)". +* src/test/org/apache/commons/collections/TestMultiHashMap.java: +Adjust accordingly. +* src/test/org/apache/commons/collections/map/TestMultiKeyMap.java: +Adjust accordingly. +* src/test/org/apache/commons/collections/map/TestMultiValueMap.java: +Adjust accordingly. +--- + .../commons/collections/MultiHashMap.java | 8 ++++---- + .../apache/commons/collections/MultiMap.java | 2 +- + .../commons/collections/map/MultiKeyMap.java | 8 ++++---- + .../commons/collections/map/MultiValueMap.java | 8 ++++---- + .../commons/collections/TestMultiHashMap.java | 16 ++++++++-------- + .../collections/map/TestMultiKeyMap.java | 16 ++++++++-------- + .../collections/map/TestMultiValueMap.java | 18 +++++++++--------- + 7 files changed, 38 insertions(+), 38 deletions(-) + +diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java +index 7fec9af..482ecbd 100644 +--- a/src/java/org/apache/commons/collections/MultiHashMap.java ++++ b/src/java/org/apache/commons/collections/MultiHashMap.java +@@ -331,21 +331,21 @@ public class MultiHashMap extends HashMap implements MultiMap { + * @param item the value to remove + * @return the value removed (which was passed in), null if nothing removed + */ +- public Object remove(Object key, Object item) { ++ public boolean removeMapping(Object key, Object item) { + Collection valuesForKey = getCollection(key); + if (valuesForKey == null) { +- return null; ++ return false; + } + boolean removed = valuesForKey.remove(item); + if (removed == false) { +- return null; ++ return false; + } + // remove the list if it is now empty + // (saves space, and allows equals to work) + if (valuesForKey.isEmpty()){ + remove(key); + } +- return item; ++ return true; + } + + /** +diff --git a/src/java/org/apache/commons/collections/MultiMap.java b/src/java/org/apache/commons/collections/MultiMap.java +index be9455b..fe54234 100644 +--- a/src/java/org/apache/commons/collections/MultiMap.java ++++ b/src/java/org/apache/commons/collections/MultiMap.java +@@ -66,7 +66,7 @@ public interface MultiMap extends Map { + * @throws ClassCastException if the key or value is of an invalid type + * @throws NullPointerException if the key or value is null and null is invalid + */ +- public Object remove(Object key, Object item); ++ public boolean removeMapping(Object key, Object item); + + //----------------------------------------------------------------------- + /** +diff --git a/src/java/org/apache/commons/collections/map/MultiKeyMap.java b/src/java/org/apache/commons/collections/map/MultiKeyMap.java +index 9e3e02d..0b99b65 100644 +--- a/src/java/org/apache/commons/collections/map/MultiKeyMap.java ++++ b/src/java/org/apache/commons/collections/map/MultiKeyMap.java +@@ -197,7 +197,7 @@ public class MultiKeyMap + * @param key2 the second key + * @return the value mapped to the removed key, null if key not in map + */ +- public Object remove(Object key1, Object key2) { ++ public Object removeMultiKey(Object key1, Object key2) { + int hashCode = hash(key1, key2); + int index = map.hashIndex(hashCode, map.data.length); + AbstractHashedMap.HashEntry entry = map.data[index]; +@@ -327,7 +327,7 @@ public class MultiKeyMap + * @param key3 the third key + * @return the value mapped to the removed key, null if key not in map + */ +- public Object remove(Object key1, Object key2, Object key3) { ++ public Object removeMultiKey(Object key1, Object key2, Object key3) { + int hashCode = hash(key1, key2, key3); + int index = map.hashIndex(hashCode, map.data.length); + AbstractHashedMap.HashEntry entry = map.data[index]; +@@ -467,7 +467,7 @@ public class MultiKeyMap + * @param key4 the fourth key + * @return the value mapped to the removed key, null if key not in map + */ +- public Object remove(Object key1, Object key2, Object key3, Object key4) { ++ public Object removeMultiKey(Object key1, Object key2, Object key3, Object key4) { + int hashCode = hash(key1, key2, key3, key4); + int index = map.hashIndex(hashCode, map.data.length); + AbstractHashedMap.HashEntry entry = map.data[index]; +@@ -617,7 +617,7 @@ public class MultiKeyMap + * @param key5 the fifth key + * @return the value mapped to the removed key, null if key not in map + */ +- public Object remove(Object key1, Object key2, Object key3, Object key4, Object key5) { ++ public Object removeMultiKey(Object key1, Object key2, Object key3, Object key4, Object key5) { + int hashCode = hash(key1, key2, key3, key4, key5); + int index = map.hashIndex(hashCode, map.data.length); + AbstractHashedMap.HashEntry entry = map.data[index]; +diff --git a/src/java/org/apache/commons/collections/map/MultiValueMap.java b/src/java/org/apache/commons/collections/map/MultiValueMap.java +index f44999b..86eaeb0 100644 +--- a/src/java/org/apache/commons/collections/map/MultiValueMap.java ++++ b/src/java/org/apache/commons/collections/map/MultiValueMap.java +@@ -153,19 +153,19 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap { + * @param value the value to remove + * @return the value removed (which was passed in), null if nothing removed + */ +- public Object remove(Object key, Object value) { ++ public boolean removeMapping(Object key, Object value) { + Collection valuesForKey = getCollection(key); + if (valuesForKey == null) { +- return null; ++ return false; + } + boolean removed = valuesForKey.remove(value); + if (removed == false) { +- return null; ++ return false; + } + if (valuesForKey.isEmpty()) { + remove(key); + } +- return value; ++ return true; + } + + /** +diff --git a/src/test/org/apache/commons/collections/TestMultiHashMap.java b/src/test/org/apache/commons/collections/TestMultiHashMap.java +index eca833a..a1de943 100644 +--- a/src/test/org/apache/commons/collections/TestMultiHashMap.java ++++ b/src/test/org/apache/commons/collections/TestMultiHashMap.java +@@ -217,7 +217,7 @@ public class TestMultiHashMap extends AbstractTestMap { + MultiHashMap one = new MultiHashMap(); + Integer value = new Integer(1); + one.put("One", value); +- one.remove("One", value); ++ one.removeMapping("One", value); + + MultiHashMap two = new MultiHashMap(); + assertEquals(two, one); +@@ -269,7 +269,7 @@ public class TestMultiHashMap extends AbstractTestMap { + assertEquals(4, map.totalSize()); + map.remove("A"); + assertEquals(3, map.totalSize()); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(2, map.totalSize()); + } + +@@ -292,7 +292,7 @@ public class TestMultiHashMap extends AbstractTestMap { + map.remove("A"); + assertEquals(0, map.size("A")); + assertEquals(3, map.size("B")); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(0, map.size("A")); + assertEquals(2, map.size("B")); + } +@@ -464,11 +464,11 @@ public class TestMultiHashMap extends AbstractTestMap { + map.put("A", "AA"); + map.put("A", "AB"); + map.put("A", "AC"); +- assertEquals(null, map.remove("C", "CA")); +- assertEquals(null, map.remove("A", "AD")); +- assertEquals("AC", map.remove("A", "AC")); +- assertEquals("AB", map.remove("A", "AB")); +- assertEquals("AA", map.remove("A", "AA")); ++ assertEquals(false, map.removeMapping("C", "CA")); ++ assertEquals(false, map.removeMapping("A", "AD")); ++ assertEquals(true, map.removeMapping("A", "AC")); ++ assertEquals(true, map.removeMapping("A", "AB")); ++ assertEquals(true, map.removeMapping("A", "AA")); + assertEquals(new MultiHashMap(), map); + } + +diff --git a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java +index b1ee3d0..b18f480 100644 +--- a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java ++++ b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java +@@ -315,34 +315,34 @@ public class TestMultiKeyMap extends AbstractTestIterableMap { + switch (key.size()) { + case 2: + assertEquals(true, multimap.containsKey(key.getKey(0), key.getKey(1))); +- assertEquals(value, multimap.remove(key.getKey(0), key.getKey(1))); ++ assertEquals(value, multimap.removeMultiKey(key.getKey(0), key.getKey(1))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); + assertEquals(size - 1, multimap.size()); +- assertEquals(null, multimap.remove(key.getKey(0), key.getKey(1))); ++ assertEquals(null, multimap.removeMultiKey(key.getKey(0), key.getKey(1))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); + break; + case 3: + assertEquals(true, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2))); +- assertEquals(value, multimap.remove(key.getKey(0), key.getKey(1), key.getKey(2))); ++ assertEquals(value, multimap.removeMultiKey(key.getKey(0), key.getKey(1), key.getKey(2))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2))); + assertEquals(size - 1, multimap.size()); +- assertEquals(null, multimap.remove(key.getKey(0), key.getKey(1), key.getKey(2))); ++ assertEquals(null, multimap.removeMultiKey(key.getKey(0), key.getKey(1), key.getKey(2))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2))); + break; + case 4: + assertEquals(true, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3))); +- assertEquals(value, multimap.remove(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3))); ++ assertEquals(value, multimap.removeMultiKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3))); + assertEquals(size - 1, multimap.size()); +- assertEquals(null, multimap.remove(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3))); ++ assertEquals(null, multimap.removeMultiKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3))); + break; + case 5: + assertEquals(true, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3), key.getKey(4))); +- assertEquals(value, multimap.remove(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3), key.getKey(4))); ++ assertEquals(value, multimap.removeMultiKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3), key.getKey(4))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3), key.getKey(4))); + assertEquals(size - 1, multimap.size()); +- assertEquals(null, multimap.remove(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3), key.getKey(4))); ++ assertEquals(null, multimap.removeMultiKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3), key.getKey(4))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1), key.getKey(2), key.getKey(3), key.getKey(4))); + break; + default: +diff --git a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java +index b9a5ac8..9ecc269 100644 +--- a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java ++++ b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java +@@ -161,7 +161,7 @@ public class TestMultiValueMap extends TestCase { + MultiValueMap one = new MultiValueMap(); + Integer value = new Integer(1); + one.put("One", value); +- one.remove("One", value); ++ one.removeMapping("One", value); + + MultiValueMap two = new MultiValueMap(); + assertEquals(two, one); +@@ -187,7 +187,7 @@ public class TestMultiValueMap extends TestCase { + assertEquals(4, map.totalSize()); + map.remove("A"); + assertEquals(3, map.totalSize()); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(2, map.totalSize()); + } + +@@ -204,7 +204,7 @@ public class TestMultiValueMap extends TestCase { + assertEquals(2, map.size()); + map.remove("A"); + assertEquals(2, map.size()); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(2, map.size()); + } + +@@ -227,7 +227,7 @@ public class TestMultiValueMap extends TestCase { + map.remove("A"); + assertEquals(0, map.size("A")); + assertEquals(3, map.size("B")); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(0, map.size("A")); + assertEquals(2, map.size("B")); + } +@@ -338,11 +338,11 @@ public class TestMultiValueMap extends TestCase { + map.put("A", "AA"); + map.put("A", "AB"); + map.put("A", "AC"); +- assertEquals(null, map.remove("C", "CA")); +- assertEquals(null, map.remove("A", "AD")); +- assertEquals("AC", map.remove("A", "AC")); +- assertEquals("AB", map.remove("A", "AB")); +- assertEquals("AA", map.remove("A", "AA")); ++ assertEquals(false, map.removeMapping("C", "CA")); ++ assertEquals(false, map.removeMapping("A", "AD")); ++ assertEquals(true, map.removeMapping("A", "AC")); ++ assertEquals(true, map.removeMapping("A", "AB")); ++ assertEquals(true, map.removeMapping("A", "AA")); + assertEquals(new MultiValueMap(), map); + } + +-- +2.18.0 + diff --git a/gnu/packages/patches/nyx-show-header-stats-with-python3.patch b/gnu/packages/patches/nyx-show-header-stats-with-python3.patch new file mode 100644 index 0000000000..5b20f180f7 --- /dev/null +++ b/gnu/packages/patches/nyx-show-header-stats-with-python3.patch @@ -0,0 +1,70 @@ +From: Tobias Geerinckx-Rice <me@tobias.gr> +Date: Fri, 22 Jun 2018 02:56:39 +0200 +Subject: nyx: Show header stats. + +The following patch was taken verbatim from the upstream repository and +will be included in the next release. +--- +commit 3494111cc81ad4985e81d0c1ea5e451d8f7a2bcc +Author: Damian Johnson <atagar@torproject.org> +Date: Mon Feb 5 20:07:40 2018 -0800 + + Header stats missing with python3 + + Ick! took me a while to find this. Python3 changed division from providing ints + to floats. This in turn caused our header panel to call addstr with float x/y + coordinates, which made that funciton fail silently. End result is that when + the header panel showed two columns of stats the right column was missing. + + Caught thanks to Stijn. + +diff --git a/nyx/panel/header.py b/nyx/panel/header.py +index 09e3838..fb6f2f7 100644 +--- a/nyx/panel/header.py ++++ b/nyx/panel/header.py +@@ -155,7 +155,7 @@ class HeaderPanel(nyx.panel.DaemonPanel): + # space available for content + + interface = nyx_interface() +- left_width = max(subwindow.width / 2, 77) if is_wide else subwindow.width ++ left_width = max(subwindow.width // 2, 77) if is_wide else subwindow.width + right_width = subwindow.width - left_width + + _draw_platform_section(subwindow, 0, 0, left_width, vals) +diff --git a/web/changelog/index.html b/web/changelog/index.html +index 333fa84..196d82b 100644 +--- a/web/changelog/index.html ++++ b/web/changelog/index.html +@@ -74,6 +74,12 @@ + </ul> + </li> + ++ <li><span class="component">Header</span> ++ <ul> ++ <li>Right column of stats missing when using python 3.x</li> ++ </ul> ++ </li> ++ + <li><span class="component">Connections</span> + <ul> + <li>Geoip information unavailable for inbound connections</li> +diff --git a/web/changelog/legacy.html b/web/changelog/legacy.html +index a380806..02d405f 100644 +--- a/web/changelog/legacy.html ++++ b/web/changelog/legacy.html +@@ -137,13 +137,13 @@ + </ul> + </li> + +- <li><span class="component">Startup</span> ++ <li><span class="component">Graph</span> + <ul> + <li>Crash when pausing if we showed accounting stats</li> + </ul> + </li> + +- <li><span class="component">Startup</span> ++ <li><span class="component">Logging</span> + <ul> + <li>Skip reading from malformed tor log files</li> + <li>Unable to log GUARD events</li> |