Scenario: Some files in my /usr/src directory are either missing or causing errors whenever I try to recompile a new custom kernel after upgrading from FreeBSD 11.02 to 12.0-Release. So I’ve decided to just delete everything that’s in /usr/src directory and start all over again. But, when I try to run:
svn co https://svn.freebsd.org/base/releng/12.0 /usr/src/
I get this error message:
svn: E170013: Unable to connect to a repository at URL 'https://svn.freebsd.org/base/releng/12.0'
svn: E000047: Error running context: Address family not supported by protocol family
It says about protocol so I tried both http and https but still the same problem. I’ve also checked my configuration files on both /root/.subversion/ and ~/.subversion/ and I did not see any problem. Also, I tried uninstalling subversion and reinstalled it again via /usr/ports and made sure that I have SERF module in it. Same problem.
There is one file though within /root/.subversion/auth/svn.ssl.server/ that has a line at the bottom that says:
...
svn:realmstring
V 23
https://8.8.178.107:443
END
That second from the last line before the ‘END’ caught my attention. So I look for the svn.freebsd.org’s IP address using nslookup:
nslookup svn.freebsd.org
The IP address that came up was 213.138.116.72. So I tried it again using the svn command, this time replacing the svn.freebsd.org domain name with its IP address and adding the 443 port, like so:
svn co https://213.138.116.72:443/base/releng/12.0 /usr/src/
And it worked! I was able to get all the source files I need and I was able to compile a new custom kernel.
I need to dig deeper to see why subversion didn’t work normally the way it should. This could be just a simple DNS issue somewhere or an A Record problem on FreeBSD’s end, but that’s very unlikely. I’ve checked some forum threads but most suggestions seem to be irrelevant to the problem I had. I will do more research but that would be for later.