uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,206 @@
{ lib
, python3
, fetchurl
, zlib
, mkYarnModules
, sphinx
, nixosTests
, pkgs
}:
let
pname = "pgadmin";
version = "6.10";
src = fetchurl {
url = "https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v${version}/source/pgadmin4-${version}.tar.gz";
sha256 = "sha256-wl7qC0p1NLX4+ulb4AGNPU6D0r838t6t/IYwJZcDnVQ=";
};
yarnDeps = mkYarnModules {
pname = "${pname}-yarn-deps";
inherit version;
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
};
# move buildDeps here to easily pass to test suite
buildDeps = with pythonPackages; [
flask
flask-gravatar
flask_login
flask_mail
flask_migrate
flask_sqlalchemy
flask-wtf
flask-compress
passlib
pytz
simplejson
six
sqlparse
wtforms
flask-paranoid
psutil
psycopg2
python-dateutil
sqlalchemy
itsdangerous
flask-security-too
bcrypt
cryptography
sshtunnel
ldap3
flask-babelex
flask-babel
gssapi
flask-socketio
eventlet
httpagentparser
user-agents
wheel
authlib
qrcode
pillow
pyotp
botocore
boto3
];
# override necessary on pgadmin4 6.10
pythonPackages = python3.pkgs.overrideScope (final: prev: rec {
flask = prev.flask.overridePythonAttrs (oldAttrs: rec {
version = "2.0.3";
src = oldAttrs.src.override {
inherit version;
sha256 = "sha256-4RIMIoyi9VO0cN9KX6knq2YlhGdSYGmYGz6wqRkCaH0=";
};
disabledTests = (oldAttrs.disabledTests or [ ]) ++ [
"test_aborting"
];
});
flask-paranoid = prev.flask-paranoid.overridePythonAttrs (oldAttrs: rec {
# tests fail due to downgrades here
doCheck = false;
});
werkzeug = prev.werkzeug.overridePythonAttrs (oldAttrs: rec {
version = "2.0.3";
src = oldAttrs.src.override {
inherit version;
sha256 = "sha256-uGP4/wV8UiFktgZ8niiwQRYbS+W6TQ2s7qpQoWOCLTw=";
};
});
});
in
pythonPackages.buildPythonApplication rec {
inherit pname version src;
# from Dockerfile
CPPFLAGS = "-DPNG_ARM_NEON_OPT=0";
format = "setuptools";
patches = [
# Expose setup.py for later use
./expose-setup.py.patch
];
postPatch = ''
# patching Makefile, so it doesn't try to build sphinx documentation here
# (will do so later)
substituteInPlace Makefile \
--replace 'LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 $(MAKE) -C docs/en_US -f Makefile.sphinx html' "true"
# fix document which refers a non-existing document and fails
substituteInPlace docs/en_US/contributions.rst \
--replace "code_snippets" ""
patchShebangs .
# relax dependencies
substituteInPlace requirements.txt \
--replace "eventlet==0.33.0" "eventlet>=0.33.0" \
--replace "psycopg2==2.9.*" "psycopg2>=2.9" \
--replace "cryptography==3.*" "cryptography>=3.0" \
--replace "requests==2.25.*" "requests>=2.25.0" \
--replace "boto3==1.20.*" "boto3>=1.20" \
--replace "botocore==1.23.*" "botocore>=1.23" \
--replace "pytz==2021.*" "pytz" \
--replace "Werkzeug==2.0.3" "werkzeug>=2.*"
# don't use Server Mode (can be overridden later)
substituteInPlace pkg/pip/setup_pip.py \
--replace "req = req.replace('psycopg2', 'psycopg2-binary')" "req = req" \
--replace "builtins.SERVER_MODE = None" "builtins.SERVER_MODE = False"
'';
preBuild = ''
# Adapted from pkg/pip/build.sh
echo Creating required directories...
mkdir -p pip-build/pgadmin4/docs
# build the documentation
cd docs/en_US
${sphinx}/bin/sphinx-build -W -b html -d _build/doctrees . _build/html
# Build the clean tree
cd ../../web
cp -r * ../pip-build/pgadmin4
cd ../docs
cp -r * ../pip-build/pgadmin4/docs
for DIR in `ls -d ??_??/`
do
if [ -d ''${DIR}_build/html ]; then
mkdir -p ../pip-build/pgadmin4/docs/''${DIR}_build
cp -Rv ''${DIR}_build/html ../pip-build/pgadmin4/docs/''${DIR}_build
fi
done
cd ../
cp -r ${yarnDeps}/* pip-build/pgadmin4
echo Creating distro config...
echo HELP_PATH = \'../../docs/en_US/_build/html/\' > pip-build/pgadmin4/config_distro.py
echo MINIFY_HTML = False >> pip-build/pgadmin4/config_distro.py
echo Creating manifest...
echo recursive-include pgadmin4 \* > pip-build/MANIFEST.in
echo Building wheel...
cd pip-build
# copy non-standard setup.py to local directory
# so setuptools-build-hook can call it
cp -v ../pkg/pip/setup_pip.py setup.py
'';
nativeBuildInputs = with pythonPackages; [ cython pip ];
buildInputs = [
zlib
pythonPackages.wheel
];
# tests need an own data, log directory
# and a working and correctly setup postgres database
# checks will be run through nixos/tests
doCheck = false;
# speaklater3 is seperate because when passing buildDeps
# to the test, it fails there due to a collision with speaklater
propagatedBuildInputs = buildDeps ++ [ pythonPackages.speaklater3 ];
passthru.tests = {
standalone = nixosTests.pgadmin4-standalone;
# regression and function tests of the package itself
package = import ../../../../nixos/tests/pgadmin4.nix { inherit pkgs buildDeps; pythonEnv = pythonPackages; };
};
meta = with lib; {
description = "Administration and development platform for PostgreSQL";
homepage = "https://www.pgadmin.org/";
license = licenses.mit;
changelog = "https://www.pgadmin.org/docs/pgadmin4/latest/release_notes_${lib.versions.major version}_${lib.versions.minor version}.html";
maintainers = with maintainers; [ gador ];
mainProgram = "pgadmin4";
};
}

View file

@ -0,0 +1,65 @@
From 391433d020da52fba28ad08beb2cc85ffd852044 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= <mkg20001@gmail.com>
Date: Wed, 23 Feb 2022 14:40:11 +0100
Subject: [PATCH] Expose setup.py as pgadmin4-setup
---
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
index 5592d1b04..131eaa1ed 100644
--- a/pkg/pip/setup_pip.py
+++ b/pkg/pip/setup_pip.py
@@ -95,7 +95,10 @@ setup(
},
entry_points={
- 'console_scripts': ['pgadmin4=pgadmin4.pgAdmin4:main'],
+ 'console_scripts': [
+ 'pgadmin4=pgadmin4.pgAdmin4:main',
+ 'pgadmin4-setup=pgadmin4.setup:main'
+ ],
},
)
diff --git a/web/setup.py b/web/setup.py
index 5f4257e86..df970f049 100644
--- a/web/setup.py
+++ b/web/setup.py
@@ -32,6 +32,10 @@ from pgadmin import create_app
from pgadmin.utils import clear_database_servers, dump_database_servers,\
load_database_servers
+# Configuration settings
+import config
+from pgadmin.model import SCHEMA_VERSION
+from pgadmin.setup import db_upgrade, create_app_data_directory
def dump_servers(args):
"""Dump the server groups and servers.
@@ -139,12 +143,7 @@ def clear_servers():
clear_database_servers(load_user, True)
-if __name__ == '__main__':
- # Configuration settings
- import config
- from pgadmin.model import SCHEMA_VERSION
- from pgadmin.setup import db_upgrade, create_app_data_directory
-
+def main():
parser = argparse.ArgumentParser(description='Setup the pgAdmin config DB')
exp_group = parser.add_argument_group('Dump server config')
@@ -194,3 +193,6 @@ if __name__ == '__main__':
print(str(e))
else:
setup_db()
+
+if __name__ == '__main__':
+ main()
--
2.35.1

View file

@ -0,0 +1,205 @@
{
"//": [
"IMPORTANT:",
"If runtime or build time dependencies are changed in this file, the ",
"committer *must* ensure the DEB and RPM package maintainers are informed ",
"as soon as possible."
],
"license": "PostgreSQL",
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/eslint-parser": "^7.17.0",
"@babel/eslint-plugin": "^7.17.7",
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
"@babel/plugin-syntax-jsx": "^7.16.0",
"@babel/preset-env": "^7.10.2",
"@babel/preset-typescript": "^7.8.3",
"@emotion/core": "^10.0.14",
"@emotion/memoize": "^0.7.5",
"@emotion/react": "^11.1.5",
"@emotion/styled": "^10.0.14",
"@emotion/utils": "^1.0.0",
"@svgr/webpack": "^5.5.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.4.1",
"autoprefixer": "^10.2.4",
"axios-mock-adapter": "^1.17.0",
"babel-loader": "^8.1.0",
"browserify": "^17.0.0",
"buffer": "^6.0.3",
"copy-webpack-plugin": "^7.0.0",
"core-js": "^3.2.1",
"cross-env": "^7.0.3",
"css-minimizer-webpack-plugin": "^3.0.0",
"enzyme": "^3.11.0",
"eslint": "^7.19.0",
"eslint-plugin-react": "^7.20.5",
"eslint-plugin-react-hooks": "^4.3.0",
"exports-loader": "^2.0.0",
"html-react-parser": "^1.2.7",
"image-minimizer-webpack-plugin": "^2.2.0",
"imagemin-mozjpeg": "^9.0.0",
"imagemin-optipng": "^8.0.0",
"imagemin-pngquant": "^9.0.1",
"imagemin-svgo": "^8.0.0",
"is-docker": "^2.1.1",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^3.6.0",
"jasmine-enzyme": "^7.1.2",
"karma": "^6.3.15",
"karma-babel-preprocessor": "^8.0.0",
"karma-browserify": "^8.0.0",
"karma-chrome-launcher": "^3.1.0",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-requirejs": "~1.1.0",
"karma-source-map-support": "^1.4.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^5.0.0",
"mini-css-extract-plugin": "^1.3.5",
"popper.js": "^1.16.1",
"postcss-loader": "^5.0.0",
"process": "^0.11.10",
"prop-types": "^15.7.2",
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.24.4",
"sass-loader": "^11.0.0",
"sass-resources-loader": "^2.2.1",
"style-loader": "^2.0.0",
"stylis": "^4.0.7",
"svgo": "^2.7.0",
"svgo-loader": "^2.2.0",
"terser-webpack-plugin": "^5.1.1",
"typescript": "^3.2.2",
"webfonts-loader": "^7.3.0",
"webpack": "^5.21.2",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-cli": "^4.5.0",
"yarn-audit-html": "^2.0.0"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-react": "^7.12.13",
"@date-io/core": "^1.3.6",
"@date-io/date-fns": "1.x",
"@emotion/sheet": "^1.0.1",
"@material-ui/core": "4.11.0",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "4.0.0-alpha.58",
"@material-ui/pickers": "^3.2.10",
"@mui/icons-material": "^5.4.2",
"@mui/material": "^5.4.3",
"@projectstorm/react-diagrams": "^6.6.1",
"@simonwep/pickr": "^1.5.1",
"@szhsin/react-menu": "^2.2.0",
"@tippyjs/react": "^4.2.0",
"@types/classnames": "^2.2.6",
"@types/react": "^16.7.18",
"@types/react-dom": "^16.0.11",
"ajv": "^8.8.2",
"alertifyjs": "git+https://github.com/EnterpriseDB/AlertifyJS/#72c1d794f5b6d4ec13a68d123c08f19021afe263",
"anti-trojan-source": "^1.4.0",
"aspen-decorations": "^1.0.2",
"axios": "^0.21.1",
"babelify": "~10.0.0",
"backbone": "1.4.0",
"backform": "^0.2.0",
"backgrid-filter": "^0.3.7",
"backgrid-select-all": "^0.3.5",
"bignumber.js": "^9.0.1",
"bootstrap": "^4.3.1",
"bootstrap-datepicker": "^1.8.0",
"bootstrap4-toggle": "^3.6.1",
"brace": "^0.11.1",
"browserfs": "^1.4.3",
"chart.js": "^2.9.3",
"classnames": "^2.2.6",
"closest": "^0.0.1",
"codemirror": "^5.59.2",
"context-menu": "^2.0.0",
"css-loader": "^5.0.1",
"cssnano": "^5.0.2",
"dagre": "^0.8.4",
"date-fns": "^2.24.0",
"diff-arrays-of-objects": "^1.1.8",
"dropzone": "^5.9.3",
"html2canvas": "^1.0.0-rc.7",
"immutability-helper": "^3.0.0",
"imports-loader": "^2.0.0",
"insert-if": "^1.1.0",
"ip-address": "^7.1.0",
"jquery": "^3.6.0",
"jquery-contextmenu": "^2.9.2",
"jquery-ui": "^1.13.0",
"json-bignumber": "^1.0.1",
"jsoneditor": "^9.5.4",
"jsoneditor-react": "^3.1.1",
"karma-coverage": "^2.0.3",
"leaflet": "^1.5.1",
"lodash": "4.*",
"ml-matrix": "^6.5.0",
"moment": "^2.29.3",
"moment-timezone": "^0.5.34",
"mousetrap": "^1.6.3",
"notificar": "^1.0.1",
"notistack": "^2.0.0",
"path-fx": "^2.0.0",
"pathfinding": "^0.4.18",
"paths-js": "^0.4.9",
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#b0287d39b54de28cb2a83f0c19a95ce823f6feae",
"postcss": "^8.2.15",
"raf": "^3.4.1",
"rc-dock": "^3.2.9",
"react": "^17.0.1",
"react-aspen": "^1.1.0",
"react-checkbox-tree": "^1.7.2",
"react-data-grid": "git+https://github.com/adityatoshniwal/react-data-grid.git/#8d9bc16ddd7c419acfbbd1c1cc2b70eb9f5b453c",
"react-dom": "^17.0.1",
"react-draggable": "^4.4.4",
"react-leaflet": "^3.2.2",
"react-rnd": "^10.3.5",
"react-router-dom": "^6.2.2",
"react-select": "^4.2.1",
"react-table": "^7.6.3",
"react-timer-hook": "^3.0.5",
"react-virtualized-auto-sizer": "^1.0.6",
"react-window": "^1.8.5",
"select2": "^4.0.13",
"shim-loader": "^1.0.1",
"slickgrid": "git+https://github.com/6pac/SlickGrid.git#2.3.16",
"snapsvg-cjs": "^0.0.6",
"socket.io-client": "^4.0.0",
"split.js": "^1.5.10",
"styled-components": "^5.2.1",
"tablesorter": "^2.31.2",
"tempusdominus-bootstrap-4": "^5.1.2",
"tempusdominus-core": "^5.19.3",
"underscore": "^1.13.1",
"url-loader": "^1.1.2",
"valid-filename": "^2.0.1",
"webcabin-docker": "git+https://github.com/EnterpriseDB/wcDocker/#40d025e0d86ee3cf058a52e01d2042113f134cdd",
"wkx": "^0.5.0",
"xterm": "^4.11.0",
"xterm-addon-fit": "^0.5.0",
"xterm-addon-search": "^0.8.0",
"xterm-addon-web-links": "^0.4.0"
},
"scripts": {
"linter": "yarn eslint --no-eslintrc -c .eslintrc.js --ext .js --ext .jsx .",
"webpacker": "yarn run webpack --config webpack.config.js --progress",
"webpacker:watch": "yarn run webpack --config webpack.config.js --progress --watch",
"bundle:watch": "yarn run linter && yarn run webpacker:watch",
"bundle:dev": "yarn run linter && yarn run webpacker",
"bundle:analyze": "cross-env NODE_ENV=production ANALYZE=true yarn run bundle:dev",
"bundle": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 yarn run bundle:dev",
"test:karma-once": "yarn run linter && yarn run karma start --single-run",
"test:karma": "yarn run linter && yarn run karma start",
"test:karma-coverage": "yarn run test:karma-once --reporters coverage,progress",
"test:feature": "yarn run bundle && python regression/runtests.py --pkg feature_tests",
"test": "yarn run test:karma-once && yarn run bundle && python regression/runtests.py",
"pep8": "pycodestyle --config=../.pycodestyle ../docs && pycodestyle --config=../.pycodestyle ../pkg && pycodestyle --config=../.pycodestyle ../tools && pycodestyle --config=../.pycodestyle ../web",
"auditjs-html": "yarn audit --json | yarn run yarn-audit-html --output ../auditjs.html",
"auditjs": "yarn audit --groups dependencies",
"auditpy": "safety check --full-report -i 40493",
"audit": "yarn run auditjs && yarn run auditpy"
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff