Hi,

On 26-04-17 10:13, Ilya Shipitsin wrote:
> Inspired by 
> https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13032.html
> build options are taken from regular windows installer builds
> 
> Signed-off-by: Ilya Shipitsin <chipits...@gmail.com>
> ---
> v2: moved download/build dependencies into functions, changed cross build
> detection from shell expansion ${CHOST+x} to more recognised -z "${CHOST}",
> which required changing 'set -eux' to 'set -ex'. Added comments to make
> code readable without looking into commit message.
> 
> v3: fixed "trailing whitespaces" found by Samuli Seppänen. Added back "set 
> -u",
> thanks to Steffan Karger. Changed repo manipulation to "apt-add-repository", 
> thanks
> to Nathan Stratton Treadway.

Thanks for not giving up - this looks a lot better now!  Still a problem
though:

> -  - ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG} || (cat 
> config.log && exit 1)
> -  - make -j$JOBS
> -  - src/openvpn/openvpn --version || true
> -  - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd src/openvpn/openvpn; fi
> -  - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L src/openvpn/openvpn; fi
> -  - make check
> -  - $EXTRA_SCRIPT
> +  - if [ -z "${CHOST}" ]; then
> +      ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG} || (cat 
> config.log && exit 1);
> +      make -j$JOBS;
> +      src/openvpn/openvpn --version || true;
> +      if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd src/openvpn/openvpn; fi;
> +      if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L src/openvpn/openvpn; 
> fi;
> +      make check;
> +      $EXTRA_SCRIPT;
> +    else
> +      export 
> TAP_CFLAGS="-I${PWD}/tap-windows-${TAP_WINDOWS_VERSION}/include";
> +      export LZO_CFLAGS="-I${PREFIX}/include";
> +      export LZO_LIBS="-L${PREFIX}/lib -llzo2";
> +      export PKCS11_HELPER_LIBS="-L${PREFIX}/lib -lpkcs11-helper";
> +      export PKCS11_HELPER_CFLAGS="-I${PREFIX}/include";
> +      ./configure --with-crypto-library="${SSLLIB}" --host=${CHOST} 
> --build=x86_64-pc-linux-gnu --enable-pkcs11 --disable-plugins || (cat 
> config.log && exit 1);
> +      make -j$JOBS;
> +    fi

Adding this as a command - with the steps separated by ; - will cause
failures to be ignored.  This patch should fail the build:

       make check;
+      false;
       $EXTRA_SCRIPT;

... but it doesn't:

https://github.com/syzzer/openvpn/commit/df910243428589691cfaa1c0dcc6d92ec7d12b8e

https://travis-ci.org/syzzer/openvpn/builds/228462383?utm_source=github_status&utm_medium=notification

To fix this, I propose to create a .travis/build-check.sh script, which
contains the build steps (and set -eu), and call that script from
.travis.yml

-Steffan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to