nixos-seafile-overlay/seafile-server/recent_libevhtp.patch

144 lines
5.6 KiB
Diff

From 8c3ee18d3eaf3e8a00dce677386dfae649ea309e Mon Sep 17 00:00:00 2001
From: Ultima1252 <ultima1252@gmail.com>
Date: Mon, 15 Jan 2018 17:05:52 -0800
Subject: [PATCH] Update http-server.c
diff --git a/server/http-server.c b/server/http-server.c
index b0319b9..fdfe8fe 100644
--- a/server/http-server.c
+++ b/server/http-server.c
@@ -2122,7 +2122,7 @@ http_server_run (void *arg)
http_request_init (server);
- evhtp_use_threads (priv->evhtp, NULL, server->worker_threads, NULL);
+ evhtp_use_threads_wexit (priv->evhtp, NULL, NULL, server->worker_threads, NULL);
struct timeval tv;
tv.tv_sec = CLEANING_INTERVAL_SEC;
From 84038d1665423b5d72ee840318a337a1907c693b Mon Sep 17 00:00:00 2001
From: Ultima1252 <ultima1252@gmail.com>
Date: Mon, 15 Jan 2018 17:13:02 -0800
Subject: [PATCH] Update upload-file.c
---
server/upload-file.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
adjusted by schmittlauch
--- a/server/upload-file.c 2019-12-26 00:43:14.743019721 +0100
+++ b/server/upload-file.new 2019-12-26 01:05:11.166580920 +0100
@@ -2724,32 +2724,32 @@
g_free (cluster_shared_dir);
cb = evhtp_set_regex_cb (htp, "^/upload-api/.*", upload_api_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/upload-raw-blks-api/.*",
upload_raw_blks_api_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/upload-blks-api/.*", upload_blks_api_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
/* cb = evhtp_set_regex_cb (htp, "^/upload-blks-aj/.*", upload_blks_ajax_cb, NULL); */
- /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */
+ /* evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); */
cb = evhtp_set_regex_cb (htp, "^/upload-aj/.*", upload_ajax_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/update-api/.*", update_api_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/update-blks-api/.*", update_blks_api_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
/* cb = evhtp_set_regex_cb (htp, "^/update-blks-aj/.*", update_blks_ajax_cb, NULL); */
- /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */
+ /* evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); */
cb = evhtp_set_regex_cb (htp, "^/update-aj/.*", update_ajax_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
evhtp_set_regex_cb (htp, "^/upload_progress.*", upload_progress_cb, NULL);
From b6c41aae74f1eb285a033125f4a5af578c8efbb6 Mon Sep 17 00:00:00 2001
From: Ultima1252 <ultima1252@gmail.com>
Date: Mon, 15 Jan 2018 17:13:57 -0800
Subject: [PATCH] Update Makefile.am
---
server/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/Makefile.am b/server/Makefile.am
index 2491f5e..dd695bd 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -114,7 +114,7 @@ seaf_server_SOURCES = \
seaf_server_LDADD = @CCNET_LIBS@ \
$(top_builddir)/lib/libseafile_common.la \
- @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ -levhtp \
+ @ONIGURUMA_LIBS@ @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ @LIBEVHTP_LIBS@ \
$(top_builddir)/common/cdc/libcdc.la \
$(top_builddir)/common/db-wrapper/libdbwrapper.la \
@SEARPC_LIBS@ @JANSSON_LIBS@ ${LIB_WS32} @ZLIB_LIBS@ \
From bb2cd57f39450db39c1b6b222b06ac7987f3cd32 Mon Sep 17 00:00:00 2001
From: Ultima1252 <ultima1252@gmail.com>
Date: Mon, 15 Jan 2018 17:17:27 -0800
Subject: [PATCH] Update configure.ac
---
configure.ac | 10 ++++++++++
1 file changed, 10 insertions(+)
rebased by schmittlauch
diff --git a/configure.ac b/configure.ac
index c6fef89..78dece3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,6 +194,8 @@ ZDB_REQUIRED=2.10
CURL_REQUIRED=7.17
FUSE_REQUIRED=2.7.3
ZLIB_REQUIRED=1.2.0
+LIBEVHTP_REQUIRED=1.2.16
+ONIGURUMA_REQUIRED=5.9.2
PKG_CHECK_MODULES(SSL, [openssl])
AC_SUBST(SSL_CFLAGS)
@@ -189,6 +189,8 @@ ZDB_REQUIRED=2.10
CURL_REQUIRED=7.17
FUSE_REQUIRED=2.7.3
ZLIB_REQUIRED=1.2.0
+LIBEVHTP_REQUIRED=1.2.16
+ONIGURUMA_REQUIRED=5.9.2
PKG_CHECK_MODULES(SSL, [openssl])
AC_SUBST(SSL_CFLAGS)
@@ -222,6 +224,14 @@ PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)
+PKG_CHECK_MODULES(LIBEVHTP, [evhtp >= $LIBEVHTP_REQUIRED])
+AC_SUBST(LIBEVHTP_CFLAGS)
+AC_SUBST(LIBEVHTP_LIBS)
+
+PKG_CHECK_MODULES(ONIGURUMA, [oniguruma >= $ONIGURUMA_REQUIRED])
+AC_SUBST(ONIGURUMA_CFLAGS)
+AC_SUBST(ONIGURUMA_LIBS)
+
if test x${compile_python} = xyes; then
AM_PATH_PYTHON([2.6])
if test "$bwin32" = true; then