summaryrefslogtreecommitdiff
path: root/community/cherokee
diff options
context:
space:
mode:
Diffstat (limited to 'community/cherokee')
-rw-r--r--community/cherokee/PKGBUILD21
-rw-r--r--community/cherokee/fix-ctk-path-handler-match.patch16
2 files changed, 30 insertions, 7 deletions
diff --git a/community/cherokee/PKGBUILD b/community/cherokee/PKGBUILD
index 077474085..0e5498b2c 100644
--- a/community/cherokee/PKGBUILD
+++ b/community/cherokee/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 54590 2011-08-20 19:35:48Z foutrelis $
+# $Id: PKGBUILD 55615 2011-09-16 00:44:29Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Link Dupont <link@subpop.net>
pkgname=cherokee
-pkgver=1.2.98
-pkgrel=1
+pkgver=1.2.99
+pkgrel=3
pkgdesc="A very fast, flexible and easy to configure Web Server"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.cherokee-project.com/"
@@ -24,14 +24,19 @@ backup=('etc/cherokee/cherokee.conf'
options=('!libtool')
source=(http://www.cherokee-project.com/download/1.2/$pkgver/cherokee-$pkgver.tar.gz
cherokee.rc
- cherokee.logrotate)
-md5sums=('21b01e7d45c0e82ecc0c4257a9c27feb'
+ cherokee.logrotate
+ fix-ctk-path-handler-match.patch)
+md5sums=('c83115c3eebb29e6f2b4cc6fe699affe'
'a2d2b69c6220fab57cda4f531b680f9f'
- '8d69341bd4002bffd69c6e82ff6c905f')
+ '8d69341bd4002bffd69c6e82ff6c905f'
+ 'e9475edd26ee24d035783e5999244857')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ # Fix path matching bug in CTK apps (e.g. market)
+ patch -Np1 -i "$srcdir/fix-ctk-path-handler-match.patch"
+
# Use subdirectory for logs
sed -i -r 's|(%localstatedir%/log)|\1/cherokee|' cherokee.conf.sample.pre
@@ -63,9 +68,11 @@ package() {
chown -R http:http "$pkgdir/var/lib/$pkgname/graphs"
# Use Python 2
- sed -i 's/env python$/\02/' \
+ sed -i 's/env python$/&2/' \
"$pkgdir/usr/share/cherokee/admin/"{server,upgrade_config}.py \
"$pkgdir/usr/bin/"{CTK-run,cherokee-{admin-launcher,tweak}}
+ sed -i -r "s/['\"]python/&2/g" \
+ "$pkgdir/usr/share/cherokee/admin/wizards/django.py"
# Compile Python scripts
python2 -m compileall "$pkgdir"
diff --git a/community/cherokee/fix-ctk-path-handler-match.patch b/community/cherokee/fix-ctk-path-handler-match.patch
new file mode 100644
index 000000000..abd20c5ef
--- /dev/null
+++ b/community/cherokee/fix-ctk-path-handler-match.patch
@@ -0,0 +1,16 @@
+diff -upr cherokee-1.2.99.orig/admin/CTK/CTK/Server.py cherokee-1.2.99/admin/CTK/CTK/Server.py
+--- cherokee-1.2.99.orig/admin/CTK/CTK/Server.py 2011-06-06 14:17:35.000000000 +0300
++++ cherokee-1.2.99/admin/CTK/CTK/Server.py 2011-09-16 03:31:06.000000000 +0300
+@@ -121,8 +121,11 @@ class ServerHandler (pyscgi.SCGIHandler)
+ my_thread.scgi_conn = self
+ my_thread.request_url = url
+
++ # Drop the query string before matching against the handlers
++ path = url.split('?', 1)[0]
++
+ for published in server._web_paths:
+- if re.match (published._regex, url):
++ if re.match (published._regex, path):
+ # POST
+ if published._method == 'POST':
+ post = self._process_post()