From patchwork Thu May 19 03:05:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "vasilii.smirnov--- via Guix-patches\" via" X-Patchwork-Id: 39520 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5C53127BBEA; Thu, 19 May 2022 04:08:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B08B027BBE9 for ; Thu, 19 May 2022 04:08:48 +0100 (BST) Received: from localhost ([::1]:41710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrWWt-0005T5-Qk for patchwork@mira.cbaines.net; Wed, 18 May 2022 23:08:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrWUF-0003xS-QZ for guix-patches@gnu.org; Wed, 18 May 2022 23:06:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40160) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrWUF-0004BR-BR for guix-patches@gnu.org; Wed, 18 May 2022 23:06:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrWUE-0005E9-BG for guix-patches@gnu.org; Wed, 18 May 2022 23:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55437] [PATCH] gnu: clamav: Update to 0.103.6 [fixes CVE-2022-{20803, 20770, 20796, 20771, 20785, 20792}]. In-Reply-To: Resent-From: kiasoc5@disroot.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 19 May 2022 03:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55437 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Maxim Cournoyer" Cc: 55437@debbugs.gnu.org Received: via spool by 55437-submit@debbugs.gnu.org id=B55437.165292951420038 (code B ref 55437); Thu, 19 May 2022 03:06:02 +0000 Received: (at 55437) by debbugs.gnu.org; 19 May 2022 03:05:14 +0000 Received: from localhost ([127.0.0.1]:34057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrWTS-0005D5-0T for submit@debbugs.gnu.org; Wed, 18 May 2022 23:05:14 -0400 Received: from knopi.disroot.org ([178.21.23.139]:46402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrWTP-0005Cu-UU for 55437@debbugs.gnu.org; Wed, 18 May 2022 23:05:13 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A9D3F43751; Thu, 19 May 2022 05:05:10 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b53TyU_OzRwA; Thu, 19 May 2022 05:05:09 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1652929509; bh=0SPVn3F+delij1gTQQRvetyM0PiJplZ7AfBiWp7uFD4=; h=Date:From:Subject:To:Cc:References; b=VvKKLEJ7ymS+CDoOt1k5GxSTog6y2kjqpaCpbBuJCQTYmE5kbsXx/yyNmgwlt+qMt Cb9sQJxdkFTE7CqE4QwjI5XGnSvBJtxoYDU5m1AVkt4LQx2/BzxTuHIUxNc4msq/r0 2CIhC5CcKQ1/E93bji6F6qeQtVRBF1MPLGyZW6EDiLFPO31AwB7JPtSu2upDkTi03+ DJenNnewrfNg+pYm1te81UxhL1Wt/gn6U9IiRMHZ5EGckoeM0VZC/m+emQxEzEmAJF OT4XetrQTeRp2nB2UzXl8qa0JvcDgkfMUQkpWCpqJ+uQ2ywCcUkC6Fse8yyNrxipGI gdv0xYU0rVmqA== Date: Thu, 19 May 2022 03:05:08 +0000 Message-ID: <5a8edd0b540303d9ebd42880ad38d249d74a5457@disroot.org> References: undefined 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: kiasoc5@disroot.org X-ACL-Warn: , kiasoc5--- via Guix-patches X-Patchwork-Original-From: kiasoc5--- via Guix-patches via From: "vasilii.smirnov--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches From 151cbfbefd039ce28d38109493bf8b49f19a2edc Mon Sep 17 00:00:00 2001 From: kiasoc5 Date: Wed, 18 May 2022 22:51:14 -0400 Subject: [PATCH 2/2] gnu: clamav: Use new style and G-expressions. * gnu/packages/antivirus.scm (clamav)[source]: Remove trailing #t from snippet. [inputs]: Use new input style. [arguments]: Use G-expressions. Remove trailing #t from phases [configure-flags]: Adjust to new input style. --- gnu/packages/antivirus.scm | 128 ++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm index 4a5f995e42..cda3fc942b 100644 --- a/gnu/packages/antivirus.scm +++ b/gnu/packages/antivirus.scm @@ -21,6 +21,7 @@ (define-module (gnu packages antivirus) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) @@ -59,8 +60,7 @@ (define-public clamav '("win32" ; unnecessary "libclamav/c++/llvm" ; use system llvm "libclamav/tomsfastmath" ; use system tomsfastmath - "libclamunrar")) ; non-free license - #t)) + "libclamunrar")))) ; non-free license (patches (search-patches "clamav-system-tomsfastmath.patch" "clamav-config-llvm-libs.patch")))) @@ -72,70 +72,70 @@ (define-public clamav libtool pkg-config)) (inputs - `(("bzip2" ,bzip2) - ("libcurl" ,curl) - ("libjson" ,json-c) - ("libltdl" ,libltdl) - ("libmspack" ,libmspack) - ("llvm" ,llvm-3.6) ; requires <3.7, for JIT/verifier - ("ncurses" ,ncurses) - ("openssl" ,libressl) - ("pcre2" ,pcre2) - ("sasl" ,cyrus-sasl) ; for linking curl with libtool - ("tomsfastmath" ,tomsfastmath) - ("xml" ,libxml2) - ("zlib" ,zlib))) + (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 + zlib)) (arguments - `(#:configure-flags - (let-syntax ((with (syntax-rules () - ((_ name) + (list #:configure-flags + #~(let-syntax ((with (syntax-rules () + ((_ name use) (string-append "--with-" name "=" - (assoc-ref %build-inputs name)))))) - (list "--disable-unrar" - "--enable-llvm" - "--with-system-llvm" - "--with-system-libmspack" - "--without-included-ltdl" - (with "xml") - (with "openssl") - (with "libjson") - (with "pcre2") - (with "zlib") - (with "libcurl") - ;; 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@") "")) - #t)) - (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") "")) - #t))))) + (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