Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 459918

Summary: dev-db/pgmodeler - tool for modelling databases
Product: Gentoo Linux Reporter: warmcharm
Component: New packagesAssignee: Aaron W. Swenson <titanofold>
Status: RESOLVED FIXED    
Severity: enhancement CC: amlabs, bugs, bureau, golodhrim, linux0uid, mjo, pgsql-bugs, warmcharm
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/pgmodeler/pgmodeler
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 454132    
Bug Blocks:    
Attachments: pgmodeler-0.7.2_alpha1.ebuild
ebuild for 0.8.0
pgmodeler-0.8.0.ebuild with plugins
pgmodeler-0.8.0.ebuild with plugins and lang files
remane start-pgmodeler.sh to pgmodeler
Access Violation build.log
New version pgmodeler-0.8.2_beta
pgmodeler-0.9.0.ebuild

Description warmcharm 2013-03-01 20:49:21 UTC
PostgreSQL Database Modeler, or simply, pgModeler is an open source tool for modeling databases that merges the classical concepts of entity-relationship diagrams with specific features that only PostgreSQL implements. The pgModeler translates the models created by the user to SQL code and apply them onto database clusters from version 8.0 to 9.1.

It would be very nice to see it in portage tree. Thanks.
Comment 1 Vasilis Lourdas 2013-08-11 20:38:43 UTC
pgModeler is a very nice modeling tool for PostgreSQL, it would come real handy as a PostgreSQL tool. Right now, I have to use it inside a Windows vm, since there is no ebuild for it. The downside is that it's based on Qt 5.0.2 and I see that there's only Qt 5.1 in the qt overlay.

We can help in testing if someone takes the time to make an ebuild for it.

Thank you.
Comment 2 Michael Palimaka (kensington) gentoo-dev 2013-08-12 12:44:26 UTC
I had a look at writing an ebuild for this, but I don't know how to build against the slotted postgresql.
Comment 3 Vasilis Lourdas 2013-12-20 18:52:10 UTC
Version 0.6.2 was released today and the tar.gz packages includes all libraries the binary was built against. I downloaded it, modified LD_LIBRARY_PATH as needed, but when I try to start the pgmodeler binary, I get:

symbol lookup error: /usr/lib64/libxml2.so.2: undefined symbol: UCNV_TO_U_CALLBACK_STOP

Is there a chance to have a test ebuild? I mean, it needs work, since it requires Qt 5, but I'm willing to test if there's at least an ebuild.
Comment 4 hexum 2014-02-08 08:27:40 UTC
Binary packages has binary incompatibility with gentoo libxml2.
You should compile it manually.

Here project repository:
https://github.com/pgmodeler/pgmodeler

Here is link to source package of last stable release:
https://github.com/pgmodeler/pgmodeler/archive/v0.6.2.zip

Here is link to hot git branch:
git@github.com:pgmodeler/pgmodeler.git

Installation docs:
http://www.pgmodeler.com.br/wiki/doku.php?id=installation

To compile you need to satisfy dependencies:
layman -a qt
emerge @qt5-essentials @qt5-addons
emerge dev-qt/designer
emerge dev-db/postgresql-server
emerge dev-libs/libxml2

pkg-config used t find libraries.
We should export path to postgres *.pc files:
export PKG_CONFIG_PATH+=':/usr/lib/postgresql/pkgconfig/'

QT5 qmake path:
/usr/lib64/qt5/bin/qmake
use full path to it to run

qmake can take some parameters
/usr/lib64/qt5/bin/qmake pgmodeler.pro QMAKE_CXXFLAGS=[VALUE] BINDIR=[dir] \
LIBDIR=[dir] RESDIR=[dir]

BINDIR = Output dir for binaries (including libraries - by default)
LIBDIR = Output dir for libraries (overrides the BINDIR value for libraries)
RESDIR = Output dir for resource files (all files needed by pgModeler that are not binaries and libraries).
QMAKE_CXXFLAGS = Compiler optimization flags


I've compiled pgmodeler successfully and now I'm trying to write ebuild.
Comment 5 Michael Orlitzky gentoo-dev 2014-06-03 18:41:05 UTC
Created attachment 378188 [details]
pgmodeler-0.7.2_alpha1.ebuild

Here's what I came up with. It's a bit ugly, but pgmodeler is designed to be compiled and run by the user at the moment. I'll ping the qt team to see if we can't get this in the overlay, since it requires qt5.
Comment 6 Martin Scholz 2014-08-14 21:41:46 UTC
added qt and pgsql to the bug, and if help would be welcome, I would be glad to help upgrade to 0.7.2 stable and 0.8.* dev
Comment 7 Vasilis Lourdas 2015-05-16 15:43:29 UTC
I modified the proposed ebuild and I successfully compiled pgmodeler (I had to change a dependency in the ebuild for postgresql). However, at install time, I get sandbox errors, because I think that somewhere is hardcoded the /opt/pgmodeler path and emerge tries to create directories and files under /opt and it fails. I created them by myself, but running ebuild ... install does not do anything. After that running ebuild ... qmerge installs the binary under /usr/bin (as I think it should be). So, the compilation phase seems ok, but it needs work in the installation part.

I will attach my modified ebuild for 0.8.0. It would be nice if someone took care of this, I don't suppose it would need much work (although I could be wrong).

Thanks.
Comment 8 Vasilis Lourdas 2015-05-16 15:44:08 UTC
Created attachment 403394 [details]
ebuild for 0.8.0
Comment 9 Vasilis Lourdas 2015-10-07 18:45:14 UTC
Has anyone had the chance to take a look at this? I'm running the binary demo version for 0.8.1 and it seems to run fine, I remember earlier versions had crashes, but this version looks good, so I'd say the tool is maturing.
Comment 10 linux0uid 2016-01-23 21:27:53 UTC
I changed ebuild for 0.8.0.
It is now being built together with plugins.
I would make it better over time.
Comment 11 linux0uid 2016-01-23 21:40:18 UTC
Created attachment 423728 [details]
pgmodeler-0.8.0.ebuild with plugins

It would be nice if somebody would tested it.
Comment 12 linux0uid 2016-01-25 20:48:58 UTC
Created attachment 423886 [details]
pgmodeler-0.8.0.ebuild with plugins and lang files

I modified ebuild. Now we can build plugins and we have a Linguas.
Comment 13 linux0uid 2016-01-25 20:58:02 UTC
New ebuild for pgmodeler will be available here:
https://github.com/linux0uid/gentoo-overlay/tree/master/dev-db/pgmodeler

Maybe somebody want to add this ebuild to the portage tree?
Comment 14 Vasilis Lourdas 2016-01-26 18:55:43 UTC
(In reply to linux0uid from comment #13)
> New ebuild for pgmodeler will be available here:
> https://github.com/linux0uid/gentoo-overlay/tree/master/dev-db/pgmodeler

I opened an issue yesterday at github, can you please check it?
Comment 15 linux0uid 2016-01-27 06:24:58 UTC
Created attachment 423966 [details]
remane start-pgmodeler.sh to pgmodeler

remane start-pgmodeler.sh to pgmodeler
Now you can call pgmodeler from /usr/bin/pgmodeler as in 0.7.2
Comment 16 Aaron W. Swenson gentoo-dev 2016-02-25 11:47:53 UTC
Created attachment 426498 [details]
Access Violation build.log

Thank you for your work.

Unfortunately, using the latest ebuild (https://bugs.gentoo.org/attachment.cgi?id=423966) produces an access violation.
Comment 17 Michael Palimaka (kensington) gentoo-dev 2016-02-25 11:57:43 UTC
Try emake INSTALL_ROOT="${D}" install instead.
Comment 18 linux0uid 2016-03-20 10:05:52 UTC
Created attachment 428640 [details]
New version pgmodeler-0.8.2_beta

Upstream changed some config stuff in new version. I was wrote couple ebuilds and was published in my github but not here. Sorry for that.

I don't understand why You have this error. But I see this thing:
"mkdir: cannot create directory ‘/usr/local/share’: Permission denied"

If You have the SElinux enabled you must run the emerge from the root user, not from sudo.
Comment 19 Aaron W. Swenson gentoo-dev 2016-04-25 11:28:50 UTC
Well, the pgmodeler-0.8.2_beta.ebuild does build. However, I'm getting the following QA notices:

 * QA Notice: The following files contain insecure RUNPATHs
 *  Please file a bug about this at http://bugs.gentoo.org/
 *  with the maintaining herd of the package.
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/share/pgmodeler/plugins/dummy/libdummy.so
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/share/pgmodeler/plugins/xml2object/libxml2object.so
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/lib64/pgmodeler/libutils.so.1.0.0
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/lib64/pgmodeler/libparsers.so.1.0.0
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/lib64/pgmodeler/libpgmodeler.so.1.0.0
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/lib64/pgmodeler/libpgconnector.so.1.0.0
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/lib64/pgmodeler/libobjrenderer.so.1.0.0
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/lib64/pgmodeler/libpgmodeler_ui.so.1.0.0
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/bin/pgmodeler-ch
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/bin/pgmodeler-cli
 *   /var/tmp/portage/dev-db/pgmodeler-0.8.2_beta/image/usr/bin/pgmodeler-bin
Comment 20 Aaron W. Swenson gentoo-dev 2018-03-21 11:57:26 UTC
Created attachment 524642 [details]
pgmodeler-0.9.0.ebuild

I've worked on this a bit and am ready to introduce it into the tree.

A lot of the work done in the previous version is unnecessary now, and I no longer get the insecure RUNPATH warning.

This is also available in my repo:
https://github.com/titanofold/titanofold-gentoo-x86

I would appreciate someone else giving it a go.
Comment 21 Vasilis Lourdas 2018-03-24 16:46:12 UTC
(In reply to Aaron W. Swenson from comment #20)
> Created attachment 524642 [details]
> pgmodeler-0.9.0.ebuild
> 
> I've worked on this a bit and am ready to introduce it into the tree.
> 
> A lot of the work done in the previous version is unnecessary now, and I no
> longer get the insecure RUNPATH warning.
> 
> This is also available in my repo:
> https://github.com/titanofold/titanofold-gentoo-x86
> 
> I would appreciate someone else giving it a go.

I tried your ebuild, it built successfully, but upon starting the application displays a warning: "Unable to write the file or directory /usr/lib64/pgmodeler/plugins! Make sure the output directory exists, or if the user has write permissions over it!"

There are a few other warnings, but at the end it starts up and seems to work fine.
Comment 22 Aaron W. Swenson gentoo-dev 2018-03-25 15:28:25 UTC
(In reply to Vasilis Lourdas from comment #21)
> I tried your ebuild, it built successfully, but upon starting the
> application displays a warning: "Unable to write the file or directory
> /usr/lib64/pgmodeler/plugins! Make sure the output directory exists, or if
> the user has write permissions over it!"
> 
> There are a few other warnings, but at the end it starts up and seems to
> work fine.

Yeah, that is an upstream issue[1]. It wants write permissions to be given to a directory regular users should never have write permissions. I believe you can define the plugins directory, which other applications just create themselves in $HOME.

The other errors I've seen were one-offs that never repeated except for plugins.

[1]: https://github.com/pgmodeler/pgmodeler/issues/1035
Comment 23 Bastiaan Wakkie 2018-05-14 09:12:09 UTC
Tried emerging it today and got the following error:

Calculating dependencies... done!
[ebuild  N     ] dev-db/pgmodeler-0.9.0  POSTGRES_TARGETS="postgres10 postgres9_5 (-postgres9_2) -postgres9_3 -postgres9_4 -postgres9_6"

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-db/pgmodeler-0.9.0::bgo-overlay
!!! Fetched file: pgmodeler-0.9.0.tar.gz VERIFY FAILED!
!!! Reason: Insufficient data for checksum verification
!!! Got:
!!! Expected: BLAKE2B BLAKE2S MD5 RMD160 SHA1 SHA256 SHA512 WHIRLPOOL
 * Fetch failed for 'dev-db/pgmodeler-0.9.0', Log file:
  *  '/var/tmp/portage/portage/dev-db/pgmodeler-0.9.0/temp/build.log'

  >>> Failed to emerge dev-db/pgmodeler-0.9.0, Log file:

  >>>  '/var/tmp/portage/portage/dev-db/pgmodeler-0.9.0/temp/build.log'

(ps the build.log sais the same in case you are wondering)
Comment 24 Larry the Git Cow gentoo-dev 2018-05-20 20:03:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ef3ca1cf42dd97f22b6e7318d67b99f4f94aef9

commit 8ef3ca1cf42dd97f22b6e7318d67b99f4f94aef9
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2018-05-20 20:02:17 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2018-05-20 20:02:42 +0000

    dev-db/pgmodeler: Initial commit
    
    Thanks to Michael Orlitzky, Vasilis Lourdas, and linux0uid for their
    initial work on this ebuild.
    
    Closes: https://bugs.gentoo.org/459918
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-db/pgmodeler/Manifest               |  1 +
 dev-db/pgmodeler/metadata.xml           |  8 +++++
 dev-db/pgmodeler/pgmodeler-0.9.1.ebuild | 61 +++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+)
Comment 25 Bastiaan Wakkie 2018-05-22 12:22:35 UTC
I confirm that pgmodeler-0.9.1 compiles and works now.