debian/0000755000000000000000000000000012316742174007175 5ustar debian/zopeZVER.lintian-overrides.in0000644000000000000000000000015711652231032014635 0ustar zope@ZVER@: image-file-in-usr-lib zope@ZVER@: wrong-path-for-interpreter zope@ZVER@: duplicate-changelog-files debian/copyright0000644000000000000000000001126112145142650011122 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files: source/Acquisition/* source/DateTime/* source/ExtensionClass/* source/Missing/* source/Persistence/* source/Products.ZSQLMethods/* source/RestrictedPython/* source/ZConfig/* source/ZODB3/* Zope2/* source/five.formlib/* source/tempstorage/* source/zope.copy/* source/zope.deferredimport/* source/zope.i18n/* source/zope.i18nmessageid/* source/zope.lifecycleevent/* source/zope.mkzeoinstance/* source/zope.pagetemplate/* source/zope.proxy/* source/zope.sendmail/* source/zope.session/* source/zope.testing* Copyright: Zope Foundation and Contributors License: Zope-2.1 Files: source/MultiMapping/* source/Record/* source/ThreadLock/* source/ZopeUndo/* source/transaction/* source/zLOG/* source/zdaemon/* source/zope.annotation/* source/zope.app.appsetup/* source/zope.app.basicskin/* source/zope.app.component/* source/zope.app.container/* source/zope.app.debug/* source/zope.app.dependable/* source/zope.app.form/* source/zope.app.pagetemplate/* source/zope.app.publication/* source/zope.app.publisher/* source/zope.app.schema/* source/zope.app.testing/* source/zope.authentication/* source/zope.broken/* source/zope.browser/* source/zope.cachedescriptors/* source/zope.component/* source/zope.componentvocabulary/* source/zope.configuration/* source/zope.container/* source/zope.contentprovider/* source/zope.contenttype/* source/zope.copypastemove/* source/zope.datetime/* source/zope.deprecation/* source/zope.dottedname/* source/zope.dublincore/* source/zope.error/* source/zope.event/* source/zope.exceptions/* source/zope.filerepresentation/* source/zope.formlib/* source/zope.hookable/* source/zope.interface/* source/zope.location/* source/zope.minmax/* source/zope.password/* source/zope.processlifetime/* source/zope.publisher/* source/zope.schema/* source/zope.security/* source/zope.sequencesort/* source/zope.site/* source/zope.size/* source/zope.structuredtext/* source/zope.tal/* source/zope.tales/* source/zope.testbrowser/* source/zope.traversing/* source/zope.viewlet/* Copyright: Zope Corporation and Contributors License: Zope-2.1 Files: source/zc.lockfile/* Copyright: Jim Fulton License: Zope-2.1 Files: debian/build-scripts/* Copyright: 2010, Penn State University License: GPL On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. License: Zope-2.1 Zope Public License (ZPL) Version 2.1 . A copyright notice accompanies this license document that identifies the copyright holders. . 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 accompanying copyright notice, this list of conditions, and the following disclaimer. . 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. . 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 the copyright holders. Use of them is covered by separate agreement with the copyright holders. . 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 THE COPYRIGHT HOLDERS ``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 THE COPYRIGHT HOLDERS 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. debian/zopeZVER.dirs.in0000644000000000000000000000035311652231032012136 0ustar usr/lib/zope@ZVER@ usr/lib/zope@ZVER@/bin usr/lib/zope@ZVER@/lib/python etc/zope@ZVER@ var/lib/zope@ZVER@ var/lib/zope@ZVER@/zeo var/lib/zope@ZVER@/instance var/lib/zope@ZVER@/lib var/log/zope@ZVER@ usr/share/doc/zope@ZVER@/changelogs debian/zopeZVER.postrm.in0000644000000000000000000000167411652231032012530 0ustar #!/bin/sh set -e zope=zope@ZVER@ delete_pyo_pyc () { t=`tempfile -p zopedel ` [ -r /var/lib/$zope/_list_of_pyc_pyo_to_be_deleted_ ] && cat /var/lib/$zope/_list_of_pyc_pyo_to_be_deleted_ | \ xargs rm -f 2>&1 rm -f /usr/lib/$zope/debian/*.py[co] rm -f /var/lib/$zope/_list_of_pyc_pyo_to_be_deleted_ } case "$1" in failed-upgrade|abort-install|abort-upgrade|disappear) ;; upgrade) delete_pyo_pyc ;; remove) delete_pyo_pyc ;; purge) if [ -d /var/lib/$zope/instance ] ; then find /var/lib/$zope/instance -maxdepth 3 -type f \ -path '*/var/Data.fs.*' -or -path '*/bin/*zope*' \ -or -path '*/log/*.log*' -or -name README.txt \ | xargs -r rm -f fi ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/zopeZVER.logrotate.in0000644000000000000000000000070111652231032013172 0ustar # Logrotate configuration file fo Zope Debian package "/var/log/zope@ZVER@/*/Z2.log" "/var/log/zope@ZVER@/*/event.log" { weekly missingok rotate 52 copytruncate compress delaycompress notifempty create sharedscripts postrotate sh -c 'for i in /var/lib/zope@ZVER@/instance/* ; do [ -d "$i/log" -a -x "$i/bin/zopectl" -a -r "$i/var/Z2.pid" ] && "$i"/bin/zopectl logreopen >/dev/null; done' endscript } debian/changelog0000644000000000000000000005335012316741232011047 0ustar zope2.13 (2.13.21-1ubuntu1) trusty; urgency=medium * Fix installation of README file. -- Matthias Klose Wed, 02 Apr 2014 09:55:51 +0200 zope2.13 (2.13.21-1) unstable; urgency=high * New upstream release fixing security issues. * debian/control: + Make Vcs-Svn URI canonical. * debian/zopeZVER-sandbox.templates.in: + Fix lintian error as it expects 'for internal use', not 'Internal use' for debconf fields not intended for users to see. -- Arnaud Fontaine Wed, 11 Sep 2013 16:39:52 +0900 zope2.13 (2.13.20-1) unstable; urgency=low [ Jonas Meurer ] * New major upstream release (2.13). - Update build scripts for Zope2.13. - Bump python version from 2.6 to 2.7. - Remove obsolete patch Zope2-remove_documenttemplate_release_script.patch - Update remaining patches. * Update Homepage field to point to correct page http://zope2.zope.org/. [ Arnaud Fontaine ] * Python 2.6 is going to be removed, so update asserts on Python version. * debian/control: bump Standards-Version to 3.9.4. No changes needed. * New major upstream release (2.13). + debian/control: update Vcs-* fields URL. + debian/patches/use-python-initgroups.patch: - Use os.initgroups (>= 2.7) rather than relying on a third-party module, keep it in DEB_SATISFIED as it is included in versions.cfg. * Ignore egg-info directory and setup.cfg in debian/source/options to avoid diff of files in this directory. * Call clean in distclean Makefile target to remove build directory even when only distclean target is called. -- Arnaud Fontaine Tue, 28 May 2013 12:41:39 +0900 zope2.12 (2.12.26-1) unstable; urgency=high * New upstream release. Closes: #692899. + Fix Reflexive HTTP header injection (CVE-2012-5486). + Fix Timing attack in password validation (CVE-2012-5507). + Fix PRNG which wasn't reseeded (CVE-2012-5508). * debian/patches/CVE-2012-5505.patch: + Fix Attempting to access a view with no name returns an internal data structure (CVE-2012-5505). Thanks to Tres Seaver. Closes: #692899. * debian/control: + Bump zope.common required version as the debconf template has been updated. Closes: #656552. * debian/rules: + As dh_python (>= 2.7.3-1) rewrites shebangs by default, overriding dh_auto_install to fix shebangs does not work anymore as dh_python2 is called afterwards, instead use dh_python2 to rewrite them. - debian/control: bump python Build-Depends. - Drop now useless ZODB3-fix_shebang.patch. -- Arnaud Fontaine Wed, 06 Mar 2013 18:46:14 +0900 zope2.12 (2.12.23-1) unstable; urgency=low * New upstream release. * debian/control: bump Standards-Version to 3.9.3. + debian/copyright: update Format URL. * debian/watch: fix missing version delimiters in filename pattern. -- Arnaud Fontaine Thu, 14 Jun 2012 09:44:20 +0900 zope2.12 (2.12.22-1) unstable; urgency=low * New upstream release (2.12.22) - Fixes cross-site-scripting attack (CVE-2010-1104). - Remove patch Zope2-fix_serious_authentication_vulnerability.patch, now incorporated upstream. -- Jonas Meurer Thu, 19 Jan 2012 01:28:13 +0100 zope2.12 (2.12.20-3) unstable; urgency=low * Remove ClientForm from DEB_SATISFIED as it's going to be dropped soonish. -- Arnaud Fontaine Fri, 16 Dec 2011 14:20:35 +0900 zope2.12 (2.12.20-2) unstable; urgency=high * Update Homepage field to point to correct page http://zope2.zope.org/. * Change Depends on zope-common from (>= 0.5.51) to (>= 0.5.51~), to ease backports to squeeze. * Add debian/patches/Zope2-fix_serious_authentication_vulnerability.patch, fixing a serious authentication vulnerability in stock configuration. No CVE number assigned yet. See https://mail.zope.org/pipermail/zope-dev/2011-October/043592.html for further information. * Set urgency=high in order to push the security fix to testing. -- Jonas Meurer Fri, 28 Oct 2011 13:51:41 +0200 zope2.12 (2.12.20-1) unstable; urgency=low * Zope 2.12.20 release. [ Gael Le Mignot ] * Allowing to install eggs in lib/python of instances. [ Jonas Meurer ] * Remove Zope eggs from dependencies in debian/control, and from DEB_SATISFIED in debian/rules. All Zope dependencies are shipped with the local tarball. See README.source for further information. * Add python distribute modules to list of DEB_SATISFIED modules. * Remove python-transaction from depends and from DEB_SATISFIED. It's a zope module and should be included in the zope2.12 binary package. * Add python2.6 package to list of dependencies. * Major update and reformating of debian/copyright. * Bump standards-version to 3.9.2, no changes required. * Remove Suggests on zope-zopebook and zope-devguide. Neither of them are available in Debian archives. * Remove unused debian/patches/fix_lib_location.patch. * Enable and rename debian/patches/ZODB3-fix-shebang.patch. * Lintian overrides: - Remove unused lintian overrides package-contains-empty-directory and file-in-unusual-dir - Add lintian override wrong-path-for-interpreter for python wrapper * Add debian/README.source to explain the current packaging approach. * Install the upstream changelogs to /usr/share/doc/zope2.12/changelogs. * Remove upstream LICENSE.txt in eggs from zope2.12 binary package. * Remove scripts from EGG-INFO subfolders in zope2.12 binary package. * Add versions to dependencies on python modules for zope2.12 package. * Fix debian/build-scripts/fetch.py to lowercase dependency names before checking for them. gen_versions_cfg.py already writes lowercased names. Thanks to Michael Mulich for help with investigation. * Remove Michael Mulich from Uploaders field. * Migrate the package from dh_pysupport to dh_python2. - Bump build-depends: python2.6-dev (>= 2.6.6-3~) and python (>= 2.7.2-9~). - Remove build-depends on python, as python-dev build-depends pull it in. - Remove debian/pyversions, add X-Python-Version: 2.6 to debian/control. - Add --with python2 to dh in debian/rules, to invoke dh_python2. * Update watchfile to search for Zope2.12 releases at pypi.python.org. * Remove obsolete debian/zopeZVER.preinst.in magic, not needed anymore. * Add $(PYTHON) variable in debian/rules to make python version configurable. * Add versioned depends on python-pkg-resources (<= 0.6.14) | python-pkg-resources (>= 0.6.16-1.1) in order to prevent bug#644003. [ Arnaud Fontaine ] * Add myself as uploader. * Fix debian/copyright following recent changes on DEP5. * Add initgroups to deb-satisfied list as it's a basic module already available in the archive. * Ignore duplicated changelog warning from lintian. * Fix custom interpreter to have Zope2 paths after current working directory and PYTHONPATH, but before other Python paths to avoid conflicts with other Zope Debian packages installed. -- Jonas Meurer Tue, 11 Oct 2011 15:52:50 +0200 zope2.12 (2.12.11-1) unstable; urgency=low * New upstream release. A tarball version of Zope 2.12.11 is available. * Added pip to the deb-satisfied list, which prevents get-orig-source from fetching it. * Updated the patches. * Reapplied the commenting syntax for the zope.conf zodb storage configuration. This syntax allows the zope creation scripts to enable the proper storage type while leaving the other commented out. * Transitioned the copyright from the old style to the DEP5 standard. * Added the build-scripts to the debian directory. These scripts previously came with the tarball source. These have been pulled out in an effort to lessen the dependencies and time it would take to get the latest release built. * Added the configure script and makefile.in file from the tarball source to a build-resources.patch. These have been simplified to address only the needs of this package. These resources could potentially be factored out in the future. * Fixed the custom python interpreter to set the sys.executable as itself. We set the executable so scripts like mkzeoinstance generate configuration that points at an executable that can load zope2.12's private environment. -- Michael Mulich (pumazi) Thu, 09 Dec 2010 23:50:43 -0500 zope2.12 (2.12.10-1) unstable; urgency=low * Adding myself to the package Uploaders. * Adding python-pkg-resources as a dependency. * Modified the watch file to point at the new tarball location. * Rewrote the rules file to use the newest style debhelper with override support. * Added the following package dependencies: python-clientform, python-mechanize, python-transaction, python-zconfig, python-zc.lockfile, python-zdaemon, python-zodb, python-zope.authentication, python-zope.browser, python-zope.component, python-zope.component-zcml, python-zope.configuration, python-zope.contenttype, python-zope.copy, python-zope.event, python-zope.exceptions, python-zope.hookable, python-zope.i18n, python-zope.i18nmessageid, python-zope.location, python-zope.proxy, python-zope.publisher, python-zope.schema, python-zope.security * Adding python-profiler as a suggested package, since a Zope2 ZPublisher test module uses the profiler. * Adding python-pip as a build dependency. * Added a get-orig-source rules target to build an orig.tar.gz. * Restored exclusive support for Python version 2.6. * Bumped zope-common's version compatiblity. * Removed the executable bit from the built distribution's python modules. * Removed an acient shell script in DocumentTemplate that dates back to the time of Python version 1.5. * Touched up the init script to provide remote_fs compatiblity. * Updated the copyright. Everything pulled in via the rules' get-orig-source is now under ZPL 2.1. Consult the source's COPYRIGHT file to verify these findings. -- Michael Mulich (pumazi) Wed, 24 Nov 2010 11:18:53 -0500 zope2.12 (2.12.0-1) unstable; urgency=low * Zope 2.12.0 release. [ Matthias Klose ] * Add the existing modular zope modules as dependencies. * Modules which are not yet packaged: Acquisition DateTime ExtensionClass Persistence RestrictedPython tempstorage zLOG zope.container zope.contentprovider zope.contenttype zope.deferredimport zope.formlib zope.lifecycleevent zope.pagetemplate zope.processlifetime zope.sendmail zope.sequencesort zope.site zope.size zope.structuredtext zope.tal zope.tales zope.testbrowser [zope-functional-testing] (UNRELEASED?) zope.viewlet zope.app.form zope.app.publication zope.app.publisher zope.app.schema * Fix the build such that the package builds again. [ Jonas Meurer ] * Remove pycentral cleanup code from debian/zopeZVER.preinst.in. * Remove exclusion of python2.5/2.6 code from dh_pysupport. * Bump python version to 2.6. * Remove useless tarball handling from debian/rules, distribute zope upstream tarball directly. * Migrate to quilt patch system from dpatch. * Build-Depend on python-setuptools. [ Bernd Zeimetz ] * Removing myself from Uploaders. Unfortunately I don't have enough spare time to contribute. -- Jonas Meurer Mon, 08 Mar 2010 18:14:40 +0100 zope2.11 (2.11.3-1) unstable; urgency=low * New upstream release * Minor improvement to the long description of zope2.11-sandbox. (closes: #527030) * Don't delete lib/python/pytz/LICENSE.txt as it is not provided any longer. * Reorder targets and dependencies in debian/rules to actually fix parallel building. Still disable parallel building for now, as suggested by Lucas Nussbaum. (closes: #534013) * Migrate from python-central to python-support: - add debian/pyversions, remove debian/pycompat - add depends on ${python:Depends} - add pycentral cleanup code to debian/zopeZVER.preinst.in * Exclude lib/python/RestrictedPython/tests and lib/python/mechanize from byte-compiling with dh_pysupport, as both include code for python2.5+ that fails to compile with python2.4. * Bump standards-version to 3.8.2, no changes needed. * Check for /etc/default/zope2.10 before including it in initscript. * lintian cleanup: - zopeZVER-sandbox.copyright.in: link to GPL-2 instead of GPL. - *.{post|pre}{inst|rm}: use set -e instead of /bin/sh -e. -- Jonas Meurer Fri, 03 Jul 2009 14:42:22 +0200 zope2.11 (2.11.2-1) unstable; urgency=low * New major upstream release. New source package. - Update debian/rules, debian/watch and debian/control. - Update deb-zopeconf.dpatch. - Don't remove lib/python/Products/Five/doc/ZopePublicLicense.txt and lib/python/ZConfig/LICENSE.txt, as upstream doesn't ship them any more - Don't chmod lib/python/ImageFile.py and lib/python/Products/ZGadflyDA/Setup for the same reason. - Update initscript to talk about @ZVER@ instead of zope2.9. * Bump standards-version to 3.8.1, no changes needed * Bump debian/compat to 5, adjust versioned Build-Depends on debhelper. * Change section to zope in debian/control, according to http://ftp-master.debian.org/~joerg/sections.march2009.txt -- Jonas Meurer Sun, 15 Mar 2009 17:42:03 +0100 zope2.10 (2.10.7-1) unstable; urgency=low [ Bernd Zeimetz ] * debian/control: - Updating my email address. [ Jonas Meurer ] * New upstream release. * Redirect output of 'bin/zopectl logreopen' to /dev/null in logrotate postrotate script. (closes: #514059) * Bump standards-version to 3.8.0: - debian/control: Add Homepage and Vcs-Browser fields, change XS-Vcs-Svn to Vcs-Svn. - debian/README.source: Added. - debian/rules: Add $(confflags) as described in /usr/share/doc/autotools-dev/README.Debian.gz, and build options like $(CFLAGS) as described in policy. * lintian checks: - Remove linda overrides. - Add overrride for package-contains-empty-directory usr/lib/zope2.10/skel/etc/package-includes/ -- Jonas Meurer Wed, 25 Feb 2009 16:24:18 +0100 zope2.10 (2.10.6-1) unstable; urgency=low * New upstream release. * debian/rules, debian/control: use python-tz instead of shipping a private version of it. (Closes: #474597) -- Fabio Tranchitella Mon, 12 May 2008 12:18:37 +0200 zope2.10 (2.10.5-3) unstable; urgency=low * debian/zopeZVER.NEWS.Debian: removed, the content was out-dated. (Closes: #456881) -- Fabio Tranchitella Tue, 18 Dec 2007 10:50:22 +0100 zope2.10 (2.10.5-2) unstable; urgency=low * debian/zopeZVER.logrotate.in: use the original mode, user and group while rotating the logs. (Closes: #453396) -- Fabio Tranchitella Thu, 29 Nov 2007 11:51:34 +0100 zope2.10 (2.10.5-1) unstable; urgency=low * New upstream release. * debian/patches/deb-zopeconf.dpatch: fixed argument handling. (Closes: #440224) -- Fabio Tranchitella Sun, 04 Nov 2007 12:25:25 +0100 zope2.10 (2.10.4-2) unstable; urgency=low [ Jonas Meurer ] * Add a watch file. [ Bernd Zeimetz ] * Porting the new deb patch was a bit hasty, we should not use zope2.9 directories - fixing that. -- Bernd Zeimetz Mon, 13 Aug 2007 20:11:39 +0200 zope2.10 (2.10.4-1) unstable; urgency=low [ Bernd Zeimetz ] * Adding the latest Debian specific patch to support ZEOs as primary datastore in mkzopeinstance. [ Jonas Meurer ] * New upstream release. -- Bernd Zeimetz Thu, 26 Jul 2007 11:29:53 +0200 zope2.10 (2.10.3-2) unstable; urgency=low * Upload to unstable. -- Fabio Tranchitella Wed, 11 Apr 2007 13:28:18 +0200 zope2.10 (2.10.3-1) unstable; urgency=low * New upstream release. -- Fabio Tranchitella Mon, 2 Apr 2007 08:46:23 +0200 zope2.10 (2.10.2-2) experimental; urgency=low * debian/patches/webdav.dpatch: applied patch to fix webdav quoting for resources with names containing spaces. (Closes: #410051) -- Fabio Tranchitella Fri, 9 Feb 2007 12:59:18 +0100 zope2.10 (2.10.2-1) experimental; urgency=low [ Jonas Meurer] * New upstream release 2.10.2 * add XS-Vcs-Svn to debian/control -- Jonas Meurer Sat, 27 Jan 2007 02:13:58 +0100 zope2.10 (2.10.1-1) experimental; urgency=low * New upstream release 2.10.1 -- Jonas Meurer Sat, 25 Nov 2006 18:58:45 +0100 zope2.10 (2.10.0-3) experimental; urgency=low * upload with orig.tar.gz this time (build with dpkg-buildpackage -sa) -- Jonas Meurer Fri, 17 Nov 2006 16:09:30 +0100 zope2.10 (2.10.0-2) experimental; urgency=low * add myself to uploaders * really upload to experimental -- Jonas Meurer Fri, 17 Nov 2006 15:27:33 +0100 zope2.10 (2.10.0-1) experimental; urgency=low * New major upstream release, new source package. - Update deb-zopeconf.dpatch. - Don't remove lib/python/docutils/COPYING.txt as upstream doesn't ship it any more. * upload to experimental -- Jonas Meurer Fri, 17 Nov 2006 15:22:02 +0100 zope2.9 (2.9.5-1) unstable; urgency=low * New upstream release. -- Fabio Tranchitella Sun, 8 Oct 2006 15:31:20 +0200 zope2.9 (2.9.4-1) unstable; urgency=low * New upstream release. * debian/patches/rst-docutils.dpatch: removed, applied upstream. -- Fabio Tranchitella Fri, 21 Jul 2006 09:43:48 +0200 zope2.9 (2.9.3-3) unstable; urgency=high * Fixed an information disclosure vulnerability (CVE-2006-3458) applying upstream patch: disable reStructuredText's 'raw' and 'include' directives. (Closes: #377286) * debian/control: use --home instead of --prefix when calling make install. (Closes: #373710) -- Fabio Tranchitella Tue, 11 Jul 2006 16:26:48 +0200 zope2.9 (2.9.3-2) unstable; urgency=low * debian/rules: zope2.9-sandbox should be created by binary-indep. (Closes: #368614) * debian/patches/deb-zopeconf.dpatch: patch mkzeoinstance to fix the python library path. -- Fabio Tranchitella Tue, 13 Jun 2006 09:57:20 +0200 zope2.9 (2.9.3-1) unstable; urgency=low * New upstream release. * Standards-Version: 3.7.2, no changes necessary. -- Fabio Tranchitella Fri, 12 May 2006 15:13:05 +0200 zope2.9 (2.9.2-1) unstable; urgency=low * New upstream release. -- Fabio Tranchitella Tue, 11 Apr 2006 10:32:16 +0200 zope2.9 (2.9.1-1) unstable; urgency=low * New major upstream release, new source package. (Closes: #344224, #355758) -- Fabio Tranchitella Mon, 20 Mar 2006 21:18:58 +0000 zope2.8 (2.8.5-1) unstable; urgency=low * New upstream release. * debian/zopeZVER.init.in: fixed a typo which prevents zeo instances to be started by the init script. (Closes: #341527) -- Fabio Tranchitella Sun, 15 Jan 2006 19:54:59 +0000 zope2.8 (2.8.4-2) unstable; urgency=low * debian/rules: remove RestrictedPython/tests/before_and_after24.py, because contains a syntax error. (Closes: #340542) -- Fabio Tranchitella Thu, 24 Nov 2005 13:34:47 +0000 zope2.8 (2.8.4-1) unstable; urgency=low * New upstream release (2.8.4). * Don't remove /var/log/zope2.8/ on package removal. (Closes: #333855) * debian/copyright: added a note about Medusa license, since some copyright notices inside the upstream tarball are wrong. I think this is enough to close the bugreport, and I'll ask upstream to change the license statement, too. (Closes: #340164) -- Fabio Tranchitella Wed, 23 Nov 2005 14:59:27 +0000 zope2.8 (2.8.3-1) unstable; urgency=low * New upstream release (2.8.3). -- Fabio Tranchitella Sun, 23 Oct 2005 14:15:23 +0000 zope2.8 (2.8.1-7) unstable; urgency=medium * Apply Hotfix 2005-10-09, resolving a security issue with docutils. -- Matthias Klose Sat, 15 Oct 2005 11:55:49 +0200 zope2.8 (2.8.1-6) unstable; urgency=low * Fix debconf dependency (closes: #332178). * Fix error in mkzeoinst.py script (closes: #331061). -- Matthias Klose Sat, 8 Oct 2005 16:38:48 +0200 zope2.8 (2.8.1-5) unstable; urgency=low * Upload to unstable. -- Fabio Tranchitella Wed, 7 Sep 2005 14:57:11 +0000 zope2.8 (2.8.1-4) experimental; urgency=low * debian/control: build-depends on lsb-release, and use it in debian/rules to guess the distribution (Debian or Ubuntu). -- Fabio Tranchitella Tue, 23 Aug 2005 14:16:18 +0000 zope2.8 (2.8.1-3) experimental; urgency=low * debian/rules: do not remove tests, Five needs them. -- Fabio Tranchitella Fri, 19 Aug 2005 12:19:59 +0000 zope2.8 (2.8.1-2) experimental; urgency=low * debian/patches/deb-zopeconf.dpatch: added --service-port argument to makezopeinstance.py. -- Fabio Tranchitella Thu, 18 Aug 2005 19:47:27 +0000 zope2.8 (2.8.1-1) experimental; urgency=low * New upstream release. -- Fabio Tranchitella Fri, 12 Aug 2005 06:56:48 +0000 zope2.8 (2.8.0-2) experimental; urgency=low * debian/control: o provides zope o build-deps on python o depends on lsb-base * debian/zopeZVER-sandbox.dzinstance.in: use @ZVER@ substitution. * debian/zopeZVER.init.in: use lsb-base functions. * debian/rules: use $(ZOPE) instead of zope2.8. * debian/patches/deb-zopeconf.dpatch: allow to run instances with a custom user instead of zope. -- Fabio Tranchitella Wed, 10 Aug 2005 17:49:57 +0000 zope2.8 (2.8.0-1) experimental; urgency=low * Initial Release. (Closes: #314589) -- Fabio Tranchitella Wed, 13 Jul 2005 14:12:32 +0000 debian/zopeZVER-sandbox.templates.in0000644000000000000000000000011712214020753014626 0ustar Template: zope@ZVER@-sandbox/internal Type: note Description: for internal use debian/build-scripts/0000755000000000000000000000000012214021137011743 5ustar debian/build-scripts/gen_versions_cfg.py0000644000000000000000000001204212145142650015643 0ustar #!/usr/bin/env python # -*- coding: utf-8 -*- """ Install procedure :author: Michael Mulich :copyright: 2010 by Penn State University :organization: WebLion Group, Penn State University :license: GPL, see LICENSE for more detail """ import sys import tempfile import urllib2 import ConfigParser from urlparse import urlparse assert sys.version_info >= (2, 7), "Python >= 2.7 is required" __version__ = '0.1.0' class VersionCfg(object): """A versions.cfg configuration object.""" def __init__(self, file_path, comes_from=None): self.file_path = file_path if not comes_from is None or not isinstance(comes_from, self.__class__): RuntimeError("Expected None or a %s type object, recieved %s." \ % (self.__class__.__name__, type(comes_from))) self.cfg = self.__class__.read_cfg(self.file_path) self.comes_from = comes_from if self.is_extended: self.__init_extend() def __init_extend(self): """Initialized the configuration file this configuration file extends.""" extends_value = self.cfg.get('buildout', 'extends') url_parts = urlparse(extends_value) kls = self.__class__ if url_parts.scheme is None \ or url_parts.scheme == 'file': self.extends = kls(url_parts.path, self) else: self.extends = kls.from_url(extends_value, self) @classmethod def from_url(cls, url, comes_from=None): """Instantiate the class from a config at some URL.""" try: data = urllib2.urlopen(url) except urllib2.HTTPError, e: raise RuntimeError("The versions.cfg file could not be downloaded. " "Please check the that you can get to %s." % url) file_path = tempfile.mkstemp()[1] with open(file_path, 'w') as f: f.write(data.read()) obj = cls(file_path, comes_from=comes_from) setattr(obj, 'url', url) return obj @staticmethod def read_cfg(file_path): """Read in the configuration file and return a ConfigParser.RawConfigParser instance.""" cfg = ConfigParser.RawConfigParser() with open(file_path, 'r') as f: cfg.readfp(f) return cfg @property def is_extended(self): """Has this versions.cfg extended another configuration file?""" if hasattr(self, '_extends'): return self._extends if self.cfg.has_option('buildout', 'extends'): self._extends = True else: self._extends = False return self._extends def has(self, key): """Check for the key somewhere in the version hierarchy.""" if self.cfg.has_option('versions', key): return True elif self.is_extended: return self.extends.has(key) else: return False def get(self, key): """Get the value of key from somewhere in the version hierarchy.""" try: return (self.cfg.get('versions', key), self) except ConfigParser.NoOptionError, err: if self.is_extended: return self.extends.get(key) else: raise err def items(self): # Build a set of option keys options = set() version_obj = self while version_obj: options = options.union(version_obj.cfg.options('versions')) version_obj = getattr(version_obj, 'extends', None) # Attatch the values to the options return [(name, self.get(name),) for name in options] def merge(self, io_obj): """Merge from this configuration downward (if it extends others). Output to an IO object.""" # Group by where name value pair come from grouping = {} for name, (value, comes_from) in self.items(): if not comes_from in grouping: grouping[comes_from] = {} grouping[comes_from][name] = value # Write out the merge url_or_path = lambda c: hasattr(c, 'url') and c.url or c.file_path io_obj.write("# Merging %s version configuration files:\n" \ % len(grouping)) for group in grouping.keys(): io_obj.write("# - %s\n" % url_or_path(group)) io_obj.write("[versions]\n") for came_from, values in grouping.items(): io_obj.write("# Pinnings came from %s\n" % url_or_path(came_from)) for name, value in values.items(): io_obj.write("%s = %s\n" % (name, value)) def main(): args = sys.argv if args[0].endswith(__file__): args.pop(0) if len(args) < 1: print("usage: %s URL") sys.exit(1) url = args[0] url_parts = urlparse(url) if url_parts.scheme is None \ or url_parts.scheme == 'file': versions_cfg = VersionCfg(url_parts.path) else: versions_cfg = VersionCfg.from_url(url) versions_cfg.merge(sys.stdout) if __name__ == '__main__': main() debian/build-scripts/_pip_dependency.py0000755000000000000000000000676612145142650015473 0ustar #!/usr/bin/env python # -*- coding: utf-8 -*- """ Install the pip dependency from source or use the one provided by the system. Script returns a location to the pip installation, unless it is already part of the system install. :author: Michael Mulich :copyright: 2010 by Penn State University :organization: WebLion Group, Penn State University :license: GPL, see LICENSE for more detail """ import os import sys from optparse import OptionParser from tempfile import mkdtemp assert sys.version_info >= (2, 7), "Python >= 2.7 is required" from subprocess import Popen, PIPE try: import pkg_resources from setuptools.package_index import PackageIndex requirement_parser = pkg_resources.Requirement.parse except ImportError: raise RuntimeError("This installation script require Setuptools " "to be installed prior to the build. Please " "install Setuptools or Distribute before continuing.") __version__ = '0.1.0' USAGE = "usage: %prog [options] PIP_VERSION [SRC_DIR]" def append_to_python_path(entry): """Append an entry to the PYTHONPATH environment value.""" python_path = os.environ.get('PYTHONPATH', None) if not python_path: python_path = [] else: python_path = python_path.split(os.pathsep) if entry not in python_path: python_path.append(entry) python_path = os.pathsep.join(python_path) return python_path parser = OptionParser(usage=USAGE) parser.add_option('--build-location', dest='build_location', metavar='LOCATION', default=os.path.abspath(os.curdir), help="a location where pip should be built") def main(): options, args = parser.parse_args() try: pip_version = args[0] except IndexError, e: parser.print_usage() raise RuntimeError('Failed with: %s' % e) source = None if len(args) > 1: source = os.path.realpath(args[1]) # Check to see if we already have a version of pip we can use. has_pip = False try: pip_reqs = pkg_resources.require('pip>=%s' % pip_version) except pkg_resources.VersionConflict: pass except pkg_resources.DistributionNotFound: pass else: # We already have pip. There is no reason to continue. new_path_entry = pip_reqs[0].location python_path = append_to_python_path(new_path_entry) print('PYTHONPATH=%s' % python_path) sys.exit(0) install_dir = options.build_location # Check to see if pip has already been built. pip_install = [i for i in os.listdir(install_dir) if i.startswith('pip')] if not pip_install: easy_install = 'from setuptools.command.easy_install import main; main()' cmd = [sys.executable, '-c', easy_install, # easy_install arguments: '-mqNxd', install_dir] # Provide the source or a requirement line if source: cmd.append(source) else: cmd.append('pip==%s' % pip_version) # Run easy_install p = Popen(cmd, stdout=PIPE) comm = p.communicate() pip_install = [i for i in os.listdir(install_dir) if i.startswith('pip')] # Append it to the python path for environment variable input. pip_install = os.path.abspath(os.path.join(install_dir, pip_install[0])) python_path = append_to_python_path(pip_install) print('PYTHONPATH=%s' % python_path) if __name__ == '__main__': main() debian/build-scripts/install.py0000644000000000000000000000601111652231032013763 0ustar #!/usr/bin/env python # -*- coding: utf-8 -*- """ Install procedure :author: Michael Mulich :copyright: 2010 by Penn State University :organization: WebLion Group, Penn State University :license: GPL, see LICENSE for more detail """ import os import sys import shutil from optparse import OptionParser __version__ = '0.1.0' RUN_LOCATION = os.path.abspath(os.curdir) PREFIX = 'dist' DEFAULT_EXTRACTION_POINT = os.path.join(RUN_LOCATION, 'build') def store_abs_path(option, opt_str, value, parser): setattr(parser.values, option.dest, os.path.abspath(value)) parser = OptionParser() parser.add_option('--dists', dest='dists', metavar='DIR', type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(DEFAULT_EXTRACTION_POINT, PREFIX), help="distribution library build directory") parser.add_option('--dists-dest', dest='dists_dest', metavar='DIR', help="distribution library destination") parser.add_option('--scripts', dest='scripts', metavar="DIR", type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(DEFAULT_EXTRACTION_POINT, '%s-scripts' % PREFIX), help="distribution scripts source build directory") parser.add_option('--scripts-dest', dest='scripts_dest', metavar="DIR", help="distribution scripts destination") parser.add_option('--pth', dest='pth', metavar="DIR", type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(DEFAULT_EXTRACTION_POINT, '%s-pth' % PREFIX), help="distribution pth file build directory") parser.add_option('--pth-dest', dest='pth_dest', metavar="DIR", help="distribution pth file target destination") def main(): (options, args) = parser.parse_args() libs = options.dists scripts = options.scripts pth_files = options.pth pths = [os.path.join(pth_files, pth_file) for pth_file in os.listdir(pth_files)] libs_dst = options.dists_dest scripts_dst = options.scripts_dest pth_dst = options.pth_dest # Install the libraries for d in os.listdir(libs): src = os.path.join(libs, d) dst = os.path.join(libs_dst, d) if os.path.isdir(src): copy = shutil.copytree else: # To allow for zipped distributions (a.k.a. eggs). copy = shutil.copy2 copy(src, dst) # Install the scripts for s in os.listdir(scripts): src = os.path.join(scripts, s) dst = os.path.join(scripts_dst, s) shutil.copy2(src, dst) # Install the pth file for pth in pths: shutil.copy2(pth, pth_dst) if __name__ == '__main__': main() debian/build-scripts/gen_script.py0000644000000000000000000000476612145142650014476 0ustar #!/usr/bin/env python # -*- coding: utf-8 -*- """ Script generation :author: Michael Mulich :copyright: 2010 by Penn State University :organization: WebLion Group, Penn State University :license: GPL, see LICENSE for more detail """ import os import sys import stat from optparse import OptionParser assert sys.version_info >= (2, 7), "Python >= 2.7 is required" __version__ = '0.1.0' script_template = """\ %(initialization)s import %(module_name)s if __name__ == '__main__': %(module_name)s.%(callable)s(%(arguments)s) """ usage = "%prog [options] module callable script_name" parser = OptionParser(usage=usage) parser.add_option('-a', '--default-arguments', dest='arguments', default='', help="Arguments to call the callble with.", metavar='ARGS') parser.add_option('-i', '--init-code', dest='initialization', default='', help="Code that initializes the script or arguments", metavar='CODE') parser.add_option('-e', '--executable', dest='executable', default='/usr/bin/env python', help="An executable to call the script with... used in the " "script's shabang line.", metavar='EXEC') parser.add_option('-d', '--directory', dest='directory', default=os.curdir, help="The directory where the output should go, defaults to " "the current directory.", metavar='DIR') def main(): (options, args) = parser.parse_args() try: (module, callable, script_name) = args except ValueError, err: print('\n'.join([parser.get_usage(), repr(err)])) sys.exit(1) # Generate the contents of the script shabang_line = '#!' + options.executable script_body = script_template % dict(module_name=module, callable=callable, initialization=options.initialization, arguments=options.arguments, ) script_body = shabang_line + script_body # Create and write to the script file script_path = os.path.join(options.directory, script_name) with open(script_path, 'w') as f: f.write(script_body) mode = (stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC | stat.S_IRGRP | stat.S_IXGRP) os.chmod(script_path, mode) if __name__ == '__main__': main() debian/build-scripts/build.py0000644000000000000000000002467712145142650013443 0ustar #!/usr/bin/env python # -*- coding: utf-8 -*- """ Install proceedure :author: Michael Mulich :copyright: 2010 by Penn State University :organization: WebLion Group, Penn State University :license: GPL, see LICENSE for more detail """ import os import sys import shutil from optparse import OptionParser from subprocess import Popen, PIPE from tempfile import mkdtemp assert sys.version_info >= (2, 7), "Python >= 2.7 is required" __version__ = '0.1.0' HERE = os.path.abspath(os.path.dirname(__file__)) RUN_LOCATION = os.path.abspath(os.curdir) EASY_INSTALL_CMD = "from setuptools.command.easy_install import main; main()" SCRIPT_ENTRY_POINT_GROUP = 'console_scripts' # REQUIRES Setuptools (or Distribute) is_using_distribute = False try: import pkg_resources if hasattr(pkg_resources, '_distribute'): is_using_distribute = True except ImportError: raise RuntimeError("This installation script requires Setuptools " "to be installed prior to the build. Please install " "Setuptools or Distribute before continuing.") try: if not is_using_distribute: pkg_resources.require('Setuptools>=0.6c11') except pkg_resources.VersionConflict: dist = pkg_resources.get_distribution('Setuptools') raise RuntimeError("This installation script requires a version of " "Setuptools that is greater than or equal to " "0.6c11. Please upgrade the Setuptools " "distribution before continuing. You currently " "have version %s installed" % dist.version) # Which variant of Setuptools is being used # Addresses https://weblion.psu.edu/trac/weblion/ticket/2363 if is_using_distribute: setuptools_variant = 'distribute' else: setuptools_variant = 'setuptools' def init_configs(in_location, out_location, config_vars, ext='.in'): """Initialize the configuration files. Use variable substitution on files ending with the defined extension (the ext keyword argument). Returns a list of configuration files.""" files = [] for file in os.listdir(in_location): if file.startswith('.'): # VC files (e.g. .svn and .hg) continue file_path = os.path.join(in_location, file) if file.endswith(ext): out_file_path = os.path.join(out_location, file_path.rstrip(ext)) with open(file_path, 'r') as f_in: with open(out_file_path, 'w') as f_out: f_out.write(f_in.read() % config_vars) file_path = out_file_path files.append(file_path) def install_dist(src_loc, base_install_dir='.', base_build_dir='.'): """Installs a distribution using Setuptool's easy_install command. Returns a path location where the distribution has been installed.""" # Define some useful information that we are going to use later in # the process to figure out the name and version from pip.req import InstallRequirement req = InstallRequirement(os.path.basename(src_loc), None, source_dir=src_loc) common_args = [sys.executable, '-c', EASY_INSTALL_CMD, '-mZUNxd'] # Install the dist to a temporary location tmp = mkdtemp(dir=base_build_dir) args = common_args + [tmp, src_loc] install_process = Popen(args, stdout=PIPE, stderr=PIPE, env=os.environ) stdout, stderr = install_process.communicate() if not install_process.returncode == 0: print("ERROR while building \"%s\"." % req.name) print("We were attempting to run \"%s\"." % ' '.join(args)) indent_print = lambda s: '\n'.join([' ' + l for l in s.split('\n')]) print("Output before the error:") print(indent_print(stdout)) print("Error message:") print(indent_print(stderr)) sys.exit(1) # Move the built distribution to an install location built_dist_loc = os.path.join(tmp, os.listdir(tmp)[0]) install_dist_dirname = "%s-%s.egg" % (req.name, req.pkg_info()['version']) install_dist_loc = os.path.join(base_install_dir, install_dist_dirname) shutil.copytree(built_dist_loc, install_dist_loc) shutil.rmtree(tmp) # Create a Distribution object from install metadata_dirname = 'EGG-INFO' metadata = pkg_resources.PathMetadata(install_dist_loc, os.path.join(install_dist_loc, metadata_dirname)) dist = pkg_resources.Distribution(location=install_dist_loc, metadata=metadata, project_name=req.name, version=req.pkg_info()['version']) return dist def gen_scripts(dist, install_dir): """Generate the distribution's scripts.""" gen_script_cmd = [sys.executable, os.path.join(HERE, 'gen_script.py')] common_args = ['-d', install_dir, '-e', os.path.abspath(sys.executable)] scripts = [] for name in pkg_resources.get_entry_map(dist, SCRIPT_ENTRY_POINT_GROUP): entry_point = dist.get_entry_info(SCRIPT_ENTRY_POINT_GROUP, name) args = common_args + [entry_point.module_name, '.'.join(entry_point.attrs), name] gen_script_process = Popen(gen_script_cmd + args) gen_script_process.wait() assert gen_script_process.returncode == 0, args scripts.append(name) return scripts def store_abs_path(option, opt_str, value, parser): setattr(parser.values, option.dest, os.path.abspath(value)) def separation_parser(option, opt_str, value, parser, sep_char, should_lower=False): new_value = [should_lower and v.lower() or v for v in value.split(sep_char) if v] setattr(parser.values, option.dest, tuple(new_value)) parser = OptionParser() parser.add_option('-b', '--build-dir', dest='build_dir', metavar='BUILDDIR', type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(RUN_LOCATION, 'build'), help="Build directory") parser.add_option('-s', '--source-dir', dest='source_dir', metavar='SOURCEDIR', type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(RUN_LOCATION, 'source'), help="Source directory") parser.add_option('-c', '--config-dir', dest='config_dir', metavar='CONFIGDIR', type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(RUN_LOCATION, 'configuration'), help="Configuration directory") parser.add_option('-f', '--final-dir', dest='final_dir', metavar='FINALDIR', help="The libraries final install location.") parser.add_option('-e', '--exclude', dest='exclusions', metavar='DIST_NAME', type='string', nargs=1, action='callback', callback=separation_parser, callback_args=(':', True), default=tuple(), # Unfortunately, we have to do a colon semparated list. # This is due to optparse inablity to handle n+/- args and # spaces are valid in distribution names. help="Distributions to exclude from the build. A colon " "separated string. " "(Setuptools variants are automatically excluded " "from the build.)") parser.add_option('--name', dest='name', metavar='NAME', type='string', nargs=1, default='unknown', help="The name of the project being built.") def main(): (options, args) = parser.parse_args() # Initialize the build locations. project_name = options.name build_area = options.build_dir source_area = options.source_dir config_area = options.config_dir if not os.path.exists(build_area): os.mkdir(build_area) # Define the build variables. in_file_vars = {'HERE': RUN_LOCATION} in_file_vars.update(os.environ) in_file_vars['setuptools_variant'] = setuptools_variant prefix = 'dist' dist_exclusions = list(options.exclusions) dist_exclusions.extend([setuptools_variant, 'pip']) # Define a working set to keep track of what distribution have been built. # NOTE: We don't actually use the working set yet, but it might be # handy in the future. working_set = pkg_resources.WorkingSet([]) # the empty list is important! # Write out the .in configuration files. configs = init_configs(config_area, build_area, in_file_vars) # Define locations where the results should go. install_dir = os.path.join(build_area, '%s' % prefix) script_dir = os.path.join(build_area, '%s-scripts' % prefix) pth_file_dir = os.path.join(build_area, '%s-pth' % prefix) tmp_install_area = os.path.join(build_area, 'tmp_installs') # Ensure these directories have been created. for dir in (install_dir, script_dir, pth_file_dir, tmp_install_area): if not os.path.exists(dir): os.mkdir(dir) # Build the distributions and generate their scripts. for dist_dir in os.listdir(source_area): if dist_dir.startswith('.') or dist_dir.lower() in dist_exclusions: # (e.g. .svn and .hg) continue src_loc = os.path.join(source_area, dist_dir) # logging ->"Installing %s..." % dist_dir) dist = install_dist(src_loc, base_install_dir=install_dir, base_build_dir=tmp_install_area) # Generate the scripts scripts = gen_scripts(dist, script_dir) # logging -> "Installing %s's scripts: %s" % (dist.project_name, ', '.join(scripts)) working_set.add(dist) # Build the PTH file. pth_filename = '%s.pth' % project_name lib_final_dir = install_dir if options.final_dir is not None: lib_final_dir = options.final_dir with open(os.path.join(pth_file_dir, pth_filename), 'w') as pth: final_locs = [] for dist in working_set: dist_dirname = os.path.basename(dist.location) final_locs.append(os.path.join(lib_final_dir, dist_dirname)) pth.writelines('\n'.join(final_locs)) if __name__ == '__main__': main() debian/build-scripts/fetch.py0000644000000000000000000003723112145142650013423 0ustar #!/usr/bin/env python # -*- coding: utf-8 -*- """ Fetch the source. :author: Michael Mulich :copyright: 2010 by Penn State University :organization: WebLion Group, Penn State University :license: GPL, see LICENSE for more detail """ import os import sys import logging import urllib2 import tempfile import ConfigParser import shutil from optparse import OptionParser assert sys.version_info >= (2, 7), "Python >= 2.7 is required" from subprocess import Popen, PIPE try: import pkg_resources from setuptools.package_index import PackageIndex requirement_parser = pkg_resources.Requirement.parse except ImportError: raise RuntimeError("This installation script and the resulting " "application require Setuptools to be installed " "prior to the build. Please install Setuptools or " "Distribute before continuing.") __version__ = '0.1.0' HERE = os.path.abspath(os.path.dirname(__file__)) RUN_LOCATION = os.path.abspath(os.curdir) PYPI = 'http://pypi.python.org/simple' INDEXES = [PYPI] # ! list required for concatenation in Pip code ! USAGE = "usage: %prog [options] requirement [...]" # Set up logging logger = logging.getLogger("Fetch") logger.addHandler(logging.StreamHandler(sys.stdout)) logger.setLevel(logging.ERROR) from pip.req import InstallRequirement, Link from pip.index import PackageFinder from pip.log import logger as pip_logger # For debugging purposes: if int(os.environ.get('DEBUG', '0')): pip_logger.consumers.append((25, sys.stdout,)) logger.setLevel(logging.DEBUG) # #################################### # # Requirements Gathering Functions # # #################################### # def get_versions_config(location, record_to): """Locate the versions.cfg file. Parse the versions.cfg and return it. Optionally, we can record it to the file system and use that acquire the configuration at a later time.""" logger.info("Obtaining the versions configuration at %s." % location) if not os.path.exists(record_to): # Generate a single .cfg from one location that may or may not # be extended by others elsewhere on the filesystem or net. gen_version_cfg_proc = Popen([sys.executable, os.path.join(HERE, 'gen_versions_cfg.py'), location], stdin=PIPE, stdout=PIPE) output, error = gen_version_cfg_proc.communicate() if gen_version_cfg_proc.returncode > 0: raise RuntimeError("Failed while attempting to generate the " "versions.cfg file. The following error was " "given: \n\n" + error) # Write the file out for recording purposes, but we never use it # outside the context of this fetching process. with open(record_to, 'w') as f: f.write(output) # Read in the version.cfg for pinning the requirements later in this # script. versions = ConfigParser.RawConfigParser() with open(record_to, 'r') as f: versions.readfp(f) if not versions.has_section('versions'): raise RuntimeError("We failed to obtain a useable versions.cfg. " "Check the file for proper formatting. Location is " "%s." % location) # Clean up the version values for name, value in versions.items('versions'): versions.set('versions', name, value.split('#')[0].strip()) return dict(versions.items('versions')) def find_source(req, src_dir, finder): loc = req.build_location(src_dir) # If we don't already have the distribution, go download it. if not os.path.exists(os.path.join(loc, 'setup.py')): if req.url is None: link = finder.find_requirement(req, upgrade=False) else: link = Link(req.url) assert link # We are now going to download the distribution's source using # the Link object created above. from pip.download import (is_vcs_url, is_file_url, unpack_vcs_link, unpack_file_url, unpack_http_url) try: # --------------------------- if is_vcs_url(link): unpack_vcs_link(link, loc) elif is_file_url(link): unpack_file_url(link, loc) else: unpack_http_url(link, loc, None, False) # --------------------------- except urllib2.HTTPError, e: raise Exception('111') return loc def get_specs(pkg_requirement, versions): """Pin a version to the name if the name appears in the versions configuration file.""" if not isinstance(pkg_requirement, pkg_resources.Requirement): raise TypeError("Expected a pkg_resources.Requirement instance. Got a " "%s." % type(pkg_requirement)) specs = [] name = pkg_requirement.project_name.lower() if versions.get(name, False): if pkg_requirement.specs: logger.warn("%s has a version specifier: %s. We are overriding " "this specifier with the one from versions.cfg." % (pkg_requirement.project_name, pkg_requirement.specs)) specs = [('==', versions[name],)] else: logger.debug("Couldn't find a known good version for %s." % name) return specs or pkg_requirement.specs def get_pkg_requirement(requirement_line, versions): """Parse the requirement line and pin the version. Returns a pkg_resources Requirement instance.""" try: pkg_requirement = pkg_resources.Requirement.parse(requirement_line) except ValueError, e: raise Exception("Requirement not parsable. (%s)" % requirement_line) pkg_requirement.specs = get_specs(pkg_requirement, versions) return pkg_requirement def process_extra_requirement(pkg_requirement, comes_from_req): """Takes a pkg_resources Requirement instance and Pip InstallRequirement. Delivers the parameters necessary to process an extra requirment. See http://peak.telecommunity.com/DevCenter/setuptools#declaring-extras-optional-features-with-their-own-dependencies for more information about requirement extras.""" if not isinstance(pkg_requirement, pkg_resources.Requirement): raise TypeError("Expected a pkg_resources.Requirement instance. Got a " "%s." % type(pkg_requirement)) elif not isinstance(comes_from_req, InstallRequirement): raise TypeError("Expected a pip.req.InstallRequirement instance. Got a " "%s." % type(comes_from_req)) parsed_extras = [ extra.replace('_', '-') for extra in pkg_requirement.extras ] return (pkg_requirement.project_name, parsed_extras, comes_from_req,) def fetch(requirements, indexes, versions, src, logger): """The following code has been extracted from pip.req.RequirementSet.prepare_files. It has been greatly simplified for this fetch case. Additionally, I have modified it to only acquire distribution information and the distribution source itself.""" # requirement_extras are Setuptools extra requirement delarations. We store # these are a three value tuple: 1) the requirement name 2) the extra names # and 3) where the extra requirements came from requirement_extras = [] # satisfied requirements are those requirements that have been processed. # We store them in a dictionary for later use. There is no use for them # at this time, but there may be in the future. satisfied_reqs = {} # Setup a package finder, which will search the index for the requirement finder = PackageFinder([], indexes) while requirements or requirement_extras: has_extra_requirements = False if requirement_extras: req_name, extra_names, came_from_req = requirement_extras.pop(0) if req_name in satisfied_reqs: logger.info("Reprocessing %s to satisfy the '%s' extra " "requirement(s)." % (req_name, extra_names)) else: logger.info("Including %s's extra requirement(s): %s" % (req_name, extra_names)) pkg_requirement = get_pkg_requirement(req_name, versions) req = InstallRequirement(str(pkg_requirement), came_from_req) has_extra_requirements = True else: req = requirements.pop(0) if req.name in satisfied_reqs and not has_extra_requirements: continue # Download and unpack the requirement. logger.info("Downloading and unpacking: %s" % req.name) req.source_dir = find_source(req, src, finder) req.run_egg_info() finder.add_dependency_links(req.dependency_links) # Roll through the regular requirements. for req_req in req.requirements(): pkg_requirement = get_pkg_requirement(req_req, versions) if pkg_requirement.extras: requirement_extras.append(process_extra_requirement(pkg_requirement, req)) else: new_req = InstallRequirement(str(pkg_requirement), req) requirements.append(new_req) # Only attempt to roll through the extra requirements if they are some. if has_extra_requirements: for extra in extra_names: section = "[%s]" % extra should_include_line = False for req_line in req.egg_info_lines('requires.txt'): if req_line == section: should_include_line = True continue elif req_line.startswith('[') and should_include_line: # The next section was found break elif should_include_line: pkg_requirement = get_pkg_requirement(req_line, versions) if pkg_requirement.extras: requirement_extras.append(process_extra_requirement(pkg_requirement, req)) else: new_req = InstallRequirement(str(pkg_requirement), req) requirements.append(new_req) satisfied_reqs[req.name] = req return satisfied_reqs # ######################## # # Option parsing logic # # ######################## # def store_abs_path(option, opt_str, value, parser): setattr(parser.values, option.dest, os.path.abspath(value)) def separation_parser(option, opt_str, value, parser, sep_char, should_lower=False): new_value = [should_lower and v.lower() or v for v in value.split(sep_char) if v] setattr(parser.values, option.dest, tuple(new_value)) parser = OptionParser(usage=USAGE) parser.add_option('-s', '--source-dir', dest='source_dir', metavar='SOURCEDIR', type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(RUN_LOCATION, 'source'), help="Source directory") parser.add_option('-c', '--config-dir', dest='config_dir', metavar='CONFIGDIR', type='string', nargs=1, action='callback', callback=store_abs_path, default=os.path.join(RUN_LOCATION, 'configuration'), help="Configuration directory") parser.add_option('--versions-cfg-url', dest='versions_cfg_url', metavar='URL', type='string', nargs=1, help="Versions configuration file (versions.cfg) URL.") parser.add_option('-i', '--index', dest='indexes', metavar='INDEX', type='string', nargs=1, action='callback', callback=separation_parser, callback_args=(';',), default=tuple(), help="List of index URLs separated by semicolons (';'). " "PyPI is included by default. This index list takes " "precedence over PyPI.") setuptools_help_info = "(Setuptools variants are automatically excluded " \ "from the build.)" parser.add_option('--exclude-singles', dest='single_exclusions', metavar='DIST_NAME', type='string', nargs=1, action='callback', callback=separation_parser, callback_args=(':', True), default=tuple(), # Unfortunately, we have to do a colon semparated list. # This is due to optparse inablity to handle n+/- args and # spaces are valid in distribution names. help="Distributions to exclude from the build. A colon " "separated string of distribution names. " + \ setuptools_help_info) parser.add_option('--exclude', dest='exclusions', metavar='DIST_NAME', type='string', nargs=1, action='callback', callback=separation_parser, callback_args=(':', False), default=tuple(), help="Distributions and their dependents to exclude from " "the build. A colon separated string of distribution " "names. " + setuptools_help_info) def main(): options, args = parser.parse_args() # *. Initialize variables configs = options.config_dir src = options.source_dir copyright_filename = 'COPYRIGHT' ##versions_filename = 'versions.cfg' indexes = list(options.indexes) + INDEXES for directory in (configs, src,): if not os.path.exists(directory): os.makedirs(directory) # 1. Version Specification if options.versions_cfg_url: versions_filename = os.path.join(configs, 'versions.cfg') versions = get_versions_config(options.versions_cfg_url, record_to=versions_filename) else: versions = {} # 2. Obtain the Source # Download the distribution source and verify we have aquired all # the dependencies. # Initialize the base requires from the arguments parse_reqs = lambda r: [InstallRequirement.from_line(line) for line in r] requirements = parse_reqs(args) exclusion_requirements = parse_reqs(options.exclusions) satisfied_reqs = fetch(requirements, indexes, versions, src, logger) if exclusion_requirements: exclusion_reqs = fetch(exclusion_requirements, indexes, versions, src, logger) else: exclusion_reqs = {} # 3. Clean Up single_reqs_to_remove = dict([(name,req) for name,req in satisfied_reqs.iteritems() if name.lower() in options.single_exclusions ]) exclusion_reqs.update(single_reqs_to_remove) for name, req in exclusion_reqs.iteritems(): logger.info("Excluding %s" % name) shutil.rmtree(req.source_dir) del satisfied_reqs[req.name] # 4. Produce copyright information with open(copyright_filename, 'w') as f: line_template = "%s by %s is licensed under %s.\n" pkg_info_defaults = {'author': 'Unknown', 'license': 'Unknown'} for req in satisfied_reqs.values(): pkg_info = dict([(k.lower(),v) for k,v in req.pkg_info().items()]) [pkg_info.setdefault(k,v) for k,v in pkg_info_defaults.items()] f.write(line_template % (pkg_info['name'], pkg_info['author'], pkg_info['license'])) if __name__ == '__main__': main() debian/zopeZVER.init.in0000644000000000000000000000561211652231032012143 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: zope@ZVER@ # Required-Start: $syslog $remote_fs # Required-Stop: $syslog $remote_fs # Should-Start: $remote_fs # Should-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start zope@ZVER@ instances # Description: Start the instances defined in /etc/default/zope@ZVER@ ### END INIT INFO ZVER=@ZVER@ [ -d /var/lib/zope$ZVER/instance -a -d /var/lib/zope$ZVER/zeo -a -d /usr/lib/zope$ZVER ] || exit 0 . /lib/lsb/init-functions if [ -f "/etc/default/zope$ZVER" ]; then . /etc/default/zope$ZVER fi if [ "$ZEOSERVERS" = "NONE" -o "$ZEOSERVERS" = "" ]; then ZEOSERVERS='' log_warning_msg "Zope$ZVER: ZEO servers have been disabled, edit /etc/default/zope$ZVER to enable them." elif [ "$ZEOSERVERS" = "ALL" ]; then ZEOSERVERS='*' fi if [ "$INSTANCES" = "NONE" -o "$INSTANCES" = "" ]; then INSTANCES='' log_warning_msg "Zope$ZVER: instances have been disabled, edit /etc/default/zope$ZVER to enable them." elif [ "$INSTANCES" = "ALL" ]; then INSTANCES='*' fi case "$1" in start|stop|restart) p=''; [ "$1" = "stop" ] && p='p' if [ -n "$ZEOSERVERS" ]; then cd /var/lib/zope$ZVER/zeo for i in $ZEOSERVERS ; do if [ "$i" = "*" ]; then # log_success_msg "Zope$ZVER: no ZEO servers found." break elif [ ! -d "$i" ]; then continue fi if [ -x $i/bin/zeoctl ] ; then log_begin_msg "Zope$ZVER: ${1}${p}ing $i ZEO server" dzhandle -z $ZVER zeoctl "$i" $1 >/dev/null 2>&1 log_end_msg $? else log_warning_msg "Zope$ZVER: skipping $i (old/purged)" fi done fi if [ -n "$INSTANCES" ]; then cd /var/lib/zope$ZVER/instance for i in $INSTANCES ; do if [ "$i" = "*" ]; then log_success_msg "Zope$ZVER: no instances found." break elif [ ! -d "$i" ]; then continue fi if [ -x $i/bin/zopectl ] ; then log_begin_msg "Zope$ZVER: ${1}${p}ing $i instance" dzhandle -z $ZVER zopectl "$i" $1 >/dev/null 2>&1 log_end_msg $? else log_warning_msg "Zope$ZVER: skipping $i (old/purged)" fi done fi ;; force-reload) echo "Zope$ZVER doesn't support force-reload, use restart instead." ;; *) echo "Usage: /etc/init.d/zope$ZVER {start|stop|restart|force-reload}" exit 1 ;; esac exit 0 debian/python_interpreter_template.in0000644000000000000000000000456611652231032015363 0ustar #!/usr/bin/python2.7 import os import sys import site def _prepare_sys_path(): """ Add Zope2 paths which must be after current working directory *and* PYTHONPATH but before other paths, otherwise it would conflict with already installed Debian packages of Zope. Only using addsitedir() is not enough as it appends to sys.path, thus Zope paths would end up at the end. """ # Always insert after the current working directory insert_zope_path_index = 1 # If PYTHONPATH is defined, then get the last position of # PYTHONPATH path within sys.path PYTHONPATH = os.getenv('PYTHONPATH') if PYTHONPATH: PYTHONPATH = PYTHONPATH.split(os.pathsep) import re # Prepare the regex to match existing sys.path for index, path in enumerate(PYTHONPATH): if path[-1] == os.sep: path = path[:-1] PYTHONPATH[index] = re.escape(path) PYTHONPATH_RE = re.compile("(%s)" % '|'.join(PYTHONPATH)) for path in sys.path[1:]: if not PYTHONPATH_RE.match(path): break insert_zope_path_index += 1 # All paths besides of current working directory and PYTHONPATH other_sys_path = sys.path[insert_zope_path_index:] # Only keep current working directory and PYTHONPATH and then add # Zope paths (addsitedir() only append to sys.path) sys.path[insert_zope_path_index:] = [] instance = os.getenv('INSTANCE_HOME') if instance: site.addsitedir(instance + '/lib/python') site.addsitedir('/usr/lib/zope@ZVER@/lib/python') sys.path.extend(other_sys_path) _prepare_sys_path() del _prepare_sys_path sys.executable = os.path.abspath(__file__) _interactive = True if len(sys.argv) > 1: _options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:') _interactive = False for (_opt, _val) in _options: if _opt == '-i': _interactive = True elif _opt == '-c': exec _val elif _opt == '-m': sys.argv[1:] = _args _args = [] __import__("runpy").run_module( _val, {}, "__main__", alter_sys=True) if _args: sys.argv[:] = _args __file__ = _args[0] del _options, _args execfile(__file__) if _interactive: del _interactive __import__("code").interact(banner="", local=globals()) debian/zopeZVER-sandbox.postinst.in0000644000000000000000000000011111652231032014504 0ustar #!/bin/sh set -e . /usr/share/debconf/confmodule #DEBHELPER# db_stop debian/zopeZVER.prerm.in0000644000000000000000000000052311652231032012321 0ustar #!/bin/sh set -e zope=zope@ZVER@ dpkg -L zope@ZVER@ | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' \ > /var/lib/$zope/_list_of_pyc_pyo_to_be_deleted_ case "$1" in remove|failed-upgrade|upgrade|deconfigure) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 debian/compat0000644000000000000000000000000211652231032010357 0ustar 7 debian/patches/0000755000000000000000000000000012214021137010606 5ustar debian/patches/build_resources.patch0000644000000000000000000001630412214017316015030 0ustar Build resouces that aid in the compilation of Zope2. --- /dev/null +++ b/Makefile.in @@ -0,0 +1,48 @@ +#!/usr/bin/make -f +# -*- makefile -*- +export PYTHON:=%(python_exec)s +DIST_NAME:=%(name)s +DIST_VER:=%(major_minor_version)s +DIST_FULLVER:=$(DIST_VER).%(point_version)s +PIPVER:=%(pip_version)s +DIST_INDEX:=%(index)s + +export DIST_DEST:=%(lib_dest)s +export SCRIPT_DEST:=%(script_dest)s +export PTH_DEST:=%(pth_dest)s + +export PYTHONPATH:= +DESTDIR:= +# Exclusions are a colon separated list of distribution names. +DIST_SINGLE_EXCLUSIONS:= +DIST_EXCLUSIONS:= + +# Change the following value to 1 to enable debug logging. +export DEBUG:=0 + +all: clean build + @echo "Now run 'make install'" + +clean: + @echo "Cleaning..." + -rm -rf ./build + -find ./source/ -maxdepth 2 -type d -name "build" -exec rm -rf {} \; + +distclean: clean + @rm Makefile + +build: + @echo "Building ${DIST_NAME} ${DIST_VER}..." + @$(PYTHON) ./debian/build-scripts/build.py \ + --exclude ${DIST_EXCLUSIONS} \ + --final-dir ${DIST_DEST} \ + --name ${DIST_NAME} + @echo "Now run 'make install'" + +install: + @$(PYTHON) ./debian/build-scripts/install.py \ + --dists-dest ${DESTDIR}${DIST_DEST} \ + --scripts-dest ${DESTDIR}${SCRIPT_DEST} \ + --pth-dest ${DESTDIR}${PTH_DEST} + +.PHONY: all build install clean distclean --- /dev/null +++ b/configure @@ -0,0 +1,153 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# --- +# Configuration for the Zope2.x Makefile. +# +# Author: Michael Mulich +# Copyright: 2010 by Penn State University +# Organization: WebLion Group, Penn State University +# License: GPL, see LICENSE for more detail +# --- +import os +import sys + +assert sys.version_info >= (2, 7), "Python >= 2.7 is required" + +# XXX Would much rather use argparse here, but it's not available in Python 2.7 +from optparse import OptionParser +from distutils.sysconfig import get_python_lib +from subprocess import Popen, PIPE + +MAKEFILE_IN = os.path.abspath('Makefile.in') +MAKEFILE = MAKEFILE_IN[:-3] +INDEX = 'http://download.zope.org/Zope2/index/%s/' + +# TODO Parse the version information from version.txt +VERSIONS = {'name': 'Zope2', + 'major_minor_version': '2.13', + 'point_version': '21', + 'pip_version': '0.8.1', + } +complete_version = '%s.%s' % (VERSIONS['major_minor_version'], + VERSIONS['point_version']) +VERSIONS['index'] = INDEX % complete_version + +site_pkgs = os.path.abspath(get_python_lib()) +script_loc = os.path.abspath(os.path.join(sys.exec_prefix, 'bin')) +default_values = {'python_exec': sys.executable, + 'lib_dest': site_pkgs, + 'script_dest': script_loc, + 'pth_dest': site_pkgs, + } + +def store_abs_path(option, opt_str, value, parser): + setattr(parser.values, option.dest, os.path.abspath(value)) + +def store_prefix_info(option, opt_str, value, parser): + """Given the prefix, find three values: + 1) The Python executable to use + 2) The site-packages directory + 3) The scripts/binaries directory + + Returns a tuple with the above values. + """ + prefix = os.path.abspath(value) + # XXX We are making an assumption that the python version used to configure + # the project is the same version used to build it. + python_version = '.'.join([str(i) for i in sys.version_info[:2]]) + python_str = 'python' + prefixed_site_pkgs = os.path.join(prefix, 'lib', python_str) + prefixed_bin_dir = os.path.join(prefix, 'bin') + python_exec = os.path.join(prefixed_bin_dir, python_str) + lib_dest = prefixed_site_pkgs + script_dest = prefixed_bin_dir + # Note: We don't find the pth destination because its destination is the + # same as the libraries themselves. + value_to_store = (python_exec, lib_dest, script_dest) + setattr(parser.values, option.dest, value_to_store) + +def find_location_from_python_exec(executable_path): + """Given the location of the python executable, find three values: + 1) The Python executable itself + 2) The site-packages directory + 3) the scripts/binaries directiory + + Returns a tuple with the above values. + """ + executable_path = os.path.realpath(executable_path) + # Check the python version first. + version_cmd = "import sys; assert sys.version_info >= (2, 7)" + p = Popen([executable_path, '-c', version_cmd]) + if p.returncode > 0: + raise RuntimeError("The given python executable does not meet the " + "version (>= 2.7).") + # Find the locations in question. + locations_cmd = ["import os, sys", + "from distutils.sysconfig import get_python_lib", + "print((sys.executable, os.path.abspath(get_python_lib()), os.path.abspath(os.path.join(sys.exec_prefix, 'bin')),))"] + locations_cmd = ';'.join(locations_cmd) + p = Popen([executable_path, '-c', locations_cmd], stdin=PIPE, stdout=PIPE) + stdout, stderr = p.communicate() + result = eval(stdout) + return result + + +class IgnoreUnknownOptionParser(OptionParser): + """An override of optparse.OptionParser that allows unknown options + to pass through without error.""" + + def error(self, msg): + if msg.startswith('no such option:'): + pass + else: + OptionParser.error(self, msg) + + +usage = "usage: %prog [--with-python | --prefix]" +parser = IgnoreUnknownOptionParser(usage=usage) +parser.add_option('--with-python', dest='python', + type='string', nargs=1, + action='callback', callback=store_abs_path, + help="Location of the Python executable to use.", + metavar='PYTHON') +parser.add_option('--prefix', dest='prefix', + type='string', nargs=1, + action='callback', callback=store_prefix_info, + default=tuple(), + help="Prefix for the installation.", + metavar='PREFIX') + +def main(): + (options, args) = parser.parse_args() + + in_vars = VERSIONS + + if options.prefix or options.python: + parts = options.prefix or find_location_from_python_exec(options.python) + python_exec, lib_dest, script_dest = parts + in_vars.update({'python_exec': python_exec, + 'lib_dest': lib_dest, + 'script_dest': script_dest, + 'pth_dest': lib_dest, + }) + else: + in_vars.update(default_values) + + print('-' * 80) + print("Zope2 final destinations:") + print(" libraries -> %s" % in_vars['lib_dest']) + print(" scripts -> %s" % in_vars['script_dest']) + print(" pth file -> %s" % in_vars['pth_dest']) + print('-' * 80) + + with open(MAKEFILE_IN, 'r') as f_in: + with open(MAKEFILE, 'w') as f_out: + f_out.write(f_in.read() % in_vars) + print("Configuration complete. You may now run: make && make install") + +if __name__ == '__main__': + if not os.path.exists(MAKEFILE_IN): + raise RuntimeError("Can't find the Makefile.in in the current " + "working directory. Please make sure you are " + "executing from the project's root location.") + main() debian/patches/Zope2-webdav_urljoin.patch0000644000000000000000000000110412145142650015641 0ustar Fix webdav quoting for resources with names containing spaces. --- a/source/Zope2/src/webdav/davcmds.py +++ b/source/Zope2/src/webdav/davcmds.py @@ -173,7 +173,7 @@ if dflag: ob._p_deactivate() elif hasattr(ob, '__dav_resource__'): - uri = urljoin(url, absattr(ob.getId())) + uri = urljoin(url, quote(absattr(ob.getId()))) depth = depth=='infinity' and depth or 0 self.apply(ob, uri, depth, result, top=0) if dflag: debian/patches/Zope2-deb_zopeconf.patch0000644000000000000000000002574712145142650015307 0ustar Debian specific configuration Index: zope2.13-2.13.20/source/Zope2/src/Zope2/utilities/copyzopeskel.py =================================================================== --- zope2.13-2.13.20.orig/source/Zope2/src/Zope2/utilities/copyzopeskel.py 2013-05-16 19:31:48.397487133 +0900 +++ zope2.13-2.13.20/source/Zope2/src/Zope2/utilities/copyzopeskel.py 2013-05-16 19:31:48.393487089 +0900 @@ -1,3 +1,5 @@ +#!/usr/bin/env python + ############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. @@ -162,7 +164,7 @@ copyskel(sourcedir, targetdir, uid, gid, **replacements) -def copyskel(sourcedir, targetdir, uid, gid, **replacements): +def copyskel(sourcedir, targetdir, uid, gid, layout='zope', **replacements): """ This is an independent function because we'd like to import and call it from mkzopeinstance """ # Create the top of the instance: @@ -174,13 +176,22 @@ # with it. pwd = os.getcwd() os.chdir(sourcedir) - try: + ##try: + if True: try: os.path.walk(os.curdir, copydir, (targetdir, replacements, uid, gid)) + if layout == 'fhs': + movedir(os.path.join(targetdir, 'etc'), + os.path.join('/etc/zope2.13', os.path.basename(targetdir)), + uid, gid) + movedir(os.path.join(targetdir, 'log'), + os.path.join('/var/log/zope2.13', os.path.basename(targetdir)), + uid, gid) finally: os.chdir(pwd) - except (IOError, OSError), msg: + ##except (IOError, OSError), msg: + else: print >>sys.stderr, msg sys.exit(1) @@ -240,6 +251,39 @@ if uid is not None: os.chown(dst, uid, gid) +def movedir(sourcedir, targetdir, uid, gid): + try: + os.makedirs(os.path.dirname(targetdir)) + if uid is not None: + os.chown(os.path.dirname(targetdir), uid, gid) + except: + pass + if not os.path.isdir(targetdir): + shutil.move(sourcedir, targetdir) + elif os.path.islink(sourcedir): + return + else: + import glob + for src in glob.glob(sourcedir + '/*') + glob.glob(targetdir + '/.*'): + base = os.path.basename(src) + target = os.path.join(targetdir, base) + if os.path.exists(target): + backup = target + '.old' + if os.path.exists(backup): + if os.path.isdir(backup): + shutil.rmtree(backup, ignore_errors=True) + else: + os.unlink(backup) + os.rename(target, backup) + shutil.move(src, target) + shutil.rmtree(sourcedir, ignore_errors=True) + if uid is not None: + os.chown(targetdir, uid, gid) + for root, dirs, files in os.walk(targetdir): + for name in files + dirs: + os.chown(os.path.join(root, name), uid, gid) + os.symlink(targetdir, sourcedir) + def usage(stream, msg=None): if msg: print >>stream, msg Index: zope2.13-2.13.20/source/Zope2/src/Zope2/utilities/mkzopeinstance.py =================================================================== --- zope2.13-2.13.20.orig/source/Zope2/src/Zope2/utilities/mkzopeinstance.py 2013-05-16 19:31:48.397487133 +0900 +++ zope2.13-2.13.20/source/Zope2/src/Zope2/utilities/mkzopeinstance.py 2013-05-16 19:31:48.393487089 +0900 @@ -1,3 +1,5 @@ +#!/usr/bin/env python + ############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. @@ -21,11 +23,16 @@ -u/--user NAME:PASSWORD -- set the user name and password of the initial user -s/--skelsrc -- the dir from which skeleton files should be copied -p/--python -- the Python interpreter to use +-l/--layout -- layout to use while copying the skeleton files (`fhs' or `zope') +--service-user -- system user to be used to run this instance (user:group) +--service-port -- HTTP port used to run this instance +--zeo-server HOST:PORT -- use a ZEO server instead of a local ZODB database When run without arguments, this script will ask for the information necessary to create a Zope instance home. """ +import re import getopt import os import sys @@ -34,8 +41,8 @@ def main(): try: opts, args = getopt.getopt(sys.argv[1:], - "hu:d:s:p:", - ["help", "user=", "dir=", "skelsrc=", "python="] + "hu:d:s:p:l:", + ["help", "user=", "dir=", "skelsrc=", "python=", "layout=", "service-user=", "service-port=", "zeo-server="] ) except getopt.GetoptError, msg: usage(sys.stderr, msg) @@ -47,6 +54,10 @@ skeltarget = None skelsrc = None python = None + layout = 'zope' + srvuser = 'zope:zope' + srvport = 9673 + zeoserver = None if check_buildout(script_path): python = os.path.join(script_path, 'zopepy') @@ -78,6 +89,36 @@ usage(sys.stderr, "user must be specified as name:password") sys.exit(2) user, password = arg.split(":", 1) + if opt in ("--layout",): + if not arg or arg not in ('fhs', 'zope'): + usage(sys.stderr, "layout to use while copying the skeleton files (`fhs' or `zope')") + sys.exit(2) + layout = arg + if opt in ("--service-user",): + if not arg: + usage(sys.stderr, "service user must not be empty") + sys.exit(2) + if not ":" in arg: + usage(sys.stderr, "service user must be specified as user:group") + sys.exit(2) + srvuser = arg + if opt in ("--service-port",): + if not arg: + usage(sys.stderr, "service port must not be empty") + sys.exit(2) + try: + srvport = int(arg) + except ValueError: + usage(sys.stderr, "service port must be an integer") + sys.exit(2) + if opt in ("--zeo-server",): + if not arg: + usage(sys.stderr, "zeo server must not be empty") + sys.exit(2) + if not ":" in arg: + usage(sys.stderr, "zeo server must be specified as host:port") + sys.exit(2) + zeoserver = arg if not skeltarget: # interactively ask for skeltarget and initial user name/passwd. @@ -129,12 +170,28 @@ "INSTANCE_HOME": instancehome, "ZOPE_SCRIPTS": script_path, "ZOPE2PATH": zope2path, + "ZOPE_USER": srvuser.split(":")[0], + "ZOPE_HTTPPORT": str(srvport), + "ZEO_SERVER": zeoserver or 'localhost:8100', } - copyzopeskel.copyskel(skelsrc, skeltarget, None, None, **kw) + import pwd, grp + uid = pwd.getpwnam(srvuser.split(":")[0]) + if uid: uid = uid[2] + gid = grp.getgrnam(srvuser.split(":")[1]) + if gid: gid = gid[2] + + copyzopeskel.copyskel(skelsrc, skeltarget, uid, gid, layout, **kw) if user and password: write_inituser(inituser, user, password) + zope_conf = os.path.join(skeltarget, 'etc', 'zope.conf') + re_zodb = re.compile('^# %s: ' % (zeoserver and 'ZEO' or 'ZODB')).sub + output = [] + for r in open(zope_conf).readlines(): + output.append(re_zodb('', r)) + open(zope_conf, 'w').write(''.join(output)) + def usage(stream, msg=None): if msg: print >>stream, msg Index: zope2.13-2.13.20/source/Zope2/src/Zope2/utilities/skel/etc/zope.conf.in =================================================================== --- zope2.13-2.13.20.orig/source/Zope2/src/Zope2/utilities/skel/etc/zope.conf.in 2013-05-16 19:31:48.397487133 +0900 +++ zope2.13-2.13.20/source/Zope2/src/Zope2/utilities/skel/etc/zope.conf.in 2013-05-16 19:31:48.393487089 +0900 @@ -23,6 +23,9 @@ # ZConfig "defines" used for later textual substitution %define INSTANCE <> +%define HTTPPORT <> +%define ZOPE_USER <> +%define ZEO_SERVER <> # Directive: instancehome # @@ -160,7 +163,7 @@ # Example: # # effective-user chrism - +effective-user $ZOPE_USER # Directive: enable-product-installation # @@ -938,7 +941,7 @@ # valid keys are "address" and "force-connection-close" - address 8080 + address $HTTPPORT # force-connection-close on # @@ -1002,15 +1005,42 @@ # IMPORTANT: At least one database with a mount-point of "/" # must be specified for Zope to start properly. - - # Main FileStorage database - - # See .../ZODB/component.xml for directives (sectiontype - # "filestorage"). - path $INSTANCE/var/Data.fs - - mount-point / - +# ZODB: +# ZODB: # Main FileStorage database +# ZODB: +# ZODB: path $INSTANCE/var/Data.fs +# ZODB: +# ZODB: mount-point / +# ZODB: + +# Other storage examples +# +# ZEO client storage: +# +# ZEO: +# ZEO: # The full mount-point syntax is: +# ZEO: # +# ZEO: # mount-point [:] +# ZEO # +# ZEO: # localpath - the path where the storage is mounted in this instance +# ZEO: # remotepath - is the path to the object in the storage where it is mounted +# ZEO: # from. This defaults to whatever is supplied for localpath. +# ZEO: mount-point / +# ZEO: # ZODB cache, in number of objects +# ZEO: cache-size 5000 +# ZEO: +# ZEO: # See .../ZODB/component.xml for directives (sectiontype +# ZEO: # "zeoclient +# ZEO: server $ZEO_SERVER +# ZEO: storage 1 +# ZEO: name zeostorage +# ZEO: var $INSTANCE/var +# ZEO: # ZEO client cache, in bytes +# ZEO: cache-size 20MB +# ZEO: # Uncomment to have a persistent disk cache +# ZEO: #client zeo1 +# ZEO: +# ZEO: # Temporary storage database (for sessions) @@ -1021,35 +1051,6 @@ container-class Products.TemporaryFolder.TemporaryContainer -# Other storage examples -# -# ZEO client storage: -# -# -# # The full mount-point syntax is: -# # -# # mount-point [:] -# # -# # localpath - the path where the storage is mounted in this instance -# # remotepath - is the path to the object in the storage where it is mounted -# # from. This defaults to whatever is supplied for localpath. -# mount-point / -# # ZODB cache, in number of objects -# cache-size 5000 -# -# # See .../ZODB/component.xml for directives (sectiontype -# # "zeoclient"). -# server localhost:8100 -# storage 1 -# name zeostorage -# var $INSTANCE/var -# # ZEO client cache, in bytes -# cache-size 20MB -# # Uncomment to have a persistent disk cache -# #client zeo1 -# -# - # Product configuration (product-config) section(s) # # Description: debian/patches/CVE-2012-5505.patch0000644000000000000000000000120212145316602013224 0ustar Index: zope2.12-2.12.26/source/zope.annotation/src/zope/annotation/configure.zcml =================================================================== --- zope2.12-2.12.26.orig/source/zope.annotation/src/zope/annotation/configure.zcml 2013-02-28 19:20:05.224588913 +0900 +++ zope2.12-2.12.26/source/zope.annotation/src/zope/annotation/configure.zcml 2013-02-28 19:20:05.220588872 +0900 @@ -6,10 +6,4 @@ factory=".attribute.AttributeAnnotations" /> - - debian/patches/use-python-initgroups.patch0000644000000000000000000000537012145316602016157 0ustar Index: zope2.13-2.13.20/configuration/versions.cfg =================================================================== --- zope2.13-2.13.20.orig/configuration/versions.cfg 2013-05-16 19:22:59.000000000 +0900 +++ zope2.13-2.13.20/configuration/versions.cfg 2013-05-16 19:34:23.267208213 +0900 @@ -129,7 +129,6 @@ datetime = 2.12.7 products.zctextindex = 2.13.4 extensionclass = 2.13.2 -initgroups = 2.13.0 products.standardcachemanagers = 2.13.0 record = 2.13.0 zodb3 = 3.10.5 Index: zope2.13-2.13.20/source/Zope2/pip-egg-info/Zope2.egg-info/requires.txt =================================================================== --- zope2.13-2.13.20.orig/source/Zope2/pip-egg-info/Zope2.egg-info/requires.txt 2013-05-16 19:23:07.000000000 +0900 +++ zope2.13-2.13.20/source/Zope2/pip-egg-info/Zope2.egg-info/requires.txt 2013-05-16 19:35:19.727835623 +0900 @@ -15,7 +15,6 @@ ZODB3 ZopeUndo docutils -initgroups pytz setuptools tempstorage @@ -63,4 +62,4 @@ Products.MailHost Products.MIMETools Products.PythonScripts -Products.StandardCacheManagers \ No newline at end of file +Products.StandardCacheManagers Index: zope2.13-2.13.20/source/Zope2/setup.py =================================================================== --- zope2.13-2.13.20.orig/source/Zope2/setup.py 2013-05-16 19:23:07.000000000 +0900 +++ zope2.13-2.13.20/source/Zope2/setup.py 2013-05-16 19:35:15.539789084 +0900 @@ -64,7 +64,6 @@ 'ZODB3', 'ZopeUndo', 'docutils', - 'initgroups', 'pytz', 'setuptools', 'tempstorage', Index: zope2.13-2.13.20/source/Zope2/src/Zope2.egg-info/requires.txt =================================================================== --- zope2.13-2.13.20.orig/source/Zope2/src/Zope2.egg-info/requires.txt 2013-05-16 19:23:07.000000000 +0900 +++ zope2.13-2.13.20/source/Zope2/src/Zope2.egg-info/requires.txt 2013-05-16 19:35:23.023872248 +0900 @@ -15,7 +15,6 @@ ZODB3 ZopeUndo docutils -initgroups pytz setuptools tempstorage @@ -63,4 +62,4 @@ Products.MailHost Products.MIMETools Products.PythonScripts -Products.StandardCacheManagers \ No newline at end of file +Products.StandardCacheManagers Index: zope2.13-2.13.20/source/Zope2/src/Zope2/Startup/__init__.py =================================================================== --- zope2.13-2.13.20.orig/source/Zope2/src/Zope2/Startup/__init__.py 2013-05-16 19:23:07.000000000 +0900 +++ zope2.13-2.13.20/source/Zope2/src/Zope2/Startup/__init__.py 2013-05-16 19:36:04.216329977 +0900 @@ -401,8 +401,7 @@ raise ZConfig.ConfigurationError(msg) try: - import initgroups - initgroups.initgroups(effective_user, gid) + os.initgroups(effective_user, gid) os.setgid(gid) except OSError: logger.exception('Could not set group id of effective user') debian/patches/series0000644000000000000000000000017212145142650012032 0ustar build_resources.patch Zope2-webdav_urljoin.patch Zope2-deb_zopeconf.patch CVE-2012-5505.patch use-python-initgroups.patch debian/zopeZVER-sandbox.README.Debian.in0000644000000000000000000000135711652231032014754 0ustar Notes about pre-packaged instances ---------------------------------- This is a pre-packaged instance of Zope@ZVER@, and it has been installed in /var/lib/zope@ZVER@/instance/sandbox. You can modify its configuration editing the file /etc/zope@ZVER@/sandbox/zope.conf. During configuration, debconf is used to ask the system administrator the user and password for initial user of the instance. If debconf had been configured to not display these questions, a random password has been generated. In this case, you have to use zpasswd.py utility to specify a new password for the initial user in order to have access to the Zope Management Interface of this instance. -- Fabio Tranchitella Thu, 18 Aug 2005 22:14:00 +0200 debian/control0000644000000000000000000000445612214020353010572 0ustar Source: zope2.13 Section: zope Priority: optional Maintainer: Debian/Ubuntu Zope Team Uploaders: Jonas Meurer , Arnaud Fontaine Build-Depends: debhelper (>= 7.0.50~), lsb-release, python (>= 2.7.3-1~), python2.7-dev, python-setuptools, python-pkg-resources, python-pip (>= 0.8), zope-debhelper (>= 0.3.12) Standards-Version: 3.9.4 X-Python-Version: 2.7 Homepage: http://zope2.zope.org/ Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-zope/zope2.13/trunk Vcs-Svn: svn://anonscm.debian.org/pkg-zope/zope2.13/trunk Package: zope2.13 Architecture: any Pre-Depends: zope-common (>= 0.5.52~) Depends: lsb-base, ${shlibs:Depends}, debconf | debconf-2.0, ${misc:Depends}, ${python:Depends}, python-docutils (>= 0.7), python-mechanize (>= 0.1.11), python-pkg-resources (>= 0.6.16-1.1) | python-pkg-resources (<< 0.6.15), python-tz Provides: zope Suggests: python-unit, python-profiler Description: Open Source Web Application Server Zope is an open source web application server primarily written in the Python programming language. It features a transactional object database which can store not only content and custom data, but also dynamic HTML templates, scripts, a search engine, and relational database (RDBMS) connections and code. . It features a strong through-the-web development model, allowing you to update your web site from anywhere in the world. To allow for this, Zope also features a tightly integrated security model. Built around the concept of "safe delegation of control", Zope's security architecture also allows you to turn control over parts of a web site to other organizations or individuals. . This package contains the framework and libraries needed to run your own Zope 2.13 instance. Package: zope2.13-sandbox Architecture: all Depends: debconf | debconf-2.0, ${misc:Depends}, ${zope:Depends} Description: sandbox instance for the zope2.13 web application server This package creates a "sandbox" instance, getting all Zope products and packages available which are installed as Debian packages. . The sandbox is usable for development and testing. For production please setup your own Zope 2.13 instance using dzhandle utility. debian/zopeZVER.default.in0000644000000000000000000000150211652231032012616 0ustar # Zope default file # ----------------- # # This file controls the start and the stop of ZEO servers and ZOPE instances # with the init script provided by zope@ZVER@ package. # # The following variables should contain a space sperated list of ZEO server # and ZOPE instance names which you want to start with the init script. # Note that ZEO servers will be started _before_ any instance, and that's # your responsability to check dependencies between ZEO servers and ZOPE # instances. The order of the variables doesn't matter. # # ZEO servers are searched in /var/lib/zope@ZVER@/zeo, while ZOPE instances # are searched in /var/lib/zope@ZVER@/instance. # # ALL means that you would like to start all servers/instances, NONE (or an # empty value) means, well, none. # ZEO servers ZEOSERVERS="ALL" # ZOPE instances INSTANCES="ALL" debian/rules0000755000000000000000000001041212316742152010247 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. ##export DH_VERBOSE=1 ZVER:=2.13 ZOPE:=zope$(ZVER) PYVER:=2.7 PYTHON:=python$(PYVER) DEBIAN:=$(CURDIR)/debian DEB_SATISFIED:=Docutils:distribute:mechanize:initgroups:pip:pytz distribution:=$(shell lsb_release -is) # get-orig-source variables ZOPE_INDEX:=http://download.zope.org/Zope2/index/ SRC_VERSION:=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p') SRC_DIR:=$(ZOPE)-$(SRC_VERSION) TARBALL:=$(ZOPE)_$(SRC_VERSION).orig.tar.gz get-orig-source: rm -rf $(CURDIR)/$(SRC_DIR) mkdir $(CURDIR)/$(SRC_DIR) cd $(CURDIR)/$(SRC_DIR); \ $(PYTHON) $(DEBIAN)/build-scripts/fetch.py \ --versions-cfg-url=${ZOPE_INDEX}$(SRC_VERSION)/versions.cfg \ --index=${ZOPE_INDEX}$(SRC_VERSION) \ --exclude-singles=$(DEB_SATISFIED) \ Zope2==$(SRC_VERSION) tar czf $(CURDIR)/../$(TARBALL) $(SRC_DIR) rm -rf $(CURDIR)/$(SRC_DIR) %: dh --with python2 $@ override_dh_auto_clean: for f in debian/*.in; do \ generated=`echo $$f | sed 's,.in$$,,;s,ZVER,$(ZVER),'`; \ rm -f $$generated $$generated.tmp; \ done dh_auto_clean -- # quilt has issues applying permissions to non-existent files, so we'll need to apply executable permissions here chmod a+x configure override_dh_auto_configure: ./configure --prefix=/usr/lib/${ZOPE} override_dh_auto_build: make PYTHON=$(PYTHON) \ DIST_EXCLUSIONS=$(DEB_SATISFIED) override_dh_prep: for f in debian/*.in; do \ generated=`echo $$f | sed 's,.in$$,,;s,ZVER,$(ZVER),'`; \ sed -e 's,@ZVER@,$(ZVER),g' -e 's,@PYVER@,$(PYVER),g' $$f > $$generated.tmp; \ if cmp --quiet "$$generated" "$$generated.tmp"; then \ rm -f $$generated.tmp; \ else \ mv -f $$generated.tmp $$generated; \ fi; \ done dh_prep -- dh_installzopeinstance -pzope$(ZVER)-sandbox sandbox override_dh_auto_install: make install PYTHON=$(PYTHON) DESTDIR=$(DEBIAN)/$(ZOPE) # install the changelogs dh_installchangelogs source/Zope2/doc/CHANGES.rst cd $(CURDIR)/source; for egg_src in *; do \ if test "$$egg_src" != "Zope2"; then \ egg_changes=$$(find $$egg_src -name CHANGES.txt -or -name NEWS.txt | head -n1); \ if test -n "$$egg_changes"; then \ cp $$egg_changes $(DEBIAN)/$(ZOPE)/usr/share/doc/$(ZOPE)/changelogs/changelog.$$egg_src; \ echo "Copied changelog: $(DEBIAN)/$(ZOPE)/usr/share/doc/$(ZOPE)/changelogs/changelog.$$egg_src"; \ fi; \ fi; \ done # remove extra license files find $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/lib/python -type f -a \( -name LICENSE.txt -o -name COPYING.txt \) -exec rm -f {} \; # remove scripts from egg-info subfolders rm -r $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/lib/python/*/EGG-INFO/scripts cp $(DEBIAN)/python_interpreter_template $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/bin/python override_dh_installdocs: dh_installdocs ifeq ($(distribution),Ubuntu) if [ -f $(DEBIAN)/$(ZOPE)-sandbox/usr/share/doc/$(ZOPE)-sandbox/README.Debian; then \ mv $(DEBIAN)/$(ZOPE)-sandbox/usr/share/doc/$(ZOPE)-sandbox/README.Debian \ $(DEBIAN)/$(ZOPE)-sandbox/usr/share/doc/$(ZOPE)-sandbox/README.Ubuntu; \ fi endif override_dh_python2: dh_python2 --shebang="/usr/lib/zope$(ZVER)/bin/python" override_dh_fixperms: dh_fixperms -- # Setuptools apparently makes every .py file executable during the build. find $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/lib/python/ -type f -perm /a+x -exec chmod a-x {} \; chmod 755 \ $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/lib/python/Zope2-*/ZPublisher/Client.py \ $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/lib/python/Zope2-*/ZPublisher/Test.py find $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/lib/python -type f -a \ \( -name \*.gif -o -name \*.html -o -name \*.dtml -o -name \*.txt -o -name \*.bat -o -name \*.jpg \) -exec chmod 644 {} \; chmod 644 $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/lib/python/Zope2-*/Zope2/utilities/reindex_catalog.py chmod 755 $(DEBIAN)/$(ZOPE)/usr/lib/$(ZOPE)/bin/python .PHONY: get-orig-source override_dh_auto_clean override_dh_auto_configure override_dh_auto_build override_dh_prep override_dh_auto_install override_dh_fixperms debian/source/0000755000000000000000000000000012214021137010457 5ustar debian/source/format0000644000000000000000000000001411652231032011667 0ustar 3.0 (quilt) debian/source/options0000644000000000000000000000007412151023310012071 0ustar extend-diff-ignore = "source/.*(\.egg-info/.*|setup\.cfg)$" debian/README.source0000644000000000000000000000432212145142650011346 0ustar Debian packages of the Zope2 application server ----------------------------------------------- IN A NUTSHELL: Zope2 Debian packages include copies of many dependencies, of which some even exist as seperate Debian packages. This is especially important to know for the Security Team. Read on to understand why this situation is necessary. Since version 2.12, the Zope2 application server is no longer released as monolithic tarball. Instead, a modularized approach is taken. Many Zope dependencies (so-called 'eggs') are developed and released independently from each other. The Zope2 upstream authors suggest to use a build system called 'buildout'. In a nutshell, buildout takes a list of required python and Zope dependencies with the exact version number, fetches all these eggs from the Python Package Index (pypi.python.org), and merges them into a isolated python environment. This build system has major drawbacks. The most important one for Debian is, that it is incompatible to the FHS, doesn't work for distribution packages, and ignores integration in a system at all. Instead it creates a jailed python environment for every single application, making software upgrades and security support a huge mess. Even worse, most Zope2 dependencies don't care about backwards compatibility at all. Often, even minor versions include incompatible API changes. This is the main reason, why it's impossible to package Zope eggs modularized, and let the Zope2 application server depend on it. This leads to the ugly but necessary fact, that the Zope2 package sources in Debian are a merge of the Zope2 application server and all Zope dependencies. The orig.tar.gz is created by the 'get-orig-source' target of the debian/rules build script. We (the Debian Zope2 Maintainers) are aware that this situation has issues. The biggest problem is code duplication: The source code of already packaged Zope eggs is duplicated in the Zope2 source packages. If the situation ever improves (e.g. Zope eggs upstream start to care about backwards compability), the Zope2 packages should be updated to use the Debian packaged Zope dependencies. -- Jonas Meurer Thu, 23 Jun 2011 22:19:36 +0200 debian/python_interpreter_template.in.shell0000644000000000000000000000116211652231032016456 0ustar #!/bin/sh # WARNING: this is an ugly hack which was introduced in order to workaround # shebang recursion issues with linux kernel << 2.6.32. It doesn't # work as expected. Python addsitedir() needs to be implemented in # shell in order to make it work. ZPYPATH="$(echo $(for dir in /usr/lib/zope@ZVER@/lib/python/*.egg; do echo $dir; done) | sed 's/ /:/g')" if [ -n "$PYTHONPATH" ]; then export PYTHONPATH="$PYTHONPATH:$ZPYPATH" else export PYTHONPATH="$ZPYPATH" fi if [ -n "$INSTANCE_HOME" ]; then export PYTHONPATH="$PYTHONPATH:${INSTANCE_HOME}/lib/python" fi /usr/bin/python@PYVER@ "$@" debian/zopeZVER-sandbox.copyright.in0000644000000000000000000000041711652231032014642 0ustar Copyright (C) 2005-2008 Fabio Tranchitella This package was created and released by the Debian Zope team, under the terms of the Gnu General Public License, version 2 or later. See /usr/share/common-licenses/GPL-2 for the full text of that license. debian/watch0000644000000000000000000000012312145142650010213 0ustar version=3 http://pypi.python.org/packages/source/Z/Zope2/Zope2-(2\.13\.[\d]+)\.zip debian/zopeZVER-sandbox.dzinstance.in0000644000000000000000000000021211652231032014765 0ustar Package: zope@ZVER@-sandbox ZopeVersion: @ZVER@ Name: sandbox Addon-Mode: all Addon-Technique: tree-linked Restart-Policy: end Port: 8028 debian/zopeZVER.postinst.in0000644000000000000000000000012011652231032013050 0ustar #!/bin/sh set -e . /usr/share/debconf/confmodule #DEBHELPER# db_stop exit 0