From patchwork Mon Jun 1 00:40:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Maja_K=C4=85dzio=C5=82ka?= X-Patchwork-Id: 22490 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2D97627BBE3; Mon, 1 Jun 2020 01:41:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 504EB27BBE1 for ; Mon, 1 Jun 2020 01:41:18 +0100 (BST) Received: from localhost ([::1]:52224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfYVx-0004OC-Qx for patchwork@mira.cbaines.net; Sun, 31 May 2020 20:41:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfYVj-0004O3-C2 for guix-patches@gnu.org; Sun, 31 May 2020 20:41:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfYVi-00087X-Ma for guix-patches@gnu.org; Sun, 31 May 2020 20:41:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfYVi-0004Xi-HW for guix-patches@gnu.org; Sun, 31 May 2020 20:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41637] [PATCH] gnu: Add hashcash. Resent-From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Jun 2020 00:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41637 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41637@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159097204317430 (code B ref -1); Mon, 01 Jun 2020 00:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Jun 2020 00:40:43 +0000 Received: from localhost ([127.0.0.1]:34173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfYVG-0004Wv-2g for submit@debbugs.gnu.org; Sun, 31 May 2020 20:40:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:54542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfYVE-0004Wo-Ni for submit@debbugs.gnu.org; Sun, 31 May 2020 20:40:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfYVE-0004La-GX for guix-patches@gnu.org; Sun, 31 May 2020 20:40:32 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:52572) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfYVD-0007vI-11 for guix-patches@gnu.org; Sun, 31 May 2020 20:40:32 -0400 Received: (qmail 26519 invoked by uid 1009); 1 Jun 2020 02:40:21 +0200 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25828. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.052652 secs); 01 Jun 2020 00:40:21 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 1 Jun 2020 02:40:21 +0200 From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Date: Mon, 1 Jun 2020 02:40:15 +0200 Message-Id: <20200601004015.21684-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/31 20:40:21 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/networking.scm (hashcash): New variable. --- Is the license field here alright? Here's what the LICENSE file has to say: > This software can be distributed and used under any of the following > licenses: > > CPL > public domain > BSD (3 clause -- no advertising clause) > LGPL (2.1) > GPL (2) > > in rough order of author preference. > > The CPL is probably unique to this package, and is described here: > http://www.cypherspace.org/CPL/; if you can't be bothered to figure it > out feel free to use one of the other licenses. Earlier versions > where distributed just under CPL. CPL allows you to re-license under > a license of your choice, I just include other specific licenses to > save people having to read, understand and feel confident in the > validity of the CPL. > > NOTE: on systems without a POSIX getopt this package will be linked > with the included getopt.c which is distributed under GPL 2. gnu/packages/networking.scm | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) + (license license:public-domain))) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index fd29370841..169aa4ed8e 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -38,6 +38,7 @@ ;;; Copyright © 2019 Diego N. Barbato ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -3189,3 +3190,48 @@ CDP. The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver Link-Layer notifications to adjacent network devices. @code{lldpd} is an implementation of LLDP. It also supports some proprietary protocols.") (license license:isc))) + +(define-public hashcash + (package + (name "hashcash") + (version "1.22") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.hashcash.org/source/hashcash-" + version ".tgz")) + (sha256 + (base32 + "15kqaimwb2y8wvzpn73021bvay9mz1gqqfc40gk4hj6f84nz34h1")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags '("CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) + ;; No tests available. + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((outdir (assoc-ref outputs "out")) + (bindir (string-append outdir "/bin")) + (mandir (string-append outdir "/share/man/man1")) + (docdir (string-append outdir "/share/doc/hashcash-" ,version))) + ;; make install assumes /usr and doesn't provide a way to override it + (install-file "hashcash" bindir) + (install-file "hashcash.1" mandir) + (install-file "README" docdir) + (install-file "LICENSE" docdir) + (install-file "CHANGELOG" docdir) + #t)))))) + (home-page "https://www.hashcash.org/") + (synopsis "Denial-of-service countermeasure") + (description "Hashcash is a proof-of-work algorithm, which has been used +as a denial-of-service countermeasure technique in a number of systems. + +A hashcash stamp constitutes a proof-of-work which takes a parametrizable +amount of work to compute for the sender. The recipient can verify received +hashcash stamps efficiently. + +This package contains a command-line tool for computing and verifying hashcash +stamps.")