summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorДамјан Георгиевски2020-07-02 18:14:14 +0200
committerДамјан Георгиевски2020-07-02 18:14:14 +0200
commitef835614beec3e6133b156aceadf73b63ae56806 (patch)
tree92351ab29d424398e32f37607b7305dca1240e5a
parentfaa820dfdade3e5094ee03bc8eae502b765e0024 (diff)
downloadaur-ef835614beec3e6133b156aceadf73b63ae56806.tar.gz
bump nginx-mainline to 1.19.0 and add a patch to compile
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD12
-rw-r--r--f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff68
3 files changed, 82 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dfe4aca11516..6537c7afb5fb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = nginx-mainline-mod-nchan
pkgdesc = nchan nginx module
pkgver = 1.2.7
- pkgrel = 1
+ pkgrel = 2
url = https://nchan.io/
arch = i686
arch = x86_64
license = MIT
- depends = nginx-mainline=1.17.10
+ depends = nginx-mainline=1.19.0
source = https://github.com/slact/nchan/archive/v1.2.7.tar.gz
- source = http://nginx.org/download/nginx-1.17.10.tar.gz
+ source = http://nginx.org/download/nginx-1.19.0.tar.gz
+ source = f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff
sha256sums = 8bb5d1749af759bb5e9cc5476a9c4b44d51bee6096bb89ab5ff53e85367b490b
- sha256sums = a9aa73f19c352a6b166d78e2a664bb3ef1295bbe6d3cc5aa7404bd4664ab4b83
+ sha256sums = 44a616171fcd7d7ad7c6af3e6f3ad0879b54db5a5d21be874cd458b5691e36c8
+ sha256sums = 9f73929de9741a3571de712f6767069ea0a3e16282ac7b3e3d33df77113d04ed
pkgname = nginx-mainline-mod-nchan
diff --git a/PKGBUILD b/PKGBUILD
index f191205db7bf..7a92e333ac18 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,9 +2,9 @@
pkgname=nginx-mainline-mod-nchan
pkgver=1.2.7
-pkgrel=1
+pkgrel=2
-_nginxver=1.17.10
+_nginxver=1.19.0
pkgdesc='nchan nginx module'
arch=('i686' 'x86_64')
@@ -15,11 +15,14 @@ license=('MIT')
source=(
https://github.com/slact/nchan/archive/v${pkgver}.tar.gz
http://nginx.org/download/nginx-$_nginxver.tar.gz
+ f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff
)
build() {
- cd "$srcdir"/nginx-$_nginxver
_module_dir="$srcdir"/nchan-$pkgver
+ patch -p1 -d $_module_dir < f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff
+
+ cd "$srcdir"/nginx-$_nginxver
./configure --with-compat --add-dynamic-module=${_module_dir}
make modules
}
@@ -32,4 +35,5 @@ package() {
}
sha256sums=('8bb5d1749af759bb5e9cc5476a9c4b44d51bee6096bb89ab5ff53e85367b490b'
- 'a9aa73f19c352a6b166d78e2a664bb3ef1295bbe6d3cc5aa7404bd4664ab4b83')
+ '44a616171fcd7d7ad7c6af3e6f3ad0879b54db5a5d21be874cd458b5691e36c8'
+ '9f73929de9741a3571de712f6767069ea0a3e16282ac7b3e3d33df77113d04ed')
diff --git a/f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff b/f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff
new file mode 100644
index 000000000000..e64883c652e3
--- /dev/null
+++ b/f484c603a81c3bddd3f0160cfdbe231b8a453cde.diff
@@ -0,0 +1,68 @@
+diff --git a/dev/Gemfile b/dev/Gemfile
+index 567848b5..55292781 100644
+--- a/dev/Gemfile
++++ b/dev/Gemfile
+@@ -41,4 +41,4 @@ gem 'minitest-reporters'
+
+ gem 'fpm', :git => "https://github.com/slact/fpm.git"
+
+-gem 'hsss'
++gem 'hsss', "~> 0.1.20"
+diff --git a/dev/rebuild.sh b/dev/rebuild.sh
+index ab443f54..49bc5be9 100755
+--- a/dev/rebuild.sh
++++ b/dev/rebuild.sh
+@@ -244,6 +244,7 @@ if [[ -z $NO_MAKE ]]; then
+ bundle exec hsss \
+ --format whole \
+ --header-only \
++ --header-guard NCHAN_REDIS_LUA_SCRIPTS_H \
+ --no-static \
+ ${rdstore_dir}/redis-lua-scripts/*.lua > ${rdstore_dir}/redis_lua_commands.h
+ if ! [ $? -eq 0 ]; then;
+diff --git a/src/store/memory/memstore.c b/src/store/memory/memstore.c
+index 2844220c..f0f78acc 100755
+--- a/src/store/memory/memstore.c
++++ b/src/store/memory/memstore.c
+@@ -40,6 +40,8 @@ static ngx_int_t redis_fakesub_timer_interval;
+
+ #endif
+
++uint16_t memstore_worker_generation;
++
+
+ typedef struct {
+ //memstore_channel_head_t unbuffered_dummy_chanhead;
+diff --git a/src/store/memory/store-private.h b/src/store/memory/store-private.h
+index e4a426a3..49de940b 100644
+--- a/src/store/memory/store-private.h
++++ b/src/store/memory/store-private.h
+@@ -172,6 +172,6 @@ ngx_int_t chanhead_gc_withdraw(memstore_channel_head_t *chanhead, const char *);
+ void memstore_chanhead_release(memstore_channel_head_t *ch, char *label);
+ void memstore_chanhead_reserve(memstore_channel_head_t *ch, const char *label);
+
+-uint16_t memstore_worker_generation; //times nginx has been restarted + 1
++extern uint16_t memstore_worker_generation; //times nginx has been restarted + 1
+
+ #endif /*MEMSTORE_PRIVATE_HEADER*/
+diff --git a/src/store/redis/redis_lua_commands.h b/src/store/redis/redis_lua_commands.h
+index 76fb7b95..2efb25bd 100644
+--- a/src/store/redis/redis_lua_commands.h
++++ b/src/store/redis/redis_lua_commands.h
+@@ -1,3 +1,5 @@
++#ifndef NCHAN_REDIS_LUA_SCRIPTS_H
++#define NCHAN_REDIS_LUA_SCRIPTS_H
+ // don't edit this please, it was auto-generated by hsss
+ // https://github.com/slact/hsss
+
+@@ -63,7 +65,8 @@ typedef struct {
+ redis_lua_script_t subscriber_unregister;
+
+ } redis_lua_scripts_t;
+-redis_lua_scripts_t redis_lua_scripts;
+-const int redis_lua_scripts_count;
++extern redis_lua_scripts_t redis_lua_scripts;
++extern const int redis_lua_scripts_count;
+ #define REDIS_LUA_SCRIPTS_EACH(script) \
+ for((script)=(redis_lua_script_t *)&redis_lua_scripts; (script) < (redis_lua_script_t *)(&redis_lua_scripts + 1); (script)++)
++#endif //NCHAN_REDIS_LUA_SCRIPTS_H