[ReviewBoard] - Change mod_wsgi notification patch to the version submitted upstream - This warning will now only

Stephen Gallagher sgallagh at fedoraproject.org
Tue Jan 18 13:36:04 UTC 2011


commit 891ce06654a1bf8605fc3f986bf0185b1b07bab0
Author: Stephen Gallagher <sgallagh at redhat.com>
Date:   Tue Jan 18 08:35:54 2011 -0500

    - Change mod_wsgi notification patch to the version submitted upstream
    - This warning will now only be displayed if upgrading from an affected
    - version, rather than on all upgrades.
    - Don't install files used only for test purposes

 ...WSGI-users-that-config-changes-are-needed.patch |   43 ++++++++++++++++----
 ReviewBoard.spec                                   |   18 +++++++-
 2 files changed, 50 insertions(+), 11 deletions(-)
---
diff --git a/FED02-Notify-WSGI-users-that-config-changes-are-needed.patch b/FED02-Notify-WSGI-users-that-config-changes-are-needed.patch
index 22654a9..80aba2c 100644
--- a/FED02-Notify-WSGI-users-that-config-changes-are-needed.patch
+++ b/FED02-Notify-WSGI-users-that-config-changes-are-needed.patch
@@ -1,23 +1,50 @@
-From 8f44b649e53ef72aad1ab6196479dab68852a9d7 Mon Sep 17 00:00:00 2001
+From 02be4fe37e86b451f7830176ce73c0e901027f21 Mon Sep 17 00:00:00 2001
 From: Stephen Gallagher <sgallagh at redhat.com>
 Date: Mon, 10 Jan 2011 11:18:47 -0500
 Subject: [PATCH 2/2] Notify WSGI users that config changes are needed
 
+When upgrading from 1.5.1 or older, we should inform users that
+changes are required to their WSGI configuration to support the
+API properly
 ---
- reviewboard/cmdline/rbsite.py |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
+ reviewboard/cmdline/rbsite.py |   15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
 
 diff --git a/reviewboard/cmdline/rbsite.py b/reviewboard/cmdline/rbsite.py
-index a7917d87a19e8da64326efeffce512ea9bbf79fa..c94a1933c65b4f1e0ea935ad89bd7d90c5e19031 100755
+index a7917d87a19e8da64326efeffce512ea9bbf79fa..0d204a6ca1876746be78f5e35b39e37d8e906d2c 100755
 --- a/reviewboard/cmdline/rbsite.py
 +++ b/reviewboard/cmdline/rbsite.py
-@@ -1530,6 +1530,10 @@ class UpgradeCommand(Command):
+@@ -1500,12 +1500,19 @@ class UpgradeCommand(Command):
+ 
+     def run(self):
+         site.setup_settings()
++        os.environ["DJANGO_SETTINGS_MODULE"] = "reviewboard.settings"
+ 
+         data_dir_exists = os.path.exists(os.path.join(site.install_dir, "data"))
+ 
+         print "Rebuilding directory structure"
+         site.rebuild_site_directory()
+ 
++        from djblets.siteconfig.models import SiteConfiguration
++        siteconfig = SiteConfiguration.objects.get_current()
++        print "Upgrading from version %s" % str(siteconfig.version)
++
++        version = [int(x) for x in siteconfig.version.split(' ')[0].split('.')]
++
+         if options.upgrade_db:
+             print "Updating database. This may take a while."
+             site.sync_database()
+@@ -1530,6 +1537,14 @@ class UpgradeCommand(Command):
              print "    SetEnv HOME %s" % os.path.join(site.abs_install_dir,
                                                        "data")
  
-+        print "If you are upgrading from version 1.5.1 or older and are running ReviewBoard on mod_wsgi,"
-+        print "you need to update your Apache configuration as described at:"
-+        print "http://www.reviewboard.org/docs/releasenotes/dev/reviewboard/1.5.2/#important-updates"
++        if version[0] < 1 or (version[0] == 1 and (version[1] < 5 or (version[1] == 5 and version[2] < 2))):
++            print "############################################################################################"
++            print "# Warning: your configuration may require an update                                        #"
++            print "# If you are running ReviewBoard on mod_wsgi, you need to update your Apache configuration #"
++            print "# as described at:                                                                         #"
++            print "# http://www.reviewboard.org/docs/releasenotes/dev/reviewboard/1.5.2/#important-updates    #"
++            print "############################################################################################"
 +
  
  class ManageCommand(Command):
diff --git a/ReviewBoard.spec b/ReviewBoard.spec
index a2888b9..f158fee 100644
--- a/ReviewBoard.spec
+++ b/ReviewBoard.spec
@@ -2,7 +2,7 @@
 
 Name:           ReviewBoard
 Version:        1.5.2
-Release:        20%{?dist}
+Release:        21%{?dist}
 Summary:        Web-based code review tool
 Group:          Applications/Internet
 License:        MIT
@@ -52,8 +52,10 @@ rm -rf $RPM_BUILD_ROOT
 # --skip-build causes bad stuff in siteconfig.py as of 0.8.4
 %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
 
-# manage.py has a shebang and is meaningful to run; make it executable:
+# These scripts have a shebang and are meaningful to run; make them executable:
 chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/reviewboard/manage.py
+chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/reviewboard/cmdline/rbssh.py
+chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/reviewboard/cmdline/rbsite.py
 
 # RHEL 5 packages don't have egg-info files, so remove the requires.txt
 # It isn't needed, because RPM will guarantee the dependency itself
@@ -63,6 +65,10 @@ rm -f $RPM_BUILD_ROOT/%{python_sitelib}/%{name}*.egg-info/requires.txt
 %endif
 %endif
 
+# Remove test data from the installed packages
+rm -Rf $RPM_BUILD_ROOT/%{python_sitelib}/reviewboard/diffviewer/testdata \
+       $RPM_BUILD_ROOT/%{python_sitelib}/reviewboard/scmtools/testdata
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -80,6 +86,12 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/webtests/*.py*
 
 %changelog
+* Tue Jan 18 2011 Stephen Gallagher <sgallagh at redhat.com> - 1.5.2-21
+- Change mod_wsgi notification patch to the version submitted upstream
+- This warning will now only be displayed if upgrading from an affected
+- version, rather than on all upgrades.
+- Don't install files used only for test purposes
+
 * Mon Jan 10 2011 Stephen Gallagher <sgallagh at redhat.com> - 1.5.2-20
 - Add message to upgrade script to alert users that manual edits may be
 - required if using mod_wsgi
@@ -198,7 +210,7 @@ rm -rf $RPM_BUILD_ROOT
 - Add missing Requires: python-dateutil
 
 * Mon Jul 06 2010 Stephen Gallagher <sgallagh at redhat.com> - 1.5-13.rc1
-- Specfile change: more specific %files section
+- Specfile change: more specific %%files section
 
 * Mon Jul 06 2010 Stephen Gallagher <sgallagh at redhat.com> - 1.5-12.rc1
 - Added support for the iPhone and iPad


More information about the scm-commits mailing list