[REF] Packaging: Backport of v8 packaging

[REF] Packaging: backport of a7ab5a4109
[REF] Packaging: backport of a700a1139e
[REF] Packaging: backport of 9d0bd2807e
[REF] Packaging: backport of b0722d3e5d
[REF] Packaging: backport of 24b2c93814
[REF] Packaging: backport of e874cdafaa
[REF] Packaging: backport of 56b61da163
[REF] Packaging: backport of be96dd8595
[REF] Packaging: backport of 50a4da99f0
[REF] Packaging: backport of 1c41f36993
[REF] Packaging: backport of cc11331733
[FIX] Packaging: backport of 1347163082
[REF] Package: backport of 93845d683c
[REF] Package: backport of 012bc01c11
[FIX] Package: partial apply of d9e72a3716
[REF] Package: backport of 67036feff4
[REF] Package: backport of 73de0138de
[REF] Package: backport of 30d987ed30
[REF] Package: backport of 29132669a1
[REF] Package: backport of 7db12dc47b
[REF] Package: backport of f668f9c6cd
[REF] Package: backport of 2cf4051a15
[REF] Packaging: backport of 735924878f
[REF] Packaging: backport of f2598ecdce
[REF] Package: backport of fd21912cfe
[REF] Package: backport of 9a8cdf49b0
[REF] Package: backport of 2f4984b838
[REF] Package: backport of 6e9edeeb46
[REF] Package: partial backport of d4624fa826
[REF] Package: backport of 9f13722f78
This commit is contained in:
Simon Lejeune 2014-12-19 17:31:12 +01:00
parent 10984ad49a
commit 9ed6accd2e
45 changed files with 2703 additions and 1268 deletions

View File

@ -1,13 +1,24 @@
graft debian
graft doc
graft install
graft openerp
graft tests
graft win32
include README
include LICENSE
include MANIFEST.in
include gunicorn.conf.py
include openerp-server
include setup*
global-exclude *pyc *~ # Exclude possible garbage from previous graft.
include README.md
recursive-include openerp *.css
recursive-include openerp *.csv
recursive-include openerp *.gif
recursive-include openerp *.html
recursive-include openerp *.jpeg
recursive-include openerp *.jpg
recursive-include openerp *.js
recursive-include openerp *.md
recursive-include openerp *.png
recursive-include openerp *.po
recursive-include openerp *.rml
recursive-include openerp *.rng
recursive-include openerp *.rst
recursive-include openerp *.sass
recursive-include openerp *.sql
recursive-include openerp *.txt
recursive-include openerp *.ttf
recursive-include openerp *.woff
recursive-include openerp *.xsl
recursive-include openerp *.xml
recursive-include openerp *.yml
recursive-exclude * *.py[co]

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
openerp (7.0.0) stable; urgency=low
* Refactored packaging
-- Simon Lejeune <sle@odoo.com> Wed, 23 Jul 2014 14:59:00 +0100
openerp (6.1-1) testing; urgency=low
* New major version, new packaging.

2
debian/compat vendored
View File

@ -1 +1 @@
7
9

27
debian/control vendored
View File

@ -1,11 +1,11 @@
Source: openerp
Section: net
Priority: optional
Maintainer: OpenERP SA <al@openerp.com>
Build-Depends: debhelper (>= 7.0.50~), python, rsync
Standards-Version: 3.9.1
Homepage: http://www.openerp.com/
Vcs-Bzr: https://launchpad.net/openobject
Maintainer: Odoo SA <sle@odoo.com>
Build-Depends: debhelper (>= 9.0), python, rsync
Standards-Version: 3.9.5.0
Homepage: http://www.odoo.com/
Vcs-Git: https://github.com/odoo/odoo
Package: openerp
Section: net
@ -13,12 +13,11 @@ Architecture: all
Depends:
${misc:Depends},
adduser,
python,
postgresql-client,
python,
python-dateutil,
python-docutils,
python-feedparser,
python-gdata,
python-imaging,
python-jinja2,
python-ldap,
@ -39,20 +38,22 @@ Depends:
python-unittest2,
python-vatnumber,
python-vobject,
python-webdav,
python-werkzeug,
python-xlwt,
python-yaml,
python-zsi
Conflicts: tinyerp-server, openerp-server, openerp-web
Replaces: tinyerp-server, openerp-server, openerp-web
Recommends:
graphviz, ghostscript, postgresql, python-matplotlib, poppler-utils
antiword,
graphviz,
ghostscript,
postgresql,
python-gevent,
poppler-utils
Description: OpenERP Enterprise Resource Management
OpenERP, previously known as TinyERP, is a complete ERP and CRM. The main
features are accounting (analytic and financial), stock management, sales and
purchases management, tasks automation, marketing campaigns, help desk, POS,
etc. Technical features include a distributed server, flexible workflows, an
object database, a dynamic GUI, customizable reports, and NET-RPC and XML-RPC
interfaces.
object database, a dynamic GUI, customizable reports, and an XML-RPC
interface.

204
debian/copyright vendored
View File

@ -1,207 +1,21 @@
Upstream-Contact: OpenERP <info@openerp.com>
Upstream-Homepage: http://www.openerp.com/
Maintainer-Contact: Debian OpenERP Maintainers <gnunet@lists.debian-maintainers.org>
Maintainer-Homepage: http://open-object.debian-maintainers.org/
Upstream-Contact: Odoo <info@odoo.com>
Upstream-Homepage: http://www.odoo.com/
Maintainer-Contact: Debian Odoo Maintainers <gnunet@lists.debian-maintainers.org>
Maintainer-Homepage: http://www.odoo.com/
Files: *
Copyright: (C) 2004-2011 OpenERP SA. (www.openerp.com)
License: GPL-3+
Copyright: (C) 2004-2014 OpenERP SA. (www.openerp.com)
License: AGPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU Affero General Public License for more details.
.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-3 file.
Files:
bin/addons/account/report/general_ledger.py
bin/addons/account/report/general_ledger_landscape.py
bin/addons/account/wizard/wizard_statement_from_invoice.py
Copyright: (C) 2005-2008 CamptoCamp
License: GPL-2+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
Files: bin/addons/auction/barcode/*
Copyright: (C) 2000 Tyler C. Sarna <tsarna@sarna.org>
License: BSD
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by Tyler C. Sarna.
4. Neither the name of the author nor the names of contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Files:
bin/addons/base_report_designer/wizard/tiny_sxw2rml/normalized_oo2rml.xsl
bin/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py
Copyright: (C) 2005 Martin Simon
License: LGPL-2.1
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU Library General Public License
can be found in /usr/share/common-licenses/LGPL-2.1 file.
Files: bin/addons/document/ftpserver/*
Copyright:
(C) 2007 Giampaolo Rodola <g.rodola@gmail.com>
(C) 2008 Fabien Pinckaers <fp@tinyerp.com>
License: MIT
Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of
Giampaolo Rodola' not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.
.
Giampaolo Rodola' DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
NO EVENT Giampaolo Rodola' BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Files: bin/addons/hr_holidays/*
Copyright:
(C) 2004-2008 Tiny.be <info@tiny.be>
(C) 2005-2006 Axelor SARL. <http://www.axelor.com/>
License: GPL-2+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
Files: bin/addons/l10n_uk/*
Copyright:
(C) 2004-2008 Tiny.be <info@tiny.be>
(C) 2004-2008 Seath Solutions Ltd.
License: GPL-2+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
Files: bin/tools/threadinglocal.py
Copyright: (C) 2004-2005 CherryPy Team <team@cherrypy.org>
License: BSD
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the CherryPy Team nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Files: bin/tools/decimal.py
Copyright: (C) 2004 Python Software Foundation.
License: other
This file is distributed under the Python Software License
(http://www.python.org/2.3/license.html).
.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

View File

@ -12,7 +12,7 @@
# Description: Open ERP is a complete ERP and CRM software.
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DAEMON=/usr/bin/openerp-server
NAME=openerp-server
DESC=openerp-server

2
debian/install vendored Normal file
View File

@ -0,0 +1,2 @@
debian/openerp-server.conf /etc/openerp
README.md /usr/share/doc/openerp

View File

@ -5,3 +5,4 @@ db_host = False
db_port = False
db_user = openerp
db_password = False
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons

View File

@ -1,2 +0,0 @@
install/openerp-server.conf /etc/openerp
README /usr/share/doc/openerp

View File

@ -1,30 +0,0 @@
#!/bin/sh
set -e
case "${1}" in
configure)
if ! getent passwd | grep -q "^openerp:"; then
adduser --system --no-create-home --quiet --gecos 'OpenERP' --group openerp
fi
# Register "openerp" as a postgres superuser
su - postgres -c "createuser -s openerp" 2> /dev/null || true
chown openerp:openerp /etc/openerp/openerp-server.conf
chmod 0640 /etc/openerp/openerp-server.conf
# Creating log file
mkdir -p /var/log/openerp/
chown openerp:openerp /var/log/openerp
chmod 0750 /var/log/openerp
# Creating local storage directory
mkdir -p /var/lib/openerp/filestore
chown openerp:openerp -R /var/lib/openerp
# update-python-modules NOW otherwise invoke-rc.d openerp start will fail
update-python-modules -p openerp.public
;;
*)
;;
esac
#DEBHELPER#
exit 0

22
debian/openerp.postrm vendored
View File

@ -1,22 +0,0 @@
#!/bin/sh
set -e
case "${1}" in
remove)
deluser --quiet --system "openerp" || true
delgroup --quiet --system --only-if-empty "openerp" || true
;;
purge)
rm -rf /var/lib/openerp-server
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
esac
#DEBHELPER#
exit 0

36
debian/postinst vendored Normal file
View File

@ -0,0 +1,36 @@
#!/bin/sh
set -e
ODOO_CONFIGURATION_FILE=/etc/openerp/openerp-server.conf
ODOO_GROUP="openerp"
ODOO_DATA_DIR=/var/lib/openerp
ODOO_LOG_DIR=/var/log/openerp
ODOO_USER="openerp"
case "${1}" in
configure)
if ! getent passwd | grep -q "^openerp:"; then
adduser --system --home $ODOO_DATA_DIR --quiet --group $ODOO_USER
fi
# Register "openerp" as a postgres superuser
su - postgres -c "createuser -s openerp" 2> /dev/null || true
# Configuration file
chown $ODOO_USER:$ODOO_GROUP $ODOO_CONFIGURATION_FILE
chmod 0640 $ODOO_CONFIGURATION_FILE
# Log
mkdir -p $ODOO_LOG_DIR
chown $ODOO_USER:$ODOO_GROUP $ODOO_LOG_DIR
chmod 0750 $ODOO_LOG_DIR
# Data dir
chown $ODOO_USER:$ODOO_GROUP $ODOO_DATA_DIR
# update-python-modules NOW otherwise invoke-rc.d openerp start will fail
update-python-modules
;;
*)
;;
esac
#DEBHELPER#
exit 0

31
debian/postrm vendored Normal file
View File

@ -0,0 +1,31 @@
#!/bin/sh
set -e
ODOO_LIB_DIR=/var/lib/openerp
ODOO_USER="openerp"
ODOO_GROUP="openerp"
case "${1}" in
remove)
deluser --quiet --system $ODOO_USER || true
delgroup --quiet --system --only-if-empty $ODOO_GROUP || true
if [ -d "$ODOO_LIB_DIR" ]; then
rm -rf $ODOO_LIB_DIR
fi
;;
purge)
if [ -d "$ODOO_LIB_DIR" ]; then
rm -rf $ODOO_LIB_DIR
fi
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
esac
#DEBHELPER#
exit 0

15
debian/rules vendored
View File

@ -2,16 +2,7 @@
# vim:noet:
%:
dh ${@}
override_dh_pysupport:
echo "rsync"
sh -c "[ -d debian/openerp/usr/lib/python2.6 ] && rsync -av openerp/ debian/openerp/usr/lib/python2.6/dist-packages/openerp/" || true
sh -c "[ -d debian/openerp/usr/lib/python2.7 ] && rsync -av openerp/ debian/openerp/usr/lib/python2.7/dist-packages/openerp/" || true
rm -Rf debian/openerp/usr/openerp debian/openerp/usr/lib/python2.6/dist-packages/tests debian/openerp/usr/lib/python2.7/dist-packages/tests
dh_pysupport
rm -Rf debian/openerp/usr/lib
override_dh_installinit:
dh_installinit --update-rcd-params='defaults 21'
dh ${@} -Spython_distutils
override_dh_installchangelogs:
dh_installchangelogs -X./history

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,229 +0,0 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH OPENERP "1" "December 2010" "OpenERP Server 6.0.0-rc1" "User Commands"
.SH NAME
OpenERP \- manual page for OpenERP Server 6.0.0-rc1
.SH SYNOPSIS
.B openerp-server.py
[\fIoptions\fR]
.SH OPTIONS
.TP
\fB\-\-version\fR
show program's version number and exit
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-c\fR CONFIG, \fB\-\-config\fR=\fICONFIG\fR
specify alternate config file
.TP
\fB\-s\fR, \fB\-\-save\fR
save configuration to ~/.openerp_serverrc
.TP
\fB\-\-pidfile\fR=\fIPIDFILE\fR
file where the server pid will be stored
.TP
\fB\-i\fR INIT, \fB\-\-init\fR=\fIINIT\fR
init a module (use "all" for all modules)
.TP
\fB\-\-without\-demo\fR=\fIWITHOUT_DEMO\fR
load demo data for a module (use "all" for all
modules)
.TP
\fB\-u\fR UPDATE, \fB\-\-update\fR=\fIUPDATE\fR
update a module (use "all" for all modules)
.TP
\fB\-\-cache\-timeout\fR=\fICACHE_TIMEOUT\fR
set the timeout for the cache system
.TP
\fB\-t\fR TIMEZONE, \fB\-\-timezone\fR=\fITIMEZONE\fR
specify reference timezone for the server (e.g.
Europe/Brussels
.TP
\fB\-\-stop\-after\-init\fR
stop the server after it initializes
.TP
\fB\-\-debug\fR
enable debug mode
.TP
\fB\-\-assert\-exit\-level\fR=\fIASSERT_EXIT_LEVEL\fR
specify the level at which a failed assertion will
stop the server. Accepted values: ['info',
\&'debug_rpc', 'warn', 'test', 'critical', 'debug_sql',
\&'error', 'debug', 'debug_rpc_answer', 'notset']
.IP
XML\-RPC Configuration:
.TP
\fB\-\-xmlrpc\-interface\fR=\fIXMLRPC_INTERFACE\fR
specify the TCP IP address for the XML\-RPC protocol
.TP
\fB\-\-xmlrpc\-port\fR=\fIXMLRPC_PORT\fR
specify the TCP port for the XML\-RPC protocol
.TP
\fB\-\-no\-xmlrpc\fR
disable the XML\-RPC protocol
.IP
XML\-RPC Secure Configuration:
.TP
\fB\-\-xmlrpcs\-interface\fR=\fIXMLRPCS_INTERFACE\fR
specify the TCP IP address for the XML\-RPC Secure
protocol
.TP
\fB\-\-xmlrpcs\-port\fR=\fIXMLRPCS_PORT\fR
specify the TCP port for the XML\-RPC Secure protocol
.TP
\fB\-\-no\-xmlrpcs\fR
disable the XML\-RPC Secure protocol
.TP
\fB\-\-cert\-file\fR=\fISECURE_CERT_FILE\fR
specify the certificate file for the SSL connection
.TP
\fB\-\-pkey\-file\fR=\fISECURE_PKEY_FILE\fR
specify the private key file for the SSL connection
.IP
NET\-RPC Configuration:
.TP
\fB\-\-netrpc\-interface\fR=\fINETRPC_INTERFACE\fR
specify the TCP IP address for the NETRPC protocol
.TP
\fB\-\-netrpc\-port\fR=\fINETRPC_PORT\fR
specify the TCP port for the NETRPC protocol
.TP
\fB\-\-no\-netrpc\fR
disable the NETRPC protocol
.IP
Static HTTP service:
.TP
\fB\-\-static\-http\-enable\fR
enable static HTTP service for serving plain HTML
files
.TP
\fB\-\-static\-http\-document\-root\fR=\fISTATIC_HTTP_DOCUMENT_ROOT\fR
specify the directory containing your static HTML
files (e.g '/var/www/')
.TP
\fB\-\-static\-http\-url\-prefix\fR=\fISTATIC_HTTP_URL_PREFIX\fR
specify the URL root prefix where you want web
browsers to access your static HTML files (e.g '/')
.IP
Testing Configuration:
.TP
\fB\-\-test\-file\fR=\fITEST_FILE\fR
Launch a YML test file.
.TP
\fB\-\-test\-report\-directory\fR=\fITEST_REPORT_DIRECTORY\fR
If set, will save sample of all reports in this
directory.
.TP
\fB\-\-test\-disable\fR
Disable loading test files.
.TP
\fB\-\-test\-commit\fR
Commit database changes performed by tests.
.IP
Logging Configuration:
.TP
\fB\-\-logfile\fR=\fILOGFILE\fR
file where the server log will be stored
.TP
\fB\-\-no\-logrotate\fR
do not rotate the logfile
.TP
\fB\-\-syslog\fR
Send the log to the syslog server
.TP
\fB\-\-log\-level\fR=\fILOG_LEVEL\fR
specify the level of the logging. Accepted values:
['info', 'debug_rpc', 'warn', 'test', 'critical',
\&'debug_sql', 'error', 'debug', 'debug_rpc_answer',
\&'notset']
.IP
SMTP Configuration:
.TP
\fB\-\-email\-from\fR=\fIEMAIL_FROM\fR
specify the SMTP email address for sending email
.TP
\fB\-\-smtp\fR=\fISMTP_SERVER\fR
specify the SMTP server for sending email
.TP
\fB\-\-smtp\-port\fR=\fISMTP_PORT\fR
specify the SMTP port
.TP
\fB\-\-smtp\-ssl\fR
specify the SMTP server support SSL or not
.TP
\fB\-\-smtp\-user\fR=\fISMTP_USER\fR
specify the SMTP username for sending email
.TP
\fB\-\-smtp\-password\fR=\fISMTP_PASSWORD\fR
specify the SMTP password for sending email
.IP
Database related options:
.TP
\fB\-d\fR DB_NAME, \fB\-\-database\fR=\fIDB_NAME\fR
specify the database name
.TP
\fB\-r\fR DB_USER, \fB\-\-db_user\fR=\fIDB_USER\fR
specify the database user name
.TP
\fB\-w\fR DB_PASSWORD, \fB\-\-db_password\fR=\fIDB_PASSWORD\fR
specify the database password
.TP
\fB\-\-pg_path\fR=\fIPG_PATH\fR
specify the pg executable path
.TP
\fB\-\-db_host\fR=\fIDB_HOST\fR
specify the database host
.TP
\fB\-\-db_port\fR=\fIDB_PORT\fR
specify the database port
.TP
\fB\-\-db_maxconn\fR=\fIDB_MAXCONN\fR
specify the the maximum number of physical connections
to posgresql
.TP
\fB\-P\fR IMPORT_PARTIAL, \fB\-\-import\-partial\fR=\fIIMPORT_PARTIAL\fR
Use this for big data importation, if it crashes you
will be able to continue at the current state. Provide
a filename to store intermediate importation states.
.IP
Internationalisation options:
.IP
Use these options to translate OpenERP to another language.See i18n
section of the user manual. Option '\-d' is mandatory.Option '\-l' is
mandatory in case of importation
.TP
\fB\-l\fR LANGUAGE, \fB\-\-language\fR=\fILANGUAGE\fR
specify the language of the translation file. Use it
with \fB\-\-i18n\-export\fR or \fB\-\-i18n\-import\fR
.TP
\fB\-\-i18n\-export\fR=\fITRANSLATE_OUT\fR
export all sentences to be translated to a CSV file, a
PO file or a TGZ archive and exit
.TP
\fB\-\-i18n\-import\fR=\fITRANSLATE_IN\fR
import a CSV or a PO file with translations and exit.
The '\-l' option is required.
.TP
\fB\-\-modules\fR=\fITRANSLATE_MODULES\fR
specify modules to export. Use in combination with
\fB\-\-i18n\-export\fR
.TP
\fB\-\-addons\-path\fR=\fIADDONS_PATH\fR
specify an alternative addons path.
.IP
Security\-related options:
.TP
\fB\-\-no\-database\-list\fR
disable the ability to return the list of databases
.SH "SEE ALSO"
The full documentation for
.B OpenERP
is maintained as a Texinfo manual. If the
.B info
and
.B OpenERP
programs are properly installed at your site, the command
.IP
.B info OpenERP
.PP
should give you access to the complete manual.

View File

@ -1,147 +0,0 @@
#!/bin/bash
# openerp-server This shell script takes care of starting and stopping
# OpenERP server
#
# chkconfig: 345 95 05
# description: OpenERP server
#
# pidfile: /var/run/openerp-server.pid
# config: /etc/openerp-server.conf
### BEGIN INIT INFO
# Provides: openerp-server
# Required-Start: postgresql
# Required-Stop: postgresql
# Should-Start: $network harddrake
# Default-Start: 345
# Short-Description: Launches the OpenERP server.
# Description: This startup script launches the OpenERP server.
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
PIDFILE=/var/run/openerp/openerp-server.pid
LOCKFILE=/var/lock/subsys/openerp-server
LOGFILE=/var/log/openerp/openerp-server.log
OPTS="--pidfile=$PIDFILE --logfile=$LOGFILE"
prog="openerp-server"
desc="OpenERP Server Daemon"
# check if the openerp-server conf file is present, then use it
if [ -f /etc/openerp-server.conf ]; then
OPTS="$OPTS -c /etc/openerp-server.conf"
fi
# Source function library
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi
# check the existence of the openerp-server script
[ -z "/usr/bin/openerp-server" ] && exit 0
RETVAL=0
start() {
if [ -d /etc/openerp/start.d ] ; then
echo -n $"Preparing $desc: "
run-parts --exit-on-error /etc/openerp/start.d
RETVAL=$?
echo
[ $RETVAL -ne 0 ] && return $RETVAL
fi
echo -n $"Starting $desc ($prog): "
daemon --user openerp --check openerp-server \
"/usr/bin/setsid /usr/bin/openerp-server \
-c /etc/openerp-server.conf \
--pidfile=$PIDFILE \
--logfile=$LOGFILE &"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE
return $RETVAL
}
stop() {
echo -n $"Stopping $desc ($prog): "
kill -TERM `cat $PIDFILE` > /dev/null 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
rm -f $LOCKFILE
echo_success
echo
else
echo_failure
echo
fi
if [ -d /etc/openerp/stop.d ] ; then
echo -n $"Clearing $desc: "
run-parts /etc/openerp/stop.d
echo
fi
return $RETVAL
}
restart() {
stop
start
}
condrestart() {
[ -e $LOCKFILE ] && restart || :
}
status() {
if [ -f $PIDFILE ] ; then
checkpid `cat $PIDFILE`
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
echo $"$prog is running..."
else
echo $"$prog is stopped"
fi
else
echo $"$prog is stopped"
fi
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
condrestart)
condrestart
;;
status)
status
;;
probe)
exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
exit 1
esac

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,113 +0,0 @@
.TH openerp_serverrc 5
.SH NAME
openerp_serverrc \- configuration file for OpenERP
.SH SYNOPSIS
[options]
.br
$option\ =\ " someValue "
.br
...
.SH DESCRIPTION
A setup file consists of a section, lead by a "[options]" header,
.br
and followed by "option_name = value" entries, with continuations and such in
.br
the style of RFC 822.
.SH OPTIONS
.TP
.IR verbose
Enable the debugging mode
.br
(default False)
.TP
.IR pidfile
The file where the server pid will be stored
.br
(default False)
.TP
.IR logfile
The file where the server log will be stored
.br
(default False)
.TP
.IR interface
The IP address on which the server will bind.
.br
If empty, it will bind on all interfaces (default empty)
.TP
.IR port
The TCP port on which the server will listen.
.br
(default 8069)
.TP
.IR debug_mode
Enable debug mode
.br
(default False)
.TP
.IR secure
Launch server over https instead of http.
.br
(default False)
.TP
.IR smtp_server
Specify the SMTP server for sending email.
.br
(default localhost)
.TP
.IR smtp_user
Specify the SMTP user for sending email.
.br
(default False)
.TP
.IR smtp_password
Specify the SMTP password for sending email.
.br
(default False)
.TP
.IR db_name
Specify the database name.
.TP
.IR db_user
Specify the database user name.
.br
(default None)
.TP
.IR db_password
Specify the database password for db_user.
.br
(default None)
.TP
.IR pg_path
Specify the PostgreSQL executable path.
.br
(default None)
.TP
.IR db_host
Specify the database host.
.br
(default localhost)
.TP
.IR db_port
Specify the database port.
.br
(default None)
.TP
.IR price_accuracy
Specify the price accuracy.
.br
.SH AUTHORS
OpenERP is a product of \fBTiny.be\fR (\fIhttp://www.tiny.be\fR)
.SH SEE ALSO
openerp-server(1)
.br
\fIhttp://www.openerp.com\fR : Open ERP official website
.br
\fIhttp://doc.openerp.com\fR : Open ERP documentation

View File

@ -1,89 +0,0 @@
# X.509 Certificate options
#
# DN options
# The organization of the subject.
organization = "Some organization."
# The organizational unit of the subject.
unit = "ERP dept."
# The locality of the subject.
# locality =
# The state of the certificate owner.
state = "State"
# The country of the subject. Two letter code.
country = BE
# The common name of the certificate owner.
cn = "Some company"
# A user id of the certificate owner.
#uid = "clauper"
# If the supported DN OIDs are not adequate you can set
# any OID here.
# For example set the X.520 Title and the X.520 Pseudonym
# by using OID and string pairs.
#dn_oid = "2.5.4.12" "Dr." "2.5.4.65" "jackal"
# This is deprecated and should not be used in new
# certificates.
# pkcs9_email = "none@none.org"
# The serial number of the certificate
serial = 001
# In how many days, counting from today, this certificate will expire.
expiration_days = 700
# X.509 v3 extensions
# A dnsname in case of a WWW server.
#dns_name = "www.none.org"
#dns_name = "www.morethanone.org"
# An IP address in case of a server.
#ip_address = "192.168.1.1"
# An email in case of a person
email = "none@none.org"
# An URL that has CRLs (certificate revocation lists)
# available. Needed in CA certificates.
#crl_dist_points = "http://www.getcrl.crl/getcrl/"
# Whether this is a CA certificate or not
#ca
# Whether this certificate will be used for a TLS client
#tls_www_client
# Whether this certificate will be used for a TLS server
tls_www_server
# Whether this certificate will be used to sign data (needed
# in TLS DHE ciphersuites).
#signing_key
# Whether this certificate will be used to encrypt data (needed
# in TLS RSA ciphersuites). Note that it is prefered to use different
# keys for encryption and signing.
encryption_key
# Whether this key will be used to sign other certificates.
#cert_signing_key
# Whether this key will be used to sign CRLs.
#crl_signing_key
# Whether this key will be used to sign code.
#code_signing_key
# Whether this key will be used to sign OCSP data.
#ocsp_signing_key
# Whether this key will be used for time stamping.
#time_stamping_key

View File

@ -1,10 +1,40 @@
[general]
[sdist]
formats=gztar
[bdist]
formats=rpm
[bdist_rpm]
install_script=setup_rpm.sh
python = python2.6
install-script = setup/redhat/install.sh
post-install = setup/redhat/postinstall.sh
requires =
babel
libxslt-python
pychart
pyparsing
python-dateutil
python-docutils
python-feedparser
python-imaging
python-jinja2
python-ldap
python-lxml
python-mako
python-mock
python-openid
python-passlib
python-psutil
python-psycopg2
python-reportlab
python-requests
python-simplejson
python-unittest2
python-vobject
python-werkzeug
python-yaml
pytz
python-vatnumber
pydot
pyPdf
# -------------------------------------------------------------------
# RedHat 7 notes
# -------------------------------------------------------------------
# Most of the OpenERP dependencies are available on the EPEL repository.
# yum install epel-release

195
setup.py
View File

@ -1,120 +1,123 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import glob, os, re, setuptools, sys
from os.path import join
import os
import re
from glob import glob
from setuptools import find_packages, setup
from os.path import join, dirname
execfile(join(dirname(__file__), 'openerp', 'release.py')) # Load release variables
lib_name = 'openerp'
def py2exe_datafiles():
data_files = {}
data_files['Microsoft.VC90.CRT'] = glob('C:\Microsoft.VC90.CRT\*.*')
# List all data files
def data():
r = {}
for root, dirnames, filenames in os.walk('openerp'):
for filename in filenames:
if not re.match(r'.*(\.pyc|\.pyo|\~)$', filename):
r.setdefault(root, []).append(os.path.join(root, filename))
if os.name == 'nt':
r["Microsoft.VC90.CRT"] = glob.glob('C:\Microsoft.VC90.CRT\*.*')
data_files.setdefault(root, []).append(join(root, filename))
import babel
# Add data, but also some .py files py2exe won't include automatically.
# TODO This should probably go under `packages`, instead of `data`,
# but this will work fine (especially since we don't use the ZIP file
# approach).
r["babel/localedata"] = glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata", '*'))
others = ['global.dat', 'numbers.py', 'support.py']
r["babel"] = map(lambda f: os.path.join(os.path.dirname(babel.__file__), f), others)
data_files['babel/localedata'] = glob(join(dirname(babel.__file__), 'localedata', '*'))
others = ['global.dat', 'numbers.py', 'support.py', 'plural.py']
data_files['babel'] = map(lambda f: join(dirname(babel.__file__), f), others)
others = ['frontend.py', 'mofile.py']
r["babel/messages"] = map(lambda f: os.path.join(os.path.dirname(babel.__file__), "messages", f), others)
data_files['babel/messages'] = map(lambda f: join(dirname(babel.__file__), 'messages', f), others)
import pytz
tzdir = os.path.dirname(pytz.__file__)
for root, _, filenames in os.walk(os.path.join(tzdir, "zoneinfo")):
base = os.path.join('pytz', root[len(tzdir) + 1:])
r[base] = [os.path.join(root, f) for f in filenames]
tzdir = dirname(pytz.__file__)
for root, _, filenames in os.walk(join(tzdir, 'zoneinfo')):
base = join('pytz', root[len(tzdir) + 1:])
data_files[base] = [join(root, f) for f in filenames]
import docutils
dudir = os.path.dirname(docutils.__file__)
dudir = dirname(docutils.__file__)
for root, _, filenames in os.walk(dudir):
base = os.path.join('docutils', root[len(dudir) + 1:])
r[base] = [os.path.join(root, f) for f in filenames if not f.endswith(('.py', '.pyc', '.pyo'))]
base = join('docutils', root[len(dudir) + 1:])
data_files[base] = [join(root, f) for f in filenames if not f.endswith(('.py', '.pyc', '.pyo'))]
return r.items()
return data_files.items()
def gen_manifest():
file_list="\n".join(data())
open('MANIFEST','w').write(file_list)
if os.name == 'nt':
sys.path.append("C:\Microsoft.VC90.CRT")
def py2exe_options():
if os.name == 'nt':
import py2exe
return {
"console" : [ { "script": "openerp-server", "icon_resources": [(1, join("install","openerp-icon.ico"))], }],
'options' : {
"py2exe": {
"skip_archive": 1,
"optimize": 0, # keep the assert running, because the integrated tests rely on them.
"dist_dir": 'dist',
"packages": [ "DAV", "HTMLParser", "PIL", "asynchat", "asyncore", "commands", "dateutil", "decimal", "docutils", "email", "encodings", "imaplib", "jinja2", "lxml", "lxml._elementpath", "lxml.builder", "lxml.etree", "lxml.objectify", "mako", "openerp", "poplib", "pychart", "pydot", "pyparsing", "pytz", "reportlab", "select", "simplejson", "smtplib", "uuid", "vatnumber", "vobject", "xml", "xml.dom", "yaml", ],
"excludes" : ["Tkconstants","Tkinter","tcl"],
}
'console': [
{'script': 'openerp-server', 'icon_resources': [
(1, join('setup', 'win32', 'static', 'pixmaps', 'openerp-icon.ico'))
]},
],
'options': {
'py2exe': {
'skip_archive': 1,
'optimize': 0, # Keep the assert running as the integrated tests rely on them.
'dist_dir': 'dist',
'packages': [
'asynchat', 'asyncore',
'commands',
'dateutil',
'decimal',
'docutils',
'email',
'encodings',
'HTMLParser',
'imaplib',
'jinja2',
'lxml', 'lxml._elementpath', 'lxml.builder', 'lxml.etree', 'lxml.objectify',
'mako',
'markupsafe',
'mock',
'openerp',
'openid',
'PIL',
'poplib',
'psutil',
'pychart',
'pydot',
'pyparsing',
'pytz',
'reportlab',
'select',
'simplejson',
'smtplib',
'uuid',
'vatnumber',
'vobject',
'win32service', 'win32serviceutil',
'xlwt',
'xml', 'xml.dom',
'yaml',
],
'excludes': ['Tkconstants', 'Tkinter', 'tcl'],
}
},
'data_files': py2exe_datafiles()
}
else:
return {}
execfile(join(os.path.dirname(__file__), 'openerp', 'release.py'))
# Notes for OpenERP developer on windows:
#
# To setup a windows developer evironement install python2.7 then pip and use
# "pip install <depencey>" for every dependency listed below.
#
# Dependecies that requires DLLs are not installable with pip install, for
# them we added comments with links where you can find the installers.
#
# OpenERP on windows also require the pywin32, the binary can be found at
# http://pywin32.sf.net
#
# Both python2.7 32bits and 64bits are known to work.
setuptools.setup(
name = 'openerp',
version = version,
description = description,
long_description = long_desc,
url = url,
author = author,
author_email = author_email,
classifiers = filter(None, classifiers.split("\n")),
license = license,
scripts = ['openerp-server'],
data_files = data(),
packages = setuptools.find_packages(),
dependency_links = ['http://download.gna.org/pychart/'],
#include_package_data = True,
install_requires = [
'pychart', # not on pypi, use: pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
setup(
name='openerp',
version=version,
description=description,
long_description=long_desc,
url=url,
author=author,
author_email=author_email,
classifiers=filter(None, classifiers.split('\n')),
license=license,
scripts=['openerp-server'],
packages=find_packages(),
package_dir={'%s' % lib_name: 'openerp'},
include_package_data=True,
dependency_links=['http://download.gna.org/pychart/'],
install_requires=[
'babel',
'docutils',
'feedparser',
@ -126,6 +129,7 @@ setuptools.setup(
'PIL', # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/
'psutil', # windows binary code.google.com/p/psutil/downloads/list
'psycopg2 >= 2.2',
'pychart', # not on pypi, use: pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
'pydot',
'python-dateutil < 2',
'python-ldap', # optional
@ -141,12 +145,11 @@ setuptools.setup(
'werkzeug',
'xlwt',
],
extras_require = {
'SSL' : ['pyopenssl'],
extras_require={
'SSL': ['pyopenssl'],
},
tests_require = ['unittest2'],
tests_require=[
'unittest2',
],
**py2exe_options()
)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

25
setup/package.dfcentos Normal file
View File

@ -0,0 +1,25 @@
# Please note that this Dockerfile is used for testing nightly builds and should
# not be used to deploy Odoo
FROM centos:centos6
MAINTAINER Odoo S.A. <info@odoo.com>
RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm && \
yum -y -d 0 -e 0 update -y && yum -y -d 0 -e 0 upgrade -y && \
yum -y -d 0 -e 0 install \
python-pip \
gcc \
python-devel \
postgresql \
postgresql-server \
postgresql-libs \
postgresql-contrib \
postgresql-devel && \
yum clean all && \
pip install xlwt http://download.gna.org/pychart/PyChart-1.39.tar.gz
# Manual start of postgres
RUN mkdir -p /var/lib/postgres/data
RUN chown -R postgres:postgres /var/lib/postgres/data
RUN chmod 0700 /var/lib/postgres/data
RUN su postgres -c "initdb -D /var/lib/postgres/data -E UTF-8"
RUN cp /usr/share/pgsql/postgresql.conf.sample /var/lib/postgres/data/postgresql.conf

108
setup/package.dfdebian Normal file
View File

@ -0,0 +1,108 @@
# Please note that this Dockerfile is used for testing nightly builds and should
# not be used to deploy Odoo
FROM debian:stable
MAINTAINER Odoo S.A. <info@odoo.com>
# Change policy-rc.d so that services start automatically once installed
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
RUN apt-get update && \
apt-get install -y locales && \
rm -rf /var/lib/apt/lists/*
# Reconfigure locales such that postgresql uses UTF-8 encoding
RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get update -qq && \
apt-get upgrade -qq -y && \
apt-get install \
postgresql \
postgresql-server-dev-all \
postgresql-client \
adduser \
libxml2-dev \
libxslt1-dev \
libldap2-dev \
libsasl2-dev \
libssl-dev \
libjpeg-dev \
python-dev \
python-pip \
build-essential \
python \
python-dateutil \
python-decorator \
python-docutils \
python-feedparser \
python-imaging \
python-jinja2 \
python-ldap \
python-libxslt1 \
python-lxml \
python-mako \
python-mock \
python-openid \
python-passlib \
python-psutil \
python-psycopg2 \
python-pybabel \
python-pychart \
python-pydot \
python-pyparsing \
python-pypdf \
python-reportlab \
python-requests \
python-simplejson \
python-tz \
python-unittest2 \
python-vatnumber \
python-vobject \
python-werkzeug \
python-xlwt \
python-yaml -y && \
rm -rf /var/lib/apt/lists/*
RUN pip install Babel==1.3 \
Jinja2==2.7.3 \
Mako==1.0.0 \
MarkupSafe==0.23 \
Pillow==2.5.1 \
http://download.gna.org/pychart/PyChart-1.39.tar.gz \
PyYAML==3.11 \
Werkzeug==0.9.6 \
argparse==1.2.1 \
decorator==3.4.0 \
docutils==0.12 \
feedparser==5.1.3 \
gdata==2.0.18 \
gevent==1.0.1 \
greenlet==0.4.2 \
jcconv==0.2.3 \
lxml==3.3.5 \
mock==1.0.1 \
passlib==1.6.2 \
psutil==2.1.1 \
psycogreen==1.0 \
psycopg2==2.5.3 \
pyPdf==1.13 \
pydot==1.0.2 \
pyparsing==1.5.7 \
pyserial==2.7 \
python-dateutil==1.5 \
python-ldap==2.4.15 \
python-openid==2.2.5 \
pytz==2014.4 \
pyusb==1.0.0b1 \
qrcode==5.0.1 \
reportlab==3.1.8 \
requests==2.3.0 \
simplejson==3.5.3 \
six==1.7.3 \
unittest2==0.5.1 \
vatnumber==1.2 \
vobject==0.6.6 \
wsgiref==0.1.2 \
xlwt==0.7.5

502
setup/package.py Executable file
View File

@ -0,0 +1,502 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import optparse
import os
import pexpect
import shutil
import signal
import subprocess
import tempfile
import time
import xmlrpclib
from contextlib import contextmanager
from glob import glob
from os.path import abspath, dirname, join
from sys import stdout
from tempfile import NamedTemporaryFile
#----------------------------------------------------------
# Utils
#----------------------------------------------------------
execfile(join(dirname(__file__), '..', 'openerp', 'release.py'))
version = version.split('-')[0]
GPGPASSPHRASE = os.getenv('GPGPASSPHRASE')
GPGID = os.getenv('GPGID')
timestamp = time.strftime("%Y%m%d", time.gmtime())
PUBLISH_DIRS = {
'debian': 'deb',
'redhat': 'rpm',
'tarball': 'src',
'windows': 'exe',
}
EXTENSIONS = [
'.tar.gz',
'.zip',
'.deb',
'.dsc',
'.changes',
'.noarch.rpm',
'.exe',
]
def mkdir(d):
if not os.path.isdir(d):
os.makedirs(d)
def system(l, chdir=None):
print l
if chdir:
cwd = os.getcwd()
os.chdir(chdir)
if isinstance(l, list):
rc = os.spawnvp(os.P_WAIT, l[0], l)
elif isinstance(l, str):
tmp = ['sh', '-c', l]
rc = os.spawnvp(os.P_WAIT, tmp[0], tmp)
if chdir:
os.chdir(cwd)
return rc
def _rpc_count_modules(addr='http://127.0.0.1', port=8069, dbname='mycompany'):
time.sleep(5)
modules = xmlrpclib.ServerProxy('%s:%s/xmlrpc/object' % (addr, port)).execute(
dbname, 1, 'admin', 'ir.module.module', 'search', [('state', '=', 'installed')]
)
if modules and len(modules) > 1:
time.sleep(1)
toinstallmodules = xmlrpclib.ServerProxy('%s:%s/xmlrpc/object' % (addr, port)).execute(
dbname, 1, 'admin', 'ir.module.module', 'search', [('state', '=', 'to install')]
)
if toinstallmodules:
print("Package test: FAILED. Not able to install dependencies of base.")
raise Exception("Installation of package failed")
else:
print("Package test: successfuly installed %s modules" % len(modules))
else:
print("Package test: FAILED. Not able to install base.")
raise Exception("Installation of package failed")
def publish(o, type, releases):
def _publish(o, release):
arch = ''
filename = release.split(os.path.sep)[-1]
extension = None
for EXTENSION in EXTENSIONS:
if filename.endswith(EXTENSION):
extension = EXTENSION
filename = filename.replace(extension, '')
break
if extension is None:
raise Exception("Extension of %s is not handled" % filename)
# keep _all or _amd64
if filename.count('_') > 1:
arch = '_' + filename.split('_')[-1]
release_dir = PUBLISH_DIRS[type]
release_filename = 'openerp_%s.%s%s%s' % (version, timestamp, arch, extension)
release_path = join(o.pub, release_dir, release_filename)
system('mkdir -p %s' % join(o.pub, release_dir))
shutil.move(join(o.build_dir, release), release_path)
# Latest/symlink handler
release_abspath = abspath(release_path)
latest_abspath = release_abspath.replace(timestamp, 'latest')
if os.path.islink(latest_abspath):
os.unlink(latest_abspath)
os.symlink(release_abspath, latest_abspath)
return release_path
published = []
if isinstance(releases, basestring):
published.append(_publish(o, releases))
elif isinstance(releases, list):
for release in releases:
published.append(_publish(o, release))
return published
class OdooDocker(object):
def __init__(self):
self.log_file = NamedTemporaryFile(mode='w+b', prefix="bash", suffix=".txt", delete=False)
self.port = 8069 # TODO sle: reliable way to get a free port?
self.prompt_re = '(\r\nroot@|bash-).*# '
self.timeout = 1000
def system(self, command):
self.docker.sendline(command)
self.docker.expect(self.prompt_re)
def start(self, docker_image, build_dir, pub_dir):
self.build_dir = build_dir
self.pub_dir = pub_dir
self.docker = pexpect.spawn(
'docker run -v %s:/opt/release -p 127.0.0.1:%s:8069'
' -t -i %s /bin/bash --noediting' % (self.build_dir, self.port, docker_image),
timeout=self.timeout
)
time.sleep(2) # let the bash start
self.docker.logfile_read = self.log_file
self.id = subprocess.Popen('docker ps -l -q', shell=True, stdout=subprocess.PIPE).communicate()[0]
def end(self):
try:
_rpc_count_modules(port=str(self.port))
except Exception, e:
print('Exception during docker execution: %s:' % str(e))
print('Error during docker execution: printing the bash output:')
with open(self.log_file.name) as f:
print '\n'.join(f.readlines())
raise
finally:
self.docker.close()
system('docker rm -f %s' % self.id)
self.log_file.close()
os.remove(self.log_file.name)
@contextmanager
def docker(docker_image, build_dir, pub_dir):
_docker = OdooDocker()
try:
_docker.start(docker_image, build_dir, pub_dir)
try:
yield _docker
except Exception, e:
raise
finally:
_docker.end()
class KVM(object):
def __init__(self, o, image, ssh_key='', login='openerp'):
self.o = o
self.image = image
self.ssh_key = ssh_key
self.login = login
def timeout(self,signum,frame):
print "vm timeout kill",self.pid
os.kill(self.pid,15)
def start(self):
l="kvm -net nic,model=rtl8139 -net user,hostfwd=tcp:127.0.0.1:10022-:22,hostfwd=tcp:127.0.0.1:18069-:8069,hostfwd=tcp:127.0.0.1:15432-:5432 -drive".split(" ")
#l.append('file=%s,if=virtio,index=0,boot=on,snapshot=on'%self.image)
l.append('file=%s,snapshot=on'%self.image)
#l.extend(['-vnc','127.0.0.1:1'])
l.append('-nographic')
print " ".join(l)
self.pid=os.spawnvp(os.P_NOWAIT, l[0], l)
time.sleep(10)
signal.alarm(2400)
signal.signal(signal.SIGALRM, self.timeout)
try:
self.run()
finally:
signal.signal(signal.SIGALRM, signal.SIG_DFL)
os.kill(self.pid,15)
time.sleep(10)
def ssh(self,cmd):
l=['ssh','-o','UserKnownHostsFile=/dev/null','-o','StrictHostKeyChecking=no','-p','10022','-i',self.ssh_key,'%s@127.0.0.1'%self.login,cmd]
system(l)
def rsync(self,args,options='--delete --exclude .bzrignore'):
cmd ='rsync -rt -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 10022 -i %s" %s %s' % (self.ssh_key, options, args)
system(cmd)
def run(self):
pass
class KVMWinBuildExe(KVM):
def run(self):
with open(join(self.o.build_dir, 'setup/win32/Makefile.version'), 'w') as f:
f.write("VERSION=%s\n" % self.o.version_full)
with open(join(self.o.build_dir, 'setup/win32/Makefile.python'), 'w') as f:
f.write("PYTHON_VERSION=%s\n" % self.o.vm_winxp_python_version.replace('.', ''))
self.ssh("mkdir -p build")
self.rsync('%s/ %s@127.0.0.1:build/server/' % (self.o.build_dir, self.login))
self.ssh("cd build/server/setup/win32;time make allinone;")
self.rsync('%s@127.0.0.1:build/server/setup/win32/release/ %s/' % (self.login, self.o.build_dir), '')
print "KVMWinBuildExe.run(): done"
class KVMWinTestExe(KVM):
def run(self):
# Cannot use o.version_full when the version is not correctly parsed
# (for instance, containing *rc* or *dev*)
setuppath = glob("%s/openerp-server-setup-*.exe" % self.o.build_dir)[0]
setupfile = setuppath.split('/')[-1]
setupversion = setupfile.split('openerp-server-setup-')[1].split('.exe')[0]
self.rsync('"%s" %s@127.0.0.1:' % (setuppath, self.login))
self.ssh("TEMP=/tmp ./%s /S" % setupfile)
self.ssh('PGPASSWORD=openpgpwd /cygdrive/c/"Program Files"/"OpenERP %s"/PostgreSQL/bin/createdb.exe -e -U openpg mycompany' % setupversion)
self.ssh('/cygdrive/c/"Program Files"/"OpenERP %s"/server/openerp-server.exe -d mycompany -i base --stop-after-init' % setupversion)
self.ssh(['/cygdrive/c/"Program Files"/"OpenERP %s"/server/openerp-server.exe -d mycompany &' % setupversion, '&'])
_rpc_count_modules(port=18069)
#----------------------------------------------------------
# Stage: building
#----------------------------------------------------------
def _prepare_build_dir(o):
cmd = ['rsync', '-a', '--exclude', '.git', '--exclude', '*.pyc', '--exclude', '*.pyo']
system(cmd + ['%s/' % o.odoo_dir, o.build_dir])
for i in glob(join(o.build_dir, 'addons/*')):
shutil.move(i, join(o.build_dir, 'openerp/addons'))
def build_tgz(o):
system(['python', 'setup.py', 'sdist', '--quiet', '--formats=gztar,zip'], o.build_dir)
system(['cp', glob('%s/dist/openerp-*.tar.gz' % o.build_dir)[0], '%s/openerp.tar.gz' % o.build_dir])
system(['cp', glob('%s/dist/openerp-*.zip' % o.build_dir)[0], '%s/openerp.zip' % o.build_dir])
def build_deb(o):
deb = pexpect.spawn('dpkg-buildpackage -rfakeroot -k%s' % GPGID, cwd=o.build_dir)
deb.logfile = stdout
deb.expect_exact('Enter passphrase: ', timeout=1200)
deb.send(GPGPASSPHRASE + '\r\n')
deb.expect_exact('Enter passphrase: ')
deb.send(GPGPASSPHRASE + '\r\n')
deb.expect(pexpect.EOF)
system(['mv', glob('%s/../openerp_*.deb' % o.build_dir)[0], '%s' % o.build_dir])
system(['mv', glob('%s/../openerp_*.dsc' % o.build_dir)[0], '%s' % o.build_dir])
system(['mv', glob('%s/../openerp_*_amd64.changes' % o.build_dir)[0], '%s' % o.build_dir])
system(['mv', glob('%s/../openerp_*.tar.gz' % o.build_dir)[0], '%s' % o.build_dir])
def build_rpm(o):
# echo "%_unpackaged_files_terminate_build 0" >> /etc/rpm/macros
system(['python2.6', 'setup.py', 'bdist_rpm'], o.build_dir)
system(['cp', glob('%s/dist/openerp-*.noarch.rpm' % o.build_dir)[0], '%s/openerp.noarch.rpm' % o.build_dir])
def build_exe(o):
KVMWinBuildExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key, o.vm_winxp_login).start()
system(['cp', glob('%s/openerp*.exe' % o.build_dir)[0], '%s/openerp.exe' % o.build_dir])
#----------------------------------------------------------
# Stage: testing
#----------------------------------------------------------
def _prepare_testing(o):
if not o.no_tarball or not o.no_debian:
subprocess.call(["mkdir", "docker_debian"], cwd=o.build_dir)
subprocess.call(["cp", "package.dfdebian", os.path.join(o.build_dir, "docker_debian", "Dockerfile")],
cwd=os.path.join(o.odoo_dir, "setup"))
subprocess.call(["docker", "build", "-t", "openerp-debian-nightly-tests", "."],
cwd=os.path.join(o.build_dir, "docker_debian"))
if not o.no_rpm:
subprocess.call(["mkdir", "docker_centos"], cwd=o.build_dir)
subprocess.call(["cp", "package.dfcentos", os.path.join(o.build_dir, "docker_centos", "Dockerfile")],
cwd=os.path.join(o.odoo_dir, "setup"))
subprocess.call(["docker", "build", "-t", "openerp-centos-nightly-tests", "."],
cwd=os.path.join(o.build_dir, "docker_centos"))
def test_tgz(o):
with docker('openerp-debian-nightly-tests', o.build_dir, o.pub) as wheezy:
wheezy.release = 'openerp.tar.gz'
wheezy.system("service postgresql start")
wheezy.system('/usr/local/bin/pip install /opt/release/%s' % wheezy.release)
wheezy.system("useradd --system --no-create-home openerp")
wheezy.system('su postgres -s /bin/bash -c "createuser -s openerp"')
wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"')
wheezy.system('mkdir /var/lib/openerp')
wheezy.system('chown openerp:openerp /var/lib/openerp')
wheezy.system('su openerp -s /bin/bash -c "openerp-server --addons-path=/usr/local/lib/python2.7/dist-packages/openerp/addons -d mycompany -i base --stop-after-init"')
wheezy.system('su openerp -s /bin/bash -c "openerp-server --addons-path=/usr/local/lib/python2.7/dist-packages/openerp/addons -d mycompany &"')
def test_deb(o):
with docker('openerp-debian-nightly-tests', o.build_dir, o.pub) as wheezy:
wheezy.release = '*.deb'
wheezy.system("service postgresql start")
wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"')
wheezy.system('dpkg -i /opt/release/%s' % wheezy.release)
wheezy.system('apt-get install -f -y')
wheezy.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany -i base --stop-after-init"')
wheezy.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany &"')
def test_rpm(o):
with docker('openerp-centos-nightly-tests', o.build_dir, o.pub) as centos6:
centos6.release = 'openerp.noarch.rpm'
# Start postgresql
centos6.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"')
centos6.system('sleep 5')
centos6.system('su postgres -c "createdb mycompany"')
# Odoo install
centos6.system('yum install -d 0 -e 0 /opt/release/%s -y' % centos6.release)
centos6.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany -i base --stop-after-init"')
centos6.system('su openerp -s /bin/bash -c "openerp-server -c /etc/openerp/openerp-server.conf -d mycompany &"')
def test_exe(o):
KVMWinTestExe(o, o.vm_winxp_image, o.vm_winxp_ssh_key, o.vm_winxp_login).start()
#---------------------------------------------------------
# Generates Packages, Sources and Release files of debian package
#---------------------------------------------------------
def gen_deb_package(o, published_files):
# Executes command to produce file_name in path, and moves it to o.pub/deb
def _gen_file(o, (command, file_name), path):
cur_tmp_file_path = os.path.join(path, file_name)
with open(cur_tmp_file_path, 'w') as out:
subprocess.call(command, stdout=out, cwd=path)
system(['cp', cur_tmp_file_path, os.path.join(o.pub, 'deb', file_name)])
# Copy files to a temp directory (required because the working directory must contain only the
# files of the last release)
temp_path = tempfile.mkdtemp(suffix='debPackages')
for pub_file_path in published_files:
system(['cp', pub_file_path, temp_path])
commands = [
(['dpkg-scanpackages', '.'], "Packages"), # Generate Packages file
(['dpkg-scansources', '.'], "Sources"), # Generate Sources file
(['apt-ftparchive', 'release', '.'], "Release") # Generate Release file
]
# Generate files
for command in commands:
_gen_file(o, command, temp_path)
# Remove temp directory
shutil.rmtree(temp_path)
# Generate Release.gpg (= signed Release)
# Options -abs: -a (Create ASCII armored output), -b (Make a detach signature), -s (Make a signature)
subprocess.call(['gpg', '--default-key', GPGID, '--passphrase', GPGPASSPHRASE, '--yes', '-abs', '--no-tty', '-o', 'Release.gpg', 'Release'], cwd=os.path.join(o.pub, 'deb'))
#---------------------------------------------------------
# Generates an RPM repo
#---------------------------------------------------------
def gen_rpm_repo(o, file_name):
# Sign the RPM
rpmsign = pexpect.spawn('/bin/bash', ['-c', 'rpm --resign %s' % file_name], cwd=os.path.join(o.pub, 'rpm'))
rpmsign.expect_exact('Enter pass phrase: ')
rpmsign.send(GPGPASSPHRASE + '\r\n')
rpmsign.expect(pexpect.EOF)
# Removes the old repodata
subprocess.call(['rm', '-rf', os.path.join(o.pub, 'rpm', 'repodata')])
# Copy files to a temp directory (required because the working directory must contain only the
# files of the last release)
temp_path = tempfile.mkdtemp(suffix='rpmPackages')
subprocess.call(['cp', file_name, temp_path])
subprocess.call(['createrepo', temp_path]) # creates a repodata folder in temp_path
subprocess.call(['cp', '-r', os.path.join(temp_path, "repodata"), os.path.join(o.pub, 'rpm')])
# Remove temp directory
shutil.rmtree(temp_path)
#----------------------------------------------------------
# Options and Main
#----------------------------------------------------------
def options():
op = optparse.OptionParser()
root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
build_dir = "%s-%s" % (root, timestamp)
op.add_option("-b", "--build-dir", default=build_dir, help="build directory (%default)", metavar="DIR")
op.add_option("-p", "--pub", default=None, help="pub directory (%default)", metavar="DIR")
op.add_option("", "--no-testing", action="store_true", help="don't test the builded packages")
op.add_option("-v", "--version", default='7.0', help="version (%default)")
op.add_option("", "--no-debian", action="store_true", help="don't build the debian package")
op.add_option("", "--no-rpm", action="store_true", help="don't build the rpm package")
op.add_option("", "--no-tarball", action="store_true", help="don't build the tarball")
op.add_option("", "--no-windows", action="store_true", help="don't build the windows package")
# Windows VM()
op.add_option("", "--vm-winxp-image", default='/home/odoo/vm/winxp27/winxp27.vdi', help="%default")
op.add_option("", "--vm-winxp-ssh-key", default='/home/odoo/vm/winxp27/id_rsa', help="%default")
op.add_option("", "--vm-winxp-login", default='Naresh', help="Windows login (%default)")
op.add_option("", "--vm-winxp-python-version", default='2.7', help="Windows Python version installed in the VM (default: %default)")
(o, args) = op.parse_args()
# derive other options
o.odoo_dir = root
o.pkg = join(o.build_dir, 'pkg')
o.version_full = '%s-%s' % (o.version, timestamp)
o.work = join(o.build_dir, 'openerp-%s' % o.version_full)
o.work_addons = join(o.work, 'openerp', 'addons')
return o
def main():
o = options()
_prepare_build_dir(o)
if not o.no_testing:
_prepare_testing(o)
try:
if not o.no_tarball:
build_tgz(o)
try:
if not o.no_testing:
test_tgz(o)
published_files = publish(o, 'tarball', ['openerp.tar.gz', 'openerp.zip'])
except Exception, e:
print("Won't publish the tgz release.\n Exception: %s" % str(e))
if not o.no_debian:
build_deb(o)
try:
if not o.no_testing:
test_deb(o)
to_publish = []
to_publish.append(glob("%s/openerp*.deb" % o.build_dir)[0])
to_publish.append(glob("%s/openerp*.dsc" % o.build_dir)[0])
to_publish.append(glob("%s/openerp*.changes" % o.build_dir)[0])
to_publish.append(glob("%s/openerp*.tar.gz" % o.build_dir)[0])
published_files = publish(o, 'debian', to_publish)
gen_deb_package(o, published_files)
except Exception, e:
print("Won't publish the deb release.\n Exception: %s" % str(e))
if not o.no_rpm:
build_rpm(o)
try:
if not o.no_testing:
test_rpm(o)
published_files = publish(o, 'redhat', ['openerp.noarch.rpm'])
gen_rpm_repo(o, published_files[0])
except Exception, e:
print("Won't publish the rpm release.\n Exception: %s" % str(e))
if not o.no_windows:
build_exe(o)
try:
if not o.no_testing:
test_exe(o)
published_files = publish(o, 'windows', ['openerp.exe'])
except Exception, e:
print("Won't publish the exe release.\n Exception: %s" % str(e))
except:
pass
finally:
shutil.rmtree(o.build_dir)
print('Build dir %s removed' % o.build_dir)
if not o.no_testing:
system("docker rm -f `docker ps -a | awk '{print $1 }'` 2>>/dev/null")
print('Remaining dockers removed')
if __name__ == '__main__':
main()

3
setup/redhat/install.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
set -e
python2.6 setup.py install --prefix=/usr --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES

View File

@ -0,0 +1,91 @@
#!/bin/sh
set -e
ODOO_CONFIGURATION_FILE=/etc/openerp/openerp-server.conf
ODOO_CONFIGURATION_DIR=/etc/openerp
ODOO_DATA_DIR=/var/lib/openerp
ODOO_GROUP="openerp"
ODOO_LOG_DIR=/var/log/openerp
ODOO_USER="openerp"
if ! getent passwd | grep -q "^openerp:"; then
groupadd $ODOO_GROUP
adduser --system --no-create-home $ODOO_USER -g $ODOO_GROUP
fi
# Register "openerp" as a postgres superuser
su - postgres -c "createuser -s openerp" 2> /dev/null || true
# Configuration file
mkdir -p $ODOO_CONFIGURATION_DIR
echo "[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = openerp
db_password = False
addons_path = /usr/lib/python2.6/site-packages/openerp/addons
" > $ODOO_CONFIGURATION_FILE
chown $ODOO_USER:$ODOO_GROUP $ODOO_CONFIGURATION_FILE
chmod 0640 $ODOO_CONFIGURATION_FILE
# Log
mkdir -p $ODOO_LOG_DIR
chown $ODOO_USER:$ODOO_GROUP $ODOO_LOG_DIR
chmod 0750 $ODOO_LOG_DIR
# Data dir
mkdir -p $ODOO_DATA_DIR
chown $ODOO_USER:$ODOO_GROUP $ODOO_DATA_DIR
echo '#!/bin/sh
### BEGIN INIT INFO
# Provides: openerp-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Enterprise Resource Management software
# Description: Open ERP is a complete ERP and CRM software.
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DAEMON=/usr/bin/openerp-server
NAME=openerp-server
DESC=openerp-server
CONFIG=/etc/openerp/openerp-server.conf
LOGFILE=/var/log/openerp/openerp-server.log
USER=openerp
test -x ${DAEMON} || exit 0
set -e
do_start () {
echo -n "Starting ${DESC}: "
start-stop-daemon --start --quiet --pidfile /var/run/${NAME}.pid --chuid ${USER} --background --make-pidfile --exec ${DAEMON} -- --config=${CONFIG} --logfile=${LOGFILE}
echo "${NAME}."
}
do_stop () {
echo -n "Stopping ${DESC}: "
start-stop-daemon --stop --quiet --pidfile /var/run/${NAME}.pid --oknodo
echo "${NAME}."
}
case "${1}" in
start)
do_start
;;
stop)
do_stop
;;
restart|force-reload)
echo -n "Restarting ${DESC}: "
do_stop
sleep 1
do_start
;;
*)
N=/etc/init.d/${NAME}
echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
' > /etc/init.d/openerp
chmod 700 /etc/init.d/openerp

33
setup/win32/Makefile Normal file
View File

@ -0,0 +1,33 @@
include Makefile.version
include Makefile.python
SERVER_DIRECTORY=../..
FILES_DIRECTORY=release
LAUNCH_PY2EXE_SERVICE=/cygdrive/c/python${PYTHON_VERSION}/python.exe win32_setup.py py2exe
LAUNCH_PY2EXE=/cygdrive/c/python${PYTHON_VERSION}/python.exe setup.py py2exe
MAKENSIS_ARGUMENTS=/DVERSION=$(VERSION)
LAUNCH_MAKENSIS=/cygdrive/c/cygwin/makensis $(MAKENSIS_ARGUMENTS) setup.nsi
default: allinone
clean: server_clean
rm -rf $(FILES_DIRECTORY)/*.exe
rm -rf *.exe
server_clean:
rm -rf $(SERVER_DIRECTORY)/dist
rm -rf $(SERVER_DIRECTORY)/build
rm -rf $(SERVER_DIRECTORY)/win32/dist
rm -rf $(SERVER_DIRECTORY)/win32/build
rm -rf $(SERVER_DIRECTORY)/*.exe
rm -rf $(SERVER_DIRECTORY)/.cyg*
allinone: server_clean
(cd $(SERVER_DIRECTORY)/setup/win32 && $(LAUNCH_PY2EXE_SERVICE))
(cd $(SERVER_DIRECTORY) && $(LAUNCH_PY2EXE))
(cd $(SERVER_DIRECTORY)/setup/win32 && $(LAUNCH_MAKENSIS))
(cd $(SERVER_DIRECTORY)/setup/win32 && mkdir -p $(FILES_DIRECTORY))
(cd $(SERVER_DIRECTORY)/setup/win32 && cp openerp-*.exe $(FILES_DIRECTORY)/openerp-server-setup-$(VERSION).exe)

View File

@ -0,0 +1 @@
PYTHON_VERSION=27

View File

@ -0,0 +1 @@
VERSION=

279
setup.nsi → setup/win32/setup.nsi Normal file → Executable file
View File

@ -21,26 +21,74 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#####################################################################################
# TODO: Avoid to uninstall the database
# TODO: We can update the server or the clients without to uninstall the all-in-one
# TODO: Add startmenu handling (link to localhost + uninstall)
!include 'MUI2.nsh'
!include 'FileFunc.nsh'
!include 'LogicLib.nsh'
!include 'Sections.nsh'
!include 'LogicLib.nsh'
!macro IfKeyExists ROOT MAIN_KEY KEY
# This macro comes from http://nsis.sourceforge.net/Check_for_a_Registry_Key
Push $R0
Push $R1
Push $R2
# XXX bug if ${ROOT}, ${MAIN_KEY} or ${KEY} use $R0 or $R1
StrCpy $R1 "0" # loop index
StrCpy $R2 "0" # not found
${Do}
EnumRegKey $R0 ${ROOT} "${MAIN_KEY}" "$R1"
${If} $R0 == "${KEY}"
StrCpy $R2 "1" # found
${Break}
${EndIf}
IntOp $R1 $R1 + 1
${LoopWhile} $R0 != ""
ClearErrors
Exch 2
Pop $R0
Pop $R1
Exch $R2
!macroend
!define PUBLISHER 'OpenERP S.A.'
!ifndef VERSION
!define VERSION '0'
!ifndef MAJOR_VERSION
!define MAJOR_VERSION '7'
!endif
#!define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION_VERSION}"
!define PRODUCT_NAME "OpenERP Server"
!define DISPLAY_NAME "${PRODUCT_NAME} ${VERSION}"
!ifndef MINOR_VERSION
!define MINOR_VERSION '0'
!endif
!define UNINSTALL_REGISTRY_ROOT HKLM
!define UNINSTALL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${DISPLAY_NAME}"
!ifndef REVISION_VERSION
!define REVISION_VERSION '0'
!endif
!ifndef VERSION
!define VERSION "0"
#!define VERSION "${MAJOR_VERSION}.${MINOR_VERSION}-r${REVISION_VERSION}"
!endif
!define PRODUCT_NAME "OpenERP"
!define DISPLAY_NAME "${PRODUCT_NAME} ${MAJOR_VERSION}.${MINOR_VERSION}"
!define REGISTRY_ROOT HKLM
!define UNINSTALL_BASE_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
!define UNINSTALL_REGISTRY_KEY "${UNINSTALL_BASE_REGISTRY_KEY}\${DISPLAY_NAME}"
!define UNINSTALL_REGISTRY_KEY_SERVER "${UNINSTALL_BASE_REGISTRY_KEY}\OpenERP Server ${VERSION}"
!define REGISTRY_KEY "Software\${DISPLAY_NAME}"
@ -51,9 +99,9 @@
Name '${DISPLAY_NAME}'
Caption "${PRODUCT_NAME} ${VERSION} Setup"
OutFile "openerp-server-setup-${VERSION}.exe"
SetCompressor /final /solid lzma
SetCompress auto
OutFile "openerp-allinone-setup-${VERSION}.exe"
#SetCompressor /final /solid lzma
#SetCompress auto
ShowInstDetails show
XPStyle on
@ -90,33 +138,35 @@ Var HWNDPostgreSQLPort
Var HWNDPostgreSQLUsername
Var HWNDPostgreSQLPassword
Var MUI_TEMP
Var STARTMENU_FOLDER
!define STATIC_PATH "static"
!define PIXMAPS_PATH "${STATIC_PATH}\pixmaps"
!define POSTGRESQL_EXE_FILENAME "postgresql-9.3.5-1-windows.exe"
!define POSTGRESQL_EXE "${STATIC_PATH}\${POSTGRESQL_EXE_FILENAME}"
!define MUI_ABORTWARNING
!define MUI_ICON ".\install\openerp-icon.ico"
!define MUI_ICON "${PIXMAPS_PATH}\openerp-icon.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\install\openerp-intro.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP ".\install\openerp-intro.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\openerp-intro.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${PIXMAPS_PATH}\openerp-intro.bmp"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ".\install\openerp-slogan.bmp"
!define MUI_HEADERIMAGE_BITMAP "${PIXMAPS_PATH}\openerp-slogan.bmp"
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
!define MUI_HEADER_TRANSPARENT_TEXT ""
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE ".\LICENSE"
!insertmacro MUI_PAGE_LICENSE "${STATIC_PATH}\doc\LICENSE"
!define MUI_COMPONENTSPAGE_SMALLDESC
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE ComponentLeave
!insertmacro MUI_PAGE_COMPONENTS
Page Custom ShowPostgreSQL LeavePostgreSQL
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGISTRY_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${DISPLAY_NAME}"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_CHECKED
!define MUI_FINISHPAGE_RUN_TEXT "$(DESC_FinishPageText)"
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
!define MUI_FINISHPAGE_LINK $(DESC_FinishPage_Link)
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.openerp.com/contact"
!insertmacro MUI_PAGE_FINISH
@ -130,12 +180,12 @@ Page Custom ShowPostgreSQL LeavePostgreSQL
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_RESERVEFILE_LANGDLL
!macro CreateInternetShortcut FILENAME URL
WriteINIStr "${FILENAME}.url" "InternetShortcut" "URL" "${URL}"
!macroend
; English
LangString DESC_OpenERP_Server ${LANG_ENGLISH} "Install the OpenERP Server with all the OpenERP standard modules."
LangString DESC_PostgreSQL ${LANG_ENGLISH} "Install the PostgreSQL RDBMS used by OpenERP."
LangString DESC_FinishPage_Link ${LANG_ENGLISH} "Contact OpenERP for Partnership and/or Support"
LangString DESC_AtLeastOneComponent ${LANG_ENGLISH} "You have to choose at least one component"
LangString DESC_CanNotInstallPostgreSQL ${LANG_ENGLISH} "You can not install the PostgreSQL database without the OpenERP Server"
LangString WARNING_HostNameIsEmpty ${LANG_ENGLISH} "The hostname for the connection to the PostgreSQL Server is empty"
LangString WARNING_UserNameIsEmpty ${LANG_ENGLISH} "The username for the connection to the PostgreSQL Server is empty"
LangString WARNING_PasswordIsEmpty ${LANG_ENGLISH} "The password for the connection to the PostgreSQL Server is empty"
@ -145,10 +195,18 @@ LangString DESC_PostgreSQL_Hostname ${LANG_ENGLISH} "Hostname"
LangString DESC_PostgreSQL_Port ${LANG_ENGLISH} "Port"
LangString DESC_PostgreSQL_Username ${LANG_ENGLISH} "Username"
LangString DESC_PostgreSQL_Password ${LANG_ENGLISH} "Password"
LangString Profile_AllInOne ${LANG_ENGLISH} "All In One"
LangString Profile_Server ${LANG_ENGLISH} "Server only"
LangString TITLE_OpenERP_Server ${LANG_ENGLISH} "OpenERP Server"
LangString TITLE_PostgreSQL ${LANG_ENGLISH} "PostgreSQL Database"
LangString DESC_FinishPageText ${LANG_ENGLISH} "Start OpenERP"
; French
LangString DESC_OpenERP_Server ${LANG_FRENCH} "Installation du Serveur OpenERP avec tous les modules OpenERP standards."
LangString DESC_PostgreSQL ${LANG_FRENCH} "Installation de la base de donn?es PostgreSQL utilis?e par OpenERP."
LangString DESC_FinishPage_Link ${LANG_FRENCH} "Contactez OpenERP pour un Partenariat et/ou du Support"
LangString DESC_AtLeastOneComponent ${LANG_FRENCH} "Vous devez choisir au moins un composant"
LangString DESC_CanNotInstallPostgreSQL ${LANG_FRENCH} "Vous ne pouvez pas installer la base de donn?es PostgreSQL sans le serveur OpenERP"
LangString WARNING_HostNameIsEmpty ${LANG_FRENCH} "L'adresse pour la connection au serveur PostgreSQL est vide"
LangString WARNING_UserNameIsEmpty ${LANG_FRENCH} "Le nom d'utilisateur pour la connection au serveur PostgreSQL est vide"
LangString WARNING_PasswordIsEmpty ${LANG_FRENCH} "Le mot de passe pour la connection au serveur PostgreSQL est vide"
@ -158,59 +216,83 @@ LangString DESC_PostgreSQL_Hostname ${LANG_FRENCH} "H?te"
LangString DESC_PostgreSQL_Port ${LANG_FRENCH} "Port"
LangString DESC_PostgreSQL_Username ${LANG_FRENCH} "Utilisateur"
LangString DESC_PostgreSQL_Password ${LANG_FRENCH} "Mot de passe"
LangString Profile_AllInOne ${LANG_FRENCH} "All In One"
LangString Profile_Server ${LANG_FRENCH} "Seulement le serveur"
LangString TITLE_OpenERP_Server ${LANG_FRENCH} "Serveur OpenERP"
LangString TITLE_PostgreSQL ${LANG_FRENCH} "Installation du serveur de base de donn?es PostgreSQL"
LangString DESC_FinishPageText ${LANG_FRENCH} "Démarrer OpenERP"
Section -StopService
nsExec::Exec "net stop openerp-server-7.0"
sleep 2
SectionEnd
InstType $(Profile_AllInOne)
InstType $(Profile_Server)
Section OpenERP_Server SectionOpenERP_Server
SetOutPath '$INSTDIR\server'
Section $(TITLE_OpenERP_Server) SectionOpenERP_Server
SectionIn 1 2
File /r "dist\*"
File /r "win32\wkhtmltopdf\*"
# TODO: install in a temp dir before
SetOutPath "$INSTDIR\server"
File /r "..\..\dist\*"
SetOutPath "$INSTDIR\service"
File /r "win32\dist\*"
File "win32\start.bat"
File "win32\stop.bat"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
!insertmacro CreateInternetShortcut "$SMPROGRAMS\$STARTMENU_FOLDER\OpenERP" "http://localhost:8069/"
!insertmacro MUI_STARTMENU_WRITE_END
FileOpen $9 '$INSTDIR\install.log' w
FileWrite $9 "INSTDIR $INSTDIR$\r$\n"
FileWrite $9 "Hostname $TextPostgreSQLHostname$\r$\n"
FileWrite $9 "Port $TextPostgreSQLPort$\r$\n"
FileWrite $9 "Username $TextPostgreSQLUsername$\r$\n"
FileWrite $9 "Password $TextPostgreSQLPassword$\r$\n"
FileClose $9
File /r "dist\*"
File "start.bat"
File "stop.bat"
# If there is a previous install of the OpenERP Server, keep the login/password from the config file
WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_host" $TextPostgreSQLHostname
WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_user" $TextPostgreSQLUsername
WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_password" $TextPostgreSQLPassword
WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "db_port" $TextPostgreSQLPort
# Fix the addons path
WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "addons_path" "$INSTDIR\server\openerp\addons"
# if we're going to install postgresql force it's path,
# otherwise we consider it's always done and/or correctly tune by users
${If} $HasPostgreSQL == 0
WriteIniStr "$INSTDIR\server\openerp-server.conf" "options" "pg_path" "$INSTDIR\PostgreSQL\bin"
${EndIf}
nsExec::Exec '"$INSTDIR\server\openerp-server.exe" --stop-after-init --logfile "$INSTDIR\server\openerp-server.log" -s'
nsExec::Exec '"$INSTDIR\service\OpenERPServerService.exe" -auto -install'
SectionEnd
nsExec::Exec '"$INSTDIR\service\win32_service.exe" -auto -install'
# TODO: don't hardcode the service name
nsExec::Exec "net stop openerp-server-7.0"
sleep 2
Section -RestartServer
nsExec::Exec "net start openerp-server-7.0"
sleep 2
SectionEnd
Section $(TITLE_PostgreSQL) SectionPostgreSQL
SectionIn 1 2
SetOutPath '$TEMP'
nsExec::Exec 'net user openpgsvc /delete'
File ${POSTGRESQL_EXE}
ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName"
StrCmp $0 "" win9x
Goto done
win9x:
ReadRegStr $0 HKLM "System\CurrentControlSet\Control\ComputerName\ComputerName" "ComputerName"
done:
Rmdir /r "$INSTDIR\PostgreSQL"
ExecWait '"$TEMP\${POSTGRESQL_EXE_FILENAME}" \
--mode unattended \
--prefix "$INSTDIR\PostgreSQL" \
--datadir "$INSTDIR\PostgreSQL\data" \
--servicename "PostgreSQL_For_OpenERP" \
--serviceaccount "openpgsvc" --servicepassword "0p3npgsvcPWD" \
--superaccount "$TextPostgreSQLUsername" --superpassword "$TextPostgreSQLPassword" \
--serverport $TextPostgreSQLPort'
SectionEnd
Section -Post
WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "UninstallString" "$INSTDIR\server\Uninstall.exe"
WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegExpandStr HKLM "${UNINSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayName" "${DISPLAY_NAME}"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "DisplayVersion" "${MAJOR_VERSION}.${MINOR_VERSION}"
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Publisher" "${PUBLISHER}"
; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "Version" "${VERSION}"
; WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "VersionMajor" "${MAJOR_VERSION}.${MINOR_VERSION}"
@ -221,40 +303,28 @@ Section -Post
WriteRegStr HKLM "${UNINSTALL_REGISTRY_KEY}" "Contact" "sales@openerp.com"
WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoModify" "1"
WriteRegDWORD HKLM "${UNINSTALL_REGISTRY_KEY}" "NoRepair" "1"
WriteUninstaller "$INSTDIR\server\Uninstall.exe"
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SectionOpenERP_Server} $(DESC_OpenERP_Server)
!insertmacro MUI_DESCRIPTION_TEXT ${SectionPostgreSQL} $(DESC_PostgreSQL)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Section "Uninstall"
; Stop the NT Service
# Check if the server is installed
!insertmacro IfKeyExists "HKLM" "${UNINSTALL_REGISTRY_KEY_SERVER}" "UninstallString"
Pop $R0
ReadRegStr $0 HKLM "${UNINSTALL_REGISTRY_KEY_SERVER}" "UninstallString"
ExecWait '"$0" /S'
nsExec::Exec "net stop openerp-server-7.0"
nsExec::Exec "sc delete openerp-server-7.0"
sleep 2
; Uninstall the OpenERP Service
nsExec::Exec '"$INSTDIR\..\service\OpenERPServerService.exe" -remove'
sleep 2
Rmdir /r "$INSTDIR\service"
Rmdir /r "$INSTDIR\server"
Rmdir /r "$INSTDIR\service"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\OpenERP.url"
;
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors startMenuDeleteLoopDone
StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:
; Clean the Registry
DeleteRegKey HKLM "${UNINSTALL_REGISTRY_KEY}"
SectionEnd
@ -295,10 +365,19 @@ Function .onInit
IfErrors DoInstallPostgreSQL 0
StrCmp $0 "" DoInstallPostgreSQL
StrCpy $HasPostgreSQL 1
#SectionSetText ${SectionPostgreSQL} ""
!insertmacro UnselectSection ${SectionPostgreSQL}
SectionSetFlags ${SectionPostgreSQL} ${SF_RO}
DoInstallPostgreSQL:
FunctionEnd
Function .onSelChange
${If} $HasPostgreSQL == 1
!insertmacro UnselectSection ${SectionPostgreSQL}
${EndIf}
FunctionEnd
Function PostgreSQLOnBack
FunctionEnd
@ -344,14 +423,10 @@ Function ShowPostgreSQL
FunctionEnd
Function LeavePostgreSQL
# Before to leave the PostgreSQL configuration screen, we check the values
# from the inputs, to be sure we have the right values
${NSD_GetText} $HWNDPostgreSQLHostname $TextPostgreSQLHostname
${NSD_GetText} $HWNDPostgreSQLPort $TextPostgreSQLPort
${NSD_GetText} $HWNDPostgreSQLUsername $TextPostgreSQLUsername
${NSD_GetText} $HWNDPostgreSQLPassword $TextPostgreSQLPassword
StrLen $1 $TextPostgreSQLHostname
${If} $1 == 0
MessageBox MB_ICONEXCLAMATION|MB_OK $(WARNING_HostNameIsEmpty)
@ -377,3 +452,25 @@ Function LeavePostgreSQL
${EndIf}
FunctionEnd
Function ComponentLeave
SectionGetFlags ${SectionOpenERP_Server} $0
IntOp $0 $0 & ${SF_SELECTED}
IntCmp $0 ${SF_SELECTED} Done
SectionGetFlags ${SectionPostgreSQL} $0
IntOp $0 $0 & ${SF_SELECTED}
IntCmp $0 ${SF_SELECTED} DontInstallPostgreSQL
ChooseAtLeastOneComponent:
MessageBox MB_ICONEXCLAMATION|MB_OK $(DESC_AtLeastOneComponent)
Abort
DontInstallPostgreSQL:
MessageBox MB_ICONEXCLAMATION|MB_OK $(DESC_CanNotInstallPostgreSQL)
Abort
Done:
FunctionEnd
Function LaunchLink
ExecShell "open" "http://localhost:8069/"
FunctionEnd

View File

@ -0,0 +1,669 @@
OpenERP is published under the GNU AFFERO GENERAL PUBLIC LICENSE, Version 3
(AGPLv3), as included below. Some external libraries and contributions bundled
with OpenERP may be published under other AGPLv3-compatible licenses. For
these, please refer to the relevant source files and/or license files, in the
source code tree.
**************************************************************************
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

View File

@ -0,0 +1,672 @@
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\f0\fs20 OpenERP is published under the GNU AFFERO GENERAL PUBLIC LICENSE, Version 3\par
(AGPLv3), as included below. Some external libraries and contributions bundled\par
with OpenERP may be published under other AGPLv3-compatible licenses. For\par
these, please refer to the relevant source files and/or license files, in the\par
source code tree.\par
\par
**************************************************************************\par
\par
GNU AFFERO GENERAL PUBLIC LICENSE\par
Version 3, 19 November 2007\par
\par
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\par
Everyone is permitted to copy and distribute verbatim copies\par
of this license document, but changing it is not allowed.\par
\par
Preamble\par
\par
The GNU Affero General Public License is a free, copyleft license for\par
software and other kinds of works, specifically designed to ensure\par
cooperation with the community in the case of network server software.\par
\par
The licenses for most software and other practical works are designed\par
to take away your freedom to share and change the works. By contrast,\par
our General Public Licenses are intended to guarantee your freedom to\par
share and change all versions of a program--to make sure it remains free\par
software for all its users.\par
\par
When we speak of free software, we are referring to freedom, not\par
price. Our General Public Licenses are designed to make sure that you\par
have the freedom to distribute copies of free software (and charge for\par
them if you wish), that you receive source code or can get it if you\par
want it, that you can change the software or use pieces of it in new\par
free programs, and that you know you can do these things.\par
\par
Developers that use our General Public Licenses protect your rights\par
with two steps: (1) assert copyright on the software, and (2) offer\par
you this License which gives you legal permission to copy, distribute\par
and/or modify the software.\par
\par
A secondary benefit of defending all users' freedom is that\par
improvements made in alternate versions of the program, if they\par
receive widespread use, become available for other developers to\par
incorporate. Many developers of free software are heartened and\par
encouraged by the resulting cooperation. However, in the case of\par
software used on network servers, this result may fail to come about.\par
The GNU General Public License permits making a modified version and\par
letting the public access it on a server without ever releasing its\par
source code to the public.\par
\par
The GNU Affero General Public License is designed specifically to\par
ensure that, in such cases, the modified source code becomes available\par
to the community. It requires the operator of a network server to\par
provide the source code of the modified version running there to the\par
users of that server. Therefore, public use of a modified version, on\par
a publicly accessible server, gives the public access to the source\par
code of the modified version.\par
\par
An older license, called the Affero General Public License and\par
published by Affero, was designed to accomplish similar goals. This is\par
a different license, not a version of the Affero GPL, but Affero has\par
released a new version of the Affero GPL which permits relicensing under\par
this license.\par
\par
The precise terms and conditions for copying, distribution and\par
modification follow.\par
\par
TERMS AND CONDITIONS\par
\par
0. Definitions.\par
\par
"This License" refers to version 3 of the GNU Affero General Public License.\par
\par
"Copyright" also means copyright-like laws that apply to other kinds of\par
works, such as semiconductor masks.\par
\par
"The Program" refers to any copyrightable work licensed under this\par
License. Each licensee is addressed as "you". "Licensees" and\par
"recipients" may be individuals or organizations.\par
\par
To "modify" a work means to copy from or adapt all or part of the work\par
in a fashion requiring copyright permission, other than the making of an\par
exact copy. The resulting work is called a "modified version" of the\par
earlier work or a work "based on" the earlier work.\par
\par
A "covered work" means either the unmodified Program or a work based\par
on the Program.\par
\par
To "propagate" a work means to do anything with it that, without\par
permission, would make you directly or secondarily liable for\par
infringement under applicable copyright law, except executing it on a\par
computer or modifying a private copy. Propagation includes copying,\par
distribution (with or without modification), making available to the\par
public, and in some countries other activities as well.\par
\par
To "convey" a work means any kind of propagation that enables other\par
parties to make or receive copies. Mere interaction with a user through\par
a computer network, with no transfer of a copy, is not conveying.\par
\par
An interactive user interface displays "Appropriate Legal Notices"\par
to the extent that it includes a convenient and prominently visible\par
feature that (1) displays an appropriate copyright notice, and (2)\par
tells the user that there is no warranty for the work (except to the\par
extent that warranties are provided), that licensees may convey the\par
work under this License, and how to view a copy of this License. If\par
the interface presents a list of user commands or options, such as a\par
menu, a prominent item in the list meets this criterion.\par
\par
1. Source Code.\par
\par
The "source code" for a work means the preferred form of the work\par
for making modifications to it. "Object code" means any non-source\par
form of a work.\par
\par
A "Standard Interface" means an interface that either is an official\par
standard defined by a recognized standards body, or, in the case of\par
interfaces specified for a particular programming language, one that\par
is widely used among developers working in that language.\par
\par
The "System Libraries" of an executable work include anything, other\par
than the work as a whole, that (a) is included in the normal form of\par
packaging a Major Component, but which is not part of that Major\par
Component, and (b) serves only to enable use of the work with that\par
Major Component, or to implement a Standard Interface for which an\par
implementation is available to the public in source code form. A\par
"Major Component", in this context, means a major essential component\par
(kernel, window system, and so on) of the specific operating system\par
(if any) on which the executable work runs, or a compiler used to\par
produce the work, or an object code interpreter used to run it.\par
\par
The "Corresponding Source" for a work in object code form means all\par
the source code needed to generate, install, and (for an executable\par
work) run the object code and to modify the work, including scripts to\par
control those activities. However, it does not include the work's\par
System Libraries, or general-purpose tools or generally available free\par
programs which are used unmodified in performing those activities but\par
which are not part of the work. For example, Corresponding Source\par
includes interface definition files associated with source files for\par
the work, and the source code for shared libraries and dynamically\par
linked subprograms that the work is specifically designed to require,\par
such as by intimate data communication or control flow between those\par
subprograms and other parts of the work.\par
\par
The Corresponding Source need not include anything that users\par
can regenerate automatically from other parts of the Corresponding\par
Source.\par
\par
The Corresponding Source for a work in source code form is that\par
same work.\par
\par
2. Basic Permissions.\par
\par
All rights granted under this License are granted for the term of\par
copyright on the Program, and are irrevocable provided the stated\par
conditions are met. This License explicitly affirms your unlimited\par
permission to run the unmodified Program. The output from running a\par
covered work is covered by this License only if the output, given its\par
content, constitutes a covered work. This License acknowledges your\par
rights of fair use or other equivalent, as provided by copyright law.\par
\par
You may make, run and propagate covered works that you do not\par
convey, without conditions so long as your license otherwise remains\par
in force. You may convey covered works to others for the sole purpose\par
of having them make modifications exclusively for you, or provide you\par
with facilities for running those works, provided that you comply with\par
the terms of this License in conveying all material for which you do\par
not control copyright. Those thus making or running the covered works\par
for you must do so exclusively on your behalf, under your direction\par
and control, on terms that prohibit them from making any copies of\par
your copyrighted material outside their relationship with you.\par
\par
Conveying under any other circumstances is permitted solely under\par
the conditions stated below. Sublicensing is not allowed; section 10\par
makes it unnecessary.\par
\par
3. Protecting Users' Legal Rights From Anti-Circumvention Law.\par
\par
No covered work shall be deemed part of an effective technological\par
measure under any applicable law fulfilling obligations under article\par
11 of the WIPO copyright treaty adopted on 20 December 1996, or\par
similar laws prohibiting or restricting circumvention of such\par
measures.\par
\par
When you convey a covered work, you waive any legal power to forbid\par
circumvention of technological measures to the extent such circumvention\par
is effected by exercising rights under this License with respect to\par
the covered work, and you disclaim any intention to limit operation or\par
modification of the work as a means of enforcing, against the work's\par
users, your or third parties' legal rights to forbid circumvention of\par
technological measures.\par
\par
4. Conveying Verbatim Copies.\par
\par
You may convey verbatim copies of the Program's source code as you\par
receive it, in any medium, provided that you conspicuously and\par
appropriately publish on each copy an appropriate copyright notice;\par
keep intact all notices stating that this License and any\par
non-permissive terms added in accord with section 7 apply to the code;\par
keep intact all notices of the absence of any warranty; and give all\par
recipients a copy of this License along with the Program.\par
\par
You may charge any price or no price for each copy that you convey,\par
and you may offer support or warranty protection for a fee.\par
\par
5. Conveying Modified Source Versions.\par
\par
You may convey a work based on the Program, or the modifications to\par
produce it from the Program, in the form of source code under the\par
terms of section 4, provided that you also meet all of these conditions:\par
\par
a) The work must carry prominent notices stating that you modified\par
it, and giving a relevant date.\par
\par
b) The work must carry prominent notices stating that it is\par
released under this License and any conditions added under section\par
7. This requirement modifies the requirement in section 4 to\par
"keep intact all notices".\par
\par
c) You must license the entire work, as a whole, under this\par
License to anyone who comes into possession of a copy. This\par
License will therefore apply, along with any applicable section 7\par
additional terms, to the whole of the work, and all its parts,\par
regardless of how they are packaged. This License gives no\par
permission to license the work in any other way, but it does not\par
invalidate such permission if you have separately received it.\par
\par
d) If the work has interactive user interfaces, each must display\par
Appropriate Legal Notices; however, if the Program has interactive\par
interfaces that do not display Appropriate Legal Notices, your\par
work need not make them do so.\par
\par
A compilation of a covered work with other separate and independent\par
works, which are not by their nature extensions of the covered work,\par
and which are not combined with it such as to form a larger program,\par
in or on a volume of a storage or distribution medium, is called an\par
"aggregate" if the compilation and its resulting copyright are not\par
used to limit the access or legal rights of the compilation's users\par
beyond what the individual works permit. Inclusion of a covered work\par
in an aggregate does not cause this License to apply to the other\par
parts of the aggregate.\par
\par
6. Conveying Non-Source Forms.\par
\par
You may convey a covered work in object code form under the terms\par
of sections 4 and 5, provided that you also convey the\par
machine-readable Corresponding Source under the terms of this License,\par
in one of these ways:\par
\par
a) Convey the object code in, or embodied in, a physical product\par
(including a physical distribution medium), accompanied by the\par
Corresponding Source fixed on a durable physical medium\par
customarily used for software interchange.\par
\par
b) Convey the object code in, or embodied in, a physical product\par
(including a physical distribution medium), accompanied by a\par
written offer, valid for at least three years and valid for as\par
long as you offer spare parts or customer support for that product\par
model, to give anyone who possesses the object code either (1) a\par
copy of the Corresponding Source for all the software in the\par
product that is covered by this License, on a durable physical\par
medium customarily used for software interchange, for a price no\par
more than your reasonable cost of physically performing this\par
conveying of source, or (2) access to copy the\par
Corresponding Source from a network server at no charge.\par
\par
c) Convey individual copies of the object code with a copy of the\par
written offer to provide the Corresponding Source. This\par
alternative is allowed only occasionally and noncommercially, and\par
only if you received the object code with such an offer, in accord\par
with subsection 6b.\par
\par
d) Convey the object code by offering access from a designated\par
place (gratis or for a charge), and offer equivalent access to the\par
Corresponding Source in the same way through the same place at no\par
further charge. You need not require recipients to copy the\par
Corresponding Source along with the object code. If the place to\par
copy the object code is a network server, the Corresponding Source\par
may be on a different server (operated by you or a third party)\par
that supports equivalent copying facilities, provided you maintain\par
clear directions next to the object code saying where to find the\par
Corresponding Source. Regardless of what server hosts the\par
Corresponding Source, you remain obligated to ensure that it is\par
available for as long as needed to satisfy these requirements.\par
\par
e) Convey the object code using peer-to-peer transmission, provided\par
you inform other peers where the object code and Corresponding\par
Source of the work are being offered to the general public at no\par
charge under subsection 6d.\par
\par
A separable portion of the object code, whose source code is excluded\par
from the Corresponding Source as a System Library, need not be\par
included in conveying the object code work.\par
\par
A "User Product" is either (1) a "consumer product", which means any\par
tangible personal property which is normally used for personal, family,\par
or household purposes, or (2) anything designed or sold for incorporation\par
into a dwelling. In determining whether a product is a consumer product,\par
doubtful cases shall be resolved in favor of coverage. For a particular\par
product received by a particular user, "normally used" refers to a\par
typical or common use of that class of product, regardless of the status\par
of the particular user or of the way in which the particular user\par
actually uses, or expects or is expected to use, the product. A product\par
is a consumer product regardless of whether the product has substantial\par
commercial, industrial or non-consumer uses, unless such uses represent\par
the only significant mode of use of the product.\par
\par
"Installation Information" for a User Product means any methods,\par
procedures, authorization keys, or other information required to install\par
and execute modified versions of a covered work in that User Product from\par
a modified version of its Corresponding Source. The information must\par
suffice to ensure that the continued functioning of the modified object\par
code is in no case prevented or interfered with solely because\par
modification has been made.\par
\par
If you convey an object code work under this section in, or with, or\par
specifically for use in, a User Product, and the conveying occurs as\par
part of a transaction in which the right of possession and use of the\par
User Product is transferred to the recipient in perpetuity or for a\par
fixed term (regardless of how the transaction is characterized), the\par
Corresponding Source conveyed under this section must be accompanied\par
by the Installation Information. But this requirement does not apply\par
if neither you nor any third party retains the ability to install\par
modified object code on the User Product (for example, the work has\par
been installed in ROM).\par
\par
The requirement to provide Installation Information does not include a\par
requirement to continue to provide support service, warranty, or updates\par
for a work that has been modified or installed by the recipient, or for\par
the User Product in which it has been modified or installed. Access to a\par
network may be denied when the modification itself materially and\par
adversely affects the operation of the network or violates the rules and\par
protocols for communication across the network.\par
\par
Corresponding Source conveyed, and Installation Information provided,\par
in accord with this section must be in a format that is publicly\par
documented (and with an implementation available to the public in\par
source code form), and must require no special password or key for\par
unpacking, reading or copying.\par
\par
7. Additional Terms.\par
\par
"Additional permissions" are terms that supplement the terms of this\par
License by making exceptions from one or more of its conditions.\par
Additional permissions that are applicable to the entire Program shall\par
be treated as though they were included in this License, to the extent\par
that they are valid under applicable law. If additional permissions\par
apply only to part of the Program, that part may be used separately\par
under those permissions, but the entire Program remains governed by\par
this License without regard to the additional permissions.\par
\par
When you convey a copy of a covered work, you may at your option\par
remove any additional permissions from that copy, or from any part of\par
it. (Additional permissions may be written to require their own\par
removal in certain cases when you modify the work.) You may place\par
additional permissions on material, added by you to a covered work,\par
for which you have or can give appropriate copyright permission.\par
\par
Notwithstanding any other provision of this License, for material you\par
add to a covered work, you may (if authorized by the copyright holders of\par
that material) supplement the terms of this License with terms:\par
\par
a) Disclaiming warranty or limiting liability differently from the\par
terms of sections 15 and 16 of this License; or\par
\par
b) Requiring preservation of specified reasonable legal notices or\par
author attributions in that material or in the Appropriate Legal\par
Notices displayed by works containing it; or\par
\par
c) Prohibiting misrepresentation of the origin of that material, or\par
requiring that modified versions of such material be marked in\par
reasonable ways as different from the original version; or\par
\par
d) Limiting the use for publicity purposes of names of licensors or\par
authors of the material; or\par
\par
e) Declining to grant rights under trademark law for use of some\par
trade names, trademarks, or service marks; or\par
\par
f) Requiring indemnification of licensors and authors of that\par
material by anyone who conveys the material (or modified versions of\par
it) with contractual assumptions of liability to the recipient, for\par
any liability that these contractual assumptions directly impose on\par
those licensors and authors.\par
\par
All other non-permissive additional terms are considered "further\par
restrictions" within the meaning of section 10. If the Program as you\par
received it, or any part of it, contains a notice stating that it is\par
governed by this License along with a term that is a further\par
restriction, you may remove that term. If a license document contains\par
a further restriction but permits relicensing or conveying under this\par
License, you may add to a covered work material governed by the terms\par
of that license document, provided that the further restriction does\par
not survive such relicensing or conveying.\par
\par
If you add terms to a covered work in accord with this section, you\par
must place, in the relevant source files, a statement of the\par
additional terms that apply to those files, or a notice indicating\par
where to find the applicable terms.\par
\par
Additional terms, permissive or non-permissive, may be stated in the\par
form of a separately written license, or stated as exceptions;\par
the above requirements apply either way.\par
\par
8. Termination.\par
\par
You may not propagate or modify a covered work except as expressly\par
provided under this License. Any attempt otherwise to propagate or\par
modify it is void, and will automatically terminate your rights under\par
this License (including any patent licenses granted under the third\par
paragraph of section 11).\par
\par
However, if you cease all violation of this License, then your\par
license from a particular copyright holder is reinstated (a)\par
provisionally, unless and until the copyright holder explicitly and\par
finally terminates your license, and (b) permanently, if the copyright\par
holder fails to notify you of the violation by some reasonable means\par
prior to 60 days after the cessation.\par
\par
Moreover, your license from a particular copyright holder is\par
reinstated permanently if the copyright holder notifies you of the\par
violation by some reasonable means, this is the first time you have\par
received notice of violation of this License (for any work) from that\par
copyright holder, and you cure the violation prior to 30 days after\par
your receipt of the notice.\par
\par
Termination of your rights under this section does not terminate the\par
licenses of parties who have received copies or rights from you under\par
this License. If your rights have been terminated and not permanently\par
reinstated, you do not qualify to receive new licenses for the same\par
material under section 10.\par
\par
9. Acceptance Not Required for Having Copies.\par
\par
You are not required to accept this License in order to receive or\par
run a copy of the Program. Ancillary propagation of a covered work\par
occurring solely as a consequence of using peer-to-peer transmission\par
to receive a copy likewise does not require acceptance. However,\par
nothing other than this License grants you permission to propagate or\par
modify any covered work. These actions infringe copyright if you do\par
not accept this License. Therefore, by modifying or propagating a\par
covered work, you indicate your acceptance of this License to do so.\par
\par
10. Automatic Licensing of Downstream Recipients.\par
\par
Each time you convey a covered work, the recipient automatically\par
receives a license from the original licensors, to run, modify and\par
propagate that work, subject to this License. You are not responsible\par
for enforcing compliance by third parties with this License.\par
\par
An "entity transaction" is a transaction transferring control of an\par
organization, or substantially all assets of one, or subdividing an\par
organization, or merging organizations. If propagation of a covered\par
work results from an entity transaction, each party to that\par
transaction who receives a copy of the work also receives whatever\par
licenses to the work the party's predecessor in interest had or could\par
give under the previous paragraph, plus a right to possession of the\par
Corresponding Source of the work from the predecessor in interest, if\par
the predecessor has it or can get it with reasonable efforts.\par
\par
You may not impose any further restrictions on the exercise of the\par
rights granted or affirmed under this License. For example, you may\par
not impose a license fee, royalty, or other charge for exercise of\par
rights granted under this License, and you may not initiate litigation\par
(including a cross-claim or counterclaim in a lawsuit) alleging that\par
any patent claim is infringed by making, using, selling, offering for\par
sale, or importing the Program or any portion of it.\par
\par
11. Patents.\par
\par
A "contributor" is a copyright holder who authorizes use under this\par
License of the Program or a work on which the Program is based. The\par
work thus licensed is called the contributor's "contributor version".\par
\par
A contributor's "essential patent claims" are all patent claims\par
owned or controlled by the contributor, whether already acquired or\par
hereafter acquired, that would be infringed by some manner, permitted\par
by this License, of making, using, or selling its contributor version,\par
but do not include claims that would be infringed only as a\par
consequence of further modification of the contributor version. For\par
purposes of this definition, "control" includes the right to grant\par
patent sublicenses in a manner consistent with the requirements of\par
this License.\par
\par
Each contributor grants you a non-exclusive, worldwide, royalty-free\par
patent license under the contributor's essential patent claims, to\par
make, use, sell, offer for sale, import and otherwise run, modify and\par
propagate the contents of its contributor version.\par
\par
In the following three paragraphs, a "patent license" is any express\par
agreement or commitment, however denominated, not to enforce a patent\par
(such as an express permission to practice a patent or covenant not to\par
sue for patent infringement). To "grant" such a patent license to a\par
party means to make such an agreement or commitment not to enforce a\par
patent against the party.\par
\par
If you convey a covered work, knowingly relying on a patent license,\par
and the Corresponding Source of the work is not available for anyone\par
to copy, free of charge and under the terms of this License, through a\par
publicly available network server or other readily accessible means,\par
then you must either (1) cause the Corresponding Source to be so\par
available, or (2) arrange to deprive yourself of the benefit of the\par
patent license for this particular work, or (3) arrange, in a manner\par
consistent with the requirements of this License, to extend the patent\par
license to downstream recipients. "Knowingly relying" means you have\par
actual knowledge that, but for the patent license, your conveying the\par
covered work in a country, or your recipient's use of the covered work\par
in a country, would infringe one or more identifiable patents in that\par
country that you have reason to believe are valid.\par
\par
If, pursuant to or in connection with a single transaction or\par
arrangement, you convey, or propagate by procuring conveyance of, a\par
covered work, and grant a patent license to some of the parties\par
receiving the covered work authorizing them to use, propagate, modify\par
or convey a specific copy of the covered work, then the patent license\par
you grant is automatically extended to all recipients of the covered\par
work and works based on it.\par
\par
A patent license is "discriminatory" if it does not include within\par
the scope of its coverage, prohibits the exercise of, or is\par
conditioned on the non-exercise of one or more of the rights that are\par
specifically granted under this License. You may not convey a covered\par
work if you are a party to an arrangement with a third party that is\par
in the business of distributing software, under which you make payment\par
to the third party based on the extent of your activity of conveying\par
the work, and under which the third party grants, to any of the\par
parties who would receive the covered work from you, a discriminatory\par
patent license (a) in connection with copies of the covered work\par
conveyed by you (or copies made from those copies), or (b) primarily\par
for and in connection with specific products or compilations that\par
contain the covered work, unless you entered into that arrangement,\par
or that patent license was granted, prior to 28 March 2007.\par
\par
Nothing in this License shall be construed as excluding or limiting\par
any implied license or other defenses to infringement that may\par
otherwise be available to you under applicable patent law.\par
\par
12. No Surrender of Others' Freedom.\par
\par
If conditions are imposed on you (whether by court order, agreement or\par
otherwise) that contradict the conditions of this License, they do not\par
excuse you from the conditions of this License. If you cannot convey a\par
covered work so as to satisfy simultaneously your obligations under this\par
License and any other pertinent obligations, then as a consequence you may\par
not convey it at all. For example, if you agree to terms that obligate you\par
to collect a royalty for further conveying from those to whom you convey\par
the Program, the only way you could satisfy both those terms and this\par
License would be to refrain entirely from conveying the Program.\par
\par
13. Remote Network Interaction; Use with the GNU General Public License.\par
\par
Notwithstanding any other provision of this License, if you modify the\par
Program, your modified version must prominently offer all users\par
interacting with it remotely through a computer network (if your version\par
supports such interaction) an opportunity to receive the Corresponding\par
Source of your version by providing access to the Corresponding Source\par
from a network server at no charge, through some standard or customary\par
means of facilitating copying of software. This Corresponding Source\par
shall include the Corresponding Source for any work covered by version 3\par
of the GNU General Public License that is incorporated pursuant to the\par
following paragraph.\par
\par
Notwithstanding any other provision of this License, you have\par
permission to link or combine any covered work with a work licensed\par
under version 3 of the GNU General Public License into a single\par
combined work, and to convey the resulting work. The terms of this\par
License will continue to apply to the part which is the covered work,\par
but the work with which it is combined will remain governed by version\par
3 of the GNU General Public License.\par
\par
14. Revised Versions of this License.\par
\par
The Free Software Foundation may publish revised and/or new versions of\par
the GNU Affero General Public License from time to time. Such new versions\par
will be similar in spirit to the present version, but may differ in detail to\par
address new problems or concerns.\par
\par
Each version is given a distinguishing version number. If the\par
Program specifies that a certain numbered version of the GNU Affero General\par
Public License "or any later version" applies to it, you have the\par
option of following the terms and conditions either of that numbered\par
version or of any later version published by the Free Software\par
Foundation. If the Program does not specify a version number of the\par
GNU Affero General Public License, you may choose any version ever published\par
by the Free Software Foundation.\par
\par
If the Program specifies that a proxy can decide which future\par
versions of the GNU Affero General Public License can be used, that proxy's\par
public statement of acceptance of a version permanently authorizes you\par
to choose that version for the Program.\par
\par
Later license versions may give you additional or different\par
permissions. However, no additional obligations are imposed on any\par
author or copyright holder as a result of your choosing to follow a\par
later version.\par
\par
15. Disclaimer of Warranty.\par
\par
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\par
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\par
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY\par
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\par
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\par
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\par
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\par
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par
\par
16. Limitation of Liability.\par
\par
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\par
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\par
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\par
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\par
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\par
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\par
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\par
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\par
SUCH DAMAGES.\par
\par
17. Interpretation of Sections 15 and 16.\par
\par
If the disclaimer of warranty and limitation of liability provided\par
above cannot be given local legal effect according to their terms,\par
reviewing courts shall apply local law that most closely approximates\par
an absolute waiver of all civil liability in connection with the\par
Program, unless a warranty or assumption of liability accompanies a\par
copy of the Program in return for a fee.\par
\par
END OF TERMS AND CONDITIONS\par
\par
How to Apply These Terms to Your New Programs\par
\par
If you develop a new program, and you want it to be of the greatest\par
possible use to the public, the best way to achieve this is to make it\par
free software which everyone can redistribute and change under these terms.\par
\par
To do so, attach the following notices to the program. It is safest\par
to attach them to the start of each source file to most effectively\par
state the exclusion of warranty; and each file should have at least\par
the "copyright" line and a pointer to where the full notice is found.\par
\par
<one line to give the program's name and a brief idea of what it does.>\par
Copyright (C) <year> <name of author>\par
\par
This program is free software: you can redistribute it and/or modify\par
it under the terms of the GNU Affero General Public License as published by\par
the Free Software Foundation, either version 3 of the License, or\par
(at your option) any later version.\par
\par
This program is distributed in the hope that it will be useful,\par
but WITHOUT ANY WARRANTY; without even the implied warranty of\par
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\par
GNU Affero General Public License for more details.\par
\par
You should have received a copy of the GNU Affero General Public License\par
along with this program. If not, see <http://www.gnu.org/licenses/>.\par
\par
Also add information on how to contact you by electronic and paper mail.\par
\par
If your software can interact with users remotely through a computer\par
network, you should also make sure that it provides a way for users to\par
get its source. For example, if your program is a web application, its\par
interface could display a "Source" link that leads users to an archive\par
of the code. There are many ways you could offer source, and different\par
solutions will be better for different programs; see section 13 for the\par
specific requirements.\par
\par
You should also get your employer (if you work as a programmer) or school,\par
if any, to sign a "copyright disclaimer" for the program, if necessary.\par
For more information on this, and how to apply and follow the GNU AGPL, see\par
<http://www.gnu.org/licenses/>.\par
}

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

View File

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
import servicemanager
import win32api
import win32process
import win32service
import win32serviceutil
import subprocess
import sys
from os.path import dirname, join, split
execfile(join(dirname(__file__), '..', 'server', 'openerp', 'release.py'))
class OdooService(win32serviceutil.ServiceFramework):
_svc_name_ = nt_service_name
_svc_display_name_ = "%s %s" % (nt_service_name, serie)
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.odooprocess = None # Reference to the server's process
def SvcStop(self):
# Before we do anything, tell the SCM we are starting the stop process.
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
# Stop the running Odoo: say it's a normal exit
win32api.TerminateProcess(int(self.odooprocess._handle), 0)
servicemanager.LogInfoMsg("Odoo stopped correctly")
def SvcDoRun(self):
# We start Odoo as an independent process, but we keep its handle
service_dir = dirname(sys.argv[0])
server_dir = split(service_dir)[0]
server_path = join(server_dir, 'server', 'openerp-server.exe')
self.odooprocess = subprocess.Popen(
[server_path], cwd=server_dir, creationflags=win32process.CREATE_NO_WINDOW
)
servicemanager.LogInfoMsg('Odoo up and running')
# exit with same exit code as Odoo process
sys.exit(self.odooprocess.wait())
def option_handler(opts):
# configure the service to auto restart on failures...
subprocess.call([
'sc', 'failure', nt_service_name, 'reset=', '0', 'actions=', 'restart/0/restart/0/restart/0'
])
if __name__ == '__main__':
win32serviceutil.HandleCommandLine(OdooService, customOptionHandler=option_handler)

View File

@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
import os
import glob
import py2exe
from distutils.core import setup
execfile(os.path.join(os.path.dirname(__file__), '..', '..', 'openerp', 'release.py'))
def generate_files():
actions = {
'start': ['stop', 'start'],
'stop': ['stop'],
}
files = []
if os.name == 'nt':
files.append(("Microsoft.VC90.CRT", glob.glob('C:\Microsoft.VC90.CRT\*.*')))
for action, steps in actions.items():
fname = action + '.bat'
files.append(fname)
with open(fname, 'w') as fp:
fp.write('@PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\System32\Wbem;.\n')
for step in steps:
fp.write('@net %s %s\n' % (step, nt_service_name))
return files
setup(
service=["win32_service"],
version=version,
license=license,
url=url,
author=author,
author_email=author_email,
data_files=generate_files(),
options={
"py2exe": {
"excludes": [
'Tkconstants',
'Tkinter',
'tcl',
'_imagingtk',
'PIL._imagingtk',
'ImageTk',
'PIL.ImageTk',
'FixTk'
],
"skip_archive": 1,
"optimize": 2,
}
},
)

View File

@ -1,15 +0,0 @@
#
# This file is used by 'python setup.py bdist_rpm'
# You should not execute/call this file yourself.
#
# This script is used as the 'install' part of the RPM .spec file.
#
# Need to overwrite the install-part of the RPM to append the
# compression-suffix onto the filenames for the man-pages.
#
python -c "import compileall, os; compileall.compile_dir(os.path.join(os.environ['PWD'], 'doc'), force=True)"
python -O -c "import compileall, os; compileall.compile_dir(os.path.join(os.environ['PWD'], 'doc'), force=True)"
python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
SUFFIX=gz
sed "s!\(/share/man/.*\)!\1.$SUFFIX!" -i INSTALLED_FILES

View File

@ -1,82 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import win32serviceutil
import win32service
import win32api
import win32process
import servicemanager
import sys
import subprocess
import os
try:
import meta
except ImportError:
if hasattr(sys, 'frozen'):
raise
from setup import generate_files
generate_files()
import meta # noqa
class OpenERPServerService(win32serviceutil.ServiceFramework):
# required info
_svc_name_ = meta.nt_service_name
_svc_display_name_ = "%s %s" % (meta.description, meta.serie)
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
# a reference to the server's process
self.terpprocess = None
def SvcStop(self):
# Before we do anything, tell the SCM we are starting the stop process.
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
# stop the running OpenERP Server: say it's a normal exit
win32api.TerminateProcess(int(self.terpprocess._handle), 0)
servicemanager.LogInfoMsg("OpenERP Server stopped correctly")
def StartTERP(self):
# The server finds now its configuration automatically on Windows
# We start the ERP Server as an independent process, but we keep its handle
# The server's binary must be one directory above the service's binary (when py2exe'd the python libraries shouldn' mix)
service_dir = os.path.dirname(sys.argv[0])
server_dir = os.path.split(service_dir)[0]
server_path = os.path.join(server_dir, 'server', 'openerp-server.exe')
self.terpprocess = subprocess.Popen([server_path], cwd=server_dir, creationflags=win32process.CREATE_NO_WINDOW)
def SvcDoRun(self):
self.StartTERP()
servicemanager.LogInfoMsg("OpenERP Server up and running")
# exit with same exit code as OpenERP process
sys.exit(self.terpprocess.wait())
def option_handler(opts):
# configure the service to auto restart on failures...
subprocess.call(['sc', 'failure', meta.nt_service_name, 'reset=', '0', 'actions=', 'restart/0/restart/0/restart/0'])
if __name__ == '__main__':
# Do with the service whatever option is passed in the command line
win32serviceutil.HandleCommandLine(OpenERPServerService, customOptionHandler=option_handler)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,71 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import os
import glob
from distutils.core import setup
import py2exe
meta = {}
execfile(os.path.join(os.path.dirname(__file__), '..', 'openerp', 'release.py'), meta)
def generate_files():
actions = {
'start': ['stop', 'start'],
'stop': ['stop'],
}
files = []
if os.name == 'nt':
files.append(("Microsoft.VC90.CRT", glob.glob('C:\Microsoft.VC90.CRT\*.*')))
for action, steps in actions.items():
fname = action + '.bat'
files.append(fname)
with open(fname, 'w') as fp:
fp.write('@PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\System32\Wbem;.\n')
for step in steps:
fp.write('@net %s %s\n' % (step, meta['nt_service_name']))
files.append('meta.py')
with open('meta.py', 'w') as fp:
for m in 'description serie nt_service_name'.split():
fp.write("%s = %r\n" % (m, meta[m],))
return files
excludes = "Tkconstants Tkinter tcl _imagingtk PIL._imagingtk ImageTk PIL.ImageTk FixTk".split()
setup(service = ["OpenERPServerService"],
version = meta['version'],
license = meta['license'],
url = meta['url'],
author = meta['author'],
author_email = meta['author_email'],
data_files = generate_files(),
options = {"py2exe": {
"excludes": excludes,
"skip_archive": 1,
"optimize": 2,
}},
)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: