forked from pool/python-HyperKitty
Accepting request 857766 from home:gladiac:mailman3
- Fix access to CACHE dir - Improve documentation (README.SUSE.md) - Fix quaterly timer and service OBS-URL: https://build.opensuse.org/request/show/857766 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-HyperKitty?expand=0&rev=30
This commit is contained in:
@@ -21,9 +21,18 @@ is included by the default configuration in
|
||||
|
||||
DEBUG = False
|
||||
|
||||
3. Add a valid email configuration
|
||||
3. The valid hosts or domain names for the application need to be defined:
|
||||
|
||||
`/etc/postorius/settings_local.py`:
|
||||
`/etc/hyperkitty/settings_local.py`:
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'localhost',
|
||||
'lists.example.com'
|
||||
]
|
||||
|
||||
4. Add a valid email configuration
|
||||
|
||||
`/etc/hyperkitty/settings_local.py`:
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_HOST = 'localhost'
|
||||
@@ -31,15 +40,6 @@ is included by the default configuration in
|
||||
EMAIL_HOST_USER = <username>
|
||||
EMAIL_HOST_PASSWORD = <password>
|
||||
|
||||
4. The valid hosts or domain names for the application need to be defined:
|
||||
|
||||
`/srv/www/webapps/mailman/postorius/settings_local.py`:
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'localhost',
|
||||
'lists.example.com'
|
||||
]
|
||||
|
||||
5. To connect with a running mailman instance's REST API, configuration options
|
||||
have to be added to hyperkitty's configuration.
|
||||
|
||||
@@ -58,32 +58,33 @@ is included by the default configuration in
|
||||
MAILMAN_ARCHIVER_KEY = 'SecretArchiverAPIKey'
|
||||
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
|
||||
|
||||
7. Setup the database (optionally configure e.g. postgres first,
|
||||
default: sqlite3)
|
||||
7. Optional: Configure postgres or another database (default: sqlite3)
|
||||
|
||||
hyperkitty-manage migrate
|
||||
8. Create and setup the database
|
||||
|
||||
8. Populate the database with default data (when setting up for the first time):
|
||||
hyperkitty-manage migrate
|
||||
|
||||
hyperkitty-manage loaddata
|
||||
9. Populate the database with default data (when setting up for the first time):
|
||||
|
||||
9. Create admin user
|
||||
hyperkitty-manage loaddata first_start
|
||||
|
||||
hyperkitty-manage createsuperuser
|
||||
10. Create admin user
|
||||
|
||||
10. Enable HyperKitty async tasks runner
|
||||
hyperkitty-manage createsuperuser
|
||||
|
||||
systemctl enable --now hyperkitty-qcluster.service
|
||||
11. Enable HyperKitty async tasks runner
|
||||
|
||||
11. Enable HyperKitty runjob timers
|
||||
systemctl enable --now hyperkitty-qcluster.service
|
||||
|
||||
systemctl enable hyperkitty-runjob-minutely.service
|
||||
systemctl enable hyperkitty-runjob-quarter-hourly.service
|
||||
systemctl enable hyperkitty-runjob-hourly.service
|
||||
systemctl enable hyperkitty-runjob-daily.service
|
||||
systemctl enable hyperkitty-runjob-weekly.service
|
||||
systemctl enable hyperkitty-runjob-monthly.service
|
||||
systemctl enable hyperkitty-runjob-yearly.service
|
||||
12. Enable HyperKitty runjob timers
|
||||
|
||||
systemctl enable hyperkitty-runjob-minutely.timer
|
||||
systemctl enable hyperkitty-runjob-quarter-hourly.timer
|
||||
systemctl enable hyperkitty-runjob-hourly.timer
|
||||
systemctl enable hyperkitty-runjob-daily.timer
|
||||
systemctl enable hyperkitty-runjob-weekly.timer
|
||||
systemctl enable hyperkitty-runjob-monthly.timer
|
||||
systemctl enable hyperkitty-runjob-yearly.timer
|
||||
|
||||
## Apache2
|
||||
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
LOG_DIR="/var/log/hyperkitty"
|
||||
LIB_DIR="/var/lib/hyperkitty"
|
||||
DATA_DIR="$LIB_DIR/data/"
|
||||
DATA_DIR="${LIB_DIR}/data"
|
||||
WEBAPPS_DIR="/srv/www/webapps/mailman/hyperkitty"
|
||||
CACHE_DIR="${WEBAPPS_DIR}/static/CACHE"
|
||||
|
||||
setfacl -R --no-mask -m u:hyperkitty-admin:rwX ${DATA_DIR}
|
||||
setfacl -R -d --no-mask -m u:hyperkitty-admin:rwX ${DATA_DIR}
|
||||
@@ -29,3 +31,12 @@ setfacl -R --no-mask -m u:hyperkitty:rwX ${LOG_DIR}
|
||||
setfacl -R -d --no-mask -m u:hyperkitty:rwX ${LOG_DIR}
|
||||
setfacl -R --no-mask -m u:hyperkitty-admin:rwX ${LOG_DIR}
|
||||
setfacl -R -d --no-mask -m u:hyperkitty-admin:rwX ${LOG_DIR}
|
||||
|
||||
# The wsgi needs to write to static/CACHE
|
||||
chown -R hyperkitty:hyperkitty ${CACHE_DIR}
|
||||
chmod -R u=rwX,g=rwX,o=rX ${CACHE_DIR}
|
||||
|
||||
setfacl -R --no-mask -m u:hyperkitty:rwX ${CACHE_DIR}
|
||||
setfacl -R -d --no-mask -m u:hyperkitty:rwX ${CACHE_DIR}
|
||||
setfacl -R --no-mask -m u:hyperkitty-admin:rwX ${CACHE_DIR}
|
||||
setfacl -R -d --no-mask -m u:hyperkitty-admin:rwX ${CACHE_DIR}
|
||||
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 20 14:37:27 UTC 2020 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Fix access to CACHE dir
|
||||
- Improve documentation (README.SUSE.md)
|
||||
- Fix quaterly timer and service
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 13 11:16:18 UTC 2020 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
|
@@ -160,6 +160,7 @@ install -d -m 0755 \
|
||||
%{buildroot}%{hyperkitty_basedir} \
|
||||
%{buildroot}%{hyperkitty_localedir} \
|
||||
%{buildroot}%{hyperkitty_staticdir} \
|
||||
%{buildroot}%{hyperkitty_staticdir}/CACHE \
|
||||
%{buildroot}%{_unitdir}
|
||||
|
||||
cp -a example_project/* %{buildroot}%{hyperkitty_basedir}
|
||||
@@ -173,6 +174,9 @@ for f in \
|
||||
; do
|
||||
rm -f %{buildroot}%{hyperkitty_basedir}/$f
|
||||
done
|
||||
rm -f %{buildroot}%{hyperkitty_localedir}/.keep
|
||||
rm -f %{buildroot}%{hyperkitty_basedir}/logs/.keep
|
||||
|
||||
%python_expand rm -rf %{buildroot}%{$python_sitelib}/example_project
|
||||
|
||||
# Create an empty settings_local.py. This will be filled with a SECRET_KEY in post
|
||||
@@ -216,7 +220,7 @@ for job in \
|
||||
if [ "${job}" = "minutely" ]; then
|
||||
hyperkitty_runjob_delay="RandomizedDelaySec=15s"
|
||||
elif [ "${job}" = "quarter-hourly" ]; then
|
||||
hyperkitty_runjob_timer="OnCalendar=quaterly"
|
||||
hyperkitty_runjob_calendar="OnCalendar=quarterly"
|
||||
hyperkitty_runjob_delay="RandomizedDelaySec=2m"
|
||||
# The real jobname is with an underscore
|
||||
hyperkitty_runjob_name="quarter_hourly"
|
||||
@@ -249,6 +253,8 @@ fi
|
||||
%{_sbindir}/hyperkitty-manage migrate --pythonpath /srv/www/webapps/mailman/hyperkitty/ --settings settings
|
||||
%{_sbindir}/hyperkitty-manage collectstatic --pythonpath /srv/www/webapps/mailman/hyperkitty/ --settings settings --clear --noinput
|
||||
%{_sbindir}/hyperkitty-manage compress --pythonpath /srv/www/webapps/mailman/hyperkitty/ --settings settings --force
|
||||
# Run hyperkitty-fix-permissions again for cache dir permissions
|
||||
%{_sbindir}/hyperkitty-fix-permissions
|
||||
|
||||
%service_add_post %{hyperkitty_services}
|
||||
|
||||
@@ -277,7 +283,18 @@ fi
|
||||
%{_unitdir}/hyperkitty-runjob-*.timer
|
||||
|
||||
%defattr(-,hyperkitty-admin,hyperkitty)
|
||||
%{hyperkitty_basedir}
|
||||
%dir %{hyperkitty_basedir}
|
||||
%{hyperkitty_basedir}/__init__.py
|
||||
%{hyperkitty_basedir}/manage.py
|
||||
%{hyperkitty_basedir}/settings.py
|
||||
%{hyperkitty_basedir}/settings_local.py
|
||||
%{hyperkitty_basedir}/urls.py
|
||||
%{hyperkitty_basedir}/wsgi.py
|
||||
|
||||
%dir %{hyperkitty_localedir}
|
||||
|
||||
%dir %{hyperkitty_staticdir}
|
||||
%dir %{hyperkitty_staticdir}/CACHE
|
||||
|
||||
%attr(750,hyperkitty-admin,hyperkitty) %dir %{hyperkitty_etcdir}
|
||||
%attr(640,hyperkitty-admin,hyperkitty) %config(noreplace) %{hyperkitty_etcdir}/settings_local.py
|
||||
|
Reference in New Issue
Block a user