diff options
| author | murilo ijanc | 2026-03-25 00:55:30 -0300 |
|---|---|---|
| committer | murilo ijanc | 2026-03-25 00:55:30 -0300 |
| commit | 90af880c4f43b8c5708af6712d94afc610f451df (patch) | |
| tree | f796f108a00d9451ff84070656e9caa7b9181c8d /net/tesseras-paste/pkg | |
| download | ports-main.tar.gz | |
OpenBSD port for tesseras-paste 0.1.0, a decentralized pastebin
built on tesseras-dht. Includes rc.d script, _tpd daemon user,
man pages for tp(1) and tpd(1), and pkg-readme.
Diffstat (limited to 'net/tesseras-paste/pkg')
| -rw-r--r-- | net/tesseras-paste/pkg/DESCR | 7 | ||||
| -rw-r--r-- | net/tesseras-paste/pkg/PLIST | 14 | ||||
| -rw-r--r-- | net/tesseras-paste/pkg/README | 58 | ||||
| -rw-r--r-- | net/tesseras-paste/pkg/tpd.rc | 11 |
4 files changed, 90 insertions, 0 deletions
diff --git a/net/tesseras-paste/pkg/DESCR b/net/tesseras-paste/pkg/DESCR new file mode 100644 index 0000000..11da1b6 --- /dev/null +++ b/net/tesseras-paste/pkg/DESCR @@ -0,0 +1,7 @@ +tesseras-paste is a decentralized pastebin built on tesseras-dht, +a Kademlia-based distributed hash table. It provides encrypted +paste storage and retrieval over a peer-to-peer network. + +Includes two binaries: +- tpd: the tesseras-paste daemon +- tp: the tesseras-paste client diff --git a/net/tesseras-paste/pkg/PLIST b/net/tesseras-paste/pkg/PLIST new file mode 100644 index 0000000..14d9389 --- /dev/null +++ b/net/tesseras-paste/pkg/PLIST @@ -0,0 +1,14 @@ +@newgroup _tpd:906 +@newuser _tpd:906:906::tesseras-paste daemon:/var/tesseras-paste:/sbin/nologin +@rcscript ${RCDIR}/tpd +@mode 755 +@owner _tpd +@group _tpd +@sample ${LOCALSTATEDIR}/tesseras-paste/ +@owner +@group +@bin bin/tp +@bin bin/tpd +@man man/man1/tp.1 +@man man/man1/tpd.1 +share/doc/pkg-readmes/${PKGSTEM} diff --git a/net/tesseras-paste/pkg/README b/net/tesseras-paste/pkg/README new file mode 100644 index 0000000..ff86ffd --- /dev/null +++ b/net/tesseras-paste/pkg/README @@ -0,0 +1,58 @@ ++----------------------------------------------------------------------- +| Running ${PKGSTEM} on OpenBSD ++----------------------------------------------------------------------- + +Daemon Setup +============ + +Enable and start the tpd(1) daemon: + + # rcctl enable tpd + # rcctl start tpd + +To connect to a bootstrap peer: + + # rcctl set tpd flags "-b host:port" + # rcctl restart tpd + +Multiple bootstrap peers can be specified: + + # rcctl set tpd flags "-b host1:port -b host2:port" + +To enable the HTTP interface on port 8080: + + # rcctl set tpd flags "-b host:port -w 8080" + +To run as a public server on a fixed UDP port: + + # rcctl set tpd flags "-g -p 6881 -b host:port" + +Data Directory +============== + +Paste data and the node identity key are stored in +${LOCALSTATEDIR}/tesseras-paste/, owned by the _tpd user. + +Socket Permissions +================== + +The tp(1) client communicates with tpd(1) via a Unix domain socket at +${LOCALSTATEDIR}/tesseras-paste/daemon.sock. To allow a regular user to +use tp(1), add them to the _tpd group: + + # usermod -G _tpd <username> + +The user must log out and back in for the group change to take effect. + +Client Usage +============ + +Store a paste (default TTL 24h): + + $ echo "hello world" | tp put + +Retrieve a paste: + + $ tp get <key> + +See tp(1) and tpd(1) for full documentation. diff --git a/net/tesseras-paste/pkg/tpd.rc b/net/tesseras-paste/pkg/tpd.rc new file mode 100644 index 0000000..240edd3 --- /dev/null +++ b/net/tesseras-paste/pkg/tpd.rc @@ -0,0 +1,11 @@ +#!/bin/ksh + +daemon="${TRUEPREFIX}/bin/tpd" +daemon_user="_tpd" + +. /etc/rc.d/rc.subr + +rc_bg=YES +rc_reload=NO + +rc_cmd $1 |