Merge branch 'master' into epel7
This commit is contained in:
commit
eed83b8fdb
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,3 +17,5 @@
|
|||||||
/cjdns-v20.6.tar.gz
|
/cjdns-v20.6.tar.gz
|
||||||
/cjdns-v20.7.tar.gz
|
/cjdns-v20.7.tar.gz
|
||||||
/cjdns-v21.tar.gz
|
/cjdns-v21.tar.gz
|
||||||
|
/python-cjdns-0.2.tar.gz
|
||||||
|
/cjdns-v21.1.tar.gz
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
diff -up ./memory/Allocator.c.32bit ./memory/Allocator.c
|
|
||||||
--- ./memory/Allocator.c.32bit 2020-09-29 14:10:32.115169486 -0400
|
|
||||||
+++ ./memory/Allocator.c 2020-09-29 14:16:54.682448839 -0400
|
|
||||||
@@ -59,8 +59,8 @@ static void unroll(struct Allocator_pvt*
|
|
||||||
writeUnroller(&childUnroller);
|
|
||||||
fprintf(stderr, "%s:%ld [%lu] bytes at [0x%lx]\n",
|
|
||||||
allocation->fileName,
|
|
||||||
- allocation->lineNum,
|
|
||||||
- allocation->pub.size,
|
|
||||||
+ (long)allocation->lineNum,
|
|
||||||
+ (unsigned long)allocation->pub.size,
|
|
||||||
(long)(uintptr_t)allocation);
|
|
||||||
allocation = allocation->next;
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
diff -up ./contrib/selinux/cjdns.te.el6 ./contrib/selinux/cjdns.te
|
|
||||||
--- ./contrib/selinux/cjdns.te.el6 2016-02-25 20:26:20.635992411 -0500
|
|
||||||
+++ ./contrib/selinux/cjdns.te 2016-02-25 20:28:05.804135692 -0500
|
|
||||||
@@ -5,9 +5,7 @@ require {
|
|
||||||
type tun_tap_device_t;
|
|
||||||
type node_t;
|
|
||||||
type port_t;
|
|
||||||
- type unreserved_port_t;
|
|
||||||
type tmp_t;
|
|
||||||
- type passwd_file_t;
|
|
||||||
type net_conf_t;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -20,15 +18,12 @@ init_daemon_domain(cjdns_t,cjdns_exec_t)
|
|
||||||
allow cjdns_t cjdns_exec_t:file { execute_no_trans execmod };
|
|
||||||
allow cjdns_t self:capability { net_admin net_raw setuid setgid sys_chroot };
|
|
||||||
allow cjdns_t self:process { signal getcap setrlimit setcap };
|
|
||||||
-# translate username to uid
|
|
||||||
-allow cjdns_t passwd_file_t:file { read getattr open };
|
|
||||||
|
|
||||||
# translate host names
|
|
||||||
allow cjdns_t net_conf_t:file { read getattr open };
|
|
||||||
# allow network access
|
|
||||||
allow cjdns_t node_t:udp_socket node_bind;
|
|
||||||
allow cjdns_t port_t:udp_socket name_bind;
|
|
||||||
-allow cjdns_t unreserved_port_t:udp_socket name_bind;
|
|
||||||
allow cjdns_t self:netlink_route_socket { bind create getattr nlmsg_read read write nlmsg_write };
|
|
||||||
allow cjdns_t self:packet_socket { bind create ioctl read write };
|
|
||||||
allow cjdns_t self:tun_socket create;
|
|
||||||
diff -up ./node_build/FindPython2.js.el6 ./node_build/FindPython2.js
|
|
||||||
--- ./node_build/FindPython2.js.el6 2016-01-27 03:07:49.000000000 -0500
|
|
||||||
+++ ./node_build/FindPython2.js 2016-02-25 20:26:20.636992421 -0500
|
|
||||||
@@ -21,7 +21,7 @@ var PYTHONS = ["python", "python2", "pyt
|
|
||||||
var SCRIPT = [
|
|
||||||
'import sys;',
|
|
||||||
'print(sys.version_info);',
|
|
||||||
- 'exit(sys.version_info[0] != 2 or sys.version_info[1] < 7);'
|
|
||||||
+ 'exit(sys.version_info[0] != 2 or sys.version_info[1] < 6);'
|
|
||||||
].join('\n');
|
|
||||||
|
|
||||||
var find = module.exports.find = function (tempFile, callback) {
|
|
@ -1,40 +1,3 @@
|
|||||||
diff -up ./crypto/CryptoAuth.c.sign ./crypto/CryptoAuth.c
|
|
||||||
--- ./crypto/CryptoAuth.c.sign 2020-09-18 14:24:44.000000000 -0400
|
|
||||||
+++ ./crypto/CryptoAuth.c 2020-09-29 10:32:39.040375439 -0400
|
|
||||||
@@ -85,8 +85,10 @@ static inline void getSharedSecret(uint8
|
|
||||||
uint8_t passwordHash[32],
|
|
||||||
struct Log* logger)
|
|
||||||
{
|
|
||||||
+ int keygenfailed;
|
|
||||||
if (passwordHash == NULL) {
|
|
||||||
- crypto_box_curve25519xsalsa20poly1305_beforenm(outputSecret, herPublicKey, myPrivateKey);
|
|
||||||
+ keygenfailed = crypto_box_curve25519xsalsa20poly1305_beforenm(
|
|
||||||
+ outputSecret, herPublicKey, myPrivateKey);
|
|
||||||
} else {
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
@@ -96,7 +98,8 @@ static inline void getSharedSecret(uint8
|
|
||||||
uint8_t bytes[64];
|
|
||||||
} buff;
|
|
||||||
|
|
||||||
- crypto_scalarmult_curve25519(buff.components.key, myPrivateKey, herPublicKey);
|
|
||||||
+ keygenfailed = crypto_scalarmult_curve25519(
|
|
||||||
+ buff.components.key, myPrivateKey, herPublicKey);
|
|
||||||
Bits_memcpy(buff.components.passwd, passwordHash, 32);
|
|
||||||
crypto_hash_sha256(outputSecret, buff.bytes, 64);
|
|
||||||
}
|
|
||||||
@@ -114,8 +117,9 @@ static inline void getSharedSecret(uint8
|
|
||||||
" myPublicKey=%s\n"
|
|
||||||
" herPublicKey=%s\n"
|
|
||||||
" passwordHash=%s\n"
|
|
||||||
- " outputSecret=%s\n",
|
|
||||||
- myPublicKeyHex, herPublicKeyHex, passwordHashHex, outputSecretHex);
|
|
||||||
+ " outputSecret=%s\n"
|
|
||||||
+ " keygenfailed=%d\n",
|
|
||||||
+ myPublicKeyHex, herPublicKeyHex, passwordHashHex, outputSecretHex,keygenfailed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diff -up ./crypto/Sign.c.sign ./crypto/Sign.c
|
diff -up ./crypto/Sign.c.sign ./crypto/Sign.c
|
||||||
--- ./crypto/Sign.c.sign 2020-09-18 14:24:44.000000000 -0400
|
--- ./crypto/Sign.c.sign 2020-09-18 14:24:44.000000000 -0400
|
||||||
+++ ./crypto/Sign.c 2020-09-29 10:25:02.503986487 -0400
|
+++ ./crypto/Sign.c 2020-09-29 10:25:02.503986487 -0400
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
diff -up ./client/cjdroute2.c.sodium ./client/cjdroute2.c
|
diff -up ./client/cjdroute2.c.sodium ./client/cjdroute2.c
|
||||||
--- ./client/cjdroute2.c.sodium 2020-09-28 22:33:15.839316844 -0400
|
--- ./client/cjdroute2.c.sodium 2020-12-16 14:14:51.140783237 -0500
|
||||||
+++ ./client/cjdroute2.c 2020-09-28 22:34:40.219680315 -0400
|
+++ ./client/cjdroute2.c 2020-12-16 14:14:51.146783327 -0500
|
||||||
@@ -64,6 +64,7 @@
|
@@ -64,6 +64,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -9,7 +9,7 @@ diff -up ./client/cjdroute2.c.sodium ./client/cjdroute2.c
|
|||||||
|
|
||||||
#define DEFAULT_TUN_DEV "tun0"
|
#define DEFAULT_TUN_DEV "tun0"
|
||||||
|
|
||||||
@@ -598,6 +599,9 @@ static String* getPipePath(Dict* config,
|
@@ -597,6 +598,9 @@ static String* getPipePath(Dict* config,
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
@ -20,8 +20,8 @@ diff -up ./client/cjdroute2.c.sodium ./client/cjdroute2.c
|
|||||||
fprintf(stderr, "Log_LEVEL = KEYS, EXPECT TO SEE PRIVATE KEYS IN YOUR LOGS!\n");
|
fprintf(stderr, "Log_LEVEL = KEYS, EXPECT TO SEE PRIVATE KEYS IN YOUR LOGS!\n");
|
||||||
#endif
|
#endif
|
||||||
diff -up ./contrib/c/makekeys.c.sodium ./contrib/c/makekeys.c
|
diff -up ./contrib/c/makekeys.c.sodium ./contrib/c/makekeys.c
|
||||||
--- ./contrib/c/makekeys.c.sodium 2020-09-18 14:24:44.000000000 -0400
|
--- ./contrib/c/makekeys.c.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./contrib/c/makekeys.c 2020-09-28 22:33:15.853317070 -0400
|
+++ ./contrib/c/makekeys.c 2020-12-16 14:14:51.147783342 -0500
|
||||||
@@ -22,9 +22,13 @@
|
@@ -22,9 +22,13 @@
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -37,8 +37,8 @@ diff -up ./contrib/c/makekeys.c.sodium ./contrib/c/makekeys.c
|
|||||||
struct Random* rand = Random_new(alloc, NULL, NULL);
|
struct Random* rand = Random_new(alloc, NULL, NULL);
|
||||||
|
|
||||||
diff -up ./contrib/c/mkpasswd.c.sodium ./contrib/c/mkpasswd.c
|
diff -up ./contrib/c/mkpasswd.c.sodium ./contrib/c/mkpasswd.c
|
||||||
--- ./contrib/c/mkpasswd.c.sodium 2020-09-18 14:24:44.000000000 -0400
|
--- ./contrib/c/mkpasswd.c.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./contrib/c/mkpasswd.c 2020-09-28 22:33:15.853317070 -0400
|
+++ ./contrib/c/mkpasswd.c 2020-12-16 14:14:51.147783342 -0500
|
||||||
@@ -18,9 +18,13 @@
|
@@ -18,9 +18,13 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -54,8 +54,8 @@ diff -up ./contrib/c/mkpasswd.c.sodium ./contrib/c/mkpasswd.c
|
|||||||
struct Random* rand = Random_new(alloc, NULL, NULL);
|
struct Random* rand = Random_new(alloc, NULL, NULL);
|
||||||
|
|
||||||
diff -up ./contrib/c/privatetopublic.c.sodium ./contrib/c/privatetopublic.c
|
diff -up ./contrib/c/privatetopublic.c.sodium ./contrib/c/privatetopublic.c
|
||||||
--- ./contrib/c/privatetopublic.c.sodium 2020-09-18 14:24:44.000000000 -0400
|
--- ./contrib/c/privatetopublic.c.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./contrib/c/privatetopublic.c 2020-09-28 22:33:15.853317070 -0400
|
+++ ./contrib/c/privatetopublic.c 2020-12-16 14:14:51.147783342 -0500
|
||||||
@@ -23,6 +23,7 @@
|
@@ -23,6 +23,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -75,8 +75,8 @@ diff -up ./contrib/c/privatetopublic.c.sodium ./contrib/c/privatetopublic.c
|
|||||||
Hex_decode(privateKey, 32, privateKeyHexIn, 64);
|
Hex_decode(privateKey, 32, privateKeyHexIn, 64);
|
||||||
crypto_scalarmult_curve25519_base(address.key, privateKey);
|
crypto_scalarmult_curve25519_base(address.key, privateKey);
|
||||||
diff -up ./contrib/c/publictoip6.c.sodium ./contrib/c/publictoip6.c
|
diff -up ./contrib/c/publictoip6.c.sodium ./contrib/c/publictoip6.c
|
||||||
--- ./contrib/c/publictoip6.c.sodium 2020-09-18 14:24:44.000000000 -0400
|
--- ./contrib/c/publictoip6.c.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./contrib/c/publictoip6.c 2020-09-28 22:33:15.853317070 -0400
|
+++ ./contrib/c/publictoip6.c 2020-12-16 14:14:51.147783342 -0500
|
||||||
@@ -16,6 +16,7 @@
|
@@ -16,6 +16,7 @@
|
||||||
#include "util/AddrTools.h"
|
#include "util/AddrTools.h"
|
||||||
#include "util/CString.h"
|
#include "util/CString.h"
|
||||||
@ -96,8 +96,8 @@ diff -up ./contrib/c/publictoip6.c.sodium ./contrib/c/publictoip6.c
|
|||||||
int ret = Key_parse(&key, keyBytes, ip6Bytes);
|
int ret = Key_parse(&key, keyBytes, ip6Bytes);
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
diff -up ./contrib/c/sybilsim.c.sodium ./contrib/c/sybilsim.c
|
diff -up ./contrib/c/sybilsim.c.sodium ./contrib/c/sybilsim.c
|
||||||
--- ./contrib/c/sybilsim.c.sodium 2020-09-18 14:24:44.000000000 -0400
|
--- ./contrib/c/sybilsim.c.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./contrib/c/sybilsim.c 2020-09-28 22:33:15.853317070 -0400
|
+++ ./contrib/c/sybilsim.c 2020-12-16 14:14:51.148783357 -0500
|
||||||
@@ -42,6 +42,7 @@
|
@@ -42,6 +42,7 @@
|
||||||
#include "crypto_scalarmult_curve25519.h"
|
#include "crypto_scalarmult_curve25519.h"
|
||||||
|
|
||||||
@ -117,8 +117,8 @@ diff -up ./contrib/c/sybilsim.c.sodium ./contrib/c/sybilsim.c
|
|||||||
struct Allocator* alloc = MallocAllocator_new(1LL<<31);
|
struct Allocator* alloc = MallocAllocator_new(1LL<<31);
|
||||||
|
|
||||||
diff -up ./crypto/random/randombytes.c.sodium ./crypto/random/randombytes.c
|
diff -up ./crypto/random/randombytes.c.sodium ./crypto/random/randombytes.c
|
||||||
--- ./crypto/random/randombytes.c.sodium 2020-09-18 14:24:44.000000000 -0400
|
--- ./crypto/random/randombytes.c.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./crypto/random/randombytes.c 2020-09-28 22:33:15.853317070 -0400
|
+++ ./crypto/random/randombytes.c 2020-12-16 14:14:51.148783357 -0500
|
||||||
@@ -17,6 +17,7 @@
|
@@ -17,6 +17,7 @@
|
||||||
#include "memory/MallocAllocator.h"
|
#include "memory/MallocAllocator.h"
|
||||||
|
|
||||||
@ -138,9 +138,9 @@ diff -up ./crypto/random/randombytes.c.sodium ./crypto/random/randombytes.c
|
|||||||
Random_bytes(rand, str.buff, 4096);
|
Random_bytes(rand, str.buff, 4096);
|
||||||
out = write(STDOUT_FILENO, str.buff, 4096);
|
out = write(STDOUT_FILENO, str.buff, 4096);
|
||||||
diff -up ./node_build/make.js.sodium ./node_build/make.js
|
diff -up ./node_build/make.js.sodium ./node_build/make.js
|
||||||
--- ./node_build/make.js.sodium 2020-09-18 14:24:44.000000000 -0400
|
--- ./node_build/make.js.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./node_build/make.js 2020-09-28 22:33:15.853317070 -0400
|
+++ ./node_build/make.js 2020-12-16 14:15:59.646810621 -0500
|
||||||
@@ -264,48 +264,8 @@ Builder.configure({
|
@@ -251,49 +251,8 @@ Builder.configure({
|
||||||
|
|
||||||
}).nThen(function (waitFor) {
|
}).nThen(function (waitFor) {
|
||||||
|
|
||||||
@ -157,15 +157,16 @@ diff -up ./node_build/make.js.sodium ./node_build/make.js
|
|||||||
- var cwd = process.cwd();
|
- var cwd = process.cwd();
|
||||||
- process.chdir(dependencyDir + '/cnacl/');
|
- process.chdir(dependencyDir + '/cnacl/');
|
||||||
-
|
-
|
||||||
|
- // $FlowFixMe non-static require
|
||||||
- var NaCl = require(process.cwd() + '/node_build/make.js');
|
- var NaCl = require(process.cwd() + '/node_build/make.js');
|
||||||
- NaCl.build(function (args, callback) {
|
- NaCl.build(function (args, callback) {
|
||||||
- if (builder.config.systemName !== 'win32') {
|
- if (builder.config.systemName !== 'win32') {
|
||||||
- args.unshift('-fPIC');
|
- args.unshift('-fPIC');
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- args.unshift(builder.config.optimizeLevel, '-fomit-frame-pointer');
|
- args.unshift(optimizeLevel, '-fomit-frame-pointer');
|
||||||
-
|
-
|
||||||
- if (!/^\-O0$/.test(builder.config.optimizeLevel)) {
|
- if (!/^\-O0$/.test(optimizeLevel)) {
|
||||||
- args.unshift('-D_FORTIFY_SOURCE=2');
|
- args.unshift('-D_FORTIFY_SOURCE=2');
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
@ -191,7 +192,7 @@ diff -up ./node_build/make.js.sodium ./node_build/make.js
|
|||||||
|
|
||||||
}).nThen(function (waitFor) {
|
}).nThen(function (waitFor) {
|
||||||
|
|
||||||
@@ -452,7 +412,7 @@ Builder.configure({
|
@@ -440,7 +399,7 @@ Builder.configure({
|
||||||
builder.buildExecutable('crypto/random/randombytes.c');
|
builder.buildExecutable('crypto/random/randombytes.c');
|
||||||
|
|
||||||
builder.lintFiles(function (fileName, file, callback) {
|
builder.lintFiles(function (fileName, file, callback) {
|
||||||
@ -200,9 +201,16 @@ diff -up ./node_build/make.js.sodium ./node_build/make.js
|
|||||||
callback('', false);
|
callback('', false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -471,4 +430,4 @@ Builder.configure({
|
||||||
|
console.log('\x1b[1;31mFailed to build cjdns.\x1b[0m');
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
|
-});
|
||||||
|
\ No newline at end of file
|
||||||
|
+});
|
||||||
diff -up ./test/testcjdroute.c.sodium ./test/testcjdroute.c
|
diff -up ./test/testcjdroute.c.sodium ./test/testcjdroute.c
|
||||||
--- ./test/testcjdroute.c.sodium 2020-09-28 22:33:15.854317087 -0400
|
--- ./test/testcjdroute.c.sodium 2020-10-05 17:46:19.000000000 -0400
|
||||||
+++ ./test/testcjdroute.c 2020-09-28 22:36:34.386525092 -0400
|
+++ ./test/testcjdroute.c 2020-12-16 14:14:51.148783357 -0500
|
||||||
@@ -26,6 +26,7 @@
|
@@ -26,6 +26,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -211,7 +219,7 @@ diff -up ./test/testcjdroute.c.sodium ./test/testcjdroute.c
|
|||||||
|
|
||||||
#ifdef SUBNODE
|
#ifdef SUBNODE
|
||||||
#define testcjdroute_SUBNODE 1
|
#define testcjdroute_SUBNODE 1
|
||||||
@@ -272,6 +273,9 @@ static int main2(int argc, char** argv,
|
@@ -269,6 +270,9 @@ static int main2(int argc, char** argv,
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
49
cjdns.spec
49
cjdns.spec
@ -14,11 +14,7 @@
|
|||||||
%bcond_without libsodium
|
%bcond_without libsodium
|
||||||
# Option to disable SECCOMP: confusing backward logic
|
# Option to disable SECCOMP: confusing backward logic
|
||||||
# Needed to run on openvz and other container systems
|
# Needed to run on openvz and other container systems
|
||||||
%ifarch armv7hl
|
|
||||||
%bcond_with seccomp
|
|
||||||
%else
|
|
||||||
%bcond_without seccomp
|
%bcond_without seccomp
|
||||||
%endif
|
|
||||||
# Option to use system libuv instead of bundled libuv-0.11.19
|
# Option to use system libuv instead of bundled libuv-0.11.19
|
||||||
%bcond_with libuv
|
%bcond_with libuv
|
||||||
# When with_python3 is set, this replaces tools in bin and libexec
|
# When with_python3 is set, this replaces tools in bin and libexec
|
||||||
@ -56,17 +52,8 @@
|
|||||||
%global nacl_lib %{_libdir}/libnacl.so
|
%global nacl_lib %{_libdir}/libnacl.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} >= 5 && 0%{?rhel} < 7
|
|
||||||
%global use_systemd 0
|
|
||||||
%else
|
|
||||||
%global use_systemd 1
|
%global use_systemd 1
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?rhel} == 6
|
|
||||||
%global use_upstart 1
|
|
||||||
%else
|
|
||||||
%global use_upstart 0
|
%global use_upstart 0
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0 && 0%{?fedora} > 30
|
%if 0 && 0%{?fedora} > 30
|
||||||
%global use_marked 1
|
%global use_marked 1
|
||||||
@ -87,7 +74,7 @@
|
|||||||
|
|
||||||
Name: cjdns
|
Name: cjdns
|
||||||
# major version is cjdns protocol version:
|
# major version is cjdns protocol version:
|
||||||
Version: 21
|
Version: 21.1
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: The privacy-friendly network without borders
|
Summary: The privacy-friendly network without borders
|
||||||
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
|
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
|
||||||
@ -102,13 +89,11 @@ Source2: cjdns.service
|
|||||||
Source3: https://github.com/kapouer/marked-man/archive/0.7.0.tar.gz#/marked-man-0.7.0.tar.gz
|
Source3: https://github.com/kapouer/marked-man/archive/0.7.0.tar.gz#/marked-man-0.7.0.tar.gz
|
||||||
%endif
|
%endif
|
||||||
# Contributed python API hacked for python3
|
# Contributed python API hacked for python3
|
||||||
Source4: python-cjdns-0.1.tar.gz
|
Source4: python-cjdns-0.2.tar.gz
|
||||||
# Add targeted selinux policy
|
# Add targeted selinux policy
|
||||||
Patch0: cjdns.selinux.patch
|
Patch0: cjdns.selinux.patch
|
||||||
# Allow python2.6 for build. Python is not used during the build
|
# Patch warnings detected by gcc-11
|
||||||
# process. The python tools allegedly depend on python2.7, but that can
|
Patch2: cjdns.warnings.patch
|
||||||
# be in Requires for the subpackage.
|
|
||||||
Patch1: cjdns.el6.patch
|
|
||||||
# Fix RLIMIT_NPROC - setuid() bug. In its low priv process, cjdroute calls
|
# Fix RLIMIT_NPROC - setuid() bug. In its low priv process, cjdroute calls
|
||||||
#
|
#
|
||||||
# setrlimit(RLIMIT_NPROC, &(struct rlimit){ 0, 0 })
|
# setrlimit(RLIMIT_NPROC, &(struct rlimit){ 0, 0 })
|
||||||
@ -155,8 +140,6 @@ Patch18: cjdns.libuv.patch
|
|||||||
Patch20: cjdns.sysctl.patch
|
Patch20: cjdns.sysctl.patch
|
||||||
# gcc-10 no longer allows duplicate globals
|
# gcc-10 no longer allows duplicate globals
|
||||||
Patch22: cjdns.gcc10.patch
|
Patch22: cjdns.gcc10.patch
|
||||||
# Patches for 32-bit builds
|
|
||||||
Patch23: cjdns.32bit.patch
|
|
||||||
|
|
||||||
%if %{use_marked}
|
%if %{use_marked}
|
||||||
BuildRequires: nodejs, nodejs-marked
|
BuildRequires: nodejs, nodejs-marked
|
||||||
@ -282,9 +265,14 @@ Requires: python3-%{name} = %{version}-%{release}
|
|||||||
Requires: python3-networkx
|
Requires: python3-networkx
|
||||||
%else
|
%else
|
||||||
Requires: python2-%{name} = %{version}-%{release}
|
Requires: python2-%{name} = %{version}-%{release}
|
||||||
|
%if 0%{?rhel} == 7
|
||||||
|
Requires: python-networkx
|
||||||
|
Requires: python2-matplotlib
|
||||||
|
%else
|
||||||
Requires: python2-networkx
|
Requires: python2-networkx
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description graph
|
%description graph
|
||||||
@ -293,9 +281,6 @@ Python peer graph tools for cjdns.
|
|||||||
%prep
|
%prep
|
||||||
%setup -qn cjdns-%{name}-v%{version}
|
%setup -qn cjdns-%{name}-v%{version}
|
||||||
%patch0 -b .selinux
|
%patch0 -b .selinux
|
||||||
%if 0%{?rhel} == 6
|
|
||||||
%patch1 -b .el6
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%patch4 -b .genconf
|
%patch4 -b .genconf
|
||||||
%patch5 -b .sbin
|
%patch5 -b .sbin
|
||||||
@ -353,7 +338,7 @@ sed -i -e '/var PYTHONS =/ s/python3.7/python2.7/' node_build/FindPython.js
|
|||||||
#patch19 -p1 -b .fuzz
|
#patch19 -p1 -b .fuzz
|
||||||
#patch20 -p1 -b .sysctl
|
#patch20 -p1 -b .sysctl
|
||||||
#patch22 -b .gcc10
|
#patch22 -b .gcc10
|
||||||
%patch23 -b .32bit
|
%patch2 -b .warn
|
||||||
|
|
||||||
cp %{SOURCE1} README_Fedora.md
|
cp %{SOURCE1} README_Fedora.md
|
||||||
|
|
||||||
@ -370,10 +355,8 @@ find tools -type f | xargs grep -l '^#!\/usr\/bin\/env ' |
|
|||||||
xargs sed -e '1 s,^#!/usr/bin/env ,#!/usr/bin/,' -i
|
xargs sed -e '1 s,^#!/usr/bin/env ,#!/usr/bin/,' -i
|
||||||
|
|
||||||
# Fix deprecated Buffer ctor except on EL6
|
# Fix deprecated Buffer ctor except on EL6
|
||||||
%if 0%{?rhel} != 6
|
|
||||||
sed -e '1,$ s/new Buffer/Buffer.from/' -i \
|
sed -e '1,$ s/new Buffer/Buffer.from/' -i \
|
||||||
tools/lib/publicToIp6.js tools/lib/cjdnsadmin/cjdnsadmin.js
|
tools/lib/publicToIp6.js tools/lib/cjdnsadmin/cjdnsadmin.js
|
||||||
%endif
|
|
||||||
|
|
||||||
# Remove unpackaged code with undeclared licenses
|
# Remove unpackaged code with undeclared licenses
|
||||||
%if !%{with_admin}
|
%if !%{with_admin}
|
||||||
@ -770,6 +753,18 @@ fi
|
|||||||
%{_bindir}/graphStats
|
%{_bindir}/graphStats
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 16 2020 Stuart Gathman <stuart@gathman.org> - 21.1-2
|
||||||
|
- Reenable seccomp for armv7hl
|
||||||
|
|
||||||
|
* Wed Dec 16 2020 Stuart Gathman <stuart@gathman.org> - 21.1-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Wed Dec 16 2020 Stuart Gathman <stuart@gathman.org> - 21-4
|
||||||
|
- Support gcc-11, drop el6 support.
|
||||||
|
|
||||||
|
* Fri Nov 27 2020 Stuart Gathman <stuart@gathman.org> - 21-3
|
||||||
|
- New python-cjdns release
|
||||||
|
|
||||||
* Mon Sep 28 2020 Stuart Gathman <stuart@gathman.org> - 21-2
|
* Mon Sep 28 2020 Stuart Gathman <stuart@gathman.org> - 21-2
|
||||||
- Enable libsodium
|
- Enable libsodium
|
||||||
|
|
||||||
|
@ -1,109 +1,88 @@
|
|||||||
diff -up ./crypto/CryptoAuth.c.warnings ./crypto/CryptoAuth.c
|
diff -up ./tunnel/IpTunnel.c.warn ./tunnel/IpTunnel.c
|
||||||
--- ./crypto/CryptoAuth.c.warnings 2018-01-30 19:04:59.000000000 -0500
|
--- ./tunnel/IpTunnel.c.warn 2020-09-18 14:24:44.000000000 -0400
|
||||||
+++ ./crypto/CryptoAuth.c 2018-03-14 14:38:20.689851389 -0400
|
+++ ./tunnel/IpTunnel.c 2020-12-16 12:41:53.284105519 -0500
|
||||||
@@ -85,6 +85,8 @@ static inline void getSharedSecret(uint8
|
@@ -622,7 +622,7 @@ static Iface_DEFUN incomingControlMessag
|
||||||
uint8_t passwordHash[32],
|
Endian_bigEndianToHost32(x); \
|
||||||
struct Log* logger)
|
}))
|
||||||
|
|
||||||
|
-static bool prefixMatches6(uint8_t* addressA, uint8_t* refAddr, uint8_t prefixLen)
|
||||||
|
+static bool prefixMatches6(const uint8_t* addressA, const uint8_t* refAddr, uint8_t prefixLen)
|
||||||
{
|
{
|
||||||
+#pragma GCC diagnostic push
|
if (!prefixLen) {
|
||||||
+#pragma GCC diagnostic ignored "-Wunused-result"
|
Assert_true(Bits_isZero(refAddr, 16));
|
||||||
if (passwordHash == NULL) {
|
@@ -661,7 +661,7 @@ static bool isValidAddress4(uint8_t sour
|
||||||
crypto_box_curve25519xsalsa20poly1305_beforenm(outputSecret, herPublicKey, myPrivateKey);
|
return prefixMatches4(compareAddr, conn->connectionIp4, conn->connectionIp4Alloc);
|
||||||
} else {
|
|
||||||
@@ -100,6 +102,7 @@ static inline void getSharedSecret(uint8
|
|
||||||
Bits_memcpy(buff.components.passwd, passwordHash, 32);
|
|
||||||
crypto_hash_sha256(outputSecret, buff.bytes, 64);
|
|
||||||
}
|
|
||||||
+#pragma GCC diagnostic pop
|
|
||||||
if (Defined(Log_KEYS)) {
|
|
||||||
uint8_t myPublicKeyHex[65];
|
|
||||||
printHexPubKey(myPublicKeyHex, myPrivateKey);
|
|
||||||
diff -up ./dht/CJDHTConstants.h.warnings ./dht/CJDHTConstants.h
|
|
||||||
--- ./dht/CJDHTConstants.h.warnings 2018-01-30 19:04:59.000000000 -0500
|
|
||||||
+++ ./dht/CJDHTConstants.h 2018-03-14 14:38:20.689851389 -0400
|
|
||||||
@@ -17,7 +17,9 @@
|
|
||||||
|
|
||||||
#include "benc/String.h"
|
|
||||||
#include "util/version/Version.h"
|
|
||||||
-
|
|
||||||
+#pragma GCC diagnostic push
|
|
||||||
+#pragma GCC diagnostic ignored "-Wpragmas"
|
|
||||||
+#pragma GCC diagnostic ignored "-Wunused-const-variable"
|
|
||||||
// Signifying that this message is a query and defining the query type.
|
|
||||||
static String* const CJDHTConstants_QUERY = String_CONST_SO("q");
|
|
||||||
|
|
||||||
@@ -61,5 +63,5 @@ static String* const CJDHTConstants_ENC_
|
|
||||||
// Encoding scheme and index for the closest peer along the path.
|
|
||||||
static String* const CJDHTConstants_PEER_ENC_SCHEME = String_CONST_SO("pes");
|
|
||||||
static String* const CJDHTConstants_PEER_ENC_INDEX = String_CONST_SO("pei");
|
|
||||||
-
|
|
||||||
+#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
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 2018-01-30 19:04:59.000000000 -0500
|
|
||||||
+++ ./node_build/dependencies/libuv/test/test-getsockname.c 2018-03-14 14:38:20.690851402 -0400
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
* IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
-
|
|
||||||
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
|
||||||
#include "uv.h"
|
|
||||||
#include "task.h"
|
|
||||||
|
|
||||||
diff -up ./util/Gcc.h.warnings ./util/Gcc.h
|
|
||||||
--- ./util/Gcc.h.warnings 2018-01-30 19:04:59.000000000 -0500
|
|
||||||
+++ ./util/Gcc.h 2018-03-14 14:38:20.690851402 -0400
|
|
||||||
@@ -52,6 +52,11 @@
|
|
||||||
#define Gcc_USE_RET \
|
|
||||||
__attribute__ ((warn_unused_result))
|
|
||||||
|
|
||||||
+#if __GNUC__ >= 7
|
|
||||||
+#define Gcc_FALLTHROUGH \
|
|
||||||
+ __attribute__ ((fallthrough))
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#elif defined(__clang__)
|
|
||||||
|
|
||||||
#define Gcc_NORETURN \
|
|
||||||
@@ -62,6 +67,9 @@
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifndef Gcc_FALLTHROUGH
|
|
||||||
+ #define Gcc_FALLTHROUGH (void)0
|
|
||||||
+#endif
|
|
||||||
#ifndef Gcc_PRINTF
|
|
||||||
#define Gcc_PRINTF( format_idx, arg_idx )
|
|
||||||
#endif
|
|
||||||
diff -up ./util/platform/netdev/NetPlatform_linux.c.warnings ./util/platform/netdev/NetPlatform_linux.c
|
|
||||||
--- ./util/platform/netdev/NetPlatform_linux.c.warnings 2018-01-30 19:04:59.000000000 -0500
|
|
||||||
+++ ./util/platform/netdev/NetPlatform_linux.c 2018-03-14 14:42:14.668850488 -0400
|
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
#include <linux/route.h>
|
|
||||||
#if ! defined(android)
|
|
||||||
#include <linux/ipv6_route.h>
|
|
||||||
+ #include <linux/ipv6.h>
|
|
||||||
#endif
|
|
||||||
#include <linux/netlink.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
@@ -167,7 +168,7 @@ void NetPlatform_addAddress(const char*
|
|
||||||
Except_throw(eh, "ioctl(SIOCSIFADDR) failed: [%s]", strerror(err));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- uint32_t x = (uint32_t)~0 << (32 - prefixLen);
|
-static bool isValidAddress6(uint8_t sourceAndDestIp6[32],
|
||||||
+ uint32_t x = ~0U << (32 - prefixLen);
|
+static bool isValidAddress6(const uint8_t* sourceAndDestIp6,
|
||||||
x = Endian_hostToBigEndian32(x);
|
bool isFromTun,
|
||||||
memcpy(&sin.sin_addr, &x, 4);
|
struct IpTunnel_Connection* conn)
|
||||||
memcpy(&ifRequest.ifr_addr, &sin, sizeof(struct sockaddr_in));
|
{
|
||||||
diff -up ./util/platform/Sockaddr.c.warnings ./util/platform/Sockaddr.c
|
@@ -669,7 +669,7 @@ static bool isValidAddress6(uint8_t sour
|
||||||
--- ./util/platform/Sockaddr.c.warnings 2018-01-30 19:04:59.000000000 -0500
|
|| AddressCalc_validAddress(&sourceAndDestIp6[16])) {
|
||||||
+++ ./util/platform/Sockaddr.c 2018-03-14 14:38:20.691851415 -0400
|
return false;
|
||||||
@@ -12,6 +12,7 @@
|
}
|
||||||
* You should have received a copy of the GNU General Public License
|
- uint8_t* compareAddr = (isFromTun)
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
+ const uint8_t* compareAddr = (isFromTun)
|
||||||
|
? ((conn->isOutgoing) ? sourceAndDestIp6 : &sourceAndDestIp6[16])
|
||||||
|
: ((conn->isOutgoing) ? &sourceAndDestIp6[16] : sourceAndDestIp6);
|
||||||
|
return prefixMatches6(compareAddr, conn->connectionIp6, conn->connectionIp6Alloc);
|
||||||
|
diff -up ./util/AddrTools.c.warn ./util/AddrTools.c
|
||||||
|
--- ./util/AddrTools.c.warn 2020-12-15 22:01:15.611690648 -0500
|
||||||
|
+++ ./util/AddrTools.c 2020-12-16 12:44:11.013175227 -0500
|
||||||
|
@@ -187,7 +187,7 @@ void AddrTools_printShortIp(uint8_t outp
|
||||||
|
* "fc4f:630d:e499:8f5b:c49f:6e6b:01ae:3120".
|
||||||
|
* @return 0 if successful, -1 if the hexAddr is malformed.
|
||||||
*/
|
*/
|
||||||
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
-int AddrTools_parseIp(uint8_t out[16], const uint8_t hexAddr[40])
|
||||||
#include "util/events/libuv/UvWrapper.h"
|
+int AddrTools_parseIp(uint8_t out[16], const uint8_t* hexAddr)
|
||||||
#include "benc/String.h"
|
{
|
||||||
#include "memory/Allocator.h"
|
struct Sockaddr_storage ss;
|
||||||
|
if (Sockaddr_parse((const char*) hexAddr, &ss)
|
||||||
|
diff -up ./util/AddrTools.h.warn ./util/AddrTools.h
|
||||||
|
--- ./util/AddrTools.h.warn 2020-12-15 22:03:56.036099586 -0500
|
||||||
|
+++ ./util/AddrTools.h 2020-12-16 12:44:18.772291827 -0500
|
||||||
|
@@ -44,7 +44,7 @@ void AddrTools_printShortIp(uint8_t outp
|
||||||
|
* "fc4f:630d:e499:8f5b:c49f:6e6b:01ae:3120".
|
||||||
|
* @return 0 if successful, -1 if the hexAddr is malformed.
|
||||||
|
*/
|
||||||
|
-int AddrTools_parseIp(uint8_t out[16], const uint8_t hexAddr[40]);
|
||||||
|
+int AddrTools_parseIp(uint8_t out[16], const uint8_t* hexAddr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse out an ethernet MAC address.
|
||||||
|
diff -up ./util/Bits.h.warn ./util/Bits.h
|
||||||
|
--- ./util/Bits.h.warn 2020-12-15 21:52:43.800005230 -0500
|
||||||
|
+++ ./util/Bits.h 2020-12-15 21:52:57.496210893 -0500
|
||||||
|
@@ -98,7 +98,7 @@ static inline uint64_t Bits_bitReverse64
|
||||||
|
* @length the nuber of bytes to check for zero'd-ness.
|
||||||
|
* @return true if all bytes checked are zero.
|
||||||
|
*/
|
||||||
|
-static inline int Bits_isZero(void* buffer, size_t length)
|
||||||
|
+static inline int Bits_isZero(const void* buffer, size_t length)
|
||||||
|
{
|
||||||
|
uint8_t* buff = (uint8_t*) buffer;
|
||||||
|
for (size_t i = 0; i < length; i++) {
|
||||||
|
diff -up ./util/platform/Sockaddr.c.warn ./util/platform/Sockaddr.c
|
||||||
|
--- ./util/platform/Sockaddr.c.warn 2020-12-15 21:37:34.152353751 -0500
|
||||||
|
+++ ./util/platform/Sockaddr.c 2020-12-16 12:43:27.035514362 -0500
|
||||||
|
@@ -306,8 +306,9 @@ struct Sockaddr* Sockaddr_fromBytes(cons
|
||||||
|
|
||||||
|
struct Sockaddr_pvt* out = Allocator_calloc(alloc, addrLen + Sockaddr_OVERHEAD, 1);
|
||||||
|
Bits_memcpy(&out->ss, &ss, addrLen);
|
||||||
|
- out->pub.addrLen = addrLen + Sockaddr_OVERHEAD;
|
||||||
|
- return &out->pub;
|
||||||
|
+ struct Sockaddr* pub = &out->pub;
|
||||||
|
+ pub->addrLen = addrLen + Sockaddr_OVERHEAD;
|
||||||
|
+ return pub;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Sockaddr_normalizeNative(void* nativeSockaddr)
|
||||||
|
@@ -344,4 +345,4 @@ void Sockaddr_addrFromHandle(struct Sock
|
||||||
|
addr->type = Sockaddr_HANDLE;
|
||||||
|
addr->addrLen = sizeof(struct Sockaddr);
|
||||||
|
Bits_memcpy(&((uint8_t*)addr)[4], &handle, 4);
|
||||||
|
-}
|
||||||
|
\ No newline at end of file
|
||||||
|
+}
|
||||||
|
8
sources
8
sources
@ -1,6 +1,2 @@
|
|||||||
SHA512 (cjdns-v20.4.tar.gz) = 5a6bd36b2edd07fa883efa4b14dd8a7ba0189bf43404e27ab6ae3b0c2f1e63ce738c52b34416f51f93c9752f6654ea95eac2c71897d2a1e19f4a6d1ca3bad46d
|
SHA512 (cjdns-v21.1.tar.gz) = 5a50b22ce018a8e799ebaa11c0c2998d8a75489c2e54da11b4d9f07f2b00073af34328c431b90afbe6e8796302f2137aa62625dcdd56c0cced785fc2b280ccf6
|
||||||
SHA512 (python-cjdns-0.1.tar.gz) = f3b7c9afe6bc2f8b0b872cc7fbe9e997657ecf1cbb1f7e8e417099f1265541af919e965be2508a8613f3a2223020ac077473fe48c78f9553dda1a927364bb256
|
SHA512 (python-cjdns-0.2.tar.gz) = 3c1c90ee98c0ed03777efcb7bf147a4f32370b2803155bfc3dab37dc9367706b19b3aa328aba603fa589eaa21f3c6ce2df88826378d19436935a1bccebf5ffa0
|
||||||
SHA512 (cjdns-v20.5.tar.gz) = 36ae20182b9e9601ae64630cb0fa96caccbe5279be48520ea8b457a15437da5c9b48a5ae5588bd76ef819efe696b5a582a906a50e4dbe7760bb96fa7d1d63ea3
|
|
||||||
SHA512 (cjdns-v20.6.tar.gz) = 34057583f2215899b96f95cc60ba0532aff12834ad2c4b432a6752c811f60ed3d6d33ec82e039b159f090558020faf69c71b373ac33ca9e41b186be0b87c3332
|
|
||||||
SHA512 (cjdns-v20.7.tar.gz) = db103e70e3d9f5e4958dcbeed51df358450f9489b6573f9b9eddc1839ee2051fe5180eede894b465e92915fabcb4cb64ce08a41c06450f14de75943879633f25
|
|
||||||
SHA512 (cjdns-v21.tar.gz) = 2c0b80c715c8895b573c09787df8be9fcc721d0903c90a32649e22f72e2d7b0b13d4254f31936c61f47cdd1fee8e3cf4a28f827571f94972557258e4a42f9eb2
|
|
||||||
|
Loading…
Reference in New Issue
Block a user