diff --git a/cjdns.man.patch b/cjdns.man.patch index 1b03fc8..c0f8cf6 100644 --- a/cjdns.man.patch +++ b/cjdns.man.patch @@ -1,6 +1,53 @@ +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 +@@ -0,0 +1,43 @@ ++cjdnslog(1) -- display cjdroute log messages ++============================================= ++ ++## SYNOPSIS ++ ++`/usr/bin/cjdnslog` [...] ++ ++## DESCRIPTION ++ ++Cjdroute sends continuous log messages to the bit bucket. Cjdnslog ++captures that information in real time and sends it to stdout. ++ ++##OPTIONS ++ ++With no options, cjdnslog logs everything. ++ ++ * `--help` ++ Print usage summary. ++ ++ * `-f source_file.c` ++ Restrict output to log messages generated in source_file.c. ++ ++ * `-v log_level` ++ Restrict output to messages at log_level or higher. Log levels ++ include DEBUG, INFO, WARN, ERROR. ++ ++ * `-l lineno` ++ Restrict output to message generated on source line lineno. Normally ++ used in conjunction with `-f`. ++ ++##USAGE ++ ++Running cjdnslog requires admin privilege. The cjdnsadmin lib will ++try to read `/etc/cjdroute.conf` for the admin password. This will ++normally succeed only for root. Otherwise, it tries `~/.cjdnsadmin` ++ ++##FILES ++ ++`~/.cjdnsadmin` ++ ++## SEE ALSO ++ ++cjdroute(1) diff -up ./contrib/doc/cjdns-online.md.man ./contrib/doc/cjdns-online.md ---- ./contrib/doc/cjdns-online.md.man 2016-04-18 15:53:17.346245693 -0400 -+++ ./contrib/doc/cjdns-online.md 2016-04-18 15:53:17.346245693 -0400 +--- ./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 @@ -0,0 +1,33 @@ +cjdns-online(1) -- check whether cjdns tunnel devices are available +============================================= @@ -36,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-04-18 15:53:17.346245693 -0400 -+++ ./contrib/doc/cjdroute.md 2016-04-18 15:53:17.346245693 -0400 +--- ./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 @@ -0,0 +1,76 @@ +cjdroute(1) -- Cjdns packet switch +============================================= @@ -116,8 +163,8 @@ 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-04-18 15:53:17.346245693 -0400 -+++ ./contrib/doc/makekeys.md 2016-04-18 15:53:17.346245693 -0400 +--- ./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 @@ +makekeys(1) -- write cjdns keys generated via libnacl to stdout +============================================= @@ -138,8 +185,8 @@ diff -up ./contrib/doc/makekeys.md.man ./contrib/doc/makekeys.md + +publictoip6(1) diff -up ./contrib/doc/peerStats.md.man ./contrib/doc/peerStats.md ---- ./contrib/doc/peerStats.md.man 2016-04-18 16:56:16.630871236 -0400 -+++ ./contrib/doc/peerStats.md 2016-04-18 17:05:51.504311727 -0400 +--- ./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 @@ -0,0 +1,25 @@ +peerStats(1) -- show cjdns peers +============================================= @@ -167,8 +214,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-04-18 15:53:17.346245693 -0400 -+++ ./contrib/doc/privatetopublic.md 2016-04-18 15:53:17.346245693 -0400 +--- ./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 @@ -0,0 +1,25 @@ +privatetopublic(8) -- convert cjdns private keys to public keys and IP6 +============================================= @@ -196,8 +243,8 @@ 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-04-18 15:53:17.346245693 -0400 -+++ ./contrib/doc/publictoip6.md 2016-04-18 15:53:17.346245693 -0400 +--- ./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 @@ -0,0 +1,14 @@ +publictoip6(1) -- write random bytes generated via libnacl to stdout +============================================= @@ -214,8 +261,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-04-18 15:53:17.346245693 -0400 -+++ ./contrib/doc/randombytes.md 2016-04-18 15:53:17.346245693 -0400 +--- ./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 @@ -0,0 +1,16 @@ +randombytes(1) -- write random bytes generated via libnacl to stdout +============================================= @@ -234,8 +281,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-04-18 15:53:17.347245712 -0400 -+++ ./contrib/doc/sessionStats.md 2016-04-18 15:53:17.347245712 -0400 +--- ./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 @@ -0,0 +1,39 @@ +sessionStats(1) -- show cjdns crypto sessions +============================================= @@ -251,7 +298,7 @@ diff -up ./contrib/doc/sessionStats.md.man ./contrib/doc/sessionStats.md +but also when talking to intermediate nodes to ask them about their peers +when planning a route. + -+The Cjdns protocol offers Perfect Forward Secrecy. Each session has a random ++The cjdns protocol offers Perfect Forward Secrecy. Each session has a random +symmetric key that encrypts that session. If a node is compromised, +the attacker can get the session keys and read current and future sessions. +However, the session keys are securely erased when a session is destroyed, @@ -277,8 +324,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-04-18 15:53:17.347245712 -0400 -+++ ./contrib/doc/sybilsim.md 2016-04-18 15:53:17.347245712 -0400 +--- ./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 @@ -0,0 +1,43 @@ +sybilsim(8) -- Cjdns packet switch +============================================= @@ -324,10 +371,10 @@ 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-04-18 15:53:17.347245712 -0400 -+++ ./contrib/doc/traceroute.md 2016-04-18 15:53:17.347245712 -0400 +--- ./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 @@ -0,0 +1,33 @@ -+cjdns-traceroute(1) -- trace Cjdns packet routing ++cjdns-traceroute(1) -- trace cjdns packet routing +============================================= + +## SYNOPSIS @@ -336,7 +383,7 @@ diff -up ./contrib/doc/traceroute.md.man ./contrib/doc/traceroute.md + +## DESCRIPTION + -+Because CJDNS is end to end encrypted, the standard traceroute always ++Because cjdns is end to end encrypted, the standard traceroute always +shows a direct connection. Cjdns-traceroute queries cjdroute to discover +what route would be used to send a packet to the destination IP. +Note that just as with the standard traceroute, there is no guarantee diff --git a/cjdns.sbin.patch b/cjdns.sbin.patch index 697f48f..ac13b37 100644 --- a/cjdns.sbin.patch +++ b/cjdns.sbin.patch @@ -1,6 +1,6 @@ diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.sh ---- ./contrib/systemd/cjdns-online.sh.sbin 2016-04-18 15:53:17.316245094 -0400 -+++ ./contrib/systemd/cjdns-online.sh 2016-04-18 15:53:17.316245094 -0400 +--- ./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 @@ +#!/bin/sh +# Check whether cjdns IPs are available @@ -78,8 +78,8 @@ diff -up ./contrib/systemd/cjdns-online.sh.sbin ./contrib/systemd/cjdns-online.s + cjdns_ips +fi diff -up ./contrib/systemd/cjdns-resume.service.sbin ./contrib/systemd/cjdns-resume.service ---- ./contrib/systemd/cjdns-resume.service.sbin 2016-04-18 15:53:17.316245094 -0400 -+++ ./contrib/systemd/cjdns-resume.service 2016-04-18 15:53:17.316245094 -0400 +--- ./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 @@ -93,8 +93,8 @@ diff -up ./contrib/systemd/cjdns-resume.service.sbin ./contrib/systemd/cjdns-res +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-04-18 15:55:59.579483155 -0400 -@@ -9,10 +9,10 @@ ProtectSystem=true ++++ ./contrib/systemd/cjdns.service 2016-05-03 22:50:07.241986902 -0400 +@@ -9,10 +9,11 @@ ProtectSystem=true SyslogIdentifier=cjdroute ExecStartPre=/bin/sh -ec "if ! test -s /etc/cjdroute.conf; \ then umask 077; \ @@ -103,14 +103,15 @@ diff -up ./contrib/systemd/cjdns.service.sbin ./contrib/systemd/cjdns.service echo 'WARNING: A new /etc/cjdroute.conf file has been generated.'; \ - fi" -ExecStart=/bin/sh -c "exec cjdroute --nobg < /etc/cjdroute.conf" -+ fi; test -c /dev/net/tun || /usr/sbin/modprobe tun" ++ fi; case $(wc -c /proc/modules) in \ ++ 0*) ;; *) /sbin/modprobe tun;; esac" +ExecStart=/bin/sh -c "exec /usr/sbin/cjdroute --nobg < /etc/cjdroute.conf" Restart=always [Install] diff -up ./contrib/systemd/cjdns-wait-online.service.sbin ./contrib/systemd/cjdns-wait-online.service ---- ./contrib/systemd/cjdns-wait-online.service.sbin 2016-04-18 15:53:17.317245114 -0400 -+++ ./contrib/systemd/cjdns-wait-online.service 2016-04-18 15:53:17.317245114 -0400 +--- ./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 @@ -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 +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-04-18 15:55:07.845450771 -0400 -@@ -13,10 +13,13 @@ pre-start script ++++ ./contrib/upstart/cjdns.conf 2016-05-03 22:45:32.931860381 -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 umask 077 # to create the file with 600 permissions without races @@ -139,11 +140,14 @@ diff -up ./contrib/upstart/cjdns.conf.sbin ./contrib/upstart/cjdns.conf echo 'WARNING: A new cjdns cjdroute.conf file has been generated.' fi + # preload tun driver, since we prevent module_request -+ test -c /dev/net/tun || /sbin/modprobe tun ++ case $(wc -c /proc/modules) in ++ 0*) ;; ++ *) /sbin/modprobe tun;; ++ esac # If you need a non-standard setup, as described in # https://github.com/cjdelisle/cjdns#non-standard-setups, -@@ -25,4 +28,4 @@ pre-start script +@@ -25,4 +31,4 @@ pre-start script # see http://upstart.ubuntu.com/cookbook/#setuid end script diff --git a/cjdns.spec b/cjdns.spec index 7d82a7f..9ac3a6a 100644 --- a/cjdns.spec +++ b/cjdns.spec @@ -39,7 +39,7 @@ Name: cjdns # major version is cjdns protocol version: Version: 17.3 -Release: 12%{?dist} +Release: 13%{?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 @@ -104,6 +104,8 @@ Requires(postun): systemd %endif Requires(pre): shadow-utils Provides: bundled(libuv) = 0.11.4 +# build system requires nodejs, unfortunately +ExclusiveArch: %{nodejs_arches} %description Cjdns implements an encrypted IPv6 network using public-key cryptography for @@ -428,6 +430,7 @@ fi %{_mandir}/man1/cjdns-traceroute.1.gz %{_mandir}/man1/sessionStats.1.gz %{_mandir}/man1/peerStats.1.gz +%{_mandir}/man1/cjdnslog.1.gz %files python %doc contrib/python/README.md contrib/python/cjdns-dynamic.conf @@ -467,6 +470,10 @@ fi %{_bindir}/graphStats %changelog +* Tue May 3 2016 Stuart D. Gathman 17.3-13 +- man page for cjdnslog +- Fix running on Fedora as well as openVZ. :-P + * Mon Apr 18 2016 Stuart D. Gathman 17.3-12 - Run modprobe only if /dev/tun not present - fixes running on openVZ - Select nacl/libsodium with a macro