diff --git a/cjdns.python3.patch b/cjdns.python3.patch index c76c490..e453167 100644 --- a/cjdns.python3.patch +++ b/cjdns.python3.patch @@ -5,13 +5,5 @@ diff -up ./node_build/dependencies/libuv/gyp_uv.py.python3 ./node_build/dependen -#!/usr/bin/env python +#!/usr/bin/env python2 - import glob + import os import platform -@@ -34,6 +34,7 @@ def compiler_version(): - proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE) - version = proc.communicate()[0].split('.') - version = map(int, version[:2]) -+ if len(version) < 2: version.append(0) - version = tuple(version) - return (version, is_clang) - diff --git a/cjdns.sodium.patch b/cjdns.sodium.patch index e23dc9d..c2e3393 100644 --- a/cjdns.sodium.patch +++ b/cjdns.sodium.patch @@ -72,7 +72,7 @@ diff -up ./contrib/c/privatetopublic.c.sodium ./contrib/c/privatetopublic.c + return 1; + } - Hex_decode(privateKey, 32, privateKeyHexIn, 65); + Hex_decode(privateKey, 32, privateKeyHexIn, 64); crypto_scalarmult_curve25519_base(address.key, privateKey); diff -up ./contrib/c/publictoip6.c.sodium ./contrib/c/publictoip6.c --- ./contrib/c/publictoip6.c.sodium 2017-05-24 16:42:11.085386456 -0400 @@ -140,7 +140,7 @@ diff -up ./crypto/random/randombytes.c.sodium ./crypto/random/randombytes.c diff -up ./node_build/make.js.sodium ./node_build/make.js --- ./node_build/make.js.sodium 2017-02-21 17:56:22.000000000 -0500 +++ ./node_build/make.js 2017-05-24 16:39:15.557233617 -0400 -@@ -244,44 +244,8 @@ Builder.configure({ +@@ -244,48 +244,8 @@ Builder.configure({ }).nThen(function (waitFor) { @@ -165,13 +165,17 @@ diff -up ./node_build/make.js.sodium ./node_build/make.js - - args.unshift(builder.config.optimizeLevel, '-fomit-frame-pointer'); - +- if (!/^\-O0$/.test(builder.config.optimizeLevel)) { +- args.unshift('-D_FORTIFY_SOURCE=2'); +- } +- - if (CFLAGS) { - [].push.apply(args, CFLAGS.split(' ')); - } - - if (!builder.config.crossCompiling) { -- if (NO_MARCH_FLAG.indexOf(process.arch) < -1) { -- builder.config.cflags.push('-march=native'); +- if (NO_MARCH_FLAG.indexOf(process.arch) == -1) { +- args.unshift('-march=native'); - } - } - diff --git a/cjdns.spec b/cjdns.spec index 9624322..db6089f 100644 --- a/cjdns.spec +++ b/cjdns.spec @@ -98,9 +98,11 @@ Patch12: cjdns.sign.patch # Recognize ppc64, ppc64le, and s390x arches Patch13: cjdns.ppc64.patch # getentropy(2) added to glibc in Fedora 26 -Patch14: cjdns.entropy.patch +# included in cjdns-20.1 +#Patch14: cjdns.entropy.patch # Fix buffer overrun in JsonBencSerializer.c -Patch15: cjdns.benc.patch +# included in cjdns-20.1 +#Patch15: cjdns.benc.patch # Specify python2 for systems that default to python3 Patch16: cjdns.python3.patch @@ -223,8 +225,8 @@ fi %patch9 -b .man %patch10 -b .tools #patch13 -b .ppc64 -%patch14 -b .entropy -%patch15 -b .benc +#patch14 -b .entropy +#patch15 -b .benc %patch16 -b .python3 cp %{SOURCE1} README_Fedora.md diff --git a/cjdns.tools.patch b/cjdns.tools.patch index cc6392c..d789d2e 100644 --- a/cjdns.tools.patch +++ b/cjdns.tools.patch @@ -25,6 +25,6 @@ diff -up ./tools/traceroute.tools ./tools/traceroute lastRet = ret; process.stdout.write(' ' + ret.ms + 'ms\n'); + if (!ret || !ret.nodes) { return; } - if (ret.nodes.length === 0) { - console.log('cornered'); - } else if (ret.nodes[0] !== ret.from) { + if (ret.result === 'timeout') { + process.stdout.write('\n' + ret.from + ' ' + ret.result + '!'); + } else if (ret.nodes.length === 0) { diff --git a/cjdns.warnings.patch b/cjdns.warnings.patch index 9042c2c..cb8a72e 100644 --- a/cjdns.warnings.patch +++ b/cjdns.warnings.patch @@ -39,20 +39,6 @@ diff -up ./dht/CJDHTConstants.h.warnings ./dht/CJDHTConstants.h - +#pragma GCC diagnostic pop #endif -diff -up ./dht/dhtcore/NodeStore.c.warnings ./dht/dhtcore/NodeStore.c ---- ./dht/dhtcore/NodeStore.c.warnings 2017-02-21 17:56:22.000000000 -0500 -+++ ./dht/dhtcore/NodeStore.c 2017-02-24 12:44:19.822328184 -0500 -@@ -1770,7 +1770,9 @@ struct NodeList* NodeStore_getPeers(uint - break; - } - switch (j) { -- default: Bits_memmove(out->nodes, &out->nodes[1], (j - 1) * sizeof(char*)); -+ default: -+ Bits_memmove(out->nodes, &out->nodes[1], (j - 1) * sizeof(char*)); -+ Gcc_FALLTHROUGH; - case 1: out->nodes[j - 1] = next->child; - case 0:; - } diff -up ./node_build/dependencies/libuv/test/test-getsockname.c.warnings ./node_build/dependencies/libuv/test/test-getsockname.c --- ./node_build/dependencies/libuv/test/test-getsockname.c.warnings 2017-02-21 17:56:22.000000000 -0500 +++ ./node_build/dependencies/libuv/test/test-getsockname.c 2017-02-24 12:36:55.763819191 -0500