diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2008-07-17 14:08:56 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2008-07-17 14:08:56 +0000 |
commit | fcf29213d34172cc76ec1ce5b45c6d4aeb0034fb (patch) | |
tree | f5d96ebfe696f35a27cf79bd10afabf46fb771b4 /www/webalizer | |
parent | f69109467c38e0ea7b30307a8b08e503fa7fc573 (diff) | |
download | ports-fcf29213d34172cc76ec1ce5b45c6d4aeb0034fb.tar.gz ports-fcf29213d34172cc76ec1ce5b45c6d4aeb0034fb.zip |
Notes
Diffstat (limited to 'www/webalizer')
23 files changed, 933 insertions, 443 deletions
diff --git a/www/webalizer/Makefile b/www/webalizer/Makefile index 906d342ef54a..d8a3a165969b 100644 --- a/www/webalizer/Makefile +++ b/www/webalizer/Makefile @@ -6,18 +6,15 @@ # PORTNAME= webalizer -PORTVERSION= 2.1.10 -PORTREVISION= 13 +PORTVERSION= 2.20.1 CATEGORIES+= www MASTER_SITES= ftp://ftp.mrunix.net/pub/webalizer/:main \ ftp://ftp.dinoex.de/pub/FreeBSD/distfiles/:main \ - http://sysd.org/stas/files/active/0/:geo \ http://flags.blogpotato.de/zip/:flags PKGNAMESUFFIX?= ${WEBALIZER_SUFFIX}${PKGNAMESUFFIX2} -DISTNAME= ${PORTNAME}-2.01-10-src -DISTFILES= ${DISTNAME}.tar.bz2:main +DISTNAME= ${PORTNAME}-2.20-01-src +DISTFILES= ${DISTNAME}.tgz:main webalizer-geodb-20080701.tgz:main .if defined(WITH_GEOIP) || make(makesum) || defined(FETCH_ALL) -DISTFILES+= geolizer_2.01-10-patch.20070115.tar.gz:geo DISTFILES+= world.small.zip:flags special.small.zip:flags .endif @@ -40,40 +37,34 @@ GD_PORT?= graphics/gd CONFLICTS= geolizer-2* +.if defined(BATCH) +# no cosmetique spaces allowed +WEBALIZER_LANG?=english +.endif + +.include <bsd.port.pre.mk> .if defined(WITH_GEOIP) WEBALIZER_SUFFIX= -geoip CONFLICTS+= ${PKGNAMEPREFIX}webalizer-2* -EXTRA_PATCHES+= ${WRKDIR}/geolizer_2.01-10-patch/geolizer.patch -EXTRA_PATCHES+= ${FILESDIR}/output.geo.patch -EXTRA_PATCHES+= ${FILESDIR}/linklist.geo.patch -PATCH_STRIP= -p1 CONFIGURE_ARGS+= --enable-geoip \ --with-geoip-lib=${LOCALBASE}/lib \ --with-geoip-inc=${LOCALBASE}/include PLIST_SUB+= WITH_GEOIP="" .else CONFLICTS+= ${PKGNAMEPREFIX}webalizer-geoip-2* -EXTRA_PATCHES+= ${FILESDIR}/output.patch -EXTRA_PATCHES+= ${FILESDIR}/linklist.patch PLIST_SUB+= WITH_GEOIP="@comment " .endif -.if defined(BATCH) -# no cosmetique spaces allowed -WEBALIZER_LANG?=english -.endif - -.include <bsd.port.pre.mk> - CONFIGURE_ARGS+= --enable-dns \ - --with-etcdir=${PREFIX}/etc \ + --with-geodb=${PREFIX}/share/webalizer \ + --sysconfdir=${PREFIX}/etc \ --with-gdlib=${LOCALBASE}/lib \ --with-gd=${LOCALBASE}/include CONFIGURE_ENV+= LDFLAGS="-L${PREFIX}/lib" -CFLAGS+= -DLINKLIST_MAX_STRING=256 -MAN1= ${PKGNAMEPREFIX}webalizer.1 +CFLAGS+= -DUSE_DB185 -Wall +MAN1= ${PKGNAMEPREFIX}webalizer.1 ${PKGNAMEPREFIX}wcmgr.1 DOC1= CHANGES Copyright INSTALL \ README README.FIRST DNS.README country-codes.txt DOC2= INSTALL GeoIP.README @@ -93,8 +84,6 @@ CONFIGURE_ARGS+= --with-language=${WEBALIZER_LANG} # see http://tyche.pu-toyama.ac.jp/~a-urasim/webalizer/ .if ${WEBALIZER_LANG} == japanese EXTRA_PATCHES+= ${FILESDIR}/ja-webalizer.conf-dist.patch -.else -EXTRA_PATCHES+= ${FILESDIR}/sample.conf.patch .endif .endif @@ -108,20 +97,20 @@ CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -liconv" CFLAGS+= -I${LOCALBASE}/include .endif -.if !defined(WITHOUT_WEBALIZER_FULLREFS) -EXTRA_PATCHES+= ${FILESDIR}/webalizer-fullrefs.patch +.if !defined(WITHOUT_WEBALIZER_FULL_CGI_REFS) +CFLAGS+= -DUSE_FULL_CGI_REFS .endif -.if defined(WITH_WEBALIZER_LOWERCASE_SEARCH) -CFLAGS+= -DWEBALIZER_LOWERCASE_SEARCH +.if defined(WITH_WEBALIZER_CLICKABLE_REFERER) +CFLAGS+= -DUSE_CLICKABLE_REFERER .endif do-extract: @${RM} -rf ${WRKDIR} @${MKDIR} ${WRKDIR} @for f in ${EXTRACT_ONLY}; do \ - case $$f in \ - *.Z|*.gz) \ + case $$f in \ + *.Z|*.gz|*.tgz) \ if ! (cd ${WRKDIR} && \ ${GZCAT} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$f ${EXTRACT_AFTER_ARGS});\ then \ @@ -160,11 +149,8 @@ pre-configure: ${REINPLACE_CMD} \ -e "s|webalizer.conf|${PKGNAMEPREFIX}webalizer.conf|" \ ${WRKSRC}/webalizer.c -.if defined(WITH_GEOIP) - ${REINPLACE_CMD} \ - -e 's|USE_GEOIP=""|USE_GEOIP="yes"|' \ + ${REINPLACE_CMD} -e "s|-ldb||" \ ${WRKSRC}/configure -.endif .if !defined(WEBALIZER_LANG) @${ECHO_MSG} "You can customize the language by typing" @${ECHO_MSG} " make WEBALIZER_LANG=<lang>" @@ -175,6 +161,8 @@ pre-configure: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/webalizer \ ${PREFIX}/bin/${PKGNAMEPREFIX}webalizer + ${INSTALL_PROGRAM} ${WRKSRC}/wcmgr \ + ${PREFIX}/bin/${PKGNAMEPREFIX}wcmgr ${LN} -sf ${PKGNAMEPREFIX}webalizer \ ${PREFIX}/bin/${PKGNAMEPREFIX}webazolver ${INSTALL_DATA} ${WRKSRC}/sample.conf \ @@ -182,24 +170,18 @@ do-install: post-install: .for i in ${MAN1} - ${INSTALL_MAN} ${WRKSRC}/webalizer.1 ${PREFIX}/man/man1/${i} + ${INSTALL_MAN} ${WRKSRC}/${i:S/^${PKGNAMEPREFIX}//} ${PREFIX}/man/man1/${i} .endfor .if defined(WITH_GEOIP) ${MKDIR} ${PREFIX}/share/geolizer @${INSTALL_DATA} ${WRKDIR}/*.png ${PREFIX}/share/geolizer/ + @${INSTALL_DATA} ${WRKDIR}/GeoDB.dat ${PREFIX}/share/geolizer/ .endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} .for i in ${DOC1} @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/${i} .endfor -.if defined(WITH_GEOIP) - ${MKDIR} ${DOCSDIR}/geolizer -.for i in ${DOC2} - @${INSTALL_DATA} ${WRKDIR}/geolizer_2.01-10-patch/${i} \ - ${DOCSDIR}/geolizer/${i} -.endfor -.endif .endif .if !defined(NOPORTEXAMPLES) ${MKDIR} ${EXAMPLESDIR} diff --git a/www/webalizer/distinfo b/www/webalizer/distinfo index 8ff9e435cac8..b32643956ff3 100644 --- a/www/webalizer/distinfo +++ b/www/webalizer/distinfo @@ -1,9 +1,9 @@ -MD5 (webalizer-2.01-10-src.tar.bz2) = 26d0a3c142423678daed2d6f579525d8 -SHA256 (webalizer-2.01-10-src.tar.bz2) = f339e4b8879aeade0f889b7bc7eb85854a7746a16b267c4aa985cd5b8a112262 -SIZE (webalizer-2.01-10-src.tar.bz2) = 252664 -MD5 (geolizer_2.01-10-patch.20070115.tar.gz) = 457c836d25c363e94cfa8fa11de52146 -SHA256 (geolizer_2.01-10-patch.20070115.tar.gz) = a619f863c9a65a06580080702e770251b8b4dc635e2ebf0fdb56a40b0f7eb1b3 -SIZE (geolizer_2.01-10-patch.20070115.tar.gz) = 76862 +MD5 (webalizer-2.20-01-src.tgz) = 9a5e39b4f0e229a279d58f93b2fac28b +SHA256 (webalizer-2.20-01-src.tgz) = a45be28b6702b5b12b182567fd8fed4bcb98a216ba797d5fc2ba92721046a4f4 +SIZE (webalizer-2.20-01-src.tgz) = 538171 +MD5 (webalizer-geodb-20080701.tgz) = 696496638eec2fda07d674efe1fb226d +SHA256 (webalizer-geodb-20080701.tgz) = 4d5308dae66b747592abb1ff677d6edc82dec3a5b5bc7cbd2e8b9e431da798c9 +SIZE (webalizer-geodb-20080701.tgz) = 288623 MD5 (world.small.zip) = a9025c5d866dc02e7b8cef6a23dc14da SHA256 (world.small.zip) = 4f777bf3d0493b9bcefe27fdb1f4a8d9b69ec89b894918c7b5603d7aa482c35c SIZE (world.small.zip) = 202814 diff --git a/www/webalizer/files/ja-webalizer.conf-dist.patch b/www/webalizer/files/ja-webalizer.conf-dist.patch index f9b861fb4b3e..c9d241df90e0 100644 --- a/www/webalizer/files/ja-webalizer.conf-dist.patch +++ b/www/webalizer/files/ja-webalizer.conf-dist.patch @@ -1,5 +1,5 @@ ---- sample.conf.orig 2000-09-29 12:51:42.000000000 +0900 -+++ sample.conf 2008-01-16 21:58:12.000000000 +0900 +--- sample.conf.orig 2008-07-01 22:09:31.000000000 +0200 ++++ sample.conf 2008-07-05 13:39:47.000000000 +0200 @@ -107,9 +107,12 @@ PageType htm* @@ -11,18 +11,19 @@ #PageType pl +#PageType rb - # UseHTTPS should be used if the analysis is being run on a - # secure server, and links to urls should use 'https://' instead -@@ -153,6 +156,8 @@ + # PagePrefix allows all requests with a specified prefix to be + # considered as 'pages'. If you want everything under /documents +@@ -242,7 +245,8 @@ # is 80 characters, so use multiple lines if needed. #HTMLHead <META NAME="author" CONTENT="The Webalizer"> -+HTMLHead <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-euc-jp"> +-#HTMLHead <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> +HTMLHead <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> ++HTMLHead <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-euc-jp"> # HTMLBody defined the HTML code to be inserted, starting with the # <BODY> tag. If not specified, the default is shown below. If -@@ -393,6 +398,9 @@ +@@ -545,6 +550,9 @@ HideURL *.png HideURL *.PNG HideURL *.ra @@ -32,7 +33,7 @@ # Hiding agents is kind of futile #HideAgent RealPlayer -@@ -412,6 +420,11 @@ +@@ -564,6 +572,11 @@ #GroupReferrer excite.com/ Excite #GroupReferrer infoseek.com/ InfoSeek #GroupReferrer webcrawler.com/ WebCrawler @@ -44,9 +45,9 @@ #GroupUser root Admin users #GroupUser admin Admin users -@@ -531,6 +544,21 @@ - SearchEngine alltheweb.com query= - SearchEngine northernlight.com qr= +@@ -702,6 +715,21 @@ + #SearchEngine alltheweb.com q= + #SearchEngine northernlight.com qr= +SearchEngine yahoo.co.jp p= +SearchEngine google.co.jp q= @@ -60,9 +61,9 @@ +SearchEngine excite.co.jp search= +SearchEngine livedoor.com q= +SearchEngine jp.aol.com query= -+#SearchEngine .google. q= -+#SearchEngine bulkfeeds.net q= ++#SearchEngine .google. q= ++#SearchEngine bulkfeeds.net q= + - # The Dump* keywords allow the dumping of Sites, URL's, Referrers - # User Agents, Usernames and Search strings to seperate tab delimited - # text files, suitable for import into most database or spreadsheet + # Normally, search strings are converted to lower case in order to + # increase accuracy. The SearchCaseI option allows them to maintain + # case sensitivity, useful for some sites. The value can be 'yes' diff --git a/www/webalizer/files/linklist.geo.patch b/www/webalizer/files/linklist.geo.patch deleted file mode 100644 index 16d5a66e2a1d..000000000000 --- a/www/webalizer/files/linklist.geo.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- linklist.c.orig Sun Sep 4 07:40:09 2005 -+++ linklist.c Sun Sep 4 07:42:19 2005 -@@ -190,12 +190,12 @@ - int add_glist(char *str, GLISTPTR *list) - { - GLISTPTR newptr,cptr,pptr; -- char temp_buf[256]; -+ char temp_buf[LINKLIST_MAX_STRING]; - char *name=temp_buf; - - /* make local copy of string */ -- strncpy(temp_buf,str,255); -- temp_buf[255]=0; -+ strncpy(temp_buf,str,LINKLIST_MAX_STRING - 1); -+ temp_buf[LINKLIST_MAX_STRING - 1]=0; - - while (!isspace((int)*name)&&*name!=0) name++; - if (*name==0) name=temp_buf; diff --git a/www/webalizer/files/linklist.patch b/www/webalizer/files/linklist.patch deleted file mode 100644 index f901a290ff43..000000000000 --- a/www/webalizer/files/linklist.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- linklist.c.orig Sat Jun 23 11:12:40 2001 -+++ linklist.c Sat Jun 23 11:19:54 2001 -@@ -190,12 +190,12 @@ - int add_glist(char *str, GLISTPTR *list) - { - GLISTPTR newptr,cptr,pptr; -- char temp_buf[80]; -+ char temp_buf[LINKLIST_MAX_STRING]; - char *name=temp_buf; - - /* make local copy of string */ -- strncpy(temp_buf,str,79); -- temp_buf[79]=0; -+ strncpy(temp_buf,str,LINKLIST_MAX_STRING - 1); -+ temp_buf[LINKLIST_MAX_STRING - 1]=0; - - while (!isspace((unsigned char)*name)&&*name!=0) name++; - if (*name==0) name=temp_buf; diff --git a/www/webalizer/files/output.geo.patch b/www/webalizer/files/output.geo.patch deleted file mode 100644 index 6d2ba5edbaae..000000000000 --- a/www/webalizer/files/output.geo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- output.c.orig Sun Sep 4 07:40:09 2005 -+++ output.c Sun Sep 4 07:47:06 2005 -@@ -2037,7 +2044,7 @@ - while ( (*domain!='.')&&(domain!=hptr->string)) domain--; - if (domain==hptr->string) - country=NULL; -- else if (isdigit((int)*++domain)) -+ else if (isdigit((unsigned char)*++domain)) - { - #ifdef USE_GEOIP - if (use_geoip) diff --git a/www/webalizer/files/output.patch b/www/webalizer/files/output.patch deleted file mode 100644 index c964ada0a0bc..000000000000 --- a/www/webalizer/files/output.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- output.c.orig Fri Sep 29 07:51:42 2000 -+++ output.c Sat Oct 14 17:18:55 2000 -@@ -1932,7 +1939,7 @@ - { - domain = hptr->string+strlen(hptr->string)-1; - while ( (*domain!='.')&&(domain!=hptr->string)) domain--; -- if ((domain==hptr->string)||(isdigit((int)*++domain))) -+ if ((domain==hptr->string)||(isdigit((unsigned char)*++domain))) - { - ctry[0].count+=hptr->count; - ctry[0].files+=hptr->files; diff --git a/www/webalizer/files/patch-aa b/www/webalizer/files/patch-aa deleted file mode 100644 index 37e6eb36db24..000000000000 --- a/www/webalizer/files/patch-aa +++ /dev/null @@ -1,17 +0,0 @@ ---- linklist.c.bak Fri Sep 29 07:51:02 2000 -+++ linklist.c Sat Oct 14 17:22:16 2000 -@@ -197,12 +197,12 @@ - strncpy(temp_buf,str,79); - temp_buf[79]=0; - -- while (!isspace((int)*name)&&*name!=0) name++; -+ while (!isspace((unsigned char)*name)&&*name!=0) name++; - if (*name==0) name=temp_buf; - else - { - *name++=0; -- while (isspace((int)*name)&&*name!=0) name++; -+ while (isspace((unsigned char)*name)&&*name!=0) name++; - if (*name==0) name=temp_buf; - } - diff --git a/www/webalizer/files/patch-ab b/www/webalizer/files/patch-ab deleted file mode 100644 index f8f53e94cdc3..000000000000 --- a/www/webalizer/files/patch-ab +++ /dev/null @@ -1,65 +0,0 @@ ---- preserve.c.bak Fri Sep 29 07:51:32 2000 -+++ preserve.c Sat Oct 14 17:34:03 2000 -@@ -492,7 +492,7 @@ - tmp_buf[strlen(tmp_buf)-1]=0; - - if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 10; /* error exit */ -- if (!isdigit((int)buffer[0])) return 10; /* error exit */ -+ if (!isdigit((unsigned char)buffer[0])) return 10; /* error exit */ - - /* load temporary node data */ - sscanf(buffer,"%d %lu %lu %lf %lu %lu", -@@ -523,7 +523,7 @@ - tmp_buf[strlen(buffer)-1]=0; - - if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 8; /* error exit */ -- if (!isdigit((int)buffer[0])) return 8; /* error exit */ -+ if (!isdigit((unsigned char)buffer[0])) return 8; /* error exit */ - - /* load temporary node data */ - sscanf(buffer,"%d %lu %lu %lf %lu %lu", -@@ -563,7 +563,7 @@ - tmp_buf[strlen(buffer)-1]=0; - - if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 9; /* error exit */ -- if (!isdigit((int)buffer[0])) return 9; /* error exit */ -+ if (!isdigit((unsigned char)buffer[0])) return 9; /* error exit */ - - /* load temporary node data */ - sscanf(buffer,"%d %lu %lu %lf %lu %lu", -@@ -602,7 +602,7 @@ - tmp_buf[strlen(buffer)-1]=0; - - if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 11; /* error exit */ -- if (!isdigit((int)buffer[0])) return 11; /* error exit */ -+ if (!isdigit((unsigned char)buffer[0])) return 11; /* error exit */ - - /* load temporary node data */ - sscanf(buffer,"%d %lu",&t_rnode.flag,&t_rnode.count); -@@ -627,7 +627,7 @@ - tmp_buf[strlen(buffer)-1]=0; - - if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 12; /* error exit */ -- if (!isdigit((int)buffer[0])) return 12; /* error exit */ -+ if (!isdigit((unsigned char)buffer[0])) return 12; /* error exit */ - - /* load temporary node data */ - sscanf(buffer,"%d %lu",&t_anode.flag,&t_anode.count); -@@ -652,7 +652,7 @@ - tmp_buf[strlen(buffer)-1]=0; - - if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 13; /* error exit */ -- if (!isdigit((int)buffer[0])) return 13; /* error exit */ -+ if (!isdigit((unsigned char)buffer[0])) return 13; /* error exit */ - - /* load temporary node data */ - sscanf(buffer,"%lu",&t_snode.count); -@@ -677,7 +677,7 @@ - tmp_buf[strlen(buffer)-1]=0; - - if ((fgets(buffer,BUFSIZE,fp)) == NULL) return 14; /* error exit */ -- if (!isdigit((int)buffer[0])) return 14; /* error exit */ -+ if (!isdigit((unsigned char)buffer[0])) return 14; /* error exit */ - - /* load temporary node data */ - sscanf(buffer,"%d %lu %lu %lf %lu %lu", diff --git a/www/webalizer/files/patch-ac b/www/webalizer/files/patch-ac deleted file mode 100644 index b7c3ab64a7fd..000000000000 --- a/www/webalizer/files/patch-ac +++ /dev/null @@ -1,74 +0,0 @@ ---- webalizer.c.orig 2007-11-10 15:13:44.000000000 +0100 -+++ webalizer.c 2007-11-10 15:17:44.000000000 +0100 -@@ -231,7 +231,7 @@ - int main(int argc, char *argv[]) - { - int i; /* generic counter */ -- char *cp1, *cp2, *cp3, *str; /* generic char pointers */ -+ unsigned char *cp1, *cp2, *cp3, *str; /* generic char pointers */ - NLISTPTR lptr; /* generic list pointer */ - - extern char *optarg; /* used for command line */ -@@ -569,7 +569,7 @@ - - /* convert month name to lowercase */ - for (i=4;i<7;i++) -- log_rec.datetime[i]=tolower(log_rec.datetime[i]); -+ log_rec.datetime[i]=tolower((unsigned char)log_rec.datetime[i]); - - /* get year/month/day/hour/min/sec values */ - for (i=0;i<12;i++) -@@ -713,7 +713,7 @@ - { - if ((cp1=strstr(log_rec.url,lptr->string))!=NULL) - { -- if ((cp1==log_rec.url)||(*(cp1-1)=='/')) -+ if ((cp1==(unsigned char *)log_rec.url)||(*(cp1-1)=='/')) - { - *cp1='\0'; - if (log_rec.url[0]=='\0') -@@ -1471,19 +1471,19 @@ - while ( (fgets(buffer,BUFSIZE,fp)) != NULL) - { - /* skip comments and blank lines */ -- if ( (buffer[0]=='#') || isspace((int)buffer[0]) ) continue; -+ if ( (buffer[0]=='#') || isspace((unsigned char)buffer[0]) ) continue; - - /* Get keyword */ - cp1=buffer;cp2=keyword; -- while ( isalnum((int)*cp1) ) *cp2++ = *cp1++; -+ while ( isalnum((unsigned char)*cp1) ) *cp2++ = *cp1++; - *cp2='\0'; - - /* Get value */ - cp2=value; -- while ( (*cp1!='\n')&&(*cp1!='\0')&&(isspace((int)*cp1)) ) cp1++; -+ while ( (*cp1!='\n')&&(*cp1!='\0')&&(isspace((unsigned char)*cp1)) ) cp1++; - while ( (*cp1!='\n')&&(*cp1!='\0') ) *cp2++ = *cp1++; - *cp2--='\0'; -- while ( (isspace((int)*cp2)) && (cp2 != value) ) *cp2--='\0'; -+ while ( (isspace((unsigned char)*cp2)) && (cp2 != value) ) *cp2--='\0'; - - /* check if blank keyword/value */ - if ( (keyword[0]=='\0') || (value[0]=='\0') ) continue; -@@ -1826,7 +1826,11 @@ - if (*cp1=='+') *cp1=' '; /* change + to space */ - if (sp_flg && *cp1==' ') { cp1++; continue; } /* compress spaces */ - if (*cp1==' ') sp_flg=1; else sp_flg=0; /* (flag spaces here) */ -+#ifdef WEBALIZER_LOWERCASE_SEARCH - *cp2++=tolower(*cp1); /* normal character */ -+#else -+ *cp2++= *cp1; /* normal character */ -+#endif - cp1++; - } - } -@@ -1862,7 +1866,7 @@ - int i=group_domains+1; - - cp = str+strlen(str)-1; -- if (isdigit((int)*cp)) return NULL; /* ignore IP addresses */ -+ if (isdigit((unsigned char)*cp)) return NULL; /* ignore IP addresses */ - - while (cp!=str) - { diff --git a/www/webalizer/files/patch-ad b/www/webalizer/files/patch-ad deleted file mode 100644 index 8656c8b3df11..000000000000 --- a/www/webalizer/files/patch-ad +++ /dev/null @@ -1,24 +0,0 @@ ---- output.c.orig Fri Sep 29 07:51:42 2000 -+++ output.c Sat Oct 14 17:18:55 2000 -@@ -1450,10 +1450,17 @@ - rptr=*pointer++; - if (rptr->flag == OBJ_REG) - { -- fprintf(out_fp,"%-8lu %6.02f%% %s\n", -- rptr->count, -- (t_hit==0)?0:((float)rptr->count/t_hit)*100.0, -- rptr->string); -+ if (strstr(rptr->string,"://")!=NULL) -+ fprintf(out_fp,"%-8lu %6.02f%% <A HREF=\"%s\">%s</A>\n", -+ rptr->count, -+ (t_hit==0)?0:((float)rptr->count/t_hit)*100.0, -+ rptr->string, -+ rptr->string); -+ else -+ fprintf(out_fp,"%-8lu %6.02f%% %s\n", -+ rptr->count, -+ (t_hit==0)?0:((float)rptr->count/t_hit)*100.0, -+ rptr->string); - r_reg--; - } - } diff --git a/www/webalizer/files/patch-agent-bug b/www/webalizer/files/patch-agent-bug deleted file mode 100644 index 5a5354581a30..000000000000 --- a/www/webalizer/files/patch-agent-bug +++ /dev/null @@ -1,29 +0,0 @@ ---- webalizer.c.orig Sun Nov 20 09:52:31 2005 -+++ webalizer.c Sun Nov 20 09:54:10 2005 -@@ -805,7 +805,7 @@ - if (mangle_agent<2) - { - /* Level 1 - try to get OS */ -- cp1=strstr(str,")"); -+ cp1=strstr(cp1,")"); - if (cp1!=NULL) - { - *cp2++=' '; -@@ -840,7 +840,7 @@ - *cp2++=*cp1++; - if (mangle_agent<2) - { -- cp1=strstr(str,"("); -+ cp1=strstr(cp1,"("); - if (cp1!=NULL) - { - cp1++; -@@ -873,7 +873,7 @@ - if (mangle_agent<2) - { - /* Level 1 - Try to get OS */ -- cp1=strstr(str,"("); -+ cp1=strstr(cp1,"("); - if (cp1!=NULL) - { - cp1++; diff --git a/www/webalizer/files/patch-dns_resolv.c b/www/webalizer/files/patch-dns_resolv.c new file mode 100644 index 000000000000..a57a0d07757a --- /dev/null +++ b/www/webalizer/files/patch-dns_resolv.c @@ -0,0 +1,236 @@ +--- dns_resolv.c.orig 2008-07-01 07:49:26.000000000 +0200 ++++ dns_resolv.c 2008-07-05 08:45:35.000000000 +0200 +@@ -68,13 +68,21 @@ + #include "parser.h" /* log parser functions */ + #include "dns_resolv.h" /* our header */ + ++#ifndef DB_NOTFOUND ++#define DB_NOTFOUND 1 ++#endif ++ + /* local data */ + + DB *dns_db = NULL; /* DNS cache database */ + int dns_fd = 0; + + DB *geo_db = NULL; /* GeoDB database */ ++#ifdef USE_DB185 ++int geo_dbc = 0; /* GeoDB database cursor */ ++#else + DBC *geo_dbc = NULL; /* GeoDB database cursor */ ++#endif + + struct dns_child child[MAXCHILD]; /* DNS child pipe data */ + +@@ -122,7 +130,11 @@ + + if (debug_mode) fprintf(stderr,"Checking %s...", log_rec->hostname); + ++#ifdef USE_DB185 ++ if ( (i=dns_db->get(dns_db, &query, &response, 0)) == 0) ++#else + if ( (i=dns_db->get(dns_db, NULL, &query, &response, 0)) == 0) ++#endif + { + memcpy(&alignedRecord, response.data, sizeof(struct dnsRecord)); + strncpy (log_rec->hostname, +@@ -131,7 +143,7 @@ + log_rec->hostname[MAXHOST-1]=0; + if (debug_mode) + fprintf(stderr," found: %s (%ld)\n", +- log_rec->hostname, alignedRecord.timeStamp); ++ log_rec->hostname, (long)alignedRecord.timeStamp); + } + else /* not found or error occured during get */ + { +@@ -193,10 +205,14 @@ + } + + /* open cache file */ ++#ifdef USE_DB185 ++ if (!(dns_db = dbopen(dns_cache, O_RDWR|O_CREAT, 0664, DB_HASH, NULL))) ++#else + if ( (db_create(&dns_db, NULL, 0) != 0) || + (dns_db->open(dns_db, NULL, + dns_cache, NULL, DB_HASH, + DB_CREATE, 0644) != 0) ) ++#endif + { + /* Error: Unable to open DNS cache file <filename> */ + if (verbose) fprintf(stderr,"%s %s\n",msg_dns_nodb,dns_cache); +@@ -206,14 +222,22 @@ + } + + /* get file descriptor */ ++#ifdef USE_DB185 ++ dns_fd = dns_db->fd(dns_db); ++#else + dns_db->fd(dns_db, &dns_fd); ++#endif + + tmp_flock.l_type=F_WRLCK; /* set read/write lock type */ + if (fcntl(dns_fd,F_SETLK,&tmp_flock) < 0) /* and barf if we cant lock */ + { + /* Error: Unable to lock DNS cache file <filename> */ + if (verbose) fprintf(stderr,"%s %s\n",msg_dns_nolk,dns_cache); ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db, 0); ++#endif + dns_cache=NULL; + dns_db=NULL; + return 0; /* disable cache */ +@@ -261,7 +285,11 @@ + q.size = strlen(log_rec.hostname); + + /* Check if we have it in DB */ ++#ifdef USE_DB185 ++ if ( (i=(dns_db->get)(dns_db, &q, &r, 0)) == 0 ) ++#else + if ( (i=dns_db->get(dns_db, NULL, &q, &r, 0)) == 0 ) ++#endif + { + /* have a record for this address */ + memcpy(&alignedRecord, r.data, sizeof(struct dnsRecord)); +@@ -301,7 +329,11 @@ + if (verbose>1) printf("%s\n",msg_dns_none); + tmp_flock.l_type=F_UNLCK; + fcntl(dns_fd, F_SETLK, &tmp_flock); ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db, 0); ++#endif + return 0; + } + +@@ -334,7 +366,11 @@ + /* processing done, exit */ + tmp_flock.l_type=F_UNLCK; + fcntl(dns_fd, F_SETLK, &tmp_flock); ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db, 0); ++#endif + return 0; + + } +@@ -719,7 +755,11 @@ + v.size = recSize; + v.data = recPtr; + ++#ifdef USE_DB185 ++ if ( (dns_db->put)(dns_db, &k, &v, 0) < 0) ++#else + if ( dns_db->put(dns_db, NULL, &k, &v, 0) != 0 ) ++#endif + if (verbose>1) fprintf(stderr,"db_put fail!\n"); + free(recPtr); + } +@@ -767,10 +807,14 @@ + } + + /* open cache file */ ++#ifdef USE_DB185 ++ if (!(dns_db = dbopen(dns_cache, O_RDONLY, 0664, DB_HASH, NULL))) ++#else + if ( (db_create(&dns_db, NULL, 0) != 0) || + (dns_db->open(dns_db, NULL, + dns_cache, NULL, DB_HASH, + DB_RDONLY, 0644) != 0) ) ++#endif + { + /* Error: Unable to open DNS cache file <filename> */ + if (verbose) fprintf(stderr,"%s %s\n",msg_dns_nodb,dns_cache); +@@ -778,13 +822,21 @@ + } + + /* get file descriptor */ ++#ifdef USE_DB185 ++ dns_fd = dns_db->fd(dns_db); ++#else + dns_db->fd(dns_db, &dns_fd); ++#endif + + /* Get shared lock on cache file */ + if (fcntl(dns_fd, F_SETLK, &tmp_flock) < 0) + { + if (verbose) fprintf(stderr,"%s %s\n",msg_dns_nolk,dns_cache); ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db, 0); ++#endif + return 0; + } + return 1; +@@ -806,7 +858,11 @@ + + /* clear lock and close cache file */ + fcntl(dns_fd, F_SETLK, &tmp_flock); ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db, 0); ++#endif + return 1; + } + +@@ -824,6 +880,11 @@ + strncpy(buf,dbname,sizeof(buf)-1); + buf[sizeof(buf)-1]='\0'; + ++#ifdef USE_DB185 ++ dns_db = dbopen(buf, O_RDONLY, 0664, DB_HASH, NULL); ++ if (dns_db == NULL) ++ return NULL; ++#else + /* create database thingie */ + if ( db_create(&geo_db, NULL, 0) ) return NULL; + +@@ -836,6 +897,7 @@ + geo_db->close(geo_db,0); + return NULL; + } ++#endif + /* all is well in the world */ + return geo_db; + } +@@ -856,7 +918,11 @@ + k.data=&x; + k.size=sizeof(x); + ++#ifdef USE_DB185 ++ i=geo_db->get(geo_db, &k, &v, 0); ++#else + i=geo_db->get(geo_db, NULL, &k, &v, 0); ++#endif + + if (i) strncpy(str, "Unknown", 8); + else strncpy(str, v.data+3, v.size-3); +@@ -894,7 +960,11 @@ + k.data=&addr; + k.size=sizeof(addr); + ++#ifdef USE_DB185 ++ i=geo_db->get(geo_db, &k, &v, 0); ++#else + i=geo_dbc->c_get(geo_dbc, &k, &v, DB_SET_RANGE); ++#endif + if (!i) memcpy(buf, v.data, 2); + return buf; + } +@@ -905,7 +975,11 @@ + + void geodb_close(DB *db) + { ++#ifdef USE_DB185 ++ db->close(db); ++#else + db->close(db,0); ++#endif + } + + /*********************************************/ diff --git a/www/webalizer/files/patch-linklist b/www/webalizer/files/patch-linklist deleted file mode 100644 index 7e2ca025bae9..000000000000 --- a/www/webalizer/files/patch-linklist +++ /dev/null @@ -1,24 +0,0 @@ ---- linklist.h.orig Fri Sep 29 05:50:30 2000 -+++ linklist.h Sat Jun 23 11:15:57 2001 -@@ -1,12 +1,18 @@ - #ifndef _LINKLIST_H - #define _LINKLIST_H - --struct nlist { char string[80]; /* list struct for HIDE items */ -+#ifndef LINKLIST_MAX_STRING -+#define LINKLIST_MAX_STRING 80 -+#endif -+ -+struct nlist { /* list struct for HIDE items */ -+ char string[LINKLIST_MAX_STRING]; - struct nlist *next; }; - typedef struct nlist *NLISTPTR; - --struct glist { char string[80]; /* list struct for GROUP items */ -- char name[80]; -+struct glist { /* list struct for GROUP items */ -+ char string[LINKLIST_MAX_STRING]; -+ char name[LINKLIST_MAX_STRING]; - struct glist *next; }; - typedef struct glist *GLISTPTR; - diff --git a/www/webalizer/files/patch-lowercase-url-bug b/www/webalizer/files/patch-lowercase-url-bug deleted file mode 100644 index 29d7ac8710ef..000000000000 --- a/www/webalizer/files/patch-lowercase-url-bug +++ /dev/null @@ -1,32 +0,0 @@ ---- webalizer.c 2002-04-16 18:11:31.000000000 -0400 -+++ webalizer.c.new 2003-07-07 12:35:45.000000000 -0400 -@@ -688,6 +688,14 @@ - /* un-escape URL */ - unescape(log_rec.url); - -+ /* strip query portion of cgi scripts */ -+ cp1 = log_rec.url; -+ while (*cp1 != '\0') -+ if (!isurlchar(*cp1)) { *cp1 = '\0'; break; } -+ else cp1++; -+ if (log_rec.url[0]=='\0') -+ { log_rec.url[0]='/'; log_rec.url[1]='\0'; } -+ - /* check for service (ie: http://) and lowercase if found */ - if ( (cp2=strstr(log_rec.url,"://")) != NULL) - { -@@ -699,14 +707,6 @@ - } - } - -- /* strip query portion of cgi scripts */ -- cp1 = log_rec.url; -- while (*cp1 != '\0') -- if (!isurlchar(*cp1)) { *cp1 = '\0'; break; } -- else cp1++; -- if (log_rec.url[0]=='\0') -- { log_rec.url[0]='/'; log_rec.url[1]='\0'; } -- - /* strip off index.html (or any aliases) */ - lptr=index_alias; - while (lptr!=NULL) diff --git a/www/webalizer/files/patch-output.c b/www/webalizer/files/patch-output.c new file mode 100644 index 000000000000..67d38a128459 --- /dev/null +++ b/www/webalizer/files/patch-output.c @@ -0,0 +1,23 @@ +--- output.c.orig 2008-06-10 09:50:08.000000000 +0200 ++++ output.c 2008-06-20 18:43:04.000000000 +0200 +@@ -989,6 +989,20 @@ + hptr=*pointer++; + if (hptr->flag == OBJ_REG) + { ++#ifdef USE_CLICKABLE_REFERER ++ if (strstr(hptr->string,"://")!=NULL) ++ fprintf(out_fp, ++ "%-8llu %6.02f%% %8llu %6.02f%% %8.0f %6.02f%% " \ ++ "%8llu %6.02f%% <A HREF=\"%s\">%s</A>\n", ++ hptr->count, ++ (t_hit==0)?0:((float)hptr->count/t_hit)*100.0,hptr->files, ++ (t_file==0)?0:((float)hptr->files/t_file)*100.0,hptr->xfer/1024, ++ (t_xfer==0)?0:((float)hptr->xfer/t_xfer)*100.0,hptr->visit, ++ (t_visit==0)?0:((float)hptr->visit/t_visit)*100.0, ++ hptr->string, ++ hptr->string); ++ else ++#endif + fprintf(out_fp, + "%-8llu %6.02f%% %8llu %6.02f%% %8.0f %6.02f%% " \ + "%8llu %6.02f%% %s\n", diff --git a/www/webalizer/files/patch-unescape b/www/webalizer/files/patch-unescape deleted file mode 100644 index f14c9b37871f..000000000000 --- a/www/webalizer/files/patch-unescape +++ /dev/null @@ -1,11 +0,0 @@ ---- webalizer.c.a-urasim Wed Apr 17 07:11:31 2002 -+++ webalizer.c Tue Dec 23 23:26:23 2003 -@@ -1783,7 +1809,7 @@ - if (*cp1) *cp2=from_hex(*cp1++)*16; /* convert hex to an ascii */ - if (*cp1) *cp2+=from_hex(*cp1); /* (hopefully) character */ - if ((*cp2<32)||(*cp2==127)) *cp2='_'; /* make '_' if its bad */ -- if (*cp1) cp2++; cp1++; -+ if (*cp1){ cp2++; cp1++;} /* bug? */ - } - else *cp2++='%'; - } diff --git a/www/webalizer/files/patch-wcmgr.c b/www/webalizer/files/patch-wcmgr.c new file mode 100644 index 000000000000..1b3d4bdcb3c6 --- /dev/null +++ b/www/webalizer/files/patch-wcmgr.c @@ -0,0 +1,590 @@ +--- wcmgr.c.orig 2008-06-02 07:27:57.000000000 +0200 ++++ wcmgr.c 2008-07-05 08:49:42.000000000 +0200 +@@ -73,6 +73,10 @@ + #include <db.h> + #include "webalizer.h" + ++#ifndef DB_NOTFOUND ++#define DB_NOTFOUND 1 ++#endif ++ + /*********************************************/ + /* Forward reference local functions */ + /*********************************************/ +@@ -104,7 +108,11 @@ + int rec_ttl = 7; /* purge TTL in days */ + DB *dns_db = NULL; /* DNS cache database */ + DB *out_db = NULL; /* output cache db if needed */ ++#ifdef USE_DB185 ++int cursorp = 0; /* database cursor */ ++#else + DBC *cursorp = NULL; /* database cursor */ ++#endif + DBT q, r; /* query/reply structures */ + char *in_file = NULL; /* input cache filename */ + char out_file[MAXHOST+4]; /* output cache filename */ +@@ -131,18 +139,24 @@ + + void print_ver() + { ++#ifndef USE_DB185 + int v,r,l; ++#endif + struct utsname system_info; + uname(&system_info); + printf("%s V%s-%s\n%s\n",pname,version,editlvl,copyright); + if (verbose) + { ++#ifndef USE_DB185 + db_version(&v,&r,&l); ++#endif + printf("System : %s %s (%s)\n", + system_info.sysname, + system_info.release, + system_info.machine); ++#ifndef USE_DB185 + printf("DB Ver. : V%d.%d.%d\n",v,r,l); ++#endif + printf("Mod Date: %s\n",moddate); + } + printf("\n"); +@@ -168,7 +182,9 @@ + printf(" -l List cache file contents\n"); + printf(" -n name hostname (used for add)\n"); + printf(" -p num Purge after num days\n"); ++#ifndef USE_DB185 + printf(" -s Display cache file stats/info\n"); ++#endif + printf(" -t num TTL value (for add and stats)\n"); + printf(" -x name Export cache to tab file\n"); + printf("\n"); +@@ -233,7 +249,9 @@ + case 'h': print_help(); break; + case 'n': strncpy(name,optarg,sizeof(name)-1); break; + case 'p': action='p'; if (optarg!=NULL) rec_ttl=atoi(optarg); break; ++#ifndef USE_DB185 + case 's': action='s'; break; ++#endif + case 't': rec_ttl=atoi(optarg); break; + case 'v': verbose=1; break; + case 'V': print_ver(); break; +@@ -250,12 +268,14 @@ + if (argc - optind == 0) print_help(); /* gots to have a filename!! */ + in_file = argv[optind]; + ++#ifndef USE_DB185 + /* Try to create our DB handle */ + if ( db_create(&dns_db, NULL, 0) ) + { + fprintf(stderr,"Error: unable to create db handle!\n"); + exit(1); + } ++#endif + + /* force sane TTL value */ + if (rec_ttl > 99) rec_ttl=99; +@@ -269,7 +289,9 @@ + case 'd': del_rec(); break; + case 'f': find_rec(); break; + case 'i': import_cache(); break; ++#ifndef USE_DB185 + case 's': stat_cache(); break; ++#endif + case 'p': purge_cache(); break; + case 'x': export_cache(); break; + case 'l': +@@ -290,19 +312,31 @@ + u_int64_t t_num=0; + + /* open the database (read-only) */ ++#ifdef USE_DB185 ++ dns_db = dbopen(in_file, O_RDONLY, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if ((i=dns_db->open(dns_db, NULL, in_file, NULL, DB_HASH, DB_RDONLY, 0))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } + ++#ifndef USE_DB185 + /* Create a cursor */ + if ( dns_db->cursor(dns_db, NULL, &cursorp, 0) ) + { + fprintf(stderr,"Error: Unable to create cursor!\n"); + exit(1); + } ++#endif + + /* get our runtime for TTL calculations */ + time(&runtime); +@@ -321,7 +355,12 @@ + memset(&dns_rec, 0, sizeof(struct dnsRec)); + + /* Loop through database */ ++#ifdef USE_DB185 ++ cursorp = dns_db->seq(dns_db, &q, &r, R_FIRST); ++ while (!cursorp) ++#else + while (!cursorp->c_get(cursorp, &q, &r, DB_NEXT)) ++#endif + { + /* got a record */ + t_rec++; +@@ -338,6 +377,9 @@ + /* done, clear for next rec */ + memset(&q, 0, sizeof(DBT)); + memset(&r, 0, sizeof(DBT)); ++#ifdef USE_DB185 ++ cursorp = dns_db->seq(dns_db, &q, &r, R_NEXT); ++#endif + } + + if (verbose) +@@ -368,15 +410,29 @@ + rec_ttl, in_file); + + /* open the input database (read-write) */ ++#ifdef USE_DB185 ++ dns_db = dbopen(in_file, O_RDONLY, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if ((i=dns_db->open(dns_db, NULL, in_file, NULL, DB_HASH, 0, 0))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } + + /* get file descriptor */ ++#ifdef USE_DB185 ++ dns_fd = dns_db->fd(dns_db); ++#else + dns_db->fd(dns_db, &dns_fd); ++#endif + + /* Try to lock the file */ + our_flock.l_whence=SEEK_SET; +@@ -391,30 +447,44 @@ + exit(1); + } + ++#ifndef USE_DB185 + /* Create a cursor */ + if ( dns_db->cursor(dns_db, NULL, &cursorp, 0) ) + { + fprintf(stderr,"Error: Unable to create cursor!\n"); + exit(1); + } ++#endif + ++#ifndef USE_DB185 + /* Try to create our output DB handle */ + if ( db_create(&out_db, NULL, 0) ) + { + fprintf(stderr,"Error: unable to create output db handle!\n"); + exit(1); + } ++#endif + + /* generate output filename */ + memset(out_file, 0, sizeof(out_file)); + sprintf(out_file, "%s.new", in_file); + + /* open the output database (read-write) */ ++#ifdef USE_DB185 ++ out_db = dbopen(out_file, O_RDWR|O_CREAT, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!out_db) ++#else + if ((i=out_db->open(out_db, NULL, out_file, NULL, + DB_HASH, DB_CREATE|DB_EXCL, 0644))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",out_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",out_file,db_strerror(i)); ++#endif + exit(1); + } + +@@ -426,7 +496,12 @@ + memset(&r, 0, sizeof(DBT)); + + /* Loop through database */ ++#ifdef USE_DB185 ++ cursorp = dns_db->seq(dns_db, &q, &r, R_FIRST); ++ while (!cursorp) ++#else + while (!cursorp->c_get(cursorp, &q, &r, DB_NEXT)) ++#endif + { + /* got a record */ + t_in++; +@@ -439,9 +514,17 @@ + if ( age <= (rec_ttl*86400) ) + { + /* Good record.. insert into new cache file */ ++#ifdef USE_DB185 ++ if ( (out_db->put)(out_db, &q, &r, 0) < 0) ++#else + if ( (i=out_db->put(out_db, NULL, &q, &r, 0)) != 0 ) ++#endif + { ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: db_put fail: %s!\n",strerror(i)); ++#else + fprintf(stderr,"Error: db_put fail: %s!\n",db_strerror(i)); ++#endif + exit(1); + } + else t_out++; +@@ -462,13 +545,21 @@ + /* done, clear for next rec */ + memset(&q, 0, sizeof(DBT)); + memset(&r, 0, sizeof(DBT)); ++#ifdef USE_DB185 ++ cursorp = dns_db->seq(dns_db, &q, &r, R_NEXT); ++#endif + } + + /* Successful exit! */ + our_flock.l_type=F_UNLCK; + fcntl(dns_fd, F_SETLK, &our_flock); ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++ out_db->close(out_db); ++#else + dns_db->close(dns_db, 0); + out_db->close(out_db, 0); ++#endif + + /* rename files */ + if (rename(out_file, in_file)) +@@ -485,6 +576,7 @@ + /* STAT_CACHE - Display cache stats/info */ + /*********************************************/ + ++#ifndef USE_DB185 + void stat_cache() + { + /* Define some variables */ +@@ -576,6 +668,7 @@ + printf("Record Size Errors : %llu\n",t_err); + printf("\n"); + } ++#endif + + /*********************************************/ + /* FIND_REC - Find IP record in cache */ +@@ -587,10 +680,20 @@ + char ip_buf[48]; + + /* open the database (read-only) */ ++#ifdef USE_DB185 ++ dns_db = dbopen(in_file, O_RDONLY, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if ((i=dns_db->open(dns_db, NULL, in_file, NULL, DB_HASH, DB_RDONLY, 0))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } + +@@ -605,7 +708,11 @@ + /* search the cache */ + q.data = &addr; + q.size = strlen(addr); ++#ifdef USE_DB185 ++ if ( (i=(dns_db->get)(dns_db, &q, &r, 0)) == 0 ) ++#else + if ( (i=dns_db->get(dns_db, NULL, &q, &r, 0)) == 0) ++#endif + { + /* We found it! display info */ + memset(ip_buf, 0, sizeof(ip_buf)); +@@ -644,7 +751,11 @@ + if (i==DB_NOTFOUND) + printf("%s not found!\n",addr); + else ++#ifdef USE_DB185 ++ printf("Error: %s\n",strerror(i)); ++#else + printf("Error: %s\n",db_strerror(i)); ++#endif + } + } + +@@ -669,10 +780,20 @@ + cp=addr; while (*cp!='\0') *cp++=tolower(*cp); + + /* open the database (read-write) */ ++#ifdef USE_DB185 ++ dns_db = dbopen(in_file, O_RDWR, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if ((i=dns_db->open(dns_db, NULL, in_file, NULL, DB_HASH, 0, 0))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } + +@@ -686,7 +807,11 @@ + q.size = strlen(addr); + + /* Try to delete the record */ ++#ifdef USE_DB185 ++ if ( (i=dns_db->del(dns_db, &q, 0)) ) ++#else + if ( (i=dns_db->del(dns_db, NULL, &q, 0)) ) ++#endif + { + if (i==DB_NOTFOUND) + { +@@ -695,11 +820,19 @@ + } + else + { ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s\n",strerror(i)); ++#else + fprintf(stderr,"Error: %s\n",db_strerror(i)); ++#endif + exit(1); + } + } ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db, 0); ++#endif + if (verbose) + printf("%s sucessfully deleted from cache file\n",addr); + } +@@ -736,10 +869,20 @@ + } + + /* open the database (read-write) */ ++#ifdef USE_DB185 ++ dns_db = dbopen(in_file, O_RDWR, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if ((i=dns_db->open(dns_db, NULL, in_file, NULL, DB_HASH, 0, 0))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } + +@@ -754,7 +897,11 @@ + /* search the cache */ + q.data = &addr; + q.size = strlen(addr); ++#ifdef USE_DB185 ++ if ( (i=(dns_db->get)(dns_db, &q, &r, 0)) == 0 ) ++#else + if ( (i=dns_db->get(dns_db, NULL, &q, &r, 0)) == 0) ++#endif + { + fprintf(stderr,"Error: %s already exists in cache!\n",addr); + exit(1); +@@ -763,7 +910,11 @@ + { + if (i!=DB_NOTFOUND) + { ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s\n",strerror(i)); ++#else + fprintf(stderr,"Error: %s\n",db_strerror(i)); ++#endif + exit(1); + } + else +@@ -777,7 +928,11 @@ + + /* put it in the database */ + if (db_put(addr, name, (strcmp(name,addr))?0:1, runtime)==0) ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db,0); ++#endif + if (verbose) + printf("%s sucessfully added to cache file\n",addr); + } +@@ -793,14 +948,28 @@ + int i; + + /* create the database */ ++#ifdef USE_DB185 ++ dns_db = dbopen(in_file, O_RDWR|O_CREAT, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if ((i=dns_db->open(dns_db,NULL,in_file,NULL, + DB_HASH,DB_CREATE|DB_EXCL,0644))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db,0); ++#endif + if (verbose) printf("Cache file %s created successfully\n",in_file); + } + +@@ -817,11 +986,23 @@ + char buffer[4096]; + + /* open the database (read-write) */ ++#ifdef USE_DB185 ++ flag=O_RDWR; ++ if (create) flag|=O_CREAT; ++ dns_db = dbopen(in_file, flag, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if (create) flag=DB_CREATE|DB_EXCL; + if ((i=dns_db->open(dns_db, NULL, in_file, NULL, DB_HASH, flag, 0644))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } + +@@ -859,7 +1040,11 @@ + } + } + else fprintf(stderr,"Error: File not found: %s\n",out_file); ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db,0); ++#endif + + if (verbose) printf("%llu records imported into '%s' from file '%s'\n", + t_rec, in_file, out_file); +@@ -885,19 +1070,31 @@ + } + + /* open the database (read-only) */ ++#ifdef USE_DB185 ++ dns_db = dbopen(in_file, O_RDONLY, 0664, DB_HASH, NULL); ++ i = errno; ++ if (!dns_db) ++#else + if ((i=dns_db->open(dns_db, NULL, in_file, NULL, DB_HASH, DB_RDONLY, 0))) ++#endif + { + /* Error opening the cache file.. tell user and exit */ ++#ifdef USE_DB185 ++ fprintf(stderr,"Error: %s: %s\n",in_file,strerror(i)); ++#else + fprintf(stderr,"Error: %s: %s\n",in_file,db_strerror(i)); ++#endif + exit(1); + } + ++#ifndef USE_DB185 + /* Create a cursor */ + if ( dns_db->cursor(dns_db, NULL, &cursorp, 0) ) + { + fprintf(stderr,"Error: Unable to create cursor!\n"); + exit(1); + } ++#endif + + /* stat output file */ + if ( !(lstat(out_file, &out_stat)) ) +@@ -923,7 +1120,12 @@ + memset(&dns_rec, 0, sizeof(struct dnsRec)); + + /* Loop through database */ ++#ifdef USE_DB185 ++ cursorp = dns_db->seq(dns_db, &q, &r, R_FIRST); ++ while (!cursorp) ++#else + while (!cursorp->c_get(cursorp, &q, &r, DB_NEXT)) ++#endif + { + /* got a record */ + t_rec++; +@@ -941,8 +1143,15 @@ + /* done, clear for next rec */ + memset(&q, 0, sizeof(DBT)); + memset(&r, 0, sizeof(DBT)); +- } ++#ifdef USE_DB185 ++ cursorp = dns_db->seq(dns_db, &q, &r, R_NEXT); ++#endif ++ } ++#ifdef USE_DB185 ++ dns_db->close(dns_db); ++#else + dns_db->close(dns_db,0); ++#endif + fclose(out_fp); + + if (verbose) printf("%llu records exported from '%s' to file '%s'\n", +@@ -989,8 +1198,13 @@ + v.size = recSize; + v.data = recPtr; + ++#ifdef USE_DB185 ++ if ( (dns_db->put)(dns_db, &k, &v, 0) < 0) ++ fprintf(stderr,"Error: db_put fail: %s!\n",strerror(errno)); ++#else + if ( (i=dns_db->put(dns_db, NULL, &k, &v, 0)) != 0 ) + fprintf(stderr,"Error: db_put fail: %s!\n",db_strerror(i)); ++#endif + free(recPtr); + } + else return 1; diff --git a/www/webalizer/files/patch-webalizer.c b/www/webalizer/files/patch-webalizer.c new file mode 100644 index 000000000000..0fbebefd6642 --- /dev/null +++ b/www/webalizer/files/patch-webalizer.c @@ -0,0 +1,14 @@ +--- webalizer.c.orig 2008-07-02 00:23:43.000000000 +0200 ++++ webalizer.c 2008-07-05 09:00:42.000000000 +0200 +@@ -929,7 +930,11 @@ + { + /* Save query portion in log.rec.srchstr */ + strncpy(log_rec.srchstr,(char *)cp1,MAXSRCH); ++#ifdef USE_FULL_CGI_REFS ++ *cp1++; ++#else + *cp1++='\0'; ++#endif + break; + } + else cp1++; diff --git a/www/webalizer/files/sample.conf.patch b/www/webalizer/files/sample.conf.patch deleted file mode 100644 index ee52b3c9275c..000000000000 --- a/www/webalizer/files/sample.conf.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- sample.conf.orig 2000-09-29 05:51:42.000000000 +0200 -+++ sample.conf 2007-11-10 15:34:15.000000000 +0100 -@@ -153,6 +153,7 @@ - # is 80 characters, so use multiple lines if needed. - - #HTMLHead <META NAME="author" CONTENT="The Webalizer"> -+HTMLHead <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> - - # HTMLBody defined the HTML code to be inserted, starting with the - # <BODY> tag. If not specified, the default is shown below. If diff --git a/www/webalizer/files/webalizer-a-urasim_2.patch b/www/webalizer/files/webalizer-a-urasim_2.patch index 42d49acc14d0..791d4ea022dd 100644 --- a/www/webalizer/files/webalizer-a-urasim_2.patch +++ b/www/webalizer/files/webalizer-a-urasim_2.patch @@ -1,25 +1,25 @@ ---- webalizer.c.a-urasim Wed Apr 17 07:11:31 2002 -+++ webalizer.c Tue Dec 23 23:26:23 2003 -@@ -39,6 +39,7 @@ +--- webalizer.c.orig 2008-07-02 00:23:43.000000000 +0200 ++++ webalizer.c 2008-07-05 13:45:11.000000000 +0200 +@@ -36,6 +36,7 @@ #include <sys/utsname.h> - #include <sys/times.h> #include <zlib.h> + #include <sys/stat.h> +#include <iconv.h> /* ensure getopt */ #ifdef HAVE_GETOPT_H -@@ -224,6 +225,8 @@ - char *f_cp=f_buf+GZ_BUFSIZE; /* pointer into the buffer */ - int f_end; /* count to end of buffer */ +@@ -255,6 +256,8 @@ + char pie_color3[] = "#ff00ff"; /* pie additionnal color 3 */ + char pie_color4[] = "#ffc080"; /* pie additionnal color 4 */ +iconv_t cd_from_sjis, cd_from_utf8; + /*********************************************/ /* MAIN - start here */ /*********************************************/ -@@ -526,6 +529,9 @@ - - start_time = times(&mytms); +@@ -661,6 +664,9 @@ + /* get processing start time */ + start_time = time(NULL); + cd_from_sjis = iconv_open("EUC-JP", "Shift_JIS"); + cd_from_utf8 = iconv_open("EUC-JP", "UTF-8"); @@ -27,8 +27,8 @@ /*********************************************/ /* MAIN PROCESS LOOP - read through log file */ /*********************************************/ -@@ -1345,6 +1351,9 @@ - if (dns_db) close_cache(); +@@ -1477,6 +1483,9 @@ + if (geo_fp) GeoIP_delete(geo_fp); #endif + iconv_close(cd_from_sjis); @@ -37,7 +37,7 @@ /* Whew, all done! Exit with completion status (0) */ exit(0); } -@@ -1773,6 +1782,23 @@ +@@ -2079,6 +2088,23 @@ if (!str) return NULL; /* make sure strings valid */ @@ -61,8 +61,8 @@ while (*cp1) { if (*cp1=='%') /* Found an escape? */ -@@ -1793,6 +1819,116 @@ - return str; /* return the string */ +@@ -2111,6 +2137,116 @@ + if (*str1==0) return 0; else return 1; } +int score_eucj(unsigned char *str) @@ -178,7 +178,7 @@ /*********************************************/ /* SRCH_STRING - get search strings from ref */ /*********************************************/ -@@ -1804,6 +1940,10 @@ +@@ -2122,6 +2258,10 @@ char srch[80]=""; unsigned char *cp1, *cp2, *cps; int sp_flg=0; @@ -188,10 +188,10 @@ + unsigned char *cp3; /* Check if search engine referrer or return */ - if ( (cps=isinglist(search_list,log_rec.refer))==NULL) return; -@@ -1839,9 +1978,39 @@ - cp1=cp2+strlen(cp2)-1; - while (cp1!=cp2) if (isspace(*cp1)) *cp1--='\0'; else break; + if ( (cps=(unsigned char *)isinglist(search_list,log_rec.refer))==NULL) +@@ -2160,9 +2300,39 @@ + cp1=cp2+strlen((char *)cp2)-1; + while (cp1!=cp2) if (isspace((unsigned char)*cp1)) *cp1--='\0'; else break; + utf8=score_utf8(cp2); + sjis=score_sjis(cp2); @@ -228,5 +228,5 @@ + cp1++; + } - if (put_snode(cp2,(u_long)1,sr_htab)) + if (put_snode((char *)cp2,(u_int64_t)1,sr_htab)) { diff --git a/www/webalizer/files/webalizer-fullrefs.patch b/www/webalizer/files/webalizer-fullrefs.patch deleted file mode 100644 index fcefe4ce775e..000000000000 --- a/www/webalizer/files/webalizer-fullrefs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- webalizer.c.bak Wed May 2 12:48:56 2007 -+++ webalizer.c Wed May 2 12:49:35 2007 -@@ -821,7 +821,7 @@ - { - /* Save query portion in log.rec.srchstr */ - strncpy(log_rec.srchstr,cp1,MAXSRCH); -- *cp1++='\0'; -+ cp1++; - break; - } - else cp1++; diff --git a/www/webalizer/pkg-plist b/www/webalizer/pkg-plist index 193eefa276e8..35228a7d803a 100644 --- a/www/webalizer/pkg-plist +++ b/www/webalizer/pkg-plist @@ -1,7 +1,9 @@ bin/%%PKGNAMEPREFIX%%webalizer +bin/%%PKGNAMEPREFIX%%wcmgr @exec ln -f %B/%%PKGNAMEPREFIX%%webalizer %B/%%PKGNAMEPREFIX%%webazolver @unexec rm -f %B/%%PKGNAMEPREFIX%%webazolver etc/%%PKGNAMEPREFIX%%webalizer.conf-dist +%%WITH_GEOIP%%share/geolizer/GeoDB.dat %%WITH_GEOIP%%share/geolizer/ad.png %%WITH_GEOIP%%share/geolizer/ae.png %%WITH_GEOIP%%share/geolizer/af.png @@ -254,9 +256,6 @@ etc/%%PKGNAMEPREFIX%%webalizer.conf-dist %%WITH_GEOIP%%share/geolizer/zm.png %%WITH_GEOIP%%share/geolizer/zw.png %%WITH_GEOIP%%@dirrm share/geolizer -%%PORTDOCS%%%%WITH_GEOIP%%%%DOCSDIR%%/geolizer/GeoIP.README -%%PORTDOCS%%%%WITH_GEOIP%%%%DOCSDIR%%/geolizer/INSTALL -%%PORTDOCS%%%%WITH_GEOIP%%@dirrm %%DOCSDIR%%/geolizer %%PORTDOCS%%%%DOCSDIR%%/CHANGES %%PORTDOCS%%%%DOCSDIR%%/Copyright %%PORTDOCS%%%%DOCSDIR%%/DNS.README |