BIND 10 master, updated. 3db6583d93c42b3cb01ac5619d59d19645bd60bf [master] add changelog entry for #1246
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Oct 26 08:28:45 UTC 2011
The branch, master has been updated
via 3db6583d93c42b3cb01ac5619d59d19645bd60bf (commit)
via 1d43b46ab58077daaaf5cae3c6aa3e0eb76eb5d8 (commit)
via ea78ae80aa517556f7c5ac722f324baaf422f08e (commit)
via 78252609c39a14fb24a879c74108705c7cffed49 (commit)
via 299473702fedd1cab6967683ad7172b88c35f353 (commit)
from cf1ce254c246be39069e7e7277e1c506e1b239a0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3db6583d93c42b3cb01ac5619d59d19645bd60bf
Author: Jelte Jansen <jelte at isc.org>
Date: Wed Oct 26 10:28:24 2011 +0200
[master] add changelog entry for #1246
and fix category of an earlier entry i made
commit 1d43b46ab58077daaaf5cae3c6aa3e0eb76eb5d8
Merge: cf1ce254c246be39069e7e7277e1c506e1b239a0 ea78ae80aa517556f7c5ac722f324baaf422f08e
Author: Jelte Jansen <jelte at isc.org>
Date: Wed Oct 26 10:22:57 2011 +0200
Merge branch 'trac1246'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 +++++++-
src/bin/bind10/bind10_src.py.in | 19 ++++++++++++++-----
src/bin/bind10/tests/bind10_test.py.in | 13 +++++++++++++
src/lib/python/isc/bind10/sockcreator.py | 3 ++-
4 files changed, 36 insertions(+), 7 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index f4cba7d..6880d1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+304. [bug] jelte
+ The run_bind10.sh test script now no longer runs processes from
+ an installed version of BIND 10, but will correctly use the
+ build tree paths.
+ (Trac #1246, git 1d43b46ab58077daaaf5cae3c6aa3e0eb76eb5d8)
+
303. [bug] jinmei
Changed the installation path for the UNIX domain file used
for the communication between b10-auth and b10-xfrout to a
@@ -7,7 +13,7 @@
if the old file somehow remains, it can now be safely removed.
(Trac #869, git 96e22f4284307b1d5f15e03837559711bb4f580c)
-302. [defect] jelte
+302. [bug] jelte
msgq no longer crashes if the remote end is closed while msgq
tries to send data. It will now simply drop the message and close
the connection itself.
diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in
index 94747f2..15b9552 100755
--- a/src/bin/bind10/bind10_src.py.in
+++ b/src/bin/bind10/bind10_src.py.in
@@ -44,10 +44,12 @@ import os
# installed on the system
if "B10_FROM_SOURCE" in os.environ:
SPECFILE_LOCATION = os.environ["B10_FROM_SOURCE"] + "/src/bin/bind10/bob.spec"
+ ADD_LIBEXEC_PATH = False
else:
PREFIX = "@prefix@"
DATAROOTDIR = "@datarootdir@"
SPECFILE_LOCATION = "@datadir@/@PACKAGE@/bob.spec".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX)
+ ADD_LIBEXEC_PATH = True
import subprocess
import signal
@@ -61,6 +63,7 @@ from optparse import OptionParser, OptionValueError
import io
import pwd
import posix
+import copy
import isc.cc
import isc.util.process
@@ -184,9 +187,9 @@ class ProcessInfo:
# Environment variables for the child process will be a copy of those
# of the boss process with any additional specific variables given
# on construction (self.env).
- spawn_env = os.environ
+ spawn_env = copy.deepcopy(os.environ)
spawn_env.update(self.env)
- if 'B10_FROM_SOURCE' not in os.environ:
+ if ADD_LIBEXEC_PATH:
spawn_env['PATH'] = "@@LIBEXECDIR@@:" + spawn_env['PATH']
self.process = subprocess.Popen(self.args,
stdin=subprocess.PIPE,
@@ -355,8 +358,10 @@ class BoB:
def start_creator(self):
self.curproc = 'b10-sockcreator'
- self.sockcreator = isc.bind10.sockcreator.Creator("@@LIBEXECDIR@@:" +
- os.environ['PATH'])
+ creator_path = os.environ['PATH']
+ if ADD_LIBEXEC_PATH:
+ creator_path = "@@LIBEXECDIR@@:" + creator_path
+ self.sockcreator = isc.bind10.sockcreator.Creator(creator_path)
def stop_creator(self, kill=False):
if self.sockcreator is None:
@@ -587,7 +592,11 @@ class BoB:
# a cleaner solution, but for a short term workaround we specify the
# path here, unconditionally, and without even bothering which
# environment variable should be used.
- if not "B10_FROM_SOURCE" in os.environ:
+ #
+ # We reuse the ADD_LIBEXEC_PATH variable to see whether we need to
+ # do this, as the conditions that make this workaround needed are
+ # the same as for the libexec path addition
+ if ADD_LIBEXEC_PATH:
cur_path = os.getenv('DYLD_LIBRARY_PATH')
cur_path = '' if cur_path is None else ':' + cur_path
c_channel_env['DYLD_LIBRARY_PATH'] = "@@LIBDIR@@" + cur_path
diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in
index 2efd940..1bd6ab4 100644
--- a/src/bin/bind10/tests/bind10_test.py.in
+++ b/src/bin/bind10/tests/bind10_test.py.in
@@ -21,6 +21,7 @@ from bind10_src import ProcessInfo, BoB, parse_args, dump_pid, unlink_pid_file,
import unittest
import sys
import os
+import copy
import signal
import socket
from isc.net.addr import IPAddr
@@ -360,6 +361,10 @@ class TestStartStopProcessesBob(unittest.TestCase):
of processes and that the right processes are started and stopped
according to changes in configuration.
"""
+ def check_environment_unchanged(self):
+ # Check whether the environment has not been changed
+ self.assertEqual(original_os_environ, os.environ)
+
def check_started(self, bob, core, auth, resolver):
"""
Check that the right sets of services are started. The ones that
@@ -379,6 +384,7 @@ class TestStartStopProcessesBob(unittest.TestCase):
self.assertEqual(bob.stats, core)
self.assertEqual(bob.stats_httpd, core)
self.assertEqual(bob.cmdctl, core)
+ self.check_environment_unchanged()
def check_preconditions(self, bob):
self.check_started(bob, False, False, False)
@@ -389,6 +395,7 @@ class TestStartStopProcessesBob(unittest.TestCase):
should be started. Some processes still need to be running.
"""
self.check_started(bob, True, False, False)
+ self.check_environment_unchanged()
def check_started_both(self, bob):
"""
@@ -396,18 +403,21 @@ class TestStartStopProcessesBob(unittest.TestCase):
(auth and resolver) are enabled.
"""
self.check_started(bob, True, True, True)
+ self.check_environment_unchanged()
def check_started_auth(self, bob):
"""
Check the set of processes needed to run auth only is started.
"""
self.check_started(bob, True, True, False)
+ self.check_environment_unchanged()
def check_started_resolver(self, bob):
"""
Check the set of processes needed to run resolver only is started.
"""
self.check_started(bob, True, False, True)
+ self.check_environment_unchanged()
def check_started_dhcp(self, bob, v4, v6):
"""
@@ -426,6 +436,7 @@ class TestStartStopProcessesBob(unittest.TestCase):
# there should be exactly one DHCPv6 daemon (if v6==True)
self.assertEqual(v4==True, v4found==1)
self.assertEqual(v6==True, v6found==1)
+ self.check_environment_unchanged()
# Checks the processes started when starting neither auth nor resolver
# is specified.
@@ -799,5 +810,7 @@ class TestBrittle(unittest.TestCase):
self.assertFalse(bob.runnable)
if __name__ == '__main__':
+ # store os.environ for test_unchanged_environment
+ original_os_environ = copy.deepcopy(os.environ)
isc.log.resetUnitTestRootLogger()
unittest.main()
diff --git a/src/lib/python/isc/bind10/sockcreator.py b/src/lib/python/isc/bind10/sockcreator.py
index 8e5b019..7522d4a 100644
--- a/src/lib/python/isc/bind10/sockcreator.py
+++ b/src/lib/python/isc/bind10/sockcreator.py
@@ -16,6 +16,7 @@
import socket
import struct
import os
+import copy
import subprocess
from isc.log_messages.bind10_messages import *
from libutil_io_python import recv_fd
@@ -207,7 +208,7 @@ class Creator(Parser):
# stdin as well as stdout, so we dup it before passing it there.
remote2 = socket.fromfd(remote.fileno(), socket.AF_UNIX,
socket.SOCK_STREAM)
- env = os.environ
+ env = copy.deepcopy(os.environ)
env['PATH'] = path
self.__process = subprocess.Popen(['b10-sockcreator'], env=env,
stdin=remote.fileno(),
More information about the bind10-changes
mailing list