From: Sergey Matveev Date: Sun, 15 Jan 2017 17:46:13 +0000 (+0300) Subject: Draft FreeBSD port X-Git-Tag: 0.2^2~11 X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=commitdiff_plain;h=178008d1afb52f09337747fa61dca66e507a8a6c Draft FreeBSD port --- diff --git a/makedist.sh b/makedist.sh index f752a4f..896e9f0 100755 --- a/makedist.sh +++ b/makedist.sh @@ -61,6 +61,7 @@ rm -fr $tmp/golang.org $tmp/includes find src -name .travis.yml -delete rm -fr src/github.com/davecgh/go-xdr/xdr rm -fr src/github.com/gorhill/cronexpr/cronexpr src/github.com/gorhill/cronexpr/APLv2 +rm -fr ports rm makedist.sh cat > doc/download.texi < diff --git a/ports/nncp/files/nncp-caller.in b/ports/nncp/files/nncp-caller.in new file mode 100644 index 0000000..89c7934 --- /dev/null +++ b/ports/nncp/files/nncp-caller.in @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: nncp-caller +# REQUIRE: DAEMON NETWORKING FILESYSTEMS +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# nncp_caller_enable (bool): Set to NO by default. +# Set it to YES to enable nncp-caller. +# nncp_caller_config (path): Set to %%PREFIX%%/etc/nncp.yaml by default. + +. /etc/rc.subr + +name=nncp_caller +rcvar=nncp_caller_enable + +load_rc_config $name + +: ${nncp_caller_enable:="NO"} +: ${nncp_caller_config="%%PREFIX%%/etc/nncp.yaml"} + +command=%%PREFIX%%/bin/nncp-caller +command_args="-quiet -cfg $nncp_caller_config &" + +run_rc_command "$1" diff --git a/ports/nncp/files/nncp-daemon.in b/ports/nncp/files/nncp-daemon.in new file mode 100644 index 0000000..3c7ccd8 --- /dev/null +++ b/ports/nncp/files/nncp-daemon.in @@ -0,0 +1,32 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: nncp-daemon +# REQUIRE: DAEMON NETWORKING FILESYSTEMS +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# nncp_daemon_enable (bool): Set to NO by default. +# Set it to YES to enable nncp-daemon. +# nncp_daemon_config (path): Set to %%PREFIX%%/etc/nncp.yaml by default. +# nncp_daemon_bind (string): Address:port to bind to +# Default is "[::]:5400". + +. /etc/rc.subr + +name=nncp_daemon +rcvar=nncp_daemon_enable + +load_rc_config $name + +: ${nncp_daemon_enable:="NO"} +: ${nncp_daemon_config="%%PREFIX%%/etc/nncp.yaml"} +: ${nncp_daemon_bind="[::]:5400"} + +command=%%PREFIX%%/bin/nncp-daemon +command_args="-quiet -bind $nncp_daemon_bind -cfg $nncp_daemon_config &" + +run_rc_command "$1" diff --git a/ports/nncp/files/nncp.newsyslog.conf.in b/ports/nncp/files/nncp.newsyslog.conf.in new file mode 100644 index 0000000..243db01 --- /dev/null +++ b/ports/nncp/files/nncp.newsyslog.conf.in @@ -0,0 +1 @@ +/var/log/nncp.log 644 7 100 * CXN diff --git a/ports/nncp/files/pkg-deinstall.in b/ports/nncp/files/pkg-deinstall.in new file mode 100644 index 0000000..af0ca73 --- /dev/null +++ b/ports/nncp/files/pkg-deinstall.in @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ "$2" != "POST-DEINSTALL" ]; then + exit 0 +fi + +if [ -e %%PREFIX%%/etc/nncp.yaml ]; then + echo "%%PREFIX%%/etc/nncp.yaml with your private keys is not removed!" +fi + +if [ -e /var/spool/nncp ]; then + echo "/var/spool/nncp is not removed!" +fi diff --git a/ports/nncp/files/pkg-message.in b/ports/nncp/files/pkg-message.in new file mode 100644 index 0000000..d415619 --- /dev/null +++ b/ports/nncp/files/pkg-message.in @@ -0,0 +1,17 @@ +====================================================================== +- Add the following line to /etc/rc.conf to enable nncp-daemon: + + nncp_daemon_enable="YES" + +- Add the following line to /etc/rc.conf to enable nncp-caller: + + nncp_caller_enable="YES" + +- %%PREFIX%%/etc/newsyslog.conf.d/nncp.conf + log rotation configuration has been installed. +- /var/spool/nncp is the packet spool directory. +- Generate NNCP configuration file using the command: + + # umask 077 + # nncp-newnode > %%PREFIX%%/etc/nncp.yaml +====================================================================== diff --git a/ports/nncp/pkg-descr b/ports/nncp/pkg-descr new file mode 100644 index 0000000..d33b292 --- /dev/null +++ b/ports/nncp/pkg-descr @@ -0,0 +1,16 @@ +NNCP (Node to Node copy) is a collection of utilities simplifying +secure store-and-forward files and mail exchanging. + +This utilities are intended to help build up small size (dozens of +nodes) ad-hoc friend-to-friend (F2F) statically routed darknet networks +for fire-and-forget secure reliable files, file requests and Internet +mail transmission. All packets are integrity checked, end-to-end +encrypted (E2EE), explicitly authenticated by known participants public +keys. Onion encryption is applied to relayed packets. Each node acts +both as a client and server, can use push and poll behaviour model. + +Out-of-box offline sneakernet/floppynet, dead drops and air-gapped +computers support. But online TCP daemon with full-duplex resumable data +transmission exists. + +WWW: http://www.nncpgo.org/