Compare commits
67 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ff3142dec | ||
|
|
8ffd4aa838 | ||
|
|
cd03cfd35e | ||
|
|
e41ead8384 | ||
|
|
d58a4cf02b | ||
|
|
f606762777 | ||
|
|
a460dffebc | ||
|
|
23d6618718 | ||
|
|
76544a522a | ||
|
|
de6c53e2cc | ||
|
|
8b1129d9ad | ||
|
|
6ea465b0a4 | ||
|
|
81d3684180 | ||
|
|
0393f737dc | ||
|
|
0d3cd07b01 | ||
|
|
0755613f99 | ||
|
|
bfdd7a9fdc | ||
|
|
2364b8f829 | ||
|
|
10488a6706 | ||
|
|
6ed3472197 | ||
|
|
fb9883a65a | ||
|
|
29ad285f00 | ||
|
|
882c27d51d | ||
|
|
73ede280ee | ||
|
|
ffd7bda46a | ||
|
|
96e882feaf | ||
|
|
e27e672ae5 | ||
|
|
330de345c7 | ||
|
|
0c6c06513f | ||
|
|
94b56b762f | ||
|
|
f51397838e | ||
|
|
16c71a94e4 | ||
|
|
22dcc668e5 | ||
|
|
543f609a99 | ||
|
|
27cf399d7e | ||
|
|
93f3454722 | ||
|
|
2916424825 | ||
|
|
6dcb8de304 | ||
|
|
3e62ab6e09 | ||
|
|
9b7be58d03 | ||
|
|
e2d45a9f84 | ||
|
|
2a9d075e35 | ||
|
|
340e75cb09 | ||
|
|
8bf28a6b3b | ||
|
|
e9d0c6bd01 | ||
|
|
9a19a7885e | ||
|
|
4f0634a317 | ||
|
|
7c89415d95 | ||
|
|
f13282536a | ||
|
|
2337e6365c | ||
|
|
74cdd76263 | ||
|
|
264de2c9ca | ||
|
|
b356e59113 | ||
|
|
b7bc3ff1dc | ||
|
|
277f8d7330 | ||
|
|
7f0918b635 | ||
|
|
ccf12f158a | ||
|
|
52b4fb71bb | ||
| 6383f6392f | |||
|
|
37eb3e52dc | ||
|
|
19b4c3b33c | ||
|
|
7024c653b3 | ||
| a4e1a9e52b | |||
|
|
6e4e169390 | ||
|
|
c7b95e3fb4 | ||
|
|
5609cb8ed2 | ||
|
|
e90fd9a3c6 |
8 changed files with 3775 additions and 70 deletions
15
.gitignore
vendored
15
.gitignore
vendored
|
|
@ -1 +1,16 @@
|
|||
/varnish-modules-0.12.1.tar.gz
|
||||
/varnish-modules-0.15.0.tar.gz
|
||||
/varnish-modules-0032ed8.tar.gz
|
||||
/varnish-modules-0.16.0.tar.gz
|
||||
/varnish-modules-4d6593c.tar.gz
|
||||
/varnish-modules-0.17.1.tar.gz
|
||||
/varnish-modules-0.18.0.tar.gz
|
||||
/varnish-modules-0.19.0.tar.gz
|
||||
/varnish-modules-0.20.0.tar.gz
|
||||
/varnish-modules-0.21.0.tar.gz
|
||||
/varnish-modules-0.22.0.tar.gz
|
||||
/varnish-modules-0.24.0.tar.gz
|
||||
/varnish-modules-0.25.0.tar.gz
|
||||
/varnish-modules-0.26.0.tar.gz
|
||||
/varnish-modules-0.27.0.tar.gz
|
||||
/varnish-modules-0.28.0.tar.gz
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (varnish-modules-0.12.1.tar.gz) = 7b458aa8976db4392f26f32ffa33ebc461a9da5c952514e7a3a0e16bfb96e215d6a5f4a1e379113b7298eb6185ca6c5a02ac12ed1b3057caae66bebdb1b5d2a4
|
||||
SHA512 (varnish-modules-0.28.0.tar.gz) = 796f95ea6f8b69f6e4fb3daf327c4a6cccc9b6c927d8daace753aad7e443c1f937020465924e472ad65bb0a10e2e5bf85b6228afe3257dbfba0091750fbf300a
|
||||
|
|
|
|||
44
varnish-0.15.0.add.bootstrap.patch
Normal file
44
varnish-0.15.0.add.bootstrap.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
--- /dev/null 2019-09-18 14:09:23.308277474 +0200
|
||||
+++ bootstrap 2019-09-24 09:55:24.218322744 +0200
|
||||
@@ -0,0 +1,41 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+warn() {
|
||||
+ echo "WARNING: $@" 1>&2
|
||||
+}
|
||||
+
|
||||
+case `uname -s` in
|
||||
+Darwin)
|
||||
+ LIBTOOLIZE=glibtoolize
|
||||
+ ;;
|
||||
+FreeBSD)
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+ ;;
|
||||
+Linux)
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+ ;;
|
||||
+SunOS)
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+ ;;
|
||||
+*)
|
||||
+ warn "unrecognized platform:" `uname -s`
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+esac
|
||||
+
|
||||
+# check for varnishapi.m4 in custom paths
|
||||
+dataroot=$(pkg-config --variable=datarootdir varnishapi 2>/dev/null)
|
||||
+if [ -z "$dataroot" ] ; then
|
||||
+ cat >&2 <<'EOF'
|
||||
+Package varnishapi was not found in the pkg-config search path.
|
||||
+Perhaps you should add the directory containing `varnishapi.pc'
|
||||
+to the PKG_CONFIG_PATH environment variable
|
||||
+EOF
|
||||
+ exit 1
|
||||
+fi
|
||||
+set -ex
|
||||
+mkdir -p m4
|
||||
+aclocal -I m4 -I ${dataroot}/aclocal
|
||||
+$LIBTOOLIZE --copy --force
|
||||
+autoheader
|
||||
+automake --add-missing --copy --foreign
|
||||
+autoconf
|
||||
44
varnish-modules-0.15.0.add.bootstrap.patch
Normal file
44
varnish-modules-0.15.0.add.bootstrap.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
--- /dev/null 2019-09-28 14:48:27.937320545 +0200
|
||||
+++ bootstrap 2019-09-29 00:35:05.782099759 +0200
|
||||
@@ -0,0 +1,41 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+warn() {
|
||||
+ echo "WARNING: $@" 1>&2
|
||||
+}
|
||||
+
|
||||
+case `uname -s` in
|
||||
+Darwin)
|
||||
+ LIBTOOLIZE=glibtoolize
|
||||
+ ;;
|
||||
+FreeBSD)
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+ ;;
|
||||
+Linux)
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+ ;;
|
||||
+SunOS)
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+ ;;
|
||||
+*)
|
||||
+ warn "unrecognized platform:" `uname -s`
|
||||
+ LIBTOOLIZE=libtoolize
|
||||
+esac
|
||||
+
|
||||
+# check for varnishapi.m4 in custom paths
|
||||
+dataroot=$(pkg-config --variable=datarootdir varnishapi 2>/dev/null)
|
||||
+if [ -z "$dataroot" ] ; then
|
||||
+ cat >&2 <<'EOF'
|
||||
+Package varnishapi was not found in the pkg-config search path.
|
||||
+Perhaps you should add the directory containing `varnishapi.pc'
|
||||
+to the PKG_CONFIG_PATH environment variable
|
||||
+EOF
|
||||
+ exit 1
|
||||
+fi
|
||||
+set -ex
|
||||
+mkdir -p m4
|
||||
+aclocal -I m4 -I ${dataroot}/aclocal
|
||||
+$LIBTOOLIZE --copy --force
|
||||
+autoheader
|
||||
+automake --add-missing --copy --foreign
|
||||
+autoconf
|
||||
File diff suppressed because it is too large
Load diff
268
varnish-modules-0.15.0_fix_saintmode_for_varnish_6.1.patch
Normal file
268
varnish-modules-0.15.0_fix_saintmode_for_varnish_6.1.patch
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
From 918057c889d850940b0c8d6f2b14dc94d543bae4 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Goroll <nils.goroll@uplex.de>
|
||||
Date: Wed, 25 Apr 2018 17:02:04 +0200
|
||||
Subject: [PATCH 1/4] update for master
|
||||
a11939eb64427847ec11571d328696ba162f8c6a
|
||||
|
||||
---
|
||||
src/vmod_saintmode.c | 21 ++++++++++++++++-----
|
||||
1 file changed, 16 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/vmod_saintmode.c b/src/vmod_saintmode.c
|
||||
index 26191cc..4b4b874 100644
|
||||
--- a/src/vmod_saintmode.c
|
||||
+++ b/src/vmod_saintmode.c
|
||||
@@ -43,6 +43,11 @@
|
||||
|
||||
#include "vcc_saintmode_if.h"
|
||||
|
||||
+static unsigned
|
||||
+healthy(const struct director *, const struct busyobj *, double *);
|
||||
+static const struct director *
|
||||
+resolve(const struct director *, struct worker *, struct busyobj *);
|
||||
+
|
||||
struct trouble {
|
||||
unsigned magic;
|
||||
#define TROUBLE_MAGIC 0x4211ab21
|
||||
@@ -63,6 +68,14 @@ struct vmod_saintmode_saintmode {
|
||||
VTAILQ_HEAD(, trouble) troublelist;
|
||||
};
|
||||
|
||||
+static const struct director_methods vmod_saintmode_methods[1] = {{
|
||||
+ .magic = DIRECTOR_METHODS_MAGIC,
|
||||
+ .type = "saintmode",
|
||||
+ .healthy = healthy,
|
||||
+ .resolve = resolve
|
||||
+}};
|
||||
+
|
||||
+
|
||||
struct saintmode_objs {
|
||||
unsigned magic;
|
||||
#define SAINTMODE_OBJS_MAGIC 0x9aa7beec
|
||||
@@ -269,7 +282,7 @@ healthy(const struct director *dir, const struct busyobj *bo, double *changed)
|
||||
|
||||
/* Saintmode is disabled, or list is empty */
|
||||
if (sm->threshold == 0 || sm->n_trouble == 0)
|
||||
- return (sm->be->healthy(sm->be, bo, changed));
|
||||
+ return (sm->be->methods->healthy(sm->be, bo, changed));
|
||||
|
||||
if (!bo) {
|
||||
digest = NULL;
|
||||
@@ -282,7 +295,7 @@ healthy(const struct director *dir, const struct busyobj *bo, double *changed)
|
||||
}
|
||||
|
||||
retval = is_digest_healthy(dir, digest, t_prev, vsl);
|
||||
- return (retval ? sm->be->healthy(sm->be, bo, changed) : 0);
|
||||
+ return (retval ? sm->be->methods->healthy(sm->be, bo, changed) : 0);
|
||||
}
|
||||
|
||||
VCL_BOOL
|
||||
@@ -343,13 +356,11 @@ vmod_saintmode__init(VRT_CTX, struct vmod_saintmode_saintmode **smp,
|
||||
VTAILQ_INIT(&sm->troublelist);
|
||||
|
||||
sm->sdir->magic = DIRECTOR_MAGIC;
|
||||
- sm->sdir->resolve = resolve;
|
||||
- sm->sdir->healthy = healthy;
|
||||
+ sm->sdir->methods = vmod_saintmode_methods;
|
||||
#ifdef HAVE_DIRECTOR_ADMIN_HEALTH
|
||||
sm->sdir->admin_health = VDI_AH_HEALTHY;
|
||||
#endif
|
||||
REPLACE(sm->sdir->vcl_name, vcl_name);
|
||||
- sm->sdir->name = "saintmode";
|
||||
sm->sdir->priv = sm;
|
||||
|
||||
if (!priv->priv) {
|
||||
|
||||
From 2141fd9d37f435b4875c07c8fcc3fb1ea5968d74 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Goroll <nils.goroll@uplex.de>
|
||||
Date: Thu, 26 Apr 2018 14:50:30 +0200
|
||||
Subject: [PATCH 2/4] Output the health state as baseline information
|
||||
|
||||
---
|
||||
src/tests/saintmode/test02.vtc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/tests/saintmode/test02.vtc b/src/tests/saintmode/test02.vtc
|
||||
index aa97734..bd8b537 100644
|
||||
--- a/src/tests/saintmode/test02.vtc
|
||||
+++ b/src/tests/saintmode/test02.vtc
|
||||
@@ -51,6 +51,8 @@ varnish v1 -vcl+backend {
|
||||
|
||||
} -start
|
||||
|
||||
+varnish v1 -cliok "backend.list"
|
||||
+
|
||||
client c1 {
|
||||
txreq -url "/a"
|
||||
rxresp
|
||||
|
||||
From 1e704bfd7d8aa8b1e20d918788f0c7c65488713e Mon Sep 17 00:00:00 2001
|
||||
From: Nils Goroll <nils.goroll@uplex.de>
|
||||
Date: Thu, 26 Apr 2018 14:50:49 +0200
|
||||
Subject: [PATCH 3/4] changes required for latest varnish-cache
|
||||
|
||||
The director API has changed and, in particular, the director healthy
|
||||
callback is now only queried for AH_PROBE.
|
||||
---
|
||||
src/vmod_saintmode.c | 31 ++++++++++++++++---------------
|
||||
1 file changed, 16 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/vmod_saintmode.c b/src/vmod_saintmode.c
|
||||
index 4b4b874..95de050 100644
|
||||
--- a/src/vmod_saintmode.c
|
||||
+++ b/src/vmod_saintmode.c
|
||||
@@ -43,10 +43,10 @@
|
||||
|
||||
#include "vcc_saintmode_if.h"
|
||||
|
||||
-static unsigned
|
||||
-healthy(const struct director *, const struct busyobj *, double *);
|
||||
-static const struct director *
|
||||
-resolve(const struct director *, struct worker *, struct busyobj *);
|
||||
+static VCL_BOOL v_matchproto_(vdi_healthy_f)
|
||||
+healthy(VRT_CTX, VCL_BACKEND, VCL_TIME *);
|
||||
+static VCL_BACKEND v_matchproto_(vdi_resolve_f)
|
||||
+resolve(VRT_CTX, VCL_BACKEND);
|
||||
|
||||
struct trouble {
|
||||
unsigned magic;
|
||||
@@ -266,23 +266,26 @@ is_digest_healthy(const struct director *dir,
|
||||
}
|
||||
|
||||
/* All adapted from PHK's saintmode implementation in Varnish 3.0 */
|
||||
-static unsigned
|
||||
-healthy(const struct director *dir, const struct busyobj *bo, double *changed)
|
||||
+static VCL_BOOL v_matchproto_(vdi_healthy_f)
|
||||
+healthy(VRT_CTX, VCL_BACKEND dir, VCL_TIME *changed)
|
||||
{
|
||||
struct vmod_saintmode_saintmode *sm;
|
||||
+ const struct busyobj *bo;
|
||||
unsigned retval;
|
||||
const uint8_t* digest;
|
||||
double t_prev;
|
||||
struct vsl_log* vsl;
|
||||
|
||||
+ CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
|
||||
CHECK_OBJ_NOTNULL(dir, DIRECTOR_MAGIC);
|
||||
CAST_OBJ_NOTNULL(sm, dir->priv, VMOD_SAINTMODE_MAGIC);
|
||||
CHECK_OBJ_NOTNULL(sm->be, DIRECTOR_MAGIC);
|
||||
+ bo = ctx->bo;
|
||||
CHECK_OBJ_ORNULL(bo, BUSYOBJ_MAGIC);
|
||||
|
||||
/* Saintmode is disabled, or list is empty */
|
||||
if (sm->threshold == 0 || sm->n_trouble == 0)
|
||||
- return (sm->be->methods->healthy(sm->be, bo, changed));
|
||||
+ return (VRT_Healthy(ctx, sm->be, changed));
|
||||
|
||||
if (!bo) {
|
||||
digest = NULL;
|
||||
@@ -295,7 +298,7 @@ healthy(const struct director *dir, const struct busyobj *bo, double *changed)
|
||||
}
|
||||
|
||||
retval = is_digest_healthy(dir, digest, t_prev, vsl);
|
||||
- return (retval ? sm->be->methods->healthy(sm->be, bo, changed) : 0);
|
||||
+ return (retval ? VRT_Healthy(ctx, sm->be, changed) : 0);
|
||||
}
|
||||
|
||||
VCL_BOOL
|
||||
@@ -316,19 +319,17 @@ vmod_saintmode_is_healthy(VRT_CTX, struct vmod_saintmode_saintmode *sm)
|
||||
return is_digest_healthy(sm->sdir, digest,
|
||||
ctx->req->t_prev, ctx->req->vsl);
|
||||
} else
|
||||
- return healthy(sm->sdir, ctx->bo, NULL);
|
||||
+ return healthy(ctx, sm->sdir, NULL);
|
||||
}
|
||||
|
||||
-static const struct director *
|
||||
-resolve(const struct director *dir, struct worker *wrk, struct busyobj *bo) {
|
||||
+static VCL_BACKEND v_matchproto_(vdi_resolve_f)
|
||||
+resolve(VRT_CTX, VCL_BACKEND dir) {
|
||||
struct vmod_saintmode_saintmode *sm;
|
||||
- double changed = 0.0;
|
||||
|
||||
CHECK_OBJ_NOTNULL(dir, DIRECTOR_MAGIC);
|
||||
CAST_OBJ_NOTNULL(sm, dir->priv, VMOD_SAINTMODE_MAGIC);
|
||||
- (void)wrk;
|
||||
|
||||
- if (!healthy(dir, bo, &changed))
|
||||
+ if (!healthy(ctx, dir, NULL))
|
||||
return (NULL);
|
||||
|
||||
return (sm->be);
|
||||
@@ -358,7 +359,7 @@ vmod_saintmode__init(VRT_CTX, struct vmod_saintmode_saintmode **smp,
|
||||
sm->sdir->magic = DIRECTOR_MAGIC;
|
||||
sm->sdir->methods = vmod_saintmode_methods;
|
||||
#ifdef HAVE_DIRECTOR_ADMIN_HEALTH
|
||||
- sm->sdir->admin_health = VDI_AH_HEALTHY;
|
||||
+ sm->sdir->admin_health = VDI_AH_PROBE;
|
||||
#endif
|
||||
REPLACE(sm->sdir->vcl_name, vcl_name);
|
||||
sm->sdir->priv = sm;
|
||||
|
||||
From c1c9b6ff4652c34aeff68f209d983be684caeb32 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Goroll <nils.goroll@uplex.de>
|
||||
Date: Tue, 1 May 2018 18:48:59 +0200
|
||||
Subject: [PATCH 4/4] reflect latest changes to the director API
|
||||
|
||||
---
|
||||
src/vmod_saintmode.c | 19 +++++--------------
|
||||
1 file changed, 5 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/vmod_saintmode.c b/src/vmod_saintmode.c
|
||||
index 95de050..b0e4ac6 100644
|
||||
--- a/src/vmod_saintmode.c
|
||||
+++ b/src/vmod_saintmode.c
|
||||
@@ -35,9 +35,6 @@
|
||||
|
||||
#include "vmod_config.h"
|
||||
|
||||
-#include "cache/cache_director.h"
|
||||
-#include "cache/cache_backend.h"
|
||||
-
|
||||
#include "vsb.h"
|
||||
#include "vtim.h"
|
||||
|
||||
@@ -59,7 +56,7 @@ struct trouble {
|
||||
struct vmod_saintmode_saintmode {
|
||||
unsigned magic;
|
||||
#define VMOD_SAINTMODE_MAGIC 0xa03756e4
|
||||
- struct director sdir[1];
|
||||
+ const struct director *sdir;
|
||||
const struct director *be;
|
||||
pthread_mutex_t mtx;
|
||||
unsigned threshold;
|
||||
@@ -68,8 +65,8 @@ struct vmod_saintmode_saintmode {
|
||||
VTAILQ_HEAD(, trouble) troublelist;
|
||||
};
|
||||
|
||||
-static const struct director_methods vmod_saintmode_methods[1] = {{
|
||||
- .magic = DIRECTOR_METHODS_MAGIC,
|
||||
+static const struct vdi_methods vmod_saintmode_methods[1] = {{
|
||||
+ .magic = VDI_METHODS_MAGIC,
|
||||
.type = "saintmode",
|
||||
.healthy = healthy,
|
||||
.resolve = resolve
|
||||
@@ -356,13 +353,7 @@ vmod_saintmode__init(VRT_CTX, struct vmod_saintmode_saintmode **smp,
|
||||
sm->be = be;
|
||||
VTAILQ_INIT(&sm->troublelist);
|
||||
|
||||
- sm->sdir->magic = DIRECTOR_MAGIC;
|
||||
- sm->sdir->methods = vmod_saintmode_methods;
|
||||
-#ifdef HAVE_DIRECTOR_ADMIN_HEALTH
|
||||
- sm->sdir->admin_health = VDI_AH_PROBE;
|
||||
-#endif
|
||||
- REPLACE(sm->sdir->vcl_name, vcl_name);
|
||||
- sm->sdir->priv = sm;
|
||||
+ sm->sdir = VRT_AddDirector(ctx, vmod_saintmode_methods, sm, "%s", vcl_name);
|
||||
|
||||
if (!priv->priv) {
|
||||
ALLOC_OBJ(sm_objs, SAINTMODE_OBJS_MAGIC);
|
||||
@@ -392,7 +383,7 @@ vmod_saintmode__fini(struct vmod_saintmode_saintmode **smp) {
|
||||
FREE_OBJ(tr);
|
||||
}
|
||||
|
||||
- free(sm->sdir->vcl_name);
|
||||
+ VRT_DelDirector(&sm->sdir);
|
||||
AZ(pthread_mutex_destroy(&sm->mtx));
|
||||
|
||||
/* We can no longer refer to the sm_objs after this
|
||||
23
varnish-modules-0.15.0_fix_simple_formatting_bug.patch
Normal file
23
varnish-modules-0.15.0_fix_simple_formatting_bug.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
From 40a8cc063b2819fdd325061a1cb48a3adc3ec910 Mon Sep 17 00:00:00 2001
|
||||
From: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
|
||||
Date: Wed, 17 Oct 2018 12:42:22 +0200
|
||||
Subject: [PATCH] 32bit-friendly format in vmod-tcp
|
||||
|
||||
Fixes #122
|
||||
---
|
||||
src/vmod_tcp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/vmod_tcp.c b/src/vmod_tcp.c
|
||||
index fee4bd3..570be45 100644
|
||||
--- a/src/vmod_tcp.c
|
||||
+++ b/src/vmod_tcp.c
|
||||
@@ -174,7 +174,7 @@ vmod_set_socket_pace(VRT_CTX, VCL_INT rate)
|
||||
sizeof(pacerate)) != 0)
|
||||
VSLb(ctx->vsl, SLT_VCL_Error, "set_socket_pace(): Error setting pace rate.");
|
||||
else
|
||||
- VSLb(ctx->vsl, SLT_VCL_Log, "vmod-tcp: Socket paced to %lu KB/s.", rate);
|
||||
+ VSLb(ctx->vsl, SLT_VCL_Log, "vmod-tcp: Socket paced to %jd KB/s.", (intmax_t)rate);
|
||||
|
||||
# ifndef NDEBUG
|
||||
int retval;
|
||||
|
|
@ -1,101 +1,271 @@
|
|||
%define abi 6.0
|
||||
%if 0%{?fedora} == 25
|
||||
%define abi 5.0
|
||||
%endif
|
||||
%if 0%{?fedora} == 24
|
||||
%define abi 3.2
|
||||
%endif
|
||||
%global varnishver %(pkg-config --silence-errors --modversion varnishapi || echo 0)
|
||||
|
||||
%global docutils python3-docutils
|
||||
%global rst2man rst2man
|
||||
|
||||
Name: varnish-modules
|
||||
Version: 0.12.1
|
||||
Release: 2%{?dist}
|
||||
Version: 0.28.0
|
||||
Release: 5%{?dist}
|
||||
Summary: A collection of modules ("vmods") extending Varnish VCL
|
||||
|
||||
Group: System Environment/Daemons
|
||||
License: BSD
|
||||
URL: https://github.com/varnish/%{name}
|
||||
License: BSD-2-Clause
|
||||
URL: https://github.com/varnish/varnish-modules
|
||||
Source: https://github.com/varnish/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Source0: https://download.varnish-software.com/varnish-modules/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# Upstream issue 35, workspace_client is too small on 32bit
|
||||
#Patch3: varnish-modules-0.9.1-add_workspace_client_for_cookietest_on_32bit.patch
|
||||
|
||||
# Upstream issue 34, upstream commit 29be10d
|
||||
#Patch4: varnish-modules-0.9.1-fix_build_on_el5_git_29be10d.patch
|
||||
|
||||
BuildRequires: varnish-libs-devel
|
||||
BuildRequires: varnish
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: python-docutils >= 0.6
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig(varnishapi)
|
||||
BuildRequires: varnish
|
||||
|
||||
Requires: varnishabi-%abi
|
||||
# Build from a git checkout
|
||||
#BuildRequires: automake
|
||||
#BuildRequires: autoconf
|
||||
#BuildRequires: libtool
|
||||
BuildRequires: %docutils
|
||||
|
||||
Provides: vmod-cookie = %{version}-%{release}
|
||||
Provides: vmod-vsthrottle = %{version}-%{release}
|
||||
Provides: vmod-header = %{version}-%{release}
|
||||
Provides: vmod-saintmode = %{version}-%{release}
|
||||
Provides: vmod-softpurge = %{version}-%{release}
|
||||
Provides: vmod-tcp = %{version}-%{release}
|
||||
Provides: vmod-var = %{version}-%{release}
|
||||
Provides: vmod-xkey = %{version}-%{release}
|
||||
Requires: varnish = %varnishver
|
||||
|
||||
Provides: vmod(accept)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(bodyaccess)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(header)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(saintmode)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(tcp)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(var)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(vsthrottle)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(xkey)%{_isa} = %{version}-%{release}
|
||||
Provides: vmod(str)%{_isa} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
This is a collection of modules ("vmods") extending Varnish VCL used
|
||||
for describing HTTP request/response policies with additional
|
||||
capabilities. This collection contains the following vmods (previously
|
||||
kept individually): cookie, vsthrottle, header, saintmode, softpurge,
|
||||
tcp, var, xkey
|
||||
capabilities. This collection contains the following vmods:
|
||||
bodyaccess, header, saintmode, tcp, var, vsthrottle, xkey
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup
|
||||
|
||||
|
||||
%build
|
||||
%configure --disable-static \
|
||||
--docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
|
||||
make %{?_smp_mflags}
|
||||
#sh bootstrap
|
||||
export RST2MAN=%{rst2man}
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
# Build man pages
|
||||
pushd docs
|
||||
for i in vmod*.rst; do
|
||||
rst2man -v "$i" "$(basename $i .rst).3";
|
||||
gzip "$(basename $i .rst).3";
|
||||
done
|
||||
popd
|
||||
|
||||
chmod 644 src/*.h
|
||||
chmod 644 src/*.c
|
||||
chmod 644 docs/*rst
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install DESTDIR=%{?buildroot} INSTALL="install -p"
|
||||
%make_install docdir=%_pkgdocdir
|
||||
find %{buildroot}/%{_libdir}/ -name '*.la' -exec rm -f {} ';'
|
||||
rm %{buildroot}%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/LICENSE
|
||||
pushd docs
|
||||
mkdir -p %{buildroot}%{_mandir}/man3
|
||||
install -p -m 0644 *.3.gz %{buildroot}%{_mandir}/man3
|
||||
popd
|
||||
rm %{buildroot}%{_pkgdocdir}/LICENSE # Rather use license macro
|
||||
|
||||
|
||||
%check
|
||||
make check
|
||||
%ifarch %ix86 %arm ppc
|
||||
# 64-bit specific test
|
||||
sed -i 's,tests/xkey/test12.vtc,,' src/Makefile
|
||||
%endif
|
||||
%make_build check VERBOSE=1
|
||||
|
||||
|
||||
%files
|
||||
%doc docs AUTHORS CHANGES.rst COPYING README.rst
|
||||
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
|
||||
#doc docs AUTHORS CHANGES.rst COPYING README.rst
|
||||
%doc AUTHORS CHANGES.rst COPYING README.md
|
||||
%license LICENSE
|
||||
%else
|
||||
%doc LICENSE
|
||||
%endif
|
||||
%{_libdir}/varnish/vmods/*
|
||||
%{_mandir}/man3/*.3*
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.28.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Thu May 21 2026 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.28.0-4
|
||||
- Built for varnish-9.0.3
|
||||
|
||||
* Fri May 15 2026 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.28.0-3
|
||||
- Built for varnish-9.0.2
|
||||
|
||||
* Thu Apr 30 2026 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.28.0-2
|
||||
- Built for varnish-9.0.1
|
||||
|
||||
* Mon Apr 13 2026 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.28.0-1
|
||||
- New upstream release varnish-modules-0.28.0, built for varnish-9.0.0
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Mon Jan 05 2026 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.27.0-1
|
||||
- New upstream release varnish-modules-0.27.0
|
||||
|
||||
* Wed Nov 19 2025 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.26.0-5
|
||||
- Rebuilt for varnish-7.7.3-2, rhbz#2407456
|
||||
|
||||
* Mon Sep 15 2025 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.26.0-4
|
||||
- Rebuilt for varnish-7.7.3
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sun May 25 2025 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.26.1-2
|
||||
- Rebuilt for varnish-7.7.1
|
||||
|
||||
* Wed Mar 26 2025 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.26.0-1
|
||||
- New upstream release for varnish-7.7.0
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Dec 06 2024 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.25.0-2
|
||||
- Rebuilt for varnish-7.6.1
|
||||
|
||||
* Tue Sep 17 2024 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.25.0-1
|
||||
- New upsteam release matching varnish-7.6.0
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Tue Apr 02 2024 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.24.0
|
||||
- New upstream release matching varnish-7.5.0
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Nov 15 2023 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.22.0-4
|
||||
- Rebuilt for varnish-7.4.2
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Tue Jun 06 2023 Luboš Uhliarik <luhliari@redhat.com> - 0.22.0-2
|
||||
- SPDX migration
|
||||
|
||||
* Sun Mar 19 2023 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.22.0-1
|
||||
- New upstream release
|
||||
- Built for varnish-7.3.0
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sun Nov 13 2022 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.21.0-2
|
||||
- Built for varnish-7.2.1
|
||||
|
||||
* Mon Sep 26 2022 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.21.0-1
|
||||
- New upstream release
|
||||
- Removed unused macros from specfile
|
||||
- Built for varnish-7.2.0
|
||||
|
||||
* Mon Aug 15 2022 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.20.0-3
|
||||
- Built for varnish-7.1.1
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Tue Mar 29 2022 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.20.0-1
|
||||
- Built for varnish-7.1.0
|
||||
- Now provides vmod(name) instead of vmod-name, matching varnish' provides
|
||||
|
||||
* Thu Feb 10 2022 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.19.0-4
|
||||
- Built for varnish-7.0.2
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Tue Jan 18 2022 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.19.0-2
|
||||
- Built for varnish-7.0.1
|
||||
|
||||
* Thu Sep 23 2021 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.19.0-1
|
||||
- New upstream release
|
||||
- Built for varnish-7.0.0
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Sat Jul 17 2021 Ingvar Hagelund <ingvar@redpill-linpro.com> 0.18.0-2
|
||||
- Rebuilt for varnish-6.6.1
|
||||
|
||||
* Tue May 18 2021 Ingvar Hagelund <ingvar@redpill-linpro.com> 0.18.0-1
|
||||
- New upstream release
|
||||
- Rebuilt for varnish-6.6.0
|
||||
|
||||
* Wed Mar 17 2021 Ingvar Hagelund <ingvar@redpill-linpro.com> 0.17.1-1
|
||||
- New upstream release
|
||||
- Switched back to original varnish github upstream, as it has catched up
|
||||
- Includes fix for CVE-2021-28543, VSV00006, bz#1939669
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.17.0-0.3.klarlack.20200916git4d6593c
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Sep 29 2020 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.17.0-0.2.klarlack.20200916git
|
||||
- Rebuilt for varnish-6.5.1
|
||||
|
||||
* Wed Sep 16 2020 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.17.0-0.1.klarlack.20200916git
|
||||
- Switched upstream to Nils Goroll's fork which is the defacto current upstream
|
||||
- Synced description to reality
|
||||
- This is a snapshot build that needs autotools for building
|
||||
- Rebuilt for varnish-6.5.0
|
||||
|
||||
* Mon Aug 17 2020 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.16.0-3
|
||||
- Rebuilt for varnish-6.4.0
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Sat Mar 28 2020 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.16.0-1
|
||||
- New upstream release
|
||||
|
||||
* Tue Mar 17 2020 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.16.0-0.1.20200317git21d0c84
|
||||
- Snapshot from 6.4 branch, rebuilt against varnish-6.4.0
|
||||
- Removed patches merged upstream
|
||||
- Delete 64-bit specific test on 32-bit arches
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sun Sep 29 2019 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.15.0-7
|
||||
- Added patch from Nils Goroll, compatibility for varnish-6.3, closes bz#1736943
|
||||
- Rebuilt against varnish-6.3.0
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 15 2019 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.15.0-5
|
||||
- Install docs in correct docdir
|
||||
|
||||
* Fri Feb 15 2019 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.15.0-4
|
||||
- Added a simple patch from upstream, fixing a formatting bug trigged on 32bit
|
||||
- Removed dependency on docutils. It is not necessary on released tarballs
|
||||
|
||||
* Thu Feb 14 2019 Ingvar Hagelund <ingvar@redpill-linpro.com> - 0.15.0-3
|
||||
- Added a proposed patch from Nils Goroll providing support for vmod_saintmode
|
||||
on varnish-6.1.1 (closes rhbz #1676183)
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Tue Jul 17 2018 Dridi Boukelmoune <dridi@fedoraproject.org> 0.15.0-1
|
||||
- Update to 0.15.0
|
||||
- Drop EPEL and older Fedora releases support
|
||||
- Drop broken manual ABI dependency to Varnish
|
||||
- Drop commented out references to past patches
|
||||
- Verbose test suite
|
||||
- Simplified configure step
|
||||
- Dependencies cleanup
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Sat Oct 21 2017 Dridi Boukelmoune <dridi@fedoraproject.org> 0.12.1-5
|
||||
- Update varnishabi requirement for f28
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Thu Jun 01 2017 Ingvar Hagelund <ingvar@redpill-linpro.com> 0.12.1-2
|
||||
- Set correct varnishabi requirement for the different fedoras
|
||||
|
||||
|
|
@ -123,5 +293,3 @@ make check
|
|||
- First wrap for fedora
|
||||
- Uses some old-style specfile components for el5 compatibility, including
|
||||
the usage of the BuildRoot header and cleaning the buildroot before install
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue