Commit Graph
76 Commits
Author SHA1 Message Date
Christophe Monniez fae2bd0c28 [FIX] packaging: verify repodata exists
The rpm packaging fails to generate a repository when the repodata
directory does not exists previously to the build.

The reason is that the package.py script removes the repodata before
rpm repo generation without verifying the the directory exists.

That kind of corner case happens when a new odoo version comes out.
With this commit, the script now verifies that the directory exists.

Also, while at it, a time stamp based on seconds is added to the default
build directory name to allow to build more than one time the same day
without removing the build directory. It's mainly a testing use case,
when the packaging script is tested, the build dir is usually kept for
debugging purposes.

closes odoo/odoo#78386

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-10-15 22:09:41 +00:00
Christophe Monniez e7231db74e [IMP] packaging: automate win installer displayed version
When a new Odoo version is released, the displayed version in the
Windows NSIS installer has to be manually updated.

With this commit, the displayed version is computed from the release.py
file.

Part-of: odoo/odoo#78386
2021-10-15 22:09:41 +00:00
Christophe Monniez 5cb543651e [FIX] packaging: create rpm repo from container
The createrepo Debian package is not available in Ubuntu anymore, this
can cause problems on Ubuntu based build systems.

In order to solve that once and for all, with this commit the rpm repo is
generated from a Docker container.

Fixes #63419

closes odoo/odoo#63585

X-original-commit: 8f5c5e585572facd8768e9f9dfc0de9e301f0c93
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-12-18 13:17:13 +00:00
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
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 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 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 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 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 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 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 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 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
Christophe Monniez 6953f22e67 [IMP] setup: Update docker files 2017-10-03 12:01:53 +02:00
Christophe Monniez dd7b6fb6b7 [IMP] package: build source tarball using python3 2017-10-03 12:01:53 +02:00
Christophe Monniez e0dc251805 [IMP] Support for building Fedora26 rpm 2017-10-03 12:01:52 +02:00
Christophe Monniez 1e76ffc7bd [IMP] package: various improvements
* Add an option to avoid signing deb package
* update windows vm name
* add memory to kvm as win10 needs 1G
* increase win VM timeout because win10 seems slower to start
* add an option to keep build dir for debugging purpose
2017-10-03 12:01:52 +02:00
Olivier Dony f0333285fa [FIX] P3: convert exception handlers to except..as
Those are possibly posterior or leftovers from 3979f6802e
2017-08-20 23:25:54 +02:00
Xavier Morel d5c80fd92d [FIX] P3: xmlrpclib -> xmlrpc.client 2017-06-26 16:45:02 +02:00
xmo-odoo 2e6a589f41 [FIX] builtins removed from Python 3
* Reverse wrapper courtesy of @rco-odoo's original P3 branch
* thin compat module stripped down from werkzeug (to augment as needed)

issue 8530
2017-04-27 13:59:33 +02:00
Christophe Simonis 020440f500 [FIX] packaging: correct docker build name (part2) 2016-10-06 02:54:53 +02:00
Christophe Simonis 18cdce919b [FIX] packaging: correct docker build name 2016-10-05 20:59:43 +02:00
Simon Lejeune c59eb4ffc1 [REF] packaging: renamed configuration files
no fallbacks were implemented to `openerp-server.conf`.
2016-09-30 12:05:49 +02:00
Simon Lejeune cee7cc5274 [REF] packaging: redhat: use fedora for testing
Creating a centos docker image fails on our nightly server with
this issue: https://github.com/docker/hub-feedback/issues/461

To create a centos image, we used another repository to host the
image and we make it build in docker hub, then we pulled it. It
was getting really annoying.
2016-09-30 12:05:49 +02:00
Simon Lejeune ed8f0c83c4 [REF] cli: renamed openerp-server to odoo-bin
The use of an entry point was considered in order to provide
an `odoo` command in the path for the packages users, but the
generated entry point will first check that all the things in
install_requires were provided in a not bright way: it'll check
that it matches a distribution name. This does not work because
python-chart does not have the distrubtion name "pychart" which
is provided by the python-pychart package in debian jessie. Same
for suds-jurko which is provided by python-suds in debian stretch
but does not have the distribution name "suds".

Also, adapted the  packages tests to these cli changes.
2016-09-30 12:05:49 +02:00
Simon Lejeune ea3d9e69ef [REF] packaging: windows: remove use of version_full
This way we do not have to pass the version as argument. This
was error prone. If the timestamp has to be included in the
version, just patch it during before running package.py. This
was already done in our nightly servers anyway.
2016-09-30 12:05:49 +02:00
Simon Lejeune 7f8ad73618 [REF] packaging: windows: don't hardcode service name
Correctly pass it to the nsis script the same way it was done for
the version and python version. this was a source of error at each
release.
2016-09-30 12:05:49 +02:00
Simon Lejeune baf3508222 [REF] packaging: windows: start the correct service name during test 2016-09-30 12:05:49 +02:00
Simon Lejeune ac9b10003d [REF] packaging: document dependencies 2016-09-30 12:05:48 +02:00
Simon Lejeune eb501081c5 [REF] packaging: openerp has been renamed odoo
Fix the various place when the rename of the git root directory
broke the packaging script. Also, we can now name the library
"odoo".
2016-09-30 12:05:48 +02:00
Simon Lejeune ba5258adb8 [REF] packaging: web_analytics was removed in saas-12 2016-09-30 12:05:48 +02:00
Martin Trigaux 7892d99f3a [FIX] all: references to Odoo 8.0 version
In installation script or documentation

Fixes #10052
2015-12-18 15:06:46 +01:00
Aaron Bohy a99ae62239 [FIX] Packaging: package.py: default version set to 9.0
Fixes remaining occurences of 8.0 in the windows installer. Mainly, odoo is now
correctly installed in odoo.9.0-timestamp/ instead of odoo.8.0-timestamp/
2015-10-09 15:42:22 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Simonis d215a08db1 [MERGE] forward port of branch 8.0 up to 86d7f52 2015-07-14 15:57:39 +02:00
Christophe Simonis 86d7f52971 [MERGE] forward port of branch 7.0 up to be6c758 2015-07-14 15:14:58 +02:00
Christophe Simonis be6c7582a0 [FIX] package.py: search for prompt correctly. 2015-07-14 15:08:14 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Nicolas Martinelli c8c84d4a4e [IMP] Packaging: use docker image of debian jessie.
Update to pip v6 necessary to avoid import error of 'IncompleteRead' from requests.compat
2015-02-23 08:24:24 +01:00
Nicolas Martinelli d5c4a1c3e1 [FIX] Packaging: possibility to have a PGP key without passphrase 2015-02-20 16:56:14 +01:00
Nicolas Martinelli 520360d80b [ADD] Packaging: nightly tests: src dockerfile
Creation of a Dockerfile for the src package for nightly tests.
Remove unnecessary libraries installation from the Debian Dockerfile.
2015-02-20 16:56:13 +01:00
Nicolas Martinelli aca65438e8 [IMP] Packaging: version number in docker image name 2015-02-20 16:56:13 +01:00
Nicolas Martinelli 4305aad02f [IMP] Packaging: version number in docker image name 2015-02-20 16:40:37 +01:00