[askbot: 1/3] Getting the latest working on F18 and el6.
Ralph Bean ☃
ralph at fedoraproject.org
Mon Feb 25 16:47:54 UTC 2013
commit 3f088bb01244c28a719227d4b2eeb970bef93094
Author: Ralph Bean <rbean at redhat.com>
Date: Wed Feb 6 12:41:51 2013 -0500
Getting the latest working on F18 and el6.
.gitignore | 1 +
askbot-httpd.conf | 17 ++--
askbot-pystache-templatespec.patch | 25 +++++
askbot-remove-test-skins.patch | 38 +++++++
askbot-settings.py | 126 ++++++++++++++++++-----
askbot.spec | 196 ++++++++++++++++++++++++++++++------
askbot.wsgi | 1 +
7 files changed, 335 insertions(+), 69 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 24da08f..814b442 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
/askbot-0.7.34.tar.gz
/askbot-0.7.36.tar.gz
/askbot-0.7.40.tar.gz
+*.swp
diff --git a/askbot-httpd.conf b/askbot-httpd.conf
index bf902d9..2240ff6 100644
--- a/askbot-httpd.conf
+++ b/askbot-httpd.conf
@@ -1,9 +1,8 @@
-Alias /m/ /usr/lib/python2.6/site-packages/askbot/skins/
-Alias /admin/media/ /usr/lib/python2.6/site-packages/django/contrib/admin/media/
+Alias /m/ /usr/lib/python2.7/site-packages/askbot/skins/
+Alias /admin/media/ /usr/lib/python2.7/site-packages/django/contrib/admin/media/
-<Directory /usr/lib/python2.6/site-packages/askbot/skins>
- Order deny,allow
- Allow from all
+<Directory /usr/lib/python2.7/site-packages/askbot/skins>
+ Require local
</Directory>
WSGIDaemonProcess askbot user=apache group=apache maximum-requests=1000 display-name=askbot processes=6 threads=1 shutdown-timeout=10 python-path=/etc/askbot/sites/ask
@@ -15,14 +14,12 @@ WSGIPythonOptimize 1
WSGIScriptAlias / /usr/sbin/askbot.wsgi
<Location />
- WSGIProcessGroup askbot
- Order deny,allow
- Allow from all
+ WSGIProcessGroup askbot
+ Require local
</Location>
Alias /upfiles/ /var/lib/askbot/upfiles/ask/
<Directory /var/lib/askbot/upfiles/ask>
- Order deny,allow
- Allow from all
+ Require local
</Directory>
diff --git a/askbot-pystache-templatespec.patch b/askbot-pystache-templatespec.patch
new file mode 100644
index 0000000..f2ad6e8
--- /dev/null
+++ b/askbot-pystache-templatespec.patch
@@ -0,0 +1,25 @@
+From 22881df0fde0c6974afb263c0feb0123b55beded Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Tue, 5 Feb 2013 13:42:36 -0500
+Subject: [PATCH] pystache-templatespec
+
+---
+ askbot/deployment/template_loader.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/askbot/deployment/template_loader.py b/askbot/deployment/template_loader.py
+index fe7c11e..e681f47 100644
+--- a/askbot/deployment/template_loader.py
++++ b/askbot/deployment/template_loader.py
+@@ -3,7 +3,7 @@ import pystache
+
+ SOURCE_DIR = os.path.dirname(os.path.dirname(__file__))
+
+-class SettingsTemplate(pystache.View):
++class SettingsTemplate(pystache.TemplateSpec):
+ '''Class for settings'''
+
+ template_path = os.path.join(SOURCE_DIR, 'setup_templates')
+--
+1.8.1
+
diff --git a/askbot-remove-test-skins.patch b/askbot-remove-test-skins.patch
new file mode 100644
index 0000000..f5baf45
--- /dev/null
+++ b/askbot-remove-test-skins.patch
@@ -0,0 +1,38 @@
+From d1ad03a2c94cca69bf713dc23a60d378d8821c1a Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Tue, 5 Feb 2013 10:19:06 -0500
+Subject: [PATCH 2/2] Remove test-skins
+
+---
+ askbot/startup_procedures.py | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py
+index 29754b4..4ac7a3a 100644
+--- a/askbot/startup_procedures.py
++++ b/askbot/startup_procedures.py
+@@ -349,16 +349,11 @@ class SettingsTester(object):
+
+
+ def test_new_skins():
+- """tests that there are no directories in the `askbot/skins`
+- because we've moved skin files a few levels up"""
+- askbot_root = askbot.get_install_directory()
+- for item in os.listdir(os.path.join(askbot_root, 'skins')):
+- item_path = os.path.join(askbot_root, 'skins', item)
+- if os.path.isdir(item_path):
+- raise AskbotConfigError(
+- ('Time to move skin files from %s.\n'
+- 'Now we have `askbot/templates` and `askbot/media`') % item_path
+- )
++ """ Don't do anything..
++ The skins framework seems to be confused about itself.
++ """
++ pass
++
+
+ def test_staticfiles():
+ """tests configuration of the staticfiles app"""
+--
+1.8.1
+
diff --git a/askbot-settings.py b/askbot-settings.py
index 8a18cc1..f303780 100644
--- a/askbot-settings.py
+++ b/askbot-settings.py
@@ -3,9 +3,11 @@ import os.path
import logging
import sys
import askbot
+import site
#this line is added so that we can import pre-packaged askbot dependencies
-sys.path.append(os.path.join(os.path.dirname(askbot.__file__), 'deps'))
+ASKBOT_ROOT = os.path.abspath(os.path.dirname(askbot.__file__))
+site.addsitedir(os.path.join(ASKBOT_ROOT, 'deps'))
DEBUG = False#set to True to enable debugging
TEMPLATE_DEBUG = False#keep false when debugging jinja2 templates
@@ -17,12 +19,19 @@ ADMINS = (
MANAGERS = ADMINS
-DATABASE_ENGINE = 'postgresql_psycopg2' # only postgres (>8.3) and mysql are supported so far others have not been tested yet
-DATABASE_NAME = '@DATABASENAME@' # Or path to database file if using sqlite3.
-DATABASE_USER = '' # Not used with sqlite3.
-DATABASE_PASSWORD = '' # Not used with sqlite3.
-DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
+# By default, we use a sqlite database. Other dbs are possible.
+DATABASES = {
+ 'default': {
+ # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'ENGINE': 'django.db.backends.sqlite3',
+ # Or path to database file if using sqlite3.
+ 'NAME': '/var/cache/askbot/askbot.db',
+ 'USER': '', # Not used with sqlite3.
+ 'PASSWORD': '', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
#outgoing mail server settings
SERVER_EMAIL = ''
@@ -66,31 +75,34 @@ SITE_ID = 1
USE_I18N = True
LANGUAGE_CODE = 'en'
-# Absolute path to the directory that holds media.
+# Absolute path to the directory that holds uploaded media
# Example: "/home/media/media.lawrence.com/"
-ASKBOT_FILE_UPLOAD_DIR = '/var/lib/askbot/upfiles/@SITENAME@'
+MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'askbot', 'upfiles')
+MEDIA_URL = '/upfiles/'
+STATIC_URL = '/m/'#this must be different from MEDIA_URL
+
PROJECT_ROOT = os.path.dirname(__file__)
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/admin/media/'
+ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
# Make up some unique string, and don't share it with anybody.
-SECRET_KEY = 'sdljdfjkldsflsdjkhsjkldgjlsdgfs s '
+SECRET_KEY = 'c1cfe750f9bcea3f5b6a6dfc2e910d2q'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.load_template_source',
- 'django.template.loaders.app_directories.load_template_source',
- #below is askbot stuff for this tuple
- 'askbot.skins.loaders.load_template_source',
+ 'askbot.skins.loaders.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ 'django.template.loaders.filesystem.Loader',
#'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
#'django.middleware.gzip.GZipMiddleware',
+ #'askbot.middleware.locale.LocaleMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
#'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
@@ -100,7 +112,7 @@ MIDDLEWARE_CLASSES = (
#below is askbot stuff for this tuple
'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware',
- 'askbot.middleware.pagesize.QuestionsPageSizeMiddleware',
+ 'askbot.middleware.forum_mode.ForumModeMiddleware',
'askbot.middleware.cancel.CancelActionMiddleware',
'django.middleware.transaction.TransactionMiddleware',
#'debug_toolbar.middleware.DebugToolbarMiddleware',
@@ -128,7 +140,7 @@ DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
#TEMPLATE_DIRS = (,) #template have no effect in askbot, use the variable below
-#ASKBOT_EXTRA_SKIN_DIR = #path to your private skin collection
+#ASKBOT_EXTRA_SKINS_DIR = #path to your private skin collection
#take a look here http://askbot.org/en/question/207/
TEMPLATE_CONTEXT_PROCESSORS = (
@@ -136,22 +148,26 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'askbot.context.application_settings',
#'django.core.context_processors.i18n',
'askbot.user_messages.context_processors.user_messages',#must be before auth
- 'django.core.context_processors.auth', #this is required for admin
+ 'django.contrib.auth.context_processors.auth', #this is required for the admin app
'django.core.context_processors.csrf', #necessary for csrf protection
)
INSTALLED_APPS = (
+ 'longerusername',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
+ 'django.contrib.staticfiles',
#all of these are needed for the askbot
'django.contrib.admin',
'django.contrib.humanize',
'django.contrib.sitemaps',
#'debug_toolbar',
+ #Optional, to enable haystack search
+ #'haystack',
'askbot',
'askbot.deps.django_authopenid',
#'askbot.importers.stackexchange', #se loader
@@ -163,8 +179,9 @@ INSTALLED_APPS = (
'djcelery',
'djkombu',
'followit',
+ 'tinymce',
+ 'group_messaging',
#'avatar',#experimental use git clone git://github.com/ericflo/django-avatar.git$
- #requires setting of MEDIA_ROOT and MEDIA_URL
)
@@ -173,9 +190,12 @@ INSTALLED_APPS = (
CACHE_BACKEND = 'locmem://'
#needed for django-keyedcache
CACHE_TIMEOUT = 6000
+#sets a special timeout for livesettings if you want to make them different
+LIVESETTINGS_CACHE_TIMEOUT = CACHE_TIMEOUT
CACHE_PREFIX = 'askbot' #make this unique
+CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
#If you use memcache you may want to uncomment the following line to enable memcached based sessions
-#SESSION_ENGINE = 'django.contrib.sessions.backends.cache_db'
+#SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
@@ -183,10 +203,9 @@ AUTHENTICATION_BACKENDS = (
)
#logging settings
-LOG_FILENAME = 'askbot.log'
logging.basicConfig(
- filename=os.path.join('/var', 'log', 'askbot', LOG_FILENAME),
- level=logging.CRITICAL,
+ filename='/var/log/askbot/askbot.log',
+ level=logging.INFO,
format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s',
)
@@ -197,20 +216,73 @@ logging.basicConfig(
# ASKBOT_URL = 'forum/'
#
ASKBOT_URL = '' #no leading slash, default = '' empty string
+ASKBOT_TRANSLATE_URL = True #translate specific URLs
_ = lambda v:v #fake translation function for the login url
LOGIN_URL = '/%s%s%s' % (ASKBOT_URL,_('account/'),_('signin/'))
+LOGIN_REDIRECT_URL = ASKBOT_URL #adjust, if needed
#note - it is important that upload dir url is NOT translated!!!
#also, this url must not have the leading slash
-ASKBOT_UPLOADED_FILES_URL = '%s%s' % (ASKBOT_URL, 'upfiles/')
ALLOW_UNICODE_SLUGS = False
ASKBOT_USE_STACKEXCHANGE_URLS = False #mimic url scheme of stackexchange
#Celery Settings
-BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
+BROKER_TRANSPORT = "djkombu.transport.DatabaseTransport"
CELERY_ALWAYS_EAGER = True
import djcelery
djcelery.setup_loader()
+DOMAIN_NAME = ''
+
+CSRF_COOKIE_NAME = '_csrf'
+#https://docs.djangoproject.com/en/1.3/ref/contrib/csrf/
+#CSRF_COOKIE_DOMAIN = DOMAIN_NAME
+
+STATIC_ROOT = os.path.join(ASKBOT_ROOT, "static")
+STATICFILES_DIRS = (
+ ('default/media', os.path.join(ASKBOT_ROOT, 'media')),
+)
-CSRF_COOKIE_NAME = 'askbot_scrf'
-CSRF_COOKIE_DOMAIN = ''#enter domain name here - e.g. example.com
+RECAPTCHA_USE_SSL = True
+
+#HAYSTACK_SETTINGS
+ENABLE_HAYSTACK_SEARCH = False
+HAYSTACK_SITECONF = 'askbot.search.haystack'
+#more information
+#http://django-haystack.readthedocs.org/en/v1.2.7/settings.html
+HAYSTACK_SEARCH_ENGINE = 'simple'
+
+TINYMCE_COMPRESSOR = True
+TINYMCE_SPELLCHECKER = False
+TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'default/media/js/tinymce/')
+TINYMCE_URL = STATIC_URL + 'default/media/js/tinymce/'
+TINYMCE_DEFAULT_CONFIG = {
+ 'plugins': 'askbot_imageuploader,askbot_attachment',
+ 'convert_urls': False,
+ 'theme': 'advanced',
+ 'content_css': STATIC_URL + 'default/media/style/tinymce/content.css',
+ 'force_br_newlines': True,
+ 'force_p_newlines': False,
+ 'forced_root_block': '',
+ 'mode' : 'textareas',
+ 'oninit': "function(){ tinyMCE.activeEditor.setContent(askbot['data']['editorContent'] || ''); }",
+ 'plugins': 'askbot_imageuploader,askbot_attachment',
+ 'theme_advanced_toolbar_location' : 'top',
+ 'theme_advanced_toolbar_align': 'left',
+ 'theme_advanced_buttons1': 'bold,italic,underline,|,bullist,numlist,|,undo,redo,|,link,unlink,askbot_imageuploader,askbot_attachment',
+ 'theme_advanced_buttons2': '',
+ 'theme_advanced_buttons3' : '',
+ 'theme_advanced_path': False,
+ 'theme_advanced_resizing': True,
+ 'theme_advanced_resize_horizontal': False,
+ 'theme_advanced_statusbar_location': 'bottom',
+ 'width': '723',
+ 'height': '250'
+}
+
+#delayed notifications, time in seconds, 15 mins by default
+NOTIFICATION_DELAY_TIME = 60 * 15
+
+GROUP_MESSAGING = {
+ 'BASE_URL_GETTER_FUNCTION': 'askbot.models.user_get_profile_url',
+ 'BASE_URL_PARAMS': {'section': 'messages', 'sort': 'inbox'}
+}
diff --git a/askbot.spec b/askbot.spec
index c5077d3..f247091 100644
--- a/askbot.spec
+++ b/askbot.spec
@@ -1,6 +1,6 @@
Name: askbot
-Version: 0.7.40
-Release: 5%{?dist}
+Version: 0.7.48
+Release: 8%{?dist}
Summary: Question and Answer forum
Group: Applications/Publishing
License: GPLv3+
@@ -10,25 +10,76 @@ Source1: askbot.wsgi
Source2: askbot-settings.py
Source3: askbot-httpd.conf
Source4: README.fedora
+
+Patch0: askbot-remove-test-skins.patch
+Patch1: askbot-pystache-templatespec.patch
+
BuildArch: noarch
BuildRequires: python-setuptools python-devel gettext
-Requires: python-django python-django-south
-Requires: python-django-keyedcache python-django-robots python-django-countries
-Requires: python-django-kombu python-django-threaded-multihost
-Requires: python-html5lib python-oauth2 python-coffin python-markdown2
-Requires: python-recaptcha-client MySQL-python python-openid python-amqplib
-Requires: python-unidecode python-httplib2 python-psycopg2 python-akismet
-Requires: python-multi-registry python-import-utils python-wordpress-xmlrpc
-Requires: python-django-recaptcha-works python-django-picklefield pystache
-Requires: python-django-extra-form-fields python-django-authenticator
-
-# optional dependencies
-Requires: python-django-followit django-avatar
+%if 0%{?rhel}
+Requires: Django
+Requires: Django-south
+Requires: django-keyedcache
+Requires: django-robots
+Requires: django-countries
+Requires: django-kombu
+Requires: django-threaded-multihost
+Requires: django-recaptcha-works
+Requires: django-picklefield
+Requires: django-extra-form-fields
+Requires: django-authenticator
+Requires: django-celery
+Requires: django-followit
+Requires: django-avatar
+%else
+Requires: python-django
+Requires: python-django-south
+Requires: python-django-keyedcache
+Requires: python-django-robots
+Requires: python-django-countries
+Requires: python-django-kombu
+Requires: python-django-threaded-multihost
+Requires: python-django-recaptcha-works
+Requires: python-django-picklefield
+Requires: python-django-extra-form-fields
+Requires: python-django-authenticator
+Requires: python-django-celery
+Requires: python-django-followit
+Requires: python-django-avatar
+%endif
+
+Requires: python-django-tinymce
+Requires: python-django-longerusername
+
+Requires: python-billiard
+Requires: python-html5lib
+Requires: python-oauth2
+Requires: python-coffin
+Requires: python-markdown2
+Requires: python-recaptcha-client
+Requires: python-openid
+Requires: python-amqplib
+Requires: python-unidecode
+Requires: python-httplib2
+Requires: python-akismet
+Requires: python-multi-registry
+Requires: python-import-utils
+Requires: python-wordpress-xmlrpc
+Requires: pystache
+Requires: tinymce
+Requires: python-beautifulsoup4
+Requires: pytz
+Requires: python-sanction
+Requires: python-lamson
+
+# Database backend -- Not required; we used sqlite out of the box
+#Requires: MySQL-python
+#Requires: python-psycopg2
+
# for building the doc
Requires: python-sphinx
-Requires: python-django-celery
Requires: httpd
%if 0%{?rhel}
@@ -37,8 +88,11 @@ Requires: python-dateutil15
Requires: python-dateutil
%endif
+# For setting selinux context in %%post
+Requires: policycoreutils-python
+
%description
-Question and answer forum written in python and django.
+Question and answer forum written in python and django.
Features:
@@ -50,7 +104,14 @@ Features:
* can import data from stack-exchange database file
%prep
-%setup -q
+%setup -q
+%patch0 -p1 -b .skins
+
+%if 0%{?rhel}
+# Don't patch for pystache on rhel. pystache is older there.
+%else
+%patch1 -p1 -b .stache
+%endif
# remove empty files
rm -rf %{name}/doc/build/html/.buildinfo
@@ -70,13 +131,17 @@ sed -i -e '1d' %{name}/setup_templates/manage.py
's:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \
>> %{name}.lang
-# add /etc/askbot, wsgi and httpd configuration files
+# add /etc/askbot, wsgi and httpd configuration files
install -d %{buildroot}/%{_sbindir}/
install -p -m 755 %{SOURCE1} %{buildroot}%{_sbindir}/
rm -rf %{buildroot}/%{python_sitelib}/%{name}/setup_templates/{upfiles,log}
rm -rf %{buildroot}/%{python_sitelib}/%{name}/upfiles
+# remove bundled tinymce.
+rm -rf %{buildroot}/%{python_sitelib}/%{name}/media/js/tinymce
+ln -s /usr/share/tinymce/jscripts/tiny_mce %{buildroot}/%{python_sitelib}/%{name}/media/js/tinymce
+
install -p -m 644 %{SOURCE2} %{buildroot}/%{python_sitelib}/%{name}/setup_templates/settings.py
install -d %{buildroot}/%{_sysconfdir}/%{name}/setup_templates
cp -r %{buildroot}/%{python_sitelib}/%{name}/setup_templates/* \
@@ -85,23 +150,57 @@ cp -r %{buildroot}/%{python_sitelib}/%{name}/setup_templates/* \
install -d %{buildroot}/%{_sysconfdir}/%{name}/sites/ask/config
cp -r %{buildroot}/%{python_sitelib}/%{name}/setup_templates/* \
%{buildroot}/%{_sysconfdir}/%{name}/sites/ask/config
-
-sed -i 's/@SITENAME@/ask/g' %{buildroot}/%{_sysconfdir}/%{name}/sites/ask/config/settings.py
-sed -i 's/postgresql_psycopg2/sqlite3/' %{buildroot}/%{_sysconfdir}/%{name}/sites/ask/config/settings.py
-sed -i 's/@DATABASENAME@/\/var\/lib\/askbot\/ask.sqlite/g' %{buildroot}/%{_sysconfdir}/%{name}/sites/ask/config/settings.py
-
+cp %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}/sites/ask/config/settings.py
install -d %{buildroot}/%{_sysconfdir}/httpd/conf.d/
install -p -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/httpd/conf.d/askbot.conf
+
%if 0%{?rhel}
sed -i 's/python2.7/python2.6/g' %{buildroot}/%{_sysconfdir}/httpd/conf.d/askbot.conf
%endif
install -d %{buildroot}/%{_localstatedir}/log/%{name}
+install -d %{buildroot}/%{_localstatedir}/cache/%{name}
install -d %{buildroot}/%{_sharedstatedir}/%{name}/upfiles/ask
install -p -m 644 %{SOURCE4} .
-%files -f %{name}.lang
+%post
+# Question -> Can selinux be managed in attr(...)?
+chcon -R -t httpd_log_t %{_localstatedir}/log/%{name}/
+chcon -R -t httpd_sys_rw_content_t %{_localstatedir}/cache/%{name}/
+
+## We may or may not want to run the %%post steps below for other users.
+#
+## First, jump into the config dir. manage.py expects settings.py to be in cwd
+#pushd %{_sysconfdir}/%{name}/sites/ask/config/
+#
+## Gather up dynamic resources and put them in a static/ dir
+#mkdir -p %{python_sitelib}/%{name}/static/
+#echo "yes" | python manage.py collectstatic
+#
+## Make db schema updates
+#echo "no" | python manage.py syncdb
+#python manage.py migrate askbot
+#python manage.py migrate django_authopenid
+#
+#popd
+#
+## Symlink the default skin into the skins directory
+#ln -s %{python_sitelib}/%{name}/static/default \
+# %{python_sitelib}/%{name}/skins/default
+
+# Set perm mask for httpd
+chown -R apache:apache %{_localstatedir}/log/%{name}/
+chown -R apache:apache %{_localstatedir}/cache/%{name}/
+
+#%%preun
+## These get dynamically generated in the %%post section and so don't
+## get taken care of by the %%files cleanup
+#rm -rf %{python_sitelib}/askbot/static
+#rm -rf %{python_sitelib}/askbot/skins
+#rm -rf %{python_sitelib}/askbot/locale
+
+%files -f %{name}.lang
%doc PKG-INFO LICENSE COPYING AUTHORS README.rst README.fedora
%{_bindir}/askbot-setup
@@ -111,6 +210,7 @@ install -p -m 644 %{SOURCE4} .
%config(noreplace) %attr(-,apache,apache) %{_sysconfdir}/%{name}/sites
%config(noreplace) %{_sysconfdir}/httpd/conf.d/askbot.conf
%attr(-,apache,apache) %{_localstatedir}/log/%{name}/
+%attr(-,apache,apache) %{_localstatedir}/cache/%{name}/
%attr(-,apache,apache) %{_sharedstatedir}/%{name}/
%dir %{python_sitelib}/%{name}/
%dir %{python_sitelib}/%{name}/locale/
@@ -146,9 +246,41 @@ install -p -m 644 %{SOURCE4} .
%{python_sitelib}/%{name}/patches/
%{python_sitelib}/%{name}/search/
%{python_sitelib}/%{name}/user_messages/
+%{python_sitelib}/%{name}/deps
+%{python_sitelib}/%{name}/mail
+%{python_sitelib}/%{name}/media
+%{python_sitelib}/%{name}/templates
%{python_sitelib}/askbot*.egg-info
%changelog
+* Tue Feb 12 2013 Ralph Bean <rbean at redhat.com> 0.7.48-8
+- Conditionalized pystache patch for el6
+- Disabled preun section.
+
+* Tue Feb 05 2013 Ralph Bean <rbean at redhat.com> 0.7.48-6
+- Conditionalized python-django* requires for el6
+- Patched some problems with askbot/startup_procedures.py
+- Updated settings.py with new needed parameters.
+- Added a commented %%post section with db upgrade path.
+- Fixed WSGI sys.stdout errors.
+
+* Mon Feb 04 2013 Ralph Bean <rbean at redhat.com> 0.7.48-4
+- Added django-longerusername as a requirement
+- Added django-tinymce as a requirement
+- Added pytz as a requirement
+- Added python-sanction as a requirement
+- Added python-lamson as a requirement
+
+* Mon Feb 04 2013 Kevin Fenzi <kevin at scrye.com> 0.7.48-1
+- Update to 0.7.48
+
+* Wed Jan 23 2013 Kevin Fenzi <kevin at scrye.com> 0.7.47-1
+- Update to 0.7.47.
+
+* Tue Dec 04 2012 Kevin Fenzi <kevin at scrye.com> 0.7.44-1
+- Update to 0.7.44.
+- See http://askbot.org/doc/changelog.html for full changes.
+
* Wed Aug 22 2012 Parag Nemade <paragn AT fedoraproject DOT org> - 0.7.40-5
- Hardcoding versioned Requires is not recommended
@@ -193,8 +325,8 @@ install -p -m 644 %{SOURCE4} .
* restored facebook login after FB changed the procedure (Evgeny)
- update to 0.7.38
* xss vulnerability fix, issue found by Radim Řehůřek (Evgeny)
-- update to 0.7.37
- * added basic slugification treatment to question titles with
+- update to 0.7.37
+ * added basic slugification treatment to question titles with
``ALLOW_UNICODE_SLUGS = True`` (Evgeny)
* added verification of the project directory name to
make sure it does not contain a `.` (dot) symbol (Evgeny)
@@ -235,7 +367,7 @@ install -p -m 644 %{SOURCE4} .
* Wed Nov 30 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.32-1
- update to 0.7.32
* Bugfixes in English locale (Evgeny)
-- 0.7.31
+- 0.7.31
* Added ``askbot_create_test_fixture`` management command (Dejan Noveski)
* Integrated new test fixture into the page load test cases (Dejan Noveski)
* Added an embeddable widget for the questions list matching tags (Daniel Mican, Evgeny Fadeev, Dejan Noveski)
@@ -274,7 +406,7 @@ install -p -m 644 %{SOURCE4} .
* improved the ``askbot-setup`` script (Adolfo, Evgeny)
* merge users management command (Daniel Mican)
* anonymous caching of the question page (Vlad Bokov)
-- 0.7.26
+- 0.7.26
* added settings for email subscription defaults (Adolfo)
* resolved duplicate notifications on posts with mentions (Evegeny)
* added color-animated transitions when urls with hash tags are visited (Adolfo)
@@ -318,7 +450,7 @@ install -p -m 644 %{SOURCE4} .
- update to 0.7.22
* removed printing of log message on missing optional media resources (Evgeny Fadeev)
* fixed a layout bug on tags page (Evgeny Fadeev)
-
+
* Thu Sep 01 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.21-1
- update to 0.7.21
* media resource incremented automatically (Adolfo Fitoria, Evgeny Fadeev)
@@ -350,7 +482,7 @@ install -p -m 644 %{SOURCE4} .
* Thu Aug 11 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.17-1
- new upstream release
* fixes issue with referencing username with capitalization differences
- * allow admins to add others as admins
+ * allow admins to add others as admins
- requires django-celery 2.2.7
* Thu Aug 07 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.15-1
@@ -360,7 +492,7 @@ install -p -m 644 %{SOURCE4} .
- upstream dropped empty version.py file
* Thu Aug 03 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.14-1
-- new upstream release.
+- new upstream release.
- upstream has renamed startforum to askbot-setup
- included copy of license and some documentation fixes
- upstream removed empty files, unnecessary executable bit and shebang in files
@@ -399,7 +531,7 @@ install -p -m 644 %{SOURCE4} .
- changes from Praveen Kumar to fix all relevant rpmlint warnings and errors
* Thu Jul 14 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.7-1
-- new upstream release.
+- new upstream release.
- split out bundled grapefruit, django recaptcha dependencies
* Sun Jun 26 2011 Rahul Sundaram <sundaram at fedoraproject.org> - 0.7.1-1
diff --git a/askbot.wsgi b/askbot.wsgi
index f435052..89dbfe8 100644
--- a/askbot.wsgi
+++ b/askbot.wsgi
@@ -1,6 +1,7 @@
#!/usr/bin/python
import os
import sys
+sys.stdout = sys.stderr
os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'
More information about the scm-commits
mailing list