aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/seafile-server
diff options
context:
space:
mode:
authorRichard Gallamore <ultima@FreeBSD.org>2018-01-04 19:15:27 +0000
committerRichard Gallamore <ultima@FreeBSD.org>2018-01-04 19:15:27 +0000
commit6c676d2ba5dc302430f33af61eb43a0a09a832d2 (patch)
tree9295e4e1aa07d3d6021f770dd2c63c89ac417768 /net-mgmt/seafile-server
parent8138912f5b06998dd2f4bf24db498d4931eb17bd (diff)
downloadports-6c676d2ba5dc302430f33af61eb43a0a09a832d2.tar.gz
ports-6c676d2ba5dc302430f33af61eb43a0a09a832d2.zip
* Revision bump for libevhtp
* Fix build warnings / errors for updated libevhtp MFH: 2018Q1
Notes
Notes: svn path=/head/; revision=458046
Diffstat (limited to 'net-mgmt/seafile-server')
-rw-r--r--net-mgmt/seafile-server/Makefile4
-rw-r--r--net-mgmt/seafile-server/files/patch-configure.ac34
-rw-r--r--net-mgmt/seafile-server/files/patch-server_Makefile.am11
-rw-r--r--net-mgmt/seafile-server/files/patch-server_access-file.c90
-rw-r--r--net-mgmt/seafile-server/files/patch-server_http-server.c11
-rw-r--r--net-mgmt/seafile-server/files/patch-server_upload-file.c93
6 files changed, 182 insertions, 61 deletions
diff --git a/net-mgmt/seafile-server/Makefile b/net-mgmt/seafile-server/Makefile
index 269174ccd8c6..d6c3bcd88a9e 100644
--- a/net-mgmt/seafile-server/Makefile
+++ b/net-mgmt/seafile-server/Makefile
@@ -4,6 +4,7 @@ PORTNAME= seafile-server
DISTVERSIONPREFIX= v
DISTVERSION= ${SEAFILE_VER}
DISTVERSIONSUFFIX= -server
+PORTREVISION= 1
CATEGORIES= net-mgmt
MAINTAINER= ultima@FreeBSD.org
@@ -33,7 +34,6 @@ USES= autoreconf iconv libarchive libtool localbase mysql \
USE_GITHUB= yes
GH_ACCOUNT= haiwen
USE_GNOME= glib20
-USE_LDCONFIG= yes
USE_RC_SUBR= seafile
SHEBANG_FILES= scripts/*.sh scripts/upgrade/*.sh *.sh scripts/build/*.py \
@@ -73,8 +73,6 @@ post-patch:
${WRKSRC}/scripts/upgrade/regenerate_secret_key.sh
${REINPLACE_CMD} -e 's|^INSTALL.*|INSTALLPATH="${PREFIX}/${SEAFILE_SERVER}/seafile"|' \
${WRKSRC}/scripts/seaf-cli-wrapper.sh
- ${REINPLACE_CMD} 's/<evhtp.h>/<evhtp\/evhtp.h>/' ${WRKSRC}/server/upload-file.c \
- ${WRKSRC}/server/access-file.c ${WRKSRC}/server/http-server.c
${REINPLACE_CMD} -E 's/stat.+\$$/stat -f %Su $$/' ${WRKSRC}/scripts/seafile.sh
${REINPLACE_CMD} 's/%%SEAFILE_USER%%/${USERS:[1]}/ ; s/%%SEAFILE_GROUP%%/${GROUPS:[1]}/' \
${WRKSRC}/scripts/setup-seafile.sh ${WRKSRC}/scripts/setup-seafile-mysql.py
diff --git a/net-mgmt/seafile-server/files/patch-configure.ac b/net-mgmt/seafile-server/files/patch-configure.ac
index 69e4c8779570..09b57e887dd6 100644
--- a/net-mgmt/seafile-server/files/patch-configure.ac
+++ b/net-mgmt/seafile-server/files/patch-configure.ac
@@ -1,4 +1,4 @@
---- configure.ac.orig 2016-12-27 07:02:58 UTC
+--- configure.ac.orig 2017-11-03 09:11:19 UTC
+++ configure.ac
@@ -51,8 +51,16 @@ else
AC_MSG_RESULT(no)
@@ -30,7 +30,7 @@
AC_ARG_ENABLE(python,
AC_HELP_STRING([--enable-python],[build seafile python binding]),
[compile_python=$enableval],
-@@ -89,6 +102,7 @@ AM_CONDITIONAL([COMPILE_FUSE], [test "${
+@@ -89,6 +102,7 @@ AM_CONDITIONAL([COMPILE_FUSE], [test "${compile_fuse}"
AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"])
AM_CONDITIONAL([MACOS], [test "$bmac" = "true"])
@@ -47,7 +47,7 @@
LIB_ICONV=-liconv
elif test "$bmac" = true ; then
LIB_WS32=
-@@ -149,6 +166,24 @@ elif test "$bmac" = true ; then
+@@ -149,6 +165,24 @@ elif test "$bmac" = true ; then
LIB_MAC="-framework CoreServices"
LIB_CRYPT32=
LIB_ICONV=-liconv
@@ -72,7 +72,7 @@
else
LIB_WS32=
LIB_GDI32=
-@@ -162,6 +199,8 @@ else
+@@ -162,6 +196,8 @@ else
LIB_MAC=
MSVC_CFLAGS=
LIB_CRYPT32=
@@ -81,7 +81,7 @@
fi
AC_SUBST(LIB_WS32)
-@@ -174,6 +214,8 @@ AC_SUBST(LIB_IPHLPAPI)
+@@ -174,6 +210,8 @@ AC_SUBST(LIB_IPHLPAPI)
AC_SUBST(LIB_SHELL32)
AC_SUBST(LIB_PSAPI)
AC_SUBST(LIB_MAC)
@@ -90,3 +90,27 @@
AC_SUBST(MSVC_CFLAGS)
AC_SUBST(LIB_CRYPT32)
AC_SUBST(LIB_ICONV)
+@@ -189,6 +227,8 @@ ZDB_REQUIRED=2.10
+ CURL_REQUIRED=7.17
+ FUSE_REQUIRED=2.7.3
+ ZLIB_REQUIRED=1.2.0
++LIBEVHTP_REQUIRED=1.2.10
++ONIGURUMA_REQUIRED=5.9.2
+
+ PKG_CHECK_MODULES(SSL, [openssl])
+ AC_SUBST(SSL_CFLAGS)
+@@ -221,6 +261,14 @@ AC_SUBST(LIBEVENT_LIBS)
+ 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])
diff --git a/net-mgmt/seafile-server/files/patch-server_Makefile.am b/net-mgmt/seafile-server/files/patch-server_Makefile.am
new file mode 100644
index 000000000000..996f696b33b7
--- /dev/null
+++ b/net-mgmt/seafile-server/files/patch-server_Makefile.am
@@ -0,0 +1,11 @@
+--- server/Makefile.am.orig 2018-01-04 05:04:59 UTC
++++ 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@ \
diff --git a/net-mgmt/seafile-server/files/patch-server_access-file.c b/net-mgmt/seafile-server/files/patch-server_access-file.c
index 797711a79065..ca439a95cb90 100644
--- a/net-mgmt/seafile-server/files/patch-server_access-file.c
+++ b/net-mgmt/seafile-server/files/patch-server_access-file.c
@@ -1,54 +1,38 @@
---- server/access-file.c.orig 2016-10-09 09:30:49 UTC
+--- server/access-file.c.orig 2018-01-04 08:07:23 UTC
+++ server/access-file.c
-@@ -224,10 +224,10 @@ write_block_data_cb (struct bufferevent
- bev->cbarg = data->saved_cb_arg;
-
- /* Resume reading incomming requests. */
-- evhtp_request_resume (data->req);
--
- evhtp_send_reply_end (data->req);
-
-+ evhtp_request_resume (data->req);
-+
- free_sendblock_data (data);
- return;
- }
-@@ -309,10 +309,10 @@ next:
- bev->cbarg = data->saved_cb_arg;
-
- /* Resume reading incomming requests. */
-- evhtp_request_resume (data->req);
--
- evhtp_send_reply_end (data->req);
-
-+ evhtp_request_resume (data->req);
-+
- free_sendfile_data (data);
- return;
- }
-@@ -406,10 +406,10 @@ write_dir_data_cb (struct bufferevent *b
- bev->cbarg = data->saved_cb_arg;
-
- /* Resume reading incomming requests. */
-- evhtp_request_resume (data->req);
--
- evhtp_send_reply_end (data->req);
-
-+ evhtp_request_resume (data->req);
-+
- free_senddir_data (data);
- return;
- }
-@@ -697,10 +697,10 @@ finish_file_range_request (struct buffer
- bev->cbarg = data->saved_cb_arg;
-
- /* Resume reading incomming requests. */
-- evhtp_request_resume (data->req);
--
- evhtp_send_reply_end (data->req);
-
-+ evhtp_request_resume (data->req);
-+
- free_send_file_range_data (data);
- }
-
+@@ -618,7 +618,7 @@ do_file(evhtp_request_t *req, SeafRepo *repo, const ch
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_OK);
+@@ -967,7 +967,7 @@ do_file_range (evhtp_request_t *req, SeafRepo *repo, c
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_PARTIAL);
+@@ -1037,7 +1037,7 @@ start_download_zip_file (evhtp_request_t *req, const c
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_OK);
+@@ -1365,7 +1365,7 @@ do_block(evhtp_request_t *req, SeafRepo *repo, const c
+ /* Block any new request from this connection before finish
+ * handling this request.
+ */
+- evhtp_request_pause (req);
++ bufferevent_disable(bev, EV_READ);
+
+ /* Kick start data transfer by sending out http headers. */
+ evhtp_send_reply_start(req, EVHTP_RES_OK);
diff --git a/net-mgmt/seafile-server/files/patch-server_http-server.c b/net-mgmt/seafile-server/files/patch-server_http-server.c
new file mode 100644
index 000000000000..71ad20eaaf83
--- /dev/null
+++ b/net-mgmt/seafile-server/files/patch-server_http-server.c
@@ -0,0 +1,11 @@
+--- server/http-server.c.orig 2018-01-03 02:47:07 UTC
++++ 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;
diff --git a/net-mgmt/seafile-server/files/patch-server_upload-file.c b/net-mgmt/seafile-server/files/patch-server_upload-file.c
new file mode 100644
index 000000000000..b6730b8e6b44
--- /dev/null
+++ b/net-mgmt/seafile-server/files/patch-server_upload-file.c
@@ -0,0 +1,93 @@
+--- server/upload-file.c.orig 2017-11-03 09:11:19 UTC
++++ server/upload-file.c
+@@ -2048,12 +2048,12 @@ upload_read_cb (evhtp_request_t *req, evbuf_t *buf, vo
+ out:
+ if (res != EVHTP_RES_OK) {
+ /* Don't receive any data before the connection is closed. */
+- evhtp_request_pause (req);
++ bufferevent_disable(evhtp_request_get_bev(req), EV_READ);
+
+ /* Set keepalive to 0. This will cause evhtp to close the
+ * connection after sending the reply.
+ */
+- req->keepalive = 0;
++ evhtp_request_set_keepalive(req, 0);
+
+ fsm->state = RECV_ERROR;
+ }
+@@ -2254,8 +2254,8 @@ upload_headers_cb (evhtp_request_t *req, evhtp_headers
+ }
+
+ /* Set up per-request hooks, so that we can read file data piece by piece. */
+- evhtp_set_hook (&req->hooks, evhtp_hook_on_read, upload_read_cb, fsm);
+- evhtp_set_hook (&req->hooks, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
++ evhtp_request_set_hook (req, evhtp_hook_on_read, upload_read_cb, fsm);
++ evhtp_request_set_hook (req, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
+ /* Set arg for upload_cb or update_cb. */
+ req->cbarg = fsm;
+
+@@ -2265,12 +2265,12 @@ upload_headers_cb (evhtp_request_t *req, evhtp_headers
+
+ err:
+ /* Don't receive any data before the connection is closed. */
+- evhtp_request_pause (req);
++ bufferevent_disable(evhtp_request_get_bev(req), EV_READ);
+
+ /* Set keepalive to 0. This will cause evhtp to close the
+ * connection after sending the reply.
+ */
+- req->keepalive = 0;
++ evhtp_request_set_keepalive(req, 0);
+ send_error_reply (req, EVHTP_RES_BADREQ, err_msg);
+
+ g_free (repo_id);
+@@ -2339,38 +2339,38 @@ upload_file_init (evhtp_t *htp, const char *http_temp_
+
+ cb = evhtp_set_regex_cb (htp, "^/upload/.*", upload_cb, NULL);
+ /* upload_headers_cb() will be called after evhtp parsed all http headers. */
+- 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-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/.*", update_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);
+