diff options
author | joerg <joerg@pkgsrc.org> | 2007-05-29 10:16:42 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-05-29 10:16:42 +0000 |
commit | 1b76af1bbe0fd743317fd0d3f6d57930c4891c0c (patch) | |
tree | c14732e1a39b8fdfe15fae673abfe54f8c87872c /www/zope/files | |
parent | 106d5b8847c3ef97b0ec7c86b4aae8e614f84657 (diff) | |
download | pkgsrc-1b76af1bbe0fd743317fd0d3f6d57930c4891c0c.tar.gz |
Remove Zope 2.2 and related pieces:
databases/zope-mysql
lang/py-extclass
textproc/py-dtml
www/py-pcgi
www/py-zpublisher
www/zope
No objection from pkgsrc-users.
cVS: ----------------------------------------------------------------------
Diffstat (limited to 'www/zope/files')
-rw-r--r-- | www/zope/files/Makefile.in | 50 | ||||
-rwxr-xr-x | www/zope/files/zope-install.py | 182 | ||||
-rwxr-xr-x | www/zope/files/zope-shutdown.py | 60 |
3 files changed, 0 insertions, 292 deletions
diff --git a/www/zope/files/Makefile.in b/www/zope/files/Makefile.in deleted file mode 100644 index 0fa884646e1..00000000000 --- a/www/zope/files/Makefile.in +++ /dev/null @@ -1,50 +0,0 @@ -# $NetBSD: Makefile.in,v 1.7 2002/01/22 18:47:15 drochner Exp $ - -all: all-pcgi all-lib all-zodb all-search all-expat # link-cpickle -configure: config-pcgi config-lib config-zodb config-search \ - config-expat - -config-pcgi: - (cd pcgi; ./configure) - -all-pcgi: - (cd pcgi; make) - -config-lib: - (cd lib/python; \ - cp @PREFIX@/lib/python2.0/config/Makefile.pre.in . ; \ - make -f Makefile.pre.in boot) - -all-lib: - (cd lib/python; make) - -config-zodb: - (cd lib/python/ZODB; \ - cp @PREFIX@/lib/python2.0/config/Makefile.pre.in . ; \ - make -f Makefile.pre.in boot) - -all-zodb: - (cd lib/python/ZODB; make) - - -config-search: - (cd lib/python/SearchIndex; \ - cp @PREFIX@/lib/python2.0/config/Makefile.pre.in . ; \ - make -f Makefile.pre.in boot) - -all-search: - (cd lib/python/SearchIndex; make) - -config-expat: - (cd lib/python/Shared/DC/xml/pyexpat; \ - cp @PREFIX@/lib/python2.0/config/Makefile.pre.in . ; \ - make -f Makefile.pre.in boot) - -all-expat: - (cd lib/python/Shared/DC/xml/pyexpat; make) - -link-cpickle: - (cd lib/python/ZODB; \ - ln -s ../cPickle.so cPickle.so; \ - ln -s ../cStringIO.so cStringIO.so ) - diff --git a/www/zope/files/zope-install.py b/www/zope/files/zope-install.py deleted file mode 100755 index 31828578f0a..00000000000 --- a/www/zope/files/zope-install.py +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/pkg/bin/python2.0 -# -# $NetBSD: zope-install.py,v 1.6 2002/01/22 18:47:15 drochner Exp $ -# -# Copyright (c) 1998,1999 Endicor Technologies, Inc. -# All rights reserved. Written by Ty Sarna <tsarna@endicor.com> -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 THE AUTHOR 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 will have to do for now... - -import sys, os, re, getopt, string - -prefix = "/usr/pkg" -cgidir = prefix + "/libexec/cgi-bin" -apconf = prefix + "/etc/httpd/httpd.conf" -zopedir = prefix + "/lib/zope" -zopevar = zopedir + "/var" -zopedata = "/var/zope" -ext = "fs" -module = "Zope" - -def usage(): - print 'usage: zope-install [-n] [-b] [-p perms] [-u user] [-g group] [-d dir] [-c cgidir] instancename' - print - print '\t-n\tshow what would be done, but don\'t actually do it' - print '\t-b\tuse old .bbb format BoboPOS format instead of .fs ZODB format' - print '\t-p\tmanager permissions, in the form' - print '\t\tusername:plaintextpassword[:domain-restrinction]' - print '\t\teg: "root:mypass" or "root:mypass:*.mydomain.com' - print '\t-u\tusername to run as, default to Apache\'s user' - print '\t-g\tgroupname to run as, default to Apache\'s group' - print '\t-d\tdirectory for instance, defaults to %s/instancename' % zopedata - print '\t-c\tdirectory for CGIs, defaults to %s' % cgidir - - sys.exit(1) - -def exists(f): - e = 1 - try: - os.stat(f) - except: - e = 0 - return e - -def resourcefile(v): - resource = '''#!%(zopedir)s/pcgi/pcgi-wrapper -PCGI_NAME=%(module)s -PCGI_MODULE_PATH=%(zopedir)s/lib/python/%(module)s.py -PCGI_PUBLISHER=%(zopedir)s/pcgi/pcgi_publisher.py -PCGI_EXE=%(python)s -PCGI_SOCKET_FILE=%(instvar)s/pcgi.soc -PCGI_PID_FILE=%(instvar)s/pcgi.pid -PCGI_ERROR_LOG=%(instvar)s/pcgi.log -PCGI_DISPLAY_ERRORS=1 -BOBO_REALM=%(instance)s -BOBO_DEBUG_MODE=1 -INSTANCE_HOME=%(dirname)s -''' % v - - return resource - -def GetApachePerms(): - user = group = "?ERROR?" - - rx = re.compile("^(User|Group)\\s([^\\s]+)") - f = open(apconf, "r") - for l in f.readlines(): - m = rx.match(l) - if m: - if m.group(1) == "User": - user = m.group(2) - if m.group(1) == "Group": - group = m.group(2) - return user, group - -def runsys(pretend, cmd): - if pretend: - print cmd - else: - r = os.system(cmd) - if r: - sys.exit(r) - -def createfile(pretend, fname, contents): - if pretend: - print "cat >%(fname)s <__EOF__\n%(contents)s__EOF__" % vars() - else: - f = open(fname, "w") - f.write(contents) - f.close() - -if __name__ == "__main__": - optlist, args = getopt.getopt(sys.argv[1:], 'bnp:u:g:d:c:') - if len(args) != 1: - usage() - - instance = args[0] - user, group = GetApachePerms() - pretend = 0 - seenperms = 0 - perms = "root:password" - dirname = None - python = sys.executable - - for (oname, oarg) in optlist: - if oname == '-n': - pretend = 1 - elif oname == '-b': - ext = "bbb" - module = "Main" - elif oname == '-p': - perms = oarg - seenperms = 1 - elif oname == '-u': - user = oarg - elif oname == '-g': - group = oarg - elif oname == '-d': - dirname = oarg - elif oname == '-c': - cgidir = oarg - - if not dirname: - dirname = zopedata + '/' + instance - - instvar = dirname + '/var' - - runsys(pretend, "mkdir -p " + instvar) - - if not exists(instvar + "/Data." + ext): - runsys(pretend, "cp %(zopevar)s/Data.%(ext)s.in %(instvar)s" % vars()) - - runsys(pretend, "chown -R %(user)s:%(group)s %(dirname)s" % vars()) - runsys(pretend, "chmod -R u+rwX,g+rX,g-w,o-rwx %(dirname)s" % vars()) - - fname = dirname + "/access" - if not exists(fname): - if not seenperms: - sys.stderr.write("%s: warning: perms not set, dedaulting to %s\n" - % (sys.argv[0], perms)) - - createfile(pretend, fname, perms + '\n') - - runsys(pretend, - "chmod 600 %(fname)s; chown %(user)s:%(group)s %(fname)s" % vars()) - - fname = cgidir + '/' + instance + ".cgi" - createfile(pretend, fname, resourcefile(vars())) - runsys(pretend, - "chmod 755 %(fname)s; chown %(user)s:%(group)s %(fname)s" % vars()) - - sys.stderr.write(""" -now you will need to add lines similar to these to your -Apache httpd.conf file to enable access to your instance -via http://yourwebserver/instance/ - -RewriteEngine on -RewriteCond %%{HTTP:Authorization} ^(.*) -RewriteRule ^/%(instance)s($|/)(.*) %(cgidir)s/%(instance)s.cgi/$2 [e=HTTP_CGI_AUTHORIZATION:%%1,t=application/x-httpd-cgi,l] - -You may need to add Options ExecCGI on "<Directory />" and your cgi-bin -directory for this to work. -""" % vars()) diff --git a/www/zope/files/zope-shutdown.py b/www/zope/files/zope-shutdown.py deleted file mode 100755 index a6f9b5113dd..00000000000 --- a/www/zope/files/zope-shutdown.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/pkg/bin/python2.0 -# -# $NetBSD: zope-shutdown.py,v 1.2 2002/01/22 18:47:15 drochner Exp $ -# -# Copyright (c) 1999 Endicor Technologies, Inc. -# All rights reserved. Written by Ty Sarna <tsarna@endicor.com> -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 THE AUTHOR 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. -# - - -import sys, os, string, urllib #, re, getopt - -zopedata = "/var/zope" - -def getstr(fn, dflt): - try: - f = open(fn, 'r') - s = string.strip(f.read()) - f.close() - except: - s = dflt - return s - -for instance in os.listdir(zopedata): - os.chdir(os.path.join(zopedata, instance)) - access = "" - try: - f = open(os.path.join('var', 'pcgi.pid'), 'r') - pid = int(f.read()) - f.close() - os.kill(pid, 0) - url = getstr('access', '') - if url: - url = url + '@' - url = 'http://' + url + getstr('host', 'localhost') - url = url +'/' + instance + '/Control_Panel/manage_shutdown' - u = urllib.urlopen(url) - u.read() - u.close() - sys.stdout.write(' ' + instance) - except: - sys.stdout.write(' (' + instance + ')') |