From owner-svn-ports-all@freebsd.org Mon Aug 20 20:39:50 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA476107C099; Mon, 20 Aug 2018 20:39:50 +0000 (UTC) (envelope-from ultima@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CE1880AA2; Mon, 20 Aug 2018 20:39:50 +0000 (UTC) (envelope-from ultima@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 397E01A48A; Mon, 20 Aug 2018 20:39:50 +0000 (UTC) (envelope-from ultima@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7KKdoK9011380; Mon, 20 Aug 2018 20:39:50 GMT (envelope-from ultima@FreeBSD.org) Received: (from ultima@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7KKdmiW011375; Mon, 20 Aug 2018 20:39:48 GMT (envelope-from ultima@FreeBSD.org) Message-Id: <201808202039.w7KKdmiW011375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ultima set sender to ultima@FreeBSD.org using -f From: Richard Gallamore Date: Mon, 20 Aug 2018 20:39:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r477672 - in branches/2018Q3: net-mgmt/seafile-server net-mgmt/seafile-server/files www/seahub www/seahub/files X-SVN-Group: ports-branches X-SVN-Commit-Author: ultima X-SVN-Commit-Paths: in branches/2018Q3: net-mgmt/seafile-server net-mgmt/seafile-server/files www/seahub www/seahub/files X-SVN-Commit-Revision: 477672 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 20:39:51 -0000 Author: ultima Date: Mon Aug 20 20:39:48 2018 New Revision: 477672 URL: https://svnweb.freebsd.org/changeset/ports/477672 Log: MFH: r477620 Removed fastcgi, this is no longer supported in seafile 6.3+ and previous installs 6.3+ prior to this revision are broken when using the seahub_fastcgi option. Approved by: portmgr (miwi@) Deleted: branches/2018Q3/www/seahub/files/runtime_seahub.conf Modified: branches/2018Q3/net-mgmt/seafile-server/Makefile branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh branches/2018Q3/www/seahub/Makefile branches/2018Q3/www/seahub/files/seahub.in branches/2018Q3/www/seahub/pkg-plist Directory Properties: branches/2018Q3/ (props changed) Modified: branches/2018Q3/net-mgmt/seafile-server/Makefile ============================================================================== --- branches/2018Q3/net-mgmt/seafile-server/Makefile Mon Aug 20 20:36:35 2018 (r477671) +++ branches/2018Q3/net-mgmt/seafile-server/Makefile Mon Aug 20 20:39:48 2018 (r477672) @@ -4,6 +4,7 @@ PORTNAME= seafile-server DISTVERSIONPREFIX= v DISTVERSION= ${SEAFILE_VER} DISTVERSIONSUFFIX= -server +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= ultima@FreeBSD.org Modified: branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py ============================================================================== --- branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py Mon Aug 20 20:36:35 2018 (r477671) +++ branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py Mon Aug 20 20:39:48 2018 (r477672) @@ -1,4 +1,4 @@ ---- scripts/setup-seafile-mysql.py.orig 2017-03-18 16:19:38 UTC +--- scripts/setup-seafile-mysql.py.orig 2018-08-19 23:40:51 UTC +++ scripts/setup-seafile-mysql.py @@ -19,6 +19,8 @@ from ConfigParser import ConfigParser @@ -9,7 +9,7 @@ try: import readline # pylint: disable=W0611 -@@ -422,8 +424,6 @@ Please choose a way to initialize seafile databases: +@@ -424,8 +426,6 @@ Please choose a way to initialize seafil if not re.match(r'^[a-zA-Z0-9_\-\.]+$', host): raise InvalidAnswer('%s is not a valid host' % Utils.highlight(host)) @@ -18,7 +18,7 @@ return host def ask_mysql_host(self): -@@ -1167,17 +1167,23 @@ share_name = / +@@ -1209,17 +1209,23 @@ limit_request_line = 8190 class UserManualHandler(object): def __init__(self): @@ -43,7 +43,7 @@ def report_config(): print -@@ -1242,6 +1248,8 @@ def create_seafile_server_symlink(): +@@ -1284,6 +1290,8 @@ def create_seafile_server_symlink(): def set_file_perm(): filemode = 0600 dirmode = 0700 @@ -52,7 +52,7 @@ files = [ seahub_config.seahub_settings_py, ] -@@ -1253,8 +1261,10 @@ def set_file_perm(): +@@ -1295,8 +1303,10 @@ def set_file_perm(): ] for fpath in files: os.chmod(fpath, filemode) @@ -63,7 +63,7 @@ env_mgr = EnvManager() ccnet_config = CcnetConfigurator() -@@ -1445,8 +1455,12 @@ def report_success(): +@@ -1488,8 +1498,11 @@ def report_success(): Your seafile server configuration has been finished successfully. ----------------------------------------------------------------- @@ -72,7 +72,6 @@ +run seafile server: sysrc seafile_enable=YES + service seafile { start | stop | restart } +run seahub server: sysrc seahub_enable=YES -+fastcgi (optional): sysrc seahub_fastcgi=1 + service seahub { start | stop | restart } +run reset-admin: ./reset-admin.sh Modified: branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh ============================================================================== --- branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh Mon Aug 20 20:36:35 2018 (r477671) +++ branches/2018Q3/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh Mon Aug 20 20:39:48 2018 (r477672) @@ -1,6 +1,6 @@ ---- scripts/setup-seafile.sh.orig 2017-03-13 02:59:56 UTC +--- scripts/setup-seafile.sh.orig 2018-08-19 23:40:51 UTC +++ scripts/setup-seafile.sh -@@ -15,6 +15,8 @@ use_existing_seafile="false" +@@ -17,6 +17,8 @@ use_existing_seafile="false" server_manual_http="https://github.com/haiwen/seafile/wiki" @@ -9,7 +9,7 @@ function welcome () { echo "-----------------------------------------------------------------" echo "This script will guide you to config and setup your seafile server." -@@ -318,10 +320,17 @@ fi +@@ -352,10 +354,17 @@ fi } function copy_user_manuals() { @@ -28,7 +28,7 @@ } function parse_params() { -@@ -673,6 +682,13 @@ chmod 0600 "$dest_settings_py" +@@ -713,6 +722,13 @@ chmod 0600 "$dest_settings_py" chmod 0700 "$default_ccnet_conf_dir" chmod 0700 "$seafile_data_dir" chmod 0700 "$default_conf_dir" @@ -42,7 +42,7 @@ # ------------------------------------------- # copy user manuals to library template -@@ -689,9 +705,18 @@ echo +@@ -729,9 +745,17 @@ echo echo "-----------------------------------------------------------------" echo "Your seafile server configuration has been completed successfully." echo "-----------------------------------------------------------------" @@ -54,7 +54,6 @@ + echo "run seafile server: sysrc seafile_enable=YES" + echo " service seafile { start | stop | restart }" + echo "run seahub server: sysrc seahub_enable=YES" -+ echo "fastcgi (optional): sysrc seahub_fastcgi=1" + echo " service seahub { start | stop | restart }" + echo "run reset-admin: ./reset-admin.sh" +else Modified: branches/2018Q3/www/seahub/Makefile ============================================================================== --- branches/2018Q3/www/seahub/Makefile Mon Aug 20 20:36:35 2018 (r477671) +++ branches/2018Q3/www/seahub/Makefile Mon Aug 20 20:39:48 2018 (r477672) @@ -4,6 +4,7 @@ PORTNAME= seahub DISTVERSIONPREFIX= v DISTVERSION= ${SEAHUB_VER} DISTVERSIONSUFFIX= -pro +PORTREVISION= 1 CATEGORIES= www MAINTAINER= ultima@FreeBSD.org @@ -68,8 +69,6 @@ SUB_FILES= pkg-message do-patch: echo "${WRKSRC}..." - @${MKDIR} ${WRKSRC}/runtime - ${CP} ${FILESDIR}/runtime_seahub.conf ${WRKSRC}/runtime/seahub.conf ${REINPLACE_CMD} -Ee "s|SEAFILE_VERSION = '[0-9]+\.[0-9]+\.[0-9]+'|SEAFILE_VERSION = '${SEAFILE_VER}'|" \ ${WRKSRC}/seahub/settings.py ${REINPLACE_CMD} -e 's|##FIX_WWWDIR##|${PREFIX}/${HAIWENDIR}|' ${WRKSRC}/*.template @@ -89,10 +88,8 @@ do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/runtime/ \ ${STAGEDIR}${PREFIX}/${SEAHUBDIR} ${STAGEDIR}${PREFIX}/${SEAHUB_DATA_DIR} \ ${STAGEDIR}${PREFIX}/${SEAHUB_DATA_DIR}/custom - ${INSTALL} ${WRKSRC}/runtime/seahub.conf \ - ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/runtime/ (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${SEAHUBDIR} \ - "! -name Makefile ! -name runtime ! -name seahub.conf ! -name avatars \ + "! -name Makefile ! -name seahub.conf ! -name avatars \ ! -name default-non-register.jpg ! -name default.png ! -name groups") (cd ${WRKSRC}/media && ${COPYTREE_SHARE} ./avatars \ ${STAGEDIR}${PREFIX}/${SEAHUB_DATA_DIR}) Modified: branches/2018Q3/www/seahub/files/seahub.in ============================================================================== --- branches/2018Q3/www/seahub/files/seahub.in Mon Aug 20 20:36:35 2018 (r477671) +++ branches/2018Q3/www/seahub/files/seahub.in Mon Aug 20 20:39:48 2018 (r477672) @@ -29,8 +29,6 @@ # seafile_logdir (str): Set to "" by default will use the path # %%PREFIX%%/%%HAIWENDIR%%/logs. # Set it to a different path. -# seahub_fastcgi (bool): Set to "NO" by default. -# Set to "YES" to start the fastcgi mode. # seahub_host (int): Default is 127.0.0.1. # seahub_port (int): Default is 8000. @@ -55,16 +53,13 @@ clearsessions_cmd="seahub_clearsessions" : ${seafile_conf:="%%PREFIX%%/%%HAIWENDIR%%/conf"} : ${seafile_datadir:="`cat ${seafile_ccnet}/seafile.ini 2>/dev/null`"} : ${seafile_logdir:="%%PREFIX%%/%%HAIWENDIR%%/logs"} -: ${seahub_fastcgi="NO"} : ${seahub_host:="127.0.0.1"} : ${seahub_port:="8000"} manage_py=${seafile_path}/seahub/manage.py gunicorn_exe=%%PREFIX%%/bin/gunicorn -gunicorn_conf=${seafile_path}/runtime/seahub.conf -pidfile=${seafile_path}/runtime/seahub.pid -errorlog=${seafile_path}/runtime/error.log -accesslog=${seafile_path}/runtime/access.log +gunicorn_conf=${seafile_conf}/gunicorn.conf +pidfile=%%PREFIX%%/%%HAIWENDIR%%/pids/seahub.pid command="%%PREFIX%%/bin/%%PYTHON%%" @@ -126,44 +121,21 @@ seahub_clearsessions() { seahub_start() { if checkyesno seahub_enable; then - if checkyesno seahub_fastcgi; then - echo "Starting seahub service fastcgi mode" - check_required_before; - before_start; + check_required_before; + before_start; + echo "Starting seahub at port ${seahub_port} ..." + su -m "${seafile_user}" -c "$command \"${gunicorn_exe}\" seahub.wsgi:application -c \"${gunicorn_conf}\" -b \"0.0.0.0:${seahub_port}\" --preload --chdir \"$seafile_path/seahub\"" - # Returns 127.0.0.1 if SEAFILE_FASTCGI_HOST is unset or hasn't got any value, - # otherwise returns value of SEAFILE_FASTCGI_HOST environment variable - - echo "Starting seahub (fastcgi) at ${seahub_host}:${seahub_port} ..." - su -m "${seafile_user}" -c "$command \"${manage_py}\" runfcgi host=\"${seahub_host}\" port=\"${seahub_port}\" pidfile=$pidfile \ - outlog=${accesslog} errlog=${errorlog}" - # Ensure seahub is started successfully - sleep 5 - if ! pgrep -f "${manage_py}" 1>/dev/null; then - printf "\033[33mError:Seahub failed to start.\033[m\n" - exit 1; - fi - echo - echo "Seahub is started" - echo - else - check_required_before; - before_start; - echo "Starting seahub at port ${seahub_port} ..." - su -m "${seafile_user}" -c "$command \"${gunicorn_exe}\" seahub.wsgi:application -c \"${gunicorn_conf}\" -b \"0.0.0.0:${seahub_port}\" --preload --chdir \"$seafile_path/seahub\"" - - # Ensure seahub is started successfully - sleep 5 - if ! pgrep -f "seahub.wsgi:application" 2>/dev/null 1>&2; then - printf "\033[33mError:Seahub failed to start.\033[m\n" - echo "Please try to run \"./seahub.sh start\" again" - exit 1; - fi - echo - echo "Seahub is started" - echo + sleep 5 + if ! pgrep -f "seahub.wsgi:application" 2>/dev/null 1>&2; then + printf "\033[33mError:Seahub failed to start.\033[m\n" + echo "Please try to run \"./seahub.sh start\" again" + exit 1; fi + echo + echo "Seahub is started" + echo else return 0 fi Modified: branches/2018Q3/www/seahub/pkg-plist ============================================================================== --- branches/2018Q3/www/seahub/pkg-plist Mon Aug 20 20:36:35 2018 (r477671) +++ branches/2018Q3/www/seahub/pkg-plist Mon Aug 20 20:39:48 2018 (r477672) @@ -2139,7 +2139,6 @@ %%SEAHUBDIR%%/tools/update-seahub-db_0.9.4_to_0.9.5.py @owner %%USERS%% @group %%GROUPS%% -%%SEAFILE_SERVER%%/runtime/seahub.conf %%SEAHUBDIR%%/setenv.sh %%SEAHUBDIR%%/run-seahub.sh %%SEAHUBDIR%%/send_user_notifications.sh