From 074263c0f5572ae82d878b4b376ba512891c9098 Mon Sep 17 00:00:00 2001 From: fourtysixandtwo Date: Mon, 22 Apr 2024 15:21:25 +0200 Subject: network/fail2ban: Fix some rotated filenames/bash_competion stuff. Signed-off-by: Matteo Bernardini Signed-off-by: Willy Sudiarto Raharjo --- network/fail2ban/doinst.sh | 1 - network/fail2ban/fail2ban.SlackBuild | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/network/fail2ban/doinst.sh b/network/fail2ban/doinst.sh index 1239d0323e..7c5f64edbf 100644 --- a/network/fail2ban/doinst.sh +++ b/network/fail2ban/doinst.sh @@ -24,4 +24,3 @@ preserve_perms() { preserve_perms etc/rc.d/rc.fail2ban.new config etc/logrotate.d/fail2ban.new -config etc/bash_completion.d/fail2ban.new diff --git a/network/fail2ban/fail2ban.SlackBuild b/network/fail2ban/fail2ban.SlackBuild index a08000e8f7..db6e648408 100644 --- a/network/fail2ban/fail2ban.SlackBuild +++ b/network/fail2ban/fail2ban.SlackBuild @@ -30,7 +30,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM="fail2ban" VERSION=${VERSION:-1.0.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -72,7 +72,7 @@ sed -i 's|self.install_dir|"/usr/bin"|' setup.py sed -i 's/^before = paths-debian.conf/before = paths-slackware.conf/' config/jail.conf ./fail2ban-2to3 -python setup.py install --root=$PKG +python3 setup.py install --root=$PKG # installing man pages mkdir -p $PKG/usr/man/{man1,man5} @@ -87,14 +87,18 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r install -D -m 0644 $CWD/rc.fail2ban $PKG/etc/rc.d/rc.fail2ban.new # install slackware specific config file -install -D -m 0644 $CWD/config/paths-slackware.conf $PKG/etc/fail2ban/paths-slackware.conf.new +install -D -m 0644 $CWD/config/paths-slackware.conf $PKG/etc/fail2ban/paths-slackware.conf # remove non-slackware specific config files -rm -f $PKG/etc/fail2ban/paths-{arch,debian,fedora,freebsd,osx,opensuse}.conf.new +rm -f $PKG/etc/fail2ban/paths-{arch,debian,fedora,freebsd,osx,opensuse}.conf # install bash completion script if requested if [ "$BASH_COMPLETION" = "yes" ]; then install -D -m 0644 files/bash-completion $PKG/usr/share/bash-completion/completions/fail2ban + ( cd $PKG/usr/share/bash-completion/completions ; ln -sf fail2ban fail2ban-client ) + ( cd $PKG/usr/share/bash-completion/completions ; ln -sf fail2ban fail2ban-python ) + ( cd $PKG/usr/share/bash-completion/completions ; ln -sf fail2ban fail2ban-regex ) + ( cd $PKG/usr/share/bash-completion/completions ; ln -sf fail2ban fail2ban-server ) fi # install logrotate script -- cgit v1.2.3