summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2007-01-21 13:35:03 +0000
committerTiziano Müller <dev-zero@gentoo.org>2007-01-21 13:35:03 +0000
commit1148285ba32e8222ba91d71301534af94373d47a (patch)
tree812022e7474f1d194191aaa5c60467e17c3c288a /dev-python/django
parentStable on MIPS. (diff)
downloadgentoo-2-1148285ba32e8222ba91d71301534af94373d47a.tar.gz
gentoo-2-1148285ba32e8222ba91d71301534af94373d47a.tar.bz2
gentoo-2-1148285ba32e8222ba91d71301534af94373d47a.zip
Added security patches from Debian (bug #162818). Added bash-completion and examples USE-flag. Corrected psycopg dependency. Added src_test with test USE-flag. Some Cleanups.
(Portage version: 2.1.2-r1)
Diffstat (limited to 'dev-python/django')
-rw-r--r--dev-python/django/ChangeLog13
-rw-r--r--dev-python/django/django-0.95-r1.ebuild66
-rw-r--r--dev-python/django/django-0.95.ebuild4
-rw-r--r--dev-python/django/files/digest-django-0.95-r13
-rw-r--r--dev-python/django/files/django-0.95-auth_fix.patch19
-rw-r--r--dev-python/django/files/django-0.95-compile_messages_fix.patch18
6 files changed, 119 insertions, 4 deletions
diff --git a/dev-python/django/ChangeLog b/dev-python/django/ChangeLog
index d42d699a7607..be50cd4659f4 100644
--- a/dev-python/django/ChangeLog
+++ b/dev-python/django/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-python/django
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.9 2006/12/30 01:49:34 dev-zero Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/ChangeLog,v 1.10 2007/01/21 13:35:03 dev-zero Exp $
+
+*django-0.95-r1 (21 Jan 2007)
+
+ 21 Jan 2007; Tiziano Müller <dev-zero@gentoo.org>
+ +files/django-0.95-auth_fix.patch,
+ +files/django-0.95-compile_messages_fix.patch, +django-0.95-r1.ebuild:
+ Added security patches from Debian (bug #162818). Added bash-completion and
+ examples USE-flag. Corrected psycopg dependency. Added src_test with test
+ USE-flag. Some Cleanups.
30 Dec 2006; Tiziano Müller <dev-zero@gentoo.org> -django-0.91.ebuild,
django-0.95.ebuild:
diff --git a/dev-python/django/django-0.95-r1.ebuild b/dev-python/django/django-0.95-r1.ebuild
new file mode 100644
index 000000000000..37132f7851b9
--- /dev/null
+++ b/dev-python/django/django-0.95-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-0.95-r1.ebuild,v 1.1 2007/01/21 13:35:03 dev-zero Exp $
+
+inherit bash-completion distutils eutils
+
+MY_P="Django-${PV}"
+
+DESCRIPTION="high-level python web framework"
+HOMEPAGE="http://www.djangoproject.com/"
+SRC_URI="http://media.djangoproject.com/releases/${PV}/${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~x86"
+IUSE="examples mysql postgres sqlite test"
+
+RDEPEND="dev-python/imaging
+ sqlite? ( || (
+ ( >=dev-python/pysqlite-2.0.3 <dev-lang/python-2.5 )
+ >=dev-lang/python-2.5 ) )
+ test? ( || (
+ ( >=dev-python/pysqlite-2.0.3 <dev-lang/python-2.5 )
+ >=dev-lang/python-2.5 ) )
+ postgres? ( dev-python/psycopg )
+ mysql? ( dev-python/mysql-python )"
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-0.6_rc3"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="docs/* AUTHORS"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e '/ez_setup/d' \
+ setup.py || die "sed failed"
+
+ epatch "${FILESDIR}/${P}-compile_messages_fix.patch"
+ epatch "${FILESDIR}/${P}-auth_fix.patch"
+}
+
+src_install() {
+ distutils_python_version
+
+ site_pkgs="/usr/$(get_libdir)/python${PYVER}/site-packages/"
+ export PYTHONPATH="${PYTHONPATH}:${D}/${site_pkgs}"
+ dodir ${site_pkgs}
+
+ distutils_src_install --single-version-externally-managed
+
+ dobashcompletion extras/django_bash_completion
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
+
+src_test() {
+ cat >> tests/settings.py << __EOF__
+DATABASE_ENGINE='sqlite3'
+__EOF__
+ PYTHONPATH="." ${python} tests/runtests.py --settings=settings -v1 || die "tests failed"
+}
diff --git a/dev-python/django/django-0.95.ebuild b/dev-python/django/django-0.95.ebuild
index 7f18b6e11ed7..c118cff32df7 100644
--- a/dev-python/django/django-0.95.ebuild
+++ b/dev-python/django/django-0.95.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-0.95.ebuild,v 1.3 2006/12/30 01:49:34 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/django/django-0.95.ebuild,v 1.4 2007/01/21 13:35:03 dev-zero Exp $
inherit distutils
diff --git a/dev-python/django/files/digest-django-0.95-r1 b/dev-python/django/files/digest-django-0.95-r1
new file mode 100644
index 000000000000..8d758bb9b360
--- /dev/null
+++ b/dev-python/django/files/digest-django-0.95-r1
@@ -0,0 +1,3 @@
+MD5 9ed7d6a0daa147c012e31d0894802951 Django-0.95.tar.gz 1287781
+RMD160 95c405fff77e4a0cf51654e9d089a47b629dd875 Django-0.95.tar.gz 1287781
+SHA256 2185514d642f35d61d7c5c0a59545f2e18e41ee5abdb2912eafd64c1fa07c388 Django-0.95.tar.gz 1287781
diff --git a/dev-python/django/files/django-0.95-auth_fix.patch b/dev-python/django/files/django-0.95-auth_fix.patch
new file mode 100644
index 000000000000..5e2672e036f2
--- /dev/null
+++ b/dev-python/django/files/django-0.95-auth_fix.patch
@@ -0,0 +1,19 @@
+Index: /django/trunk/django/contrib/auth/middleware.py
+===================================================================
+--- django/contrib/auth/middleware.py (revision 3226)
++++ django/contrib/auth/middleware.py (revision 3754)
+@@ -1,11 +1,8 @@
+ class LazyUser(object):
+- def __init__(self):
+- self._user = None
+-
+ def __get__(self, request, obj_type=None):
+- if self._user is None:
++ if not hasattr(request, '_cached_user'):
+ from django.contrib.auth import get_user
+- self._user = get_user(request)
+- return self._user
++ request._cached_user = get_user(request)
++ return request._cached_user
+
+ class AuthenticationMiddleware(object):
diff --git a/dev-python/django/files/django-0.95-compile_messages_fix.patch b/dev-python/django/files/django-0.95-compile_messages_fix.patch
new file mode 100644
index 000000000000..8e7de6a09190
--- /dev/null
+++ b/dev-python/django/files/django-0.95-compile_messages_fix.patch
@@ -0,0 +1,18 @@
+Index: /django/trunk/django/bin/compile-messages.py
+===================================================================
+--- django/bin/compile-messages.py (revision 3590)
++++ django/bin/compile-messages.py (revision 3592)
+@@ -20,5 +20,12 @@
+ sys.stderr.write('processing file %s in %s\n' % (f, dirpath))
+ pf = os.path.splitext(os.path.join(dirpath, f))[0]
+- cmd = 'msgfmt -o "%s.mo" "%s.po"' % (pf, pf)
++ # Store the names of the .mo and .po files in an environment
++ # variable, rather than doing a string replacement into the
++ # command, so that we can take advantage of shell quoting, to
++ # quote any malicious characters/escaping.
++ # See http://cyberelk.net/tim/articles/cmdline/ar01s02.html
++ os.environ['djangocompilemo'] = pf + '.mo'
++ os.environ['djangocompilepo'] = pf + '.po'
++ cmd = 'msgfmt -o "$djangocompilemo" "$djangocompilepo"'
+ os.system(cmd)
+