]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Switch to Python 3
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 21 Sep 2021 07:28:49 +0000 (09:28 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 21 Sep 2021 07:47:43 +0000 (09:47 +0200)
Both swidGenerator and strongTNC were migrated to Python 3.
This allows to migrate all testing scripts to Python 3, too.

testing/scripts/build-baseimage
testing/scripts/recipes/011_botan.mk
testing/scripts/recipes/013_strongswan.mk
testing/scripts/recipes/014_swid_generator.mk
testing/scripts/recipes/015_strongTNC.mk
testing/tests/route-based/net2net-xfrmi-ike/hosts/sun/etc/strongswan.conf
testing/tests/route-based/net2net-xfrmi-ike/hosts/sun/etc/updown.py

index 5814c7a6d593beafbd5be6edf4057318f83f604a..10253a564a6a68734483480c4314a1bec08d1da0 100755 (executable)
@@ -19,8 +19,8 @@ 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,python,python-setuptools,python-dev,python-pip,apt-transport-https
-INC=$INC,libjson-c-dev,libxslt1-dev,libapache2-mod-wsgi,iptables-dev
+INC=$INC,python3,python3-setuptools,python3-dev,python3-pip,apt-transport-https
+INC=$INC,libjson-c-dev,libxslt1-dev,libapache2-mod-wsgi-py3,iptables-dev
 INC=$INC,libxerces-c-dev,libgcrypt20-dev,traceroute
 case "$BASEIMGSUITE" in
 jessie)
index 63fb0f7de4dc9fd31878e0bf351f29fbe9ad7594..c923c07d4e987c1ed25c681c00a7cccad18826a1 100644 (file)
@@ -23,7 +23,7 @@ all: install
        @rm -f .$(PKG)-checkout-* && touch $@
 
 .$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV)
-       cd $(PKG) && python ./configure.py $(CONFIG_OPTS) && make -j $(NUM_CPUS)
+       cd $(PKG) && python3 ./configure.py $(CONFIG_OPTS) && make -j $(NUM_CPUS)
        @rm -f .$(PKG)-built-* && touch $@
 
 install: .$(PKG)-built-$(REV)
index b4c7d3629debccc177d182c60fd1125ce9e3584b..0fce0ad9ff27b3ad906cf6f7ade5515b70e42c61 100644 (file)
@@ -129,6 +129,6 @@ build: configure
 
 install: build
        cd $(BUILDDIR) && make -j install && \
-               cd $(DIR)/src/libcharon/plugins/vici/python && python setup.py install
+               cd $(DIR)/src/libcharon/plugins/vici/python && python3 setup.py install
        # for Python-based updown scripts
-       pip install python-daemon
+       pip3 install python-daemon
index 3394620e25557fc438694b9013ac6914b29f23d8..f0e8c3000b4f9dc63108d89682484390788b0b9e 100644 (file)
@@ -17,4 +17,4 @@ $(TAR):
        @touch $@
 
 install: .$(PKG)-unpacked-$(REV)
-       cd $(DIR) && python setup.py install
+       cd $(DIR) && python3 setup.py install
index b94a3114ab90162684bbea247aac6c6dee529878..973cdabef0cefabb23f4362508047776e86bf76d 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/make
 
 PKG = strongTNC
-REV = 0.9.9
+REV = 1.0
 DIR = $(PKG)-$(REV)
 ZIP = $(PKG)-$(REV).zip
 SRC = https://github.com/strongswan/$(PKG)/archive/$(REV).zip
@@ -18,10 +18,9 @@ $(ZIP):
 
 .$(PKG)-deps-$(REV): .$(PKG)-unpacked-$(REV)
        mkdir -p $(DEPS)
-       pip download -d $(DEPS) -r $(DIR)/requirements.txt six
+       pip3 download -d $(DEPS) -r $(DIR)/requirements.txt
        @touch $@
 
 install: .$(PKG)-deps-$(REV)
-       # six is required for djangorestframework-camel-case
-       pip install --no-index --find-links=file://`pwd`/$(DEPS) -r $(DIR)/requirements.txt six
+       pip3 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
index 283cb1d7242fb5cffe31040a0a0609a480271bdd..d5aa545b1a086366d0124460181388df92147862 100644 (file)
@@ -7,6 +7,6 @@ swanctl {
 charon-systemd {
   load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac vici kernel-netlink socket-default
   start-scripts {
-    updown = /usr/bin/python /etc/updown.py
+    updown = /usr/bin/python3 /etc/updown.py
   }
 }
index fbe89fcfca38245e425c5b6f917e1a4d16881d8b..ee593deca7a789efd1ce1a00d29492cd6d4138b3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import sys
 import vici