Re: Possible packaging problem with gssapi

From: Shaheed Haque <shaheedhaque(at)gmail(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Possible packaging problem with gssapi
Date: 2021-03-03 15:00:21
Message-ID: CAHAc2jfdHZwrS0JKmGgZ3GrxZKsG2QW9_WM+WYdjoY0SGQTF9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

On Wed, 3 Mar 2021 at 14:42, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Wed, Mar 3, 2021 at 2:33 PM Shaheed Haque <shaheedhaque(at)gmail(dot)com>
> wrote:
>
>> Hi,
>>
>> I *think* there is something not quite right with the pgAdmin4 packaging
>> as regards gssapi, which I assume is related to the new Kerberos support in
>> 4.30. When I try to deploy our software, which has a dependency on
>> pgAdmin4, I see something like this:
>>
>> $ sudo pip install ...blah...our stuff...blah...
>> ...
>> Collecting pgadmin4
>> Downloading pgadmin4-5.0-py3-none-any.whl (97.3 MB)
>> ...
>> Collecting gssapi==1.6.*
>> Downloading gssapi-1.6.12.tar.gz (1.1 MB)
>> ERROR: Command errored out with exit status 1:
>> ...
>> /bin/sh: 1: krb5-config: not found
>> In distributed package, building from C files...
>> ...
>> subprocess.CalledProcessError: Command 'krb5-config --libs gssapi'
>> returned non-zero exit status 127.
>> ----------------------------------------
>> WARNING: Discarding
>> https://files.pythonhosted.org/packages/c2/77/7cba9c5945d4d42d54ed1fb2a0bd8095d629548743198fa47ed6c1167846/gssapi-1.6.12.tar.gz#sha256=16ed3b5d7fc37683be27f34a2a6
>> 5062cb11d815d019bb2e89ffeb395576e51c8 (from
>> https://pypi.org/simple/gssapi/) (requires-python:>=3.6.*). Command
>> errored out with exit status 1: python setup.py egg_info Check the logs for
>> full command output.
>> Downloading gssapi-1.6.11.tar.gz (1.1 MB)
>> ...same error..
>> Downloading gssapi-1.6.10.tar.gz (1.1 MB)
>> ...same error..
>> Downloading gssapi-1.6.9.tar.gz (1.1 MB)
>> ...same error..
>> Downloading gssapi-1.6.5.tar.gz (1.1 MB)
>> ...same error..
>> Downloading gssapi-1.6.2.tar.gz (1.1 MB)
>> ...same error..
>> Downloading gssapi-1.6.1.tar.gz (1.1 MB)
>> ...same error..
>> Downloading gssapi-1.6.0.tar.gz (1.1 MB)
>> ...same error..
>> Collecting pgadmin4
>> Downloading pgadmin4-4.30-py3-none-any.whl (92.7 MB)
>>
>> At some level, this is a dependency issue for gsslib, not pgadmin4, but
>> OTOH, I'm not using Kerberos so it is kind of annoying.
>>
>
> Right - it is caused by gssapi, which will be built from source if there's
> no binary wheel available for your platform. It's not clear what platform
> you're on, but installing the krb5-devel (Redhat/CentOS/Fedora)
> or libkrb5-dev (Debian/Ubuntu) should solve the build issue.
>

Yes, I'm on Ubuntu LTS, and installing one of the krb dev packages does
indeed solve the problem. Ideally though, I'd like to avoid installing a
package we don't - in principle - need.

>
>> [What is worse is that, because - I think - of the dependency pinning
>> approach that pgAdmin4 uses, the above downgrade to pgadmin4.30 is not the
>> end of the story: I actually end up all the way back on pgadmin4.25, which
>> is even more annoying, if not downright dangerous].
>>
>
> I'm not sure I understand the issue there. What prevents you from going
> back to 4.29?
>

That's not clear to me, and I don't know if there is an accessible way to
work out why pip3's dependency resolver (which I guess is in charge here)
decides that it has to go back further. I can post logs or run any commands
that might help track this down, but I fear this is inevitable if packages
we depend on extensively pin dependencies.

FWIW, pgadmin4 and one or two others from a well-known cloud vendor are the
main ones that do extensive pinning. (I can understand why, if one thinks
of oneself as an end product, this might seem attractive, but for me,
pgadmin4 is a rather useful component, not the end application :-)).

>
>> I'm not sure if there is a way to make the gsslib dependency
>> optional/failsafe?
>>
>
> I'd need to dive into it some more. There are "extras", but from what I
> can see these have to be explicitly installed. Ideally we want something
> that will try to install gssapi automatically, but not get upset if it
> fails.
>

As noted, I'm not trying to pin any blame for this, and there are
workarounds available. But anything that you might do to help would be
great.

Thanks for the quick reply (as always!),

Shaheed

> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Jackie Culver 2021-03-03 19:07:55 Help installing on Mac
Previous Message Dave Page 2021-03-03 14:41:54 Re: Possible packaging problem with gssapi