aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWen Heping <wen@FreeBSD.org>2010-12-09 06:24:40 +0000
committerWen Heping <wen@FreeBSD.org>2010-12-09 06:24:40 +0000
commitba406839442704b4f034ac484692a3815d0f1b22 (patch)
tree09651905880be763c79823eb20e8b602ae8d3831
parent8339bb9a0f6a24a731d1202504c687b0a4275ba5 (diff)
downloadports-ba406839442704b4f034ac484692a3815d0f1b22.tar.gz
ports-ba406839442704b4f034ac484692a3815d0f1b22.zip
- Update to 1.0.10
PR: ports/152585 Submitted by: Diego Schulz <dschulz@gmail.com> (maintainer)
Notes
Notes: svn path=/head/; revision=265902
-rw-r--r--www/cherokee/Makefile2
-rw-r--r--www/cherokee/distinfo4
-rw-r--r--www/cherokee/files/patch-cherokee-admin-market-Package.py9
-rw-r--r--www/cherokee/files/patch-cherokee-admin-systemstats.py177
-rw-r--r--www/cherokee/files/patch-cherokee-main_admin.c13
-rw-r--r--www/cherokee/files/patch-cherokee-util.c14
-rw-r--r--www/cherokee/pkg-plist9
7 files changed, 99 insertions, 129 deletions
diff --git a/www/cherokee/Makefile b/www/cherokee/Makefile
index bcf18f053296..09ec0607fbc5 100644
--- a/www/cherokee/Makefile
+++ b/www/cherokee/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= cherokee
-PORTVERSION= 1.0.9
+PORTVERSION= 1.0.10
CATEGORIES= www
MASTER_SITES= http://www.cherokee-project.com/download/1.0/${PORTVERSION}/ \
http://cherokee.osuosl.org/1.0/${PORTVERSION}/ \
diff --git a/www/cherokee/distinfo b/www/cherokee/distinfo
index 8cde62e803a1..f3338985b1c4 100644
--- a/www/cherokee/distinfo
+++ b/www/cherokee/distinfo
@@ -1,2 +1,2 @@
-SHA256 (cherokee-1.0.9.tar.gz) = ab637e411717a57545f374e0c44b1e1ecb421e0a57a70f5fb456029631c4db46
-SIZE (cherokee-1.0.9.tar.gz) = 5784929
+SHA256 (cherokee-1.0.10.tar.gz) = 688b8112506c2692cd0547dc9f4dc0837aa1a4b38d077ec3dacef3acacbe474d
+SIZE (cherokee-1.0.10.tar.gz) = 5689814
diff --git a/www/cherokee/files/patch-cherokee-admin-market-Package.py b/www/cherokee/files/patch-cherokee-admin-market-Package.py
deleted file mode 100644
index df2bebf22a92..000000000000
--- a/www/cherokee/files/patch-cherokee-admin-market-Package.py
+++ /dev/null
@@ -1,9 +0,0 @@
---- admin/market/Package.py-orig 2010-11-15 18:14:42.000000000 -0300
-+++ admin/market/Package.py 2010-11-15 18:14:57.000000000 -0300
-@@ -30,5 +30,5 @@
- self.status_setup = CTK.ImageStock('loading')
-
- table = CTK.Table()
-- table += [CTK.RawHTML ("Uncompress"),
-+ table += [CTK.RawHTML ("Uncompress"),]
-
diff --git a/www/cherokee/files/patch-cherokee-admin-systemstats.py b/www/cherokee/files/patch-cherokee-admin-systemstats.py
index d4e441e37142..63c2600b0b96 100644
--- a/www/cherokee/files/patch-cherokee-admin-systemstats.py
+++ b/www/cherokee/files/patch-cherokee-admin-systemstats.py
@@ -1,12 +1,19 @@
---- admin/SystemStats.py-orig 2010-11-03 13:54:15.000000000 -0300
-+++ admin/SystemStats.py 2010-11-17 20:21:01.000000000 -0300
-@@ -42,6 +42,9 @@
+--- admin/SystemStats.py-orig 2010-11-18 07:53:18.000000000 -0300
++++ admin/SystemStats.py 2010-11-25 20:38:23.000000000 -0300
+@@ -23,6 +23,7 @@
+ #
+
+ import os
++import popen
+ import re
+ import sys
+ import time
+@@ -42,6 +43,8 @@
_stats = System_stats__Linux()
elif sys.platform == 'darwin':
_stats = System_stats__Darwin()
-+ elif sys.platform.rstrip('987') == 'freebsd' :
++ elif sys.platform.startswith ('freebsd'):
+ _stats = System_stats__FreeBSD()
-+
assert _stats, "Not implemented"
return _stats
@@ -15,121 +22,121 @@
+
-+# FreeBSD implementation
++# FreeBSD implementation
+class System_stats__FreeBSD (Thread, System_stats):
+ CHECK_INTERVAL = 2
+
+ def __init__ (self):
+ Thread.__init__ (self)
+ System_stats.__init__ (self)
++
++ self.vmstat_fd = subprocess.Popen ("/usr/bin/vmstat -H -w%d" %(self.CHECK_INTERVAL),
++ shell=True, stdout = subprocess.PIPE, close_fds=True )
++
++ #first,second = self.vmstat_fd.stdout.readline(),self.vmstat_fd.stdout.readline()
+
-+ self.cpu._user_prev = 0
-+ self.cpu._sys_prev = 0
-+ self.cpu._nice_prev = 0
-+ self.cpu._idle_prev = 0
+
+ # Read valid values
+ self._read_hostname()
+ self._read_cpu()
+ self._read_memory()
-+ self._read_cpu_info()
++ self._read_cpu_and_mem_info()
+
+ self.start()
+
+ def _read_hostname (self):
-+ import os
-+
-+ hname = os.uname()[1]
-+
-+ if not hname:
-+ # Execute sysctl
-+ fd = subprocess.Popen ("/sbin/sysctl -n kern.hostname", shell=True, stdout = subprocess.PIPE)
-+ hname = fd.stdout.readline().strip()
-+
-+ self.hostname=hname
-+
-+ def _read_cpu_info (self):
-+
-+ fd = subprocess.Popen("/sbin/sysctl hw.ncpu hw.clockrate kern.threads.virtual_cpu", shell=True, stdout =subprocess.PIPE)
-+ lines = fd.stdout.readlines()
-+
-+
-+ ncpus=0
-+ vcpus=0
-+ clock=''
++ # First try: uname()
++ self.hostname = os.uname()[1]
++ if self.hostname:
++ return
++
++ # Second try: sysctl()
++ ret = popen.popen_sync ("/sbin/sysctl -n kern.hostname")
++ self.hostname = ret['stdout'].rstrip()
++ if self.hostname:
++ return
++
++ # Could not figure it out
++ self.hostname = "Unknown"
++
++ def _read_cpu_and_mem_info (self):
++ # Execute sysctl
++ ret = popen.popen_sync ("/sbin/sysctl hw.ncpu hw.clockrate kern.threads.virtual_cpu hw.pagesize vm.stats.vm.v_page_count")
++ lines = filter (lambda x: x, ret['stdout'].split('\n'))
++
++ # Parse output
++
++ # cpu related
++ ncpus = 0
++ vcpus = 0
++ clock = ''
++
++ # mem related
++ psize = 0
++ pcount = 0
+
+ for line in lines:
+ parts = line.split()
+ if parts[0] == 'hw.ncpu:':
+ ncpus = int(parts[1])
+ elif parts[0] == 'hw.clockrate:':
-+ clock = parts[1]
++ clock = parts[1]
+ elif parts[0] == 'kern.threads.virtual_cpu:':
-+ vcpus = parts[1]
++ vcpus = parts[1]
++ elif parts[0] == 'vm.stats.vm.v_page_count:':
++ pcount = int(parts[1])
++ elif parts[0] == 'hw.pagesize:':
++ psize = int(parts[1])
++
++ # Deal with cores
++ if vcpus:
++ self.cpu.num = str (int(vcpus) / int(ncpus))
++ self.cpu.cores = vcpus
++ else:
++ self.cpu.num = int (ncpus)
++ self.cpu.cores = int (ncpus)
++
++ # Global speed
++ self.cpu.speed = '%s MHz' %(clock)
+
+
-+ # FIXME: Is this reliable?
-+ self.cpu.num=str(int(vcpus)/int(ncpus))
-+ self.cpu.cores=vcpus
-+
-+ self.cpu.speed = '%s MHz' %(clock)
++ # Physical mem
++ self.mem.total = (psize * pcount) / 1024
+
+ def _read_cpu (self):
-+ fd = subprocess.Popen("/sbin/sysctl -n kern.cp_time", shell=True, stdout =subprocess.PIPE)
-+
-+ fields = fd.stdout.readline().split()
-+
-+ user = float(fields[0])
-+ sys = float(fields[1])
-+ nice = float(fields[2])
-+# intr = float(fields[3]) # 4th is interrupts, not used
-+ idle = float(fields[4])
+
-+ total = ((user - self.cpu._user_prev) + (sys - self.cpu._sys_prev) + (nice - self.cpu._nice_prev) + (idle - self.cpu._idle_prev))
-+ self.cpu.usage = int(100.0 * ((user + sys + nice) - (self.cpu._user_prev + self.cpu._sys_prev + self.cpu._nice_prev)) / (total + 0.001) + 0.5)
++ # Read a new line
++ line = self.vmstat_fd.stdout.readline().rstrip('\n')
+
-+ if (self.cpu.usage > 100):
-+ self.cpu.usage = 100
++ # Skip headers
++ if len(filter (lambda x: x not in " .0123456789", line)):
++ return
++
++ # Parse
++ parts = filter (lambda x: x, line.split(' '))
+
-+ self.cpu.idle = 100 - self.cpu.usage
++ if not len(parts) == 18:
++ return
+
-+ self.cpu._user_prev = user
-+ self.cpu._sys_prev = sys
-+ self.cpu._nice_prev = nice
-+ self.cpu._idle_prev = idle
++ self.cpu.idle = int(parts[17])
++ self.cpu.usage = 100 - self.cpu.idle
+
+ def _read_memory (self):
+
-+ # What we need from sysctl:
-+ # * vm.stats.vm.v_free_count
-+ # * vm.stats.vm.v_page_count
-+ # * hw.pagesize
++ line = self.vmstat_fd.stdout.readline().rstrip('\n')
+
-+ # physical memory free = v_free_count*page_size;
-+ # physical memory size = v_page_count*page_size;
-+ # physical memory used = size - free space
++ # Skip headers
++ if len(filter (lambda x: x not in " .0123456789", line)):
++ return
+
-+ fd = subprocess.Popen("/sbin/sysctl vm.stats.vm.v_active_count vm.stats.vm.v_page_count hw.pagesize", shell=True, stdout =subprocess.PIPE)
-+ lines = fd.stdout.readlines()
++ # Parse
++ values = filter (lambda x: x, line.split(' '))
+
-+ pagesize = 0
-+ pagecount = 0
-+ activecount = 0
-+
-+ for line in lines:
-+ parts = line.split()
-+ if parts[0] == 'hw.pagesize:':
-+ pagesize = int(parts[1])
-+ elif parts[0] == 'vm.stats.vm.v_active_count:':
-+ activecount = int(parts[1])
-+ elif parts[0] == 'vm.stats.vm.v_page_count:':
-+ pagecount = int(parts[1])
-+
-+
-+ self.mem.total = (pagesize * pagecount) / 1024
-+ self.mem.free = (pagesize * (pagecount-activecount)) / 1024
-+ self.mem.used = (pagesize * activecount) / 1024
++ if not len(values)==18:
++ return
+
++ self.mem.free = int(values[4])
++ self.mem.used = self.mem.total - self.mem.free
+
+ def run (self):
+ while True:
@@ -141,9 +148,3 @@
if __name__ == '__main__':
sys_stats = get_system_stats()
-@@ -305,3 +432,5 @@
- print 'free', sys_stats.mem.free
-
- time.sleep(1)
-+
-+
diff --git a/www/cherokee/files/patch-cherokee-main_admin.c b/www/cherokee/files/patch-cherokee-main_admin.c
deleted file mode 100644
index c0a5883de4ff..000000000000
--- a/www/cherokee/files/patch-cherokee-main_admin.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- cherokee/main_admin.c-orig 2010-10-29 07:11:18.000000000 -0300
-+++ cherokee/main_admin.c 2010-11-15 16:56:39.000000000 -0300
-@@ -35,6 +35,10 @@
- #include "server-protected.h"
- #include "util.h"
-
-+#ifdef HAVE_SYS_WAIT_H
-+# include <sys/wait.h>
-+#endif
-+
- #ifdef HAVE_GETOPT_LONG
- # include <getopt.h>
- #else
diff --git a/www/cherokee/files/patch-cherokee-util.c b/www/cherokee/files/patch-cherokee-util.c
deleted file mode 100644
index a84cf2f1f722..000000000000
--- a/www/cherokee/files/patch-cherokee-util.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- cherokee/util.c-orig 2010-11-15 17:53:34.000000000 -0300
-+++ cherokee/util.c 2010-11-15 17:56:46.000000000 -0300
-@@ -38,6 +38,11 @@
- #include <errno.h>
- #include <fcntl.h>
-
-+
-+#ifdef HAVE_SYS_WAIT_H
-+# include <sys/wait.h>
-+#endif
-+
- #ifdef HAVE_SYS_TIME_H
- # include <sys/time.h>
- #else
diff --git a/www/cherokee/pkg-plist b/www/cherokee/pkg-plist
index ce30ec2ddec8..06c4384e0a50 100644
--- a/www/cherokee/pkg-plist
+++ b/www/cherokee/pkg-plist
@@ -1,3 +1,4 @@
+bin/CTK-run
bin/cget
bin/cherokee-config
bin/cherokee-panic
@@ -297,7 +298,6 @@ share/aclocal/cherokee.m4
%%ADMIN%%%%DATADIR%%/admin/market/InstallUtil.py
%%ADMIN%%%%DATADIR%%/admin/market/Install_Log.py
%%ADMIN%%%%DATADIR%%/admin/market/Menu.py
-%%ADMIN%%%%DATADIR%%/admin/market/Package.py
%%ADMIN%%%%DATADIR%%/admin/market/PageApp.py
%%ADMIN%%%%DATADIR%%/admin/market/PageCategory.py
%%ADMIN%%%%DATADIR%%/admin/market/PageIndex.py
@@ -323,7 +323,6 @@ share/aclocal/cherokee.m4
%%ADMIN%%%%DATADIR%%/admin/market/Maintenance.pyc
%%ADMIN%%%%DATADIR%%/admin/market/ows_consts.pyc
%%ADMIN%%%%DATADIR%%/admin/market/CommandProgress.pyc
-%%ADMIN%%%%DATADIR%%/admin/market/Package.pyc
%%ADMIN%%%%DATADIR%%/admin/CTK/CTK/Init.py
%%ADMIN%%%%DATADIR%%/admin/CTK/CTK/Paginator.py
%%ADMIN%%%%DATADIR%%/admin/CTK/CTK/StarRating.py
@@ -566,6 +565,7 @@ share/aclocal/cherokee.m4
%%ADMIN%%%%DATADIR%%/admin/CTK/static/images/carousel-left-arrow.png
%%ADMIN%%%%DATADIR%%/admin/CTK/static/images/carousel-right-arrow.png
%%ADMIN%%%%DATADIR%%/admin/CTK/static/js/StarRating.js
+%%ADMIN%%%%DATADIR%%/admin/static/images/other/latest.png
%%ADMIN%%%%DATADIR%%/admin/static/images/other/linkedin.png
%%ADMIN%%%%DATADIR%%/admin/static/images/other/irc.png
%%ADMIN%%%%DATADIR%%/admin/static/images/other/left.png
@@ -1005,6 +1005,10 @@ share/aclocal/cherokee.m4
%%DATADIR%%/themes/plain/footer.html
%%DATADIR%%/themes/plain/header.html
%%DATADIR%%/themes/plain/theme.css
+%%DATADIR%%/themes/white/header.html
+%%DATADIR%%/themes/white/footer.html
+%%DATADIR%%/themes/white/entry.html
+%%DATADIR%%/themes/white/theme.css
www/cherokee/images/cherokee-logo.png
www/cherokee/images/default-bg.png
www/cherokee/images/favicon.ico
@@ -1014,6 +1018,7 @@ www/cherokee/index.html
@dirrm www/cherokee
%%NLS%%@dirrmtry share/locale/sv_SE/LC_MESSAGES
%%NLS%%@dirrmtry share/locale/sv_SE
+@dirrm %%DATADIR%%/themes/white
@dirrm %%DATADIR%%/themes/plain
@dirrm %%DATADIR%%/themes/firefox3
@dirrm %%DATADIR%%/themes/default