public inbox for [email protected]  
help / color / mirror / Atom feed
Patch for pgAdmin4 RPM package
21+ messages / 3 participants
[nested] [flat]

* Patch for pgAdmin4 RPM package
@ 2016-04-22 10:57 Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-04-22 10:57 UTC (permalink / raw)
  To: pgadmin-hackers; Dave Page <[email protected]>; +Cc: Hamid Quddus <[email protected]>

Hi Team, Dave,

Attached herewith are two patches.

*pgadmin4-rpm.patch* - This is the main patch that includes scripts,
makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.

It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4 tpm
depends on web and the web rpm depends on the python packages. I have
commented the list of packages which are not available on some systems so
that Devrim can build them.

The installation path for pgadmin4 is "/usr/pgadmin4-<major>.<minor>" and
pgadmin4-web is the site-packages/pgadmin4-web

*pgadmin4-server-ini.patch* - This is the patch for runtime/Server.cpp. As
said pgadmin4-web and runtime installation directories are different and
that means web does not exists in parallel to runtime like in sources.

I observed that the location of application settings was not defined in
Server.cpp. As per QSettings doc, the default location on Unix is the
$HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on the user
that runs the application. So, I thought why not to define the application
settings in application directory itself. RPM then knows where to define
the ApplicationPath. I tested it and it worked fine with me. I haven't done
this change for platform dependent.

Another change that I did in this file is that, I observed that canonicalPath()
was not giving the absolute path (by removing the sym link and the
redundant ".." as per doc). Hence, I used absolutePath() for the paths[i]
that are relative (../web, etc) and not for the already absolute path (ex.
ApplicationPath like /usr/lib/python2.7/site-packages/pgadmin4-web).

Well, I'm not a developer and the patch is just an attempt to resolve the
issue related to packaging. Please feel free to change it as required for
better.

Thanks.

-- 
Sandeep Thakkar
Lead Software Engineer


Phone: +91.20.30589505

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] pgadmin4-rpm.patch (30.7K, 3-pgadmin4-rpm.patch)
  download | inline diff:
diff --git a/build-rpm.sh b/build-rpm.sh
new file mode 100755
index 0000000..8128507
--- /dev/null
+++ b/build-rpm.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+#Script to create the pgAdmin4 RPMs.
+
+#Color schemes
+red=`tput setaf 1`
+green=`tput setaf 2`
+blue=`tput setaf 4`
+reset=`tput sgr0`
+
+# Check whether lsb_release exists or not:
+if [ ! -f /usr/bin/lsb_release ]
+then
+        echo
+        echo "${red}ERROR:${reset} lsb_release command does not exist. Please install it with"
+        echo
+        echo "${blue}   yum -y install redhat-lsb-core"
+        echo
+        echo "${red}Exiting...${reset}"
+        echo
+        exit 1
+fi
+
+# Gather some information from the OS: OS name, version and arch:
+lsb_distro_name=`lsb_release -i -s`
+lsb_distro_version=`lsb_release -r -s`
+distro_arch=`uname -m`
+
+# We need the lowercase version of the distro name:
+lsb_distro_name=`echo $lsb_distro_name | awk '{print tolower($0)}'`
+
+if [ "$lsb_distro_name" = "centos" ]; then
+	lsb_distro_version=`echo $lsb_distro_version | cut -d"." -f1`
+	pkg_dir="EL-$lsb_distro_version"
+else
+	pkg_dir="F-$lsb_distro_version"
+fi
+
+# Find the pgAdmin4 version
+pgAdmin4_major=`awk '/APP_MAJOR =/ {print $3}' ./web/config.py`
+pgAdmin4_minor=`awk '/APP_MINOR =/ {print $3}' ./web/config.py`
+pgAdmin4_revision=`awk '/APP_REVISION =/ {print $3}' ./web/config.py`
+pgAdmin4_suffix=`awk '/APP_SUFFIX =/ {print $3}' ./web/config.py | sed "s/'//g"`
+
+# If suffix is defined
+if [ ! -z "$pgAdmin4_suffix" ]; then
+	pgAdmin4_suffix="${pgAdmin4_suffix}." #hyphen not allowed in SPEC for version
+fi
+
+# Is the OS version supported?
+if [ ! -d ./pkg/rpm/$pkg_dir ]; then
+	echo "./pkg/rpm/$pkg_dir does not exist"
+	exit 1
+fi
+
+cd ./pkg/rpm/$pkg_dir
+
+# Replace the placeholders in the spec
+sed -e "s/PGADMIN_MAJOR/$pgAdmin4_major/" \
+    -e "s/PGADMIN_MINOR/$pgAdmin4_minor/" \
+    -e "s/PGADMIN_REV/$pgAdmin4_revision/" \
+    -e "s/PGADMIN_SUFFIX/$pgAdmin4_suffix/" \
+    -e "s/DISTRO_ARCH/$distro_arch/" pgadmin4.spec.in > pgadmin4.spec
+
+make rpm
diff --git a/pkg/rpm/EL-6/Makefile b/pkg/rpm/EL-6/Makefile
new file mode 100644
index 0000000..8a31664
--- /dev/null
+++ b/pkg/rpm/EL-6/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel6
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/EL-6/pgadmin4.spec.in b/pkg/rpm/EL-6/pgadmin4.spec.in
new file mode 100644
index 0000000..f41e373
--- /dev/null
+++ b/pkg/rpm/EL-6/pgadmin4.spec.in
@@ -0,0 +1,175 @@
+
+%define pgadmin4_major PGADMIN_MAJOR
+%define pgadmin4_minor PGADMIN_MINOR
+%define pgadmin4_revision PGADMIN_REV
+
+%define name pgadmin4
+%define pgadmin4instdir /usr/%{name}-%{pgadmin4_major}.%{pgadmin4_minor}
+
+Name:           %{name}
+Version:        %{pgadmin4_major}.%{pgadmin4_minor}.%{pgadmin4_revision}
+Release:        PGADMIN_SUFFIX1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        pgadmin4-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package        -n pgadmin4-web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+#%if 0%{?fedora} >= 23
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    -n pgadmin4-web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../web
+sed -e 's/SERVER_MODE = True/SERVER_MODE = False/' config.py > config_local.py
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+
+%install
+rm -rf %{buildroot}
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+echo "
+[General]
+ApplicationPath=%{PYTHON_SITELIB}/pgadmin4-web
+PythonPath=
+" > %{buildroot}%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%files -n pgadmin4-web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/pgadmin4-web
+%doc
+
+%changelog
+* Fri Apr 22 2016 Sandeep Thakkar <[email protected]> 1.0.0-1
+- Initial version
+
diff --git a/pkg/rpm/EL-7/Makefile b/pkg/rpm/EL-7/Makefile
new file mode 100644
index 0000000..1eb0ea0
--- /dev/null
+++ b/pkg/rpm/EL-7/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel7
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/EL-7/pgadmin4.spec.in b/pkg/rpm/EL-7/pgadmin4.spec.in
new file mode 100644
index 0000000..f41e373
--- /dev/null
+++ b/pkg/rpm/EL-7/pgadmin4.spec.in
@@ -0,0 +1,175 @@
+
+%define pgadmin4_major PGADMIN_MAJOR
+%define pgadmin4_minor PGADMIN_MINOR
+%define pgadmin4_revision PGADMIN_REV
+
+%define name pgadmin4
+%define pgadmin4instdir /usr/%{name}-%{pgadmin4_major}.%{pgadmin4_minor}
+
+Name:           %{name}
+Version:        %{pgadmin4_major}.%{pgadmin4_minor}.%{pgadmin4_revision}
+Release:        PGADMIN_SUFFIX1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        pgadmin4-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package        -n pgadmin4-web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+#%if 0%{?fedora} >= 23
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    -n pgadmin4-web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../web
+sed -e 's/SERVER_MODE = True/SERVER_MODE = False/' config.py > config_local.py
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+
+%install
+rm -rf %{buildroot}
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+echo "
+[General]
+ApplicationPath=%{PYTHON_SITELIB}/pgadmin4-web
+PythonPath=
+" > %{buildroot}%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%files -n pgadmin4-web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/pgadmin4-web
+%doc
+
+%changelog
+* Fri Apr 22 2016 Sandeep Thakkar <[email protected]> 1.0.0-1
+- Initial version
+
diff --git a/pkg/rpm/F-22/Makefile b/pkg/rpm/F-22/Makefile
new file mode 100644
index 0000000..d6ed841
--- /dev/null
+++ b/pkg/rpm/F-22/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f22
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/F-22/pgadmin4.spec.in b/pkg/rpm/F-22/pgadmin4.spec.in
new file mode 100644
index 0000000..f41e373
--- /dev/null
+++ b/pkg/rpm/F-22/pgadmin4.spec.in
@@ -0,0 +1,175 @@
+
+%define pgadmin4_major PGADMIN_MAJOR
+%define pgadmin4_minor PGADMIN_MINOR
+%define pgadmin4_revision PGADMIN_REV
+
+%define name pgadmin4
+%define pgadmin4instdir /usr/%{name}-%{pgadmin4_major}.%{pgadmin4_minor}
+
+Name:           %{name}
+Version:        %{pgadmin4_major}.%{pgadmin4_minor}.%{pgadmin4_revision}
+Release:        PGADMIN_SUFFIX1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        pgadmin4-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package        -n pgadmin4-web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+#%if 0%{?fedora} >= 23
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    -n pgadmin4-web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../web
+sed -e 's/SERVER_MODE = True/SERVER_MODE = False/' config.py > config_local.py
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+
+%install
+rm -rf %{buildroot}
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+echo "
+[General]
+ApplicationPath=%{PYTHON_SITELIB}/pgadmin4-web
+PythonPath=
+" > %{buildroot}%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%files -n pgadmin4-web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/pgadmin4-web
+%doc
+
+%changelog
+* Fri Apr 22 2016 Sandeep Thakkar <[email protected]> 1.0.0-1
+- Initial version
+
diff --git a/pkg/rpm/F-23/Makefile b/pkg/rpm/F-23/Makefile
new file mode 100644
index 0000000..9316c99
--- /dev/null
+++ b/pkg/rpm/F-23/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f23
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/F-23/pgadmin4.spec.in b/pkg/rpm/F-23/pgadmin4.spec.in
new file mode 100644
index 0000000..f41e373
--- /dev/null
+++ b/pkg/rpm/F-23/pgadmin4.spec.in
@@ -0,0 +1,175 @@
+
+%define pgadmin4_major PGADMIN_MAJOR
+%define pgadmin4_minor PGADMIN_MINOR
+%define pgadmin4_revision PGADMIN_REV
+
+%define name pgadmin4
+%define pgadmin4instdir /usr/%{name}-%{pgadmin4_major}.%{pgadmin4_minor}
+
+Name:           %{name}
+Version:        %{pgadmin4_major}.%{pgadmin4_minor}.%{pgadmin4_revision}
+Release:        PGADMIN_SUFFIX1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        pgadmin4-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package        -n pgadmin4-web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+#%if 0%{?fedora} >= 23
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    -n pgadmin4-web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../web
+sed -e 's/SERVER_MODE = True/SERVER_MODE = False/' config.py > config_local.py
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+
+%install
+rm -rf %{buildroot}
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+echo "
+[General]
+ApplicationPath=%{PYTHON_SITELIB}/pgadmin4-web
+PythonPath=
+" > %{buildroot}%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%files -n pgadmin4-web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/pgadmin4-web
+%doc
+
+%changelog
+* Fri Apr 22 2016 Sandeep Thakkar <[email protected]> 1.0.0-1
+- Initial version
+
diff --git a/pkg/rpm/F-24/Makefile b/pkg/rpm/F-24/Makefile
new file mode 100644
index 0000000..f48f68d
--- /dev/null
+++ b/pkg/rpm/F-24/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f24
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/F-24/pgadmin4.spec.in b/pkg/rpm/F-24/pgadmin4.spec.in
new file mode 100644
index 0000000..f41e373
--- /dev/null
+++ b/pkg/rpm/F-24/pgadmin4.spec.in
@@ -0,0 +1,175 @@
+
+%define pgadmin4_major PGADMIN_MAJOR
+%define pgadmin4_minor PGADMIN_MINOR
+%define pgadmin4_revision PGADMIN_REV
+
+%define name pgadmin4
+%define pgadmin4instdir /usr/%{name}-%{pgadmin4_major}.%{pgadmin4_minor}
+
+Name:           %{name}
+Version:        %{pgadmin4_major}.%{pgadmin4_minor}.%{pgadmin4_revision}
+Release:        PGADMIN_SUFFIX1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        pgadmin4-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package        -n pgadmin4-web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+#%if 0%{?fedora} >= 23
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    -n pgadmin4-web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../web
+sed -e 's/SERVER_MODE = True/SERVER_MODE = False/' config.py > config_local.py
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+
+%install
+rm -rf %{buildroot}
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/pgadmin4-web
+echo "
+[General]
+ApplicationPath=%{PYTHON_SITELIB}/pgadmin4-web
+PythonPath=
+" > %{buildroot}%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+%{pgadmin4instdir}/runtime/pgadmin4.ini
+
+%files -n pgadmin4-web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/pgadmin4-web
+%doc
+
+%changelog
+* Fri Apr 22 2016 Sandeep Thakkar <[email protected]> 1.0.0-1
+- Initial version
+
diff --git a/pkg/rpm/README b/pkg/rpm/README
new file mode 100644
index 0000000..8f332b8
--- /dev/null
+++ b/pkg/rpm/README
@@ -0,0 +1,5 @@
+# Instructions on how to build RPMs for pgadmin4
+
+Go to pgAdmin4 root directory and run build-rpm.sh. This will compile
+the sources and create the RPMS for your OS in pkg/rpm/EL-6|EL-7|F-22|F-23 
+for web and runtime.
diff --git a/pkg/rpm/common/Makefile.global b/pkg/rpm/common/Makefile.global
new file mode 100644
index 0000000..3f9e9b2
--- /dev/null
+++ b/pkg/rpm/common/Makefile.global
@@ -0,0 +1,21 @@
+
+prep:
+	# Update spec file, patches, etc, before running spectool:
+	git pull
+	# Use spectool to download source files, especially tarballs.
+	spectool -g -S $(SPECFILE)
+
+allclean:
+	git clean -df
+
+clean:
+	rm -rf i386/ i586/ i686/ x86_64/ noarch/
+	rm -f *.src.rpm
+	rm -f *.tar *.tar.gz *.tar.bz2 *.tgz *.zip .xz
+
+rpm: prep
+	rpmbuild --define "_sourcedir $(PWD)" \
+	--define "_specdir $(PWD)" \
+	--define  "_builddir $(PWD)" \
+	--define "_rpmdir $(PWD)" \
+	--define "dist $(DIST)" -bb $(SPECFILE)


  [application/octet-stream] pgadmin4-server-ini.patch (983B, 4-pgadmin4-server-ini.patch)
  download | inline diff:
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index 7730184..e7964a7 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -79,7 +79,8 @@ Server::~Server()
 
 bool Server::Init()
 {
-    QSettings settings;
+    //QSettings settings;
+    QSettings settings(QCoreApplication::applicationDirPath() + "/pgadmin4.ini", QSettings::IniFormat);
 
     // Find the webapp
     QStringList paths;
@@ -92,7 +93,15 @@ bool Server::Init()
     for (int i = 0; i < paths.size(); ++i)
     {
         QDir dir(QCoreApplication::applicationDirPath() + "/" + paths[i]);
-        m_appfile = dir.canonicalPath() + "/pgAdmin4.py";
+	QFileInfo info(paths[i]);
+	if (info.isRelative()) {
+            //m_appfile = dir.canonicalPath() + "/pgAdmin4.py";
+            m_appfile = dir.absolutePath() + "/pgAdmin4.py";
+	}
+	else {
+            m_appfile = paths[i] + "/pgAdmin4.py";
+	}
+        //qDebug() << "Webapp path: " << m_appfile;
 
         if (QFile::exists(m_appfile))
         {


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-05-09 13:05 ` Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Page @ 2016-05-09 13:05 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>

Hi

Initial eyeball review comments below...

On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar <
[email protected]> wrote:

> Hi Team, Dave,
>
> Attached herewith are two patches.
>
> *pgadmin4-rpm.patch* - This is the main patch that includes scripts,
> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
>

Can we keep the directory names in lower case?


> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4 tpm
> depends on web and the web rpm depends on the python packages. I have
> commented the list of packages which are not available on some systems so
> that Devrim can build them.
>
> The installation path for pgadmin4 is "/usr/pgadmin4-<major>.<minor>" and
> pgadmin4-web is the site-packages/pgadmin4-web
>
Shouldn't the -web package also have the major.minor version number in the
path, to allow side-by-side installation?

> *pgadmin4-server-ini.patch* - This is the patch for runtime/Server.cpp.
> As said pgadmin4-web and runtime installation directories are different and
> that means web does not exists in parallel to runtime like in sources.
>
> I observed that the location of application settings was not defined in
> Server.cpp. As per QSettings doc, the default location on Unix is the
> $HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on the user
> that runs the application. So, I thought why not to define the application
> settings in application directory itself. RPM then knows where to define
> the ApplicationPath. I tested it and it worked fine with me. I haven't done
> this change for platform dependent.
>
Doesn't that prevent non-root users from changing the settings? Or (if you
widen the permissions on the ini file), allow one user to mis-configure the
app for others? I think what is needed here is a search path change, much
like you added for the Mac app bundle.

Other thoughts:

- Please rename the README to README.txt

- The code to build the RPMs should be entirely confined to pkg/rpm. A
Makefile target should be added to /Makefile to build/clean the targets
(this mistake was made with the Mac package too, but was one of the
original requirements).

Please resolve these issues and I'll take another look.

Thanks.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-05-27 12:55   ` Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-05-27 12:55 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>

On Mon, May 9, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:

> Hi
>
> Initial eyeball review comments below...
>
> On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> Hi Team, Dave,
>>
>> Attached herewith are two patches.
>>
>> *pgadmin4-rpm.patch* - This is the main patch that includes scripts,
>> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
>>
>
> Can we keep the directory names in lower case?
>
>
Sure. Will do that.

> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4 tpm
>> depends on web and the web rpm depends on the python packages. I have
>> commented the list of packages which are not available on some systems so
>> that Devrim can build them.
>>
>> The installation path for pgadmin4 is "/usr/pgadmin4-<major>.<minor>" and
>> pgadmin4-web is the site-packages/pgadmin4-web
>>
> Shouldn't the -web package also have the major.minor version number in the
> path, to allow side-by-side installation?
>
Right. Now that we don't have major/minor, so, will it be /usr/pgadmin4-v1
and pgadmin4-web-v1 ? Or?

>
>
*pgadmin4-server-ini.patch* - This is the patch for runtime/Server.cpp. As
>> said pgadmin4-web and runtime installation directories are different and
>> that means web does not exists in parallel to runtime like in sources.
>>
>> I observed that the location of application settings was not defined in
>> Server.cpp. As per QSettings doc, the default location on Unix is the
>> $HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on the user
>> that runs the application. So, I thought why not to define the application
>> settings in application directory itself. RPM then knows where to define
>> the ApplicationPath. I tested it and it worked fine with me. I haven't done
>> this change for platform dependent.
>>
> Doesn't that prevent non-root users from changing the settings? Or (if you
> widen the permissions on the ini file), allow one user to mis-configure the
> app for others? I think what is needed here is a search path change, much
> like you added for the Mac app bundle.
>
> Right. Will use python command to find the site-packages path and then
concatenate pgadmin4-web directory name.

> Other thoughts:
>
> - Please rename the README to README.txt
>
> - The code to build the RPMs should be entirely confined to pkg/rpm. A
> Makefile target should be added to /Makefile to build/clean the targets
> (this mistake was made with the Mac package too, but was one of the
> original requirements).
>
> Please resolve these issues and I'll take another look.
>
> Sure. Will share it with you soon.


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



-- 
Sandeep Thakkar


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-05-27 13:05     ` Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Page @ 2016-05-27 13:05 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

[Adding Devrim]

On Fri, May 27, 2016 at 1:55 PM, Sandeep Thakkar
<[email protected]> wrote:
>
>
> On Mon, May 9, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:
>>
>> Hi
>>
>> Initial eyeball review comments below...
>>
>> On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar
>> <[email protected]> wrote:
>>>
>>> Hi Team, Dave,
>>>
>>> Attached herewith are two patches.
>>>
>>> pgadmin4-rpm.patch - This is the main patch that includes scripts,
>>> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
>>
>>
>> Can we keep the directory names in lower case?
>>
>
> Sure. Will do that.
>>>
>>> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4 tpm
>>> depends on web and the web rpm depends on the python packages. I have
>>> commented the list of packages which are not available on some systems so
>>> that Devrim can build them.
>>>
>>> The installation path for pgadmin4 is "/usr/pgadmin4-<major>.<minor>" and
>>> pgadmin4-web is the site-packages/pgadmin4-web
>>
>> Shouldn't the -web package also have the major.minor version number in the
>> path, to allow side-by-side installation?
>
> Right. Now that we don't have major/minor, so, will it be /usr/pgadmin4-v1
> and pgadmin4-web-v1 ? Or?

I think that's fine.

>>
>>
>>>
>>> pgadmin4-server-ini.patch - This is the patch for runtime/Server.cpp. As
>>> said pgadmin4-web and runtime installation directories are different and
>>> that means web does not exists in parallel to runtime like in sources.
>>>
>>> I observed that the location of application settings was not defined in
>>> Server.cpp. As per QSettings doc, the default location on Unix is the
>>> $HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on the user
>>> that runs the application. So, I thought why not to define the application
>>> settings in application directory itself. RPM then knows where to define the
>>> ApplicationPath. I tested it and it worked fine with me. I haven't done this
>>> change for platform dependent.
>>
>> Doesn't that prevent non-root users from changing the settings? Or (if you
>> widen the permissions on the ini file), allow one user to mis-configure the
>> app for others? I think what is needed here is a search path change, much
>> like you added for the Mac app bundle.
>>
> Right. Will use python command to find the site-packages path and then
> concatenate pgadmin4-web directory name.

OK.

>> Other thoughts:
>>
>> - Please rename the README to README.txt
>>
>> - The code to build the RPMs should be entirely confined to pkg/rpm. A
>> Makefile target should be added to /Makefile to build/clean the targets
>> (this mistake was made with the Mac package too, but was one of the original
>> requirements).
>>
>> Please resolve these issues and I'll take another look.
>>
> Sure. Will share it with you soon.

-> Devrim please :-)

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-06-01 09:27       ` Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-01 09:27 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi Devrim,

I have attached the patch for review. Please note that right now I have
commented the python dependencies (in Requires) which you are building.
Please review and let me know if specfile or anything else needs some
changes. Once the rpms are built, please let me know how to install them so
that I will enable those dependencies and do the testing.

Hi Dave,

The rpm will be built in $SRC/rpm-build. Inside this, we have the
directories for sources (where tarball will be downloaded - for testing, I
have mentioned the path of Bugatti :) ), build, etc.

The html docs was not building and I had to make changes in docs/conf.py
and install sphinx_rtd_theme. I have added this dependency and the Sphinx
in the specfile. May be should add it in the requirements also? I tested
this change on OS X and make docs is building fine.

Since web package is installed in the default python site-packages as
pgadmin4-web-v1 (for release "1"), with the help of Neel, I could made
changes in Server.cpp to find that location. But, couldn't understand how
to get the app release info, hence right now hard-coded the string as
'pgadmin4-web-v1".

Note: In the patch, the Makefile and .gitignore also contains the mac
related changes. This is just to see how they will look finally after mac
and rpm changes are done. I will remove them from the rpm patch once the
mac appbundle patch is committed.

Questions:
1. Should we add 'docs' dependency target for 'rpm' like we did for
appbundle?
2. Should web rpm require doc rpm? I guess so, otherwise online help won't
work. Right?

On Fri, May 27, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:

> [Adding Devrim]
>
> On Fri, May 27, 2016 at 1:55 PM, Sandeep Thakkar
> <[email protected]> wrote:
> >
> >
> > On Mon, May 9, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:
> >>
> >> Hi
> >>
> >> Initial eyeball review comments below...
> >>
> >> On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar
> >> <[email protected]> wrote:
> >>>
> >>> Hi Team, Dave,
> >>>
> >>> Attached herewith are two patches.
> >>>
> >>> pgadmin4-rpm.patch - This is the main patch that includes scripts,
> >>> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
> >>
> >>
> >> Can we keep the directory names in lower case?
> >>
> >
> > Sure. Will do that.
> >>>
> >>> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4
> tpm
> >>> depends on web and the web rpm depends on the python packages. I have
> >>> commented the list of packages which are not available on some systems
> so
> >>> that Devrim can build them.
> >>>
> >>> The installation path for pgadmin4 is "/usr/pgadmin4-<major>.<minor>"
> and
> >>> pgadmin4-web is the site-packages/pgadmin4-web
> >>
> >> Shouldn't the -web package also have the major.minor version number in
> the
> >> path, to allow side-by-side installation?
> >
> > Right. Now that we don't have major/minor, so, will it be
> /usr/pgadmin4-v1
> > and pgadmin4-web-v1 ? Or?
>
> I think that's fine.
>
> >>
> >>
> >>>
> >>> pgadmin4-server-ini.patch - This is the patch for runtime/Server.cpp.
> As
> >>> said pgadmin4-web and runtime installation directories are different
> and
> >>> that means web does not exists in parallel to runtime like in sources.
> >>>
> >>> I observed that the location of application settings was not defined in
> >>> Server.cpp. As per QSettings doc, the default location on Unix is the
> >>> $HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on the
> user
> >>> that runs the application. So, I thought why not to define the
> application
> >>> settings in application directory itself. RPM then knows where to
> define the
> >>> ApplicationPath. I tested it and it worked fine with me. I haven't
> done this
> >>> change for platform dependent.
> >>
> >> Doesn't that prevent non-root users from changing the settings? Or (if
> you
> >> widen the permissions on the ini file), allow one user to mis-configure
> the
> >> app for others? I think what is needed here is a search path change,
> much
> >> like you added for the Mac app bundle.
> >>
> > Right. Will use python command to find the site-packages path and then
> > concatenate pgadmin4-web directory name.
>
> OK.
>
> >> Other thoughts:
> >>
> >> - Please rename the README to README.txt
> >>
> >> - The code to build the RPMs should be entirely confined to pkg/rpm. A
> >> Makefile target should be added to /Makefile to build/clean the targets
> >> (this mistake was made with the Mac package too, but was one of the
> original
> >> requirements).
> >>
> >> Please resolve these issues and I'll take another look.
> >>
> > Sure. Will share it with you soon.
>
> -> Devrim please :-)
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Sandeep Thakkar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] pgadmin-rpm-jun01.patch (40.7K, 3-pgadmin-rpm-jun01.patch)
  download | inline diff:
diff --git a/.gitignore b/.gitignore
index 5d84dd2..c11f83d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,6 @@ pgadmin4.log
 /pgadmin4.egg-info
 /MANIFEST.in
 /build
+/mac-build
+/rpm-build
 /dist
diff --git a/Makefile b/Makefile
index adae41c..5a10678 100644
--- a/Makefile
+++ b/Makefile
@@ -13,9 +13,9 @@ SHELL = /bin/sh
 # High-level targets
 #########################################################################
 
-all: install-pip-requirements pip
+all: docs install-pip-requirements pip appbundle rpm
 
-clean: clean-pip
+clean: clean-pip clean-docs clean-appbundle clean-rpm
 
 #########################################################################
 # Python PIP package
@@ -34,6 +34,8 @@ PIP_CHECK_CMD = which pip &> /dev/null && pip show pip | grep Metadata-Version 2
 PGADMIN_SRC_DIR = pgadmin4
 PGADMIN_EGG = ${PGADMIN_SRC_DIR}.egg-info
 PGADMIN_BUILD = build
+PGADMIN_MACBUILD = mac-build
+PGADMIN_RPMBUILD = rpm-build
 PGADMIN_DIST = dist
 PGADMIN_MANIFEST = MANIFEST.in
 PGADMIN_INSTALL_CMD = pip install --use-wheel --find-links=${PGADMIN_DIST} ${PGADMIN_SRC_DIR}
@@ -83,9 +85,32 @@ endif
 install-pip:
 	${PGADMIN_INSTALL_CMD}
 
+appbundle: docs
+	./pkg/mac/build.sh
+
+docs:
+	LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx html
+
+clean-docs:
+	LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx clean
+
 clean-pip:
 	rm -rf ${PGADMIN_SRC_DIR}
 	rm -rf ${PGADMIN_EGG}
 	rm -rf ${PGADMIN_BUILD}
 	rm -rf ${PGADMIN_DIST}
 	rm -f ${PGADMIN_MANIFEST}
+
+clean-appbundle:
+	rm -rf ${PGADMIN_MACBUILD}
+	rm -rf ${PGADMIN_DIST}/pgadmin4*.dmg*
+
+rpm:
+	./pkg/rpm/build.sh
+
+clean-rpm:
+	rm -rf ${PGADMIN_RPMBUILD}
+	rm -rf ${PGADMIN_DIST}/noarch
+	rm -rf ${PGADMIN_DIST}/x86_64
+
+.PHONY: docs
diff --git a/docs/en_US/conf.py b/docs/en_US/conf.py
index 93ad4e9..ac7c9fc 100644
--- a/docs/en_US/conf.py
+++ b/docs/en_US/conf.py
@@ -17,6 +17,7 @@ import sys, os
 root = os.path.dirname(os.path.realpath(__file__))
 sys.path.insert(0, root + '/../../web/')
 import config
+import sphinx_rtd_theme
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -104,7 +105,7 @@ html_theme = 'sphinx_rtd_theme'
 #html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
diff --git a/pkg/rpm/README.txt b/pkg/rpm/README.txt
new file mode 100644
index 0000000..9bbd25e
--- /dev/null
+++ b/pkg/rpm/README.txt
@@ -0,0 +1,30 @@
+Installing pgAdmin
+==================
+
+This document describes how to build pgAdmin on Linux and generate the RPMs.
+
+Supported Versions:
+
+ - RHEL6 or above, Fedora 22 or above
+
+Required Packages:
+
+ - All the required packages are mentioned in the requirements file. They should be
+installed with yum/dnf. On RHEL, some python modules are available only through EPEL.
+
+1. Python devel
+  - Python 2.6 or above
+
+2. Sphinx (to build docs)
+
+3. QT devel
+  - Qt 4.6 or above, QT 5
+
+4. PostgreSQL installation
+  - PostgreSQL 9.1 or above 
+ 
+
+Building:
+
+To build, go to pgAdmin4 source root directory and execute "make rpm". This will
+create the RPMs for runtime, web and doc in $SRC/dist
diff --git a/pkg/rpm/build.sh b/pkg/rpm/build.sh
new file mode 100755
index 0000000..a6ebd81
--- /dev/null
+++ b/pkg/rpm/build.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+#Script to create the pgAdmin4 RPMs.
+
+# Check whether lsb_release exists to find the OS information
+if [ ! -f /usr/bin/lsb_release ]
+then
+        echo
+        echo "ERROR: lsb_release command does not exist. Please install it with"
+        echo
+        echo "yum -y install redhat-lsb-core"
+        echo
+        echo "Exiting..."
+        echo
+        exit 1
+fi
+
+# Check if spectool exists to download the sources
+if [ ! -f /usr/bin/spectool ]
+then
+        echo
+        echo "ERROR: spectool command does not exist. Please install it with"
+        echo
+        echo "yum -y install rpmdevtools"
+        echo
+        echo "Exiting..."
+        echo
+        exit 1
+fi
+
+# Gather some information from the OS: OS name, version and arch:
+LSB_DISTRO_NAME=`lsb_release -i -s`
+LSB_DISTRO_VERSION=`lsb_release -r -s`
+DISTRO_ARCH=`uname -m`
+
+# We need the lowercase version of the distro name:
+LSB_DISTRO_NAME=`echo $LSB_DISTRO_NAME | awk '{print tolower($0)}'`
+
+if [ "$LSB_DISTRO_NAME" = "centos" ]; then
+	LSB_DISTRO_VERSION=`echo $LSB_DISTRO_VERSION | cut -d"." -f1`
+	PKG_DIR="el-$LSB_DISTRO_VERSION"
+else
+	PKG_DIR="f-$LSB_DISTRO_VERSION"
+fi
+
+# Variables
+export TOPDIR=$(cd `dirname $0` && pwd)/../..
+export RPMBUILDROOT=$TOPDIR/rpm-build
+export SOURCEDIR=$RPMBUILDROOT/sources
+export BUILDDIR=$RPMBUILDROOT/build
+export BUILDROOT=$RPMBUILDROOT/buildroot
+export DISTROOT=$TOPDIR/dist
+
+# Create the directories if not exist
+mkdir -p $SOURCEDIR
+mkdir -p $BUILDDIR
+mkdir -p $BUILDROOT
+mkdir -p $DISTROOT
+
+# Find the pgAdmin4 app name and version from config.py
+export APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g"`
+# We want app name in lower case with no spaces
+export APP_NAME=`echo $APP_NAME | sed 's/ //g' | awk '{print tolower($0)}'`
+export APP_LONG_VERSION=$APP_RELEASE.$APP_REVISION
+export APP_SHORT_VERSION=`echo $APP_LONG_VERSION | cut -d . -f1,2`
+export APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
+if [ ! -z $APP_SUFFIX ]; then
+    export APP_LONG_VERSION=$APP_LONG_VERSION-$APP_SUFFIX
+    export APP_REVISION="${APP_REVISION}_$APP_SUFFIX" #hyphen not allowed in SPEC for version
+fi
+
+# Generate SPEC
+cd ./pkg/rpm/$PKG_DIR
+
+sed -e "s/APP_REL/$APP_RELEASE/" \
+    -e "s/APP_REV/$APP_REVISION/" \
+    -e "s/APP_NAME/$APP_NAME/" \
+    -e "s/DISTRO_ARCH/$DISTRO_ARCH/" pgadmin4.spec.in > pgadmin4.spec
+
+# Build RPMs
+make rpm || exit 1
+
+# Clean up buildroot after successful build
+echo "Cleaning up..."
+rm -rf $RPMBUILDROOT
+
diff --git a/pkg/rpm/common/Makefile.global b/pkg/rpm/common/Makefile.global
new file mode 100644
index 0000000..31a6c4c
--- /dev/null
+++ b/pkg/rpm/common/Makefile.global
@@ -0,0 +1,22 @@
+
+prep:
+	# Update spec file, patches, etc, before running spectool:
+	git pull
+	# Use spectool to download source files, especially tarballs.
+	spectool -g -S $(SPECFILE) -C $(SOURCEDIR)
+
+allclean:
+	git clean -df
+
+clean:
+	rm -rf i386/ i586/ i686/ x86_64/ noarch/
+	rm -f *.src.rpm
+	rm -f *.tar *.tar.gz *.tar.bz2 *.tgz *.zip .xz
+
+rpm: prep
+	rpmbuild --define "_sourcedir $(SOURCEDIR)" \
+	--define "_specdir $(PWD)" \
+	--define  "_builddir $(BUILDDIR)" \
+	--define "_rpmdir $(DISTROOT)" \
+	--define "_buildrootdir $(BUILDROOT)" \
+	--define "dist $(DIST)" -bb $(SPECFILE)
diff --git a/pkg/rpm/el-6/Makefile b/pkg/rpm/el-6/Makefile
new file mode 100644
index 0000000..8a31664
--- /dev/null
+++ b/pkg/rpm/el-6/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel6
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/el-6/pgadmin4.spec.in b/pkg/rpm/el-6/pgadmin4.spec.in
new file mode 100644
index 0000000..f9278d0
--- /dev/null
+++ b/pkg/rpm/el-6/pgadmin4.spec.in
@@ -0,0 +1,199 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '${_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
diff --git a/pkg/rpm/el-7/Makefile b/pkg/rpm/el-7/Makefile
new file mode 100644
index 0000000..1eb0ea0
--- /dev/null
+++ b/pkg/rpm/el-7/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel7
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/el-7/pgadmin4.spec.in b/pkg/rpm/el-7/pgadmin4.spec.in
new file mode 100644
index 0000000..f9278d0
--- /dev/null
+++ b/pkg/rpm/el-7/pgadmin4.spec.in
@@ -0,0 +1,199 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '${_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
diff --git a/pkg/rpm/f-22/Makefile b/pkg/rpm/f-22/Makefile
new file mode 100644
index 0000000..d6ed841
--- /dev/null
+++ b/pkg/rpm/f-22/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f22
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-22/pgadmin4.spec.in b/pkg/rpm/f-22/pgadmin4.spec.in
new file mode 100644
index 0000000..f9278d0
--- /dev/null
+++ b/pkg/rpm/f-22/pgadmin4.spec.in
@@ -0,0 +1,199 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '${_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
diff --git a/pkg/rpm/f-23/Makefile b/pkg/rpm/f-23/Makefile
new file mode 100644
index 0000000..9316c99
--- /dev/null
+++ b/pkg/rpm/f-23/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f23
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-23/pgadmin4.spec.in b/pkg/rpm/f-23/pgadmin4.spec.in
new file mode 100644
index 0000000..f9278d0
--- /dev/null
+++ b/pkg/rpm/f-23/pgadmin4.spec.in
@@ -0,0 +1,199 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '${_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
diff --git a/pkg/rpm/f-24/Makefile b/pkg/rpm/f-24/Makefile
new file mode 100644
index 0000000..f48f68d
--- /dev/null
+++ b/pkg/rpm/f-24/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f24
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-24/pgadmin4.spec.in b/pkg/rpm/f-24/pgadmin4.spec.in
new file mode 100644
index 0000000..f9278d0
--- /dev/null
+++ b/pkg/rpm/f-24/pgadmin4.spec.in
@@ -0,0 +1,199 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-argparse
+#Requires:  python-importlib
+#Requires:  python-wsgiref
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '${_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index 8691224..d095d93 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -23,7 +23,7 @@
 #include "Server.h"
 
 Server::Server(quint16 port)
-{    
+{
     // Appserver port
     m_port = port;
     m_wcAppName = NULL;
@@ -47,6 +47,18 @@ Server::Server(quint16 port)
     // Setup the search path
     QSettings settings;
     QString python_path = settings.value("PythonPath").toString();
+#ifdef Q_OS_MAC
+    QString app_dir = qApp->applicationDirPath();
+    QString get_pymodules_path = (app_dir + "/../Resources/venv/lib/python/site-packages");
+    QFileInfo fi(get_pymodules_path);
+    QString pymodules_path = fi.canonicalFilePath();
+    if (!python_path.contains(pymodules_path))
+    {
+        python_path.prepend(pymodules_path); // Mac source tree (in a release app bundle)
+        settings.setValue("PythonPath", pymodules_path);
+	settings.sync();
+    }
+#endif
 
     if (python_path.length() > 0)
     {
@@ -66,6 +78,8 @@ Server::Server(quint16 port)
 #endif
         }
     }
+    python_path = settings.value("PythonPath").toString();
+    qDebug() << "Python path: " << python_path;
 }
 
 Server::~Server()
@@ -80,13 +94,26 @@ Server::~Server()
 bool Server::Init()
 {
     QSettings settings;
+#ifdef Q_OS_LINUX
+    QProcess process;
+    process.start("python -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\"");
+    process.waitForFinished(-1);
+    QString pymodules_path = process.readAllStandardOutput();
+    pymodules_path = pymodules_path.trimmed();
+    webapp_path = pymodules_path + "/pgadmin4-web-v1";
+#endif
 
     // Find the webapp
     QStringList paths;
     paths.append("../web/"); // Linux source tree
     paths.append("../../web/"); // Windows source tree
     paths.append("../../../../web/"); // Mac source tree (in a dev env)
+#ifdef Q_OS_MAC
     paths.append("../Resources/web/"); // Mac source tree (in a release app bundle)
+#endif
+#ifdef Q_OS_LINUX
+    paths.append(webapp_path); // Linux (in a release rpm)
+#endif
     paths.append(settings.value("ApplicationPath").toString()); // System configured value
     paths.append(""); // Should be last!
 


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-02 12:59         ` Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-02 12:59 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi

Few changes in the updated patch:
- added the missing modules in the specfile. The unavailable modules are
still commented.
- added changelog in specfile
- added dependency of pgadmin4-doc on pgadmin4-web

On Wed, Jun 1, 2016 at 2:57 PM, Sandeep Thakkar <
[email protected]> wrote:

> Hi Devrim,
>
> I have attached the patch for review. Please note that right now I have
> commented the python dependencies (in Requires) which you are building.
> Please review and let me know if specfile or anything else needs some
> changes. Once the rpms are built, please let me know how to install them so
> that I will enable those dependencies and do the testing.
>
> Hi Dave,
>
> The rpm will be built in $SRC/rpm-build. Inside this, we have the
> directories for sources (where tarball will be downloaded - for testing, I
> have mentioned the path of Bugatti :) ), build, etc.
>
> The html docs was not building and I had to make changes in docs/conf.py
> and install sphinx_rtd_theme. I have added this dependency and the Sphinx
> in the specfile. May be should add it in the requirements also? I tested
> this change on OS X and make docs is building fine.
>
> Since web package is installed in the default python site-packages as
> pgadmin4-web-v1 (for release "1"), with the help of Neel, I could made
> changes in Server.cpp to find that location. But, couldn't understand how
> to get the app release info, hence right now hard-coded the string as
> 'pgadmin4-web-v1".
>
> Note: In the patch, the Makefile and .gitignore also contains the mac
> related changes. This is just to see how they will look finally after mac
> and rpm changes are done. I will remove them from the rpm patch once the
> mac appbundle patch is committed.
>
> Questions:
> 1. Should we add 'docs' dependency target for 'rpm' like we did for
> appbundle?
> 2. Should web rpm require doc rpm? I guess so, otherwise online help won't
> work. Right?
>
> On Fri, May 27, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:
>
>> [Adding Devrim]
>>
>> On Fri, May 27, 2016 at 1:55 PM, Sandeep Thakkar
>> <[email protected]> wrote:
>> >
>> >
>> > On Mon, May 9, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:
>> >>
>> >> Hi
>> >>
>> >> Initial eyeball review comments below...
>> >>
>> >> On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar
>> >> <[email protected]> wrote:
>> >>>
>> >>> Hi Team, Dave,
>> >>>
>> >>> Attached herewith are two patches.
>> >>>
>> >>> pgadmin4-rpm.patch - This is the main patch that includes scripts,
>> >>> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
>> >>
>> >>
>> >> Can we keep the directory names in lower case?
>> >>
>> >
>> > Sure. Will do that.
>> >>>
>> >>> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4
>> tpm
>> >>> depends on web and the web rpm depends on the python packages. I have
>> >>> commented the list of packages which are not available on some
>> systems so
>> >>> that Devrim can build them.
>> >>>
>> >>> The installation path for pgadmin4 is "/usr/pgadmin4-<major>.<minor>"
>> and
>> >>> pgadmin4-web is the site-packages/pgadmin4-web
>> >>
>> >> Shouldn't the -web package also have the major.minor version number in
>> the
>> >> path, to allow side-by-side installation?
>> >
>> > Right. Now that we don't have major/minor, so, will it be
>> /usr/pgadmin4-v1
>> > and pgadmin4-web-v1 ? Or?
>>
>> I think that's fine.
>>
>> >>
>> >>
>> >>>
>> >>> pgadmin4-server-ini.patch - This is the patch for runtime/Server.cpp.
>> As
>> >>> said pgadmin4-web and runtime installation directories are different
>> and
>> >>> that means web does not exists in parallel to runtime like in sources.
>> >>>
>> >>> I observed that the location of application settings was not defined
>> in
>> >>> Server.cpp. As per QSettings doc, the default location on Unix is the
>> >>> $HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on
>> the user
>> >>> that runs the application. So, I thought why not to define the
>> application
>> >>> settings in application directory itself. RPM then knows where to
>> define the
>> >>> ApplicationPath. I tested it and it worked fine with me. I haven't
>> done this
>> >>> change for platform dependent.
>> >>
>> >> Doesn't that prevent non-root users from changing the settings? Or (if
>> you
>> >> widen the permissions on the ini file), allow one user to
>> mis-configure the
>> >> app for others? I think what is needed here is a search path change,
>> much
>> >> like you added for the Mac app bundle.
>> >>
>> > Right. Will use python command to find the site-packages path and then
>> > concatenate pgadmin4-web directory name.
>>
>> OK.
>>
>> >> Other thoughts:
>> >>
>> >> - Please rename the README to README.txt
>> >>
>> >> - The code to build the RPMs should be entirely confined to pkg/rpm. A
>> >> Makefile target should be added to /Makefile to build/clean the targets
>> >> (this mistake was made with the Mac package too, but was one of the
>> original
>> >> requirements).
>> >>
>> >> Please resolve these issues and I'll take another look.
>> >>
>> > Sure. Will share it with you soon.
>>
>> -> Devrim please :-)
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Sandeep Thakkar
>
>


-- 
Sandeep Thakkar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] pgadmin-rpm-jun02.patch (45.5K, 3-pgadmin-rpm-jun02.patch)
  download | inline diff:
diff --git a/.gitignore b/.gitignore
index 5d84dd2..c11f83d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,6 @@ pgadmin4.log
 /pgadmin4.egg-info
 /MANIFEST.in
 /build
+/mac-build
+/rpm-build
 /dist
diff --git a/Makefile b/Makefile
index adae41c..5a10678 100644
--- a/Makefile
+++ b/Makefile
@@ -13,9 +13,9 @@ SHELL = /bin/sh
 # High-level targets
 #########################################################################
 
-all: install-pip-requirements pip
+all: docs install-pip-requirements pip appbundle rpm
 
-clean: clean-pip
+clean: clean-pip clean-docs clean-appbundle clean-rpm
 
 #########################################################################
 # Python PIP package
@@ -34,6 +34,8 @@ PIP_CHECK_CMD = which pip &> /dev/null && pip show pip | grep Metadata-Version 2
 PGADMIN_SRC_DIR = pgadmin4
 PGADMIN_EGG = ${PGADMIN_SRC_DIR}.egg-info
 PGADMIN_BUILD = build
+PGADMIN_MACBUILD = mac-build
+PGADMIN_RPMBUILD = rpm-build
 PGADMIN_DIST = dist
 PGADMIN_MANIFEST = MANIFEST.in
 PGADMIN_INSTALL_CMD = pip install --use-wheel --find-links=${PGADMIN_DIST} ${PGADMIN_SRC_DIR}
@@ -83,9 +85,32 @@ endif
 install-pip:
 	${PGADMIN_INSTALL_CMD}
 
+appbundle: docs
+	./pkg/mac/build.sh
+
+docs:
+	LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx html
+
+clean-docs:
+	LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx clean
+
 clean-pip:
 	rm -rf ${PGADMIN_SRC_DIR}
 	rm -rf ${PGADMIN_EGG}
 	rm -rf ${PGADMIN_BUILD}
 	rm -rf ${PGADMIN_DIST}
 	rm -f ${PGADMIN_MANIFEST}
+
+clean-appbundle:
+	rm -rf ${PGADMIN_MACBUILD}
+	rm -rf ${PGADMIN_DIST}/pgadmin4*.dmg*
+
+rpm:
+	./pkg/rpm/build.sh
+
+clean-rpm:
+	rm -rf ${PGADMIN_RPMBUILD}
+	rm -rf ${PGADMIN_DIST}/noarch
+	rm -rf ${PGADMIN_DIST}/x86_64
+
+.PHONY: docs
diff --git a/docs/en_US/conf.py b/docs/en_US/conf.py
index 93ad4e9..ac7c9fc 100644
--- a/docs/en_US/conf.py
+++ b/docs/en_US/conf.py
@@ -17,6 +17,7 @@ import sys, os
 root = os.path.dirname(os.path.realpath(__file__))
 sys.path.insert(0, root + '/../../web/')
 import config
+import sphinx_rtd_theme
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -104,7 +105,7 @@ html_theme = 'sphinx_rtd_theme'
 #html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
diff --git a/pkg/rpm/README.txt b/pkg/rpm/README.txt
new file mode 100644
index 0000000..9bbd25e
--- /dev/null
+++ b/pkg/rpm/README.txt
@@ -0,0 +1,30 @@
+Installing pgAdmin
+==================
+
+This document describes how to build pgAdmin on Linux and generate the RPMs.
+
+Supported Versions:
+
+ - RHEL6 or above, Fedora 22 or above
+
+Required Packages:
+
+ - All the required packages are mentioned in the requirements file. They should be
+installed with yum/dnf. On RHEL, some python modules are available only through EPEL.
+
+1. Python devel
+  - Python 2.6 or above
+
+2. Sphinx (to build docs)
+
+3. QT devel
+  - Qt 4.6 or above, QT 5
+
+4. PostgreSQL installation
+  - PostgreSQL 9.1 or above 
+ 
+
+Building:
+
+To build, go to pgAdmin4 source root directory and execute "make rpm". This will
+create the RPMs for runtime, web and doc in $SRC/dist
diff --git a/pkg/rpm/build.sh b/pkg/rpm/build.sh
new file mode 100755
index 0000000..a6ebd81
--- /dev/null
+++ b/pkg/rpm/build.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+#Script to create the pgAdmin4 RPMs.
+
+# Check whether lsb_release exists to find the OS information
+if [ ! -f /usr/bin/lsb_release ]
+then
+        echo
+        echo "ERROR: lsb_release command does not exist. Please install it with"
+        echo
+        echo "yum -y install redhat-lsb-core"
+        echo
+        echo "Exiting..."
+        echo
+        exit 1
+fi
+
+# Check if spectool exists to download the sources
+if [ ! -f /usr/bin/spectool ]
+then
+        echo
+        echo "ERROR: spectool command does not exist. Please install it with"
+        echo
+        echo "yum -y install rpmdevtools"
+        echo
+        echo "Exiting..."
+        echo
+        exit 1
+fi
+
+# Gather some information from the OS: OS name, version and arch:
+LSB_DISTRO_NAME=`lsb_release -i -s`
+LSB_DISTRO_VERSION=`lsb_release -r -s`
+DISTRO_ARCH=`uname -m`
+
+# We need the lowercase version of the distro name:
+LSB_DISTRO_NAME=`echo $LSB_DISTRO_NAME | awk '{print tolower($0)}'`
+
+if [ "$LSB_DISTRO_NAME" = "centos" ]; then
+	LSB_DISTRO_VERSION=`echo $LSB_DISTRO_VERSION | cut -d"." -f1`
+	PKG_DIR="el-$LSB_DISTRO_VERSION"
+else
+	PKG_DIR="f-$LSB_DISTRO_VERSION"
+fi
+
+# Variables
+export TOPDIR=$(cd `dirname $0` && pwd)/../..
+export RPMBUILDROOT=$TOPDIR/rpm-build
+export SOURCEDIR=$RPMBUILDROOT/sources
+export BUILDDIR=$RPMBUILDROOT/build
+export BUILDROOT=$RPMBUILDROOT/buildroot
+export DISTROOT=$TOPDIR/dist
+
+# Create the directories if not exist
+mkdir -p $SOURCEDIR
+mkdir -p $BUILDDIR
+mkdir -p $BUILDROOT
+mkdir -p $DISTROOT
+
+# Find the pgAdmin4 app name and version from config.py
+export APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g"`
+# We want app name in lower case with no spaces
+export APP_NAME=`echo $APP_NAME | sed 's/ //g' | awk '{print tolower($0)}'`
+export APP_LONG_VERSION=$APP_RELEASE.$APP_REVISION
+export APP_SHORT_VERSION=`echo $APP_LONG_VERSION | cut -d . -f1,2`
+export APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
+if [ ! -z $APP_SUFFIX ]; then
+    export APP_LONG_VERSION=$APP_LONG_VERSION-$APP_SUFFIX
+    export APP_REVISION="${APP_REVISION}_$APP_SUFFIX" #hyphen not allowed in SPEC for version
+fi
+
+# Generate SPEC
+cd ./pkg/rpm/$PKG_DIR
+
+sed -e "s/APP_REL/$APP_RELEASE/" \
+    -e "s/APP_REV/$APP_REVISION/" \
+    -e "s/APP_NAME/$APP_NAME/" \
+    -e "s/DISTRO_ARCH/$DISTRO_ARCH/" pgadmin4.spec.in > pgadmin4.spec
+
+# Build RPMs
+make rpm || exit 1
+
+# Clean up buildroot after successful build
+echo "Cleaning up..."
+rm -rf $RPMBUILDROOT
+
diff --git a/pkg/rpm/common/Makefile.global b/pkg/rpm/common/Makefile.global
new file mode 100644
index 0000000..31a6c4c
--- /dev/null
+++ b/pkg/rpm/common/Makefile.global
@@ -0,0 +1,22 @@
+
+prep:
+	# Update spec file, patches, etc, before running spectool:
+	git pull
+	# Use spectool to download source files, especially tarballs.
+	spectool -g -S $(SPECFILE) -C $(SOURCEDIR)
+
+allclean:
+	git clean -df
+
+clean:
+	rm -rf i386/ i586/ i686/ x86_64/ noarch/
+	rm -f *.src.rpm
+	rm -f *.tar *.tar.gz *.tar.bz2 *.tgz *.zip .xz
+
+rpm: prep
+	rpmbuild --define "_sourcedir $(SOURCEDIR)" \
+	--define "_specdir $(PWD)" \
+	--define  "_builddir $(BUILDDIR)" \
+	--define "_rpmdir $(DISTROOT)" \
+	--define "_buildrootdir $(BUILDROOT)" \
+	--define "dist $(DIST)" -bb $(SPECFILE)
diff --git a/pkg/rpm/el-6/Makefile b/pkg/rpm/el-6/Makefile
new file mode 100644
index 0000000..8a31664
--- /dev/null
+++ b/pkg/rpm/el-6/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel6
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/el-6/pgadmin4.spec.in b/pkg/rpm/el-6/pgadmin4.spec.in
new file mode 100644
index 0000000..3e58b9d
--- /dev/null
+++ b/pkg/rpm/el-6/pgadmin4.spec.in
@@ -0,0 +1,231 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       pgadmin4-doc-v%{pgAdmin4_release}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+Requires:  python3-sphinx-theme-alabaster
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/el-7/Makefile b/pkg/rpm/el-7/Makefile
new file mode 100644
index 0000000..1eb0ea0
--- /dev/null
+++ b/pkg/rpm/el-7/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel7
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/el-7/pgadmin4.spec.in b/pkg/rpm/el-7/pgadmin4.spec.in
new file mode 100644
index 0000000..3e58b9d
--- /dev/null
+++ b/pkg/rpm/el-7/pgadmin4.spec.in
@@ -0,0 +1,231 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       pgadmin4-doc-v%{pgAdmin4_release}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+Requires:  python3-sphinx-theme-alabaster
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/f-22/Makefile b/pkg/rpm/f-22/Makefile
new file mode 100644
index 0000000..d6ed841
--- /dev/null
+++ b/pkg/rpm/f-22/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f22
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-22/pgadmin4.spec.in b/pkg/rpm/f-22/pgadmin4.spec.in
new file mode 100644
index 0000000..3e58b9d
--- /dev/null
+++ b/pkg/rpm/f-22/pgadmin4.spec.in
@@ -0,0 +1,231 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       pgadmin4-doc-v%{pgAdmin4_release}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+Requires:  python3-sphinx-theme-alabaster
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/f-23/Makefile b/pkg/rpm/f-23/Makefile
new file mode 100644
index 0000000..9316c99
--- /dev/null
+++ b/pkg/rpm/f-23/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f23
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-23/pgadmin4.spec.in b/pkg/rpm/f-23/pgadmin4.spec.in
new file mode 100644
index 0000000..3e58b9d
--- /dev/null
+++ b/pkg/rpm/f-23/pgadmin4.spec.in
@@ -0,0 +1,231 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       pgadmin4-doc-v%{pgAdmin4_release}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+Requires:  python3-sphinx-theme-alabaster
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/f-24/Makefile b/pkg/rpm/f-24/Makefile
new file mode 100644
index 0000000..f48f68d
--- /dev/null
+++ b/pkg/rpm/f-24/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f24
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-24/pgadmin4.spec.in b/pkg/rpm/f-24/pgadmin4.spec.in
new file mode 100644
index 0000000..3e58b9d
--- /dev/null
+++ b/pkg/rpm/f-24/pgadmin4.spec.in
@@ -0,0 +1,231 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/pgadmin4-v%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web-v%{pgAdmin4_release}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       pgadmin4-doc-v%{pgAdmin4_release}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+Requires:  python3-sphinx-theme-alabaster
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index 8691224..d095d93 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -23,7 +23,7 @@
 #include "Server.h"
 
 Server::Server(quint16 port)
-{    
+{
     // Appserver port
     m_port = port;
     m_wcAppName = NULL;
@@ -47,6 +47,18 @@ Server::Server(quint16 port)
     // Setup the search path
     QSettings settings;
     QString python_path = settings.value("PythonPath").toString();
+#ifdef Q_OS_MAC
+    QString app_dir = qApp->applicationDirPath();
+    QString get_pymodules_path = (app_dir + "/../Resources/venv/lib/python/site-packages");
+    QFileInfo fi(get_pymodules_path);
+    QString pymodules_path = fi.canonicalFilePath();
+    if (!python_path.contains(pymodules_path))
+    {
+        python_path.prepend(pymodules_path); // Mac source tree (in a release app bundle)
+        settings.setValue("PythonPath", pymodules_path);
+	settings.sync();
+    }
+#endif
 
     if (python_path.length() > 0)
     {
@@ -66,6 +78,8 @@ Server::Server(quint16 port)
 #endif
         }
     }
+    python_path = settings.value("PythonPath").toString();
+    qDebug() << "Python path: " << python_path;
 }
 
 Server::~Server()
@@ -80,13 +94,26 @@ Server::~Server()
 bool Server::Init()
 {
     QSettings settings;
+#ifdef Q_OS_LINUX
+    QProcess process;
+    process.start("python -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\"");
+    process.waitForFinished(-1);
+    QString pymodules_path = process.readAllStandardOutput();
+    pymodules_path = pymodules_path.trimmed();
+    webapp_path = pymodules_path + "/pgadmin4-web-v1";
+#endif
 
     // Find the webapp
     QStringList paths;
     paths.append("../web/"); // Linux source tree
     paths.append("../../web/"); // Windows source tree
     paths.append("../../../../web/"); // Mac source tree (in a dev env)
+#ifdef Q_OS_MAC
     paths.append("../Resources/web/"); // Mac source tree (in a release app bundle)
+#endif
+#ifdef Q_OS_LINUX
+    paths.append(webapp_path); // Linux (in a release rpm)
+#endif
     paths.append(settings.value("ApplicationPath").toString()); // System configured value
     paths.append(""); // Should be last!
 


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-02 15:23           ` Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-02 15:23 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi Devrim, Hi Dave,

I have updated the patch. The earlier patch may fail because of app bundle
commit in git.

For testing, you may define the source tarball location as :
Source0:
http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz

Known issue that I'm still working on:
1. web rpm has a dependency on doc. But, even if I install doc, the web
still complains. Here is the scenario:
[root@localhost tmp]# rpm -ivh
dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
error: Failed dependencies:
*pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch*
... ( trimmed the python dependencies list here...)

[root@localhost tmp]# rpm -ivh
dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
Preparing...                          #################################
[100%]
Updating / installing...
   1:pgadmin4-docs-1.0_dev-1.rhel7    #################################
[100%]


[root@localhost tmp]# yum list | grep pgadmin4-docs
pgadmin4-docs.noarch                    1.0_dev-1.rhel7
 installed


[root@localhost tmp]# rpm -ivh
dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
error: Failed dependencies:
*pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch*
--

Thanks!

On Thu, Jun 2, 2016 at 6:29 PM, Sandeep Thakkar <
[email protected]> wrote:

> Hi
>
> Few changes in the updated patch:
> - added the missing modules in the specfile. The unavailable modules are
> still commented.
> - added changelog in specfile
> - added dependency of pgadmin4-doc on pgadmin4-web
>
> On Wed, Jun 1, 2016 at 2:57 PM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> Hi Devrim,
>>
>> I have attached the patch for review. Please note that right now I have
>> commented the python dependencies (in Requires) which you are building.
>> Please review and let me know if specfile or anything else needs some
>> changes. Once the rpms are built, please let me know how to install them so
>> that I will enable those dependencies and do the testing.
>>
>> Hi Dave,
>>
>> The rpm will be built in $SRC/rpm-build. Inside this, we have the
>> directories for sources (where tarball will be downloaded - for testing, I
>> have mentioned the path of Bugatti :) ), build, etc.
>>
>> The html docs was not building and I had to make changes in docs/conf.py
>> and install sphinx_rtd_theme. I have added this dependency and the Sphinx
>> in the specfile. May be should add it in the requirements also? I tested
>> this change on OS X and make docs is building fine.
>>
>> Since web package is installed in the default python site-packages as
>> pgadmin4-web-v1 (for release "1"), with the help of Neel, I could made
>> changes in Server.cpp to find that location. But, couldn't understand how
>> to get the app release info, hence right now hard-coded the string as
>> 'pgadmin4-web-v1".
>>
>> Note: In the patch, the Makefile and .gitignore also contains the mac
>> related changes. This is just to see how they will look finally after mac
>> and rpm changes are done. I will remove them from the rpm patch once the
>> mac appbundle patch is committed.
>>
>> Questions:
>> 1. Should we add 'docs' dependency target for 'rpm' like we did for
>> appbundle?
>> 2. Should web rpm require doc rpm? I guess so, otherwise online help
>> won't work. Right?
>>
>> On Fri, May 27, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:
>>
>>> [Adding Devrim]
>>>
>>> On Fri, May 27, 2016 at 1:55 PM, Sandeep Thakkar
>>> <[email protected]> wrote:
>>> >
>>> >
>>> > On Mon, May 9, 2016 at 6:35 PM, Dave Page <[email protected]> wrote:
>>> >>
>>> >> Hi
>>> >>
>>> >> Initial eyeball review comments below...
>>> >>
>>> >> On Fri, Apr 22, 2016 at 11:57 AM, Sandeep Thakkar
>>> >> <[email protected]> wrote:
>>> >>>
>>> >>> Hi Team, Dave,
>>> >>>
>>> >>> Attached herewith are two patches.
>>> >>>
>>> >>> pgadmin4-rpm.patch - This is the main patch that includes scripts,
>>> >>> makefiles and spec to create RPMs for RHEL6/RHEL7/F-22/F-23/F-24.
>>> >>
>>> >>
>>> >> Can we keep the directory names in lower case?
>>> >>
>>> >
>>> > Sure. Will do that.
>>> >>>
>>> >>> It will create two RPMs i.e pgadmin4 and pgadmin4-web. The  pgadmin4
>>> tpm
>>> >>> depends on web and the web rpm depends on the python packages. I have
>>> >>> commented the list of packages which are not available on some
>>> systems so
>>> >>> that Devrim can build them.
>>> >>>
>>> >>> The installation path for pgadmin4 is
>>> "/usr/pgadmin4-<major>.<minor>" and
>>> >>> pgadmin4-web is the site-packages/pgadmin4-web
>>> >>
>>> >> Shouldn't the -web package also have the major.minor version number
>>> in the
>>> >> path, to allow side-by-side installation?
>>> >
>>> > Right. Now that we don't have major/minor, so, will it be
>>> /usr/pgadmin4-v1
>>> > and pgadmin4-web-v1 ? Or?
>>>
>>> I think that's fine.
>>>
>>> >>
>>> >>
>>> >>>
>>> >>> pgadmin4-server-ini.patch - This is the patch for
>>> runtime/Server.cpp. As
>>> >>> said pgadmin4-web and runtime installation directories are different
>>> and
>>> >>> that means web does not exists in parallel to runtime like in
>>> sources.
>>> >>>
>>> >>> I observed that the location of application settings was not defined
>>> in
>>> >>> Server.cpp. As per QSettings doc, the default location on Unix is the
>>> >>> $HOME/.config/<companyname>/<appname>.conf. Here, $HOME depends on
>>> the user
>>> >>> that runs the application. So, I thought why not to define the
>>> application
>>> >>> settings in application directory itself. RPM then knows where to
>>> define the
>>> >>> ApplicationPath. I tested it and it worked fine with me. I haven't
>>> done this
>>> >>> change for platform dependent.
>>> >>
>>> >> Doesn't that prevent non-root users from changing the settings? Or
>>> (if you
>>> >> widen the permissions on the ini file), allow one user to
>>> mis-configure the
>>> >> app for others? I think what is needed here is a search path change,
>>> much
>>> >> like you added for the Mac app bundle.
>>> >>
>>> > Right. Will use python command to find the site-packages path and then
>>> > concatenate pgadmin4-web directory name.
>>>
>>> OK.
>>>
>>> >> Other thoughts:
>>> >>
>>> >> - Please rename the README to README.txt
>>> >>
>>> >> - The code to build the RPMs should be entirely confined to pkg/rpm. A
>>> >> Makefile target should be added to /Makefile to build/clean the
>>> targets
>>> >> (this mistake was made with the Mac package too, but was one of the
>>> original
>>> >> requirements).
>>> >>
>>> >> Please resolve these issues and I'll take another look.
>>> >>
>>> > Sure. Will share it with you soon.
>>>
>>> -> Devrim please :-)
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>>
>>
>
>
> --
> Sandeep Thakkar
>
>


-- 
Sandeep Thakkar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] pgadmin-rpm-jun02.patch (44.3K, 3-pgadmin-rpm-jun02.patch)
  download | inline diff:
diff --git a/.gitignore b/.gitignore
index 562fee6..c11f83d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,4 +25,5 @@ pgadmin4.log
 /MANIFEST.in
 /build
 /mac-build
+/rpm-build
 /dist
diff --git a/Makefile b/Makefile
index 3f4e5fc..5a10678 100644
--- a/Makefile
+++ b/Makefile
@@ -13,9 +13,9 @@ SHELL = /bin/sh
 # High-level targets
 #########################################################################
 
-all: docs install-pip-requirements pip appbundle
+all: docs install-pip-requirements pip appbundle rpm
 
-clean: clean-pip clean-docs clean-appbundle
+clean: clean-pip clean-docs clean-appbundle clean-rpm
 
 #########################################################################
 # Python PIP package
@@ -35,6 +35,7 @@ PGADMIN_SRC_DIR = pgadmin4
 PGADMIN_EGG = ${PGADMIN_SRC_DIR}.egg-info
 PGADMIN_BUILD = build
 PGADMIN_MACBUILD = mac-build
+PGADMIN_RPMBUILD = rpm-build
 PGADMIN_DIST = dist
 PGADMIN_MANIFEST = MANIFEST.in
 PGADMIN_INSTALL_CMD = pip install --use-wheel --find-links=${PGADMIN_DIST} ${PGADMIN_SRC_DIR}
@@ -104,4 +105,12 @@ clean-appbundle:
 	rm -rf ${PGADMIN_MACBUILD}
 	rm -rf ${PGADMIN_DIST}/pgadmin4*.dmg*
 
+rpm:
+	./pkg/rpm/build.sh
+
+clean-rpm:
+	rm -rf ${PGADMIN_RPMBUILD}
+	rm -rf ${PGADMIN_DIST}/noarch
+	rm -rf ${PGADMIN_DIST}/x86_64
+
 .PHONY: docs
diff --git a/docs/en_US/conf.py b/docs/en_US/conf.py
index 93ad4e9..ac7c9fc 100644
--- a/docs/en_US/conf.py
+++ b/docs/en_US/conf.py
@@ -17,6 +17,7 @@ import sys, os
 root = os.path.dirname(os.path.realpath(__file__))
 sys.path.insert(0, root + '/../../web/')
 import config
+import sphinx_rtd_theme
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -104,7 +105,7 @@ html_theme = 'sphinx_rtd_theme'
 #html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
diff --git a/pkg/rpm/README.txt b/pkg/rpm/README.txt
new file mode 100644
index 0000000..9bbd25e
--- /dev/null
+++ b/pkg/rpm/README.txt
@@ -0,0 +1,30 @@
+Installing pgAdmin
+==================
+
+This document describes how to build pgAdmin on Linux and generate the RPMs.
+
+Supported Versions:
+
+ - RHEL6 or above, Fedora 22 or above
+
+Required Packages:
+
+ - All the required packages are mentioned in the requirements file. They should be
+installed with yum/dnf. On RHEL, some python modules are available only through EPEL.
+
+1. Python devel
+  - Python 2.6 or above
+
+2. Sphinx (to build docs)
+
+3. QT devel
+  - Qt 4.6 or above, QT 5
+
+4. PostgreSQL installation
+  - PostgreSQL 9.1 or above 
+ 
+
+Building:
+
+To build, go to pgAdmin4 source root directory and execute "make rpm". This will
+create the RPMs for runtime, web and doc in $SRC/dist
diff --git a/pkg/rpm/build.sh b/pkg/rpm/build.sh
new file mode 100755
index 0000000..a6ebd81
--- /dev/null
+++ b/pkg/rpm/build.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+
+#Script to create the pgAdmin4 RPMs.
+
+# Check whether lsb_release exists to find the OS information
+if [ ! -f /usr/bin/lsb_release ]
+then
+        echo
+        echo "ERROR: lsb_release command does not exist. Please install it with"
+        echo
+        echo "yum -y install redhat-lsb-core"
+        echo
+        echo "Exiting..."
+        echo
+        exit 1
+fi
+
+# Check if spectool exists to download the sources
+if [ ! -f /usr/bin/spectool ]
+then
+        echo
+        echo "ERROR: spectool command does not exist. Please install it with"
+        echo
+        echo "yum -y install rpmdevtools"
+        echo
+        echo "Exiting..."
+        echo
+        exit 1
+fi
+
+# Gather some information from the OS: OS name, version and arch:
+LSB_DISTRO_NAME=`lsb_release -i -s`
+LSB_DISTRO_VERSION=`lsb_release -r -s`
+DISTRO_ARCH=`uname -m`
+
+# We need the lowercase version of the distro name:
+LSB_DISTRO_NAME=`echo $LSB_DISTRO_NAME | awk '{print tolower($0)}'`
+
+if [ "$LSB_DISTRO_NAME" = "centos" ]; then
+	LSB_DISTRO_VERSION=`echo $LSB_DISTRO_VERSION | cut -d"." -f1`
+	PKG_DIR="el-$LSB_DISTRO_VERSION"
+else
+	PKG_DIR="f-$LSB_DISTRO_VERSION"
+fi
+
+# Variables
+export TOPDIR=$(cd `dirname $0` && pwd)/../..
+export RPMBUILDROOT=$TOPDIR/rpm-build
+export SOURCEDIR=$RPMBUILDROOT/sources
+export BUILDDIR=$RPMBUILDROOT/build
+export BUILDROOT=$RPMBUILDROOT/buildroot
+export DISTROOT=$TOPDIR/dist
+
+# Create the directories if not exist
+mkdir -p $SOURCEDIR
+mkdir -p $BUILDDIR
+mkdir -p $BUILDROOT
+mkdir -p $DISTROOT
+
+# Find the pgAdmin4 app name and version from config.py
+export APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g"`
+# We want app name in lower case with no spaces
+export APP_NAME=`echo $APP_NAME | sed 's/ //g' | awk '{print tolower($0)}'`
+export APP_LONG_VERSION=$APP_RELEASE.$APP_REVISION
+export APP_SHORT_VERSION=`echo $APP_LONG_VERSION | cut -d . -f1,2`
+export APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
+if [ ! -z $APP_SUFFIX ]; then
+    export APP_LONG_VERSION=$APP_LONG_VERSION-$APP_SUFFIX
+    export APP_REVISION="${APP_REVISION}_$APP_SUFFIX" #hyphen not allowed in SPEC for version
+fi
+
+# Generate SPEC
+cd ./pkg/rpm/$PKG_DIR
+
+sed -e "s/APP_REL/$APP_RELEASE/" \
+    -e "s/APP_REV/$APP_REVISION/" \
+    -e "s/APP_NAME/$APP_NAME/" \
+    -e "s/DISTRO_ARCH/$DISTRO_ARCH/" pgadmin4.spec.in > pgadmin4.spec
+
+# Build RPMs
+make rpm || exit 1
+
+# Clean up buildroot after successful build
+echo "Cleaning up..."
+rm -rf $RPMBUILDROOT
+
diff --git a/pkg/rpm/common/Makefile.global b/pkg/rpm/common/Makefile.global
new file mode 100644
index 0000000..31a6c4c
--- /dev/null
+++ b/pkg/rpm/common/Makefile.global
@@ -0,0 +1,22 @@
+
+prep:
+	# Update spec file, patches, etc, before running spectool:
+	git pull
+	# Use spectool to download source files, especially tarballs.
+	spectool -g -S $(SPECFILE) -C $(SOURCEDIR)
+
+allclean:
+	git clean -df
+
+clean:
+	rm -rf i386/ i586/ i686/ x86_64/ noarch/
+	rm -f *.src.rpm
+	rm -f *.tar *.tar.gz *.tar.bz2 *.tgz *.zip .xz
+
+rpm: prep
+	rpmbuild --define "_sourcedir $(SOURCEDIR)" \
+	--define "_specdir $(PWD)" \
+	--define  "_builddir $(BUILDDIR)" \
+	--define "_rpmdir $(DISTROOT)" \
+	--define "_buildrootdir $(BUILDROOT)" \
+	--define "dist $(DIST)" -bb $(SPECFILE)
diff --git a/pkg/rpm/el-6/Makefile b/pkg/rpm/el-6/Makefile
new file mode 100644
index 0000000..8a31664
--- /dev/null
+++ b/pkg/rpm/el-6/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel6
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/el-6/pgadmin4.spec.in b/pkg/rpm/el-6/pgadmin4.spec.in
new file mode 100644
index 0000000..f178508
--- /dev/null
+++ b/pkg/rpm/el-6/pgadmin4.spec.in
@@ -0,0 +1,230 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        ftp://ftp.postgresql.org/pub/pgadmin4/release/v%{version}/src/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web = %{version}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+BuildArch:      noarch
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       %{name}-doc = %{version}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+Requires:  python2-sphinx-theme-alabaster
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/el-7/Makefile b/pkg/rpm/el-7/Makefile
new file mode 100644
index 0000000..1eb0ea0
--- /dev/null
+++ b/pkg/rpm/el-7/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel7
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/el-7/pgadmin4.spec.in b/pkg/rpm/el-7/pgadmin4.spec.in
new file mode 100644
index 0000000..f178508
--- /dev/null
+++ b/pkg/rpm/el-7/pgadmin4.spec.in
@@ -0,0 +1,230 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        ftp://ftp.postgresql.org/pub/pgadmin4/release/v%{version}/src/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web = %{version}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+BuildArch:      noarch
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       %{name}-doc = %{version}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+Requires:  python2-sphinx-theme-alabaster
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/f-22/Makefile b/pkg/rpm/f-22/Makefile
new file mode 100644
index 0000000..d6ed841
--- /dev/null
+++ b/pkg/rpm/f-22/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f22
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-22/pgadmin4.spec.in b/pkg/rpm/f-22/pgadmin4.spec.in
new file mode 100644
index 0000000..f178508
--- /dev/null
+++ b/pkg/rpm/f-22/pgadmin4.spec.in
@@ -0,0 +1,230 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        ftp://ftp.postgresql.org/pub/pgadmin4/release/v%{version}/src/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web = %{version}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+BuildArch:      noarch
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       %{name}-doc = %{version}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+Requires:  python2-sphinx-theme-alabaster
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/f-23/Makefile b/pkg/rpm/f-23/Makefile
new file mode 100644
index 0000000..9316c99
--- /dev/null
+++ b/pkg/rpm/f-23/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f23
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-23/pgadmin4.spec.in b/pkg/rpm/f-23/pgadmin4.spec.in
new file mode 100644
index 0000000..f178508
--- /dev/null
+++ b/pkg/rpm/f-23/pgadmin4.spec.in
@@ -0,0 +1,230 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        ftp://ftp.postgresql.org/pub/pgadmin4/release/v%{version}/src/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web = %{version}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+BuildArch:      noarch
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       %{name}-doc = %{version}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+Requires:  python2-sphinx-theme-alabaster
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/f-24/Makefile b/pkg/rpm/f-24/Makefile
new file mode 100644
index 0000000..f48f68d
--- /dev/null
+++ b/pkg/rpm/f-24/Makefile
@@ -0,0 +1,8 @@
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f24
+SPECFILE="pgadmin4.spec"
+
+# Now, include global Makefile
+include ../common/Makefile.global
diff --git a/pkg/rpm/f-24/pgadmin4.spec.in b/pkg/rpm/f-24/pgadmin4.spec.in
new file mode 100644
index 0000000..f178508
--- /dev/null
+++ b/pkg/rpm/f-24/pgadmin4.spec.in
@@ -0,0 +1,230 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+Source0:        ftp://ftp.postgresql.org/pub/pgadmin4/release/v%{version}/src/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web = %{version}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+BuildArch:      noarch
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       %{name}-doc = %{version}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-snowballstemmer
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+Requires:  python2-sphinx-theme-alabaster
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%prep
+%setup -n pgadmin4/runtime
+
+%build
+cd ../runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd ..
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index fd930f6..921752e 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -103,6 +103,17 @@ bool Server::Init()
 {
     QSettings settings;
 
+#ifdef Q_OS_LINUX
+    //  In case we are running in a release RPM, the web app will be present in
+    //  the default python lib on the system. Hence, find that path run time.
+    QProcess process;
+    process.start("python -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\"");
+    process.waitForFinished(-1);
+    QString pymodules_path = process.readAllStandardOutput();
+    pymodules_path = pymodules_path.trimmed();
+    webapp_path = pymodules_path + "/pgadmin4-web-v1";
+#endif
+
     // Find the webapp
     QStringList paths;
     paths.append("../web/"); // Linux source tree
@@ -111,13 +122,22 @@ bool Server::Init()
 #ifdef Q_OS_MAC
     paths.append("../Resources/web/"); // Mac source tree (in a release app bundle)
 #endif
+#ifdef Q_OS_LINUX
+    paths.append(webapp_path); // Linux (in a release RPM)
+#endif
     paths.append(settings.value("ApplicationPath").toString()); // System configured value
     paths.append(""); // Should be last!
 
     for (int i = 0; i < paths.size(); ++i)
     {
         QDir dir(QCoreApplication::applicationDirPath() + "/" + paths[i]);
-        m_appfile = dir.canonicalPath() + "/pgAdmin4.py";
+        QFileInfo info(paths[i]);
+        if (info.isRelative()) {
+             m_appfile = dir.absolutePath() + "/pgAdmin4.py";
+        }
+        else {
+             m_appfile = paths[i] + "/pgAdmin4.py";
+        }
 
         if (QFile::exists(m_appfile))
         {


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-03 08:38             ` Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Page @ 2016-06-03 08:38 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi

On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
<[email protected]> wrote:
> Hi Devrim, Hi Dave,
>
> I have updated the patch. The earlier patch may fail because of app bundle
> commit in git.
>
> For testing, you may define the source tarball location as :
> Source0:
> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>
> Known issue that I'm still working on:
> 1. web rpm has a dependency on doc. But, even if I install doc, the web
> still complains. Here is the scenario:
> [root@localhost tmp]# rpm -ivh
> dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
> error: Failed dependencies:
> pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch
> ... ( trimmed the python dependencies list here...)
>
> [root@localhost tmp]# rpm -ivh
> dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
> Preparing...                          #################################
> [100%]
> Updating / installing...
>    1:pgadmin4-docs-1.0_dev-1.rhel7    #################################
> [100%]
>
>
> [root@localhost tmp]# yum list | grep pgadmin4-docs
> pgadmin4-docs.noarch                    1.0_dev-1.rhel7
> installed
>
>
> [root@localhost tmp]# rpm -ivh
> dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
> error: Failed dependencies:
> pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch

You have a typo - the Requires line is for pgadmin4-doc, but the RPM
is pgadmin4-docs.

Other review comments:

- We have multiple identical pgadmin4.spec.in's in the patch. We need
to get that down to a single file.

- In fact, why do we need a directory for each distro at all? As far
as I can see, the only difference is the $DIST definition, which is
surely something we can get programmatically very easily. It seems to
me we could reduce this all to 3 files - Makefile, README and
pgadmin4.spec.in

- make rpm has a dependency on make prep. This has 2 issues as far as I can see:

  - It does a git pull, which is bad. If I'm making an RPM from within
the source tree, I want it for the current source. The git pull only
makes sense for external builds, i.e. in a much larger automated build
system.

  - It goes and grabs the source code and patches from the FTP site.
Again, this is not what I want for an "in-tree" build. I want to use
the source code as I have it now.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-06-03 09:11               ` Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-03 09:11 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Thanks Dave.

On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:

> Hi
>
> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
> <[email protected]> wrote:
> > Hi Devrim, Hi Dave,
> >
> > I have updated the patch. The earlier patch may fail because of app
> bundle
> > commit in git.
> >
> > For testing, you may define the source tarball location as :
> > Source0:
> >
> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
> >
> > Known issue that I'm still working on:
> > 1. web rpm has a dependency on doc. But, even if I install doc, the web
> > still complains. Here is the scenario:
> > [root@localhost tmp]# rpm -ivh
> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
> > error: Failed dependencies:
> > pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch
> > ... ( trimmed the python dependencies list here...)
> >
> > [root@localhost tmp]# rpm -ivh
> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
> > Preparing...                          #################################
> > [100%]
> > Updating / installing...
> >    1:pgadmin4-docs-1.0_dev-1.rhel7    #################################
> > [100%]
> >
> >
> > [root@localhost tmp]# yum list | grep pgadmin4-docs
> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
> > installed
> >
> >
> > [root@localhost tmp]# rpm -ivh
> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
> > error: Failed dependencies:
> > pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch
>
> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
> is pgadmin4-docs.
>
> Oh, right.


> Other review comments:
>
> - We have multiple identical pgadmin4.spec.in's in the patch. We need
> to get that down to a single file.
>
> - In fact, why do we need a directory for each distro at all? As far
> as I can see, the only difference is the $DIST definition, which is
> surely something we can get programmatically very easily. It seems to
> me we could reduce this all to 3 files - Makefile, README and
> pgadmin4.spec.in
>
> Agree. I copied the structure from somewhere thinking this is good to have
more OS specific changes.


> - make rpm has a dependency on make prep. This has 2 issues as far as I
> can see:
>
>   - It does a git pull, which is bad. If I'm making an RPM from within
> the source tree, I want it for the current source. The git pull only
> makes sense for external builds, i.e. in a much larger automated build
> system.
>
>   - It goes and grabs the source code and patches from the FTP site.
> Again, this is not what I want for an "in-tree" build. I want to use
> the source code as I have it now.
>
> Okay. got it. Will remove downloading the tarballs and build the cloned
source.


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



-- 
Sandeep Thakkar


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-03 09:15                 ` Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-03 09:15 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi Dave,

how about changes in the pgadmin4 source code for conf.py and Server.cpp?
Looks okay?

On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
[email protected]> wrote:

> Thanks Dave.
>
> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:
>
>> Hi
>>
>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>> <[email protected]> wrote:
>> > Hi Devrim, Hi Dave,
>> >
>> > I have updated the patch. The earlier patch may fail because of app
>> bundle
>> > commit in git.
>> >
>> > For testing, you may define the source tarball location as :
>> > Source0:
>> >
>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>> >
>> > Known issue that I'm still working on:
>> > 1. web rpm has a dependency on doc. But, even if I install doc, the web
>> > still complains. Here is the scenario:
>> > [root@localhost tmp]# rpm -ivh
>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>> > error: Failed dependencies:
>> > pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch
>> > ... ( trimmed the python dependencies list here...)
>> >
>> > [root@localhost tmp]# rpm -ivh
>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>> > Preparing...                          #################################
>> > [100%]
>> > Updating / installing...
>> >    1:pgadmin4-docs-1.0_dev-1.rhel7    #################################
>> > [100%]
>> >
>> >
>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>> > installed
>> >
>> >
>> > [root@localhost tmp]# rpm -ivh
>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>> > error: Failed dependencies:
>> > pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch
>>
>> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
>> is pgadmin4-docs.
>>
>> Oh, right.
>
>
>> Other review comments:
>>
>> - We have multiple identical pgadmin4.spec.in's in the patch. We need
>> to get that down to a single file.
>>
>> - In fact, why do we need a directory for each distro at all? As far
>> as I can see, the only difference is the $DIST definition, which is
>> surely something we can get programmatically very easily. It seems to
>> me we could reduce this all to 3 files - Makefile, README and
>> pgadmin4.spec.in
>>
>> Agree. I copied the structure from somewhere thinking this is good to
> have more OS specific changes.
>
>
>> - make rpm has a dependency on make prep. This has 2 issues as far as I
>> can see:
>>
>>   - It does a git pull, which is bad. If I'm making an RPM from within
>> the source tree, I want it for the current source. The git pull only
>> makes sense for external builds, i.e. in a much larger automated build
>> system.
>>
>>   - It goes and grabs the source code and patches from the FTP site.
>> Again, this is not what I want for an "in-tree" build. I want to use
>> the source code as I have it now.
>>
>> Okay. got it. Will remove downloading the tarballs and build the cloned
> source.
>
>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Sandeep Thakkar
>
>


-- 
Sandeep Thakkar
Lead Software Engineer


Phone: +91.20.30589505

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-03 14:09                   ` Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Page @ 2016-06-03 14:09 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi,

Well, I have to wonder why we need the changes to the runtime? We're
linking the runtime with the same build of Python that's already on the
system - doesn't it know where it's site-packages are already? I could see
us needing this is we were using a distro-independent build of Python and
wanted to find the OS site-packages location, but we're not.


On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
[email protected]> wrote:

> Hi Dave,
>
> how about changes in the pgadmin4 source code for conf.py and Server.cpp?
> Looks okay?
>
> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> Thanks Dave.
>>
>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:
>>
>>> Hi
>>>
>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>> <[email protected]> wrote:
>>> > Hi Devrim, Hi Dave,
>>> >
>>> > I have updated the patch. The earlier patch may fail because of app
>>> bundle
>>> > commit in git.
>>> >
>>> > For testing, you may define the source tarball location as :
>>> > Source0:
>>> >
>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>> >
>>> > Known issue that I'm still working on:
>>> > 1. web rpm has a dependency on doc. But, even if I install doc, the web
>>> > still complains. Here is the scenario:
>>> > [root@localhost tmp]# rpm -ivh
>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>> > error: Failed dependencies:
>>> > pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch
>>> > ... ( trimmed the python dependencies list here...)
>>> >
>>> > [root@localhost tmp]# rpm -ivh
>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>> > Preparing...                          #################################
>>> > [100%]
>>> > Updating / installing...
>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7    #################################
>>> > [100%]
>>> >
>>> >
>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>> > installed
>>> >
>>> >
>>> > [root@localhost tmp]# rpm -ivh
>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>> > error: Failed dependencies:
>>> > pgadmin4-doc = 1.0_dev is needed by pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>
>>> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
>>> is pgadmin4-docs.
>>>
>>> Oh, right.
>>
>>
>>> Other review comments:
>>>
>>> - We have multiple identical pgadmin4.spec.in's in the patch. We need
>>> to get that down to a single file.
>>>
>>> - In fact, why do we need a directory for each distro at all? As far
>>> as I can see, the only difference is the $DIST definition, which is
>>> surely something we can get programmatically very easily. It seems to
>>> me we could reduce this all to 3 files - Makefile, README and
>>> pgadmin4.spec.in
>>>
>>> Agree. I copied the structure from somewhere thinking this is good to
>> have more OS specific changes.
>>
>>
>>> - make rpm has a dependency on make prep. This has 2 issues as far as I
>>> can see:
>>>
>>>   - It does a git pull, which is bad. If I'm making an RPM from within
>>> the source tree, I want it for the current source. The git pull only
>>> makes sense for external builds, i.e. in a much larger automated build
>>> system.
>>>
>>>   - It goes and grabs the source code and patches from the FTP site.
>>> Again, this is not what I want for an "in-tree" build. I want to use
>>> the source code as I have it now.
>>>
>>> Okay. got it. Will remove downloading the tarballs and build the cloned
>> source.
>>
>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>>
>>
>
>
> --
> Sandeep Thakkar
> Lead Software Engineer
>
>
> Phone: +91.20.30589505
>
> Website: www.enterprisedb.com
> EnterpriseDB Blog: http://blogs.enterprisedb.com/
> Follow us on Twitter: http://www.twitter.com/enterprisedb
>
> This e-mail message (and any attachment) is intended for the use of the
> individual or entity to whom it is addressed. This message contains
> information from EnterpriseDB Corporation that may be privileged,
> confidential, or exempt from disclosure under applicable law. If you are
> not the intended recipient or authorized to receive this for the intended
> recipient, any use, dissemination, distribution, retention, archiving, or
> copying of this communication is strictly prohibited. If you have received
> this e-mail in error, please notify the sender immediately by reply e-mail
> and delete this message.
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-06-03 14:39                     ` Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-03 14:39 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Do you mean to say when a python app is launched, it imports some modules
automatically and in that sense it knows about where it's site-packages
are? May be, but how the pgAdmin4 runtime will know where the Web App is
installed?

The changes that I have done to the runtime is to let it know the path of
the Web App which is present in
"/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
set the PythonPath like we did for appbundle because I thought it is not
needed and it will automatically load the modules from the site-packages,
but it is to set the ApplicationPath.

I missed something? or misunderstood something?

On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:

> Hi,
>
> Well, I have to wonder why we need the changes to the runtime? We're
> linking the runtime with the same build of Python that's already on the
> system - doesn't it know where it's site-packages are already? I could see
> us needing this is we were using a distro-independent build of Python and
> wanted to find the OS site-packages location, but we're not.
>
>
> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> Hi Dave,
>>
>> how about changes in the pgadmin4 source code for conf.py and Server.cpp?
>> Looks okay?
>>
>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>> [email protected]> wrote:
>>
>>> Thanks Dave.
>>>
>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:
>>>
>>>> Hi
>>>>
>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>> <[email protected]> wrote:
>>>> > Hi Devrim, Hi Dave,
>>>> >
>>>> > I have updated the patch. The earlier patch may fail because of app
>>>> bundle
>>>> > commit in git.
>>>> >
>>>> > For testing, you may define the source tarball location as :
>>>> > Source0:
>>>> >
>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>> >
>>>> > Known issue that I'm still working on:
>>>> > 1. web rpm has a dependency on doc. But, even if I install doc, the
>>>> web
>>>> > still complains. Here is the scenario:
>>>> > [root@localhost tmp]# rpm -ivh
>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>> > error: Failed dependencies:
>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>> > ... ( trimmed the python dependencies list here...)
>>>> >
>>>> > [root@localhost tmp]# rpm -ivh
>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>> > Preparing...
>>>> #################################
>>>> > [100%]
>>>> > Updating / installing...
>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>> #################################
>>>> > [100%]
>>>> >
>>>> >
>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>> > installed
>>>> >
>>>> >
>>>> > [root@localhost tmp]# rpm -ivh
>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>> > error: Failed dependencies:
>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>
>>>> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
>>>> is pgadmin4-docs.
>>>>
>>>> Oh, right.
>>>
>>>
>>>> Other review comments:
>>>>
>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We need
>>>> to get that down to a single file.
>>>>
>>>> - In fact, why do we need a directory for each distro at all? As far
>>>> as I can see, the only difference is the $DIST definition, which is
>>>> surely something we can get programmatically very easily. It seems to
>>>> me we could reduce this all to 3 files - Makefile, README and
>>>> pgadmin4.spec.in
>>>>
>>>> Agree. I copied the structure from somewhere thinking this is good to
>>> have more OS specific changes.
>>>
>>>
>>>> - make rpm has a dependency on make prep. This has 2 issues as far as I
>>>> can see:
>>>>
>>>>   - It does a git pull, which is bad. If I'm making an RPM from within
>>>> the source tree, I want it for the current source. The git pull only
>>>> makes sense for external builds, i.e. in a much larger automated build
>>>> system.
>>>>
>>>>   - It goes and grabs the source code and patches from the FTP site.
>>>> Again, this is not what I want for an "in-tree" build. I want to use
>>>> the source code as I have it now.
>>>>
>>>> Okay. got it. Will remove downloading the tarballs and build the cloned
>>> source.
>>>
>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>>
>>> --
>>> Sandeep Thakkar
>>>
>>>
>>
>>
>> --
>> Sandeep Thakkar
>> Lead Software Engineer
>>
>>
>> Phone: +91.20.30589505
>>
>> Website: www.enterprisedb.com
>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>
>> This e-mail message (and any attachment) is intended for the use of the
>> individual or entity to whom it is addressed. This message contains
>> information from EnterpriseDB Corporation that may be privileged,
>> confidential, or exempt from disclosure under applicable law. If you are
>> not the intended recipient or authorized to receive this for the intended
>> recipient, any use, dissemination, distribution, retention, archiving, or
>> copying of this communication is strictly prohibited. If you have received
>> this e-mail in error, please notify the sender immediately by reply e-mail
>> and delete this message.
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Sandeep Thakkar
Lead Software Engineer


Phone: +91.20.30589505

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-03 14:54                       ` Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Page @ 2016-06-03 14:54 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

My point is that the runtime uses the platform supplied Python interpreter,
which presumably knows where to search for packages. Mind you, I suppose
the issue there is that it wouldn't be able to distinguish between v1 and
v2 then...

I don't have a major issue with your suggested code - I just want to make
sure we need it.

On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
[email protected]> wrote:

> Do you mean to say when a python app is launched, it imports some modules
> automatically and in that sense it knows about where it's site-packages
> are? May be, but how the pgAdmin4 runtime will know where the Web App is
> installed?
>
> The changes that I have done to the runtime is to let it know the path of
> the Web App which is present in
> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
> set the PythonPath like we did for appbundle because I thought it is not
> needed and it will automatically load the modules from the site-packages,
> but it is to set the ApplicationPath.
>
> I missed something? or misunderstood something?
>
> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>
>> Hi,
>>
>> Well, I have to wonder why we need the changes to the runtime? We're
>> linking the runtime with the same build of Python that's already on the
>> system - doesn't it know where it's site-packages are already? I could see
>> us needing this is we were using a distro-independent build of Python and
>> wanted to find the OS site-packages location, but we're not.
>>
>>
>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>> [email protected]> wrote:
>>
>>> Hi Dave,
>>>
>>> how about changes in the pgadmin4 source code for conf.py and
>>> Server.cpp? Looks okay?
>>>
>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>> [email protected]> wrote:
>>>
>>>> Thanks Dave.
>>>>
>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>> <[email protected]> wrote:
>>>>> > Hi Devrim, Hi Dave,
>>>>> >
>>>>> > I have updated the patch. The earlier patch may fail because of app
>>>>> bundle
>>>>> > commit in git.
>>>>> >
>>>>> > For testing, you may define the source tarball location as :
>>>>> > Source0:
>>>>> >
>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>> >
>>>>> > Known issue that I'm still working on:
>>>>> > 1. web rpm has a dependency on doc. But, even if I install doc, the
>>>>> web
>>>>> > still complains. Here is the scenario:
>>>>> > [root@localhost tmp]# rpm -ivh
>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>> > error: Failed dependencies:
>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>> > ... ( trimmed the python dependencies list here...)
>>>>> >
>>>>> > [root@localhost tmp]# rpm -ivh
>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>> > Preparing...
>>>>> #################################
>>>>> > [100%]
>>>>> > Updating / installing...
>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>> #################################
>>>>> > [100%]
>>>>> >
>>>>> >
>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>> > installed
>>>>> >
>>>>> >
>>>>> > [root@localhost tmp]# rpm -ivh
>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>> > error: Failed dependencies:
>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>
>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
>>>>> is pgadmin4-docs.
>>>>>
>>>>> Oh, right.
>>>>
>>>>
>>>>> Other review comments:
>>>>>
>>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We need
>>>>> to get that down to a single file.
>>>>>
>>>>> - In fact, why do we need a directory for each distro at all? As far
>>>>> as I can see, the only difference is the $DIST definition, which is
>>>>> surely something we can get programmatically very easily. It seems to
>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>> pgadmin4.spec.in
>>>>>
>>>>> Agree. I copied the structure from somewhere thinking this is good to
>>>> have more OS specific changes.
>>>>
>>>>
>>>>> - make rpm has a dependency on make prep. This has 2 issues as far as
>>>>> I can see:
>>>>>
>>>>>   - It does a git pull, which is bad. If I'm making an RPM from within
>>>>> the source tree, I want it for the current source. The git pull only
>>>>> makes sense for external builds, i.e. in a much larger automated build
>>>>> system.
>>>>>
>>>>>   - It goes and grabs the source code and patches from the FTP site.
>>>>> Again, this is not what I want for an "in-tree" build. I want to use
>>>>> the source code as I have it now.
>>>>>
>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>> cloned source.
>>>>
>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sandeep Thakkar
>>>>
>>>>
>>>
>>>
>>> --
>>> Sandeep Thakkar
>>> Lead Software Engineer
>>>
>>>
>>> Phone: +91.20.30589505
>>>
>>> Website: www.enterprisedb.com
>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>
>>> This e-mail message (and any attachment) is intended for the use of the
>>> individual or entity to whom it is addressed. This message contains
>>> information from EnterpriseDB Corporation that may be privileged,
>>> confidential, or exempt from disclosure under applicable law. If you are
>>> not the intended recipient or authorized to receive this for the intended
>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>> copying of this communication is strictly prohibited. If you have received
>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>> and delete this message.
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Sandeep Thakkar
> Lead Software Engineer
>
>
> Phone: +91.20.30589505
>
> Website: www.enterprisedb.com
> EnterpriseDB Blog: http://blogs.enterprisedb.com/
> Follow us on Twitter: http://www.twitter.com/enterprisedb
>
> This e-mail message (and any attachment) is intended for the use of the
> individual or entity to whom it is addressed. This message contains
> information from EnterpriseDB Corporation that may be privileged,
> confidential, or exempt from disclosure under applicable law. If you are
> not the intended recipient or authorized to receive this for the intended
> recipient, any use, dissemination, distribution, retention, archiving, or
> copying of this communication is strictly prohibited. If you have received
> this e-mail in error, please notify the sender immediately by reply e-mail
> and delete this message.
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-06-06 08:15                         ` Sandeep Thakkar <[email protected]>
  2016-06-06 08:23                           ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-06 08:15 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Yeah, I got the point. To distinguish between v1 and v2, we can have blank
__init__.py in the v1 and v2 directories. I tried it and could successfully
import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4" and "import
pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename hyphen to
underscore in the directories to achieve this.

But, I spent enough time to find the API that can get me the location for
"pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
idea?


On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:

> My point is that the runtime uses the platform supplied Python
> interpreter, which presumably knows where to search for packages. Mind you,
> I suppose the issue there is that it wouldn't be able to distinguish
> between v1 and v2 then...
>
> I don't have a major issue with your suggested code - I just want to make
> sure we need it.
>
>
> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> Do you mean to say when a python app is launched, it imports some modules
>> automatically and in that sense it knows about where it's site-packages
>> are? May be, but how the pgAdmin4 runtime will know where the Web App is
>> installed?
>>
>> The changes that I have done to the runtime is to let it know the path of
>> the Web App which is present in
>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>> set the PythonPath like we did for appbundle because I thought it is not
>> needed and it will automatically load the modules from the site-packages,
>> but it is to set the ApplicationPath.
>>
>> I missed something? or misunderstood something?
>>
>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> Well, I have to wonder why we need the changes to the runtime? We're
>>> linking the runtime with the same build of Python that's already on the
>>> system - doesn't it know where it's site-packages are already? I could see
>>> us needing this is we were using a distro-independent build of Python and
>>> wanted to find the OS site-packages location, but we're not.
>>>
>>>
>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>> [email protected]> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> how about changes in the pgadmin4 source code for conf.py and
>>>> Server.cpp? Looks okay?
>>>>
>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>> [email protected]> wrote:
>>>>
>>>>> Thanks Dave.
>>>>>
>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>> <[email protected]> wrote:
>>>>>> > Hi Devrim, Hi Dave,
>>>>>> >
>>>>>> > I have updated the patch. The earlier patch may fail because of app
>>>>>> bundle
>>>>>> > commit in git.
>>>>>> >
>>>>>> > For testing, you may define the source tarball location as :
>>>>>> > Source0:
>>>>>> >
>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>> >
>>>>>> > Known issue that I'm still working on:
>>>>>> > 1. web rpm has a dependency on doc. But, even if I install doc, the
>>>>>> web
>>>>>> > still complains. Here is the scenario:
>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>> > error: Failed dependencies:
>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>> >
>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>> > Preparing...
>>>>>> #################################
>>>>>> > [100%]
>>>>>> > Updating / installing...
>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>> #################################
>>>>>> > [100%]
>>>>>> >
>>>>>> >
>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>> > installed
>>>>>> >
>>>>>> >
>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>> > error: Failed dependencies:
>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>
>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
>>>>>> is pgadmin4-docs.
>>>>>>
>>>>>> Oh, right.
>>>>>
>>>>>
>>>>>> Other review comments:
>>>>>>
>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We need
>>>>>> to get that down to a single file.
>>>>>>
>>>>>> - In fact, why do we need a directory for each distro at all? As far
>>>>>> as I can see, the only difference is the $DIST definition, which is
>>>>>> surely something we can get programmatically very easily. It seems to
>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>> pgadmin4.spec.in
>>>>>>
>>>>>> Agree. I copied the structure from somewhere thinking this is good to
>>>>> have more OS specific changes.
>>>>>
>>>>>
>>>>>> - make rpm has a dependency on make prep. This has 2 issues as far as
>>>>>> I can see:
>>>>>>
>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from within
>>>>>> the source tree, I want it for the current source. The git pull only
>>>>>> makes sense for external builds, i.e. in a much larger automated build
>>>>>> system.
>>>>>>
>>>>>>   - It goes and grabs the source code and patches from the FTP site.
>>>>>> Again, this is not what I want for an "in-tree" build. I want to use
>>>>>> the source code as I have it now.
>>>>>>
>>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>>> cloned source.
>>>>>
>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sandeep Thakkar
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sandeep Thakkar
>>>> Lead Software Engineer
>>>>
>>>>
>>>> Phone: +91.20.30589505
>>>>
>>>> Website: www.enterprisedb.com
>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>
>>>> This e-mail message (and any attachment) is intended for the use of the
>>>> individual or entity to whom it is addressed. This message contains
>>>> information from EnterpriseDB Corporation that may be privileged,
>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>> not the intended recipient or authorized to receive this for the intended
>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>> copying of this communication is strictly prohibited. If you have received
>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>> and delete this message.
>>>>
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>> Lead Software Engineer
>>
>>
>> Phone: +91.20.30589505
>>
>> Website: www.enterprisedb.com
>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>
>> This e-mail message (and any attachment) is intended for the use of the
>> individual or entity to whom it is addressed. This message contains
>> information from EnterpriseDB Corporation that may be privileged,
>> confidential, or exempt from disclosure under applicable law. If you are
>> not the intended recipient or authorized to receive this for the intended
>> recipient, any use, dissemination, distribution, retention, archiving, or
>> copying of this communication is strictly prohibited. If you have received
>> this e-mail in error, please notify the sender immediately by reply e-mail
>> and delete this message.
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Sandeep Thakkar


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-06 08:23                           ` Dave Page <[email protected]>
  2016-06-06 09:09                             ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Page @ 2016-06-06 08:23 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

I have no idea. I would ask one of the Python guru's sitting next to you
(as well as whether the way we'd handle side-by-side packages is
appropriate). Also, look at what the PIP package does (does that even work
properly in a SxS scenario? I don't know if we thought to check that).

BTW; on the RPMs - we also need to include a config snippet for Apache,
e.g. /etc/httpd/conf.d/pgadmin4-v1.conf. The online docs for pgAdmin have a
section on configuring that.



On Mon, Jun 6, 2016 at 9:15 AM, Sandeep Thakkar <
[email protected]> wrote:

> Yeah, I got the point. To distinguish between v1 and v2, we can have blank
> __init__.py in the v1 and v2 directories. I tried it and could successfully
> import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4" and "import
> pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename hyphen to
> underscore in the directories to achieve this.
>
> But, I spent enough time to find the API that can get me the location for
> "pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
> idea?
>
>
> On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:
>
>> My point is that the runtime uses the platform supplied Python
>> interpreter, which presumably knows where to search for packages. Mind you,
>> I suppose the issue there is that it wouldn't be able to distinguish
>> between v1 and v2 then...
>>
>> I don't have a major issue with your suggested code - I just want to make
>> sure we need it.
>>
>>
>> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
>> [email protected]> wrote:
>>
>>> Do you mean to say when a python app is launched, it imports some
>>> modules automatically and in that sense it knows about where it's
>>> site-packages are? May be, but how the pgAdmin4 runtime will know where the
>>> Web App is installed?
>>>
>>> The changes that I have done to the runtime is to let it know the path
>>> of the Web App which is present in
>>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>>> set the PythonPath like we did for appbundle because I thought it is not
>>> needed and it will automatically load the modules from the site-packages,
>>> but it is to set the ApplicationPath.
>>>
>>> I missed something? or misunderstood something?
>>>
>>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Well, I have to wonder why we need the changes to the runtime? We're
>>>> linking the runtime with the same build of Python that's already on the
>>>> system - doesn't it know where it's site-packages are already? I could see
>>>> us needing this is we were using a distro-independent build of Python and
>>>> wanted to find the OS site-packages location, but we're not.
>>>>
>>>>
>>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> how about changes in the pgadmin4 source code for conf.py and
>>>>> Server.cpp? Looks okay?
>>>>>
>>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Thanks Dave.
>>>>>>
>>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>>> <[email protected]> wrote:
>>>>>>> > Hi Devrim, Hi Dave,
>>>>>>> >
>>>>>>> > I have updated the patch. The earlier patch may fail because of
>>>>>>> app bundle
>>>>>>> > commit in git.
>>>>>>> >
>>>>>>> > For testing, you may define the source tarball location as :
>>>>>>> > Source0:
>>>>>>> >
>>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>>> >
>>>>>>> > Known issue that I'm still working on:
>>>>>>> > 1. web rpm has a dependency on doc. But, even if I install doc,
>>>>>>> the web
>>>>>>> > still complains. Here is the scenario:
>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>> > error: Failed dependencies:
>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>>> >
>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>>> > Preparing...
>>>>>>> #################################
>>>>>>> > [100%]
>>>>>>> > Updating / installing...
>>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>>> #################################
>>>>>>> > [100%]
>>>>>>> >
>>>>>>> >
>>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>>> > installed
>>>>>>> >
>>>>>>> >
>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>> > error: Failed dependencies:
>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>
>>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
>>>>>>> is pgadmin4-docs.
>>>>>>>
>>>>>>> Oh, right.
>>>>>>
>>>>>>
>>>>>>> Other review comments:
>>>>>>>
>>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We
>>>>>>> need
>>>>>>> to get that down to a single file.
>>>>>>>
>>>>>>> - In fact, why do we need a directory for each distro at all? As far
>>>>>>> as I can see, the only difference is the $DIST definition, which is
>>>>>>> surely something we can get programmatically very easily. It seems to
>>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>>> pgadmin4.spec.in
>>>>>>>
>>>>>>> Agree. I copied the structure from somewhere thinking this is good
>>>>>> to have more OS specific changes.
>>>>>>
>>>>>>
>>>>>>> - make rpm has a dependency on make prep. This has 2 issues as far
>>>>>>> as I can see:
>>>>>>>
>>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from
>>>>>>> within
>>>>>>> the source tree, I want it for the current source. The git pull only
>>>>>>> makes sense for external builds, i.e. in a much larger automated
>>>>>>> build
>>>>>>> system.
>>>>>>>
>>>>>>>   - It goes and grabs the source code and patches from the FTP site.
>>>>>>> Again, this is not what I want for an "in-tree" build. I want to use
>>>>>>> the source code as I have it now.
>>>>>>>
>>>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>>>> cloned source.
>>>>>>
>>>>>>
>>>>>>> --
>>>>>>> Dave Page
>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>> Twitter: @pgsnake
>>>>>>>
>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sandeep Thakkar
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sandeep Thakkar
>>>>> Lead Software Engineer
>>>>>
>>>>>
>>>>> Phone: +91.20.30589505
>>>>>
>>>>> Website: www.enterprisedb.com
>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>
>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>> the individual or entity to whom it is addressed. This message contains
>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>> not the intended recipient or authorized to receive this for the intended
>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>> copying of this communication is strictly prohibited. If you have received
>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>> and delete this message.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>>
>>> --
>>> Sandeep Thakkar
>>> Lead Software Engineer
>>>
>>>
>>> Phone: +91.20.30589505
>>>
>>> Website: www.enterprisedb.com
>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>
>>> This e-mail message (and any attachment) is intended for the use of the
>>> individual or entity to whom it is addressed. This message contains
>>> information from EnterpriseDB Corporation that may be privileged,
>>> confidential, or exempt from disclosure under applicable law. If you are
>>> not the intended recipient or authorized to receive this for the intended
>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>> copying of this communication is strictly prohibited. If you have received
>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>> and delete this message.
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Sandeep Thakkar
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 08:23                           ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-06-06 09:09                             ` Sandeep Thakkar <[email protected]>
  2016-06-06 09:14                               ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-06 09:09 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>

I already asked them about the APIs, though I didn't ask them about what is
the best way to handle SxS installation. Will check with them.

PIP package for pgadmin4 doesn't support SxS as it creates the directory
with the name 'pgadmin4' only. Googling about the SxS with PIP says that
people use virtualenv to achieve it.

Regarding pgadmin4-v1.conf - will it be a part of pgadmin4-docs RPM? Needed
for Debian also?

On Mon, Jun 6, 2016 at 1:53 PM, Dave Page <[email protected]> wrote:

> I have no idea. I would ask one of the Python guru's sitting next to you
> (as well as whether the way we'd handle side-by-side packages is
> appropriate). Also, look at what the PIP package does (does that even work
> properly in a SxS scenario? I don't know if we thought to check that).
>
> BTW; on the RPMs - we also need to include a config snippet for Apache,
> e.g. /etc/httpd/conf.d/pgadmin4-v1.conf. The online docs for pgAdmin have a
> section on configuring that.
>
>
>
> On Mon, Jun 6, 2016 at 9:15 AM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> Yeah, I got the point. To distinguish between v1 and v2, we can have
>> blank __init__.py in the v1 and v2 directories. I tried it and could
>> successfully import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4"
>> and "import pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename
>> hyphen to underscore in the directories to achieve this.
>>
>> But, I spent enough time to find the API that can get me the location for
>> "pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
>> idea?
>>
>>
>> On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:
>>
>>> My point is that the runtime uses the platform supplied Python
>>> interpreter, which presumably knows where to search for packages. Mind you,
>>> I suppose the issue there is that it wouldn't be able to distinguish
>>> between v1 and v2 then...
>>>
>>> I don't have a major issue with your suggested code - I just want to
>>> make sure we need it.
>>>
>>>
>>> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
>>> [email protected]> wrote:
>>>
>>>> Do you mean to say when a python app is launched, it imports some
>>>> modules automatically and in that sense it knows about where it's
>>>> site-packages are? May be, but how the pgAdmin4 runtime will know where the
>>>> Web App is installed?
>>>>
>>>> The changes that I have done to the runtime is to let it know the path
>>>> of the Web App which is present in
>>>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>>>> set the PythonPath like we did for appbundle because I thought it is not
>>>> needed and it will automatically load the modules from the site-packages,
>>>> but it is to set the ApplicationPath.
>>>>
>>>> I missed something? or misunderstood something?
>>>>
>>>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Well, I have to wonder why we need the changes to the runtime? We're
>>>>> linking the runtime with the same build of Python that's already on the
>>>>> system - doesn't it know where it's site-packages are already? I could see
>>>>> us needing this is we were using a distro-independent build of Python and
>>>>> wanted to find the OS site-packages location, but we're not.
>>>>>
>>>>>
>>>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Dave,
>>>>>>
>>>>>> how about changes in the pgadmin4 source code for conf.py and
>>>>>> Server.cpp? Looks okay?
>>>>>>
>>>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Thanks Dave.
>>>>>>>
>>>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]> wrote:
>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>>>> <[email protected]> wrote:
>>>>>>>> > Hi Devrim, Hi Dave,
>>>>>>>> >
>>>>>>>> > I have updated the patch. The earlier patch may fail because of
>>>>>>>> app bundle
>>>>>>>> > commit in git.
>>>>>>>> >
>>>>>>>> > For testing, you may define the source tarball location as :
>>>>>>>> > Source0:
>>>>>>>> >
>>>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>>>> >
>>>>>>>> > Known issue that I'm still working on:
>>>>>>>> > 1. web rpm has a dependency on doc. But, even if I install doc,
>>>>>>>> the web
>>>>>>>> > still complains. Here is the scenario:
>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>> > error: Failed dependencies:
>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>>>> >
>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>> > Preparing...
>>>>>>>> #################################
>>>>>>>> > [100%]
>>>>>>>> > Updating / installing...
>>>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>>>> #################################
>>>>>>>> > [100%]
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>>>> > installed
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>> > error: Failed dependencies:
>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>
>>>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the RPM
>>>>>>>> is pgadmin4-docs.
>>>>>>>>
>>>>>>>> Oh, right.
>>>>>>>
>>>>>>>
>>>>>>>> Other review comments:
>>>>>>>>
>>>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We
>>>>>>>> need
>>>>>>>> to get that down to a single file.
>>>>>>>>
>>>>>>>> - In fact, why do we need a directory for each distro at all? As far
>>>>>>>> as I can see, the only difference is the $DIST definition, which is
>>>>>>>> surely something we can get programmatically very easily. It seems
>>>>>>>> to
>>>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>>>> pgadmin4.spec.in
>>>>>>>>
>>>>>>>> Agree. I copied the structure from somewhere thinking this is good
>>>>>>> to have more OS specific changes.
>>>>>>>
>>>>>>>
>>>>>>>> - make rpm has a dependency on make prep. This has 2 issues as far
>>>>>>>> as I can see:
>>>>>>>>
>>>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from
>>>>>>>> within
>>>>>>>> the source tree, I want it for the current source. The git pull only
>>>>>>>> makes sense for external builds, i.e. in a much larger automated
>>>>>>>> build
>>>>>>>> system.
>>>>>>>>
>>>>>>>>   - It goes and grabs the source code and patches from the FTP site.
>>>>>>>> Again, this is not what I want for an "in-tree" build. I want to use
>>>>>>>> the source code as I have it now.
>>>>>>>>
>>>>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>>>>> cloned source.
>>>>>>>
>>>>>>>
>>>>>>>> --
>>>>>>>> Dave Page
>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>> Twitter: @pgsnake
>>>>>>>>
>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sandeep Thakkar
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sandeep Thakkar
>>>>>> Lead Software Engineer
>>>>>>
>>>>>>
>>>>>> Phone: +91.20.30589505
>>>>>>
>>>>>> Website: www.enterprisedb.com
>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>
>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>> and delete this message.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sandeep Thakkar
>>>> Lead Software Engineer
>>>>
>>>>
>>>> Phone: +91.20.30589505
>>>>
>>>> Website: www.enterprisedb.com
>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>
>>>> This e-mail message (and any attachment) is intended for the use of the
>>>> individual or entity to whom it is addressed. This message contains
>>>> information from EnterpriseDB Corporation that may be privileged,
>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>> not the intended recipient or authorized to receive this for the intended
>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>> copying of this communication is strictly prohibited. If you have received
>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>> and delete this message.
>>>>
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Sandeep Thakkar


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 08:23                           ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 09:09                             ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-06 09:14                               ` Dave Page <[email protected]>
  2016-06-06 09:16                                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 09:17                                 ` Re: Patch for pgAdmin4 RPM package Ashesh Vashi <[email protected]>
  0 siblings, 2 replies; 21+ messages in thread

From: Dave Page @ 2016-06-06 09:14 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>

Hmm, virtualenv's a good point.

I wonder if for the RPMs (and DEBs) we're just trying too hard. Is there
any good reason to support SxS there? Stability I suppose, but then we
don't support back-branches long term anyway.

Does anyone think we need to support side-by-side RPM/DEB installation of
multiple major versions of pgAdmin? Devrim? Hamid?

The config file would be part of the web package.

On Mon, Jun 6, 2016 at 10:09 AM, Sandeep Thakkar <
[email protected]> wrote:

> I already asked them about the APIs, though I didn't ask them about what
> is the best way to handle SxS installation. Will check with them.
>
> PIP package for pgadmin4 doesn't support SxS as it creates the directory
> with the name 'pgadmin4' only. Googling about the SxS with PIP says that
> people use virtualenv to achieve it.
>
> Regarding pgadmin4-v1.conf - will it be a part of pgadmin4-docs RPM?
> Needed for Debian also?
>
> On Mon, Jun 6, 2016 at 1:53 PM, Dave Page <[email protected]> wrote:
>
>> I have no idea. I would ask one of the Python guru's sitting next to you
>> (as well as whether the way we'd handle side-by-side packages is
>> appropriate). Also, look at what the PIP package does (does that even work
>> properly in a SxS scenario? I don't know if we thought to check that).
>>
>> BTW; on the RPMs - we also need to include a config snippet for Apache,
>> e.g. /etc/httpd/conf.d/pgadmin4-v1.conf. The online docs for pgAdmin have a
>> section on configuring that.
>>
>>
>>
>> On Mon, Jun 6, 2016 at 9:15 AM, Sandeep Thakkar <
>> [email protected]> wrote:
>>
>>> Yeah, I got the point. To distinguish between v1 and v2, we can have
>>> blank __init__.py in the v1 and v2 directories. I tried it and could
>>> successfully import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4"
>>> and "import pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename
>>> hyphen to underscore in the directories to achieve this.
>>>
>>> But, I spent enough time to find the API that can get me the location
>>> for "pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
>>> idea?
>>>
>>>
>>> On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:
>>>
>>>> My point is that the runtime uses the platform supplied Python
>>>> interpreter, which presumably knows where to search for packages. Mind you,
>>>> I suppose the issue there is that it wouldn't be able to distinguish
>>>> between v1 and v2 then...
>>>>
>>>> I don't have a major issue with your suggested code - I just want to
>>>> make sure we need it.
>>>>
>>>>
>>>> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
>>>> [email protected]> wrote:
>>>>
>>>>> Do you mean to say when a python app is launched, it imports some
>>>>> modules automatically and in that sense it knows about where it's
>>>>> site-packages are? May be, but how the pgAdmin4 runtime will know where the
>>>>> Web App is installed?
>>>>>
>>>>> The changes that I have done to the runtime is to let it know the path
>>>>> of the Web App which is present in
>>>>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>>>>> set the PythonPath like we did for appbundle because I thought it is not
>>>>> needed and it will automatically load the modules from the site-packages,
>>>>> but it is to set the ApplicationPath.
>>>>>
>>>>> I missed something? or misunderstood something?
>>>>>
>>>>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Well, I have to wonder why we need the changes to the runtime? We're
>>>>>> linking the runtime with the same build of Python that's already on the
>>>>>> system - doesn't it know where it's site-packages are already? I could see
>>>>>> us needing this is we were using a distro-independent build of Python and
>>>>>> wanted to find the OS site-packages location, but we're not.
>>>>>>
>>>>>>
>>>>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Dave,
>>>>>>>
>>>>>>> how about changes in the pgadmin4 source code for conf.py and
>>>>>>> Server.cpp? Looks okay?
>>>>>>>
>>>>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Thanks Dave.
>>>>>>>>
>>>>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>>>>> <[email protected]> wrote:
>>>>>>>>> > Hi Devrim, Hi Dave,
>>>>>>>>> >
>>>>>>>>> > I have updated the patch. The earlier patch may fail because of
>>>>>>>>> app bundle
>>>>>>>>> > commit in git.
>>>>>>>>> >
>>>>>>>>> > For testing, you may define the source tarball location as :
>>>>>>>>> > Source0:
>>>>>>>>> >
>>>>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>>>>> >
>>>>>>>>> > Known issue that I'm still working on:
>>>>>>>>> > 1. web rpm has a dependency on doc. But, even if I install doc,
>>>>>>>>> the web
>>>>>>>>> > still complains. Here is the scenario:
>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>> > error: Failed dependencies:
>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>>>>> >
>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>> > Preparing...
>>>>>>>>> #################################
>>>>>>>>> > [100%]
>>>>>>>>> > Updating / installing...
>>>>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>>>>> #################################
>>>>>>>>> > [100%]
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>>>>> > installed
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>> > error: Failed dependencies:
>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>
>>>>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the
>>>>>>>>> RPM
>>>>>>>>> is pgadmin4-docs.
>>>>>>>>>
>>>>>>>>> Oh, right.
>>>>>>>>
>>>>>>>>
>>>>>>>>> Other review comments:
>>>>>>>>>
>>>>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We
>>>>>>>>> need
>>>>>>>>> to get that down to a single file.
>>>>>>>>>
>>>>>>>>> - In fact, why do we need a directory for each distro at all? As
>>>>>>>>> far
>>>>>>>>> as I can see, the only difference is the $DIST definition, which is
>>>>>>>>> surely something we can get programmatically very easily. It seems
>>>>>>>>> to
>>>>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>>>>> pgadmin4.spec.in
>>>>>>>>>
>>>>>>>>> Agree. I copied the structure from somewhere thinking this is good
>>>>>>>> to have more OS specific changes.
>>>>>>>>
>>>>>>>>
>>>>>>>>> - make rpm has a dependency on make prep. This has 2 issues as far
>>>>>>>>> as I can see:
>>>>>>>>>
>>>>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from
>>>>>>>>> within
>>>>>>>>> the source tree, I want it for the current source. The git pull
>>>>>>>>> only
>>>>>>>>> makes sense for external builds, i.e. in a much larger automated
>>>>>>>>> build
>>>>>>>>> system.
>>>>>>>>>
>>>>>>>>>   - It goes and grabs the source code and patches from the FTP
>>>>>>>>> site.
>>>>>>>>> Again, this is not what I want for an "in-tree" build. I want to
>>>>>>>>> use
>>>>>>>>> the source code as I have it now.
>>>>>>>>>
>>>>>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>>>>>> cloned source.
>>>>>>>>
>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Dave Page
>>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>>> Twitter: @pgsnake
>>>>>>>>>
>>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sandeep Thakkar
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sandeep Thakkar
>>>>>>> Lead Software Engineer
>>>>>>>
>>>>>>>
>>>>>>> Phone: +91.20.30589505
>>>>>>>
>>>>>>> Website: www.enterprisedb.com
>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>>
>>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>>> and delete this message.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sandeep Thakkar
>>>>> Lead Software Engineer
>>>>>
>>>>>
>>>>> Phone: +91.20.30589505
>>>>>
>>>>> Website: www.enterprisedb.com
>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>
>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>> the individual or entity to whom it is addressed. This message contains
>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>> not the intended recipient or authorized to receive this for the intended
>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>> copying of this communication is strictly prohibited. If you have received
>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>> and delete this message.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>>
>>> --
>>> Sandeep Thakkar
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> Sandeep Thakkar
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 08:23                           ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 09:09                             ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 09:14                               ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-06-06 09:16                                 ` Sandeep Thakkar <[email protected]>
  1 sibling, 0 replies; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-06 09:16 UTC (permalink / raw)
  To: Dave Page <[email protected]>; Devrim GÜNDÜZ <[email protected]>; +Cc: pgadmin-hackers; Hamid Quddus <[email protected]>

--Adding back Devrim :-)


On Mon, Jun 6, 2016 at 2:44 PM, Dave Page <[email protected]> wrote:

> Hmm, virtualenv's a good point.
>
> I wonder if for the RPMs (and DEBs) we're just trying too hard. Is there
> any good reason to support SxS there? Stability I suppose, but then we
> don't support back-branches long term anyway.
>
> Does anyone think we need to support side-by-side RPM/DEB installation of
> multiple major versions of pgAdmin? Devrim? Hamid?
>
> The config file would be part of the web package.
>
> On Mon, Jun 6, 2016 at 10:09 AM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> I already asked them about the APIs, though I didn't ask them about what
>> is the best way to handle SxS installation. Will check with them.
>>
>> PIP package for pgadmin4 doesn't support SxS as it creates the directory
>> with the name 'pgadmin4' only. Googling about the SxS with PIP says that
>> people use virtualenv to achieve it.
>>
>> Regarding pgadmin4-v1.conf - will it be a part of pgadmin4-docs RPM?
>> Needed for Debian also?
>>
>> On Mon, Jun 6, 2016 at 1:53 PM, Dave Page <[email protected]> wrote:
>>
>>> I have no idea. I would ask one of the Python guru's sitting next to you
>>> (as well as whether the way we'd handle side-by-side packages is
>>> appropriate). Also, look at what the PIP package does (does that even work
>>> properly in a SxS scenario? I don't know if we thought to check that).
>>>
>>> BTW; on the RPMs - we also need to include a config snippet for Apache,
>>> e.g. /etc/httpd/conf.d/pgadmin4-v1.conf. The online docs for pgAdmin have a
>>> section on configuring that.
>>>
>>>
>>>
>>> On Mon, Jun 6, 2016 at 9:15 AM, Sandeep Thakkar <
>>> [email protected]> wrote:
>>>
>>>> Yeah, I got the point. To distinguish between v1 and v2, we can have
>>>> blank __init__.py in the v1 and v2 directories. I tried it and could
>>>> successfully import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4"
>>>> and "import pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename
>>>> hyphen to underscore in the directories to achieve this.
>>>>
>>>> But, I spent enough time to find the API that can get me the location
>>>> for "pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
>>>> idea?
>>>>
>>>>
>>>> On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> My point is that the runtime uses the platform supplied Python
>>>>> interpreter, which presumably knows where to search for packages. Mind you,
>>>>> I suppose the issue there is that it wouldn't be able to distinguish
>>>>> between v1 and v2 then...
>>>>>
>>>>> I don't have a major issue with your suggested code - I just want to
>>>>> make sure we need it.
>>>>>
>>>>>
>>>>> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Do you mean to say when a python app is launched, it imports some
>>>>>> modules automatically and in that sense it knows about where it's
>>>>>> site-packages are? May be, but how the pgAdmin4 runtime will know where the
>>>>>> Web App is installed?
>>>>>>
>>>>>> The changes that I have done to the runtime is to let it know the
>>>>>> path of the Web App which is present in
>>>>>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>>>>>> set the PythonPath like we did for appbundle because I thought it is not
>>>>>> needed and it will automatically load the modules from the site-packages,
>>>>>> but it is to set the ApplicationPath.
>>>>>>
>>>>>> I missed something? or misunderstood something?
>>>>>>
>>>>>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Well, I have to wonder why we need the changes to the runtime? We're
>>>>>>> linking the runtime with the same build of Python that's already on the
>>>>>>> system - doesn't it know where it's site-packages are already? I could see
>>>>>>> us needing this is we were using a distro-independent build of Python and
>>>>>>> wanted to find the OS site-packages location, but we're not.
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Dave,
>>>>>>>>
>>>>>>>> how about changes in the pgadmin4 source code for conf.py and
>>>>>>>> Server.cpp? Looks okay?
>>>>>>>>
>>>>>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Thanks Dave.
>>>>>>>>>
>>>>>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>> > Hi Devrim, Hi Dave,
>>>>>>>>>> >
>>>>>>>>>> > I have updated the patch. The earlier patch may fail because of
>>>>>>>>>> app bundle
>>>>>>>>>> > commit in git.
>>>>>>>>>> >
>>>>>>>>>> > For testing, you may define the source tarball location as :
>>>>>>>>>> > Source0:
>>>>>>>>>> >
>>>>>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>>>>>> >
>>>>>>>>>> > Known issue that I'm still working on:
>>>>>>>>>> > 1. web rpm has a dependency on doc. But, even if I install doc,
>>>>>>>>>> the web
>>>>>>>>>> > still complains. Here is the scenario:
>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>>>>>> >
>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>> > Preparing...
>>>>>>>>>> #################################
>>>>>>>>>> > [100%]
>>>>>>>>>> > Updating / installing...
>>>>>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>>>>>> #################################
>>>>>>>>>> > [100%]
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>>>>>> > installed
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>>
>>>>>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the
>>>>>>>>>> RPM
>>>>>>>>>> is pgadmin4-docs.
>>>>>>>>>>
>>>>>>>>>> Oh, right.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Other review comments:
>>>>>>>>>>
>>>>>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We
>>>>>>>>>> need
>>>>>>>>>> to get that down to a single file.
>>>>>>>>>>
>>>>>>>>>> - In fact, why do we need a directory for each distro at all? As
>>>>>>>>>> far
>>>>>>>>>> as I can see, the only difference is the $DIST definition, which
>>>>>>>>>> is
>>>>>>>>>> surely something we can get programmatically very easily. It
>>>>>>>>>> seems to
>>>>>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>>>>>> pgadmin4.spec.in
>>>>>>>>>>
>>>>>>>>>> Agree. I copied the structure from somewhere thinking this is
>>>>>>>>> good to have more OS specific changes.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> - make rpm has a dependency on make prep. This has 2 issues as
>>>>>>>>>> far as I can see:
>>>>>>>>>>
>>>>>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from
>>>>>>>>>> within
>>>>>>>>>> the source tree, I want it for the current source. The git pull
>>>>>>>>>> only
>>>>>>>>>> makes sense for external builds, i.e. in a much larger automated
>>>>>>>>>> build
>>>>>>>>>> system.
>>>>>>>>>>
>>>>>>>>>>   - It goes and grabs the source code and patches from the FTP
>>>>>>>>>> site.
>>>>>>>>>> Again, this is not what I want for an "in-tree" build. I want to
>>>>>>>>>> use
>>>>>>>>>> the source code as I have it now.
>>>>>>>>>>
>>>>>>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>>>>>>> cloned source.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Dave Page
>>>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>>>> Twitter: @pgsnake
>>>>>>>>>>
>>>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sandeep Thakkar
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sandeep Thakkar
>>>>>>>> Lead Software Engineer
>>>>>>>>
>>>>>>>>
>>>>>>>> Phone: +91.20.30589505
>>>>>>>>
>>>>>>>> Website: www.enterprisedb.com
>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>>>
>>>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>>>> and delete this message.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dave Page
>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>> Twitter: @pgsnake
>>>>>>>
>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sandeep Thakkar
>>>>>> Lead Software Engineer
>>>>>>
>>>>>>
>>>>>> Phone: +91.20.30589505
>>>>>>
>>>>>> Website: www.enterprisedb.com
>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>
>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>> and delete this message.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sandeep Thakkar
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Sandeep Thakkar
Lead Software Engineer


Phone: +91.20.30589505

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 08:23                           ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 09:09                             ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 09:14                               ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
@ 2016-06-06 09:17                                 ` Ashesh Vashi <[email protected]>
  2016-06-07 07:02                                   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  1 sibling, 1 reply; 21+ messages in thread

From: Ashesh Vashi @ 2016-06-06 09:17 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: Sandeep Thakkar <[email protected]>; pgadmin-hackers; Hamid Quddus <[email protected]>

On Mon, Jun 6, 2016 at 2:44 PM, Dave Page <[email protected]> wrote:

> Hmm, virtualenv's a good point.
>
> I wonder if for the RPMs (and DEBs) we're just trying too hard. Is there
> any good reason to support SxS there? Stability I suppose, but then we
> don't support back-branches long term anyway.
>
pgAdmin IV may need particular version of third party libraries.
We may not control over, what other application will require.

Hence - it can create dependency issue.

>
> Does anyone think we need to support side-by-side RPM/DEB installation of
> multiple major versions of pgAdmin? Devrim? Hamid?
>
I do not feel the requirement of it.


--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com/;


*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi;

>
> The config file would be part of the web package.
>
> On Mon, Jun 6, 2016 at 10:09 AM, Sandeep Thakkar <
> [email protected]> wrote:
>
>> I already asked them about the APIs, though I didn't ask them about what
>> is the best way to handle SxS installation. Will check with them.
>>
>> PIP package for pgadmin4 doesn't support SxS as it creates the directory
>> with the name 'pgadmin4' only. Googling about the SxS with PIP says that
>> people use virtualenv to achieve it.
>>
>> Regarding pgadmin4-v1.conf - will it be a part of pgadmin4-docs RPM?
>> Needed for Debian also?
>>
>> On Mon, Jun 6, 2016 at 1:53 PM, Dave Page <[email protected]> wrote:
>>
>>> I have no idea. I would ask one of the Python guru's sitting next to you
>>> (as well as whether the way we'd handle side-by-side packages is
>>> appropriate). Also, look at what the PIP package does (does that even work
>>> properly in a SxS scenario? I don't know if we thought to check that).
>>>
>>> BTW; on the RPMs - we also need to include a config snippet for Apache,
>>> e.g. /etc/httpd/conf.d/pgadmin4-v1.conf. The online docs for pgAdmin have a
>>> section on configuring that.
>>>
>>>
>>>
>>> On Mon, Jun 6, 2016 at 9:15 AM, Sandeep Thakkar <
>>> [email protected]> wrote:
>>>
>>>> Yeah, I got the point. To distinguish between v1 and v2, we can have
>>>> blank __init__.py in the v1 and v2 directories. I tried it and could
>>>> successfully import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4"
>>>> and "import pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename
>>>> hyphen to underscore in the directories to achieve this.
>>>>
>>>> But, I spent enough time to find the API that can get me the location
>>>> for "pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
>>>> idea?
>>>>
>>>>
>>>> On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> My point is that the runtime uses the platform supplied Python
>>>>> interpreter, which presumably knows where to search for packages. Mind you,
>>>>> I suppose the issue there is that it wouldn't be able to distinguish
>>>>> between v1 and v2 then...
>>>>>
>>>>> I don't have a major issue with your suggested code - I just want to
>>>>> make sure we need it.
>>>>>
>>>>>
>>>>> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Do you mean to say when a python app is launched, it imports some
>>>>>> modules automatically and in that sense it knows about where it's
>>>>>> site-packages are? May be, but how the pgAdmin4 runtime will know where the
>>>>>> Web App is installed?
>>>>>>
>>>>>> The changes that I have done to the runtime is to let it know the
>>>>>> path of the Web App which is present in
>>>>>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>>>>>> set the PythonPath like we did for appbundle because I thought it is not
>>>>>> needed and it will automatically load the modules from the site-packages,
>>>>>> but it is to set the ApplicationPath.
>>>>>>
>>>>>> I missed something? or misunderstood something?
>>>>>>
>>>>>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Well, I have to wonder why we need the changes to the runtime? We're
>>>>>>> linking the runtime with the same build of Python that's already on the
>>>>>>> system - doesn't it know where it's site-packages are already? I could see
>>>>>>> us needing this is we were using a distro-independent build of Python and
>>>>>>> wanted to find the OS site-packages location, but we're not.
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Dave,
>>>>>>>>
>>>>>>>> how about changes in the pgadmin4 source code for conf.py and
>>>>>>>> Server.cpp? Looks okay?
>>>>>>>>
>>>>>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Thanks Dave.
>>>>>>>>>
>>>>>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>> > Hi Devrim, Hi Dave,
>>>>>>>>>> >
>>>>>>>>>> > I have updated the patch. The earlier patch may fail because of
>>>>>>>>>> app bundle
>>>>>>>>>> > commit in git.
>>>>>>>>>> >
>>>>>>>>>> > For testing, you may define the source tarball location as :
>>>>>>>>>> > Source0:
>>>>>>>>>> >
>>>>>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>>>>>> >
>>>>>>>>>> > Known issue that I'm still working on:
>>>>>>>>>> > 1. web rpm has a dependency on doc. But, even if I install doc,
>>>>>>>>>> the web
>>>>>>>>>> > still complains. Here is the scenario:
>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>>>>>> >
>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>> > Preparing...
>>>>>>>>>> #################################
>>>>>>>>>> > [100%]
>>>>>>>>>> > Updating / installing...
>>>>>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>>>>>> #################################
>>>>>>>>>> > [100%]
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>>>>>> > installed
>>>>>>>>>> >
>>>>>>>>>> >
>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>>
>>>>>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the
>>>>>>>>>> RPM
>>>>>>>>>> is pgadmin4-docs.
>>>>>>>>>>
>>>>>>>>>> Oh, right.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Other review comments:
>>>>>>>>>>
>>>>>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch. We
>>>>>>>>>> need
>>>>>>>>>> to get that down to a single file.
>>>>>>>>>>
>>>>>>>>>> - In fact, why do we need a directory for each distro at all? As
>>>>>>>>>> far
>>>>>>>>>> as I can see, the only difference is the $DIST definition, which
>>>>>>>>>> is
>>>>>>>>>> surely something we can get programmatically very easily. It
>>>>>>>>>> seems to
>>>>>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>>>>>> pgadmin4.spec.in
>>>>>>>>>>
>>>>>>>>>> Agree. I copied the structure from somewhere thinking this is
>>>>>>>>> good to have more OS specific changes.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> - make rpm has a dependency on make prep. This has 2 issues as
>>>>>>>>>> far as I can see:
>>>>>>>>>>
>>>>>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from
>>>>>>>>>> within
>>>>>>>>>> the source tree, I want it for the current source. The git pull
>>>>>>>>>> only
>>>>>>>>>> makes sense for external builds, i.e. in a much larger automated
>>>>>>>>>> build
>>>>>>>>>> system.
>>>>>>>>>>
>>>>>>>>>>   - It goes and grabs the source code and patches from the FTP
>>>>>>>>>> site.
>>>>>>>>>> Again, this is not what I want for an "in-tree" build. I want to
>>>>>>>>>> use
>>>>>>>>>> the source code as I have it now.
>>>>>>>>>>
>>>>>>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>>>>>>> cloned source.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Dave Page
>>>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>>>> Twitter: @pgsnake
>>>>>>>>>>
>>>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sandeep Thakkar
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sandeep Thakkar
>>>>>>>> Lead Software Engineer
>>>>>>>>
>>>>>>>>
>>>>>>>> Phone: +91.20.30589505
>>>>>>>>
>>>>>>>> Website: www.enterprisedb.com
>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>>>
>>>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>>>> and delete this message.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dave Page
>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>> Twitter: @pgsnake
>>>>>>>
>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sandeep Thakkar
>>>>>> Lead Software Engineer
>>>>>>
>>>>>>
>>>>>> Phone: +91.20.30589505
>>>>>>
>>>>>> Website: www.enterprisedb.com
>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>
>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>> and delete this message.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sandeep Thakkar
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> Sandeep Thakkar
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 08:23                           ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 09:09                             ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 09:14                               ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 09:17                                 ` Re: Patch for pgAdmin4 RPM package Ashesh Vashi <[email protected]>
@ 2016-06-07 07:02                                   ` Sandeep Thakkar <[email protected]>
  2016-06-09 14:48                                     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  0 siblings, 1 reply; 21+ messages in thread

From: Sandeep Thakkar @ 2016-06-07 07:02 UTC (permalink / raw)
  To: Ashesh Vashi <[email protected]>; +Cc: Dave Page <[email protected]>; pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi Dave

I used few APIs from Importing Modules and Modules Objects to import the
pgAdmin4 module and then get it's location but the application crashed on
running. I didn't debug it and instead created a new function in Server.cpp
to get the python path and the webpath which uses python command. If we
still need to use the Python/C APIs then that would take some more time as
nobody has expertise on that. :(

Please find the patch attached. Web RPM will install an empty file
pgadmin4-v1.conf in "<pgadmin4-web-v1>/etc/httpd/conf.d/". I thought this
file must be present in the sources or must be generated after build, but I
didn't find any. So, I created an empty file.


On Mon, Jun 6, 2016 at 2:47 PM, Ashesh Vashi <[email protected]>
wrote:

> On Mon, Jun 6, 2016 at 2:44 PM, Dave Page <[email protected]> wrote:
>
>> Hmm, virtualenv's a good point.
>>
>> I wonder if for the RPMs (and DEBs) we're just trying too hard. Is there
>> any good reason to support SxS there? Stability I suppose, but then we
>> don't support back-branches long term anyway.
>>
> pgAdmin IV may need particular version of third party libraries.
> We may not control over, what other application will require.
>
> Hence - it can create dependency issue.
>
>>
>> Does anyone think we need to support side-by-side RPM/DEB installation of
>> multiple major versions of pgAdmin? Devrim? Hamid?
>>
> I do not feel the requirement of it.
>
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> <http://www.enterprisedb.com/;
>
>
> *http://www.linkedin.com/in/asheshvashi*
> <http://www.linkedin.com/in/asheshvashi;
>
>>
>> The config file would be part of the web package.
>>
>> On Mon, Jun 6, 2016 at 10:09 AM, Sandeep Thakkar <
>> [email protected]> wrote:
>>
>>> I already asked them about the APIs, though I didn't ask them about what
>>> is the best way to handle SxS installation. Will check with them.
>>>
>>> PIP package for pgadmin4 doesn't support SxS as it creates the directory
>>> with the name 'pgadmin4' only. Googling about the SxS with PIP says that
>>> people use virtualenv to achieve it.
>>>
>>> Regarding pgadmin4-v1.conf - will it be a part of pgadmin4-docs RPM?
>>> Needed for Debian also?
>>>
>>> On Mon, Jun 6, 2016 at 1:53 PM, Dave Page <[email protected]> wrote:
>>>
>>>> I have no idea. I would ask one of the Python guru's sitting next to
>>>> you (as well as whether the way we'd handle side-by-side packages is
>>>> appropriate). Also, look at what the PIP package does (does that even work
>>>> properly in a SxS scenario? I don't know if we thought to check that).
>>>>
>>>> BTW; on the RPMs - we also need to include a config snippet for Apache,
>>>> e.g. /etc/httpd/conf.d/pgadmin4-v1.conf. The online docs for pgAdmin have a
>>>> section on configuring that.
>>>>
>>>>
>>>>
>>>> On Mon, Jun 6, 2016 at 9:15 AM, Sandeep Thakkar <
>>>> [email protected]> wrote:
>>>>
>>>>> Yeah, I got the point. To distinguish between v1 and v2, we can have
>>>>> blank __init__.py in the v1 and v2 directories. I tried it and could
>>>>> successfully import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4"
>>>>> and "import pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename
>>>>> hyphen to underscore in the directories to achieve this.
>>>>>
>>>>> But, I spent enough time to find the API that can get me the location
>>>>> for "pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
>>>>> idea?
>>>>>
>>>>>
>>>>> On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:
>>>>>
>>>>>> My point is that the runtime uses the platform supplied Python
>>>>>> interpreter, which presumably knows where to search for packages. Mind you,
>>>>>> I suppose the issue there is that it wouldn't be able to distinguish
>>>>>> between v1 and v2 then...
>>>>>>
>>>>>> I don't have a major issue with your suggested code - I just want to
>>>>>> make sure we need it.
>>>>>>
>>>>>>
>>>>>> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Do you mean to say when a python app is launched, it imports some
>>>>>>> modules automatically and in that sense it knows about where it's
>>>>>>> site-packages are? May be, but how the pgAdmin4 runtime will know where the
>>>>>>> Web App is installed?
>>>>>>>
>>>>>>> The changes that I have done to the runtime is to let it know the
>>>>>>> path of the Web App which is present in
>>>>>>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>>>>>>> set the PythonPath like we did for appbundle because I thought it is not
>>>>>>> needed and it will automatically load the modules from the site-packages,
>>>>>>> but it is to set the ApplicationPath.
>>>>>>>
>>>>>>> I missed something? or misunderstood something?
>>>>>>>
>>>>>>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Well, I have to wonder why we need the changes to the runtime?
>>>>>>>> We're linking the runtime with the same build of Python that's already on
>>>>>>>> the system - doesn't it know where it's site-packages are already? I could
>>>>>>>> see us needing this is we were using a distro-independent build of Python
>>>>>>>> and wanted to find the OS site-packages location, but we're not.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Hi Dave,
>>>>>>>>>
>>>>>>>>> how about changes in the pgadmin4 source code for conf.py and
>>>>>>>>> Server.cpp? Looks okay?
>>>>>>>>>
>>>>>>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Thanks Dave.
>>>>>>>>>>
>>>>>>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>>> > Hi Devrim, Hi Dave,
>>>>>>>>>>> >
>>>>>>>>>>> > I have updated the patch. The earlier patch may fail because
>>>>>>>>>>> of app bundle
>>>>>>>>>>> > commit in git.
>>>>>>>>>>> >
>>>>>>>>>>> > For testing, you may define the source tarball location as :
>>>>>>>>>>> > Source0:
>>>>>>>>>>> >
>>>>>>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>>>>>>> >
>>>>>>>>>>> > Known issue that I'm still working on:
>>>>>>>>>>> > 1. web rpm has a dependency on doc. But, even if I install
>>>>>>>>>>> doc, the web
>>>>>>>>>>> > still complains. Here is the scenario:
>>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>>>>>>> >
>>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>>> > Preparing...
>>>>>>>>>>> #################################
>>>>>>>>>>> > [100%]
>>>>>>>>>>> > Updating / installing...
>>>>>>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>>>>>>> #################################
>>>>>>>>>>> > [100%]
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>>>>>>> > installed
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>>>
>>>>>>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but the
>>>>>>>>>>> RPM
>>>>>>>>>>> is pgadmin4-docs.
>>>>>>>>>>>
>>>>>>>>>>> Oh, right.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Other review comments:
>>>>>>>>>>>
>>>>>>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch.
>>>>>>>>>>> We need
>>>>>>>>>>> to get that down to a single file.
>>>>>>>>>>>
>>>>>>>>>>> - In fact, why do we need a directory for each distro at all? As
>>>>>>>>>>> far
>>>>>>>>>>> as I can see, the only difference is the $DIST definition, which
>>>>>>>>>>> is
>>>>>>>>>>> surely something we can get programmatically very easily. It
>>>>>>>>>>> seems to
>>>>>>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>>>>>>> pgadmin4.spec.in
>>>>>>>>>>>
>>>>>>>>>>> Agree. I copied the structure from somewhere thinking this is
>>>>>>>>>> good to have more OS specific changes.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> - make rpm has a dependency on make prep. This has 2 issues as
>>>>>>>>>>> far as I can see:
>>>>>>>>>>>
>>>>>>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from
>>>>>>>>>>> within
>>>>>>>>>>> the source tree, I want it for the current source. The git pull
>>>>>>>>>>> only
>>>>>>>>>>> makes sense for external builds, i.e. in a much larger automated
>>>>>>>>>>> build
>>>>>>>>>>> system.
>>>>>>>>>>>
>>>>>>>>>>>   - It goes and grabs the source code and patches from the FTP
>>>>>>>>>>> site.
>>>>>>>>>>> Again, this is not what I want for an "in-tree" build. I want to
>>>>>>>>>>> use
>>>>>>>>>>> the source code as I have it now.
>>>>>>>>>>>
>>>>>>>>>>> Okay. got it. Will remove downloading the tarballs and build the
>>>>>>>>>> cloned source.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Dave Page
>>>>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>>>>> Twitter: @pgsnake
>>>>>>>>>>>
>>>>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Sandeep Thakkar
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sandeep Thakkar
>>>>>>>>> Lead Software Engineer
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Phone: +91.20.30589505
>>>>>>>>>
>>>>>>>>> Website: www.enterprisedb.com
>>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>>>>
>>>>>>>>> This e-mail message (and any attachment) is intended for the use
>>>>>>>>> of the individual or entity to whom it is addressed. This message contains
>>>>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>>>>> and delete this message.
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Dave Page
>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>> Twitter: @pgsnake
>>>>>>>>
>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sandeep Thakkar
>>>>>>> Lead Software Engineer
>>>>>>>
>>>>>>>
>>>>>>> Phone: +91.20.30589505
>>>>>>>
>>>>>>> Website: www.enterprisedb.com
>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>>
>>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>>> and delete this message.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sandeep Thakkar
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Dave Page
>>>> Blog: http://pgsnake.blogspot.com
>>>> Twitter: @pgsnake
>>>>
>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>
>>>
>>>
>>> --
>>> Sandeep Thakkar
>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


-- 
Sandeep Thakkar


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] pgadmin-rpm-jun07.patch (23.1K, 3-pgadmin-rpm-jun07.patch)
  download | inline diff:
diff --git a/.gitignore b/.gitignore
index 0386e03..e3bd268 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,4 +26,5 @@ pgadmin4.log
 /build
 /mac-build
 /src-build
+/rpm-build
 /dist
diff --git a/Makefile b/Makefile
index 1d32581..988c6da 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ SHELL = /bin/sh
 all: docs install-pip-requirements pip src
 
 # Include all clean sub-targets in clean
-clean: clean-dist clean-docs clean-pip clean-appbundle clean-src
+clean: clean-dist clean-docs clean-pip clean-appbundle clean-rpm clean-src
 
 #########################################################################
 # Python PIP package
@@ -38,6 +38,7 @@ PGADMIN_EGG = ${PGADMIN_SRC_DIR}.egg-info
 PGADMIN_BUILD = build
 PGADMIN_MACBUILD = mac-build
 PGADMIN_SRCBUILD = src-build
+PGADMIN_RPMBUILD = rpm-build
 PGADMIN_DIST = dist
 PGADMIN_MANIFEST = MANIFEST.in
 PGADMIN_INSTALL_CMD = pip install --use-wheel --find-links=${PGADMIN_DIST} ${PGADMIN_SRC_DIR}
@@ -113,6 +114,15 @@ clean-src:
 	rm -rf ${PGADMIN_SRCBUILD}
 	rm -rf ${PGADMIN_DIST}/pgadmin4*.tar.gz
 
+rpm:
+	./pkg/rpm/build.sh
+
+clean-rpm:
+	rm -rf ${PGADMIN_RPMBUILD}
+	rm -rf ${PGADMIN_DIST}/noarch
+	rm -rf ${PGADMIN_DIST}/x86_64
+
 clean-dist:
 	rm -rf ${PGADMIN_DIST}
+
 .PHONY: docs
diff --git a/docs/en_US/conf.py b/docs/en_US/conf.py
index 93ad4e9..ac7c9fc 100644
--- a/docs/en_US/conf.py
+++ b/docs/en_US/conf.py
@@ -17,6 +17,7 @@ import sys, os
 root = os.path.dirname(os.path.realpath(__file__))
 sys.path.insert(0, root + '/../../web/')
 import config
+import sphinx_rtd_theme
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -104,7 +105,7 @@ html_theme = 'sphinx_rtd_theme'
 #html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
new file mode 100644
index 0000000..fd0144a
--- /dev/null
+++ b/pkg/rpm/Makefile
@@ -0,0 +1,10 @@
+
+SPECFILE="pgadmin4.spec"
+
+rpm:
+	rpmbuild --define "_sourcedir $(SOURCEDIR)" \
+        --define "_specdir $(WD)" \
+        --define "_rpmdir $(DISTROOT)" \
+        --define "_builddir $(BUILDDIR)" \
+        --define "_buildrootdir $(BUILDROOT)" \
+        --define "dist $(DIST)" -bb $(SPECFILE)
diff --git a/pkg/rpm/README.txt b/pkg/rpm/README.txt
new file mode 100644
index 0000000..9bbd25e
--- /dev/null
+++ b/pkg/rpm/README.txt
@@ -0,0 +1,30 @@
+Installing pgAdmin
+==================
+
+This document describes how to build pgAdmin on Linux and generate the RPMs.
+
+Supported Versions:
+
+ - RHEL6 or above, Fedora 22 or above
+
+Required Packages:
+
+ - All the required packages are mentioned in the requirements file. They should be
+installed with yum/dnf. On RHEL, some python modules are available only through EPEL.
+
+1. Python devel
+  - Python 2.6 or above
+
+2. Sphinx (to build docs)
+
+3. QT devel
+  - Qt 4.6 or above, QT 5
+
+4. PostgreSQL installation
+  - PostgreSQL 9.1 or above 
+ 
+
+Building:
+
+To build, go to pgAdmin4 source root directory and execute "make rpm". This will
+create the RPMs for runtime, web and doc in $SRC/dist
diff --git a/pkg/rpm/build.sh b/pkg/rpm/build.sh
new file mode 100755
index 0000000..6b0ee89
--- /dev/null
+++ b/pkg/rpm/build.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+#Script to create the pgAdmin4 RPMs.
+
+# Check whether lsb_release exists to find the OS information
+if [ ! -f /usr/bin/lsb_release ]
+then
+        echo
+        echo "ERROR: lsb_release command does not exist. Please install it with"
+        echo
+        echo "yum -y install redhat-lsb-core"
+        echo
+        echo "Exiting..."
+        echo
+        exit 1
+fi
+
+# Gather some information from the OS: OS name, version and arch:
+LSB_DISTRO_NAME=`lsb_release -i -s`
+LSB_DISTRO_VERSION=`lsb_release -r -s`
+DISTRO_ARCH=`uname -m`
+
+# We need the lowercase version of the distro name:
+LSB_DISTRO_NAME=`echo $LSB_DISTRO_NAME | awk '{print tolower($0)}'`
+
+if [ "$LSB_DISTRO_NAME" = "fedora" ]; then
+	export DIST=".f$LSB_DISTRO_VERSION"
+else
+	LSB_DISTRO_VERSION=`echo $LSB_DISTRO_VERSION | cut -d"." -f1`
+	export DIST=".rhel$LSB_DISTRO_VERSION"
+fi
+
+# Variables
+export WD=$(cd `dirname $0` && pwd)
+export SOURCEDIR=$WD/../..
+export RPMBUILDROOT=$SOURCEDIR/rpm-build
+export BUILDDIR=$RPMBUILDROOT/build
+export BUILDROOT=$RPMBUILDROOT/buildroot
+export DISTROOT=$SOURCEDIR/dist
+
+# Create the directories if not exist
+mkdir -p $BUILDDIR
+mkdir -p $BUILDROOT
+mkdir -p $DISTROOT
+
+# Find the pgAdmin4 app name and version from config.py
+APP_RELEASE=`grep "^APP_RELEASE" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g"`
+# We want app name in lower case with no spaces
+APP_NAME=`echo $APP_NAME | sed 's/ //g' | awk '{print tolower($0)}'`
+APP_LONG_VERSION=$APP_RELEASE.$APP_REVISION
+APP_SHORT_VERSION=`echo $APP_LONG_VERSION | cut -d . -f1,2`
+APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
+if [ ! -z $APP_SUFFIX ]; then
+    APP_LONG_VERSION=$APP_LONG_VERSION-$APP_SUFFIX
+    APP_REVISION="${APP_REVISION}_$APP_SUFFIX" #hyphen not allowed in SPEC for version
+fi
+
+# Generate SPEC
+cd ./pkg/rpm
+
+sed -e "s/APP_REL/$APP_RELEASE/" \
+    -e "s/APP_REV/$APP_REVISION/" \
+    -e "s/APP_NAME/$APP_NAME/" \
+    -e "s/DISTRO_ARCH/$DISTRO_ARCH/" pgadmin4.spec.in > pgadmin4.spec
+
+# Build RPMs
+make rpm || exit 1
+
+# Clean up buildroot after successful build
+echo "Cleaning up..."
+#rm -rf $RPMBUILDROOT
+
diff --git a/pkg/rpm/pgadmin4.spec b/pkg/rpm/pgadmin4.spec
new file mode 100644
index 0000000..a8279d2
--- /dev/null
+++ b/pkg/rpm/pgadmin4.spec
@@ -0,0 +1,236 @@
+
+%define pgAdmin4_release 1
+%define pgAdmin4_revision 0_beta1
+
+%define name pgadmin4
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+#Source0:        ftp://ftp.postgresql.org/pub/pgadmin4/release/v%{version}/src/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      x86_64
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web = %{version}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+BuildArch:      noarch
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       %{name}-docs = %{version}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+Requires:  python2-sphinx-theme-alabaster
+#Requires:  python2-snowballstemmer
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%build
+cd %{_sourcedir}/runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd %{_sourcedir}
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+
+# Create config_local.py
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+# Create the init so that pgadmin4-web is treated as module as we need to find the
+# version specfifc web path as they stay side-by-side
+touch __init__.py
+
+# Create config snippet for Apache
+install -d -m 755 ./etc/httpd/conf.d
+touch ./etc/httpd/conf.d/${name}-v%{pgAdmin4_release}
+
+%clean
+#rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/pkg/rpm/pgadmin4.spec.in b/pkg/rpm/pgadmin4.spec.in
new file mode 100644
index 0000000..cdc151a
--- /dev/null
+++ b/pkg/rpm/pgadmin4.spec.in
@@ -0,0 +1,236 @@
+
+%define pgAdmin4_release APP_REL
+%define pgAdmin4_revision APP_REV
+
+%define name APP_NAME
+%define pgadmin4instdir /usr/%{name}-v%{pgAdmin4_release}
+%define pgadmin4_webinstdir %{name}-web-v%{pgAdmin4_release}
+
+Name:           %{name}
+Version:        %{pgAdmin4_release}.%{pgAdmin4_revision}
+Release:        1%{?dist}
+Summary:        pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.   
+
+Group:          Applications/Databases   
+License:        PostgreSQL License
+URL:            http://www.pgadmin.org
+#Source0:        ftp://ftp.postgresql.org/pub/pgadmin4/release/v%{version}/src/%{name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      DISTRO_ARCH
+
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  gcc-c++
+Requires:       pgadmin4-web = %{version}
+%if 0%{?fedora}
+BuildRequires:	qt5-qtbase-devel >= 5.1
+BuildRequires:  qt5-qtwebkit-devel
+%define QMAKE   /usr/bin/qmake-qt5
+%else
+BuildRequires:  qt-devel >= 4.6
+BuildRequires:  qtwebkit-devel
+%define QMAKE   /usr/lib64/qt4/bin/qmake
+%endif
+
+%if 0%{?fedora}
+BuildRequires:  python3-devel
+Requires:       python >= 3.3
+%else
+BuildRequires:  python-devel
+Requires:       python >= 2.6
+%endif
+
+%if 0%{?fedora}
+Requires:       qt >= 5.1
+%else
+Requires:       qt >= 4.6
+%endif
+
+%description
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the PostgreSQL (http://www.postgresql.org) database.
+pgAdmin 4 is being written as a web application in Python, using jQuery and
+Bootstrap for the client side processing and UI. On the server side, Flask is
+being utilised.
+
+Although developed using web technologies, we intend for pgAdmin 4 to be usable
+either on a web server using a browser, or standalone on a workstation. The
+runtime/ subdirectory contains a QT based runtime application intended to allow
+this - it is essentially a browser and Python interpretor in one package which
+will be capable of hosting the Python application and presenting it to the user
+as a desktop application.
+
+%package docs
+Summary:        Documentation for pgAdmin4
+Group:          Applications/Databases
+BuildArch:      noarch
+# These are required for -docs subpackage:
+%if 0%{?fedora}
+BuildRequires:  python3-sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+%else
+BuildRequires:  python-sphinx
+BuildRequires:  python-sphinx_rtd_theme
+%endif
+
+%description docs
+This package contains documentation for various languages,
+which are in html format.
+
+%package        web
+Summary:        pgAdmin4 web package
+BuildArch:      noarch
+Requires:       %{name}-docs = %{version}
+%if 0%{?fedora}
+Requires:  python3-babel
+Requires:  python3-flask
+Requires:  python3-flask-sqlalchemy
+Requires:  python3-flask-wtf
+Requires:  python3-jinja2
+Requires:  python3-markupsafe
+Requires:  python3-sqlalchemy
+Requires:  python3-wtforms
+Requires:  python3-beautifulsoup4
+Requires:  python3-blinker
+Requires:  python3-html5lib
+Requires:  python3-itsdangerous
+Requires:  python3-psycopg2
+Requires:  python3-six
+Requires:  python3-crypto
+Requires:  python3-simplejson
+Requires:  python3-dateutil
+Requires:  python3-werkzeug
+Requires:  python3-sqlparse
+Requires:  python3-docutils
+Requires:  python3-extras
+Requires:  python3-fixtures
+Requires:  python3-linecache2
+Requires:  python3-pbr
+Requires:  python3-pygments
+Requires:  python3-mimeparse
+Requires:  python3-snowballstemmer
+Requires:  python3-testscenarios
+Requires:  python3-testtools
+Requires:  python3-traceback2
+Requires:  python3-unittest2
+Requires:  python3-wheel
+#Requires:  python3-pyrsistent
+#Requires:  python3-flask-babel
+#Requires:  python3-speaklater
+#Requires:  python3-passlib
+#Requires:  python3-flask-gravatar
+#Requires:  python3-flask-mail
+#Requires:  python3-flask-security
+#Requires:  python3-flask-login
+#Requires:  python3-flask-principal
+#Requires:  python3-django-htmlmin
+%else
+Requires:  python-babel
+Requires:  python-flask
+Requires:  python-flask-sqlalchemy
+Requires:  python-flask-wtf
+Requires:  python-jinja2
+Requires:  python-markupsafe
+Requires:  python-sqlalchemy
+Requires:  python-wtforms
+Requires:  python-beautifulsoup4
+Requires:  python-blinker
+Requires:  python-html5lib
+Requires:  python-itsdangerous
+Requires:  python-psycopg2
+Requires:  python-six
+Requires:  python-crypto
+Requires:  python-simplejson
+Requires:  python-dateutil
+Requires:  python-werkzeug
+Requires:  pytz
+Requires:  python-sqlparse
+Requires:  python-docutils
+Requires:  python-extras
+Requires:  python-fixtures
+Requires:  python-linecache2
+Requires:  python-pbr
+Requires:  python-pygments
+Requires:  python-mimeparse
+Requires:  python-testscenarios
+Requires:  python-testtools
+Requires:  python-traceback2
+Requires:  python-unittest2
+Requires:  python2-sphinx-theme-alabaster
+#Requires:  python2-snowballstemmer
+#Requires:  python-pyrsistent
+#Requires:  python-flask-babel
+#Requires:  python-speaklater
+#Requires:  python-passlib
+#Requires:  python-flask-gravatar
+#Requires:  python-flask-mail
+#Requires:  python-flask-security
+#Requires:  python-flask-login
+#Requires:  python-flask-principal
+#Requires:  python-django-htmlmin
+#Requires:  python-importlib
+%endif
+
+%if 0%{?fedora}
+%define PYTHON_SITELIB %{python3_sitelib}
+%else
+%define PYTHON_SITELIB %{python2_sitelib}
+%endif
+
+%description    web
+This package contains the required files to run pgAdmin4 as a web application
+
+%build
+cd %{_sourcedir}/runtime
+%{QMAKE} -o Makefile pgAdmin4.pro
+make
+cd ..
+LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
+#chrpath -d pgAdmin4
+
+%install
+rm -rf %{buildroot}
+cd %{_sourcedir}
+install -d -m 755 %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+cp -r docs/en_US/_build/html %{buildroot}/%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+cd runtime
+install -d -m 755 %{buildroot}%{pgadmin4instdir}/runtime
+cp pgAdmin4 %{buildroot}%{pgadmin4instdir}/runtime
+
+install -d -m 755 %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cp -pR ../web/* %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+cd %{buildroot}%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+rm -f pgadmin4.db config_local.* config*.pyc
+
+# Create config_local.py
+echo "SERVER_MODE = False" > config_local.py
+echo "MINIFY_HTML = False" >> config_local.py
+echo "HTML_HELP = '%{_docdir}/pgadmin4-doc-v1/html/'" >> config_local.py
+# Create the init so that pgadmin4-web is treated as module as we need to find the
+# version specfifc web path as they stay side-by-side
+touch __init__.py
+
+# Create config snippet for Apache
+install -d -m 755 ./etc/httpd/conf.d
+touch ./etc/httpd/conf.d/%{name}-v%{pgAdmin4_release}
+
+%clean
+#rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{pgadmin4instdir}/runtime/pgAdmin4
+
+%files web
+%defattr(-,root,root,-)
+%{PYTHON_SITELIB}/%{pgadmin4_webinstdir}
+%doc
+
+%files docs
+%defattr(-,root,root)
+%{_docdir}/pgadmin4-docs-v%{pgAdmin4_release}
+
+%changelog
+* Fri Jun 03 2016 Sandeep Thakkar <[email protected]>
+- Initial RPM for v1.0alpha1
+
diff --git a/runtime/Server.cpp b/runtime/Server.cpp
index fd930f6..db10c56 100644
--- a/runtime/Server.cpp
+++ b/runtime/Server.cpp
@@ -22,6 +22,24 @@
 // App headers
 #include "Server.h"
 
+QString GetpgadminWebDirPath()
+{
+    QString pgadmin4_pkg_name = "pgadmin4-web-v" + PGA_APP_RELEASE;
+    //QString pgadmin4_mod_name = "pgadmin4-web-v" + PGA_APP_RELEASE + ".pgAdmin4";
+    qDebug() << "pgadmin4_pkg_name" << pgadmin4_pkg_name;
+    QString cmd = "python -c \"import pkgutil; print pkgutil.get_loader('" + pgadmin4_pkg_name + "').filename;\""; 
+    //  In case we are running in a release RPM, the pythonpath will be system path
+    QProcess process;
+    //process.start("python -c \"import pkgutil; print pkgutil.get_loader(pgadmin4_mod_name).filename;\"");
+    process.start(cmd);
+    //process.start("python -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\"");
+    process.waitForFinished(-1);
+    QString webdir_path = process.readAllStandardOutput();
+    webdir_path = webdir_path.trimmed();
+    return webdir_path;
+}
+
+
 Server::Server(quint16 port)
 {
     // Appserver port
@@ -67,6 +85,17 @@ Server::Server(quint16 port)
     if (!python_path.contains(pymodules_path))
         python_path.append(pymodules_path);
 #endif
+#ifdef Q_OS_LINUX
+    QString pkg_path = GetpgadminWebDirPath();
+    QString get_pymodules_path = pkg_path + "/..";
+    QFileInfo fi(get_pymodules_path);
+    QString pymodules_path = fi.absoluteFilePath();
+
+    // Append the path, if it's not already there
+    if (!python_path.contains(pymodules_path))
+        python_path.append(pymodules_path);
+        settings.setValue("PythonPath", pymodules_path);
+#endif
 
     if (python_path.length() > 0)
     {
@@ -111,13 +140,23 @@ bool Server::Init()
 #ifdef Q_OS_MAC
     paths.append("../Resources/web/"); // Mac source tree (in a release app bundle)
 #endif
+#ifdef Q_OS_LINUX
+    QString  webapp_path = GetpgadminWebDirPath();
+    paths.append(webapp_path); // Linux (in a release RPM)
+#endif
     paths.append(settings.value("ApplicationPath").toString()); // System configured value
     paths.append(""); // Should be last!
 
     for (int i = 0; i < paths.size(); ++i)
     {
         QDir dir(QCoreApplication::applicationDirPath() + "/" + paths[i]);
-        m_appfile = dir.canonicalPath() + "/pgAdmin4.py";
+        QFileInfo info(paths[i]);
+        if (info.isRelative()) {
+             m_appfile = dir.absolutePath() + "/pgAdmin4.py";
+        }
+        else {
+             m_appfile = paths[i] + "/pgAdmin4.py";
+        }
 
         if (QFile::exists(m_appfile))
         {
diff --git a/runtime/pgAdmin4.h b/runtime/pgAdmin4.h
index 7730e23..71a7233 100644
--- a/runtime/pgAdmin4.h
+++ b/runtime/pgAdmin4.h
@@ -30,6 +30,9 @@
 // Application name
 const QString PGA_APP_NAME = QString("pgAdmin 4");
 
+// App Release
+const QString PGA_APP_RELEASE = QString("1");
+
 // Global function prototypes
 int main(int argc, char * argv[]);
 bool PingServer(QUrl url);


^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Patch for pgAdmin4 RPM package
  2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-09 13:05 ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-05-27 12:55   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-05-27 13:05     ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-01 09:27       ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 12:59         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-02 15:23           ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 08:38             ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 09:11               ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 09:15                 ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:09                   ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-03 14:39                     ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-03 14:54                       ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 08:15                         ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 08:23                           ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 09:09                             ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
  2016-06-06 09:14                               ` Re: Patch for pgAdmin4 RPM package Dave Page <[email protected]>
  2016-06-06 09:17                                 ` Re: Patch for pgAdmin4 RPM package Ashesh Vashi <[email protected]>
  2016-06-07 07:02                                   ` Re: Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
@ 2016-06-09 14:48                                     ` Dave Page <[email protected]>
  0 siblings, 0 replies; 21+ messages in thread

From: Dave Page @ 2016-06-09 14:48 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: Ashesh Vashi <[email protected]>; pgadmin-hackers; Hamid Quddus <[email protected]>; Devrim GÜNDÜZ <[email protected]>

Hi

On Tue, Jun 7, 2016 at 8:02 AM, Sandeep Thakkar <
[email protected]> wrote:

> Hi Dave
>
> I used few APIs from Importing Modules and Modules Objects to import the
> pgAdmin4 module and then get it's location but the application crashed on
> running. I didn't debug it and instead created a new function in Server.cpp
> to get the python path and the webpath which uses python command. If we
> still need to use the Python/C APIs then that would take some more time as
> nobody has expertise on that. :(
>
> Please find the patch attached. Web RPM will install an empty file
> pgadmin4-v1.conf in "<pgadmin4-web-v1>/etc/httpd/conf.d/". I thought this
> file must be present in the sources or must be generated after build, but I
> didn't find any. So, I created an empty file.
>

I still think we're making this too difficult. We know what the standard
version of Python is on each supported platform, and therefore we know
where to find it's site-packages directory. We could add a global config
file to the runtime (/etc/pgadmin4/runtime.ini or similar), so the search
for the web app and the runtime environments can fall back to values in
there.

Thoughts?

Other comments:

- You can drop the changes to conf.py - we're no longer using that doc
template.

- This is the link for the current source tarball:
https://ftp.postgresql.org/pub/pgadmin3/pgadmin4/v1.0-beta1/src/pgadmin4-1.0-beta1.tar.gz

- "BuildRequires:  python-sphinx_rtd_theme" and similar can also go.



>
>
> On Mon, Jun 6, 2016 at 2:47 PM, Ashesh Vashi <
> [email protected]> wrote:
>
>> On Mon, Jun 6, 2016 at 2:44 PM, Dave Page <[email protected]> wrote:
>>
>>> Hmm, virtualenv's a good point.
>>>
>>> I wonder if for the RPMs (and DEBs) we're just trying too hard. Is there
>>> any good reason to support SxS there? Stability I suppose, but then we
>>> don't support back-branches long term anyway.
>>>
>> pgAdmin IV may need particular version of third party libraries.
>> We may not control over, what other application will require.
>>
>> Hence - it can create dependency issue.
>>
>>>
>>> Does anyone think we need to support side-by-side RPM/DEB installation
>>> of multiple major versions of pgAdmin? Devrim? Hamid?
>>>
>> I do not feel the requirement of it.
>>
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> <http://www.enterprisedb.com/;
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> <http://www.linkedin.com/in/asheshvashi;
>>
>>>
>>> The config file would be part of the web package.
>>>
>>> On Mon, Jun 6, 2016 at 10:09 AM, Sandeep Thakkar <
>>> [email protected]> wrote:
>>>
>>>> I already asked them about the APIs, though I didn't ask them about
>>>> what is the best way to handle SxS installation. Will check with them.
>>>>
>>>> PIP package for pgadmin4 doesn't support SxS as it creates the
>>>> directory with the name 'pgadmin4' only. Googling about the SxS with PIP
>>>> says that people use virtualenv to achieve it.
>>>>
>>>> Regarding pgadmin4-v1.conf - will it be a part of pgadmin4-docs RPM?
>>>> Needed for Debian also?
>>>>
>>>> On Mon, Jun 6, 2016 at 1:53 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> I have no idea. I would ask one of the Python guru's sitting next to
>>>>> you (as well as whether the way we'd handle side-by-side packages is
>>>>> appropriate). Also, look at what the PIP package does (does that even work
>>>>> properly in a SxS scenario? I don't know if we thought to check that).
>>>>>
>>>>> BTW; on the RPMs - we also need to include a config snippet for
>>>>> Apache, e.g. /etc/httpd/conf.d/pgadmin4-v1.conf. The online docs for
>>>>> pgAdmin have a section on configuring that.
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Jun 6, 2016 at 9:15 AM, Sandeep Thakkar <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Yeah, I got the point. To distinguish between v1 and v2, we can have
>>>>>> blank __init__.py in the v1 and v2 directories. I tried it and could
>>>>>> successfully import the pgAdmin4 using "import pgadmin4_web_v1.pgAdmin4"
>>>>>> and "import pgadmin4_web_v2.pgAdmin4".  Please note that I had to rename
>>>>>> hyphen to underscore in the directories to achieve this.
>>>>>>
>>>>>> But, I spent enough time to find the API that can get me the location
>>>>>> for "pgadmin4_web_v1.pgAdmin4" module, but couldn't find it. Do you have an
>>>>>> idea?
>>>>>>
>>>>>>
>>>>>> On Fri, Jun 3, 2016 at 8:24 PM, Dave Page <[email protected]> wrote:
>>>>>>
>>>>>>> My point is that the runtime uses the platform supplied Python
>>>>>>> interpreter, which presumably knows where to search for packages. Mind you,
>>>>>>> I suppose the issue there is that it wouldn't be able to distinguish
>>>>>>> between v1 and v2 then...
>>>>>>>
>>>>>>> I don't have a major issue with your suggested code - I just want to
>>>>>>> make sure we need it.
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jun 3, 2016 at 3:39 PM, Sandeep Thakkar <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Do you mean to say when a python app is launched, it imports some
>>>>>>>> modules automatically and in that sense it knows about where it's
>>>>>>>> site-packages are? May be, but how the pgAdmin4 runtime will know where the
>>>>>>>> Web App is installed?
>>>>>>>>
>>>>>>>> The changes that I have done to the runtime is to let it know the
>>>>>>>> path of the Web App which is present in
>>>>>>>> "/site-packages/pgadmin4-web-v1/pgAdmin4.py" The changes done are not to
>>>>>>>> set the PythonPath like we did for appbundle because I thought it is not
>>>>>>>> needed and it will automatically load the modules from the site-packages,
>>>>>>>> but it is to set the ApplicationPath.
>>>>>>>>
>>>>>>>> I missed something? or misunderstood something?
>>>>>>>>
>>>>>>>> On Fri, Jun 3, 2016 at 7:39 PM, Dave Page <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Well, I have to wonder why we need the changes to the runtime?
>>>>>>>>> We're linking the runtime with the same build of Python that's already on
>>>>>>>>> the system - doesn't it know where it's site-packages are already? I could
>>>>>>>>> see us needing this is we were using a distro-independent build of Python
>>>>>>>>> and wanted to find the OS site-packages location, but we're not.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Jun 3, 2016 at 10:15 AM, Sandeep Thakkar <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Dave,
>>>>>>>>>>
>>>>>>>>>> how about changes in the pgadmin4 source code for conf.py and
>>>>>>>>>> Server.cpp? Looks okay?
>>>>>>>>>>
>>>>>>>>>> On Fri, Jun 3, 2016 at 2:41 PM, Sandeep Thakkar <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Thanks Dave.
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Jun 3, 2016 at 2:08 PM, Dave Page <[email protected]>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jun 2, 2016 at 4:23 PM, Sandeep Thakkar
>>>>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>>>> > Hi Devrim, Hi Dave,
>>>>>>>>>>>> >
>>>>>>>>>>>> > I have updated the patch. The earlier patch may fail because
>>>>>>>>>>>> of app bundle
>>>>>>>>>>>> > commit in git.
>>>>>>>>>>>> >
>>>>>>>>>>>> > For testing, you may define the source tarball location as :
>>>>>>>>>>>> > Source0:
>>>>>>>>>>>> >
>>>>>>>>>>>> http://bugatti.pn.in.enterprisedb.com/temp/pgadmin4/%{name}-v%{version}.tar.gz
>>>>>>>>>>>> >
>>>>>>>>>>>> > Known issue that I'm still working on:
>>>>>>>>>>>> > 1. web rpm has a dependency on doc. But, even if I install
>>>>>>>>>>>> doc, the web
>>>>>>>>>>>> > still complains. Here is the scenario:
>>>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>>>> > ... ( trimmed the python dependencies list here...)
>>>>>>>>>>>> >
>>>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>>>> > dist/noarch/pgadmin4-docs-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>>>> > Preparing...
>>>>>>>>>>>> #################################
>>>>>>>>>>>> > [100%]
>>>>>>>>>>>> > Updating / installing...
>>>>>>>>>>>> >    1:pgadmin4-docs-1.0_dev-1.rhel7
>>>>>>>>>>>> #################################
>>>>>>>>>>>> > [100%]
>>>>>>>>>>>> >
>>>>>>>>>>>> >
>>>>>>>>>>>> > [root@localhost tmp]# yum list | grep pgadmin4-docs
>>>>>>>>>>>> > pgadmin4-docs.noarch                    1.0_dev-1.rhel7
>>>>>>>>>>>> > installed
>>>>>>>>>>>> >
>>>>>>>>>>>> >
>>>>>>>>>>>> > [root@localhost tmp]# rpm -ivh
>>>>>>>>>>>> > dist/noarch/pgadmin4-web-1.0_dev-1.rhel7.noarch.rpm
>>>>>>>>>>>> > error: Failed dependencies:
>>>>>>>>>>>> > pgadmin4-doc = 1.0_dev is needed by
>>>>>>>>>>>> pgadmin4-web-1.0_dev-1.rhel7.noarch
>>>>>>>>>>>>
>>>>>>>>>>>> You have a typo - the Requires line is for pgadmin4-doc, but
>>>>>>>>>>>> the RPM
>>>>>>>>>>>> is pgadmin4-docs.
>>>>>>>>>>>>
>>>>>>>>>>>> Oh, right.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Other review comments:
>>>>>>>>>>>>
>>>>>>>>>>>> - We have multiple identical pgadmin4.spec.in's in the patch.
>>>>>>>>>>>> We need
>>>>>>>>>>>> to get that down to a single file.
>>>>>>>>>>>>
>>>>>>>>>>>> - In fact, why do we need a directory for each distro at all?
>>>>>>>>>>>> As far
>>>>>>>>>>>> as I can see, the only difference is the $DIST definition,
>>>>>>>>>>>> which is
>>>>>>>>>>>> surely something we can get programmatically very easily. It
>>>>>>>>>>>> seems to
>>>>>>>>>>>> me we could reduce this all to 3 files - Makefile, README and
>>>>>>>>>>>> pgadmin4.spec.in
>>>>>>>>>>>>
>>>>>>>>>>>> Agree. I copied the structure from somewhere thinking this is
>>>>>>>>>>> good to have more OS specific changes.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> - make rpm has a dependency on make prep. This has 2 issues as
>>>>>>>>>>>> far as I can see:
>>>>>>>>>>>>
>>>>>>>>>>>>   - It does a git pull, which is bad. If I'm making an RPM from
>>>>>>>>>>>> within
>>>>>>>>>>>> the source tree, I want it for the current source. The git pull
>>>>>>>>>>>> only
>>>>>>>>>>>> makes sense for external builds, i.e. in a much larger
>>>>>>>>>>>> automated build
>>>>>>>>>>>> system.
>>>>>>>>>>>>
>>>>>>>>>>>>   - It goes and grabs the source code and patches from the FTP
>>>>>>>>>>>> site.
>>>>>>>>>>>> Again, this is not what I want for an "in-tree" build. I want
>>>>>>>>>>>> to use
>>>>>>>>>>>> the source code as I have it now.
>>>>>>>>>>>>
>>>>>>>>>>>> Okay. got it. Will remove downloading the tarballs and build
>>>>>>>>>>> the cloned source.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Dave Page
>>>>>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>>>>>> Twitter: @pgsnake
>>>>>>>>>>>>
>>>>>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Sandeep Thakkar
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Sandeep Thakkar
>>>>>>>>>> Lead Software Engineer
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Phone: +91.20.30589505
>>>>>>>>>>
>>>>>>>>>> Website: www.enterprisedb.com
>>>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>>>>>
>>>>>>>>>> This e-mail message (and any attachment) is intended for the use
>>>>>>>>>> of the individual or entity to whom it is addressed. This message contains
>>>>>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>>>>>> and delete this message.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Dave Page
>>>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>>>> Twitter: @pgsnake
>>>>>>>>>
>>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sandeep Thakkar
>>>>>>>> Lead Software Engineer
>>>>>>>>
>>>>>>>>
>>>>>>>> Phone: +91.20.30589505
>>>>>>>>
>>>>>>>> Website: www.enterprisedb.com
>>>>>>>> EnterpriseDB Blog: http://blogs.enterprisedb.com/
>>>>>>>> Follow us on Twitter: http://www.twitter.com/enterprisedb
>>>>>>>>
>>>>>>>> This e-mail message (and any attachment) is intended for the use of
>>>>>>>> the individual or entity to whom it is addressed. This message contains
>>>>>>>> information from EnterpriseDB Corporation that may be privileged,
>>>>>>>> confidential, or exempt from disclosure under applicable law. If you are
>>>>>>>> not the intended recipient or authorized to receive this for the intended
>>>>>>>> recipient, any use, dissemination, distribution, retention, archiving, or
>>>>>>>> copying of this communication is strictly prohibited. If you have received
>>>>>>>> this e-mail in error, please notify the sender immediately by reply e-mail
>>>>>>>> and delete this message.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dave Page
>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>> Twitter: @pgsnake
>>>>>>>
>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sandeep Thakkar
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sandeep Thakkar
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Sandeep Thakkar
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 21+ messages in thread


end of thread, other threads:[~2016-06-09 14:48 UTC | newest]

Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-22 10:57 Patch for pgAdmin4 RPM package Sandeep Thakkar <[email protected]>
2016-05-09 13:05 ` Dave Page <[email protected]>
2016-05-27 12:55   ` Sandeep Thakkar <[email protected]>
2016-05-27 13:05     ` Dave Page <[email protected]>
2016-06-01 09:27       ` Sandeep Thakkar <[email protected]>
2016-06-02 12:59         ` Sandeep Thakkar <[email protected]>
2016-06-02 15:23           ` Sandeep Thakkar <[email protected]>
2016-06-03 08:38             ` Dave Page <[email protected]>
2016-06-03 09:11               ` Sandeep Thakkar <[email protected]>
2016-06-03 09:15                 ` Sandeep Thakkar <[email protected]>
2016-06-03 14:09                   ` Dave Page <[email protected]>
2016-06-03 14:39                     ` Sandeep Thakkar <[email protected]>
2016-06-03 14:54                       ` Dave Page <[email protected]>
2016-06-06 08:15                         ` Sandeep Thakkar <[email protected]>
2016-06-06 08:23                           ` Dave Page <[email protected]>
2016-06-06 09:09                             ` Sandeep Thakkar <[email protected]>
2016-06-06 09:14                               ` Dave Page <[email protected]>
2016-06-06 09:16                                 ` Sandeep Thakkar <[email protected]>
2016-06-06 09:17                                 ` Ashesh Vashi <[email protected]>
2016-06-07 07:02                                   ` Sandeep Thakkar <[email protected]>
2016-06-09 14:48                                     ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox