mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
pgadmin: 8.1 -> 8.2
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
parent
e8ab82a53c
commit
1c1ca56266
5 changed files with 24 additions and 59 deletions
|
@ -168,7 +168,7 @@ in
|
||||||
echo "$PW"
|
echo "$PW"
|
||||||
# Retype password:
|
# Retype password:
|
||||||
echo "$PW"
|
echo "$PW"
|
||||||
) | ${cfg.package}/bin/pgadmin4-setup
|
) | ${cfg.package}/bin/pgadmin4-cli setup-db
|
||||||
'';
|
'';
|
||||||
|
|
||||||
restartTriggers = [
|
restartTriggers = [
|
||||||
|
|
|
@ -55,6 +55,12 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||||
machine.wait_until_succeeds("curl -sS localhost:5051/login | grep \"<title>pgAdmin 4</title>\" > /dev/null")
|
machine.wait_until_succeeds("curl -sS localhost:5051/login | grep \"<title>pgAdmin 4</title>\" > /dev/null")
|
||||||
# check for missing support files (css, js etc). Should catch not-generated files during build. See e.g. https://github.com/NixOS/nixpkgs/pull/229184
|
# check for missing support files (css, js etc). Should catch not-generated files during build. See e.g. https://github.com/NixOS/nixpkgs/pull/229184
|
||||||
machine.succeed("wget -nv --level=1 --spider --recursive localhost:5051/login")
|
machine.succeed("wget -nv --level=1 --spider --recursive localhost:5051/login")
|
||||||
|
# test idempotenceny
|
||||||
|
machine.systemctl("stop pgadmin.service")
|
||||||
|
machine.systemctl("start pgadmin.service")
|
||||||
|
machine.wait_for_unit("pgadmin")
|
||||||
|
machine.wait_until_succeeds("curl -sS localhost:5051")
|
||||||
|
machine.wait_until_succeeds("curl -sS localhost:5051/login | grep \"<title>pgAdmin 4</title>\" > /dev/null")
|
||||||
|
|
||||||
# pgadmin4 module saves the configuration to /etc/pgadmin/config_system.py
|
# pgadmin4 module saves the configuration to /etc/pgadmin/config_system.py
|
||||||
# pgadmin4-desktopmode tries to read that as well. This normally fails with a PermissionError, as the config file
|
# pgadmin4-desktopmode tries to read that as well. This normally fails with a PermissionError, as the config file
|
||||||
|
|
|
@ -14,14 +14,14 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "pgadmin";
|
pname = "pgadmin";
|
||||||
version = "8.1";
|
version = "8.2";
|
||||||
yarnHash = "sha256-KAiY5TX2O8mxP7PjIJstYEzCBbqDgT+CpEhreuAGW/U=";
|
yarnHash = "sha256-uMSgpkYoLD32VYDAkjywC9bZjm7UKA0hhwVNc/toEbA=";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pgadmin-org";
|
owner = "pgadmin-org";
|
||||||
repo = "pgadmin4";
|
repo = "pgadmin4";
|
||||||
rev = "REL-${lib.versions.major version}_${lib.versions.minor version}";
|
rev = "REL-${lib.versions.major version}_${lib.versions.minor version}";
|
||||||
hash = "sha256-zzS/fydNOXpIWdyLtWQhY+hVpneca+3wD88DmZEkS8s=";
|
hash = "sha256-RfpZXy265kwpMsWUBDVfbL/0eX0By79I4VNkG8zwVOs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# keep the scope, as it is used throughout the derivation and tests
|
# keep the scope, as it is used throughout the derivation and tests
|
||||||
|
@ -181,6 +181,8 @@ pythonPackages.buildPythonApplication rec {
|
||||||
google-auth-oauthlib
|
google-auth-oauthlib
|
||||||
google-api-python-client
|
google-api-python-client
|
||||||
keyring
|
keyring
|
||||||
|
typer
|
||||||
|
rich
|
||||||
];
|
];
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
|
|
|
@ -1,64 +1,16 @@
|
||||||
pkg/pip/setup_pip.py | 5 ++++-
|
|
||||||
web/setup.py | 14 ++++++++------
|
|
||||||
2 files changed, 12 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pkg/pip/setup_pip.py b/pkg/pip/setup_pip.py
|
diff --git a/pkg/pip/setup_pip.py b/pkg/pip/setup_pip.py
|
||||||
index 5592d1b04..131eaa1ed 100644
|
index c65795b10..e56b6a6f3 100644
|
||||||
--- a/pkg/pip/setup_pip.py
|
--- a/pkg/pip/setup_pip.py
|
||||||
+++ b/pkg/pip/setup_pip.py
|
+++ b/pkg/pip/setup_pip.py
|
||||||
@@ -95,7 +95,10 @@ setup(
|
@@ -101,7 +101,7 @@ setup(
|
||||||
},
|
|
||||||
|
|
||||||
entry_points={
|
entry_points={
|
||||||
- 'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main'],
|
'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main',
|
||||||
+ 'console_scripts': [
|
- 'pgadmin4-cli=pgadmin4.setup:main'],
|
||||||
+ 'pgadmin4=pgadmin4.pgAdmin4:main',
|
+ 'pgadmin4-cli=pgadmin4.setup:app'],
|
||||||
+ 'pgadmin4-setup=pgadmin4.setup:main'
|
|
||||||
+ ],
|
|
||||||
},
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
diff --git a/web/setup.py b/web/setup.py
|
|
||||||
index 2204ffb..d5fda9f 100644
|
|
||||||
--- a/web/setup.py
|
|
||||||
+++ b/web/setup.py
|
|
||||||
@@ -14,7 +14,6 @@ import argparse
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import builtins
|
|
||||||
-import config
|
|
||||||
|
|
||||||
# Grab the SERVER_MODE if it's been set by the runtime
|
|
||||||
if 'SERVER_MODE' in globals():
|
|
||||||
@@ -91,6 +90,9 @@ def load_servers(args):
|
|
||||||
def setup_db(app):
|
|
||||||
"""Setup the configuration database."""
|
|
||||||
|
|
||||||
+ # here we need an additional import, since the call to setup_db changed
|
|
||||||
+ # https://redmine.postgresql.org/projects/pgadmin4/repository/2/revisions/3a69d50458f57d19948b867aec55c55d635a36e5/diff/web/setup.py
|
|
||||||
+ import config
|
|
||||||
create_app_data_directory(config)
|
|
||||||
|
|
||||||
print("pgAdmin 4 - Application Initialisation")
|
|
||||||
@@ -139,8 +141,9 @@ def clear_servers():
|
|
||||||
clear_database_servers(load_user, True)
|
|
||||||
|
|
||||||
|
|
||||||
-if __name__ == '__main__':
|
|
||||||
+def main():
|
|
||||||
# Configuration settings
|
|
||||||
+ import config
|
|
||||||
parser = argparse.ArgumentParser(description='Setup the pgAdmin config DB')
|
|
||||||
|
|
||||||
exp_group = parser.add_argument_group('Dump server config')
|
|
||||||
@@ -191,3 +194,6 @@ if __name__ == '__main__':
|
|
||||||
else:
|
|
||||||
app = create_app()
|
|
||||||
setup_db(app)
|
|
||||||
+
|
|
||||||
+if __name__ == '__main__':
|
|
||||||
+ main()
|
|
||||||
|
|
||||||
diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py
|
diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py
|
||||||
index 4c36dd1..a492365 100644
|
index 4c36dd1..a492365 100644
|
||||||
--- a/web/pgadmin/model/__init__.py
|
--- a/web/pgadmin/model/__init__.py
|
||||||
|
|
|
@ -12716,3 +12716,8 @@ zustand@^4.4.1:
|
||||||
resolved "https://github.com/pgadmin-org/react-data-grid.git#200d2f5e02de694e3e9ffbe177c279bc40240fb8"
|
resolved "https://github.com/pgadmin-org/react-data-grid.git#200d2f5e02de694e3e9ffbe177c279bc40240fb8"
|
||||||
dependencies:
|
dependencies:
|
||||||
"clsx" "^1.1.1"
|
"clsx" "^1.1.1"
|
||||||
|
"react-data-grid@https://github.com/pgadmin-org/react-data-grid.git#200d2f5e02de694e3e9ffbe177c279bc40240fb8":
|
||||||
|
version "7.0.0-beta.14"
|
||||||
|
resolved "https://github.com/pgadmin-org/react-data-grid.git#200d2f5e02de694e3e9ffbe177c279bc40240fb8"
|
||||||
|
dependencies:
|
||||||
|
"clsx" "^1.1.1"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue