[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-167-g4319a8f

edwin edwin at 77e5149b-7576-45b1-b177-96237e5ba77b
Fri Jun 12 19:11:14 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0a739c8b603ec336941107d57b555f6e0f964cff
Author: edwin <edwin at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date:   Mon Apr 13 08:48:57 2009 +0000

    Apply modifications by Michael Tautschnig <mt*debian.org>, with some minor fixes to show location of prepared tarballs.
    
    git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5040 77e5149b-7576-45b1-b177-96237e5ba77b

diff --git a/ChangeLog b/ChangeLog
index 2c26756..35fd60d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 13 11:48:33 EEST 2009 (edwin)
+-------------------------------------
+ * contrib/split-tarball.sh: Apply modifications by Michael
+ Tautschnig <mt*debian.org>, with some minor fixes to show location
+ of prepared tarballs.
+
 Sun Apr 12 12:07:36 CEST 2009 (tk)
 ----------------------------------
  * shared/optparser.c: regexes are now case insensitive by default (this can
diff --git a/contrib/split-tarball.sh b/contrib/split-tarball.sh
index b7b5e9c..9e2457c 100755
--- a/contrib/split-tarball.sh
+++ b/contrib/split-tarball.sh
@@ -1,12 +1,12 @@
 #!/bin/bash
-# Split an upstream tarball into -dfsg, and -unrarplugin.
+# Split an upstream tarball into +dfsg, and libclamunrar.
 if test $# -ne 2; then
     echo -e "Usage: $0 <PATH> <VERSION>\n\t<PATH> - directory that contains clamav-<VERSION>.tar.gz";
     exit 1;
 fi
 
 test -d $1 || { echo "Directory $1 doesn't exist"; exit 2; }
-TARBALL=`realpath "$1/clamav-$2.tar.gz"`
+TARBALL="$PWD/$1/clamav-$2.tar.gz"
 test -f $TARBALL || { echo "Tarball $TARBALL doesn't exist"; exit 3; }
 
 TEMP=`mktemp -d __splitXXXXXX` || { echo "Cannot create temporary directory"; exit 2; }
@@ -15,28 +15,29 @@ cd $TEMP || exit 3;
 echo "Extracting $TARBALL";
 tar -xzf $TARBALL || { echo "Failed to extract $TARBALL"; exit 4; }
 
-UNRARPKG=clamav-$2-unrar.tar.gz
-DFSGPKG=clamav-$2-dfsg.tar.gz
-UNRARDIR="clamav-$2-unrar"
+UNRARPKG=libclamunrar_$2.orig.tar.gz
+DFSGPKG=clamav_$2+dfsg.orig.tar.gz
+UNRARDIR="libclamunrar-$2"
 MAKEFLAGS=-j4
 
-mkdir testpfx || { echo "Failed to create testpfx"; exit 5; }
-TESTPFX=`realpath testpfx`
-mv clamav-$2 clamav-$2-dfsg &&
-mkdir $UNRARDIR &&
-UNRARDIR=`realpath "$UNRARDIR"` &&
-echo "Preparing dfsg package" &&
-cd clamav-$2-dfsg &&
-cp -R libclamunrar_iface $UNRARDIR &&
-mv libclamunrar $UNRARDIR &&
-cp -R m4/ $UNRARDIR &&
-cp -R config/ $UNRARDIR &&
-cp configure.in $UNRARDIR &&
-cd ../ &&
-tar -czf $DFSGPKG clamav-$2-dfsg/ &&
-cd $UNRARDIR &&
-echo "Preparing unrar package" &&
-sed -ie '/AC_OUTPUT/,/])/ {
+set -e
+
+mv clamav-$2 clamav-$2+dfsg
+mkdir $UNRARDIR
+UNRARDIR="$PWD/$UNRARDIR"
+echo "Preparing dfsg package"
+cd clamav-$2+dfsg
+cp -R libclamunrar_iface $UNRARDIR
+mv libclamunrar $UNRARDIR
+cp -R m4/ $UNRARDIR
+cp -R config/ $UNRARDIR
+cp configure.in $UNRARDIR
+cp COPYING{,.unrar,.LGPL} $UNRARDIR
+cd ../
+tar -czf $DFSGPKG clamav-$2+dfsg/
+cd $UNRARDIR
+echo "Preparing unrar package"
+sed -i '/AC_OUTPUT/,/])/ {
 /^AC_OUTPUT/p
 s/^libclamav\/Makefile/libclamunrar_iface\/Makefile/p
 /^Makefile/p
@@ -46,39 +47,55 @@ d
 /LTDL/d
 /ltdl/d
 s/clamscan\/clamscan.c/libclamunrar_iface\/unrar_iface.c/
-' configure.in &&
+' configure.in
 cat <<EOF >Makefile.am &&
 ACLOCAL_AMFLAGS=-I m4
 DISTCLEANFILES = target.h
 SUBDIRS = libclamunrar_iface
 EOF
-autoreconf &&
-cd .. &&
-tar -czf $UNRARPKG clamav-$2-unrar/ &&
-mkdir buildtest && cd buildtest &&
-echo "Running build-test for $DFSGPKG" &&
-tar -xzf ../$DFSGPKG && cd clamav-$2-dfsg &&
-echo "Configuring" &&
-./configure --disable-clamav --disable-unrar --enable-milter --prefix=$TESTPFX >makelog &&
-echo "Building" &&
-make $MAKEFLAGS >>makelog&&
-echo "Checking" &&
-make $MAKEFLAGS check >>makelog 2>&1&&
-make $MAKEFLAGS install >>makelog&&
-make $MAKFELAGS installcheck >>makelog&&
-echo "OK" &&
-cd .. &&
-echo "Running build-test for $UNRARPKG" &&
-tar -xzf ../$UNRARPKG && cd clamav-$2-unrar &&
-echo "Configuring" &&
-./configure --disable-clamav --prefix=$TESTPFX >makelog &&
-echo "Building" &&
-make $MAKEFLAGS >>makelog &&
-make $MAKEFLAGS install >>makelog &&
-make $MAKEFLAGS installcheck >>makelog &&
-echo "OK" &&
-cd ../.. &&
-echo "Testing whether unrar functionality works" &&
+autoreconf
+cd ..
+tar -czf $UNRARPKG libclamunrar-$2/
+
+printf "Test archives?"
+read yes
+if [ x$yes != xy ] ; then
+    echo "Copying tarballs to current directory"
+    mv $UNRARPKG ../ &&
+    mv $DFSGPKG ../ &&
+    echo "Ready (untested): $UNRARPKG $DFSGPKG" &&
+    rm -rf $TEMP &&
+    echo "Removed temporary directory $TEMP" &&
+    exit 0
+    exit 30
+fi
+
+mkdir testpfx || { echo "Failed to create testpfx"; exit 5; }
+TESTPFX="$PWD/testpfx"
+mkdir buildtest && cd buildtest
+echo "Running build-test for $DFSGPKG"
+tar -xzf ../$DFSGPKG && cd clamav-$2+dfsg
+echo "Configuring"
+./configure --disable-clamav --disable-unrar --enable-milter --prefix=$TESTPFX >makelog
+echo "Building"
+make $MAKEFLAGS >>makelog
+echo "Checking"
+make $MAKEFLAGS check >>makelog 2>&1
+make $MAKEFLAGS install >>makelog
+make $MAKFELAGS installcheck >>makelog
+echo "OK"
+cd ..
+echo "Running build-test for $UNRARPKG"
+tar -xzf ../$UNRARPKG && cd libclamunrar-$2
+echo "Configuring"
+./configure --disable-clamav --prefix=$TESTPFX >makelog
+echo "Building"
+make $MAKEFLAGS >>makelog
+make $MAKEFLAGS install >>makelog
+make $MAKEFLAGS installcheck >>makelog
+echo "OK"
+cd ../..
+echo "Testing whether unrar functionality works"
 cat <<EOF >test.hdb
 aa15bcf478d165efd2065190eb473bcb:544:ClamAV-Test-File
 EOF
@@ -89,7 +106,9 @@ if test $? -ne 0; then
     echo "Failed"
     exit 50;
 fi
-$TESTPFX/bin/clamscan buildtest/clamav-$2-dfsg/test/clam-v*.rar -dtest.hdb >clamscanlog
+# clamscan will exit with exitcode 1 on success (virus found)
+set +e
+$TESTPFX/bin/clamscan buildtest/clamav-$2+dfsg/test/clam-v*.rar -dtest.hdb >clamscanlog
 if test $? -ne 1; then
     echo "Test failed";
     cat clamscanlog

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list