Update patch for Python 2.4 (rhbz#1114823).

This commit is contained in:
Thomas Moschny 2014-07-18 18:37:01 +02:00
commit 187d1b176d
2 changed files with 12 additions and 8 deletions

View file

@ -1,6 +1,7 @@
--- jinja2/bccache.py.orig 2014-05-30 11:39:41.313169820 +0200
+++ jinja2/bccache.py 2014-05-30 11:39:46.512160066 +0200
@@ -20,6 +20,9 @@
diff -up Jinja2-2.2.1/jinja2/bccache.py.orig Jinja2-2.2.1/jinja2/bccache.py
--- Jinja2-2.2.1/jinja2/bccache.py.orig 2009-08-05 18:41:50.000000000 +0200
+++ Jinja2-2.2.1/jinja2/bccache.py 2014-07-18 18:33:08.039204468 +0200
@@ -20,6 +20,9 @@ import tempfile
import cPickle as pickle
import fnmatch
from cStringIO import StringIO
@ -10,7 +11,7 @@
try:
from hashlib import sha1
except ImportError:
@@ -173,7 +176,9 @@
@@ -173,7 +176,9 @@ class FileSystemBytecodeCache(BytecodeCa
two arguments: The directory where the cache items are stored and a
pattern string that is used to build the filename.
@ -21,7 +22,7 @@
The pattern can be used to have multiple separate caches operate on the
same directory. The default pattern is ``'__jinja2_%s.cache'``. ``%s``
@@ -186,10 +191,39 @@
@@ -186,10 +191,39 @@ class FileSystemBytecodeCache(BytecodeCa
def __init__(self, directory=None, pattern='__jinja2_%s.cache'):
if directory is None:
@ -45,7 +46,7 @@
+ actual_dir = os.path.join(tmpdir, dirname)
+ try:
+ os.mkdir(actual_dir, stat.S_IRWXU) # 0o700
+ except OSError as e:
+ except OSError, e:
+ if e.errno != errno.EEXIST:
+ raise
+

View file

@ -2,7 +2,7 @@
Name: python-jinja2
Version: 2.2.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: General purpose template engine
Group: Development/Languages
License: BSD
@ -32,7 +32,7 @@ environments.
%prep
%setup -q -n Jinja2-%{version}
%patch0 -p0
%patch0 -p1
%build
@ -66,6 +66,9 @@ rm -rf %{buildroot}
%changelog
* Fri Jul 18 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-3
- Update patch for Python 2.4 (rhbz#1114823).
* Fri Jun 13 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-2
- Fix CVE-2014-1402 (using patch from RHSA-2014:0747).