Skip to content

Commit

Permalink
seafile-server: fix django 1.11 detect, tidy up
Browse files Browse the repository at this point in the history
Django 1.11 is supported, but seafile-admin was still looking for v. 1.8.
Replaced current patch with the patch from haiwen/seafile-server#147.

Cleaned up unsupported configure options, including riak backend.

Update seafile-seahub PKG_RELEASE in EXTRA_DEPENDS.

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
  • Loading branch information
cotequeiroz committed Mar 21, 2019
1 parent b329a9d commit e8451a2
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 21 deletions.
4 changes: 0 additions & 4 deletions net/seafile-server/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@ config SEAFILE_FUSE_SUPPORT
config SEAFILE_CONSOLE_SUPPORT
bool "Enable seafile server console"
default n

config SEAFILE_RIAK_SUPPORT
bool "Enable support for riak backend"
default n
endmenu
16 changes: 3 additions & 13 deletions net/seafile-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=seafile-server
PKG_VERSION:=6.3.4
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_LICENSE:=GPL-3.0

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
Expand All @@ -33,7 +33,7 @@ define Package/seafile-server
DEPENDS:=+libarchive +libopenssl +glib2 +libsearpc +seafile-ccnet +seafile-seahub +sqlite3-cli +python-mysql +python-urllib3 \
+jansson +libevent2 +libevent2-openssl +zlib +libzdb +libsqlite3 +libmysqlclient \
+libpthread +libuuid +bash +procps-ng +procps-ng-pkill +SEAFILE_FUSE_SUPPORT:libfuse $(ICONV_DEPENDS)
EXTRA_DEPENDS:=seafile-seahub (=6.3.4-1)
EXTRA_DEPENDS:=seafile-seahub (=6.3.4-2)
MENU:=1
endef

Expand All @@ -45,11 +45,7 @@ define Package/seafile-server/description
Open source cloud storage with advanced features on privacy protection and teamwork.
endef

CONFIGURE_ARGS += --disable-client \
--enable-server \
--enable-python \
--disable-static-build \
--disable-server-pkg
CONFIGURE_ARGS += --enable-python

ifeq ($(CONFIG_SEAFILE_FUSE_SUPPORT),y)
CONFIGURE_ARGS += --enable-fuse
Expand All @@ -64,12 +60,6 @@ else
CONFIGURE_ARGS += --disable-console
endif

ifeq ($(CONFIG_SEAFILE_RIAK_SUPPORT),y)
CONFIGURE_ARGS += --enable-riak
else
CONFIGURE_ARGS += --disable-riak
endif

PKG_BUILD_DEPENDS:=vala/host libevhtp

# This is required as python-package.mk overrides the default setting of having interlinking enabled
Expand Down
47 changes: 43 additions & 4 deletions net/seafile-server/patches/090-django-11-compat.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,56 @@
From 115a4583deb9ae11adbc419ea87c990d0b8572fe Mon Sep 17 00:00:00 2001
From: Joffrey Darcq <j-off@live.fr>
Date: Sat, 28 Apr 2018 22:27:28 +0200
Subject: [PATCH 1/2] fix django version 1.11

---
tools/seafile-admin | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/seafile-admin b/tools/seafile-admin
index 495ceab..72b6a07 100755
index 5e3658b..38e7288 100755
--- a/tools/seafile-admin
+++ b/tools/seafile-admin
@@ -502,7 +502,7 @@ def init_seahub():
@@ -518,10 +518,10 @@ def init_seahub():


def check_django_version():
- '''Requires django 1.8'''
+ '''Requires django 1.11'''
import django
- if django.VERSION[0] != 1 or django.VERSION[1] != 8:
- error('Django 1.8 is required')
+ if django.VERSION[0] != 1 or django.VERSION[1] != 11:
+ error('Django 1.11 is required')
del django



From bf69ff1cf1080081eae5d8115842c26468746736 Mon Sep 17 00:00:00 2001
From: Joffrey Darcq <j-off@live.fr>
Date: Sun, 3 Jun 2018 15:51:54 +0200
Subject: [PATCH 2/2] fix django version 1.11

---
tools/seafile-admin | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/seafile-admin b/tools/seafile-admin
index 38e7288..c16aab6 100755
--- a/tools/seafile-admin
+++ b/tools/seafile-admin
@@ -499,8 +499,8 @@ def init_seahub():
# create seahub_settings.py
create_seahub_settings_py()

- argv = [PYTHON, 'manage.py', 'syncdb']
- # Set proper PYTHONPATH before run django syncdb command
+ argv = [PYTHON, 'manage.py', 'migrate']
# Set proper PYTHONPATH before run django syncdb command
+ # Set proper PYTHONPATH before run django migrate command
env = get_seahub_env()

@@ -512,7 +512,7 @@ def init_seahub():
print
@@ -509,7 +509,7 @@ def init_seahub():
print

if run_argv(argv, cwd=seahub_dir, env=env) != 0:
Expand Down

0 comments on commit e8451a2

Please sign in to comment.