GNU bug report logs - #32958
[PATCH] gnu: Add clamav.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sat, 6 Oct 2018 19:17:02 UTC

Severity: normal

Tags: patch

Done: Eric Bavier <ericbavier <at> centurylink.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32958 in the body.
You can then email your comments to 32958 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32958; Package guix-patches. (Sat, 06 Oct 2018 19:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 06 Oct 2018 19:17:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add clamav.
Date: Sat,  6 Oct 2018 20:08:55 +0100
* gnu/packages/antivirus.scm: New file.
* gnu-system.am: Add it.
---
 gnu/local.mk               |   1 +
 gnu/packages/antivirus.scm | 119 +++++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+)
 create mode 100644 gnu/packages/antivirus.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 8f854e98b5..c480be9f30 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -60,6 +60,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/android.scm			\
   %D%/packages/animation.scm			\
   %D%/packages/anthy.scm			\
+  %D%/packages/antivirus.scm			\
   %D%/packages/apl.scm				\
   %D%/packages/apr.scm				\
   %D%/packages/aspell.scm			\
diff --git a/gnu/packages/antivirus.scm b/gnu/packages/antivirus.scm
new file mode 100644
index 0000000000..513a5affc0
--- /dev/null
+++ b/gnu/packages/antivirus.scm
@@ -0,0 +1,119 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Christopher Baines <mail <at> cbaines.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages antivirus)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pcre)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages xml))
+
+(define-public clamav
+  (package
+    (name "clamav")
+    (version "0.100.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/Cisco-Talos/clamav-devel/archive/clamav-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "0wpamsp3lhlj9dhj5s9nzbyvhrbbnyifm8cjvnssh80sdmkd0dqf"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (delete-file-recursively "win32")
+                  (delete-file-recursively "libclamav/c++/llvm")
+                  #t))))
+    (build-system gnu-build-system)
+    (arguments
+     '(;; TODO Tests seem to fail, not sure why yet.
+       #:tests? #f
+       #:make-flags '("VERBOSE=1")
+       #:configure-flags (list "--enable-check"
+                               "--with-dbdir=/var/lib/clamav"
+                               "--sysconfdir=/etc/clamav"
+                               "--with-system-libmspack"
+                               "--without-included-ltdl"
+                               (string-append "--with-zlib="
+                                              (assoc-ref %build-inputs
+                                                         "zlib"))
+                               (string-append "--with-libjson="
+                                              (assoc-ref %build-inputs
+                                                         "json-c"))
+                               (string-append "--with-xml="
+                                              (assoc-ref %build-inputs
+                                                         "libxml2"))
+                               (string-append "--with-libcurl="
+                                              (assoc-ref %build-inputs
+                                                         "curl"))
+                               (string-append "--with-openssl="
+                                              (assoc-ref %build-inputs
+                                                         "openssl")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda _
+             (substitute* "Makefile.in"
+               ;; Prevent writing to /etc upon install, instead the sample
+               ;; files are copied in to the output in the 'install-etc phase
+               ((" etc ") " "))))
+         (add-after 'install 'install-etc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (etc (string-append out "/etc")))
+               (for-each (lambda (file)
+                           (install-file file etc))
+                         (find-files "etc" ".*\\.sample"))))))))
+    (native-inputs
+     `(("check" ,check)))
+    (inputs
+     `(("openssl" ,openssl)
+       ("libmspack" ,libmspack)
+       ("libltdl", libltdl)
+       ("json-c" ,json-c)
+       ("ncurses" ,ncurses)
+       ("perl" ,perl)
+       ("pcre2" ,pcre2)
+       ("libxml2" ,libxml2)
+       ("curl" ,curl)
+       ("zlib" ,zlib)))
+    (synopsis "Antivirus engine for viruses and other malicious software")
+    (description
+     "Clam AntiVirus is an anti-virus toolkit, for detecting trojans, viruses,
+malware and other malicious software.  This package provides a flexible and
+scalable multi-threaded daemon, a command-line scanner and a tool to fetch
+up-to-date virus definitions.")
+    (home-page "https://www.clamav.net/")
+    (license
+     (list license:gpl2 ;; clamav-milter, clambc, clamconf, clamd, clamdscan,
+                        ;; libclamav, libfreshclam
+           license:gpl2+ ;; many files
+           ;; some files in libclamav
+           bsd-2 zlib asl2.0))))
-- 
2.19.0





Information forwarded to guix-patches <at> gnu.org:
bug#32958; Package guix-patches. (Sat, 06 Oct 2018 19:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 32958 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 32958 <at> debbugs.gnu.org
Subject: Re: [bug#32958] [PATCH] gnu: Add clamav.
Date: Sat, 06 Oct 2018 20:56:23 +0100
[Message part 1 (text/plain, inline)]
Tags: moreinfo

This probably isn't ready quite yet, as the source release includes
quite a bit of bundled software, and I've only had an initial attempt at
cleaning it up. I also haven't looked in to the test suite in detail.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32958; Package guix-patches. (Sun, 07 Oct 2018 01:50:01 GMT) Full text and rfc822 format available.

Message #11 received at 32958 <at> debbugs.gnu.org (full text, mbox):

From: Eric Bavier <ericbavier <at> centurylink.net>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 32958 <at> debbugs.gnu.org
Subject: Re: [bug#32958] [PATCH] gnu: Add clamav.
Date: Sat, 6 Oct 2018 20:49:19 -0500
[Message part 1 (text/plain, inline)]
Hi Christopher,

On Sat, 06 Oct 2018 20:56:23 +0100
Christopher Baines <mail <at> cbaines.net> wrote:

> Tags: moreinfo
> 
> This probably isn't ready quite yet, as the source release includes
> quite a bit of bundled software, and I've only had an initial attempt at
> cleaning it up. I also haven't looked in to the test suite in detail.

I've had a local clamav patch for a while now, and had just recently
picked it up to dust it off for the 0.100.2 release.  Much is similar
to your patch, and I had started writing a clamd service.  Do you mind
if I merge some parts of your patch into mine and then send it here?

`~Eric
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32958; Package guix-patches. (Sun, 07 Oct 2018 08:37:02 GMT) Full text and rfc822 format available.

Message #14 received at 32958 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Eric Bavier <ericbavier <at> centurylink.net>
Cc: 32958 <at> debbugs.gnu.org
Subject: Re: [bug#32958] [PATCH] gnu: Add clamav.
Date: Sun, 07 Oct 2018 09:36:16 +0100
[Message part 1 (text/plain, inline)]
Eric Bavier <ericbavier <at> centurylink.net> writes:

> Hi Christopher,
>
> On Sat, 06 Oct 2018 20:56:23 +0100
> Christopher Baines <mail <at> cbaines.net> wrote:
>
>> Tags: moreinfo
>> 
>> This probably isn't ready quite yet, as the source release includes
>> quite a bit of bundled software, and I've only had an initial attempt at
>> cleaning it up. I also haven't looked in to the test suite in detail.
>
> I've had a local clamav patch for a while now, and had just recently
> picked it up to dust it off for the 0.100.2 release.  Much is similar
> to your patch, and I had started writing a clamd service.  Do you mind
> if I merge some parts of your patch into mine and then send it here?

Not at all Eric, that sounds great :)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32958; Package guix-patches. (Wed, 24 Oct 2018 16:10:01 GMT) Full text and rfc822 format available.

Message #17 received at 32958 <at> debbugs.gnu.org (full text, mbox):

From: Eric Bavier <ericbavier <at> centurylink.net>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 32958 <at> debbugs.gnu.org
Subject: Re: [bug#32958] [PATCH] gnu: Add clamav.
Date: Wed, 24 Oct 2018 11:09:27 -0500
[Message part 1 (text/plain, inline)]
On Sun, 07 Oct 2018 09:36:16 +0100
Christopher Baines <mail <at> cbaines.net> wrote:

> Eric Bavier <ericbavier <at> centurylink.net> writes:
> 
> > Hi Christopher,
> >
> > On Sat, 06 Oct 2018 20:56:23 +0100
> > Christopher Baines <mail <at> cbaines.net> wrote:
> >  
> >> Tags: moreinfo
> >> 
> >> This probably isn't ready quite yet, as the source release includes
> >> quite a bit of bundled software, and I've only had an initial attempt at
> >> cleaning it up. I also haven't looked in to the test suite in detail.  
> >
> > I've had a local clamav patch for a while now, and had just recently
> > picked it up to dust it off for the 0.100.2 release.  Much is similar
> > to your patch, and I had started writing a clamd service.  Do you mind
> > if I merge some parts of your patch into mine and then send it here?  
> 
> Not at all Eric, that sounds great :)

Here is my small series of patches.

1. Turns on RTTI in llvm by default.

2. Adds a TomsFastMath package that is otherwise bundled in clamav

3. Adds clamav.  Uses a patch borrowed from debian to use a system
tomsfastmath and uses a system llvm.  A few tests that cannot pass
inside the build container are skipped.

I'm not posting my clamd-service at this time because it needs quite a
bit more work.

`~Eric
[0001-llvm-Build-with-RTTI-by-default.patch (text/x-patch, attachment)]
[0002-gnu-Add-TomsFastMath.patch (text/x-patch, attachment)]
[0003-gnu-Add-ClamAV.patch (text/x-patch, attachment)]
[Message part 5 (application/pgp-signature, inline)]

Reply sent to Eric Bavier <ericbavier <at> centurylink.net>:
You have taken responsibility. (Sat, 17 Nov 2018 06:43:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Sat, 17 Nov 2018 06:43:02 GMT) Full text and rfc822 format available.

Message #22 received at 32958-close <at> debbugs.gnu.org (full text, mbox):

From: Eric Bavier <ericbavier <at> centurylink.net>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 32958-close <at> debbugs.gnu.org
Subject: Re: [bug#32958] [PATCH] gnu: Add clamav.
Date: Sat, 17 Nov 2018 00:41:46 -0600
[Message part 1 (text/plain, inline)]
On Wed, 24 Oct 2018 11:09:27 -0500
Eric Bavier <ericbavier <at> centurylink.net> wrote: 
> 
> Here is my small series of patches.
> 
> 1. Turns on RTTI in llvm by default.
> 
> 2. Adds a TomsFastMath package that is otherwise bundled in clamav
> 
> 3. Adds clamav.  Uses a patch borrowed from debian to use a system
> tomsfastmath and uses a system llvm.  A few tests that cannot pass
> inside the build container are skipped.

I've pushed these patches in commits:

fc9dbf41311d99d0fd8befc789ea7c0e35911890
7ed018e8a2f885246461ad65420bf39d741d343c
0a41123f01d5d2466d6f533be3644ac8c9a2bdf9

`~Eric
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Dec 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.