[arch-commits] Commit in pgadmin4/repos/community-x86_64 (12 files)

Levente Polyak anthraxx at archlinux.org
Thu Jan 10 21:47:08 UTC 2019


    Date: Thursday, January 10, 2019 @ 21:47:07
  Author: anthraxx
Revision: 422185

archrelease: copy trunk to community-x86_64

Added:
  pgadmin4/repos/community-x86_64/PKGBUILD
    (from rev 422184, pgadmin4/trunk/PKGBUILD)
  pgadmin4/repos/community-x86_64/config_distro.py
    (from rev 422184, pgadmin4/trunk/config_distro.py)
  pgadmin4/repos/community-x86_64/config_local.py
    (from rev 422184, pgadmin4/trunk/config_local.py)
  pgadmin4/repos/community-x86_64/pgAdmin4.desktop
    (from rev 422184, pgadmin4/trunk/pgAdmin4.desktop)
  pgadmin4/repos/community-x86_64/pgadmin4-compatibility-with-python3-pycryptodome.patch
    (from rev 422184, pgadmin4/trunk/pgadmin4-compatibility-with-python3-pycryptodome.patch)
  pgadmin4/repos/community-x86_64/pgadmin4-python-de-vendor-venv-paths.patch
    (from rev 422184, pgadmin4/trunk/pgadmin4-python-de-vendor-venv-paths.patch)
Deleted:
  pgadmin4/repos/community-x86_64/PKGBUILD
  pgadmin4/repos/community-x86_64/config_distro.py
  pgadmin4/repos/community-x86_64/config_local.py
  pgadmin4/repos/community-x86_64/pgAdmin4.desktop
  pgadmin4/repos/community-x86_64/pgadmin4-compatibility-with-python3-pycryptodome.patch
  pgadmin4/repos/community-x86_64/pgadmin4-python-de-vendor-venv-paths.patch

--------------------------------------------------------+
 PKGBUILD                                               |  258 +++++++--------
 config_distro.py                                       |    4 
 pgAdmin4.desktop                                       |   22 -
 pgadmin4-compatibility-with-python3-pycryptodome.patch |   90 ++---
 pgadmin4-python-de-vendor-venv-paths.patch             |   66 +--
 5 files changed, 220 insertions(+), 220 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-01-10 21:46:59 UTC (rev 422184)
+++ PKGBUILD	2019-01-10 21:47:07 UTC (rev 422185)
@@ -1,129 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Maintainer: Jerome Leclanche <jerome at leclan.ch>
-
-pkgname=pgadmin4
-pkgver=3.6
-pkgrel=1
-pkgdesc='Comprehensive design and management interface for PostgreSQL'
-url='https://www.pgadmin.org/'
-arch=('x86_64')
-license=('custom')
-depends=('qt5-base' 'postgresql-libs' 'hicolor-icon-theme'
-         'python' 'python-blinker' 'python-extras' 'python-fixtures'
-         'python-flask' 'python-flask-login' 'python-flask-migrate'
-         'python-flask-sqlalchemy' 'python-flask-wtf' 'python-html5lib'
-         'python-passlib' 'python-mimeparse' 'python-pytz' 'python-simplejson'
-         'python-six' 'python-speaklater' 'python-sqlparse' 'python-wtforms'
-         'python-psutil' 'python-jinja' 'python-paramiko' 'python-psycopg2'
-         'python-pycryptodome' 'python-sqlalchemy' 'python-testtools'
-         'python-webencodings' 'python-werkzeug' 'python-dateutil'
-         'python-pyrsistent' 'python-pbr' 'python-flask-gravatar'
-         'python-flask-mail' 'python-flask-principal' 'python-flask-paranoid'
-         'python-htmlmin' 'python-flask-htmlmin' 'python-sshtunnel'
-         'python-flask-security')
-makedepends=('python-setuptools' 'python-sphinx' 'imagemagick')
-source=(https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v${pkgver}/source/${pkgname}-${pkgver}.tar.gz{,.asc}
-        pgAdmin4.desktop
-        config_distro.py
-        config_local.py
-        pgadmin4-compatibility-with-python3-pycryptodome.patch
-        pgadmin4-python-de-vendor-venv-paths.patch)
-validpgpkeys=('E8697E2EEF76C02D3A6332778881B2A8210976F2') # Package Manager (Package Signing Key) <packages at pgadmin.org>
-sha512sums=('565867a8a1d925fd5b3a24a6ef58bf98508321d4a4ebe404090defc03a67c8e22b7367ba049b6ec6a9a6c33de220bce3f281df4bc9a6cdd41d408507ebcceeee'
-            'SKIP'
-            'b19dda3331585010c759099eb09f4db288ce4cd3d36882b56748e1e3756dc7bee2899d7438d496280498ec6a60f6e1ba90309d49fc599403f1fdc7e8817b6645'
-            '16d00dc2095904a6b12da7039458f632873829ad98d4d7653eac5804032ba92097ccae4488d56467d0ea9bd64e2654a3dead73eb7924c947ff1737ff6e3b4745'
-            'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e'
-            '37f47723ed4ce4a2fef5e400eefb77a3c5dfe8e51ba749dad1c91c403379a02b0bfdf78086bd9fc33c5e9e6fbe8462f7b6103bcfb992ba0c3dcfca919d9eb985'
-            '70c8e589421ab50cf81753fbcfb5df65669b0feeefa3a57ee574b3785424fd107af720fc7007e52876798a46fae88f2c02dbf156aa096397afa0f85ac04fdb76')
-
-prepare() {
-  cd ${pkgname}-${pkgver}
-
-  patch -Np1 < ../pgadmin4-compatibility-with-python3-pycryptodome.patch
-  patch -Np1 < ../pgadmin4-python-de-vendor-venv-paths.patch
-
-  local PYTHONVERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
-  sed -E "s|/usr/pgadmin4/web|/usr/lib/pgadmin4/web|g;
-          s|/usr/pgadmin4/lib/python[0-9\\.]+|/usr/lib/python${PYTHONVERSION}|g" \
-      -i runtime/ConfigWindow.ui
-  sed "s|##PYTHONVERSION##|${PYTHONVERSION}|g" -i runtime/Server.cpp
-
-  sed -E -i requirements.txt \
-    -e '/blinker>?=/d' \
-    -e '/extras>?=/d' \
-    -e '/fixtures>?=/d' \
-    -e '/Flask>?=/d' \
-    -e '/Flask-Login>?=/d' \
-    -e '/Flask-Migrate>?=/d' \
-    -e '/Flask-SQLAlchemy>?=/d' \
-    -e '/Flask-WTF>?=/d' \
-    -e '/html5lib>?=/d' \
-    -e '/pycrypto>?=/d' \
-    -e '/passlib>?=/d' \
-    -e '/python-mimeparse>?=/d' \
-    -e '/pytz>?=/d' \
-    -e '/simplejson>?=/d' \
-    -e '/six>?=/d' \
-    -e '/speaklater>?=/d' \
-    -e '/sqlparse>?=/d' \
-    -e '/WTForms>?=/d' \
-    -e '/psutil>?=/d' \
-    -e '/psycopg2>?=/d' \
-    -e '/python-dateutil>?=/d' \
-    -e '/SQLAlchemy>?=/d' \
-    -e '/pyrsistent>?=/d' \
-    -e '/pbr>?=/d' \
-    -e '/linecache2>?=/d' \
-    -e '/Flask-Gravatar>?=/d' \
-    -e '/Flask-Mail>?=/d' \
-    -e '/Flask-Principal>?=/d' \
-    -e '/Flask-Paranoid>?=/d' \
-    -e '/htmlmin>?=/d' \
-    -e '/Flask-Security>?=/d' \
-    -e '/Flask-HTMLmin>?=/d' \
-    -e '/sshtunnel>?=/d'
-  cat requirements.txt
-}
-
-build() {
-  export LANG=en_US.UTF-8
-  export LC_ALL=en_US.UTF-8
-
-  cd ${pkgname}-${pkgver}
-  convert +set date:create +set date:modify runtime/pgAdmin4.{ico,png}
-  make docs
-
-  cd runtime
-  qmake CONFIG+=release
-  make
-}
-
-package() {
-  cd ${pkgname}-${pkgver}
-
-  install -Dm 755 runtime/pgAdmin4 "${pkgdir}/usr/lib/pgadmin4/runtime/pgAdmin4"
-  cp -a docs web "${pkgdir}/usr/lib/pgadmin4"
-  install -Dm 644 "${srcdir}"/config_{distro,local}.py -t "${pkgdir}/usr/lib/pgadmin4/web"
-
-  install -Dm 644 runtime/pgAdmin4-0.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pgAdmin4.png"
-  install -Dm 644 runtime/pgAdmin4-1.png "${pkgdir}/usr/share/icons/hicolor/48x48/apps/pgAdmin4.png"
-  install -Dm 644 runtime/pgAdmin4-2.png "${pkgdir}/usr/share/icons/hicolor/32x32/apps/pgAdmin4.png"
-  install -Dm 644 runtime/pgAdmin4-3.png "${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-server" <<END
-#!/bin/sh
-cd /usr/lib/pgadmin4
-python web/pgAdmin4.py "\$@"
-END
-
-  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
-}
-
-# vim: ts=2 sw=2 et:

Copied: pgadmin4/repos/community-x86_64/PKGBUILD (from rev 422184, pgadmin4/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-01-10 21:47:07 UTC (rev 422185)
@@ -0,0 +1,129 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Jerome Leclanche <jerome at leclan.ch>
+
+pkgname=pgadmin4
+pkgver=4.0
+pkgrel=1
+pkgdesc='Comprehensive design and management interface for PostgreSQL'
+url='https://www.pgadmin.org/'
+arch=('x86_64')
+license=('custom')
+depends=('qt5-base' 'postgresql-libs' 'hicolor-icon-theme'
+         'python' 'python-blinker' 'python-extras' 'python-fixtures'
+         'python-flask' 'python-flask-login' 'python-flask-migrate'
+         'python-flask-sqlalchemy' 'python-flask-wtf' 'python-html5lib'
+         'python-passlib' 'python-mimeparse' 'python-pytz' 'python-simplejson'
+         'python-six' 'python-speaklater' 'python-sqlparse' 'python-wtforms'
+         'python-psutil' 'python-jinja' 'python-paramiko' 'python-psycopg2'
+         'python-pycryptodome' 'python-sqlalchemy' 'python-testtools'
+         'python-webencodings' 'python-werkzeug' 'python-dateutil'
+         'python-pyrsistent' 'python-pbr' 'python-flask-gravatar'
+         'python-flask-mail' 'python-flask-principal' 'python-flask-paranoid'
+         'python-htmlmin' 'python-flask-htmlmin' 'python-sshtunnel'
+         'python-flask-security')
+makedepends=('python-setuptools' 'python-sphinx' 'imagemagick')
+source=(https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v${pkgver}/source/${pkgname}-${pkgver}.tar.gz{,.asc}
+        pgAdmin4.desktop
+        config_distro.py
+        config_local.py
+        pgadmin4-compatibility-with-python3-pycryptodome.patch
+        pgadmin4-python-de-vendor-venv-paths.patch)
+validpgpkeys=('E8697E2EEF76C02D3A6332778881B2A8210976F2') # Package Manager (Package Signing Key) <packages at pgadmin.org>
+sha512sums=('8975defec77c596f512f131849b3fbdaf227949002507955814628a3957140ec9653adaa4e1239f0da42fdf0655a862302073aae320aae5cc7c5157a27f78468'
+            'SKIP'
+            'b19dda3331585010c759099eb09f4db288ce4cd3d36882b56748e1e3756dc7bee2899d7438d496280498ec6a60f6e1ba90309d49fc599403f1fdc7e8817b6645'
+            '16d00dc2095904a6b12da7039458f632873829ad98d4d7653eac5804032ba92097ccae4488d56467d0ea9bd64e2654a3dead73eb7924c947ff1737ff6e3b4745'
+            'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e'
+            '37f47723ed4ce4a2fef5e400eefb77a3c5dfe8e51ba749dad1c91c403379a02b0bfdf78086bd9fc33c5e9e6fbe8462f7b6103bcfb992ba0c3dcfca919d9eb985'
+            '70c8e589421ab50cf81753fbcfb5df65669b0feeefa3a57ee574b3785424fd107af720fc7007e52876798a46fae88f2c02dbf156aa096397afa0f85ac04fdb76')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+
+  patch -Np1 < ../pgadmin4-compatibility-with-python3-pycryptodome.patch
+  patch -Np1 < ../pgadmin4-python-de-vendor-venv-paths.patch
+
+  local PYTHONVERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
+  sed -E "s|/usr/pgadmin4/web|/usr/lib/pgadmin4/web|g;
+          s|/usr/pgadmin4/lib/python[0-9\\.]+|/usr/lib/python${PYTHONVERSION}|g" \
+      -i runtime/ConfigWindow.ui
+  sed "s|##PYTHONVERSION##|${PYTHONVERSION}|g" -i runtime/Server.cpp
+
+  sed -E -i requirements.txt \
+    -e '/blinker>?=/d' \
+    -e '/extras>?=/d' \
+    -e '/fixtures>?=/d' \
+    -e '/Flask>?=/d' \
+    -e '/Flask-Login>?=/d' \
+    -e '/Flask-Migrate>?=/d' \
+    -e '/Flask-SQLAlchemy>?=/d' \
+    -e '/Flask-WTF>?=/d' \
+    -e '/html5lib>?=/d' \
+    -e '/pycrypto>?=/d' \
+    -e '/passlib>?=/d' \
+    -e '/python-mimeparse>?=/d' \
+    -e '/pytz>?=/d' \
+    -e '/simplejson>?=/d' \
+    -e '/six>?=/d' \
+    -e '/speaklater>?=/d' \
+    -e '/sqlparse>?=/d' \
+    -e '/WTForms>?=/d' \
+    -e '/psutil>?=/d' \
+    -e '/psycopg2>?=/d' \
+    -e '/python-dateutil>?=/d' \
+    -e '/SQLAlchemy>?=/d' \
+    -e '/pyrsistent>?=/d' \
+    -e '/pbr>?=/d' \
+    -e '/linecache2>?=/d' \
+    -e '/Flask-Gravatar>?=/d' \
+    -e '/Flask-Mail>?=/d' \
+    -e '/Flask-Principal>?=/d' \
+    -e '/Flask-Paranoid>?=/d' \
+    -e '/htmlmin>?=/d' \
+    -e '/Flask-Security>?=/d' \
+    -e '/Flask-HTMLmin>?=/d' \
+    -e '/sshtunnel>?=/d'
+  cat requirements.txt
+}
+
+build() {
+  export LANG=en_US.UTF-8
+  export LC_ALL=en_US.UTF-8
+
+  cd ${pkgname}-${pkgver}
+  convert +set date:create +set date:modify runtime/pgAdmin4.{ico,png}
+  make docs
+
+  cd runtime
+  qmake CONFIG+=release
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+
+  install -Dm 755 runtime/pgAdmin4 "${pkgdir}/usr/lib/pgadmin4/runtime/pgAdmin4"
+  cp -a docs web "${pkgdir}/usr/lib/pgadmin4"
+  install -Dm 644 "${srcdir}"/config_{distro,local}.py -t "${pkgdir}/usr/lib/pgadmin4/web"
+
+  install -Dm 644 runtime/pgAdmin4-0.png "${pkgdir}/usr/share/icons/hicolor/256x256/apps/pgAdmin4.png"
+  install -Dm 644 runtime/pgAdmin4-1.png "${pkgdir}/usr/share/icons/hicolor/48x48/apps/pgAdmin4.png"
+  install -Dm 644 runtime/pgAdmin4-2.png "${pkgdir}/usr/share/icons/hicolor/32x32/apps/pgAdmin4.png"
+  install -Dm 644 runtime/pgAdmin4-3.png "${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-server" <<END
+#!/bin/sh
+cd /usr/lib/pgadmin4
+python web/pgAdmin4.py "\$@"
+END
+
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:

Deleted: config_distro.py
===================================================================
--- config_distro.py	2019-01-10 21:46:59 UTC (rev 422184)
+++ config_distro.py	2019-01-10 21:47:07 UTC (rev 422185)
@@ -1,2 +0,0 @@
-SERVER_MODE = False
-HELP_PATH = "/usr/lib/pgadmin4/docs/en_US/_build/html/"

Copied: pgadmin4/repos/community-x86_64/config_distro.py (from rev 422184, pgadmin4/trunk/config_distro.py)
===================================================================
--- config_distro.py	                        (rev 0)
+++ config_distro.py	2019-01-10 21:47:07 UTC (rev 422185)
@@ -0,0 +1,2 @@
+SERVER_MODE = False
+HELP_PATH = "/usr/lib/pgadmin4/docs/en_US/_build/html/"

Deleted: config_local.py
===================================================================
Copied: pgadmin4/repos/community-x86_64/config_local.py (from rev 422184, pgadmin4/trunk/config_local.py)
===================================================================
Deleted: pgAdmin4.desktop
===================================================================
--- pgAdmin4.desktop	2019-01-10 21:46:59 UTC (rev 422184)
+++ pgAdmin4.desktop	2019-01-10 21:47:07 UTC (rev 422185)
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=pgAdmin 4
-Exec=/usr/lib/pgadmin4/runtime/pgAdmin4
-Icon=pgAdmin4
-Type=Application
-Categories=Application;Development;Database;
-MimeType=text/html
-DocPath=/usr/lib/pgadmin4/docs/en_US/_build/html/index.html
-Comment=PostgreSQL Tools
-Keywords=database;db;sql;query;administration;development;

Copied: pgadmin4/repos/community-x86_64/pgAdmin4.desktop (from rev 422184, pgadmin4/trunk/pgAdmin4.desktop)
===================================================================
--- pgAdmin4.desktop	                        (rev 0)
+++ pgAdmin4.desktop	2019-01-10 21:47:07 UTC (rev 422185)
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=pgAdmin 4
+Exec=/usr/lib/pgadmin4/runtime/pgAdmin4
+Icon=pgAdmin4
+Type=Application
+Categories=Application;Development;Database;
+MimeType=text/html
+DocPath=/usr/lib/pgadmin4/docs/en_US/_build/html/index.html
+Comment=PostgreSQL Tools
+Keywords=database;db;sql;query;administration;development;

Deleted: pgadmin4-compatibility-with-python3-pycryptodome.patch
===================================================================
--- pgadmin4-compatibility-with-python3-pycryptodome.patch	2019-01-10 21:46:59 UTC (rev 422184)
+++ pgadmin4-compatibility-with-python3-pycryptodome.patch	2019-01-10 21:47:07 UTC (rev 422185)
@@ -1,45 +0,0 @@
-From 058fe07217d40551195f0d54e9f76c9a20c13d91 Mon Sep 17 00:00:00 2001
-From: anthraxx <levente at leventepolyak.net>
-Date: Tue, 13 Nov 2018 17:54:21 +0100
-Subject: [PATCH] compatibility with python3 pycryptodome
-
----
- web/pgadmin/utils/crypto.py                     | 4 ++--
- web/pgadmin/utils/driver/psycopg2/connection.py | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/web/pgadmin/utils/crypto.py b/web/pgadmin/utils/crypto.py
-index 8350f7a1..74633493 100644
---- a/web/pgadmin/utils/crypto.py
-+++ b/web/pgadmin/utils/crypto.py
-@@ -28,12 +28,12 @@ def encrypt(plaintext, key):
-     """
- 
-     iv = Random.new().read(AES.block_size)
--    cipher = AES.new(pad(key), AES.MODE_CFB, iv)
-+    cipher = AES.new(pad(key.encode('utf-8')), AES.MODE_CFB, iv)
-     # If user has entered non ascii password (Python2)
-     # we have to encode it first
-     if hasattr(str, 'decode'):
-         plaintext = plaintext.encode('utf-8')
--    encrypted = base64.b64encode(iv + cipher.encrypt(plaintext))
-+    encrypted = base64.b64encode(iv + cipher.encrypt(plaintext.encode('utf-8')))
- 
-     return encrypted
- 
-diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py
-index 4f11c12b..e5fdd31f 100644
---- a/web/pgadmin/utils/driver/psycopg2/connection.py
-+++ b/web/pgadmin/utils/driver/psycopg2/connection.py
-@@ -256,7 +256,7 @@ class Connection(BaseConnection):
-                 return False, gettext("Unauthorized request.")
- 
-             try:
--                password = decrypt(encpass, user.password)
-+                password = decrypt(encpass, user.password.encode('utf-8'))
-                 # Handling of non ascii password (Python2)
-                 if hasattr(str, 'decode'):
-                     password = password.decode('utf-8').encode('utf-8')
--- 
-2.19.1
-

Copied: pgadmin4/repos/community-x86_64/pgadmin4-compatibility-with-python3-pycryptodome.patch (from rev 422184, pgadmin4/trunk/pgadmin4-compatibility-with-python3-pycryptodome.patch)
===================================================================
--- pgadmin4-compatibility-with-python3-pycryptodome.patch	                        (rev 0)
+++ pgadmin4-compatibility-with-python3-pycryptodome.patch	2019-01-10 21:47:07 UTC (rev 422185)
@@ -0,0 +1,45 @@
+From 058fe07217d40551195f0d54e9f76c9a20c13d91 Mon Sep 17 00:00:00 2001
+From: anthraxx <levente at leventepolyak.net>
+Date: Tue, 13 Nov 2018 17:54:21 +0100
+Subject: [PATCH] compatibility with python3 pycryptodome
+
+---
+ web/pgadmin/utils/crypto.py                     | 4 ++--
+ web/pgadmin/utils/driver/psycopg2/connection.py | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/web/pgadmin/utils/crypto.py b/web/pgadmin/utils/crypto.py
+index 8350f7a1..74633493 100644
+--- a/web/pgadmin/utils/crypto.py
++++ b/web/pgadmin/utils/crypto.py
+@@ -28,12 +28,12 @@ def encrypt(plaintext, key):
+     """
+ 
+     iv = Random.new().read(AES.block_size)
+-    cipher = AES.new(pad(key), AES.MODE_CFB, iv)
++    cipher = AES.new(pad(key.encode('utf-8')), AES.MODE_CFB, iv)
+     # If user has entered non ascii password (Python2)
+     # we have to encode it first
+     if hasattr(str, 'decode'):
+         plaintext = plaintext.encode('utf-8')
+-    encrypted = base64.b64encode(iv + cipher.encrypt(plaintext))
++    encrypted = base64.b64encode(iv + cipher.encrypt(plaintext.encode('utf-8')))
+ 
+     return encrypted
+ 
+diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py
+index 4f11c12b..e5fdd31f 100644
+--- a/web/pgadmin/utils/driver/psycopg2/connection.py
++++ b/web/pgadmin/utils/driver/psycopg2/connection.py
+@@ -256,7 +256,7 @@ class Connection(BaseConnection):
+                 return False, gettext("Unauthorized request.")
+ 
+             try:
+-                password = decrypt(encpass, user.password)
++                password = decrypt(encpass, user.password.encode('utf-8'))
+                 # Handling of non ascii password (Python2)
+                 if hasattr(str, 'decode'):
+                     password = password.decode('utf-8').encode('utf-8')
+-- 
+2.19.1
+

Deleted: pgadmin4-python-de-vendor-venv-paths.patch
===================================================================
--- pgadmin4-python-de-vendor-venv-paths.patch	2019-01-10 21:46:59 UTC (rev 422184)
+++ pgadmin4-python-de-vendor-venv-paths.patch	2019-01-10 21:47:07 UTC (rev 422185)
@@ -1,33 +0,0 @@
-From 8d3c335b578e7c33942a92194f01ad95c227809f Mon Sep 17 00:00:00 2001
-From: anthraxx <levente at leventepolyak.net>
-Date: Wed, 19 Dec 2018 01:10:25 +0100
-Subject: [PATCH] python: de-vendor venv paths
-
----
- runtime/Server.cpp | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/runtime/Server.cpp b/runtime/Server.cpp
-index 15344c11..203fe1a9 100644
---- a/runtime/Server.cpp
-+++ b/runtime/Server.cpp
-@@ -135,11 +135,11 @@ Server::Server(quint16 port, QString key, QString logFileName)
-     add_to_path(pythonHome, venvPath.canonicalFilePath());
- #else
-     // Build (and canonicalise) the virtual environment path
--    QFileInfo venvBinPath(app_dir + "/../venv/bin");
--    QFileInfo venvLibPath(app_dir + "/../venv/lib/python");
--    QFileInfo venvDynLibPath(app_dir + "/../venv/lib/python/lib-dynload");
--    QFileInfo venvSitePackagesPath(app_dir + "/../venv/lib/python/site-packages");
--    QFileInfo venvPath(app_dir + "/../venv");
-+    QFileInfo venvBinPath("/usr/bin");
-+    QFileInfo venvLibPath("/usr/lib/python##PYTHONVERSION##");
-+    QFileInfo venvDynLibPath("/usr/lib/python##PYTHONVERSION##/lib-dynload");
-+    QFileInfo venvSitePackagesPath("/usr/lib/python##PYTHONVERSION##/site-packages");
-+    QFileInfo venvPath("/usr/lib/python##PYTHONVERSION##");
- 
-     // Prepend the bin directory to the path
-     add_to_path(path_env, venvBinPath.canonicalFilePath(), true);
--- 
-2.20.1
-

Copied: pgadmin4/repos/community-x86_64/pgadmin4-python-de-vendor-venv-paths.patch (from rev 422184, pgadmin4/trunk/pgadmin4-python-de-vendor-venv-paths.patch)
===================================================================
--- pgadmin4-python-de-vendor-venv-paths.patch	                        (rev 0)
+++ pgadmin4-python-de-vendor-venv-paths.patch	2019-01-10 21:47:07 UTC (rev 422185)
@@ -0,0 +1,33 @@
+From 8d3c335b578e7c33942a92194f01ad95c227809f Mon Sep 17 00:00:00 2001
+From: anthraxx <levente at leventepolyak.net>
+Date: Wed, 19 Dec 2018 01:10:25 +0100
+Subject: [PATCH] python: de-vendor venv paths
+
+---
+ runtime/Server.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/runtime/Server.cpp b/runtime/Server.cpp
+index 15344c11..203fe1a9 100644
+--- a/runtime/Server.cpp
++++ b/runtime/Server.cpp
+@@ -135,11 +135,11 @@ Server::Server(quint16 port, QString key, QString logFileName)
+     add_to_path(pythonHome, venvPath.canonicalFilePath());
+ #else
+     // Build (and canonicalise) the virtual environment path
+-    QFileInfo venvBinPath(app_dir + "/../venv/bin");
+-    QFileInfo venvLibPath(app_dir + "/../venv/lib/python");
+-    QFileInfo venvDynLibPath(app_dir + "/../venv/lib/python/lib-dynload");
+-    QFileInfo venvSitePackagesPath(app_dir + "/../venv/lib/python/site-packages");
+-    QFileInfo venvPath(app_dir + "/../venv");
++    QFileInfo venvBinPath("/usr/bin");
++    QFileInfo venvLibPath("/usr/lib/python##PYTHONVERSION##");
++    QFileInfo venvDynLibPath("/usr/lib/python##PYTHONVERSION##/lib-dynload");
++    QFileInfo venvSitePackagesPath("/usr/lib/python##PYTHONVERSION##/site-packages");
++    QFileInfo venvPath("/usr/lib/python##PYTHONVERSION##");
+ 
+     // Prepend the bin directory to the path
+     add_to_path(path_env, venvBinPath.canonicalFilePath(), true);
+-- 
+2.20.1
+


More information about the arch-commits mailing list