From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mFIvNofY01+LBQAA0tVLHw (envelope-from ) for ; Fri, 11 Dec 2020 20:37:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uGnoMYfY01+IAwAAbx9fmQ (envelope-from ) for ; Fri, 11 Dec 2020 20:37:27 +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 3F95C9405D3 for ; Fri, 11 Dec 2020 20:37:27 +0000 (UTC) Received: from localhost ([::1]:38002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knpAL-0005Fb-Vw for larch@yhetil.org; Fri, 11 Dec 2020 15:37:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knowQ-0007Ro-Mm for guix-patches@gnu.org; Fri, 11 Dec 2020 15:23:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knowQ-0005vP-89 for guix-patches@gnu.org; Fri, 11 Dec 2020 15:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knowQ-00015q-4v for guix-patches@gnu.org; Fri, 11 Dec 2020 15:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45185] [PATCH 1/1] gnu: knot-resolver: Update to 5.2.1. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Dec 2020 20:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45185 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45185@debbugs.gnu.org Received: via spool by 45185-submit@debbugs.gnu.org id=B45185.16077181714165 (code B ref 45185); Fri, 11 Dec 2020 20:23:02 +0000 Received: (at 45185) by debbugs.gnu.org; 11 Dec 2020 20:22:51 +0000 Received: from localhost ([127.0.0.1]:43337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knowC-000153-T9 for submit@debbugs.gnu.org; Fri, 11 Dec 2020 15:22:51 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:56140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1know7-00014l-Ey for 45185@debbugs.gnu.org; Fri, 11 Dec 2020 15:22:47 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 2325EC4945; Fri, 11 Dec 2020 20:22:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MbkVFTcZwOLF; Fri, 11 Dec 2020 20:22:37 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 28082C464F; Fri, 11 Dec 2020 20:22:34 +0000 (UTC) From: Simon South Date: Fri, 11 Dec 2020 15:16:47 -0500 Message-Id: <2df478ab581dbf3ee336d165a50cc6234a4be144.1607699945.git.simon@simonsouth.net> X-Mailer: git-send-email 2.25.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 X-Migadu-Spam-Score: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 3F95C9405D3 X-Spam-Score: -1.30 X-Migadu-Scanner: scn1.migadu.com X-TUID: h6STWxQ521EI * gnu/packages/dns.scm (knot-resolver): Update to 5.2.1. [source]: Remove obsolete patch. * gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/dns.scm | 7 +- ...t-resolver-fix-map-command-on-32-bit.patch | 146 ------------------ 3 files changed, 2 insertions(+), 152 deletions(-) delete mode 100644 gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch diff --git a/gnu/local.mk b/gnu/local.mk index b32ebf4e3b..321e677f64 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1221,7 +1221,6 @@ dist_patch_DATA = \ %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/kmscon-runtime-keymap-switch.patch \ - %D%/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch \ %D%/packages/patches/kpackage-allow-external-paths.patch \ %D%/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch \ %D%/packages/patches/kmplayer-aarch64.patch \ diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index d59fe57ade..403ebd3d8b 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -937,17 +937,14 @@ synthesis, and on-the-fly re-configuration.") (define-public knot-resolver (package (name "knot-resolver") - (version "5.2.0") + (version "5.2.1") (source (origin (method url-fetch) (uri (string-append "https://secure.nic.cz/files/knot-resolver/" "knot-resolver-" version ".tar.xz")) (sha256 (base32 - "0cwlipib3x88dr6cijqv2aps13b4ijv524wc85ns07rkldy2c948")) - (patches - (search-patches - "knot-resolver-fix-map-command-on-32-bit.patch")))) + "09jqy23q1pgj76y2qd1xfk72wwmypnyawm3span3gx00qi2bfdxa")))) (build-system meson-build-system) (outputs '("out" "doc")) (arguments diff --git a/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch b/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch deleted file mode 100644 index 02c0fbcb70..0000000000 --- a/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit e01979620025666633250b3e2d545fe59c629f73 -Author: Vladimír Čunát -Date: Fri Nov 13 14:16:32 2020 +0100 - - fix map() command on 32-bit platforms; regressed in 5.2.0 - - LuaJIT FFI was using opendir() (etc.) variants with 32-bit inodes - but the C parts was using them as 64-bit inode variants. - Consequently the `struct dirent` layout didn't match and we were getting - filenames shifted by eight bytes. - - Now the whole dir-listing lua function is written in C. - -diff --git a/.luacheckrc b/.luacheckrc -index 0cf0b884..67bc18f6 100644 ---- a/.luacheckrc -+++ b/.luacheckrc -@@ -20,6 +20,7 @@ new_read_globals = { - 'user', - 'verbose', - 'worker', -+ 'kluautil_list_dir', - -- Sandbox declarations - 'kB', - 'MB', -diff --git a/NEWS b/NEWS -index 2eae3082..9d8cde99 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,6 +1,10 @@ - Knot Resolver X.Y.X (yyyy-mm-dd) - ================================ - -+Bugfixes -+-------- -+- fix map() command on 32-bit platforms; regressed in 5.2.0 (!1093) -+ - - Knot Resolver 5.2.0 (2020-11-11) - ================================ -diff --git a/daemon/bindings/impl.c b/daemon/bindings/impl.c -index d10f4525..d9ad0774 100644 ---- a/daemon/bindings/impl.c -+++ b/daemon/bindings/impl.c -@@ -2,6 +2,7 @@ - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -+#include - #include - #include - #include -@@ -29,6 +30,29 @@ const char * lua_table_checkindices(lua_State *L, const char *keys[]) - return NULL; - } - -+/** Return table listing filenames in a given directory (ls -A). */ -+static int kluautil_list_dir(lua_State *L) -+{ -+ lua_newtable(L); // empty table even on errors -+ -+ const char *path = lua_tolstring(L, 1, NULL); -+ if (!path) return 1; -+ DIR *dir = opendir(path); -+ if (!dir) return 1; -+ -+ struct dirent *entry; -+ int lua_i = 1; -+ while ((entry = readdir(dir)) != NULL) { -+ if (strcmp(entry->d_name, ".") && strcmp(entry->d_name, "..")) { -+ lua_pushstring(L, entry->d_name); -+ lua_rawseti(L, -2, lua_i++); -+ } -+ } -+ -+ closedir(dir); -+ return 1; -+} -+ - - /* Each of these just creates the correspondingly named lua table of functions. */ - int kr_bindings_cache (lua_State *L); /* ./cache.c */ -@@ -44,6 +68,9 @@ void kr_bindings_register(lua_State *L) - kr_bindings_modules(L); - kr_bindings_net(L); - kr_bindings_worker(L); -+ -+ /* Finally some lua utils *written in C*, not really a binding. */ -+ lua_register(L, "kluautil_list_dir", kluautil_list_dir); - } - - void lua_error_p(lua_State *L, const char *fmt, ...) -diff --git a/daemon/lua/kluautil.lua b/daemon/lua/kluautil.lua -index 57912e7b..e73e952c 100644 ---- a/daemon/lua/kluautil.lua -+++ b/daemon/lua/kluautil.lua -@@ -1,6 +1,5 @@ - -- SPDX-License-Identifier: GPL-3.0-or-later - --local ffi = require('ffi') - local kluautil = {} - - -- Get length of table -@@ -28,14 +27,6 @@ function kluautil.kr_table_unpack(tab) - return unpack(tab, 1, tab.n) - end - --ffi.cdef([[ -- typedef struct __dirstream DIR; -- DIR *opendir(const char *name); -- struct dirent *readdir(DIR *dirp); -- int closedir(DIR *dirp); -- char *strerror(int errnum); --]]) -- - -- Fetch over HTTPS - function kluautil.kr_https_fetch(url, out_file, ca_file) - local http_ok, http_request = pcall(require, 'http.request') -@@ -88,26 +79,6 @@ function kluautil.kr_https_fetch(url, out_file, ca_file) - return true - end - ---- List directory --function kluautil.list_dir (path) -- local results = {} -- local dir = ffi.C.opendir(path) -- if dir == nil then -- return results -- end -- -- local entry = ffi.C.readdir(dir) -- while entry ~= nil do -- local entry_name = ffi.string(ffi.C.kr_dirent_name(entry)) -- if entry_name ~= '.' and entry_name ~= '..' then -- table.insert(results, entry_name) -- end -- entry = ffi.C.readdir(dir) -- end -- -- ffi.C.closedir(dir) -- -- return results --end -+kluautil.list_dir = kluautil_list_dir - - return kluautil -- 2.29.2