Last active
June 27, 2018 17:14
-
-
Save jpina/3ec1c2b21869400df4f4 to your computer and use it in GitHub Desktop.
Compile SVN 1.7.20 with neon support (Centos 6 / Fedora 21)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SOURCE_DIR=/usr/local/src | |
SVN_VERSION=1.7.20 | |
SVN_SRC_DIR=$SOURCE_DIR/subversion-$SVN_VERSION | |
# Install dependencies | |
sudo yum -y groupinstall "Development Tools" "Development Libraries" | |
sudo yum -y install libxml2 libxml2-devel libxslt-devel openssl openssl-devel | |
#Download the latest version | |
# http://subversion.apache.org/download/ | |
# http://blog.ilwilliams.net/compiling-subversion-1-7-1-from-source-with-ssl/ | |
wget -c -t3 -O $SOURCE_DIR/subversion-$SVN_VERSION.tar.gz https://archive.apache.org/dist/subversion/subversion-$SVN_VERSION.tar.gz | |
tar -zxf $SOURCE_DIR/subversion-$SVN_VERSION.tar.gz -C $SOURCE_DIR | |
cd $SVN_SRC_DIR | |
# Use the in-built script to download the required dependencies, and configure neon for SSL | |
bash get-deps.sh | |
cd $SVN_SRC_DIR/neon | |
cat <<PATCH > ./neon-ssl.patch | |
--- src/ne_openssl.c 2015-05-04 09:26:32.753844886 +0200 | |
+++ src/ne_openssl.c.new 2015-05-04 09:26:10.245849502 +0200 | |
@@ -565,11 +565,8 @@ | |
/* enable workarounds for buggy SSL server implementations */ | |
SSL_CTX_set_options(ctx->ctx, SSL_OP_ALL); | |
SSL_CTX_set_verify(ctx->ctx, SSL_VERIFY_PEER, verify_callback); | |
- } else if (mode == NE_SSL_CTX_SERVER) { | |
- ctx->ctx = SSL_CTX_new(SSLv23_server_method()); | |
- SSL_CTX_set_session_cache_mode(ctx->ctx, SSL_SESS_CACHE_CLIENT); | |
} else { | |
- ctx->ctx = SSL_CTX_new(SSLv2_server_method()); | |
+ ctx->ctx = SSL_CTX_new(SSLv23_server_method()); | |
SSL_CTX_set_session_cache_mode(ctx->ctx, SSL_SESS_CACHE_CLIENT); | |
} | |
return ctx; | |
PATCH | |
patch -p0 < neon-ssl.patch | |
./configure --with-ssl | |
make | |
sudo make install | |
# Download and install the required sqlite3.c | |
cd $SOURCE_DIR | |
wget -c -t 3 -O ./sqlite-amalgamation-3.7.0.1.tar.gz http://www.sqlite.org/sqlite-amalgamation-3.7.0.1.tar.gz | |
tar xzf sqlite-amalgamation-3.7.0.1.tar.gz -C ./ | |
sudo mkdir -pv $SVN_SRC_DIR/sqlite-amalgamation/ | |
sudo cp sqlite-3.7.0.1/sqlite3.c $SVN_SRC_DIR/sqlite-amalgamation/ | |
# Configure & make Subversion | |
cd $SVN_SRC_DIR | |
./configure --with-neon=/usr/local --with-openssl=/usr | |
make | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment