Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2018 19:15:28 +0000 (UTC)
From:      Richard Gallamore <ultima@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458046 - in head/net-mgmt/seafile-server: . files
Message-ID:  <201801041915.w04JFSs4027089@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ultima
Date: Thu Jan  4 19:15:27 2018
New Revision: 458046
URL: https://svnweb.freebsd.org/changeset/ports/458046

Log:
  * Revision bump for libevhtp
  * Fix build warnings / errors for updated libevhtp
  
  MFH:		2018Q1

Added:
  head/net-mgmt/seafile-server/files/patch-server_Makefile.am   (contents, props changed)
  head/net-mgmt/seafile-server/files/patch-server_http-server.c   (contents, props changed)
  head/net-mgmt/seafile-server/files/patch-server_upload-file.c   (contents, props changed)
Modified:
  head/net-mgmt/seafile-server/Makefile
  head/net-mgmt/seafile-server/files/patch-configure.ac
  head/net-mgmt/seafile-server/files/patch-server_access-file.c

Modified: head/net-mgmt/seafile-server/Makefile
==============================================================================
--- head/net-mgmt/seafile-server/Makefile	Thu Jan  4 19:13:15 2018	(r458045)
+++ head/net-mgmt/seafile-server/Makefile	Thu Jan  4 19:15:27 2018	(r458046)
@@ -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 m
 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

Modified: head/net-mgmt/seafile-server/files/patch-configure.ac
==============================================================================
--- head/net-mgmt/seafile-server/files/patch-configure.ac	Thu Jan  4 19:13:15 2018	(r458045)
+++ head/net-mgmt/seafile-server/files/patch-configure.ac	Thu Jan  4 19:15:27 2018	(r458046)
@@ -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])

Added: head/net-mgmt/seafile-server/files/patch-server_Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/seafile-server/files/patch-server_Makefile.am	Thu Jan  4 19:15:27 2018	(r458046)
@@ -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@ \

Modified: head/net-mgmt/seafile-server/files/patch-server_access-file.c
==============================================================================
--- head/net-mgmt/seafile-server/files/patch-server_access-file.c	Thu Jan  4 19:13:15 2018	(r458045)
+++ head/net-mgmt/seafile-server/files/patch-server_access-file.c	Thu Jan  4 19:15:27 2018	(r458046)
@@ -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;
+@@ -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);
  
-         /* Resume reading incomming requests. */
--        evhtp_request_resume (data->req);
--
-         evhtp_send_reply_end (data->req);
+     /* 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);
  
-+	evhtp_request_resume (data->req);
-+
-         free_sendblock_data (data);
-         return;
-     }
-@@ -309,10 +309,10 @@ next:
-             bev->cbarg = data->saved_cb_arg;
+     /* 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);
  
-             /* Resume reading incomming requests. */
--            evhtp_request_resume (data->req);
--
-             evhtp_send_reply_end (data->req);
+     /* 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);
  
-+	    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);
- }
- 
+     /* Kick start data transfer by sending out http headers. */
+     evhtp_send_reply_start(req, EVHTP_RES_OK);

Added: head/net-mgmt/seafile-server/files/patch-server_http-server.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/seafile-server/files/patch-server_http-server.c	Thu Jan  4 19:15:27 2018	(r458046)
@@ -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;

Added: head/net-mgmt/seafile-server/files/patch-server_upload-file.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/seafile-server/files/patch-server_upload-file.c	Thu Jan  4 19:15:27 2018	(r458046)
@@ -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);
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801041915.w04JFSs4027089>