- update to 2.1

https://rspamd.com/announce/2019/10/28/rspamd-2.1.html
- dropped rspamd-fix-crash-on-startup.patch

OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=34
This commit is contained in:
Marcus Rückert 2019-10-28 16:58:16 +00:00 committed by Git OBS Bridge
parent 818b9a810b
commit 4a82ad1a9e
5 changed files with 11 additions and 74 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:88d90c874f4256de64621b3697630c530cadc9a5194652d7ab67a9f075defe7b
size 4230761

3
rspamd-2.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b3180b5d44dd808df09dc118b73c467991f6f71e422850bc591382835f3efcc
size 4232297

View File

@ -1,68 +0,0 @@
From 42a4b088c79eb86aa44cd44ce7d19c862e5289b9 Mon Sep 17 00:00:00 2001
From: Vsevolod Stakhov <vsevolod@highsecure.ru>
Date: Sat, 12 Oct 2019 09:53:08 +0100
Subject: [PATCH] [Fix] Fix crash due to constructors init order
Issue: #3079
---
src/libutil/mem_pool.c | 5 +++--
src/lua/lua_regexp.c | 10 +++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c
index 703337663..c01ce0c2c 100644
--- a/src/libutil/mem_pool.c
+++ b/src/libutil/mem_pool.c
@@ -111,7 +111,7 @@ pool_chain_free (struct _pool_chain *chain)
chain->slice_size - occupied : 0);
}
-/* By default allocate 8Kb chunks of memory */
+/* By default allocate 4Kb chunks of memory */
#define FIXED_POOL_SIZE 4096
static inline struct rspamd_mempool_entry_point *
@@ -156,6 +156,7 @@ RSPAMD_DESTRUCTOR (rspamd_mempool_entries_dtor)
});
kh_destroy (mempool_entry, mempool_entries);
+ mempool_entries = NULL;
}
static inline struct rspamd_mempool_entry_point *
@@ -676,7 +677,7 @@ rspamd_mempool_delete (rspamd_mempool_t * pool)
cur = pool->pools[RSPAMD_MEMPOOL_NORMAL];
}
- if (cur) {
+ if (cur && mempool_entries) {
pool->entry->elts[pool->entry->cur_elts].leftover =
pool_chain_free (cur);
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c
index ae1f2007a..764bb6de1 100644
--- a/src/lua/lua_regexp.c
+++ b/src/lua/lua_regexp.c
@@ -889,16 +889,16 @@ lua_load_regexp (lua_State * L)
void
luaopen_regexp (lua_State * L)
{
+ if (!regexp_static_pool) {
+ regexp_static_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (),
+ "regexp_lua_pool");
+ }
+
rspamd_lua_new_class (L, "rspamd{regexp}", regexplib_m);
lua_pop (L, 1);
rspamd_lua_add_preload (L, "rspamd_regexp", lua_load_regexp);
}
-RSPAMD_CONSTRUCTOR (lua_re_static_pool_ctor) {
- regexp_static_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (),
- "regexp_lua_pool");
-}
-
RSPAMD_DESTRUCTOR (lua_re_static_pool_dtor) {
rspamd_mempool_delete (regexp_static_pool);
}
\ No newline at end of file

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Oct 28 16:52:41 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
- update to 2.1
https://rspamd.com/announce/2019/10/28/rspamd-2.1.html
- dropped rspamd-fix-crash-on-startup.patch
-------------------------------------------------------------------
Sun Oct 13 20:30:34 UTC 2019 - Wolfgang Rosenauer <wr@rosenauer.org>

View File

@ -51,7 +51,7 @@
%global _wwwdir /srv/www/webapps
Name: rspamd
Version: 2.0
Version: 2.1
Release: 0
License: Apache-2.0
Summary: Spam filtering system
@ -60,7 +60,6 @@ Group: Productivity/Networking/Email/Utilities
Source0: https://github.com/rspamd/rspamd/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: rspamd-conf.patch
Patch1: rspamd-after-redis-target.patch
Patch2: rspamd-fix-crash-on-startup.patch
BuildRequires: cmake
BuildRequires: curl-devel
BuildRequires: db-devel
@ -150,7 +149,6 @@ This package holds the client tools (rspamc and rspamadm)
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%cmake \