From 3afb8da35e8087237a857880c72e3da4634b0757 Mon Sep 17 00:00:00 2001 From: Likun Zhang Date: Wed, 19 May 2010 02:33:24 +0000 Subject: [PATCH] Fix bug: Make xfrout works well in source code tree(reported in ticket 151). (now the UNIX_SOCKET_FILE shared by auth srv and xfrout locates in @@LOCALSTATEDIR@@) git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1853 e5f2f494-b856-4b98-b285-d166d9295462 --- configure.ac | 2 +- src/bin/auth/Makefile.am | 3 ++ ...{spec_config.h.in => spec_config.h.pre.in} | 32 +++++++++---------- src/bin/xfrout/xfrout.py.in | 2 +- 4 files changed, 21 insertions(+), 18 deletions(-) rename src/bin/auth/{spec_config.h.in => spec_config.h.pre.in} (91%) diff --git a/configure.ac b/configure.ac index 8e4a8e4e32..b441ed5f57 100644 --- a/configure.ac +++ b/configure.ac @@ -431,7 +431,7 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py src/bin/msgq/tests/msgq_test src/bin/msgq/run_msgq.sh src/bin/auth/auth.spec.pre - src/bin/auth/spec_config.h + src/bin/auth/spec_config.h.pre src/lib/config/tests/data_def_unittests_config.h src/lib/python/isc/config/tests/config_test src/lib/python/isc/cc/tests/cc_test diff --git a/src/bin/auth/Makefile.am b/src/bin/auth/Makefile.am index e976634271..d65ec2097a 100644 --- a/src/bin/auth/Makefile.am +++ b/src/bin/auth/Makefile.am @@ -23,6 +23,9 @@ endif auth.spec: auth.spec.pre $(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" auth.spec.pre >$@ +spec_config.h: spec_config.h.pre + $(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@ + pkglibexec_PROGRAMS = b10-auth b10_auth_SOURCES = auth_srv.cc auth_srv.h b10_auth_SOURCES += common.h diff --git a/src/bin/auth/spec_config.h.in b/src/bin/auth/spec_config.h.pre.in similarity index 91% rename from src/bin/auth/spec_config.h.in rename to src/bin/auth/spec_config.h.pre.in index da9d025cdc..52581ddbc6 100644 --- a/src/bin/auth/spec_config.h.in +++ b/src/bin/auth/spec_config.h.pre.in @@ -1,16 +1,16 @@ -// Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC") -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -// PERFORMANCE OF THIS SOFTWARE. - -#define AUTH_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/auth.spec" -#define UNIX_SOCKET_FILE "@prefix@/var/auth_xfrout_conn" +// Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC") +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +// PERFORMANCE OF THIS SOFTWARE. + +#define AUTH_SPECFILE_LOCATION "@prefix@/share/@PACKAGE@/auth.spec" +#define UNIX_SOCKET_FILE "@@LOCALSTATEDIR@@/auth_xfrout_conn" diff --git a/src/bin/xfrout/xfrout.py.in b/src/bin/xfrout/xfrout.py.in index 7099bf1e93..dc5f43d4ba 100644 --- a/src/bin/xfrout/xfrout.py.in +++ b/src/bin/xfrout/xfrout.py.in @@ -44,7 +44,7 @@ else: DATAROOTDIR = "@datarootdir@" SPECFILE_PATH = "@datadir@/@PACKAGE@".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX) SPECFILE_LOCATION = SPECFILE_PATH + "/xfrout.spec" -UNIX_SOCKET_FILE = "@localstatedir@".replace("${prefix}", PREFIX) + "/auth_xfrout_conn" +UNIX_SOCKET_FILE = "@@LOCALSTATEDIR@@/auth_xfrout_conn" MAX_TRANSFERS_OUT = 10 verbose_mode = False