From: Tobias Brunner Date: Mon, 7 Aug 2017 14:26:38 +0000 (+0200) Subject: testing: Move collector.db in tnc/tnccs-20-ev-pt-tls scenario to /etc/db.d X-Git-Tag: 5.6.0rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f058804df827b925172a2c8f5dd3512ccbb3b332;p=thirdparty%2Fstrongswan.git testing: Move collector.db in tnc/tnccs-20-ev-pt-tls scenario to /etc/db.d Also move initialization to the pretest script (it's way faster in the in-memory database). --- diff --git a/testing/hosts/alice/etc/strongswan.conf b/testing/hosts/alice/etc/strongswan.conf index 575fd0fb20..bc0ddbf33e 100644 --- a/testing/hosts/alice/etc/strongswan.conf +++ b/testing/hosts/alice/etc/strongswan.conf @@ -3,8 +3,3 @@ charon { load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 revocation constraints curve25519 pubkey gmp random nonce curl kernel-netlink socket-default updown stroke vici } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/hosts/bob/etc/strongswan.conf b/testing/hosts/bob/etc/strongswan.conf index 575fd0fb20..bc0ddbf33e 100644 --- a/testing/hosts/bob/etc/strongswan.conf +++ b/testing/hosts/bob/etc/strongswan.conf @@ -3,8 +3,3 @@ charon { load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 revocation constraints curve25519 pubkey gmp random nonce curl kernel-netlink socket-default updown stroke vici } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/hosts/carol/etc/strongswan.conf b/testing/hosts/carol/etc/strongswan.conf index 575fd0fb20..bc0ddbf33e 100644 --- a/testing/hosts/carol/etc/strongswan.conf +++ b/testing/hosts/carol/etc/strongswan.conf @@ -3,8 +3,3 @@ charon { load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 revocation constraints curve25519 pubkey gmp random nonce curl kernel-netlink socket-default updown stroke vici } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/hosts/dave/etc/strongswan.conf b/testing/hosts/dave/etc/strongswan.conf index 575fd0fb20..bc0ddbf33e 100644 --- a/testing/hosts/dave/etc/strongswan.conf +++ b/testing/hosts/dave/etc/strongswan.conf @@ -3,8 +3,3 @@ charon { load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 revocation constraints curve25519 pubkey gmp random nonce curl kernel-netlink socket-default updown stroke vici } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/hosts/default/usr/local/bin/init_collector b/testing/hosts/default/usr/local/bin/init_collector index 12ec683c6a..c522de8742 100755 --- a/testing/hosts/default/usr/local/bin/init_collector +++ b/testing/hosts/default/usr/local/bin/init_collector @@ -1,4 +1,4 @@ #! /bin/sh -cat /usr/local/share/strongswan/templates/database/sw-collector/sw_collector_tables.sql | sqlite3 /etc/pts/collector.db +cat /usr/local/share/strongswan/templates/database/sw-collector/sw_collector_tables.sql | sqlite3 /etc/db.d/collector.db LEAK_DETECTIVE_DISABLE=1 /usr/local/sbin/sw-collector diff --git a/testing/hosts/moon/etc/strongswan.conf b/testing/hosts/moon/etc/strongswan.conf index 575fd0fb20..bc0ddbf33e 100644 --- a/testing/hosts/moon/etc/strongswan.conf +++ b/testing/hosts/moon/etc/strongswan.conf @@ -3,8 +3,3 @@ charon { load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 revocation constraints curve25519 pubkey gmp random nonce curl kernel-netlink socket-default updown stroke vici } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/hosts/sun/etc/strongswan.conf b/testing/hosts/sun/etc/strongswan.conf index 575fd0fb20..bc0ddbf33e 100644 --- a/testing/hosts/sun/etc/strongswan.conf +++ b/testing/hosts/sun/etc/strongswan.conf @@ -3,8 +3,3 @@ charon { load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 revocation constraints curve25519 pubkey gmp random nonce curl kernel-netlink socket-default updown stroke vici } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/hosts/venus/etc/strongswan.conf b/testing/hosts/venus/etc/strongswan.conf index 575fd0fb20..bc0ddbf33e 100644 --- a/testing/hosts/venus/etc/strongswan.conf +++ b/testing/hosts/venus/etc/strongswan.conf @@ -3,8 +3,3 @@ charon { load = sha1 sha2 md5 aes des hmac pem pkcs1 x509 revocation constraints curve25519 pubkey gmp random nonce curl kernel-netlink socket-default updown stroke vici } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/hosts/winnetou/etc/strongswan.conf b/testing/hosts/winnetou/etc/strongswan.conf index b9b96e48d4..a69df79abd 100644 --- a/testing/hosts/winnetou/etc/strongswan.conf +++ b/testing/hosts/winnetou/etc/strongswan.conf @@ -3,8 +3,3 @@ pki { load = random pem sha1 sha2 sha3 pkcs1 pkcs8 pem gmp mgf1 bliss curve25519 x509 } - -sw-collector { - database = sqlite:///etc/pts/collector.db - history = /var/log/apt/history.log -} diff --git a/testing/scripts/build-guestimages b/testing/scripts/build-guestimages index 278379b93f..7dd7188c2c 100755 --- a/testing/scripts/build-guestimages +++ b/testing/scripts/build-guestimages @@ -50,10 +50,6 @@ do execute_chroot "ldconfig" 0 execute "mkdir $LOOPDIR/etc/pts" 0 - if [ "$host" = "carol" ] - then - execute_chroot "/usr/local/bin/init_collector" 0 - fi if [ "$host" = "alice" ] then execute "mkdir $LOOPDIR/var/log/apache2/tnc" 0 diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index 8c6ecaafd4..d4e9e922f1 100755 --- a/testing/scripts/build-strongswan +++ b/testing/scripts/build-strongswan @@ -51,6 +51,7 @@ do_on_exit umount $LOOPDIR/root/strongswan log_action "Remove SWID tags of previous versions" execute_chroot 'find /usr/local/share/regid.2004-03.org.strongswan -name *.swidtag -delete' +execute_chroot 'find /usr/local/share/strongswan -name *.swidtag -delete' echo "Building and installing strongSwan" diff --git a/testing/tests/tnc/tnccs-20-ev-pt-tls/hosts/carol/etc/strongswan.conf b/testing/tests/tnc/tnccs-20-ev-pt-tls/hosts/carol/etc/strongswan.conf index 8fba7413a2..87c3745a31 100644 --- a/testing/tests/tnc/tnccs-20-ev-pt-tls/hosts/carol/etc/strongswan.conf +++ b/testing/tests/tnc/tnccs-20-ev-pt-tls/hosts/carol/etc/strongswan.conf @@ -7,7 +7,7 @@ libtls { libimcv { plugins { imc-swima { - swid_database = sqlite:///etc/pts/collector.db + swid_database = sqlite:///etc/db.d/collector.db } } } diff --git a/testing/tests/tnc/tnccs-20-ev-pt-tls/pretest.dat b/testing/tests/tnc/tnccs-20-ev-pt-tls/pretest.dat index d8ac3ab41b..c0d732368e 100644 --- a/testing/tests/tnc/tnccs-20-ev-pt-tls/pretest.dat +++ b/testing/tests/tnc/tnccs-20-ev-pt-tls/pretest.dat @@ -20,6 +20,7 @@ winnetou::ip route add 10.1.0.0/16 via 192.168.0.1 dave::ip route add 10.1.0.0/16 via 192.168.0.1 dave::cat /etc/pts/options dave::/usr/local/bin/pt-tls-client --optionsfrom /etc/pts/options +carol::/usr/local/bin/init_collector carol::ip route add 10.1.0.0/16 via 192.168.0.1 carol::cat /etc/pts/options carol::/usr/local/bin/pt-tls-client --optionsfrom /etc/pts/options diff --git a/testing/tests/tnc/tnccs-20-ev-pt-tls/test.conf b/testing/tests/tnc/tnccs-20-ev-pt-tls/test.conf index 08ea543e2f..f434789b9c 100644 --- a/testing/tests/tnc/tnccs-20-ev-pt-tls/test.conf +++ b/testing/tests/tnc/tnccs-20-ev-pt-tls/test.conf @@ -22,7 +22,7 @@ IPSECHOSTS="carol moon dave alice" # Guest instances on which databases are used # -DBHOSTS="alice" +DBHOSTS="alice carol" # charon controlled by swanctl #