all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Gregor Giesen <giesen@zaehlwerk.net>
Cc: 27419@debbugs.gnu.org
Subject: [bug#27419] [PATCH] gnu: Add unbound.
Date: Mon, 19 Jun 2017 14:14:29 +0200	[thread overview]
Message-ID: <87a854w4wq.fsf@gnu.org> (raw)
In-Reply-To: <20170618125143.z3ump7fib2rmwi73@zaehlwerk.net> (Gregor Giesen's message of "Sun, 18 Jun 2017 14:51:43 +0200")

Hi Gregor,

Gregor Giesen <giesen@zaehlwerk.net> skribis:

> From fac67e33fe0501ddcad3a1e75f20b4954f36834b Mon Sep 17 00:00:00 2001
> From: Gregor Giesen <giesen@zaehlwerk.net>
> 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’m 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 ‘native-inputs’ because it’s 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=.*$")
> +                  (string-append
> +                   "PYTHON_SITE_PKG="
> +                   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 ‘use-modules’ 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 <stdlib.h>

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?

> +               (substitute* "Makefile"
> +                 (("./unittest")
> +                  "LD_PRELOAD=/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 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 127.0.0.1 and ::1, and NXDOMAIN for zones served by AS112.  Stub and forward zones are supported.")

Please wrap lines to 80 chars as ‘guix lint’ should suggest.  Also you
can write @code{127.0.0.1} and @code{::1}.

That’s it, thank you for this first package!

Ludo’.

  reply	other threads:[~2017-06-19 12:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-18 12:51 [bug#27419] [PATCH] gnu: Add unbound Gregor Giesen
2017-06-19 12:14 ` Ludovic Courtès [this message]
2017-06-19 16:38   ` Gregor Giesen
2017-06-20 20:08     ` bug#27419: " Ludovic Courtès
2017-06-20 20:27       ` [bug#27419] " Gregor Giesen
2017-06-21  8:19         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a854w4wq.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=27419@debbugs.gnu.org \
    --cc=giesen@zaehlwerk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.