public inbox for [email protected]  
help / color / mirror / Atom feed
PATCH: pgAdmin4 debian installer
4+ messages / 2 participants
[nested] [flat]

* PATCH: pgAdmin4 debian installer
@ 2016-04-26 15:20 Paresh More <[email protected]>
  2016-05-09 13:15 ` Re: PATCH: pgAdmin4 debian installer Dave Page <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Paresh More @ 2016-04-26 15:20 UTC (permalink / raw)
  To: pgadmin-hackers; Dave Page <[email protected]>; +Cc: Sandeep Thakkar <[email protected]>; Hamid Quddus <[email protected]>

Hi Team, Dave,

debian package is located @ location

pgadmin4-web
https://uploads.enterprisedb.com/download.php?file=0196f693811b57088da5ed7396cec284

pgadmin4-runtime
https://uploads.enterprisedb.com/download.php?file=958528f7c619efa7b483a6d2e0c23cd5

Attached herewith are two patches.

pgadmin4_debian.patch - This is the main patch that includes
Makefile,README,debian scripts

It will create two .deb i.e pgadmin4-runtime and pgadmin4-web.
The  pgadmin4-runtime depends on web and the web debian depends on the
python packages.
I have listed some 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

As per rpm patch (*sandeep mentioned*) below is the comment which applies
same for debian.

*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.

*Sandeep comments*

*“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)”*

What the patch will create ?
- It would create deb folder in pkg
- It would create Makefile, README and debian scripts


-- 

Thanks & Regards

*Paresh More*

[image: NEW-EDB-logo-4c]

Pune, India.
Cell :  +919922000564 |  www.enterprisedb.com


-- 
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-server-ini.patch (983B, 3-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))
         {


  [application/octet-stream] pgadmin4_debian.patch (11.6K, 4-pgadmin4_debian.patch)
  download | inline diff:
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
new file mode 100644
index 0000000..7a0cd9a
--- /dev/null
+++ b/pkg/deb/Makefile
@@ -0,0 +1,64 @@
+PGADMIN_NAME=pgAdmin4
+
+RUNTIME_SRC_DIR=../../runtime
+PACKAGE_NAME_RUNTIME=pgadmin4-runtime
+RUNTIME_INSTALL_DIR=debian/$(PACKAGE_NAME_RUNTIME)
+
+WEB_SRC_DIR=../../web
+PACKAGE_NAME_WEB=pgadmin4-web
+WEB_INSTALL_DIR=debian/$(PACKAGE_NAME_WEB)
+
+QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
+
+APP_MAJOR_VERSION=$(shell awk '/APP_MAJOR =/ {print $$3}' $(WEB_SRC_DIR)/config.py)
+APP_MINOR_VERSION=$(shell awk '/APP_MINOR =/ {print $$3}' $(WEB_SRC_DIR)/config.py)
+PGADMIN_VERSION_NAME=$(shell echo $(APP_MAJOR_VERSION).$(APP_MINOR_VERSION))
+PYTHON_SITE_PACKAGE=$(shell python -c "import site; print site.getsitepackages()[1]")
+
+prep:
+	# Update spec file, patches, etc, before running spectool:
+	git pull
+
+allclean:
+	git clean -df
+
+clean:
+	dpkg-buildpackage -Tclean
+	$(MAKE) -C $(RUNTIME_SRC_DIR) clean
+	rm -rf debian/$(PACKAGE_NAME_RUNTIME)
+	rm -rf debian/$(PACKAGE_NAME_WEB)
+	rm -rf debian/tmp
+	rm -rf debian/files
+	rm -rf debian/*substvars*
+	rm -rf debian/*.log
+	rm -rf pgadmin*.deb
+	#rm -rf $(RUNTIME_SRC_DIR)/Makefile
+	rm -rf $(WEB_SRC_DIR)/config_local.py
+
+runtime: prep
+	#$(QMAKE) pgAdmin4.pro
+	$(MAKE) -C $(RUNTIME_SRC_DIR)
+	dpkg-buildpackage -us -uc -b
+
+	mkdir -p $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)
+	@echo "[General]" > $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)/pgadmin4.ini
+	@echo "ApplicationPath=$(PYTHON_SITE_PACKAGE)/$(PACKAGE_NAME_WEB)" >> $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)/pgadmin4.ini
+	@echo "PythonPath=$(PYTHON_SITE_PACKAGE)" >> $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)/pgadmin4.ini
+
+	cp $(RUNTIME_SRC_DIR)/pgAdmin4 $(RUNTIME_INSTALL_DIR)/usr/$(PACKAGE_NAME_RUNTIME)/$(PGADMIN_VERSION_NAME)
+	dpkg-deb --build debian/$(PACKAGE_NAME_RUNTIME)
+	mv debian/$(PACKAGE_NAME_RUNTIME).deb .
+	echo "$(PACKAGE_NAME_RUNTIME).deb (Runtime) File is generated"
+
+web: prep
+	cp $(WEB_SRC_DIR)/config.py $(WEB_SRC_DIR)/config_local.py
+	sed -i 's/SERVER_MODE = True/SERVER_MODE = False/g' $(WEB_SRC_DIR)/config_local.py
+	dpkg-buildpackage -us -uc -b
+	mkdir -p $(WEB_INSTALL_DIR)/$(PYTHON_SITE_PACKAGE)
+	cp -r $(WEB_SRC_DIR) $(WEB_INSTALL_DIR)/$(PYTHON_SITE_PACKAGE)/$(PACKAGE_NAME_WEB)
+	dpkg-deb --build debian/$(PACKAGE_NAME_WEB)
+	mv debian/$(PACKAGE_NAME_WEB).deb .
+	echo "$(PACKAGE_NAME_WEB).deb (Web) File is generated"
+
+all: web runtime
+
diff --git a/pkg/deb/README b/pkg/deb/README
new file mode 100644
index 0000000..7420991
--- /dev/null
+++ b/pkg/deb/README
@@ -0,0 +1,72 @@
+pgAdmin 4
+=========
+
+pgAdmin 4 is a rewrite of the popular pgAdmin3 management tool for the
+PostgreSQL (http://www.postgresql.org) database.
+
+At present, it is an experimental/proof of concept project. Use at your own
+risk, and don't blame us if it breaks anything!
+
+Architecture
+------------
+
+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.
+
+Building
+--------
+
+To build the runtime, the following packages must be installed:
+
+- QT 4.6 or above (older versions may work, but haven't been tested).
+- Python 2.6 or above.
+- debhelper, dpkg-dev,aptitude,devscripts,build-essential,qt-sdk,python-dev,libqt5webkit5-dev
+- Requirement2 / Requirment3 throught app-get install.
+
+Assuming both qmake and python-config are in the path:
+
+$ cd $PGADMIN4_SRC/runtime
+$ qmake
+# qmake will generate Makefile
+
+Edit Makefile
+Remove -lpython2.7 from LFLAGS and add to LIBS @ the end
+Ex:
+LIBS          = $(SUBLIBS) -L/usr/X11R6/lib64 -lQt5WebKitWidgets -L/usr/lib/x86_64-linux-gnu -lQt5Quick -lQt5OpenGL -lQt5PrintSupport -lQt5WebKit -lQt5Qml -lQt5Location -lQt5Widgets -lQt5Network -lQt5Positioning -lQt5Sensors -lQt5Gui -lQt5Core -lGL -lpthread -lpython2.7
+
+$ cd $PGADMIN4_SRC/pkg/deb
+$ make web | runtime | all
+
+It would generate 
+
+pgAdmin 4 is completely experiemental and unsupported!
+
+Project info
+------------
+
+The source code repository can be found here:
+
+http://git.postgresql.org/gitweb/?p=pgadmin4.git;a=summary
+
+A Redmine project for pgAdmin 4 can be found at the address below. A PostgreSQL
+community account is required to access this site. Please note that at present
+only project developers can log bug and feature requests:
+
+https://redmine.postgresql.org/projects/pgadmin4
+
+If you wish to discuss pgAdmin 4, or contribute to the project, please use the
+pgAdmin Hackers mailing list:
+
[email protected]
+
+--
+Dave Page
+pgAdmin Project Lead
diff --git a/pkg/deb/debian/changelog b/pkg/deb/debian/changelog
new file mode 100644
index 0000000..e7fdc4f
--- /dev/null
+++ b/pkg/deb/debian/changelog
@@ -0,0 +1,14 @@
+pgadmin4 (1.0-dev) experiemental; urgency=low
+
+
+ * pgAdmin 4 is designed to answer the needs of all users, from writing
+   simple SQL queries to developing complex databases. The graphical
+   interface supports all PostgreSQL features and makes administration
+   easy. The application also includes a syntax highlighting SQL editor, a
+   server-side code editor, an SQL/batch/shell job scheduling agent,
+   support for the Slony-I replication engine and much more. Server
+   connection may be made using TCP/IP or Unix Domain Sockets (on *nix
+   platforms), and may be SSL encrypted for security. No additional
+   drivers are required to communicate with the database server
+
+ -- pgamin4 hackers <[email protected]> Tue,  26 Apr 2016 22:56:02 +0200
diff --git a/pkg/deb/debian/control b/pkg/deb/debian/control
new file mode 100644
index 0000000..f3eac80
--- /dev/null
+++ b/pkg/deb/debian/control
@@ -0,0 +1,62 @@
+Source: pgadmin4
+Section: misc
+Priority: optional
+Maintainer: pgamin4 hackers <[email protected]>
+Build-Depends: debhelper, dpkg-dev,aptitude,devscripts,build-essential,qt-sdk,python-dev,libqt5webkit5-dev
+Standards-Version: 1.0.0
+
+Package: pgadmin4
+Architecture: all
+Description: graphical administration tool for PostgreSQL
+ pgAdmin 4 is a database design and management application for use with
+ PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above
+ running on any platform.
+ .
+ pgAdmin 4 is designed to answer the needs of all users, from writing
+ simple SQL queries to developing complex databases. The graphical
+ interface supports all PostgreSQL features and makes administration
+ easy. The application also includes a syntax highlighting SQL editor, a
+ server-side code editor, an SQL/batch/shell job scheduling agent,
+ support for the Slony-I replication engine and much more. Server
+ connection may be made using TCP/IP or Unix Domain Sockets (on *nix
+ platforms), and may be SSL encrypted for security. No additional
+ drivers are required to communicate with the database server.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: pgadmin4-web
+Architecture: all
+#Depends: python-flask,python-babel,python-flask-gravatar,python-flask-login,python-flask-mail,python-flask-principal,python-flask-sqlalchemy,python-flask-security,python-flask-wtf,python-jinja2,python-markupsafe,python-sqlalchemy,python-wtforms,python-werkzeug,python-argparse,python-linker,python-django-htmlmin,python-html5lib,python-itsdangerous,python-passlib,python-psycopg2,python-pytz,python-six,python-speaklater,python-pycrypto,python-simplejson,python-beautifulsoup4,python-wsgiref,python-importlib
+Depends: python-flask,python-babel,python-flask-login,python-flask-principal,python-flask-sqlalchemy,python-jinja2,python-markupsafe,python-sqlalchemy,python-werkzeug,python-argparse,python-html5lib,python-itsdangerous,python-passlib,python-psycopg2,python-six,python-speaklater,python-simplejson,python-wsgiref,python-importlib
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin 4 is a database design and management application for use with
+ PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above
+ running on any platform.
+ .
+ pgAdmin 4 is designed to answer the needs of all users, from writing
+ simple SQL queries to developing complex databases. The graphical
+ interface supports all PostgreSQL features and makes administration
+ easy. The application also includes a syntax highlighting SQL editor, a
+ server-side code editor, an SQL/batch/shell job scheduling agent,
+ support for the Slony-I replication engine and much more. Server
+ connection may be made using TCP/IP or Unix Domain Sockets (on *nix
+ platforms), and may be SSL encrypted for security. No additional
+ drivers are required to communicate with the database server.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: pgadmin4-runtime
+#Depends: pgadmin4-web (= ${Source-Version}), ${shlibs:Depends}
+Depends: pgadmin4-web 
+Architecture: all
+#Enhances: pgadmin4(= ${Source-Version})
+#Conflicts: pgadmin4 (<< 1.0.2-1)
+#Replaces: pgadmin4 (<< 1.0.2-1)
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin III is a database design and management application for use with
+ PostgreSQL.
+ .
+ This package contains the documentation for pgAdmin III in English language.
+ This package is mandatory to get the pgAdmin III help system to run smoothly.
+ .
+ Homepage: http://www.pgadmin.org/
diff --git a/pkg/deb/debian/rules b/pkg/deb/debian/rules
new file mode 100755
index 0000000..affd14f
--- /dev/null
+++ b/pkg/deb/debian/rules
@@ -0,0 +1,97 @@
+#!/usr/bin/make -f
+
+PACKAGE_NAME_RUNTIME=pgadmin4-runtime
+PACKAGE_NAME_WEB=pgadmin4-web
+BINARY_NAME_RUNTIME=pgAdmin4
+SRC_DIR=$(CURDIR)/../../runtime
+
+configure: 
+	#qmake ~pareshmore/svn/pgadmin4/runtime/pgAdmin4.pro
+
+build: 
+	#$(MAKE) -C $(SRC_DIR)
+
+
+clean:
+	#dh_testdir
+	#dh_testroot
+	#dh_clean
+	#rm -rf $(CURDIR)/$(BINARY_NAME)
+	#$(MAKE) -C $(SRC_DIR) clean
+	#rm *.deb
+
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installman
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# binary-arch/binary-indep
+# in another 'make' thread.
+spec-binary-indep:
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+
+
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+spec-binary-arch:
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+        #make -f debian/rules $(doPgA3Wx)-clean
+
+# Build architecture independant packages using the common target.
+binary-indep: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-i spec-binary-indep
+
+# Build architecture dependant packages using the common target.
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a spec-binary-arch
+
+binary: binary-indep binary-arch
+.PHONY: build clean orig binary-indep binary-arch binary install
+


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

* Re: PATCH: pgAdmin4 debian installer
  2016-04-26 15:20 PATCH: pgAdmin4 debian installer Paresh More <[email protected]>
@ 2016-05-09 13:15 ` Dave Page <[email protected]>
  2016-06-02 16:16   ` Re: PATCH: pgAdmin4 debian installer Paresh More <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

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

Hi

Please see my earlier comments regarding the RPM packages - many of them
apply to this patch as well:
http://www.postgresql.org/message-id/[email protected]....

By way of additional comment, why does pkg/deb/README include a bunch of
boiler-plate text that I wrote long ago for the top-level README? It's out
of date now, and shouldn't be in a packaging README anyway.

Thanks.

On Tue, Apr 26, 2016 at 4:20 PM, Paresh More <[email protected]>
wrote:

> Hi Team, Dave,
>
> debian package is located @ location
>
> pgadmin4-web
>
> https://uploads.enterprisedb.com/download.php?file=0196f693811b57088da5ed7396cec284
>
> pgadmin4-runtime
>
> https://uploads.enterprisedb.com/download.php?file=958528f7c619efa7b483a6d2e0c23cd5
>
> Attached herewith are two patches.
>
> pgadmin4_debian.patch - This is the main patch that includes
> Makefile,README,debian scripts
>
> It will create two .deb i.e pgadmin4-runtime and pgadmin4-web.
> The  pgadmin4-runtime depends on web and the web debian depends on the
> python packages.
> I have listed some 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
>
> As per rpm patch (*sandeep mentioned*) below is the comment which applies
> same for debian.
>
> *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.
>
> *Sandeep comments*
>
> *“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)”*
>
> What the patch will create ?
> - It would create deb folder in pkg
> - It would create Makefile, README and debian scripts
>
>
> --
>
> Thanks & Regards
>
> *Paresh More*
>
> [image: NEW-EDB-logo-4c]
>
> Pune, India.
> Cell :  +919922000564 |  www.enterprisedb.com
>



-- 
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


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

* Re: PATCH: pgAdmin4 debian installer
  2016-04-26 15:20 PATCH: pgAdmin4 debian installer Paresh More <[email protected]>
  2016-05-09 13:15 ` Re: PATCH: pgAdmin4 debian installer Dave Page <[email protected]>
@ 2016-06-02 16:16   ` Paresh More <[email protected]>
  2016-06-02 16:26     ` Re: PATCH: pgAdmin4 debian installer Dave Page <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

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

Hello Dave and Devrim,


Changes are done as per discussed with Sandeep.

There are some python modules which are not available on ubuntu (through
apt-get) which is mentioned in the sheet here , We could find some packages
on web and the URLs of same have been updated in the sheet. For the
packages that are not available, we have to build them on our own.

https://docs.google.com/spreadsheets/d/13CIYR82twj0LIUteFSZR7RE8ZbtUfvCqykXw1wy3gzE/edit#gid=1213443...


Attached is the patch for pgadmin4 debian package.  I have also attached
runtime server patch separately (This is already included in the rpm patch
sent by Sandeep)




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

> Hi
>
> Please see my earlier comments regarding the RPM packages - many of them
> apply to this patch as well:
> http://www.postgresql.org/message-id/[email protected]....
>
> By way of additional comment, why does pkg/deb/README include a bunch of
> boiler-plate text that I wrote long ago for the top-level README? It's out
> of date now, and shouldn't be in a packaging README anyway.
>
> Thanks.
>
> On Tue, Apr 26, 2016 at 4:20 PM, Paresh More <[email protected]
> > wrote:
>
>> Hi Team, Dave,
>>
>> debian package is located @ location
>>
>> pgadmin4-web
>>
>> https://uploads.enterprisedb.com/download.php?file=0196f693811b57088da5ed7396cec284
>>
>> pgadmin4-runtime
>>
>> https://uploads.enterprisedb.com/download.php?file=958528f7c619efa7b483a6d2e0c23cd5
>>
>> Attached herewith are two patches.
>>
>> pgadmin4_debian.patch - This is the main patch that includes
>> Makefile,README,debian scripts
>>
>> It will create two .deb i.e pgadmin4-runtime and pgadmin4-web.
>> The  pgadmin4-runtime depends on web and the web debian depends on the
>> python packages.
>> I have listed some 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
>>
>> As per rpm patch (*sandeep mentioned*) below is the comment which
>> applies same for debian.
>>
>> *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.
>>
>> *Sandeep comments*
>>
>> *“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)”*
>>
>> What the patch will create ?
>> - It would create deb folder in pkg
>> - It would create Makefile, README and debian scripts
>>
>>
>> --
>>
>> Thanks & Regards
>>
>> *Paresh More*
>>
>> [image: NEW-EDB-logo-4c]
>>
>> Pune, India.
>> Cell :  +919922000564 |  www.enterprisedb.com
>>
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>



-- 

Thanks & Regards

*Paresh More*

[image: NEW-EDB-logo-4c]

Pune, India.
Cell :  +919922000564 |  www.enterprisedb.com


-- 
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_debian_1_June_16.patch (13.0K, 3-pgadmin4_debian_1_June_16.patch)
  download | inline diff:
diff --git a/.gitignore b/.gitignore
index 562fee6..31245c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@ pgadmin4.log
 /build
 /mac-build
 /dist
+/deb-build
diff --git a/Makefile b/Makefile
index 3f4e5fc..5e8eac6 100644
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ 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_DEBBUILD = deb-build
 PGADMIN_MACBUILD = mac-build
 PGADMIN_DIST = dist
 PGADMIN_MANIFEST = MANIFEST.in
@@ -104,4 +105,11 @@ clean-appbundle:
 	rm -rf ${PGADMIN_MACBUILD}
 	rm -rf ${PGADMIN_DIST}/pgadmin4*.dmg*
 
+deb:
+	./pkg/deb/build.sh
+
+clean-deb:
+	rm -rf ${PGADMIN_DEBBUILD}
+	rm -rf ${PGADMIN_DIST}/pgadmin4*.deb*
+
 .PHONY: docs
diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile
new file mode 100644
index 0000000..c3319ac
--- /dev/null
+++ b/pkg/deb/Makefile
@@ -0,0 +1,53 @@
+prep:
+	# Update spec file, patches, etc, before running spectool:
+	# git pull
+
+allclean:
+	git clean -df
+
+build-docs: prep
+	$(MAKE) -C $(TOPDIR)/docs/en_US -f Makefile.sphinx html
+
+build-runtime: prep
+	(cd $(TOPDIR)/runtime && $(QMAKE) pgAdmin4.pro)
+	# -lpython2.7 flag creates issue for ubuntu so moved to LIBS section
+	(cd $(TOPDIR)/runtime && sed --in-place '/LFLAGS / s/-lpython2.7//g' Makefile)
+	(cd $(TOPDIR)/runtime && sed --in-place '/^LIBS /s/.*/& -lpython2.7/' Makefile)
+	$(MAKE) -C $(TOPDIR)/runtime
+
+build-gen-common:
+	(cd $(DEBBUILDROOT) && dpkg-buildpackage -us -uc -b )
+
+	#Copy docs to stagging
+	cp -r $(TOPDIR)/docs/en_US/_build/html $(DEBBUILDROOT)/debian/$(DOCS_PACKAGE_NAME)/usr/share/doc/$(DOCS_PACKAGE_NAME)
+
+	#Copy web to stagging
+	mkdir -p $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)
+	cp -r $(DEBBUILDROOT)/web/* $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)
+	@echo "SERVER_MODE = False" > $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)/config_local.py
+	@echo "HELP_PATH = '/usr/share/doc/$(DOCS_PACKAGE_NAME)/html/'" >> $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)/config_local.py
+	@echo "MINIFY_HTML = False" >> $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME)/$(PYTHON_SITE_PACKAGE)/$(WEB_PACKAGE_NAME)/config_local.py
+
+	#Copy runtime to stagging
+	mkdir -p $(DEBBUILDROOT)/debian/$(RUNTIME_PACKAGE_NAME)/usr/$(RUNTIME_PACKAGE_NAME)
+	cp $(TOPDIR)/runtime/pgAdmin4 $(DEBBUILDROOT)/debian/$(RUNTIME_PACKAGE_NAME)/usr/$(RUNTIME_PACKAGE_NAME)
+
+	(cd $(DEBBUILDROOT) && dpkg-deb --build debian/$(DOCS_PACKAGE_NAME))
+	mv $(DEBBUILDROOT)/debian/$(DOCS_PACKAGE_NAME).deb $(TOPDIR)/dist/$(DOCS_PACKAGE_INSTALLER_NAME).deb
+
+	(cd $(DEBBUILDROOT) && dpkg-deb --build debian/$(WEB_PACKAGE_NAME))
+	mv $(DEBBUILDROOT)/debian/$(WEB_PACKAGE_NAME).deb $(TOPDIR)/dist/$(WEB_PACKAGE_INSTALLER_NAME).deb
+
+	(cd $(DEBBUILDROOT) && dpkg-deb --build debian/$(RUNTIME_PACKAGE_NAME))
+	mv $(DEBBUILDROOT)/debian/$(RUNTIME_PACKAGE_NAME).deb $(TOPDIR)/dist/$(RUNTIME_PACKAGE_INSTALLER_NAME).deb
+
+	echo "***************************************"
+	echo " Installer location - $(TOPDIR)/dist"
+	echo "***************************************"
+	echo "$(RUNTIME_PACKAGE_NAME).deb (Runtime) File is generated"
+	echo "$(WEB_PACKAGE_NAME).deb (Web) File is generated"
+	echo "$(DOCS_PACKAGE_NAME).deb (Docs) File is generated"
+
+
+deb: build-docs build-runtime build-gen-common
+
diff --git a/pkg/deb/build.sh b/pkg/deb/build.sh
new file mode 100755
index 0000000..68a71ed
--- /dev/null
+++ b/pkg/deb/build.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+export QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
+
+if ! [ -e "$QMAKE" ]; then
+	echo "ERROR: QMAKE - $QMAKE does not exits";
+	exit 1;
+fi
+
+#Script to create the pgAdmin4 .deb
+export WD=$(cd `dirname $0` && pwd)
+export TOPDIR=$WD/../..
+export DEBBUILDROOT=$TOPDIR/deb-build
+
+# Find the pgAdmin4 app name and version from config.py
+export APP_RELEASE=`grep "^APP_RELEASE" $TOPDIR/web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+export APP_REVISION=`grep "^APP_REVISION" $TOPDIR/web/config.py | cut -d"=" -f2 | sed 's/ //g'`
+APP_NAME=`grep "^APP_NAME" $TOPDIR/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_VERSION=`echo $APP_LONG_VERSION | cut -d . -f1,2`
+export APP_SUFFIX=`grep "^APP_SUFFIX" $TOPDIR/web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
+export APP_LONG_VERSION=$APP_LONG_VERSION-$APP_SUFFIX
+
+#Runtime, web and docs there modules would be created under debian packages
+export RUNTIME_PACKAGE_NAME=$APP_NAME-runtime-v$APP_RELEASE
+export RUNTIME_PACKAGE_INSTALLER_NAME=$APP_NAME-runtime-v$APP_LONG_VERSION
+export WEB_PACKAGE_NAME=$APP_NAME-web-v$APP_RELEASE
+export WEB_PACKAGE_INSTALLER_NAME=$APP_NAME-web-v$APP_LONG_VERSION
+export DOCS_PACKAGE_NAME=$APP_NAME-docs-v$APP_RELEASE
+export DOCS_PACKAGE_INSTALLER_NAME=$APP_NAME-docs-v$APP_LONG_VERSION
+
+export PYTHON_SITE_PACKAGE=`python -c "import site; print site.getsitepackages()[1]"`
+
+# Create the directories if not exist
+mkdir -p $DEBBUILDROOT/debian || exit 1
+mkdir -p $TOPDIR/dist
+
+cd ./pkg/deb
+
+#Creating on the fly control file for debian
+cp changelog $DEBBUILDROOT/debian/
+cp rules $DEBBUILDROOT/debian/
+cp control $DEBBUILDROOT/debian/
+
+# Create control file, updates runtime,web,doc,appname and version
+sed -i "s/RUNTIME_PACKAGE_NAME/$RUNTIME_PACKAGE_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/WEB_PACKAGE_NAME/$WEB_PACKAGE_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/DOCS_PACKAGE_NAME/$DOCS_PACKAGE_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/APP_NAME/$APP_NAME/g" $DEBBUILDROOT/debian/control
+sed -i "s/APP_VERSION/$APP_VERSION/g" $DEBBUILDROOT/debian/control
+
+# Create changelog file
+sed -i "s/DATETIME/`date +"%a, %d %b %Y %H:%M:%S +0200"`/g" $DEBBUILDROOT/debian/changelog
+sed -i "s/APPNAME/$APP_NAME/g" $DEBBUILDROOT/debian/changelog
+sed -i "s/APPVERSION/$APP_LONG_VERSION/g" $DEBBUILDROOT/debian/changelog
+
+# Create web folder config_local file
+cp -r $TOPDIR/web $DEBBUILDROOT/web
+find $DEBBUILDROOT/web -name "*.pyc" -exec rm -rf {} \; 2> /dev/null
+find $DEBBUILDROOT/web -name "pgAdmin4.db" rm -rf {} \; 2> /dev/null
+find $DEBBUILDROOT/web -name "config_local.py" rm -rf {} \; 2> /dev/null
+
+echo "SERVER_MODE = False" > $DEBBUILDROOT/web/config_local.py
+echo "HELP_PATH = '/usr/share/doc/$WEB_PACKAGE_NAME/html'" >> $DEBBUILDROOT/web/config_local.py
+echo "MINIFY_HTML = False" >> $DEBBUILDROOT/web/config_local.py
+
+
+# Build debian
+make deb || exit 1
+
+echo "Cleaning up..."
+rm -rf $TOPDIR/pgadmin4*.deb $TOPDIR/pgadmin4*.changes
+rm -rf $DEBBUILDROOT
+# Clean up buildroot after successful build
+
diff --git a/pkg/deb/changelog b/pkg/deb/changelog
new file mode 100644
index 0000000..2102b41
--- /dev/null
+++ b/pkg/deb/changelog
@@ -0,0 +1,2 @@
+APPNAME (APPVERSION) experiemental; urgency=low
+ -- pgamin4 hackers <[email protected]> DATETIME
diff --git a/pkg/deb/control b/pkg/deb/control
new file mode 100644
index 0000000..b81b490
--- /dev/null
+++ b/pkg/deb/control
@@ -0,0 +1,73 @@
+Source: APP_NAME
+Section: misc
+Priority: optional
+Maintainer: pgamin4 hackers <[email protected]>
+Build-Depends: debhelper, dpkg-dev,aptitude,devscripts,build-essential,qt-sdk,python-dev,libqt5webkit5-dev
+Standards-Version: APP_VERSION
+
+Package: APP_NAME
+Architecture: all
+Description: graphical administration tool for PostgreSQL
+ pgAdmin 4 is a database design and management application for use with
+ PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above
+ running on any platform.
+ .
+ pgAdmin 4 is designed to answer the needs of all users, from writing
+ simple SQL queries to developing complex databases. The graphical
+ interface supports all PostgreSQL features and makes administration
+ easy. The application also includes a syntax highlighting SQL editor, a
+ server-side code editor, an SQL/batch/shell job scheduling agent,
+ support for the Slony-I replication engine and much more. Server
+ connection may be made using TCP/IP or Unix Domain Sockets (on *nix
+ platforms), and may be SSL encrypted for security. No additional
+ drivers are required to communicate with the database server.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: WEB_PACKAGE_NAME
+Architecture: all
+#Depends: python-sphinx-theme-alabaster, python-pycrypto, python-beautifulsoup4, python-django-htmlmin, python-flask-gravatar, python-flask-mail, python-linecache2, python-pygments, python-pytz, python-simplejson, python-snowballstemmer, python-sphinx-rtd-theme, python-traceback2
+Depends: DOCS_PACKAGE_NAME, python-blinker, python-extras, python-fixtures, python-flask,python-babel,python-flask-login,python-flask-principal,python-flask-sqlalchemy,python-wtforms,python-html5lib, python-importlib, python-itsdangerous, python-jinja2, python-markupsafe, python-passlib, python-pbr, python-psycopg2, python-dateutil, python-mimeparse, python-six, python-speaklater, python-sphinx, python-sqlalchemy, python-testscenarios, python-testtools, python-unittest2, python-werkzeug, python-sqlparse, python-docutils
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin 4 is a database design and management application for use with
+ PostgreSQL. The application can be used to manage PostgreSQL 7.3 and above
+ running on any platform.
+ .
+ pgAdmin 4 is designed to answer the needs of all users, from writing
+ simple SQL queries to developing complex databases. The graphical
+ interface supports all PostgreSQL features and makes administration
+ easy. The application also includes a syntax highlighting SQL editor, a
+ server-side code editor, an SQL/batch/shell job scheduling agent,
+ support for the Slony-I replication engine and much more. Server
+ connection may be made using TCP/IP or Unix Domain Sockets (on *nix
+ platforms), and may be SSL encrypted for security. No additional
+ drivers are required to communicate with the database server.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: RUNTIME_PACKAGE_NAME
+#Depends: WEB_PACKAGE_NAME (= ${Source-Version}), ${shlibs:Depends}
+Depends: WEB_PACKAGE_NAME
+Architecture: all
+#Enhances: pgadmin4(= ${Source-Version})
+#Conflicts: pgadmin4 (<< 1.0.2-1)
+#Replaces: pgadmin4 (<< 1.0.2-1)
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin III is a database design and management application for use with
+ PostgreSQL.
+ .
+ This package contains the documentation for pgAdmin III in English language.
+ This package is mandatory to get the pgAdmin III help system to run smoothly.
+ .
+ Homepage: http://www.pgadmin.org/
+
+Package: DOCS_PACKAGE_NAME
+Architecture: all
+Description: graphical administration tool for PostgreSQL - documentation
+ pgAdmin III is a database design and management application for use with
+ PostgreSQL.
+ .
+ This package contains the documentation for pgAdmin III in English language.
+ This package is mandatory to get the pgAdmin III help system to run smoothly.
+ .
+ Homepage: http://www.pgadmin.org/
diff --git a/pkg/deb/rules b/pkg/deb/rules
new file mode 100755
index 0000000..9b1ba78
--- /dev/null
+++ b/pkg/deb/rules
@@ -0,0 +1,97 @@
+#!/usr/bin/make -f
+
+PACKAGE_NAME_RUNTIME=pgadmin4-runtime
+PACKAGE_NAME_WEB=pgadmin4-web
+BINARY_NAME_RUNTIME=pgAdmin4
+SRC_DIR=$(CURDIR)/../../runtime
+
+configure:
+	#qmake ~pareshmore/svn/pgadmin4/runtime/pgAdmin4.pro
+
+build:
+	#$(MAKE) -C $(SRC_DIR)
+
+
+clean:
+	#dh_testdir
+	#dh_testroot
+	#dh_clean
+	#rm -rf $(CURDIR)/$(BINARY_NAME)
+	#$(MAKE) -C $(SRC_DIR) clean
+	#rm *.deb
+
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installman
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# binary-arch/binary-indep
+# in another 'make' thread.
+spec-binary-indep:
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+
+
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+spec-binary-arch:
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+        #make -f debian/rules $(doPgA3Wx)-clean
+
+# Build architecture independant packages using the common target.
+binary-indep: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-i spec-binary-indep
+
+# Build architecture dependant packages using the common target.
+binary-arch: build install
+	$(MAKE) -f debian/rules DH_OPTIONS=-a spec-binary-arch
+
+binary: binary-indep binary-arch
+.PHONY: build clean orig binary-indep binary-arch binary install
+


  [application/octet-stream] pgadmin_server_debian_1_June_16.patch (1.6K, 4-pgadmin_server_debian_1_June_16.patch)
  download | inline diff:
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] 4+ messages in thread

* Re: PATCH: pgAdmin4 debian installer
  2016-04-26 15:20 PATCH: pgAdmin4 debian installer Paresh More <[email protected]>
  2016-05-09 13:15 ` Re: PATCH: pgAdmin4 debian installer Dave Page <[email protected]>
  2016-06-02 16:16   ` Re: PATCH: pgAdmin4 debian installer Paresh More <[email protected]>
@ 2016-06-02 16:26     ` Dave Page <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Page @ 2016-06-02 16:26 UTC (permalink / raw)
  To: Paresh More <[email protected]>; +Cc: Devrim Gunduz <[email protected]>; pgadmin-hackers; Sandeep Thakkar <[email protected]>; Hamid Quddus <[email protected]>

Devrim only works on Redhat, so I'll take a look at this myself.

Thanks.

BTW - I need the completed and working Windows build scripts tomorrow AM,
my time!

On Thu, Jun 2, 2016 at 5:16 PM, Paresh More <[email protected]>
wrote:

> Hello Dave and Devrim,
>
>
> Changes are done as per discussed with Sandeep.
>
> There are some python modules which are not available on ubuntu (through
> apt-get) which is mentioned in the sheet here , We could find some packages
> on web and the URLs of same have been updated in the sheet. For the
> packages that are not available, we have to build them on our own.
>
>
> https://docs.google.com/spreadsheets/d/13CIYR82twj0LIUteFSZR7RE8ZbtUfvCqykXw1wy3gzE/edit#gid=1213443...
>
>
> Attached is the patch for pgadmin4 debian package.  I have also attached
> runtime server patch separately (This is already included in the rpm patch
> sent by Sandeep)
>
>
>
>
> On Mon, May 9, 2016 at 6:45 PM, Dave Page <[email protected]>
> wrote:
>
>> Hi
>>
>> Please see my earlier comments regarding the RPM packages - many of them
>> apply to this patch as well:
>> http://www.postgresql.org/message-id/[email protected]....
>>
>> By way of additional comment, why does pkg/deb/README include a bunch of
>> boiler-plate text that I wrote long ago for the top-level README? It's out
>> of date now, and shouldn't be in a packaging README anyway.
>>
>> Thanks.
>>
>> On Tue, Apr 26, 2016 at 4:20 PM, Paresh More <
>> [email protected]> wrote:
>>
>>> Hi Team, Dave,
>>>
>>> debian package is located @ location
>>>
>>> pgadmin4-web
>>>
>>> https://uploads.enterprisedb.com/download.php?file=0196f693811b57088da5ed7396cec284
>>>
>>> pgadmin4-runtime
>>>
>>> https://uploads.enterprisedb.com/download.php?file=958528f7c619efa7b483a6d2e0c23cd5
>>>
>>> Attached herewith are two patches.
>>>
>>> pgadmin4_debian.patch - This is the main patch that includes
>>> Makefile,README,debian scripts
>>>
>>> It will create two .deb i.e pgadmin4-runtime and pgadmin4-web.
>>> The  pgadmin4-runtime depends on web and the web debian depends on the
>>> python packages.
>>> I have listed some 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
>>>
>>> As per rpm patch (*sandeep mentioned*) below is the comment which
>>> applies same for debian.
>>>
>>> *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.
>>>
>>> *Sandeep comments*
>>>
>>> *“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)”*
>>>
>>> What the patch will create ?
>>> - It would create deb folder in pkg
>>> - It would create Makefile, README and debian scripts
>>>
>>>
>>> --
>>>
>>> Thanks & Regards
>>>
>>> *Paresh More*
>>>
>>> [image: NEW-EDB-logo-4c]
>>>
>>> Pune, India.
>>> Cell :  +919922000564 |  www.enterprisedb.com
>>>
>>
>>
>>
>> --
>> Dave Page
>> VP, Chief Architect, Tools & Installers
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>
>
>
> --
>
> Thanks & Regards
>
> *Paresh More*
>
> [image: NEW-EDB-logo-4c]
>
> Pune, India.
> Cell :  +919922000564 |  www.enterprisedb.com
>



-- 
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


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


end of thread, other threads:[~2016-06-02 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 15:20 PATCH: pgAdmin4 debian installer Paresh More <[email protected]>
2016-05-09 13:15 ` Dave Page <[email protected]>
2016-06-02 16:16   ` Paresh More <[email protected]>
2016-06-02 16:26     ` 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