From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1EFE7138334 for ; Wed, 16 Jan 2019 03:15:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B363DE0BB3; Wed, 16 Jan 2019 03:15:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 74E23E0BB3 for ; Wed, 16 Jan 2019 03:15:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 59DCE335C51 for ; Wed, 16 Jan 2019 03:15:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4DD5F50C for ; Wed, 16 Jan 2019 03:15:51 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1547608544.c334938edc52f23ed95834e3b8a658f2e76c53cb.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/files/, mail-filter/rspamd/ X-VCS-Repository: repo/gentoo X-VCS-Files: mail-filter/rspamd/Manifest mail-filter/rspamd/files/rspamd-r1.logrotate mail-filter/rspamd/files/rspamd-r6.init mail-filter/rspamd/files/rspamd.conf mail-filter/rspamd/files/rspamd.tmpfile mail-filter/rspamd/rspamd-1.8.3.ebuild mail-filter/rspamd/rspamd-9999.ebuild X-VCS-Directories: mail-filter/rspamd/files/ mail-filter/rspamd/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: c334938edc52f23ed95834e3b8a658f2e76c53cb X-VCS-Branch: master Date: Wed, 16 Jan 2019 03:15:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e1576c60-4e29-4f4e-8bc4-652257fd1c79 X-Archives-Hash: 08604be1c5a3c0d669d09af9badf2cf5 commit: c334938edc52f23ed95834e3b8a658f2e76c53cb Author: Thomas Deutschmann gentoo org> AuthorDate: Wed Jan 16 03:15:11 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Wed Jan 16 03:15:44 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c334938e mail-filter/rspamd: bump to v1.8.3 - runscript rewritten - username used in systemd unit adjusted for Gentoo - priv escalation via PID file fixed - dev-util/ragel version constraint removed (package is now compatible with ragel-7) Closes: https://github.com/gentoo/gentoo/pull/10598 Closes: https://github.com/gentoo/gentoo/pull/10561 Closes: https://github.com/gentoo/gentoo/pull/10057 Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann gentoo.org> mail-filter/rspamd/Manifest | 1 + mail-filter/rspamd/files/rspamd-r1.logrotate | 16 +++++++ mail-filter/rspamd/files/rspamd-r6.init | 55 ++++++++++++++++++++++ mail-filter/rspamd/files/rspamd.conf | 26 ++++++++++ mail-filter/rspamd/files/rspamd.tmpfile | 1 + .../{rspamd-9999.ebuild => rspamd-1.8.3.ebuild} | 55 +++++++++++++--------- mail-filter/rspamd/rspamd-9999.ebuild | 55 +++++++++++++--------- 7 files changed, 165 insertions(+), 44 deletions(-) diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest index 2223d7172bb..d45c6ec491a 100644 --- a/mail-filter/rspamd/Manifest +++ b/mail-filter/rspamd/Manifest @@ -7,3 +7,4 @@ DIST rspamd-1.7.7.tar.gz 4534430 BLAKE2B 83ba39b80293bf87f397e6b1b1cbec27e7c44f0 DIST rspamd-1.7.8.tar.gz 4542955 BLAKE2B 78fbb01c51d290f8d88f4c512df248fcbc8e28e00a820ba0d3dc22adf4bb1b54b1923aa5306fde5d4d75c81a9304f220608a6cec3f1077bbb9adfa1ea8bdc2a4 SHA512 43f2350dfa4e0369cd53480bd4c8d0aa3898d7c471540281e7460a264207032aea226c4fd519a26397b9e9e8c8de3951e5a9752e010eabf1b3733a0c3e3086c2 DIST rspamd-1.7.9.tar.gz 4557492 BLAKE2B f42775ba8157ef4815331c304e3030c522e9ae5e10ef0194da0c7dde105b40fed2ae84b063d78aed37992146311aecc1ac77f64dacdaf3ff11bb85076e8aef7c SHA512 d11d8c03668b85feae665ed491cd156c7430fbad30f42fe44103ea3c3a8bc988e5f8981e784e8f31aa35ba1ff9f7abd23605638e4ee3086a056b22fb3109563e DIST rspamd-1.8.1.tar.gz 4286637 BLAKE2B dd202a2f3dab4ef459d978e06231f8fcef3724ea5912c7455d553dc04e2744322b9144ba05a2f6f22a7eb58cd0a967f213bfc76fb273b5425036a5042975ed89 SHA512 98c2d909b7dc19f1c431d4e64444968092a10630ef238d3c8cc2825e7b2d92bee893bc7f9c431f3a6337ef2af4d2a157f0584e7b13fba0540660d7c853bc25cc +DIST rspamd-1.8.3.tar.gz 4319623 BLAKE2B b7fdd6791df5899710bb1d696a9b94d1840335b6a34d6cdeebc2b5eebe9f4e5b6da3e90ed9ab5e3945aab7ef33f54f048024b51c3de37db1a083ad89c656b456 SHA512 5e20255466fe2cd4842196fb2138732b59911de655e73d9cc13009b5179b84e5a2060083961b35fe40b9f550f8e18067056415a1d803fac54fac000070024c01 diff --git a/mail-filter/rspamd/files/rspamd-r1.logrotate b/mail-filter/rspamd/files/rspamd-r1.logrotate new file mode 100644 index 00000000000..5cb2fdd55e0 --- /dev/null +++ b/mail-filter/rspamd/files/rspamd-r1.logrotate @@ -0,0 +1,16 @@ +/var/log/rspamd/rspamd.log { + daily + rotate 4 + delaycompress + compress + notifempty + missingok + postrotate + if test -d /run/systemd/system ; then + systemctl kill -s USR1 --kill-who=main rspamd.service + else + test -r /run/rspamd.pid && kill -USR1 $(cat /run/rspamd.pid) &>/dev/null + fi + endscript +} + diff --git a/mail-filter/rspamd/files/rspamd-r6.init b/mail-filter/rspamd/files/rspamd-r6.init new file mode 100644 index 00000000000..8c31fd7d027 --- /dev/null +++ b/mail-filter/rspamd/files/rspamd-r6.init @@ -0,0 +1,55 @@ +#!/sbin/openrc-run +# Copyright 2015-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +RSPAMD_CONFIGFILE=${RSPAMD_CONFIGFILE:-"/etc/rspamd/rspamd.conf"} +RSPAMD_GROUP=${RSPAMD_GROUP:-rspamd} +RSPAMD_OPTS=${RSPAMD_OPTS:-""} +RSPAMD_PIDFILE=${RSPAMD_PIDFILE:-"/run/rspamd.pid"} +RSPAMD_USER=${RSPAMD_USER:-rspamd} + +command="/usr/bin/rspamd" +command_args="${RSPAMD_OPTS} -c \"${RSPAMD_CONFIGFILE}\" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} --pid \"${RSPAMD_PIDFILE}\"" +start_stop_daemon_args=${RSPAMD_SSDARGS:-"--wait 1000"} +pidfile="${RSPAMD_PIDFILE}" +retry=${RSPAMD_TERMTIMEOUT:-"TERM/60/KILL/5"} + +required_files="${RSPAMD_CONFIGFILE}" + +description="Rapid spam filtering system" + +extra_commands="checkconfig" +extra_started_commands="reload" + +description_checkconfig="Validate rspamd's configuration" +description_reload="Sends rspamd a signal to reload its configuration" + +depend() { + before mta + use dns redis +} + +checkconfig() { + ${command} -c "${RSPAMD_CONFIGFILE}" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} -t 1>/dev/null \ + || return 1 +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} + +start_pre() { + if [ "${RC_CMD}" != "restart" ]; then + checkconfig || return 1 + fi +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + checkconfig || return 1 + fi +} diff --git a/mail-filter/rspamd/files/rspamd.conf b/mail-filter/rspamd/files/rspamd.conf new file mode 100644 index 00000000000..f3a65cbb20a --- /dev/null +++ b/mail-filter/rspamd/files/rspamd.conf @@ -0,0 +1,26 @@ +# /etc/conf.d/rspamd + +# Configuration file +#RSPAMD_CONFIGFILE="/etc/rsyslog.conf" + +# PID file +# If you should ever change this, remember to update +# "/etc/logrotate.d/rspamd", too. +#RSPAMD_PIDFILE="/run/rspamd.pid" + +# You can use this configuration option to pass additional options to the +# start-stop-daemon, see start-stop-daemon(8) for more details. +# Per default we wait 1000ms after we have started the service to ensure +# that the daemon is really up and running. +#RSPAMD_SSDARGS="--wait 1000" + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (60 + 5 seconds +# per default) when you are stopping the service. +#RSPAMD_TERMTIMEOUT="TERM/60/KILL/5" + +# Options to rspamd +# See rspamd(8) for more details +# Notes: +# * Do not specify another CONFIGFILE but use the variable above to change the location +#RSPAMD_OPTS="" diff --git a/mail-filter/rspamd/files/rspamd.tmpfile b/mail-filter/rspamd/files/rspamd.tmpfile new file mode 100644 index 00000000000..9f7a2c46c31 --- /dev/null +++ b/mail-filter/rspamd/files/rspamd.tmpfile @@ -0,0 +1 @@ +d /run/rspamd 0755 rspamd rspamd diff --git a/mail-filter/rspamd/rspamd-9999.ebuild b/mail-filter/rspamd/rspamd-1.8.3.ebuild similarity index 72% copy from mail-filter/rspamd/rspamd-9999.ebuild copy to mail-filter/rspamd/rspamd-1.8.3.ebuild index 40d3b529082..64cb537424f 100644 --- a/mail-filter/rspamd/rspamd-9999.ebuild +++ b/mail-filter/rspamd/rspamd-1.8.3.ebuild @@ -1,26 +1,20 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 -if [[ ${PV} == *9999 ]] ; then - SCM="git-r3" - EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git" -fi - -inherit cmake-utils pax-utils systemd user ${SCM} - -DESCRIPTION="Rapid spam filtering system" -HOMEPAGE="https://github.com/vstakhov/rspamd" +inherit cmake-utils pax-utils systemd tmpfiles user if [[ ${PV} == *9999 ]] ; then - SRC_URI="" - KEYWORDS="" + EGIT_REPO_URI="https://github.com/vstakhov/rspamd.git" + inherit git-r3 else SRC_URI="https://github.com/vstakhov/rspamd/archive/${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~x86" fi +DESCRIPTION="Rapid spam filtering system" +HOMEPAGE="https://github.com/vstakhov/rspamd" LICENSE="Apache-2.0" SLOT="0" IUSE="cpu_flags_x86_ssse3 fann gd jemalloc +jit libressl pcre2 +torch" @@ -32,7 +26,7 @@ RDEPEND="dev-db/sqlite:3 dev-libs/libevent:= net-libs/libnsl sys-apps/file -