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
@@ -1,29 +0,0 @@
--- a/seahub/settings.py
+++ b/seahub/settings.py
@@ -46,7 +46,7 @@ SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
-USE_I18N = True
+USE_I18N = False
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
@@ -339,7 +339,7 @@ SHARE_LINK_EMAIL_LANGUAGE = ''
ENABLE_UPLOAD_LINK_VIRUS_CHECK = False
# mininum length for user's password
-USER_PASSWORD_MIN_LENGTH = 6
+USER_PASSWORD_MIN_LENGTH = 8
# LEVEL based on four types of input:
# num, upper letter, lower letter, other symbols
@@ -348,7 +348,7 @@ USER_PASSWORD_STRENGTH_LEVEL = 3
# default False, only check USER_PASSWORD_MIN_LENGTH
# when True, check password strength level, STRONG(or above) is allowed
-USER_STRONG_PASSWORD_REQUIRED = False
+USER_STRONG_PASSWORD_REQUIRED = True
# Force user to change password when admin add/reset a user.
FORCE_PASSWORD_CHANGE = True
@@ -7,7 +7,7 @@
PROJECT=seahub
develop: setup-git
@@ -9,7 +12,7 @@ dist: locale uglify statici18n collectstatic
@@ -9,22 +12,22 @@ dist: locale statici18n collectstatic
locale:
@echo "--> Compile locales"
@@ -15,9 +15,6 @@
+ $(DJANGO_ADMIN_PY) compilemessages
@echo ""
uglify:
@@ -19,17 +22,17 @@ uglify:
statici18n:
@echo "--> Generate JS locale files in static/scripts/i18n"
- python manage.py compilejsi18n
@@ -26,8 +23,8 @@
collectstatic:
@echo "--> Collect django static files to media/assets"
rm -rf media/assets 2> /dev/null
- python manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
+ $(PYTHON) manage.py collectstatic --noinput -i admin -i termsandconditions -i app -i sysadmin-app -i build.js
- python manage.py collectstatic --noinput -i admin -i termsandconditions
+ $(PYTHON) manage.py collectstatic --noinput -i admin -i termsandconditions
compressstatic:
@echo "--> Compress static files(css) to media/CACHE"
@@ -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', )
@@ -0,0 +1,8 @@
--- a/manage.py
+++ b/manage.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import os
import sys