public inbox for [email protected]
help / color / mirror / Atom feedFrom: Paresh More <[email protected]>
To: pgadmin-hackers <[email protected]>
To: Dave Page <[email protected]>
Cc: Sandeep Thakkar <[email protected]>
Cc: Hamid Quddus <[email protected]>
Subject: PATCH: pgAdmin4 debian installer
Date: Tue, 26 Apr 2016 20:50:02 +0530
Message-ID: <CAAgiCNGZe7EXGsFBsLFg1Mu0QcUSJNHB3dz3CJZEzP2iE15n0Q@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
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
+
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: PATCH: pgAdmin4 debian installer
In-Reply-To: <CAAgiCNGZe7EXGsFBsLFg1Mu0QcUSJNHB3dz3CJZEzP2iE15n0Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox