Accepting request 628047 from home:ippolitov:branches:server:mail
- updated version to 1.7.8
https://github.com/vstakhov/rspamd/releases/tag/1.7.9
- patch included to fix lua builds on i586
66ffcdfa88
.patch
- 2338.patch is removed: included in the upstream tarball
OBS-URL: https://build.opensuse.org/request/show/628047
OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=21
This commit is contained in:
parent
165abf0980
commit
f92850d1d0
23
2338.patch
23
2338.patch
@ -1,23 +0,0 @@
|
||||
From 58f2b7c2beec64d543d62b94f57efe304f68bb75 Mon Sep 17 00:00:00 2001
|
||||
From: Igor Ippolitov <iippolitov@gmail.com>
|
||||
Date: Thu, 12 Jul 2018 16:32:51 +0300
|
||||
Subject: [PATCH] fix email address parsing: ebraces should increase till
|
||||
matched with obraces
|
||||
|
||||
---
|
||||
src/libmime/email_addr.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c
|
||||
index a0ad9ac19..50c293b35 100644
|
||||
--- a/src/libmime/email_addr.c
|
||||
+++ b/src/libmime/email_addr.c
|
||||
@@ -372,7 +372,7 @@ rspamd_email_address_from_mime (rspamd_mempool_t *pool,
|
||||
obraces ++;
|
||||
}
|
||||
else if (*p == ')') {
|
||||
- ebraces --;
|
||||
+ ebraces ++;
|
||||
}
|
||||
|
||||
if (obraces == ebraces) {
|
72
66ffcdfa880daeb3b50c7ef3bcb5511abb6d92f6.patch
Normal file
72
66ffcdfa880daeb3b50c7ef3bcb5511abb6d92f6.patch
Normal file
@ -0,0 +1,72 @@
|
||||
--- a/src/lua/lua_task.c
|
||||
+++ b/src/lua/lua_task.c
|
||||
@@ -1244,6 +1244,16 @@ lua_task_unmap_dtor (gpointer p)
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+lua_task_free_dtor (gpointer p)
|
||||
+{
|
||||
+ struct rspamd_task *task = (struct rspamd_task *)p;
|
||||
+
|
||||
+ if (task->msg.begin) {
|
||||
+ g_free ((gpointer)task->msg.begin);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static gint
|
||||
lua_task_load_from_file (lua_State * L)
|
||||
{
|
||||
@@ -1306,10 +1316,11 @@ static gint
|
||||
lua_task_load_from_string (lua_State * L)
|
||||
{
|
||||
struct rspamd_task *task = NULL, **ptask;
|
||||
- const gchar *str_message = luaL_checkstring (L, 1), *err = NULL;
|
||||
- gsize message_len = lua_strlen (L, 1);
|
||||
+ const gchar *str_message;
|
||||
+ gsize message_len;
|
||||
struct rspamd_config *cfg = NULL;
|
||||
- gboolean res = FALSE;
|
||||
+
|
||||
+ str_message = luaL_checklstring (L, 1, &message_len);
|
||||
|
||||
if (str_message) {
|
||||
|
||||
@@ -1323,31 +1334,19 @@ lua_task_load_from_string (lua_State * L)
|
||||
}
|
||||
|
||||
task = rspamd_task_new (NULL, cfg, NULL, NULL);
|
||||
- task->msg.begin = str_message;
|
||||
+ task->msg.begin = g_strdup (str_message);
|
||||
task->msg.len = message_len;
|
||||
- rspamd_mempool_add_destructor (task->task_pool,
|
||||
- lua_task_unmap_dtor, task);
|
||||
- res = TRUE;
|
||||
+ rspamd_mempool_add_destructor (task->task_pool, lua_task_free_dtor, task);
|
||||
}
|
||||
else {
|
||||
return luaL_error (L, "invalid arguments");
|
||||
}
|
||||
|
||||
- lua_pushboolean (L, res);
|
||||
+ lua_pushboolean (L, true);
|
||||
|
||||
- if (res) {
|
||||
- ptask = lua_newuserdata (L, sizeof (*ptask));
|
||||
- *ptask = task;
|
||||
- rspamd_lua_setclass (L, "rspamd{task}", -1);
|
||||
- }
|
||||
- else {
|
||||
- if (err) {
|
||||
- lua_pushstring (L, err);
|
||||
- }
|
||||
- else {
|
||||
- lua_pushnil (L);
|
||||
- }
|
||||
- }
|
||||
+ ptask = lua_newuserdata (L, sizeof (*ptask));
|
||||
+ *ptask = task;
|
||||
+ rspamd_lua_setclass (L, "rspamd{task}", -1);
|
||||
|
||||
return 2;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d8ce172fbe4c2e0cb4fedfc3c38bb92710de40f2e8659fb7445d03d558229af5
|
||||
size 4542955
|
3
rspamd-1.7.9.tar.gz
Normal file
3
rspamd-1.7.9.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:03ef95df43709f1a48542e182ca3885c5fe5258d704fb1ac9fd9856fb2ec1846
|
||||
size 4700782
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 8 08:09:26 UTC 2018 - iippolitov@gmail.com
|
||||
|
||||
- updated version to 1.7.8
|
||||
https://github.com/vstakhov/rspamd/releases/tag/1.7.9
|
||||
- patch included to fix lua builds on i586
|
||||
https://github.com/vstakhov/rspamd/commit/66ffcdfa880daeb3b50c7ef3bcb5511abb6d92f6.patch
|
||||
- 2338.patch is removed: included in the upstream tarball
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 13 16:42:32 UTC 2018 - mrueckert@suse.de
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
%global _wwwdir /srv/www/webapps
|
||||
|
||||
Name: rspamd
|
||||
Version: 1.7.8
|
||||
Version: 1.7.9
|
||||
Release: 0
|
||||
License: Apache-2.0
|
||||
Summary: Spam filtering system
|
||||
@ -85,7 +85,7 @@ Url: https://rspamd.com/
|
||||
Group: Productivity/Networking/Email/Utilities
|
||||
Source0: https://github.com/vstakhov/rspamd/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: rspamd.conf
|
||||
Patch: https://github.com/vstakhov/rspamd/pull/2338.patch
|
||||
Patch0: 66ffcdfa880daeb3b50c7ef3bcb5511abb6d92f6.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: curl-devel
|
||||
@ -151,6 +151,7 @@ simultaneously and has a number of features available.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
@ -392,6 +393,7 @@ install -p -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/rspamd/
|
||||
%config(noreplace) %{_sysconfdir}/rspamd/modules.d/redis.conf
|
||||
%config(noreplace) %{_sysconfdir}/rspamd/modules.d/regexp.conf
|
||||
%config(noreplace) %{_sysconfdir}/rspamd/modules.d/replies.conf
|
||||
%config(noreplace) %{_sysconfdir}/rspamd/modules.d/reputation.conf
|
||||
%config(noreplace) %{_sysconfdir}/rspamd/modules.d/milter_headers.conf
|
||||
%config(noreplace) %{_sysconfdir}/rspamd/modules.d/rspamd_update.conf
|
||||
%config(noreplace) %{_sysconfdir}/rspamd/modules.d/spamassassin.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user