From dcfe899716baf23653b0e04749e6ca0c5685053f Mon Sep 17 00:00:00 2001 From: Gioele Barabucci Date: Sat, 30 Jul 2022 00:38:53 +0200 Subject: [PATCH] d/post{inst,rm},preinst: Remove code for ancient versions `postinst`, `postrm` and `preinst` contain code related to adjustments to be done when upgrading from versions older than 0.7.1, 0.8.13, etc. This code has not been run for a long time, considering that old-old-stable (Debian 9, 2017) shipped with version 0.9.6-2. It can thus be removed. --- debian/fail2ban.lintian-overrides | 3 -- debian/postinst | 55 +------------------------------ debian/postrm | 8 ----- debian/preinst | 15 --------- 4 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 debian/fail2ban.lintian-overrides delete mode 100755 debian/preinst diff --git a/debian/fail2ban.lintian-overrides b/debian/fail2ban.lintian-overrides deleted file mode 100644 index 2c395eea..00000000 --- a/debian/fail2ban.lintian-overrides +++ /dev/null @@ -1,3 +0,0 @@ -# it is in a comment... -fail2ban: read-in-maintainer-script [postinst:41] - diff --git a/debian/postinst b/debian/postinst index c9a608f5..fdf7b230 100755 --- a/debian/postinst +++ b/debian/postinst @@ -16,7 +16,6 @@ set -e # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # -preversion=$2 case "$1" in configure) @@ -27,48 +26,7 @@ case "$1" in touch $LOG chown root:adm ${LOG}* || true chmod 640 ${LOG}* || true - - # Note regarding changed configuration file - # Note regarding changed configuration file - if [ ! -z $preversion ]; then - if dpkg --compare-versions $preversion lt 0.7.1-1; then - cat </dev/null; then - dpkg-maintscript-helper mv_conffile /etc/fail2ban/action.d/firewall-cmd-direct-new.conf /etc/fail2ban/action.d/firewallcmd-new.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/lighttpd-fastcgi.conf /etc/fail2ban/filter.d/suhosin.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/sasl.conf /etc/fail2ban/filter.d/postfix-sasl.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/couriersmtp.conf /etc/fail2ban/filter.d/courier-smtp.conf 0.9.0-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/courierlogin.conf /etc/fail2ban/filter.d/courier-auth.conf 0.9.0-1~ -- "$@" -fi - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - #DEBHELPER# exit 0 diff --git a/debian/postrm b/debian/postrm index 5ff30129..543c6862 100755 --- a/debian/postrm +++ b/debian/postrm @@ -36,14 +36,6 @@ case "$1" in ;; esac -if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then - dpkg-maintscript-helper mv_conffile /etc/fail2ban/action.d/firewall-cmd-direct-new.conf /etc/fail2ban/action.d/firewallcmd-new.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/lighttpd-fastcgi.conf /etc/fail2ban/filter.d/suhosin.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/sasl.conf /etc/fail2ban/filter.d/postfix-sasl.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/couriersmtp.conf /etc/fail2ban/filter.d/courier-smtp.conf 0.9.0-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/courierlogin.conf /etc/fail2ban/filter.d/courier-auth.conf 0.9.0-1~ -- "$@" -fi - # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. diff --git a/debian/preinst b/debian/preinst deleted file mode 100755 index dc6f46ca..00000000 --- a/debian/preinst +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -set -e - -if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then - dpkg-maintscript-helper mv_conffile /etc/fail2ban/action.d/firewall-cmd-direct-new.conf /etc/fail2ban/action.d/firewallcmd-new.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/lighttpd-fastcgi.conf /etc/fail2ban/filter.d/suhosin.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/sasl.conf /etc/fail2ban/filter.d/postfix-sasl.conf 0.8.13-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/couriersmtp.conf /etc/fail2ban/filter.d/courier-smtp.conf 0.9.0-1~ -- "$@" - dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/courierlogin.conf /etc/fail2ban/filter.d/courier-auth.conf 0.9.0-1~ -- "$@" -fi - -#DEBHELPER# - -exit 0