Merge branch 'master' into f23

This commit is contained in:
Stuart D. Gathman 2016-06-24 00:11:34 -04:00
commit 368acfe28a
6 changed files with 82 additions and 72 deletions

1
.gitignore vendored
View File

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

View File

@ -1,6 +1,6 @@
diff -up ./contrib/doc/cjdnslog.md.man ./contrib/doc/cjdnslog.md
--- ./contrib/doc/cjdnslog.md.man 2016-05-03 22:57:12.839792004 -0400
+++ ./contrib/doc/cjdnslog.md 2016-05-03 23:57:42.922419017 -0400
--- ./contrib/doc/cjdnslog.md.man 2016-05-10 18:55:17.289488599 -0400
+++ ./contrib/doc/cjdnslog.md 2016-05-10 18:55:17.289488599 -0400
@@ -0,0 +1,43 @@
+cjdnslog(1) -- display cjdroute log messages
+=============================================
@ -46,8 +46,8 @@ diff -up ./contrib/doc/cjdnslog.md.man ./contrib/doc/cjdnslog.md
+
+cjdroute(1)
diff -up ./contrib/doc/cjdns-online.md.man ./contrib/doc/cjdns-online.md
--- ./contrib/doc/cjdns-online.md.man 2016-05-03 22:06:45.843528959 -0400
+++ ./contrib/doc/cjdns-online.md 2016-05-03 22:06:45.843528959 -0400
--- ./contrib/doc/cjdns-online.md.man 2016-05-10 18:55:17.289488599 -0400
+++ ./contrib/doc/cjdns-online.md 2016-05-10 18:55:17.289488599 -0400
@@ -0,0 +1,33 @@
+cjdns-online(1) -- check whether cjdns tunnel devices are available
+=============================================
@ -83,8 +83,8 @@ diff -up ./contrib/doc/cjdns-online.md.man ./contrib/doc/cjdns-online.md
+ Wait for full startup instead of just tun dev. This is not implemented.
+
diff -up ./contrib/doc/cjdroute.md.man ./contrib/doc/cjdroute.md
--- ./contrib/doc/cjdroute.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/cjdroute.md 2016-05-03 22:06:45.843528959 -0400
--- ./contrib/doc/cjdroute.md.man 2016-05-10 18:55:17.289488599 -0400
+++ ./contrib/doc/cjdroute.md 2016-05-10 18:55:17.289488599 -0400
@@ -0,0 +1,76 @@
+cjdroute(1) -- Cjdns packet switch
+=============================================
@ -163,9 +163,9 @@ diff -up ./contrib/doc/cjdroute.md.man ./contrib/doc/cjdroute.md
+
+For more information about other functions and non-standard setups, see README.md
diff -up ./contrib/doc/makekeys.md.man ./contrib/doc/makekeys.md
--- ./contrib/doc/makekeys.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/makekeys.md 2016-05-03 22:06:45.844528970 -0400
@@ -0,0 +1,18 @@
--- ./contrib/doc/makekeys.md.man 2016-05-10 18:55:17.289488599 -0400
+++ ./contrib/doc/makekeys.md 2016-05-10 18:58:51.521907178 -0400
@@ -0,0 +1,24 @@
+makekeys(1) -- write cjdns keys generated via libnacl to stdout
+=============================================
+
@ -181,12 +181,18 @@ diff -up ./contrib/doc/makekeys.md.man ./contrib/doc/makekeys.md
+ 9b5520e11b4e1aac4e54cf8382ca219b6942f75519dbe7cc71fc6c4bb636a2db fca1:43dc:9e20:68dc:df3f:6bf1:fbf9:37ab x70u0x6sfh0yuushlq7wvcdxj8rgb8lvss9t6f42zp60ftq71cm0.k
+ 579db68cfdeaeda1ff7f365c73e620bedb0f68cb443a0cd7ef6bae16d0e1e12e fc68:b272:3aa3:cb4a:a686:dab0:7df5:2fb5 fmurp2qrb0yqmcjmbjtuhuxuf6v3rgmdn9hgsfh47k20h68y2lz0.k
+
+##USAGE
+
+Example use:
+
+ makekeys | head -20 >keys.txt
+
+## SEE ALSO
+
+publictoip6(1)
diff -up ./contrib/doc/peerStats.md.man ./contrib/doc/peerStats.md
--- ./contrib/doc/peerStats.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/peerStats.md 2016-05-03 22:06:45.844528970 -0400
--- ./contrib/doc/peerStats.md.man 2016-05-10 18:55:17.289488599 -0400
+++ ./contrib/doc/peerStats.md 2016-05-10 18:55:17.289488599 -0400
@@ -0,0 +1,25 @@
+peerStats(1) -- show cjdns peers
+=============================================
@ -214,8 +220,8 @@ diff -up ./contrib/doc/peerStats.md.man ./contrib/doc/peerStats.md
+
+cjdroute(1), sessionStats(1)
diff -up ./contrib/doc/privatetopublic.md.man ./contrib/doc/privatetopublic.md
--- ./contrib/doc/privatetopublic.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/privatetopublic.md 2016-05-03 22:06:45.844528970 -0400
--- ./contrib/doc/privatetopublic.md.man 2016-05-10 18:55:17.290488610 -0400
+++ ./contrib/doc/privatetopublic.md 2016-05-10 18:55:17.290488610 -0400
@@ -0,0 +1,25 @@
+privatetopublic(8) -- convert cjdns private keys to public keys and IP6
+=============================================
@ -243,10 +249,10 @@ diff -up ./contrib/doc/privatetopublic.md.man ./contrib/doc/privatetopublic.md
+
+publictoip6(1)
diff -up ./contrib/doc/publictoip6.md.man ./contrib/doc/publictoip6.md
--- ./contrib/doc/publictoip6.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/publictoip6.md 2016-05-03 22:06:45.844528970 -0400
--- ./contrib/doc/publictoip6.md.man 2016-05-10 18:55:17.290488610 -0400
+++ ./contrib/doc/publictoip6.md 2016-05-10 18:59:01.906033221 -0400
@@ -0,0 +1,14 @@
+publictoip6(1) -- write random bytes generated via libnacl to stdout
+publictoip6(1) -- Derive cjdns IP6 address from a public key
+=============================================
+
+## SYNOPSIS
@ -261,8 +267,8 @@ diff -up ./contrib/doc/publictoip6.md.man ./contrib/doc/publictoip6.md
+
+randombytes(1)
diff -up ./contrib/doc/randombytes.md.man ./contrib/doc/randombytes.md
--- ./contrib/doc/randombytes.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/randombytes.md 2016-05-03 22:06:45.844528970 -0400
--- ./contrib/doc/randombytes.md.man 2016-05-10 18:55:17.290488610 -0400
+++ ./contrib/doc/randombytes.md 2016-05-10 18:55:17.290488610 -0400
@@ -0,0 +1,16 @@
+randombytes(1) -- write random bytes generated via libnacl to stdout
+=============================================
@ -281,8 +287,8 @@ diff -up ./contrib/doc/randombytes.md.man ./contrib/doc/randombytes.md
+
+makekeys(1)
diff -up ./contrib/doc/sessionStats.md.man ./contrib/doc/sessionStats.md
--- ./contrib/doc/sessionStats.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/sessionStats.md 2016-05-03 22:09:39.354511569 -0400
--- ./contrib/doc/sessionStats.md.man 2016-05-10 18:55:17.290488610 -0400
+++ ./contrib/doc/sessionStats.md 2016-05-10 18:55:17.290488610 -0400
@@ -0,0 +1,39 @@
+sessionStats(1) -- show cjdns crypto sessions
+=============================================
@ -324,8 +330,8 @@ diff -up ./contrib/doc/sessionStats.md.man ./contrib/doc/sessionStats.md
+
+cjdroute(1), peerStats(1)
diff -up ./contrib/doc/sybilsim.md.man ./contrib/doc/sybilsim.md
--- ./contrib/doc/sybilsim.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/sybilsim.md 2016-05-03 22:06:45.844528970 -0400
--- ./contrib/doc/sybilsim.md.man 2016-05-10 18:55:17.290488610 -0400
+++ ./contrib/doc/sybilsim.md 2016-05-10 18:55:17.290488610 -0400
@@ -0,0 +1,43 @@
+sybilsim(8) -- Cjdns packet switch
+=============================================
@ -371,8 +377,8 @@ diff -up ./contrib/doc/sybilsim.md.man ./contrib/doc/sybilsim.md
+
+makekeys(1), cjdroute(1)
diff -up ./contrib/doc/traceroute.md.man ./contrib/doc/traceroute.md
--- ./contrib/doc/traceroute.md.man 2016-05-03 22:06:45.844528970 -0400
+++ ./contrib/doc/traceroute.md 2016-05-03 22:10:00.344748050 -0400
--- ./contrib/doc/traceroute.md.man 2016-05-10 18:55:17.290488610 -0400
+++ ./contrib/doc/traceroute.md 2016-05-10 18:55:17.290488610 -0400
@@ -0,0 +1,33 @@
+cjdns-traceroute(1) -- trace cjdns packet routing
+=============================================

View File

@ -1,7 +1,7 @@
diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.sh
--- ./contrib/systemd/cjdns-online.sh.sbin 2016-05-03 22:06:45.820528693 -0400
+++ ./contrib/systemd/cjdns-online.sh 2016-05-03 22:06:45.820528693 -0400
@@ -0,0 +1,75 @@
--- ./contrib/systemd/cjdns-online.sh.sbin 2016-06-23 22:49:23.703114380 -0400
+++ ./contrib/systemd/cjdns-online.sh 2016-06-23 22:51:50.666731442 -0400
@@ -0,0 +1,90 @@
+#!/bin/sh
+# Check whether cjdns IPs are available
+# Copyright (C) 2016 Stuart D. Gathman <stuart@gathman.org>
@ -27,6 +27,14 @@ diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.s
+ done
+}
+
+cjdns_dev() {
+ ip -6 -o addr | while read i dev fam ip rem; do
+ case "$ip" in
+ fc*:*/8) echo "${dev}";;
+ esac
+ done
+}
+
+die() {
+ echo "$1" >&2
+ exit 1
@ -34,8 +42,8 @@ diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.s
+
+PROGRAM_NAME="/usr/bin/cjdns-online"
+
+ARGS=$(getopt -n $PROGRAM_NAME -o t:xqsh \
+ --long timeout:,exit,quiet,wait-for-startup,help -- "$@")
+ARGS=$(getopt -n $PROGRAM_NAME -o t:xiqsh \
+ --long timeout:,exit,interface,quiet,wait-for-startup,help -- "$@")
+
+# Die if they fat finger arguments, this program may be run as root
+[ $? = 0 ] || die "Error parsing arguments. Try $PROGRAM_NAME --help"
@ -44,6 +52,7 @@ diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.s
+ cat <<EOH
+Usage: $PROGRAM_NAME [options]
+ -t, --timeout <timeout_value> time to wait in seconds, default 30
+ -i, --interface output interface name instead of ip
+ -x, --exit exit immediately if cjdns is not online
+ -q, --quiet don't print anything
+ -s, --wait-for-startup wait for full startup instead of just tun dev
@ -55,11 +64,13 @@ diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.s
+let nowait="0"
+let quiet="0"
+let startup="0"
+let interface="0"
+
+eval set -- "$ARGS"
+while true; do
+ case "$1" in
+ -t|--timeout) let timeout="$2" || help; shift 2; continue;;
+ -i|--interface) let interface="1"; shift;;
+ -x|--exit) let nowait="1"; shift;;
+ -q|--quiet) let quiet="1"; shift;;
+ -s|--wait-for-startup) let startup="1"; shift;;
@ -75,25 +86,15 @@ diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.s
+ sleep 2
+done
+if [ "$quiet" -eq 0 ]; then
+ cjdns_ips
+ if [ "$interface" -eq 0 ]; then
+ cjdns_ips
+ else
+ cjdns_dev
+ fi
+fi
diff -up ./contrib/systemd/cjdns-resume.service.sbin ./contrib/systemd/cjdns-resume.service
--- ./contrib/systemd/cjdns-resume.service.sbin 2016-05-03 22:06:45.820528693 -0400
+++ ./contrib/systemd/cjdns-resume.service 2016-05-03 22:06:45.820528693 -0400
@@ -0,0 +1,10 @@
+[Unit]
+Description=Restart cjdns on resume from sleep
+After=sleep.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/systemctl restart cjdns
+
+[Install]
+WantedBy=sleep.target
diff -up ./contrib/systemd/cjdns.service.sbin ./contrib/systemd/cjdns.service
--- ./contrib/systemd/cjdns.service.sbin 2016-01-27 03:07:49.000000000 -0500
+++ ./contrib/systemd/cjdns.service 2016-05-03 22:50:07.241986902 -0400
--- ./contrib/systemd/cjdns.service.sbin 2016-06-14 17:58:54.000000000 -0400
+++ ./contrib/systemd/cjdns.service 2016-06-23 22:49:23.703114380 -0400
@@ -9,10 +9,11 @@ ProtectSystem=true
SyslogIdentifier=cjdroute
ExecStartPre=/bin/sh -ec "if ! test -s /etc/cjdroute.conf; \
@ -110,8 +111,8 @@ diff -up ./contrib/systemd/cjdns.service.sbin ./contrib/systemd/cjdns.service
[Install]
diff -up ./contrib/systemd/cjdns-wait-online.service.sbin ./contrib/systemd/cjdns-wait-online.service
--- ./contrib/systemd/cjdns-wait-online.service.sbin 2016-05-03 22:06:45.820528693 -0400
+++ ./contrib/systemd/cjdns-wait-online.service 2016-05-03 22:06:45.820528693 -0400
--- ./contrib/systemd/cjdns-wait-online.service.sbin 2016-06-23 22:49:23.703114380 -0400
+++ ./contrib/systemd/cjdns-wait-online.service 2016-06-23 22:49:23.703114380 -0400
@@ -0,0 +1,13 @@
+[Unit]
+Description=CJDNS Wait Online
@ -127,8 +128,8 @@ diff -up ./contrib/systemd/cjdns-wait-online.service.sbin ./contrib/systemd/cjdn
+[Install]
+WantedBy=multi-user.target
diff -up ./contrib/upstart/cjdns.conf.sbin ./contrib/upstart/cjdns.conf
--- ./contrib/upstart/cjdns.conf.sbin 2016-01-27 03:07:49.000000000 -0500
+++ ./contrib/upstart/cjdns.conf 2016-05-03 22:45:32.931860381 -0400
--- ./contrib/upstart/cjdns.conf.sbin 2016-06-14 17:58:54.000000000 -0400
+++ ./contrib/upstart/cjdns.conf 2016-06-23 22:49:23.703114380 -0400
@@ -13,10 +13,16 @@ pre-start script
if ! [ -s /etc/cjdroute.conf ]; then
( # start a subshell to avoid side effects of umask later on

View File

@ -38,8 +38,8 @@
Name: cjdns
# major version is cjdns protocol version:
Version: 17.3
Release: 13%{?dist}
Version: 17.4
Release: 3%{?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
@ -353,7 +351,6 @@ done
%{_bindir}/publictoip6
%{_bindir}/makekeys
%{_bindir}/cjdns-online
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_mandir}/man1/cjdns-online.1.gz
@ -470,9 +467,22 @@ fi
%{_bindir}/graphStats
%changelog
* Thu Jun 23 2016 Stuart D. Gathman <stuart@gathman.org> 17.4-3
- Remove cjdns-resume.service patch, incorporated upstream
- Add --interface option to cjdns-online.sh
* Thu Jun 23 2016 Stuart D. Gathman <stuart@gathman.org> 17.4-2
- Move tool manpages to tool subpackage.
* 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

@ -1,6 +1,6 @@
diff -up ./crypto/CryptoAuth.c.warnings ./crypto/CryptoAuth.c
--- ./crypto/CryptoAuth.c.warnings 2016-04-06 00:40:48.537753854 -0400
+++ ./crypto/CryptoAuth.c 2016-04-06 00:52:00.506042569 -0400
--- ./crypto/CryptoAuth.c.warnings 2016-01-27 03:07:49.000000000 -0500
+++ ./crypto/CryptoAuth.c 2016-05-03 22:06:45.842528947 -0400
@@ -77,6 +77,8 @@ static inline void getSharedSecret(uint8
uint8_t passwordHash[32],
struct Log* logger)
@ -20,7 +20,7 @@ diff -up ./crypto/CryptoAuth.c.warnings ./crypto/CryptoAuth.c
printHexPubKey(myPublicKeyHex, myPrivateKey);
diff -up ./dht/CJDHTConstants.h.warnings ./dht/CJDHTConstants.h
--- ./dht/CJDHTConstants.h.warnings 2016-01-27 03:07:49.000000000 -0500
+++ ./dht/CJDHTConstants.h 2016-04-06 00:23:39.784334020 -0400
+++ ./dht/CJDHTConstants.h 2016-05-03 22:06:45.842528947 -0400
@@ -17,7 +17,9 @@
#include "benc/String.h"
@ -41,7 +41,7 @@ diff -up ./dht/CJDHTConstants.h.warnings ./dht/CJDHTConstants.h
#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 2016-01-27 03:07:49.000000000 -0500
+++ ./node_build/dependencies/libuv/test/test-getsockname.c 2016-04-06 00:23:39.784334020 -0400
+++ ./node_build/dependencies/libuv/test/test-getsockname.c 2016-05-03 22:06:45.842528947 -0400
@@ -18,7 +18,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
@ -53,28 +53,19 @@ diff -up ./node_build/dependencies/libuv/test/test-getsockname.c.warnings ./node
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-04-06 00:23:39.784334020 -0400
+++ ./util/platform/netdev/NetPlatform_linux.c 2016-05-03 22:06:45.842528947 -0400
@@ -142,7 +142,7 @@ void NetPlatform_addAddress(const char*
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-04-06 00:23:39.785334040 -0400
+++ ./util/platform/Sockaddr.c 2016-05-03 22:06:45.842528947 -0400
@@ -12,6 +12,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

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