Skip to content

Commit 2d4c383

Browse files
committed
[FIX] packaging: update rpm packaging for fedora 32
As Fedora 32 was the current release when Odoo 14.0 was released, this should be the supported version. Also, a few old libs were still in mentioned in the packaging files. They flew under the radar because they never broke the packaging. This is not the case anymore, those libs disappeared from the Fedora repos. It seems that pyparsing is not used anymore since 5a1c06a and thus can be safely removed from `requirements.txt` too. pychart is not used anymore since 3425752. While at it, remove mix of tabs and spaces in package.dffedora, also add missing packages to avoid installation at test time. Now that I started down the slippery slope, also removed some `-dev` packages in package.dfsrc as wheel's are available. Finally, the rpm install script now detects the python ABI version in order to avoid update this file at each ABI change in Fedora. Fixes odoo#63719 closes odoo#65288 X-original-commit: a8deb1d Signed-off-by: Christophe Monniez (moc) <[email protected]>
1 parent a9667f5 commit 2d4c383

File tree

10 files changed

+55
-71
lines changed

10 files changed

+55
-71
lines changed

addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ PKGS_TO_INSTALL="
6666
python3-psutil \
6767
python3-psycopg2 \
6868
python3-pydot \
69-
python3-pyparsing \
7069
python3-pypdf2 \
7170
python3-qrcode \
7271
python3-reportlab \

debian/control

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Depends:
3939
python3-psutil,
4040
python3-psycopg2,
4141
python3-pydot,
42-
python3-pyparsing,
4342
python3-pypdf2,
4443
python3-qrcode,
4544
python3-reportlab,

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ psycopg2==2.7.7; sys_platform != 'win32' and python_version < '3.8'
3737
psycopg2==2.8.5; sys_platform == 'win32' or python_version >= '3.8'
3838
pydot==1.4.1
3939
python-ldap==3.1.0; sys_platform != 'win32'
40-
pyparsing==2.2.0
4140
PyPDF2==1.26.0
4241
pyserial==3.4
4342
python-dateutil==2.7.3

setup.cfg

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ install-script = setup/redhat/install.sh
77
post-install = setup/redhat/postinstall.sh
88

99
requires =
10-
babel
1110
sassc
12-
libxslt-python
13-
pychart
14-
pyparsing
15-
python(abi) >= 3.6
11+
python(abi) >= 3.8
1612
python3-babel
1713
python3-decorator
1814
python3-docutils
@@ -35,7 +31,6 @@ requires =
3531
python3-psycopg2
3632
python3-polib
3733
python3-pydot
38-
python3-pyparsing
3934
python3-PyPDF2
4035
python3-pyserial
4136
python3-dateutil

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
'psutil', # windows binary code.google.com/p/psutil/downloads/list
4343
'psycopg2 >= 2.2',
4444
'pydot',
45-
'pyparsing',
4645
'pypdf2',
4746
'pyserial',
4847
'python-dateutil',

setup/package.dfdebian

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ RUN apt-get update -qq && \
4141
python3-psutil \
4242
python3-psycopg2 \
4343
python3-pydot \
44-
python3-pyparsing \
4544
python3-pypdf2 \
4645
python3-qrcode \
4746
python3-reportlab \

setup/package.dffedora

+50-51
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,59 @@
11
# Please note that this Dockerfile is used for testing nightly builds and should
22
# not be used to deploy Odoo
3-
FROM fedora:30
3+
FROM fedora:32
44
MAINTAINER Odoo S.A. <[email protected]>
55

66
# Dependencies and postgres
77
RUN dnf update -d 0 -e 0 -y && \
8-
dnf install -d 0 -e 0 \
9-
babel \
10-
createrepo \
11-
pychart \
12-
pyparsing \
13-
python3-babel \
14-
python3-decorator \
15-
python3-docutils \
16-
python3-feedparser \
17-
python3-gevent \
18-
python3-greenlet \
19-
python3-html2text \
20-
python3-jinja2 \
21-
python3-lxml \
22-
python3-mako \
23-
python3-markupsafe \
24-
python3-num2words \
25-
python3-ofxparse \
26-
python3-passlib \
27-
python3-pillow \
28-
python3-psutil \
29-
python3-pydot \
30-
python3-pyldap \
31-
python3-pyparsing \
32-
python3-PyPDF2 \
33-
python3-pyserial \
34-
python3-dateutil \
35-
python3-polib \
36-
python3-pytz \
37-
python3-pyusb \
38-
python3-qrcode \
39-
python3-reportlab \
40-
python3-requests \
41-
python3-six \
42-
python3-stdnum \
43-
python3-suds \
44-
python3-vobject \
45-
python3-werkzeug \
46-
python3-xlwt \
47-
python3-xlrd \
48-
python3-xlsxwriter \
49-
libsass \
50-
pytz \
51-
postgresql \
52-
postgresql-server \
53-
postgresql-libs \
54-
postgresql-contrib \
55-
postgresql-devel \
56-
rpmdevtools -y && \
57-
dnf clean all
8+
dnf install -d 0 -e 0 \
9+
createrepo \
10+
libsass \
11+
postgresql \
12+
postgresql-contrib \
13+
postgresql-devel \
14+
postgresql-libs \
15+
postgresql-server \
16+
python3-PyPDF2 \
17+
python3-babel \
18+
python3-dateutil \
19+
python3-decorator \
20+
python3-docutils \
21+
python3-feedparser \
22+
python3-freezegun \
23+
python3-gevent \
24+
python3-greenlet \
25+
python3-html2text \
26+
python3-idna \
27+
python3-jinja2 \
28+
python3-lxml \
29+
python3-mako \
30+
python3-markupsafe \
31+
python3-mock \
32+
python3-num2words \
33+
python3-ofxparse \
34+
python3-passlib \
35+
python3-pillow \
36+
python3-polib \
37+
python3-psutil \
38+
python3-psycopg2 \
39+
python3-pydot \
40+
python3-pyldap \
41+
python3-pyserial \
42+
python3-pytz \
43+
python3-pyusb \
44+
python3-qrcode \
45+
python3-reportlab \
46+
python3-requests \
47+
python3-six \
48+
python3-stdnum \
49+
python3-suds \
50+
python3-vobject \
51+
python3-werkzeug \
52+
python3-xlrd \
53+
python3-xlsxwriter \
54+
python3-xlwt \
55+
rpmdevtools -y && \
56+
dnf clean all
5857

5958
# Postgres configuration
6059
RUN mkdir -p /var/lib/postgres/data

setup/package.dfsrc

-7
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,8 @@ RUN apt-get update -qq && \
2020
postgresql-server-dev-all \
2121
postgresql-client \
2222
adduser \
23-
libsass1 \
24-
libxml2-dev \
25-
libxslt1-dev \
2623
libldap2-dev \
2724
libsasl2-dev \
28-
libssl-dev \
29-
libjpeg-dev \
30-
zlib1g-dev \
31-
python3-dev \
3225
python3-pip \
3326
python3-wheel \
3427
build-essential \

setup/redhat/install.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
22
set -e
3-
python3 setup.py install --prefix=/usr --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES --install-lib usr/lib/python3.7/site-packages/
3+
ABI=$(rpm -q --provides python3 | awk '/abi/ {print $NF}')
4+
python3 setup.py install --prefix=/usr --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES --install-lib usr/lib/python${ABI}/site-packages/

setup/redhat/postinstall.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ODOO_GROUP="odoo"
99
ODOO_LOG_DIR=/var/log/odoo
1010
ODOO_LOG_FILE=$ODOO_LOG_DIR/odoo-server.log
1111
ODOO_USER="odoo"
12+
ABI=$(rpm -q --provides python3 | awk '/abi/ {print $NF}')
1213

1314
if ! getent passwd | grep -q "^odoo:"; then
1415
groupadd $ODOO_GROUP
@@ -28,7 +29,7 @@ db_host = False
2829
db_port = False
2930
db_user = $ODOO_USER
3031
db_password = False
31-
addons_path = /usr/lib/python3.7/site-packages/odoo/addons
32+
addons_path = /usr/lib/python${ABI}/site-packages/odoo/addons
3233
" > $ODOO_CONFIGURATION_FILE
3334
chown $ODOO_USER:$ODOO_GROUP $ODOO_CONFIGURATION_FILE
3435
chmod 0640 $ODOO_CONFIGURATION_FILE

0 commit comments

Comments
 (0)