Peter Wu [Sat, 18 Jan 2020 20:48:28 +0000 (20:48 +0000)]
[Minor] Debian: remove unnecessary packages
dh-systemd is a transitional package and moved into debhelper, so remove
it. This is supported since Debian Stretch. This change has to be
reversed if Debian Jessie or Ubuntu Xenial have to be supported.
Peter Wu [Sat, 18 Jan 2020 18:06:55 +0000 (18:06 +0000)]
[Minor] Debian: Enable Hyperscan and parallel builds
Debian 9 (Stretch) ships with Hyperscan 4.4.1, Ubuntu 18.04 ships with
Hyperscan 4.7.0. Follow rspamd's official recommendation and enable
support for these.
The --parallel option has been supported since 2009 and works perfectly
with CMake, so enable it by default.
Peter Wu [Sat, 18 Jan 2020 16:26:39 +0000 (16:26 +0000)]
[Minor] Simplify creation of dist tarball that is reproducible
Instead of archiving files from the working tree, distribute files as
committed. Use the 'git archive' command to achieve this, it results in
a reproducible tarball with the same timestamp as the latest commit.
[Minor] do not pass invalid C warnings to C++ flags
cc1plus: warning: command line option ‘-Wno-pointer-sign’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
[74/340] Building C object contrib/lua-lpeg/CMakeFiles/rspamd-lpeg.dir/lpprint.c.o
In file included from ../contrib/lua-lpeg/lpprint.c:11:
../contrib/lua-lpeg/lptypes.h:15: warning: "NDEBUG" redefined
15 | #define NDEBUG
|
<command-line>: note: this is the location of the previous definition
[75/340] Building C object contrib/lua-lpeg/CMakeFiles/rspamd-lpeg.dir/lpcap.c.o
In file included from ../contrib/lua-lpeg/lpcap.h:9,
from ../contrib/lua-lpeg/lpcap.c:9:
../contrib/lua-lpeg/lptypes.h:15: warning: "NDEBUG" redefined
15 | #define NDEBUG
|
<command-line>: note: this is the location of the previous definition
[77/340] Building C object contrib/lua-lpeg/CMakeFiles/rspamd-lpeg.dir/lpvm.c.o
In file included from ../contrib/lua-lpeg/lpcap.h:9,
from ../contrib/lua-lpeg/lpvm.c:15:
../contrib/lua-lpeg/lptypes.h:15: warning: "NDEBUG" redefined
15 | #define NDEBUG
|
<command-line>: note: this is the location of the previous definition
[79/340] Building C object contrib/lua-lpeg/CMakeFiles/rspamd-lpeg.dir/lpcode.c.o
In file included from ../contrib/lua-lpeg/lpcode.c:12:
../contrib/lua-lpeg/lptypes.h:15: warning: "NDEBUG" redefined
15 | #define NDEBUG
|
<command-line>: note: this is the location of the previous definition
[81/340] Building C object contrib/lua-lpeg/CMakeFiles/rspamd-lpeg.dir/lptree.c.o
In file included from ../contrib/lua-lpeg/lptree.c:15:
../contrib/lua-lpeg/lptypes.h:15: warning: "NDEBUG" redefined
15 | #define NDEBUG
|
<command-line>: note: this is the location of the previous definition
[Minor] silence -Wmisleading-indentation in contrib/snowball/
../contrib/snowball/compiler/analyser.c: In function ‘check_name_type’:
../contrib/snowball/compiler/analyser.c:210:19: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
210 | case 'r': if (p->type == t_routine ||
| ^~
../contrib/snowball/compiler/analyser.c:211:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
211 | p->type == t_external) return; break;
| ^~~~~
../contrib/snowball/compiler/analyser.c: In function ‘read_program’:
../contrib/snowball/compiler/analyser.c:859:21: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
859 | if (q->used && q->definition == 0) error4(a, q); break;
| ^~
../contrib/snowball/compiler/analyser.c:859:70: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
859 | if (q->used && q->definition == 0) error4(a, q); break;
| ^~~~~
../contrib/snowball/compiler/analyser.c:861:21: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
861 | if (q->used && q->grouping == 0) error4(a, q); break;
| ^~
../contrib/snowball/compiler/analyser.c:861:68: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
861 | if (q->used && q->grouping == 0) error4(a, q); break;
| ^~~~~
Peter Wu [Thu, 16 Jan 2020 01:11:49 +0000 (01:11 +0000)]
[Minor] Dkim_signing: correct is_skip_sign logic
If any of "sign_networks", "auth_only", or "sign_local" are disabled,
then it should not automatically proceed with signing if the enabled
conditions all fail. For example, if only the auth_only setting is
enabled, and is_authed is false, then signing should be skipped.
An earlier check luckily prevents this correctness issue from being
exploitable ("ignoring unauthenticated mail"), but fix the logic anyway.