Sunday, April 24, 2022

Update mail/dovecot-fts-xapian to 1.5.5 to fix segfault in 7.1

Hey,

The plugin API of dovecot apparently changed in 2.3.17. Because of this,
the version of dovecot-fts-xapian in 7.1 is broken and will crash
whenever invoked.

Diff to update the plugin to the latest version follows. I'm running
this on my backup MX that I upgraded to 7.1 to test, and I no longer get
crashes when receiving mail or replicating mail to it.

(please CC me, I'm not subscribed to ports@)

Thanks

Index: mail/dovecot-fts-xapian/Makefile
===================================================================
RCS file: /cvs/ports/mail/dovecot-fts-xapian/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- mail/dovecot-fts-xapian/Makefile 11 Mar 2022 19:34:35 -0000 1.13
+++ mail/dovecot-fts-xapian/Makefile 24 Apr 2022 11:32:12 -0000
@@ -2,8 +2,7 @@ COMMENT= full text search plugin for Do

GH_ACCOUNT= grosjo
GH_PROJECT= fts-xapian
-GH_TAGNAME= 1.4.8
-REVISION= 2
+GH_TAGNAME= 1.5.5

PKGNAME= dovecot-${DISTNAME}

Index: mail/dovecot-fts-xapian/distinfo
===================================================================
RCS file: /cvs/ports/mail/dovecot-fts-xapian/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- mail/dovecot-fts-xapian/distinfo 26 Mar 2021 10:24:32 -0000 1.6
+++ mail/dovecot-fts-xapian/distinfo 24 Apr 2022 11:32:12 -0000
@@ -1,2 +1,2 @@
-SHA256 (fts-xapian-1.4.8.tar.gz) = VHzIdCXFnV+7O3+BEg8L0B3Wx4rSNNPXUMAvQhgE43Q=
-SIZE (fts-xapian-1.4.8.tar.gz) = 29381
+SHA256 (fts-xapian-1.5.5.tar.gz) = AqnOaVC4HNMMw+tuPd6Ab+GD/VArjrCXSh5UxCUMBCk=
+SIZE (fts-xapian-1.5.5.tar.gz) = 33228
Index: mail/dovecot-fts-xapian/patches/patch-src_fts-backend-xapian-functions_cpp
===================================================================
RCS file: mail/dovecot-fts-xapian/patches/patch-src_fts-backend-xapian-functions_cpp
diff -N mail/dovecot-fts-xapian/patches/patch-src_fts-backend-xapian-functions_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ mail/dovecot-fts-xapian/patches/patch-src_fts-backend-xapian-functions_cpp 24 Apr 2022 11:32:12 -0000
@@ -0,0 +1,28 @@
+Index: src/fts-backend-xapian-functions.cpp
+--- src/fts-backend-xapian-functions.cpp.orig
++++ src/fts-backend-xapian-functions.cpp
+@@ -506,10 +506,15 @@ static long fts_backend_xapian_current_time()
+ static long fts_backend_xapian_get_free_memory() // KB
+ {
+ struct rlimit rl;
++
++#if !defined(__OpenBSD__)
+ getrlimit(RLIMIT_AS,&rl);
+
+ long limit = rl.rlim_cur / 1024.0;
+ if(fts_xapian_settings.verbose>1) i_warning("FTS Xapian: RLIM AS =%ld",limit);
++#else
++ long limit = 0;
++

No comments:

Post a Comment