+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 %}
++
+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,
+ '
Dummy message'.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,
diff --git a/gl-mr470-introduce-feed-filtering.patch b/gl-mr470-introduce-feed-filtering.patch
new file mode 100644
index 0000000..8be481d
--- /dev/null
+++ b/gl-mr470-introduce-feed-filtering.patch
@@ -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
.
+ #
+-# Author: Stasiek Michalski
++# Author: Jacob Michalskie
+ #
+ 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)
diff --git a/python-HyperKitty.changes b/python-HyperKitty.changes
index ea1abe4..b961211 100644
--- a/python-HyperKitty.changes
+++ b/python-HyperKitty.changes
@@ -1,3 +1,16 @@
+-------------------------------------------------------------------
+Mon Nov 6 12:05:07 UTC 2023 - Marcus Rueckert
+
+- forgot to use 2 defined variables:
+ %{django_haystack_min_version}
+ %{django_extensions_min_version}
+
+-------------------------------------------------------------------
+Mon Nov 6 11:47:26 UTC 2023 - Marcus Rueckert
+
+- make it easy to run a build without testsuite
+ osc build --without=testsuite
+
-------------------------------------------------------------------
Mon Nov 6 01:20:05 UTC 2023 - Marcus Rueckert
@@ -16,6 +29,11 @@ Mon Nov 6 00:05:35 UTC 2023 - Marcus Rueckert
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
+
+- refresh gl-mr300-add-opengraph-metadata.patch for version update
+
-------------------------------------------------------------------
Thu Nov 2 09:27:37 UTC 2023 - Andreas Schneider
@@ -30,6 +48,14 @@ Thu Oct 5 08:21:08 UTC 2023 - Markéta Machová
- Add mistune3.patch to fix compatibility with mistune 3.0
+-------------------------------------------------------------------
+Sun Jul 30 03:50:42 UTC 2023 - Georg Pfuetzenreuter
+
+- 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
diff --git a/python-HyperKitty.spec b/python-HyperKitty.spec
index 4b1a323..4913fd7 100644
--- a/python-HyperKitty.spec
+++ b/python-HyperKitty.spec
@@ -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 || :