diff options
Diffstat (limited to 'network/rspamd')
-rw-r--r-- | network/rspamd/README | 3 | ||||
-rw-r--r-- | network/rspamd/doinst.sh | 4 | ||||
-rw-r--r-- | network/rspamd/rc.rspamd.new | 7 | ||||
-rw-r--r-- | network/rspamd/rspamd.SlackBuild | 58 | ||||
-rw-r--r-- | network/rspamd/rspamd.info | 10 | ||||
-rw-r--r-- | network/rspamd/slack-desc | 10 |
6 files changed, 50 insertions, 42 deletions
diff --git a/network/rspamd/README b/network/rspamd/README index 705ffd1689..ea65f2a21e 100644 --- a/network/rspamd/README +++ b/network/rspamd/README @@ -13,7 +13,8 @@ available. Groupname and Username -You must have the "rspamd" group and user to run this script, for example: +You must have the "rspamd" group and user to run this script, for +example: groupadd -g 359 rspamd useradd -u 359 -s /bin/false -d /dev/null -g rspamd rspamd diff --git a/network/rspamd/doinst.sh b/network/rspamd/doinst.sh index 533485ecf5..116a6481e5 100644 --- a/network/rspamd/doinst.sh +++ b/network/rspamd/doinst.sh @@ -22,5 +22,7 @@ preserve_perms() { config $NEW } -config etc/rspamd/rspamd.conf.new +find etc/rspamd -type f -name '*.new' \ + | while read new ; do config $new ; done + preserve_perms etc/rc.d/rc.rspamd.new diff --git a/network/rspamd/rc.rspamd.new b/network/rspamd/rc.rspamd.new index 8c3e78f908..f68b62cb91 100644 --- a/network/rspamd/rc.rspamd.new +++ b/network/rspamd/rc.rspamd.new @@ -10,6 +10,11 @@ CONF=/etc/rspamd/rspamd.conf DAEMON_ARGS="-c $CONF -u $NAME -g $NAME" rspamd_start() { + if [ ! -d $(dirname $PIDFILE) ]; then + mkdir $(dirname $PIDFILE) + chown rspamd:rspamd $(dirname $PIDFILE) + fi + if [ ! -r $CONF ]; then echo "$CONF does not appear to exist. Abort." exit 1 @@ -21,7 +26,7 @@ rspamd_start() { fi echo "Starting rspamd ..." - $DAEMON $DAEMON_ARGS + $DAEMON $DAEMON_ARGS & } rspamd_stop() { diff --git a/network/rspamd/rspamd.SlackBuild b/network/rspamd/rspamd.SlackBuild index 1821c2026b..071fadc54f 100644 --- a/network/rspamd/rspamd.SlackBuild +++ b/network/rspamd/rspamd.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for Rspamd -# Copyright 2018, 2019 Ebben Aries <e@dscp.org> +# Copyright 2018-2024 Ebben Aries <slackbuilds@dscp.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220320 bkw: Modified by SlackBuilds.org: fix 32-bit build. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=rspamd -VERSION=${VERSION:-1.9.4} +VERSION=${VERSION:-3.8.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,18 +40,24 @@ if [ -z "$ARCH" ]; then esac fi -UIDGID=359 -if ! getent group $PRGNAM; then - echo " You must have the \"$PRGNAM\" group to run this script." +# 20220320 bkw: please don't make me run the script twice to see +# both commands: show them both if either is missing. +group_user_error() { + echo " You must have the \"$PRGNAM\" group and user to run this script." echo " # groupadd -g $UIDGID $PRGNAM" - exit 1 -elif ! getent passwd $PRGNAM; then - echo " You must have the \"$PRGNAM\" user to run this script." echo " # useradd -u $UIDGID -s /bin/false -d /dev/null -g $PRGNAM $PRGNAM" exit 1 +} + +UIDGID=359 +getent group $PRGNAM || group_user_error +getent passwd $PRGNAM || group_user_error + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 fi -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -76,12 +87,12 @@ cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ -mkdir -p build -cd build +mkdir -p rspamd.build +cd rspamd.build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -91,30 +102,19 @@ cd build -DENABLE_STATIC=OFF \ -DENABLE_HYPERSCAN=ON \ -DENABLE_JEMALLOC=ON \ + -DENABLE_LUAJIT=ON \ -DENABLE_OPTIMIZATION=ON \ -DCMAKE_BUILD_TYPE=Release \ .. make - make install DESTDIR=$PKG + make install/strip DESTDIR=$PKG cd .. - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - -# remove empty directory tree -rmdir -p --ignore-fail-on-non-empty $PKG/usr/share/examples/rspamd +gzip $PKG/usr/man/man*/* mkdir -p $PKG/var/log/rspamd chown rspamd:rspamd $PKG/var/log/rspamd chmod 0755 $PKG/var/log/rspamd -mkdir -p $PKG/var/run/rspamd -chown rspamd:rspamd $PKG/var/run/rspamd -chmod 0750 $PKG/var/run/rspamd - mkdir -p $PKG/var/lib/rspamd chown rspamd:rspamd $PKG/var/lib/rspamd chmod 0750 $PKG/var/lib/rspamd @@ -132,4 +132,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/network/rspamd/rspamd.info b/network/rspamd/rspamd.info index 0fd4280c31..a533c96955 100644 --- a/network/rspamd/rspamd.info +++ b/network/rspamd/rspamd.info @@ -1,10 +1,10 @@ PRGNAM="rspamd" -VERSION="1.9.4" +VERSION="3.8.4" HOMEPAGE="https://rspamd.com" -DOWNLOAD="https://github.com/rspamd/rspamd/archive/1.9.4/rspamd-1.9.4.tar.gz" -MD5SUM="930b07b1f55dfc9c46abbe266eae9856" +DOWNLOAD="https://github.com/rspamd/rspamd/archive/3.8.4/rspamd-3.8.4.tar.gz" +MD5SUM="b0277cbdcca54bd6873b1fd2ea7e61de" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="ragel luajit redis hyperscan" +REQUIRES="luajit redis hyperscan" MAINTAINER="Ebben Aries" -EMAIL="e@dscp.org" +EMAIL="slackbuilds@dscp.org" diff --git a/network/rspamd/slack-desc b/network/rspamd/slack-desc index 7419034a6b..5fd336b92a 100644 --- a/network/rspamd/slack-desc +++ b/network/rspamd/slack-desc @@ -7,13 +7,13 @@ |-----handy-ruler------------------------------------------------------| rspamd: rspamd (An advanced spam filtering system) +rspamd: rspamd: Rspamd is an advanced spam filtering system that allows evaluation of rspamd: messages by a number of rules including regular expressions, rspamd: statistical analysis and custom services such as URL black lists. rspamd: Each message is analysed by Rspamd and given a spam score. -rspamd: According to the spam score and the user's settings Rspamd recommends -rspamd: an action for the MTA to apply to the message: for example, to pass, -rspamd: to reject or to add a header. Rspamd is designed to process hundreds -rspamd: of messages per second simultaneously and has a number of features -rspamd: available. +rspamd: rspamd: Home-Page: https://rspamd.com +rspamd: +rspamd: +rspamd: |