Accepting request 1123579 from openSUSE:infrastructure:mailman3

- forgot to use 2 defined variables:
  %{django_haystack_min_version} 
  %{django_extensions_min_version}

- make it easy to run a build without testsuite
  osc build --without=testsuite

- refresh gl-mr300-add-opengraph-metadata.patch for version update

- Add upstream patch gl-mr300-add-opengraph-metadata.patch:
  * Add OpenGraph Metadata (https://gitlab.com/mailman/hyperkitty/-/merge_requests/300)
- Add upstream patch gl-mr470-introduce-feed-filtering.patch:
  * Introduce feed filtering (https://gitlab.com/mailman/hyperkitty/-/merge_requests/470)

OBS-URL: https://build.opensuse.org/request/show/1123579
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:mailman/python-HyperKitty?expand=0&rev=73
This commit is contained in:
Andreas Schneider
2023-11-06 13:53:03 +00:00
committed by Git OBS Bridge
parent 6d791e7c8e
commit 1cb450d3b0
4 changed files with 394 additions and 6 deletions

View File

@@ -0,0 +1,302 @@
# Rewritten from upstream .patch to avoid fuzzing
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/base.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/base.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/base.html
@@ -24,6 +24,11 @@
{% block additional_stylesheets %} {% endblock %}
{% block head_feed %}{% endblock %}
{% include 'hyperkitty/headers.html' %}
+ <meta property="og:site_name" content="{{ site_name }}">
+ {% block additional_og %}{% endblock %}
+ <meta property="og:url" content="{{ request.get_full_path }}">
+ <meta name="twitter:card" content="summary">
+ <meta name="twitter:url" content="{{ request.get_full_path }}">
</head>
<body>
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/errors/notimplemented.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/errors/notimplemented.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/errors/notimplemented.html
@@ -7,6 +7,11 @@
{% trans "Not implemented yet" %} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans "Not implemented yet" %}">
+<meta name="twitter:title" content="{% trans "Not implemented yet" %}">
+{% endblock %}
+
{% block content %}
<h1>{% trans "Not implemented" %}</h1>
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/errors/private.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/errors/private.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/errors/private.html
@@ -7,6 +7,11 @@
{% trans "Error: private list" %} - {{ mlist.display_name|default:mlist.name }} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans "Error: private list" %} - {{ mlist.display_name|default:mlist.name }}">
+<meta name="twitter:title" content="{% trans "Error: private list" %} - {{ mlist.display_name|default:mlist.name }}">
+{% endblock %}
+
{% block content %}
<div class="row">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/index.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/index.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/index.html
@@ -9,6 +9,11 @@
{% trans 'Available lists' %} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans 'Available lists' %}">
+<meta name="twitter:title" content="{% trans 'Available lists' %}">
+{% endblock %}
+
{% block content %}
<div class="all-lists">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/message.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/message.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/message.html
@@ -1,12 +1,29 @@
{% extends "hyperkitty/base.html" %}
{% load i18n %}
{% load hk_generic %}
+{% load gravatar %}
{% block head_title %}
{{ message.subject }} - {{ mlist.display_name|default:mlist.name }} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{{ message.subject }} - {{ mlist.display_name|default:mlist.name }}">
+<meta property="og:type" content="article">
+<meta property="og:image" content="{% gravatar_url message.sender.address 200 %}">
+<meta property="og:description" content="{{ message.content|escapeemail|truncatechars:199 }}…">
+<meta property="og:article:author" content="{{ message.sender_name|default:message.sender.address|escapeemail }}">
+<meta property="og:article:published_time" content="{{ message.date|date:'c' }}">
+<meta property="og:article:section" content="{{ mlist.display_name|default:mlist.name }}">
+{% for tag in message.thread.tags.distinct %}
+<meta property="og:article:tag" content="{{ tag.name }}">
+{% endfor %}
+<meta name="twitter:title" content="{{ message.subject }} - {{ mlist.display_name|default:mlist.name }}">
+<meta name="twitter:description" content="{{ message.content|escapeemail|truncatechars:199 }}…">
+<meta name="twitter:image" content="{% gravatar_url message.sender.address 200 %}">
+{% endblock %}
+
{% block content %}
<div class="row">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/message_new.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/message_new.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/message_new.html
@@ -8,6 +8,11 @@
{% trans "Create a new thread" %} - {{ mlist.display_name|default:mlist.name }} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans "Create a new thread" %} - {{ mlist.display_name|default:mlist.name }}">
+<meta name="twitter:title" content="{% trans "Create a new thread" %} - {{ mlist.display_name|default:mlist.name }}">
+{% endblock %}
+
{% block content %}
<div class="row">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/overview.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/overview.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/overview.html
@@ -4,6 +4,13 @@
{% load static %}
{% load cache %}
+{% block additional_og %}
+<meta property="og:title" content="{{ mlist.display_name|default:mlist.name }}">
+<meta property="og:description" content="{{ mlist.description|default_if_none:''|truncatechars:199 }}…">
+<meta name="twitter:title" content="{{ mlist.display_name|default:mlist.name }}">
+<meta name="twitter:description" content="{{ mlist.description|default_if_none:''|truncatechars:199 }}…">
+{% endblock %}
+
{% block head_title %}
{{ mlist.display_name|default:mlist.name }} - {{ block.super }}
{% endblock %}
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/reattach.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/reattach.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/reattach.html
@@ -9,6 +9,11 @@
{% trans "Reattach a thread" %} - {{ mlist.display_name|default:mlist.name }} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans "Reattach a thread" %} - {{ mlist.display_name|default:mlist.name }}">
+<meta name="twitter:title" content="{% trans "Reattach a thread" %} - {{ mlist.display_name|default:mlist.name }}">
+{% endblock %}
+
{% block content %}
<div class="row reattach-thread">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/search_results.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/search_results.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/search_results.html
@@ -8,6 +8,11 @@
{% trans "Search results for" %} "{{ query }}"{% if mlist %} - {{ mlist.display_name|default:mlist.name }} {% endif %} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans "Search results for" %} "{{ query }}"{% if mlist %} - {{ mlist.display_name|default:mlist.name }} {% endif %}">
+<meta name="twitter:title" content="{% trans "Search results for" %} "{{ query }}"{% if mlist %} - {{ mlist.display_name|default:mlist.name }} {% endif %}">
+{% endblock %}
+
{% block content %}
<div class="row">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/thread.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/thread.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/thread.html
@@ -3,12 +3,29 @@
{% load i18n %}
{% load hk_generic %}
{% load static %}
+{% load gravatar %}
{% block head_title %}
{{ subject }} - {{ mlist.display_name|default:mlist.name }} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{{ subject }} - {{ mlist.display_name|default:mlist.name }}">
+<meta property="og:type" content="article">
+<meta property="og:image" content="{% gravatar_url starting_email.sender.address 200 %}">
+<meta property="og:description" content="{{ starting_email.content|escapeemail|truncatechars:199 }}…">
+<meta property="og:article:author" content="{{ starting_email.sender_name|default:starting_email.sender.address|escapeemail }}">
+<meta property="og:article:published_time" content="{{ starting_email.date|date:'c' }}">
+<meta property="og:article:section" content="{{ mlist.display_name|default:mlist.name }}">
+{% for tag in thread.tags.distinct %}
+<meta property="og:article:tag" content="{{ tag.name }}">
+{% endfor %}
+<meta name="twitter:title" content="{{ subject }} - {{ mlist.display_name|default:mlist.name }}">
+<meta name="twitter:description" content="{{ starting_email.content|escapeemail|truncatechars:199 }}…">
+<meta name="twitter:image" content="{% gravatar_url starting_email.sender.address 200 %}">
+{% endblock %}
+
{% block content %}
<div class="row view-thread d-flex">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/thread_list.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/thread_list.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/thread_list.html
@@ -13,6 +13,13 @@
<link rel="alternate" type="application/rss+xml" title="{{ mlist.display_name }}" href="{% url 'hk_list_feed' mlist_fqdn=mlist.name %}"/>
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{{ list_title }} - {{ mlist.display_name|default:mlist.name }}">
+<meta property="og:description" content="{{ mlist.description|default_if_none:''|truncatechars:199 }}…">
+<meta name="twitter:title" content="{{ list_title }} - {{ mlist.display_name|default:mlist.name }}">
+<meta name="twitter:description" content="{{ mlist.description|default_if_none:''|truncatechars:199 }}…">
+{% endblock %}
+
{% block content %}
<div class="row">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/user_posts.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/user_posts.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/user_posts.html
@@ -8,6 +8,11 @@
{% trans "Messages by" %} {{ fullname }}{% if mlist %} - {{ mlist.display_name|default:mlist.name }} {% endif %} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans "Messages by" %} {{ fullname }}{% if mlist %} - {{ mlist.display_name|default:mlist.name }} {% endif %}">
+<meta name="twitter:title" content="{% trans "Messages by" %} {{ fullname }}{% if mlist %} - {{ mlist.display_name|default:mlist.name }} {% endif %}">
+{% endblock %}
+
{% block content %}
<div class="row">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/user_profile/base.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/user_profile/base.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/user_profile/base.html
@@ -5,6 +5,11 @@
{% trans "User posting activity" %} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans "User posting activity" %}">
+<meta name="twitter:title" content="{% trans "User posting activity" %}">
+{% endblock %}
+
{% block content %}
<div class="user-profile">
Index: HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/user_public_profile.html
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/templates/hyperkitty/user_public_profile.html
+++ HyperKitty-1.3.8/hyperkitty/templates/hyperkitty/user_public_profile.html
@@ -1,12 +1,20 @@
{% extends "hyperkitty/base.html" %}
{% load i18n %}
{% load hk_generic %}
+{% load gravatar %}
{% block head_title %}
{% trans 'User Profile' %} {% trans "for" %} {{ fullname }} - {{ block.super }}
{% endblock %}
+{% block additional_og %}
+<meta property="og:title" content="{% trans 'User Profile' %} {% trans "for" %} {{ fullname }}">
+<meta property="og:image" content="{% gravatar_url addresses.0 200 %}">
+<meta name="twitter:title" content="{% trans 'User Profile' %} {% trans "for" %} {{ fullname }}">
+<meta name="twitter:image" content="{% gravatar_url addresses.0 200 %}">
+{% endblock %}
+
{% block content %}
<div class="user-profile user-public-profile">
Index: HyperKitty-1.3.8/hyperkitty/tests/views/test_accounts.py
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/tests/views/test_accounts.py
+++ HyperKitty-1.3.8/hyperkitty/tests/views/test_accounts.py
@@ -197,7 +197,7 @@ class AccountViewsTestCase(TestCase):
"?list=list@example.com")
self.assertEqual(response.status_code, 200)
self.assertContains(response, "Dummy content", count=1, html=False)
- self.assertContains(response, "Dummy Sender", count=5, html=False)
+ self.assertContains(response, "Dummy Sender", count=7, html=False)
self.assertContains(
response,
'<a name="{}" href="{}">Dummy message</a>'.format(
Index: HyperKitty-1.3.8/hyperkitty/tests/views/test_message.py
===================================================================
--- HyperKitty-1.3.8.orig/hyperkitty/tests/views/test_message.py
+++ HyperKitty-1.3.8/hyperkitty/tests/views/test_message.py
@@ -124,8 +124,8 @@ class MessageViewsTestCase(TestCase):
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
self.assertContains(response, "Dummy message")
- self.assertContains(response, "Dummy Sender", count=1)
- self.assertContains(response, "Dummy Subject", count=2)
+ self.assertContains(response, "Dummy Sender", count=2)
+ self.assertContains(response, "Dummy Subject", count=4)
self.assertNotContains(response, "dummy@example.com")
self.assertContains(
response,

View File

@@ -0,0 +1,51 @@
diff --git a/hyperkitty/feed.py b/hyperkitty/feed.py
index 8242662c2158be7b34527cf933565588892ce25f..a9bd9ae546aa51f717b07b6c270b769e9e8c775f 100644
--- a/hyperkitty/feed.py
+++ b/hyperkitty/feed.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License along with
# HyperKitty. If not, see <http://www.gnu.org/licenses/>.
#
-# Author: Stasiek Michalski <stasiek@michalski.cc>
+# Author: Jacob Michalskie <jacob@michalskie.cc>
#
import re
@@ -43,20 +43,32 @@ def sanitize(x):
class MailingListFeed(Feed):
def get_object(self, request, mlist_fqdn):
- return get_object_or_404(MailingList, name=mlist_fqdn)
+ return {'mlist': get_object_or_404(MailingList, name=mlist_fqdn),
+ 'params': request.GET}
def title(self, obj):
- return sanitize(obj.display_name)
+ return sanitize(obj['mlist'].display_name)
def link(self, obj):
- return reverse("hk_list_overview", kwargs={"mlist_fqdn": obj.name})
+ return reverse("hk_list_overview",
+ kwargs={"mlist_fqdn": obj['mlist'].name})
def description(self, obj):
- return sanitize(obj.description)
+ return sanitize(obj['mlist'].description)
def items(self, obj):
len = getattr(settings, 'HYPERKITTY_MLIST_FEED_LENGTH', 30)
- return Email.objects.filter(mailinglist=obj).order_by('-date')[:len]
+ emails = Email.objects.filter(mailinglist=obj['mlist'])
+ if 'subject' in obj['params']:
+ emails = emails.filter(subject__regex=obj['params']['subject'])
+ if 'sender' in obj['params']:
+ emails = emails.filter(sender_name__regex=obj['params']['email'])
+ if 'threads' in obj['params']:
+ emails = emails.filter(thread_depth=0)
+ if 'limit' in obj['params']:
+ if int(obj['params']['limit']) < len:
+ len = int(obj['params']['limit'])
+ return emails.order_by('-date')[:len]
def item_title(self, item):
return sanitize(item.subject)

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Nov 6 12:05:07 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
- forgot to use 2 defined variables:
%{django_haystack_min_version}
%{django_extensions_min_version}
-------------------------------------------------------------------
Mon Nov 6 11:47:26 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
- make it easy to run a build without testsuite
osc build --without=testsuite
-------------------------------------------------------------------
Mon Nov 6 01:20:05 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
@@ -16,6 +29,11 @@ Mon Nov 6 00:05:35 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
early when the version of other libraries do not match the
requires encoded in the source code.
-------------------------------------------------------------------
Sun Nov 5 23:32:56 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
- refresh gl-mr300-add-opengraph-metadata.patch for version update
-------------------------------------------------------------------
Thu Nov 2 09:27:37 UTC 2023 - Andreas Schneider <asn@cryptomilk.org>
@@ -30,6 +48,14 @@ Thu Oct 5 08:21:08 UTC 2023 - Markéta Machová <mmachova@suse.com>
- Add mistune3.patch to fix compatibility with mistune 3.0
-------------------------------------------------------------------
Sun Jul 30 03:50:42 UTC 2023 - Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
- Add upstream patch gl-mr300-add-opengraph-metadata.patch:
* Add OpenGraph Metadata (https://gitlab.com/mailman/hyperkitty/-/merge_requests/300)
- Add upstream patch gl-mr470-introduce-feed-filtering.patch:
* Introduce feed filtering (https://gitlab.com/mailman/hyperkitty/-/merge_requests/470)
-------------------------------------------------------------------
Thu Jul 6 09:33:42 UTC 2023 - Andreas Schneider <asn@cryptomilk.org>

View File

@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without testsuite
# keep in sync with setup.py
%global django_min_version 3.2
%global django_max_version 4.3
@@ -34,7 +36,6 @@
%global flufl_lock_min_version 4.0
%global django_q_min_version 1.0.0
%{?sle15_python_module_pythons}
%global webapps_dir /srv/www/webapps
@@ -51,6 +52,7 @@
%global hyperkitty_services hyperkitty-qcluster.service hyperkitty-runjob-daily.service hyperkitty-runjob-daily.timer hyperkitty-runjob-hourly.service hyperkitty-runjob-hourly.timer hyperkitty-runjob-minutely.service hyperkitty-runjob-minutely.timer hyperkitty-runjob-monthly.service hyperkitty-runjob-monthly.timer hyperkitty-runjob-quarter-hourly.service hyperkitty-runjob-quarter-hourly.timer hyperkitty-runjob-weekly.service hyperkitty-runjob-weekly.timer hyperkitty-runjob-yearly.service hyperkitty-runjob-yearly.timer
# keep in sync with python-mailman-web/python-postorious
%if 0%{?suse_version} >= 1550
# Newest python supported by mailman is Python 3.11
%define pythons python311
@@ -90,11 +92,16 @@ Patch0: hyperkitty-settings.patch
# PATCH-FIX-UPSTREAM mistune3.patch gl#mailman/hyperkitty#541
Patch2: mistune3.patch
#
BuildRequires: %{python_module Django >= %{django_min_version}}
# PATCH-FIX-UPSTREAM gl-mr300-add-opengraph-metadata.patch gl#mailman/hyperkitty#300
Patch98: gl-mr300-add-opengraph-metadata.patch
# PATCH-FIX-UPSTREAM gl-mr470-introduce-feed-filtering.patch gl#mailman/hyperkitty#470
Patch99: gl-mr470-introduce-feed-filtering.patch
#
BuildRequires: %{python_module Django >= %{django_min_version} with %python-Django < %{django_max_version}}
BuildRequires: %{python_module django-compressor >= %{django_compressor_min_version}}
BuildRequires: %{python_module Whoosh}
BuildRequires: %{python_module django-debug-toolbar >= 2.2}
BuildRequires: %{python_module django-extensions >= 1.3.7}
BuildRequires: %{python_module django-extensions >= %{django_extensions_min_version}}
BuildRequires: %{python_module django-gravatar2 >= %{django_gravatar2_min_version}}
BuildRequires: %{python_module isort}
BuildRequires: %{python_module mailmanclient >= %{mailmanclient_min_version}}
@@ -116,7 +123,7 @@ BuildRequires: python3-packaging
# SECTION test requirements
BuildRequires: %{python_module Whoosh >= 2.5.7}
BuildRequires: %{python_module beautifulsoup4 >= 4.3.2}
BuildRequires: %{python_module django-haystack >= 2.8.0}
BuildRequires: %{python_module django-haystack >= %{django_haystack_min_version}}
BuildRequires: %{python_module django-mailman3 >= %{django_mailman3_min_version}}
BuildRequires: %{python_module django-q >= %{django_q_min_version}}
BuildRequires: %{python_module djangorestframework >= %{djangorestframework_min_version}}
@@ -141,7 +148,7 @@ Summary: A web interface to access GNU Mailman v3 archives
Requires: (%{mypython}-Django >= %{django_min_version} with %{mypython}-Django < %{django_max_version})
Requires: %{mypython}-django-compressor >= %{django_compressor_min_version}
Requires: %{mypython}-django-debug-toolbar >= 2.2
Requires: %{mypython}-django-extensions >= 1.3.7
Requires: %{mypython}-django-extensions >= %{django_extensions_min_version}
Requires: %{mypython}-django-gravatar2 >= %{django_gravatar2_min_version}
Requires: %{mypython}-django-haystack >= 2.8.0
Requires: %{mypython}-django-mailman3 >= %{django_mailman3_min_version}
@@ -154,7 +161,7 @@ Requires: %{mypython}-networkx >= %{networkx_min_version}
Requires: %{mypython}-python-dateutil >= %{python_dateutil_min_version}
Requires: %{mypython}-pytz >= %{pytz_min_version}
Requires: %{mypython}-robot-detection >= %{robot_detection_min_version}
Requires: %{mypython}-xapian-haystack >= 2.1.0
Requires: %{mypython}-xapian-haystack >= %{django_haystack_min_version}
%if "%{expand:%%%{mypython}_provides}" == "python3"
Provides: python3-%{hyperkitty_pkgname} = %{version}-%{release}
%endif
@@ -308,10 +315,12 @@ for job in \
sed -i "s#@HYPERKITTY_RUNJOB@#${hyperkitty_runjob_name}#g" %{buildroot}%{_unitdir}/hyperkitty-runjob-${job}.timer
done
%if %{with testuite}
%check
export PYTHONPATH="$(pwd)"
export LANG=C.UTF-8
%pytest
%endif
%pre -n %{hyperkitty_pkgname}-web
/usr/sbin/groupadd -r hyperkitty || :