upgrade to 1.16

PR:		39122
Submitted by:	maintainer
This commit is contained in:
Ying-Chieh Liao 2002-06-22 17:00:49 +00:00
parent f62de4539b
commit 1e4c192609
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61738
6 changed files with 178 additions and 96 deletions

View file

@ -5,9 +5,10 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= mod_log_mysql PORTNAME= mod_log_mysql
PORTVERSION= 1.14 PORTVERSION= 1.16
CATEGORIES= www databases CATEGORIES= www databases
MASTER_SITES= http://www.grubbybaby.com/mod_log_mysql/ MASTER_SITES= http://www.grubbybaby.com/mod_log_sql/
DISTFILES= mod_log_sql-${PORTVERSION}
MAINTAINER= lev@serebryakov.spb.ru MAINTAINER= lev@serebryakov.spb.ru
@ -26,17 +27,17 @@ HAVE_MOD_SSL=
MOD_SSL_HEADER= ${LOCALBASE}/include/apache/mod_ssl.h MOD_SSL_HEADER= ${LOCALBASE}/include/apache/mod_ssl.h
.if exists(${MOD_SSL_HEADER}) .if exists(${MOD_SSL_HEADER})
HAVE_MOD_SSL= -DWANT_SSL_LOGGING
do-configure: do-configure:
@${ECHO_MSG} "Make with mod_ssl support" @${ECHO_MSG} "Make with mod_ssl support"
.else .else
do-configure: do-configure:
@${ECHO_MSG} "Make without mod_ssl support" @${ECHO_MSG} "Make without mod_ssl support"
@${PERL} -pi -e 's/#define WANT_SSL_LOGGING/#undef WANT_SSL_LOGGING/' ${WRKSRC}/mod_log_mysql.c
.endif .endif
do-build: do-build:
@cd ${WRKSRC} && ${APXS} -c -o ${PORTNAME}.so -I${LOCALBASE}/include \ @cd ${WRKSRC} && ${APXS} -c -o ${PORTNAME}.so -I${LOCALBASE}/include \
-L${LOCALBASE}/lib/mysql -lmysqlclient -DMYSQLSOCKET=\\\"/tmp/mysql.sock\\\" ${HAVE_MOD_SSL} ${PORTNAME}.c -L${LOCALBASE}/lib/mysql -lmysqlclient ${PORTNAME}.c
do-install: do-install:
cd ${WRKSRC} && ${APXS} -i -n${PORTNAME:S/^mod_//} -A ${PORTNAME}.so cd ${WRKSRC} && ${APXS} -i -n${PORTNAME:S/^mod_//} -A ${PORTNAME}.so

View file

@ -1 +1 @@
MD5 (mod_log_mysql-1.14.tar.gz) = 9882fefb3446d119cf260666f64726bf MD5 (mod_log_sql-1.16) = 1a6e44e98ed631a20390727b993840c4

View file

@ -1,92 +1,132 @@
--- mod_log_mysql.c.orig Fri Feb 1 11:02:55 2002 --- mod_log_mysql.c.orig Mon Jun 10 21:57:51 2002
+++ mod_log_mysql.c Fri Feb 1 11:03:36 2002 +++ mod_log_mysql.c Mon Jun 10 21:58:12 2002
@@ -31,7 +31,7 @@ @@ -41,7 +41,7 @@
* -------------*/
/* Declare ourselves so the configuration routines can find and know us. */
/* DECLARATIONS */
-module mysql_log_module; -module mysql_log_module;
+module log_mysql_module; +module log_mysql_module;
MYSQL sql_server, *mysql_log = NULL; /* The contents of these are known 'Apache wide' and are not variable
* on a per-virtual-server basis. Every virtual server 'knows' the
@@ -320,7 +320,7 @@
char *isvalid;
char *cookiebuf;
@@ -539,7 +539,7 @@ - log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
const char *set_referer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) #ifdef DEBUG
ap_log_error(APLOG_MARK,DEBUGLEVEL,r->server,"watching for cookie '%s'", cls->cookie_name);
@@ -509,7 +509,7 @@
void preserve_entry(request_rec *r, const char *query)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); FILE *fp;
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); - log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
cls->referer_table_name = arg; fp = pfopen(r->pool, cls->preserve_file, "a");
return NULL; if (fp == NULL)
@@ -548,7 +548,7 @@ @@ -548,7 +548,7 @@
* at any time, hence the check. */
if ( retval != 0 )
{
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
const char *set_agent_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) /* Something went wrong, so start by trying to restart the db link. */
ap_log_error(APLOG_MARK,ERRLEVEL,r->server,"attempting reconnect because API said: %s", mysql_error(mysql_log));
@@ -621,7 +621,7 @@
const char *set_log_mysql_cookie(cmd_parms *parms, void *dummy, char *arg)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->agent_table_name = arg; cls->cookie_name = arg;
return NULL; return NULL;
@@ -557,7 +557,7 @@ @@ -630,7 +630,7 @@
const char *set_log_mysql_preserve_file(cmd_parms *parms, void *dummy, char *arg)
{
char *pfile;
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
pfile = ap_pstrcat(parms->pool, "/tmp/", arg, NULL);
cls->preserve_file = pfile;
@@ -653,7 +653,7 @@
const char *set_transfer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) const char *set_transfer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->transfer_table_name = arg; if (massvirtual != 0)
return NULL; ap_log_error(APLOG_MARK,WARNINGLEVEL,parms->server,"do not set MySQLTransferLogTable when MySQLMassVirtualHosting is On. Ignoring.");
@@ -566,7 +566,7 @@ @@ -664,7 +664,7 @@
const char *set_transfer_log_format(cmd_parms *parms, void *dummy, char *arg) const char *set_mysql_transfer_log_format(cmd_parms *parms, void *dummy, char *arg)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->transfer_log_format = arg; cls->transfer_log_format = arg;
return NULL; return NULL;
@@ -604,7 +604,7 @@ @@ -680,7 +680,7 @@
const char *add_referer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{ {
char **addme; char **addme;
log_mysql_state *cls = get_module_config(parms->server->module_config, - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
+ &log_mysql_module);
addme = push_array(cls->referer_ignore_list); addme = push_array(cls->referer_ignore_list);
*addme = pstrdup(cls->referer_ignore_list->pool, arg); *addme = pstrdup(cls->referer_ignore_list->pool, arg);
@@ -615,7 +615,7 @@ @@ -690,7 +690,7 @@
const char *add_transfer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{ {
char **addme; char **addme;
log_mysql_state *cls = get_module_config(parms->server->module_config, - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
+ &log_mysql_module);
addme = push_array(cls->transfer_ignore_list); addme = push_array(cls->transfer_ignore_list);
*addme = pstrdup(cls->transfer_ignore_list->pool, arg); *addme = pstrdup(cls->transfer_ignore_list->pool, arg);
@@ -626,7 +626,7 @@ @@ -700,7 +700,7 @@
const char *add_remhost_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{ {
char **addme; char **addme;
log_mysql_state *cls = get_module_config(parms->server->module_config, - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
+ &log_mysql_module);
addme = push_array(cls->remhost_ignore_list); addme = push_array(cls->remhost_ignore_list);
*addme = pstrdup(cls->remhost_ignore_list->pool, arg); *addme = pstrdup(cls->remhost_ignore_list->pool, arg);
@@ -702,7 +702,7 @@ @@ -755,10 +755,10 @@
{
server_rec *s;
- log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &mysql_log_module);
+ log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &log_mysql_module);
for (server_rec *s = main_server; s; s = s->next) {
- conf = ap_get_module_config(s->module_config, &mysql_log_module);
+ conf = ap_get_module_config(s->module_config, &log_mysql_module);
if (conf->transfer_log_format == NULL && s != main_server) {
*conf = *main_conf;
}
@@ -847,7 +847,7 @@
int log_mysql_transaction(request_rec *orig)
{ {
char **ptrptr, **ptrptr2; char **ptrptr, **ptrptr2;
log_mysql_state *cls = get_module_config(orig->server->module_config, - log_mysql_state *cls = get_module_config(orig->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(orig->server->module_config, &log_mysql_module);
+ &log_mysql_module); const char *str;
char *str;
const char *referer;
request_rec *r; request_rec *r;
@@ -856,7 +856,7 @@
@@ -1042,7 +1042,7 @@
/* The configuration array that sets up the hooks into the module. */ /* The configuration array that sets up the hooks into the module. */
-module mysql_log_module = { -module mysql_log_module = {
+module log_mysql_module = { +module log_mysql_module = {
STANDARD_MODULE_STUFF, STANDARD_MODULE_STUFF,
NULL, /* initializer */ NULL, /* module initializer */
NULL, /* create per-dir config */ NULL, /* create per-dir config */

View file

@ -5,9 +5,10 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= mod_log_mysql PORTNAME= mod_log_mysql
PORTVERSION= 1.14 PORTVERSION= 1.16
CATEGORIES= www databases CATEGORIES= www databases
MASTER_SITES= http://www.grubbybaby.com/mod_log_mysql/ MASTER_SITES= http://www.grubbybaby.com/mod_log_sql/
DISTFILES= mod_log_sql-${PORTVERSION}
MAINTAINER= lev@serebryakov.spb.ru MAINTAINER= lev@serebryakov.spb.ru
@ -26,17 +27,17 @@ HAVE_MOD_SSL=
MOD_SSL_HEADER= ${LOCALBASE}/include/apache/mod_ssl.h MOD_SSL_HEADER= ${LOCALBASE}/include/apache/mod_ssl.h
.if exists(${MOD_SSL_HEADER}) .if exists(${MOD_SSL_HEADER})
HAVE_MOD_SSL= -DWANT_SSL_LOGGING
do-configure: do-configure:
@${ECHO_MSG} "Make with mod_ssl support" @${ECHO_MSG} "Make with mod_ssl support"
.else .else
do-configure: do-configure:
@${ECHO_MSG} "Make without mod_ssl support" @${ECHO_MSG} "Make without mod_ssl support"
@${PERL} -pi -e 's/#define WANT_SSL_LOGGING/#undef WANT_SSL_LOGGING/' ${WRKSRC}/mod_log_mysql.c
.endif .endif
do-build: do-build:
@cd ${WRKSRC} && ${APXS} -c -o ${PORTNAME}.so -I${LOCALBASE}/include \ @cd ${WRKSRC} && ${APXS} -c -o ${PORTNAME}.so -I${LOCALBASE}/include \
-L${LOCALBASE}/lib/mysql -lmysqlclient -DMYSQLSOCKET=\\\"/tmp/mysql.sock\\\" ${HAVE_MOD_SSL} ${PORTNAME}.c -L${LOCALBASE}/lib/mysql -lmysqlclient ${PORTNAME}.c
do-install: do-install:
cd ${WRKSRC} && ${APXS} -i -n${PORTNAME:S/^mod_//} -A ${PORTNAME}.so cd ${WRKSRC} && ${APXS} -i -n${PORTNAME:S/^mod_//} -A ${PORTNAME}.so

View file

@ -1 +1 @@
MD5 (mod_log_mysql-1.14.tar.gz) = 9882fefb3446d119cf260666f64726bf MD5 (mod_log_sql-1.16) = 1a6e44e98ed631a20390727b993840c4

View file

@ -1,92 +1,132 @@
--- mod_log_mysql.c.orig Fri Feb 1 11:02:55 2002 --- mod_log_mysql.c.orig Mon Jun 10 21:57:51 2002
+++ mod_log_mysql.c Fri Feb 1 11:03:36 2002 +++ mod_log_mysql.c Mon Jun 10 21:58:12 2002
@@ -31,7 +31,7 @@ @@ -41,7 +41,7 @@
* -------------*/
/* Declare ourselves so the configuration routines can find and know us. */
/* DECLARATIONS */
-module mysql_log_module; -module mysql_log_module;
+module log_mysql_module; +module log_mysql_module;
MYSQL sql_server, *mysql_log = NULL; /* The contents of these are known 'Apache wide' and are not variable
* on a per-virtual-server basis. Every virtual server 'knows' the
@@ -320,7 +320,7 @@
char *isvalid;
char *cookiebuf;
@@ -539,7 +539,7 @@ - log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
const char *set_referer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) #ifdef DEBUG
ap_log_error(APLOG_MARK,DEBUGLEVEL,r->server,"watching for cookie '%s'", cls->cookie_name);
@@ -509,7 +509,7 @@
void preserve_entry(request_rec *r, const char *query)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); FILE *fp;
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); - log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
cls->referer_table_name = arg; fp = pfopen(r->pool, cls->preserve_file, "a");
return NULL; if (fp == NULL)
@@ -548,7 +548,7 @@ @@ -548,7 +548,7 @@
* at any time, hence the check. */
if ( retval != 0 )
{
- log_mysql_state *cls = get_module_config(r->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(r->server->module_config, &log_mysql_module);
const char *set_agent_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) /* Something went wrong, so start by trying to restart the db link. */
ap_log_error(APLOG_MARK,ERRLEVEL,r->server,"attempting reconnect because API said: %s", mysql_error(mysql_log));
@@ -621,7 +621,7 @@
const char *set_log_mysql_cookie(cmd_parms *parms, void *dummy, char *arg)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->agent_table_name = arg; cls->cookie_name = arg;
return NULL; return NULL;
@@ -557,7 +557,7 @@ @@ -630,7 +630,7 @@
const char *set_log_mysql_preserve_file(cmd_parms *parms, void *dummy, char *arg)
{
char *pfile;
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
pfile = ap_pstrcat(parms->pool, "/tmp/", arg, NULL);
cls->preserve_file = pfile;
@@ -653,7 +653,7 @@
const char *set_transfer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg) const char *set_transfer_log_mysql_table(cmd_parms *parms, void *dummy, char *arg)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->transfer_table_name = arg; if (massvirtual != 0)
return NULL; ap_log_error(APLOG_MARK,WARNINGLEVEL,parms->server,"do not set MySQLTransferLogTable when MySQLMassVirtualHosting is On. Ignoring.");
@@ -566,7 +566,7 @@ @@ -664,7 +664,7 @@
const char *set_transfer_log_format(cmd_parms *parms, void *dummy, char *arg) const char *set_mysql_transfer_log_format(cmd_parms *parms, void *dummy, char *arg)
{ {
- log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module); - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
+ log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
cls->transfer_log_format = arg; cls->transfer_log_format = arg;
return NULL; return NULL;
@@ -604,7 +604,7 @@ @@ -680,7 +680,7 @@
const char *add_referer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{ {
char **addme; char **addme;
log_mysql_state *cls = get_module_config(parms->server->module_config, - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
+ &log_mysql_module);
addme = push_array(cls->referer_ignore_list); addme = push_array(cls->referer_ignore_list);
*addme = pstrdup(cls->referer_ignore_list->pool, arg); *addme = pstrdup(cls->referer_ignore_list->pool, arg);
@@ -615,7 +615,7 @@ @@ -690,7 +690,7 @@
const char *add_transfer_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{ {
char **addme; char **addme;
log_mysql_state *cls = get_module_config(parms->server->module_config, - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
+ &log_mysql_module);
addme = push_array(cls->transfer_ignore_list); addme = push_array(cls->transfer_ignore_list);
*addme = pstrdup(cls->transfer_ignore_list->pool, arg); *addme = pstrdup(cls->transfer_ignore_list->pool, arg);
@@ -626,7 +626,7 @@ @@ -700,7 +700,7 @@
const char *add_remhost_mysql_ignore(cmd_parms *parms, void *dummy, char *arg)
{ {
char **addme; char **addme;
log_mysql_state *cls = get_module_config(parms->server->module_config, - log_mysql_state *cls = get_module_config(parms->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(parms->server->module_config, &log_mysql_module);
+ &log_mysql_module);
addme = push_array(cls->remhost_ignore_list); addme = push_array(cls->remhost_ignore_list);
*addme = pstrdup(cls->remhost_ignore_list->pool, arg); *addme = pstrdup(cls->remhost_ignore_list->pool, arg);
@@ -702,7 +702,7 @@ @@ -755,10 +755,10 @@
{
server_rec *s;
- log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &mysql_log_module);
+ log_mysql_state main_conf = ap_get_module_config(main_server->module_config, &log_mysql_module);
for (server_rec *s = main_server; s; s = s->next) {
- conf = ap_get_module_config(s->module_config, &mysql_log_module);
+ conf = ap_get_module_config(s->module_config, &log_mysql_module);
if (conf->transfer_log_format == NULL && s != main_server) {
*conf = *main_conf;
}
@@ -847,7 +847,7 @@
int log_mysql_transaction(request_rec *orig)
{ {
char **ptrptr, **ptrptr2; char **ptrptr, **ptrptr2;
log_mysql_state *cls = get_module_config(orig->server->module_config, - log_mysql_state *cls = get_module_config(orig->server->module_config, &mysql_log_module);
- &mysql_log_module); + log_mysql_state *cls = get_module_config(orig->server->module_config, &log_mysql_module);
+ &log_mysql_module); const char *str;
char *str;
const char *referer;
request_rec *r; request_rec *r;
@@ -856,7 +856,7 @@
@@ -1042,7 +1042,7 @@
/* The configuration array that sets up the hooks into the module. */ /* The configuration array that sets up the hooks into the module. */
-module mysql_log_module = { -module mysql_log_module = {
+module log_mysql_module = { +module log_mysql_module = {
STANDARD_MODULE_STUFF, STANDARD_MODULE_STUFF,
NULL, /* initializer */ NULL, /* module initializer */
NULL, /* create per-dir config */ NULL, /* create per-dir config */