Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btovT-0001RR-4y for pgadmin-hackers@arkaria.postgresql.org; Tue, 11 Oct 2016 04:44:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1btovR-0001fJ-4f for pgadmin-hackers@arkaria.postgresql.org; Tue, 11 Oct 2016 04:44:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1btovP-0001fA-7y for pgadmin-hackers@postgresql.org; Tue, 11 Oct 2016 04:44:23 +0000 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1btovL-0006fC-PU for pgadmin-hackers@postgresql.org; Tue, 11 Oct 2016 04:44:21 +0000 Received: by mail-it0-x235.google.com with SMTP id o19so10859239ito.1 for ; Mon, 10 Oct 2016 21:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NEiMKpgk8yWDYc0NfaZxqg5jfYxGTjg5We9IFpuWgDE=; b=t+kHbHjEpm0Yrqy6CIbYUI8d94WP/AqdIydlsg6n7n6iw8B8AYwtZDRML60yNHT06S tQnopomXGhkneMW+oMvMtoJD2KUfqt4nPdJar5uXeP/uLXI24zktu03Ngnx8xk3oRszT UWyNmrbhfyLgQPnMF8ETk+lCDQ6MOHdQVuj3payRWSW1h3fjMAYePLr3HxPm4oqbvYRl IFeW2LhH/Ne7IavQ+B4xMVaDX9puuSNWs9oCy4oMJjYKFDmZR08X96Odv8DMBZ02XHBh HRmkAc3j/WGP9ZUg4qxCxOQeWQzrm0V4JmtAYhuRqy38FRokKqBtgnAQHuk6k9vpnP24 OAng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NEiMKpgk8yWDYc0NfaZxqg5jfYxGTjg5We9IFpuWgDE=; b=bfNzbuCDxzGRq0oBzzpVB56AJG9IKRJJyUO5OTQwB86kJVdB786y8osvWCvpXXUK9g IsrsVabDkJJP5B4SxiXavmYAWozvrfxJB8t6CF3EahNeilFNDxfuFg+vYDH/vbYC+IZZ 4yrBbI+aoVosrdl3XmRtTr7l8AUYSw59eUoUFLFpV0CKrhesm6FdIdpiU3vQcPXYuTC/ 2qHknzUQ7g/DxOK6E7XEVaMYnubaUdZeXEhxs3rdSuOoDqkswjxSXbVyGr817ZMDxIoQ vedcDuSAntY3c4x93HfaMFBEZvZc7FICkvbpuDRzEmMROmoOa/N1FTH/uzfvA4t2EjqX EhiA== X-Gm-Message-State: AA6/9RlcNfkQYuF199HDWuMiEd1QlxxJEOerd6iQ+WIlKAJLJkwdC78MtDLvhAiGWAJHoIVMtJ/7nFpM+YVgrg== X-Received: by 10.36.178.27 with SMTP id u27mr1141174ite.113.1476161058219; Mon, 10 Oct 2016 21:44:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.146.135 with HTTP; Mon, 10 Oct 2016 21:44:16 -0700 (PDT) In-Reply-To: References: <30628d77-bfbb-5bc1-7522-7c3c05730c1a@gmail.com> From: Dave Page Date: Tue, 11 Oct 2016 05:44:16 +0100 Message-ID: Subject: Running pgadmin4 as desktop application To: =?UTF-8?B?RGV2cmltIEfDvG5kw7x6?= Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=f403045d997881b6b1053e8f87ec X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --f403045d997881b6b1053e8f87ec Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi On Monday, October 10, 2016, Devrim G=C3=BCnd=C3=BCz > wrote: > > Hi Dave, > > On Thu, 2016-10-06 at 13:42 +0100, Dave Page wrote: > > > > The global config file that Qt will read by default seems to be > > "/etc/pgAdmin Development Team/pgAdmin 4.conf". > > > > I may change that for 1.1 to use a less obnoxious path. The contents > > of it seem to need to be: > > > > [General] > > ApplicationPath=3D../../../../usr/lib/python2.7/site-packages/ > pgadmin4-web/ > > PythonPath=3D"/usr/lib64/python2.7/site-packages/;/usr/lib/python2.7/si= te- > > packages/" > > > > The ApplicationPath is the directory containing pgAdmin4.py. Due to a > > bugette in the way the runtime works, it needs to be relative to the > > location of the runtime, hence all the back-tracking. The PythonPath > > needs to include both the 32 and 64 bit directories, as it seems that > > some of the Python modules end up in each. > > > > That was enough to get it to start for me. > > Ok, this worked on CentOS 7 box, but not on Fedora 24, which has QT5 and > Python > 3. Can you help me to debug this? The content of the file in Fedora 24 is= : > $ cat /etc/pgAdmin\ Development\ Team/pgAdmin\ 4.conf > [General] > ApplicationPath=3D../../../..//usr/lib/python3.5/site-packages/pgadmin4-w= eb/ > PythonPath=3D"/usr/lib64/python3.5/site-packages; > /usr/lib/python3.5/site-packages" > OK, so I only have command line access to a test machine right now as I'm travelling with my tiny laptop that doesn't have vmware on it. I setup an F24 instance on the OpenStack cluster at work, and installed your package. It looks like pgadmin4-web should work from the command line, but it must be started with "python3 pgAdmin4.py", because the default python interpreter on F24 still seems to be Python 2.7. > > > I'm still getting segfault, and: > > An error occurred initialising the application server: > > Failed to locate pgAdmin4.py, terminating server thread. > Hmm, at that point, it should ask for the paths. I'm not seeing a segfault though - it just seems to exit for me, so I don't get a core dump. Can you get one? If so, can you get a backtrace? > > > > Then, we run into the tricky issues, where you may have to deal with > > conflicts between web and desktop mode. In our other installers, we > > ship a blank config_local.py file, with a simple comment at the top > > telling the user they can customise any settings in that file. For web > > users, we don't want that, as it's used as a security mechanism > > (startup will fail if it's not present, and tell the user they must > > set some security-critical options). Those options don't matter in > > desktop mode, hence why we pre-write the file. > > > > Perhaps the way around that is to have the shortcut on the menu call a > > script that can create config_local.py if needed? Though, I see you > > already have config_distro.py forcing the user into desktop mode, > > which is a potential conflict. > > AFAICS, creating the file above helped to solve this issue, at least I ca= n > say > that both modes work on CentOS 7. > > > The other issue I see is with the docs: > > > > 1) The path in config_distro.py is > > /usr/share/doc/pgadmin4-docs/en_US/html/. That directory doesn't exist > > - if the docs are compiled in-situ, they'll end up in > > /usr/share/doc/pgadmin4-docs/en_US/html/_build/html > > > > 2) The docs aren't built, so there is no _build/html directory. > > Actuallly they are installed via -docs subpackage, but I forgot to add > this as > a dependency. > OK, thanks. > > > 3) The docs are integrated into the application so really should be a > > dependency of the pgadmin4 RPM. > > Ok, fixed. Pushed to 9.6 testing repo: > > yum --enablerepo pgdg96-updates-testing install pgadmin4 pgadmin4-web > :-) > > (Packages will appear in next sync ;) ) > > Can you please test again? > I don't have that VM around at the moment :-( --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --f403045d997881b6b1053e8f87ec Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi

On Monday, October 10, 2016, Devrim G=C3=BCnd=C3=BCz <devrim@gunduz.org> wrote:

Hi Dave,

On Thu, 2016-10-06 at 13:42 +0100, Dave Page wrote:
>
> The global config file that Qt will read by default seems to be
> "/etc/pgAdmin Development Team/pgAdmin 4.conf".
>
> I may change that for 1.1 to use a less obnoxious path. The contents > of it seem to need to be:
>
> [General]
> ApplicationPath=3D../../../../usr/lib/python2.7/site-packages/pgadmin4-web/
> PythonPath=3D"/usr/lib64/python2.7/site-packages/;/usr/lib/<= wbr>python2.7/site-
> packages/"
>
> The ApplicationPath is the directory containing pgAdmin4.py. Due to a<= br> > bugette in the way the runtime works, it needs to be relative to the > location of the runtime, hence all the back-tracking. The PythonPath > needs to include both the 32 and 64 bit directories, as it seems that<= br> > some of the Python modules end up in each.
>
> That was enough to get it to start for me.

Ok, this worked on CentOS 7 box, but not on Fedora 24, which has QT5 and Py= thon
3. Can you help me to debug this? The content of the file in Fedora 24 is:<= /blockquote>

$ cat /etc/pgAdmin\ Development\ Team/pgAdmin\ 4.conf=C2=A0
[General]
ApplicationPath=3D../../../..//usr/lib/python3.5/site-packages/pg= admin4-web/
PythonPath=3D"/usr/lib64/python3.5/site-packages; /usr/lib/python= 3.5/site-packages"

OK, so I o= nly have command line access to a test machine right now as I'm travell= ing with my tiny laptop that doesn't have vmware on it. I setup an F24 = instance on the OpenStack cluster at work, and installed your package.

It looks like pgadmin4-web should work from the comman= d line, but it must be started with "python3 pgAdmin4.py", becaus= e the default python interpreter on F24 still seems to be Python 2.7.
=
=C2=A0


I'm still getting segfault, and:

An error occurred initialising the application server:

Failed to locate pgAdmin4.py, terminating server thread.

Hmm, at that point, it should ask for the paths. I'm = not seeing a segfault though - it just seems to exit for me, so I don't= get a core dump. Can you get one? If so, can you get a backtrace?
=C2=A0


> Then, we run into the tricky issues, where you may have to deal with > conflicts between web and desktop mode. In our other installers, we > ship a blank config_local.py file, with a simple comment at the top > telling the user they can customise any settings in that file. For web=
> users, we don't want that, as it's used as a security mechanis= m
> (startup will fail if it's not present, and tell the user they mus= t
> set some security-critical options). Those options don't matter in=
> desktop mode, hence why we pre-write the file.
>
> Perhaps the way around that is to have the shortcut on the menu call a=
> script that can create config_local.py if needed? Though, I see you > already have config_distro.py forcing the user into desktop mode,
> which is a potential conflict.

AFAICS, creating the file above helped to solve this issue, at least I can = say
that both modes work on CentOS 7.

> The other issue I see is with the docs:
>
> 1) The path in config_distro.py is
> /usr/share/doc/pgadmin4-docs/en_US/html/. That directory doesn= 9;t exist
> - if the docs are compiled in-situ, they'll end up in
> /usr/share/doc/pgadmin4-docs/en_US/html/_build/html
>
> 2) The docs aren't built, so there is no _build/html directory.
Actuallly they are installed via -docs subpackage, but I forgot to add this= as
a dependency.

OK, thanks.
=C2= =A0

> 3) The docs are integrated into the application so really should be a<= br> > dependency of the pgadmin4 RPM.

Ok, fixed. Pushed to 9.6 testing repo:

yum =C2=A0--enablerepo pgdg96-updates-testing install pgadmin4 pgadmin4-web=

:-)
=C2=A0

(Packages will appear in next sync ;) )

Can you please test again?

I don't = have that VM around at the moment :-(=C2=A0


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
<= br> --f403045d997881b6b1053e8f87ec--