From patchwork Wed Oct 18 14:57:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jakob Kirsch X-Patchwork-Id: 54974 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 DA8CF27BBE9; Wed, 18 Oct 2023 15:59:00 +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,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS 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 4026A27BBE2 for ; Wed, 18 Oct 2023 15:58:58 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt80M-0005sS-Gq; Wed, 18 Oct 2023 10:58:38 -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 1qt80L-0005lW-8G for guix-patches@gnu.org; Wed, 18 Oct 2023 10:58:37 -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 1qt80K-0004we-Vx for guix-patches@gnu.org; Wed, 18 Oct 2023 10:58:37 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qt80k-0003Cm-Gz for guix-patches@gnu.org; Wed, 18 Oct 2023 10:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66608] [PATCH] gnu: Add yara. Resent-From: Jakob Kirsch Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Oct 2023 14:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66608 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66608@debbugs.gnu.org Cc: Jakob Kirsch X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169764109212242 (code B ref -1); Wed, 18 Oct 2023 14:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2023 14:58:12 +0000 Received: from localhost ([127.0.0.1]:34430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt7zw-0003BN-83 for submit@debbugs.gnu.org; Wed, 18 Oct 2023 10:58:12 -0400 Received: from lists.gnu.org ([2001:470:142::17]:51602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt7zr-0003Aq-59 for submit@debbugs.gnu.org; Wed, 18 Oct 2023 10:58:10 -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 1qt7zL-0002sB-3d for guix-patches@gnu.org; Wed, 18 Oct 2023 10:57:35 -0400 Received: from mout.web.de ([217.72.192.78]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt7zI-0004mi-UE for guix-patches@gnu.org; Wed, 18 Oct 2023 10:57:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1697641048; x=1698245848; i=jakob.kirsch@web.de; bh=9U14gAimEC5cdFNMdD47kdOCozL2xinjsn54RwMLmcQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=FI9uQxmyamhDniaNmU6opOJ66/Ml5cUW7+ovi1VTwHA7p/NSTpVEq+TmjGTAYoEmFIpfJgtJbQq PLL/G7B8veZg/1GpN6w8bMLcoakgEp0ngjb5zDOBFDirMtE5o+xSqz0o3L8TaPlG1YpFFVj3CTcZy t+jH37fC9ToWTl7pgLBZTQ1bXra+ajL5GCFnTAYwADJcAA6mITy5PJ/Dd1ev1pMV7BZKZmuTxzmHK BBuu4bN58EcTpbgafcLM4u2urNOxUQLuJZYK1lbCD/CyynchPAmYYvHFqbIpesa5Nvyo/7N86xK9e W4L+K8WhcF3/KAw9EZcpL7OmmSJ7BKQaqESg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from guix.fritz.box ([134.19.20.68]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MdwJY-1rQXb41Yne-00aypA; Wed, 18 Oct 2023 16:57:28 +0200 From: Jakob Kirsch Date: Wed, 18 Oct 2023 16:57:14 +0200 Message-ID: <8fff56158eb150f2dab193ccdceb19fd451583e7.1697641034.git.jakob.kirsch@web.de> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:lD5fecA5tiI/qVnhOq4UYOeI4DbNZzYM5T/2MTX3rukfb+bj548 BpzNZ3pL5D9nziRSAJj1LF3bQcbzbCKb+dQCZQLqiOsjjwIhIPYHQ29H4B3tXCgcHZNa414 cbE29n2Jt1sjKmwm/DW0B9JLoJ1PU0PUNCKyjvFqWPWF9S5/HIg8cd/kksO9ZjRXrtGKy83 Fo6EtUtFINqRTx4oDw+uQ== UI-OutboundReport: notjunk:1;M01:P0:3Aqf+Ov8GnM=;nSEkEXZNVBvuCdjnMQIrDSQTIlc elsLatcP7tyLA89pZMNToc3lwVon6fh7od/RGe224MGzSiap1tpH4Y4Uuwy29/+ME6pS2JBve pxTLMK3ACH2GjiCd8aemF0W2cjUMsXTSl3tkW8uzJ2poxs+hBuH/5nx7+W26Wkx10k2onKrMb W+DKa4amxjSlKePBo9cwfkjdgCOpVOBSGrlIVMnrULhTCoV0d5eCmmikJUdTmV9vAmvnNIqaq xchgluN+AUMilHvA3SdPMYEYi6V0iGMzx1bXSE4Z7J3nH3zbeFGzVT5dBrARrtn9R2kLVESsF j8IFYEHUa0dozux3Eg+dSAhW1EeTOKX0od1a4nTWWWqC1ODAFQdn20bcLHIZdtUikapzjQ3G/ rLNZyVCcyEJN4RDNDhpNKV4KKurYe7tSigNUjD+Vdk6qfCQbzY/gqIJ+wFbQbgbM3HPlLhnLc oK6nmomXkO96ipVpG/HUOocov+bxSjzQ58JrpHdpx7WBUtgsd6BasiBUp1mw6dt4vAB4EhGOQ 0ZyEOXH7tu18qWJ0bTggvskojECvco5zTvrUt1rm9ViVI1Ch2ffqZZrto09mgC2Ei/+FduIbC /k0/FYQPc3f2wBHwavVMYyU5G0eFVrbNttoZUuC3OiCCY5fn0kTJVi8rXXe74fhiUij2koYXp XpvJaCzvxWjMdQ4ytcolgA3lEbhXZJeJRTgbjUnSUaV521GwdN4t+whbch9SFGAVoyg0auCZ8 9/hh6wqd1OrWa2MjEkShiHKVwX7QfKlwzU5Fo6xUi3P+lhRvx7YBx3JJunuNLNwztj0mFzhlQ xrNyEyLry9/pEafCnT4gu3FG6E9nAPERh7rlxp2I7KB1Y+y0rfSyMhzFrrFvcg9xQXdAyJV09 ss8VeD6Jquz7PRzrf+tiz4fNlUHYoP0KH5CxVkdRTbyOHcbcq61F2tkyI9J7P7WT30LI5lvGc IWlQVnjQ2e8eGFSTr1KUoMrT6so= Received-SPF: pass client-ip=217.72.192.78; envelope-from=jakob.kirsch@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/antivirus.scm (yara): New variable. --- gnu/packages/antivirus.scm | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) base-commit: 1076f32111e512ed437f135c9eb6ce2daaafd623 -- 2.41.0 diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm index 750db04040..45a85e2faf 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 © 2023 Jakob Kirsch ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,9 +25,11 @@ (define-module (gnu packages antivirus) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages check) #:use-module (gnu packages compression) @@ -38,6 +41,7 @@ (define-module (gnu packages antivirus) #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) #:use-module (gnu packages tls) #:use-module (gnu packages web) #:use-module (gnu packages xml)) @@ -156,3 +160,38 @@ (define-public clamav (license:non-copyleft "libclamav/strlcat.c") ;"OpenBSD" license license:asl2.0 ;libclamav/yara* license:expat)))) ;shared/getopt.[ch] + +(define-public yara + (package + (name "yara") + (version "v4.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/VirusTotal/yara") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1jc468iybjl1n0r6prpw7pwhd9jvfbjghqg9qdq1hbihnv5wa4bb")))) + (build-system gnu-build-system) + (native-inputs (list autoconf automake libtool protobuf pkg-config)) + (inputs (list openssl bash)) + (arguments + '(#:phases (modify-phases %standard-phases + (add-before 'check 'remove-bin-sh-in-test + (lambda* (#:key build-inputs #:allow-other-keys) + (substitute* "tests/test-rules.c" + (("/bin/sh") + (string-append (assoc-ref %build-inputs "bash") + "/bin/sh")))))))) + + (synopsis "The pattern matching swiss knife") + (description + "YARA is a tool aimed at (but not limited to) helping malware researchers to +identify and classify malware samples. With YARA you can create descriptions of +malware families (or whatever you want to describe) based on textual or binary patterns. +Each description, a.k.a. rule, consists of a set of strings and a boolean expression +which determine its logic.") + (home-page "https://github.com/VirusTotal/yara") + (license license:bsd-3)))