unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Simon South <simon@simonsouth.net>
Cc: 41363-done@debbugs.gnu.org
Subject: bug#41363: knot-resolver: Enable reloading of policy files (add lua-cqueues)
Date: Thu, 25 Jun 2020 12:26:38 +0200	[thread overview]
Message-ID: <87pn9nsaox.fsf@gnu.org> (raw)
In-Reply-To: <878shqtyaa.fsf@mercury.simonsouth.net> (Simon South's message of "Sun, 17 May 2020 10:46:05 -0400")

Hi Simon,

Simon South <simon@simonsouth.net> skribis:

> This patch series enables the automatic reloading of response-policy
> zone (RPZ) files by Knot Resolver. Specifically these patches
>
> - Add package definitions for the cqueues Lua extension module and the
>   luaossl module on which it relies, and
>
> - Add lua5.1-cqueues as an input to knot-resolver.
>
> With these changes applied, Knot Resolver can be configured with lines
> like
>
>     modules = { 'policy' }
>     policy.add(policy.rpz(policy.DENY, '/etc/dns/blacklist.txt', true))
>
> and it will automatically reload RPZ rules from /etc/dns/blacklist.txt
> whenever that file changes. This makes it easy to use Knot Resolver to
> block unwanted sites using a list of domains downloaded periodically
> from the Internet.
>
> I've tested these changes on x86-64 and aarch64. On x86-64 everything
> works as expected.

I went ahead and applied this patch series (builds fine on x86_64).

> On aarch64, the packages build and install fine but Knot Resolver fails
> to load the configuration above with
>
>     policy.lua:430: [poli] lua-cqueues required to watch and reload RPZ file
>
> This is due to a known issue with LuaJIT on aarch64 (see e.g.
> https://github.com/LuaJIT/LuaJIT/pull/230):
>
>     $ ./pre-inst-env guix environment knot-resolver --ad-hoc knot-resolver
>     $ $(head -n 3 `which kresd` | tail -n 2)  # set LUA_PATH, LUA_CPATH
>     $ luajit -e 'require("cqueues")'
>     luajit: bad light userdata pointer
>     stack traceback:
>             [C]: at 0xffffa556a960
>             [C]: in function 'require'
>             ...
>     $
>
> Otherwise (i.e. after changing "true" to "false" in the configuration
> above) Knot Resolver continues to work as it did before, so I expect
> existing users will not be affected.
>
> I'll work on diagnosing the upstream bug but thought I'd submit these
> patches in the meantime.

Should we disable the Lua dependency on AArch64?

Thank you, and apologies for the delay!

Ludo’.




  parent reply	other threads:[~2020-06-25 10:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 14:46 [bug#41363] knot-resolver: Enable reloading of policy files (add lua-cqueues) Simon South
2020-05-17 16:09 ` [bug#41363] [PATCH 1/3] gnu: Add lua-ossl Simon South
2020-05-17 16:09   ` [bug#41363] [PATCH 2/3] gnu: Add lua-cqueues Simon South
2020-05-17 16:09   ` [bug#41363] [PATCH 3/3] gnu: knot-resolver: Enable automatic reloading of policy files Simon South
2020-05-18 12:32   ` [bug#41363] [PATCH 1/3] gnu: Add lua-ossl Simon South
2020-05-19 10:25 ` [bug#41363] knot-resolver: Enable reloading of policy files (add lua-cqueues) Simon South
2020-05-29 19:36 ` Simon South
2020-06-17 10:02 ` Ludovic Courtès
2020-06-25 10:26 ` Ludovic Courtès [this message]
2020-06-25 14:18   ` Simon South
2020-06-25 21:06     ` 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87pn9nsaox.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=41363-done@debbugs.gnu.org \
    --cc=simon@simonsouth.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).