[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>
This commit is contained in:
Christophe Monniez
2019-10-02 14:24:53 +00:00
parent e10a402531
commit 8c4c439473
7 changed files with 463 additions and 430 deletions
+6 -2
View File
@@ -1,6 +1,6 @@
# Please note that this Dockerfile is used for testing nightly builds and should
# not be used to deploy Odoo
FROM debian:stretch
FROM debian:buster
MAINTAINER Odoo S.A. <info@odoo.com>
RUN apt-get update && \
@@ -12,11 +12,14 @@ RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -qq && \
apt-get upgrade -qq -y && \
apt-get install -qq -y\
adduser \
dh-python \
packaging-dev \
postgresql \
postgresql-client \
python3 \
@@ -51,7 +54,8 @@ RUN apt-get update -qq && \
python3-vatnumber \
python3-vobject \
python3-werkzeug \
python3-xlsxwriter && \
python3-xlsxwriter \
rsync && \
rm -rf /var/lib/apt/lists/*
RUN echo "PS1=\"[\u@nightly-tests] # \"" > ~/.bashrc