Date: Thursday, October 20, 2022 @ 19:15:41
  Author: dvzrv
Revision: 1333012

archrelease: copy trunk to community-testing-any

Added:
  mailman-web/repos/community-testing-any/
  mailman-web/repos/community-testing-any/PKGBUILD
    (from rev 1333011, mailman-web/trunk/PKGBUILD)
  mailman-web/repos/community-testing-any/mailman-web-0.0.5-fhs.patch
    (from rev 1333011, mailman-web/trunk/mailman-web-0.0.5-fhs.patch)
  mailman-web/repos/community-testing-any/mailman-web-qcluster.service
    (from rev 1333011, mailman-web/trunk/mailman-web-qcluster.service)
  mailman-web/repos/community-testing-any/mailman-web.sysusers
    (from rev 1333011, mailman-web/trunk/mailman-web.sysusers)
  mailman-web/repos/community-testing-any/mailman-web.tmpfiles
    (from rev 1333011, mailman-web/trunk/mailman-web.tmpfiles)
  mailman-web/repos/community-testing-any/mailman-web.uwsgi
    (from rev 1333011, mailman-web/trunk/mailman-web.uwsgi)
  mailman-web/repos/community-testing-any/settings.py
    (from rev 1333011, mailman-web/trunk/settings.py)

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

Copied: mailman-web/repos/community-testing-any/PKGBUILD (from rev 1333011, 
mailman-web/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD                              (rev 0)
+++ community-testing-any/PKGBUILD      2022-10-20 19:15:41 UTC (rev 1333012)
@@ -0,0 +1,81 @@
+# Maintainer: David Runge <[email protected]>
+
+pkgname=mailman-web
+pkgver=0.0.5.r12.gb79b7b5
+_commit=b79b7b5d51f21732ec503089e80d80fe12f6d66e  # somewhere on master past 
0.0.5
+pkgrel=1
+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=(git python-build python-installer python-setuptools-scm 
python-wheel)
+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=(
+  git+https://gitlab.com/mailman/mailman-web#commit=$_commit
+  $pkgname-qcluster.service
+  settings.py
+  $pkgname.sysusers
+  $pkgname.tmpfiles
+  $pkgname.uwsgi
+  $pkgname-0.0.5-fhs.patch
+)
+sha512sums=('SKIP'
+            
'5440c170f50cbc4c95e0cf4c9d2c8a03759e0d13c2f9c604a6eaedfde9abcc4ae6cc9845d53d58cd4ee06373bab166f3115a59ebac3b77fe1d33ab7054c7c5d7'
+            
'cf255da4028a36a21473166a44c4a104b58ed824b81a08548bd89a861f9684bf89d166c4827b8dd5d9e516a9b0a30bbf26733f9a7e3f0d85f1c5c29f3929a3db'
+            
'4044b2500dc63ec1cea829d0189428de590755006c38d6f82e5a51af8935409a1ea5a5fb1f676d2331ceb59383cf79730837427eff32ad82f900068684aa3b45'
+            
'07aa2af5f72dccdfe32f3f220d798e5e6d57ed6875566e33ad610a05a063861a84aa6bb6d4c9a172711862855e7eae68a19fd6dcd098893f4a365579bd29cf57'
+            
'744a0f0af9c5683b50bf43816262917edeb47e954aba1ac7c9d831eddf3c5e63e307811e35161ac3a717b08f7d9c3dface0a2703a7c2a0f6d3a9882ce445109f'
+            
'311b968255435f20ee3c9d4c88e7c4f122b93b6fef8b586896e5cd3bf63e95fae1b4a770cacb3e6eb35859b5a69f26f98c3cd9ca44fcfb509ef676556f2fb67e')
+b2sums=('SKIP'
+        
'48d65925bbbe4f17c1d4a656eb533621904fbffee06ff0ce09fbc9ad69cd947269998f31a9a172645d9389d98caf8395e4a3d9fbaafeedbf52b774725d446e29'
+        
'40c2583cf72597fbcdfeecabb8aa10cb2fe1e5f9b60669bdc933e4884899325f70ba4ab9f27dc702aacf26f0b0de400b26245c7770a9b3e8cc0b0641478028d6'
+        
'c57e70b949947ce3d30053886620221346d87416034cd004dcd91107e55a0123fb37a6c68796168ddabaab467b0f77dd8292e650df05e2e1eed0ec4d63becc2b'
+        
'80ca9c95c9bb3ce42bd4e3efbea59bc6cbbdabd35c504ee5c7414b8c657d863119921577fb618e0709631d05704d24698a2575f12aed81cf1cf16cd8ce116ed9'
+        
'7f39c6752f54048e1268c94010fa2fbdc6cc7db0c931c616469068ba835330b9cb8ec183978f2047fd8e0aff88b25de7437cbb112dbdad25f795e25f2419f809'
+        
'7c176a0ae2ea3cb266b08e821c971ff00d39c2cb3de2b93de6b69e4c38e4647b1b42df468bb0d8ac72f02b069d34969d29e586093f7183a19371d83cabdd3fc7')
+
+pkgver() {
+  cd $pkgname
+  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/v//g;s/-/./g'
+}
+
+prepare() {
+  # set FHS and packaging compliant default locations
+  patch -Np1 -d $pkgname -i ../$pkgname-0.0.5-fhs.patch
+}
+
+build() {
+  cd $pkgname
+  python -m build --wheel --no-isolation
+}
+
+package() {
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd $pkgname
+  python -m installer --destdir="$pkgdir" dist/*.whl
+
+  # 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"
+
+  install -vdm 750 "$pkgdir/var/lib/$pkgname/data/"
+  install -vdm 755 "$pkgdir/var/lib/$pkgname/static/"
+  install -vdm 750 "$pkgdir/var/log/$pkgname/"
+
+  install -vDm 644 ../$pkgname.uwsgi "$pkgdir/etc/uwsgi/$pkgname.ini"
+  install -vDm 644 ../$pkgname-qcluster.service -t 
"$pkgdir/usr/lib/systemd/system/"
+  install -vDm 644 ../$pkgname.tmpfiles 
"$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+  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-testing-any/mailman-web-0.0.5-fhs.patch 
(from rev 1333011, mailman-web/trunk/mailman-web-0.0.5-fhs.patch)
===================================================================
--- community-testing-any/mailman-web-0.0.5-fhs.patch                           
(rev 0)
+++ community-testing-any/mailman-web-0.0.5-fhs.patch   2022-10-20 19:15:41 UTC 
(rev 1333012)
@@ -0,0 +1,51 @@
+diff -ruN a/mailman_web/manage.py b/mailman_web/manage.py
+--- a/mailman_web/manage.py    2022-08-12 22:05:01.562363167 +0200
++++ b/mailman_web/manage.py    2022-08-12 22:05:18.955599046 +0200
+@@ -11,7 +11,7 @@
+ 
+     MAILMAN_WEB_CONFIG = os.getenv(
+         'MAILMAN_WEB_CONFIG',
+-        '/etc/mailman3/settings.py',
++        '/etc/webapps/mailman-web/settings.py',
+     )
+ 
+     if not os.path.exists(MAILMAN_WEB_CONFIG):
+diff -ruN a/mailman_web/settings/base.py b/mailman_web/settings/base.py
+--- a/mailman_web/settings/base.py     2022-08-12 22:05:01.562363167 +0200
++++ b/mailman_web/settings/base.py     2022-08-12 22:08:27.497875716 +0200
+@@ -4,7 +4,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 = (
+@@ -137,7 +137,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': '',
+     }
+@@ -181,7 +181,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/";
+@@ -251,7 +251,7 @@
+         'file': {
+             'level': 'INFO',
+             '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-testing-any/mailman-web-qcluster.service 
(from rev 1333011, mailman-web/trunk/mailman-web-qcluster.service)
===================================================================
--- community-testing-any/mailman-web-qcluster.service                          
(rev 0)
+++ community-testing-any/mailman-web-qcluster.service  2022-10-20 19:15:41 UTC 
(rev 1333012)
@@ -0,0 +1,38 @@
+[Unit]
+Description=Mailman-web async tasks runner
+Documentation=https://hyperkitty.readthedocs.io/en/latest/install.html#asynchronous-tasks
+After=network.target remote-fs.target
+
+[Service]
+User=mailman-web
+ExecStart=/usr/bin/django-admin qcluster --pythonpath 
/usr/share/webapps/mailman-web --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/mailman-web
+LogsDirectory=mailman-web
+RuntimeDirectory=mailman-web
+StateDirectory=mailman-web
+
+[Install]
+WantedBy=multi-user.target

Copied: mailman-web/repos/community-testing-any/mailman-web.sysusers (from rev 
1333011, mailman-web/trunk/mailman-web.sysusers)
===================================================================
--- community-testing-any/mailman-web.sysusers                          (rev 0)
+++ community-testing-any/mailman-web.sysusers  2022-10-20 19:15:41 UTC (rev 
1333012)
@@ -0,0 +1 @@
+u mailman-web - "GNU Mailman Web" -

Copied: mailman-web/repos/community-testing-any/mailman-web.tmpfiles (from rev 
1333011, mailman-web/trunk/mailman-web.tmpfiles)
===================================================================
--- community-testing-any/mailman-web.tmpfiles                          (rev 0)
+++ community-testing-any/mailman-web.tmpfiles  2022-10-20 19:15:41 UTC (rev 
1333012)
@@ -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-testing-any/mailman-web.uwsgi (from rev 
1333011, mailman-web/trunk/mailman-web.uwsgi)
===================================================================
--- community-testing-any/mailman-web.uwsgi                             (rev 0)
+++ community-testing-any/mailman-web.uwsgi     2022-10-20 19:15:41 UTC (rev 
1333012)
@@ -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-testing-any/settings.py (from rev 1333011, 
mailman-web/trunk/settings.py)
===================================================================
--- community-testing-any/settings.py                           (rev 0)
+++ community-testing-any/settings.py   2022-10-20 19:15:41 UTC (rev 1333012)
@@ -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

Reply via email to