Without the change and in the absence of a clang-format command in the
user's PATH, the script will fail in line 79 of the hook due to set
-e. It will fail to produce the error message starting at line 83.
The change allows the error message to print.
Signed-off-by: Mark Deric <jmark@openvpn.net>
This avoids all the manual deps building and instead
uses vcpkg directly.
Note: need to remove gtest from VCPKG manifest for now:
- it only builds with -posix variant of mingw compiler
- vcpkg uses the non-posix variant and can't be trivially
reconfigured
- we build gtest from unittests anyway and that one uses
the compiler we specify
Using the posix variant of mingw compiler will require
setting up a custom triplet and toolchain. That will be
done in a later commit.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
When enabling this pre-commit hook, clang-format will be run before the
commit can be completed. If the changes about to be committed does not
adhere to the defined code style, the current commit will not be completed.
To install this pre-commit hook, run:
$ ./scripts/git-pre-commit-clangformat.sh install
This script is a slightly modified version of what is used in the
OpenVPN 2.x project, slightly modified to use clang-format instead of
uncrustify and to extend the file change filter check to include C++ source
and header files.
Signed-off-by: David Sommerseth <davids@openvpn.net>
vcpkg has removed OPENSSL_VERSION from portfile.cmake
in favor of VERSION variable which is set based on port version
(https://github.com/microsoft/vcpkg/pull/27178/files).
Parse port manifest to get OpenSSL version.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
(cherry picked from commit a12737b5cc)
vcpkg has removed OPENSSL_VERSION from portfile.cmake
in favor of VERSION variable which is set based on port version
(https://github.com/microsoft/vcpkg/pull/27178/files).
Parse port manifest to get OpenSSL version.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
- the OpenSSL build script for all platform, was only
used on macOS and better alternatives like homebrew exit there
- mac build scripts in general, cmake/homebrew is a better alternative
- vars for Android, Android uses CMake based build, see ics-openvpn for an example
- lzo build scripts. Core can do lzo decompress witout it and if used, system lzo can
be used
Signed-off-by: Arne Schwabe <arne@openvpn.net>
Hardcode libdir to lib, because openssl3 chooses
lib64 otherwise.
While here, some small changes:
- remove dangerous "|| true" after openssl make
- remove "-j1" for openssl "make install". Speeds
up the documentation generation.
- use set -x
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
(cherry picked from commit f27157e28b)
OpenSSL has changed tags naming to
something like openssl-3.0.2, so adapt
our script accordingly.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
(cherry picked from commit 296abfca32)
uapi header has been added to the source code, so
we don't need that dependency anymore.
Fix MinGW script accordingly.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Hardcode libdir to lib, because openssl3 chooses
lib64 otherwise.
While here, some small changes:
- remove dangerous "|| true" after openssl make
- remove "-j1" for openssl "make install". Speeds
up the documentation generation.
- use set -x
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Remove the vars-osx64 and vars-iossim files which are no longer used.
The IOS simulator does not support the VPN API and builds for the
IOS simulator have not been done in a very long time nor are they
particular useful.
Also switch to pkg-config for jsoncpp by default.
Signed-off-by: Arne Schwabe <arne@openvpn.net>
Most of these haven't been used in years and are
probably useless now. If required they can always
be recovered from the git history.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
This commit will build with ASAN when the environment variable ASAN=1.
Building with ASAN:
- Add "-fsanitize=address" to enable ASAN checks
- Add "-ggdb3" for higher-fidelity stack traces
- Add "-fno-omit-frame-pointer" to maintain fp info on call stacks
If both ASAN=1 and VAL=1, ASAN takes precedence.
Signed-off-by: Jeff Lucovsky <jeff.lucovsky@openvpn.net>
Windows agent has been moved from common to core,
so for consistency move mac agent too.
Since agent and agent-enabled client depend on jsoncpp,
also move jsoncpp build scripts.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Add some logic to the script which builds the binaries using mingw. Git
revisions and patch information are extracted from the vcpkg portfiles
used for the MSVC build. This way the builds should be more alike.
Signed-off-by: Heiko Hund <heiko@openvpn.net>
The code that requires xxHash requires a fairly new xxHash version, so
add a local copy of 0.8.0 to build with this header only library.
Signed-off-by: Arne Schwabe <arne@openvpn.net>
ARCH enables to build certain architecture only.
NO_DEPS disables downloading and building dependencies.
NO_OPENSSL disables downloading and building OpenSSL.
OPENSSL_ROOT_DIR allows to specify location for OpenSSL root
Example:
ARCH=x86_64 NO_OPENSSL=1 ./build
Signed-off-by: Lev Stipakov <lev@openvpn.net>