Update to upstream release 17.4

This commit is contained in:
Stuart D. Gathman 2016-06-23 17:22:04 -04:00
parent d7184b7de2
commit cef3e37682
4 changed files with 12 additions and 49 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/cjdns-v17.3.tar.gz
/cjdns-v17.4.tar.gz

View File

@ -38,8 +38,8 @@
Name: cjdns
# major version is cjdns protocol version:
Version: 17.3
Release: 13%{?dist}
Version: 17.4
Release: 1%{?dist}
Summary: The privacy-friendly network without borders
Group: System Environment/Base
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
@ -75,7 +75,7 @@ Patch5: cjdns.sbin.patch
# Patch make.js to use dynamic nacl library
Patch6: cjdns.dyn.patch
# Patch to use _LINUX_CAPABILITY_3
Patch7: cjdns.cap3.patch
#Patch7: cjdns.cap3.patch
# Patch some source files to ignore selected warnings that break gcc6 builds
Patch8: cjdns.warnings.patch
# Man pages
@ -187,8 +187,6 @@ elif test -d %{_includedir}/nacl && test -r %{_libdir}/libnacl.a; then
fi
%endif
%patch7 -b .cap3
%if !0%{?rhel} || 0%{?rhel} > 6
%patch8 -b .warnings
%endif
@ -470,9 +468,15 @@ fi
%{_bindir}/graphStats
%changelog
* Thu Jun 23 2016 Stuart D. Gathman <stuart@gathman.org> 17.4-1
- Update to 17.4 upstream release
- Remove cap3 patch, as it is incorporated upstream
- Remove Constant.js patch, as it is incorporated upstream
* Tue May 3 2016 Stuart D. Gathman <stuart@gathman.org> 17.3-13
- man page for cjdnslog
- Fix running on Fedora as well as openVZ. :-P
- Make cjdns exclusive to nodejs_arches. Rafael Fonseca <rdossant@redhat.com>
* Mon Apr 18 2016 Stuart D. Gathman <stuart@gathman.org> 17.3-12
- Run modprobe only if /dev/tun not present - fixes running on openVZ

View File

@ -51,40 +51,6 @@ diff -up ./node_build/dependencies/libuv/test/test-getsockname.c.warnings ./node
#include "uv.h"
#include "task.h"
diff -up ./util/Constant.js.warnings ./util/Constant.js
--- ./util/Constant.js.warnings 2016-05-09 16:26:54.865933415 -0400
+++ ./util/Constant.js 2016-05-09 16:30:00.541056943 -0400
@@ -62,20 +62,23 @@ var base2 = module.exports.base2 = funct
return '((' + type + ') 0x' + base2ToHex(numStr) + ((type === 'uint64_t') ? 'ull' : 'ul') + ')';
};
+var randomHex = function (bytes) {
+ var hex = '';
+ var len = Number(bytes * 2); // One byte is two hex digits
+ while (hex.length < len) { hex += Math.random().toString(16).substring(2); }
+ return hex.substring(0,len);
+};
+
var rand64 = module.exports.rand64 = function () {
- return '((uint64_t) 0x' +
- (Math.random().toString(16) + Math.random().toString(16)).replace(/0\./g, '') + 'ull)';
+ return '((uint64_t) 0x' + randomHex(64 / 8) + 'ull)';
};
var rand32 = module.exports.rand32 = function () {
- return '((uint32_t) 0x' + Math.random().toString(16).replace(/0\./g, '') + 'ul)';
+ return '((uint32_t) 0x' + randomHex(32 / 8) + 'ul)';
};
var randHexString = module.exports.randHexString = function (lenStr) {
- var hex = '';
- var len = Number(lenStr);
- while (hex.length < len) { hex += Math.random().toString(16).substring(2); }
- return '"' + hex.substring(0,len) + '"';
+ return '"' + randomHex(lenStr / 2) + '"';
};
var log2 = module.exports.log2 = function (val) {
diff -up ./util/platform/netdev/NetPlatform_linux.c.warnings ./util/platform/netdev/NetPlatform_linux.c
--- ./util/platform/netdev/NetPlatform_linux.c.warnings 2016-01-27 03:07:49.000000000 -0500
+++ ./util/platform/netdev/NetPlatform_linux.c 2016-05-03 22:06:45.842528947 -0400
@ -92,20 +58,11 @@ diff -up ./util/platform/netdev/NetPlatform_linux.c.warnings ./util/platform/net
Except_throw(eh, "ioctl(SIOCSIFADDR) failed: [%s]", strerror(err));
}
- uint32_t x = ~0 << (32 - prefixLen);
- uint32_t x = (uint32_t)~0 << (32 - prefixLen);
+ uint32_t x = ~0U << (32 - prefixLen);
x = Endian_hostToBigEndian32(x);
memcpy(&sin.sin_addr, &x, 4);
memcpy(&ifRequest.ifr_addr, &sin, sizeof(struct sockaddr_in));
@@ -213,7 +213,7 @@ void NetPlatform_addRoute(const char* in
struct sockaddr_in sin = { .sin_family = AF_INET, .sin_port = 0 };
memcpy(&sin.sin_addr.s_addr, address, 4);
memcpy(&rt.rt_dst, &sin, sizeof(struct sockaddr));
- sin.sin_addr.s_addr = Endian_hostToBigEndian32(~0 << (32 - prefixLen));
+ sin.sin_addr.s_addr = Endian_hostToBigEndian32(~0U << (32 - prefixLen));
memcpy(&rt.rt_genmask, &sin, sizeof(struct sockaddr));
rt.rt_dev = (char *) interfaceName;
diff -up ./util/platform/Sockaddr.c.warnings ./util/platform/Sockaddr.c
--- ./util/platform/Sockaddr.c.warnings 2016-01-27 03:07:49.000000000 -0500
+++ ./util/platform/Sockaddr.c 2016-05-03 22:06:45.842528947 -0400

View File

@ -1 +1,2 @@
efc62329874a0620a532269a53dbfc85 cjdns-v17.3.tar.gz
e74f25941879e807086a8b70771fcf60 cjdns-v17.4.tar.gz