annotate roundup/scripts/roundup_server.py @ 603:986354c4b1fb config-0-4-0-branch

missed the scripts dir in the merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Wed, 06 Feb 2002 04:29:17 +0000
parents 912029653c1c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
601
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
1 #!/usr/bin/python
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
2 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
3 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
4 # This module is free software, and you may redistribute it and/or modify
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
5 # under the same terms as Python, so long as this copyright message and
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
6 # disclaimer are retained in their original form.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
7 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
8 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
9 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
10 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
11 # POSSIBILITY OF SUCH DAMAGE.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
12 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
13 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
18 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
19 """ HTTP Server that serves roundup.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
20
603
986354c4b1fb missed the scripts dir in the merge from HEAD
Richard Jones <richard@users.sourceforge.net>
parents: 601
diff changeset
21 $Id: roundup_server.py,v 1.2.2.1 2002-02-06 04:29:17 richard Exp $
601
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
22 """
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
23
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
24 # python version check
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
25 from roundup import version_check
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
26
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
27 import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt, imp
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
28 import BaseHTTPServer
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
29
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
30 # Roundup modules of use here
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
31 from roundup import cgitb, cgi_client
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
32 import roundup.instance
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
33 from roundup.i18n import _
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
34
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
35 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
36 ## Configuration
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
37 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
38
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
39 # This indicates where the Roundup instance lives
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
40 ROUNDUP_INSTANCE_HOMES = {
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
41 'bar': '/tmp/bar',
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
42 }
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
43
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
44 ROUNDUP_USER = None
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
45
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
46
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
47 # Where to log debugging information to. Use an instance of DevNull if you
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
48 # don't want to log anywhere.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
49 # TODO: actually use this stuff
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
50 #class DevNull:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
51 # def write(self, info):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
52 # pass
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
53 #LOG = open('/var/log/roundup.cgi.log', 'a')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
54 #LOG = DevNull()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
55
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
56 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
57 ## end configuration
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
58 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
59
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
60
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
61 class RoundupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
62 ROUNDUP_INSTANCE_HOMES = ROUNDUP_INSTANCE_HOMES
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
63 ROUNDUP_USER = ROUNDUP_USER
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
64
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
65 def run_cgi(self):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
66 """ Execute the CGI command. Wrap an innner call in an error
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
67 handler so all errors can be caught.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
68 """
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
69 save_stdin = sys.stdin
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
70 sys.stdin = self.rfile
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
71 try:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
72 self.inner_run_cgi()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
73 except cgi_client.NotFound:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
74 self.send_error(404, self.path)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
75 except cgi_client.Unauthorised:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
76 self.send_error(403, self.path)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
77 except:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
78 # it'd be nice to be able to detect if these are going to have
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
79 # any effect...
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
80 self.send_response(400)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
81 self.send_header('Content-Type', 'text/html')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
82 self.end_headers()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
83 try:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
84 reload(cgitb)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
85 self.wfile.write(cgitb.breaker())
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
86 self.wfile.write(cgitb.html())
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
87 except:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
88 self.wfile.write("<pre>")
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
89 s = StringIO.StringIO()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
90 traceback.print_exc(None, s)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
91 self.wfile.write(cgi.escape(s.getvalue()))
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
92 self.wfile.write("</pre>\n")
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
93 sys.stdin = save_stdin
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
94
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
95 do_GET = do_POST = do_HEAD = send_head = run_cgi
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
96
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
97 def index(self):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
98 ''' Print up an index of the available instances
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
99 '''
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
100 self.send_response(200)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
101 self.send_header('Content-Type', 'text/html')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
102 self.end_headers()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
103 w = self.wfile.write
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
104 w(_('<html><head><title>Roundup instances index</title></head>\n'))
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
105 w(_('<body><h1>Roundup instances index</h1><ol>\n'))
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
106 for instance in self.ROUNDUP_INSTANCE_HOMES.keys():
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
107 w(_('<li><a href="%(instance_url)s/index">%(instance_name)s</a>\n')%{
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
108 'instance_url': urllib.quote(instance),
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
109 'instance_name': cgi.escape(instance)})
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
110 w(_('</ol></body></html>'))
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
111
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
112 def inner_run_cgi(self):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
113 ''' This is the inner part of the CGI handling
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
114 '''
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
115
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
116 rest = self.path
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
117 i = rest.rfind('?')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
118 if i >= 0:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
119 rest, query = rest[:i], rest[i+1:]
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
120 else:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
121 query = ''
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
122
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
123 # figure the instance
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
124 if rest == '/':
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
125 return self.index()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
126 l_path = rest.split('/')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
127 instance_name = urllib.unquote(l_path[1])
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
128 if self.ROUNDUP_INSTANCE_HOMES.has_key(instance_name):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
129 instance_home = self.ROUNDUP_INSTANCE_HOMES[instance_name]
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
130 instance = roundup.instance.open(instance_home)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
131 else:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
132 raise cgi_client.NotFound
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
133
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
134 # figure out what the rest of the path is
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
135 if len(l_path) > 2:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
136 rest = '/'.join(l_path[2:])
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
137 else:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
138 rest = '/'
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
139
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
140 # Set up the CGI environment
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
141 env = {}
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
142 env['INSTANCE_NAME'] = instance_name
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
143 env['REQUEST_METHOD'] = self.command
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
144 env['PATH_INFO'] = urllib.unquote(rest)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
145 if query:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
146 env['QUERY_STRING'] = query
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
147 host = self.address_string()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
148 if self.headers.typeheader is None:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
149 env['CONTENT_TYPE'] = self.headers.type
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
150 else:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
151 env['CONTENT_TYPE'] = self.headers.typeheader
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
152 length = self.headers.getheader('content-length')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
153 if length:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
154 env['CONTENT_LENGTH'] = length
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
155 co = filter(None, self.headers.getheaders('cookie'))
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
156 if co:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
157 env['HTTP_COOKIE'] = ', '.join(co)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
158 env['SCRIPT_NAME'] = ''
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
159 env['SERVER_NAME'] = self.server.server_name
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
160 env['SERVER_PORT'] = str(self.server.server_port)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
161
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
162 decoded_query = query.replace('+', ' ')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
163
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
164 # do the roundup thang
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
165 client = instance.Client(instance, self, env)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
166 client.main()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
167
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
168 def usage(message=''):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
169 if message:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
170 message = _('Error: %(error)s\n\n')%{'error': message}
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
171 print _('''%(message)sUsage:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
172 roundup-server [-n hostname] [-p port] [name=instance home]*
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
173
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
174 -n: sets the host name
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
175 -p: sets the port to listen on
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
176
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
177 name=instance home
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
178 Sets the instance home(s) to use. The name is how the instance is
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
179 identified in the URL (it's the first part of the URL path). The
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
180 instance home is the directory that was identified when you did
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
181 "roundup-admin init". You may specify any number of these name=home
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
182 pairs on the command-line. For convenience, you may edit the
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
183 ROUNDUP_INSTANCE_HOMES variable in the roundup-server file instead.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
184 ''')%locals()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
185 sys.exit(0)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
186
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
187 def run():
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
188 hostname = ''
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
189 port = 8080
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
190 try:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
191 # handle the command-line args
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
192 try:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
193 optlist, args = getopt.getopt(sys.argv[1:], 'n:p:u:')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
194 except getopt.GetoptError, e:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
195 usage(str(e))
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
196
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
197 user = ROUNDUP_USER
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
198 for (opt, arg) in optlist:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
199 if opt == '-n': hostname = arg
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
200 elif opt == '-p': port = int(arg)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
201 elif opt == '-u': user = arg
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
202 elif opt == '-h': usage()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
203
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
204 if hasattr(os, 'getuid'):
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
205 # if root, setuid to the running user
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
206 if not os.getuid() and user is not None:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
207 try:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
208 import pwd
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
209 except ImportError:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
210 raise ValueError, _("Can't change users - no pwd module")
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
211 try:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
212 uid = pwd.getpwnam(user)[2]
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
213 except KeyError:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
214 raise ValueError, _("User %(user)s doesn't exist")%locals()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
215 os.setuid(uid)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
216 elif os.getuid() and user is not None:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
217 print _('WARNING: ignoring "-u" argument, not root')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
218
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
219 # People can remove this check if they're really determined
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
220 if not os.getuid() and user is None:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
221 raise ValueError, _("Can't run as root!")
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
222
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
223 # handle instance specs
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
224 if args:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
225 d = {}
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
226 for arg in args:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
227 try:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
228 name, home = arg.split('=')
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
229 except ValueError:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
230 raise ValueError, _("Instances must be name=home")
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
231 d[name] = home
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
232 RoundupRequestHandler.ROUNDUP_INSTANCE_HOMES = d
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
233 except SystemExit:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
234 raise
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
235 except:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
236 exc_type, exc_value = sys.exc_info()[:2]
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
237 usage('%s: %s'%(exc_type, exc_value))
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
238
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
239 # we don't want the cgi module interpreting the command-line args ;)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
240 sys.argv = sys.argv[:1]
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
241 address = (hostname, port)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
242 httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
243 print _('Roundup server started on %(address)s')%locals()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
244 httpd.serve_forever()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
245
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
246 if __name__ == '__main__':
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
247 run()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
248
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
249 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
250 # $Log: not supported by cvs2svn $
603
986354c4b1fb missed the scripts dir in the merge from HEAD
Richard Jones <richard@users.sourceforge.net>
parents: 601
diff changeset
251 # Revision 1.2 2002/01/29 20:07:15 jhermann
986354c4b1fb missed the scripts dir in the merge from HEAD
Richard Jones <richard@users.sourceforge.net>
parents: 601
diff changeset
252 # Conversion to generated script stubs
986354c4b1fb missed the scripts dir in the merge from HEAD
Richard Jones <richard@users.sourceforge.net>
parents: 601
diff changeset
253 #
601
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
254 # Revision 1.1 2002/01/29 19:53:08 jhermann
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
255 # Moved scripts from top-level dir to roundup.scripts subpackage
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
256 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
257 # Revision 1.25 2002/01/05 02:21:21 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
258 # fixes
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
259 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
260 # Revision 1.24 2002/01/05 02:19:03 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
261 # i18n'ification
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
262 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
263 # Revision 1.23 2001/12/15 23:47:07 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
264 # sys module went away...
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
265 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
266 # Revision 1.22 2001/12/13 00:20:01 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
267 # . Centralised the python version check code, bumped version to 2.1.1 (really
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
268 # needs to be 2.1.2, but that isn't released yet :)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
269 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
270 # Revision 1.21 2001/12/02 05:06:16 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
271 # . We now use weakrefs in the Classes to keep the database reference, so
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
272 # the close() method on the database is no longer needed.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
273 # I bumped the minimum python requirement up to 2.1 accordingly.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
274 # . #487480 ] roundup-server
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
275 # . #487476 ] INSTALL.txt
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
276 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
277 # I also cleaned up the change message / post-edit stuff in the cgi client.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
278 # There's now a clearly marked "TODO: append the change note" where I believe
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
279 # the change note should be added there. The "changes" list will obviously
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
280 # have to be modified to be a dict of the changes, or somesuch.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
281 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
282 # More testing needed.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
283 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
284 # Revision 1.20 2001/11/26 22:55:56 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
285 # Feature:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
286 # . Added INSTANCE_NAME to configuration - used in web and email to identify
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
287 # the instance.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
288 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
289 # signature info in e-mails.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
290 # . Some more flexibility in the mail gateway and more error handling.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
291 # . Login now takes you to the page you back to the were denied access to.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
292 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
293 # Fixed:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
294 # . Lots of bugs, thanks Roché and others on the devel mailing list!
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
295 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
296 # Revision 1.19 2001/11/12 22:51:04 jhermann
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
297 # Fixed option & associated error handling
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
298 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
299 # Revision 1.18 2001/11/01 22:04:37 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
300 # Started work on supporting a pop3-fetching server
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
301 # Fixed bugs:
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
302 # . bug #477104 ] HTML tag error in roundup-server
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
303 # . bug #477107 ] HTTP header problem
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
304 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
305 # Revision 1.17 2001/10/29 23:55:44 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
306 # Fix to CGI top-level index (thanks Juergen Hermann)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
307 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
308 # Revision 1.16 2001/10/27 00:12:21 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
309 # Fixed roundup-server for windows, thanks Juergen Hermann.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
310 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
311 # Revision 1.15 2001/10/12 02:23:26 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
312 # Didn't clean up after myself :)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
313 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
314 # Revision 1.14 2001/10/12 02:20:32 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
315 # server now handles setuid'ing much better
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
316 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
317 # Revision 1.13 2001/10/05 02:23:24 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
318 # . roundup-admin create now prompts for property info if none is supplied
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
319 # on the command-line.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
320 # . hyperdb Class getprops() method may now return only the mutable
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
321 # properties.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
322 # . Login now uses cookies, which makes it a whole lot more flexible. We can
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
323 # now support anonymous user access (read-only, unless there's an
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
324 # "anonymous" user, in which case write access is permitted). Login
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
325 # handling has been moved into cgi_client.Client.main()
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
326 # . The "extended" schema is now the default in roundup init.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
327 # . The schemas have had their page headings modified to cope with the new
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
328 # login handling. Existing installations should copy the interfaces.py
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
329 # file from the roundup lib directory to their instance home.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
330 # . Incorrectly had a Bizar Software copyright on the cgitb.py module from
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
331 # Ping - has been removed.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
332 # . Fixed a whole bunch of places in the CGI interface where we should have
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
333 # been returning Not Found instead of throwing an exception.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
334 # . Fixed a deviation from the spec: trying to modify the 'id' property of
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
335 # an item now throws an exception.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
336 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
337 # Revision 1.12 2001/09/29 13:27:00 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
338 # CGI interfaces now spit up a top-level index of all the instances they can
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
339 # serve.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
340 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
341 # Revision 1.11 2001/08/07 00:24:42 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
342 # stupid typo
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
343 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
344 # Revision 1.10 2001/08/07 00:15:51 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
345 # Added the copyright/license notice to (nearly) all files at request of
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
346 # Bizar Software.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
347 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
348 # Revision 1.9 2001/08/05 07:44:36 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
349 # Instances are now opened by a special function that generates a unique
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
350 # module name for the instances on import time.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
351 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
352 # Revision 1.8 2001/08/03 01:28:33 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
353 # Used the much nicer load_package, pointed out by Steve Majewski.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
354 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
355 # Revision 1.7 2001/08/03 00:59:34 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
356 # Instance import now imports the instance using imp.load_module so that
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
357 # we can have instance homes of "roundup" or other existing python package
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
358 # names.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
359 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
360 # Revision 1.6 2001/07/29 07:01:39 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
361 # Added vim command to all source so that we don't get no steenkin' tabs :)
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
362 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
363 # Revision 1.5 2001/07/24 01:07:59 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
364 # Added command-line arg handling to roundup-server so it's more useful
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
365 # out-of-the-box.
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
366 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
367 # Revision 1.4 2001/07/23 10:31:45 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
368 # disabled the reloading until it can be done properly
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
369 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
370 # Revision 1.3 2001/07/23 08:53:44 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
371 # Fixed the ROUNDUPS decl in roundup-server
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
372 # Move the installation notes to INSTALL
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
373 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
374 # Revision 1.2 2001/07/23 04:05:05 anthonybaxter
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
375 # actually quit if python version wrong
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
376 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
377 # Revision 1.1 2001/07/23 03:46:48 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
378 # moving the bin files to facilitate out-of-the-boxness
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
379 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
380 # Revision 1.1 2001/07/22 11:15:45 richard
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
381 # More Grande Splite stuff
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
382 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
383 #
912029653c1c [[Metadata associated with this commit was garbled during conversion from CVS
No Author <no-author@users.sourceforge.net>
parents:
diff changeset
384 # vim: set filetype=python ts=4 sw=4 et si

Roundup Issue Tracker: http://roundup-tracker.org/