]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Use venv for strongTNC
authorTobias Brunner <tobias@strongswan.org>
Wed, 28 Jun 2023 13:52:57 +0000 (15:52 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 13 Jul 2023 08:48:53 +0000 (10:48 +0200)
Also updated to a newer version to fix dependency issues.

testing/hosts/default/usr/local/bin/init_tnc
testing/scripts/build-baseimage
testing/scripts/recipes/015_strongTNC.mk
testing/tests/tnc/tnccs-20-ev-pt-tls/hosts/alice/etc/apache2/sites-available/000-default.conf
testing/tests/tnc/tnccs-20-pdp-eap/hosts/alice/etc/apache2/sites-available/000-default.conf
testing/tests/tnc/tnccs-20-pdp-pt-tls/hosts/alice/etc/apache2/sites-available/000-default.conf

index 49084e477efd9d645c9311c610c62f07488f1693..2c93a6861c9be2c10879644c19568f149939c905 100755 (executable)
@@ -4,9 +4,11 @@ cd /var/www/tnc
 
 if [ -f django.db ]
 then
-       exit 0 
+       exit 0
 fi
 
+. /usr/local/venvs/tnc/bin/activate
+
 ./manage.py migrate --database meta
 ./manage.py setpassword strongSwan strongSwan
 ./manage.py collectstatic --noinput
index e5c912a9a3ca7deded0b1a091cde2ca0a12a2b63..c2fa408145f1d4b2cca30d9bc868d144e7b532cb 100755 (executable)
@@ -19,7 +19,7 @@ INC=$INC,openssl,vim,sqlite3,conntrack,gdb,cmake,libltdl-dev,wget,gnupg,man-db
 INC=$INC,libboost-thread-dev,libboost-system-dev,git,iperf,htop,valgrind,strace
 INC=$INC,gnat,gprbuild,acpid,acpi-support-base,libldns-dev,libunbound-dev
 INC=$INC,dnsutils,libsoup2.4-dev,ca-certificates,unzip,libsystemd-dev
-INC=$INC,python3,python3-setuptools,python3-dev,python3-pip,python3-daemon,
+INC=$INC,python3,python3-setuptools,python3-dev,python3-daemon,python3-venv,
 INC=$INC,apt-transport-https,libjson-c-dev,libxslt1-dev,libapache2-mod-wsgi-py3
 INC=$INC,libxerces-c-dev
 case "$BASEIMGSUITE" in
index 973cdabef0cefabb23f4362508047776e86bf76d..4cc08993c6c13b155951eb916b31bc28a78a9f85 100644 (file)
@@ -1,11 +1,12 @@
 #!/usr/bin/make
 
 PKG = strongTNC
-REV = 1.0
+REV = 1.0.2
 DIR = $(PKG)-$(REV)
 ZIP = $(PKG)-$(REV).zip
 SRC = https://github.com/strongswan/$(PKG)/archive/$(REV).zip
 DEPS = $(PKG)-deps
+VENV = /usr/local/venvs/tnc
 
 all: install
 
@@ -22,5 +23,6 @@ $(ZIP):
        @touch $@
 
 install: .$(PKG)-deps-$(REV)
-       pip3 install --no-index --find-links=file://`pwd`/$(DEPS) -r $(DIR)/requirements.txt
+       python3 -m venv $(VENV)
+       $(VENV)/bin/pip install --no-index --find-links=file://`pwd`/$(DEPS) -r $(DIR)/requirements.txt
        cp -r $(DIR) /var/www/tnc && chgrp -R www-data /var/www/tnc && chmod g+sw /var/www/tnc