seafile-seahub: Update to 7.1.2, refresh patches

Other changes include:

* Package Python bytecode in seafile-seahub, add source code package
  (seafile-seahub-src)

* Instead of changing default settings, custom settings will be added to
  /etc/seafile/conf/seahub_settings.py during seafile-server setup

* Use SEAFILE_UCI_DATA_DIR, which will be added to seafile-server

* Clean up Makefile formatting

* Add myself as a maintainer

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To
2020-02-23 04:08:23 +08:00
parent 6b84a7d38d
commit 1d275a8f27
5 changed files with 94 additions and 68 deletions
@@ -0,0 +1,29 @@
--- a/seahub/settings.py
+++ b/seahub/settings.py
@@ -140,7 +140,7 @@ TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
- os.path.join(PROJECT_ROOT, '../../seahub-data/custom/templates'),
+ os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data/custom/templates'),
os.path.join(PROJECT_ROOT, 'seahub/templates'),
],
'APP_DIRS': True,
@@ -627,7 +627,7 @@ CAPTCHA_IMAGE_SIZE = (90, 42)
ENABLE_THUMBNAIL = True
# Absolute filesystem path to the directory that will hold thumbnail files.
-SEAHUB_DATA_ROOT = os.path.join(PROJECT_ROOT, '../../seahub-data')
+SEAHUB_DATA_ROOT = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data')
if os.path.exists(SEAHUB_DATA_ROOT):
THUMBNAIL_ROOT = os.path.join(SEAHUB_DATA_ROOT, 'thumbnail')
else:
@@ -790,7 +790,7 @@ except ImportError:
pass
else:
# In server release, sqlite3 db file is <topdir>/seahub.db
- DATABASES['default']['NAME'] = os.path.join(install_topdir, 'seahub.db')
+ DATABASES['default']['NAME'] = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', install_topdir), 'seahub.db')
# In server release, gunicorn is used to deploy seahub
INSTALLED_APPS += ('gunicorn', )