[Pkg-mailman-hackers] Bug#1037358: mailman3-web: Upgrade from Debian 11 to Debian 12 broke mailman/mailman3-web
Norbert Preining
norbert at preining.info
Mon Jun 12 05:32:02 BST 2023
Package: mailman3-web
Version: 0+20200530-2.1
Severity: important
Dear Maintainer,
With the upgrade from Debian 11 to Debian 12 a lot of problems popped up
around mailman/web:
- /etc/mailman/mailman-web.py needs updates:
# Updates require this, should already be in Debian's package, but isn't
# See https://gitlab.com/mailman/hyperkitty/-/issues/401
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
# /usr/lib/python3/dist-packages/django_q/conf.py contains
# conf.py: TIMEOUT = conf.get("timeout", None)
# conf.py: RETRY = conf.get("retry", 60)
# which is broken
Q_CLUSTER = {
'timeout': 300,
'save_limit': 100,
'orm': 'default',
'retry': 360,
}
since these values are not taken into the Debian packages, although they
are necessary
- /etc/cron.d/mailman3 contains a call to gatenews which triggers errors
and probalby should not be called in the cron script
- even with the above changes, the hourly run job fails (that is actually
a serious bug!)
/usr/lib/python3/dist-packages/whoosh/codec/whoosh3.py:1116: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif fixedsize is 0:
[ERROR/MainProcess] Failed indexing 1 - 1 (retry 5/5): no such column: hyperkitty_mailinglist.archive_rendering_mode (pid 4974): no such column:
hyperkitty_mailinglist.archive_rendering_mode
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 173, in __get__
rel_obj = self.field.get_cached_value(instance)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
return instance._state.fields_cache[cache_name]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'mailinglist'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: no such column: hyperkitty_mailinglist.archive_rendering_mode
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/haystack/management/commands/update_index.py", line 119, in do_update
backend.update(index, current_qs, commit=commit)
File "/usr/lib/python3/dist-packages/haystack/backends/whoosh_backend.py", line 258, in update
doc = index.full_prepare(obj)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/haystack/indexes.py", line 235, in full_prepare
self.prepared_data = self.prepare(obj)
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/haystack/indexes.py", line 226, in prepare
self.prepared_data[field.index_fieldname] = field.prepare(obj)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/haystack/fields.py", line 236, in prepare
return self.convert(super().prepare(obj))
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/haystack/fields.py", line 105, in prepare
values = self.resolve_attributes_lookup(current_objects, attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/haystack/fields.py", line 125, in resolve_attributes_lookup
if not hasattr(current_object, attributes[0]):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 187, in __get__
rel_obj = self.get_object(instance)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/models/fields/related_descriptors.py", line 154, in get_object
return qs.get(self.field.get_reverse_related_filter(instance))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 431, in get
num = len(clone)
^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 262, in __len__
self._fetch_all()
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 51, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 79, in _execute
with self.db.wrap_database_errors:
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: no such column: hyperkitty_mailinglist.archive_rendering_mode
How should all this be fixed?
Thanks
-- System Information:
Debian Release: 12.0
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-9-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mailman3-web depends on:
ii dbconfig-no-thanks 2.0.24
ii debconf [debconf-2.0] 1.5.82
ii init-system-helpers 1.65.2
ii lsb-base 11.6
ii python3 3.11.2-1+b1
ii python3-django-hyperkitty 1.3.7-1
ii python3-django-postorius 1.3.8-3
ii python3-psycopg2 2.9.5-1+b1
ii python3-whoosh 2.7.4+git6-g9134ad92-7
ii sysvinit-utils [lsb-base] 3.06-4
ii ucf 3.0043+nmu1
ii uwsgi-core 2.0.21-5.1
ii uwsgi-plugin-python3 2.0.21-5.1
Versions of packages mailman3-web recommends:
ii libapache2-mod-proxy-uwsgi 2.4.57-2
Versions of packages mailman3-web suggests:
ii mariadb-server [virtual-mysql-server] 1:10.11.3-1
-- Configuration Files:
/etc/mailman3/apache.conf changed:
Alias /mailman3/favicon.ico /var/lib/mailman3/web/static/postorius/img/favicon.ico
Alias /mailman3/static /var/lib/mailman3/web/static
<Directory "/var/lib/mailman3/web/static">
Require all granted
</Directory>
<IfModule mod_proxy_uwsgi.c>
ProxyPass /mailman3/favicon.ico !
ProxyPass /mailman3/static !
ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost
</IfModule>
-- debconf information:
mailman3-web/superuser-name: admin
mailman3-web/configure-webserver: none
mailman3-web/restart-webserver: true
mailman3-web/nginx-choice:
mailman3-web/emailname: preining.info
mailman3-web/superuser-mail: root at localhost
More information about the Pkg-mailman-hackers
mailing list