From owner-svn-ports-head@freebsd.org Sun Feb 19 12:37:59 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAC77CE5F17; Sun, 19 Feb 2017 12:37:59 +0000 (UTC) (envelope-from dinoex@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48A38E89; Sun, 19 Feb 2017 12:37:59 +0000 (UTC) (envelope-from dinoex@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1JCbw1h084319; Sun, 19 Feb 2017 12:37:58 GMT (envelope-from dinoex@FreeBSD.org) Received: (from dinoex@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JCbv4h084312; Sun, 19 Feb 2017 12:37:57 GMT (envelope-from dinoex@FreeBSD.org) Message-Id: <201702191237.v1JCbv4h084312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dinoex set sender to dinoex@FreeBSD.org using -f From: Dirk Meyer Date: Sun, 19 Feb 2017 12:37:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r434401 - in head/www/webalizer: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2017 12:37:59 -0000 Author: dinoex Date: Sun Feb 19 12:37:57 2017 New Revision: 434401 URL: https://svnweb.freebsd.org/changeset/ports/434401 Log: - new option IP_AS_HOSTNAME - make portlint happier - update to webalizer-geodb-20170201 PR: 217119 Modified: head/www/webalizer/Makefile head/www/webalizer/distinfo head/www/webalizer/files/patch-dns_resolv.c head/www/webalizer/files/patch-output.c head/www/webalizer/files/patch-wcmgr.c head/www/webalizer/files/patch-webalizer.c head/www/webalizer/pkg-plist Modified: head/www/webalizer/Makefile ============================================================================== --- head/www/webalizer/Makefile Sun Feb 19 10:57:49 2017 (r434400) +++ head/www/webalizer/Makefile Sun Feb 19 12:37:57 2017 (r434401) @@ -2,7 +2,7 @@ PORTNAME= webalizer PORTVERSION= 2.23.8 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES+= www MASTER_SITES= ftp://ftp.mrunix.net/pub/webalizer/:main \ ftp://ftp.mrunix.net/pub/webalizer/geodb/:geodb \ @@ -17,6 +17,8 @@ COMMENT= Web server log file analysis pr LICENSE= GPLv2 +LIB_DEPENDS+= libpng16.so:graphics/png + GNU_CONFIGURE= yes DOCSDIR?= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} EXAMPLESDIR?= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} @@ -30,64 +32,61 @@ WEBALIZER_LANG?=english .endif OPTIONS_DEFINE= GEOIP GEODB BDB1 BDB WEBALIZER_CONV \ - FULL_CGI_REFS CLICKABLE_REFERER LARGE_URL \ + FULL_CGI_REFS CLICKABLE_REFERER \ + IP_AS_HOSTNAME LARGE_URL \ DOCS EXAMPLES -OPTIONS_DEFAULT?= +OPTIONS_DEFAULT?= BDB1 NO_OPTIONS_SORT=yes +OPTIONS_SUB=yes GEODB_DESC=Enable Webalizers IP-Database support WEBALIZER_CONV_DESC=Japanese character code convert patch FULL_CGI_REFS_DESC=Show full cgi parameters in referers CLICKABLE_REFERER_DESC=Make referers clickable +IP_AS_HOSTNAME_DESC=Show IP as hostname when IP does not resolve LARGE_URL_DESC=Enable URLs longer 512 bytes +GEOIP_CONFIGURE_ON= --enable-geoip \ + --with-geoip-lib=${LOCALBASE}/lib \ + --with-geoip-inc=${LOCALBASE}/include +GEOIP_LIB_DEPENDS= libGeoIP.so:net/GeoIP +BDB1_PREVENTS= BDB +BDB1_CFLAGS= -DUSE_DB185 +BDB_PREVENTS= BDB1 +BDB_USES= bdb +BDB_LDFLAGS= -L${BDB_LIB_DIR} +BDB_CFLAGS= -I${BDB_INCLUDE_DIR} +WEBALIZER_CONV_USES= iconv +WEBALIZER_CONV_CONFIGURE_ON= --enable-mininls +WEBALIZER_CONV_CPPFLAGS= -I${LOCALBASE}/include +WEBALIZER_CONV_LIBS= -L${LOCALBASE}/lib ${ICONV_LIB} +FULL_CGI_REFS_CFLAGS= -DUSE_FULL_CGI_REFS +CLICKABLE_REFERER_CFLAGS= -DUSE_CLICKABLE_REFERER +IP_AS_HOSTNAME_CFLAGS= -DUSE_IP_AS_HOSTNAME + .include .if ${PORT_OPTIONS:MGEODB} || ${PORT_OPTIONS:MGEOIP} || make(makesum) || defined(FETCH_ALL) DISTFILES+= webalizer-flags.tgz:main .endif .if ${PORT_OPTIONS:MGEODB} || make(makesum) || defined(FETCH_ALL) -DISTFILES+= webalizer-geodb-20150901.tgz:geodb +DISTFILES+= webalizer-geodb-20170201.tgz:geodb .endif # slave ports override with languages specific gd -.if !defined(LIB_DEPENDS) +.if empty(LIB_DEPENDS:Mlibgd*) LIB_DEPENDS+= libgd.so:${GD_PORT} .endif .if ${PORT_OPTIONS:MGEOIP} -LIB_DEPENDS+= libGeoIP.so:net/GeoIP -.endif - -.if ${PORT_OPTIONS:MGEODB} -.if empty(PORT_OPTIONS:MBDB1) -USES+= bdb -.endif -PLIST_SUB+= WITH_GEODB="" -.else -PLIST_SUB+= WITH_GEODB="@comment " -.endif - -.if ${PORT_OPTIONS:MGEOIP} CONFLICTS+= ${PKGNAMEPREFIX}webalizer-2* -CONFIGURE_ARGS+= --enable-geoip \ - --with-geoip-lib=${LOCALBASE}/lib \ - --with-geoip-inc=${LOCALBASE}/include .else CONFLICTS+= ${PKGNAMEPREFIX}webalizer-geoip-2* .endif .if ${PORT_OPTIONS:MGEODB} || ${PORT_OPTIONS:MGEOIP} -PLIST_SUB+= WITH_GEOIP="" -.else -PLIST_SUB+= WITH_GEOIP="@comment " -.endif - -.if defined(WITH_BDB_VER) || ${PORT_OPTIONS:MBDB} -USES+= bdb -LDFLAGS+= -L${BDB_LIB_DIR} -CFLAGS+= -I${BDB_INCLUDE_DIR} +PLIST_SUB+= WITH_ICONS="" .else -CFLAGS+= -DUSE_DB185 +PLIST_SUB+= WITH_ICONS="@comment " .endif CONFIGURE_ARGS+= --enable-dns \ @@ -123,21 +122,9 @@ EXTRA_PATCHES+= ${FILESDIR}/ja-webalize .endif .if ${PORT_OPTIONS:MWEBALIZER_CONV} -USES+= iconv -# The patch file is written by URASHIMA Akira +# The patch file is written by URASHIMA Akira # see http://tyche.pu-toyama.ac.jp/~a-urasim/webalizer/ EXTRA_PATCHES+= ${FILESDIR}/webalizer-a-urasim_2.patch -CONFIGURE_ARGS+= --enable-mininls -CPPFLAGS+= -I${LOCALBASE}/include -LIBS+= -L${LOCALBASE}/lib ${ICONV_LIB} -.endif - -.if ${PORT_OPTIONS:MFULL_CGI_REFS} -CFLAGS+= -DUSE_FULL_CGI_REFS -.endif - -.if ${PORT_OPTIONS:MCLICKABLE_REFERER} -CFLAGS+= -DUSE_CLICKABLE_REFERER .endif pre-configure: @@ -151,7 +138,7 @@ pre-configure: -e "s|MAXURLH 512 |MAXURLH 2048|" \ ${WRKSRC}/webalizer.h .endif -.if defined(WITH_BDB_VER) || ${PORT_OPTIONS:MBDB} +.if ${PORT_OPTIONS:MBDB} ${REINPLACE_CMD} -e "s|-ldb|-l${BDB_LIB_NAME}|" \ ${WRKSRC}/configure .else @@ -185,13 +172,13 @@ do-install: .if ${PORT_OPTIONS:MGEODB} ${INSTALL_DATA} ${WRKDIR}/GeoDB.dat ${STAGEDIR}${PREFIX}/share/geolizer/ .endif -.if ${PORT_OPTIONS:MDOCS} + +do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOC1:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ -.endif -.if ${PORT_OPTIONS:MEXAMPLES} + +do-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${EXAMPLES1:S,^,${WRKSRC}/,} ${STAGEDIR}${EXAMPLESDIR}/ -.endif .include Modified: head/www/webalizer/distinfo ============================================================================== --- head/www/webalizer/distinfo Sun Feb 19 10:57:49 2017 (r434400) +++ head/www/webalizer/distinfo Sun Feb 19 12:37:57 2017 (r434401) @@ -1,6 +1,7 @@ +TIMESTAMP = 1487502029 SHA256 (webalizer-2.23-08-src.tgz) = edaddb5aa41cc4a081a1500e3fa96615d4b41bc12086bcedf9938018ce79ed8d SIZE (webalizer-2.23-08-src.tgz) = 537037 SHA256 (webalizer-flags.tgz) = df9961fec7da2c16ed3faefb763f912c2db5ddce6a24e4f46647d7e64b8ab29a SIZE (webalizer-flags.tgz) = 146658 -SHA256 (webalizer-geodb-20150901.tgz) = dfc3023924968d45c1bad52ec89f63c6e885ce88c6aec48ae098a2db783709e7 -SIZE (webalizer-geodb-20150901.tgz) = 962059 +SHA256 (webalizer-geodb-20170201.tgz) = 7610f08125e1f7cdc3c57363470bc8c234257fb45ff8d18899e49e3011950f67 +SIZE (webalizer-geodb-20170201.tgz) = 1205029 Modified: head/www/webalizer/files/patch-dns_resolv.c ============================================================================== --- head/www/webalizer/files/patch-dns_resolv.c Sun Feb 19 10:57:49 2017 (r434400) +++ head/www/webalizer/files/patch-dns_resolv.c Sun Feb 19 12:37:57 2017 (r434401) @@ -1,5 +1,5 @@ ---- dns_resolv.c.orig 2008-07-01 07:49:26.000000000 +0200 -+++ dns_resolv.c 2008-07-05 08:45:35.000000000 +0200 +--- dns_resolv.c.orig 2013-02-26 05:37:27 UTC ++++ dns_resolv.c @@ -68,13 +68,21 @@ #include "parser.h" /* log parser functions */ #include "dns_resolv.h" /* our header */ @@ -22,7 +22,7 @@ struct dns_child child[MAXCHILD]; /* DNS child pipe data */ -@@ -122,7 +130,11 @@ +@@ -122,7 +130,11 @@ void resolve_dns(struct log_struct *log_ if (debug_mode) fprintf(stderr,"Checking %s...", log_rec->hostname); @@ -34,7 +34,7 @@ { memcpy(&alignedRecord, response.data, sizeof(struct dnsRecord)); strncpy (log_rec->hostname, -@@ -131,7 +143,7 @@ +@@ -131,7 +143,7 @@ void resolve_dns(struct log_struct *log_ log_rec->hostname[MAXHOST-1]=0; if (debug_mode) fprintf(stderr," found: %s (%ld)\n", @@ -43,7 +43,7 @@ } else /* not found or error occured during get */ { -@@ -193,10 +205,14 @@ +@@ -193,10 +205,14 @@ int dns_resolver(void *log_fp) } /* open cache file */ @@ -58,7 +58,7 @@ { /* Error: Unable to open DNS cache file */ if (verbose) fprintf(stderr,"%s %s\n",msg_dns_nodb,dns_cache); -@@ -206,14 +222,22 @@ +@@ -206,14 +222,22 @@ int dns_resolver(void *log_fp) } /* get file descriptor */ @@ -81,7 +81,7 @@ dns_cache=NULL; dns_db=NULL; return 0; /* disable cache */ -@@ -261,7 +285,11 @@ +@@ -261,7 +285,11 @@ int dns_resolver(void *log_fp) q.size = strlen(log_rec.hostname); /* Check if we have it in DB */ @@ -93,7 +93,7 @@ { /* have a record for this address */ memcpy(&alignedRecord, r.data, sizeof(struct dnsRecord)); -@@ -301,7 +329,11 @@ +@@ -302,7 +330,11 @@ int dns_resolver(void *log_fp) if (verbose>1) printf("%s\n",msg_dns_none); tmp_flock.l_type=F_UNLCK; fcntl(dns_fd, F_SETLK, &tmp_flock); @@ -105,7 +105,7 @@ return 0; } -@@ -334,7 +366,11 @@ +@@ -335,7 +367,11 @@ int dns_resolver(void *log_fp) /* processing done, exit */ tmp_flock.l_type=F_UNLCK; fcntl(dns_fd, F_SETLK, &tmp_flock); @@ -117,7 +117,7 @@ return 0; } -@@ -719,7 +755,11 @@ +@@ -720,7 +756,11 @@ static void db_put(char *key, char *valu v.size = recSize; v.data = recPtr; @@ -129,7 +129,7 @@ if (verbose>1) fprintf(stderr,"db_put fail!\n"); free(recPtr); } -@@ -767,10 +807,14 @@ +@@ -768,10 +808,14 @@ int open_cache() } /* open cache file */ @@ -144,7 +144,7 @@ { /* Error: Unable to open DNS cache file */ if (verbose) fprintf(stderr,"%s %s\n",msg_dns_nodb,dns_cache); -@@ -778,13 +822,21 @@ +@@ -779,13 +823,21 @@ int open_cache() } /* get file descriptor */ @@ -166,7 +166,7 @@ return 0; } return 1; -@@ -806,7 +858,11 @@ +@@ -807,7 +859,11 @@ int close_cache() /* clear lock and close cache file */ fcntl(dns_fd, F_SETLK, &tmp_flock); @@ -178,7 +178,7 @@ return 1; } -@@ -824,6 +880,11 @@ +@@ -825,6 +881,11 @@ DB *geodb_open(char *dbname) strncpy(buf,dbname,sizeof(buf)-1); buf[sizeof(buf)-1]='\0'; @@ -190,7 +190,7 @@ /* create database thingie */ if ( db_create(&geo_db, NULL, 0) ) return NULL; -@@ -836,6 +897,7 @@ +@@ -837,6 +898,7 @@ DB *geodb_open(char *dbname) geo_db->close(geo_db,0); return NULL; } @@ -198,7 +198,7 @@ /* all is well in the world */ return geo_db; } -@@ -856,7 +918,11 @@ +@@ -857,7 +919,11 @@ char *geodb_ver(DB *db, char *str) k.data=&x; k.size=sizeof(x); @@ -210,7 +210,7 @@ if (i) strncpy(str, "Unknown", 8); else strncpy(str, v.data+3, v.size-3); -@@ -894,7 +960,11 @@ +@@ -895,7 +961,11 @@ char *geodb_get_cc(DB *db, char *ip, cha k.data=&addr; k.size=sizeof(addr); @@ -222,7 +222,7 @@ if (!i) memcpy(buf, v.data, 2); return buf; } -@@ -905,7 +975,11 @@ +@@ -906,7 +976,11 @@ char *geodb_get_cc(DB *db, char *ip, cha void geodb_close(DB *db) { Modified: head/www/webalizer/files/patch-output.c ============================================================================== --- head/www/webalizer/files/patch-output.c Sun Feb 19 10:57:49 2017 (r434400) +++ head/www/webalizer/files/patch-output.c Sun Feb 19 12:37:57 2017 (r434401) @@ -1,6 +1,6 @@ ---- 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 @@ +--- output.c.orig 2013-02-26 05:37:27 UTC ++++ output.c +@@ -992,6 +992,20 @@ int all_sites_page(u_int64_t h_reg, u_in hptr=*pointer++; if (hptr->flag == OBJ_REG) { Modified: head/www/webalizer/files/patch-wcmgr.c ============================================================================== --- head/www/webalizer/files/patch-wcmgr.c Sun Feb 19 10:57:49 2017 (r434400) +++ head/www/webalizer/files/patch-wcmgr.c Sun Feb 19 12:37:57 2017 (r434401) @@ -1,8 +1,8 @@ ---- 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 - #include "webalizer.h" +--- wcmgr.c.orig 2013-08-26 04:35:57 UTC ++++ wcmgr.c +@@ -78,6 +78,10 @@ int main() + #define str(x) xstr(x) + #define SMAXHOST str(MAXHOST) /* String version of MAXHOST value */ +#ifndef DB_NOTFOUND +#define DB_NOTFOUND 1 @@ -11,7 +11,7 @@ /*********************************************/ /* Forward reference local functions */ /*********************************************/ -@@ -104,7 +108,11 @@ +@@ -109,7 +113,11 @@ int verbose = 0; int rec_ttl = 7; /* purge TTL in days */ DB *dns_db = NULL; /* DNS cache database */ DB *out_db = NULL; /* output cache db if needed */ @@ -23,7 +23,7 @@ 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 @@ +@@ -138,18 +146,24 @@ struct dnsRec void print_ver() { @@ -48,7 +48,7 @@ printf("Mod Date: %s\n",moddate); } printf("\n"); -@@ -168,7 +182,9 @@ +@@ -175,7 +189,9 @@ void print_help(void) printf(" -l List cache file contents\n"); printf(" -n name hostname (used for add)\n"); printf(" -p num Purge after num days\n"); @@ -58,7 +58,7 @@ 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 @@ +@@ -240,7 +256,9 @@ int main(int argc, char *argv[]) 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; @@ -68,7 +68,7 @@ case 't': rec_ttl=atoi(optarg); break; case 'v': verbose=1; break; case 'V': print_ver(); break; -@@ -250,12 +268,14 @@ +@@ -257,12 +275,14 @@ int main(int argc, char *argv[]) if (argc - optind == 0) print_help(); /* gots to have a filename!! */ in_file = argv[optind]; @@ -83,7 +83,7 @@ /* force sane TTL value */ if (rec_ttl > 99) rec_ttl=99; -@@ -269,7 +289,9 @@ +@@ -276,7 +296,9 @@ int main(int argc, char *argv[]) case 'd': del_rec(); break; case 'f': find_rec(); break; case 'i': import_cache(); break; @@ -93,7 +93,7 @@ case 'p': purge_cache(); break; case 'x': export_cache(); break; case 'l': -@@ -290,19 +312,31 @@ +@@ -297,19 +319,31 @@ void list_cache() u_int64_t t_num=0; /* open the database (read-only) */ @@ -125,7 +125,7 @@ /* get our runtime for TTL calculations */ time(&runtime); -@@ -321,7 +355,12 @@ +@@ -328,7 +362,12 @@ void list_cache() memset(&dns_rec, 0, sizeof(struct dnsRec)); /* Loop through database */ @@ -138,7 +138,7 @@ { /* got a record */ t_rec++; -@@ -338,6 +377,9 @@ +@@ -346,6 +385,9 @@ void list_cache() /* done, clear for next rec */ memset(&q, 0, sizeof(DBT)); memset(&r, 0, sizeof(DBT)); @@ -148,7 +148,7 @@ } if (verbose) -@@ -368,15 +410,29 @@ +@@ -376,15 +418,29 @@ void purge_cache() rec_ttl, in_file); /* open the input database (read-write) */ @@ -178,7 +178,7 @@ /* Try to lock the file */ our_flock.l_whence=SEEK_SET; -@@ -391,30 +447,44 @@ +@@ -399,30 +455,44 @@ void purge_cache() exit(1); } @@ -223,7 +223,7 @@ exit(1); } -@@ -426,7 +496,12 @@ +@@ -434,7 +504,12 @@ void purge_cache() memset(&r, 0, sizeof(DBT)); /* Loop through database */ @@ -236,7 +236,7 @@ { /* got a record */ t_in++; -@@ -439,9 +514,17 @@ +@@ -447,9 +522,17 @@ void purge_cache() if ( age <= (rec_ttl*86400) ) { /* Good record.. insert into new cache file */ @@ -254,7 +254,7 @@ exit(1); } else t_out++; -@@ -462,13 +545,21 @@ +@@ -470,13 +553,21 @@ void purge_cache() /* done, clear for next rec */ memset(&q, 0, sizeof(DBT)); memset(&r, 0, sizeof(DBT)); @@ -276,7 +276,7 @@ /* rename files */ if (rename(out_file, in_file)) -@@ -485,6 +576,7 @@ +@@ -493,6 +584,7 @@ void purge_cache() /* STAT_CACHE - Display cache stats/info */ /*********************************************/ @@ -284,15 +284,15 @@ void stat_cache() { /* Define some variables */ -@@ -576,6 +668,7 @@ - printf("Record Size Errors : %llu\n",t_err); +@@ -566,6 +658,7 @@ void stat_cache() + if (t_err) printf("Record Size Errors : %llu\n",t_err); printf("\n"); } +#endif /*********************************************/ /* FIND_REC - Find IP record in cache */ -@@ -587,10 +680,20 @@ +@@ -577,10 +670,20 @@ void find_rec() char ip_buf[48]; /* open the database (read-only) */ @@ -313,7 +313,7 @@ exit(1); } -@@ -605,7 +708,11 @@ +@@ -595,7 +698,11 @@ void find_rec() /* search the cache */ q.data = &addr; q.size = strlen(addr); @@ -325,7 +325,7 @@ { /* We found it! display info */ memset(ip_buf, 0, sizeof(ip_buf)); -@@ -644,7 +751,11 @@ +@@ -635,7 +742,11 @@ void find_rec() if (i==DB_NOTFOUND) printf("%s not found!\n",addr); else @@ -337,7 +337,7 @@ } } -@@ -669,10 +780,20 @@ +@@ -660,10 +771,20 @@ void del_rec() cp=addr; while (*cp!='\0') *cp++=tolower(*cp); /* open the database (read-write) */ @@ -358,7 +358,7 @@ exit(1); } -@@ -686,7 +807,11 @@ +@@ -677,7 +798,11 @@ void del_rec() q.size = strlen(addr); /* Try to delete the record */ @@ -370,7 +370,7 @@ { if (i==DB_NOTFOUND) { -@@ -695,11 +820,19 @@ +@@ -686,11 +811,19 @@ void del_rec() } else { @@ -390,7 +390,7 @@ if (verbose) printf("%s sucessfully deleted from cache file\n",addr); } -@@ -736,10 +869,20 @@ +@@ -727,10 +860,20 @@ void add_rec() } /* open the database (read-write) */ @@ -411,7 +411,7 @@ exit(1); } -@@ -754,7 +897,11 @@ +@@ -745,7 +888,11 @@ void add_rec() /* search the cache */ q.data = &addr; q.size = strlen(addr); @@ -423,7 +423,7 @@ { fprintf(stderr,"Error: %s already exists in cache!\n",addr); exit(1); -@@ -763,7 +910,11 @@ +@@ -754,7 +901,11 @@ void add_rec() { if (i!=DB_NOTFOUND) { @@ -435,7 +435,7 @@ exit(1); } else -@@ -777,7 +928,11 @@ +@@ -768,7 +919,11 @@ void add_rec() /* put it in the database */ if (db_put(addr, name, (strcmp(name,addr))?0:1, runtime)==0) @@ -447,7 +447,7 @@ if (verbose) printf("%s sucessfully added to cache file\n",addr); } -@@ -793,14 +948,28 @@ +@@ -784,14 +939,28 @@ void create_cache() int i; /* create the database */ @@ -476,7 +476,7 @@ if (verbose) printf("Cache file %s created successfully\n",in_file); } -@@ -817,11 +986,23 @@ +@@ -808,11 +977,23 @@ void import_cache() char buffer[4096]; /* open the database (read-write) */ @@ -500,7 +500,7 @@ exit(1); } -@@ -859,7 +1040,11 @@ +@@ -850,7 +1031,11 @@ void import_cache() } } else fprintf(stderr,"Error: File not found: %s\n",out_file); @@ -512,7 +512,7 @@ if (verbose) printf("%llu records imported into '%s' from file '%s'\n", t_rec, in_file, out_file); -@@ -885,19 +1070,31 @@ +@@ -876,19 +1061,31 @@ void export_cache() } /* open the database (read-only) */ @@ -544,7 +544,7 @@ /* stat output file */ if ( !(lstat(out_file, &out_stat)) ) -@@ -923,7 +1120,12 @@ +@@ -914,7 +1111,12 @@ void export_cache() memset(&dns_rec, 0, sizeof(struct dnsRec)); /* Loop through database */ @@ -557,15 +557,14 @@ { /* got a record */ t_rec++; -@@ -941,8 +1143,15 @@ +@@ -932,8 +1134,15 @@ void export_cache() /* 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 @@ -574,7 +573,7 @@ fclose(out_fp); if (verbose) printf("%llu records exported from '%s' to file '%s'\n", -@@ -989,8 +1198,13 @@ +@@ -980,8 +1189,13 @@ static int db_put(char *key, char *value v.size = recSize; v.data = recPtr; Modified: head/www/webalizer/files/patch-webalizer.c ============================================================================== --- head/www/webalizer/files/patch-webalizer.c Sun Feb 19 10:57:49 2017 (r434400) +++ head/www/webalizer/files/patch-webalizer.c Sun Feb 19 12:37:57 2017 (r434401) @@ -1,6 +1,6 @@ ---- 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 @@ +--- webalizer.c.orig 2013-08-26 04:52:15 UTC ++++ webalizer.c +@@ -942,7 +942,11 @@ int main(int argc, char *argv[]) { /* Save query portion in log.rec.srchstr */ strncpy(log_rec.srchstr,(char *)cp1,MAXSRCH); @@ -12,3 +12,17 @@ break; } else cp1++; +@@ -1089,6 +1093,13 @@ int main(int argc, char *argv[]) + { + freeaddrinfo(ares); + resolve_dns(&log_rec); ++ ++#ifdef USE_IP_AS_HOSTNAME ++ /* restore the host's IP-address if the host's name has not been resolved */ ++ if (!strcmp(log_rec.hostname,"\020\002")) ++ strncpy(log_rec.hostname, host_buf, sizeof(host_buf)); ++#endif ++ + } + } + #endif Modified: head/www/webalizer/pkg-plist ============================================================================== --- head/www/webalizer/pkg-plist Sun Feb 19 10:57:49 2017 (r434400) +++ head/www/webalizer/pkg-plist Sun Feb 19 12:37:57 2017 (r434401) @@ -4,263 +4,263 @@ bin/%%PKGNAMEPREFIX%%wcmgr etc/%%PKGNAMEPREFIX%%webalizer.conf-dist man/man1/%%PKGNAMEPREFIX%%webalizer.1.gz man/man1/%%PKGNAMEPREFIX%%wcmgr.1.gz -%%WITH_GEODB%%share/geolizer/GeoDB.dat -%%WITH_GEOIP%%share/geolizer/README -%%WITH_GEOIP%%share/geolizer/a1.png -%%WITH_GEOIP%%share/geolizer/a2.png -%%WITH_GEOIP%%share/geolizer/ac.png -%%WITH_GEOIP%%share/geolizer/ad.png -%%WITH_GEOIP%%share/geolizer/ae.png -%%WITH_GEOIP%%share/geolizer/af.png -%%WITH_GEOIP%%share/geolizer/ag.png -%%WITH_GEOIP%%share/geolizer/ai.png -%%WITH_GEOIP%%share/geolizer/al.png -%%WITH_GEOIP%%share/geolizer/am.png -%%WITH_GEOIP%%share/geolizer/an.png -%%WITH_GEOIP%%share/geolizer/ao.png -%%WITH_GEOIP%%share/geolizer/aq.png -%%WITH_GEOIP%%share/geolizer/ar.png -%%WITH_GEOIP%%share/geolizer/as.png -%%WITH_GEOIP%%share/geolizer/at.png -%%WITH_GEOIP%%share/geolizer/au.png -%%WITH_GEOIP%%share/geolizer/aw.png -%%WITH_GEOIP%%share/geolizer/ax.png -%%WITH_GEOIP%%share/geolizer/az.png -%%WITH_GEOIP%%share/geolizer/ba.png -%%WITH_GEOIP%%share/geolizer/bb.png -%%WITH_GEOIP%%share/geolizer/bd.png -%%WITH_GEOIP%%share/geolizer/be.png -%%WITH_GEOIP%%share/geolizer/bf.png -%%WITH_GEOIP%%share/geolizer/bg.png -%%WITH_GEOIP%%share/geolizer/bh.png -%%WITH_GEOIP%%share/geolizer/bi.png -%%WITH_GEOIP%%share/geolizer/bj.png -%%WITH_GEOIP%%share/geolizer/bl.png -%%WITH_GEOIP%%share/geolizer/bm.png -%%WITH_GEOIP%%share/geolizer/bn.png -%%WITH_GEOIP%%share/geolizer/bo.png -%%WITH_GEOIP%%share/geolizer/br.png -%%WITH_GEOIP%%share/geolizer/bs.png -%%WITH_GEOIP%%share/geolizer/bt.png -%%WITH_GEOIP%%share/geolizer/bv.png -%%WITH_GEOIP%%share/geolizer/bw.png -%%WITH_GEOIP%%share/geolizer/by.png -%%WITH_GEOIP%%share/geolizer/bz.png -%%WITH_GEOIP%%share/geolizer/ca.png -%%WITH_GEOIP%%share/geolizer/cc.png -%%WITH_GEOIP%%share/geolizer/cd.png -%%WITH_GEOIP%%share/geolizer/cf.png -%%WITH_GEOIP%%share/geolizer/cg.png -%%WITH_GEOIP%%share/geolizer/ch.png -%%WITH_GEOIP%%share/geolizer/ci.png -%%WITH_GEOIP%%share/geolizer/ck.png -%%WITH_GEOIP%%share/geolizer/cl.png -%%WITH_GEOIP%%share/geolizer/cm.png -%%WITH_GEOIP%%share/geolizer/cn.png -%%WITH_GEOIP%%share/geolizer/co.png -%%WITH_GEOIP%%share/geolizer/cr.png -%%WITH_GEOIP%%share/geolizer/cu.png -%%WITH_GEOIP%%share/geolizer/cv.png -%%WITH_GEOIP%%share/geolizer/cx.png -%%WITH_GEOIP%%share/geolizer/cy.png -%%WITH_GEOIP%%share/geolizer/cz.png -%%WITH_GEOIP%%share/geolizer/de.png -%%WITH_GEOIP%%share/geolizer/dj.png -%%WITH_GEOIP%%share/geolizer/dk.png -%%WITH_GEOIP%%share/geolizer/dm.png -%%WITH_GEOIP%%share/geolizer/do.png -%%WITH_GEOIP%%share/geolizer/dz.png -%%WITH_GEOIP%%share/geolizer/ec.png -%%WITH_GEOIP%%share/geolizer/ee.png -%%WITH_GEOIP%%share/geolizer/eg.png -%%WITH_GEOIP%%share/geolizer/eh.png -%%WITH_GEOIP%%share/geolizer/er.png -%%WITH_GEOIP%%share/geolizer/es.png -%%WITH_GEOIP%%share/geolizer/et.png -%%WITH_GEOIP%%share/geolizer/eu.png -%%WITH_GEOIP%%share/geolizer/fi.png -%%WITH_GEOIP%%share/geolizer/fj.png -%%WITH_GEOIP%%share/geolizer/fk.png -%%WITH_GEOIP%%share/geolizer/fm.png -%%WITH_GEOIP%%share/geolizer/fo.png -%%WITH_GEOIP%%share/geolizer/fr.png -%%WITH_GEOIP%%share/geolizer/ga.png -%%WITH_GEOIP%%share/geolizer/gb.png -%%WITH_GEOIP%%share/geolizer/gd.png -%%WITH_GEOIP%%share/geolizer/ge.png -%%WITH_GEOIP%%share/geolizer/gf.png -%%WITH_GEOIP%%share/geolizer/gg.png -%%WITH_GEOIP%%share/geolizer/gh.png -%%WITH_GEOIP%%share/geolizer/gi.png -%%WITH_GEOIP%%share/geolizer/gl.png -%%WITH_GEOIP%%share/geolizer/gm.png -%%WITH_GEOIP%%share/geolizer/gn.png -%%WITH_GEOIP%%share/geolizer/gp.png -%%WITH_GEOIP%%share/geolizer/gq.png -%%WITH_GEOIP%%share/geolizer/gr.png -%%WITH_GEOIP%%share/geolizer/gs.png -%%WITH_GEOIP%%share/geolizer/gt.png -%%WITH_GEOIP%%share/geolizer/gu.png -%%WITH_GEOIP%%share/geolizer/gw.png -%%WITH_GEOIP%%share/geolizer/gy.png -%%WITH_GEOIP%%share/geolizer/hk.png -%%WITH_GEOIP%%share/geolizer/hm.png -%%WITH_GEOIP%%share/geolizer/hn.png -%%WITH_GEOIP%%share/geolizer/hr.png -%%WITH_GEOIP%%share/geolizer/ht.png -%%WITH_GEOIP%%share/geolizer/hu.png -%%WITH_GEOIP%%share/geolizer/id.png -%%WITH_GEOIP%%share/geolizer/ie.png -%%WITH_GEOIP%%share/geolizer/il.png -%%WITH_GEOIP%%share/geolizer/im.png -%%WITH_GEOIP%%share/geolizer/in.png -%%WITH_GEOIP%%share/geolizer/io.png -%%WITH_GEOIP%%share/geolizer/iq.png -%%WITH_GEOIP%%share/geolizer/ir.png -%%WITH_GEOIP%%share/geolizer/is.png -%%WITH_GEOIP%%share/geolizer/it.png -%%WITH_GEOIP%%share/geolizer/je.png -%%WITH_GEOIP%%share/geolizer/jm.png -%%WITH_GEOIP%%share/geolizer/jo.png -%%WITH_GEOIP%%share/geolizer/jp.png -%%WITH_GEOIP%%share/geolizer/ke.png -%%WITH_GEOIP%%share/geolizer/kg.png -%%WITH_GEOIP%%share/geolizer/kh.png -%%WITH_GEOIP%%share/geolizer/ki.png -%%WITH_GEOIP%%share/geolizer/km.png -%%WITH_GEOIP%%share/geolizer/kn.png -%%WITH_GEOIP%%share/geolizer/kp.png -%%WITH_GEOIP%%share/geolizer/kr.png -%%WITH_GEOIP%%share/geolizer/kw.png -%%WITH_GEOIP%%share/geolizer/ky.png -%%WITH_GEOIP%%share/geolizer/kz.png -%%WITH_GEOIP%%share/geolizer/la.png -%%WITH_GEOIP%%share/geolizer/lb.png -%%WITH_GEOIP%%share/geolizer/lc.png -%%WITH_GEOIP%%share/geolizer/li.png -%%WITH_GEOIP%%share/geolizer/lk.png -%%WITH_GEOIP%%share/geolizer/lr.png -%%WITH_GEOIP%%share/geolizer/ls.png -%%WITH_GEOIP%%share/geolizer/lt.png -%%WITH_GEOIP%%share/geolizer/lu.png -%%WITH_GEOIP%%share/geolizer/lv.png -%%WITH_GEOIP%%share/geolizer/ly.png -%%WITH_GEOIP%%share/geolizer/ma.png -%%WITH_GEOIP%%share/geolizer/mc.png -%%WITH_GEOIP%%share/geolizer/md.png -%%WITH_GEOIP%%share/geolizer/me.png -%%WITH_GEOIP%%share/geolizer/mf.png -%%WITH_GEOIP%%share/geolizer/mg.png -%%WITH_GEOIP%%share/geolizer/mh.png -%%WITH_GEOIP%%share/geolizer/mk.png -%%WITH_GEOIP%%share/geolizer/ml.png -%%WITH_GEOIP%%share/geolizer/mm.png -%%WITH_GEOIP%%share/geolizer/mn.png -%%WITH_GEOIP%%share/geolizer/mo.png -%%WITH_GEOIP%%share/geolizer/mp.png -%%WITH_GEOIP%%share/geolizer/mq.png -%%WITH_GEOIP%%share/geolizer/mr.png -%%WITH_GEOIP%%share/geolizer/ms.png -%%WITH_GEOIP%%share/geolizer/mt.png -%%WITH_GEOIP%%share/geolizer/mu.png -%%WITH_GEOIP%%share/geolizer/mv.png -%%WITH_GEOIP%%share/geolizer/mw.png -%%WITH_GEOIP%%share/geolizer/mx.png -%%WITH_GEOIP%%share/geolizer/my.png -%%WITH_GEOIP%%share/geolizer/mz.png -%%WITH_GEOIP%%share/geolizer/na.png -%%WITH_GEOIP%%share/geolizer/nc.png -%%WITH_GEOIP%%share/geolizer/ne.png -%%WITH_GEOIP%%share/geolizer/nf.png -%%WITH_GEOIP%%share/geolizer/ng.png -%%WITH_GEOIP%%share/geolizer/ni.png -%%WITH_GEOIP%%share/geolizer/nl.png -%%WITH_GEOIP%%share/geolizer/no.png -%%WITH_GEOIP%%share/geolizer/np.png -%%WITH_GEOIP%%share/geolizer/nr.png -%%WITH_GEOIP%%share/geolizer/nu.png -%%WITH_GEOIP%%share/geolizer/nz.png -%%WITH_GEOIP%%share/geolizer/o1.png -%%WITH_GEOIP%%share/geolizer/om.png -%%WITH_GEOIP%%share/geolizer/pa.png -%%WITH_GEOIP%%share/geolizer/pe.png -%%WITH_GEOIP%%share/geolizer/pf.png -%%WITH_GEOIP%%share/geolizer/pg.png -%%WITH_GEOIP%%share/geolizer/ph.png -%%WITH_GEOIP%%share/geolizer/pk.png -%%WITH_GEOIP%%share/geolizer/pl.png -%%WITH_GEOIP%%share/geolizer/pm.png -%%WITH_GEOIP%%share/geolizer/pn.png -%%WITH_GEOIP%%share/geolizer/pr.png -%%WITH_GEOIP%%share/geolizer/ps.png -%%WITH_GEOIP%%share/geolizer/pt.png -%%WITH_GEOIP%%share/geolizer/pw.png -%%WITH_GEOIP%%share/geolizer/py.png -%%WITH_GEOIP%%share/geolizer/qa.png -%%WITH_GEOIP%%share/geolizer/re.png -%%WITH_GEOIP%%share/geolizer/ro.png -%%WITH_GEOIP%%share/geolizer/rs.png -%%WITH_GEOIP%%share/geolizer/ru.png -%%WITH_GEOIP%%share/geolizer/rw.png -%%WITH_GEOIP%%share/geolizer/sa.png -%%WITH_GEOIP%%share/geolizer/sb.png -%%WITH_GEOIP%%share/geolizer/sc.png -%%WITH_GEOIP%%share/geolizer/sd.png -%%WITH_GEOIP%%share/geolizer/se.png -%%WITH_GEOIP%%share/geolizer/sg.png -%%WITH_GEOIP%%share/geolizer/sh.png -%%WITH_GEOIP%%share/geolizer/si.png -%%WITH_GEOIP%%share/geolizer/sj.png -%%WITH_GEOIP%%share/geolizer/sk.png -%%WITH_GEOIP%%share/geolizer/sl.png -%%WITH_GEOIP%%share/geolizer/sm.png -%%WITH_GEOIP%%share/geolizer/sn.png -%%WITH_GEOIP%%share/geolizer/so.png -%%WITH_GEOIP%%share/geolizer/sr.png -%%WITH_GEOIP%%share/geolizer/st.png -%%WITH_GEOIP%%share/geolizer/su.png -%%WITH_GEOIP%%share/geolizer/sv.png -%%WITH_GEOIP%%share/geolizer/sy.png -%%WITH_GEOIP%%share/geolizer/sz.png -%%WITH_GEOIP%%share/geolizer/tc.png -%%WITH_GEOIP%%share/geolizer/td.png -%%WITH_GEOIP%%share/geolizer/tf.png -%%WITH_GEOIP%%share/geolizer/tg.png -%%WITH_GEOIP%%share/geolizer/th.png -%%WITH_GEOIP%%share/geolizer/tj.png -%%WITH_GEOIP%%share/geolizer/tk.png -%%WITH_GEOIP%%share/geolizer/tl.png -%%WITH_GEOIP%%share/geolizer/tm.png -%%WITH_GEOIP%%share/geolizer/tn.png -%%WITH_GEOIP%%share/geolizer/to.png -%%WITH_GEOIP%%share/geolizer/tp.png -%%WITH_GEOIP%%share/geolizer/tr.png -%%WITH_GEOIP%%share/geolizer/tt.png -%%WITH_GEOIP%%share/geolizer/tv.png -%%WITH_GEOIP%%share/geolizer/tw.png -%%WITH_GEOIP%%share/geolizer/tz.png -%%WITH_GEOIP%%share/geolizer/ua.png -%%WITH_GEOIP%%share/geolizer/ug.png -%%WITH_GEOIP%%share/geolizer/uk.png -%%WITH_GEOIP%%share/geolizer/um.png -%%WITH_GEOIP%%share/geolizer/us.png -%%WITH_GEOIP%%share/geolizer/uy.png -%%WITH_GEOIP%%share/geolizer/uz.png -%%WITH_GEOIP%%share/geolizer/va.png -%%WITH_GEOIP%%share/geolizer/vc.png -%%WITH_GEOIP%%share/geolizer/ve.png -%%WITH_GEOIP%%share/geolizer/vg.png -%%WITH_GEOIP%%share/geolizer/vi.png -%%WITH_GEOIP%%share/geolizer/vn.png -%%WITH_GEOIP%%share/geolizer/vu.png -%%WITH_GEOIP%%share/geolizer/wf.png -%%WITH_GEOIP%%share/geolizer/ws.png -%%WITH_GEOIP%%share/geolizer/ye.png -%%WITH_GEOIP%%share/geolizer/yt.png -%%WITH_GEOIP%%share/geolizer/yu.png -%%WITH_GEOIP%%share/geolizer/za.png -%%WITH_GEOIP%%share/geolizer/zm.png -%%WITH_GEOIP%%share/geolizer/zw.png +%%GEODB%%share/geolizer/GeoDB.dat +%%WITH_ICONS%%share/geolizer/README +%%WITH_ICONS%%share/geolizer/a1.png +%%WITH_ICONS%%share/geolizer/a2.png +%%WITH_ICONS%%share/geolizer/ac.png +%%WITH_ICONS%%share/geolizer/ad.png +%%WITH_ICONS%%share/geolizer/ae.png +%%WITH_ICONS%%share/geolizer/af.png +%%WITH_ICONS%%share/geolizer/ag.png +%%WITH_ICONS%%share/geolizer/ai.png +%%WITH_ICONS%%share/geolizer/al.png +%%WITH_ICONS%%share/geolizer/am.png +%%WITH_ICONS%%share/geolizer/an.png +%%WITH_ICONS%%share/geolizer/ao.png +%%WITH_ICONS%%share/geolizer/aq.png +%%WITH_ICONS%%share/geolizer/ar.png +%%WITH_ICONS%%share/geolizer/as.png +%%WITH_ICONS%%share/geolizer/at.png +%%WITH_ICONS%%share/geolizer/au.png +%%WITH_ICONS%%share/geolizer/aw.png +%%WITH_ICONS%%share/geolizer/ax.png +%%WITH_ICONS%%share/geolizer/az.png +%%WITH_ICONS%%share/geolizer/ba.png +%%WITH_ICONS%%share/geolizer/bb.png +%%WITH_ICONS%%share/geolizer/bd.png +%%WITH_ICONS%%share/geolizer/be.png +%%WITH_ICONS%%share/geolizer/bf.png +%%WITH_ICONS%%share/geolizer/bg.png +%%WITH_ICONS%%share/geolizer/bh.png +%%WITH_ICONS%%share/geolizer/bi.png +%%WITH_ICONS%%share/geolizer/bj.png +%%WITH_ICONS%%share/geolizer/bl.png +%%WITH_ICONS%%share/geolizer/bm.png +%%WITH_ICONS%%share/geolizer/bn.png +%%WITH_ICONS%%share/geolizer/bo.png +%%WITH_ICONS%%share/geolizer/br.png +%%WITH_ICONS%%share/geolizer/bs.png +%%WITH_ICONS%%share/geolizer/bt.png +%%WITH_ICONS%%share/geolizer/bv.png +%%WITH_ICONS%%share/geolizer/bw.png +%%WITH_ICONS%%share/geolizer/by.png +%%WITH_ICONS%%share/geolizer/bz.png +%%WITH_ICONS%%share/geolizer/ca.png +%%WITH_ICONS%%share/geolizer/cc.png *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***