diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-08-10 15:15:53 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-08-10 15:15:53 +0300 |
commit | 0e75d63c9aeacfedcffce7ff4e6c552c3cff227d (patch) | |
tree | f645c17beed2dcf7253c8410f100d66342e48dd3 | |
parent | dc761f6a343b8688c2c10957a9e80e77a0e5e63c (diff) | |
download | vmod-tbf-0e75d63c9aeacfedcffce7ff4e6c552c3cff227d.tar.gz vmod-tbf-0e75d63c9aeacfedcffce7ff4e6c552c3cff227d.tar.bz2 |
Support for varnish 5.1.release-2.2
* configure.ac: Set version 2.2
(AC_VMOD_BASENAME): New subst variable.
* NEWS: Document changes.
* acvmod: Updated.
* tests/Makefile.am: Define AT_VMOD_BASENAME in package.m4
* tests/atlocal.in: Add @VARNISH_SBINDIR@ to PATH.
* tests/check.at: Change the use of AT_VARNISHTEST macro.
* tests/checkf.at: Likewise.
* tests/dump.at: Likewise.
* tests/rate.at: Likewise.
* tests/ratef.at: Likewise.
* tests/strftime.at: Likewise.
-rw-r--r-- | NEWS | 6 | ||||
m--------- | acvmod | 0 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/atlocal.in | 2 | ||||
-rw-r--r-- | tests/check.at | 2 | ||||
-rw-r--r-- | tests/checkf.at | 2 | ||||
-rw-r--r-- | tests/dump.at | 2 | ||||
-rw-r--r-- | tests/rate.at | 2 | ||||
-rw-r--r-- | tests/ratef.at | 2 | ||||
-rw-r--r-- | tests/strftime.at | 2 |
11 files changed, 16 insertions, 10 deletions
@@ -1,11 +1,15 @@ | |||
1 | vmod-tbf -- history of user-visible changes. 2017-08-06 | 1 | vmod-tbf -- history of user-visible changes. 2017-08-10 |
2 | Copyright (C) 2013-2017 Sergey Poznyakoff | 2 | Copyright (C) 2013-2017 Sergey Poznyakoff |
3 | See the end of file for copying conditions. | 3 | See the end of file for copying conditions. |
4 | 4 | ||
5 | Please send vmod-tbf bug reports to <gray@gnu.org> | 5 | Please send vmod-tbf bug reports to <gray@gnu.org> |
6 | |||
7 | Version 2.2, 2017-08-10 | ||
8 | |||
9 | * Support for Varnish 5.1 | ||
6 | 10 | ||
7 | 11 | ||
8 | Version 2.1, 2017-08-06 | 12 | Version 2.1, 2017-08-06 |
9 | 13 | ||
10 | * Support for Varnish 4.1 | 14 | * Support for Varnish 4.1 |
11 | 15 | ||
diff --git a/acvmod b/acvmod | |||
Subproject ba32780019480b89cd9d796b93a76cae6afe99a | Subproject 5f6dce2f7dd35a154333bb42d134a018b981f81 | ||
diff --git a/configure.ac b/configure.ac index 04563c6..f42e2ef 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -11,18 +11,19 @@ | |||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | # GNU General Public License for more details. | 12 | # GNU General Public License for more details. |
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. |
16 | AC_PREREQ(2.69) | 16 | AC_PREREQ(2.69) |
17 | AC_INIT([vmod-tbf], 2.1, [gray@gnu.org]) | 17 | AC_INIT([vmod-tbf], 2.2, [gray@gnu.org]) |
18 | AC_CONFIG_AUX_DIR([build-aux]) | 18 | AC_CONFIG_AUX_DIR([build-aux]) |
19 | AC_CONFIG_MACRO_DIR([m4]) | 19 | AC_CONFIG_MACRO_DIR([m4]) |
20 | AC_CONFIG_SRCDIR(src/vmod_tbf.vcc) | 20 | AC_CONFIG_SRCDIR(src/vmod_tbf.vcc) |
21 | AM_CONFIG_HEADER(config.h) | 21 | AM_CONFIG_HEADER(config.h) |
22 | 22 | ||
23 | AC_SUBST([AC_VMOD_BASENAME],[tbf]) | ||
23 | AC_CANONICAL_SYSTEM | 24 | AC_CANONICAL_SYSTEM |
24 | AC_LANG(C) | 25 | AC_LANG(C) |
25 | 26 | ||
26 | AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules]) | 27 | AM_INIT_AUTOMAKE([1.14 gnu tar-ustar silent-rules]) |
27 | AM_SILENT_RULES([yes]) | 28 | AM_SILENT_RULES([yes]) |
28 | 29 | ||
@@ -42,13 +43,13 @@ AC_PROG_MAKE_SET | |||
42 | AC_HEADER_STDC | 43 | AC_HEADER_STDC |
43 | AC_CHECK_HEADERS(sys/sysinfo.h) | 44 | AC_CHECK_HEADERS(sys/sysinfo.h) |
44 | 45 | ||
45 | # Check for functions | 46 | # Check for functions |
46 | AC_CHECK_FUNCS(sysinfo getloadavg) | 47 | AC_CHECK_FUNCS(sysinfo getloadavg) |
47 | 48 | ||
48 | AM_VARNISHAPI | 49 | AM_VARNISHAPI([4.1],[5.1]) |
49 | 50 | ||
50 | AC_CONFIG_TESTDIR(tests) | 51 | AC_CONFIG_TESTDIR(tests) |
51 | AC_CONFIG_FILES([tests/Makefile tests/atlocal]) | 52 | AC_CONFIG_FILES([tests/Makefile tests/atlocal]) |
52 | AM_MISSING_PROG([AUTOM4TE], [autom4te]) | 53 | AM_MISSING_PROG([AUTOM4TE], [autom4te]) |
53 | 54 | ||
54 | AC_CONFIG_FILES([ | 55 | AC_CONFIG_FILES([ |
diff --git a/tests/Makefile.am b/tests/Makefile.am index 30b0360..23fa477 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
@@ -28,12 +28,13 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac | |||
28 | echo '# Signature of the current package.'; \ | 28 | echo '# Signature of the current package.'; \ |
29 | echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ | 29 | echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ |
30 | echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ | 30 | echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ |
31 | echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ | 31 | echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ |
32 | echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ | 32 | echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ |
33 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ | 33 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ |
34 | echo 'm4_define([AT_VMOD_BASENAME], [@AC_VMOD_BASENAME@])'; \ | ||
34 | } >$(srcdir)/package.m4 | 35 | } >$(srcdir)/package.m4 |
35 | 36 | ||
36 | # | 37 | # |
37 | 38 | ||
38 | ## ------------ ## | 39 | ## ------------ ## |
39 | ## Test suite. ## | 40 | ## Test suite. ## |
diff --git a/tests/atlocal.in b/tests/atlocal.in index 9f80ebf..f901648 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in | |||
@@ -1,7 +1,7 @@ | |||
1 | # @configure_input@ -*- shell-script -*- | 1 | # @configure_input@ -*- shell-script -*- |
2 | # Configurable variable values for vmod_tbf test suite. | 2 | # Configurable variable values for vmod_tbf test suite. |
3 | # Copyright (C) 2017 Sergey Poznyakoff | 3 | # Copyright (C) 2017 Sergey Poznyakoff |
4 | 4 | ||
5 | PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH | 5 | PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:@VARNISH_SBINDIR@:$PATH |
6 | VARNISHTEST=@VARNISHTEST@ | 6 | VARNISHTEST=@VARNISHTEST@ |
7 | VARNISHD=@VARNISHD@ | 7 | VARNISHD=@VARNISHD@ |
diff --git a/tests/check.at b/tests/check.at index f45c1b1..9ed2974 100644 --- a/tests/check.at +++ b/tests/check.at | |||
@@ -12,13 +12,13 @@ | |||
12 | # GNU General Public License for more details. | 12 | # GNU General Public License for more details. |
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. |
16 | AT_SETUP([check]) | 16 | AT_SETUP([check]) |
17 | AT_KEYWORDS([check]) | 17 | AT_KEYWORDS([check]) |
18 | AT_VARNISHTEST([tbf],[ | 18 | AT_VARNISHTEST([ |
19 | sub vcl_recv { | 19 | sub vcl_recv { |
20 | if (!tbf.check("url:"+req.url, "4 req/s")) { | 20 | if (!tbf.check("url:"+req.url, "4 req/s")) { |
21 | return (synth(420, "Overlimit")); | 21 | return (synth(420, "Overlimit")); |
22 | } | 22 | } |
23 | } | 23 | } |
24 | ], | 24 | ], |
diff --git a/tests/checkf.at b/tests/checkf.at index c4155ba..f85c4a4 100644 --- a/tests/checkf.at +++ b/tests/checkf.at | |||
@@ -12,13 +12,13 @@ | |||
12 | # GNU General Public License for more details. | 12 | # GNU General Public License for more details. |
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. |
16 | AT_SETUP([check flow]) | 16 | AT_SETUP([check flow]) |
17 | AT_KEYWORDS([checkf flow]) | 17 | AT_KEYWORDS([checkf flow]) |
18 | AT_VARNISHTEST([tbf],[ | 18 | AT_VARNISHTEST([ |
19 | sub vcl_deliver { | 19 | sub vcl_deliver { |
20 | set resp.http.result = tbf.check("url:"+req.url, "4req/s"); | 20 | set resp.http.result = tbf.check("url:"+req.url, "4req/s"); |
21 | } | 21 | } |
22 | ], | 22 | ], |
23 | [ txreq -url "/" | 23 | [ txreq -url "/" |
24 | rxresp | 24 | rxresp |
diff --git a/tests/dump.at b/tests/dump.at index b4230de..6602697 100644 --- a/tests/dump.at +++ b/tests/dump.at | |||
@@ -13,13 +13,13 @@ | |||
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | AT_SETUP([dump/load facilities]) | 17 | AT_SETUP([dump/load facilities]) |
18 | AT_KEYWORDS([dump load]) | 18 | AT_KEYWORDS([dump load]) |
19 | AT_VARNISHTEST([tbf],[ | 19 | AT_VARNISHTEST([ |
20 | # sub vcl_init { | 20 | # sub vcl_init { |
21 | # tbf.debug(20); | 21 | # tbf.debug(20); |
22 | # } | 22 | # } |
23 | sub vcl_recv { | 23 | sub vcl_recv { |
24 | if (req.url == "/dump") { | 24 | if (req.url == "/dump") { |
25 | tbf.dump("/tmp/test05.dump"); | 25 | tbf.dump("/tmp/test05.dump"); |
diff --git a/tests/rate.at b/tests/rate.at index 75d9df4..e13473d 100644 --- a/tests/rate.at +++ b/tests/rate.at | |||
@@ -13,13 +13,13 @@ | |||
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | AT_SETUP([rate]) | 17 | AT_SETUP([rate]) |
18 | AT_KEYWORDS([rate]) | 18 | AT_KEYWORDS([rate]) |
19 | AT_VARNISHTEST([tbf],[ | 19 | AT_VARNISHTEST([ |
20 | sub vcl_recv { | 20 | sub vcl_recv { |
21 | if (!tbf.rate("url:"+req.url, 1, 20 s, 5)) { | 21 | if (!tbf.rate("url:"+req.url, 1, 20 s, 5)) { |
22 | return (synth(420, "Overlimit")); | 22 | return (synth(420, "Overlimit")); |
23 | } | 23 | } |
24 | return (hash); | 24 | return (hash); |
25 | } | 25 | } |
diff --git a/tests/ratef.at b/tests/ratef.at index d0dc7ea..40a86e6 100644 --- a/tests/ratef.at +++ b/tests/ratef.at | |||
@@ -13,13 +13,13 @@ | |||
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | AT_SETUP([rate flow]) | 17 | AT_SETUP([rate flow]) |
18 | AT_KEYWORDS([ratef flow]) | 18 | AT_KEYWORDS([ratef flow]) |
19 | AT_VARNISHTEST([tbf],[ | 19 | AT_VARNISHTEST([ |
20 | sub vcl_deliver { | 20 | sub vcl_deliver { |
21 | set resp.http.result = tbf.rate("url:"+req.url, 1, 1s, 5); | 21 | set resp.http.result = tbf.rate("url:"+req.url, 1, 1s, 5); |
22 | } | 22 | } |
23 | ], | 23 | ], |
24 | [ txreq -url "/" | 24 | [ txreq -url "/" |
25 | rxresp | 25 | rxresp |