I was having an issue getting subversion 1.4.6 + apache installed on a freebsd 8.1 system without running in to errors. These instructions should work on any version of freebsd (post 6.01).
Eventually i copied the proper port versions over from a different system and got it all working! Avoid rebuilding subversion from source on freebsd with apache!
Prerequisite steps:
I’ve created a copy of the ports you need to import in to your /usr/ports directory, you can download that here:
http://brakertech.com/subversion1.4.6_apache22_free_bsd_ports.tar
extract that file and then copy the ports to correct paths in /usr/ports (you probably want to remove whatever is there first)
Now that your ports have the proper versions let’s get started!
First delete any existing installed apache/apr/neon packages:
# pkg_delete apache* # pkg_delete apr* # pkg_delete neon*
Use portmaster to install apache22:
# portmaster /usr/ports/www/apache22
===>>> The following actions were performed:
Installation of devel/apr1 (apr-devrandom-gdbm-mysql51-1.4.2.1.3.10)
Installation of www/apache22 (apache-2.2.17_1)
Ensure that subversion 1.4.6 is what you are installilng:
# cd /usr/ports/devel/subversion # cat distinfo
MD5 (subversion/subversion-1.4.6.tar.bz2) = 9c7cf517362c1c9332b610339e5cce6b
SHA256 (subversion/subversion-1.4.6.tar.bz2) = 6c480c3493b25c4b73fa62d5fef2f8dd40dde1eb1294c53d3495d864230fc124
SIZE (subversion/subversion-1.4.6.tar.bz2) = 4680316
MD5 (subversion/svn-book-html.tar.bz2) = eda5fa7d7e3aff9473adf063385d3527
SHA256 (subversion/svn-book-html.tar.bz2) = a73110c724ee7fca4ab0e6090f0a47fdd3a03cfdfbecab799aca90c80824d9e0
SIZE (subversion/svn-book-html.tar.bz2) = 366277
MD5 (subversion/svn-book.pdf) = b4f04dfc6cae59212c255322e4fa27a4
SHA256 (subversion/svn-book.pdf) = d3fffd8191d62faf2a571cfe96bdadc772ff90bd5e32364f888f9b2d7fd81b5d
SIZE (subversion/svn-book.pdf) = 1462807
Configure subversion before install:
# make clean # make config
At config screen select:
Kick off the install via portmaster:
# portmaster /usr/ports/devel/subversion
===>>> Port directory: /usr/ports/devel/subversion
===>>> Gathering distinfo list for installed ports
===>>> Launching ‘make checksum’ for devel/subversion in background
===>>> Gathering dependency list for devel/subversion from ports
===>>> Launching child to update devel/libtool15
devel/subversion >> devel/libtool15===>>> Port directory: /usr/ports/devel/libtool15
===>>> Gathering dependency list for devel/libtool15 from ports
===>>> No dependencies for devel/libtool15
===>>> Continuing initial dependency check for devel/subversion
===>>> Launching child to update www/neon26
devel/subversion >> www/neon26===>>> Port directory: /usr/ports/www/neon26
===>>> Launching ‘make checksum’ for www/neon26 in background
===>>> Gathering dependency list for www/neon26 from ports
===>>> Initial dependency check complete for www/neon26
devel/subversion >> www/neon26
===>>> Continuing initial dependency check for devel/subversion
===>>> Initial dependency check complete for devel/subversion===>>> The following actions will be taken if you choose to proceed:
Install devel/subversion
Install devel/libtool15
Install www/neon26===>>> Proceed? y/n [y]
===>>> The following actions were performed:
Installation of devel/libtool15 (libtool-1.5.26)
Installation of www/neon26 (neon26-0.26.4_1)
Installation of devel/subversion (subversion-1.4.6_2)
Success! Now verify the proper version was installed:
# svn --version
svn, version 1.4.6 (r28521)
compiled Oct 30 2010, 23:32:35
Now let’s edit /usr/local/etc/apache22/httpd.conf to make this an https subversion repostiory:
#Make sure these lines exist uncommented: LoadModule dav_svn_module libexec/apache22/mod_dav_svn.so LoadModule authz_svn_module libexec/apache22/mod_authz_svn.so # Secure (SSL/TLS) connections #Include etc/apache22/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # Add the following:SSLRandomSeed startup builtin SSLRandomSeed connect builtin Include etc/apache22/Includes/*.conf SSLProtocol ALL -SSLv2 SSLCipherSuite HIGH:!SSLv2:!ADH:!aNULL:!eNULL:!NULL #NameVirtualHost *:80 NameVirtualHost *:443#modify the server name here ServerName myserver.example.com # Add some svn authentication around your repo Include /usr/local/etc/apache22/httpd-subversion.conf DAV svn SVNParentPath /usr/local/svn AuthType Basic AuthName "Subversion repository" AuthUserFile /usr/local/etc/apache22/svn-auth-file AuthzSVNAccessFile /usr/local/etc/apache22/apache_auth.conf Require valid-user SSLRequireSSL # the following two locations are examples of how to block everyone from accessing a specific repositoryOrder Allow,Deny Deny from all Order Allow,Deny Deny from all SSLEngine on # obviously change the path of the next two lines to point to your cert and key SSLCertificateFile /usr/local/etc/apache22/sitename.crt SSLCertificateKeyFile /usr/local/etc/apache22/sitename.key SSLProxyEngine On SSLProxyVerify none