Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 595378 - dev-db/pgadmin4: qt GUI for PostgreSQL
Summary: dev-db/pgadmin4: qt GUI for PostgreSQL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Aaron W. Swenson
URL: https://www.pgadmin.org/
Whiteboard:
Keywords:
: 627906 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-28 16:39 UTC by Ben Sagal
Modified: 2017-09-09 23:28 UTC (History)
13 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pgadmin4-1.0.ebuild (pgadmin4-1.0.ebuild,1.85 KB, text/plain)
2016-10-02 15:03 UTC, Chris Mayo
Details
Patch path to pgAdmin4.py (pgadmin4-1.0-webpath.patch,956 bytes, patch)
2016-10-02 15:04 UTC, Chris Mayo
Details | Diff
flask-gravatar-0.4.2.ebuild (flask-gravatar-0.4.2.ebuild,547 bytes, text/plain)
2016-10-02 15:04 UTC, Chris Mayo
Details
sqlparse-0.2.1.ebuild (sqlparse-0.2.1.ebuild,380 bytes, text/plain)
2016-10-02 15:05 UTC, Chris Mayo
Details
django-htmlmin-0.9.1.ebuild (django-htmlmin-0.9.1.ebuild,475 bytes, text/plain)
2016-10-08 14:50 UTC, Chris Mayo
Details
pgadmin4-1.0.ebuild (pgadmin4-1.0.ebuild,2.00 KB, text/plain)
2016-10-09 18:51 UTC, Chris Mayo
Details
pgadmin4-1.0.ebuild (pgadmin4-1.0.ebuild,2.11 KB, text/plain)
2016-10-10 18:48 UTC, Chris Mayo
Details
pgAdmin4.conf (pgAdmin4.conf,55 bytes, text/plain)
2016-10-10 18:49 UTC, Chris Mayo
Details
pgadmin4-1.0.ebuild (pgadmin4-1.0.ebuild,2.17 KB, text/plain)
2016-10-27 19:39 UTC, Chris Mayo
Details
pgadmin4-1.1.ebuild (pgadmin4-1.1.ebuild,2.14 KB, text/plain)
2017-02-02 19:32 UTC, Chris Mayo
Details
pgadmin4-1.2.ebuild (pgadmin4-1.2.ebuild,2.14 KB, text/plain)
2017-02-13 19:51 UTC, Chris Mayo
Details
flask-htmlmin-1.2.ebuild (flask-htmlmin-1.2.ebuild,523 bytes, text/plain)
2017-02-13 19:52 UTC, Chris Mayo
Details
htmlmin-0.1.10.ebuild (htmlmin-0.1.10.ebuild,426 bytes, text/plain)
2017-02-13 19:52 UTC, Chris Mayo
Details
see https://github.com/titanofold/titanofold-gentoo-x86 (see titanofold-dev-overlay,77 bytes, text/plain)
2017-06-01 19:11 UTC, Chris Mayo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Sagal 2016-09-28 16:39:39 UTC
pgAdmin4 is currently in rc stage.
I would be great to have an ebuild for it.
Comment 1 Chris Mayo 2016-10-02 15:03:42 UTC
Created attachment 448830 [details]
pgadmin4-1.0.ebuild

ebuild for the runtime (haven't tried pgadmin4 behind a web server). Needs some review and work on the dependencies.

Also a patch required to the source for this installation and some ebuilds not currently in the tree.

See the info in pkg_postinst for manual steps required to get it running.
Comment 2 Chris Mayo 2016-10-02 15:04:20 UTC
Created attachment 448832 [details, diff]
Patch path to pgAdmin4.py
Comment 3 Chris Mayo 2016-10-02 15:04:47 UTC
Created attachment 448834 [details]
flask-gravatar-0.4.2.ebuild
Comment 4 Chris Mayo 2016-10-02 15:05:10 UTC
Created attachment 448836 [details]
sqlparse-0.2.1.ebuild
Comment 5 Chris Mayo 2016-10-08 14:50:17 UTC
Created attachment 449550 [details]
django-htmlmin-0.9.1.ebuild

Need django-htmlmin too.
Comment 6 Chris Mayo 2016-10-09 18:51:33 UTC
Created attachment 449676 [details]
pgadmin4-1.0.ebuild

Updated ebuild:
- Create a config_local.py in /usr/share/pgadmin4/web/ instead of asking the user to create one in ~/.pgadmin
- Byte-compile Python
- Add some dependencies and PYTHON_REQUIRED_USE
Comment 7 Chris Mayo 2016-10-10 18:48:58 UTC
Created attachment 449774 [details]
pgadmin4-1.0.ebuild

Updated ebuild:
- Instead of patching the runtime and asking the user to set Python Path create:
/etc/xdg/pgAdmin Development Team/pgAdmin 4.conf
Comment 8 Chris Mayo 2016-10-10 18:49:15 UTC
Created attachment 449776 [details]
pgAdmin4.conf
Comment 9 Chris Mayo 2016-10-27 19:39:08 UTC
Created attachment 451662 [details]
pgadmin4-1.0.ebuild

Updated ebuild:
- For Qt4 store pgAdmin 4.conf under /etc/qt4 not /etc/xdg
- Create pgAdmin 4.conf completely in src_install()
Comment 10 bugs.gentoo.org 2017-01-16 20:46:03 UTC
The upstream site says: «WARNING: pgAdmin III is no longer supported. It is recommended that you download pgAdmin 4 instead.»

And there is pgAdmin 4 v1.1 released — 2016-10-27.
Comment 11 Aaron W. Swenson gentoo-dev 2017-02-02 15:35:26 UTC
Comment on attachment 448836 [details]
sqlparse-0.2.1.ebuild

sqlparse is already in the tree as dev-python/python-sqlparse.
Comment 12 Aaron W. Swenson gentoo-dev 2017-02-02 15:37:30 UTC
There are a lot of dependencies missing from the ebuild that are in requirements_py3.txt.

Is there a reason they were excluded?
Comment 13 Chris Mayo 2017-02-02 19:32:34 UTC
Created attachment 462280 [details]
pgadmin4-1.1.ebuild

They are just the dependencies I had found were essential. More work needed there - but I have since been using the last release, 1.22.2, of pgAdmin3.

Updated ebuild for 1.1 attached that uses dev-python/python-sqlparse and supports Python 3 now that dev-python/flask-security does.
Comment 14 Wojciech Myrda 2017-02-06 22:49:35 UTC
@Chris Mayo
Thanks for the ebuild. 
Hence You are familiar with the application would it be to much for me to ask You to add support for the apache based installation?

And for the other dependencies I see that all off them are in portage in version equal or higher than required so it might be possible that you did not notice the need for them as you might have at least some of them in the system already. Going through the list I noticed I have about half of them installed by different packages. The list of packages not reflected by the ebuild is quite long even giving that some of those dependencies may be inherited

Babel==1.3                      dev-python/Babel
blinker==1.3                    dev-python/blinker
click==6.6                      dev-python/click
extras==0.0.3                   dev-python/extras
fixtures==2.0.0                 dev-python/fixtures
Flask-Login==0.3.2              dev-python/flask-login
Flask-Mail==0.9.1               dev-python/flask-mail
Flask-Principal==0.4.0          dev-python/flask-principal
Flask-WTF==0.12                 dev-python/flask-wtf
html5lib==1.0b3                 dev-python/html5lib
itsdangerous==0.24              dev-python/itsdangerous
Jinja2==2.7.3                   dev-python/jinja
linecache2==1.0.0               dev-python/linecache2
MarkupSafe==0.23                dev-python/markupsafe
passlib==1.6.2                  dev-python/passlib
pbr==1.9.1                      dev-python/pbr
pyrsistent==0.11.13             dev-python/pyrsistent
python-mimeparse==1.5.1         dev-python/mimeparse
pytz==2014.10                   dev-python/pytz
simplejson==3.6.5               dev-python/simplejson
six==1.9.0                      dev-python/six
speaklater==1.3                 dev-python/speaklater
SQLAlchemy==1.0.14              dev-python/sqlalchemy
testscenarios==0.5.0            dev-python/testscenarios
testtools==2.0.0                dev-python/testtools
traceback2==1.4.0               dev-python/traceback2
unittest2==1.1.0                dev-python/unittest2
Werkzeug==0.9.6                 dev-python/werkzeug
WTForms==2.0.2                  dev-python/wtforms
sqlparse==0.1.19                dev-python/python-sqlparse
Comment 15 Chris Mayo 2017-02-13 19:51:48 UTC
Created attachment 463670 [details]
pgadmin4-1.2.ebuild

Updated to pgAdmin 4 v1.2.

It has changed from using django-htmlmin to flask-htmlmin (which needs htmlmin).
This also highlighted more work need on the dependencies: building the docs needed flask_htmlmin:
make[1]: Entering directory '/var/tmp/portage/dev-db/pgadmin4-1.2/work/pgadmin4-1.2/docs/en_US'
Generating code-snippet.rst for some of the important classes...
Traceback (most recent call last):
  File "build_code_snippet.py", line 14, in <module>
    from pgadmin.utils import PgAdminModule
  File "/var/tmp/portage/dev-db/pgadmin4-1.2/work/pgadmin4-1.2/web/pgadmin/__init__.py", line 19, in <module>
    from flask_htmlmin import HTMLMIN
ImportError: No module named 'flask_htmlmin'
make[1]: [Makefile.sphinx:21: code_snippet] Error 1 (ignored)
sphinx-build -b html -d _build/doctrees   . _build/html

So that may well be true of other dependencies.

Also some changes to the paths of and in the configuration file.


I haven't used the web application.
Comment 16 Chris Mayo 2017-02-13 19:52:10 UTC
Created attachment 463672 [details]
flask-htmlmin-1.2.ebuild
Comment 17 Chris Mayo 2017-02-13 19:52:26 UTC
Created attachment 463674 [details]
htmlmin-0.1.10.ebuild
Comment 18 Dmitry Grigoriev 2017-05-07 15:27:01 UTC
JFYI: After rebuilding my whole system with (currently soft-masked) gcc-6.3.0, pgadmin3 segfaults on start, right after showing splash screen. Sooner or later gcc6 goes stable, and pgadmin3 becomes completely outdated that very moment.
Comment 19 Jack 2017-05-26 23:21:29 UTC
pgAdmin4 1.5 has been released.
Comment 20 Aaron W. Swenson gentoo-dev 2017-05-28 11:19:15 UTC
I've updated the ebuild for 1.5 and added/bumped a couple missing packages in my overlay. You can find it in my overlay at:

https://github.com/titanofold/titanofold-gentoo-x86

Some differences from the original is that it is Qt5 and Python 3 only. This lets it be a little leaner.

Please give me feedback if it works for you.
Comment 21 Chris Mayo 2017-05-28 18:40:28 UTC
Looks good to me. One additional idea is to set UPGRADE_CHECK_ENABLED = False:
https://github.com/titanofold/titanofold-gentoo-x86/pull/8
Comment 22 Jack 2017-06-01 00:44:26 UTC
Titanfold: pgadmin4-1.5 depends on app-text/htmlmin, but dev-python/flask-htmlmin-1.2 depends on dev-python/htmlmin.  Is one of them a typo, or am I missing something?
Comment 23 Aaron W. Swenson gentoo-dev 2017-06-01 09:53:08 UTC
(In reply to Jack from comment #22)
> Titanfold: pgadmin4-1.5 depends on app-text/htmlmin, but
> dev-python/flask-htmlmin-1.2 depends on dev-python/htmlmin.  Is one of them
> a typo, or am I missing something?

You're missing something. I've modified the dependency in my overlay.
Comment 25 Jack 2017-06-01 22:16:14 UTC
(In reply to Comment 23)
> You're missing something. I've modified the dependency in my overlay.
Obviously.  I was trying to not add the overlay, but just copy ebuilds as necessary.  I gave up, added the overlay, and it works fine.  I do have some minor issues with the overlay, but those seem irrelevant to this bug.

It did catch me by surprise that the binary was pgadmin3 but is now pgAdmin4.  (new upper case A)  only found it because I tried to launch from command line.
Comment 26 Andreas Sturmlechner gentoo-dev 2017-08-15 08:36:47 UTC
*** Bug 627906 has been marked as a duplicate of this bug. ***
Comment 27 Jaak Ristioja 2017-09-09 21:49:00 UTC
Note also that dev-db/pgadmin3 does not support dev-db/postgresql:9.6 and later, so having pgadmin4 in tree would help.
Comment 28 Aaron W. Swenson gentoo-dev 2017-09-09 23:28:30 UTC
Thanks to everyone who contributed.

commit 3e9311e342cdff3eea9871e5f365dbfaf2edce87 (HEAD -> master, origin/master, origin/HEAD)
Author: Aaron W. Swenson <titanofold@gentoo.org>
Date:   Sat Sep 9 19:25:50 2017 -0400

    dev-db/pgadmin4: Initial Commit

    Thanks to Chris Mayo for getting this started.

    Gentoo-Bug: 595378

    Package-Manager: Portage-2.3.6, Repoman-2.3.1

commit 198b581706fcf2d17124edcba6406f5da3a39fb2
Author: Aaron W. Swenson <titanofold@gentoo.org>
Date:   Sat Sep 9 19:24:35 2017 -0400

    dev-python/flask-gravatar: Initial Commit

    Required by dev-db/pgadmin4.

    Thanks to Chris Mayo for getting this started.

    Gentoo-Bug: 595378

    Package-Manager: Portage-2.3.6, Repoman-2.3.1

commit 03af6b4977c71bec71261687abf7956ba0d7bde9
Author: Aaron W. Swenson <titanofold@gentoo.org>
Date:   Sat Sep 9 19:20:45 2017 -0400

    dev-python/flask-migrate: Version Bump

    Bump to 2.1.1 needed by dev-db/pgadmin4.

    Package-Manager: Portage-2.3.6, Repoman-2.3.1

commit 3a618afcbafa5b9643f056b9721496a4b2431dbf
Author: Aaron W. Swenson <titanofold@gentoo.org>
Date:   Sat Sep 9 18:57:05 2017 -0400

    dev-python/flask-htmlmin: Initial Commit

    Required by dev-db/pgadmin4.

    Thanks to Chris Mayo for getting this started.

    Gentoo-Bug: 595378

    Package-Manager: Portage-2.3.6, Repoman-2.3.1

commit 748888f240ed319b9b7b912a24ca7d0c348ce877
Author: Aaron W. Swenson <titanofold@gentoo.org>
Date:   Sat Sep 9 18:55:52 2017 -0400

    app-text/htmlmin: Initial Commit

    Required by dev-db/pgadmin4.

    Thanks to Chris Mayo for getting this started.

    Gentoo-Bug: 595378

    Package-Manager: Portage-2.3.6, Repoman-2.3.1