From unknown Wed Jun 18 00:26:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#27419 <27419@debbugs.gnu.org> To: bug#27419 <27419@debbugs.gnu.org> Subject: Status: [PATCH] gnu: Add unbound. Reply-To: bug#27419 <27419@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:26:56 +0000 retitle 27419 [PATCH] gnu: Add unbound. reassign 27419 guix-patches submitter 27419 Gregor Giesen severity 27419 normal tag 27419 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 12:38:38 2017 Received: (at submit) by debbugs.gnu.org; 18 Jun 2017 16:38:38 +0000 Received: from localhost ([127.0.0.1]:55269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMdDh-0000Rz-Kf for submit@debbugs.gnu.org; Sun, 18 Jun 2017 12:38:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMZgN-0001FZ-Pf for submit@debbugs.gnu.org; Sun, 18 Jun 2017 08:52:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMZgH-0005aW-82 for submit@debbugs.gnu.org; Sun, 18 Jun 2017 08:51:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58126) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dMZgH-0005aM-4M for submit@debbugs.gnu.org; Sun, 18 Jun 2017 08:51:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMZgE-0006eu-JT for guix-patches@gnu.org; Sun, 18 Jun 2017 08:51:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMZgB-0005ZH-Et for guix-patches@gnu.org; Sun, 18 Jun 2017 08:51:50 -0400 Received: from mx03.zaehlwerk.net ([136.243.37.109]:48025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMZgA-0005Z5-Vy for guix-patches@gnu.org; Sun, 18 Jun 2017 08:51:47 -0400 Received: from localhost (localhost [127.0.0.1]) by mx03.zaehlwerk.net (Postfix) with ESMTP id EE6DF2B95A for ; Sun, 18 Jun 2017 14:51:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zaehlwerk.net; h= user-agent:content-transfer-encoding:content-disposition :content-type:content-type:mime-version:message-id:subject :subject:from:from:date:date:received:received; s=mail; t= 1497790303; x=1499604704; bh=4GlqfmrKIJEu/lgl8fAODB83KUZowkZII9+ uyR40T8E=; b=e4LxxL7d5dMd98sCL9OFMDA3OHURU+GAqQ/IAZECv0bsUm/fSeS mIvD+SSNWQDwvnqpBNKesCYvygL3fop0ixVbY/ja7+gGrKWdX0p7rfD3bny9MwNG WXJdmB+COnOLq4DERVThXhgl6OdlZ+Qcfz+/BCN+2aeua8XbKjQAa05ix8fzkF2R SPtnejZrV9yqlC+r6loYw+K0+r5Jdv6yos+BgFul65UumOXXlRAGQI8NVUjk4H+Q VAXQa4+Y16BFDVbB4+0oB2doBHK4FMMhK1RCMr7a0BFmrPk06YV51UNVf/iMuP1Q 6JNAoHrYMe4SsVRPAqt3tfwE5dnG8aeinrw== X-Virus-Scanned: Debian amavisd-new at ps04.zaehlwerk.net Received: from mail.zaehlwerk.net ([IPv6:::1]) by localhost (ps04.zaehlwerk.net [IPv6:::1]) (amavisd-new, port 10587) with ESMTP id FRwqOiBJheLO for ; Sun, 18 Jun 2017 14:51:43 +0200 (CEST) Received: from zaehlwerk.net (p200300DF73D97400CBE58096AA6ECF10.dip0.t-ipconnect.de [IPv6:2003:df:73d9:7400:cbe5:8096:aa6e:cf10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.zaehlwerk.net (Postfix) with ESMTPSA for ; Sun, 18 Jun 2017 14:51:43 +0200 (CEST) Date: Sun, 18 Jun 2017 14:51:43 +0200 From: Gregor Giesen To: guix-patches@gnu.org Subject: [PATCH] gnu: Add unbound. Message-ID: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="pihy5ardxxh6cy45" Content-Disposition: inline X-Operating-System: GNU/Linux User-Agent: NeoMutt/20170602 (1.8.3) Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 18 Jun 2017 12:38:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --pihy5ardxxh6cy45 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I have added 'unbound', a recurse only caching DNS server. Best, Gregor --pihy5ardxxh6cy45 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-gnu-Add-unbound.patch" Content-Transfer-Encoding: quoted-printable >From fac67e33fe0501ddcad3a1e75f20b4954f36834b Mon Sep 17 00:00:00 2001 From: Gregor Giesen Date: Sun, 18 Jun 2017 14:27:34 +0200 Subject: [PATCH 1/1] gnu: Add unbound. * gnu/packages/dns.scm (unbound): New variable. --- gnu/packages/dns.scm | 146 +++++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 146 insertions(+) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 2e4d8fd18..d0d8319ce 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -8,6 +8,7 @@ ;;; Copyright =A9 2016, 2017 Tobias Geerinckx-Rice ;;; Copyright =A9 2016 Marius Bakke ;;; Copyright =A9 2017 Vasile Dumitrascu +;;; Copyright =A9 2017 Gregor Giesen ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +32,7 @@ #:use-module (gnu packages databases) #:use-module (gnu packages crypto) #:use-module (gnu packages datastructures) + #:use-module (gnu packages flex) #:use-module (gnu packages glib) #:use-module (gnu packages groff) #:use-module (gnu packages groff) @@ -42,12 +44,16 @@ #:use-module (gnu packages nettle) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) + #:use-module (gnu packages python) + #:use-module (gnu packages swig) #:use-module (gnu packages tls) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu)) =20 (define-public dnsmasq @@ -275,6 +281,146 @@ asynchronous fashion.") (license:non-copyleft "file://LICENSE") ; includes.h license:openssl)))) =20 +(define-public unbound + (package + (name "unbound") + (version "1.6.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.unbound.net/downloads/unbound-" + version ".tar.gz")) + (sha256 + (base32 + "0pw4m4z5qspsagxzbjb61xq5bhd57amw26xqvqzi6b8d3mf6azjc")))) + (build-system gnu-build-system) + (outputs '("out" "python")) + (inputs + `(("expat" ,expat) + ("flex" ,flex) + ("libevent" ,libevent) + ("protobuf" ,protobuf) + ("python" ,python-3) + ("python-wrapper" ,python-wrapper) + ("openssl" ,openssl) + ("swig" ,swig))) + (arguments + `(#:configure-flags + (list (string-append + "--with-ssl=3D" (assoc-ref %build-inputs "openssl")) + (string-append + "--with-libevent=3D" (assoc-ref %build-inputs "libevent")) + (string-append + "--with-libexpat=3D" (assoc-ref %build-inputs "expat")) + "--with-pythonmodule" "--with-pyunbound") + #:phases + (modify-phases + %standard-phases + (add-after 'configure 'fix-python-site-package-path + ;; Move python modules into their own output. + (lambda* (#:key outputs #:allow-other-keys) + (let ((pyout (assoc-ref outputs "python")) + (ver ,(version-major+minor (package-version python)))= ) + (substitute* "Makefile" + (("^PYTHON_SITE_PKG=3D.*$") + (string-append + "PYTHON_SITE_PKG=3D" + pyout "/lib/python-" ver "/site-packages\n")))))) + (add-before 'check 'fix-missing-nss-for-tests + (lambda* (#:key inputs outputs #:allow-other-keys) + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (gcc (assoc-ref %build-inputs "gcc"))) + (call-with-output-file "/tmp/nss_preload.c" + (lambda (port) + (display "#include +#include +#include + +#include + +struct protoent *getprotobyname(const char *name) { + struct protoent *p =3D malloc(sizeof(struct protoent)); + p->p_aliases =3D malloc(sizeof(char*)); + if (strcasecmp(name, \"tcp\") =3D=3D 0) { + p->p_name =3D \"tcp\"; + p->p_proto =3D 6; + p->p_aliases[0] =3D \"TCP\"; + } else if (strcasecmp(name, \"udp\") =3D=3D 0) { + p->p_name =3D \"udp\"; + p->p_proto =3D 17; + p->p_aliases[0] =3D \"UDP\"; + } else=20 + p =3D NULL; + return p; +} + +struct protoent *getprotobynumber(int proto) { + struct protoent *p =3D malloc(sizeof(struct protoent)); + p->p_aliases =3D malloc(sizeof(char*)); + switch(proto) { + case 6: + p->p_name =3D \"tcp\"; + p->p_proto =3D 6; + p->p_aliases[0] =3D \"TCP\"; + break; + case 17: + p->p_name =3D \"udp\"; + p->p_proto =3D 17; + p->p_aliases[0] =3D \"UDP\"; + break; + default: + p =3D NULL; + break; + } + return p; +} + +struct servent *getservbyname(const char *name, const char *proto) { + struct servent *s =3D malloc(sizeof(struct servent)); + char* buf =3D malloc((strlen(proto)+1)*sizeof(char)); + strcpy(buf, proto); + s->s_aliases =3D malloc(sizeof(char*)); + s->s_aliases[0] =3D NULL; + if (strcasecmp(name, \"domain\") =3D=3D 0) { + s->s_name =3D \"domain\"; + s->s_port =3D htons(53); + s->s_proto =3D buf; + } else=20 + s =3D NULL; + return s; +} + +struct servent *getservbyport(int port, const char *proto) { + char buf[32]; + struct servent *s =3D malloc(sizeof(struct servent)); + strcpy(buf, proto); + s->s_aliases =3D malloc(sizeof(char*)); + s->s_aliases[0] =3D NULL; + switch(port) { + case 53: + s->s_name =3D \"domain\"; + s->s_port =3D 53; + s->s_proto =3D \"udp\"; + break; + default: + s =3D NULL; + break; + } + return s; +}" port))) + (system* (string-append gcc "/bin/gcc") + "-shared" "-fPIC" "-o" "/tmp/nss_preload.so" + "/tmp/nss_preload.c") + (substitute* "Makefile" + (("./unittest") + "LD_PRELOAD=3D/tmp/nss_preload.so ./unittest")))))))) + (home-page "https://www.unbound.net") + (synopsis "Validating, recursive, and caching DNS resolver") + (description + "Unbound is a recursive-only caching DNS server which can perform D= NSSEC validation of results. It implements only a minimal amount of auth= oritative service to prevent leakage to the root nameservers: forward loo= kups for localhost, reverse for 127.0.0.1 and ::1, and NXDOMAIN for zones= served by AS112. Stub and forward zones are supported.") + (license license:bsd-3))) + (define-public yadifa (package (name "yadifa") --=20 2.13.1 --pihy5ardxxh6cy45-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 08:14:44 2017 Received: (at 27419) by debbugs.gnu.org; 19 Jun 2017 12:14:44 +0000 Received: from localhost ([127.0.0.1]:55712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMvZr-00075Y-Qb for submit@debbugs.gnu.org; Mon, 19 Jun 2017 08:14:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMvZq-00075L-29 for 27419@debbugs.gnu.org; Mon, 19 Jun 2017 08:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMvZg-0001x1-3O for 27419@debbugs.gnu.org; Mon, 19 Jun 2017 08:14:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMvZf-0001wx-VU; Mon, 19 Jun 2017 08:14:32 -0400 Received: from [193.50.110.101] (port=47190 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dMvZf-0002B4-DE; Mon, 19 Jun 2017 08:14:31 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Gregor Giesen Subject: Re: [bug#27419] [PATCH] gnu: Add unbound. References: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Messidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 19 Jun 2017 14:14:29 +0200 In-Reply-To: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> (Gregor Giesen's message of "Sun, 18 Jun 2017 14:51:43 +0200") Message-ID: <87a854w4wq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 27419 Cc: 27419@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) Hi Gregor, Gregor Giesen skribis: > From fac67e33fe0501ddcad3a1e75f20b4954f36834b Mon Sep 17 00:00:00 2001 > From: Gregor Giesen > Date: Sun, 18 Jun 2017 14:27:34 +0200 > Subject: [PATCH 1/1] gnu: Add unbound. > > * gnu/packages/dns.scm (unbound): New variable. Nice! Overall LGTM, so I=E2=80=99m commenting on minor issues: > + (outputs '("out" "python")) > + (inputs > + `(("expat" ,expat) > + ("flex" ,flex) > + ("libevent" ,libevent) > + ("protobuf" ,protobuf) > + ("python" ,python-3) > + ("python-wrapper" ,python-wrapper) > + ("openssl" ,openssl) > + ("swig" ,swig))) I think SWIG should go to =E2=80=98native-inputs=E2=80=99 because it=E2=80= =99s only used at build time. > + (modify-phases > + %standard-phases I would make this a single line. :-) > + (add-after 'configure 'fix-python-site-package-path > + ;; Move python modules into their own output. > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((pyout (assoc-ref outputs "python")) > + (ver ,(version-major+minor (package-version python)))) > + (substitute* "Makefile" > + (("^PYTHON_SITE_PKG=3D.*$") > + (string-append > + "PYTHON_SITE_PKG=3D" > + pyout "/lib/python-" ver "/site-packages\n")))))) Please make sure the phase explicitly returns #t to indicate success. > + (add-before 'check 'fix-missing-nss-for-tests > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (use-modules (guix build utils)) The =E2=80=98use-modules=E2=80=99 line is not needed. > + (let* ((source (assoc-ref %build-inputs "source")) > + (gcc (assoc-ref %build-inputs "gcc"))) > + (call-with-output-file "/tmp/nss_preload.c" > + (lambda (port) > + (display "#include As discussed on help-guix, I would prefer using =E2=80=98substitute*=E2=80= =99 to modify all the unit tests. That would reduce complexity and be potentially more robust. Does that sound feasible without much hassle? > + (substitute* "Makefile" > + (("./unittest") > + "LD_PRELOAD=3D/tmp/nss_preload.so ./unittest")))))))) Also return #t. > + (home-page "https://www.unbound.net") > + (synopsis "Validating, recursive, and caching DNS resolver") > + (description > + "Unbound is a recursive-only caching DNS server which can perform D= NSSEC validation of results. It implements only a minimal amount of author= itative service to prevent leakage to the root nameservers: forward lookups= for localhost, reverse for 127.0.0.1 and ::1, and NXDOMAIN for zones serve= d by AS112. Stub and forward zones are supported.") Please wrap lines to 80 chars as =E2=80=98guix lint=E2=80=99 should suggest= . Also you can write @code{127.0.0.1} and @code{::1}. That=E2=80=99s it, thank you for this first package! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 12:46:12 2017 Received: (at 27419) by debbugs.gnu.org; 19 Jun 2017 16:46:12 +0000 Received: from localhost ([127.0.0.1]:56443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMzoa-0004vg-0r for submit@debbugs.gnu.org; Mon, 19 Jun 2017 12:46:12 -0400 Received: from mx03.zaehlwerk.net ([136.243.37.109]:40825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMzhd-0004l4-9c for 27419@debbugs.gnu.org; Mon, 19 Jun 2017 12:39:02 -0400 Received: from localhost (localhost [127.0.0.1]) by mx03.zaehlwerk.net (Postfix) with ESMTP id 123ED2C1E8; Mon, 19 Jun 2017 18:38:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zaehlwerk.net; h= user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:content-type:mime-version :references:message-id:subject:subject:from:from:date:date :received:received; s=mail; t=1497890339; x=1499704740; bh=pvLPm JfFwgnAk/FDq+EksE5B5vWd2WvUOWhso7Jp/mQ=; b=f1wwSCn2giI546AuTixQR b3tyJFWLoaQHCeGgJRECwoVwPIVjBq7Tx9+pD6ggmdaRrr6Y7poDSxCnoxtrHq0q 85rTZlcscs8SB/KFu98T66H5of3C5uIiWFVOwE4/zWDOQ91a1xfUwU0dKa1nvjAu obwUaC1xBMR/BhgcK/k3C0qvhxZZRIsH4K3xGbt9FZyN3QqY4xkL7sy6y3QfADOX 0kiOhzQ61B34ovvx0NXuTSgK90eOcY36qRNmR0M+ablq+ghu6lB857hUtrucbyCt Acxe+0oMxA8zJokRqJOpYTubAAJ0AsQvg7U1drQZI5cZPdT8tCT8sltaajuKagRB Q== X-Virus-Scanned: Debian amavisd-new at ps04.zaehlwerk.net Received: from mail.zaehlwerk.net ([IPv6:::1]) by localhost (ps04.zaehlwerk.net [IPv6:::1]) (amavisd-new, port 10587) with ESMTP id R_VAwFkp5dKb; Mon, 19 Jun 2017 18:38:59 +0200 (CEST) Received: from zaehlwerk.net (p200300DF73C26C00E678B19F6109410E.dip0.t-ipconnect.de [IPv6:2003:df:73c2:6c00:e678:b19f:6109:410e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.zaehlwerk.net (Postfix) with ESMTPSA; Mon, 19 Jun 2017 18:38:58 +0200 (CEST) Date: Mon, 19 Jun 2017 18:38:58 +0200 From: Gregor Giesen To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: [bug#27419] [PATCH] gnu: Add unbound. Message-ID: <20170619163858.tqakdrwqa5fspiiu@zaehlwerk.net> References: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> <87a854w4wq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="acz3wy2aaour3v5s" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87a854w4wq.fsf@gnu.org> X-Operating-System: GNU/Linux User-Agent: NeoMutt/20170602 (1.8.3) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27419 X-Mailman-Approved-At: Mon, 19 Jun 2017 12:46:10 -0400 Cc: 27419@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --acz3wy2aaour3v5s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Dear Ludo’, many thanks for the feedback! I have fixed the minor issues you mentioned. On Mon, Jun 19, 2017 at 02:14:29PM +0200, Ludovic Courtès wrote: > > + (outputs '("out" "python")) > > + (inputs > > + `(("expat" ,expat) > > + ("flex" ,flex) > > + ("libevent" ,libevent) > > + ("protobuf" ,protobuf) > > + ("python" ,python-3) > > + ("python-wrapper" ,python-wrapper) > > + ("openssl" ,openssl) > > + ("swig" ,swig))) > > I think SWIG should go to ‘native-inputs’ because it’s only used at > build time. Right, and I also moved ‘flex’ there. > > + (let* ((source (assoc-ref %build-inputs "source")) > > + (gcc (assoc-ref %build-inputs "gcc"))) > > + (call-with-output-file "/tmp/nss_preload.c" > > + (lambda (port) > > + (display "#include > > As discussed on help-guix, I would prefer using ‘substitute*’ to modify > all the unit tests. That would reduce complexity and be potentially > more robust. Does that sound feasible without much hassle? Substituting is not not an option since after changing a record in the test data one would have to create (cryptographically) new matching RRSIG records otherwise the test would still fail. > That’s it, thank you for this first package! Thanks again for your help! Attached is the modified patch. Best, Gregor --acz3wy2aaour3v5s Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-unbound.patch" Content-Transfer-Encoding: 8bit >From 509b07d745dbe852259370cd7fbe0a6cfdcee9d7 Mon Sep 17 00:00:00 2001 From: Gregor Giesen Date: Sun, 18 Jun 2017 14:27:34 +0200 Subject: [PATCH 1/1] gnu: Add unbound. * gnu/packages/dns.scm (unbound): New variable. --- gnu/packages/dns.scm | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 2e4d8fd18..fabae9796 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2017 Vasile Dumitrascu +;;; Copyright © 2017 Gregor Giesen ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +32,7 @@ #:use-module (gnu packages databases) #:use-module (gnu packages crypto) #:use-module (gnu packages datastructures) + #:use-module (gnu packages flex) #:use-module (gnu packages glib) #:use-module (gnu packages groff) #:use-module (gnu packages groff) @@ -42,12 +44,16 @@ #:use-module (gnu packages nettle) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) + #:use-module (gnu packages python) + #:use-module (gnu packages swig) #:use-module (gnu packages tls) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu)) (define-public dnsmasq @@ -275,6 +281,164 @@ asynchronous fashion.") (license:non-copyleft "file://LICENSE") ; includes.h license:openssl)))) +(define-public unbound + (package + (name "unbound") + (version "1.6.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.unbound.net/downloads/unbound-" + version ".tar.gz")) + (sha256 + (base32 + "0pw4m4z5qspsagxzbjb61xq5bhd57amw26xqvqzi6b8d3mf6azjc")))) + (build-system gnu-build-system) + (outputs '("out" "python")) + (native-inputs + `(("flex" ,flex) + ("swig" ,swig))) + (inputs + `(("expat" ,expat) + ("libevent" ,libevent) + ("protobuf" ,protobuf) + ("python" ,python-3) + ("python-wrapper" ,python-wrapper) + ("openssl" ,openssl))) + (arguments + `(#:configure-flags + (list (string-append + "--with-ssl=" (assoc-ref %build-inputs "openssl")) + (string-append + "--with-libevent=" (assoc-ref %build-inputs "libevent")) + (string-append + "--with-libexpat=" (assoc-ref %build-inputs "expat")) + "--with-pythonmodule" "--with-pyunbound") + #:phases + (modify-phases %standard-phases + (add-after 'configure 'fix-python-site-package-path + ;; Move python modules into their own output. + (lambda* (#:key outputs #:allow-other-keys) + (let ((pyout (assoc-ref outputs "python")) + (ver ,(version-major+minor (package-version python)))) + (substitute* "Makefile" + (("^PYTHON_SITE_PKG=.*$") + (string-append + "PYTHON_SITE_PKG=" + pyout "/lib/python-" ver "/site-packages\n")))) + #t)) + (add-before 'check 'fix-missing-nss-for-tests + ;; Unfortunately, the package's unittests involve some checks + ;; looking up protocols and services which are not provided + ;; by the minimalistic build environment, in particular, + ;; /etc/protocols and /etc/services are missing. + ;; Also, after plain substitution of protocol and service names + ;; in the test data, the tests still fail because the + ;; corresponding Resource Records have been signed by + ;; RRSIG records. + ;; The following LD_PRELOAD library overwrites the glibc + ;; functions ‘get{proto,serv}byname’, ‘getprotobynumber’ and + ;; ‘getservbyport’ providing the few records required for the + ;; unit tests to pass. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((source (assoc-ref %build-inputs "source")) + (gcc (assoc-ref %build-inputs "gcc"))) + (call-with-output-file "/tmp/nss_preload.c" + (lambda (port) + (display "#include +#include +#include + +#include + +struct protoent *getprotobyname(const char *name) { + struct protoent *p = malloc(sizeof(struct protoent)); + p->p_aliases = malloc(sizeof(char*)); + if (strcasecmp(name, \"tcp\") == 0) { + p->p_name = \"tcp\"; + p->p_proto = 6; + p->p_aliases[0] = \"TCP\"; + } else if (strcasecmp(name, \"udp\") == 0) { + p->p_name = \"udp\"; + p->p_proto = 17; + p->p_aliases[0] = \"UDP\"; + } else + p = NULL; + return p; +} + +struct protoent *getprotobynumber(int proto) { + struct protoent *p = malloc(sizeof(struct protoent)); + p->p_aliases = malloc(sizeof(char*)); + switch(proto) { + case 6: + p->p_name = \"tcp\"; + p->p_proto = 6; + p->p_aliases[0] = \"TCP\"; + break; + case 17: + p->p_name = \"udp\"; + p->p_proto = 17; + p->p_aliases[0] = \"UDP\"; + break; + default: + p = NULL; + break; + } + return p; +} + +struct servent *getservbyname(const char *name, const char *proto) { + struct servent *s = malloc(sizeof(struct servent)); + char* buf = malloc((strlen(proto)+1)*sizeof(char)); + strcpy(buf, proto); + s->s_aliases = malloc(sizeof(char*)); + s->s_aliases[0] = NULL; + if (strcasecmp(name, \"domain\") == 0) { + s->s_name = \"domain\"; + s->s_port = htons(53); + s->s_proto = buf; + } else + s = NULL; + return s; +} + +struct servent *getservbyport(int port, const char *proto) { + char buf[32]; + struct servent *s = malloc(sizeof(struct servent)); + strcpy(buf, proto); + s->s_aliases = malloc(sizeof(char*)); + s->s_aliases[0] = NULL; + switch(port) { + case 53: + s->s_name = \"domain\"; + s->s_port = 53; + s->s_proto = \"udp\"; + break; + default: + s = NULL; + break; + } + return s; +}" port))) + (system* (string-append gcc "/bin/gcc") + "-shared" "-fPIC" "-o" "/tmp/nss_preload.so" + "/tmp/nss_preload.c") + ;; The preload library only affects the unittests. + (substitute* "Makefile" + (("./unittest") + "LD_PRELOAD=/tmp/nss_preload.so ./unittest"))) + #t))))) + (home-page "https://www.unbound.net") + (synopsis "Validating, recursive, and caching DNS resolver") + (description + "Unbound is a recursive-only caching DNS server which can perform DNSSEC +validation of results. It implements only a minimal amount of authoritative +service to prevent leakage to the root nameservers: forward lookups for +localhost, reverse for @code{127.0.0.1} and @code{::1}, and NXDOMAIN for zones +served by AS112. Stub and forward zones are supported.") + (license license:bsd-3))) + (define-public yadifa (package (name "yadifa") -- 2.13.1 --acz3wy2aaour3v5s-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 16:08:56 2017 Received: (at 27419-done) by debbugs.gnu.org; 20 Jun 2017 20:08:56 +0000 Received: from localhost ([127.0.0.1]:58452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNPSJ-0001LG-UJ for submit@debbugs.gnu.org; Tue, 20 Jun 2017 16:08:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNPSI-0001L4-C9 for 27419-done@debbugs.gnu.org; Tue, 20 Jun 2017 16:08:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNPS9-0000Sv-ST for 27419-done@debbugs.gnu.org; Tue, 20 Jun 2017 16:08:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNPS9-0000Sa-OS; Tue, 20 Jun 2017 16:08:45 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:54524 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dNPS9-00081Z-2Q; Tue, 20 Jun 2017 16:08:45 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Gregor Giesen Subject: Re: [bug#27419] [PATCH] gnu: Add unbound. References: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> <87a854w4wq.fsf@gnu.org> <20170619163858.tqakdrwqa5fspiiu@zaehlwerk.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Messidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 20 Jun 2017 22:08:42 +0200 In-Reply-To: <20170619163858.tqakdrwqa5fspiiu@zaehlwerk.net> (Gregor Giesen's message of "Mon, 19 Jun 2017 18:38:58 +0200") Message-ID: <87zid2l8vp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 27419-done Cc: 27419-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) Hi Gregor, Gregor Giesen skribis: > From 509b07d745dbe852259370cd7fbe0a6cfdcee9d7 Mon Sep 17 00:00:00 2001 > From: Gregor Giesen > Date: Sun, 18 Jun 2017 14:27:34 +0200 > Subject: [PATCH 1/1] gnu: Add unbound. > > * gnu/packages/dns.scm (unbound): New variable. [...] > + (license license:bsd-3))) On closer inspection it turns out to be so I changed that to =E2=80=98bsd-4=E2=80=99. Applied with this change, thank you! =E2=80=9Cguix build unbound --rounds=3D2 -K=E2=80=9D shows differences in l= ibunbound.a. Perhaps we should simply remove it? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 17:01:55 2017 Received: (at 27419) by debbugs.gnu.org; 20 Jun 2017 21:01:55 +0000 Received: from localhost ([127.0.0.1]:58524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNQHa-0002bg-Vz for submit@debbugs.gnu.org; Tue, 20 Jun 2017 17:01:55 -0400 Received: from mx03.zaehlwerk.net ([136.243.37.109]:50989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNPkS-0001oU-Vx for 27419@debbugs.gnu.org; Tue, 20 Jun 2017 16:27:41 -0400 Received: from localhost (localhost [127.0.0.1]) by mx03.zaehlwerk.net (Postfix) with ESMTP id 2767C2B86B; Tue, 20 Jun 2017 22:27:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zaehlwerk.net; h= user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:content-type:mime-version :references:message-id:subject:subject:from:from:date:date :received:received; s=mail; t=1497990459; x=1499804860; bh=dODTC QxRfeGiugWKOWvsKsL+WT4X4QvVb/eufqEG9mU=; b=oef15bZqj5ks2aXYdS3IA ZdeaWQT2VGLtHlYvIC96wrWFVicN3JVahd2DXrieUlz5T+kmAv1mCoOI/klq96Vq 9LJ2ogi8bzlzMHpoiuRrpQz4ZOfDkASI/aA9eQhhOFvC8udAEQok+hccPs9CmfWE vcgZqZusdAKHlERDb72xhQ2f/q/qbnpHSJilXpYGSy9gtpt7DgUQ0Mh7gT6SlpgF Hk2kaIfRGlXCjTE7TV5IBdmDAiglMVnnk0qxMrgv4j8mVP5m4gAKesdDnxTz9RSu GJkRtxTqQl/LuayxcBeSa0yDNTKBvnU/MSu/T2SzoRrqKH8IA6ypvSLqwevJcNZ6 Q== X-Virus-Scanned: Debian amavisd-new at ps04.zaehlwerk.net Received: from mail.zaehlwerk.net ([IPv6:::1]) by localhost (ps04.zaehlwerk.net [IPv6:::1]) (amavisd-new, port 10587) with ESMTP id xbyjwhdJZiqe; Tue, 20 Jun 2017 22:27:39 +0200 (CEST) Received: from zaehlwerk.net (p200300DF73C36B00F5B5813198344DEF.dip0.t-ipconnect.de [IPv6:2003:df:73c3:6b00:f5b5:8131:9834:4def]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.zaehlwerk.net (Postfix) with ESMTPSA; Tue, 20 Jun 2017 22:27:39 +0200 (CEST) Date: Tue, 20 Jun 2017 22:27:38 +0200 From: Gregor Giesen To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: [bug#27419] [PATCH] gnu: Add unbound. Message-ID: <20170620202732.2wxinyshoklpiyib@zaehlwerk.net> References: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> <87a854w4wq.fsf@gnu.org> <20170619163858.tqakdrwqa5fspiiu@zaehlwerk.net> <87zid2l8vp.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87zid2l8vp.fsf@gnu.org> X-Operating-System: GNU/Linux User-Agent: NeoMutt/20170602 (1.8.3) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27419 X-Mailman-Approved-At: Tue, 20 Jun 2017 17:01:53 -0400 Cc: 27419@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Dear Ludo’, On Tue, Jun 20, 2017 at 10:08:42PM +0200, Ludovic Courtès wrote: > > + (license license:bsd-3))) > > On closer inspection it turns out to be > so I changed that > to ‘bsd-4’. sorry, my bad! > Applied with this change, thank you! > > “guix build unbound --rounds=2 -K” shows differences in libunbound.a. > Perhaps we should simply remove it? Yes, I don't think we need it. We could simply add "--disable-static" to the #:configure-flags. Best, Gregor From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 04:19:53 2017 Received: (at 27419) by debbugs.gnu.org; 21 Jun 2017 08:19:53 +0000 Received: from localhost ([127.0.0.1]:58822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNarg-0006je-Qk for submit@debbugs.gnu.org; Wed, 21 Jun 2017 04:19:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNarf-0006jR-CO for 27419@debbugs.gnu.org; Wed, 21 Jun 2017 04:19:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNarU-0006oB-VC for 27419@debbugs.gnu.org; Wed, 21 Jun 2017 04:19:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNarU-0006o5-Rd; Wed, 21 Jun 2017 04:19:40 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:56970 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dNarT-0005Jc-TU; Wed, 21 Jun 2017 04:19:40 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Gregor Giesen Subject: Re: [bug#27419] [PATCH] gnu: Add unbound. References: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> <87a854w4wq.fsf@gnu.org> <20170619163858.tqakdrwqa5fspiiu@zaehlwerk.net> <87zid2l8vp.fsf@gnu.org> <20170620202732.2wxinyshoklpiyib@zaehlwerk.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 Messidor an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 21 Jun 2017 10:19:37 +0200 In-Reply-To: <20170620202732.2wxinyshoklpiyib@zaehlwerk.net> (Gregor Giesen's message of "Tue, 20 Jun 2017 22:27:38 +0200") Message-ID: <87vanpkb1i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27419 Cc: 27419@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, Gregor Giesen skribis: >> =E2=80=9Cguix build unbound --rounds=3D2 -K=E2=80=9D shows differences i= n libunbound.a. >> Perhaps we should simply remove it? > Yes, I don't think we need it. We could simply add "--disable-static" to > the #:configure-flags. Sounds good to me, I=E2=80=99ve committed this change. Thanks, Ludo=E2=80=99. From unknown Wed Jun 18 00:26:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 19 Jul 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator