Date: Wednesday, April 12, 2023 @ 18:18:38
  Author: felixonmars
Revision: 1444996

archrelease: copy trunk to community-staging-any

Added:
  hyperkitty/repos/community-staging-any/
  hyperkitty/repos/community-staging-any/PKGBUILD
    (from rev 1444995, hyperkitty/trunk/PKGBUILD)
  hyperkitty/repos/community-staging-any/hyperkitty-1.3.5-settings.patch
    (from rev 1444995, hyperkitty/trunk/hyperkitty-1.3.5-settings.patch)
  hyperkitty/repos/community-staging-any/hyperkitty-qcluster.service
    (from rev 1444995, hyperkitty/trunk/hyperkitty-qcluster.service)
  hyperkitty/repos/community-staging-any/hyperkitty.install
    (from rev 1444995, hyperkitty/trunk/hyperkitty.install)
  hyperkitty/repos/community-staging-any/hyperkitty.sysusers
    (from rev 1444995, hyperkitty/trunk/hyperkitty.sysusers)
  hyperkitty/repos/community-staging-any/hyperkitty.tmpfiles
    (from rev 1444995, hyperkitty/trunk/hyperkitty.tmpfiles)
  hyperkitty/repos/community-staging-any/hyperkitty.uwsgi
    (from rev 1444995, hyperkitty/trunk/hyperkitty.uwsgi)
  hyperkitty/repos/community-staging-any/keys/

---------------------------------+
 PKGBUILD                        |  113 ++++++++++++++++++++++++++++++++++++++
 hyperkitty-1.3.5-settings.patch |   96 ++++++++++++++++++++++++++++++++
 hyperkitty-qcluster.service     |   38 ++++++++++++
 hyperkitty.install              |   10 +++
 hyperkitty.sysusers             |    1 
 hyperkitty.tmpfiles             |    8 ++
 hyperkitty.uwsgi                |   25 ++++++++
 7 files changed, 291 insertions(+)

Copied: hyperkitty/repos/community-staging-any/PKGBUILD (from rev 1444995, 
hyperkitty/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-12 18:18:38 UTC (rev 1444996)
@@ -0,0 +1,113 @@
+# Maintainer: David Runge <[email protected]>
+
+_name=HyperKitty
+pkgname=hyperkitty
+pkgver=1.3.7
+_commit=09a4553758b6296b3577126cec2a0591cf4e11c6 # refs/tags/1.3.7
+pkgrel=2
+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=(git python-build python-installer python-isort python-setuptools 
python-wheel)
+checkdepends=(python-beautifulsoup4 python-django-debug-toolbar
+python-elasticsearch python-lxml python-pytest python-whoosh)
+optdepends=(
+  'python-django-debug-toolbar: for debugging'
+  '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=(
+  git+https://gitlab.com/mailman/hyperkitty#tag=$_commit?signed
+  $pkgname-1.3.5-settings.patch
+  $pkgname-qcluster.service
+  $pkgname.sysusers
+  $pkgname.tmpfiles
+  $pkgname.uwsgi
+)
+sha512sums=('SKIP'
+            
'd33a2ec2fb4547da56795c450882bbedbcce962ed2e96e26817fdaa8045859c444f215107fabcf71d62f2b76f41212f5fb49b7e2ed432ccd970eb13988f2f67d'
+            
'a41c938082ceee555143ddb21c3a95835f9832b9aff423142d78d3e52f12500561f80e0ce43c67a4f190065c9d045945741ac71ab3307db1419c4dc0686db09a'
+            
'3267427109b08b8c9336b187381ed14357a07370bdcdfc24da94555020ad0424c5bbebc09e131e981e0540c51db443ffe558209e1bca7c2a1b7b1f602ed0805b'
+            
'c943d82b8640a513728e3f07fa44c0ddb5a3bb8ec84a3a70990e51287ca01977887f895b901688fc4643d8fcb106d524259a86a51bccaafd77c69b241f1b23ba'
+            
'351f40a6bc1fd1735c883408f9941808e081206927a7c02467e03228243dd156378cac21f851b498702bd4f96fde8e4c80536dbcc6f3c384bf708bed4e988971')
+b2sums=('SKIP'
+        
'62793fe38541dd570163ab0cd740fd6aeae9eb652164fbb066c1b958dcdba845c5ee3d5ca05770a8179ef292c584c9fbd293ad88956c58ad306ab8b352ea679c'
+        
'e8ae1d123e74b0c6984df3e5fff720e03dcbc3f007123718fe845024b42e5c13b7eac4da6bde04a9e1372d446bfa50ac12479730a9092e8396b73434e59663d3'
+        
'f4e912e75c5127897837d67626ba94a418ec408f0f3a9bcd1767633347e107600cc43825caa5737a84362273a353bf03097879ff5b9065663150f6db4b96238a'
+        
'e4fd83e38703d8ff9a714b238296e4e12791b8ce0c19446709e5c20b4012ed10b97504cafda66cdbe12e56a9f943c094147b6a02db3bd9c854e609adca38ff01'
+        
'767f334add0dd0e83b27e198415a2ef8ae3c505aa7f37d12138e37a98dc5575e43f83eb665431464ed488a5bf6b8913cd675eb112dc880cf17ff51511a3f07e6')
+validpgpkeys=('541EA0448453394FF77A0ECC9D9B2BA061D0A67C') # Abhilash Raj 
<[email protected]>
+
+pkgver() {
+  cd $pkgname
+  git describe | sed 's/\([^-]*-g\)/r\1/;s/v//g;s/-/./g'
+}
+
+prepare() {
+  # setting FHS compliant default paths, remove debug options
+  patch -d $pkgname -p1 -i ../$pkgname-1.3.5-settings.patch
+
+  touch $pkgname/settings_local.py
+}
+
+build() {
+  cd $pkgname
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  cd $pkgname
+  export PYTHONPATH="build:$PYTHONPATH"
+  python example_project/manage.py test 
--settings=hyperkitty.tests.settings_test hyperkitty
+}
+
+package() {
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd $pkgname
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  # remove example_project from top level site-packages:
+  # https://gitlab.com/mailman/hyperkitty/issues/279
+  rm -rfv "$pkgdir/$site_packages/example_project/"
+  # remove tests
+  rm -rfv "$pkgdir/$site_packages/$pkgname/tests/"
+
+  # 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-staging-any/hyperkitty-1.3.5-settings.patch 
(from rev 1444995, hyperkitty/trunk/hyperkitty-1.3.5-settings.patch)
===================================================================
--- community-staging-any/hyperkitty-1.3.5-settings.patch                       
        (rev 0)
+++ community-staging-any/hyperkitty-1.3.5-settings.patch       2023-04-12 
18:18:38 UTC (rev 1444996)
@@ -0,0 +1,96 @@
+diff --git i/example_project/settings.py w/example_project/settings.py
+index 6a3af404..a184b08c 100644
+--- i/example_project/settings.py
++++ w/example_project/settings.py
+@@ -9,15 +9,10 @@ For the full list of settings and their values, see
+ https://docs.djangoproject.com/en/1.8/ref/settings/
+ """
+ 
+-# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+-import os
+-
+ # Compatibility with Bootstrap 3
+ from django.contrib.messages import constants as messages  # flake8: noqa
+ 
+ 
+-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
+-
+ # SECURITY WARNING: keep the secret key used in production secret!
+ SECRET_KEY = 'change-this-on-your-production-server'
+ 
+@@ -80,7 +75,7 @@ INSTALLED_APPS = (
+     'allauth.socialaccount.providers.stackexchange',
+ 
+     # Dev only dependencies. Do not include in any production site.
+-    'debug_toolbar',
++    # 'debug_toolbar',
+ )
+ 
+ 
+@@ -88,7 +83,7 @@ MIDDLEWARE = (
+     '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 +129,7 @@ DATABASES = {
+         # 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',
+@@ -205,7 +200,7 @@ USE_TZ = True
+ # 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/";
+@@ -318,7 +313,8 @@ COMPRESS_PRECOMPILERS = (
+ # 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',)
+@@ -330,7 +326,7 @@ INTERNAL_IPS = ('127.0.0.1',)
+ 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
+@@ -386,7 +382,7 @@ LOGGING = {
+             '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',
+         },
+         'console': {
+@@ -444,9 +440,9 @@ CACHES = {
+ # 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-staging-any/hyperkitty-qcluster.service 
(from rev 1444995, hyperkitty/trunk/hyperkitty-qcluster.service)
===================================================================
--- community-staging-any/hyperkitty-qcluster.service                           
(rev 0)
+++ community-staging-any/hyperkitty-qcluster.service   2023-04-12 18:18:38 UTC 
(rev 1444996)
@@ -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-staging-any/hyperkitty.install (from rev 
1444995, hyperkitty/trunk/hyperkitty.install)
===================================================================
--- community-staging-any/hyperkitty.install                            (rev 0)
+++ community-staging-any/hyperkitty.install    2023-04-12 18:18:38 UTC (rev 
1444996)
@@ -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-staging-any/hyperkitty.sysusers (from rev 
1444995, hyperkitty/trunk/hyperkitty.sysusers)
===================================================================
--- community-staging-any/hyperkitty.sysusers                           (rev 0)
+++ community-staging-any/hyperkitty.sysusers   2023-04-12 18:18:38 UTC (rev 
1444996)
@@ -0,0 +1 @@
+u hyperkitty - "GNU Mailman Archiver" -

Copied: hyperkitty/repos/community-staging-any/hyperkitty.tmpfiles (from rev 
1444995, hyperkitty/trunk/hyperkitty.tmpfiles)
===================================================================
--- community-staging-any/hyperkitty.tmpfiles                           (rev 0)
+++ community-staging-any/hyperkitty.tmpfiles   2023-04-12 18:18:38 UTC (rev 
1444996)
@@ -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-staging-any/hyperkitty.uwsgi (from rev 
1444995, hyperkitty/trunk/hyperkitty.uwsgi)
===================================================================
--- community-staging-any/hyperkitty.uwsgi                              (rev 0)
+++ community-staging-any/hyperkitty.uwsgi      2023-04-12 18:18:38 UTC (rev 
1444996)
@@ -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

Reply via email to