aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am14
-rw-r--r--NEWS17
m---------acvmod0
-rw-r--r--configure.ac4
-rw-r--r--git2chg.awk75
-rw-r--r--src/Makefile.am11
-rw-r--r--src/binlog.c25
-rw-r--r--tests/atlocal.in5
8 files changed, 32 insertions, 119 deletions
diff --git a/Makefile.am b/Makefile.am
index 9c03c59..2e8bde2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,8 @@
# This file is part of vmod-binlog
-# Copyright (C) 2013-2014, 2016 Sergey Poznyakoff
+# Copyright (C) 2013-2014, 2016, 2017 Sergey Poznyakoff
#
# Vmod-binlog is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
@@ -14,17 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
ACLOCAL_AMFLAGS = -I m4 -I acvmod
SUBDIRS = libltdl src tests doc
-AM_DISTCHECK_CONFIGURE_FLAGS=--without-vmoddir
-
-EXTRA_DIST=git2chg.awk
-
-.PHONY: ChangeLog
-ChangeLog:
- $(AM_V_GEN)if test -d .git; then \
- git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \
- awk -f $(top_srcdir)/git2chg.awk > ChangeLog; \
- fi
-
+include acvmod/top.am
diff --git a/NEWS b/NEWS
index 27b4772..ed890ca 100644
--- a/NEWS
+++ b/NEWS
@@ -1,20 +1,21 @@
-Vmod-binlog NEWS -- history of user-visible changes. 2016-01-24
-Copyright (C) 2013-2016 Sergey Poznyakoff
+Vmod-binlog NEWS -- history of user-visible changes. 2017-08-05
+Copyright (C) 2013-2017 Sergey Poznyakoff
See the end of file for copying conditions.
Please send Vmod-binlog bug reports to <gray@gnu.org>
-Version 2.0.90-4.1.0 (Git)
+Version 2.0.92 (Git)
-* Versioning changes
+* Support for Varnish 4.1
-Starting with this release, the version number includes version
-of Varnish API the release was designed for.
+* The --with-varnish-source option has been withdrawn
+
+The configure script relies on pkg-config to determine the location of
+Varnish header files and libraries.
-* Support for Varnish 4,1
Version 2,0, 2014-11-13
Support for VCL 4.0
@@ -22,13 +23,13 @@ Version 1.0, 2013-10-19
Initial release.
* Copyright information:
-Copyright (C) 2013-2016 Sergey Poznyakoff
+Copyright (C) 2013-2017 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
copyright notice and this permission notice are preserved,
thus giving the recipient permission to redistribute in turn.
diff --git a/acvmod b/acvmod
-Subproject f064cf4d7aa1ead1f8607b8b72baf883f015ffc
+Subproject ba32780019480b89cd9d796b93a76cae6afe99a
diff --git a/configure.ac b/configure.ac
index 3be0b79..4a72590 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
# This file is part of vmod-binlog
-# Copyright (C) 2013, 2014, 2016 Sergey Poznyakoff
+# Copyright (C) 2013-2017 Sergey Poznyakoff
#
# Vmod-binlog is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
@@ -11,13 +11,13 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.69)
-AC_INIT([vmod-binlog], 2.0.90-4.1.0, [gray@gnu.org])
+AC_INIT([vmod-binlog], 2.0.92, [gray@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/binlog.c)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
diff --git a/git2chg.awk b/git2chg.awk
deleted file mode 100644
index 6dad87e..0000000
--- a/git2chg.awk
+++ /dev/null
@@ -1,75 +0,0 @@
-# This file is part of grecs
-# Copyright (C) 2007-2014 Sergey Poznyakoff
-#
-# Grecs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# Grecs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
-
-BEGIN {
- if (since)
- split(since,since_a,"-")
-}
-
-function timeok(t, a) {
- if (!since)
- return 1
- split(t,a,"-")
- if (a[1] < since_a[1])
- return 0
- if (a[1] > since_a[1])
- return 1
- if (a[2] < since_a[2])
- return 0
- if (a[2] > since_a[2])
- return 1
- return a[3] > since_a[3]
-}
-
-/^[0-9]+ .* +<[^>]+>/ {
- s = strftime("%F", $1)
- if (!timeok(s))
- exit
- sub(/^[0-9]+ +/,"")
- if (s == datestr && author == $0)
- next
- datestr = s
- author = $0
- if (runlen) { runlen = 0; print "" }
- printf("%s %s\n", datestr, author)
- next
-}
-/^Signed-off-by:/ { next }
-/^<unknown>$/ { next }
-NF==0 {
- runlen++
- next
-}
-{ if (runlen) { runlen = 0; print "" }
- print "\t" $0 }
-
-END {
- if (append) {
- print ""
- while ((getline < append) > 0) {
- if (match($0, /^Local *Variables:/))
- break
- print
- }
- }
- print "\f"
- # Make sure Emacs won't recognize this line:
- print "Local", "Variables:"
- print "mode: change-log"
- print "version-control: never"
- print "buffer-read-only: t"
- print "End:"
-}
diff --git a/src/Makefile.am b/src/Makefile.am
index 5a525de..2b0f953 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,8 @@
# This file is part of vmod-binlog
-# Copyright (C) 2013-2014, 2016 Sergey Poznyakoff
+# Copyright (C) 2013-2017 Sergey Poznyakoff
#
# Vmod-binlog is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
@@ -11,16 +11,14 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vmod-binlog. If not, see <http://www.gnu.org/licenses/>.
-AM_CPPFLAGS =\
- -I$(VARNISHSRC)/include\
- -I$(VARNISHSRC)/bin/varnishd\
- -I$(VARNISHSRC)
+AM_CPPFLAGS=\
+ $(VARNISHAPI_CFLAGS)
noinst_LIBRARIES = libbinlog.a
libbinlog_a_SOURCES = pack.c err.c parse-datetime.y xalloc.c
libbinlog_a_CFLAGS = $(AM_CFLAGS)
bin_PROGRAMS = binlogcat binlogsel
@@ -46,16 +44,15 @@ nodist_libvmod_binlog_la_SOURCES = vcc_if.c vcc_if.h
noinst_HEADERS = pack.h err.h parse-datetime.h xalloc.h
binlog.lo: vcc_if.c vcc_if.h
CLEANFILES = vcc_if.c vcc_if.h *.rst
-vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict
vccfile = $(top_srcdir)/src/vmod.vcc
vcc_if.c vcc_if.h: $(vmodtool) $(vccfile)
- $(AM_V_GEN)$(PYTHON) $(vmodtool) $(vmodtoolargs) $(vccfile)
+ $(AM_V_GEN)$(PYTHON) $(VARNISHAPI_VMODTOOL) $(vmodtoolargs) $(vccfile)
EXTRA_DIST = vmod.vcc
diff --git a/src/binlog.c b/src/binlog.c
index 1bf5950..b2d581c 100644
--- a/src/binlog.c
+++ b/src/binlog.c
@@ -1,8 +1,8 @@
/* This file is part of vmod-binlog
- Copyright (C) 2013, 2014, 2016 Sergey Poznyakoff
+ Copyright (C) 2013, 2014, 2016, 2017 Sergey Poznyakoff
Vmod-binlog is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
@@ -28,14 +28,13 @@
#include <ctype.h>
#include <time.h>
#include "vcl.h"
#include "vrt.h"
#include "vcc_if.h"
-#include "bin/varnishd/cache/cache.h"
-#define MOD_CTX const struct vrt_ctx *
+#include "cache/cache.h"
#define WSPTR(s) ((s)->ws)
#include "vmod-binlog.h"
#include "pack.h"
#include "pthread.h"
@@ -267,13 +266,13 @@ static void
make_key()
{
pthread_key_create(&thread_key, env_free);
}
void
-vmod_init(MOD_CTX ctx, struct vmod_priv *priv,
+vmod_init(VRT_CTX, struct vmod_priv *priv,
const char *dir, const char *format, const char *param)
{
struct binlog_config *conf = priv->priv;
struct stat st;
char *p, *q;
unsigned long n;
@@ -431,13 +430,13 @@ vmod_init(MOD_CTX ctx, struct vmod_priv *priv,
pthread_once(&thread_once, make_key);
pthread_mutex_init(&conf->mutex, NULL);
}
static char *
-mkfilename(MOD_CTX ctx, struct binlog_config *conf)
+mkfilename(VRT_CTX, struct binlog_config *conf)
{
time_t ts = time(NULL);
size_t u, n;
char *p, *q;
if (conf->flags & BLF_ROUNDTS)
@@ -486,13 +485,13 @@ mkdir_p(struct binlog_config *conf, char *dir)
*p = '/';
}
return rc;
}
static int
-createfile(MOD_CTX ctx, struct binlog_config *conf)
+createfile(VRT_CTX, struct binlog_config *conf)
{
char *fname;
int fd;
conf->fname = NULL;
conf->fd = -1;
@@ -596,13 +595,13 @@ checkheader(struct binlog_config *conf, size_t hdrsize)
return 1;
}
return 0;
}
static int
-newfile(MOD_CTX ctx, struct binlog_config *conf)
+newfile(VRT_CTX, struct binlog_config *conf)
{
int c;
void *base;
size_t hdrsize;
struct stat st;
int reuse = 0;
@@ -680,13 +679,13 @@ newfile(MOD_CTX ctx, struct binlog_config *conf)
conf->recnum = binlog_recnum(conf);
return 0;
}
static void
-closefile(MOD_CTX ctx, struct binlog_config *conf)
+closefile(VRT_CTX, struct binlog_config *conf)
{
size_t size;
if (conf->fd == -1)
return;
debug(conf,1,("closing log file %s",conf->fname));
@@ -698,13 +697,13 @@ closefile(MOD_CTX ctx, struct binlog_config *conf)
close(conf->fd);
free(conf->fname);
reset(conf);
}
VCL_VOID
-vmod_start(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_start(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;
time_t ts;
struct binlog_env *ep;
if (!conf)
@@ -721,13 +720,13 @@ vmod_start(MOD_CTX ctx, struct vmod_priv *priv)
ep = binlog_env_get();
binlog_env_init(ep, conf, ts);
}
VCL_VOID
-vmod_pack(MOD_CTX ctx, struct vmod_priv *priv, VCL_STRING str)
+vmod_pack(VRT_CTX, struct vmod_priv *priv, VCL_STRING str)
{
struct binlog_config *conf = priv->priv;
struct binlog_env *ep = binlog_env_get();
char *argv[2];
if (!conf)
@@ -756,13 +755,13 @@ vmod_pack(MOD_CTX ctx, struct vmod_priv *priv, VCL_STRING str)
ep->inst_cur = packinnext(ep->inst_cur, ep->env);
ep->state = state_pack;
}
VCL_VOID
-vmod_commit(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_commit(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;
struct binlog_env *ep = binlog_env_get();
if (!conf)
return;
@@ -796,13 +795,13 @@ vmod_commit(MOD_CTX ctx, struct vmod_priv *priv)
}
AZ(pthread_mutex_unlock(&conf->mutex));
ep->state = state_init;
}
VCL_VOID
-vmod_sync(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_sync(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;
if (!conf)
return;
@@ -810,13 +809,13 @@ vmod_sync(MOD_CTX ctx, struct vmod_priv *priv)
if (conf->base)
msync(conf->base, binlog_size(conf->base), 0);
AZ(pthread_mutex_unlock(&conf->mutex));
}
VCL_VOID
-vmod_close(MOD_CTX ctx, struct vmod_priv *priv)
+vmod_close(VRT_CTX, struct vmod_priv *priv)
{
struct binlog_config *conf = priv->priv;
if (!conf)
return;
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 176b83c..61d33f4 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -1,7 +1,8 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for vmod-binlog test suite.
-# Copyright (C) 2013-2014 Sergey Poznyakoff
+# Copyright (C) 2013-2017 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH
-VARNISHTEST="@VARNISHSRC@/bin/varnishtest/varnishtest -Dvarnishd=@VARNISHSRC@/bin/varnishd/varnishd"
+VARNISHD=@VARNISHD@
+VARNISHTEST="@VARNISHTEST@ -Dvarnishd=$VARNISHD"

Return to:

Send suggestions and report system problems to the System administrator.