diff --git a/fail2ban-issue_906-strptime.patch b/fail2ban-issue_906-strptime.patch new file mode 100644 index 0000000..baee8b4 --- /dev/null +++ b/fail2ban-issue_906-strptime.patch @@ -0,0 +1,12 @@ +diff -ur fail2ban-0.8.14.orig/common/__init__.py fail2ban-0.8.14/common/__init__.py +--- fail2ban-0.8.14.orig/common/__init__.py 2014-08-19 22:23:33.000000000 +0200 ++++ fail2ban-0.8.14/common/__init__.py 2015-01-21 21:51:13.425141175 +0100 +@@ -28,3 +28,7 @@ + + # Custom debug level + logging.HEAVYDEBUG = 5 ++ ++from time import strptime ++# strptime thread safety hack-around - http://bugs.python.org/issue7980 ++strptime("2012", "%Y") + diff --git a/fail2ban.changes b/fail2ban.changes index 357afd6..faa0cb7 100644 --- a/fail2ban.changes +++ b/fail2ban.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 21 21:00:48 UTC 2015 - jweberhofer@weberhofer.at + +- Fixed strptime thread safety issue; bnc#914075 gh#fail2ban/fail2ban#906 + ------------------------------------------------------------------- Tue Nov 25 11:36:13 UTC 2014 - jweberhofer@weberhofer.at diff --git a/fail2ban.spec b/fail2ban.spec index ad71eae..b74f923 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -1,7 +1,7 @@ # # spec file for package fail2ban # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,8 +36,10 @@ Source4: %{name}.service Source5: %{name}.tmpfiles Source6: sfw-fail2ban.conf Source7: f2b-restart.conf -# PATCH-FIX-OPENSUSE fail2ban-opensuse-locations.patch bnc#878028 jweberhofer@weberhoferat -- update default locations for logfiles +# PATCH-FIX-OPENSUSE fail2ban-opensuse-locations.patch bnc#878028 jweberhofer@weberhofer.at -- update default locations for logfiles Patch100: fail2ban-opensuse-locations.patch +# PATCH-FIX-UPSTREAM fail2ban-issue_906-strptime.patch bnc#914075, gh#fail2ban/fail2ban#906 jweberhofer@weberhofer.at -- Fix strptime thread safety issue +Patch101: fail2ban-issue_906-strptime.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %if 0%{?suse_version} >= 1230 @@ -97,6 +99,8 @@ Just have to run the following command: %prep %setup %patch100 -p1 +%patch101 -p1 + # correct doc-path sed -i -e 's|%{_prefix}/share/doc/fail2ban|%{_docdir}/%{name}|' setup.py