From patchwork Wed Mar 5 20:53:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "King, Spencer via Guix-patches\" via" X-Patchwork-Id: 39709 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 CC68F27BBEA; Wed, 5 Mar 2025 20:54:48 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 35D9727BBE2 for ; Wed, 5 Mar 2025 20:54:47 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tpvky-0003xN-Pp; Wed, 05 Mar 2025 15:54:20 -0500 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 1tpvkk-0003vm-Jw for guix-patches@gnu.org; Wed, 05 Mar 2025 15:54:09 -0500 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 1tpvkh-0002nU-Hd for guix-patches@gnu.org; Wed, 05 Mar 2025 15:54:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:Date:MIME-Version:To:In-Reply-To:References:Subject; bh=283jF45B8FBWSff4hSakv85TggZ5CBfmDI//2iTwDq4=; b=aEoaJK0sV4y2GQf/CCTGybHI1B/cqiAkj8PIyvFARL3EhvwRxPpT5PFMu8r5jPNu2jBGxfibMDGymF3piDDYM48s/TpGQ4D3d3rSJAiWivI8xwgcFGvhmne9ecAixWxyOlVSzGhoEU8obQTJgP94tMoO+5FztpebYJkrby/i/cHeF9Wht9Zm69/UesOs9pVRZqKVIqnM/KvXiIPigM524AOqaCMgEZf1SrldSjGyvx3A8HLOh5ojMG2GoSBbVcAoPg9/ZfACVnpojOsJ9hapKWlzbtxURRSqYISeSk1ufjgeJxJ+4WlCHWbRRTISI6nqNp2LZQnoLmgWiAEX+STQFA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tpvkg-0008Fq-Db for guix-patches@gnu.org; Wed, 05 Mar 2025 15:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66608] [PATCH v1] gnu: Add yara. References: <8fff56158eb150f2dab193ccdceb19fd451583e7.1697641034.git.jakob.kirsch@web.de> In-Reply-To: <8fff56158eb150f2dab193ccdceb19fd451583e7.1697641034.git.jakob.kirsch@web.de> Resent-From: divya@subvertising.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Mar 2025 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66608 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66608@debbugs.gnu.org Received: via spool by 66608-submit@debbugs.gnu.org id=B66608.174120801731687 (code B ref 66608); Wed, 05 Mar 2025 20:54:02 +0000 Received: (at 66608) by debbugs.gnu.org; 5 Mar 2025 20:53:37 +0000 Received: from localhost ([127.0.0.1]:40066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpvkG-0008F0-VW for submit@debbugs.gnu.org; Wed, 05 Mar 2025 15:53:37 -0500 Received: from latitanza.investici.org ([82.94.249.234]:40915) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tpvkD-0008Eo-4G for 66608@debbugs.gnu.org; Wed, 05 Mar 2025 15:53:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subvertising.org; s=stigmate; t=1741208011; bh=283jF45B8FBWSff4hSakv85TggZ5CBfmDI//2iTwDq4=; h=Date:From:To:Subject:From; b=clWZ5wTIuZNHu3p9xG1BqmOskkaGzJ03A+n7hAVO+Bzhu+SNbRIE1aWQiAMgcwVgT 0E6LvZZqKHP1HKEaFWgOiaAE2ktoG/jPRNBsdwZjOXODIWzWhbmAKuLBXkEXcWZ402 BAHs2sa0y0ek/iN9YOqI/UungWcsRWHdbio1fgUo= Received: from 2.mail-backend.investici.org (unknown [10.0.0.12]) by latitanza.investici.org (Postfix) with ESMTP id 4Z7PsR4rrSzGp50 for <66608@debbugs.gnu.org>; Wed, 5 Mar 2025 20:53:31 +0000 (UTC) Received: from 2.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: divya@subvertising.org) by 2.mail-backend.investici.org (Postfix) with ESMTPA id 4Z7PsR3xPvz2xGF for <66608@debbugs.gnu.org>; Wed, 5 Mar 2025 20:53:31 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 05 Mar 2025 20:53:31 +0000 User-Agent: Roundcube Webmail Message-ID: X-Sender: divya@subvertising.org 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: divya@subvertising.org X-ACL-Warn: , divya--- via Guix-patches X-Patchwork-Original-From: divya--- via Guix-patches via From: "King, Spencer via Guix-patches\" via" 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 Here's an updated version of the patch: From 5f27ae5aa31622a0a08cde364aaee3eeb62306cc Mon Sep 17 00:00:00 2001 From: Divya Ranjan Date: Wed, 5 Mar 2025 20:35:17 +0000 Subject: [PATCH] gnu: Add yara. * gnu/packages/antivirus.scm (yara): New variable. --- gnu/packages/antivirus.scm | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm index 23af26f411..67100f20f6 100644 --- a/gnu/packages/antivirus.scm +++ b/gnu/packages/antivirus.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Eric Bavier ;;; Copyright © 2018 Christopher Baines +;;; Copyright © 2023 Jakob Kirsch ;;; Copyright © 2019–2021 Tobias Geerinckx-Rice ;;; Copyright © 2024 Nicolas Graves ;;; @@ -27,8 +28,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 check) #:use-module (gnu packages compression) #:use-module (gnu packages cmake) @@ -40,6 +44,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 python) #:use-module (gnu packages python-check) #:use-module (gnu packages rust-apps) @@ -185,3 +190,39 @@ (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.5.2") + (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 "1qaw1zv618jkqa5g39p1sdv8s6a7q23ayqfrqv0bj2z1g4nmn95g")))) + (build-system gnu-build-system) + (native-inputs (list autoconf automake libtool protobuf pkg-config)) + (inputs (list openssl bash)) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-before 'check 'remove-bin-sh-in-test + (lambda _ + (substitute* "tests/test-rules.c" + (("/bin/sh") + (string-append #$(this-package-input "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))) -- 2.48.1