orion pushed to cobbler (f22). "Support django 1.8 in Fedora 22+"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue May 12 15:30:58 UTC 2015


From 52a2b7bd964dd11d7378e325588bff135c7ba6f1 Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion at cora.nwra.com>
Date: Tue, 12 May 2015 09:28:53 -0600
Subject: Support django 1.8 in Fedora 22+


diff --git a/cobbler-django17.patch b/cobbler-django17.patch
new file mode 100644
index 0000000..48e8fe4
--- /dev/null
+++ b/cobbler-django17.patch
@@ -0,0 +1,12 @@
+diff -up cobbler-2.6.8/web/cobbler.wsgi.django17 cobbler-2.6.8/web/cobbler.wsgi
+--- cobbler-2.6.8/web/cobbler.wsgi.django17	2015-05-06 13:36:59.000000000 -0600
++++ cobbler-2.6.8/web/cobbler.wsgi	2015-05-12 09:25:12.742538892 -0600
+@@ -22,6 +22,6 @@ def application(environ, start_response)
+         site.addsitedir(distutils.sysconfig.get_python_lib(prefix=environ['VIRTUALENV']))
+         # Now all modules are available even under a virtualenv
+ 
+-    import django.core.handlers.wsgi
+-    _application = django.core.handlers.wsgi.WSGIHandler()
++    from django.core.wsgi import get_wsgi_application
++    _application = get_wsgi_application()
+     return _application(environ, start_response)
diff --git a/cobbler.spec b/cobbler.spec
index 79d81eb..0dacf7c 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -16,13 +16,16 @@ Name: cobbler
 License: GPLv2+
 AutoReq: no
 Version: 2.6.8
-Release: 1%{?dist}
+Release: 2%{?dist}
 Source0: https://github.com/cobbler/cobbler/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 # Support newer virt-install - https://bugzilla.redhat.com/show_bug.cgi?id=1188424
 Patch0: cobbler-virtinstall.patch
 # Support centos release numbering
 # https://bugzilla.redhat.com/show_bug.cgi?id=1201879
 Patch1: cobbler-centos.patch
+# Support django1.7+
+# https://github.com/cobbler/cobbler-web/issues/9
+Patch2: cobbler-django17.patch
 Group: Applications/System
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildArch: noarch
@@ -83,6 +86,10 @@ other applications.
 %setup -q
 %patch0 -p1 -b .virtinstall
 %patch1 -p1 -b .centos
+# django 1.8 on Fedora 22+
+%if 0%{?fedora} >= 22
+%patch2 -p1 -b .django17
+%endif
 
 %build
 %{__python2} setup.py build
@@ -277,6 +284,9 @@ sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" /usr/share/cobbler/
 
 
 %changelog
+* Tue May 12 2015 Orion Poplawski <orion at cora.nwra.com> - 2.6.8-2
+- Support django 1.8 in Fedora 22+
+
 * Fri May 8 2015 Orion Poplawski <orion at cora.nwra.com> - 2.6.8-1
 - Update to 2.6.8
 - Backport upstream patch to fix centos version detection (bug #1201879)
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/cobbler.git/commit/?h=f22&id=52a2b7bd964dd11d7378e325588bff135c7ba6f1


More information about the scm-commits mailing list