Skip to content

Commit

Permalink
Delete OpenVPN mainline patch from our integration build (#2149)
Browse files Browse the repository at this point in the history
### Description of changes: 
Delete patch file for mainline build of OpenVPN with AWS-LC now that we
have upstreamed support.

OpenVPN/openvpn@aab1f86

### Call-outs:
Point out areas that need special attention or support during the review
process. Discuss architecture or design changes.

### Testing:
How is this change tested (unit tests, fuzz tests, etc.)? Are there any
testing steps to be verified by the reviewer?

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
  • Loading branch information
smittals2 authored Jan 30, 2025
1 parent 39a4383 commit 35da9fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 107 deletions.
86 changes: 0 additions & 86 deletions tests/ci/integration/openvpn_patch/aws-lc-openvpn-master.patch

This file was deleted.

28 changes: 7 additions & 21 deletions tests/ci/integration/run_openvpn_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function openvpn_build() {

OPENSSL_CFLAGS="-I/${AWS_LC_INSTALL_FOLDER}/include" \
OPENSSL_LIBS="-L/${AWS_LC_INSTALL_FOLDER}/lib -lssl -lcrypto" \
LDFLAGS="-Wl,-rpath=/${AWS_LC_INSTALL_FOLDER}/lib" \
./configure \
--prefix="$OPENVPN_BUILD_PREFIX" \
--exec-prefix="$OPENVPN_BUILD_EPREFIX" \
Expand All @@ -49,36 +50,21 @@ function openvpn_build() {

make -j install

export LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib"

local openvpn_executable="${OPENVPN_SRC_FOLDER}/build/exec-install/sbin/openvpn"
ldd ${openvpn_executable} \
| grep "${AWS_LC_INSTALL_FOLDER}/lib/libcrypto.so" || exit 1
}

# TODO: Remove this when we make an upstream contribution.
function openvpn_patch_build() {
case "$BRANCH_NAME" in
"release/2.6")
patchfile="${OPENVPN_PATCH_BUILD_FOLDER}/aws-lc-openvpn2-6-x.patch"
;;
"master")
patchfile="${OPENVPN_PATCH_BUILD_FOLDER}/aws-lc-openvpn-master.patch"
;;
*)
echo "No specific patch file for branch: $BRANCH_NAME"
exit 1
;;
esac

echo "Apply patch $patchfile..."
patch -p1 --quiet -i "$patchfile"
if [ "$BRANCH_NAME" = "release/2.6" ]; then
patchfile="${OPENVPN_PATCH_BUILD_FOLDER}/aws-lc-openvpn2-6-x.patch"
echo "Apply patch $patchfile..."
patch -p1 --quiet -i "$patchfile"
fi
}

function openvpn_run_tests() {
# Explicitly running as sudo and passing in LD_LIBRARY_PATH as some OpenVPN
# tests run as sudo and LD_LIBRARY_PATH doesn't get inherited.
sudo LD_LIBRARY_PATH="${AWS_LC_INSTALL_FOLDER}/lib" make check
sudo make check
}

git clone https://github.com/OpenVPN/openvpn.git ${OPENVPN_SRC_FOLDER}
Expand Down

0 comments on commit 35da9fe

Please sign in to comment.