Building neovim in corporate environment

I am trying to build neovim on a linux box in corporate environment. By corporate, I mean:

  • Internet access is only via proxy server
  • Proxy server requires user/pass authentication
  • The password is very strong, contains special characters

So far, I am failing miserably. When I put proxy details into ~/.wgetrc or ~/.curlrc, the corresponding utilities work fine. However, I am unable to make CMake build process to recognise them… I tried playing with HTTP(S)_PROXY environment variables, but unsuccessfully. If I put password as is, I get wrong proxy format errors. If I replace special characters with 0x{ascii hex} or %{ascii hex}, this does not work either…

Then I tried manual download of the missing modules. This kind of worked (very tediously) with tarballs in .deps/build/downloads, but now build fails with the following message, and I am not sure what to do next:

[ 96%] Generating usr/lib/luarocks/rocks-5.1/mpack
Warning: Failed searching manifest: Failed downloading https://luarocks.org/manifest-5.1 - failed downloading https://luarocks.org/manifest-5.1
Warning: Failed searching manifest: Failed downloading https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest-5.1 - failed downloading https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/manifest-5.1
Warning: Failed searching manifest: Failed downloading https://luafr.org/luarocks/manifest-5.1 - failed downloading https://luafr.org/luarocks/manifest-5.1

Error: Could not find a result named mpack 1.0.8-0: No results matching query were found for Lua 5.1.
To check if it is available for other Lua versions, use --check-lua-versions.
make[3]: *** [usr/lib/luarocks/rocks-5.1/mpack] Error 1
make[3]: Leaving directory /workspace/ga2jaku/.home/linux/aj_sources/neovim/.deps' make[2]: *** [CMakeFiles/mpack.dir/all] Error 2 make[2]: Leaving directory /workspace/ga2jaku/.home/linux/aj_sources/neovim/.deps’
make[1]: *** [all] Error 2
make[1]: Leaving directory `/workspace/ga2jaku/.home/linux/aj_sources/neovim/.deps’
make: *** [deps] Error 2

Any help would be appreciated.

And my personal experience building neovim: if there is internet access, all is great. If there is no internet, you are royally fu**ed…

How about URI-encoding the password?

It seems that URI encoding replaces the special characters with %{ascii hex} - I tried that already

Hmmm… If your company’s proxy server authenticates with non basic auth, you might have to put cntlm between curl and the proxy.

OK, I think I managed to do it, after all:

  1. I had to build and use cntlm server
  2. Had to set the following 4 env. vars: HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy. There are so many utilities that use internet during the build, some use one variable, some another. And on linux the case of env. var. matters
1 Like