diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-08-08 21:30:31 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2006-08-08 21:30:31 +0000 |
commit | aaa432b0644199418eb2ce506c87397cd379df4f (patch) | |
tree | ab3c01fd243dbf8c74134160a7737d50cc1f1402 | |
parent | d33564292f0cb45c42454514797c6da1fc1de178 (diff) |
* configure.in:
* tools/Makefile.am:
* tools/dbus-launch.c:
* bus/Makefile.am:
allow --with-dbus-daemondir switch to be used to make the
daemon install to a seperate bindir like /usr/libexec
(patch from Brian Cameron <brian dot cameron at sun dot com)
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | bus/Makefile.am | 12 | ||||
-rw-r--r-- | configure.in | 10 | ||||
-rw-r--r-- | tools/Makefile.am | 2 | ||||
-rw-r--r-- | tools/dbus-launch.c | 19 |
5 files changed, 49 insertions, 4 deletions
@@ -1,5 +1,15 @@ 2006-08-08 John (J5) Palmieri <johnp@redhat.com> + * configure.in: + * tools/Makefile.am: + * tools/dbus-launch.c: + * bus/Makefile.am: + allow --with-dbus-daemondir switch to be used to make the + daemon install to a seperate bindir like /usr/libexec + (patch from Brian Cameron <brian dot cameron at sun dot com) + +2006-08-08 John (J5) Palmieri <johnp@redhat.com> + * bus/Makefile.am (install-data-hook): removed the slash after $(DESTDIR) so we don't get the double slash which does not work in windows (patch from Andras Porjesz diff --git a/bus/Makefile.am b/bus/Makefile.am index 9815bfd8..89bb523c 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -16,8 +16,6 @@ config_DATA= \ session.conf \ system.conf -bin_PROGRAMS=dbus-daemon - if DBUS_USE_LIBXML XML_SOURCES=config-loader-libxml.c endif @@ -79,7 +77,7 @@ endif ## we use noinst_PROGRAMS not check_PROGRAMS so that we build ## even when not doing "make check" -noinst_PROGRAMS=$(TESTS) +noinst_PROGRAMS=$(TESTS) dbus-daemon bus_test_SOURCES= \ $(BUS_SOURCES) \ @@ -91,7 +89,15 @@ bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS) clean-local: /bin/rm *.bb *.bbg *.da *.gcov || true +uninstall-hook: + rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon + install-data-hook: + if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \ + $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \ + chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \ + fi + $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR) $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services diff --git a/configure.in b/configure.in index 65570d62..b0c2849e 100644 --- a/configure.in +++ b/configure.in @@ -68,6 +68,7 @@ AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNI AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip])) AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner])) AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)])) +AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon])) dnl DBUS_BUILD_TESTS controls unit tests built in to .c files @@ -965,6 +966,15 @@ fi AC_SUBST(DBUS_USER) AC_DEFINE_UNQUOTED(DBUS_USER,"$DBUS_USER", [User for running the system BUS daemon]) +#### Directory to install dbus-daemon +if test -z "$with_dbus_daemondir" ; then + DBUS_DAEMONDIR="${bindir}" +else + DBUS_DAEMONDIR=$with_dbus_daemondir +fi +AC_SUBST(DBUS_DAEMONDIR) +AC_DEFINE_UNQUOTED(DBUS_DAEMONDIR,"$DBUS_DAEMONDIR", [Directory for installing the DBUS daemon]) + #### Tell tests where to find certain stuff in builddir ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd` diff --git a/tools/Makefile.am b/tools/Makefile.am index e653dea3..06d85b47 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION +INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" bin_PROGRAMS=dbus-send dbus-monitor dbus-launch dbus-cleanup-sockets diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c index 757e833e..3004099c 100644 --- a/tools/dbus-launch.c +++ b/tools/dbus-launch.c @@ -771,6 +771,25 @@ main (int argc, char **argv) verbose ("Calling exec()\n"); + execl (DBUS_DAEMONDIR"/dbus-daemon", + DBUS_DAEMONDIR"/dbus-daemon", + "--fork", + "--print-pid", write_pid_fd_as_string, + "--print-address", write_address_fd_as_string, + config_file ? "--config-file" : "--session", + config_file, /* has to be last in this varargs list */ + NULL); + + fprintf (stderr, + "Failed to execute message bus daemon %s: %s. Will try again without full path.\n", + DBUS_DAEMONDIR"/dbus-daemon", strerror (errno)); + + /* + * If it failed, try running without full PATH. Note this is needed + * because the build process builds the run-with-tmp-session-bus.conf + * file and the dbus-daemon will not be in the install location during + * build time. + */ execlp ("dbus-daemon", "dbus-daemon", "--fork", |