mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-06 03:28:11 +02:00
Merge branch 'dbus-1.6'
Conflicts: NEWS configure.ac
This commit is contained in:
commit
0c40800505
8 changed files with 69 additions and 71 deletions
24
NEWS
24
NEWS
|
|
@ -9,13 +9,31 @@ Enhancements:
|
|||
|
||||
Fixes:
|
||||
|
||||
• Detect that users are "at the console" correctly when configured with
|
||||
a non-default path such as --enable-console-auth-dir=/run/console
|
||||
(fd.o #51521, Dave Reisner)
|
||||
|
||||
D-Bus 1.6.2 (2012-06-27)
|
||||
==
|
||||
|
||||
The "Ice Cabbage" release.
|
||||
|
||||
• Change how we create /var/lib/dbus so it works under Automake >= 1.11.4
|
||||
(fd.o #51406, Simon McVittie)
|
||||
|
||||
• Don't return from dbus_pending_call_set_notify with a lock held on OOM
|
||||
(fd.o #51032, Simon McVittie)
|
||||
|
||||
• Disconnect "developer mode" (assertions, verbose mode etc.) from
|
||||
Automake maintainer mode. D-Bus developers should now configure with
|
||||
--enable-developer. Automake maintainer mode is now on by default;
|
||||
distributions can disable it with --disable-maintainer-mode.
|
||||
(fd.o #34671, Simon McVittie)
|
||||
|
||||
• Automatically define DBUS_STATIC_BUILD in static-only Autotools builds,
|
||||
fixing linking when targeting Windows (fd.o #33973; william, Simon McVittie)
|
||||
|
||||
• Unix-specific:
|
||||
· Add dbus-launch --exit-with-x11 option. Distributions should use this
|
||||
in their X11 session startup infrastructure, in preference to
|
||||
the --exit-with-session option. (fd.o #39197, Simon McVittie)
|
||||
· Check for libpthread under CMake on Unix (fd.o #47237, Simon McVittie)
|
||||
|
||||
D-Bus 1.6.0 (2012-06-05)
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ else
|
|||
fi
|
||||
|
||||
if $run_configure; then
|
||||
$srcdir/configure --enable-maintainer-mode --config-cache "$@"
|
||||
$srcdir/configure --enable-developer --config-cache "$@"
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
else
|
||||
|
|
|
|||
25
configure.ac
25
configure.ac
|
|
@ -19,8 +19,9 @@ GETTEXT_PACKAGE=dbus-1
|
|||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
|
||||
|
||||
## must come before we use the $USE_MAINTAINER_MODE variable later
|
||||
AM_MAINTAINER_MODE
|
||||
# By default, rebuild autotools files on demand; only use ./missing if the
|
||||
# user says --disable-maintainer-mode (some distributions like to do this)
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ LT_CURRENT=10
|
|||
|
||||
## increment any time the source changes; set to
|
||||
## 0 if you increment CURRENT
|
||||
LT_REVISION=1
|
||||
LT_REVISION=2
|
||||
|
||||
## increment if any interfaces have been added; set to 0
|
||||
## if any interfaces have been changed or removed. removal has
|
||||
|
|
@ -123,6 +124,12 @@ AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes)
|
|||
AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes)
|
||||
AM_CONDITIONAL(DBUS_CYGWIN, test "$dbus_cygwin" = yes)
|
||||
|
||||
# this must come first: other options use this to set their defaults
|
||||
AC_ARG_ENABLE([developer],
|
||||
[AS_HELP_STRING([--enable-developer],
|
||||
[set defaults to be appropriate for a D-Bus developer instead of a distribution/end-user]),
|
||||
[], enable_developer=no])
|
||||
|
||||
DBUS_STATIC_BUILD_CPPFLAGS=
|
||||
if test "x$enable_shared" = xno; then
|
||||
# On Windows, linking against the static library requires special effort
|
||||
|
|
@ -134,8 +141,8 @@ fi
|
|||
AC_SUBST([DBUS_STATIC_BUILD_CPPFLAGS])
|
||||
|
||||
AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
|
||||
AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
|
||||
AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
|
||||
AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$enable_developer)
|
||||
AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$enable_developer)
|
||||
AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes)
|
||||
AC_ARG_ENABLE(xml-docs, AS_HELP_STRING([--enable-xml-docs],[build XML documentation (requires xmlto)]),enable_xml_docs=$enableval,enable_xml_docs=auto)
|
||||
AC_ARG_ENABLE(doxygen-docs, AS_HELP_STRING([--enable-doxygen-docs],[build DOXYGEN documentation (requires Doxygen)]),enable_doxygen_docs=$enableval,enable_doxygen_docs=auto)
|
||||
|
|
@ -166,7 +173,7 @@ AC_ARG_WITH(dbus_session_bus_default_address, AS_HELP_STRING([--with-dbus-sessio
|
|||
AC_ARG_ENABLE([embedded-tests],
|
||||
AS_HELP_STRING([--enable-embedded-tests],
|
||||
[enable unit test code in the library and binaries]),
|
||||
[], [enable_embedded_tests=$USE_MAINTAINER_MODE])
|
||||
[], [enable_embedded_tests=$enable_developer])
|
||||
AC_ARG_ENABLE([modular-tests],
|
||||
AS_HELP_STRING([--enable-modular-tests],
|
||||
[enable modular regression tests (requires GLib)]),
|
||||
|
|
@ -1308,9 +1315,9 @@ cc_supports_flag() {
|
|||
TP_COMPILER_WARNINGS([WARNING_CFLAGS],
|
||||
dnl Use -Werror by default if:
|
||||
dnl - we're not on Windows (too many warnings), and
|
||||
dnl - we're in maintainer mode (a D-Bus developer, not a distro or end-user)
|
||||
dnl - we're in developer mode (a D-Bus developer, not a distro or end-user)
|
||||
dnl Override with --enable-Werror or --disable-Werror
|
||||
[test x$dbus_win != xyes -a x$dbus_cygwin != xyes -a x$USE_MAINTAINER_MODE = xyes],
|
||||
[test x$dbus_win != xyes -a x$dbus_cygwin != xyes -a x$enable_developer = xyes],
|
||||
|
||||
dnl Enable these warnings if possible:
|
||||
[all \
|
||||
|
|
@ -1754,7 +1761,7 @@ echo "
|
|||
man2html: ${MAN2HTML:-not found}"
|
||||
|
||||
echo "
|
||||
Maintainer mode: ${USE_MAINTAINER_MODE}
|
||||
Rebuilding generated files: ${USE_MAINTAINER_MODE}
|
||||
gcc coverage profiling: ${enable_compiler_coverage}
|
||||
Building embedded tests: ${enable_embedded_tests}
|
||||
Building modular tests: ${enable_modular_tests}
|
||||
|
|
|
|||
|
|
@ -631,6 +631,8 @@ dbus_pending_call_set_notify (DBusPendingCall *pending,
|
|||
void *user_data,
|
||||
DBusFreeFunction free_user_data)
|
||||
{
|
||||
dbus_bool_t ret = FALSE;
|
||||
|
||||
_dbus_return_val_if_fail (pending != NULL, FALSE);
|
||||
|
||||
CONNECTION_LOCK (pending->connection);
|
||||
|
|
@ -638,13 +640,15 @@ dbus_pending_call_set_notify (DBusPendingCall *pending,
|
|||
/* could invoke application code! */
|
||||
if (!_dbus_pending_call_set_data_unlocked (pending, notify_user_data_slot,
|
||||
user_data, free_user_data))
|
||||
return FALSE;
|
||||
goto out;
|
||||
|
||||
pending->function = function;
|
||||
ret = TRUE;
|
||||
|
||||
out:
|
||||
CONNECTION_UNLOCK (pending->connection);
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ _dbus_user_at_console (const char *username,
|
|||
DBusError *error)
|
||||
{
|
||||
|
||||
DBusString f;
|
||||
DBusString u, f;
|
||||
dbus_bool_t result;
|
||||
|
||||
result = FALSE;
|
||||
|
|
@ -556,8 +556,9 @@ _dbus_user_at_console (const char *username,
|
|||
goto out;
|
||||
}
|
||||
|
||||
_dbus_string_init_const (&u, username);
|
||||
|
||||
if (!_dbus_string_append (&f, username))
|
||||
if (!_dbus_concat_dir_and_file (&f, &u))
|
||||
{
|
||||
_DBUS_SET_OOM (error);
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
dbus\-launch \- Utility to start a message bus from a shell script
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B dbus\-launch [\-\-version] [\-\-sh\-syntax] [\-\-csh\-syntax] [\-\-auto\-syntax] [\-\-exit\-with\-session] [\-\-exit\-with\-x11] [\-\-autolaunch=MACHINEID] [\-\-config\-file=FILENAME] [PROGRAM] [ARGS...]
|
||||
.B dbus\-launch [\-\-version] [\-\-sh\-syntax] [\-\-csh\-syntax] [\-\-auto\-syntax] [\-\-exit\-with\-session] [\-\-autolaunch=MACHINEID] [\-\-config\-file=FILENAME] [PROGRAM] [ARGS...]
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
|
|
@ -56,17 +56,17 @@ about D\-Bus. See also the man page for \fIdbus\-daemon\fP.
|
|||
Distributions running
|
||||
.B dbus\-launch
|
||||
as part of a standard X session should run
|
||||
.B "dbus\-launch \-\-exit\-with\-x11"
|
||||
.B "dbus\-launch \-\-exit\-with\-session"
|
||||
after the X server has started and become available, as a wrapper around
|
||||
the "main" X client (typically a session manager or window manager), as in
|
||||
these examples:
|
||||
|
||||
.RS
|
||||
.B "dbus\-launch \-\-exit\-with\-x11 gnome\-session"
|
||||
.B "dbus\-launch \-\-exit\-with\-session gnome\-session"
|
||||
|
||||
.B "dbus\-launch \-\-exit\-with\-x11 openbox"
|
||||
.B "dbus\-launch \-\-exit\-with\-session openbox"
|
||||
|
||||
.B "dbus\-launch \-\-exit\-with\-x11 ~/.xsession"
|
||||
.B "dbus\-launch \-\-exit\-with\-session ~/.xsession"
|
||||
.RE
|
||||
|
||||
If your distribution does not do this, you can achieve similar results
|
||||
|
|
@ -167,25 +167,11 @@ the \-\-session argument. See the man page for dbus\-daemon
|
|||
Emit csh compatible code to set up environment variables.
|
||||
|
||||
.TP
|
||||
.I \-\-exit\-with\-x11
|
||||
If this option is provided, a persistent "babysitter" process will be
|
||||
created, and will connect to the X server. If it cannot do so, launching
|
||||
fails. If the "babysitter" process loses its X connection,
|
||||
it kills the message bus daemon, disconnecting all of its clients (which
|
||||
should exit in response). This avoids having leftover daemon
|
||||
processes from a user X session, after the X session has ended.
|
||||
|
||||
.TP
|
||||
.I \-\-exit\-with\-session
|
||||
If this option is provided, a persistent "babysitter" process will be
|
||||
created, as if for
|
||||
.BR \-\-exit\-with\-x11 .
|
||||
If it cannot connect to the X server, it will monitor the terminal from which
|
||||
.B dbus-launch
|
||||
was started instead, and if it gets a HUP on stdin, the message bus daemon
|
||||
will be killed. This option is not recommended, since it will consume input
|
||||
from the terminal where it was started; it is mainly provided for
|
||||
backwards compatibility.
|
||||
.I "\-\-exit\-with\-session"
|
||||
If this option is provided, a persistent "babysitter" process will be
|
||||
created that watches stdin for HUP and tries to connect to the X
|
||||
server. If this process gets a HUP on stdin or loses its X connection,
|
||||
it kills the message bus daemon.
|
||||
|
||||
.TP
|
||||
.I "\-\-autolaunch=MACHINEID"
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ EXTRA_DIST = run-with-tmp-session-bus.sh strtoll.c strtoull.c
|
|||
CLEANFILES = \
|
||||
run-with-tmp-session-bus.conf
|
||||
|
||||
#create the /var/lib/data directory for dbus-uuidgen
|
||||
localstatelibdir = $(localstatedir)/lib/dbus
|
||||
localstatelib_DATA =
|
||||
# create the /var/lib/dbus directory for dbus-uuidgen
|
||||
install-data-local:
|
||||
$(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/dbus
|
||||
|
||||
installcheck-local:
|
||||
test -d $(DESTDIR)$(localstatedir)/lib/dbus
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ verbose (const char *format,
|
|||
static void
|
||||
usage (int ecode)
|
||||
{
|
||||
fprintf (stderr, "dbus-launch [--version] [--help] [--sh-syntax] [--csh-syntax] [--auto-syntax] [--exit-with-session] [--exit-with-x11]\n");
|
||||
fprintf (stderr, "dbus-launch [--version] [--help] [--sh-syntax] [--csh-syntax] [--auto-syntax] [--exit-with-session]\n");
|
||||
exit (ecode);
|
||||
}
|
||||
|
||||
|
|
@ -809,7 +809,6 @@ main (int argc, char **argv)
|
|||
const char *runprog = NULL;
|
||||
int remaining_args = 0;
|
||||
int exit_with_session;
|
||||
int exit_with_x11 = FALSE;
|
||||
int binary_syntax = FALSE;
|
||||
int c_shell_syntax = FALSE;
|
||||
int bourne_shell_syntax = FALSE;
|
||||
|
|
@ -851,8 +850,6 @@ main (int argc, char **argv)
|
|||
version ();
|
||||
else if (strcmp (arg, "--exit-with-session") == 0)
|
||||
exit_with_session = TRUE;
|
||||
else if (strcmp (arg, "--exit-with-x11") == 0)
|
||||
exit_with_x11 = TRUE;
|
||||
else if (strcmp (arg, "--close-stderr") == 0)
|
||||
close_stderr = TRUE;
|
||||
else if (strstr (arg, "--autolaunch=") == arg)
|
||||
|
|
@ -964,9 +961,6 @@ main (int argc, char **argv)
|
|||
if (exit_with_session)
|
||||
verbose ("--exit-with-session enabled\n");
|
||||
|
||||
if (exit_with_x11)
|
||||
verbose ("--exit-with-x11 enabled\n");
|
||||
|
||||
if (autolaunch)
|
||||
{
|
||||
#ifndef DBUS_BUILD_X11
|
||||
|
|
@ -989,10 +983,10 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
verbose ("Autolaunch enabled (using X11).\n");
|
||||
if (!exit_with_x11)
|
||||
if (!exit_with_session)
|
||||
{
|
||||
verbose ("--exit-with-x11 automatically enabled\n");
|
||||
exit_with_x11 = TRUE;
|
||||
verbose ("--exit-with-session automatically enabled\n");
|
||||
exit_with_session = TRUE;
|
||||
}
|
||||
|
||||
if (!x11_init ())
|
||||
|
|
@ -1015,27 +1009,12 @@ main (int argc, char **argv)
|
|||
exit (0);
|
||||
}
|
||||
#endif /* DBUS_ENABLE_X11_AUTOLAUNCH */
|
||||
#endif /* DBUS_BUILD_X11 */
|
||||
}
|
||||
else if (exit_with_x11)
|
||||
{
|
||||
#ifndef DBUS_BUILD_X11
|
||||
fprintf (stderr, "Session lifetime based on X11 requested, but X11 support not compiled in.\n");
|
||||
exit (1);
|
||||
#else /* DBUS_BUILD_X11 */
|
||||
if (!x11_init ())
|
||||
{
|
||||
fprintf (stderr, "Session lifetime based on X11 requested, but X11 initialization failed.\n");
|
||||
exit (1);
|
||||
}
|
||||
#endif /* DBUS_BUILD_X11 */
|
||||
}
|
||||
#ifdef DBUS_BUILD_X11
|
||||
else if (read_machine_uuid_if_needed())
|
||||
{
|
||||
x11_init();
|
||||
}
|
||||
#endif /* DBUS_BUILD_X11 */
|
||||
}
|
||||
|
||||
|
||||
if (pipe (bus_pid_to_launcher_pipe) < 0 ||
|
||||
|
|
@ -1097,7 +1076,7 @@ main (int argc, char **argv)
|
|||
* and will also reap the pre-forked bus
|
||||
* daemon
|
||||
*/
|
||||
babysit (exit_with_session || exit_with_x11, ret,
|
||||
babysit (exit_with_session, ret,
|
||||
bus_pid_to_babysitter_pipe[READ_END]);
|
||||
exit (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue