From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 8D/1OdsZFmc0nQAAe85BDQ:P1 (envelope-from ) for ; Mon, 21 Oct 2024 09:07:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 8D/1OdsZFmc0nQAAe85BDQ (envelope-from ) for ; Mon, 21 Oct 2024 11:07:40 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Ycv+mb4V; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=ptTRf0of; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1729501659; a=rsa-sha256; cv=none; b=L5nQvbC5m/DhNsmtf673aZ2+dHQnRhNjZ4HODZ1L948dzoTo6+CGLMMrAXldjnGELo63gk dJlR+hRYw6eNv6eKT8W6oeONuo3FjpY8lWgPnagjRaJbaggcnsT4zE1dqsByOri8Vvk5kH 5aIOMeISzrFu59mKQtus1cuHGOV4mo4HoHOvy/9NwAf1cXWKukK/WPUwIvvWp6NBUpDfcy dxekGO66vW40EMrJh/c6yqt9cXK4LjAgXeovV7PsbnGZXkwa2zN7P6S5DbuHFRxZjCJdVu 2YCxCLLWoBU3gCNieTkutzIOd4A9T+X9xmt5B3OO2mDltzZ5IDAVlR3yzrMREQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Ycv+mb4V; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b=ptTRf0of; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1729501659; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/Q0deePCOY1xrpPwRwUuQuwnHGBOJB1hVB2SPOwvZQI=; b=EHdCdBppMiKej8hgr2pwzGGmgNStd582FbnecvYybqb4peOiNy0nClAH8miXsSOaD7Py7/ Hic3dMQIKmwaD3aVKEieGWT6P8K7adN8NjZ4nXZCWZugBxS59FetCEBTkek1QV+3/f+MMX 4gB/tIfE+YcPuX7NjWY9z3v3JkyvlmQAeqHg+BjY4CrIbMr5NqGQo4AEXK8Jp58L5S3nl4 BobOTSEChOKh9tsLUkozGh9VGwyIuOKIw0otBnwiOnY17ogi7aPrbgq3Lc/8gRfM+i7dJS 4rLFRuutTEcr2WsQWDe8D3kTZTe1Ws7wap5n8un8T0OmSuxaW6G/SxBIKsm8uw== 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 3762B7BE81 for ; Mon, 21 Oct 2024 11:07:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2oNC-0001CH-8Q; Mon, 21 Oct 2024 05:06:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2oN3-000126-CS for guix-patches@gnu.org; Mon, 21 Oct 2024 05:06:38 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2oN2-0008Rl-Qy for guix-patches@gnu.org; Mon, 21 Oct 2024 05:06:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=/Q0deePCOY1xrpPwRwUuQuwnHGBOJB1hVB2SPOwvZQI=; b=Ycv+mb4VSMOd6HP3/Mk5MeFfQcYQEOYCmT+GU5lXem0tpxCYvTKxCjxh3u+gmwPMMqkn3G1AAelRWAqVrBjvkSy2aHcsU9BvKBjUugqe9RvRzRfvTzF6JL75HwJ1KEUZw4lYbph8wE6d1eJA2p49OSX4pKZe5BvjsRYI209hngKXSmGCrr96ip4An2dT93YMjpSHyPTzBsxXGHoXUW0o/GbKzLZ2HVo+lokiuiwZb42+XWy8gO8shVUoeI6wZuwuU6uDT0cYCr4h9yeRkbNQNN8su4vUN8GP+82P068vhmMSmaiSkUU8SnbFmdJB6HXRw2GoXP0tYzSHM2eOHaKS9Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2oNT-00062h-0H for guix-patches@gnu.org; Mon, 21 Oct 2024 05:07:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73896] [PATCH v2 2/2] gnu: clamav: Update to 1.4.1. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Oct 2024 09:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73896 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73896@debbugs.gnu.org Cc: Nicolas Graves Received: via spool by 73896-submit@debbugs.gnu.org id=B73896.172950159923185 (code B ref 73896); Mon, 21 Oct 2024 09:07:02 +0000 Received: (at 73896) by debbugs.gnu.org; 21 Oct 2024 09:06:39 +0000 Received: from localhost ([127.0.0.1]:50213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2oN4-00061s-Qf for submit@debbugs.gnu.org; Mon, 21 Oct 2024 05:06:39 -0400 Received: from 8.mo576.mail-out.ovh.net ([46.105.56.233]:52065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2oN0-00061T-Vz for 73896@debbugs.gnu.org; Mon, 21 Oct 2024 05:06:36 -0400 Received: from director5.ghost.mail-out.ovh.net (unknown [10.109.140.5]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 4XX8YV6DDNz1thw for <73896@debbugs.gnu.org>; Mon, 21 Oct 2024 09:06:06 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-pfxjl (unknown [10.110.96.204]) by director5.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 2AC241FEB0; Mon, 21 Oct 2024 09:06:06 +0000 (UTC) Received: from ngraves.fr ([37.59.142.102]) by ghost-submission-5b5ff79f4f-pfxjl with ESMTPSA id g6EXAH4ZFmdekAwALqpFYw (envelope-from ); Mon, 21 Oct 2024 09:06:06 +0000 X-OVh-ClientIp: 80.215.72.128 Date: Mon, 21 Oct 2024 11:05:49 +0200 Message-ID: <20241021090600.20076-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241021090600.20076-1-ngraves@ngraves.fr> References: <20241021090600.20076-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 1836905700905837282 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehledgudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeduvedvueeiieeitdekgefhteffieeihfelkeefjeduteetueekiefgjedvgeeihfenucffohhmrghinheptghlrghmrghvrdhnvghtnecukfhppeduvdejrddtrddtrddupdektddrvdduhedrjedvrdduvdekpdefjedrheelrddugedvrddutddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejfeekleeiseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeeipdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=/Q0deePCOY1xrpPwRwUuQuwnHGBOJB1hVB2SPOwvZQI=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1729501567; v=1; b=ptTRf0ofxjYiYvGpblKbMoSVgro7I1p4oCdfVWb1l/oUq1W7bUG0NtaDf37ms0ozqZQ78Hy+ jlc3s7pr/o69rFJTFRf12y1UtiMeozhVMsWAMG36GuNUVIgUVGof8GahnLDO7eYGcSBDu0V6+Eb FwoQhnflcXrxddmNJHG3RkHoJd2rHiaZKQgjidP6mxrK7rp2L9vWBsjbybc8DYhIajaRfeZM6dH qfId968mCK1tm2NbJete+qOlxhcbOXPF/7YCnkiAcTLU3NchAQ1YRJswFBW8q51RWouAAjbUuIl 0ypBq8fUZLA3LoggVb0ZWDe4MUfuJvuYLP3431LJcDUsg== 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.55 X-Spam-Score: -3.55 X-Migadu-Queue-Id: 3762B7BE81 X-Migadu-Scanner: mx10.migadu.com X-TUID: FL9hTG3DFgxS * gnu/packages/antivirus.scm (clamav): Update to 1.4.1. [source]: Adapt source. This currently is not unbundling all cargo vendored packages. [build-system]: Switch to cmake-build-system. [arguments]: Move field up. <#:configure-flags>: Set option. <#:imported-modules>: Set option for patching cargo checksums. <#:phases>: Remove all phases except adapted 'skip-clamd_tests. Add phases 'inject-rust-onenote and 'patch-cargo-checksums. [native-inputs]: Remove autoconf, automake, libtool. Add python-minimal, python-pytest, rust and rust:cargo. [inputs]: Remove libltdl, libmspack, llvm-3.6, cyrus-sasl, tomsfastmath. --- gnu/packages/antivirus.scm | 129 +++++++++++++++---------------------- 1 file changed, 51 insertions(+), 78 deletions(-) diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm index 2161d60398..1a23657a61 100644 --- a/gnu/packages/antivirus.scm +++ b/gnu/packages/antivirus.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Eric Bavier ;;; Copyright © 2018 Christopher Baines ;;; Copyright © 2019–2021 Tobias Geerinckx-Rice +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,24 +21,23 @@ (define-module (gnu packages antivirus) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system cargo) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) #:use-module (gnu packages) - #:use-module (gnu packages autotools) - #:use-module (gnu packages bison) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages curl) - #:use-module (gnu packages cyrus-sasl) - #:use-module (gnu packages flex) - #:use-module (gnu packages llvm) - #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages python-check) + #:use-module (gnu packages rust) #:use-module (gnu packages tls) #:use-module (gnu packages web) #:use-module (gnu packages xml)) @@ -45,7 +45,7 @@ (define-module (gnu packages antivirus) (define-public clamav (package (name "clamav") - (version "0.103.11") + (version "1.4.1") (source (origin (method url-fetch) (uri @@ -57,90 +57,63 @@ (define-public clamav "/clamav-" version ".tar.gz"))) (sha256 (base32 - "04by1g3p6awhi3j1y6zpwzmasdnvjgi6lwm34l2gadlwgkdfpmv1")) + "1n3a87niad76h3mn3qxq9379gppdjqpkhwb9qkbb79irmj0ff653")) (modules '((guix build utils))) (snippet '(begin + (delete-file "Cargo.lock") + (for-each + delete-file + (find-files ".cargo/vendor" ".cargo-checksum\\.json")) (for-each delete-file-recursively '("win32" ; unnecessary - "libclamav/c++/llvm" ; use system llvm - "libclamav/tomsfastmath" ; use system tomsfastmath - "libclamunrar")))) ; non-free license - (patches - (search-patches "clamav-system-tomsfastmath.patch" - "clamav-config-llvm-libs.patch")))) - (build-system gnu-build-system) + "libclamunrar")))))) ; non-free license + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DENABLE_MILTER=OFF" "-DENABLE_UNRAR=OFF") + #:imported-modules `((guix build cargo-utils) + ,@%cmake-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'inject-rust-onenote + (lambda _ + (substitute* "libclamav_rust/Cargo.toml" + (("onenote_parser = .*") + "onenote_parser = \"0.3.1\"\n")))) + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules + (srfi srfi-1) (ice-9 ftw) (guix build cargo-utils)) + (with-directory-excursion ".cargo/vendor" + (for-each generate-all-checksums + (delete "." (delete ".." (scandir "."))))))) + (add-after 'unpack 'skip-clamd-tests + ;; XXX: The check?_clamd tests fail inside the build + ;; chroot, but pass outside. + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (substitute* "unit_tests/CMakeLists.txt" + (("clamd_test\\.py" test) + (string-append + test " -k \"not test_clamd_08_VirusEvent\""))))))))) (native-inputs - (list autoconf - automake - check ; for tests - libtool - pkg-config)) + (list check ; for tests + pkg-config + python-minimal + python-pytest + rust + (list rust "cargo"))) (inputs (list bzip2 curl json-c - libltdl - libmspack - llvm-3.6 ; requires <3.7, for JIT/verifier - ncurses libressl - pcre2 - cyrus-sasl ; for linking curl with libtool - tomsfastmath libxml2 + ncurses + pcre2 zlib)) - (arguments - (list #:configure-flags - #~(let-syntax ((with (syntax-rules () - ((_ name use) - (string-append "--with-" name "=" - (assoc-ref %build-inputs use)))))) - (list "--disable-unrar" - "--enable-llvm" - "--with-system-llvm" - "--with-system-libmspack" - "--without-included-ltdl" - (with "xml" "libxml2") - (with "openssl" "libressl") - (with "libjson" "json-c") - (with "pcre2" "pcre2") - (with "zlib" "zlib") - (with "libcurl" "curl") - ;; For sanity, specifying --enable-* flags turns - ;; "support unavailable" warnings into errors. - "--enable-bzip2" - "--enable-check" - "--sysconfdir=/etc/clamav" - ;; Default database directory needs to be writeable - "--with-dbdir=/var/db/clamav")) - ;; install sample .conf files to %output/etc rather than /etc/clamav - #:make-flags - #~(list (string-append "sysconfdir=" %output "/etc")) - #:phases - #~(modify-phases %standard-phases - ;; Regenerate configure script. Without this we don't get - ;; the correct value for LLVM linker variables. - (add-after 'unpack 'reconf - (lambda _ (invoke "autoreconf" "-vfi"))) - (add-before 'configure 'patch-llvm-config - (lambda _ - (substitute* '("libclamav/c++/detect.cpp" - "libclamav/c++/ClamBCRTChecks.cpp" - "libclamav/c++/bytecode2llvm.cpp") - (("llvm/Config/config.h") "llvm/Config/llvm-config.h")) - ;; `llvm-config --libfiles` inappropriately lists lib*.a - ;; libraries, rather than the lib*.so's that our llvm - ;; contains. They're used only for listing extra build - ;; dependencies, so ignore them until that's fixed. - (substitute* "libclamav/c++/Makefile.in" - (("@LLVMCONFIG_LIBFILES@") "")))) - (add-before 'check 'skip-clamd-tests - ;; XXX: The check?_clamd tests fail inside the build - ;; chroot, but pass outside. - (lambda _ - (substitute* "unit_tests/Makefile" - (("check2_clamd.sh.*check4_clamd.sh") ""))))))) (home-page "https://www.clamav.net") (synopsis "Antivirus engine") (description -- 2.46.0