Enable jmap support again (rhbz#1940012)

This commit is contained in:
Martin Osvald 2023-12-10 18:41:21 +01:00
parent f318097aba
commit 9c6f263a28
4 changed files with 47 additions and 3 deletions

View File

@ -10,7 +10,7 @@
Name: cyrus-imapd Name: cyrus-imapd
Version: 3.8.1 Version: 3.8.1
Release: 3%{?dist} Release: 4%{?dist}
%define ssl_pem_file_prefix /etc/pki/%name/%name %define ssl_pem_file_prefix /etc/pki/%name/%name
@ -60,6 +60,10 @@ Source92: patch-cassandane-fix-annotator
# try to get fixed the below upstream to work on Fedora: # try to get fixed the below upstream to work on Fedora:
# https://github.com/cyrusimap/cyrus-imapd/commit/f10eee167313418d84e63d215310477d4fe68e94 # https://github.com/cyrusimap/cyrus-imapd/commit/f10eee167313418d84e63d215310477d4fe68e94
Source93: patch-cassandane-xapian-delve-path Source93: patch-cassandane-xapian-delve-path
# Syslog depending tests started to fail after perl fix:
# https://github.com/Perl/perl5/commit/80c1f1e45e8ef8c27d170fae7ade41971fe20218
# https://github.com/Perl/perl5/issues/21240
Source94: patch-cassandane-getsyslog-fix
# Adapt a timeout to handle our slower builders # Adapt a timeout to handle our slower builders
Patch0: patch-cyrus-testsuite-timeout Patch0: patch-cyrus-testsuite-timeout
@ -83,6 +87,7 @@ Patch5: patch-cyrus-rename-imtest
Patch6: patch-cyrus-pcre2 Patch6: patch-cyrus-pcre2
# Fix build with libxml2 2.12.0 # Fix build with libxml2 2.12.0
# https://github.com/cyrusimap/cyrus-imapd/pull/4745 # https://github.com/cyrusimap/cyrus-imapd/pull/4745
# https://github.com/cyrusimap/cyrus-imapd/pull/4768
Patch7: patch-cyrus-libxml212 Patch7: patch-cyrus-libxml212
BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en
@ -144,6 +149,7 @@ BuildRequires: perl(Net::LDAP::Server)
BuildRequires: perl(Module::Load::Conditional) BuildRequires: perl(Module::Load::Conditional)
BuildRequires: cpan cld2-devel BuildRequires: cpan cld2-devel
BuildRequires: perl(Plack::Loader) perl(Test::TCP) perl(Data::GUID) perl(Digest::CRC) perl(Moo) perl(Types::Standard) BuildRequires: perl(Plack::Loader) perl(Test::TCP) perl(Data::GUID) perl(Digest::CRC) perl(Moo) perl(Types::Standard)
BuildRequires: perl(DBD::SQLite)
# These were only for JMAP-Tester # These were only for JMAP-Tester
# perl(Moo), perl(Moose), perl(MooseX::Role::Parameterized) perl(Throwable), perl(Safe::Isa) # perl(Moo), perl(Moose), perl(MooseX::Role::Parameterized) perl(Throwable), perl(Safe::Isa)
@ -252,6 +258,7 @@ tar xf %SOURCE80
patch -p1 < %SOURCE91 patch -p1 < %SOURCE91
patch -p1 < %SOURCE92 patch -p1 < %SOURCE92
patch -p1 < %SOURCE93 patch -p1 < %SOURCE93
patch -p1 < %SOURCE94
cp %SOURCE81 cassandane.ini cp %SOURCE81 cassandane.ini
# RF rpm-buildroot-usage # RF rpm-buildroot-usage
@ -352,6 +359,7 @@ autoreconf -vi
--enable-http \ --enable-http \
--enable-idled \ --enable-idled \
--enable-murder \ --enable-murder \
--enable-jmap \
--enable-nntp \ --enable-nntp \
--enable-replication \ --enable-replication \
--enable-unit-tests \ --enable-unit-tests \
@ -591,7 +599,7 @@ exclude+=("!Master.maxforkrate")
%endif %endif
# Add -vvv for too much output # Add -vvv for too much output
./testrunner.pl %{?_smp_mflags} -v -f pretty ${exclude[@]} 2>&1 sudo -u cyrus LD_LIBRARY_PATH=%buildroot/%_libdir ./testrunner.pl %{?_smp_mflags} -v -f pretty ${exclude[@]} 2>&1
%pre %pre
%sysusers_create_compat %{SOURCE19} %sysusers_create_compat %{SOURCE19}
@ -821,6 +829,9 @@ exclude+=("!Master.maxforkrate")
%{_mandir}/man3/Cyrus::SIEVE::managesieve.3pm* %{_mandir}/man3/Cyrus::SIEVE::managesieve.3pm*
%changelog %changelog
* Fri Dec 08 2023 Martin Osvald <mosvald@redhat.com> - 3.8.1-4
- Enable jmap support again (rhbz#1940012)
* Thu Nov 16 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.8.1-3 * Thu Nov 16 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.8.1-3
- Use pcre2posix instead of the deprecated pcreposix (rhbz#2128286) - Use pcre2posix instead of the deprecated pcreposix (rhbz#2128286)
- Fix build with libxml2 2.12.0 (rhbz#2251888) - Fix build with libxml2 2.12.0 (rhbz#2251888)

View File

@ -0,0 +1,20 @@
diff --git a/cassandane/Cassandane/Instance.pm b/cassandane/Cassandane/Instance.pm
index a2dc672..cc29490 100644
--- a/Cassandane/Instance.pm
+++ b/Cassandane/Instance.pm
@@ -2250,6 +2250,15 @@ sub getsyslog
my ($self) = @_;
my $logname = $self->{name};
if ($self->{have_syslog_replacement} && $self->{_syslogfh}) {
+ # https://github.com/Perl/perl5/issues/21240
+ # eof status is no longer cleared automatically in newer perls
+ if ($self->{_syslogfh}->eof()) {
+ $self->{_syslogfh}->clearerr();
+ }
+ if ($self->{_syslogfh}->error()) {
+ die "error reading $self->{syslog_fname}";
+ }
+
# hopefully unobtrusively, let busy log finish writing
usleep(100_000); # 100ms (0.1s) as us
my @lines = grep { m/$logname/ } $self->{_syslogfh}->getlines();

View File

@ -44,7 +44,7 @@ index 95b54e9..3935b77 100644
-# Allowed values: caldav, carddav, domainkey, ischedule, rss -# Allowed values: caldav, carddav, domainkey, ischedule, rss
-httpmodules: caldav carddav -httpmodules: caldav carddav
+# Fedora default: enable all modules besides admin and tzdist +# Fedora default: enable all modules besides admin and tzdist
+httpmodules: caldav carddav domainkey freebusy ischedule rss webdav +httpmodules: caldav carddav domainkey freebusy ischedule jmap rss webdav
# If enabled, the partitions will also be hashed, in addition to the # If enabled, the partitions will also be hashed, in addition to the
# hashing done on configuration directories. This is recommended if one # hashing done on configuration directories. This is recommended if one

View File

@ -87,3 +87,16 @@ index 1f43d75488..cc749ab439 100644
#include <libxml/tree.h> #include <libxml/tree.h>
#include "httpd.h" #include "httpd.h"
diff --git a/imap/jmap_calendar.c b/imap/jmap_calendar.c
index b60470e..553ef1c 100644
--- a/imap/jmap_calendar.c
+++ b/imap/jmap_calendar.c
@@ -52,6 +52,8 @@
#include <unistd.h>
#endif
+#include <libxml/parser.h>
+
#include "acl.h"
#include "annotate.h"
#include "append.h"