[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Work around broken chroots that do not resolve localhost or...
Update of /home/or/cvsroot/tor/debian
In directory moria:/tmp/cvs-serv22465/debian
Modified Files:
Tag: tor-0_1_0-patches
changelog rules
Log Message:
Work around broken chroots that do not resolve localhost or resolve it to
the wrong IP. We now catch such cases in debian/rules, shout at the buildd
maintainer, and ignore the result of our test suite.
Index: changelog
===================================================================
RCS file: /home/or/cvsroot/tor/debian/changelog,v
retrieving revision 1.120.2.15
retrieving revision 1.120.2.16
diff -u -d -r1.120.2.15 -r1.120.2.16
--- changelog 13 Sep 2005 16:59:59 -0000 1.120.2.15
+++ changelog 13 Sep 2005 17:20:06 -0000 1.120.2.16
@@ -7,8 +7,11 @@
on the debian-devel list:
- http://lists.debian.org/debian-devel/2005/08/msg01172.html
- http://wiki.debian.net/?LSBInitScripts
+ * Work around broken chroots that do not resolve localhost or resolve
+ it to the wrong IP. We now catch such cases in debian/rules, shout
+ at the buildd maintainer, and ignore the result of our test suite.
- -- Peter Palfrader <weasel@xxxxxxxxxx> Tue, 13 Sep 2005 18:58:25 +0200
+ -- Peter Palfrader <weasel@xxxxxxxxxx> Tue, 13 Sep 2005 19:18:39 +0200
tor (0.1.0.14-1) unstable; urgency=high
Index: rules
===================================================================
RCS file: /home/or/cvsroot/tor/debian/rules,v
retrieving revision 1.17.2.2
retrieving revision 1.17.2.3
diff -u -d -r1.17.2.2 -r1.17.2.3
--- rules 13 Sep 2005 16:46:04 -0000 1.17.2.2
+++ rules 13 Sep 2005 17:20:06 -0000 1.17.2.3
@@ -10,6 +10,7 @@
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+LOCALHOST_IP ?= $(shell getent hosts localhost | awk '{print $$1}')
CFLAGS = -Wall -g
@@ -49,6 +50,7 @@
configure: patch-stamp
config.status: configure
+ @if [ "$(LOCALHOST_IP)" != "127.0.0.1" ]; then echo; echo; echo; echo; echo; echo "######################################################################"; echo "WARNING: This system does not think localhost is 127.0.0.1. Will ignore result of testsuite. Please fix your system/chroot."; echo "######################################################################"; echo; echo; echo; echo; echo "Note: 'getent hosts localhost' should return '127.0.0.1 localhost'"; echo; fi
dh_testdir
CFLAGS="$(CFLAGS)" ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
@@ -70,8 +72,15 @@
@echo
@echo
# Running unit tests
- if [ "$(RUN_TEST)" != "no" ]; then \
- src/or/test; \
+ @if [ "$(RUN_TEST)" != "no" ]; then \
+ if [ "$(LOCALHOST_IP)" != "127.0.0.1" ]; then \
+ echo; echo; echo "######################################################################"; echo "WARNING: This system does not think localhost is 127.0.0.1. Will ignore result of testsuite. Please fix your system/chroot."; echo "######################################################################"; echo; echo; \
+ echo "src/or/test || true"; \
+ src/or/test || true; \
+ else \
+ echo "src/or/test"; \
+ src/or/test; \
+ fi; \
else \
echo -e "\n\nSkipping unittests\n\n"; \
fi
@@ -179,6 +188,7 @@
dh_gencontrol
dh_md5sums
dh_builddeb
+ @if [ "$(LOCALHOST_IP)" != "127.0.0.1" ]; then echo; echo; echo; echo; echo; echo "######################################################################"; echo "WARNING: This system does not think localhost is 127.0.0.1. Result of testsuite has been ignored. Please fix your system/chroot."; echo "######################################################################"; echo; echo; echo; echo; echo "Note: 'getent hosts localhost' should return '127.0.0.1 localhost'"; echo; fi
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install