diff --git a/.gitignore b/.gitignore index 19066dc..666dc76 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ clog x86_64 webalizer-2.20-01-src.tgz webalizer-2.21-02-src.tar.bz2 +/webalizer-2.23-05-src.tgz +/webalizer-2.23-08-src.tgz diff --git a/02_fix_a_spelling_error.diff b/02_fix_a_spelling_error.diff new file mode 100644 index 0000000..5346799 --- /dev/null +++ b/02_fix_a_spelling_error.diff @@ -0,0 +1,28 @@ +From: Julien Viard de Galbert +Date: Wed, 24 Nov 2010 00:16:20 +0100 +Subject: Fix a spelling error + +Thank you lintian ;) + +Index: webalizer/wcmgr.c +=================================================================== +--- webalizer.orig/wcmgr.c 2013-10-06 14:34:50.000000000 +0200 ++++ webalizer/wcmgr.c 2013-10-06 14:45:59.000000000 +0200 +@@ -692,7 +692,7 @@ + } + dns_db->close(dns_db, 0); + if (verbose) +- printf("%s sucessfully deleted from cache file\n",addr); ++ printf("%s successfully deleted from cache file\n",addr); + } + + /*********************************************/ +@@ -770,7 +770,7 @@ + if (db_put(addr, name, (strcmp(name,addr))?0:1, runtime)==0) + dns_db->close(dns_db,0); + if (verbose) +- printf("%s sucessfully added to cache file\n",addr); ++ printf("%s successfully added to cache file\n",addr); + } + } + } diff --git a/04_Fix_cast_warnings_in_output.c.diff b/04_Fix_cast_warnings_in_output.c.diff new file mode 100644 index 0000000..f7d7277 --- /dev/null +++ b/04_Fix_cast_warnings_in_output.c.diff @@ -0,0 +1,67 @@ +From: Julien Viard de Galbert +Date: Tue, 7 Oct 2014 23:45:04 +0200 +Subject: Fix cast warnings when building output.c + +Casts were used to cast to the same type, so discarded them. +--- + output.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/output.c b/output.c +index 838d383..81e869c 100644 +--- a/output.c ++++ b/output.c +@@ -949,7 +949,7 @@ void top_sites_table(int flag) + while(cnt--) + { + /* calculate totals */ +- switch ( (int)((HNODEPTR)(*pointer)->flag) ) ++ switch ( (*pointer)->flag ) + { + case OBJ_REG: h_reg++; break; + case OBJ_GRP: h_grp++; break; +@@ -1182,7 +1182,7 @@ void top_urls_table(int flag) + while (cnt--) + { + /* calculate totals */ +- switch ( (int)((UNODEPTR)(*pointer)->flag) ) ++ switch ( (*pointer)->flag ) + { + case OBJ_REG: u_reg++; break; + case OBJ_GRP: u_grp++; break; +@@ -1436,7 +1436,7 @@ void top_entry_table(int flag) + cnt=a_ctr; pointer=u_array; + while (cnt--) + { +- if ( (int)((UNODEPTR)(*pointer)->flag) == OBJ_REG ) ++ if ( (*pointer)->flag == OBJ_REG ) + { + if ( (u_int64_t)(((UNODEPTR)(*pointer))->entry) ) + { u_entry++; t_entry+=(u_int64_t)(((UNODEPTR)(*pointer))->entry); } +@@ -1540,7 +1540,7 @@ void top_refs_table() + while(cnt--) + { + /* calculate totals */ +- switch ( (int)((RNODEPTR)(*pointer)->flag) ) ++ switch ( (*pointer)->flag ) + { + case OBJ_REG: r_reg++; break; + case OBJ_HIDE: r_hid++; break; +@@ -1705,7 +1705,7 @@ void top_agents_table() + while(cnt--) + { + /* calculate totals */ +- switch ( (int)((ANODEPTR)(*pointer)->flag) ) ++ switch ( (*pointer)->flag ) + { + case OBJ_REG: a_reg++; break; + case OBJ_GRP: a_grp++; break; +@@ -1972,7 +1972,7 @@ void top_users_table() + while(cnt--) + { + /* calculate totals */ +- switch ( (int)((INODEPTR)(*pointer)->flag) ) ++ switch ( (*pointer)->flag ) + { + case OBJ_REG: i_reg++; break; + case OBJ_GRP: i_grp++; break; diff --git a/14_add_search_engines.diff b/14_add_search_engines.diff new file mode 100644 index 0000000..06535a4 --- /dev/null +++ b/14_add_search_engines.diff @@ -0,0 +1,60 @@ +From: Julien Viard de Galbert +Subject: enable and add more SearchEngines in .conf file + +Based on patch +14_add_search_engines.dpatch by Jose Carlos Medeiros +Also uncomment all SearchEngines directives. + +################################# +# SearchEngine field for the sensis.com.au search engine +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327496 +# From: Gavin Rogers + +################################ +# Support for French versions of Google keywords +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=253830 +# From: Cyril Bouthors +No longer needed, the sample configuration matches the ".google." string. + +Index: webalizer/sample.conf +=================================================================== +--- webalizer.orig/sample.conf 2013-10-06 14:58:08.000000000 +0200 ++++ webalizer/sample.conf 2013-10-06 14:58:08.000000000 +0200 +@@ -710,21 +710,22 @@ + # engine, and the second is the URL variable used by that search engine + # to define its search terms. + +-#SearchEngine .google. q= +-#SearchEngine yahoo.com p= +-#SearchEngine altavista.com q= +-#SearchEngine aolsearch. query= +-#SearchEngine ask.co q= +-#SearchEngine eureka.com q= +-#SearchEngine lycos.com query= +-#SearchEngine hotbot.com MT= +-#SearchEngine msn.com q= +-#SearchEngine infoseek.com qt= +-#SearchEngine excite search= +-#SearchEngine netscape.com query= +-#SearchEngine mamma.com query= +-#SearchEngine alltheweb.com q= +-#SearchEngine northernlight.com qr= ++SearchEngine .google. q= ++SearchEngine yahoo.com p= ++SearchEngine altavista.com q= ++SearchEngine aolsearch. query= ++SearchEngine ask.co q= ++SearchEngine eureka.com q= ++SearchEngine lycos.com query= ++SearchEngine hotbot.com MT= ++SearchEngine msn.com q= ++SearchEngine infoseek.com qt= ++SearchEngine excite search= ++SearchEngine netscape.com query= ++SearchEngine mamma.com query= ++SearchEngine alltheweb.com q= ++SearchEngine northernlight.com qr= ++SearchEngine sensis.com.au find= + + # Normally, search strings are converted to lower case in order to + # increase accuracy. The SearchCaseI option allows them to maintain diff --git a/17_fix_typo_supress_suppress_in_sample.conf.diff b/17_fix_typo_supress_suppress_in_sample.conf.diff new file mode 100644 index 0000000..d7f2764 --- /dev/null +++ b/17_fix_typo_supress_suppress_in_sample.conf.diff @@ -0,0 +1,21 @@ +From: Julien Viard de Galbert +Date: Wed, 12 Jul 2017 23:59:31 +0200 +Subject: Fix typo supress -> suppress in sample.conf + +--- + sample.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sample.conf b/sample.conf +index 925f509..fc91d0c 100644 +--- a/sample.conf ++++ b/sample.conf +@@ -289,7 +289,7 @@ PageType cgi + + #Quiet no + +-# ReallyQuiet will supress all messages including errors and ++# ReallyQuiet will suppress all messages including errors and + # warnings. Values can be 'yes' or 'no' with 'no' being the + # default. If 'yes' is used here, it cannot be overriden from + # the command line, so use with caution. A value of 'no' has diff --git a/27_fix_compilation_with_gcc-10.diff b/27_fix_compilation_with_gcc-10.diff new file mode 100644 index 0000000..e42bdca --- /dev/null +++ b/27_fix_compilation_with_gcc-10.diff @@ -0,0 +1,25 @@ +Description: Fix compilation with GCC 10. +Author: Logan Rosen +Bug-Debian: https://bugs.debian.org/957923 +Forwarded: no +Reviewed-By: Francisco Vilmar Cardoso Ruviaro +Last-Update: 2021-02-12 + +--- a/dns_resolv.c ++++ b/dns_resolv.c +@@ -78,11 +78,11 @@ + + struct dns_child child[MAXCHILD]; /* DNS child pipe data */ + +-DNODEPTR host_table[MAXHASH]; /* hostname/ip hash table */ ++extern DNODEPTR host_table[MAXHASH]; /* hostname/ip hash table */ + +-char buffer[BUFSIZE]; /* log file record buffer */ +-char tmp_buf[BUFSIZE]; /* used to temp save above */ +-struct utsname system_info; /* system info structure */ ++extern char buffer[BUFSIZE]; /* log file record buffer */ ++extern char tmp_buf[BUFSIZE]; /* used to temp save above */ ++extern struct utsname system_info; /* system info structure */ + + int raiseSigChild = 1; + diff --git a/sources b/sources index fe83ed0..747c8fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -29af2558a5564493df654b6310b152e7 webalizer-2.21-02-src.tar.bz2 +00f1f18bd5ed462ea43bf98d867e7966 webalizer-2.23-08-src.tgz diff --git a/webalizer-2.01-10-ipv6.patch b/webalizer-2.01-10-ipv6.patch deleted file mode 100644 index ae9e065..0000000 --- a/webalizer-2.01-10-ipv6.patch +++ /dev/null @@ -1,241 +0,0 @@ -#IPv6 patch by Arkadiusz Mi¶kiewicz for webalizer >= 2.01-10 -# -#Ported to Red Hat Linux/Fedora Core by Robert Scheck -# ---- webalizer-2.01-10/dns_resolv.c 2004-05-25 01:21:50.000000000 +0200 -+++ webalizer-2.01-10/dns_resolv.c.ipv6 2004-05-25 01:35:12.000000000 +0200 -@@ -61,6 +61,11 @@ - #include - #endif - -+/* ensure getaddrinfo/getnameinfo */ -+#ifndef _NETDB_H -+#include -+#endif -+ - /* some systems need this */ - #ifdef HAVE_MATH_H - #include -@@ -266,9 +271,16 @@ - strcpy(tmp_buf, buffer); /* save buffer in case of error */ - if(parse_record(buffer)) /* parse the record */ - { -- if((log_rec.addr.s_addr = inet_addr(log_rec.hostname)) != INADDR_NONE) -+ struct addrinfo hints, *ares; -+ memset(&hints, 0, sizeof(hints)); -+ hints.ai_family = AF_UNSPEC; -+ hints.ai_socktype = SOCK_STREAM; -+ hints.ai_flags = AI_NUMERICHOST; -+ if (0 == getaddrinfo(log_rec.hostname, "0", &hints, &ares)) - { - DBT q, r; -+ memcpy(&log_rec.addr, ares->ai_addr, ares->ai_addrlen); -+ freeaddrinfo(ares); - q.data = log_rec.hostname; - q.size = strlen(log_rec.hostname); - -@@ -414,12 +426,10 @@ - { - int size; - -- struct hostent *res_ent; -- - close(child[i].inpipe[0]); - close(child[i].outpipe[1]); - -- /* get struct in_addr here */ -+ /* get struct sockaddr_storage here */ - while((size = read(child[i].outpipe[0], child_buf, MAXHOST))) - { - if(size < 0) -@@ -429,37 +439,40 @@ - } - else - { -+ char hbuf[NI_MAXHOST]; -+ - if(debug_mode) - printf("Child got work: %lx(%d)\n", -- *((unsigned long *)child_buf), size); -+ *(unsigned long *)((struct sockaddr*)child_buf)->sa_data, size); - -- if((res_ent = gethostbyaddr(child_buf, size, AF_INET))) -+ if(0 == getnameinfo((struct sockaddr*)child_buf, sizeof(struct sockaddr_storage), -+ hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) - { - /* must be at least 4 chars */ -- if (strlen(res_ent->h_name)>3) -+ if (strlen(hbuf)>3) - { - if(debug_mode) -- printf("Child got %s for %lx(%d), %d bytes\n", -- res_ent->h_name, -- *((unsigned long *)child_buf), -- size,strlen(res_ent->h_name)); -+ printf("Child got %s for %x(%d), %d bytes\n", -+ hbuf, -+ *(unsigned long *)((struct sockaddr *)child_buf)->sa_data, -+ size,strlen(hbuf)); - - /* If long hostname, take max domain name part */ -- if ((size = strlen(res_ent->h_name)) > MAXHOST-2) -- strcpy(child_buf,(res_ent->h_name+(size-MAXHOST+1))); -- else strcpy(child_buf, res_ent->h_name); -+ if ((size = strlen(hbuf)) > MAXHOST-2) -+ strcpy(child_buf,(hbuf+(size-MAXHOST+1))); -+ else strcpy(child_buf, hbuf); - size = strlen(child_buf); - } - else - { - if (debug_mode) -- printf("gethostbyaddr returned bad h_name!\n"); -+ printf("getnameinfor returned bad hbuf!\n"); - } - } - else - { - if(debug_mode) -- printf("gethostbyaddr returned NULL! (%d)\n",h_errno); -+ printf("getnameinfo didn't return any usable information!\n"); - } - - if (write(child[i].inpipe[1], child_buf, size) == -1) -@@ -538,8 +551,8 @@ - - if(trav) /* something to resolve */ - { -- if (write(child[i].outpipe[1], &(trav->addr.s_addr), -- sizeof(trav->addr.s_addr)) != -1) -+ if (write(child[i].outpipe[1], &trav->addr, -+ sizeof(trav->addr)) != -1) - { - /* We will watch this child */ - child[i].cur = trav; -@@ -547,10 +560,9 @@ - max_fd = MAX(max_fd, child[i].inpipe[0]); - - if(debug_mode) -- printf("Giving %s (%lx) to Child %d for resolving\n", -+ printf("Giving %s (%x) to Child %d for resolving\n", - child[i].cur->string, -- (unsigned long)child[i].cur->addr.s_addr, i); -- -+ *(unsigned long *)((struct sockaddr *)&child[i].cur->addr)->sa_data, i); - trav = trav->llist; - } - else /* write error */ -@@ -640,8 +652,8 @@ - default: - { - dns_buf[size] = '\0'; -- if(memcmp(dns_buf, &(child[i].cur->addr.s_addr), -- sizeof(child[i].cur->addr.s_addr))) -+ if(memcmp(dns_buf, &(child[i].cur->addr), -+ sizeof(child[i].cur->addr))) - { - if(debug_mode) - printf("Got a result (%d): %s -> %s\n", ---- webalizer-2.01-10/hashtab.c 2001-06-15 10:34:24.000000000 +0200 -+++ webalizer-2.01-10/hashtab.c.ipv6 2004-05-25 01:36:24.000000000 +0200 -@@ -976,7 +976,7 @@ - /* PUT_DNODE - insert/update dns host node */ - /*********************************************/ - --int put_dnode(char *str, struct in_addr *addr, DNODEPTR *htab) -+int put_dnode(char *str, struct sockaddr_storage *addr, DNODEPTR *htab) - { - DNODEPTR cptr,nptr; - -@@ -988,8 +988,8 @@ - /* not hashed */ - if ( (nptr=new_dnode(str)) != NULL) - { -- if (addr) memcpy(&nptr->addr, addr, sizeof(struct in_addr)); -- else memset(&nptr->addr, 0, sizeof(struct in_addr)); -+ if (addr) memcpy(&nptr->addr, addr, sizeof(struct sockaddr_storage)); -+ else memset(&nptr->addr, 0, sizeof(struct sockaddr_storage)); - nptr->next = NULL; - htab[hash(str)] = nptr; - } -@@ -1005,8 +1005,8 @@ - /* not found... */ - if ( (nptr = new_dnode(str)) != NULL) - { -- if (addr) memcpy(&nptr->addr, addr, sizeof(struct in_addr)); -- else memset(&nptr->addr, 0, sizeof(struct in_addr)); -+ if (addr) memcpy(&nptr->addr, addr, sizeof(struct sockaddr_storage)); -+ else memset(&nptr->addr, 0, sizeof(struct sockaddr_storage)); - nptr->next = htab[hash(str)]; - htab[hash(str)]=nptr; - } ---- webalizer-2.01-10/hashtab.h 2000-09-29 05:50:30.000000000 +0200 -+++ webalizer-2.01-10/hashtab.h.ipv6 2004-05-25 01:37:26.000000000 +0200 -@@ -18,7 +18,7 @@ - - #ifdef USE_DNS - struct dnode { char *string; /* DNS node hash table struct */ -- struct in_addr addr; -+ struct sockaddr_storage addr; - struct dnode *llist; - struct dnode *next; }; - #endif -@@ -87,7 +87,7 @@ - extern int put_snode(char *, u_long, SNODEPTR *); - - #ifdef USE_DNS --extern int put_dnode(char *, struct in_addr *, DNODEPTR *); -+extern int put_dnode(char *, struct sockaddr_storage *, DNODEPTR *); - extern void del_dlist(DNODEPTR *); - #endif - ---- webalizer-2.01-10/parser.c 2001-06-15 10:34:24.000000000 +0200 -+++ webalizer-2.01-10/parser.c.ipv6 2004-05-25 01:37:56.000000000 +0200 -@@ -114,7 +114,7 @@ - log_rec.ident[0]=0; - */ - #ifdef USE_DNS -- memset(&log_rec.addr,0,sizeof(struct in_addr)); -+ memset(&log_rec.addr,0,sizeof(struct sockaddr_storage)); - #endif - - /* call appropriate handler */ ---- webalizer-2.01-10/webalizer.c 2004-05-25 01:21:50.000000000 +0200 -+++ webalizer-2.01-10/webalizer.c.ipv6 2004-05-25 01:39:31.000000000 +0200 -@@ -63,6 +63,7 @@ - #ifdef USE_DNS - #include - #include -+#include - - #ifdef HAVE_DB_185_H - #include -@@ -991,8 +992,15 @@ - /* Resolve IP address if needed */ - if (dns_db) - { -- if (inet_addr(log_rec.hostname) != INADDR_NONE) -- resolve_dns(&log_rec); -+ struct addrinfo hints, *ares; -+ memset(&hints, 0, sizeof(hints)); -+ hints.ai_family = AF_UNSPEC; -+ hints.ai_socktype = SOCK_STREAM; -+ hints.ai_flags = AI_NUMERICHOST; -+ if (0 == getaddrinfo(log_rec.hostname, "0", &hints, &ares)) { -+ freeaddrinfo(ares); -+ resolve_dns(&log_rec); -+ } - } - #endif - ---- webalizer-2.01-10/webalizer.h 2001-02-10 01:58:18.000000000 +0100 -+++ webalizer-2.01-10/webalizer.h.ipv6 2004-05-25 01:40:09.000000000 +0200 -@@ -143,7 +143,7 @@ - int resp_code; /* response code */ - u_long xfer_size; /* xfer size in bytes */ - #ifdef USE_DNS -- struct in_addr addr; /* IP address structure */ -+ struct sockaddr_storage addr; /* IP address structure */ - #endif /* USE_DNS */ - char refer[MAXREF]; /* referrer */ - char agent[MAXAGENT]; /* user agent (browser) */ diff --git a/webalizer-2.01_10-confuser.patch b/webalizer-2.23-05-confuser.patch similarity index 90% rename from webalizer-2.01_10-confuser.patch rename to webalizer-2.23-05-confuser.patch index ed0dae3..d8981e0 100644 --- a/webalizer-2.01_10-confuser.patch +++ b/webalizer-2.23-05-confuser.patch @@ -3,15 +3,6 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158174 --- webalizer-2.01-10/webalizer.c.confuser 2005-09-21 13:32:40.000000000 +0100 +++ webalizer-2.01-10/webalizer.c 2005-09-21 13:33:43.000000000 +0100 -@@ -50,6 +50,8 @@ - #include - #endif - -+#include -+ - /* some systems need this */ - #ifdef HAVE_MATH_H - #include @@ -252,6 +254,8 @@ int max_ctry; /* max countries defined */ diff --git a/webalizer-2.01-10-groupvisit.patch b/webalizer-2.23-05-groupvisit.patch similarity index 79% rename from webalizer-2.01-10-groupvisit.patch rename to webalizer-2.23-05-groupvisit.patch index fe8dbf7..5895311 100644 --- a/webalizer-2.01-10-groupvisit.patch +++ b/webalizer-2.23-05-groupvisit.patch @@ -1,15 +1,16 @@ ---- webalizer-2.01-10/hashtab.c.groupvisit 2001-06-15 11:34:24.000000000 +0300 -+++ webalizer-2.01-10/hashtab.c 2006-03-30 12:52:30.000000000 +0300 -@@ -94,6 +94,8 @@ +diff -uap webalizer-2.23-05/hashtab.c.groupvisit webalizer-2.23-05/hashtab.c +--- webalizer-2.23-05/hashtab.c.groupvisit 2011-01-10 01:47:49.000000000 +0000 ++++ webalizer-2.23-05/hashtab.c 2011-07-14 09:26:11.645377843 +0100 +@@ -88,6 +88,8 @@ INODEPTR im_htab[MAXHASH]; DNODEPTR host_table[MAXHASH]; /* DNS hash table */ #endif /* USE_DNS */ +u_long pre_tstamp = 0; /* prev. real record tstamp */ + - /*********************************************/ /* DEL_HTABS - clear out our hash tables */ -@@ -184,6 +186,7 @@ + /*********************************************/ +@@ -186,6 +188,7 @@ int put_hnode( char *str, /* Hostn nptr->visit=(visit-1); nptr->lasturl=find_url(lasturl); nptr->tstamp=tstamp; @@ -17,7 +18,7 @@ return 0; } else -@@ -193,6 +196,7 @@ +@@ -195,6 +198,7 @@ int put_hnode( char *str, /* Hostn if (htab==sm_htab) update_entry(log_rec.url); nptr->lasturl=find_url(log_rec.url); nptr->tstamp=tstamp; @@ -25,7 +26,7 @@ nptr->visit=1; } } -@@ -214,7 +218,8 @@ +@@ -225,7 +229,8 @@ int put_hnode( char *str, /* Hostn if (ispage(log_rec.url)) { @@ -35,7 +36,7 @@ { cptr->visit++; if (htab==sm_htab) -@@ -247,6 +252,7 @@ +@@ -262,6 +267,7 @@ int put_hnode( char *str, /* Hostn nptr->visit = (visit-1); nptr->lasturl=find_url(lasturl); nptr->tstamp= tstamp; @@ -43,7 +44,7 @@ return 0; } else -@@ -256,6 +262,7 @@ +@@ -271,6 +277,7 @@ int put_hnode( char *str, /* Hostn if (htab==sm_htab) update_entry(log_rec.url); nptr->lasturl=find_url(log_rec.url); nptr->tstamp= tstamp; @@ -51,7 +52,7 @@ nptr->visit=1; } } -@@ -840,11 +847,16 @@ +@@ -875,11 +882,16 @@ int put_inode( char *str, /* ident { nptr->visit=(visit-1); nptr->tstamp=tstamp; @@ -69,7 +70,7 @@ } } } -@@ -864,7 +876,8 @@ +@@ -899,7 +911,8 @@ int put_inode( char *str, /* ident if (ispage(log_rec.url)) { @@ -79,7 +80,7 @@ cptr->visit++; cptr->tstamp=tstamp; } -@@ -888,11 +901,16 @@ +@@ -923,11 +936,16 @@ int put_inode( char *str, /* ident { nptr->visit = (visit-1); nptr->tstamp= tstamp; diff --git a/webalizer-2.23-08-memmove.patch b/webalizer-2.23-08-memmove.patch new file mode 100644 index 0000000..44769da --- /dev/null +++ b/webalizer-2.23-08-memmove.patch @@ -0,0 +1,33 @@ +diff -u new/dns_resolv.c new.1/dns_resolv.c +--- new/dns_resolv.c 2013-02-26 05:37:27.000000000 +0000 ++++ new.1/dns_resolv.c 2016-04-05 06:57:30.827715718 +0000 +@@ -886,7 +886,7 @@ + /* kludge for IPv6 6to4 (RFC3056) */ + if (addr[0]==0x20 && addr[1]==0x02) + { +- memcpy(&addr[12],&addr[2],4); ++ memmove(&addr[12],&addr[2],4); + memset(&addr,0,12); + } + +diff -u new/preserve.c new.1/preserve.c +--- new/preserve.c 2013-02-26 05:37:27.000000000 +0000 ++++ new.1/preserve.c 2016-04-05 06:56:39.023080706 +0000 +@@ -109,7 +109,7 @@ + yr = hist[i].year; + mth= hist[i].month+1; + if (mth>12) { mth=1; yr++; } +- memcpy(&hist[0], &hist[1], sizeof(hist[0])*i); ++ memmove(&hist[0], &hist[1], sizeof(hist[0])*i); + memset(&hist[i], 0, sizeof(struct hist_rec)); + hist[i].year=yr; hist[i].month=mth; n--; + } +@@ -277,7 +277,7 @@ + yr = hist[i].year; + mth= hist[i].month+1; + if (mth>12) { mth=1; yr++; } +- memcpy(&hist[0],&hist[1],sizeof(hist[0])*i); ++ memmove(&hist[0],&hist[1],sizeof(hist[0])*i); + memset(&hist[i], 0, sizeof(struct hist_rec)); + hist[i].year=yr; hist[i].month=mth; n--; + } diff --git a/webalizer-httpd.conf b/webalizer-httpd.conf index 556d95d..6a352b2 100644 --- a/webalizer-httpd.conf +++ b/webalizer-httpd.conf @@ -6,9 +6,6 @@ Alias /usage /var/www/usage - Order deny,allow - Deny from all - Allow from 127.0.0.1 - Allow from ::1 - # Allow from .example.com + # Alternative e.g. "Require ip 192.168.10" + Require local diff --git a/webalizer.cron b/webalizer.cron index 1cf7e3b..063fe51 100644 --- a/webalizer.cron +++ b/webalizer.cron @@ -1,6 +1,11 @@ -#! /bin/bash +#!/bin/bash # update access statistics for the web site -if [ -s /var/log/httpd/access_log ]; then - exec /usr/bin/webalizer -Q -fi +NAME=webalizer + +[ -f /etc/sysconfig/$NAME ] || exit 0 +source /etc/sysconfig/$NAME + +[ "z$WEBALIZER_CRON" != "zyes" ] && exit 0 + +exec /usr/bin/webalizer -Q diff --git a/webalizer.spec b/webalizer.spec index e2b11c2..82a2613 100644 --- a/webalizer.spec +++ b/webalizer.spec @@ -1,25 +1,38 @@ -%define ver 2.21 -%define patchlevel 02 +%define ver 2.23 +%define patchlevel 08 -%define _default_patch_fuzz 2 +%if 0%{?fedora} < 18 && 0%{?rhel} < 7 +%global db_devel db4-devel +%else +%global db_devel libdb-devel +%endif Name: webalizer Summary: A flexible Web server log file analysis program -Group: Applications/Internet -Version: 2.21_02 -Release: 3 +Version: 2.23_08 +Release: 29%{?dist} URL: http://www.mrunix.net/webalizer/ -License: GPLv2+ -Source0: ftp://ftp.mrunix.net/pub/webalizer/%{name}-%{ver}-%{patchlevel}-src.tar.bz2 +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Source0: ftp://ftp.mrunix.net/pub/webalizer/%{name}-%{ver}-%{patchlevel}-src.tgz Source1: webalizer.conf Source2: webalizer.cron Source3: webalizer-httpd.conf +Source4: webalizer.sysconfig Patch4: webalizer-2.21-02-underrun.patch -Patch6: webalizer-2.01_10-confuser.patch -Patch9: webalizer-2.01-10-groupvisit.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: gd-devel, db4-devel, bzip2-devel -Requires(pre): /usr/sbin/useradd +Patch6: webalizer-2.23-05-confuser.patch +Patch9: webalizer-2.23-05-groupvisit.patch +Patch10: webalizer-2.23-08-memmove.patch +# From Debian +Patch21: 02_fix_a_spelling_error.diff +Patch22: 04_Fix_cast_warnings_in_output.c.diff +Patch23: 14_add_search_engines.diff +Patch24: 17_fix_typo_supress_suppress_in_sample.conf.diff +Patch25: 27_fix_compilation_with_gcc-10.diff +BuildRequires: make +BuildRequires: gcc +BuildRequires: gd-devel, %{db_devel}, bzip2-devel +BuildRequires: GeoIP-devel Requires: httpd, crontabs %description @@ -31,57 +44,195 @@ Web traffic is coming from easy. %prep %setup -q -n %{name}-%{ver}-%{patchlevel} -%patch4 -p1 -b .underrun -%patch6 -p1 -b .confuser -%patch9 -p1 -b .groupvisit +%patch -P4 -p1 -b .underrun +%patch -P6 -p1 -b .confuser +%patch -P9 -p1 -b .groupvisit +%patch -P10 -p1 -b .memmove +%patch -P21 -p1 -b .spelling_error +%patch -P22 -p1 -b .cast_warnings +%patch -P23 -p1 -b .sample_add_search_engines +%patch -P24 -p1 -b .sample_typo +%patch -P25 -p1 -b .gcc10_common_support + +# Create a sysusers.d config file +cat >webalizer.sysusers.conf </dev/null || : %files -%defattr(-,root,root) %doc README %{_mandir}/man1/*.1* %{_bindir}/* %config(noreplace) %{_sysconfdir}/webalizer.conf %{_sysconfdir}/cron.daily/00webalizer %config(noreplace) %{_sysconfdir}/httpd/conf.d/webalizer.conf +%config(noreplace) %{_sysconfdir}/sysconfig/webalizer %attr(-, webalizer, root) %dir %{_localstatedir}/www/usage %attr(-, webalizer, root) %dir %{_localstatedir}/lib/webalizer %attr(-, webalizer, root) %{_localstatedir}/www/usage/*.png +%{_sysusersdir}/webalizer.conf %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.23_08-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Feb 11 2025 Zbigniew JÄ™drzejewski-Szmek - 2.23_08-28 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Sun Jan 19 2025 Fedora Release Engineering - 2.23_08-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 26 2024 Miroslav SuchĂ˝ - 2.23_08-26 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 2.23_08-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 2.23_08-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 2.23_08-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 2.23_08-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 2.23_08-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 2.23_08-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sat Jan 15 2022 SĂ©rgio Basto - 2.23_08-19 +- Add some patches from Debian, fix gcc10 common support + +* Sat Jan 15 2022 SĂ©rgio Basto - 2.23_08-18 +- Fix warning message (#2040985) + +* Fri Jul 23 2021 Fedora Release Engineering - 2.23_08-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 2.23_08-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 2.23_08-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 2.23_08-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 2.23_08-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 2.23_08-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 2.23_08-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 2.23_08-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 2.23_08-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.23_08-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.23_08-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Jan 11 2017 SĂ©rgio Basto - 2.23_08-6 +- Add patch to fix some undefined behaviour by switching to memmove() (#1409349) + +* Tue Dec 20 2016 Robert Scheck - 2.23_08-5 +- Build on EPEL >= 7 against libdb-devel to enable DNS/GeoDB code + +* Thu Dec 01 2016 SĂ©rgio Basto - 2.23_08-4 +- Package review (#226536) +- Fix bogus date in changelog +- Enable-geoip +- Clean-up spec + +* Fri Feb 05 2016 Fedora Release Engineering - 2.23_08-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 2.23_08-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Aug 21 2014 Jan Kaluza - 2.23_08-1 +- update to new version 2.23-08 (#1119536) + +* Mon Aug 18 2014 Fedora Release Engineering - 2.23_05-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 2.23_05-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 2.23_05-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jun 11 2013 Remi Collet - 2.23_05-8 +- rebuild for new GD 2.1.0 + +* Fri Feb 15 2013 Fedora Release Engineering - 2.23_05-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jan 4 2013 Joe Orton - 2.23_05-6 +- fix config for 2.4 (#871494) + +* Sun Jul 22 2012 Fedora Release Engineering - 2.23_05-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Apr 25 2012 Joe Orton - 2.23_05-4 +- build (conditionally) against libdb-devel + +* Sat Jan 14 2012 Fedora Release Engineering - 2.23_05-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 06 2011 Adam Jackson - 2.23_05-2 +- Rebuild for new libpng + +* Thu Jul 14 2011 Joe Orton - 2.23_05-1 +- update to 2.23_05 + +* Mon Feb 07 2011 Fedora Release Engineering - 2.21_02-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Oct 17 2010 Ruben Kerkhof 2.21_02-4 +- Don't run cronjob unless configured in /etc/sysconfig/webalizer (merge review #298203) + * Mon Jul 27 2009 Fedora Release Engineering - 2.21_02-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild @@ -199,7 +350,7 @@ rm -rf $RPM_BUILD_ROOT * Thu Jul 3 2003 Joe Orton - rebuilt -* Wed Jun 05 2003 Elliot Lee +* Thu Jun 05 2003 Elliot Lee - rebuilt * Thu Jun 05 2003 Florian La Roche @@ -221,7 +372,7 @@ rm -rf $RPM_BUILD_ROOT * Mon Jul 01 2002 Than Ngo 2.01_10-8 - fix a bug in pre (bug #67634) -* Wed Jun 27 2002 Than Ngo 2.01_10-7 +* Thu Jun 27 2002 Than Ngo 2.01_10-7 - add shadow-utils in prereq * Fri Jun 21 2002 Tim Powers @@ -251,7 +402,7 @@ rm -rf $RPM_BUILD_ROOT * Mon Feb 25 2002 Than Ngo 2.01_09-5 - allows multiple partial log files to be used instead of one huge one.(bug #60295) -* Wed Feb 21 2002 Than Ngo 2.01_09-4 +* Thu Feb 21 2002 Than Ngo 2.01_09-4 - add function to enable/disable webalizer (bug #59752) * Wed Jan 09 2002 Tim Powers @@ -311,7 +462,7 @@ rm -rf $RPM_BUILD_ROOT * Wed Jul 12 2000 Than Ngo - rebuilt -* Sun Jun 19 2000 Karsten Hopp +* Mon Jun 19 2000 Karsten Hopp - rebuild for 7.0 - changed mandir - changed graph output to png instead of gif diff --git a/webalizer.sysconfig b/webalizer.sysconfig new file mode 100644 index 0000000..f436132 --- /dev/null +++ b/webalizer.sysconfig @@ -0,0 +1,5 @@ +# uncomment if you want webalizer to be run each day by +# /etc/cron.daily/00webalizer + +#WEBALIZER_CRON=yes +