Обсуждение: Broken python2-psycopg2-2.8.3-2.rhel7.x86_64.rpm package forPostgresQL versions 9.6 or lower

Поиск
Список
Период
Сортировка

Broken python2-psycopg2-2.8.3-2.rhel7.x86_64.rpm package forPostgresQL versions 9.6 or lower

От
Sébastien Besson
Дата:
Hi everyone,

I hope I am posting to the relevant list to post this issue, please redirect me if this is incorrect.

We have started encountering issues following the latest version of the python2-psycopg2 package (2.8.3-2) pushed to
theYUM repository yesterday. 

The issue affects versions of PostgreSQL 9.6 and earlier and can minimally reproduced with the attached Docker file
whichinstalls the server, the psycopg2 package and tests the module import. 

With the Postgresql 10 package, the module import without issue

$ docker build . —build-arg VERSION=10
…
Successfully built 66bbaec12338

But with PostgreSQL 9.4 or 9.6, the module import fails with an undefined symbol error:

$ docker build . —build-arg VERSION=94
…
Step 5/5 : RUN python -c 'import psycopg2'
 ---> Running in aadea9ee5590
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
    from psycopg2._psycopg import (                     # noqa
ImportError: /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so: undefined symbol: PQsslAttribute

$ docker build . —build-arg VERSION=96
Step 5/5 : RUN python -c 'import psycopg2'
 ---> Running in 0be14cd51ca1
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
    from psycopg2._psycopg import (                     # noqa
ImportError: /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so: undefined symbol: PQencryptPasswordConn

Let me know if more information is required
Best,
Sebastien


Вложения

Re: Broken python2-psycopg2-2.8.3-2.rhel7.x86_64.rpm package forPostgresQL versions 9.6 or lower

От
Devrim Gündüz
Дата:
Hi,

On Thu, 2019-10-03 at 10:56 +0100, Sébastien Besson wrote:

> I hope I am posting to the relevant list to post this issue, please redirect
> me if this is incorrect.

This is the very right list.

> We have started encountering issues following the latest version of the
> python2-psycopg2 package (2.8.3-2) pushed to the YUM repository yesterday.
>
> The issue affects versions of PostgreSQL 9.6 and earlier and can minimally
> reproduced with the attached Docker file which installs the server, the
> psycopg2 package and tests the module import.
>
> With the Postgresql 10 package, the module import without issue
>
> $ docker build . —build-arg VERSION=10
> …
> Successfully built 66bbaec12338
>
> But with PostgreSQL 9.4 or 9.6, the module import fails with an undefined
> symbol error:
>
> $ docker build . —build-arg VERSION=94
> …
> Step 5/5 : RUN python -c 'import psycopg2'
>  ---> Running in aadea9ee5590
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 50, in
> <module>
>     from psycopg2._psycopg import (                     # noqa
> ImportError: /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so:
> undefined symbol: PQsslAttribute
>
> $ docker build . —build-arg VERSION=96
> Step 5/5 : RUN python -c 'import psycopg2'
>  ---> Running in 0be14cd51ca1
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 50, in
> <module>
>     from psycopg2._psycopg import (                     # noqa
> ImportError: /usr/lib64/python2.7/site-packages/psycopg2/_psycopg.so:
> undefined symbol: PQencryptPasswordConn
>
> Let me know if more information is required

Looks weird. I'll check.

Regards,

--
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Вложения

Re: Broken python2-psycopg2-2.8.3-2.rhel7.x86_64.rpm package forPostgresQL versions 9.6 or lower

От
Devrim Gündüz
Дата:
Hi,

On Thu, 2019-10-03 at 10:56 +0100, Sébastien Besson wrote:
> The issue affects versions of PostgreSQL 9.6 and earlier and can minimally
> reproduced with the attached Docker file which installs the server, the
> psycopg2 package and tests the module import.

This is a band aid to your problem:

RUN yum --disablerepo=* --enablerepo=pgdg94 install -y postgresql${VERSION}-server python-psycopg2

The problem is, psycopg2 is pulled from 10 repos, but the rest is pulled from
9.4 repos, so the libpq in 9.4 does not have these functions.

I had to make this change to fix this issue:

https://redmine.postgresql.org/issues/4798

Let me see what I can do.

Regards,

--
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Вложения

Re: Broken python2-psycopg2-2.8.3-2.rhel7.x86_64.rpm package forPostgresQL versions 9.6 or lower

От
Sébastien Besson
Дата:
Hi Devrim,

Thanks for the quick answer.
I had pinned the python-psycopg2 package to an earlier working version but this is a more elegant workaround with the
additionalbenefit of installing the latest package from the correct repo. 

Best,
Sebastien

> On 3 Oct 2019, at 18:27, Devrim Gündüz <devrim@gunduz.org> wrote:
>
>
> Hi,
>
> On Thu, 2019-10-03 at 10:56 +0100, Sébastien Besson wrote:
>> The issue affects versions of PostgreSQL 9.6 and earlier and can minimally
>> reproduced with the attached Docker file which installs the server, the
>> psycopg2 package and tests the module import.
>
> This is a band aid to your problem:
>
> RUN yum --disablerepo=* --enablerepo=pgdg94 install -y postgresql${VERSION}-server python-psycopg2
>
> The problem is, psycopg2 is pulled from 10 repos, but the rest is pulled from
> 9.4 repos, so the libpq in 9.4 does not have these functions.
>
> I had to make this change to fix this issue:
>
> https://redmine.postgresql.org/issues/4798
>
> Let me see what I can do.
>
> Regards,
>
> --
> Devrim Gündüz
> Open Source Solution Architect, Red Hat Certified Engineer
> Twitter: @DevrimGunduz , @DevrimGunduzTR