seafile: import version 5.1.1 and its dependencies

Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
This commit is contained in:
Gergely Kiss
2016-04-30 10:37:30 +02:00
committed by Etienne CHAMPETIER
parent 39e937fae7
commit 437621931a
40 changed files with 1656 additions and 759 deletions
+10 -9
View File
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2015 OpenWrt.org
# Copyright (C) 2007-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,20 +8,21 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-ccnet
PKG_VERSION:=4.1.2
PKG_RELEASE=$(PKG_SOURCE_VERSION)-2
PKG_VERSION:=5.1.1
PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_LICENSE:=GPL-3.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haiwen/ccnet.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a73109f09af4ecc49cdc4c57cdde51b38e15c31a
PKG_SOURCE_VERSION:=6d94fdc4296d542a5552039dc13a67c3448e8b13
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
$(call include_mk, python-package.mk)
define Package/seafile-ccnet
SECTION:=net
@@ -32,6 +33,7 @@ define Package/seafile-ccnet
DEPENDS:=+libsearpc +libevent2 +libopenssl \
+glib2 +python +libzdb +libuuid \
+libpthread +libsqlite3 +jansson $(ICONV_DEPENDS)
EXTRA_DEPENDS:=libsearpc (=5.1.1-8998e7b2c5587f0b94c48db24e2952d08def5add-1)
endef
define Package/seafile-ccnet/description
@@ -48,18 +50,18 @@ CONFIGURE_ARGS += --disable-client \
--disable-compile-demo \
--disable-console
PKG_BUILD_DEPENDS:=vala/host \
libsearpc/host
PKG_BUILD_DEPENDS:=vala/host
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \
-L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz
define Package/seafile-ccnet/install
$(INSTALL_DIR) $(1)/usr/{bin,lib}
$(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ccnet* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/ccnet $(1)/usr/lib/python2.7/site-packages/
$(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/ccnet $(1)$(PYTHON_PKG_DIR)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/
find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
endef
define Build/InstallDev
@@ -67,7 +69,6 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/include/ccnet* $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libccnet.pc $(1)/usr/lib/pkgconfig/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.a $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/
endef
@@ -0,0 +1,31 @@
diff -rupN seafile-ccnet-5.1.1.orig/lib/Makefile.am seafile-ccnet-5.1.1/lib/Makefile.am
--- seafile-ccnet-5.1.1.orig/lib/Makefile.am 2016-04-21 11:04:46.000000000 +0200
+++ seafile-ccnet-5.1.1/lib/Makefile.am 2016-04-22 10:02:52.583732050 +0200
@@ -1,3 +1,4 @@
+include $(TOPDIR)/rules.mk
AM_CPPFLAGS = @GLIB2_CFLAGS@ -I$(top_srcdir)/include \
-I$(top_srcdir)/include/ccnet \
@@ -72,11 +73,11 @@ ccnet-client.c: ccnet-object.h
ccnet-object.h: ${ccnet_object_define}
rm -f $@
- valac --pkg posix ${ccnet_object_define} -C -H ccnet-object.h
+ "$(STAGING_DIR_HOST)/bin/valac" --pkg posix ${ccnet_object_define} -C -H ccnet-object.h
ccnetobj.c: ${ccnet_object_define}
rm -f $@
- valac -C --pkg posix ${ccnet_object_define}
+ "$(STAGING_DIR_HOST)/bin/valac" -C --pkg posix ${ccnet_object_define}
searpc_gen = searpc-signature.h searpc-marshal.h
@@ -86,7 +87,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t
@rm -f rpc_table.tmp
@touch rpc_table.tmp
@echo "[libsearpc]: generating rpc header files"
- @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py
+ @PYTHON@ "$(STAGING_DIR)/usr/bin/searpc-codegen.py" ${top_srcdir}/lib/rpc_table.py
@echo "[libsearpc]: done"
@mv -f rpc_table.tmp $@
@@ -1,300 +0,0 @@
diff -rupN seafile-ccnet-4.1.2.orig/include/ccnet/ccnet-client.h seafile-ccnet-4.1.2/include/ccnet/ccnet-client.h
--- seafile-ccnet-4.1.2.orig/include/ccnet/ccnet-client.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/include/ccnet/ccnet-client.h 2015-09-09 19:22:23.515461892 +0200
@@ -10,11 +10,7 @@
#include <glib.h>
#include <glib-object.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
#include "ccnet-session-base.h"
diff -rupN seafile-ccnet-4.1.2.orig/include/ccnet/cevent.h seafile-ccnet-4.1.2/include/ccnet/cevent.h
--- seafile-ccnet-4.1.2.orig/include/ccnet/cevent.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/include/ccnet/cevent.h 2015-09-09 19:22:23.516461920 +0200
@@ -6,13 +6,9 @@
#ifndef CEVENT_H
#define CEVENT_H
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/event_compat.h>
#include <event2/event_struct.h>
-#else
-#include <event.h>
-#endif
#include <glib.h>
diff -rupN seafile-ccnet-4.1.2.orig/lib/job-mgr.c seafile-ccnet-4.1.2/lib/job-mgr.c
--- seafile-ccnet-4.1.2.orig/lib/job-mgr.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/job-mgr.c 2015-09-09 19:22:23.516461920 +0200
@@ -1,11 +1,7 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/event_compat.h>
-#else
-#include <event.h>
-#endif
#include <string.h>
#include <stdlib.h>
diff -rupN seafile-ccnet-4.1.2.orig/lib/libccnet_utils.h seafile-ccnet-4.1.2/lib/libccnet_utils.h
--- seafile-ccnet-4.1.2.orig/lib/libccnet_utils.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/libccnet_utils.h 2015-09-09 19:22:23.517461948 +0200
@@ -15,11 +15,7 @@
#include <glib-object.h>
#include <stdlib.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
#ifdef WIN32
#include <errno.h>
diff -rupN seafile-ccnet-4.1.2.orig/lib/mainloop.c seafile-ccnet-4.1.2/lib/mainloop.c
--- seafile-ccnet-4.1.2.orig/lib/mainloop.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/mainloop.c 2015-09-09 19:22:23.517461948 +0200
@@ -3,13 +3,9 @@
#include "include.h"
#include <ccnet.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/event_compat.h>
#include <event2/event_struct.h>
-#else
-#include <event.h>
-#endif
static int
cmdrsp_cb (const char *code, char *content, int clen, void *data)
diff -rupN seafile-ccnet-4.1.2.orig/lib/net.h seafile-ccnet-4.1.2/lib/net.h
--- seafile-ccnet-4.1.2.orig/lib/net.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/net.h 2015-09-09 19:22:23.517461948 +0200
@@ -19,11 +19,7 @@
#include <netinet/tcp.h>
#endif
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
#ifdef WIN32
#define ECONNREFUSED WSAECONNREFUSED
diff -rupN seafile-ccnet-4.1.2.orig/lib/packet-io.h seafile-ccnet-4.1.2/lib/packet-io.h
--- seafile-ccnet-4.1.2.orig/lib/packet-io.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/packet-io.h 2015-09-09 19:22:23.518461976 +0200
@@ -5,11 +5,7 @@
#include <packet.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
struct buffer;
diff -rupN seafile-ccnet-4.1.2.orig/lib/processor.c seafile-ccnet-4.1.2/lib/processor.c
--- seafile-ccnet-4.1.2.orig/lib/processor.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/processor.c 2015-09-09 19:22:23.518461976 +0200
@@ -4,11 +4,7 @@
#include <pthread.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
-#else
-#include <event.h>
-#endif
#include "ccnet-client.h"
#include "processor.h"
diff -rupN seafile-ccnet-4.1.2.orig/lib/timer.c seafile-ccnet-4.1.2/lib/timer.c
--- seafile-ccnet-4.1.2.orig/lib/timer.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/timer.c 2015-09-09 19:22:23.519462004 +0200
@@ -1,12 +1,8 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/event_compat.h>
#include <event2/event_struct.h>
-#else
-#include <event.h>
-#endif
#include <sys/time.h>
diff -rupN seafile-ccnet-4.1.2.orig/lib/utils.h seafile-ccnet-4.1.2/lib/utils.h
--- seafile-ccnet-4.1.2.orig/lib/utils.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/lib/utils.h 2015-09-09 19:22:23.519462004 +0200
@@ -11,11 +11,7 @@
#include <glib-object.h>
#include <stdlib.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
#ifdef WIN32
#include <errno.h>
diff -rupN seafile-ccnet-4.1.2.orig/net/cluster/server.c seafile-ccnet-4.1.2/net/cluster/server.c
--- seafile-ccnet-4.1.2.orig/net/cluster/server.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/cluster/server.c 2015-09-09 19:24:33.800125741 +0200
@@ -6,11 +6,7 @@
#include <stdio.h>
#include <getopt.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/dns.h>
-#else
-#include <evdns.h>
-#endif
#include "inner-session.h"
#include "outer-session.h"
diff -rupN seafile-ccnet-4.1.2.orig/net/common/connect-mgr.h seafile-ccnet-4.1.2/net/common/connect-mgr.h
--- seafile-ccnet-4.1.2.orig/net/common/connect-mgr.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/common/connect-mgr.h 2015-09-09 19:22:23.520462032 +0200
@@ -3,11 +3,7 @@
#ifndef CCNET_CONNECTION_MANAGER
#define CCNET_CONNECTION_MANAGER
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
-#else
-#include <event.h>
-#endif
#include "timer.h"
diff -rupN seafile-ccnet-4.1.2.orig/net/common/packet-io.c seafile-ccnet-4.1.2/net/common/packet-io.c
--- seafile-ccnet-4.1.2.orig/net/common/packet-io.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/common/packet-io.c 2015-09-09 19:22:23.521462060 +0200
@@ -13,13 +13,9 @@
#include <unistd.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/bufferevent.h>
#include <event2/bufferevent_struct.h>
-#else
-#include <event.h>
-#endif
#include <glib.h>
#include <errno.h>
diff -rupN seafile-ccnet-4.1.2.orig/net/common/packet-io.h seafile-ccnet-4.1.2/net/common/packet-io.h
--- seafile-ccnet-4.1.2.orig/net/common/packet-io.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/common/packet-io.h 2015-09-09 19:22:23.521462060 +0200
@@ -5,13 +5,9 @@
#include "packet.h"
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
#include <event2/buffer.h>
#include <event2/buffer_compat.h>
-#else
-#include <evutil.h>
-#endif
/* struct evbuffer; */
/* for libevent2 */
diff -rupN seafile-ccnet-4.1.2.orig/net/common/peer.c seafile-ccnet-4.1.2/net/common/peer.c
--- seafile-ccnet-4.1.2.orig/net/common/peer.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/common/peer.c 2015-09-09 19:22:23.522462088 +0200
@@ -2,14 +2,10 @@
#include "common.h"
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/bufferevent.h>
#include <event2/bufferevent_compat.h>
#include <event2/bufferevent_struct.h>
-#else
-#include <event.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
diff -rupN seafile-ccnet-4.1.2.orig/net/common/session.h seafile-ccnet-4.1.2/net/common/session.h
--- seafile-ccnet-4.1.2.orig/net/common/session.h 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/common/session.h 2015-09-09 19:22:23.523462116 +0200
@@ -3,13 +3,9 @@
#ifndef CCNET_SESSION_H
#define CCNET_SESSION_H
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/event_compat.h>
#include <event2/event_struct.h>
-#else
-#include <event.h>
-#endif
#include <glib.h>
#include <glib/gstdio.h>
diff -rupN seafile-ccnet-4.1.2.orig/net/daemon/ccnet-daemon.c seafile-ccnet-4.1.2/net/daemon/ccnet-daemon.c
--- seafile-ccnet-4.1.2.orig/net/daemon/ccnet-daemon.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/daemon/ccnet-daemon.c 2015-09-09 19:24:59.313846178 +0200
@@ -6,12 +6,8 @@
#include <stdio.h>
#include <getopt.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/dns.h>
#include <event2/dns_compat.h>
-#else
-#include <evdns.h>
-#endif
#include "daemon-session.h"
#include "rpc-service.h"
diff -rupN seafile-ccnet-4.1.2.orig/net/daemon/ccnet-test.c seafile-ccnet-4.1.2/net/daemon/ccnet-test.c
--- seafile-ccnet-4.1.2.orig/net/daemon/ccnet-test.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/daemon/ccnet-test.c 2015-09-09 19:24:45.089444412 +0200
@@ -5,11 +5,7 @@
#include <stdio.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/dns.h>
-#else
-#include <evdns.h>
-#endif
#include "utils.h"
diff -rupN seafile-ccnet-4.1.2.orig/net/server/ccnet-server.c seafile-ccnet-4.1.2/net/server/ccnet-server.c
--- seafile-ccnet-4.1.2.orig/net/server/ccnet-server.c 2015-09-09 18:49:35.000000000 +0200
+++ seafile-ccnet-4.1.2/net/server/ccnet-server.c 2015-09-09 19:25:53.967392265 +0200
@@ -6,11 +6,7 @@
#include <stdio.h>
#include <getopt.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/dns.h>
-#else
-#include <evdns.h>
-#endif
#include "server-session.h"
#include "user-mgr.h"
+17 -116
View File
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2015 OpenWrt.org
# Copyright (C) 2007-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-seahub
PKG_VERSION:=4.1.2
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_VERSION:=5.1.1
PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_LICENSE:=Apache-2.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haiwen/seahub.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=3fb1288f920de03a4e2e6a06b60671ce98971742
PKG_SOURCE_VERSION:=95f762f396c81f840fe658ab983df53784083bb1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
@@ -27,117 +27,24 @@ define Package/seafile-seahub
TITLE:=Seafile server - seahub component
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=http://seafile.com/
DEPENDS:=+python +simplejson +pillow +python-setuptools
endef
define Package/seafile-seahub/description
The web end of seafile server.
NOTE: in order to have better performance, language support is turned off by default.
Please set 'USE_I18N = True' in seahub_settings.py to support multiple languages.
endef
PKG_BUILD_DEPENDS:=python-setuptools
PYTHONPATH:=$(PYTHONPATH):$(PKG_BUILD_DIR)/thirdpart
define Download/django
FILE=Django-1.5.8.tar.gz
URL=https://www.djangoproject.com/m/releases/1.5/
MD5SUM:=675fc736e2c29090f005e217ccf90b5b
endef
define Download/djblets
PROTO=git
URL=https://github.com/djblets/djblets.git
SUBDIR=djblets-0.6.14
FILE=djblets-0.6.14.tar.gz
VERSION=58c09bae9b71ac164f78c76746fd2e545aae6c68
endef
define Download/gunicorn
FILE=gunicorn-0.16.1.tar.gz
URL=https://pypi.python.org/packages/source/g/gunicorn/
MD5SUM:=d53d5d04d941f2a3089e814e753a218f
endef
define Download/six
FILE=six-1.4.1.tar.gz
URL=https://pypi.python.org/packages/source/s/six/
MD5SUM:=bdbb9e12d3336c198695aa4cf3a61d62
endef
define Download/chardet
FILE=chardet-2.1.1.tar.gz
URL=https://pypi.python.org/packages/source/c/chardet/
MD5SUM:=295367fd210d20f3febda615a88e1ef0
endef
define Download/flup
FILE=flup-1.0.2-py2.6.egg
URL=https://pypi.python.org/packages/2.6/f/flup/
MD5SUM:=93ec6e3baeee3e5649a8456105178d4e
endef
define Download/lockfile
FILE=lockfile-0.9.1.tar.gz
URL=https://pypi.python.org/packages/source/l/lockfile/
MD5SUM:=ce61468d4c1263e3005737bbed2641f0
endef
define Download/python-daemon
FILE=python-daemon-1.5.5.tar.gz
URL=https://pypi.python.org/packages/source/p/python-daemon/
MD5SUM:=1f6cd41473c2e201021a0aeef395b2b1
endef
define Download/python-dateutil
FILE=python-dateutil-1.5.tar.gz
URL=https://pypi.python.org/packages/source/p/python-dateutil/
MD5SUM:=0dcb1de5e5cad69490a3b6ab63f0cfa5
DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \
+django-compressor +django-constance +django-jsonfield +django-picklefield \
+django-postoffice +django-restframework +django-statici18n +et_xmlfile \
+flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql +pytz +rcssmin
endef
define Build/Configure
endef
define Build/Compile
# Download python dependencies
$(eval $(call Download,django))
$(eval $(call Download,djblets))
$(eval $(call Download,gunicorn))
$(eval $(call Download,six))
$(eval $(call Download,chardet))
$(eval $(call Download,flup))
$(eval $(call Download,lockfile))
$(eval $(call Download,python-daemon))
$(eval $(call Download,python-dateutil))
# Install python dependencies
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/Django-1.5.8.tar.gz)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/djblets-0.6.14.tar.gz)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/gunicorn-0.16.1.tar.gz)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/six-1.4.1.tar.gz)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/chardet-2.1.1.tar.gz)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/flup-1.0.2-py2.6.egg)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/lockfile-0.9.1.tar.gz)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/python-daemon-1.5.5.tar.gz)
$(call HostPython,, \
$(STAGING_DIR_ROOT)/usr/bin/easy_install -d $(PKG_BUILD_DIR)/thirdpart -Z -N \
$(DL_DIR)/python-dateutil-1.5.tar.gz)
$(call Build/Compile/Default,locale)
endef
define Package/seafile-seahub/description
The web end of seafile server.
NOTE: in order to have better performance, localization support is turned off by default.
Please set 'USE_I18N = True' in seahub_settings.py if you intend to use languages other than English.
endef
define Package/seafile-seahub/install
@@ -146,14 +53,8 @@ define Package/seafile-seahub/install
$(CP) $(PKG_BUILD_DIR)/*.{sh,template,py,txt} $(1)/usr/share/seafile/seafile-server/seahub/
$(CP) $(PKG_BUILD_DIR)/{CONTRIBUTORS,HACKING,README.markdown} $(1)/usr/share/seafile/seafile-server/seahub/
$(CP) $(PKG_BUILD_DIR)/pylintrc* $(1)/usr/share/seafile/seafile-server/seahub/
# fix python exec path in scripts
sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/chardetect.py
sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/django-admin.py
sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn
sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn_django
sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/share/seafile/seafile-server/seahub/thirdpart/gunicorn_paster
find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
sed -i "s/\(SEAFILE_VERSION\s*=\s*\)'\([0-9]\.[0-9]\.[0-9]\)'/\1'$(PKG_VERSION)'/g" $(1)/usr/share/seafile/seafile-server/seahub/seahub/settings.py
$(SED) "s/\(SEAFILE_VERSION\s*=\s*\)'\([0-9]\.[0-9]\.[0-9]\)'/\1'$(PKG_VERSION)'/g" $(1)/usr/share/seafile/seafile-server/seahub/seahub/settings.py
endef
$(eval $(call BuildPackage,seafile-seahub))
@@ -0,0 +1,28 @@
diff -rupN seafile-seahub-5.1.1.orig/Makefile seafile-seahub-5.1.1/Makefile
--- seafile-seahub-5.1.1.orig/Makefile 2016-04-26 23:59:48.000000000 +0200
+++ seafile-seahub-5.1.1/Makefile 2016-04-28 09:03:35.507105416 +0200
@@ -1,3 +1,6 @@
+include $(TOPDIR)/rules.mk
+$(call include_mk, python-package.mk)
+
PROJECT=seahub
develop: setup-git
@@ -9,7 +12,7 @@ dist: locale uglify statici18n collectst
locale:
@echo "--> Compile locales"
- django-admin.py compilemessages
+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages)
@echo ""
uglify:
@@ -19,7 +22,7 @@ uglify:
statici18n:
@echo "--> Generate JS locale files in static/scripts/i18n"
- python manage.py compilejsi18n
+ $(call HostPython,,manage.py compilejsi18n)
collectstatic:
@echo "--> Collect django static files to media/assets"
+40 -62
View File
@@ -1,29 +1,28 @@
#
# Copyright (C) 2007-2015 OpenWrt.org
# Copyright (C) 2007-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# NOTE: make sure to update EXTRA_DEPENDS in case of version/release changes!
include $(TOPDIR)/rules.mk
PKG_NAME:=seafile-server
PKG_VERSION:=4.1.2
PKG_RELEASE=$(PKG_SOURCE_VERSION)-5
PKG_VERSION:=5.1.1
PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
PKG_LICENSE:=GPL-3.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/haiwen/seafile.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=c0166019c712e2e1d5e532fd5f7401b1b72db6d8
PKG_SOURCE_VERSION:=5a8677a3acdde748caa387adfc054da64f2a24ea
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
$(call include_mk, python-package.mk)
define Package/seafile-server
SECTION:=net
@@ -31,21 +30,16 @@ define Package/seafile-server
TITLE:=Seafile server
MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
URL:=http://seafile.com/
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub \
+sqlite3-cli +python-mysql +jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 \
+libmysqlclient +libpthread +libuuid \
+bash +sudo +procps-ng +procps-ng-pkill $(ICONV_DEPENDS)
EXTRA_DEPENDS:=seafile-ccnet (=4.1.2-a73109f09af4ecc49cdc4c57cdde51b38e15c31a-2), seafile-seahub (=4.1.2-3fb1288f920de03a4e2e6a06b60671ce98971742)
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql \
+jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient +libevhtp \
+libpthread +libuuid +bash +procps +procps-pkill $(ICONV_DEPENDS)
EXTRA_DEPENDS:=seafile-ccnet (=5.1.1-6d94fdc4296d542a5552039dc13a67c3448e8b13-1), seafile-seahub (=5.1.1-95f762f396c81f840fe658ab983df53784083bb1-1), libevhtp (>=1.2.10)
endef
define Package/seafile-server/description
Open source cloud storage with advanced features on privacy protection and teamwork.
endef
define Package/seafile-server/conffiles
/etc/config/seafile
endef
CONFIGURE_ARGS += --disable-riak \
--disable-client \
--disable-fuse \
@@ -55,87 +49,71 @@ CONFIGURE_ARGS += --disable-riak \
--disable-server-pkg \
--disable-console
PKG_BUILD_DEPENDS:=vala/host \
libsearpc/host \
libevhtp-1.1
PKG_BUILD_DEPENDS:=vala/host
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \
-L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz
define Package/seafile-server/conffiles
/etc/config/seafile
endef
define Package/seafile-server/install
$(INSTALL_DIR) $(1)/usr/{bin,lib}
$(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages
$(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/runtime
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server
$(INSTALL_DIR) $(1)/usr/share/seafile/conf
$(INSTALL_DIR) $(1)/etc/{config,init.d}
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/seafile/ $(1)/usr/lib/python2.7/site-packages/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/seaserv/ $(1)/usr/lib/python2.7/site-packages/
$(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seafile/ $(1)$(PYTHON_PKG_DIR)/
$(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seaserv/ $(1)$(PYTHON_PKG_DIR)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libseafile.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/scripts/seaf-gc.sh $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/seaf-fsck.sh $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.py $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/setup-seafile-mysql.sh $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.py $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.sh $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/check_init_admin.py $(1)/usr/share/seafile/seafile-server/
$(CP) $(PKG_BUILD_DIR)/scripts/upgrade/ $(1)/usr/share/seafile/seafile-server/
$(INSTALL_BIN) ./files/seafile.init $(1)/etc/init.d/seafile
$(CP) ./files/seafile.conf $(1)/etc/config/seafile
$(INSTALL_BIN) ./files/seafile.init $(1)/etc/init.d/seafile
$(INSTALL_BIN) ./files/seahub.init $(1)/etc/init.d/seahub
find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
$(CP) $(PKG_INSTALL_DIR)/usr/include/seafile/ $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseafile.pc $(1)/usr/lib/pkgconfig/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libseafile.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seafile/ $(1)$(PYTHON_PKG_DIR)/
$(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/seaserv/ $(1)$(PYTHON_PKG_DIR)/
endef
define Package/seafile-server/postinst
#!/bin/sh
if ! group_exists seafile; then
group_add_next seafile; fi
SEAFILE_GID=$$(grep -s '^seafile:' "$${IPKG_INSTROOT}/etc/group" | cut -d: -f3)
if ! user_exists seafile; then
user_add seafile "" "$${SEAFILE_GID}" seafile /usr/share/seafile /bin/sh; fi
if [ -z "$${IPKG_INSTROOT}" ]
if [ ! -d /usr/share/seafile/seafile-data ]
then
chown -R seafile:seafile /usr/share/seafile/
chmod -R o-rwx /usr/share/seafile/
echo "*** Installation completed, running configuration script..."
/etc/init.d/seafile setup
if [ ! -d /usr/share/seafile/seafile-data ]
if [ $$? -ne 0 ]
then
echo "*** Installation completed, running configuration script..."
/etc/init.d/seafile setup
if [ $$? -ne 0 ]
then
echo
echo "*** ERROR: Configuration failed. Please fix the issues if any and re-run the script using the command below:"
echo "*** \"/etc/init.d/seafile setup\""
fi
echo
echo "*** NOTE: you need to create an admin account before using Seafile."
echo "*** Please run \"/etc/init.d/seafile create_admin\" to do so."
else
echo "*** It seems you are upgrading from an older version."
echo "*** If so, please run the appropriate upgrade scripts before using the new version of Seafile."
echo "*** Upgrade scripts are located at \"/usr/share/seafile/seafile-server/upgrade\""
echo
echo "*** For more information, please read http://manual.seafile.com/deploy/upgrade.html"
echo "*** ERROR: Configuration failed. Please fix the issues if any and re-run the script using the command below:"
echo "*** \"/etc/init.d/seafile setup\""
fi
else
cat > "$${IPKG_INSTROOT}/etc/uci-defaults/99_seafile-server" << EOF
#!/bin/sh
chown -R seafile:seafile /usr/share/seafile/
chmod -R o-rwx /usr/share/seafile/
exit 0
EOF
echo "*** seafile-data directory already exists."
echo "*** In case you are upgrading seafile, please run the appropriate upgrade script"
echo "*** manually before using the new version of Seafile."
echo "*** Upgrade scripts are located at \"/usr/share/seafile/seafile-server/upgrade\""
echo
echo "*** For more information, please read http://manual.seafile.com/deploy/upgrade.html"
fi
endef
+10
View File
@@ -1,2 +1,12 @@
# Start Seahub in fastcgi mode - 1 = enable, 0 = disable
SEAHUB_FASTCGI=0
# Listen on the port specified below (defaults to 8000)
SEAHUB_PORT=8000
# Method of serving requests (fastcgi mode only) - threaded or prefork
# Using threaded mode is recommended as it consumes less resources
SEAHUB_METHOD=threaded
# The maximum number of worker processes/threads (fastcgi mode only)
# General formula: (2 x $num_cores) + 1
# To set the number of workers in WSGI mode (which is the default)
# please edit /usr/share/seafile/seafile-server/runtime/seahub.conf
SEAHUB_WORKERS=3
+133 -33
View File
@@ -1,57 +1,157 @@
#!/bin/sh /etc/rc.common
#!/bin/bash /etc/rc.common
START=99
START=98
APP=seafile
EXTRA_HELP=" setup Runs the setup script
create_admin Creates the administrative login
reset_admin Alias to create_admin"
EXTRA_COMMANDS="setup create_admin reset_admin"
SEAHUB_FASTCGI=0
TOPDIR=/usr/share/seafile
default_ccnet_conf_dir=${TOPDIR}/ccnet
central_config_dir=${TOPDIR}/conf
seaf_controller=/usr/bin/seafile-controller
[ -f /etc/config/seafile ] && \
. /etc/config/seafile
function validate_ccnet_conf_dir () {
if [[ ! -d ${default_ccnet_conf_dir} ]]; then
echo "Error: there is no ccnet config directory."
echo "Have you run \"/etc/init.d/seafile setup\"?"
echo ""
exit 1
fi
}
export PATH="/usr/share/seafile/seafile-server/seahub/thirdpart:${PATH}"
export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:${PYTHONPATH}"
function validate_central_conf_dir () {
if [[ ! -d ${central_config_dir} ]]; then
echo "Error: there is no conf/ directory."
echo "Have you run \"/etc/init.d/seafile setup\"?"
echo ""
exit 1
fi
}
start() {
if [ ! -d /var/run/seafile ]
then
mkdir /var/run/seafile
chown seafile:seafile /var/run/seafile
chmod o-rwx /var/run/seafile
function read_seafile_data_dir () {
seafile_ini=${default_ccnet_conf_dir}/seafile.ini
if [[ ! -f ${seafile_ini} ]]; then
echo "Error: ${seafile_ini} not found."
exit 1
fi
seafile_data_dir=$(cat "${seafile_ini}")
if [[ ! -d ${seafile_data_dir} ]]; then
echo "Your seafile server data directory \"${seafile_data_dir}\" is invalid or doesn't exits."
echo "Please check it first, or create this directory yourself."
echo ""
exit 1
fi
}
function test_config() {
if ! ${seaf_controller} --test \
-c "${default_ccnet_conf_dir}" \
-d "${seafile_data_dir}" \
-F "${central_config_dir}" ; then
exit 1
fi
}
function check_component_running() {
name=$1
cmd=$2
if pid=$(pgrep -f "$cmd" 2>/dev/null); then
return 1
fi
}
function validate_already_running () {
check_component_running "seafile-controller" "seafile-controller -F ${central_config_dir}" || return 1
check_component_running "ccnet-server" "ccnet-server -F ${central_config_dir}" || return 1
check_component_running "seaf-server" "seaf-server -F ${central_config_dir}" || return 1
check_component_running "fileserver" "fileserver -F ${central_config_dir}" || return 1
check_component_running "seafdav" "wsgidav.server.run_server" || return 1
}
function start_seafile_server () {
if ! validate_already_running; then
if [[ "$name" == "seafile-controller" ]]; then
echo "Seafile already running."
else
echo "Error: component [$name] is already running. Please try stopping it manually by running \"kill $pid\"."
echo "To force killing the process, use \"kill -9 $pid\"."
fi
exit 1
fi
validate_central_conf_dir
validate_ccnet_conf_dir
read_seafile_data_dir
test_config
echo "Starting seafile server, please wait ..."
${seaf_controller} \
-F "${central_config_dir}" \
-c "${default_ccnet_conf_dir}" \
-d "${seafile_data_dir}"
sleep 3
# check if seafile server started successfully
if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then
echo "Failed to start seafile server"
exit 1
fi
if [ ${SEAHUB_FASTCGI} -eq 1 ]; then
cd "/usr/share/seafile" && \
sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \
"/usr/bin/seafile-admin" start --fastcgi
echo "Seafile server started"
echo
}
function stop_seafile_server () {
if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then
echo "Seafile server not running"
else
cd "/usr/share/seafile" && \
sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \
"/usr/bin/seafile-admin" start
echo "Stopping seafile server ..."
pkill -SIGTERM -f "seafile-controller -F ${central_config_dir}"
pkill -f "ccnet-server -F ${central_config_dir}"
pkill -f "seaf-server -F ${central_config_dir}"
pkill -f "fileserver -F ${central_config_dir}"
pkill -f "soffice.*--invisible --nocrashreport"
pkill -f "wsgidav.server.run_server"
retry=1
while ! validate_already_running && [ $retry -lt 60 ]; do sleep 1; ((retry++)); done
if ! validate_already_running; then
echo "Error: [$name] component is still running. Please try stopping it manually by running \"kill $pid\"."
echo "To force killing the process, use \"kill -9 $pid\"."
fi
fi
}
stop() {
cd "/usr/share/seafile" && \
sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \
"/usr/bin/seafile-admin" stop
function restart_seafile_server () {
stop_seafile_server
start_seafile_server
}
setup() {
cd "/usr/share/seafile" && \
sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \
"/usr/bin/seafile-admin" setup
function start() {
start_seafile_server
}
create_admin() {
cd "/usr/share/seafile" && \
sudo PYTHONPATH="${PYTHONPATH}" -u seafile -E \
"/usr/bin/seafile-admin" create-admin
function stop() {
stop_seafile_server
}
reset_admin() {
function restart() {
restart_seafile_server
}
function setup() {
cd "$TOPDIR" && \
/usr/bin/seafile-admin setup
}
function create_admin() {
cd "$TOPDIR" && \
/usr/bin/seafile-admin create-admin
}
function reset_admin() {
create_admin
}
+226
View File
@@ -0,0 +1,226 @@
#!/bin/bash /etc/rc.common
START=99
APP=seahub
EXTRA_HELP=" clearsessions Clears expired sessions from database"
EXTRA_COMMANDS="clearsessions"
SEAHUB_FASTCGI=0
SEAHUB_PORT=8000
SEAHUB_METHOD=threaded
SEAHUB_WORKERS=3
[ -f /etc/config/seafile ] && \
. /etc/config/seafile
INSTALLPATH=/usr/share/seafile/seafile-server
TOPDIR=$(dirname "${INSTALLPATH}")
default_ccnet_conf_dir=${TOPDIR}/ccnet
central_config_dir=${TOPDIR}/conf
manage_py=${INSTALLPATH}/seahub/manage.py
gunicorn_conf=${INSTALLPATH}/runtime/seahub.conf
pidfile=/var/run/seafile/seahub.pid
errorlog=${INSTALLPATH}/runtime/error.log
accesslog=${INSTALLPATH}/runtime/access.log
gunicorn_exe=/usr/bin/gunicorn
function check_python_executable() {
if [[ "$PYTHON" != "" && -x $PYTHON ]]; then
return 0
fi
if which python2.7 2>/dev/null 1>&2; then
PYTHON=python2.7
elif which python27 2>/dev/null 1>&2; then
PYTHON=python27
else
echo
echo "Can't find a python executable of version 2.7 or above in PATH"
echo "Install python 2.7+ before continue."
echo "Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it"
echo
exit 1
fi
}
function validate_ccnet_conf_dir() {
if [[ ! -d ${default_ccnet_conf_dir} ]]; then
echo "Error: there is no ccnet config directory."
echo "Have you run '/etc/init.d/seafile setup'?"
echo ""
exit 1
fi
}
function read_seafile_data_dir() {
seafile_ini=${default_ccnet_conf_dir}/seafile.ini
if [[ ! -f ${seafile_ini} ]]; then
echo "Error: ${seafile_ini} not found."
exit 1
fi
seafile_data_dir=$(cat "${seafile_ini}")
if [[ ! -d ${seafile_data_dir} ]]; then
echo "Your seafile server data directory \"${seafile_data_dir}\" is invalid or doesn't exits."
echo "Please check it first, or create this directory yourself."
echo ""
exit 1
fi
}
function validate_seahub_running() {
if pid=$(pgrep -f "${manage_py}" 2>/dev/null); then
return 1
elif pid=$(pgrep -f "seahub.wsgi:application" 2>/dev/null); then
return 1
fi
}
function validate_port() {
if ! [[ ${SEAHUB_PORT} =~ ^[1-9][0-9]{1,4}$ ]] ; then
printf "\033[033m${SEAHUB_PORT}\033[m is not a valid port number\n"
exit 1
fi
}
function warning_if_seafile_not_running() {
if ! pgrep -f "seafile-controller -F ${central_config_dir}" 2>/dev/null 1>&2; then
echo
echo "Error: seafile-controller not running. Have you run \"/etc/init.d/seafile start\"?"
echo
exit 1
fi
}
function prepare_seahub_log_dir() {
logdir="${TOPDIR}/logs"
if ! [[ -d "${logsdir}" ]]; then
if ! mkdir -p "${logdir}"; then
echo "Error: failed to create log dir \"${logdir}\""
exit 1
fi
fi
export SEAHUB_LOG_DIR="${logdir}"
}
function before_start() {
prepare_env
warning_if_seafile_not_running
if ! validate_seahub_running; then
echo "Seahub is already running."
exit 1
fi
prepare_seahub_log_dir
validate_port
}
function start_seahub() {
before_start
echo "Starting seahub at port ${SEAHUB_PORT} ..."
check_init_admin
$PYTHON $gunicorn_exe seahub.wsgi:application -c "${gunicorn_conf}" -b "0.0.0.0:${SEAHUB_PORT}" --preload
# Ensure seahub is started successfully
retry=1
while ! validate_seahub_running && [[ ! -f "${pidfile}" ]] && [[ $retry -lt 120 ]]; do sleep 1; ((retry++)); done
if ! validate_seahub_running && [[ -f "${pidfile}" ]]; then
echo
echo "Seahub is started"
echo
else
printf "\033[33mError: Seahub failed to start.\033[m\n"
exit 1
fi
}
function start_seahub_fastcgi() {
before_start
# 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
address=`(test -z "$SEAFILE_FASTCGI_HOST" && echo "127.0.0.1") || echo $SEAFILE_FASTCGI_HOST`
echo "Starting seahub (fastcgi) at ${address}:${SEAHUB_PORT} ..."
check_init_admin
$PYTHON "${manage_py}" runfcgi host=${address} port=${SEAHUB_PORT} pidfile=${pidfile} \
outlog=${accesslog} errlog=${errorlog} maxchildren=${SEAHUB_WORKERS} method=${SEAHUB_METHOD}
# Ensure seahub is started successfully
retry=1
while ! validate_seahub_running && [[ ! -f "${pidfile}" ]] && [[ $retry -lt 120 ]]; do sleep 1; ((retry++)); done
if ! validate_seahub_running && [[ -f "${pidfile}" ]]; then
echo
echo "Seahub is started"
echo
else
printf "\033[33mError: Seahub failed to start.\033[m\n"
exit 1
fi
}
function prepare_env() {
check_python_executable
validate_ccnet_conf_dir
read_seafile_data_dir
export CCNET_CONF_DIR=${default_ccnet_conf_dir}
export SEAFILE_CONF_DIR=${seafile_data_dir}
export SEAFILE_CENTRAL_CONF_DIR=${central_config_dir}
export PYTHONPATH="${INSTALLPATH}/seahub:${INSTALLPATH}/seahub/thirdpart:${PYTHONPATH}"
}
function clear_sessions() {
prepare_env
echo "Start clear expired session records ..."
$PYTHON "${manage_py}" clearsessions
echo
echo "Done"
echo
}
function stop_seahub() {
if [[ -f ${pidfile} ]]; then
pid=$(cat "${pidfile}")
echo "Stopping seahub ..."
kill ${pid}
rm -f ${pidfile}
retry=1
while ! validate_seahub_running && [ $retry -lt 60 ]; do sleep 1; ((retry++)); done
if ! validate_seahub_running; then
echo "Error: seahub cannot be stopped. Please try stopping it manually by running \"kill $(echo "$pid" | tr '\n' ' ')\"."
echo "To force killing the processes, use \"kill -9 $(echo "$pid" | tr '\n' ' ')\"."
fi
else
echo "Seahub is not running"
fi
}
function check_init_admin() {
check_init_admin_script=${INSTALLPATH}/check_init_admin.py
if ! $PYTHON $check_init_admin_script; then
exit 1
fi
}
function start() {
if [ "$SEAHUB_FASTCGI" == "1" ]; then
start_seahub_fastcgi
else
start_seahub
fi
}
function stop() {
stop_seahub
}
function restart() {
stop
start
}
function clearsessions() {
clear_sessions
}
@@ -1,40 +1,77 @@
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}")
diff -rupN seafile-server-5.1.1.orig/scripts/seaf-fsck.sh seafile-server-5.1.1/scripts/seaf-fsck.sh
--- seafile-server-5.1.1.orig/scripts/seaf-fsck.sh 2016-04-21 11:05:26.000000000 +0200
+++ seafile-server-5.1.1/scripts/seaf-fsck.sh 2016-04-22 09:10:13.075581325 +0200
@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}")
TOPDIR=$(dirname "${INSTALLPATH}")
default_ccnet_conf_dir=${TOPDIR}/ccnet
default_conf_dir=${TOPDIR}/conf
-seaf_fsck=${INSTALLPATH}/seafile/bin/seaf-fsck
+seaf_fsck=/usr/bin/seaf-fsck
export PATH=${INSTALLPATH}/seafile/bin:$PATH
export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH}
diff -rupN seafile-server-5.1.1.orig/scripts/seaf-gc.sh seafile-server-5.1.1/scripts/seaf-gc.sh
--- seafile-server-5.1.1.orig/scripts/seaf-gc.sh 2016-04-21 11:05:26.000000000 +0200
+++ seafile-server-5.1.1/scripts/seaf-gc.sh 2016-04-22 09:10:27.211581999 +0200
@@ -7,7 +7,7 @@ INSTALLPATH=$(dirname "${SCRIPT}")
TOPDIR=$(dirname "${INSTALLPATH}")
default_ccnet_conf_dir=${TOPDIR}/ccnet
default_conf_dir=${TOPDIR}/conf
-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"
export PATH=${INSTALLPATH}/seafile/bin:$PATH
diff -rupN seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh seafile-server-5.1.1/scripts/setup-seafile-mysql.sh
--- seafile-server-5.1.1.orig/scripts/setup-seafile-mysql.sh 2016-04-21 11:05:26.000000000 +0200
+++ seafile-server-5.1.1/scripts/setup-seafile-mysql.sh 2016-04-22 09:11:50.083585953 +0200
@@ -40,15 +40,10 @@ function check_python_executable() {
function check_python_module () {
module=$1
name=$2
- hint=$3
printf " Checking python module: ${name} ... "
if ! $PYTHON -c "import ${module}" 2>/dev/null 1>&2; then
echo
printf "\033[33m ${name} \033[m is not installed, Please install it first.\n"
- if [[ "${hint}" != "" ]]; then
- printf "${hint}"
- echo
- fi
err_and_quit;
fi
echo -e "Done."
@@ -70,14 +65,10 @@ function check_python () {
if [[ $PYTHON == "python2.6" ]]; then
py26="2.6"
fi
- hint="\nOn Debian/Ubntu: apt-get install python-setuptools\nOn CentOS/RHEL: yum install python${py26}-distribute"
- check_python_module pkg_resources setuptools "${hint}"
-
- hint="\nOn Debian/Ubntu: apt-get install python-imaging\nOn CentOS/RHEL: yum install python${py26}-imaging"
- check_python_module PIL python-imaging "${hint}"
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"
- hint='\nOn Debian/Ubuntu:\n\nsudo apt-get install python-mysqldb\n\nOn CentOS/RHEL:\n\nsudo yum install MySQL-python'
- check_python_module MySQLdb python-mysqldb "${hint}"
+ check_python_module pkg_resources setuptools
+ check_python_module PIL python-imaging
+ check_python_module MySQLdb python-mysqldb
fi
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}")
}
@@ -85,5 +76,6 @@ function check_python () {
check_python;
export PYTHON=$PYTHON
+export PYTHONPATH="/usr/share/seafile/seafile-server/seahub/thirdpart:$PYTHONPATH"
+
cd "$INSTALLPATH"
python_script=setup-seafile-mysql.py
exec $PYTHON "$python_script"
diff -rupN seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh seafile-server-5.1.1/scripts/sqlite2mysql.sh
--- seafile-server-5.1.1.orig/scripts/sqlite2mysql.sh 2016-04-21 11:05:26.000000000 +0200
+++ seafile-server-5.1.1/scripts/sqlite2mysql.sh 2016-04-22 09:02:22.047558854 +0200
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# This shell script and corresponding sqlite2mysql.py are used to
# migrate Seafile data from SQLite to MySQL.
@@ -1,6 +1,6 @@
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
diff -rupN seafile-server-5.1.1.orig/controller/seafile-controller.c seafile-server-5.1.1/controller/seafile-controller.c
--- seafile-server-5.1.1.orig/controller/seafile-controller.c 2016-04-19 15:44:32.000000000 +0200
+++ seafile-server-5.1.1/controller/seafile-controller.c 2016-04-19 16:23:05.785000218 +0200
@@ -21,7 +21,7 @@
SeafileController *ctl;
@@ -10,7 +10,7 @@ diff -rupN seafile-3.1.7-server.orig/controller/seafile-controller.c seafile-3.1
char *bin_dir = NULL;
char *installpath = NULL;
@@ -614,9 +614,9 @@ stop_ccnet_server ()
@@ -575,9 +575,9 @@ stop_ccnet_server ()
static void
init_pidfile_path (SeafileController *ctl)
{
@@ -1,62 +1,55 @@
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-22 21:52:25.929781054 +0100
@@ -416,13 +416,13 @@ def create_gunicorn_conf():
content = '''\
import os
daemon = True
-workers = 3
+workers = 1
+threads = 3
diff -rupN seafile-server-5.1.1.orig/tools/seafile-admin seafile-server-5.1.1/tools/seafile-admin
--- seafile-server-5.1.1.orig/tools/seafile-admin 2016-04-19 15:44:33.000000000 +0200
+++ seafile-server-5.1.1/tools/seafile-admin 2016-04-26 10:55:11.826798430 +0200
@@ -449,9 +449,12 @@ workers = 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')
accesslog = os.path.join(runtime_dir, 'access.log')
+
+# for file upload, we need a longer timeout value (default is only 30s, too short)
+timeout = 1200
'''
try:
with open(confpath, 'w') as fp:
@@ -607,6 +607,7 @@ def start_seahub_gunicorn():
'gunicorn_django',
'-c', conf[CONF_SEAHUB_CONF],
'-b', '0.0.0.0:%s' % conf[CONF_SEAHUB_PORT],
+ '-t', '120',
]
@@ -526,6 +529,7 @@ def check_django_version():
info('Starting seahub...')
@@ -625,6 +626,7 @@ def start_seahub_fastcgi():
'pidfile=%(pidfile)s',
'outlog=%(outlog)s',
'errlog=%(errlog)s',
+ 'method=threaded',
]
cmdline = ' '.join(argv) % \
@@ -693,7 +695,7 @@ def check_layout(args):
conf[CONF_SEAFILE_DIR] = seafile_data_dir
conf[CONF_SEAHUB_DIR] = seahub_dir
conf[CONF_SEAHUB_CONF] = seahub_conf
- conf[CONF_SEAHUB_PIDFILE] = os.path.join(runtime_dir, 'seahub.pid')
+ conf[CONF_SEAHUB_PIDFILE] = '/var/run/seafile/seahub.pid'
conf[CONF_SEAHUB_OUTLOG] = os.path.join(runtime_dir, 'access.log')
conf[CONF_SEAHUB_ERRLOG] = os.path.join(runtime_dir, 'error.log')
def check_python_module(import_name, package_name=None, silent=False):
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "seahub.settings")
package_name = package_name or import_name
if not silent:
info('checking %s' % package_name)
@@ -785,7 +789,7 @@ def check_layout(args):
conf[CONF_SEAFILE_DIR] = seafile_data_dir
conf[CONF_SEAHUB_DIR] = seahub_dir
conf[CONF_SEAHUB_CONF] = seahub_conf
- conf[CONF_SEAHUB_PIDFILE] = os.path.join(runtime_dir, 'seahub.pid')
+ conf[CONF_SEAHUB_PIDFILE] = '/var/run/seafile/seahub.pid'
conf[CONF_SEAHUB_OUTLOG] = os.path.join(runtime_dir, 'access.log')
conf[CONF_SEAHUB_ERRLOG] = os.path.join(runtime_dir, 'error.log')
@@ -738,10 +740,9 @@ def setup_seafile(args):
@@ -836,10 +840,13 @@ 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 'To start, stop or restart seafile:'
+ print
+ print highlight(' # /etc/init.d/seafile { start | stop | restart }')
print
- print highlight(' $ cd %s' % cwd)
- print highlight(' $ %s { start | stop }' % SCRIPT_NAME)
+ print highlight(' # /etc/init.d/seafile { start | stop | restart }')
+ print 'To start, stop or restart seahub:'
+ print
+ print highlight(' # /etc/init.d/seahub { start | stop | restart }')
print
print 'If you have any problem, refer to\n'
print
@@ -802,8 +803,7 @@ def start_seafile(args):
@@ -903,8 +910,7 @@ def start_seafile(args):
def stop_seafile(dummy):
info('Stopping seafile server')
pkill('seafile-controller')
@@ -1,17 +0,0 @@
diff -rupN seafile-server-4.1.2.orig/server/Makefile.am seafile-server-4.1.2/server/Makefile.am
--- seafile-server-4.1.2.orig/server/Makefile.am 2015-05-02 11:04:11.000000000 +0200
+++ seafile-server-4.1.2/server/Makefile.am 2015-06-14 01:28:55.924834806 +0200
@@ -4,6 +4,7 @@ AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir)
-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
-DSEAFILE_SERVER \
-DFULL_FEATURE \
+ -I$(STAGING_DIR)/usr/include/libevhtp-1.1 \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib \
-I$(top_builddir)/lib \
@@ -122,4 +123,4 @@ seaf_server_LDADD = @CCNET_LIBS@ \
@SEARPC_LIBS@ @JANSSON_LIBS@ @ZDB_LIBS@ @CURL_LIBS@ ${LIB_WS32} @ZLIB_LIBS@ \
@LIBARCHIVE_LIBS@
-seaf_server_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@
+seaf_server_LDFLAGS = @STATIC_COMPILE@ @SERVER_PKG_RPATH@ -L$(STAGING_DIR)/usr/lib/libevhtp-1.1
@@ -0,0 +1,43 @@
diff -rupN seafile-server-5.1.1.orig/lib/Makefile.am seafile-server-5.1.1/lib/Makefile.am
--- seafile-server-5.1.1.orig/lib/Makefile.am 2016-04-21 11:05:26.000000000 +0200
+++ seafile-server-5.1.1/lib/Makefile.am 2016-04-22 10:09:41.567751561 +0200
@@ -1,3 +1,5 @@
+include $(TOPDIR)/rules.mk
+
pcfiles = libseafile.pc
pkgconfig_DATA = $(pcfiles)
pkgconfigdir = $(libdir)/pkgconfig
@@ -35,7 +37,7 @@ seafile-rpc-wrapper.c: seafile-object.h
seafile-object.h: ${seafile_object_define}
rm -f $@
- valac --pkg posix ${seafile_object_define} -C -H seafile-object.h
+ "$(STAGING_DIR_HOST)/bin/valac" --pkg posix ${seafile_object_define} -C -H seafile-object.h
DISTCLEANFILES = ${searpc_gen}
@@ -64,7 +66,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t
@rm -f rpc_table.tmp
@touch rpc_table.tmp
@echo "[libsearpc]: generating rpc header files"
- @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py
+ @PYTHON@ "$(STAGING_DIR)/usr/bin/searpc-codegen.py" ${top_srcdir}/lib/rpc_table.py
@echo "[libsearpc]: done"
@mv -f rpc_table.tmp $@
@@ -74,7 +76,7 @@ vala.stamp: ${seafile_object_define}
rm -f ${seafile_object_gen}
@rm -f vala.tmp
@touch vala.tmp
- valac -C --pkg posix $^
+ "$(STAGING_DIR_HOST)/bin/valac" -C --pkg posix $^
@mv -f vala.tmp $@
${seafile_object_gen}: vala.stamp
@@ -90,5 +92,5 @@ install-data-local:
if MACOS
sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
else
- ${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
+ ${SED} "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
endif
@@ -1,107 +0,0 @@
diff -rupN seafile-server-4.1.2.orig/lib/net.c seafile-server-4.1.2/lib/net.c
--- seafile-server-4.1.2.orig/lib/net.c 2015-09-09 19:31:56.000000000 +0200
+++ seafile-server-4.1.2/lib/net.c 2015-09-14 20:20:30.906021296 +0200
@@ -31,11 +31,7 @@
#include <fcntl.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
#include "net.h"
diff -rupN seafile-server-4.1.2.orig/lib/net.h seafile-server-4.1.2/lib/net.h
--- seafile-server-4.1.2.orig/lib/net.h 2015-09-09 19:31:56.000000000 +0200
+++ seafile-server-4.1.2/lib/net.h 2015-09-14 20:20:30.906021296 +0200
@@ -19,11 +19,7 @@
#include <netinet/tcp.h>
#endif
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
#ifdef WIN32
#define ECONNREFUSED WSAECONNREFUSED
diff -rupN seafile-server-4.1.2.orig/lib/utils.h seafile-server-4.1.2/lib/utils.h
--- seafile-server-4.1.2.orig/lib/utils.h 2015-09-09 19:31:56.000000000 +0200
+++ seafile-server-4.1.2/lib/utils.h 2015-09-14 20:20:30.907021326 +0200
@@ -13,11 +13,7 @@
#include <stdlib.h>
#include <sys/stat.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/util.h>
-#else
-#include <evutil.h>
-#endif
#ifdef __linux__
#include <endian.h>
diff -rupN seafile-server-4.1.2.orig/server/access-file.c seafile-server-4.1.2/server/access-file.c
--- seafile-server-4.1.2.orig/server/access-file.c 2015-09-09 19:31:56.000000000 +0200
+++ seafile-server-4.1.2/server/access-file.c 2015-09-14 20:20:30.907021326 +0200
@@ -3,13 +3,9 @@
#define DEBUG_FLAG SEAFILE_DEBUG_HTTP
#include "log.h"
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
#include <event2/bufferevent.h>
#include <event2/bufferevent_struct.h>
-#else
-#include <event.h>
-#endif
#include <evhtp.h>
diff -rupN seafile-server-4.1.2.orig/server/http-server.c seafile-server-4.1.2/server/http-server.c
--- seafile-server-4.1.2.orig/server/http-server.c 2015-09-09 19:31:56.000000000 +0200
+++ seafile-server-4.1.2/server/http-server.c 2015-09-14 20:20:30.908021355 +0200
@@ -6,11 +6,7 @@
#include <locale.h>
#include <sys/types.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
-#else
-#include <event.h>
-#endif
#include <evhtp.h>
diff -rupN seafile-server-4.1.2.orig/server/listen-mgr.c seafile-server-4.1.2/server/listen-mgr.c
--- seafile-server-4.1.2.orig/server/listen-mgr.c 2015-09-09 19:31:56.000000000 +0200
+++ seafile-server-4.1.2/server/listen-mgr.c 2015-09-14 20:23:15.614452334 +0200
@@ -3,11 +3,9 @@
#include <event2/event.h>
#include <event2/listener.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/bufferevent.h>
#include <event2/buffer_compat.h>
#include <event2/bufferevent_struct.h>
-#endif
#include "seafile-session.h"
diff -rupN seafile-server-4.1.2.orig/server/upload-file.c seafile-server-4.1.2/server/upload-file.c
--- seafile-server-4.1.2.orig/server/upload-file.c 2015-09-09 19:31:56.000000000 +0200
+++ seafile-server-4.1.2/server/upload-file.c 2015-09-14 20:20:30.909021385 +0200
@@ -6,11 +6,7 @@
#include <getopt.h>
#include <fcntl.h>
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#include <event2/event.h>
-#else
-#include <event.h>
-#endif
#include <evhtp.h>
@@ -0,0 +1,39 @@
diff -rupN seafile-server-5.1.1.orig/lib/repo.vala seafile-server-5.1.1/lib/repo.vala
--- seafile-server-5.1.1.orig/lib/repo.vala 2016-04-19 15:44:32.000000000 +0200
+++ seafile-server-5.1.1/lib/repo.vala 2016-04-25 21:29:33.327962235 +0200
@@ -30,7 +30,7 @@ public class Repo : Object {
// data format version
public int version { get; set; }
- public int last_modify { get; set; }
+ public int64 last_modify { get; set; }
public int64 size { get; set; }
public int64 file_count { get; set; }
public string head_cmmt_id { get; set; }
@@ -40,7 +40,7 @@ public class Repo : Object {
public string repo_id { get; set; }
public string repo_name { get; set; }
public string repo_desc { get; set; }
- public int last_modified { get; set; }
+ public int64 last_modified { get; set; }
// Section 2: Encryption related
// Members in this section should be set for every Repo object
@@ -63,7 +63,7 @@ public class Repo : Object {
get { return _relay_id; }
set { _relay_id = value; }
}
- public int last_sync_time { get; set; }
+ public int64 last_sync_time { get; set; }
public bool auto_sync { get; set; }
public bool worktree_invalid { get; set; }
@@ -155,7 +155,7 @@ public class DeletedEntry : Object {
public string obj_name { get; set; }
public string basedir { get; set; }
public int mode { get; set; }
- public int delete_time { get; set; }
+ public int64 delete_time { get; set; }
public int64 file_size { get; set; }
public string scan_stat { get; set; }
}