Thursday, July 3, 2014

Hacking on LibreOffice to bypass proxy during build

It was a relax week for me while having all my tasks commit. Since I’m quite free at the moment, I grab a copy of LibreOffice source code to play around with. When I just started to build on it, the make command return me error due to the build process unable to proceed. The reason being is wget command which require the proxy information is not provided. I know that I’m require to provide proxy information but where? Do a deep search in the source code, found out Makefile.fetch contain following code:

&& $(WGET) --progress=dot:mega -Q 0 -P "." -l 0 -nd -nH -N $1/$2 2>&1 | tee -a  $(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]

I think this should be the one that cause the build failed. I wasn't sure whether it works or not if I pass in the proxy information? Just give it a try:

&& $(WGET) -e use_proxy=yes -e http_proxy=xxx.xxx.xxx.xx:8080 --proxy-user=username --proxy-password=password --progress=dot:mega -Q 0 -P "." -l 0 -nd -nH -N $1/$2 2>&1 | tee -a $(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]

Yes! I’m rite. The build able proceed as usual.

No comments: