debian/0000755000000000000000000000000011772001617007170 5ustar debian/changelog0000644000000000000000000001035111772001617011042 0ustar python-clamav (0.4.1-7) unstable; urgency=low * Add support for dpkg-buildflags in debian/rules * Bump standards-version to 3.9.3 without further change * Move python-clamav transitional package to section oldlibs * Drop unneeded python:Provides -- Scott Kitterman Mon, 25 Jun 2012 02:15:15 -0400 python-clamav (0.4.1-6) unstable; urgency=low * Build python-clamav transitional package in binary-indep target (Closes: #650789) * Add build-arch and build-indep targets * Enhance package description * Bump standards version to 3.9.2 without further change -- Scott Kitterman Sun, 04 Dec 2011 13:10:00 -0500 python-clamav (0.4.1-5) unstable; urgency=low * python-pyclamav Breaks python-clamav (<< 0.4.1-4~) instead of Conflicts * Add debian/watch * Fix misspelling of package in the last changelog entry -- Scott Kitterman Fri, 11 Mar 2011 09:47:14 -0500 python-clamav (0.4.1-4) unstable; urgency=low * Switch to dh_python2 - Drop build-depends on python-support - Version build-depends on python-all-dev - Add X-Python-Version - Add ${python:Breaks} - Replace dh_pysupport in debian/rules with dh_python2 * Rename binary to python-pyclamav (Closes: #507858) - Add transitional package in debian/control - Adjust target of setup.py install in debian/rules * Add install-layout=deb * Drop alternate depends on clamav-data as it is no longer updated * Drop redundant build-depends on python -- Scott Kitterman Sat, 19 Feb 2011 13:16:03 -0500 python-clamav (0.4.1-3) unstable; urgency=low * Use correct DPMT address for maintainer * Add vcs-* fields to debian/control -- Scott Kitterman Sun, 03 Oct 2010 13:03:20 -0400 python-clamav (0.4.1-2) unstable; urgency=low * Agreed maintainer change to Debian Python Modules Team - Add myself to uploaders - Thanks to Cédric Delfosse for his work maintaining python-clamav * Acknowledge NMU (Closes: #524645) - Thanks to Imre Gergely * Convert to source format 3.0 (Quilt) to add patch system - Convert existing inline change to debian/patches/clamav-095-compat.patch * Improve debian/copyright * Add Homepage to debian/control and bump standards version to 3.9.1.0 without further change * Remove obsolete debian/pycompat file -- Scott Kitterman Wed, 22 Sep 2010 12:30:43 -0400 python-clamav (0.4.1-1.1) unstable; urgency=low * Non-maintainer upload. * Build against libclamav6/clamav 0.95 - modified pyclamav.c source to use the new API functions - cleaned up some old code for clamav 0.75 - updated Build-Depends -- Imre Gergely Sat, 18 Apr 2009 17:00:51 +0300 python-clamav (0.4.1-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Tue, 06 May 2008 14:30:24 +0200 python-clamav (0.4.0-2) unstable; urgency=low * Update debian/rules to fix FTBFS if build twice in a row (Closes: Bug#442708) -- Cédric Delfosse Tue, 11 Mar 2008 22:01:11 +0100 python-clamav (0.4.0-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Wed, 11 Jul 2007 21:26:18 +0200 python-clamav (0.3.3-1) unstable; urgency=low * New upstream release. * Bump debhelper compat mode to 5. * Use python-support instead of pycentral. -- Cédric Delfosse Sat, 8 Jul 2006 20:35:50 +0200 python-clamav (0.3.0-2) unstable; urgency=low * Update package to new Debian Python Policy (Closes: Bug#373520) * Update Standards-Version to 3.7.2 -- Cédric Delfosse Wed, 14 Jun 2006 19:57:23 +0200 python-clamav (0.3.0-1) unstable; urgency=low * New upstream release * Update Standards-Version to 3.6.2 * Fix long description ("add" -> "adds") -- Cédric Delfosse Sat, 9 Jul 2005 14:45:40 +0200 python-clamav (0.2.2-2) unstable; urgency=low * Build against new libclamav1 0.85.1. -- Cédric Delfosse Thu, 26 May 2005 22:17:23 +0200 python-clamav (0.2.2-1) unstable; urgency=low * Initial Release. (Closes: Bug#278572) -- Cédric Delfosse Tue, 26 Apr 2005 22:02:32 +0200 debian/source/0000755000000000000000000000000011446212010010455 5ustar debian/source/format0000644000000000000000000000001411446212010011663 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000305111772000756010252 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS = -Wall -g -O0 -g CPPFLAGS = else CFLAGS = $(shell dpkg-buildflags --get CFLAGS) CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) endif PYVERS=$(shell pyversions -vs) build: build-arch build-indep build-arch: $(PYVERS:%=build-python%) touch $@ build-python%: CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" python$* setup.py build touch $@ install-arch: build $(PYVERS:%=install-python%) install-python%: dh_testdir dh_testroot dh_installdirs python$* setup.py install --install-layout=deb --root $(CURDIR)/debian/python-pyclamav clean: $(PYVERS:%=clean-python%) clean-python%: dh_testdir python$* setup.py clean dh_testroot rm -fr build build-python$* dh_clean binary-common: dh_testdir dh_testroot dh_installchangelogs CHANGELOG dh_installdocs dh_installexamples dh_link dh_strip dh_compress dh_fixperms dh_python2 dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb # Build architecture-independent files here. binary-indep: build-indep install-indep $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common # Build architecture-dependent files here. binary-arch: build-arch install-arch $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common binary: binary-indep binary-arch .PHONY: build-indep build-arch build clean binary-indep binary-arch binary install-indep install-arch install configure debian/docs0000644000000000000000000000003611446156632010050 0ustar gpl.txt README.txt README.txt debian/watch0000644000000000000000000000011211536433554010222 0ustar version=3 http://xael.org/norman/python/pyclamav/pyclamav-(.*)\.tar\.gz debian/copyright0000644000000000000000000000207611446461164011135 0ustar This package was debianized by Cédric Delfosse on Tue, 26 Apr 2005 22:02:32 +0200. It was downloaded from http://xael.org/norman/python/pyclamav/index.html Copyright Holder: © 2005 Alexandre Norman License: This package 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 2 of the License, or (at your option) any later version. This package 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 this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. debian/control0000644000000000000000000000271711772001567010606 0ustar Source: python-clamav Section: python Priority: optional Maintainer: Debian Python Modules Team Uploaders: Scott Kitterman Build-Depends: debhelper (>= 5.0.37.2), libclamav-dev (>= 0.95), python-all-dev (>= 2.6.5-2~) X-Python-Version: >= 2.3 Standards-Version: 3.9.3 Homepage: http://xael.org/norman/python/pyclamav/index.html Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-clamav/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-clamav/trunk/ Package: python-pyclamav Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, clamav-freshclam Provides: python-clamav Replaces: python-clamav (<< 0.4.1-4~) Breaks: ${python:Breaks}, python-clamav (<< 0.4.1-4~) Description: Python bindings to ClamAV This package adds virus detection capabilities to Python software, thanks to the ClamAV antivirus toolkit without the need for running clamav-daemon. For virus scanning with clamav-daemon, python-pyclamd is an available alternative. Package: python-clamav Architecture: all Section: oldlibs Priority: extra Depends: ${misc:Depends}, python-pyclamav Description: Python bindings to ClamAV - transitional package This package adds virus detection capabilities to Python software, thanks to the ClamAV antivirus toolkit. . This is a transitional package to support upgrades to python-pyclamav. It is safe to remove it once that is installed. debian/patches/0000755000000000000000000000000011446461603010622 5ustar debian/patches/series0000644000000000000000000000003011446461250012026 0ustar clamav-095-compat.patch debian/patches/clamav-095-compat.patch0000644000000000000000000001050111446461603014677 0ustar Bug-Debian: http://bugs.debian.org/524645 Reviewed-By: Michael Casadevall Last-Update: <2009-04-20> --- python-clamav-0.4.1.orig/pyclamav.c +++ python-clamav-0.4.1/pyclamav.c @@ -33,25 +33,6 @@ /* ********************************************************* */ -/* To be able to compile with - releases 0.75 of libclamav - - Where cl_free was cl_freetrie - and cl_build was cl_buildtrie - CL_SCAN_STDOPT did not exist -*/ -#ifndef CL_SCAN_STDOPT -#define CL_SCAN_STDOPT CL_RAW | CL_ARCHIVE | CL_MAIL | CL_DISABLERAR | CL_OLE2 | CL_ENCRYPTED -void cl_free(struct cl_node *rootnode) { - cl_freetrie(rootnode); - return; -} - -int cl_build(struct cl_node *rootnode) { - return cl_buildtrie(rootnode); -} -#endif - /* For python prior to 2.3 */ #ifndef PyMODINIT_FUNC #define PyMODINIT_FUNC void @@ -68,11 +49,9 @@ static PyObject *PyclamavError; unsigned int signumber = 0; /* Structures for clamav */ -struct cl_node *root = NULL; -struct cl_limits limits; +struct cl_engine *engine = NULL; struct cl_stat dbstat; - /* * If the virus database has been changed, then * free the current tree and reload the new one @@ -85,22 +64,22 @@ int if_database_have_changed_then_reload /* If yes : reload DB */ if (cl_statchkdir(&dbstat) == 1) { - /* free the tree */ - cl_free(root); + /* free the engine */ + cl_engine_free(engine); signumber=0; - root=NULL; + engine=NULL; /* Load DB */ - if((ret = cl_load(cl_retdbdir(), &root, &signumber, CL_DB_STDOPT))) { + if((ret = cl_load(cl_retdbdir(), engine, &signumber, CL_DB_STDOPT)) != CL_SUCCESS) { /* Raise exception with error message */ PyErr_SetString(PyclamavError, cl_strerror(ret)); return -2; } - /* build the final tree */ - if((ret = cl_build(root))) { - /* free the partial tree */ - cl_free(root); + /* prepare the engine */ + if((ret = cl_engine_compile(engine))) { + /* free the engine */ + cl_engine_free(engine); /* Raise exception with error message */ PyErr_SetString(PyclamavError, cl_strerror(ret)); return -2; @@ -231,7 +210,7 @@ static PyObject *pyclamav_scanfile(PyObj return NULL; } - ret = cl_scanfile(file_to_scan, &virname, &size, root, &limits, CL_SCAN_STDOPT); + ret = cl_scanfile(file_to_scan, &virname, &size, engine, CL_SCAN_STDOPT); /* Test return code */ switch (ret) { @@ -278,17 +257,21 @@ PyMODINIT_FUNC initpyclamav(void) /* Set documentation string for the module */ PyDict_SetItemString(dict, "__doc__", PyString_FromString("pyclamav :\n\n This is a python binding to the C libclamav library\n (from the Clamav project - http://www.clamav.net).\n It can be used to easily allow a Python script to scan\n a file or a buffer against known viruses.\n\nAuthor : Alexandre Norman [norman@xael.org]\n\nFunctions :\n - scanfile(string filename) : Scan a file for virus.\n - get_numsig() : Return the number of known signatures.\n - get_version() : Return the version of Clamav.\n - version() : Return the version of pyclamav.\n")); + /* initialize libclamav */ + cl_init(CL_INIT_DEFAULT); + engine = cl_engine_new(); - if((ret = cl_load(cl_retdbdir(), &root, &signumber, CL_DB_STDOPT))) { + if((ret = cl_load(cl_retdbdir(), engine, &signumber, CL_DB_STDOPT))) { /* Raise exception with error message */ PyErr_SetString(PyclamavError, cl_strerror(ret)); + cl_engine_free(engine); return; } - /* build the final tree */ - if((ret = cl_build(root))) { - /* free the partial tree */ - cl_free(root); + /* prepare the engine */ + if((ret = cl_engine_compile(engine)) != CL_SUCCESS) { + /* free up the engine resources */ + cl_engine_free(engine); /* Raise exception with error message */ PyErr_SetString(PyclamavError, cl_strerror(ret)); return; @@ -299,15 +282,6 @@ PyMODINIT_FUNC initpyclamav(void) memset(&dbstat, 0, sizeof(struct cl_stat)); cl_statinidir(cl_retdbdir(), &dbstat); - - - /* set up archive limits */ - memset(&limits, 0, sizeof(struct cl_limits)); - limits.maxfiles = 1000; /* max files */ - limits.maxfilesize = 10 * 1048576; /* maximal archived file size == 10 Mb */ - limits.maxreclevel = 5; /* maximal recursion level */ - limits.archivememlim = 0; /* disable memory limit for bzip2 scanner */ - return ; } debian/compat0000644000000000000000000000000211446156632010374 0ustar 5