[arch-commits] Commit in mailman-web/repos (8 files)

Felix Yan felixonmars at gemini.archlinux.org
Fri Dec 3 01:27:10 UTC 2021


    Date: Friday, December 3, 2021 @ 01:27:10
  Author: felixonmars
Revision: 1064639

archrelease: copy trunk to community-staging-any

Added:
  mailman-web/repos/community-staging-any/
  mailman-web/repos/community-staging-any/PKGBUILD
    (from rev 1064632, mailman-web/trunk/PKGBUILD)
  mailman-web/repos/community-staging-any/mailman-web-0.0.5-django.patch
    (from rev 1064634, mailman-web/trunk/mailman-web-0.0.5-django.patch)
  mailman-web/repos/community-staging-any/mailman-web-0.0.5-fhs.patch
    (from rev 1064634, mailman-web/trunk/mailman-web-0.0.5-fhs.patch)
  mailman-web/repos/community-staging-any/mailman-web.sysusers
    (from rev 1064634, mailman-web/trunk/mailman-web.sysusers)
  mailman-web/repos/community-staging-any/mailman-web.tmpfiles
    (from rev 1064635, mailman-web/trunk/mailman-web.tmpfiles)
  mailman-web/repos/community-staging-any/mailman-web.uwsgi
    (from rev 1064635, mailman-web/trunk/mailman-web.uwsgi)
  mailman-web/repos/community-staging-any/settings.py
    (from rev 1064635, mailman-web/trunk/settings.py)

--------------------------------+
 PKGBUILD                       |   81 +++++++++++++++++++++++++++++++++++++++
 mailman-web-0.0.5-django.patch |   12 +++++
 mailman-web-0.0.5-fhs.patch    |   51 ++++++++++++++++++++++++
 mailman-web.sysusers           |    1 
 mailman-web.tmpfiles           |    8 +++
 mailman-web.uwsgi              |   30 ++++++++++++++
 settings.py                    |    5 ++
 7 files changed, 188 insertions(+)

Copied: mailman-web/repos/community-staging-any/PKGBUILD (from rev 1064632, mailman-web/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2021-12-03 01:27:10 UTC (rev 1064639)
@@ -0,0 +1,81 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=mailman-web
+pkgver=0.0.5
+pkgrel=2
+pkgdesc="The web interface for Mailman 3"
+arch=(any)
+url="https://gitlab.com/mailman/mailman-web"
+license=(GPL3)
+depends=(hyperkitty postorius python-django python-whoosh)
+makedepends=(python-setuptools-scm)
+optdepends=(
+  'mailman3: for interacting with a local mailman instance'
+  'uwsgi-plugin-python: for running inside uwsgi'
+)
+backup=(
+  "etc/webapps/${pkgname}/settings.py"
+  "etc/webapps/${pkgname}/urls.py"
+)
+options=()
+source=(
+  "https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+  "settings.py"
+  "${pkgname}.sysusers"
+  "${pkgname}.tmpfiles"
+  "${pkgname}.uwsgi"
+  "${pkgname}-0.0.5-django.patch"
+  "${pkgname}-0.0.5-fhs.patch"
+)
+sha512sums=('3a46372cbe332754e2fef4088651d6ab5c95ad90f0faaca091cd89eb69d73c8fb222861fafd8312d10b244c76a86c2e4018301fc5c18d15570c3e88c1015e9af'
+            'cf255da4028a36a21473166a44c4a104b58ed824b81a08548bd89a861f9684bf89d166c4827b8dd5d9e516a9b0a30bbf26733f9a7e3f0d85f1c5c29f3929a3db'
+            '4044b2500dc63ec1cea829d0189428de590755006c38d6f82e5a51af8935409a1ea5a5fb1f676d2331ceb59383cf79730837427eff32ad82f900068684aa3b45'
+            '07aa2af5f72dccdfe32f3f220d798e5e6d57ed6875566e33ad610a05a063861a84aa6bb6d4c9a172711862855e7eae68a19fd6dcd098893f4a365579bd29cf57'
+            '744a0f0af9c5683b50bf43816262917edeb47e954aba1ac7c9d831eddf3c5e63e307811e35161ac3a717b08f7d9c3dface0a2703a7c2a0f6d3a9882ce445109f'
+            'a6cea2e453a8f32ef7efa22c141cb68eb7b255e36f14b6beef46143fb2d993d72b45fd35f88bda2bc0f8e017c1240a97057b2b10fb1f5660889febf5ca83d4a0'
+            '8b02038009344aeec1ec7cfb0ce5012cd7d8594bb7b80a3564fd421549e3c8ce03a8259ddf2a92c0ac9c1e44214421c8537cdaf5fd41c056f663246f66304a34')
+b2sums=('dcc5fbae4ab17b107e59f02eb83e1f1bb1662f63fb1c6c4731b6a8dec0a2eeeac1986f99022fe7e2049aebbcd8bcb682bf4454fc4691a590f31a4ed4d744f73b'
+        '40c2583cf72597fbcdfeecabb8aa10cb2fe1e5f9b60669bdc933e4884899325f70ba4ab9f27dc702aacf26f0b0de400b26245c7770a9b3e8cc0b0641478028d6'
+        'c57e70b949947ce3d30053886620221346d87416034cd004dcd91107e55a0123fb37a6c68796168ddabaab467b0f77dd8292e650df05e2e1eed0ec4d63becc2b'
+        '80ca9c95c9bb3ce42bd4e3efbea59bc6cbbdabd35c504ee5c7414b8c657d863119921577fb618e0709631d05704d24698a2575f12aed81cf1cf16cd8ce116ed9'
+        '7f39c6752f54048e1268c94010fa2fbdc6cc7db0c931c616469068ba835330b9cb8ec183978f2047fd8e0aff88b25de7437cbb112dbdad25f795e25f2419f809'
+        '8613ccfdf8558c1e9ff51b9abaf6df3fa82f78f67e48d8b59cd718b1dbc57948c197513e8083d07f4f4974b4ff41e859b39e47f3d961b8d8e26469747516c80b'
+        'e1633d246068ba56734b2cd6be29c8f151e32fabf356daddb5b1283ce237b44507d8eb29541df6a8cc657eff302d45e00b096a408dc35fb477c950ddac34e56a')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  # set django version support: https://gitlab.com/mailman/mailman-web/-/merge_requests/17
+  patch -Np1 -i ../"${pkgname}-0.0.5-django.patch"
+  # set FHS and packaging compliant default locations
+  patch -Np1 -i ../"${pkgname}-0.0.5-fhs.patch"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+package() {
+  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+
+  cd "$pkgname-$pkgver"
+  python setup.py install --optimize=1 --root="${pkgdir}"
+
+  # config
+  install -vDm 640 ../settings.py "${pkgdir}/etc/webapps/${pkgname}/settings.py"
+  install -vDm 640 mailman_web/urls.py "${pkgdir}/etc/webapps/${pkgname}/urls.py"
+  ln -sfv "/etc/webapps/${pkgname}/urls.py" "${pkgdir}${site_packages}/${pkgname/-/_}/urls.py"
+
+  # state dirs
+  install -vdm 750 "${pkgdir}/var/lib/${pkgname}/data"
+  install -vdm 755 "${pkgdir}/var/lib/${pkgname}/static"
+  # log dir
+  install -vdm 750 "${pkgdir}/var/log/${pkgname}/"
+  # 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"
+  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
+}

Copied: mailman-web/repos/community-staging-any/mailman-web-0.0.5-django.patch (from rev 1064634, mailman-web/trunk/mailman-web-0.0.5-django.patch)
===================================================================
--- community-staging-any/mailman-web-0.0.5-django.patch	                        (rev 0)
+++ community-staging-any/mailman-web-0.0.5-django.patch	2021-12-03 01:27:10 UTC (rev 1064639)
@@ -0,0 +1,12 @@
+diff -ruN a/setup.cfg b/setup.cfg
+--- a/setup.cfg	2021-09-17 17:03:22.707365000 +0200
++++ b/setup.cfg	2021-12-01 21:26:25.150786080 +0100
+@@ -22,7 +22,7 @@
+ 	setuptools
+ 	setuptools-scm
+ install_requires = 
+-	Django<3.1
++	django >= 2.2, !=3.0, <4.0
+ 	postorius
+ 	hyperkitty
+ 	whoosh

Copied: mailman-web/repos/community-staging-any/mailman-web-0.0.5-fhs.patch (from rev 1064634, mailman-web/trunk/mailman-web-0.0.5-fhs.patch)
===================================================================
--- community-staging-any/mailman-web-0.0.5-fhs.patch	                        (rev 0)
+++ community-staging-any/mailman-web-0.0.5-fhs.patch	2021-12-03 01:27:10 UTC (rev 1064639)
@@ -0,0 +1,51 @@
+diff -ruN a/mailman_web/manage.py b/mailman_web/manage.py
+--- a/mailman_web/manage.py	2021-02-03 06:09:38.000000000 +0100
++++ b/mailman_web/manage.py	2021-12-01 21:54:42.397593088 +0100
+@@ -8,7 +8,7 @@
+     if os.getenv('DJANGO_SETTINGS_MODULE') is not None:
+         return
+ 
+-    MAILMAN_WEB_CONFIG = os.getenv('MAILMAN_WEB_CONFIG', '/etc/mailman3/settings.py')
++    MAILMAN_WEB_CONFIG = os.getenv('MAILMAN_WEB_CONFIG', '/etc/webapps/mailman-web/settings.py')
+ 
+     if not os.path.exists(MAILMAN_WEB_CONFIG):
+         print('Mailman web configuration file at {} does not exist'.format(
+diff -ruN a/mailman_web/settings/base.py b/mailman_web/settings/base.py
+--- a/mailman_web/settings/base.py	2021-01-22 22:32:26.000000000 +0100
++++ b/mailman_web/settings/base.py	2021-12-01 22:14:56.713467440 +0100
+@@ -3,7 +3,7 @@
+ from pathlib import Path
+ 
+ #: The base directory for logs and database.
+-BASE_DIR = Path('/opt/mailman/web')
++BASE_DIR = Path('/var/lib/mailman-web')
+ 
+ #: Default list of admins who receive the emails from error logging.
+ ADMINS = (
+@@ -135,7 +135,7 @@
+ DATABASES = {
+     'default': {
+         'ENGINE': 'django.db.backends.sqlite3',
+-        'NAME': os.path.join(BASE_DIR, 'mailman-web.db'),
++        'NAME': BASE_DIR / 'data' / 'mailman-web.db',
+         'HOST': '',
+         'PORT': '',
+     }
+@@ -179,7 +179,7 @@
+ 
+ 
+ #: Default path where static files will be placed.
+-STATIC_ROOT = os.path.join(BASE_DIR, 'static')
++STATIC_ROOT = BASE_DIR / 'static'
+ 
+ #: URL prefix for static files.
+ #: Example: "http://example.com/static/", "http://static.example.com/"
+@@ -252,7 +252,7 @@
+             'level': 'INFO',
+             #'class': 'logging.handlers.RotatingFileHandler',
+             'class': 'logging.handlers.WatchedFileHandler',
+-            'filename': os.path.join(BASE_DIR, 'logs', 'mailmanweb.log'),
++            'filename': Path("/var/log/mailman-web/mailman-web.log"),
+             'formatter': 'verbose',
+         },
+         'console': {

Copied: mailman-web/repos/community-staging-any/mailman-web.sysusers (from rev 1064634, mailman-web/trunk/mailman-web.sysusers)
===================================================================
--- community-staging-any/mailman-web.sysusers	                        (rev 0)
+++ community-staging-any/mailman-web.sysusers	2021-12-03 01:27:10 UTC (rev 1064639)
@@ -0,0 +1 @@
+u mailman-web - "GNU Mailman Web" -

Copied: mailman-web/repos/community-staging-any/mailman-web.tmpfiles (from rev 1064635, mailman-web/trunk/mailman-web.tmpfiles)
===================================================================
--- community-staging-any/mailman-web.tmpfiles	                        (rev 0)
+++ community-staging-any/mailman-web.tmpfiles	2021-12-03 01:27:10 UTC (rev 1064639)
@@ -0,0 +1,8 @@
+z /etc/webapps/mailman-web/settings.py 0640 root mailman-web -
+z /etc/webapps/mailman-web/settings_local.py 0640 root mailman-web -
+z /etc/webapps/mailman-web/urls.py 0640 root mailman-web -
+d %L/mailman-web 750 mailman-web mailman-web -
+d %S/mailman-web - mailman-web mailman-web -
+d %S/mailman-web/data 750 mailman-web mailman-web -
+d %S/mailman-web/static - mailman-web mailman-web -
+d %t/mailman-web - mailman-web mailman-web -

Copied: mailman-web/repos/community-staging-any/mailman-web.uwsgi (from rev 1064635, mailman-web/trunk/mailman-web.uwsgi)
===================================================================
--- community-staging-any/mailman-web.uwsgi	                        (rev 0)
+++ community-staging-any/mailman-web.uwsgi	2021-12-03 01:27:10 UTC (rev 1064639)
@@ -0,0 +1,30 @@
+[uwsgi]
+procname-master = %n
+master = true
+plugins = python
+socket = /run/%n/%n.sock
+# uncomment for a stats socket, that can be used with uwsgitop
+# stats = /run/%n/%n-stats.sock
+uid = mailman-web
+gid = mailman-web
+chmod-socket = 660
+chown-socket = mailman-web:http
+processes = 10
+cheaper = 2
+cheaper-step = 1
+idle = 120
+die-on-idle = true
+module=mailman_web.wsgi:application
+# Add to python import path.
+pythonpath = /etc/webapps/%n/
+home = /
+touch-reload = %p
+vacuum = true
+attach-daemon = django-admin qcluster --pythonpath /etc/webapps/%n --settings settings
+cron2 = minute=0,hour=0,day=0,week=0,month=0,unique=1 /usr/bin/django-admin runjobs yearly --pythonpath /etc/webapps/%n --settings settings
+cron2 = minute=0,hour=0,day=0,week=0,unique=1 /usr/bin/django-admin runjobs monthly --pythonpath /etc/webapps/%n --settings settings
+cron2 = minute=0,hour=0,day=0,unique=1 /usr/bin/django-admin runjobs weekly --pythonpath /etc/webapps/%n --settings settings
+cron2 = minute=0,hour=0,unique=1 django-admin runjobs daily --pythonpath /etc/webapps/%n --settings settings
+cron2 = minute=0,unique=1 /usr/bin/django-admin runjobs hourly --pythonpath /etc/webapps/%n --settings settings
+cron2 = minute=-15,unique=1 /usr/bin/django-admin runjobs quarter_hourly --pythonpath /etc/webapps/%n --settings settings
+cron2 = unique=1 /usr/bin/django-admin runjobs minutely --pythonpath /etc/webapps/%n --settings settings

Copied: mailman-web/repos/community-staging-any/settings.py (from rev 1064635, mailman-web/trunk/settings.py)
===================================================================
--- community-staging-any/settings.py	                        (rev 0)
+++ community-staging-any/settings.py	2021-12-03 01:27:10 UTC (rev 1064639)
@@ -0,0 +1,5 @@
+# mailman-web config
+from mailman_web.settings.base import *
+from mailman_web.settings.mailman import *
+
+# modifications to the file should begin below this comment



More information about the arch-commits mailing list