varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

updates required for current master #83

Closed nigoroll closed 6 years ago

nigoroll commented 6 years ago

required to build against current master

dridi commented 6 years ago

I'll check that this change doesn't break older releases. I expect not, I already performed similar checks for vmod-querystring.

Thanks!

dridi commented 6 years ago

FYI travis ci failed because we are installing Varnish from repo.v-c.org...

nigoroll commented 6 years ago

Have pushed more changes I guess a 5.2 branch before merge would be warranted

dridi commented 6 years ago

@nigoroll we aren't retiring vmod-softpurge, please drop 1e2e8b7. We will keep compiling it for Varnish 4.1, I'll take care of that.

nigoroll commented 6 years ago

@Dridi feel free to cherry-pick what you like. But are you sure keeping a single branch makes sense? My impression is that we've reached a point where we'd just have too much #ifdefery

dridi commented 6 years ago

To fully support [4.1-master] I need this patch:

diff --git i/src/vmod_header.c w/src/vmod_header.c
index ee0b02a..6bb26f9 100644
--- i/src/vmod_header.c
+++ w/src/vmod_header.c
@@ -27,12 +27,19 @@
  */

 #include "config.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <pthread.h>

 #include "cache/cache.h"
+#include "vdef.h"
+
+#define VCL_RET_MAX 1
+enum vcl_event_e;
 #include "vrt.h"
+#undef VCL_RET_MAX
+
 #include "vcl.h"

 #include "vcc_header_if.h"
diff --git i/src/vmod_vsthrottle.c w/src/vmod_vsthrottle.c
index cae5865..1b6d2a5 100644
--- i/src/vmod_vsthrottle.c
+++ w/src/vmod_vsthrottle.c
@@ -36,8 +36,14 @@
 #include <errno.h>

 #include "vdef.h"
+
+#define VCL_RET_MAX 1
+enum vcl_event_e;
 #include "vrt.h"
+#undef VCL_RET_MAX
+
 #include "vcl.h"
+
 #include "vas.h"
 #include "vtim.h"
 #include "miniobj.h"
diff --git i/src/vmod_xkey.c w/src/vmod_xkey.c
index 4355c52..d192443 100644
--- i/src/vmod_xkey.c
+++ w/src/vmod_xkey.c
@@ -33,7 +33,13 @@
 #include <string.h>

 #include "cache/cache.h"
+#include "vdef.h"
+
+#define VCL_RET_MAX 1
+enum vcl_event_e;
 #include "vrt.h"
+#undef VCL_RET_MAX
+
 #include "vcl.h"
 #include "vsha256.h"

I'm not too happy about the vdef,vrt,vcl ordering because past Varnish versions forced us to pick vcl,vrt in order to make the event signature available to VMODs. We'll need to discuss this further, I'll take care of vmod-softpurge independently.

dridi commented 6 years ago

We had one more change in varnish-trunk regarding #include order and rules. We'll revisit this after the 3 months milestone and decide then how we manage compatibility with the different Varnish branches.

https://github.com/varnishcache/varnish-cache/commit/b6921558b9e5ecb431524f9d5dc9aea5af7bd24b

nigoroll commented 6 years ago

force-pushed an update to get ahead in the meantime. the travis-failure is unrelated.

dridi commented 6 years ago

As I said before, we will wait until Dec 15th ABI stabilization to revisit this, but I don't think we need the VSHA256 change:

https://github.com/varnishcache/varnish-cache/commit/8844d6ba3a0ef8e984c6ac70a3acf2cf93f542f2