Commit Graph
186 Commits
Author SHA1 Message Date
Christophe Monniez defd6ac925 [FIX] packaging: stop moving addons for deb package
The package.py script is moving the addons in odoo/addons which is not
more necessary for the Debian package as it's made at the Debian
packaging level. So package.py will not do that anymore.

closes odoo/odoo#60442

X-original-commit: 27b755a3dfe1e2a580fd436038a60df19e9d83ab
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-21 11:59:55 +00:00
Christophe Monniez 18bdafae94 [FIX] packaging: wait for windows sshd service
In some undeterministic conditions, the Windows virtual machine can take
more than 60 sec to start and have the sshd service ready.

With this commit, the packaging script tries to connect to the VM up to
30 times, giving more than 10 minutes for the boot.

As soon as the connexion is ready, the packaging starts. This means
that the script will probably start sooner in most of the cases.

closes odoo/odoo#58417

X-original-commit: aed85d89f958377f44e150c30a44f28e281dcb79
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-24 11:48:48 +00:00
Christophe Monniez 917928eb08 [IMP] packaging: update windows packaging
Up to Odoo 13.0, the windows setup is 32 bits and embeds an old
postgresql 9.5 32 bits version too.

With this commit, the postgresql server is no longer embedded in the
resulting setup file. Instead, if the user choose to install the
postgresql server, the 12.4 version is downloaded from the official site
(version 10.14 in the case of a 32 bits windows).

Also, the Python target achitecture is choosen based on the Windows
system on which Odoo is installed.

This imply changes on the KVM images used to build the installer:

    - The Windows system on the KVM as to be 64 bits.
    - A 32 bits WinPython version must be in `c:/odoobuild/WinPy32`
    - A 64 bits WinPyhton version must be in `c:/odoobuild/WinPy64`

A little bit of cleaning also comes with this commit to get rid of the
old `openerp` references.

closes odoo/odoo#57727

X-original-commit: c47d7c67066ff15602b16f18c4c3acebfd3a2755
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-15 11:35:47 +00:00
Christophe Monniez 5dbabad0a1 [FIX] packaging: stop docker container when odoo fails
When the Odoo installation is tested, if the test fails an error is
raised but the Docker container is not stopped.

As a result, a ghost container stays alive with a Postgres server
running. Worse, if another package is built on the same host, the
ghost container prevent the other build to succeed.

With this commit, a specific Exception is raised and the container is
stopped in any case.

closes odoo/odoo#56270

X-original-commit: fbe2092d37af02276a49e335538d8caff3a15e7d
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-21 08:59:25 +00:00
Christophe Monniez 52b1b9c255 [REM] packaging: remove useless winpy_requirements.txt file
As this file was only used as a one shot for the windows pacakging, it
can be removed from the code.

closes odoo/odoo#55307

X-original-commit: 19b44653fef85a851239c656b1fdf4798ab83f34
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-03 09:03:50 +00:00
Romain Tartière 607b3c9bdd [FIX] packaging: List all package versions in APT repositories
When building the package list of the APT repository, dpkg-scanpackages
reports the following and only output the latest package information in
the Packages file:

```
dpkg-scanpackages: warning: Packages with multiple instances but no --multiversion specified:
dpkg-scanpackages: warning: ./odoo_13.0.20191002_all.deb
dpkg-scanpackages: warning: ./odoo_13.0.20191003_all.deb
[...]
dpkg-scanpackages: warning: ./odoo_13.0.20200630_all.deb
```

Having only the latest version listed in the Packages file makes it
impossible to tell apt to use a specific version through apt-pinning.
It also makes it impossible to revert to a previous version if a
regression is caused by an update.

For these reasons, tell dpkg-scanpackages to include all versions of the
odoo package in the Packages file it generates.

closes odoo/odoo#54302

X-original-commit: f41c00a8b476610ff033d7facb008873c74ef260
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-07-10 08:38:30 +00:00
Christophe Monniez f5e2c3cff8 [FIX] packaging: install python3-setuptools in docker
Since 5952928b42, the python3-mock debian package is removed from the
Dockerfile used to build the Debian package. This prevent the Odoo
Debian package to be built.

The python3-mock debian package has an inderect dependency on
python3-setuptools which is necessary to build the package.

With this commit, the dependency is explicitely set in the Dockerfile.

closes odoo/odoo#49278

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-04-09 08:04:46 +00:00
Adrian Torres 5952928b42 [REM] *: remove various unused import shims
Before this commit, a lot of leftover import shims existed in the
codebase for py2-py3 compatibility, these are no longer needed since
Odoo 13.0+ doesn't support Python 2 anymore and is (finally) in EOL.

With this commit, these shims are dropped, making the code cleaner,
easier to read and with one less dependency.

Queue -> queue -> py2-py3 compatibility
xmlrpclib -> xmlrpc.client -> py2-py3 compatibility
ConfigParser -> configparser -> py2-py3 compatibility
itertools.izip_longest -> itertools.zip_longest -> py2-py3 compatibility
urllib -> urllib.request -> py2-py3 compatibility
__builtins__ -> builtins -> py2-py3 compatibility
_winreg -> winreg -> py2-py3 compatibility

mock -> unittest.mock -> merged into CPython

The debian/fedora packages and requirements.txt have been updated accordingly

closes odoo/odoo#44601

Related: odoo/enterprise#8141
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-01 12:45:40 +00:00
Hardik Prajapati a43f857423 [IMP] base_vat: replace vatnumver by stdnum library.
Python module vatnumber doesn't seem maintained anymore. Therefore, we should:
    - call directly stdnum (which is maintained and mostly used everywhere in vatnumber)

Also improve stdnum import, vat fix method and vat expected formats

task-1915371

closes odoo/odoo#36978

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-05 10:39:39 +00:00
Martin Trigaux 9aef423d4d [FIX] auth_ldap: replace the deprecated library by one up to date
At 795c7b0a94 the external dependencies was changed from trying
to import 'ldap' to checking than 'pyldap' package was installed.
The problem is that pyldap is a unmaintained library that should no
longer be used, as explained on the package page:
https://pypi.org/project/pyldap/
"The pyldap fork was merged back into python-ldap, and released as
 python-ldap 3.0.0."

Having pyldap version >= 3.0 installs python-ldap automatically and
will not cause any issue.

The Debian control file package name is adapted to use the latest.

The "ldap" externalm dependency defined in __manifest__.py will cause
pkg_resources.get_distribution() to fail in both case ("python-lap" or
"pyldap"), but the "import" fallback will succeed. For that reason, the
log warning is turned into a log info.

closes odoo/odoo#43769

Note: This library should be replaced by the pure python "ldap3" library.
X-original-commit: 1afd0ccf20881ba97e3c07dffb33e9a3a0b2cda4
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-01-22 14:09:46 +00:00
Christophe Monniez 7ce07a7a1a [FIX] packaging: compute winpython path with package.py args
When building the MS Windows package, the PYTHON_VERSION variable is not
used and the WinPython path is hard coded in the Makefile and NSI file.
This prevent the usage of a newer version of Python.

With this commit, the PYTHON_VERSION is used to compute the WinPython
Python directory. That way, this directory can be derived from
package.py command line argument --vm-winxp-python-version.

Also the less windows binaries are not packaged anymore.

closes odoo/odoo#39821

X-original-commit: ac90d8584f99e24aed931eb5186c360f9dfbf399
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-11-05 17:29:31 +00:00
Christophe Monniez 9109399aad [FIX] packaging: fix rpm repository generation
closes odoo/odoo#39199

X-original-commit: 25d6e9a6b79bbc2cb935cdc6c86d1f226732599a
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-22 15:27:09 +00:00
Christophe Monniez 03a1b34fc3 [FIX] packaging: adapt Odoo version in windows installer
Packaging oversight, the displayed version in the installer window was still
12.0.

closes odoo/odoo#38486

X-original-commit: c5bd1a4f9730064f53ff633592dbf83ca7c1e4f7
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-11 09:58:46 +00:00
Christophe Monniez 8c4c439473 [REF] packaging: use docker to build packages
Actually, docker is used to test Linux packages once they are built.
The packaging process is done on the host system where package.py is
run.

Consequences:
    * difficult to reproduce an exact same build on another host
    * changing a Debian/Ubuntu target version means some upgrade steps
      on the build host (mix that with the fact that the host also
      could build old Odoo versions)
    * Fedora rpm package is built on an Ubuntu system (which is not a
      real problem but it could be)

With this commit, the package.py utility is refactored to use Docker
containers to build the Gnu/Linux packages.

Also, the Debian package is adapted for Debian Buster, the RPM package
is built based on Fedora 30.

Some minor changes are also made in the windows packaging system.

closes odoo/odoo#37766

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-02 14:24:53 +00:00
Christophe Monniez d858e275e3 [FIX] packaging: add missing polib packages
The use of polib as introduced in commit 632fa04.
The nightly packaging system uses Docker to test the packages and they need to
be updated when a new library dependency is introduced.

closes odoo/odoo#34117

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-06-14 07:53:33 +00:00
Martin Trigaux 632fa044c3 [IMP] tools: remove custom pofile reader
Use polib library that handles this correctly
The complexity of the parser is moved to the library
2019-06-05 09:44:11 +00:00
Olivier Dony e554ce345f [FIX] requirements: bump up jinja2 reqs
Recommended by GitHub's repository alerts.

We normally stick as close as possible to the version we depend
on in the official DEB packages. This in turn depends on the version of
Debian stable at the time of release - for 11.0 that would be Debian 9
(stretch) and thus Jinja 2.8 (with security backports).

However Jinja2 before 2.10.1 suffers from a few issues that could lead
to crashes of Odoo processes.

It seems it's worth an exception to our rule for pip users, similarly to
previous bump up at d2605bccdb.

closes odoo/odoo#32601

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-07 07:04:34 +00:00
Siddarth Gajjar f3a390cb74 [IMP] generic: replace suds with zeep.
- Added new library zeep for soap request.
- Remove old suds library.

Task ID: 41696 Closes #26934
2019-02-05 11:42:18 +00:00
Christophe Simonis f927c68ddb [MERGE] forward port branch 12.0 up to cb8fefa899 2019-01-31 16:59:58 +01:00
Christophe Simonis 49cb3d8fad [MERGE] forward port branch saas-11.3 up to aeed32d4ff 2019-01-31 15:07:09 +01:00
Christophe Monniez 7eec6b3643 [FIX] packaging: allow install on fedora29
Fedora 29 switched to python 3.7. It seems that there is no official
way to build a RPM package that could works with 3.6 and 3.7.
Building two different packages for each version could open the pandora
box of packaging.

With this commit an ugly hack is used: if python3.7 is found, the odoo
directory is symlinked into its site-packages dir.

fixes #30579

closes odoo/odoo#30618
2019-01-29 09:09:53 +00:00
Christophe Monniez 51ee0c3cb5 [FIX] packaging: add qrcode package to docker file
After the Odoo package is built, the package.py script uses a Docker
image to test the package. After that python3-qrcode was added as a
dependency for the package in 2ff49c5f , it revealed some issues.

A missing cli parameter and a forgotten '&&' in the Dockerfile prevented
the installation of the depending packages.

Also, the script shebang was wrong by launching python2.

Finally, the fact that python3-xlwt is missing in Debian stretch was
highlighted. With this commit, the python3-xlwt is explicitly removed
from the dependencies and the documentation is updated accordingly.

closes odoo/odoo#28807
2018-11-19 15:34:13 +00:00
Christophe Monniez 055e1b8324 [REM] packaging: remove useless code
PKG-INFO is generated during the setup phase and is not needed anymore.
Also this file contains outdated informations.

py2exe is not used anymore to build the windows installer.

closes odoo/odoo#28494
2018-11-08 08:50:33 +00:00
Christophe Simonis 5e055a2afd [MERGE] forward port branch saas-11.4 up to f6ca72b3ce 2018-11-02 10:52:55 +01:00
Christophe Simonis f6ca72b3ce [MERGE] forward port branch saas-11.3 up to 21eb31d804 2018-10-31 20:43:03 +01:00
Christophe Simonis a587325ca7 [MERGE] forward port branch saas-15 up to 00829a0beb 2018-10-31 18:31:53 +01:00
Christophe Monniez 5a04c82fff [FIX] packaging: bump Odoo version to 12 in MS Windows installer
Fixes #27420

closes odoo/odoo#27590
2018-10-09 15:21:02 +00:00
Adrian Torres a277bfb44a [REM] packaging: drop PyYAML dependency
Commit cf853a785b removed all yml tests
and the yml import engine from Odoo forever, however PyYAML remains a
dependency even though it's not used anymore.

This commit removes any reference to this lib that could be found.

closes odoo/odoo#27563
2018-10-09 12:56:03 +00:00
Christophe Monniez 6dc790d2da [FIX] packaging: find admin uid when testing packages
Since 2f7c03d the admin user could have any uid and the uid 1 is
reserved for the system user. As the uid was hardcoded as 1 when testing
packages, the tests were failing.

With this commit, the uid of the admin user is searched before testing
the packages.

Closes #26603
2018-08-27 13:25:43 +02:00
Christophe Monniez 4293a27b03 [FIX] packaging: fix docker file for src tests
Since bf3193a libsass is needed but is named libsass0 in Debian.
With this commit, the docker source image used for tests will build again.
2018-07-27 08:51:33 +02:00
Christophe Monniez 0e117c873c [REM] packaging: add sassc to the rpm package
Since 565277acbb sassc is used as a
fallback when the python libsass is not available.

With this commit, the saasc package dependency is added to the rpm to
avoid installing libsass with pip.
2018-06-08 15:47:07 +02:00
Christophe Simonis 279d928693 [FIX] core: always load base and web as server wide modules
Since 285ead28e3, `base` should be loaded
as a server wide module to enable rpc routes.
2018-06-05 14:46:24 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Christophe Monniez 7202205688 [FIX] packaging: avoid traceback on virtual machine timeout
When the virtual machine used to build MS Win package takes too much
time (to build or to test the build), a warning is logged and the VM is killed.

Before this commit, the PID of the process was passed as an argument to
the warning method, causing a traceback.
2018-05-04 10:09:31 +02:00
Christophe Monniez 5666bc3d32 [IMP] packaging: automate package update in Windows build
When building the Windows installer, a virtual machine is used with
prepackaged python modules.

With this commit, the packaging script will try to install on the
virtual machine the python packages specified in requirements.txt.
Each package is installed individually, that way, if an install fails,
the install of the other packages continues.
At the end of the process, successfully packages are listed so that they
will appear in the build log files.

Also, the Makefile was cleaned in this commit (removal of py2exe stuffs).
2018-04-26 09:22:38 +02:00
Christophe Monniez ddf601d443 [FIX] packaging: remove libsass dependency in debian package
A dependency to libsass was added in debian package and in the docker
file. The Odoo nightly builds of the deb package was failing because
this lib is named libsass0 in Debian.

Finally, this dependency is not required because python3-libsass already depends on libsass0.
2018-04-24 13:51:13 +02:00
qsm-odoo bf3193ac5e [REF] setup: review dependencies
Include libsass instead of node-less

Thank you to @d-fence for testing this.
2018-04-18 15:58:34 +02:00
Christophe Monniez 4035d55d56 [FIX] package: fix the windows build test
As the windows package provides odoo from sources alongs with
python 3, the test of the build was failing.
The odoo-bin.exe was not found because py2exe is not used anymore.

Windows firewall is now disabled from package.py to prevent it
from blocking local xmlrpc calls.

Also, the docker containers were removed when package tests were
finished, even when no docker was involved in the process (e.g. only
a windows build).

This commit fixes the test part of the windows build process.
2017-11-03 14:33:24 +01:00
Andrew Latham cd5f61df6d [FIX] setup: typo in command line
Sign CLA

Closes #20321
2017-10-23 16:37:27 +02:00
Christophe Monniez d38d62f5db [FIX] packages: install vc_redist files properly
Nsis installer was installing the wrong MS Visual C++ redistributable
file. Python 3.6 needs MS Visual C++ 2015 redistruibutable files.

Also, Nsis now differentiate Windows architecture for the nssm service
and the MS C++ redist.
2017-10-18 18:44:19 +02:00
Christophe Monniez 5dfa00cb6c [FIX] packages: fix docker images builds tests
The automated tests of rpm,deb and src packages are using docker
images and containers. Those tests were not working as expected due
to various small glitches:
* some debian python- packages were missing in the Debian image
* pip was called instead of pip3 for the src test
* a wrong addons path was given for the tests
* the containers id's were wrong due to a bytes implicitly converted
  to str
2017-10-12 17:24:36 +02:00
Christophe Monniez fc76b1d565 [REM] remove any openid reference
Purpose: openid is not used anymore in Odoo, therefore it can be
safely removed.
2017-10-12 08:43:21 +02:00
Martin Trigaux f5b2a4b0f2 [FIX] doc: update to version 11
Use python 3.5
Refer to correct page of the doc
Remove old bazar to git (was intended for the 8.0)

Remove outdated setup_dev script: it was intended for odoo developers but if you
are not able to make a git clone, you are going to have a bad time later.
2017-10-11 11:38:36 +02:00
Xavier Morel 6a291815e7 [FIX] doc: warning & P3 compatibility 2017-10-10 14:23:42 +02:00
Jairo Llopis 348b2d713a [FIX] P3 syntax errors preventing compileall
Not that we really care about compileall, but some people apparently
do.

Fixes #19871

Closes #19849
2017-10-10 13:32:28 +02:00
Christophe Monniez bb14c41663 [REF] core: Remove psycogreen dependency
Purpose:
    The psycogreen module is unmaintained. Last source update was in
    2015 and last pypi package was in 2012. Odoo only use a small
    part of the psycogreen module that could be written directly in
    the odoo code. This commit reproduce the small function from
    psycogreen used in ODoo and remove all depencies from it.
    Also the copyright and license are honored and the documentation
    is updated accordingly.

    pypi pckage: https://pypi.python.org/pypi/psycogreen
    bitbucket repos: https://bitbucket.org/dvarrazzo/psycogreen/
2017-10-09 18:56:57 +02:00
Christophe Monniez 1ca2db0a61 [FIX] setup win32: remove python and nssm on uninstall
Purpose: When uninstalling using the windows uninstaller, python and
nssm were left beyond. This fix removes the python and nssm dirs also.
2017-10-09 08:59:20 +02:00
Christophe Monniez e63813864a [FIX] package: remove unwanted char from install path
Purpose: When installing postgresql under windows, the '+' character is
unallowed. This was creating a bug when using the windows installer the enterprise
version which derivate the install path from the version number.
2017-10-09 08:59:18 +02:00
Olivier Dony 360bfb7a52 [FIX] setup: bump up kvm startup delay
Windows can be slower to start than that, sometimes.
2017-10-03 20:02:29 +02:00
Christophe Monniez 06c2346da5 [REF] win32: move to WinPython...
Purpose: for multiple reasons (bytecode change in python 3.6,
         missing files for some packages, py2exe is unmaintained
         ...) the py2exe solution cannot be used anymore.
         Odoo for windows will now use a portable Python that
         will be shipped with the Windows installer.
         For that purpose, a Winpython 3.6.2 is used.
         In order to build the Windows installer, a Winpython dir
         with all the Odoo requirements fullfilled, must exists on
         the build system (qemu-kvm VM).

* nsis installer:
    - Only the python dir is used to avoid packaging too much stuffs
    - better compression level
    - starts the Odoo service using nssm
    -  bump to V11
* change the default win10 build vm path
* print a warning when uncomplete addon move
* try to force remove of addon path:
  when the addons are moved to Odoo/addons, it happens that the
  destination already exists. In that case, the source addon was not
  deleted, resulting in a uneeded file duplication.
* fix version string to avoid invalid chars in windows service
* Add requirements adpated for WinPython
* package.py now shows the traceback when a build fails
* verify that a file exists before publishing
* debuild now creates an .xz file instead of .gz
* package: use logging module
* kvm CPU that works with older versions.
* fix a pexpect encoding bug
* fix the version to remove special chars '~' which is not appreciated
  by windows services

[REM] win32setup: Remove win32 python service

Purpose:
    Before this commit, the win32 service was managed by an executable
    builded from those two files with the help of py2xe.
    The win32 service is now managed by nssm which starts Odoo and therefore, those
    files are not needed anymore.
2017-10-03 12:01:53 +02:00