From a86c64f5662b7dbaeb77b58861d94854990bd7e4 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 7 Apr 2003 03:47:44 +0000 Subject: [PATCH] More tweaks to the licensing to make the Debian folks happy :) Added an "instant gratification" mode - "python setup.py demo" installs a simple instance and runs the web server on it. Nosy is disabled. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1648 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + COPYING.txt | 84 ++++++++++++++++++++++++++++++++++---------- README.txt | 12 +++++-- doc/glossary.txt | 8 +++-- doc/index.txt | 4 +-- doc/installation.txt | 63 +++++++++++++++++++++++++++++++-- setup.py | 80 +++++++++++++++++++++++++++++++++++++++-- 7 files changed, 222 insertions(+), 30 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5425e84..4b029d3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,7 @@ Removed: distribution. Feature: +- new instant-gratification Demo Mode in setup - support setting of properties on message and file through web and email interface (thanks John Rouillard) - allow additional control over the roundupdb email sending (explicit diff --git a/COPYING.txt b/COPYING.txt index 0f06922..481c862 100644 --- a/COPYING.txt +++ b/COPYING.txt @@ -1,7 +1,9 @@ Roundup Licensing ----------------- +Copyright (c) 2003 Richard Jones (richard@mechanicalcat.net) Copyright (c) 2002 eKit.com Inc (http://www.ekit.com/) +Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,24 +24,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) - -This module is free software, and you may redistribute it and/or modify -under the same terms as Python 2.1 (the PSF LICENSE AGREEMENT), so long -as this copyright message and disclaimer are retained in their original form. - -IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OF THIS CODE, EVEN IF BIZAR SOFTWARE PTY LTD HAS BEEN -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" -BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, -SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - - PageTemplates Licensing ----------------------- @@ -56,5 +40,67 @@ the following manner: HISTORY.txt. - editing to remove dependencies on Zope modules (see files for change notes) -The license for this code is in doc/ZPL.txt. +The license for this code is the `Zope Public License (ZPL) Version 2.0`_, +included below. + + +Zope Public License (ZPL) Version 2.0 +------------------------------------- + +This software is Copyright (c) Zope Corporation (tm) and +Contributors. All rights reserved. + +This license has been certified as open source. It has also +been designated as GPL compatible by the Free Software +Foundation (FSF). + +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the +following conditions are met: + +1. Redistributions in source code must retain the above + copyright notice, this list of conditions, and the following + disclaimer. + +2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions, and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + +3. The name Zope Corporation (tm) must not be used to + endorse or promote products derived from this software + without prior written permission from Zope Corporation. + +4. The right to distribute this software or to use it for + any purpose does not give you the right to use Servicemarks + (sm) or Trademarks (tm) of Zope Corporation. Use of them is + covered in a separate agreement (see + http://www.zope.com/Marks). + +5. If any files are modified, you must cause the modified + files to carry prominent notices stating that you changed + the files and the date of any change. + +Disclaimer + + THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' + AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + + +This software consists of contributions made by Zope +Corporation and many individuals on behalf of Zope +Corporation. Specific attributions are listed in the +accompanying credits file. diff --git a/README.txt b/README.txt index 3a4e833..b16f1ec 100644 --- a/README.txt +++ b/README.txt @@ -1,13 +1,23 @@ +======================================================= +Roundup: an Issue-Tracking System for Knowledge Workers +======================================================= + +Copyright (c) 2003 Richard Jones (richard@mechanicalcat.net) +Copyright (c) 2002 eKit.com Inc (http://www.ekit.com/) +Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) + Installation ============ For installation instructions, please see installation.txt in the "doc" directory. + Upgrading ========= For upgrading instructions, please see upgrading.txt in the "doc" directory. + Usage and Other Information =========================== See the index.txt file in the "doc" directory. @@ -15,6 +25,4 @@ See the index.txt file in the "doc" directory. License ======= - See COPYING.txt - diff --git a/doc/glossary.txt b/doc/glossary.txt index f912c7e..15e5580 100644 --- a/doc/glossary.txt +++ b/doc/glossary.txt @@ -2,7 +2,7 @@ Roundup Glossary ================ -:Version: $Revision: 1.4 $ +:Version: $Revision: 1.5 $ .. contents:: @@ -18,11 +18,15 @@ itemid item a collection of data that forms one entry in the hyperdb. property - one element of data that makes up an item + one element of data that makes up an item. In Roundup, item + properties may be changed as needed - even after the tracker + has been initialised and used in production. schema the definition of all the classes that make up an tracker tracker the schema and hyperdb that forms one issue tracker +tracker home + the physical location on disk of a tracker ----------------- diff --git a/doc/index.txt b/doc/index.txt index e8f5f5b..f58d6de 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -6,9 +6,9 @@ Contents ======== - Overview_ and Features_ (pdf__) -- Installation_ (pdf__) and Upgrading_ (pdf__) +- Installation_ (pdf__) and Upgrading_ existing installs (pdf__) - `User Guide`_ (pdf__) -- `Customising Roundup`_ (pdf__) +- Configuring and `Customising Roundup`_ (pdf__) - `Maintaining Roundup Trackers`_ (pdf__) - `Roundup's Design`_ (pdf__) (original_) - `Developing Roundup`_ (pdf__) diff --git a/doc/installation.txt b/doc/installation.txt index 64e16d6..35b80c4 100644 --- a/doc/installation.txt +++ b/doc/installation.txt @@ -2,7 +2,7 @@ Installing Roundup ================== -:Version: $Revision: 1.44 $ +:Version: $Revision: 1.45 $ .. contents:: @@ -63,6 +63,20 @@ If the above fails, you may be using the wrong version of python. Try Roundup -- from installation and scripts. +For The Really Impatient +======================== + +If you just want to give Roundup a whirl Right Now, then simply run +``python setup.py demo``. This will set up a simple demo tracker on your +machine. When it's done, it'll print out a URL to point your web browser +at so you may start playing. Three users will be set up: + +1. anonymous - the "default" user with permission to do very little +2. demo (password "demo") - a normal user who may create issues +3. admin (password "admin") - an administrative user who has complete + access to the tracker + + Installation ============ @@ -103,7 +117,8 @@ Basic Installation Steps and modify the python path accordingly. 2. To create a Roundup tracker (necessary to do before you can - use the software in any real fashion): + use the software in any real fashion), you need to set up a "tracker + home": a. (Optional) If you intend to keep your roundup trackers under one top level directory which does not exist yet, @@ -243,7 +258,8 @@ There are three web interfaces to choose from: 3. `Zope product - ZRoundup`_ You may need to give the web server user permission to access the tracker home -- see the `shared environment steps`_ for information. +- see the `shared environment steps`_ for information. You may also need to +configure your system in some way - see `platform-specific notes`_. Web Server cgi-bin @@ -314,6 +330,8 @@ Configure an Email Interface If you don't want to use the email component of Roundup, then remove the "``nosyreaction.py``" module from your tracker "``detectors``" directory. +See `platform-specific notes`_ for steps that may be needed on your system. + There are three supported ways to get emailed issues into the Roundup tracker. You should pick ONE of the following, all of which will continue my example setup from above: @@ -419,9 +437,48 @@ templates, if you would like to hack on Roundup, or if you would like implementation details, you should read `Customising Roundup`_. +Running Multiple Trackers +========================= + +Things to think about before you jump off the deep end and install +multiple trackers, which involve additional URLs, user databases, email +addresses, databases to back up, etc. + +1. Do you want a tracker per product you sell/support? You can just add + a new property to your issues called Product, and filter by that. +2. Do you want to track internal software development issues and customer + support issues separately? You can just set up an additiona "issue" + class called "cust_issues" in the same tracker, mimicing the normal + "issue" class, but with different properties. + + Platform-Specific Notes ======================= +Windows +------- + +To have the Roundup web server start up when your machine boots up, set the +following up in Scheduled Tasks (note, the following is for a cygwin setup): + +Run + ``c:\cygwin\bin\bash.exe -c "roundup-server TheProject=/opt/roundup/trackers/support"`` +Start In + ``C:\cygwin\opt\roundup\bin`` +Schedule + At System Startup + +To have the Roundup mail gateway run periodically to poll a POP email address, +set the following up in Scheduled Tasks: +Run + ``c:\cygwin\bin\bash.exe -c "roundup-mailgw /opt/roundup/trackers/support pop roundup:roundup@mail-server"`` +Start In + ``C:\cygwin\opt\roundup\bin`` +Schedule + Every 10 minutes from 5:00AM for 24 hours every day + Stop the task if it runs for 8 minutes + + Sendmail smrsh -------------- diff --git a/setup.py b/setup.py index 79e339c..6448f0b 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: setup.py,v 1.44 2003-02-20 22:58:50 richard Exp $ +# $Id: setup.py,v 1.45 2003-04-07 03:47:44 richard Exp $ from distutils.core import setup, Extension from distutils.util import get_platform @@ -137,7 +137,7 @@ def buildTemplates(): tdir = os.path.join('roundup', 'templates', template) makeHtmlBase(tdir) -if __name__ == '__main__': +def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) @@ -218,4 +218,80 @@ if __name__ == '__main__': data_files = installdatafiles ) +def install_demo(): + ''' Install a demo server for users to play with for instant gratification. + + Sets up the web service on localhost port 8080. Disables nosy lists. + ''' + import shutil, socket, errno, BaseHTTPServer + + # create the instance + home = os.path.abspath('demo') + try: + shutil.rmtree(home) + except os.error, error: + if error.errno != errno.ENOENT: + raise + from roundup import init, instance, password + init.install(home, 'classic') + # don't have email flying around + os.remove(os.path.join(home, 'detectors', 'nosyreaction.py')) + init.write_select_db(home, 'anydbm') + + # figure basic params for server + hostname = socket.gethostname() + port = 8080 + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + while 1: + print 'Trying to set up web server on port %d ...'%port, + try: + s.bind((hostname, port)) + except socket.error, error: + if error.errno != errno.EADDRINUSE: + raise + print 'already in use.' + port += 100 + else: + print 'should be ok.' + break + url = 'http://%s:%s/demo/'%(hostname, port) + + # write the config + f = open(os.path.join(home, 'config.py'), 'r') + s = f.read().replace('http://tracker.example/cgi-bin/roundup.cgi/bugs/', + url) + f.close() + f = open(os.path.join(home, 'config.py'), 'w') + f.write(s) + f.close() + + # initialise the database + init.initialise(home, 'admin') + + # add the "demo" user + tracker = instance.open(home) + db = tracker.open('admin') + db.user.create(username='demo', password=password.Password('demo'), + realname='Demo User', roles='User') + db.commit() + db.close() + + # ok, so start up the server + from roundup.scripts.roundup_server import RoundupRequestHandler + RoundupRequestHandler.TRACKER_HOMES = {'demo': home} + httpd = BaseHTTPServer.HTTPServer((hostname, port), RoundupRequestHandler) + print 'Server running - connect to:\n %s'%url + print 'You may log in as "demo"/"demo" or "admin"/"admin".' + try: + httpd.serve_forever() + except KeyboardInterrupt: + print 'Keyboard Interrupt: exiting' + +if __name__ == '__main__': + if len(sys.argv) > 1 and sys.argv[1] == 'demo': + install_demo() + else: + main() + # vim: set filetype=python ts=4 sw=4 et si -- 2.30.2