diff --git a/centos_pkg_dirs b/centos_pkg_dirs index 3d94d6b46..87be3b196 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -15,7 +15,6 @@ virt/qemu filesystem/nfscheck utilities/update-motd python/python-2.7.5 -python/python-django python/python-setuptools virt/libvirt virt/libvirt-python diff --git a/python/python-django/centos/build_srpm.data b/python/python-django/centos/build_srpm.data deleted file mode 100644 index e9b2ca7d7..000000000 --- a/python/python-django/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -COPY_LIST="files/*" -TIS_PATCH_VER=4 -BUILD_IS_SLOW=2 diff --git a/python/python-django/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/python/python-django/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index 9650530af..000000000 --- a/python/python-django/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 487be212ccf9debb2c15dcc360ee4c429779b6d0 Mon Sep 17 00:00:00 2001 -From: Don Penney -Date: Mon, 26 Sep 2016 17:50:11 -0400 -Subject: [PATCH] Update package versioning for TIS format - ---- - SPECS/python-django.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec -index d0e54bb..5cf8579 100644 ---- a/SPECS/python-django.spec -+++ b/SPECS/python-django.spec -@@ -29,7 +29,7 @@ - Name: python-django - - Version: 1.8.14 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: A high-level Python Web framework - - Group: Development/Languages --- -1.8.3.1 - diff --git a/python/python-django/centos/meta_patches/PATCH_ORDER b/python/python-django/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 8d18985c6..000000000 --- a/python/python-django/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,5 +0,0 @@ -spec-include-TiS-patches.patch -0001-Update-package-versioning-for-TIS-format.patch -fix-build-failures-due-to-unwanted-sgid.patch -meta-size-number-format.patch -spec-patch-to-remove-SmartyPants.patch \ No newline at end of file diff --git a/python/python-django/centos/meta_patches/fix-build-failures-due-to-unwanted-sgid.patch b/python/python-django/centos/meta_patches/fix-build-failures-due-to-unwanted-sgid.patch deleted file mode 100644 index 412bb9b66..000000000 --- a/python/python-django/centos/meta_patches/fix-build-failures-due-to-unwanted-sgid.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8b52d5a27b4c288aa2167968b1d570e3caba6245 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Fri, 18 Nov 2016 14:02:39 -0500 -Subject: [PATCH 1/1] python-django-bash-completion: fix build failures due to - unwanted sgid bit - ---- - SPECS/python-django.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec -index 5cf8579..79557de 100644 ---- a/SPECS/python-django.spec -+++ b/SPECS/python-django.spec -@@ -421,6 +421,8 @@ popd - %doc docs/_build/html/* - - %files bash-completion -+%dir %attr(0755,root,root) %{_datadir}/bash-completion -+%dir %attr(0755,root,root) %{_datadir}/bash-completion/completions - %{_datadir}/bash-completion - - %if 0%{?with_python3} --- -1.8.3.1 - diff --git a/python/python-django/centos/meta_patches/meta-size-number-format.patch b/python/python-django/centos/meta_patches/meta-size-number-format.patch deleted file mode 100644 index 20b00cf38..000000000 --- a/python/python-django/centos/meta_patches/meta-size-number-format.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8145058f9ee3042cbc2214751333b25a9eafedf0 Mon Sep 17 00:00:00 2001 -From: Wei Zhou -Date: Wed, 11 Oct 2017 22:23:10 -0500 -Subject: [PATCH 1/1] meta size number format - ---- - SPECS/python-django.spec | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec -index 79557de..5bef0ec 100644 ---- a/SPECS/python-django.spec -+++ b/SPECS/python-django.spec -@@ -41,6 +41,7 @@ Patch0: python-django-1.8.3-shell-completion.patch - - # WRS - Patch1: session-filebase-backend-fix.patch -+Patch2: size-number-format.patch - - BuildArch: noarch - BuildRequires: python2-devel -@@ -154,6 +155,7 @@ rm -rf Django.egg-info - - # WRS - %patch1 -p1 -+%patch2 -p1 - - # empty files - for f in \ --- -1.8.3.1 - diff --git a/python/python-django/centos/meta_patches/spec-include-TiS-patches.patch b/python/python-django/centos/meta_patches/spec-include-TiS-patches.patch deleted file mode 100644 index b93bbfe15..000000000 --- a/python/python-django/centos/meta_patches/spec-include-TiS-patches.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 6cee1f687c1148254fcddc34a7f7de334a26dba1 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Fri, 26 Aug 2016 15:10:15 -0400 -Subject: [PATCH 1/1] WRS: spec-include-TiS-patches.patch - ---- - SPECS/python-django.spec | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec -index 269991d..d0e54bb 100644 ---- a/SPECS/python-django.spec -+++ b/SPECS/python-django.spec -@@ -39,6 +39,9 @@ Source0: https://files.pythonhosted.org/packages/source/D/Django/Django-% - - Patch0: python-django-1.8.3-shell-completion.patch - -+# WRS -+Patch1: session-filebase-backend-fix.patch -+ - BuildArch: noarch - BuildRequires: python2-devel - -@@ -149,6 +152,9 @@ rm -rf Django.egg-info - - %patch0 - -+# WRS -+%patch1 -p1 -+ - # empty files - for f in \ - django/contrib/staticfiles/models.py \ --- -1.9.1 - diff --git a/python/python-django/centos/meta_patches/spec-patch-to-remove-SmartyPants.patch b/python/python-django/centos/meta_patches/spec-patch-to-remove-SmartyPants.patch deleted file mode 100644 index e98189aa1..000000000 --- a/python/python-django/centos/meta_patches/spec-patch-to-remove-SmartyPants.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/SPECS/python-django.spec b/SPECS/python-django.spec -index 5bef0ec..827d08f 100644 ---- a/SPECS/python-django.spec -+++ b/SPECS/python-django.spec -@@ -42,6 +42,7 @@ Patch0: python-django-1.8.3-shell-completion.patch - # WRS - Patch1: session-filebase-backend-fix.patch - Patch2: size-number-format.patch -+Patch3: remove-SmartyPantsHTMLTranslator.patch - - BuildArch: noarch - BuildRequires: python2-devel -@@ -156,6 +157,7 @@ rm -rf Django.egg-info - # WRS - %patch1 -p1 - %patch2 -p1 -+%patch3 -p1 - - # empty files - for f in \ diff --git a/python/python-django/centos/patches/remove-SmartyPantsHTMLTranslator.patch b/python/python-django/centos/patches/remove-SmartyPantsHTMLTranslator.patch deleted file mode 100644 index fac77b181..000000000 --- a/python/python-django/centos/patches/remove-SmartyPantsHTMLTranslator.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 3624581259cecf7ca2d695fbebc27fed2a4d941c Mon Sep 17 00:00:00 2001 -From: root -Date: Thu, 5 Oct 2017 16:38:20 -0400 -Subject: [PATCH] No smartypants - - -diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py -index fd93194..aa3afbb 100644 ---- a/docs/_ext/djangodocs.py -+++ b/docs/_ext/djangodocs.py -@@ -12,7 +12,7 @@ from sphinx.builders.html import StandaloneHTMLBuilder - from sphinx.util.compat import Directive - from sphinx.util.console import bold - from sphinx.util.nodes import set_source_info --from sphinx.writers.html import SmartyPantsHTMLTranslator -+from sphinx.writers.html import HTMLTranslator - - # RE for option descriptions without a '--' prefix - simple_option_desc_re = re.compile( -@@ -227,7 +227,7 @@ class VersionDirective(Directive): - return ret - - --class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): -+class DjangoHTMLTranslator(HTMLTranslator): - """ - Django-specific reST to HTML tweaks. - """ -@@ -260,10 +260,10 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): - # - def visit_literal_block(self, node): - self.no_smarty += 1 -- SmartyPantsHTMLTranslator.visit_literal_block(self, node) -+ HTMLTranslator.visit_literal_block(self, node) - - def depart_literal_block(self, node): -- SmartyPantsHTMLTranslator.depart_literal_block(self, node) -+ HTMLTranslator.depart_literal_block(self, node) - self.no_smarty -= 1 - - # -@@ -300,7 +300,7 @@ class DjangoHTMLTranslator(SmartyPantsHTMLTranslator): - old_ids = node.get('ids', []) - node['ids'] = ['s-' + i for i in old_ids] - node['ids'].extend(old_ids) -- SmartyPantsHTMLTranslator.visit_section(self, node) -+ HTMLTranslator.visit_section(self, node) - node['ids'] = old_ids - - diff --git a/python/python-django/centos/patches/size-number-format.patch b/python/python-django/centos/patches/size-number-format.patch deleted file mode 100644 index 67d2cd3ab..000000000 --- a/python/python-django/centos/patches/size-number-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py -index cd2457d..dc10ea3 100644 ---- a/django/template/defaultfilters.py -+++ b/django/template/defaultfilters.py -@@ -905,15 +905,15 @@ def filesizeformat(bytes): - if bytes < KB: - value = ungettext("%(size)d byte", "%(size)d bytes", bytes) % {'size': bytes} - elif bytes < MB: -- value = ugettext("%s KB") % filesize_number_format(bytes / KB) -+ value = ugettext("%s KiB") % filesize_number_format(bytes / KB) - elif bytes < GB: -- value = ugettext("%s MB") % filesize_number_format(bytes / MB) -+ value = ugettext("%s MiB") % filesize_number_format(bytes / MB) - elif bytes < TB: -- value = ugettext("%s GB") % filesize_number_format(bytes / GB) -+ value = ugettext("%s GiB") % filesize_number_format(bytes / GB) - elif bytes < PB: -- value = ugettext("%s TB") % filesize_number_format(bytes / TB) -+ value = ugettext("%s TiB") % filesize_number_format(bytes / TB) - else: -- value = ugettext("%s PB") % filesize_number_format(bytes / PB) -+ value = ugettext("%s PiB") % filesize_number_format(bytes / PB) - - return avoid_wrapping(value) - diff --git a/python/python-django/centos/srpm_path b/python/python-django/centos/srpm_path deleted file mode 100644 index 1b60de931..000000000 --- a/python/python-django/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-django-1.8.14-1.el7.src.rpm diff --git a/python/python-django/files/session-filebase-backend-fix.patch b/python/python-django/files/session-filebase-backend-fix.patch deleted file mode 100644 index 993d2fb42..000000000 --- a/python/python-django/files/session-filebase-backend-fix.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 1ab6e8cd0031813aa2b70847d6b54f294d8f90f5 Mon Sep 17 00:00:00 2001 -From: Giao Le -Date: Mon, 11 Jul 2016 16:20:13 -0400 -Subject: [PATCH 1/1] session-filebase-backend-fix - ---- - Django-1.8.7 | 1 + - django/contrib/sessions/backends/file.py | 15 ++++++++++++--- - 2 files changed, 13 insertions(+), 3 deletions(-) - create mode 120000 Django-1.8.7 - -diff --git a/Django-1.8.7 b/Django-1.8.7 -new file mode 120000 -index 0000000..2fa6e7c ---- /dev/null -+++ b/Django-1.8.7 -@@ -0,0 +1 @@ -+Django-1.8.7 -\ No newline at end of file -diff --git a/django/contrib/sessions/backends/file.py b/django/contrib/sessions/backends/file.py -index 41469c4..2b10b3e 100644 ---- a/django/contrib/sessions/backends/file.py -+++ b/django/contrib/sessions/backends/file.py -@@ -71,6 +71,17 @@ class SessionStore(SessionBase): - modification = datetime.datetime.fromtimestamp(modification) - return modification - -+ def _expiry_date(self, session_data): -+ """ -+ Return the expiry time of the file storing the session's content. -+ """ -+ expiry = session_data.get('_session_expiry') -+ if not expiry: -+ expiry = self._last_modification() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE) -+ elif not isinstance(expiry, datetime.datetime): -+ expiry = self._last_modification() + datetime.timedelta(seconds=expiry) -+ return expiry -+ - def load(self): - session_data = {} - try: -@@ -89,9 +100,7 @@ class SessionStore(SessionBase): - self.create() - - # Remove expired sessions. -- expiry_age = self.get_expiry_age( -- modification=self._last_modification(), -- expiry=session_data.get('_session_expiry')) -+ expiry_age = self.get_expiry_age(expiry=self._expiry_date(session_data)) - if expiry_age < 0: - session_data = {} - self.delete() --- -1.9.1 - diff --git a/python/python-django/update-session-filebase-backend.patch b/python/python-django/update-session-filebase-backend.patch deleted file mode 100644 index ac0dc8434..000000000 --- a/python/python-django/update-session-filebase-backend.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- - django/contrib/sessions/backends/file.py | 29 +++++++++++++++++++---------- - 1 file changed, 19 insertions(+), 10 deletions(-) - ---- a/django/contrib/sessions/backends/file.py -+++ b/django/contrib/sessions/backends/file.py -@@ -6,13 +6,14 @@ import shutil - import tempfile - - from django.conf import settings --from django.contrib.sessions.backends.base import SessionBase, CreateError, VALID_KEY_CHARS --from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured -+from django.contrib.sessions.backends.base import ( -+ VALID_KEY_CHARS, CreateError, SessionBase, -+) -+from django.contrib.sessions.exceptions import InvalidSessionKey -+from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation - from django.utils import timezone - from django.utils.encoding import force_text - --from django.contrib.sessions.exceptions import InvalidSessionKey -- - - class SessionStore(SessionBase): - """ -@@ -70,6 +71,15 @@ class SessionStore(SessionBase): - modification = datetime.datetime.fromtimestamp(modification) - return modification - -+ def _expiry_date(self, session_data): -+ """ -+ Return the expiry time of the file storing the session's content. -+ """ -+ expiry = session_data.get('_session_expiry') -+ if not expiry: -+ expiry = self._last_modification() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE) -+ return expiry -+ - def load(self): - session_data = {} - try: -@@ -88,15 +98,13 @@ class SessionStore(SessionBase): - self.create() - - # Remove expired sessions. -- expiry_age = self.get_expiry_age( -- modification=self._last_modification(), -- expiry=session_data.get('_session_expiry')) -- if expiry_age < 0: -+ expiry_age = self.get_expiry_age(expiry=self._expiry_date(session_data)) -+ if expiry_age <= 0: - session_data = {} - self.delete() - self.create() - except (IOError, SuspiciousOperation): -- self.create() -+ self._session_key = None - return session_data - - def create(self): -@@ -107,10 +115,11 @@ class SessionStore(SessionBase): - except CreateError: - continue - self.modified = True -- self._session_cache = {} - return - - def save(self, must_create=False): -+ if self.session_key is None: -+ return self.create() - # Get the session data now, before we start messing - # with the file it is stored within. - session_data = self._get_session(no_load=must_create)