summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schaal <farbing@web.de>2014-09-12 07:08:56 +0200
committerDaniel Schaal <farbing@web.de>2014-10-03 17:44:49 +0200
commit3f9859a127bc000a9bb9fba0aca5da22d0bf32ed (patch)
tree554fce4ea51079ebc9e8196e21abb673ee5d62f7
parentc516e8a0106b98751e211184e25e65ffc830715f (diff)
downloadfail2ban-3f9859a127bc000a9bb9fba0aca5da22d0bf32ed.tar.gz
Switch debian packaging to use python3
-rw-r--r--debian/control8
-rwxr-xr-xdebian/rules7
2 files changed, 9 insertions, 6 deletions
diff --git a/debian/control b/debian/control
index 0e621e60..2d783cba 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: fail2ban
Section: net
Priority: optional
Maintainer: Yaroslav Halchenko <debian@onerussian.com>
-Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-pyinotify, dh-systemd
+Build-Depends: debhelper (>= 9), python3, python3-pyinotify, dh-systemd
Homepage: http://www.fail2ban.org
Vcs-Git: git://github.com/fail2ban/fail2ban.git
Vcs-Browser: http://github.com/fail2ban/fail2ban
@@ -11,9 +11,9 @@ Standards-Version: 3.9.4
Package: fail2ban
Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, lsb-base (>=2.0-7)
-Recommends: iptables, whois, python-pyinotify
-Suggests: python-gamin, mailx, system-log-daemon, python-systemd
+Depends: ${python3:Depends}, ${misc:Depends}, lsb-base (>=2.0-7)
+Recommends: iptables, whois, python3-pyinotify
+Suggests: mailx, system-log-daemon, python3-systemd
Description: ban hosts that cause multiple authentication errors
Fail2ban monitors log files (e.g. /var/log/auth.log,
/var/log/apache/access.log) and temporarily or persistently bans
diff --git a/debian/rules b/debian/rules
index 48b629b4..a8ccd36f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,10 +9,13 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+export PYBUILD_DISABLE_python2=1
+
%:
- dh $@ --with python2,systemd
+ dh $@ --with python3,systemd --buildsystem pybuild
DESTDIR=$(CURDIR)/debian/fail2ban
+PYVERSION=$(shell py3versions -dv)
override_dh_clean:
rm -rf fail2ban.egg-info
@@ -39,7 +42,7 @@ override_dh_install:
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
- ./fail2ban-testcases-all --no-network
+ cd build && FAIL2BAN_CONFIG_DIR="$(CURDIR)/config" PYTHONPATH="$(CURDIR)/.pybuild/pythonX.Y_$(PYVERSION)/build/" scripts-*/fail2ban-testcases --no-network
endif
override_dh_installexamples: