From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kFpEMDC4CWEFGgEAgWs5BA (envelope-from ) for ; Tue, 03 Aug 2021 23:42:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mFLuKzC4CWHiTwAAB5/wlQ (envelope-from ) for ; Tue, 03 Aug 2021 21:42:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3E82F29159 for ; Tue, 3 Aug 2021 23:42:08 +0200 (CEST) Received: from localhost ([::1]:44610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mB2Ap-0000Z8-Av for larch@yhetil.org; Tue, 03 Aug 2021 17:42:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mB2Ak-0000Ys-7w for guix-patches@gnu.org; Tue, 03 Aug 2021 17:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mB2Ak-0000ms-19 for guix-patches@gnu.org; Tue, 03 Aug 2021 17:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mB2Aj-0006xv-VT for guix-patches@gnu.org; Tue, 03 Aug 2021 17:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49494] [PATCH 0/7] Add nncp Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Aug 2021 21:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49494 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Arun Isaac Cc: 49494@debbugs.gnu.org Received: via spool by 49494-submit@debbugs.gnu.org id=B49494.162802687026700 (code B ref 49494); Tue, 03 Aug 2021 21:42:01 +0000 Received: (at 49494) by debbugs.gnu.org; 3 Aug 2021 21:41:10 +0000 Received: from localhost ([127.0.0.1]:41692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mB29m-0006wP-3i for submit@debbugs.gnu.org; Tue, 03 Aug 2021 17:41:10 -0400 Received: from out1.migadu.com ([91.121.223.63]:63492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mB29j-0006vr-S1 for 49494@debbugs.gnu.org; Tue, 03 Aug 2021 17:41:01 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1628026857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/WmzRll8b3++g6KdTePXCBiTI3kkLwwVwMs1Brgz4MM=; b=L6D7yK2so4ApIbjJbciP2vVyqdOou15eHWSlPCD7vhA/JyhmMun4dMlbljh/vNIkTyLKDg 3y190Y9ckYiEEfifXh3URFO4086oMlWr8o4Bdrwj0Vs7wktc6syJIzgp3IuA3V9F7JclN1 bX1pAgTC5hEQfCMnX4PjSkCc0hdTNMc= From: Sarah Morgensen References: <86y29j4rlz.fsf_-_@mgsn.dev> <20210803201617.19077-1-arunisaac@systemreboot.net> Date: Tue, 03 Aug 2021 14:40:54 -0700 In-Reply-To: <20210803201617.19077-1-arunisaac@systemreboot.net> (Arun Isaac's message of "Wed, 4 Aug 2021 01:46:17 +0530") Message-ID: <86y29i2om1.fsf_-_@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Auth-User: iskarian@mgsn.dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628026928; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/WmzRll8b3++g6KdTePXCBiTI3kkLwwVwMs1Brgz4MM=; b=s926D2lwgyLP8kX1prhBFcfVeuuEDkNZ26v750rQho302WMh1qoavik8o25VDNXEmFvbAX E2LFCjVN0I9ECXN+IhhGlM3eABRv+Oc1v/jr4FSm5jkWNOtbiwapmFQD+2+1F45291+0Yq NgVohm/oZj6SnljRc/51m/OjgsKwwWAIhq/HKzmntEDUTWCgvRLGpQL+5RZDMSkfI3wyGy frEgrhd7Tk63qAMg9Jur1TmnJJKxkhGgfRrk38hqpEp/YykOjDE7+ERnPATz6YXRsBzWVM k1fv3Utv0v4ZQN1nWR6OthPeDtaYXsgwQcZOES3zyFbTfW0YaVsjpd4u+HKEcQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628026928; a=rsa-sha256; cv=none; b=aUdKKrbkjFeaTOfqM0G9fS8VSgRsNB5TTd3CzA+z8J6NmmaleWN9h2jjt3lpHPMX1bnhkg J5RBdC8z46Gy/Ou8C2eCOFshoJflIgrVNtcdxfpBgfrx79NxxuHw3Zu5AQA1YDj8MZNiti 8zxOsBi6tmrSgYIivhkAIb3uraDTFNXpmIzj2U1bqVHbwl1UgHQQmZ1sj6GUbWaL37l4Wo Kbn+FSPx3zWTmNtOExEooJZ0mz6ge2sFFRSa+ZDTnoalTkBldiDDYVJix22Bw2rABMEil2 yFjwHmSwg1O/6fi5Eld1znhREhMQXJURbQNlTdxYb9TALvdeRyrfVqeKDuKJlg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=L6D7yK2s; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=L6D7yK2s; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 3E82F29159 X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: kWxAEJC9sT4m Hi, Arun Isaac writes: > * gnu/packages/uucp.scm (nncp): New variable. > --- > gnu/packages/uucp.scm | 118 +++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 117 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/uucp.scm b/gnu/packages/uucp.scm > index 1bb4fdb975..120417dea1 100644 > --- a/gnu/packages/uucp.scm > +++ b/gnu/packages/uucp.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2014 Ludovic Court=C3=A8s > +;;; Copyright =C2=A9 2021 Arun Isaac > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -17,10 +18,13 @@ > ;;; along with GNU Guix. If not, see . >=20=20 > (define-module (gnu packages uucp) > + #:use-module (gnu packages golang) > + #:use-module (gnu packages texinfo) > #:use-module (guix licenses) > #:use-module (guix packages) > #:use-module (guix download) > - #:use-module (guix build-system gnu)) > + #:use-module (guix build-system gnu) > + #:use-module (guix build-system go)) >=20=20 > (define-public uucp > (package > @@ -54,3 +58,115 @@ > set of utilities for remotely transferring files, email and net news > between computers.") > (license gpl2+))) > + > +(define-public nncp > + (package > + (name "nncp") > + (version "7.5.0") > + (source > + (origin > + (method url-fetch) > + (uri (string-append "http://www.nncpgo.org/download/nncp-" > + version ".tar.xz")) > + (sha256 > + (base32 > + "1r1zgj7gpkdmdm3wf31m0xi8y313kzd4dbyp4r4y8khnp32jvn8l")) > + (modules '((ice-9 ftw) > + (guix build utils))) > + (snippet > + '(begin > + ;; Unbundle dependencies. > + ;; TODO: go.cypherpunks.ru was down at the time of > + ;; packaging. Unbundle go.cypherpunks dependencies as well on= ce it > + ;; comes back online. > + (for-each (lambda (file) > + (unless (member file (list "." ".." "go.cypherpun= ks.ru")) > + (delete-file-recursively (string-append "src/ve= ndor/" file)))) > + (scandir "src/vendor")) > + ;; Delete built documentation. > + (delete-file "doc/nncp.info") > + #t)))) > + (build-system gnu-build-system) > + (arguments > + `(#:modules ((guix build gnu-build-system) > + ((guix build go-build-system) #:prefix go:) > + (guix build utils)) > + #:imported-modules ,%go-build-system-modules > + #:phases > + (modify-phases %standard-phases > + (add-before 'unpack 'setup-go-environment > + (assoc-ref go:%standard-phases 'setup-go-environment)) > + (add-after 'unpack 'go-unpack > + (lambda* (#:key source #:allow-other-keys) > + ;; Copy source to GOPATH. > + (copy-recursively "src" "../src/go.cypherpunks.ru/nncp/v7") > + ;; Move bundled dependencies to GOPATH. > + (for-each (lambda (dependency) > + (rename-file (string-append "src/vendor/go.cyph= erpunks.ru/" > + dependency) > + (string-append "../src/go.cypherpu= nks.ru/" > + dependency))) > + (list "balloon" "recfile")) > + ;; Delete empty bundled dependencies directory. > + (delete-file-recursively "src/vendor"))) > + (replace 'configure > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + ;; Set configuration path. > + (setenv "CFGPATH" "/etc/nncp.hjson") > + ;; Set output directories. > + (setenv "BINDIR" (string-append out "/bin")) > + (setenv "INFODIR" (string-append out "/share/info")) > + (setenv "DOCDIR" (string-append out "/share/doc/nncp"))) > + ;; Set absolute store paths to sh and cat. > + (substitute* (list "src/pipe.go" "src/toss_test.go") > + (("/bin/sh") (which "sh"))) > + (substitute* "src/toss_test.go" > + (("; cat") (string-append "; " (which "cat")))) > + ;; Remove module flags. > + (substitute* (list "bin/default.do" "bin/hjson-cli.do" "tes= t.do") > + ((" -mod=3Dvendor") "") > + ((" -m") "")) > + ;; Use the correct module path. `go list` does not report t= he > + ;; correct module path since we have moved the source files. > + (substitute* "bin/default.do" > + (("^mod=3D[^\n]*" all) "mod=3Dgo.cypherpunks.ru/nncp/v7")) > + ;; Disable timeout in tests. Tests can take longer than the > + ;; default timeout on spinning disks. > + (substitute* "test.do" > + (("test") "test -timeout 0")))) > + (replace 'check > + (lambda* (#:key tests? #:allow-other-keys) > + (when tests? > + (invoke "contrib/do" "-c" "test")))) > + (add-after 'install 'remove-go-references > + (assoc-ref go:%standard-phases 'remove-go-references))))) > + (inputs > + `(("go-github-com-davecgh-go-xdr" ,go-github-com-davecgh-go-xdr) > + ("go-github-com-dustin-go-humanize" ,go-github-com-dustin-go-huma= nize) > + ("go-github-com-flynn-noise" ,go-github-com-flynn-noise) > + ("go-github-com-gorhill-cronexpr" ,go-github-com-gorhill-cronexpr) > + ("go-github-com-hjson-hjson-go" ,go-github-com-hjson-hjson-go) > + ("go-github-com-klauspost-compress" ,go-github-com-klauspost-comp= ress) > + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) > + ("go-golang-org-x-net" ,go-golang-org-x-net) > + ("go-golang-org-x-term" ,go-golang-org-x-term) > + ("go-lukechampine-com-blake3" ,go-lukechampine-com-blake3))) > + (native-inputs > + `(("go" ,go) > + ("texinfo" ,texinfo))) > + (home-page "http://www.nncpgo.org/") > + (synopsis "Store and forward utilities") > + (description "NNCP (Node to Node copy) is a collection of utilities > +simplifying secure store-and-forward files, mail and command exchanging. > +These utilities are intended to help build up small size (dozens of node= s) > +ad-hoc friend-to-friend (F2F) statically routed darknet delay-tolerant > +networks for fire-and-forget secure reliable files, file requests, Inter= net > +mail and commands transmission. All packets are integrity checked, end-= to-end > +encrypted, explicitly authenticated by known participants public keys. = Onion > +encryption is applied to relayed packets. Each node acts both as a clie= nt and > +server, can use push and poll behaviour model. Multicasting areas, offl= ine > +sneakernet/floppynet, dead drops, sequential and append-only CD-ROM/tape > +storages, air-gapped computers and online TCP daemon with full-duplex > +resumable data transmission exists are all supported.") > + (license gpl3))) This LGTM! -- Sarah