From 066ff7129f38dfa830ed9363fe9d74eea413a2c3 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 29 Sep 2009 04:38:11 +0000 Subject: [PATCH 1/9] Initialize branch F-12 for clamav --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..06de2d2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-12 From 7cefc61c9c6a4b57da8271c162113d83d92d18f2 Mon Sep 17 00:00:00 2001 From: ensc Date: Thu, 29 Oct 2009 09:10:29 +0000 Subject: [PATCH 2/9] updated to 0.95.3 --- .cvsignore | 2 +- ...1-umask.patch => clamav-0.95.3-umask.patch | 24 +++++++++---------- clamav.spec | 9 ++++--- lastver | 2 +- sources | 2 +- 5 files changed, 21 insertions(+), 18 deletions(-) rename clamav-0.95rc1-umask.patch => clamav-0.95.3-umask.patch (62%) diff --git a/.cvsignore b/.cvsignore index e2c64e0..5b7c836 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -clamav-0.95.2-norar.tar.bz2 +clamav-0.95.3-norar.tar.bz2 diff --git a/clamav-0.95rc1-umask.patch b/clamav-0.95.3-umask.patch similarity index 62% rename from clamav-0.95rc1-umask.patch rename to clamav-0.95.3-umask.patch index 8a46216..220f7ab 100644 --- a/clamav-0.95rc1-umask.patch +++ b/clamav-0.95.3-umask.patch @@ -1,21 +1,21 @@ -Index: clamav-0.95rc1/clamav-milter/clamav-milter.c +Index: clamav-0.95.3/clamav-milter/clamav-milter.c =================================================================== ---- clamav-0.95rc1.orig/clamav-milter/clamav-milter.c -+++ clamav-0.95rc1/clamav-milter/clamav-milter.c -@@ -287,7 +287,7 @@ int main(int argc, char **argv) { +--- clamav-0.95.3.orig/clamav-milter/clamav-milter.c ++++ clamav-0.95.3/clamav-milter/clamav-milter.c +@@ -306,7 +306,7 @@ int main(int argc, char **argv) { if((opt = optget(opts, "PidFile"))->enabled) { FILE *fd; -- mode_t old_umask = umask(0006); +- mode_t old_umask = umask(0002); + mode_t old_umask = umask(0022); if((fd = fopen(opt->strarg, "w")) == NULL) { logg("!Can't save PID in file %s\n", opt->strarg); -Index: clamav-0.95rc1/shared/output.c +Index: clamav-0.95.3/shared/output.c =================================================================== ---- clamav-0.95rc1.orig/shared/output.c -+++ clamav-0.95rc1/shared/output.c -@@ -250,7 +250,7 @@ int logg(const char *str, ...) +--- clamav-0.95.3.orig/shared/output.c ++++ clamav-0.95.3/shared/output.c +@@ -270,7 +270,7 @@ int logg(const char *str, ...) #endif if(logg_file) { if(!logg_fp) { @@ -24,10 +24,10 @@ Index: clamav-0.95rc1/shared/output.c if((logg_fp = fopen(logg_file, "at")) == NULL) { umask(old_umask); #ifdef CL_THREAD_SAFE -Index: clamav-0.95rc1/freshclam/freshclam.c +Index: clamav-0.95.3/freshclam/freshclam.c =================================================================== ---- clamav-0.95rc1.orig/freshclam/freshclam.c -+++ clamav-0.95rc1/freshclam/freshclam.c +--- clamav-0.95.3.orig/freshclam/freshclam.c ++++ clamav-0.95.3/freshclam/freshclam.c @@ -102,7 +102,7 @@ static void writepid(const char *pidfile { FILE *fd; diff --git a/clamav.spec b/clamav.spec index f8e774c..4875437 100644 --- a/clamav.spec +++ b/clamav.spec @@ -23,8 +23,8 @@ Summary: End-user tools for the Clam Antivirus scanner Name: clamav -Version: 0.95.2 -Release: %release_func 5%{?snapshot:.%snapshot} +Version: 0.95.3 +Release: %release_func 1200%{?snapshot:.%snapshot} License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} Group: Applications/File @@ -49,7 +49,7 @@ Source8: clamav-notify-servers Patch24: clamav-0.92-private.patch Patch25: clamav-0.92-open.patch Patch26: clamav-0.95-cliopts.patch -Patch27: clamav-0.95rc1-umask.patch +Patch27: clamav-0.95.3-umask.patch BuildRoot: %_tmppath/%name-%version-%release-root Requires: clamav-lib = %version-%release Requires: data(clamav) @@ -696,6 +696,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || : %changelog +* Thu Oct 29 2009 Enrico Scholz - 0.95.3-1200 +- updated to 0.95.3 + * Sun Sep 13 2009 Enrico Scholz - conditionalized build of noarch subpackages to ease packaging under RHEL5 diff --git a/lastver b/lastver index e7f6f8b..4d8fc8c 100644 --- a/lastver +++ b/lastver @@ -1 +1 @@ -0.95.2 +0.95.3 diff --git a/sources b/sources index 5744218..898c137 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -377aed737db63d902e641be8d923cda9 clamav-0.95.2-norar.tar.bz2 +7a76425f5cffb9973d6ee45580dc2094 clamav-0.95.3-norar.tar.bz2 From fdd53a472bbd80a2c9395baccb35a716feed3df9 Mon Sep 17 00:00:00 2001 From: ensc Date: Sat, 21 Nov 2009 20:20:43 +0000 Subject: [PATCH 3/9] - adjusted chkconfig positions for clamav-milter (#530101) --- clamav-milter.sysv | 2 +- clamav.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clamav-milter.sysv b/clamav-milter.sysv index 693d4ee..170cdc1 100644 --- a/clamav-milter.sysv +++ b/clamav-milter.sysv @@ -2,7 +2,7 @@ # # clamav-milter Starts/stop the "clamav-milter" daemon # -# chkconfig: - 99 1 +# chkconfig: - 79 21 # description: A virus scanning milter # Source function library. diff --git a/clamav.spec b/clamav.spec index 4875437..88935d7 100644 --- a/clamav.spec +++ b/clamav.spec @@ -696,6 +696,9 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || : %changelog +* Sat Nov 21 2009 Enrico Scholz +- adjusted chkconfig positions for clamav-milter (#530101) + * Thu Oct 29 2009 Enrico Scholz - 0.95.3-1200 - updated to 0.95.3 From 17f763b7dc28b4341ed934d821453b98a18a38ce Mon Sep 17 00:00:00 2001 From: ensc Date: Sun, 22 Nov 2009 10:47:16 +0000 Subject: [PATCH 4/9] removed stanza from upstart script which waited for 'starting\ XXX'; wrongly named upstart events have been fixed in recent initscripts (#501155) --- README.fedora | 10 ++++------ clamav-milter.upstart | 4 ---- clamd.scan.upstart | 1 - 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/README.fedora b/README.fedora index 4f12058..8df192d 100644 --- a/README.fedora +++ b/README.fedora @@ -67,12 +67,11 @@ B) On the clamav-milter host (assumed hostname 'host-milter') and all the other options which are required on your system - 3. Edit /etc/event.d/clamav-milter and uncomment the both + 3. Edit /etc/event.d/clamav-milter and uncomment the - | start on starting\ local | start on starting local - lines. Restart your system or execute + line. Restart your system or execute | initctl emit starting local @@ -98,12 +97,11 @@ C) On the clamav-scanner host (assumed hostname 'host-scanner') comment out possible 'LocalSocket' lines and set all the other options which are required on your system - 3. Edit /etc/event.d/clamav-scanner and uncomment the both + 3. Edit /etc/event.d/clamav-scanner and uncomment the - | start on starting\ local | start on starting local - lines. Restart your system or execute + line. Restart your system or execute | initctl emit starting local diff --git a/clamav-milter.upstart b/clamav-milter.upstart index 165829e..e0a63f2 100644 --- a/clamav-milter.upstart +++ b/clamav-milter.upstart @@ -1,14 +1,10 @@ - ### Uncomment these lines when you want clamav-milter to be a milter ### for a locally running MTA -#start on starting\ sendmail #start on starting sendmail -#start on starting\ postfix #start on starting postfix ### Uncomment these lines when you want clamav-milter to be a milter ### for a remotely running MTA -#start on starting\ local #start on starting local stop on runlevel 0 diff --git a/clamd.scan.upstart b/clamd.scan.upstart index 6c769e0..b6280f5 100644 --- a/clamd.scan.upstart +++ b/clamd.scan.upstart @@ -4,7 +4,6 @@ ### Uncomment these lines when you want clamd.scan to be a generic ### scanner service -#start on starting\ local #start on starting local stop on runlevel 0 From fe5fba2f28297575762fdeb2192eaad3789f77bf Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:29:38 +0000 Subject: [PATCH 5/9] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed9c5e4..4a3ae71 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ NAME := clamav SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From f871ae1f87b7f2e0e70a5eb1ddf33ccc4a5bbe7a Mon Sep 17 00:00:00 2001 From: ensc Date: Sun, 20 Jun 2010 13:50:28 +0000 Subject: [PATCH 6/9] - updated to 0.96.1 - applied upstream patch which allows to disable JIT compiler (#573191) - disabled JIT compiler by default - removed explicit 'pkgconfig' requirements in -devel (#533956) - added some BRs - rediffed patches --- .cvsignore | 2 +- clamav-0.92-open.patch | 6 +- clamav-0.92-private.patch | 12 ++- clamav-0.95-cliopts.patch | 8 +- clamav-0.95.3-umask.patch | 24 +++--- clamav-0.96-disable-jit.patch | 150 ++++++++++++++++++++++++++++++++++ clamav-0.96-jitoff.patch | 80 ++++++++++++++++++ clamav.spec | 42 +++++++--- lastver | 2 +- sources | 2 +- 10 files changed, 291 insertions(+), 37 deletions(-) create mode 100644 clamav-0.96-disable-jit.patch create mode 100644 clamav-0.96-jitoff.patch diff --git a/.cvsignore b/.cvsignore index 5b7c836..495edab 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -clamav-0.95.3-norar.tar.bz2 +clamav-0.96.1-norar.tar.xz diff --git a/clamav-0.92-open.patch b/clamav-0.92-open.patch index 040fc20..48ad0c1 100644 --- a/clamav-0.92-open.patch +++ b/clamav-0.92-open.patch @@ -1,5 +1,7 @@ ---- clamav-0.91.2/clamd/dazukoio_compat12.c.open 2007-03-06 14:38:06.000000000 +0100 -+++ clamav-0.91.2/clamd/dazukoio_compat12.c 2007-08-25 12:36:30.000000000 +0200 +Index: clamav-0.96.1/clamd/dazukoio_compat12.c +=================================================================== +--- clamav-0.96.1.orig/clamd/dazukoio_compat12.c ++++ clamav-0.96.1/clamd/dazukoio_compat12.c @@ -89,7 +89,7 @@ int dazukoRegister_TS_compat12(struct da if (dazuko->device < 0) { diff --git a/clamav-0.92-private.patch b/clamav-0.92-private.patch index bab2948..61625a1 100644 --- a/clamav-0.92-private.patch +++ b/clamav-0.92-private.patch @@ -1,5 +1,7 @@ ---- clamav-0.92/libclamav.pc.in.private -+++ clamav-0.92/libclamav.pc.in +Index: clamav-0.96.1/libclamav.pc.in +=================================================================== +--- clamav-0.96.1.orig/libclamav.pc.in ++++ clamav-0.96.1/libclamav.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: libclamav Description: A GPL virus scanner @@ -10,8 +12,10 @@ +Libs: -L${libdir} -lclamav +Libs.private: -L${libdir} -lclamav @LIBCLAMAV_LIBS@ +Cflags: -I${includedir} ---- clamav-0.92/clamav-config.in.private -+++ clamav-0.92/clamav-config.in +Index: clamav-0.96.1/clamav-config.in +=================================================================== +--- clamav-0.96.1.orig/clamav-config.in ++++ clamav-0.96.1/clamav-config.in @@ -54,12 +54,8 @@ while test $# -gt 0; do usage 0 ;; diff --git a/clamav-0.95-cliopts.patch b/clamav-0.95-cliopts.patch index 90d173f..7d94b28 100644 --- a/clamav-0.95-cliopts.patch +++ b/clamav-0.95-cliopts.patch @@ -1,8 +1,8 @@ -Index: clamav-0.95rc1/shared/optparser.c +Index: clamav-0.96.1/shared/optparser.c =================================================================== ---- clamav-0.95rc1.orig/shared/optparser.c -+++ clamav-0.95rc1/shared/optparser.c -@@ -211,7 +211,7 @@ const struct clam_option clam_options[] +--- clamav-0.96.1.orig/shared/optparser.c ++++ clamav-0.96.1/shared/optparser.c +@@ -236,7 +236,7 @@ const struct clam_option __clam_options[ { "ExitOnOOM", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "Stop the daemon when libclamav reports an out of memory condition.", "yes" }, diff --git a/clamav-0.95.3-umask.patch b/clamav-0.95.3-umask.patch index 220f7ab..ada0fcd 100644 --- a/clamav-0.95.3-umask.patch +++ b/clamav-0.95.3-umask.patch @@ -1,8 +1,8 @@ -Index: clamav-0.95.3/clamav-milter/clamav-milter.c +Index: clamav-0.96.1/clamav-milter/clamav-milter.c =================================================================== ---- clamav-0.95.3.orig/clamav-milter/clamav-milter.c -+++ clamav-0.95.3/clamav-milter/clamav-milter.c -@@ -306,7 +306,7 @@ int main(int argc, char **argv) { +--- clamav-0.96.1.orig/clamav-milter/clamav-milter.c ++++ clamav-0.96.1/clamav-milter/clamav-milter.c +@@ -365,7 +365,7 @@ int main(int argc, char **argv) { if((opt = optget(opts, "PidFile"))->enabled) { FILE *fd; @@ -11,11 +11,11 @@ Index: clamav-0.95.3/clamav-milter/clamav-milter.c if((fd = fopen(opt->strarg, "w")) == NULL) { logg("!Can't save PID in file %s\n", opt->strarg); -Index: clamav-0.95.3/shared/output.c +Index: clamav-0.96.1/shared/output.c =================================================================== ---- clamav-0.95.3.orig/shared/output.c -+++ clamav-0.95.3/shared/output.c -@@ -270,7 +270,7 @@ int logg(const char *str, ...) +--- clamav-0.96.1.orig/shared/output.c ++++ clamav-0.96.1/shared/output.c +@@ -280,7 +280,7 @@ int logg(const char *str, ...) #endif if(logg_file) { if(!logg_fp) { @@ -24,11 +24,11 @@ Index: clamav-0.95.3/shared/output.c if((logg_fp = fopen(logg_file, "at")) == NULL) { umask(old_umask); #ifdef CL_THREAD_SAFE -Index: clamav-0.95.3/freshclam/freshclam.c +Index: clamav-0.96.1/freshclam/freshclam.c =================================================================== ---- clamav-0.95.3.orig/freshclam/freshclam.c -+++ clamav-0.95.3/freshclam/freshclam.c -@@ -102,7 +102,7 @@ static void writepid(const char *pidfile +--- clamav-0.96.1.orig/freshclam/freshclam.c ++++ clamav-0.96.1/freshclam/freshclam.c +@@ -106,7 +106,7 @@ static void writepid(const char *pidfile { FILE *fd; int old_umask; diff --git a/clamav-0.96-disable-jit.patch b/clamav-0.96-disable-jit.patch new file mode 100644 index 0000000..01b3c79 --- /dev/null +++ b/clamav-0.96-disable-jit.patch @@ -0,0 +1,150 @@ +Index: clamav-0.96.1/clamd/clamd.c +=================================================================== +--- clamav-0.96.1.orig/clamd/clamd.c ++++ clamav-0.96.1/clamd/clamd.c +@@ -434,6 +434,9 @@ int main(int argc, char **argv) + if((opt = optget(opts,"BytecodeTimeout"))->enabled) { + cl_engine_set_num(engine, CL_ENGINE_BYTECODE_TIMEOUT, opt->numarg); + } ++ if((opt = optget(opts,"BytecodeDisableJIT"))->enabled) { ++ cl_engine_set_num(engine, CL_ENGINE_BYTECODE_DISABLEJIT, opt->numarg); ++ } + + if(optget(opts,"PhishingScanURLs")->enabled) + dboptions |= CL_DB_PHISHING_URLS; +Index: clamav-0.96.1/clamscan/manager.c +=================================================================== +--- clamav-0.96.1.orig/clamscan/manager.c ++++ clamav-0.96.1/clamscan/manager.c +@@ -404,6 +404,8 @@ int scanmanager(const struct optstruct * + cl_engine_set_num(engine, CL_ENGINE_BYTECODE_SECURITY, CL_BYTECODE_TRUST_ALL); + if((opt = optget(opts,"bytecode-timeout"))->enabled) + cl_engine_set_num(engine, CL_ENGINE_BYTECODE_TIMEOUT, opt->numarg); ++ if((opt = optget(opts,"bytecode-disable-jit"))->enabled) ++ cl_engine_set_num(engine, CL_ENGINE_BYTECODE_DISABLEJIT, opt->numarg); + + if((opt = optget(opts, "tempdir"))->enabled) { + if((ret = cl_engine_set_str(engine, CL_ENGINE_TMPDIR, opt->strarg))) { +Index: clamav-0.96.1/docs/man/clamd.conf.5.in +=================================================================== +--- clamav-0.96.1.orig/docs/man/clamd.conf.5.in ++++ clamav-0.96.1/docs/man/clamd.conf.5.in +@@ -253,6 +253,12 @@ Default: TrustSigned + Set bytecode timeout in milliseconds. + .br + Default: 60000 ++.TP ++\fBBytecodeDisableJIT BOOL\fR ++Disable the JIT and fallback to interpreter mode. ++WARNING: disabling the JIT affects performance! ++.br ++Default: No + .TP + \fBDetectPUA BOOL\fR + Detect Possibly Unwanted Applications. +Index: clamav-0.96.1/docs/man/clamscan.1.in +=================================================================== +--- clamav-0.96.1.orig/docs/man/clamscan.1.in ++++ clamav-0.96.1/docs/man/clamscan.1.in +@@ -86,6 +86,10 @@ This option disables safety checks and m + .TP + \fB\-\-bytecode\-timeout=N\fR + Set bytecode timeout in milliseconds (default: 60000 = 60s) ++.TP ++\fB\-\-bytecode\-disable\-jit\fR ++Disable the JIT and fallback to interpreter mode. ++WARNING: disable the JIT affects performance! + .TP + \fB\-\-detect\-pua[=yes/no(*)]\fR + Detect Possibly Unwanted Applications. +Index: clamav-0.96.1/etc/clamd.conf +=================================================================== +--- clamav-0.96.1.orig/etc/clamd.conf ++++ clamav-0.96.1/etc/clamd.conf +@@ -472,3 +472,8 @@ Example + # + # Default: 60000 + # BytecodeTimeout 60000 ++ ++# Disable JIT and fallback to interpreter. WARNING: disabling JIT affects performance. ++# ++# Default: no ++#BytecodeDisableJIT no +Index: clamav-0.96.1/libclamav/clamav.h +=================================================================== +--- clamav-0.96.1.orig/libclamav/clamav.h ++++ clamav-0.96.1/libclamav/clamav.h +@@ -144,7 +144,8 @@ enum cl_engine_field { + CL_ENGINE_TMPDIR, /* (char *) */ + CL_ENGINE_KEEPTMP, /* uint32_t */ + CL_ENGINE_BYTECODE_SECURITY, /* uint32_t */ +- CL_ENGINE_BYTECODE_TIMEOUT /* uint32_t */ ++ CL_ENGINE_BYTECODE_TIMEOUT, /* uint32_t */ ++ CL_ENGINE_BYTECODE_DISABLEJIT /* uint32_t */ + }; + + enum bytecode_security { +Index: clamav-0.96.1/libclamav/others.c +=================================================================== +--- clamav-0.96.1.orig/libclamav/others.c ++++ clamav-0.96.1/libclamav/others.c +@@ -301,6 +301,7 @@ struct cl_engine *cl_engine_new(void) + new->bytecode_security = CL_BYTECODE_TRUST_SIGNED; + /* 5 seconds timeout */ + new->bytecode_timeout = 60000; ++ new->disablejit = 0; + new->refcount = 1; + new->ac_only = 0; + new->ac_mindepth = CLI_DEFAULT_AC_MINDEPTH; +@@ -399,6 +400,9 @@ int cl_engine_set_num(struct cl_engine * + case CL_ENGINE_BYTECODE_TIMEOUT: + engine->bytecode_timeout = num; + break; ++ case CL_ENGINE_BYTECODE_DISABLEJIT: ++ engine->disablejit = num; ++ break; + default: + cli_errmsg("cl_engine_set_num: Incorrect field number\n"); + return CL_EARG; +Index: clamav-0.96.1/libclamav/others.h +=================================================================== +--- clamav-0.96.1.orig/libclamav/others.h ++++ clamav-0.96.1/libclamav/others.h +@@ -253,6 +253,7 @@ struct cl_engine { + unsigned hook_lsig_ids; + enum bytecode_security bytecode_security; + uint32_t bytecode_timeout; ++ unsigned disablejit; + }; + + struct cl_settings { +Index: clamav-0.96.1/libclamav/readdb.c +=================================================================== +--- clamav-0.96.1.orig/libclamav/readdb.c ++++ clamav-0.96.1/libclamav/readdb.c +@@ -2595,7 +2595,10 @@ int cl_load(const char *path, struct cl_ + return ret; + + if((dboptions & CL_DB_BYTECODE) && !engine->bcs.engine && (engine->dconf->bytecode & BYTECODE_ENGINE_MASK)) { +- if((ret = cli_bytecode_init(&engine->bcs, engine->dconf->bytecode))) ++ unsigned dconfmask = engine->dconf->bytecode; ++ if (engine->disablejit) ++ dconfmask &= BYTECODE_INTERPRETER; ++ if((ret = cli_bytecode_init(&engine->bcs, dconfmask))) + return ret; + } else { + cli_dbgmsg("Bytecode engine disabled\n"); +Index: clamav-0.96.1/shared/optparser.c +=================================================================== +--- clamav-0.96.1.orig/shared/optparser.c ++++ clamav-0.96.1/shared/optparser.c +@@ -252,6 +252,9 @@ const struct clam_option __clam_options[ + "Set bytecode security level.\nPossible values:\n\tNone - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS\n\tTrustSigned - trust bytecode loaded from signed .c[lv]d files,\n\t\t insert runtime safety checks for bytecode loaded from other sources\n\tParanoid - don't trust any bytecode, insert runtime checks for all\nRecommended: TrustSigned, because bytecode in .cvd files already has these checks\n","TrustSigned"}, + { "BytecodeTimeout", "bytecode-timeout", 0, TYPE_NUMBER, MATCH_NUMBER, 60000, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, + "Set bytecode timeout in miliseconds.\n","60000"}, ++ { "BytecodeDisableJIT", "bytecode-disable-jit", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, ++ "Disable JIT and fallback to interpreter. WARNING: disabling JIT affects performance.\n","no"}, ++ + { "DetectPUA", "detect-pua", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Detect Potentially Unwanted Applications.", "yes" }, + + { "ExcludePUA", "exclude-pua", 0, TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_CLAMSCAN, "Exclude a specific PUA category. This directive can be used multiple times.\nSee http://www.clamav.net/support/pua for the complete list of PUA\ncategories.", "NetTool\nPWTool" }, diff --git a/clamav-0.96-jitoff.patch b/clamav-0.96-jitoff.patch new file mode 100644 index 0000000..cea2e5a --- /dev/null +++ b/clamav-0.96-jitoff.patch @@ -0,0 +1,80 @@ +Index: clamav-0.96.1/etc/clamd.conf +=================================================================== +--- clamav-0.96.1.orig/etc/clamd.conf ++++ clamav-0.96.1/etc/clamd.conf +@@ -11,7 +11,7 @@ Example + # LogFile must be writable for the user running daemon. + # A full path is required. + # Default: disabled +-#LogFile /tmp/clamd.log ++#LogFile /var/log/clamd. + + # By default the log file is locked for writing - the lock protects against + # running clamd multiple times (if want to run another clamd, please +@@ -40,7 +40,7 @@ Example + + # Use system logger (can work together with LogFile). + # Default: no +-#LogSyslog yes ++LogSyslog yes + + # Specify the type of syslog messages - please refer to 'man syslog' + # for facility names. +@@ -54,7 +54,7 @@ Example + # This option allows you to save a process identifier of the listening + # daemon (main thread). + # Default: disabled +-#PidFile /var/run/clamd.pid ++#PidFile /var/run/clamd./clamd.pid + + # Optional path to the global temporary directory. + # Default: system specific (usually /tmp or /var/tmp). +@@ -73,7 +73,7 @@ Example + + # Path to a local socket file the daemon will listen on. + # Default: disabled (must be specified by a user) +-#LocalSocket /tmp/clamd.socket ++#LocalSocket /var/run/clamd./clamd.sock + + # Sets the group ownership on the unix socket. + # Default: disabled (the primary group of the user running clamd) +@@ -183,11 +183,11 @@ Example + + # Run as another user (clamd must be started by root for this option to work) + # Default: don't drop privileges +-#User clamav ++User + + # Initialize supplementary group access (clamd must be started by root). + # Default: no +-#AllowSupplementaryGroups no ++AllowSupplementaryGroups yes + + # Stop daemon when libclamav reports out of memory condition. + #ExitOnOOM yes +@@ -474,6 +474,10 @@ Example + # BytecodeTimeout 60000 + + # Disable JIT and fallback to interpreter. WARNING: disabling JIT affects performance. +-# +-# Default: no ++# ++# This option has been turned off in Fedora due to security concerns ++# by default. You might need to enable the 'clamd_use_jit' SELinux ++# boolean after enabling this option. ++# ++# Default: yes + #BytecodeDisableJIT no +Index: clamav-0.96.1/shared/optparser.c +=================================================================== +--- clamav-0.96.1.orig/shared/optparser.c ++++ clamav-0.96.1/shared/optparser.c +@@ -252,7 +252,7 @@ const struct clam_option __clam_options[ + "Set bytecode security level.\nPossible values:\n\tNone - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS\n\tTrustSigned - trust bytecode loaded from signed .c[lv]d files,\n\t\t insert runtime safety checks for bytecode loaded from other sources\n\tParanoid - don't trust any bytecode, insert runtime checks for all\nRecommended: TrustSigned, because bytecode in .cvd files already has these checks\n","TrustSigned"}, + { "BytecodeTimeout", "bytecode-timeout", 0, TYPE_NUMBER, MATCH_NUMBER, 60000, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, + "Set bytecode timeout in miliseconds.\n","60000"}, +- { "BytecodeDisableJIT", "bytecode-disable-jit", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, ++ { "BytecodeDisableJIT", "bytecode-disable-jit", 0, TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, + "Disable JIT and fallback to interpreter. WARNING: disabling JIT affects performance.\n","no"}, + + { "DetectPUA", "detect-pua", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Detect Potentially Unwanted Applications.", "yes" }, diff --git a/clamav.spec b/clamav.spec index 88935d7..d8a88e7 100644 --- a/clamav.spec +++ b/clamav.spec @@ -5,6 +5,7 @@ %bcond_without upstart %bcond_with unrar %bcond_without noarch +%bcond_without bytecode ## %global username clamupdate @@ -23,7 +24,7 @@ Summary: End-user tools for the Clam Antivirus scanner Name: clamav -Version: 0.95.3 +Version: 0.96.1 Release: %release_func 1200%{?snapshot:.%snapshot} License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} @@ -37,7 +38,7 @@ Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?s # incompatible unrar from RARlabs. We have to pull this code out. # tarball was created by # make clean-sources [TARBALL=] [VERSION=] -Source0: %name-%version%{?snapshot}-norar.tar.bz2 +Source0: %name-%version%{?snapshot}-norar.tar.xz %endif Source1: clamd-wrapper Source2: clamd.sysconfig @@ -50,13 +51,16 @@ Patch24: clamav-0.92-private.patch Patch25: clamav-0.92-open.patch Patch26: clamav-0.95-cliopts.patch Patch27: clamav-0.95.3-umask.patch +# https://bugzilla.redhat.com/attachment.cgi?id=403775&action=diff&context=patch&collapsed=&headers=1&format=raw +Patch28: clamav-0.96-disable-jit.patch +Patch29: clamav-0.96-jitoff.patch BuildRoot: %_tmppath/%name-%version-%release-root Requires: clamav-lib = %version-%release Requires: data(clamav) BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel BuildRequires: ncurses-devel BuildRequires: %_includedir/tcpd.h -BuildRequires: bc +%{?with_bytecode:BuildRequires: bc tcl ocaml groff graphviz} %package filesystem Summary: Filesystem structure for clamav @@ -81,8 +85,6 @@ Group: Development/Libraries Source100: clamd-gen Requires: clamav-lib = %version-%release Requires: clamav-filesystem = %version-%release -Requires(pre): %_libdir/pkgconfig -Requires: pkgconfig %package data Summary: Virus signature data for the Clam Antivirus scanner @@ -316,6 +318,8 @@ The Upstart initscripts for clamav-milter. %patch25 -p1 -b .open %patch26 -p1 -b .cliopts %patch27 -p1 -b .umask +%patch28 -p1 -b .jit-disable +%patch29 -p1 -b .jitoff install -p -m0644 %SOURCE300 clamav-milter/ @@ -342,15 +346,21 @@ sed -ri \ %build CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations -std=gnu99" export LDFLAGS='-Wl,--as-needed' -# HACK: remove me, when configure uses $LIBS instead of $LDFLAGS for milter check -export LIBS='-lmilter -lpthread' +# HACK: remove me... +export FRESHCLAM_LIBS='-lz' # IPv6 check is buggy and does not work when there are no IPv6 interface on build machine export have_cv_ipv6=yes -%configure --disable-clamav --with-dbdir=/var/lib/clamav \ - --enable-milter --disable-static \ - --disable-rpath \ - --with-user=%username \ - --with-group=%username \ +%configure \ + --disable-static \ + --disable-rpath \ + --disable-silent-rules \ + --disable-clamav \ + --with-user=%username \ + --with-group=%username \ + --with-dbdir=/var/lib/clamav \ + --enable-milter \ + --enable-clamdtop \ + %{!?with_bytecode:--disable-llvm} \ %{!?with_unrar:--disable-unrar} # TODO: check periodically that CLAMAVUSER is used for freshclam only @@ -696,6 +706,14 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || : %changelog +* Sun Jun 20 2010 Enrico Scholz - 0.96.1-1200 +- updated to 0.96.1 +- applied upstream patch which allows to disable JIT compiler (#573191) +- disabled JIT compiler by default +- removed explicit 'pkgconfig' requirements in -devel (#533956) +- added some BRs +- rediffed patches + * Sat Nov 21 2009 Enrico Scholz - adjusted chkconfig positions for clamav-milter (#530101) diff --git a/lastver b/lastver index 4d8fc8c..483b771 100644 --- a/lastver +++ b/lastver @@ -1 +1 @@ -0.95.3 +0.96.1 diff --git a/sources b/sources index 898c137..b30d6e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7a76425f5cffb9973d6ee45580dc2094 clamav-0.95.3-norar.tar.bz2 +d7a79bcd71da15817d6c731f989cf73a clamav-0.96.1-norar.tar.xz From e15580c0a0e969aaf59a4f86af75e63a53ead18f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 11:44:54 +0000 Subject: [PATCH 7/9] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 33 --------------------------------- branch | 1 - 3 files changed, 34 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 4a3ae71..0000000 --- a/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Makefile for source rpm: clamav -NAME := clamav -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) - - -# can not use final tarball name here as it will conflict with rules -# within Makefile.common -TARBALL_CLEAN = ${NAME}-${VERSION}-norar.tar.bz2.tmp -TARBALL = ${NAME}-${VERSION}.tar.gz - -clean-sources: ${TARBALL_CLEAN} - -${TARBALL_CLEAN}: ${TARBALL} - rm -f $@.tmp - zcat $< | tar --delete -f - '*/libclamunrar/*' | bzip2 -c > $@.tmp - mv $@.tmp $@ diff --git a/branch b/branch deleted file mode 100644 index 06de2d2..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-12 From 383d5967a88859efc2fc9ae0d19f83ea6fac248e Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Wed, 11 Aug 2010 09:53:30 +0200 Subject: [PATCH 8/9] Revert "Merge branch 'master' into f12" This reverts commit 6804a57f9fb3d7dfda295a9268f35b844bc98b87, reversing changes made to e15580c0a0e969aaf59a4f86af75e63a53ead18f. --- clamav-milter.upstart | 11 +++--- clamav.spec | 85 ++++++++++++++----------------------------- clamd.scan.upstart | 14 +++---- lastver | 2 +- verinfo | 2 +- 5 files changed, 43 insertions(+), 71 deletions(-) diff --git a/clamav-milter.upstart b/clamav-milter.upstart index 02d7080..e0a63f2 100644 --- a/clamav-milter.upstart +++ b/clamav-milter.upstart @@ -1,14 +1,15 @@ -### !!! Uncomment only *one* of the 'start on' statements !!! - ### Uncomment these lines when you want clamav-milter to be a milter ### for a locally running MTA -#start on (starting sendmail or starting postfix) +#start on starting sendmail +#start on starting postfix ### Uncomment these lines when you want clamav-milter to be a milter ### for a remotely running MTA -#start on runlevel [345] and starting local +#start on starting local -stop on runlevel [!345] +stop on runlevel 0 +stop on runlevel 1 +stop on runlevel 6 respawn exec /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --nofork=yes diff --git a/clamav.spec b/clamav.spec index bd79214..d8a88e7 100644 --- a/clamav.spec +++ b/clamav.spec @@ -1,4 +1,4 @@ -#global prerelease rc1 +#global snapshot rc1 ## Fedora Extras specific customization below... %bcond_without fedora @@ -8,12 +8,6 @@ %bcond_without bytecode ## -%ifnarch s390 s390x -%global have_ocaml 1 -%else -%global have_ocaml 0 -%endif - %global username clamupdate %global homedir %_var/lib/clamav %global freshclamlog %_var/log/freshclam.log @@ -26,26 +20,25 @@ %global scanstatedir %_var/run/clamd.scan %{?with_noarch:%global noarch BuildArch: noarch} -%{!?release_func:%global release_func() %%{?prerelease:0.}%1%%{?prerelease:.%%prerelease}%%{?dist}} -%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \ -%nil} +%{!?release_func:%global release_func() %1%{?dist}} Summary: End-user tools for the Clam Antivirus scanner Name: clamav Version: 0.96.1 -Release: %release_func 1401 +Release: %release_func 1200%{?snapshot:.%snapshot} + License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2} Group: Applications/File URL: http://www.clamav.net %if 0%{?with_unrar:1} -Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prerelease}.tar.gz -Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prerelease}.tar.gz.sig +Source0: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snapshot}.tar.gz +Source999: http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?snapshot}.tar.gz.sig %else # Unfortunately, clamav includes support for RAR v3, derived from GPL # incompatible unrar from RARlabs. We have to pull this code out. # tarball was created by # make clean-sources [TARBALL=] [VERSION=] -Source0: %name-%version%{?prerelease}-norar.tar.xz +Source0: %name-%version%{?snapshot}-norar.tar.xz %endif Source1: clamd-wrapper Source2: clamd.sysconfig @@ -67,10 +60,7 @@ Requires: data(clamav) BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel BuildRequires: ncurses-devel BuildRequires: %_includedir/tcpd.h -%{?with_bytecode:BuildRequires: bc tcl groff graphviz} -%if %{have_ocaml} -%{?with_bytecode:BuildRequires: ocaml} -%endif +%{?with_bytecode:BuildRequires: bc tcl ocaml groff graphviz} %package filesystem Summary: Filesystem structure for clamav @@ -172,7 +162,8 @@ Group: System Environment/Daemons Source410: clamd.scan.upstart Provides: init(clamav-scanner) = upstart Requires: clamav-scanner = %version-%release -Requires(pre): /etc/init +# implicates a conflict with upstart 0.5+ +Requires(pre): /etc/event.d Requires(post): /usr/bin/killall Requires(postun): /sbin/initctl %{?noarch} @@ -220,7 +211,8 @@ Group: System Environment/Daemons Source310: clamav-milter.upstart Provides: init(clamav-milter) = upstart Requires: clamav-milter = %version-%release -Requires(pre): /etc/init +# implicates a conflict with upstart 0.5+ +Requires(pre): /etc/event.d Requires(post): /usr/bin/killall Requires(postun): /sbin/initctl %{?noarch} @@ -320,14 +312,14 @@ The Upstart initscripts for clamav-milter. ## ------------------------------------------------------------ %prep -%setup -q -n %{name}-%{version}%{?prerelease} +%setup -q -n %{name}-%{version}%{?snapshot} -%apply -n24 -p1 -b .private -%apply -n25 -p1 -b .open -%apply -n26 -p1 -b .cliopts -%apply -n27 -p1 -b .umask -%apply -n28 -p1 -b .jit-disable -%apply -n29 -p1 -b .jitoff +%patch24 -p1 -b .private +%patch25 -p1 -b .open +%patch26 -p1 -b .cliopts +%patch27 -p1 -b .umask +%patch28 -p1 -b .jit-disable +%patch29 -p1 -b .jitoff install -p -m0644 %SOURCE300 clamav-milter/ @@ -405,7 +397,7 @@ function smartsubst() { install -d -m755 \ - ${RPM_BUILD_ROOT}%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,sysconfig,init} \ + ${RPM_BUILD_ROOT}%_sysconfdir/{mail,clamd.d,cron.d,logrotate.d,sysconfig,event.d} \ ${RPM_BUILD_ROOT}%_var/log \ ${RPM_BUILD_ROOT}%milterstatedir \ ${RPM_BUILD_ROOT}%pkgdatadir/template \ @@ -461,7 +453,7 @@ sed -e 's!!scan!g;s!!%scanuser!g' \ sed -e 's!!scan!g;' $RPM_BUILD_ROOT%pkgdatadir/template/clamd.init \ > $RPM_BUILD_ROOT%_initrddir/clamd.scan -install -p -m 644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/init/clamd.scan.conf +install -p -m 644 %SOURCE410 $RPM_BUILD_ROOT%_sysconfdir/event.d/clamd.scan touch $RPM_BUILD_ROOT%scanstatedir/clamd.sock @@ -475,14 +467,14 @@ sed -r \ -e 's! /tmp/clamav-milter.log! %milterlog!g' \ etc/clamav-milter.conf > $RPM_BUILD_ROOT%_sysconfdir/mail/clamav-milter.conf -install -p -m 644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/init/clamav-milter.conf +install -p -m 644 %SOURCE310 $RPM_BUILD_ROOT%_sysconfdir/event.d/clamav-milter install -p -m 755 %SOURCE320 $RPM_BUILD_ROOT%_initrddir/clamav-milter rm -f $RPM_BUILD_ROOT%_sysconfdir/clamav-milter.conf touch $RPM_BUILD_ROOT{%milterstatedir/clamav-milter.socket,%milterlog} -%{!?with_upstart:rm -rf $RPM_BUILD_ROOT%_sysconfdir/init} +%{!?with_upstart:rm -rf $RPM_BUILD_ROOT%_sysconfdir/event.d} ## ------------------------------------------------------------ @@ -687,7 +679,7 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || : %if 0%{?with_upstart:1} %files scanner-upstart %defattr(-,root,root,-) -%config(noreplace) %_sysconfdir/init/clamd.scan* +%config(noreplace) %_sysconfdir/event.d/clamd.scan %endif ## ----------------------- @@ -709,44 +701,23 @@ test "$1" != "0" || /sbin/initctl -q stop clamav-milter || : %if 0%{?with_upstart:1} %files milter-upstart %defattr(-,root,root,-) -%config(noreplace) %_sysconfdir/init/clamav-milter* +%config(noreplace) %_sysconfdir/event.d/clamav-milter %endif %changelog -* Tue Jul 13 2010 Dan HorĂ¡k - 0.96.1-1401 -- ocaml not available (at least) on s390(x) - -* Tue Jun 1 2010 Enrico Scholz - 0.96.1-1400 +* Sun Jun 20 2010 Enrico Scholz - 0.96.1-1200 - updated to 0.96.1 -- rediffed patches - -* Sat May 19 2010 Rakesh Pandit - 0.96.1403 -- CVE-2010-1639 Clam AntiVirus: Heap-based overflow, when processing malicious PDF file(s) - -* Wed Apr 21 2010 Enrico Scholz - 0.96-1402 -- updated to final 0.96 - applied upstream patch which allows to disable JIT compiler (#573191) -- build JIT compiler again - disabled JIT compiler by default - removed explicit 'pkgconfig' requirements in -devel (#533956) - -* Sat Mar 20 2010 Enrico Scholz - 0.96-0.1401.rc1 -- do not build the bytecode JIT compiler for now until it can be disabled - at runtime (#573191) - -* Thu Mar 11 2010 Enrico Scholz - 0.96-1400.rc1 -- updated to 0.96rc1 - added some BRs - -* Sun Dec 6 2009 Enrico Scholz - 0.95.3-1301 -- updated -upstart to upstart 0.6.3 +- rediffed patches * Sat Nov 21 2009 Enrico Scholz - adjusted chkconfig positions for clamav-milter (#530101) -- use %%apply instead of %%patch -* Thu Oct 29 2009 Enrico Scholz - 0.95.3-1300 +* Thu Oct 29 2009 Enrico Scholz - 0.95.3-1200 - updated to 0.95.3 * Sun Sep 13 2009 Enrico Scholz diff --git a/clamd.scan.upstart b/clamd.scan.upstart index cb20b29..b6280f5 100644 --- a/clamd.scan.upstart +++ b/clamd.scan.upstart @@ -1,14 +1,14 @@ -### !!! Uncomment only *one* of the 'start on' statements !!! - -### Uncomment this line when you want clamd.scan to be a scanner for a -### locally running clamav-milter +### Uncomment these lines when you want clamd.scan to be a scanner +### for a locally running clamav-milter #start on starting clamav-milter -### Uncomment this line when you want clamd.scan to be a generic +### Uncomment these lines when you want clamd.scan to be a generic ### scanner service -#start on runlevel [345] and starting local +#start on starting local -stop on runlevel [!345] +stop on runlevel 0 +stop on runlevel 1 +stop on runlevel 6 respawn exec /usr/sbin/clamd -c /etc/clamd.d/scan.conf --nofork=yes diff --git a/lastver b/lastver index 10b1865..483b771 100644 --- a/lastver +++ b/lastver @@ -1 +1 @@ -0.96 +0.96.1 diff --git a/verinfo b/verinfo index 460dd77..814d953 100644 --- a/verinfo +++ b/verinfo @@ -1,2 +1,2 @@ http://sourceforge.net/project/showfiles.php?group_id=86638&package_id=90197 -href="/projects/clamav/files/clamav/([0-9.-]*?)" +clamav-([0-9.-]*?)\.tar\. From 8358acc7c2ba8cb73d4474f4215f58178d259514 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Wed, 11 Aug 2010 10:02:01 +0200 Subject: [PATCH 9/9] readded makefile --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ec42490 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +MAKEFILE_COMMON = $(HOME)/.fedora/common.mk +-include $(MAKEFILE_COMMON) + +# can not use final tarball name here as it will conflict with rules +# within Makefile.common +TARBALL_CLEAN = ${NAME}-${VERSION}-norar.tar.xz.tmp +TARBALL = ${NAME}-${VERSION}.tar.gz + +clean-sources: ${TARBALL_CLEAN} + +${TARBALL_CLEAN}: ${TARBALL} + rm -f $@.tmp + zcat $< | tar --delete -f - '*/libclamunrar/*' | xz -c > $@.tmp + mv $@.tmp $@