Control: tag -1 - help moreinfo
Control: tag -1 + patch

On Sun, 16 Apr 2017 13:49:41 +0100, Paul Brook wrote:

> Test failures occur if the build environment does not have the tzdata
> package installed.  The test harness hardcodes TZ="Europe/Zurich".

Thanks for solving this mystery!

I can confirm that my chroots indeed don't have tzdata installed (as
it's not {build-}essential), and that the package builds for me with
your patch.

An alternative fix, which I've also verified, is to add tzdata to
Build-Depends and run the tests with TZ=Europe/Zurich. This would
save us from carrying an additional patch.


I'm attaching debdiffs for both options.


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Funny Van Dannen: Blauer Vogel
diff -Nru fail2ban-0.9.6/debian/patches/series fail2ban-0.9.6/debian/patches/series
--- fail2ban-0.9.6/debian/patches/series	2016-12-09 15:37:54.000000000 +0100
+++ fail2ban-0.9.6/debian/patches/series	2017-04-16 16:28:29.000000000 +0200
@@ -1,2 +1,3 @@
 deb_init_paths
 deb_manpages_reportbug
+tz_europe-zurich
diff -Nru fail2ban-0.9.6/debian/patches/tz_europe-zurich fail2ban-0.9.6/debian/patches/tz_europe-zurich
--- fail2ban-0.9.6/debian/patches/tz_europe-zurich	1970-01-01 01:00:00.000000000 +0100
+++ fail2ban-0.9.6/debian/patches/tz_europe-zurich	2017-04-16 16:28:29.000000000 +0200
@@ -0,0 +1,17 @@
+Description: remove requirement for tzdata
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/855920
+Author: Paul Brook <p...@nowt.org>
+Last-Update: 2017-04-16
+
+--- a/fail2ban/tests/utils.py
++++ b/fail2ban/tests/utils.py
+@@ -95,7 +95,7 @@
+ 	# Set the time to a fixed, known value
+ 	# Sun Aug 14 12:00:00 CEST 2005
+ 	# yoh: we need to adjust TZ to match the one used by Cyril so all the timestamps match
+-	os.environ['TZ'] = 'Europe/Zurich'
++	os.environ['TZ'] = 'CET-01CEST-02,M3.5.0,M10.5.0'
+ 	time.tzset()
+ 	MyTime.setTime(1124013600)
+ 
diff -Nru fail2ban-0.9.6/debian/control fail2ban-0.9.6/debian/control
--- fail2ban-0.9.6/debian/control	2016-12-09 15:37:54.000000000 +0100
+++ fail2ban-0.9.6/debian/control	2017-04-16 16:28:29.000000000 +0200
@@ -2,7 +2,7 @@
 Section: net
 Priority: optional
 Maintainer: Yaroslav Halchenko <deb...@onerussian.com>
-Build-Depends: debhelper (>= 9), python3, python3-pyinotify, dh-systemd
+Build-Depends: debhelper (>= 9), python3, python3-pyinotify, dh-systemd, tzdata
 Homepage: http://www.fail2ban.org
 Vcs-Git: git://github.com/fail2ban/fail2ban.git
 Vcs-Browser: http://github.com/fail2ban/fail2ban
diff -Nru fail2ban-0.9.6/debian/rules fail2ban-0.9.6/debian/rules
--- fail2ban-0.9.6/debian/rules	2016-12-09 15:37:54.000000000 +0100
+++ fail2ban-0.9.6/debian/rules	2017-04-16 16:28:29.000000000 +0200
@@ -51,7 +51,7 @@
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	cd build && LC_ALL=C.UTF-8 FAIL2BAN_CONFIG_DIR="$(CURDIR)/config" PYTHONPATH="$(CURDIR)/.pybuild/pythonX.Y_$(PYVERSION)/build/" scripts-*/fail2ban-testcases --no-network
+	cd build && TZ=Europe/Zurich LC_ALL=C.UTF-8 FAIL2BAN_CONFIG_DIR="$(CURDIR)/config" PYTHONPATH="$(CURDIR)/.pybuild/pythonX.Y_$(PYVERSION)/build/" scripts-*/fail2ban-testcases --no-network
 endif
 
 override_dh_installexamples:

Attachment: signature.asc
Description: Digital Signature

Reply via email to