From patchwork Wed Mar 5 22:12:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Divya Ranjan X-Patchwork-Id: 39711 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 D2D0727BBE9; Wed, 5 Mar 2025 22:13:23 +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=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 3BB5827BBE2 for ; Wed, 5 Mar 2025 22:13:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tpwzC-0005aR-Ul; Wed, 05 Mar 2025 17:13:06 -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 1tpwz9-0005aB-6x for guix-patches@gnu.org; Wed, 05 Mar 2025 17:13:04 -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 1tpwz8-0003FI-Um for guix-patches@gnu.org; Wed, 05 Mar 2025 17:13:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=flbNiZGonDdMr+aFd1WOxWCMFU5WKFqJepI9MBR5ytk=; b=bt3nJr3kzKXiEVHlDXbqc5ObZtNOe8smyE4wnAYIA+gUP4vrnJli5refq6MviY/FE3FUls+0aHy+tiNDBLFQvziPYC64IFLtdcHAHu8flkyTDLJpXz5ypZu8a30pVspB8AXp6poFrgB2F1zciiZXx2k6otUMxfNowDgxzjpmjE9rnYQydw9IEnA3rFbk9EyjjwWABNf2tFbCpQPjV64CtuJyvYXSF+by27kPUJHtcwIX5k4bP3t1qKZ1XRluqVBsbQ6NYMXiJnZ4S1ILE2FRfCEP2BQlX6WQSfAe035yJBjeRId6GNakExxPinNasnoaPXCoK4+SFZhyg0cReO33zg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tpwz8-0006Rg-De for guix-patches@gnu.org; Wed, 05 Mar 2025 17:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66608] [PATCH v2] gnu: Add yara. Resent-From: Divya Ranjan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Mar 2025 22:13: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 Cc: Sharlatan Hellseher Received: via spool by 66608-submit@debbugs.gnu.org id=B66608.174121277524756 (code B ref 66608); Wed, 05 Mar 2025 22:13:02 +0000 Received: (at 66608) by debbugs.gnu.org; 5 Mar 2025 22:12:55 +0000 Received: from localhost ([127.0.0.1]:40155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpwz0-0006RD-SF for submit@debbugs.gnu.org; Wed, 05 Mar 2025 17:12:55 -0500 Received: from confino.investici.org ([2a11:7980:1::2:0]:56475) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tpwyx-0006Qv-9C for 66608@debbugs.gnu.org; Wed, 05 Mar 2025 17:12:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subvertising.org; s=stigmate; t=1741212768; bh=flbNiZGonDdMr+aFd1WOxWCMFU5WKFqJepI9MBR5ytk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QNumWi8OuAJt/G7LHyKb69C9u77mq6aLqg7mYeFW8DBl6S6iMwrIOkQ19zRZLOIH/ U0AOMXSX4YvjZPGbl09r+FEL2QFwqv7UtN1LlTHXAhPrBp3ZzxneA3K3cVvXFXn5Qs YCvgKDfUZT6Alk4KdeM59JA0hEN1wqEpE3SpUN64= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Z7Rcw0BSxz11Hm; Wed, 5 Mar 2025 22:12:48 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: divya@subvertising.org) by localhost (Postfix) with ESMTPSA id 4Z7Rcv1hrCz11Hr; Wed, 5 Mar 2025 22:12:47 +0000 (UTC) In-Reply-To: <64e8f5f5bf2b2180983183e351012b894bc4279d.1741211524.git.divya@subvertising.org> (Divya Ranjan's message of "Wed, 5 Mar 2025 21:55:30 +0000") References: <8fff56158eb150f2dab193ccdceb19fd451583e7.1697641034.git.jakob.kirsch@web.de> <64e8f5f5bf2b2180983183e351012b894bc4279d.1741211524.git.divya@subvertising.org> Date: Wed, 05 Mar 2025 22:12:44 +0000 Message-ID: <87eczbm8ir.fsf_-_@subvertising.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 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 Ranjan X-ACL-Warn: , Divya Ranjan via Guix-patches X-Patchwork-Original-From: Divya Ranjan via Guix-patches via From: Divya Ranjan 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 The last patch was failing because I forgot to change bash to bash-minimal in the gexp, here’s a revised patch that builds and the linter doesn’t complain: - Divya Ranjan, Philosophy, Mathematics, Libre Software. PGP Fingerprint: F0B3 1A69 8006 8FB8 096A 2F12 B245 10C6 108C 8D4A Reviewed-by: Sergio Pastor Pérez From 42d544e60f50052e5a263f63dda62fe0297fad35 Mon Sep 17 00:00:00 2001 Message-ID: <42d544e60f50052e5a263f63dda62fe0297fad35.1741212734.git.divya@subvertising.org> From: Divya Ranjan Date: Wed, 5 Mar 2025 21:50:45 +0000 Subject: [PATCH] gnu: Add yara. * gnu/packages/antivirus.scm (yara): New variable. Change-Id: I6ecad2cc6cc797102269ccde80071f7290db44e4 --- gnu/packages/antivirus.scm | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm index 23af26f411..52bbe6b818 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-minimal)) + (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-minimal") "/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))) base-commit: 310adf4ce70cbb864859274fcc7842bd519bbddc -- 2.48.1