Embed sqlalchemy version 1.3.22
Sophie Brun
2 years ago
29 | 29 | python3-marshmallow-sqlalchemy (>= 0.26.0), |
30 | 30 | python3-mock, |
31 | 31 | python3-mockito (>= 1.2.2-2), |
32 | python3-nplusone, | |
32 | python3-nplusone (>= 1.0.0-0kali4), | |
33 | 33 | python3-pil, |
34 | 34 | python3-pyotp, |
35 | 35 | python3-pytest, |
61 | 61 | postgresql, |
62 | 62 | python3-distutils, |
63 | 63 | python3-faraday-plugins (>= 1.4.5), |
64 | python3-nplusone (>= 1.0.0-0kali4), | |
64 | 65 | python3-sqlalchemy-schemadisplay, |
65 | 66 | python3-tornado, |
66 | 67 | python3-webargs (>= 7.0.0), |
0 | From: Sophie Brun <[email protected]> | |
1 | Date: Mon, 6 Dec 2021 17:30:46 +0100 | |
2 | Subject: Add usr/lib/python3/dist-packages/faraday/vendor in import path | |
3 | ||
4 | ||
5 | Last-Update: 2021-12-07 | |
6 | Add usr/lib/python3/dist-packages/faraday/vendor in PYTHONPATH to use | |
7 | the embedded version instead of the packages version of SQLalchemy. | |
8 | --- | |
9 | faraday/manage.py | 2 ++ | |
10 | faraday/searcher/searcher.py | 2 ++ | |
11 | faraday/start_server.py | 2 ++ | |
12 | 3 files changed, 6 insertions(+) | |
13 | ||
14 | diff --git a/faraday/manage.py b/faraday/manage.py | |
15 | index c3458aa..05c8ddc 100755 | |
16 | --- a/faraday/manage.py | |
17 | +++ b/faraday/manage.py | |
18 | @@ -29,6 +29,8 @@ if platform.system() == "Linux": | |
19 | except KeyError: | |
20 | pass | |
21 | ||
22 | +sys.path.insert(1, '/usr/lib/python3/dist-packages/faraday/vendor') | |
23 | + | |
24 | # pgcli is not installed like a Python module in Debian. Add pgcli path in | |
25 | # python path | |
26 | sys.path.append("/usr/share/pgcli") | |
27 | diff --git a/faraday/searcher/searcher.py b/faraday/searcher/searcher.py | |
28 | index 4ebcef8..f88dc58 100755 | |
29 | --- a/faraday/searcher/searcher.py | |
30 | +++ b/faraday/searcher/searcher.py | |
31 | @@ -23,6 +23,8 @@ from pathlib import Path | |
32 | import click | |
33 | import requests | |
34 | ||
35 | +sys.path.insert(1, '/usr/lib/python3/dist-packages/faraday/vendor') | |
36 | + | |
37 | from faraday.searcher.api import Api | |
38 | from faraday.searcher.validator import validate_rules | |
39 | from faraday.server.models import Service, Host | |
40 | diff --git a/faraday/start_server.py b/faraday/start_server.py | |
41 | index 4ab2c68..a29b855 100644 | |
42 | --- a/faraday/start_server.py | |
43 | +++ b/faraday/start_server.py | |
44 | @@ -7,6 +7,8 @@ import socket | |
45 | import argparse | |
46 | import logging | |
47 | ||
48 | +sys.path.insert(1, '/usr/lib/python3/dist-packages/faraday/vendor') | |
49 | + | |
50 | import psycopg2 | |
51 | from alembic.runtime.migration import MigrationContext | |
52 |
0 | From: Sophie Brun <[email protected]> | |
1 | Date: Tue, 7 Dec 2021 10:56:02 +0100 | |
2 | Subject: Remove sqlalchemy requirement | |
3 | ||
4 | ||
5 | Last-Update: 2021-12-07 | |
6 | dh_python generates automatically the Python dependencies with version | |
7 | restrictions. Remove sqlalchemy from the requirements to allow | |
8 | co-instalation of faraday and recent versions of python3-sqlalchemy. | |
9 | --- | |
10 | requirements.txt | 2 +- | |
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
12 | ||
13 | diff --git a/requirements.txt b/requirements.txt | |
14 | index 8420bf7..49e6ca6 100644 | |
15 | --- a/requirements.txt | |
16 | +++ b/requirements.txt | |
17 | @@ -21,7 +21,7 @@ python-dateutil>=2.6.0 | |
18 | requests>=2.18.4 | |
19 | pyasn1 | |
20 | service_identity>=17.0.0 | |
21 | -SQLAlchemy>=1.2.0,<1.4.0 | |
22 | +#SQLAlchemy>=1.2.0,<1.4.0 | |
23 | tqdm>=4.15.0 | |
24 | twisted>=18.9.0 | |
25 | webargs>=7.0.0 |
3 | 3 | Remove-failing-tests.patch |
4 | 4 | change-path-to-server-www.patch |
5 | 5 | create-logs-dir.patch |
6 | Remove-sqlalchemy-requirement.patch | |
7 | Add-vendor-in-path.patch |
3 | 3 | #export DH_VERBOSE = 1 |
4 | 4 | |
5 | 5 | export PYBUILD_TEST_ARGS=-k "not TestGetExploits and not test_update_command and not test_start_and_kill_faraday_server and not test_create_agent_without_name_fails and not test_create_agent_invalid_payload and not test_vuln_filter_exception and not test_vuln_restless_sort_by_ and not test_vuln_web_filter_exception and not test_filter_by_creator_command_id and not test_openapi_format and not test_filter_by_querystring and not test_websocket_BroadcastServerProtocol and not test_vuln_filter and not test_yaml_docs_with_no_doc and not test_yaml_docs_with_defaults and not test_tags_sorted_correctly" |
6 | #export PYBUILD_DISABLE=test | |
6 | 7 | |
7 | 8 | %: |
8 | 9 | dh $@ --with python3,sphinxdoc --buildsystem=pybuild |
16 | 17 | # remove unwanted files: .gitignore and useless README |
17 | 18 | rm debian/faraday/usr/lib/python3*/dist-packages/faraday/migrations/versions/.gitignore |
18 | 19 | rm debian/faraday/usr/lib/python3*/dist-packages/faraday/migrations/README |
20 | # copy vendor to embed sqlalchemy | |
21 | cp -r debian/vendor debian/faraday/usr/lib/python3*/dist-packages/faraday/ | |
19 | 22 | |
20 | 23 | override_dh_installchangelogs: |
21 | 24 | dh_installchangelogs RELEASE.md |
25 | ||
26 | override_dh_auto_test: | |
27 | export PYTHONPATH=$(CURDIR)/debian/vendor:$(PYTHONPATH) && dh_auto_test |