aboutsummaryrefslogtreecommitdiff
path: root/www/c-icap/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/c-icap/files')
-rw-r--r--www/c-icap/files/patch-Makefile.in78
-rw-r--r--www/c-icap/files/patch-c-icap.conf.in (renamed from www/c-icap/files/patch-c-icap.conf.default.in)4
-rw-r--r--www/c-icap/files/patch-configure45
-rw-r--r--www/c-icap/files/patch-configure.in35
-rw-r--r--www/c-icap/files/patch-filetype.c75
-rw-r--r--www/c-icap/files/patch-request_common.c11
-rw-r--r--www/c-icap/files/patch-services_clamav_srv_clamav.c35
-rw-r--r--www/c-icap/files/pkg-install.in6
8 files changed, 58 insertions, 231 deletions
diff --git a/www/c-icap/files/patch-Makefile.in b/www/c-icap/files/patch-Makefile.in
index c994a0dae8d6..620a51f63bce 100644
--- a/www/c-icap/files/patch-Makefile.in
+++ b/www/c-icap/files/patch-Makefile.in
@@ -1,67 +1,17 @@
---- Makefile.in.bak Sat Jun 10 17:27:22 2006
-+++ Makefile.in Sat Jun 10 17:31:14 2006
-@@ -44,7 +44,7 @@
- icap-stretch$(EXEEXT)
- DIST_COMMON = README $(am__configure_deps) $(pkginclude_HEADERS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-- $(srcdir)/c-icap.conf.in $(srcdir)/config.h.in \
-+ $(srcdir)/c-icap.conf.default.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- TODO compile config.guess config.sub depcomp install-sh \
- ltmain.sh missing
-@@ -57,7 +57,7 @@
- configure.lineno configure.status.lineno
- mkinstalldirs = $(mkdir_p)
- CONFIG_HEADER = config.h
--CONFIG_CLEAN_FILES = c-icap.conf
-+CONFIG_CLEAN_FILES = c-icap.conf.default
- am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(pkgincludedir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
-@@ -321,8 +321,8 @@
-
- ALL_INCS = $(INCS:%.h=include/%.h)
- pkginclude_HEADERS = $(ALL_INCS)
--sysconf_DATA = c-icap.conf c-icap.magic
--EXTRA_DIST = RECONF INSTALL.txt config-w32.h makefile.w32 c-icap.conf c_icap_dll.mak c-icap.conf.in c-icap.magic c_icap.mak c_icap.def \
-+sysconf_DATA = c-icap.conf.default c-icap.magic.default
-+EXTRA_DIST = RECONF INSTALL.txt config-w32.h makefile.w32 c-icap.conf.default c_icap_dll.mak c-icap.conf.default.in c-icap.magic.default c_icap.mak c_icap.def \
- contrib/get_file.pl contrib/convert_old_magic.pl \
- winnt_server.c os/win32/dll_entry.c os/win32/makefile.w32 os/win32/net_io.c os/win32/proc_mutex.c\
- os/win32/shared_mem.c os/win32/threads.c os/win32/utilfunc.c
-@@ -382,7 +382,7 @@
-
- distclean-hdr:
- -rm -f config.h stamp-h1
--c-icap.conf: $(top_builddir)/config.status $(srcdir)/c-icap.conf.in
-+c-icap.conf.default: $(top_builddir)/config.status $(srcdir)/c-icap.conf.default.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
- install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
-@@ -1518,7 +1518,7 @@
-
- info-am:
-
--install-data-am: install-data-local install-pkgincludeHEADERS
-+install-data-am: install-pkgincludeHEADERS
-
- install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \
- install-sysconfDATA
-@@ -1564,7 +1564,7 @@
- distclean-recursive distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
-- install-data-am install-data-local install-exec \
-+ install-data-am install-exec \
- install-exec-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-pkgincludeHEADERS \
- install-strip install-sysconfDATA installcheck installcheck-am \
-@@ -1578,8 +1578,6 @@
- uninstall-sysconfDATA
-
-
--install-data-local:
-- $(mkinstalldirs) $(LOGDIR); chgrp nobody $(LOGDIR);chmod 775 $(LOGDIR)
+--- Makefile.in.bak 2008-07-07 00:31:50.000000000 +0400
++++ Makefile.in 2009-01-15 23:15:56.000000000 +0300
+@@ -1302,14 +1302,6 @@
+ $(mkinstalldirs) $(DESTDIR)$(CONFIGDIR);
+ $(INSTALL) c-icap.conf $(DESTDIR)$(CONFIGDIR)/c-icap.conf.default
+ $(INSTALL) c-icap.magic $(DESTDIR)$(CONFIGDIR)/c-icap.magic.default
+- if test ! -f $(DESTDIR)$(CONFIGDIR)/c-icap.conf; then $(INSTALL) c-icap.conf $(DESTDIR)$(CONFIGDIR)/c-icap.conf; fi
+- if test ! -f $(DESTDIR)$(CONFIGDIR)/c-icap.magic; then $(INSTALL) c-icap.magic $(DESTDIR)$(CONFIGDIR)/c-icap.magic; fi
+- $(mkinstalldirs) $(DESTDIR)$(LOGDIR);
+- $(mkinstalldirs) $(DESTDIR)$(SOCKDIR);
+- chgrp nobody $(DESTDIR)$(LOGDIR)
+- chmod 775 $(DESTDIR)$(LOGDIR)
+- chgrp nobody $(DESTDIR)$(SOCKDIR)
+- chmod 775 $(DESTDIR)$(SOCKDIR)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/www/c-icap/files/patch-c-icap.conf.default.in b/www/c-icap/files/patch-c-icap.conf.in
index bcebdabcde8f..b8b137345d2b 100644
--- a/www/c-icap/files/patch-c-icap.conf.default.in
+++ b/www/c-icap/files/patch-c-icap.conf.in
@@ -1,5 +1,5 @@
---- c-icap.conf.default.in.bak Wed Mar 29 08:24:29 2006
-+++ c-icap.conf.default.in Wed Mar 29 08:25:58 2006
+--- c-icap.conf.in.bak Wed Mar 29 08:24:29 2006
++++ c-icap.conf.in Wed Mar 29 08:25:58 2006
@@ -28,8 +28,8 @@
TmpDir /var/tmp
MaxMemObject 131072
diff --git a/www/c-icap/files/patch-configure b/www/c-icap/files/patch-configure
index 00011dfbe530..3232def2b30a 100644
--- a/www/c-icap/files/patch-configure
+++ b/www/c-icap/files/patch-configure
@@ -1,41 +1,32 @@
---- configure.bak Mon Jun 12 22:20:15 2006
-+++ configure Thu Jun 15 15:34:49 2006
-@@ -19441,7 +19441,7 @@
+--- configure.orig Mon Jul 7 00:22:15 2008
++++ configure Tue Nov 18 21:51:12 2008
+@@ -20258,7 +20258,7 @@
THREADS_LDADD="-lpthread"
THREADS_LDFLAGS=""
;;
-- freebsd5.*)
-+ freebsd4.*)
+- freebsd5*)
++ freebsd[45]*)
## If I understand how all those threading models works correctly
## in FreeBSD I will make an option in configure script
## --with-freebsd-threads={c_r,pthreads,linuxthreads,thr}
-@@ -19454,9 +19454,9 @@
- # THREADS_LDADD="-llthread -lgcc_r"
- # THREADS_LDFLAGS="-L/usr/local/lib"
+@@ -20273,7 +20273,7 @@
--## FreeBSD Standard threads
-+## FreeBSD 4.x Standard threads
+ ## FreeBSD Standard threads
CFLAGS="-pthread -D_THREAD_SAFE $CFLAGS"
- THREADS_LDADD="-XCClinker -lc_r"
+ THREADS_LDADD="-lc_r"
THREADS_LDFLAGS=""
+ ## FreeBSD has pthreads rwlocks from version 3 (I think)
+ # AC_DEFINE(HAVE_PTHREADS_RWLOCK,1,[Define HAVE_PTHREADS_RWLOCK if pthreads library supports rwlocks])
+@@ -20284,9 +20284,9 @@
- ## 1:1 threads
-@@ -21574,7 +21574,7 @@
- fi
+ ;;
+- freebsd6*)
++ freebsd*)
+ CFLAGS="-D_THREAD_SAFE $CFLAGS"
+- THREADS_LDADD="-XCClinker -lthr"
++ THREADS_LDADD="-lthr"
+ THREADS_LDFLAGS=""
+ ;;
-- ac_config_files="$ac_config_files Makefile c-icap.conf services/Makefile services/echo/Makefile services/url_check/Makefile services/clamav/Makefile modules/Makefile"
-+ ac_config_files="$ac_config_files Makefile c-icap.conf.default services/Makefile services/echo/Makefile services/url_check/Makefile services/clamav/Makefile modules/Makefile"
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
-@@ -22160,7 +22160,7 @@
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-- "c-icap.conf" ) CONFIG_FILES="$CONFIG_FILES c-icap.conf" ;;
-+ "c-icap.conf.default" ) CONFIG_FILES="$CONFIG_FILES c-icap.conf.default" ;;
- "services/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/Makefile" ;;
- "services/echo/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/echo/Makefile" ;;
- "services/url_check/Makefile" ) CONFIG_FILES="$CONFIG_FILES services/url_check/Makefile" ;;
diff --git a/www/c-icap/files/patch-configure.in b/www/c-icap/files/patch-configure.in
index becc67343baa..3f25906179f2 100644
--- a/www/c-icap/files/patch-configure.in
+++ b/www/c-icap/files/patch-configure.in
@@ -1,29 +1,32 @@
---- configure.in.bak Mon Jun 12 22:19:56 2006
-+++ configure.in Thu Jun 15 15:35:07 2006
-@@ -51,7 +51,7 @@
+--- configure.in.orig Mon Jul 7 00:21:51 2008
++++ configure.in Tue Nov 18 21:50:26 2008
+@@ -52,7 +52,7 @@
THREADS_LDADD="-lpthread"
THREADS_LDFLAGS=""
;;
-- freebsd5.*)
-+ freebsd4.*)
+- freebsd5*)
++ freebsd[[45]]*)
## If I understand how all those threading models works correctly
## in FreeBSD I will make an option in configure script
## --with-freebsd-threads={c_r,pthreads,linuxthreads,thr}
-@@ -64,9 +64,9 @@
- # THREADS_LDADD="-llthread -lgcc_r"
- # THREADS_LDFLAGS="-L/usr/local/lib"
+@@ -67,7 +67,7 @@
--## FreeBSD Standard threads
-+## FreeBSD 4.x Standard threads
+ ## FreeBSD Standard threads
CFLAGS="-pthread -D_THREAD_SAFE $CFLAGS"
- THREADS_LDADD="-XCClinker -lc_r"
+ THREADS_LDADD="-lc_r"
THREADS_LDFLAGS=""
+ ## FreeBSD has pthreads rwlocks from version 3 (I think)
+ # AC_DEFINE(HAVE_PTHREADS_RWLOCK,1,[Define HAVE_PTHREADS_RWLOCK if pthreads library supports rwlocks])
+@@ -78,9 +78,9 @@
- ## 1:1 threads
-@@ -328,4 +328,4 @@
- AM_CONDITIONAL(USEPERL,[test a"$perlcore" != a])
- AM_CONDITIONAL(USECLAMAV,[test a"$clamav" != ano])
+ ;;
+
+- freebsd6*)
++ freebsd*)
+ CFLAGS="-D_THREAD_SAFE $CFLAGS"
+- THREADS_LDADD="-XCClinker -lthr"
++ THREADS_LDADD="-lthr"
+ THREADS_LDFLAGS=""
+ ;;
--AC_OUTPUT([Makefile c-icap.conf services/Makefile services/echo/Makefile services/url_check/Makefile services/clamav/Makefile modules/Makefile])
-+AC_OUTPUT([Makefile c-icap.conf.default services/Makefile services/echo/Makefile services/sguard/Makefile services/clamav/Makefile modules/Makefile])
diff --git a/www/c-icap/files/patch-filetype.c b/www/c-icap/files/patch-filetype.c
deleted file mode 100644
index 142b94409194..000000000000
--- a/www/c-icap/files/patch-filetype.c
+++ /dev/null
@@ -1,75 +0,0 @@
---- filetype.bak.c Sat May 13 22:51:32 2006
-+++ filetype.c Thu Aug 3 09:23:35 2006
-@@ -66,8 +66,9 @@
- }
-
- #define CHECK_SIZE(db,array,type,size) if(db->array##_num >= db->array##_size){\
-- if((newdata=realloc(db->array,db->array##_size+size*sizeof(type)))==NULL)\
-+ if((newdata=realloc(db->array,(db->array##_size+size)*sizeof(type)))==NULL)\
- return -1;\
-+ db->array##_size +=size; \
- db->array =newdata;\
- }
-
-@@ -80,7 +81,7 @@
- struct ci_data_type *newdata;
- int indx,i;
-
-- CHECK_SIZE(db,types,struct ci_data_type,50);
-+ CHECK_SIZE(db,types,struct ci_data_type,50)
-
- indx=db->types_num;
- db->types_num++;
-@@ -113,7 +114,7 @@
- int indx;
-
- CHECK_SIZE(db,magics,struct ci_magic,50)
--
-+
- indx=db->magics_num;
- db->magics_num++;
-
-@@ -308,6 +309,10 @@
- }
- groups[i]=-1;
- type=types_add(db,record.type,record.descr,groups);
-+ if(type<0){
-+ ret=-2;
-+ break;
-+ }
- }
-
- magics_add(db,record.offset,record.magic,record.len,type);
-@@ -459,10 +464,13 @@
- int endian=0;
- /*check for utf8 ........*/
- for(i=0;i<buflen;i+=ret){
-- if(!(ret=isUTF8(buf+i,buflen-i)))
-+ if((ret=isUTF8(buf+i,buflen-i)) <= 0)
- break;
- }
-
-+ if(ret < 0 && i == 0)
-+ ret=0;/*Not enough data to check*/
-+
- if(ret) /*Even if the last char is unknown ret!=0 mean is utf*/
- return CI_UTF_DATA; /*... but what about if buflen is about 2 or 3 bytes long ?*/
-
-@@ -500,7 +508,7 @@
-
- if((ret=check_magics(db,buf,buflen))>=0)
- return ret;
--
-+
- /*At the feature the check_ascii and check_unicode must be merged ....*/
- if((ret=check_ascii((unsigned char *)buf,buflen))>0)
- return ret;
-@@ -508,7 +516,7 @@
- if((ret=check_unicode((unsigned char *)buf,buflen))>0){
- return CI_UTF_DATA;
- }
--
-+
- return CI_BIN_DATA; /*binary data*/
- }
-
diff --git a/www/c-icap/files/patch-request_common.c b/www/c-icap/files/patch-request_common.c
deleted file mode 100644
index 7242ba5301b3..000000000000
--- a/www/c-icap/files/patch-request_common.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- request_common.c.orig Thu Jun 15 10:13:10 2006
-+++ request_common.c Thu Jun 15 10:13:16 2006
-@@ -654,7 +654,7 @@
-
-
- int client_parse_icap_header(request_t *req,ci_headers_list_t *h){
-- int readed=0,eoh=0;;
-+ int readed=0,eoh=0;
- char *buf,*end;
- if(req->pstrblock_read_len<4)/*we need 4 bytes for the end of headers "\r\n\r\n" string*/
- return CI_NEEDS_MORE;
diff --git a/www/c-icap/files/patch-services_clamav_srv_clamav.c b/www/c-icap/files/patch-services_clamav_srv_clamav.c
deleted file mode 100644
index fe918b65a600..000000000000
--- a/www/c-icap/files/patch-services_clamav_srv_clamav.c
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -ruN work/c_icap-030606rc1/services/clamav/srv_clamav.c work.patched/c_icap-030606rc1/services/clamav/srv_clamav.c
---- services/clamav/srv_clamav.c 2006-06-06 22:08:13.000000000 +0500
-+++ services/clamav/srv_clamav.c 2009-02-13 11:33:57.000000000 +0400
-@@ -137,17 +137,18 @@
-
-
- int srvclamav_init_service(service_module_t *this,struct icap_server_conf *server_conf){
-- int ret,no=0,i;
-+ int ret,i;
-+ unsigned int no = 0;
-+ unsigned int options = 0;
-+ options = options | CL_DB_STDOPT;
- magic_db=server_conf->MAGIC_DB;
- scantypes=(int *)malloc(ci_magic_types_num(magic_db)*sizeof(int));
- scangroups=(int *)malloc(ci_magic_groups_num(magic_db)*sizeof(int));
-
- for(i=0;i<ci_magic_types_num(magic_db);i++) scantypes[i]=0;
- for(i=0;i<ci_magic_groups_num(magic_db);i++) scangroups[i]=0;
--
--
- ci_debug_printf(10,"Going to initialize srvclamav\n");;
-- if((ret = cl_loaddbdir(cl_retdbdir(), &root, &no))) {
-+ if((ret = cl_load(cl_retdbdir(), &root, &no, options))) {
- ci_debug_printf(1,"cl_loaddbdir: %s\n", cl_perror(ret));
- return 0;
- }
-@@ -161,7 +162,7 @@
- limits.maxfiles = 0/*1000*/; /* max files */
- limits.maxfilesize = 100 * 1048576; /* maximal archived file size == 100 Mb */
- limits.maxreclevel = 5; /* maximal recursion level */
-- limits.maxratio = 200; /* maximal compression ratio */
-+ //limits.maxratio = 200; /* maximal compression ratio */
- limits.archivememlim = 0; /* disable memory limit for bzip2 scanner */
- return 1;
- }
diff --git a/www/c-icap/files/pkg-install.in b/www/c-icap/files/pkg-install.in
index cfae02ee8292..8e73d8deb510 100644
--- a/www/c-icap/files/pkg-install.in
+++ b/www/c-icap/files/pkg-install.in
@@ -34,7 +34,6 @@ if [ "$2" = "PRE-INSTALL" ]; then
elif [ "$2" = "POST-INSTALL" ]; then
if [ ! -d "$LOG_DIR" ]; then
mkdir -p "$LOG_DIR" || exit 1
- touch "$LOG_DIR/access.log" "$LOG_DIR/server.log" || exit 1
chown -R "$CICAP_USER:$CICAP_GROUP" "$LOG_DIR" || exit 1
fi
@@ -47,6 +46,11 @@ elif [ "$2" = "POST-INSTALL" ]; then
mkdir -p "$RUN_DIR" || exit 1
chown "$CICAP_USER:$CICAP_GROUP" "$RUN_DIR" || exit 1
fi
+
+ if [ ! -d "$RUN_DIR/c-icap" ]; then
+ mkdir -p "$RUN_DIR/c-icap" || exit 1
+ chown "$CICAP_USER:$CICAP_GROUP" "$RUN_DIR/c-icap" || exit 1
+ fi
fi
exit 0