[arch-commits] Commit in hyperkitty/repos (14 files)

David Runge dvzrv at gemini.archlinux.org
Sun Feb 20 16:18:40 UTC 2022


    Date: Sunday, February 20, 2022 @ 16:18:39
  Author: dvzrv
Revision: 1135303

archrelease: copy trunk to community-testing-any

Added:
  hyperkitty/repos/community-testing-any/
  hyperkitty/repos/community-testing-any/PKGBUILD
    (from rev 1135302, hyperkitty/trunk/PKGBUILD)
  hyperkitty/repos/community-testing-any/hyperkitty-1.3.2-settings.patch
    (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.2-settings.patch)
  hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-assert_date_header.patch
    (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-assert_date_header.patch)
  hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-assert_printable_date.patch
    (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-assert_printable_date.patch)
  hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-django4.0.patch
    (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-django4.0.patch)
  hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-implict_primary_keys.patch
    (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-implict_primary_keys.patch)
  hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-mistune2.0.0_imports.patch
    (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-mistune2.0.0_imports.patch)
  hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-qcluster_retry.patch
    (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-qcluster_retry.patch)
  hyperkitty/repos/community-testing-any/hyperkitty-qcluster.service
    (from rev 1135302, hyperkitty/trunk/hyperkitty-qcluster.service)
  hyperkitty/repos/community-testing-any/hyperkitty.install
    (from rev 1135302, hyperkitty/trunk/hyperkitty.install)
  hyperkitty/repos/community-testing-any/hyperkitty.sysusers
    (from rev 1135302, hyperkitty/trunk/hyperkitty.sysusers)
  hyperkitty/repos/community-testing-any/hyperkitty.tmpfiles
    (from rev 1135302, hyperkitty/trunk/hyperkitty.tmpfiles)
  hyperkitty/repos/community-testing-any/hyperkitty.uwsgi
    (from rev 1135302, hyperkitty/trunk/hyperkitty.uwsgi)

----------------------------------------------+
 PKGBUILD                                     |  136 +++++++++
 hyperkitty-1.3.2-settings.patch              |   85 ++++++
 hyperkitty-1.3.5-assert_date_header.patch    |   32 ++
 hyperkitty-1.3.5-assert_printable_date.patch |   37 ++
 hyperkitty-1.3.5-django4.0.patch             |  341 +++++++++++++++++++++++++
 hyperkitty-1.3.5-implict_primary_keys.patch  |   31 ++
 hyperkitty-1.3.5-mistune2.0.0_imports.patch  |   28 ++
 hyperkitty-1.3.5-qcluster_retry.patch        |   14 +
 hyperkitty-qcluster.service                  |   38 ++
 hyperkitty.install                           |   10 
 hyperkitty.sysusers                          |    1 
 hyperkitty.tmpfiles                          |    8 
 hyperkitty.uwsgi                             |   25 +
 13 files changed, 786 insertions(+)

Copied: hyperkitty/repos/community-testing-any/PKGBUILD (from rev 1135302, hyperkitty/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,136 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=HyperKitty
+pkgname=hyperkitty
+pkgver=1.3.5
+pkgrel=4
+pkgdesc="A web interface to access GNU Mailman v3 archives"
+arch=(any)
+url="https://gitlab.com/mailman/hyperkitty"
+license=(GPL3)
+depends=(python-dateutil python-django python-django-compressor
+python-django-extensions python-django-gravatar python-django-haystack
+python-django-mailman3 python-django-q python-django-rest-framework
+python-flufl-lock python-mailmanclient python-mistune python-networkx
+python-pytz python-robot-detection python-whoosh sassc)
+makedepends=(python-isort python-setuptools)
+checkdepends=(python-beautifulsoup4 python-django-debug-toolbar
+python-elasticsearch python-lxml python-mock python-pytest python-whoosh)
+optdepends=('python-elasticsearch: for using elasticsearch as search backend'
+            'python-xapian-haystack: for using xapian as search backend'
+            'uwsgi-plugin-python: for running inside uwsgi'
+            'ruby-sassc: alternative to sassc')
+backup=(
+  etc/uwsgi/$pkgname.ini
+  etc/webapps/$pkgname/settings_local.py
+  etc/webapps/$pkgname/urls.py
+)
+install=$pkgname.install
+source=(
+  https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz{,.asc}
+  $pkgname-1.3.2-settings.patch
+  $pkgname-1.3.5-qcluster_retry.patch
+  $pkgname-1.3.5-mistune2.0.0_imports.patch
+  $pkgname-1.3.5-implict_primary_keys.patch
+  $pkgname-1.3.5-assert_printable_date.patch
+  $pkgname-1.3.5-assert_date_header.patch
+  $pkgname-qcluster.service
+  $pkgname.sysusers
+  $pkgname.tmpfiles
+  $pkgname.uwsgi
+  $pkgname-1.3.5-django4.0.patch
+)
+sha512sums=('9e794cd522904369dea5a70489e3ab7fe149680ed13f03e5002f0ad84304cf1de7481c71e302cf46cd9fa244cadca5d0c41767ceb4cee82b7153f052bc1b677d'
+            'SKIP'
+            '452da2c049f0c35d27e15c16af1a6a526de79a6672b6fdaf9a4bcbdfd2110ebf608e8c5a1f5dfc3bb2febc39ecc6e69e2a657c3b2c6e1d2dc2eca2de81125380'
+            'e0a8843e370ff593caad26d72db1af84a404308148d7df0f8eb7ab99599223e4edd4f1f3fa5690dbb52b325df388a9b6ca1e45bd0a087036459e5c11e74d5f18'
+            'ad8f6fd38993eb5bcb03c4f98fd001827ef739498b08304a4d05b721dbbc146fff6b5fd7b0fdd1a73b34c26d5f9bbe3b2838ef4cd095c6df6086c11f9ab7583f'
+            '7ec5c67d03215b95eb32796fc7bc42f322d2874f188ac4e2bbf965b22a9d07935917b29828bc299bc4c51912201b0cfb5210cfa228d0135c2d69428e37cae122'
+            '6d317720ebf06bf028e60db717f37820bb3cb72b8ca9ce571e5c0cacc255b5f813138f3d1bc308d21081b8b5593095587760fbcf4ab87ea4e4a15aad55153e42'
+            'ad30d45393605efb4cc79e47fc243461ba00f5f400c39eb266bc73a1d52a88e34d33c0dd0a2f3ea8fdc61e1d61bd4ebe7b1a3497c5f2ac6d476be8ba3dc298e9'
+            'a41c938082ceee555143ddb21c3a95835f9832b9aff423142d78d3e52f12500561f80e0ce43c67a4f190065c9d045945741ac71ab3307db1419c4dc0686db09a'
+            '3267427109b08b8c9336b187381ed14357a07370bdcdfc24da94555020ad0424c5bbebc09e131e981e0540c51db443ffe558209e1bca7c2a1b7b1f602ed0805b'
+            'c943d82b8640a513728e3f07fa44c0ddb5a3bb8ec84a3a70990e51287ca01977887f895b901688fc4643d8fcb106d524259a86a51bccaafd77c69b241f1b23ba'
+            '351f40a6bc1fd1735c883408f9941808e081206927a7c02467e03228243dd156378cac21f851b498702bd4f96fde8e4c80536dbcc6f3c384bf708bed4e988971'
+            '27c018daa36d84207fc7911568f85e4f903b8b87026c98e6b05b5dfe78b2437bc6619ea6a30ac4b3666c6e46f0115627bafcd7cba8a6739354bfc80d5666cee7')
+b2sums=('2ef6917425bdf00a5a03383a8f7ff0eb1243557c1189d9afba33b3c1f09db63b40827b0e7f9602964f251197045594d786df13c6cd288c97980967bdf85eba4c'
+        'SKIP'
+        '1eab6221db4adb1a066bde8d6c84a90d3e414d1d30c5cf55a90a4ac58d131f7c4872c85d65e98d91ee0f4cac6f71c47c829993c736617a86be8fec5d831422c8'
+        '81a08e5aeed8e2b287b29c8799dd7969877c7461e6c9d17df7208acdf98f740033114e1129175aa2eac80ede9075627f76204464ea3ca0bc0619b76b96f87fdc'
+        '96e34038f58dd5b15a36f99ae714e952743718f70dc0f4521d6e1a1681531fb16919026582951160ee76c512204a0d145ad0564e96578cf18cefc4184697d68e'
+        '8974775bd1a1426175516d4aaf7cebb85365db8dbe91ba5e2d609df0a860d71bb5573cf1f20c6a7a905a6f21764846aad7e506306b30287fe2514920a8810bc4'
+        '7f5003f8e9a525f4e0fa0688f1897b7d757ca069ce07b91f6a5bf59e58e9df47b01df0f37daaa9f6f6d6f1bbdb33c6741de6ed9bfacddcd8fe8b575080b8e21c'
+        'ab81d2c787a4c87748573e7fc01d027f2cc2d9b59b3716cc2a2161b11ea69b5f9c9b9ef290d17328d1df5db7a4027f189f46ae90c60cdfab6b00d8dcbc64a0e6'
+        'e8ae1d123e74b0c6984df3e5fff720e03dcbc3f007123718fe845024b42e5c13b7eac4da6bde04a9e1372d446bfa50ac12479730a9092e8396b73434e59663d3'
+        'f4e912e75c5127897837d67626ba94a418ec408f0f3a9bcd1767633347e107600cc43825caa5737a84362273a353bf03097879ff5b9065663150f6db4b96238a'
+        'e4fd83e38703d8ff9a714b238296e4e12791b8ce0c19446709e5c20b4012ed10b97504cafda66cdbe12e56a9f943c094147b6a02db3bd9c854e609adca38ff01'
+        '767f334add0dd0e83b27e198415a2ef8ae3c505aa7f37d12138e37a98dc5575e43f83eb665431464ed488a5bf6b8913cd675eb112dc880cf17ff51511a3f07e6'
+        '8d958d3e9cce9fbee504d30108fb43d4978c2dca300ccdd9f1a136bc4dd3daca6009c5cc95e1143d6df7b704c0cef5c6318e55fef7c31b03c21cb24876b479bf')
+validpgpkeys=('541EA0448453394FF77A0ECC9D9B2BA061D0A67C') # Abhilash Raj <raj.abhilash1 at gmail.com>
+
+prepare() {
+  # setting FHS compliant default paths, remove debug options
+  patch -d $_name-$pkgver -p1 -i ../$pkgname-1.3.2-settings.patch
+  # fix warnings with qcluster retry
+  # https://gitlab.com/mailman/hyperkitty/-/issues/402
+  patch -d $_name-$pkgver -p1 -i ../$pkgname-1.3.5-qcluster_retry.patch
+  # fix imports with python-mistune >= 2.0.0
+  # https://gitlab.com/mailman/hyperkitty/-/issues/395
+  patch -d $_name-$pkgver -p1 -i ../$pkgname-1.3.5-mistune2.0.0_imports.patch
+  # fix excessive warnings with django >= 3.2
+  # https://gitlab.com/mailman/hyperkitty/-/issues/401
+  patch -d $_name-$pkgver -p1 -i ../$pkgname-1.3.5-implict_primary_keys.patch
+  # fix issues due to changes in the email module in python 3.10
+  # https://gitlab.com/mailman/hyperkitty/-/issues/401
+  patch -d $_name-$pkgver -p1 -i ../$pkgname-1.3.5-assert_printable_date.patch
+  patch -d $_name-$pkgver -p1 -i ../$pkgname-1.3.5-assert_date_header.patch
+  # make compatible with django 4.0: https://gitlab.com/mailman/hyperkitty/-/merge_requests/384
+  patch -d $_name-$pkgver -p1 -i ../$pkgname-1.3.5-django4.0.patch
+
+  touch $_name-$pkgver/settings_local.py
+}
+
+build() {
+  cd $_name-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd $_name-$pkgver
+  export PYTHONPATH="build:$PYTHONPATH"
+  python example_project/manage.py test --settings=hyperkitty.tests.settings_test hyperkitty
+}
+
+package() {
+  local python_stdlib_basepath="$(python -c "from sysconfig import get_path; print(get_path('stdlib'))")"
+
+  cd $_name-$pkgver
+  python setup.py install --optimize=1 --root="$pkgdir"
+  # remove example_project from top level site-packages:
+  # https://gitlab.com/mailman/hyperkitty/issues/279
+  rm -rfv "$pkgdir/$python_stdlib_basepath/site-packages/example_project"
+  # doc
+  install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"
+  # django project
+  install -vDm 644 example_project/{__init__,manage,settings,wsgi}.py -t "$pkgdir/usr/share/webapps/$pkgname"
+  # symlink locale and static dirs to state dir
+  ln -svf /var/lib/$pkgname/locale/ "$pkgdir/usr/share/webapps/$pkgname"
+  ln -svf /var/lib/$pkgname/static/ "$pkgdir/usr/share/webapps/$pkgname"
+  # state dir
+  install -vdm 750 "$pkgdir/var/lib/$pkgname/data"
+  install -vdm 755 "$pkgdir/var/lib/$pkgname/"{locale,static}
+  # log dir
+  install -vdm 750 "$pkgdir/var/log/$pkgname"
+  # config
+  install -vDm 640 settings_local.py example_project/urls.py -t "$pkgdir/etc/webapps/$pkgname"
+  ln -svf "/etc/webapps/$pkgname/settings_local.py" "$pkgdir/usr/share/webapps/$pkgname/settings_local.py"
+  ln -svf "/etc/webapps/$pkgname/urls.py" "$pkgdir/usr/share/webapps/$pkgname/urls.py"
+  # systemd service
+  install -vDm 644 "../$pkgname-qcluster.service" -t "$pkgdir/usr/lib/systemd/system"
+  # uwsgi
+  install -vDm 644 "../$pkgname.uwsgi" "$pkgdir/etc/uwsgi/$pkgname.ini"
+  # tmpfiles.d
+  install -vDm 644 "../$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+  # sysusers.d
+  install -vDm 644 "../$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+}

Copied: hyperkitty/repos/community-testing-any/hyperkitty-1.3.2-settings.patch (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.2-settings.patch)
===================================================================
--- community-testing-any/hyperkitty-1.3.2-settings.patch	                        (rev 0)
+++ community-testing-any/hyperkitty-1.3.2-settings.patch	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,85 @@
+diff -ruN a/example_project/settings.py b/example_project/settings.py
+--- a/example_project/settings.py	2020-06-01 18:21:21.000000000 +0200
++++ b/example_project/settings.py	2020-11-07 12:19:48.531767195 +0100
+@@ -75,12 +75,12 @@
+     'allauth.socialaccount.providers.github',
+     'allauth.socialaccount.providers.gitlab',
+     'allauth.socialaccount.providers.google',
+-    'allauth.socialaccount.providers.facebook',
++    # 'allauth.socialaccount.providers.facebook',
+     'allauth.socialaccount.providers.twitter',
+     'allauth.socialaccount.providers.stackexchange',
+ 
+     # Dev only dependencies. Do not include in any production site.
+-    'debug_toolbar',
++    # 'debug_toolbar',
+ )
+ 
+ 
+@@ -88,7 +88,7 @@
+     'django.middleware.security.SecurityMiddleware',
+     'django.contrib.sessions.middleware.SessionMiddleware',
+     # NOTE: Do not include DebugToolbarMiddleware in any production site.
+-    'debug_toolbar.middleware.DebugToolbarMiddleware',
++    # 'debug_toolbar.middleware.DebugToolbarMiddleware',
+     'django.middleware.common.CommonMiddleware',
+     'django.middleware.csrf.CsrfViewMiddleware',
+     'django.contrib.auth.middleware.AuthenticationMiddleware',
+@@ -134,7 +134,7 @@
+         # Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+         'ENGINE': 'django.db.backends.sqlite3',
+         # DB name or path to database file if using sqlite3.
+-        'NAME': os.path.join(BASE_DIR, 'hyperkitty.db'),
++        'NAME': '/var/lib/hyperkitty/data/hyperkitty.db',
+         # The following settings are not used with sqlite3:
+         'USER': 'hyperkitty',
+         'PASSWORD': 'hkpass',
+@@ -202,7 +202,7 @@
+ # Don't put anything in this directory yourself; store your static files
+ # in apps' "static/" subdirectories and in STATICFILES_DIRS.
+ # Example: "/var/www/example.com/static/"
+-STATIC_ROOT = os.path.join(BASE_DIR, 'static')
++STATIC_ROOT = '/var/lib/hyperkitty/static'
+ 
+ # URL prefix for static files.
+ # Example: "http://example.com/static/", "http://static.example.com/"
+@@ -328,7 +328,8 @@
+ # recompiled on each requests. It means running an additional "compress"
+ # management command after each code upgrade.
+ # http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression
+-# COMPRESS_OFFLINE = True
++COMPRESS_OFFLINE = True
++COMPRESS_ENABLED = True
+ 
+ # Needed for debug mode
+ INTERNAL_IPS = ('127.0.0.1',)
+@@ -340,7 +341,7 @@
+ HAYSTACK_CONNECTIONS = {
+     'default': {
+         'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
+-        'PATH': os.path.join(BASE_DIR, "fulltext_index"),
++        'PATH': "/var/lib/hyperkitty/fulltext_index",
+         # You can also use the Xapian engine, it's faster and more accurate,
+         # but requires another library.
+         # http://django-haystack.readthedocs.io/en/v2.4.1/installing_search_engines.html#xapian
+@@ -395,7 +396,7 @@
+             'level': 'INFO',
+             #'class': 'logging.handlers.RotatingFileHandler',
+             'class': 'logging.handlers.WatchedFileHandler',
+-            'filename': os.path.join(BASE_DIR, 'hyperkitty.log'),
++            'filename': '/var/log/hyperkitty/hyperkitty.log',
+             'formatter': 'verbose',
+         },
+     },
+@@ -444,9 +445,9 @@
+ # When DEBUG is True, don't actually send emails to the SMTP server, just store
+ # them in a directory. This way you won't accidentally spam your mailing-lists
+ # while you're fiddling with the code.
+-if DEBUG == True:
++if DEBUG:
+     EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
+-    EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'emails')
++    EMAIL_FILE_PATH = '/var/lib/hyperkitty/emails'
+ 
+ 
+ #

Copied: hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-assert_date_header.patch (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-assert_date_header.patch)
===================================================================
--- community-testing-any/hyperkitty-1.3.5-assert_date_header.patch	                        (rev 0)
+++ community-testing-any/hyperkitty-1.3.5-assert_date_header.patch	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,32 @@
+From 2c01fb98f8587a38d0c5bc8ede008d6f0b8e8005 Mon Sep 17 00:00:00 2001
+From: David Runge <dave at sleepmap.de>
+Date: Wed, 8 Dec 2021 13:55:33 +0100
+Subject: [PATCH] Raise when datetime attribute of a Date: header is None
+
+hyperkitty/management/commands/hyperkitty_import.py:
+Change `DbImporter._get_date()` to raise when the retrieved `Date:`
+header's `datetime` attribute is `None`.
+This is required as python 3.10.0 introduces a change, that may return
+invalid string representations of a `Date:` header, while setting its
+`datetime` attribute to `None`:
+
+https://github.com/python/cpython/commit/303aac8c56609290e122eecc14c038e9b1e4174a
+---
+ hyperkitty/management/commands/hyperkitty_import.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/hyperkitty/management/commands/hyperkitty_import.py b/hyperkitty/management/commands/hyperkitty_import.py
+index 48dd248d..baae013d 100644
+--- a/hyperkitty/management/commands/hyperkitty_import.py
++++ b/hyperkitty/management/commands/hyperkitty_import.py
+@@ -134,6 +134,7 @@ class DbImporter(object):
+             date = message.get(header)
+             if date:
+                 assert all(char in printable for char in date)
++                assert date.datetime is not None
+         except (AssertionError, TypeError, ValueError) as e:
+             if self.verbose:
+                 self.stderr.write(
+-- 
+GitLab
+

Copied: hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-assert_printable_date.patch (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-assert_printable_date.patch)
===================================================================
--- community-testing-any/hyperkitty-1.3.5-assert_printable_date.patch	                        (rev 0)
+++ community-testing-any/hyperkitty-1.3.5-assert_printable_date.patch	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,37 @@
+From 0fc064f834cb15ad716ea45b3726fc6ca26e74bb Mon Sep 17 00:00:00 2001
+From: David Runge <dave at sleepmap.de>
+Date: Tue, 7 Dec 2021 22:46:17 +0100
+Subject: [PATCH] Assert date headers are printable chars
+
+hyperkitty/management/commands/hyperkitty_import.py:
+Assert that chars in date headers are in the set of printable chars.
+---
+ hyperkitty/management/commands/hyperkitty_import.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/hyperkitty/management/commands/hyperkitty_import.py b/hyperkitty/management/commands/hyperkitty_import.py
+index 2a50e933..48dd248d 100644
+--- a/hyperkitty/management/commands/hyperkitty_import.py
++++ b/hyperkitty/management/commands/hyperkitty_import.py
+@@ -31,6 +31,7 @@ from datetime import datetime
+ from email import message_from_bytes, policy
+ from email.utils import make_msgid, unquote
+ from math import floor
++from string import printable
+ from traceback import print_exc
+ 
+ from django.conf import settings
+@@ -131,7 +132,9 @@ class DbImporter(object):
+     def _get_date(self, message, header, report_name):
+         try:
+             date = message.get(header)
+-        except (TypeError, ValueError) as e:
++            if date:
++                assert all(char in printable for char in date)
++        except (AssertionError, TypeError, ValueError) as e:
+             if self.verbose:
+                 self.stderr.write(
+                     "Can't get {} header in message {}{}: {}.".format(
+-- 
+GitLab
+

Copied: hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-django4.0.patch (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-django4.0.patch)
===================================================================
--- community-testing-any/hyperkitty-1.3.5-django4.0.patch	                        (rev 0)
+++ community-testing-any/hyperkitty-1.3.5-django4.0.patch	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,341 @@
+From e8228c7eddae75d168b28bc3a7abe351bab04b65 Mon Sep 17 00:00:00 2001
+From: John Vandenberg <jayvdb at gmail.com>
+Date: Mon, 27 Dec 2021 10:48:27 +0800
+Subject: [PATCH 1/3] Support Django 4.0
+
+---
+ example_project/urls.py       |  12 +--
+ hyperkitty/tests/urls_test.py |   9 +-
+ hyperkitty/urls.py            | 157 +++++++++++++++-------------------
+ hyperkitty/views/mailman.py   |   5 +-
+ setup.py                      |   2 +-
+ 5 files changed, 85 insertions(+), 100 deletions(-)
+
+diff --git a/example_project/urls.py b/example_project/urls.py
+index 9c854989..53245861 100644
+--- a/example_project/urls.py
++++ b/example_project/urls.py
+@@ -21,21 +21,21 @@ This file is the main URL config for a Django website including HyperKitty.
+ """
+ 
+ from django.conf import settings
+-from django.conf.urls import include, url
++from django.conf.urls import include
+ from django.contrib import admin
+ from django.urls import path, reverse_lazy
+ from django.views.generic import RedirectView
+ 
+ 
+ urlpatterns = [
+-    url(r'^$', RedirectView.as_view(
++    path('', RedirectView.as_view(
+         url=reverse_lazy('hk_root'))),
+-    url(r'^hyperkitty/', include('hyperkitty.urls')),
++    path('hyperkitty/', include('hyperkitty.urls')),
+     # url(r'^postorius/', include('postorius.urls')),
+-    url(r'', include('django_mailman3.urls')),
+-    url(r'^accounts/', include('allauth.urls')),
++    path('', include('django_mailman3.urls')),
++    path('accounts/', include('allauth.urls')),
+     # Django admin
+-    url(r'^admin/', admin.site.urls),
++    path('admin/', admin.site.urls),
+ ]
+ 
+ 
+diff --git a/hyperkitty/tests/urls_test.py b/hyperkitty/tests/urls_test.py
+index 67d5497a..4e1c3af7 100644
+--- a/hyperkitty/tests/urls_test.py
++++ b/hyperkitty/tests/urls_test.py
+@@ -21,11 +21,12 @@
+ This file is the main URL config for a Django website including HyperKitty.
+ """
+ 
+-from django.conf.urls import include, url
++from django.conf.urls import include
++from django.urls import path
+ 
+ 
+ urlpatterns = [
+-    url(r'', include('hyperkitty.urls')),
+-    url(r'', include('django_mailman3.urls')),
+-    url(r'^accounts/', include('allauth.urls')),
++    path('', include('hyperkitty.urls')),
++    path('', include('django_mailman3.urls')),
++    path('accounts/', include('allauth.urls')),
+ ]
+diff --git a/hyperkitty/urls.py b/hyperkitty/urls.py
+index a6782fbd..f5e45e1a 100644
+--- a/hyperkitty/urls.py
++++ b/hyperkitty/urls.py
+@@ -21,8 +21,9 @@
+ # Author: Aurelien Bompard <abompard at fedoraproject.org>
+ #
+ 
+-from django.conf.urls import include, url
++from django.conf.urls import include
+ from django.contrib.staticfiles.urls import staticfiles_urlpatterns
++from django.urls import path, re_path
+ from django.views.generic.base import TemplateView
+ 
+ from hyperkitty.api import email as api_email
+@@ -41,146 +42,130 @@ from hyperkitty.views import (
+ 
+ # List archives and overview
+ list_patterns = [
+-    url(r'^(?P<year>\d{4})/(?P<month>\d\d?)/(?P<day>\d\d?)/$',
++    re_path(r'^(?P<year>\d{4})/(?P<month>\d\d?)/(?P<day>\d\d?)/$',
+         mlist.archives, name='hk_archives_with_day'),
+-    url(r'^(?P<year>\d{4})/(?P<month>\d\d?)/$',
++    re_path(r'^(?P<year>\d{4})/(?P<month>\d\d?)/$',
+         mlist.archives, name='hk_archives_with_month'),
+-    url(r'^latest$', mlist.archives, name='hk_archives_latest'),
+-    url(r'^$', mlist.overview, name='hk_list_overview'),
+-    url(r'^recent-activity$',
+-        mlist.recent_activity, name='hk_list_recent_activity'),
+-    url(r'^recent-threads$',
+-        mlist.overview_recent_threads, name='hk_list_overview_recent_threads'),
+-    url(r'^pop-threads$',
+-        mlist.overview_pop_threads, name='hk_list_overview_pop_threads'),
+-    url(r'^top-threads$',
+-        mlist.overview_top_threads, name='hk_list_overview_top_threads'),
+-    url(r'^favorites$',
+-        mlist.overview_favorites, name='hk_list_overview_favorites'),
+-    url(r'^posted-to$',
+-        mlist.overview_posted_to, name='hk_list_overview_posted_to'),
+-    url(r'^top-posters$',
+-        mlist.overview_top_posters, name='hk_list_overview_top_posters'),
+-    url(r'^export/(?P<filename>[^/]+)\.mbox.gz$',
++    path('latest', mlist.archives, name='hk_archives_latest'),
++    path('', mlist.overview, name='hk_list_overview'),
++    path('recent-activity', mlist.recent_activity, name='hk_list_recent_activity'),
++    path('recent-threads', mlist.overview_recent_threads, name='hk_list_overview_recent_threads'),
++    path('pop-threads', mlist.overview_pop_threads, name='hk_list_overview_pop_threads'),
++    path('top-threads', mlist.overview_top_threads, name='hk_list_overview_top_threads'),
++    path('favorites', mlist.overview_favorites, name='hk_list_overview_favorites'),
++    path('posted-to', mlist.overview_posted_to, name='hk_list_overview_posted_to'),
++    path('top-posters', mlist.overview_top_posters, name='hk_list_overview_top_posters'),
++    re_path(r'^export/(?P<filename>[^/]+)\.mbox.gz$',
+         mlist.export_mbox, name='hk_list_export_mbox'),
+-    url(r'delete/', mlist.delete, name='hk_list_delete'),
+-    url(r'feed/', check_mlist_private(MailingListFeed()), name='hk_list_feed'),
++    path('delete/', mlist.delete, name='hk_list_delete'),
++    path('feed/', check_mlist_private(MailingListFeed()), name='hk_list_feed'),
+ ]
+ 
+ 
+ # Messages
+ message_patterns = [
+-    url(r'^$', message.index, name='hk_message_index'),
+-    url(r'^attachment/(?P<counter>\d+)/(?P<filename>.+)$',
+-        message.attachment, name='hk_message_attachment'),
+-    url(r'^vote$', message.vote, name='hk_message_vote'),
+-    url(r'^reply$', message.reply, name='hk_message_reply'),
+-    url(r'^delete$', message.delete, name='hk_message_delete'),
++    path('', message.index, name='hk_message_index'),
++    path('attachment/<int:counter>/<path:filename>', message.attachment, name='hk_message_attachment'),
++    path('vote', message.vote, name='hk_message_vote'),
++    path('reply', message.reply, name='hk_message_reply'),
++    path('delete', message.delete, name='hk_message_delete'),
+ ]
+ 
+ 
+ # Threads
+ thread_patterns = [
+-    url(r'^$', thread.thread_index, name='hk_thread'),
+-    url(r'^replies$', thread.replies, name='hk_thread_replies'),
+-    url(r'^tags$', thread.tags, name='hk_tags'),
+-    url(r'^suggest-tags$', thread.suggest_tags, name='hk_suggest_tags'),
+-    url(r'^favorite$', thread.favorite, name='hk_favorite'),
+-    url(r'^category$', thread.set_category, name='hk_thread_set_category'),
+-    url(r'^reattach$', thread.reattach, name='hk_thread_reattach'),
+-    url(r'^reattach-suggest$',
+-        thread.reattach_suggest, name='hk_thread_reattach_suggest'),
+-    url(r'^delete$', message.delete, name='hk_thread_delete'),
++    path('', thread.thread_index, name='hk_thread'),
++    path('replies', thread.replies, name='hk_thread_replies'),
++    path('tags', thread.tags, name='hk_tags'),
++    path('suggest-tags', thread.suggest_tags, name='hk_suggest_tags'),
++    path('favorite', thread.favorite, name='hk_favorite'),
++    path('category', thread.set_category, name='hk_thread_set_category'),
++    path('reattach', thread.reattach, name='hk_thread_reattach'),
++    path('reattach-suggest', thread.reattach_suggest, name='hk_thread_reattach_suggest'),
++    path('delete', message.delete, name='hk_thread_delete'),
+ ]
+ 
+ 
+ # REST API
+ api_list_patterns = [
+-    url(r'^$',
+-        api_mailinglist.MailingListDetail.as_view(), name="hk_api_mailinglist_detail"),
+-    url(r'^threads/$',
+-        api_thread.ThreadList.as_view(), name="hk_api_thread_list"),
+-    url(r'^thread/(?P<thread_id>[^/]+)/$',
+-        api_thread.ThreadDetail.as_view(), name="hk_api_thread_detail"),
+-    url(r'^emails/$',
+-        api_email.EmailList.as_view(), name="hk_api_email_list"),
+-    url(r'^email/(?P<message_id_hash>.*)/$',
++    path('', api_mailinglist.MailingListDetail.as_view(), name="hk_api_mailinglist_detail"),
++    path('threads/', api_thread.ThreadList.as_view(), name="hk_api_thread_list"),
++    path('thread/<str:thread_id>/', api_thread.ThreadDetail.as_view(), name="hk_api_thread_detail"),
++    path('emails/', api_email.EmailList.as_view(), name="hk_api_email_list"),
++    re_path(r'^email/(?P<message_id_hash>.*)/$',
+         api_email.EmailDetail.as_view(), name="hk_api_email_detail"),
+-    url(r'^thread/(?P<thread_id>[^/]+)/emails/$',
+-        api_email.EmailList.as_view(), name="hk_api_thread_email_list"),
++    path('thread/<str:thread_id>/emails/', api_email.EmailList.as_view(), name="hk_api_thread_email_list"),
+ ]
+ api_patterns = [
+-    url(r'^$', TemplateView.as_view(template_name="hyperkitty/api.html")),
+-    url(r'^lists/$',
+-        api_mailinglist.MailingListList.as_view(), name="hk_api_mailinglist_list"),
+-    url(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/', include(api_list_patterns)),
+-    url(r'^sender/(?P<mailman_id>[^/]+)/emails/$',
+-        api_email.EmailListBySender.as_view(), name="hk_api_sender_email_list"),
+-    url(r'^tags/$', api_tag.TagList.as_view(), name="hk_api_tag_list"),
++    path('', TemplateView.as_view(template_name="hyperkitty/api.html")),
++    path('lists/', api_mailinglist.MailingListList.as_view(), name="hk_api_mailinglist_list"),
++    re_path(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/', include(api_list_patterns)),
++    path('sender/<str:mailman_id>/emails/', api_email.EmailListBySender.as_view(), name="hk_api_sender_email_list"),
++    path('tags/', api_tag.TagList.as_view(), name="hk_api_tag_list"),
+ ]
+ 
+ 
+ urlpatterns = [
+     # Index
+-    url(r'^$', index.index, name='hk_root'),
+-    url(r'^find-list$', index.find_list, name='hk_find_list'),
++    path('', index.index, name='hk_root'),
++    path('find-list', index.find_list, name='hk_find_list'),
+ 
+     # User profile
+-    url(r'^profile/', include([
+-        url(r'^$', accounts.user_profile, name='hk_user_profile'),
+-        url(r'^favorites$', accounts.favorites, name='hk_user_favorites'),
+-        url(r'^last_views$', accounts.last_views, name='hk_user_last_views'),
+-        url(r'^votes$', accounts.votes, name='hk_user_votes'),
+-        url(r'^subscriptions$', accounts.subscriptions,
++    path('profile/', include([
++        path('', accounts.user_profile, name='hk_user_profile'),
++        path('favorites', accounts.favorites, name='hk_user_favorites'),
++        path('last_views', accounts.last_views, name='hk_user_last_views'),
++        path('votes', accounts.votes, name='hk_user_votes'),
++        path('subscriptions', accounts.subscriptions,
+             name='hk_user_subscriptions'),
+     ])),
+ 
+     # Users
+-    url(r'^users/$', users.users, name='hk_users_overview'),
+-    url(r'^users/(?P<user_id>[^/]+)/$', accounts.public_profile, name='hk_public_user_profile'),
+-    url(r'^users/(?P<user_id>[^/]+)/posts$', accounts.posts, name='hk_user_posts'),
++    path('users/', users.users, name='hk_users_overview'),
++    path('users/<str:user_id>/', accounts.public_profile, name='hk_public_user_profile'),
++    path('users/<str:user_id>/posts', accounts.posts, name='hk_user_posts'),
+ 
+     # List archives and overview
+-    url(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/', include(list_patterns)),
++    re_path(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/', include(list_patterns)),
+ 
+     # Messages
+-    url(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/message/'
++    re_path(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/message/'
+         r'(?P<message_id_hash>\w+)/', include(message_patterns)),
+-    url(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/message/new$',
++    re_path(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/message/new$',
+         message.new_message, name='hk_message_new'),
+ 
+     # Threads
+-    url(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/thread/(?P<threadid>\w+)/',
++    re_path(r'^list/(?P<mlist_fqdn>[^/@]+@[^/@]+)/thread/(?P<threadid>\w+)/',
+         include(thread_patterns)),
+ 
+     # Search
+-    url(r'^search$', search.search, name='hk_search'),
++    path('search', search.search, name='hk_search'),
+ 
+     # Categories and Tags
+-    url(r'^categories/$', categories.categories, name='hk_categories_overview'),
+-    url(r'^tags/$', tags.tags, name='hk_tags_overview'),
++    path('categories/', categories.categories, name='hk_categories_overview'),
++    path('tags/', tags.tags, name='hk_tags_overview'),
+ 
+     # Mailman archiver API
+-    url(r'^api/mailman/urls$', mailman.urls, name='hk_mailman_urls'),
+-    url(r'^api/mailman/archive$', mailman.archive, name='hk_mailman_archive'),
++    path('api/mailman/urls', mailman.urls, name='hk_mailman_urls'),
++    path('api/mailman/archive', mailman.archive, name='hk_mailman_archive'),
+ 
+     # REST API
+-    url(r'^api/', include(api_patterns)),
++    path('api/', include(api_patterns)),
+ 
+     # Mailman 2.X compatibility
+-    url(r'^listinfo/?$', compat.summary),
+-    url(r'^listinfo/(?P<list_name>[^/]+)/?$', compat.summary),
+-    url(r'^pipermail/(?P<list_name>[^/]+)/?$', compat.summary),
+-    url(r'^pipermail/(?P<list_name>[^/]+)/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/?$', compat.arch_month),
+-    url(r'^pipermail/(?P<list_name>[^/]+)/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/(?P<summary_type>[a-z]+)\.html$', compat.arch_month),
+-    url(r'^pipermail/(?P<list_name>[^/]+)/(?P<year>\d\d\d\d)-(?P<month_name>\w+)\.txt.gz', compat.arch_month_mbox),
++    re_path(r'^listinfo/?$', compat.summary),
++    re_path(r'^listinfo/(?P<list_name>[^/]+)/?$', compat.summary),
++    re_path(r'^pipermail/(?P<list_name>[^/]+)/?$', compat.summary),
++    re_path(r'^pipermail/(?P<list_name>[^/]+)/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/?$', compat.arch_month),
++    re_path(r'^pipermail/(?P<list_name>[^/]+)/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/(?P<summary_type>[a-z]+)\.html$', compat.arch_month),
++    re_path(r'^pipermail/(?P<list_name>[^/]+)/(?P<year>\d\d\d\d)-(?P<month_name>\w+)\.txt.gz', compat.arch_month_mbox),
+     #url(r'^pipermail/(?P<list_name>[^/]+)/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/(?P<msg_num>\d+)\.html$', compat.message),
+-    url(r'^list/(?P<list_name>[^@]+)@[^/]+/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/?$', compat.arch_month),
++    re_path(r'^list/(?P<list_name>[^@]+)@[^/]+/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/?$', compat.arch_month),
+     #url(r'^list/(?P<list_name>[^@]+)@[^/]+/(?P<year>\d\d\d\d)-(?P<month_name>\w+)/(?P<msg_num>\d+)\.html$', compat.message),
+ 
+     # URL compatibility with previous versions
+-    url(r'^list/(?P<list_id>[^@/]+)/', compat.redirect_list_id),
+-    url(r'^lists/', compat.redirect_lists),
++    re_path(r'^list/(?P<list_id>[^@/]+)/', compat.redirect_list_id),
++    path('lists/', compat.redirect_lists),
+ 
+ ]
+ #) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
+diff --git a/hyperkitty/views/mailman.py b/hyperkitty/views/mailman.py
+index 285e4cd2..9b6dfb7e 100644
+--- a/hyperkitty/views/mailman.py
++++ b/hyperkitty/views/mailman.py
+@@ -27,13 +27,12 @@ from email import message_from_binary_file
+ from email.message import EmailMessage
+ from email.policy import default
+ from functools import wraps
+-from urllib.parse import urljoin
++from urllib.parse import unquote, urljoin
+ 
+ from django.conf import settings
+ from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation
+ from django.http import HttpResponse
+ from django.urls import reverse
+-from django.utils.http import urlunquote
+ from django.views.decorators.csrf import csrf_exempt
+ from django.views.decorators.http import require_POST
+ 
+@@ -134,7 +133,7 @@ def _get_url(mlist_fqdn, msg_id=None):
+         msg_hash = get_message_id_hash(msg_id.strip().strip("<>"))
+         url = reverse('hk_message_index', kwargs={
+             "mlist_fqdn": mlist_fqdn, "message_id_hash": msg_hash})
+-    relative_url = urlunquote(url)
++    relative_url = unquote(url)
+     mail_domain = mlist_fqdn.split("@")[1]
+     try:
+         domain = MailDomain.objects.get(
+diff --git a/setup.py b/setup.py
+index c16294b0..827cef0b 100755
+--- a/setup.py
++++ b/setup.py
+@@ -37,7 +37,7 @@ with open('hyperkitty/__init__.py') as fp:
+ 
+ # Requirements
+ REQUIRES = [
+-    "django>=2.2,<3.3",
++    "django>=2.2,<4.1",
+     "django_mailman3>=1.3.7",
+     "django-gravatar2>=1.0.6",
+     "djangorestframework>=3.0.0",
+-- 
+GitLab
+

Copied: hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-implict_primary_keys.patch (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-implict_primary_keys.patch)
===================================================================
--- community-testing-any/hyperkitty-1.3.5-implict_primary_keys.patch	                        (rev 0)
+++ community-testing-any/hyperkitty-1.3.5-implict_primary_keys.patch	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,31 @@
+diff --git a/example_project/settings.py b/example_project/settings.py
+index 5aca0186..aad3e4f5 100644
+--- a/example_project/settings.py
++++ b/example_project/settings.py
+@@ -157,6 +157,9 @@ DATABASES = {
+     #}
+ }
+ 
++# Set default type of primary key (feature introduced with django 3.2)
++# https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
++DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
+ 
+ # If you're behind a proxy, use the X-Forwarded-Host header
+ # See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host
+diff --git a/hyperkitty/tests/settings_test.py b/hyperkitty/tests/settings_test.py
+index 71da81c3..ab271a3b 100644
+--- a/hyperkitty/tests/settings_test.py
++++ b/hyperkitty/tests/settings_test.py
+@@ -149,6 +149,9 @@ DATABASES = {
+     # }
+ }
+ 
++# Set default type of primary key (feature introduced with django 3.2)
++# https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
++DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
+ 
+ # If you're behind a proxy, use the X-Forwarded-Host header
+ # See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host
+-- 
+GitLab
+

Copied: hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-mistune2.0.0_imports.patch (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-mistune2.0.0_imports.patch)
===================================================================
--- community-testing-any/hyperkitty-1.3.5-mistune2.0.0_imports.patch	                        (rev 0)
+++ community-testing-any/hyperkitty-1.3.5-mistune2.0.0_imports.patch	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,28 @@
+From 2c3c189c9aacef3f54de2ae0f653aa13c6167093 Mon Sep 17 00:00:00 2001
+From: David Runge <dave at sleepmap.de>
+Date: Sun, 5 Dec 2021 12:39:01 +0100
+Subject: [PATCH] Fix mistune imports for mistune >= 2.0.0
+
+hyperkitty/lib/renderer.py:
+With mistune 2.0.0 the `escape_url()` and `escape_html()` are moved to
+mistune.util.
+---
+ hyperkitty/lib/renderer.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hyperkitty/lib/renderer.py b/hyperkitty/lib/renderer.py
+index cf54e7c0..96f026db 100644
+--- a/hyperkitty/lib/renderer.py
++++ b/hyperkitty/lib/renderer.py
+@@ -4,7 +4,7 @@ from django.conf import settings
+ 
+ import mistune
+ from mistune.plugins.extra import plugin_url
+-from mistune.scanner import escape_html, escape_url
++from mistune.util import escape_html, escape_url
+ 
+ 
+ class MyRenderer(mistune.HTMLRenderer):
+-- 
+GitLab
+

Copied: hyperkitty/repos/community-testing-any/hyperkitty-1.3.5-qcluster_retry.patch (from rev 1135302, hyperkitty/trunk/hyperkitty-1.3.5-qcluster_retry.patch)
===================================================================
--- community-testing-any/hyperkitty-1.3.5-qcluster_retry.patch	                        (rev 0)
+++ community-testing-any/hyperkitty-1.3.5-qcluster_retry.patch	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,14 @@
+diff --git a/example_project/settings.py b/example_project/settings.py
+index a6e90441..5aca0186 100644
+--- a/example_project/settings.py
++++ b/example_project/settings.py
+@@ -368,6 +368,7 @@ REST_FRAMEWORK = {
+ #
+ Q_CLUSTER = {
+     'timeout': 300,
++    'retry': 360,
+     'save_limit': 100,
+     'orm': 'default',
+ }
+-- 
+GitLab

Copied: hyperkitty/repos/community-testing-any/hyperkitty-qcluster.service (from rev 1135302, hyperkitty/trunk/hyperkitty-qcluster.service)
===================================================================
--- community-testing-any/hyperkitty-qcluster.service	                        (rev 0)
+++ community-testing-any/hyperkitty-qcluster.service	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,38 @@
+[Unit]
+Description=HyperKitty async tasks runner
+Documentation=https://hyperkitty.readthedocs.io/en/latest/install.html#asynchronous-tasks
+After=network.target remote-fs.target
+
+[Service]
+User=hyperkitty
+ExecStart=/usr/bin/django-admin qcluster --pythonpath /usr/share/webapps/hyperkitty --settings settings
+Restart=always
+StandardError=syslog
+PrivateTmp=true
+ProtectSystem=strict
+ProtectHome=true
+PrivateDevices=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+NoNewPrivileges=true
+MemoryDenyWriteExecute=true
+LockPersonality=true
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ProtectHostname=true
+ProtectKernelLogs=true
+ProtectKernelModules=true
+RemoveIPC=true
+RestrictAddressFamilies=~AF_PACKET
+RestrictNamespaces=true
+RestrictRealtime=true
+RestrictSUIDSGID=true
+SystemCallArchitectures=native
+SystemCallFilter=@system-service
+SystemCallFilter=~@privileged @resources
+ReadOnlyPaths=/etc/webapps/hyperkitty
+LogsDirectory=hyperkitty
+RuntimeDirectory=hyperkitty
+StateDirectory=hyperkitty
+
+[Install]
+WantedBy=multi-user.target

Copied: hyperkitty/repos/community-testing-any/hyperkitty.install (from rev 1135302, hyperkitty/trunk/hyperkitty.install)
===================================================================
--- community-testing-any/hyperkitty.install	                        (rev 0)
+++ community-testing-any/hyperkitty.install	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,10 @@
+post_install() {
+  echo "Run the following to create/migrate the database:"
+  echo "sudo -u hyperkitty django-admin migrate --pythonpath /usr/share/webapps/hyperkitty/ --settings settings"
+}
+
+post_upgrade() {
+  echo "Run the following to update static files and compress them:"
+  echo "sudo -u hyperkitty django-admin collectstatic --pythonpath /usr/share/webapps/hyperkitty --settings settings"
+  echo "sudo -u hyperkitty django-admin compress --pythonpath /usr/share/webapps/hyperkitty --settings settings"
+}

Copied: hyperkitty/repos/community-testing-any/hyperkitty.sysusers (from rev 1135302, hyperkitty/trunk/hyperkitty.sysusers)
===================================================================
--- community-testing-any/hyperkitty.sysusers	                        (rev 0)
+++ community-testing-any/hyperkitty.sysusers	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1 @@
+u hyperkitty - "GNU Mailman Archiver" -

Copied: hyperkitty/repos/community-testing-any/hyperkitty.tmpfiles (from rev 1135302, hyperkitty/trunk/hyperkitty.tmpfiles)
===================================================================
--- community-testing-any/hyperkitty.tmpfiles	                        (rev 0)
+++ community-testing-any/hyperkitty.tmpfiles	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,8 @@
+z /etc/webapps/hyperkitty/settings_local.py 0640 root hyperkitty -
+z /etc/webapps/hyperkitty/urls.py 0640 root hyperkitty -
+d %L/hyperkitty 750 hyperkitty hyperkitty -
+d %S/hyperkitty - hyperkitty hyperkitty -
+d %S/hyperkitty/data 750 hyperkitty hyperkitty -
+d %S/hyperkitty/locale - hyperkitty hyperkitty -
+d %S/hyperkitty/static - hyperkitty hyperkitty -
+d %t/hyperkitty - hyperkitty hyperkitty -

Copied: hyperkitty/repos/community-testing-any/hyperkitty.uwsgi (from rev 1135302, hyperkitty/trunk/hyperkitty.uwsgi)
===================================================================
--- community-testing-any/hyperkitty.uwsgi	                        (rev 0)
+++ community-testing-any/hyperkitty.uwsgi	2022-02-20 16:18:39 UTC (rev 1135303)
@@ -0,0 +1,25 @@
+[uwsgi]
+procname-master = hyperkitty
+master = true
+plugins = python
+socket = /run/hyperkitty/%n.sock
+stats = /run/hyperkitty/%n-stats.sock
+uid = hyperkitty
+gid = hyperkitty
+processes = 10
+cheaper = 2
+cheaper-step = 1
+idle = 120
+die-on-idle = true
+chdir = /usr/share/webapps/hyperkitty
+module = wsgi
+home = /
+touch-reload = %p
+vacuum = true
+cron2 = minute=0,hour=0,day=0,week=0,month=0,unique=1 /usr/bin/django-admin runjobs yearly  --pythonpath /usr/share/webapps/hyperkitty --settings settings
+cron2 = minute=0,hour=0,day=0,week=0,unique=1 /usr/bin/django-admin runjobs monthly --pythonpath /usr/share/webapps/hyperkitty --settings settings
+cron2 = minute=0,hour=0,day=0,unique=1 /usr/bin/django-admin runjobs weekly  --pythonpath /usr/share/webapps/hyperkitty --settings settings
+cron2 = minute=0,hour=0,unique=1 django-admin runjobs daily   --pythonpath /usr/share/webapps/hyperkitty --settings settings
+cron2 = minute=0,unique=1 /usr/bin/django-admin runjobs hourly  --pythonpath /usr/share/webapps/hyperkitty --settings settings
+cron2 = minute=-15,unique=1 /usr/bin/django-admin runjobs quarter_hourly --pythonpath /usr/share/webapps/hyperkitty --settings settings
+cron2 = unique=1 /usr/bin/django-admin runjobs minutely --pythonpath /usr/share/webapps/hyperkitty --settings settings



More information about the arch-commits mailing list