Hi!
I tried building Seafile Server 7.0.2 and I ran into some issues.
-
https://github.com/haiwen/django-constance/blob/master/setup.py lists “django-picklefield” as a requirement. Unfortunately, the download from pip (v2.0) fails, something seems to be broken on their side. Is it possible to add picklefield’s version number in constance’s setup.py? Or mention it in the manual?
-
“seafdav/wsgidav/addons/seafile/seahub_db.py” seems to require SQLalchemy at runtime. Without it, seafdav will be restarted over and over again by the controller without actually working. And worse, it doesn’t log anything to seafdav.log, making it hard to troubleshoot.
Maybe include that dependency into the documentation as well? -
When SQLalchemy is installed, the seafdav.log works, it says: “Failed to init seahub db: No module named seahub_settings.” It’s imported in https://github.com/haiwen/seafdav/blob/28eb8276aa86f4b8f09c89f9d0d2ece34dc2ba31/wsgidav/addons/seafile/seahub_db.py line 24
--- seafdav/wsgidav/addons/seafile/seahub_db.py 2019-06-18 16:53:28.761890959 +0200
+++ seafdav/wsgidav/addons/seafile/seahub_db.py.new 2019-06-18 16:54:20.801890939 +0200
@@ -1,4 +1,8 @@
from urllib import quote_plus
+import os
+import sys
+
+central_conf_dir = os.environ.get('SEAFILE_CENTRAL_CONF_DIR', '')
from sqlalchemy import create_engine
from sqlalchemy.event import contains as has_event_listener, listen as add_event_listener
@@ -24,7 +28,13 @@
return None
def create_seahub_db_engine():
- import seahub_settings
+ try:
+ if os.path.exists(central_conf_dir):
+ sys.path.insert(0, central_conf_dir)
+ import seahub_settings
+ except ImportError:
+ pass
+ #import seahub_settings
db_infos = seahub_settings.DATABASES['default']
#import local_settings
#db_infos = local_settings.DATABASES['default']
I’m not sure if this is the right way to deal with the problem, the code is copied from seahub’s settings.py. Also, I didn’t look into the sqlite-part of that code since I don’t use sqlite.
Shouldn’t seafdav be started by seahub somehow, thus not requiring to load conf/seahub_settings.py at all? Maybe I’m still missing a dependency?
On a side note: when I patched seafdav and then build the server using “seafile-server/scripts/build/build-server.py”, the patch gets removed. So I had to re-apply it in seafile-server-7.0.2/seahub/thirdpart/wsgidav/addons/seafile/seahub_db.py. Is that a mistake or by design? And how to avoid it?
Any thoughts or explainations are highly welcome, especially on #3.
It seems to work fine (test szenario).