summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD17
-rw-r--r--arch_patches.patch83
-rw-r--r--pgAdmin4.py.patch28
4 files changed, 88 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 76648254b61e..54a9624ddbbf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pgadmin4-last
pkgdesc = Comprehensive design and management interface for PostgreSQL
pkgver = 5.2
- pkgrel = 4
+ pkgrel = 5
url = https://www.pgadmin.org/
arch = x86_64
license = custom
diff --git a/PKGBUILD b/PKGBUILD
index 8e347ca4b260..059370ee727d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=pgadmin4
pkgname=${_pkgname}-last
pkgver=5.2
-pkgrel=4
+pkgrel=5
pkgdesc='Comprehensive design and management interface for PostgreSQL'
url='https://www.pgadmin.org/'
arch=('x86_64')
@@ -37,7 +37,7 @@ sha512sums=('ad68c41d91ce37ca3e2c959eab814ebf6e58947abef8afae5556de39026638f52f9
prepare() {
cd ${_pkgname}-${pkgver}
- patch -Np1 < ../../pgAdmin4.py.patch
+ patch -Np1 < ../../arch_patches.patch
local PYTHONVERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
@@ -87,18 +87,14 @@ build() {
cd ${_pkgname}-${pkgver}
# override doctree directory
-# make docs SPHINXOPTS='-d /tmp/'
-
- cd runtime
-# yarn install
+ make docs SPHINXOPTS='-d /tmp/'
}
package() {
cd ${_pkgname}-${pkgver}
install -dm 755 "${pkgdir}/usr/lib/pgadmin4"
-# cp -a docs web runtime "${pkgdir}/usr/lib/pgadmin4"
- cp -a web runtime "${pkgdir}/usr/lib/pgadmin4"
+ cp -a docs web runtime "${pkgdir}/usr/lib/pgadmin4"
install -Dm 644 "${srcdir}"/config_{distro,local}.py -t "${pkgdir}/usr/lib/pgadmin4/web"
install -Dm 644 "${srcdir}"/arch_additions.py -t "${pkgdir}/usr/lib/pgadmin4/web"
@@ -109,11 +105,6 @@ package() {
convert runtime/assets/pgAdmin4.png -resize 16x16 "${pkgdir}/usr/share/icons/hicolor/16x16/apps/pgAdmin4.png"
install -Dm 644 "${srcdir}/pgAdmin4.desktop" -t "${pkgdir}/usr/share/applications"
-# install -D /dev/stdin "${pkgdir}/usr/bin/pgadmin4" <<END
-#!/bin/sh
-#cd /usr/lib/pgadmin4
-#exec runtime/pgAdmin4 "\$@"
-#END
install -D /dev/stdin "${pkgdir}/usr/bin/pgadmin4" <<END
#!/bin/sh
cd /usr/lib/pgadmin4
diff --git a/arch_patches.patch b/arch_patches.patch
new file mode 100644
index 000000000000..e8adf8d3e602
--- /dev/null
+++ b/arch_patches.patch
@@ -0,0 +1,83 @@
+--- a/web/pgAdmin4.py
++++ b/web/pgAdmin4.py
+
+@@ -140,7 +140,10 @@
+ ##########################################################################
+ # The entry point
+ ##########################################################################
++import threading
++from arch_additions import setupTrayIcon, checkRunning
+ def main():
++ checkRunning();
+ # Set null device file path to stdout, stdin, stderr if they are None
+ for _name in ('stdin', 'stdout', 'stderr'):
+ if getattr(sys, _name) is None:
+@@ -214,8 +217,11 @@
+ server_name=config.APP_NAME)
+ try:
+ print("Using production server...")
+- prod_server.start()
+- except KeyboardInterrupt:
++ prod_server.prepare()
++ threading.Thread(target=prod_server.serve).start()
++
++ setupTrayIcon("http://{}:{}".format(config.DEFAULT_SERVER, config.EFFECTIVE_SERVER_PORT))
++ finally:
+ prod_server.stop()
+
+ except IOError:
+
+--- a/web/pgadmin/browser/__init__.py
++++ b/web/pgadmin/browser/__init__.py
+
+@@ -31,8 +31,8 @@ from flask_security.recoverable import reset_password_token_status, \
+ generate_reset_password_token, update_password
+ from flask_security.signals import reset_password_instructions_sent
+ from flask_security.utils import config_value, do_flash, get_url, \
+- get_message, slash_url_suffix, login_user, send_mail, logout_user
+-from flask_security.views import _security, _commit, _ctx
++ get_message, slash_url_suffix, login_user, send_mail, view_commit, logout_user
++from flask_security.views import _security, _ctx
+ from werkzeug.datastructures import MultiDict
+
+ import config
+@@ -1130,7 +1130,7 @@ if hasattr(config, 'SECURITY_CHANGEABLE') and config.SECURITY_CHANGEABLE:
+ has_error = True
+
+ if request.json is None and not has_error:
+- after_this_request(_commit)
++ after_this_request(view_commit)
+ do_flash(*get_message('PASSWORD_CHANGE'))
+
+ old_key = get_crypt_key()[1]
+@@ -1296,7 +1296,7 @@ if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
+ has_error = True
+
+ if not has_error:
+- after_this_request(_commit)
++ after_this_request(view_commit)
+ do_flash(*get_message('PASSWORD_RESET'))
+ login_user(user)
+ return redirect(get_url(_security.post_reset_view) or
+
+--- a/web/pgadmin/browser/utils.py
++++ b/web/pgadmin/browser/utils.py
+
+@@ -13,7 +13,7 @@ from abc import abstractmethod
+
+ import flask
+ from flask import render_template, current_app
+-from flask.views import View, MethodViewType, with_metaclass
++from flask.views import MethodView
+ from flask_babelex import gettext
+
+ from config import PG_DEFAULT_DRIVER
+@@ -142,7 +142,7 @@ class PGChildModule(object):
+ pass
+
+
+-class NodeView(with_metaclass(MethodViewType, View)):
++class NodeView(MethodView):
+ """
+ A PostgreSQL Object has so many operaions/functions apart from CRUD
+ (Create, Read, Update, Delete):
diff --git a/pgAdmin4.py.patch b/pgAdmin4.py.patch
deleted file mode 100644
index 2046f269f5a3..000000000000
--- a/pgAdmin4.py.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/web/pgAdmin4.py
-+++ b/web/pgAdmin4.py
-
-@@ -140,7 +140,10 @@
- ##########################################################################
- # The entry point
- ##########################################################################
-+import threading
-+from arch_additions import setupTrayIcon, checkRunning
- def main():
-+ checkRunning();
- # Set null device file path to stdout, stdin, stderr if they are None
- for _name in ('stdin', 'stdout', 'stderr'):
- if getattr(sys, _name) is None:
-@@ -214,8 +217,11 @@
- server_name=config.APP_NAME)
- try:
- print("Using production server...")
-- prod_server.start()
-- except KeyboardInterrupt:
-+ prod_server.prepare()
-+ threading.Thread(target=prod_server.serve).start()
-+
-+ setupTrayIcon("http://{}:{}".format(config.DEFAULT_SERVER, config.EFFECTIVE_SERVER_PORT))
-+ finally:
- prod_server.stop()
-
- except IOError: