]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Build certificates before guests after building strongSwan
authorTobias Brunner <tobias@strongswan.org>
Tue, 7 May 2019 17:21:21 +0000 (19:21 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 May 2019 12:56:48 +0000 (14:56 +0200)
If the script is run on a clean working copy, building the guests will
fail if the certificates don't exist.

testing/scripts/build-strongswan

index 2214a57d1491a53415f3be9fa59562ec0e940759..d872e72854d0002a60e29cbf99281416f631988d 100755 (executable)
@@ -88,9 +88,15 @@ cp $RECPDIR/$RECIPE $SHAREDDIR/build-strongswan
 log_action "Installing from recipe $RECIPE"
 execute_chroot "make SRCDIR=/root/strongswan BUILDDIR=/root/shared/build-strongswan -f /root/shared/build-strongswan/$RECIPE"
 
-# requild the guest images if we modified the root image
+# rebuild the guest images after we modified the root image
 if [ -z "$2" ]; then
        # cleanup before mounting guest images
        on_exit
-       $DIR/build-guestimages
+       # building the guest images without certificates fails on winnetou
+       if [ ! -f "$DIR/../hosts/winnetou/etc/ca/strongswanCert.pem" ]; then
+               # this also re-builds the guest images
+               $DIR/build-certs
+       else
+               $DIR/build-guestimages
+       fi
 fi