svn commit: r477620 - in head: net-mgmt/seafile-server net-mgmt/seafile-server/files www/seahub www/seahub/files
Richard Gallamore
ultima at FreeBSD.org
Mon Aug 20 03:06:15 UTC 2018
Author: ultima
Date: Mon Aug 20 03:06:13 2018
New Revision: 477620
URL: https://svnweb.freebsd.org/changeset/ports/477620
Log:
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.
Deleted:
head/www/seahub/files/runtime_seahub.conf
Modified:
head/net-mgmt/seafile-server/Makefile
head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py
head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh
head/www/seahub/Makefile
head/www/seahub/files/seahub.in
head/www/seahub/pkg-plist
Modified: head/net-mgmt/seafile-server/Makefile
==============================================================================
--- head/net-mgmt/seafile-server/Makefile Mon Aug 20 00:45:15 2018 (r477619)
+++ head/net-mgmt/seafile-server/Makefile Mon Aug 20 03:06:13 2018 (r477620)
@@ -4,6 +4,7 @@ PORTNAME= seafile-server
DISTVERSIONPREFIX= v
DISTVERSION= ${SEAFILE_VER}
DISTVERSIONSUFFIX= -server
+PORTREVISION= 1
CATEGORIES= net-mgmt
MAINTAINER= ultima at FreeBSD.org
Modified: head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py
==============================================================================
--- head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py Mon Aug 20 00:45:15 2018 (r477619)
+++ head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile-mysql.py Mon Aug 20 03:06:13 2018 (r477620)
@@ -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: head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh
==============================================================================
--- head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh Mon Aug 20 00:45:15 2018 (r477619)
+++ head/net-mgmt/seafile-server/files/patch-scripts_setup-seafile.sh Mon Aug 20 03:06:13 2018 (r477620)
@@ -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: head/www/seahub/Makefile
==============================================================================
--- head/www/seahub/Makefile Mon Aug 20 00:45:15 2018 (r477619)
+++ head/www/seahub/Makefile Mon Aug 20 03:06:13 2018 (r477620)
@@ -4,6 +4,7 @@ PORTNAME= seahub
DISTVERSIONPREFIX= v
DISTVERSION= ${SEAHUB_VER}
DISTVERSIONSUFFIX= -pro
+PORTREVISION= 1
CATEGORIES= www
MAINTAINER= ultima at 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: head/www/seahub/files/seahub.in
==============================================================================
--- head/www/seahub/files/seahub.in Mon Aug 20 00:45:15 2018 (r477619)
+++ head/www/seahub/files/seahub.in Mon Aug 20 03:06:13 2018 (r477620)
@@ -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: head/www/seahub/pkg-plist
==============================================================================
--- head/www/seahub/pkg-plist Mon Aug 20 00:45:15 2018 (r477619)
+++ head/www/seahub/pkg-plist Mon Aug 20 03:06:13 2018 (r477620)
@@ -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
More information about the svn-ports-all
mailing list