commit 7db9add35d69e69e3366ff803234c2f9cfc6d3af Author: Georg Koppen gk@torproject.org Date: Mon Feb 24 20:42:45 2014 +0000
Bug 11040: Avoid hard-coding MIRROR_HOST.
MIRROR_HOST is hard-coded to "10.0.2.2". This breaks building the TBB with LXC. We use the same technique as in gitian-builder to determine the proper network interface to use when building the pluggable transports part for Windows. --- .../descriptors/windows/gitian-pluggable-transports.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/gitian/descriptors/windows/gitian-pluggable-transports.yml b/gitian/descriptors/windows/gitian-pluggable-transports.yml index a453f14..de105b1 100644 --- a/gitian/descriptors/windows/gitian-pluggable-transports.yml +++ b/gitian/descriptors/windows/gitian-pluggable-transports.yml @@ -44,8 +44,19 @@ script: | export LC_ALL=C export CFLAGS="-mwindows" export LDFLAGS="-mwindows" - # This is correct only for kvm. - MIRROR_HOST=10.0.2.2 + + # We need at least Wine 1.5.29 which is not in Ubuntu's main repository (see + # below). Thus, we resort to a PPA and need therefore to determine the correct + # network interface depending on the virtualization we use. + ip=`hostname --all-ip-addresses | cut -d ' ' -f1 | cut -d. -f1-3` + if [ $ip = "10.0.3" ]; then + # LXC + MIRROR_HOST=10.0.3.1 + else + # KVM + MIRROR_HOST=10.0.2.2 + fi + WINEROOT=$HOME/.wine/drive_c # XXX: Hardening options cause the exe's to crash.. not sure why #export CFLAGS="-mwindows -fstack-protector-all -fPIE -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat-security"
tor-commits@lists.torproject.org