diff options
author | Alexander Leidinger <netchild@FreeBSD.org> | 2003-12-08 14:06:49 +0000 |
---|---|---|
committer | Alexander Leidinger <netchild@FreeBSD.org> | 2003-12-08 14:06:49 +0000 |
commit | 71b93e612e86c1b84511567fc9b56892829fa50c (patch) | |
tree | 244f795a9cb38ad68623b566a979d921224dbf90 /security/clamav/files | |
parent | first remove patches. raize IssueZilla as far as possible (diff) |
BEWARE: As rcoder(8) isn't present on FreeBSD 4 but clamd must be
be started before clamav-milter the startup-script for clamd
must alphabetically arranged before the startup-script for
clamav-milter. It was decided to use the clamd statup-scrtipt
from security/clamav-devel (clamav-clamd.sh), so users running
an older version of security/clamav have to change
'clamd_enable="YES"' to 'clamav_clamd_enable="YES"' in
/etc/rc.conf. On the other hand this changes makes it easier
to switch between security/clamav and security/clamav-devel.
- Respect PTHREAD_CFLAGS.
- Use USE_LIBTOOL_VER=14 as the libtool shipping with clamav 0.65
erroneously links against libc _and_ libc_r on FreeBSD 4.
- Don't link against libcipher on FreeBSD < 501100, clamav doesn't
depend on it. The linker warnings suggesting that it is required
were triggered by linking against both, libc and libc_r.
- Unconditionally depend on math/libgmp4. Otherwise, if libgmp4 is
already installed on a FreeBSD 4-STABLE system compilation of
security/clamav fails, as the headers of libgmp4 are used but the
base libgmp is used for linking.
- Fix generation of clamav-milter.8 when building with WITH_MILTER
(part of new files/patch-clamav-milter::Makefile.in).
- Don't USE_GETOPT_LONG when compiling with WITH_MILTER, clamav
uses its own getopt_long() regardless if a devel/libgnugetopt is
installed or the version in the base of FreeBSD 5 is present.
- Allow compilation of WITH_MILTER with mail/sendmail.
- Install a startup-script (taken from security/clamav-devel with some
fixes in comments) for clamav-milter when compiled with WITH_MILTER.
- In pkg-descr remove the note that clamav-milter doesn't build on
FreeBSD 4 with base gcc, it builds fine there. Mention that
clamav-milter can be optionally used (taken from pkg-descr of
security/clamav-devel).
- Fix compilation when an older version of security/clamav is installed.
If there's an older version of libclamav installed clamav 0.65 will
link against it instead of the newly built one. This is not a problem
if the installed version is compatible with the new one as libclamav
gets linked dynamically and the installed version will be replaced
with the new one. However, if the older version is incompatible
linking of clamav 0.65 fails. This problem was discovered by
Jan-Peter Koopmann Jan-Peter.Koopmann@seceidos.de and the fix
(most of the new patches in the files directory) confirmed working.
- In clamav-milter replace the path to the used sendmail executable with
the location of the mailwrapper(8) (/usr/sbin/sendmail). Obtained
from security/clamav-devel.
PR: 59948
Submitted by: Marius Strobl <marius@alchemy.franken.de>
Approved by: maintainer
Diffstat (limited to 'security/clamav/files')
-rw-r--r-- | security/clamav/files/clamav-clamd.sh (renamed from security/clamav/files/clamd.sh) | 18 | ||||
-rw-r--r-- | security/clamav/files/clamav-milter.sh | 48 | ||||
-rw-r--r-- | security/clamav/files/patch-clamav-milter::Makefile.in | 29 | ||||
-rw-r--r-- | security/clamav/files/patch-clamd::Makefile.in | 20 | ||||
-rw-r--r-- | security/clamav/files/patch-clamdscan::Makefile.in | 20 | ||||
-rw-r--r-- | security/clamav/files/patch-clamscan::Makefile.in | 20 | ||||
-rw-r--r-- | security/clamav/files/patch-freshclam::Makefile.in | 20 | ||||
-rw-r--r-- | security/clamav/files/patch-sigtool::Makefile.in | 20 | ||||
-rw-r--r-- | security/clamav/files/patch5-libclamav::zziplib::zzip-file.c | 26 | ||||
-rw-r--r-- | security/clamav/files/patch5-libclamav::zziplib::zzip-stat.c | 10 |
10 files changed, 186 insertions, 45 deletions
diff --git a/security/clamav/files/clamd.sh b/security/clamav/files/clamav-clamd.sh index 9a5fe99cb911..add634772cea 100644 --- a/security/clamav/files/clamd.sh +++ b/security/clamav/files/clamav-clamd.sh @@ -11,14 +11,14 @@ # # Add the following lines to /etc/rc.conf to enable clamd: # -#clamd_enable="YES" +#clamav_clamd_enable="YES" # # See clamd(8) for flags # . %%RC_SUBR%% -name=clamd +name=clamav_clamd rcvar=`set_rcvar` command=%%PREFIX%%/sbin/clamd @@ -30,10 +30,10 @@ start_precmd=start_precmd start_precmd() { - if [ -S "$clamd_socket" ]; then - warn "Stale socket $clamd_socket removed." - rm "$clamd_socket" - fi + if [ -S "$clamd_socket" ]; then + warn "Stale socket $clamd_socket removed." + rm "$clamd_socket" + fi } stop_postcmd=stop_postcmd @@ -45,9 +45,9 @@ stop_postcmd() # set defaults -clamd_enable=${clamd_enable:-"NO"} -clamd_flags=${clamd_flags:-""} -clamd_socket=${clamd_socket:-"%%CLAMD_SOCKET%%"} +clamav_clamd_enable=${clamav_clamd_enable:-"NO"} +clamav_clamd_flags=${clamav_clamd_flags:-""} +clamav_clamd_socket=${clamav_clamd_socket:-"%%CLAMAV_CLAMD_SOCKET%%"} load_rc_config $name run_rc_command "$1" diff --git a/security/clamav/files/clamav-milter.sh b/security/clamav/files/clamav-milter.sh new file mode 100644 index 000000000000..7c1028cb936c --- /dev/null +++ b/security/clamav/files/clamav-milter.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: clamav-milter +# REQUIRE: LOGIN +# BEFORE: mail +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable clamav-milter: +# +#clamav_milter="YES" +# +# See clamav-milter(1) for flags +# + +. %%RC_SUBR%% + +name=clamav_milter +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/clamav-milter +required_dirs=%%DATADIR%% +required_files=%%PREFIX%%/etc/clamav.conf + +start_precmd=start_precmd + +start_precmd() +{ + if [ -S "$clamav_milter_socket" ]; then + warn "Stale socket $clamav_milter_socket removed." + rm "$clamav_milter_socket" + fi +} + +# set defaults + +clamav_milter_enable=${clamav_milter_enable:-"NO"} +clamav_milter_socket=${clamav_milter_socket:-"%%CLAMAV_MILTER_SOCKET%%"} +clamav_milter_flags=${clamav_milter_flags:-"--postmaster-only --local --outgoing --max-children=50"} + +load_rc_config $name + +# add socket to any given argument +clamav_milter_flags="${clamav_milter_flags} ${clamav_milter_socket}" +run_rc_command "$1" diff --git a/security/clamav/files/patch-clamav-milter::Makefile.in b/security/clamav/files/patch-clamav-milter::Makefile.in new file mode 100644 index 000000000000..bcdc3f2c964c --- /dev/null +++ b/security/clamav/files/patch-clamav-milter::Makefile.in @@ -0,0 +1,29 @@ +--- clamav-milter/Makefile.in.orig Wed Nov 12 02:36:48 2003 ++++ clamav-milter/Makefile.in Fri Nov 21 18:23:35 2003 +@@ -122,7 +122,7 @@ + + @BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@clamav_milter_LDADD = ../clamd/cfgfile.o ../clamd/others.o ../clamscan/getopt.o + +-@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@man_MANS = ../docs/clamav-milter.8 ++@BUILD_CLAMD_TRUE@@HAVE_MILTER_TRUE@man_MANS = ../docs/man/clamav-milter.8 + + DEFS = @DEFS@ + # CLAMD_LIBS is used, because clamav-milter requires the same libraries as clamd +@@ -162,7 +162,7 @@ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++ $(LIBS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + CFLAGS = @CFLAGS@ + DIST_SOURCES = $(clamav_milter_SOURCES) + +@@ -209,7 +209,7 @@ + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) + clamav-milter$(EXEEXT): $(clamav_milter_OBJECTS) $(clamav_milter_DEPENDENCIES) + @rm -f clamav-milter$(EXEEXT) +- $(LINK) $(clamav_milter_LDFLAGS) $(clamav_milter_OBJECTS) $(clamav_milter_LDADD) $(LIBS) ++ $(LINK) $(clamav_milter_LDFLAGS) $(clamav_milter_OBJECTS) $(clamav_milter_LDADD) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core diff --git a/security/clamav/files/patch-clamd::Makefile.in b/security/clamav/files/patch-clamd::Makefile.in new file mode 100644 index 000000000000..4f98104fc06b --- /dev/null +++ b/security/clamav/files/patch-clamd::Makefile.in @@ -0,0 +1,20 @@ +--- clamd/Makefile.in.orig Fri Nov 21 17:07:49 2003 ++++ clamd/Makefile.in Fri Nov 21 17:10:33 2003 +@@ -181,7 +181,7 @@ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++ $(LIBS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + CFLAGS = @CFLAGS@ + DIST_SOURCES = $(clamd_SOURCES) + DIST_COMMON = Makefile.am Makefile.in +@@ -225,7 +225,7 @@ + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) + clamd$(EXEEXT): $(clamd_OBJECTS) $(clamd_DEPENDENCIES) + @rm -f clamd$(EXEEXT) +- $(LINK) $(clamd_LDFLAGS) $(clamd_OBJECTS) $(clamd_LDADD) $(LIBS) ++ $(LINK) $(clamd_LDFLAGS) $(clamd_OBJECTS) $(clamd_LDADD) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core diff --git a/security/clamav/files/patch-clamdscan::Makefile.in b/security/clamav/files/patch-clamdscan::Makefile.in new file mode 100644 index 000000000000..f612bdcfdd18 --- /dev/null +++ b/security/clamav/files/patch-clamdscan::Makefile.in @@ -0,0 +1,20 @@ +--- clamdscan/Makefile.in.orig Fri Nov 21 17:14:13 2003 ++++ clamdscan/Makefile.in Fri Nov 21 17:14:45 2003 +@@ -156,7 +156,7 @@ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++ $(LIBS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + CFLAGS = @CFLAGS@ + DIST_SOURCES = $(clamdscan_SOURCES) + DIST_COMMON = Makefile.am Makefile.in +@@ -200,7 +200,7 @@ + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + clamdscan$(EXEEXT): $(clamdscan_OBJECTS) $(clamdscan_DEPENDENCIES) + @rm -f clamdscan$(EXEEXT) +- $(LINK) $(clamdscan_LDFLAGS) $(clamdscan_OBJECTS) $(clamdscan_LDADD) $(LIBS) ++ $(LINK) $(clamdscan_LDFLAGS) $(clamdscan_OBJECTS) $(clamdscan_LDADD) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core diff --git a/security/clamav/files/patch-clamscan::Makefile.in b/security/clamav/files/patch-clamscan::Makefile.in new file mode 100644 index 000000000000..b9559bd919bb --- /dev/null +++ b/security/clamav/files/patch-clamscan::Makefile.in @@ -0,0 +1,20 @@ +--- clamscan/Makefile.in.orig Fri Nov 21 17:03:08 2003 ++++ clamscan/Makefile.in Fri Nov 21 17:04:35 2003 +@@ -163,7 +163,7 @@ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++ $(LIBS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + CFLAGS = @CFLAGS@ + DIST_SOURCES = $(clamscan_SOURCES) + DIST_COMMON = Makefile.am Makefile.in +@@ -207,7 +207,7 @@ + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + clamscan$(EXEEXT): $(clamscan_OBJECTS) $(clamscan_DEPENDENCIES) + @rm -f clamscan$(EXEEXT) +- $(LINK) $(clamscan_LDFLAGS) $(clamscan_OBJECTS) $(clamscan_LDADD) $(LIBS) ++ $(LINK) $(clamscan_LDFLAGS) $(clamscan_OBJECTS) $(clamscan_LDADD) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core diff --git a/security/clamav/files/patch-freshclam::Makefile.in b/security/clamav/files/patch-freshclam::Makefile.in new file mode 100644 index 000000000000..cca90c882479 --- /dev/null +++ b/security/clamav/files/patch-freshclam::Makefile.in @@ -0,0 +1,20 @@ +--- freshclam/Makefile.in.orig Fri Nov 21 17:15:56 2003 ++++ freshclam/Makefile.in Fri Nov 21 17:16:27 2003 +@@ -161,7 +161,7 @@ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++ $(LIBS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + CFLAGS = @CFLAGS@ + DIST_SOURCES = $(freshclam_SOURCES) + DIST_COMMON = Makefile.am Makefile.in +@@ -205,7 +205,7 @@ + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + freshclam$(EXEEXT): $(freshclam_OBJECTS) $(freshclam_DEPENDENCIES) + @rm -f freshclam$(EXEEXT) +- $(LINK) $(freshclam_LDFLAGS) $(freshclam_OBJECTS) $(freshclam_LDADD) $(LIBS) ++ $(LINK) $(freshclam_LDFLAGS) $(freshclam_OBJECTS) $(freshclam_LDADD) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core diff --git a/security/clamav/files/patch-sigtool::Makefile.in b/security/clamav/files/patch-sigtool::Makefile.in new file mode 100644 index 000000000000..7b7209581986 --- /dev/null +++ b/security/clamav/files/patch-sigtool::Makefile.in @@ -0,0 +1,20 @@ +--- sigtool/Makefile.in.orig Fri Nov 21 17:12:10 2003 ++++ sigtool/Makefile.in Fri Nov 21 17:13:13 2003 +@@ -149,7 +149,7 @@ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +- $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++ $(LIBS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ + CFLAGS = @CFLAGS@ + DIST_SOURCES = $(sigtool_SOURCES) + DIST_COMMON = Makefile.am Makefile.in +@@ -193,7 +193,7 @@ + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + sigtool$(EXEEXT): $(sigtool_OBJECTS) $(sigtool_DEPENDENCIES) + @rm -f sigtool$(EXEEXT) +- $(LINK) $(sigtool_LDFLAGS) $(sigtool_OBJECTS) $(sigtool_LDADD) $(LIBS) ++ $(LINK) $(sigtool_LDFLAGS) $(sigtool_OBJECTS) $(sigtool_LDADD) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core diff --git a/security/clamav/files/patch5-libclamav::zziplib::zzip-file.c b/security/clamav/files/patch5-libclamav::zziplib::zzip-file.c deleted file mode 100644 index 234f1ce5af2c..000000000000 --- a/security/clamav/files/patch5-libclamav::zziplib::zzip-file.c +++ /dev/null @@ -1,26 +0,0 @@ ---- libclamav/zziplib/zzip-file.c.orig Wed Feb 5 04:32:11 2003 -+++ libclamav/zziplib/zzip-file.c Wed Feb 5 04:35:05 2003 -@@ -11,6 +11,7 @@ - * that can be found in COPYING.ZZIP - */ - -+#include <strings.h> - #include <string.h> - #include <sys/stat.h> - #include <errno.h> -@@ -94,7 +95,6 @@ - return 0; - } - -- - static int zzip_inflate_init(ZZIP_FILE *, struct zzip_dir_hdr *); - - /** -@@ -113,6 +113,7 @@ - struct zzip_dir_hdr * hdr = dir->hdr0; - int (*cmp)(zzip_char_t*, zzip_char_t*); - -+ (void)strcasecmp("",""); - cmp = (o_mode & ZZIP_CASEINSENSITIVE)? strcasecmp: strcmp; - - if (o_mode & ZZIP_IGNOREPATH) diff --git a/security/clamav/files/patch5-libclamav::zziplib::zzip-stat.c b/security/clamav/files/patch5-libclamav::zziplib::zzip-stat.c deleted file mode 100644 index 745fdb031292..000000000000 --- a/security/clamav/files/patch5-libclamav::zziplib::zzip-stat.c +++ /dev/null @@ -1,10 +0,0 @@ ---- libclamav/zziplib/zzip-stat.c.orig Wed Feb 5 04:36:09 2003 -+++ libclamav/zziplib/zzip-stat.c Wed Feb 5 04:36:32 2003 -@@ -32,6 +32,7 @@ - struct zzip_dir_hdr * hdr = dir->hdr0; - int (*cmp)(zzip_char_t*, zzip_char_t*); - -+ (void)strcasecmp("",""); - cmp = (flags & ZZIP_CASEINSENSITIVE) ? strcasecmp : strcmp; - - if (flags & ZZIP_IGNOREPATH) |