commit 20b1a0c82f3d29b6d23f1de3e55a18ff74f54dcf
Author: Mike Perry <mikeperry-git(a)torproject.org>
Date: Sat Mar 29 21:51:32 2014 -0700
Bug 11200: Prevent spurious error message prior to enabling network.
---
gitian/descriptors/linux/gitian-tor.yml | 2 ++
gitian/descriptors/mac/gitian-tor.yml | 2 ++
gitian/descriptors/windows/gitian-tor.yml | 5 +++-
gitian/patches/bug11200.patch | 39 +++++++++++++++++++++++++++++
4 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/gitian/descriptors/linux/gitian-tor.yml b/gitian/descriptors/linux/gitian-tor.yml
index 73181a0..bb795c0 100644
--- a/gitian/descriptors/linux/gitian-tor.yml
+++ b/gitian/descriptors/linux/gitian-tor.yml
@@ -29,6 +29,7 @@ files:
- "bug9229.patch"
- "bug11156.patch"
- "bug11069.patch"
+- "bug11200.patch"
- "dzip.sh"
- "openssl.tar.gz"
script: |
@@ -95,6 +96,7 @@ script: |
git am ~/build/bug5018.patch
git am ~/build/bug11069.patch
git am ~/build/bug11156.patch
+ git am ~/build/bug11200.patch
fi
fi
mkdir -p $OUTDIR/src
diff --git a/gitian/descriptors/mac/gitian-tor.yml b/gitian/descriptors/mac/gitian-tor.yml
index 8b049b0..129a3fe 100644
--- a/gitian/descriptors/mac/gitian-tor.yml
+++ b/gitian/descriptors/mac/gitian-tor.yml
@@ -29,6 +29,7 @@ files:
- "bug5018.patch"
- "bug9229.patch"
- "bug11156.patch"
+- "bug11200.patch"
- "bug11069.patch"
- "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
- "multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz"
@@ -106,6 +107,7 @@ script: |
git am ~/build/bug5018.patch
git am ~/build/bug11069.patch
git am ~/build/bug11156.patch
+ git am ~/build/bug11200.patch
fi
fi
mkdir -p $OUTDIR/src
diff --git a/gitian/descriptors/windows/gitian-tor.yml b/gitian/descriptors/windows/gitian-tor.yml
index 3d05eaa..5cceac9 100644
--- a/gitian/descriptors/windows/gitian-tor.yml
+++ b/gitian/descriptors/windows/gitian-tor.yml
@@ -28,6 +28,7 @@ files:
- "bug5018.patch"
- "bug9229.patch"
- "bug11156.patch"
+- "bug11200.patch"
- "bug11069.patch"
- "binutils.tar.bz2"
- "dzip.sh"
@@ -102,7 +103,9 @@ script: |
git am ~/build/bug5018.patch
git am ~/build/bug11069.patch
git am ~/build/bug11156.patch
- fi fi
+ git am ~/build/bug11200.patch
+ fi
+ fi
mkdir -p $OUTDIR/src
git archive HEAD | tar -x -C $OUTDIR/src
./autogen.sh
diff --git a/gitian/patches/bug11200.patch b/gitian/patches/bug11200.patch
new file mode 100644
index 0000000..040309a
--- /dev/null
+++ b/gitian/patches/bug11200.patch
@@ -0,0 +1,39 @@
+From 6770153d4ced726e54305ad38d14ea82df0d639e Mon Sep 17 00:00:00 2001
+From: Nick Mathewson <nickm(a)torproject.org>
+Date: Sat, 29 Mar 2014 21:49:32 -0700
+Subject: [PATCH] should_disable_dir_fetches() now returns 1 if
+ DisableNetwork==1
+
+This change prevents LD_BUG warnings and bootstrap failure messages
+when we try to do directory fetches when starting with
+DisableNetwork == 1, a consensus present, but no descriptors (or
+insufficient descriptors) yet.
+
+Fixes bug 11200 and bug 10405. It's a bugfix on 0.2.3.9-alpha.
+Thanks to mcs for walking me through the repro instructions!
+---
+ src/or/networkstatus.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
+index bcadc52..9a1824b 100644
+--- a/src/or/networkstatus.c
++++ b/src/or/networkstatus.c
+@@ -1394,6 +1394,14 @@ should_delay_dir_fetches(const or_options_t *options, const char **msg_out)
+ *msg_out = NULL;
+ }
+
++ if (options->DisableNetwork) {
++ if (msg_out) {
++ *msg_out = "DisableNetwork is set.";
++ }
++ log_info(LD_DIR, "Delaying dir fetches (DisableNetwork is set)");
++ return 1;
++ }
++
+ if (options->UseBridges) {
+ if (!any_bridge_descriptors_known()) {
+ if (msg_out) {
+--
+1.8.1.2
+