mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
seafile: import seafile-server package and its dependencies
Signed-off-by: Gergely Kiss <mail.gery@gmail.com> Tested-by: Gergely Kiss <mail.gery@gmail.com>
This commit is contained in:
committed by
Steven Barth
parent
42b3bce850
commit
8e781d1a48
12
net/seafile-server/patches/010-makefile-fix.patch
Normal file
12
net/seafile-server/patches/010-makefile-fix.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -rupN seafile-3.1.7-server.orig/fileserver/Makefile.am seafile-3.1.7-server/fileserver/Makefile.am
|
||||
--- seafile-3.1.7-server.orig/fileserver/Makefile.am 2014-10-16 05:30:04.000000000 +0200
|
||||
+++ seafile-3.1.7-server/fileserver/Makefile.am 2014-12-08 00:16:44.289364980 +0100
|
||||
@@ -6,7 +6,7 @@ AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir)
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common \
|
||||
- -I$(includedir) \
|
||||
+ -I$(STAGING_DIR)$(includedir) \
|
||||
@CCNET_CFLAGS@ \
|
||||
@SEARPC_CFLAGS@ \
|
||||
@GLIB2_CFLAGS@ \
|
||||
40
net/seafile-server/patches/020-script-patches.patch
Normal file
40
net/seafile-server/patches/020-script-patches.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
diff -rupN seafile-3.1.7-server.orig/scripts/seaf-gc.sh seafile-3.1.7-server/scripts/seaf-gc.sh
|
||||
--- seafile-3.1.7-server.orig/scripts/seaf-gc.sh 2014-10-16 05:30:04.000000000 +0200
|
||||
+++ seafile-3.1.7-server/scripts/seaf-gc.sh 2014-12-13 00:51:12.919136978 +0100
|
||||
@@ -6,11 +6,10 @@ SCRIPT=$(readlink -f "$0")
|
||||
INSTALLPATH=$(dirname "${SCRIPT}")
|
||||
TOPDIR=$(dirname "${INSTALLPATH}")
|
||||
default_ccnet_conf_dir=${TOPDIR}/ccnet
|
||||
-seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc
|
||||
+seaf_gc=/usr/bin/seafserv-gc
|
||||
seaf_gc_opts=""
|
||||
|
||||
-export PATH=${INSTALLPATH}/seafile/bin:$PATH
|
||||
-export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
|
||||
+export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH"
|
||||
|
||||
script_name=$0
|
||||
function usage () {
|
||||
@@ -78,9 +77,7 @@ function run_seaf_gc () {
|
||||
|
||||
echo "Starting seafserv-gc, please wait ..."
|
||||
|
||||
- LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_gc} \
|
||||
- -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}" \
|
||||
- ${seaf_gc_opts}
|
||||
+ ${seaf_gc} -c "${default_ccnet_conf_dir}" -d "${seafile_data_dir}" ${seaf_gc_opts}
|
||||
|
||||
echo "seafserv-gc run done"
|
||||
echo
|
||||
diff -rupN seafile-3.1.7-server.orig/scripts/setup-seafile-mysql.sh seafile-3.1.7-server/scripts/setup-seafile-mysql.sh
|
||||
--- seafile-3.1.7-server.orig/scripts/setup-seafile-mysql.sh 2014-10-16 05:30:04.000000000 +0200
|
||||
+++ seafile-3.1.7-server/scripts/setup-seafile-mysql.sh 2014-12-13 00:51:49.242172631 +0100
|
||||
@@ -9,6 +9,8 @@ set -e
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
INSTALLPATH=$(dirname "${SCRIPT}")
|
||||
|
||||
+export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH"
|
||||
+
|
||||
cd "$INSTALLPATH"
|
||||
|
||||
python_script=setup-seafile-mysql.py
|
||||
@@ -0,0 +1,24 @@
|
||||
diff -rupN seafile-3.1.7-server.orig/controller/seafile-controller.c seafile-3.1.7-server/controller/seafile-controller.c
|
||||
--- seafile-3.1.7-server.orig/controller/seafile-controller.c 2014-10-16 05:30:04.000000000 +0200
|
||||
+++ seafile-3.1.7-server/controller/seafile-controller.c 2014-11-28 16:50:24.053674057 +0100
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
SeafileController *ctl;
|
||||
|
||||
-static char *controller_pidfile = NULL;
|
||||
+static char *controller_pidfile = "/var/run/seafile/seafile-controller.pid";
|
||||
|
||||
char *bin_dir = NULL;
|
||||
char *installpath = NULL;
|
||||
@@ -614,9 +614,9 @@ stop_ccnet_server ()
|
||||
static void
|
||||
init_pidfile_path (SeafileController *ctl)
|
||||
{
|
||||
- char *pid_dir = g_build_filename (topdir, "pids", NULL);
|
||||
+ char *pid_dir = g_path_get_dirname (controller_pidfile);
|
||||
if (!g_file_test(pid_dir, G_FILE_TEST_EXISTS)) {
|
||||
- if (g_mkdir(pid_dir, 0777) < 0) {
|
||||
+ if (g_mkdir(pid_dir, 0755) < 0) {
|
||||
seaf_warning("failed to create pid dir %s: %s", pid_dir, strerror(errno));
|
||||
controller_exit(1);
|
||||
}
|
||||
53
net/seafile-server/patches/040-seafile-admin.patch
Normal file
53
net/seafile-server/patches/040-seafile-admin.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
diff -rupN seafile-3.1.7-server.orig/tools/seafile-admin seafile-3.1.7-server/tools/seafile-admin
|
||||
--- seafile-3.1.7-server.orig/tools/seafile-admin 2014-10-16 05:30:04.000000000 +0200
|
||||
+++ seafile-3.1.7-server/tools/seafile-admin 2014-12-12 12:09:00.703175935 +0100
|
||||
@@ -416,13 +416,15 @@ def create_gunicorn_conf():
|
||||
content = '''\
|
||||
import os
|
||||
daemon = True
|
||||
-workers = 3
|
||||
+workers = 1
|
||||
+threads = 3
|
||||
|
||||
# Logging
|
||||
runtime_dir = os.path.dirname(__file__)
|
||||
-pidfile = os.path.join(runtime_dir, 'seahub.pid')
|
||||
+pidfile = '/var/run/seafile/seahub.pid'
|
||||
errorlog = os.path.join(runtime_dir, 'error.log')
|
||||
-accesslog = os.path.join(runtime_dir, 'access.log')
|
||||
+# uncomment if you need access logging (works only in fastcgi mode)
|
||||
+#accesslog = os.path.join(runtime_dir, 'access.log')
|
||||
'''
|
||||
try:
|
||||
with open(confpath, 'w') as fp:
|
||||
@@ -607,6 +609,7 @@ def start_seahub_gunicorn():
|
||||
'gunicorn_django',
|
||||
'-c', conf[CONF_SEAHUB_CONF],
|
||||
'-b', '0.0.0.0:%s' % conf[CONF_SEAHUB_PORT],
|
||||
+ '-t', '120',
|
||||
]
|
||||
|
||||
info('Starting seahub...')
|
||||
@@ -738,10 +741,9 @@ def setup_seafile(args):
|
||||
print '-----------------------------------------------------------------'
|
||||
print '-----------------------------------------------------------------'
|
||||
print
|
||||
- print 'To start/stop seafile server:'
|
||||
+ print 'To start, stop or restart seafile server, please run as root:'
|
||||
print
|
||||
- print highlight(' $ cd %s' % cwd)
|
||||
- print highlight(' $ %s { start | stop }' % SCRIPT_NAME)
|
||||
+ print highlight(' # /etc/init.d/seafile { start | stop | restart }')
|
||||
print
|
||||
print 'If you have any problem, refer to\n'
|
||||
print
|
||||
@@ -802,8 +804,7 @@ def start_seafile(args):
|
||||
def stop_seafile(dummy):
|
||||
info('Stopping seafile server')
|
||||
pkill('seafile-controller')
|
||||
- runtime_dir = os.path.join(cwd, 'seafile-server', 'runtime')
|
||||
- pidfile = os.path.join(runtime_dir, 'seahub.pid')
|
||||
+ pidfile = '/var/run/seafile/seahub.pid'
|
||||
try:
|
||||
with open(pidfile, 'r') as fp:
|
||||
pid = fp.read().strip('\n ')
|
||||
Reference in New Issue
Block a user