diff options
author | Simon McVittie <smcv@debian.org> | 2014-10-01 19:45:00 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2014-10-01 19:45:00 +0100 |
commit | 255f62947424c4622609eb93ed53371dda28aac9 (patch) | |
tree | 6f8c5dbb96e48fa2d40919bb3282fae0b6d953de | |
parent | c03b8e681afa8e45977fc74e30142497939b47d1 (diff) | |
parent | 33ee25f98af863e9355fd53b9184c0b798343b89 (diff) | |
download | dbus-255f62947424c4622609eb93ed53371dda28aac9.tar.gz |
Imported Upstream version 1.9.0upstream/1.9.0
117 files changed, 6531 insertions, 3900 deletions
@@ -267,7 +267,7 @@ Tests These are the test programs that are built if dbus is compiled using --enable-tests. -dbus/dbus-test +dbus/test-dbus This is the main unit test program that tests all aspects of the D-Bus client library. diff --git a/Makefile.in b/Makefile.in index 77159082..8cb80061 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -38,23 +37,51 @@ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -73,31 +100,31 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Doxyfile.in \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/dbus-1-uninstalled.pc.in \ - $(srcdir)/dbus-1.pc.in $(srcdir)/tools/lcov.am \ - $(top_srcdir)/configure \ - $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \ - $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \ - $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \ - $(top_srcdir)/test/data/valid-config-files-system/debug-allow-all-fail.conf.in \ - $(top_srcdir)/test/data/valid-config-files-system/debug-allow-all-pass.conf.in \ - $(top_srcdir)/test/data/valid-config-files/debug-allow-all-sha1.conf.in \ +DIST_COMMON = $(srcdir)/tools/lcov.am INSTALL NEWS README AUTHORS \ + ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/Doxyfile.in \ + $(srcdir)/dbus-1.pc.in $(srcdir)/dbus-1-uninstalled.pc.in \ $(top_srcdir)/test/data/valid-config-files/debug-allow-all.conf.in \ + $(top_srcdir)/test/data/valid-config-files/debug-allow-all-sha1.conf.in \ $(top_srcdir)/test/data/valid-config-files/incoming-limit.conf.in \ - $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service.in \ - $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \ - $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \ - $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \ + $(top_srcdir)/test/data/valid-config-files-system/debug-allow-all-pass.conf.in \ + $(top_srcdir)/test/data/valid-config-files-system/debug-allow-all-fail.conf.in \ $(top_srcdir)/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in \ $(top_srcdir)/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service.in \ $(top_srcdir)/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in \ $(top_srcdir)/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \ - $(top_srcdir)/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \ $(top_srcdir)/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \ - AUTHORS COPYING ChangeLog INSTALL NEWS compile config.guess \ - config.sub depcomp install-sh ltmain.sh missing + $(top_srcdir)/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \ + $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service.in \ + $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \ + $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \ + $(top_srcdir)/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \ + $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \ + $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \ + $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \ + COPYING compile config.guess config.sub install-sh missing \ + ltmain.sh subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ @@ -133,21 +160,28 @@ CONFIG_CLEAN_FILES = Doxyfile dbus-1.pc dbus-1-uninstalled.pc \ test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service \ test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -184,11 +218,33 @@ am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -199,6 +255,7 @@ am__remove_distdir = \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -226,6 +283,7 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -282,7 +340,6 @@ DBUS_USER = @DBUS_USER@ DBUS_VERSION = @DBUS_VERSION@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ -DEFAULT_MESSAGE_UNIX_FDS = @DEFAULT_MESSAGE_UNIX_FDS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -503,8 +560,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -590,22 +647,25 @@ uninstall-pkgconfigDATA: dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -620,57 +680,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -686,12 +701,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -703,15 +713,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -720,9 +726,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -790,40 +818,42 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) + $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -834,8 +864,6 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -847,18 +875,19 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -881,7 +910,7 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' @@ -1020,26 +1049,24 @@ ps-am: uninstall-am: uninstall-pkgconfigDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local am--refresh check check-am clean \ - clean-generic clean-libtool ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-pkgconfigDATA +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgconfigDATA \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-pkgconfigDATA all-local: Doxyfile @@ -1,3 +1,339 @@ +D-Bus 1.9.0 (2014-10-01) +== + +The “tiered cheeses” release. + +Requirements: + +• Support for the systemd: (LISTEN_FDS) pseudo-transport on Linux now + requires either the libsystemd or libsd-daemon shared library, dropping the + embedded convenience copy of sd-daemon (fd.o #71818, Simon) + +Build-time configuration changes: + +• The Stats interface is now enabled by default, and locked-down to + root-only on the system bus. Configure with --disable-stats + to disable it altogether on memory- or disk-constrained systems, + or see ${docdir}/examples/ to open it up to non-root users on the + system bus or restrict access on the session bus. + (fd.o #80759; Simon McVittie, Alban Crequy) + +• The CMake build system now builds the same shared library name as Autotools + on at least Linux and Windows: + - on Linux (and perhaps other Unix platforms), it previously built + libdbus-1.so, but now builds libdbus-1.so.3.* with development + symlink libdbus-1.so and SONAME/symlink libdbus-1.so.3 + - on Windows, it previously built either libdbus-1.dll (release) or + libdbus-1d.dll (debug), but now builds libdbus-1-3.dll, copied to + libdbus-1.dll for compatibility with older applications. + (fd.o #74117, Ralf Habacker) + +Enhancements: + +• D-Bus Specification version 0.24 + · document how to quote match rules (fd.o #24307, Simon McVittie) + · explicitly say that most message types never expect a reply + regardles of whether they have NO_REPLY_EXPECTED + (fd.o #75749, Simon McVittie) + +• on Unix platforms, disable Nagle's algorithm on TCP connections to improve + initial latency (fd.o #75544, Matt Hoosier) + +• use backtrace() if it is in -lexecinfo instead of libc, as on NetBSD + (fd.o #69702, Patrick Welche) + +• in dbus-monitor, print more information about file descriptors + (fd.o #80603, Alban Crequy) + +• do not install system bus configuration if built for Windows + (fd.o #83583; Ralf Habacker, Simon McVittie) + +• Add GetAllMatchRules to the Stats interface (fd.o #24307, Alban Crequy) + +• Add a regression test for file descriptor passing (fd.o #83622, + Simon McVittie) + +Fixes: + +• fix an incorrect error message if a Unix socket path is too long + (fd.o #73887, Antoine Jacoutot) + +• in an MSYS/Cygwin environment, pass Unix-style filenames to xmlto, + fixing documentation generation (fd.o #75860, Руслан Ижбулатов) + +• in Unix with X11, avoid giving dbus-launch a misleading argv[0] + in ps(1) (fd.o #69716, Chengwei Yang) + +• avoid calling poll() with timeout < -1, which is considered invalid + on FreeBSD and NetBSD (fd.o #78480, Jaap Boender) + +• be portable to BSD-derived platforms where O_CLOEXEC is unavailable in libc + (like Mac OS X 10.6), or available in libc but unsupported by the kernel + (fd.o #77032; rmvsxop, OBATA Akio, Patrick Welche) + +• Fix include path for test/internal/*.c with cmake (Ralf Habacker) + +• Documentation improvements + (fd.o #80795, #84313; Thomas Haller, Sebastian Rasmussen) + +• in dbus-monitor, do not leak file descriptors that we have monitored + (fd.o #80603, Alban Crequy) + +• Set the close-on-exec flag for the inotify file descriptor, even + if built with CMake or older libc (fd.o #73689, Simon McVittie) + +• Remove some LGPL code from the Windows dbus-daemon + (fd.o #57272, Ralf Habacker) + +D-Bus 1.8.8 (2014-09-16) +== + +The "smashy smashy egg man" release. + +Security fixes: + +• Do not accept an extra fd in the padding of a cmsg message, which + could lead to a 4-byte heap buffer overrun. + (CVE-2014-3635, fd.o #83622; Simon McVittie) + +• Reduce default for maximum Unix file descriptors passed per message + from 1024 to 16, preventing a uid with the default maximum number of + connections from exhausting the system bus' file descriptors under + Linux's default rlimit. Distributors or system administrators with a + more restrictive fd limit may wish to reduce these limits further. + + Additionally, on Linux this prevents a second denial of service + in which the dbus-daemon can be made to exceed the maximum number + of fds per sendmsg() and disconnect the process that would have + received them. + (CVE-2014-3636, fd.o #82820; Alban Crequy) + +• Disconnect connections that still have a fd pending unmarshalling after + a new configurable limit, pending_fd_timeout (defaulting to 150 seconds), + removing the possibility of creating an abusive connection that cannot be + disconnected by setting up a circular reference to a connection's + file descriptor. + (CVE-2014-3637, fd.o #80559; Alban Crequy) + +• Reduce default for maximum pending replies per connection from 8192 to 128, + mitigating an algorithmic complexity denial-of-service attack + (CVE-2014-3638, fd.o #81053; Alban Crequy) + +• Reduce default for authentication timeout on the system bus from + 30 seconds to 5 seconds, avoiding denial of service by using up + all unauthenticated connection slots; and when all unauthenticated + connection slots are used up, make new connection attempts block + instead of disconnecting them. + (CVE-2014-3639, fd.o #80919; Alban Crequy) + +Other fixes: + +• Check for libsystemd from systemd >= 209, falling back to + the older separate libraries if not found (Umut Tezduyar Lindskog, + Simon McVittie) + +• On Linux, use prctl() to disable core dumps from a test executable + that deliberately raises SIGSEGV to test dbus-daemon's handling + of that condition (fd.o #83772, Simon McVittie) + +• Fix compilation with --enable-stats (fd.o #81043, Gentoo #507232; + Alban Crequy) + +• Improve documentation for running tests on Windows (fd.o #41252, + Ralf Habacker) + +D-Bus 1.8.6 (2014-06-02) +== + +Security fixes: + +• On Linux ≥ 2.6.37-rc4, if sendmsg() fails with ETOOMANYREFS, silently drop + the message. This prevents an attack in which a malicious client can + make dbus-daemon disconnect a system service, which is a local + denial of service. + (fd.o #80163, CVE-2014-3532; Alban Crequy) + +• Track remaining Unix file descriptors correctly when more than one + message in quick succession contains fds. This prevents another attack + in which a malicious client can make dbus-daemon disconnect a system + service. + (fd.o #79694, fd.o #80469, CVE-2014-3533; Alejandro Martínez Suárez, + Simon McVittie, Alban Crequy) + +Other fixes: + +• When dbus-launch --exit-with-session starts a dbus-daemon but then cannot + attach to a session, kill the dbus-daemon as intended + (fd.o #74698, Роман Донченко) + +D-Bus 1.8.4 (2014-06-10) +== + +Security fix: + +• Alban Crequy at Collabora Ltd. discovered and fixed a denial-of-service + flaw in dbus-daemon, part of the reference implementation of D-Bus. + Additionally, in highly unusual environments the same flaw could lead to + a side channel between processes that should not be able to communicate. + (CVE-2014-3477, fd.o #78979) + +D-Bus 1.8.2 (2014-04-30) +== + +The “nobody wants red” release. + +Enhancements: + +• in the CMake build system, add some hints for Linux users cross-compiling + Windows D-Bus binaries to be able to run tests under Wine + (fd.o #41252, Ralf Habacker) + +• add Documentation key to dbus.service (fd.o #77447, Cameron Norman) + +Fixes: + +• in "dbus-uuidgen --ensure", try to copy systemd's /etc/machine-id + to /var/lib/dbus/machine-id instead of generating an entirely new ID + (fd.o #77941, Simon McVittie) + +• if dbus-launch receives an X error very quickly, do not kill + unrelated processes (fd.o #74698, Роман Донченко) + +• on Windows, allow up to 8K connections to the dbus-daemon, instead of the + previous 64 (fd.o #71297; Cristian Onet, Ralf Habacker) + +• cope with \r\n newlines in regression tests, since on Windows, + dbus-daemon.exe uses text mode (fd.o #75863, Руслан Ижбулатов) + +D-Bus 1.8.0 (2014-01-20) +== + +The “Wolverine distrusts my printer” release. + +This starts a new stable branch. The 1.6.x branch is now considered to be +outdated, and will only receive fixes for serious bugs such as security +flaws. The 1.4.x and 1.2.x branches no longer have upstream support and +are unlikely to get any more releases, but if distributors still need to +support them, please share security patches via upstream. + +Summary of changes since 1.6.x: + +• libdbus always behaves as if dbus_threads_init_default() had been called + (thread-safety by default) +• new dbus-run-session tool, replacing certain misuses of dbus-launch +• dbus-monitor can talk to outdated versions of dbus-daemon again +• new org.freedesktop.DBus.GetConnectionCredentials method +• GetConnectionUnixProcessID also works correctly on Windows, returning + the Windows process ID +• GetConnectionWindowsSID returns the correct SID on Windows +• expat is required, libxml2 can no longer be used as a substitute +• the userDB cache is required, and cannot be disabled +• a 64-bit integer type (either int, long, long long or _int64) is required +• better systemd-journald integration on Linux +• fixed long-standing fd and array leaks when failing to parse a message +• fixed referenced-but-never-freed parent nodes (effectively memory leaks) + when using certain object-path allocation patterns, notably in Avahi +• better defaults for Windows support +• better CMake support +• better portability to mingw32, FreeBSD, NetBSD, QNX and Hurd +• the source language for the man pages is now Docbook XML + +Enhancements since 1.7.10: + +• Enhance the CMake build system to check for GLib and compile/run + a subset of the regression tests (fd.o #41252, #73495; Ralf Habacker) + +Fixes since 1.7.10: + +• don't rely on va_copy(), use DBUS_VA_COPY() wrapper (fd.o #72840, + Ralf Habacker) + +• fix compilation of systemd journal support on older systemd versions where + sd-journal.h doesn't include syslog.h (fd.o #73455, Ralf Habacker) + +• fix compilation on older MSVC versions by including stdlib.h + (fd.o #73455, Ralf Habacker) + +• Allow <allow_anonymous/> to appear in an included configuration file + (fd.o #73475, Matt Hoosier) + +Test behaviour changes since 1.7.10: + +• If the tests crash with an assertion failure, they no longer default to + blocking for a debugger to be attached. Set DBUS_BLOCK_ON_ABORT in the + environment if you want the old behaviour. + +• To improve debuggability, the dbus-daemon and dbus-daemon-eavesdrop tests + can be run with an external dbus-daemon by setting + DBUS_TEST_DAEMON_ADDRESS in the environment. Test-cases that require + an unusually-configured dbus-daemon are skipped. + +D-Bus 1.7.10 (2014-01-06) +== + +The “weighted companion cube” release. + +This is a release candidate for D-Bus 1.8. + +D-Bus Specification 0.23: + +• don't require messages with no INTERFACE to be dispatched + (fd.o #68597, Simon McVittie) + +• document "tcp:bind=..." and "nonce-tcp:bind=..." (fd.o #72301, + Chengwei Yang) + +• define "listenable" and "connectable" addresses, and discuss + the difference (fd.o #61303, Simon McVittie) + +Enhancements: + +• support printing Unix file descriptors in dbus-send, dbus-monitor + (fd.o #70592, Robert Ancell) + +• don't install systemd units if --disable-systemd is given + (fd.o #71818, Chengwei Yang) + +Fixes: + +• don't leak memory on out-of-memory while listing activatable or + active services (fd.o #71526, Radoslaw Pajak) + +• fix undefined behaviour in a regression test (fd.o #69924, DreamNik) + +• escape Unix socket addresses correctly (fd.o #46013, Chengwei Yang) + +• on SELinux systems, don't assume that SECCLASS_DBUS, DBUS__ACQUIRE_SVC + and DBUS__SEND_MSG are numerically equal to their values in the + reference policy (fd.o #88719, osmond sun) + +• define PROCESS_QUERY_LIMITED_INFORMATION if missing from MinGW < 4 headers + (fd.o #71366, Matt Fischer) + +• define WIN32_LEAN_AND_MEAN to avoid conflicts between winsock.h and + winsock2.h (fd.o #71405, Matt Fischer) + +• do not return failure from _dbus_read_nonce() with no error set, + preventing a potential crash (fd.o #72298, Chengwei Yang) + +• on BSD systems, avoid some O(1)-per-process memory and fd leaks in kqueue, + preventing test failures (fd.o #69332, fd.o #72213; Chengwei Yang) + +• fix warning spam on Hurd by not trying to set SO_REUSEADDR on Unix sockets, + which doesn't do anything anyway on at least Linux and FreeBSD + (fd.o #69492, Simon McVittie) + +• fix use of TCP sockets on FreeBSD and Hurd by tolerating EINVAL from + sendmsg() with SCM_CREDS (retrying with plain send()), and looking + for credentials more correctly (fd.o #69492, Simon McVittie) + +• ensure that tests run with a temporary XDG_RUNTIME_DIR to avoid + getting mixed up in XDG/systemd "user sessions" (fd.o #61301, + Simon McVittie) + +• refresh cached policy rules for existing connections when bus + configuration changes (fd.o #39463, Chengwei Yang) + D-Bus 1.7.8 (2013-11-01) == @@ -13,15 +13,13 @@ test not running yet and there is help needed to get them running. Supported compilers ------------------- -On windows Microsoft Visual Studio 2010 (Express and professional variants) +On windows Microsoft Visual Studio 2010 (Express and professional variants) and mingw-w64|32 are known to work. Building -------- DBus can be built on windows using automake or cmake. See the -file README for more information. -Special cmake build instructions can be found in cmake/readme-cmake.txt - +file INSTALL for more information. windbus and dbus4win Ports -------------------------- @@ -32,14 +30,19 @@ updated with windows specific stuff. Tests ----- + - run complete test suite + make check + or + ctest [-V] + - dbus library check - bin\dbus-test.exe <build-root>\test\data + ctest [-V] -R test-dbus - bus daemon check - bin\bus-test.exe <build-root>\test\data + ctest [-V] -R test-bus - check available names - bin\test_names.exe + ctest [-V] -R test-names - check if dbus-daemon is accessable bin\dbus-send.exe --session --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames method return sender=org.freedesktop.DBus -> dest=:1.4 array [ string "org.freedesktop.DBus"string ":1.4"] @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,33 +11,31 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.6], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -54,24 +51,22 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.6])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -90,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -116,22 +111,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -150,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -169,7 +159,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -182,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -195,8 +186,8 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -236,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -254,8 +245,8 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -263,7 +254,7 @@ AC_CACHE_CHECK([dependency style of $depcc], fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -311,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -321,9 +312,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -338,20 +333,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -364,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -376,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -408,7 +399,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -418,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -442,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -471,31 +465,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -506,34 +509,79 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -555,15 +603,12 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -577,16 +622,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -603,20 +646,17 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -627,10 +667,11 @@ AC_DEFUN([AM_MAINTAINER_MODE], AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -638,18 +679,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -667,7 +704,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -692,52 +729,14 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -745,11 +744,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -762,54 +760,22 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -819,7 +785,7 @@ AC_DEFUN([_AM_MANGLE_OPTION], # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -833,14 +799,59 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- @@ -869,7 +880,7 @@ AC_DEFUN([AM_PATH_PYTHON], dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl +[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) @@ -885,10 +896,11 @@ AC_DEFUN([AM_PATH_PYTHON], dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - AC_MSG_CHECKING([whether $PYTHON version >= $1]) + AC_MSG_CHECKING([whether $PYTHON version is >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], - [AC_MSG_RESULT(yes)], - [AC_MSG_ERROR(too old)]) + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Python interpreter is too old])]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies @@ -937,6 +949,25 @@ AC_DEFUN([AM_PATH_PYTHON], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# <https://github.com/pypa/virtualenv/issues/118> +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" dnl Set up 4 directories: @@ -953,7 +984,14 @@ AC_DEFUN([AM_PATH_PYTHON], else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -988,7 +1026,14 @@ AC_DEFUN([AM_PATH_PYTHON], else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -1036,14 +1081,12 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. @@ -1057,22 +1100,16 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1083,32 +1120,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1118,31 +1163,50 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl -dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} @@ -1160,7 +1224,7 @@ else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then - dnl Using `$V' instead of `$(V)' breaks IRIX make. + dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else @@ -1177,44 +1241,40 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1228,18 +1288,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1249,76 +1307,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + AM_RUN_LOG([cat conftest.dir/file]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR @@ -48,7 +48,7 @@ fi } LIBTOOLIZE=`which libtoolize` -if ! test -f $LIBTOOLIZE; then +if ! test -f "$LIBTOOLIZE"; then LIBTOOLIZE=`which glibtoolize` fi diff --git a/bus/Makefile.am b/bus/Makefile.am index cd0c67da..c0bc1549 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -31,11 +31,22 @@ EFENCE= CONFIG_IN_FILES= \ session.conf.in \ system.conf.in \ - org.freedesktop.dbus-session.plist.in + org.freedesktop.dbus-session.plist.in \ + example-system-enable-stats.conf.in \ + example-session-disable-stats.conf.in \ + $(NULL) + +config_DATA = session.conf + +if DBUS_UNIX +config_DATA += system.conf +endif -config_DATA= \ - session.conf \ - system.conf +examplesdir = ${docdir}/examples +examples_DATA = \ + example-system-enable-stats.conf \ + example-session-disable-stats.conf \ + $(NULL) if DBUS_ENABLE_LAUNCHD agentdir=$(LAUNCHD_AGENT_DIR) @@ -140,15 +151,15 @@ dbus_daemon_launch_helper_test_CPPFLAGS = \ ## we build yet another binary so we can do the OOM tests ## DO NOT INSTALL THIS FILE -bus_test_launch_helper_SOURCES= \ +test_bus_launch_helper_SOURCES= \ test-launch-helper.c \ $(LAUNCH_HELPER_SOURCES) -bus_test_launch_helper_LDADD= \ +test_bus_launch_helper_LDADD= \ $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) -bus_test_launch_helper_CPPFLAGS = \ +test_bus_launch_helper_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DACTIVATION_LAUNCHER_TEST \ -DACTIVATION_LAUNCHER_DO_OOM @@ -169,18 +180,18 @@ if DBUS_ENABLE_EMBEDDED_TESTS ## even when not doing "make check" # run as a test by test/Makefile.am -noinst_PROGRAMS += bus-test bus-test-system +noinst_PROGRAMS += test-bus if DBUS_UNIX # run as a test by test/Makefile.am -noinst_PROGRAMS += bus-test-launch-helper +noinst_PROGRAMS += test-bus-launch-helper test-bus-system # this is used by the tests but is not,itself, a test noinst_PROGRAMS += dbus-daemon-launch-helper-test endif DBUS_UNIX endif DBUS_ENABLE_EMBEDDED_TESTS -bus_test_system_SOURCES= \ +test_bus_system_SOURCES= \ $(XML_SOURCES) \ config-parser-common.c \ config-parser-common.h \ @@ -190,24 +201,26 @@ bus_test_system_SOURCES= \ utils.h \ test-system.c -bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) -bus_test_SOURCES= \ +test_bus_SOURCES= \ $(BUS_SOURCES) \ test-main.c -bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) ## mop up the gcov files clean-local: /bin/rm *.bb *.bbg *.da *.gcov || true install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus - $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services +if DBUS_UNIX + $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus + $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services +endif if HAVE_SYSTEMD # Install dbus.socket as default implementation of a D-Bus stack. # Deliberately not using $(LN_S) here: ln -fs is not universally portable, diff --git a/bus/Makefile.in b/bus/Makefile.in index b9ea3561..0f409cd4 100644 --- a/bus/Makefile.in +++ b/bus/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,28 +80,32 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@DBUS_UNIX_TRUE@am__append_1 = system.conf noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) dbus_daemon_exec_PROGRAMS = dbus-daemon$(EXEEXT) @DBUS_UNIX_TRUE@libexec_PROGRAMS = dbus-daemon-launch-helper$(EXEEXT) # run as a test by test/Makefile.am -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__append_1 = bus-test bus-test-system +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__append_2 = test-bus # run as a test by test/Makefile.am # this is used by the tests but is not,itself, a test -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = bus-test-launch-helper \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_3 = test-bus-launch-helper \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@ test-bus-system \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test -@HAVE_SYSTEMD_TRUE@am__append_3 = \ +@HAVE_SYSTEMD_TRUE@am__append_4 = \ @HAVE_SYSTEMD_TRUE@ dbus.service.in \ @HAVE_SYSTEMD_TRUE@ dbus.socket.in subdir = bus -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/dbus.service.in $(srcdir)/dbus.socket.in \ - $(srcdir)/messagebus-config.in $(srcdir)/messagebus.in \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/system.conf.in $(srcdir)/session.conf.in \ + $(srcdir)/example-system-enable-stats.conf.in \ + $(srcdir)/example-session-disable-stats.conf.in \ + $(srcdir)/messagebus.in $(srcdir)/messagebus-config.in \ $(srcdir)/org.freedesktop.dbus-session.plist.in \ - $(srcdir)/rc.messagebus.in $(srcdir)/session.conf.in \ - $(srcdir)/system.conf.in + $(srcdir)/rc.messagebus.in $(srcdir)/dbus.service.in \ + $(srcdir)/dbus.socket.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -87,21 +118,24 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = system.conf session.conf messagebus \ +CONFIG_CLEAN_FILES = system.conf session.conf \ + example-system-enable-stats.conf \ + example-session-disable-stats.conf messagebus \ messagebus-config org.freedesktop.dbus-session.plist \ rc.messagebus dbus.service dbus.socket CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(dbus_daemon_execdir)" \ "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(initddir)" "$(DESTDIR)$(agentdir)" \ - "$(DESTDIR)$(configdir)" "$(DESTDIR)$(systemdsystemunitdir)" -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = bus-test$(EXEEXT) \ -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ bus-test-system$(EXEEXT) -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__EXEEXT_2 = bus-test-launch-helper$(EXEEXT) \ + "$(DESTDIR)$(configdir)" "$(DESTDIR)$(examplesdir)" \ + "$(DESTDIR)$(systemdsystemunitdir)" +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = test-bus$(EXEEXT) +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__EXEEXT_2 = test-bus-launch-helper$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@ test-bus-system$(EXEEXT) \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test$(EXEEXT) PROGRAMS = $(dbus_daemon_exec_PROGRAMS) $(libexec_PROGRAMS) \ $(noinst_PROGRAMS) -am__bus_test_SOURCES_DIST = activation.c activation.h \ +am__dbus_daemon_SOURCES_DIST = activation.c activation.h \ activation-exit-codes.h bus.c bus.h config-parser.c \ config-parser.h config-parser-common.c config-parser-common.h \ connection.c connection.h desktop-file.c desktop-file.h \ @@ -110,7 +144,7 @@ am__bus_test_SOURCES_DIST = activation.c activation.h \ expirelist.c expirelist.h policy.c policy.h selinux.h \ selinux.c services.c services.h signals.c signals.h stats.c \ stats.h test.c test.h utils.c utils.h config-loader-expat.c \ - test-main.c + main.c @DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-default.$(OBJEXT) @DBUS_BUS_ENABLE_INOTIFY_TRUE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-inotify.$(OBJEXT) @DBUS_BUS_ENABLE_KQUEUE_TRUE@am__objects_1 = \ @@ -123,75 +157,76 @@ am__objects_3 = activation.$(OBJEXT) bus.$(OBJEXT) \ policy.$(OBJEXT) selinux.$(OBJEXT) services.$(OBJEXT) \ signals.$(OBJEXT) stats.$(OBJEXT) test.$(OBJEXT) \ utils.$(OBJEXT) $(am__objects_2) -am_bus_test_OBJECTS = $(am__objects_3) test-main.$(OBJEXT) -bus_test_OBJECTS = $(am_bus_test_OBJECTS) +am_dbus_daemon_OBJECTS = $(am__objects_3) main.$(OBJEXT) +dbus_daemon_OBJECTS = $(am_dbus_daemon_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -bus_test_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ - $(am__DEPENDENCIES_2) +dbus_daemon_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent -am__objects_4 = bus_test_launch_helper-config-loader-expat.$(OBJEXT) -am__objects_5 = $(am__objects_4) \ - bus_test_launch_helper-config-parser-common.$(OBJEXT) \ - bus_test_launch_helper-config-parser-trivial.$(OBJEXT) \ - bus_test_launch_helper-desktop-file.$(OBJEXT) \ - bus_test_launch_helper-utils.$(OBJEXT) \ - bus_test_launch_helper-activation-helper.$(OBJEXT) -am_bus_test_launch_helper_OBJECTS = \ - bus_test_launch_helper-test-launch-helper.$(OBJEXT) \ - $(am__objects_5) -bus_test_launch_helper_OBJECTS = $(am_bus_test_launch_helper_OBJECTS) -am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -bus_test_launch_helper_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) -am_bus_test_system_OBJECTS = $(am__objects_2) \ - config-parser-common.$(OBJEXT) config-parser-trivial.$(OBJEXT) \ - utils.$(OBJEXT) test-system.$(OBJEXT) -bus_test_system_OBJECTS = $(am_bus_test_system_OBJECTS) -bus_test_system_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_2) -am__dbus_daemon_SOURCES_DIST = activation.c activation.h \ - activation-exit-codes.h bus.c bus.h config-parser.c \ - config-parser.h config-parser-common.c config-parser-common.h \ - connection.c connection.h desktop-file.c desktop-file.h \ - dir-watch-default.c dir-watch-inotify.c dir-watch-kqueue.c \ - dir-watch.h dispatch.c dispatch.h driver.c driver.h \ - expirelist.c expirelist.h policy.c policy.h selinux.h \ - selinux.c services.c services.h signals.c signals.h stats.c \ - stats.h test.c test.h utils.c utils.h config-loader-expat.c \ - main.c -am_dbus_daemon_OBJECTS = $(am__objects_3) main.$(OBJEXT) -dbus_daemon_OBJECTS = $(am_dbus_daemon_OBJECTS) -dbus_daemon_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) -am__objects_6 = $(am__objects_2) config-parser-common.$(OBJEXT) \ +am__v_lt_1 = +am__objects_4 = $(am__objects_2) config-parser-common.$(OBJEXT) \ config-parser-trivial.$(OBJEXT) desktop-file.$(OBJEXT) \ utils.$(OBJEXT) activation-helper.$(OBJEXT) am_dbus_daemon_launch_helper_OBJECTS = \ - activation-helper-bin.$(OBJEXT) $(am__objects_6) + activation-helper-bin.$(OBJEXT) $(am__objects_4) dbus_daemon_launch_helper_OBJECTS = \ $(am_dbus_daemon_launch_helper_OBJECTS) +am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) dbus_daemon_launch_helper_DEPENDENCIES = \ $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) -am__objects_7 = \ +am__objects_5 = \ dbus_daemon_launch_helper_test-config-loader-expat.$(OBJEXT) -am__objects_8 = $(am__objects_7) \ +am__objects_6 = $(am__objects_5) \ dbus_daemon_launch_helper_test-config-parser-common.$(OBJEXT) \ dbus_daemon_launch_helper_test-config-parser-trivial.$(OBJEXT) \ dbus_daemon_launch_helper_test-desktop-file.$(OBJEXT) \ dbus_daemon_launch_helper_test-utils.$(OBJEXT) \ dbus_daemon_launch_helper_test-activation-helper.$(OBJEXT) am_dbus_daemon_launch_helper_test_OBJECTS = dbus_daemon_launch_helper_test-activation-helper-bin.$(OBJEXT) \ - $(am__objects_8) + $(am__objects_6) dbus_daemon_launch_helper_test_OBJECTS = \ $(am_dbus_daemon_launch_helper_test_OBJECTS) dbus_daemon_launch_helper_test_DEPENDENCIES = \ $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) +am__test_bus_SOURCES_DIST = activation.c activation.h \ + activation-exit-codes.h bus.c bus.h config-parser.c \ + config-parser.h config-parser-common.c config-parser-common.h \ + connection.c connection.h desktop-file.c desktop-file.h \ + dir-watch-default.c dir-watch-inotify.c dir-watch-kqueue.c \ + dir-watch.h dispatch.c dispatch.h driver.c driver.h \ + expirelist.c expirelist.h policy.c policy.h selinux.h \ + selinux.c services.c services.h signals.c signals.h stats.c \ + stats.h test.c test.h utils.c utils.h config-loader-expat.c \ + test-main.c +am_test_bus_OBJECTS = $(am__objects_3) test-main.$(OBJEXT) +test_bus_OBJECTS = $(am_test_bus_OBJECTS) +test_bus_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ + $(am__DEPENDENCIES_2) +am__objects_7 = test_bus_launch_helper-config-loader-expat.$(OBJEXT) +am__objects_8 = $(am__objects_7) \ + test_bus_launch_helper-config-parser-common.$(OBJEXT) \ + test_bus_launch_helper-config-parser-trivial.$(OBJEXT) \ + test_bus_launch_helper-desktop-file.$(OBJEXT) \ + test_bus_launch_helper-utils.$(OBJEXT) \ + test_bus_launch_helper-activation-helper.$(OBJEXT) +am_test_bus_launch_helper_OBJECTS = \ + test_bus_launch_helper-test-launch-helper.$(OBJEXT) \ + $(am__objects_8) +test_bus_launch_helper_OBJECTS = $(am_test_bus_launch_helper_OBJECTS) +test_bus_launch_helper_DEPENDENCIES = \ + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_3) +am_test_bus_system_OBJECTS = $(am__objects_2) \ + config-parser-common.$(OBJEXT) config-parser-trivial.$(OBJEXT) \ + utils.$(OBJEXT) test-system.$(OBJEXT) +test_bus_system_OBJECTS = $(am_test_bus_system_OBJECTS) +test_bus_system_DEPENDENCIES = \ + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_2) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -220,6 +255,18 @@ am__uninstall_files_from_dir = { \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) $(initd_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -232,35 +279,48 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(bus_test_SOURCES) $(bus_test_launch_helper_SOURCES) \ - $(bus_test_system_SOURCES) $(dbus_daemon_SOURCES) \ - $(dbus_daemon_launch_helper_SOURCES) \ - $(dbus_daemon_launch_helper_test_SOURCES) -DIST_SOURCES = $(am__bus_test_SOURCES_DIST) \ - $(bus_test_launch_helper_SOURCES) $(bus_test_system_SOURCES) \ - $(am__dbus_daemon_SOURCES_DIST) \ +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(dbus_daemon_SOURCES) $(dbus_daemon_launch_helper_SOURCES) \ + $(dbus_daemon_launch_helper_test_SOURCES) $(test_bus_SOURCES) \ + $(test_bus_launch_helper_SOURCES) $(test_bus_system_SOURCES) +DIST_SOURCES = $(am__dbus_daemon_SOURCES_DIST) \ $(dbus_daemon_launch_helper_SOURCES) \ - $(dbus_daemon_launch_helper_test_SOURCES) + $(dbus_daemon_launch_helper_test_SOURCES) \ + $(am__test_bus_SOURCES_DIST) $(test_bus_launch_helper_SOURCES) \ + $(test_bus_system_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -DATA = $(agent_DATA) $(config_DATA) $(systemdsystemunit_DATA) +DATA = $(agent_DATA) $(config_DATA) $(examples_DATA) \ + $(systemdsystemunit_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -316,7 +376,6 @@ DBUS_USER = @DBUS_USER@ DBUS_VERSION = @DBUS_VERSION@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ -DEFAULT_MESSAGE_UNIX_FDS = @DEFAULT_MESSAGE_UNIX_FDS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -500,11 +559,17 @@ EFENCE = CONFIG_IN_FILES = \ session.conf.in \ system.conf.in \ - org.freedesktop.dbus-session.plist.in + org.freedesktop.dbus-session.plist.in \ + example-system-enable-stats.conf.in \ + example-session-disable-stats.conf.in \ + $(NULL) -config_DATA = \ - session.conf \ - system.conf +config_DATA = session.conf $(am__append_1) +examplesdir = ${docdir}/examples +examples_DATA = \ + example-system-enable-stats.conf \ + example-session-disable-stats.conf \ + $(NULL) @DBUS_ENABLE_LAUNCHD_TRUE@agentdir = $(LAUNCHD_AGENT_DIR) @DBUS_ENABLE_LAUNCHD_TRUE@agent_DATA = org.freedesktop.dbus-session.plist @@ -593,20 +658,20 @@ dbus_daemon_launch_helper_test_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DACTIVATION_LAUNCHER_TEST -bus_test_launch_helper_SOURCES = \ +test_bus_launch_helper_SOURCES = \ test-launch-helper.c \ $(LAUNCH_HELPER_SOURCES) -bus_test_launch_helper_LDADD = \ +test_bus_launch_helper_LDADD = \ $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) -bus_test_launch_helper_CPPFLAGS = \ +test_bus_launch_helper_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DACTIVATION_LAUNCHER_TEST \ -DACTIVATION_LAUNCHER_DO_OOM -bus_test_system_SOURCES = \ +test_bus_system_SOURCES = \ $(XML_SOURCES) \ config-parser-common.c \ config-parser-common.h \ @@ -616,16 +681,16 @@ bus_test_system_SOURCES = \ utils.h \ test-system.c -bus_test_system_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) -bus_test_SOURCES = \ +test_bus_system_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_SOURCES = \ $(BUS_SOURCES) \ test-main.c -bus_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) +test_bus_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) #### Init scripts fun SCRIPT_IN_FILES = messagebus.in messagebus-config.in rc.messagebus.in \ - $(am__append_3) + $(am__append_4) @DBUS_INIT_SCRIPTS_RED_HAT_TRUE@initddir = $(sysconfdir)/rc.d/init.d @DBUS_INIT_SCRIPTS_SLACKWARE_TRUE@initddir = $(sysconfdir)/rc.d/ @DBUS_INIT_SCRIPTS_RED_HAT_TRUE@initd_SCRIPTS = \ @@ -682,6 +747,10 @@ system.conf: $(top_builddir)/config.status $(srcdir)/system.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ session.conf: $(top_builddir)/config.status $(srcdir)/session.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +example-system-enable-stats.conf: $(top_builddir)/config.status $(srcdir)/example-system-enable-stats.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +example-session-disable-stats.conf: $(top_builddir)/config.status $(srcdir)/example-session-disable-stats.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ messagebus: $(top_builddir)/config.status $(srcdir)/messagebus.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ messagebus-config: $(top_builddir)/config.status $(srcdir)/messagebus-config.in @@ -703,10 +772,12 @@ install-dbus_daemon_execPROGRAMS: $(dbus_daemon_exec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -727,7 +798,8 @@ uninstall-dbus_daemon_execPROGRAMS: @list='$(dbus_daemon_exec_PROGRAMS)'; test -n "$(dbus_daemon_execdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(dbus_daemon_execdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(dbus_daemon_execdir)" && rm -f $$files @@ -749,10 +821,12 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -773,7 +847,8 @@ uninstall-libexecPROGRAMS: @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files @@ -795,24 +870,30 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -bus-test$(EXEEXT): $(bus_test_OBJECTS) $(bus_test_DEPENDENCIES) $(EXTRA_bus_test_DEPENDENCIES) - @rm -f bus-test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bus_test_OBJECTS) $(bus_test_LDADD) $(LIBS) -bus-test-launch-helper$(EXEEXT): $(bus_test_launch_helper_OBJECTS) $(bus_test_launch_helper_DEPENDENCIES) $(EXTRA_bus_test_launch_helper_DEPENDENCIES) - @rm -f bus-test-launch-helper$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bus_test_launch_helper_OBJECTS) $(bus_test_launch_helper_LDADD) $(LIBS) -bus-test-system$(EXEEXT): $(bus_test_system_OBJECTS) $(bus_test_system_DEPENDENCIES) $(EXTRA_bus_test_system_DEPENDENCIES) - @rm -f bus-test-system$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(bus_test_system_OBJECTS) $(bus_test_system_LDADD) $(LIBS) + dbus-daemon$(EXEEXT): $(dbus_daemon_OBJECTS) $(dbus_daemon_DEPENDENCIES) $(EXTRA_dbus_daemon_DEPENDENCIES) @rm -f dbus-daemon$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_daemon_OBJECTS) $(dbus_daemon_LDADD) $(LIBS) + dbus-daemon-launch-helper$(EXEEXT): $(dbus_daemon_launch_helper_OBJECTS) $(dbus_daemon_launch_helper_DEPENDENCIES) $(EXTRA_dbus_daemon_launch_helper_DEPENDENCIES) @rm -f dbus-daemon-launch-helper$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_daemon_launch_helper_OBJECTS) $(dbus_daemon_launch_helper_LDADD) $(LIBS) + dbus-daemon-launch-helper-test$(EXEEXT): $(dbus_daemon_launch_helper_test_OBJECTS) $(dbus_daemon_launch_helper_test_DEPENDENCIES) $(EXTRA_dbus_daemon_launch_helper_test_DEPENDENCIES) @rm -f dbus-daemon-launch-helper-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_daemon_launch_helper_test_OBJECTS) $(dbus_daemon_launch_helper_test_LDADD) $(LIBS) + +test-bus$(EXEEXT): $(test_bus_OBJECTS) $(test_bus_DEPENDENCIES) $(EXTRA_test_bus_DEPENDENCIES) + @rm -f test-bus$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bus_OBJECTS) $(test_bus_LDADD) $(LIBS) + +test-bus-launch-helper$(EXEEXT): $(test_bus_launch_helper_OBJECTS) $(test_bus_launch_helper_DEPENDENCIES) $(EXTRA_test_bus_launch_helper_DEPENDENCIES) + @rm -f test-bus-launch-helper$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bus_launch_helper_OBJECTS) $(test_bus_launch_helper_LDADD) $(LIBS) + +test-bus-system$(EXEEXT): $(test_bus_system_OBJECTS) $(test_bus_system_DEPENDENCIES) $(EXTRA_test_bus_system_DEPENDENCIES) + @rm -f test-bus-system$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_bus_system_OBJECTS) $(test_bus_system_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -894,13 +975,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activation-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activation.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-activation-helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-loader-expat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-parser-common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-desktop-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-loader-expat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser-trivial.Po@am__quote@ @@ -929,6 +1003,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-system.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-activation-helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-config-loader-expat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-config-parser-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-desktop-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-test-launch-helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_bus_launch_helper-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ .c.o: @@ -936,14 +1017,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -952,104 +1033,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -bus_test_launch_helper-test-launch-helper.o: test-launch-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-test-launch-helper.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo -c -o bus_test_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='bus_test_launch_helper-test-launch-helper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c - -bus_test_launch_helper-test-launch-helper.obj: test-launch-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-test-launch-helper.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo -c -o bus_test_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='bus_test_launch_helper-test-launch-helper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` - -bus_test_launch_helper-config-loader-expat.o: config-loader-expat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-loader-expat.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo -c -o bus_test_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='bus_test_launch_helper-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c - -bus_test_launch_helper-config-loader-expat.obj: config-loader-expat.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo -c -o bus_test_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Tpo $(DEPDIR)/bus_test_launch_helper-config-loader-expat.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='bus_test_launch_helper-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` - -bus_test_launch_helper-config-parser-common.o: config-parser-common.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-common.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo -c -o bus_test_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='bus_test_launch_helper-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c - -bus_test_launch_helper-config-parser-common.obj: config-parser-common.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-common.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo -c -o bus_test_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-common.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-common.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='bus_test_launch_helper-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` - -bus_test_launch_helper-config-parser-trivial.o: config-parser-trivial.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-trivial.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo -c -o bus_test_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='bus_test_launch_helper-config-parser-trivial.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c - -bus_test_launch_helper-config-parser-trivial.obj: config-parser-trivial.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-config-parser-trivial.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo -c -o bus_test_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/bus_test_launch_helper-config-parser-trivial.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='bus_test_launch_helper-config-parser-trivial.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` - -bus_test_launch_helper-desktop-file.o: desktop-file.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-desktop-file.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo -c -o bus_test_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo $(DEPDIR)/bus_test_launch_helper-desktop-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='bus_test_launch_helper-desktop-file.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c - -bus_test_launch_helper-desktop-file.obj: desktop-file.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-desktop-file.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo -c -o bus_test_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-desktop-file.Tpo $(DEPDIR)/bus_test_launch_helper-desktop-file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='bus_test_launch_helper-desktop-file.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` - -bus_test_launch_helper-utils.o: utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-utils.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-utils.Tpo -c -o bus_test_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-utils.Tpo $(DEPDIR)/bus_test_launch_helper-utils.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='bus_test_launch_helper-utils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c - -bus_test_launch_helper-utils.obj: utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-utils.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-utils.Tpo -c -o bus_test_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-utils.Tpo $(DEPDIR)/bus_test_launch_helper-utils.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='bus_test_launch_helper-utils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` - -bus_test_launch_helper-activation-helper.o: activation-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-activation-helper.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo -c -o bus_test_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo $(DEPDIR)/bus_test_launch_helper-activation-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='bus_test_launch_helper-activation-helper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c - -bus_test_launch_helper-activation-helper.obj: activation-helper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-activation-helper.obj -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo -c -o bus_test_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-activation-helper.Tpo $(DEPDIR)/bus_test_launch_helper-activation-helper.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='bus_test_launch_helper-activation-helper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` - dbus_daemon_launch_helper_test-activation-helper-bin.o: activation-helper-bin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper_test-activation-helper-bin.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Tpo -c -o dbus_daemon_launch_helper_test-activation-helper-bin.o `test -f 'activation-helper-bin.c' || echo '$(srcdir)/'`activation-helper-bin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Tpo $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Po @@ -1148,6 +1131,104 @@ dbus_daemon_launch_helper_test-activation-helper.obj: activation-helper.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper_test-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` +test_bus_launch_helper-test-launch-helper.o: test-launch-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-test-launch-helper.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo -c -o test_bus_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='test_bus_launch_helper-test-launch-helper.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c + +test_bus_launch_helper-test-launch-helper.obj: test-launch-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-test-launch-helper.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo -c -o test_bus_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Tpo $(DEPDIR)/test_bus_launch_helper-test-launch-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-launch-helper.c' object='test_bus_launch_helper-test-launch-helper.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-test-launch-helper.obj `if test -f 'test-launch-helper.c'; then $(CYGPATH_W) 'test-launch-helper.c'; else $(CYGPATH_W) '$(srcdir)/test-launch-helper.c'; fi` + +test_bus_launch_helper-config-loader-expat.o: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-loader-expat.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo -c -o test_bus_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='test_bus_launch_helper-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c + +test_bus_launch_helper-config-loader-expat.obj: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo -c -o test_bus_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Tpo $(DEPDIR)/test_bus_launch_helper-config-loader-expat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-loader-expat.c' object='test_bus_launch_helper-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` + +test_bus_launch_helper-config-parser-common.o: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-common.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo -c -o test_bus_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='test_bus_launch_helper-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c + +test_bus_launch_helper-config-parser-common.obj: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-common.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo -c -o test_bus_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-common.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-common.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-common.c' object='test_bus_launch_helper-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` + +test_bus_launch_helper-config-parser-trivial.o: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-trivial.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo -c -o test_bus_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='test_bus_launch_helper-config-parser-trivial.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c + +test_bus_launch_helper-config-parser-trivial.obj: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-config-parser-trivial.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo -c -o test_bus_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/test_bus_launch_helper-config-parser-trivial.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config-parser-trivial.c' object='test_bus_launch_helper-config-parser-trivial.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` + +test_bus_launch_helper-desktop-file.o: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-desktop-file.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo -c -o test_bus_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo $(DEPDIR)/test_bus_launch_helper-desktop-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='test_bus_launch_helper-desktop-file.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c + +test_bus_launch_helper-desktop-file.obj: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-desktop-file.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo -c -o test_bus_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-desktop-file.Tpo $(DEPDIR)/test_bus_launch_helper-desktop-file.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desktop-file.c' object='test_bus_launch_helper-desktop-file.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` + +test_bus_launch_helper-utils.o: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-utils.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-utils.Tpo -c -o test_bus_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-utils.Tpo $(DEPDIR)/test_bus_launch_helper-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='test_bus_launch_helper-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c + +test_bus_launch_helper-utils.obj: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-utils.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-utils.Tpo -c -o test_bus_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-utils.Tpo $(DEPDIR)/test_bus_launch_helper-utils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils.c' object='test_bus_launch_helper-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` + +test_bus_launch_helper-activation-helper.o: activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-activation-helper.o -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo -c -o test_bus_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo $(DEPDIR)/test_bus_launch_helper-activation-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='test_bus_launch_helper-activation-helper.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c + +test_bus_launch_helper-activation-helper.obj: activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_bus_launch_helper-activation-helper.obj -MD -MP -MF $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo -c -o test_bus_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_bus_launch_helper-activation-helper.Tpo $(DEPDIR)/test_bus_launch_helper-activation-helper.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='activation-helper.c' object='test_bus_launch_helper-activation-helper.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_bus_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_bus_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -1195,6 +1276,27 @@ uninstall-configDATA: @list='$(config_DATA)'; test -n "$(configdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(configdir)'; $(am__uninstall_files_from_dir) +install-examplesDATA: $(examples_DATA) + @$(NORMAL_INSTALL) + @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ + done + +uninstall-examplesDATA: + @$(NORMAL_UNINSTALL) + @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) install-systemdsystemunitDATA: $(systemdsystemunit_DATA) @$(NORMAL_INSTALL) @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ @@ -1217,26 +1319,15 @@ uninstall-systemdsystemunitDATA: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1248,15 +1339,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1265,6 +1352,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1303,7 +1405,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(dbus_daemon_execdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initddir)" "$(DESTDIR)$(agentdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(systemdsystemunitdir)"; do \ + for dir in "$(DESTDIR)$(dbus_daemon_execdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initddir)" "$(DESTDIR)$(agentdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(systemdsystemunitdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1362,7 +1464,8 @@ info: info-am info-am: install-data-am: install-agentDATA install-configDATA \ - install-initdSCRIPTS install-systemdsystemunitDATA + install-examplesDATA install-initdSCRIPTS \ + install-systemdsystemunitDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am @@ -1413,31 +1516,32 @@ ps-am: uninstall-am: uninstall-agentDATA uninstall-binSCRIPTS \ uninstall-configDATA uninstall-dbus_daemon_execPROGRAMS \ - uninstall-initdSCRIPTS uninstall-libexecPROGRAMS \ - uninstall-systemdsystemunitDATA + uninstall-examplesDATA uninstall-initdSCRIPTS \ + uninstall-libexecPROGRAMS uninstall-systemdsystemunitDATA .MAKE: install-am install-data-am install-exec-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-dbus_daemon_execPROGRAMS clean-generic \ clean-libexecPROGRAMS clean-libtool clean-local \ - clean-noinstPROGRAMS ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-agentDATA \ - install-am install-binSCRIPTS install-configDATA install-data \ - install-data-am install-data-hook \ - install-dbus_daemon_execPROGRAMS install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-initdSCRIPTS install-libexecPROGRAMS install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-systemdsystemunitDATA installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-agentDATA uninstall-am \ - uninstall-binSCRIPTS uninstall-configDATA \ - uninstall-dbus_daemon_execPROGRAMS uninstall-initdSCRIPTS \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-agentDATA install-am install-binSCRIPTS \ + install-configDATA install-data install-data-am \ + install-data-hook install-dbus_daemon_execPROGRAMS install-dvi \ + install-dvi-am install-examplesDATA install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-initdSCRIPTS \ + install-libexecPROGRAMS install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip \ + install-systemdsystemunitDATA installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-agentDATA uninstall-am uninstall-binSCRIPTS \ + uninstall-configDATA uninstall-dbus_daemon_execPROGRAMS \ + uninstall-examplesDATA uninstall-initdSCRIPTS \ uninstall-libexecPROGRAMS uninstall-systemdsystemunitDATA @@ -1445,11 +1549,11 @@ clean-local: /bin/rm *.bb *.bbg *.da *.gcov || true install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus - $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services - $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services +@DBUS_UNIX_TRUE@ $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus +@DBUS_UNIX_TRUE@ $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d +@DBUS_UNIX_TRUE@ $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services # Install dbus.socket as default implementation of a D-Bus stack. # Deliberately not using $(LN_S) here: ln -fs is not universally portable, # but neither is systemd, so it's OK to assume here that ln complies with SUS. diff --git a/bus/activation.c b/bus/activation.c index 868ce05c..bdf9cf3d 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -637,7 +637,7 @@ update_directory (BusActivation *activation, if (!_dbus_string_ends_with_c_str (&filename, ".service")) { - _dbus_verbose ("Skipping non-.service file %s\n", + _dbus_verbose ("Skipping non-.service file '%s'\n", _dbus_string_get_const_data (&filename)); continue; } @@ -1044,7 +1044,7 @@ restore_pending (void *data) } static void -free_pending_restore_data (void *data) +free_restore_pending_data (void *data) { RestorePendingData *d = data; @@ -1074,9 +1074,9 @@ add_restore_pending_to_transaction (BusTransaction *transaction, if (d->hash_entry == NULL || !bus_transaction_add_cancel_hook (transaction, restore_pending, d, - free_pending_restore_data)) + free_restore_pending_data)) { - free_pending_restore_data (d); + free_restore_pending_data (d); return FALSE; } @@ -1162,14 +1162,11 @@ bus_activation_service_created (BusActivation *activation, dbus_bool_t bus_activation_send_pending_auto_activation_messages (BusActivation *activation, BusService *service, - BusTransaction *transaction, - DBusError *error) + BusTransaction *transaction) { BusPendingActivation *pending_activation; DBusList *link; - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - /* Check if it's a pending activation */ pending_activation = _dbus_hash_table_lookup_string (activation->pending_activations, bus_service_get_name (service)); @@ -1186,6 +1183,9 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation if (entry->auto_activation && (entry->connection == NULL || dbus_connection_get_is_connected (entry->connection))) { DBusConnection *addressed_recipient; + DBusError error; + + dbus_error_init (&error); addressed_recipient = bus_service_get_primary_owners_connection (service); @@ -1193,8 +1193,22 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation if (!bus_dispatch_matches (transaction, entry->connection, addressed_recipient, - entry->activation_message, error)) - goto error; + entry->activation_message, &error)) + { + /* If permission is denied, we just want to return the error + * to the original method invoker; in particular, we don't + * want to make the RequestName call fail with that error + * (see fd.o #78979, CVE-2014-3477). */ + if (!bus_transaction_send_error_reply (transaction, entry->connection, + &error, entry->activation_message)) + { + bus_connection_send_oom_error (entry->connection, + entry->activation_message); + } + + link = next; + continue; + } } link = next; @@ -1203,7 +1217,6 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation if (!add_restore_pending_to_transaction (transaction, pending_activation)) { _dbus_verbose ("Could not add cancel hook to transaction to revert removing pending activation\n"); - BUS_SET_OOM (error); goto error; } @@ -2186,7 +2199,7 @@ bus_activation_list_services (BusActivation *activation, error: for (j = 0; j < i; j++) - dbus_free (retval[i]); + dbus_free (retval[j]); dbus_free (retval); return FALSE; diff --git a/bus/activation.h b/bus/activation.h index 97f25b1f..fc5d426f 100644 --- a/bus/activation.h +++ b/bus/activation.h @@ -62,8 +62,7 @@ dbus_bool_t dbus_activation_systemd_failure (BusActivation *activation, dbus_bool_t bus_activation_send_pending_auto_activation_messages (BusActivation *activation, BusService *service, - BusTransaction *transaction, - DBusError *error); + BusTransaction *transaction); #endif /* BUS_ACTIVATION_H */ @@ -39,6 +39,7 @@ #include <dbus/dbus-hash.h> #include <dbus/dbus-credentials.h> #include <dbus/dbus-internals.h> +#include <dbus/dbus-server-protected.h> #ifdef DBUS_CYGWIN #include <signal.h> @@ -68,6 +69,7 @@ struct BusContext unsigned int keep_umask : 1; unsigned int allow_anonymous : 1; unsigned int systemd_activation : 1; + dbus_bool_t watches_enabled; }; static dbus_int32_t server_data_slot = -1; @@ -526,6 +528,18 @@ process_config_every_time (BusContext *context, context->policy = bus_config_parser_steal_policy (parser); _dbus_assert (context->policy != NULL); + /* context->connections is NULL when creating new BusContext */ + if (context->connections) + { + _dbus_verbose ("Reload policy rules for completed connections\n"); + retval = bus_connections_reload_policy (context->connections, error); + if (!retval) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto failed; + } + } + /* We have to build the address backward, so that * <listen> later in the config file have priority */ @@ -746,6 +760,8 @@ bus_context_new (const DBusString *config_file, goto failed; } + context->watches_enabled = TRUE; + context->registry = bus_registry_new (context); if (context->registry == NULL) { @@ -894,7 +910,7 @@ bus_context_new (const DBusString *config_file, if (!bus_selinux_full_init ()) { - bus_context_log (context, DBUS_SYSTEM_LOG_FATAL, "SELinux enabled but AVC initialization failed; check system log\n"); + bus_context_log (context, DBUS_SYSTEM_LOG_FATAL, "SELinux enabled but D-Bus initialization failed; check system log\n"); } if (!process_config_postinit (context, parser, error)) @@ -1225,6 +1241,12 @@ bus_context_get_auth_timeout (BusContext *context) } int +bus_context_get_pending_fd_timeout (BusContext *context) +{ + return context->limits.pending_fd_timeout; +} + +int bus_context_get_max_completed_connections (BusContext *context) { return context->limits.max_completed_connections; @@ -1646,3 +1668,36 @@ bus_context_check_security_policy (BusContext *context, _dbus_verbose ("security policy allowing message\n"); return TRUE; } + +void +bus_context_check_all_watches (BusContext *context) +{ + DBusList *link; + dbus_bool_t enabled = TRUE; + + if (bus_connections_get_n_incomplete (context->connections) >= + bus_context_get_max_incomplete_connections (context)) + { + enabled = FALSE; + } + + if (context->watches_enabled == enabled) + return; + + context->watches_enabled = enabled; + + for (link = _dbus_list_get_first_link (&context->servers); + link != NULL; + link = _dbus_list_get_next_link (&context->servers, link)) + { + /* A BusContext might contains several DBusServer (if there are + * several <listen> configuration items) and a DBusServer might + * contain several DBusWatch in its DBusWatchList (if getaddrinfo + * returns several addresses on a dual IPv4-IPv6 stack or if + * systemd passes several fds). + * We want to enable/disable them all. + */ + DBusServer *server = link->data; + _dbus_server_toggle_all_watches (server, enabled); + } +} @@ -54,6 +54,7 @@ typedef struct long max_message_unix_fds; /**< Max number of unix fds of a single message*/ int activation_timeout; /**< How long to wait for an activation to time out */ int auth_timeout; /**< How long to wait for an authentication to time out */ + int pending_fd_timeout; /**< How long to wait for a D-Bus message with a fd to time out */ int max_completed_connections; /**< Max number of authorized connections */ int max_incomplete_connections; /**< Max number of incomplete connections */ int max_connections_per_user; /**< Max number of connections auth'd as same user */ @@ -106,6 +107,7 @@ BusClientPolicy* bus_context_create_client_policy (BusContext DBusError *error); int bus_context_get_activation_timeout (BusContext *context); int bus_context_get_auth_timeout (BusContext *context); +int bus_context_get_pending_fd_timeout (BusContext *context); int bus_context_get_max_completed_connections (BusContext *context); int bus_context_get_max_incomplete_connections (BusContext *context); int bus_context_get_max_connections_per_user (BusContext *context); @@ -125,5 +127,6 @@ dbus_bool_t bus_context_check_security_policy (BusContext DBusConnection *proposed_recipient, DBusMessage *message, DBusError *error); +void bus_context_check_all_watches (BusContext *context); #endif /* BUS_BUS_H */ diff --git a/bus/config-parser.c b/bus/config-parser.c index 12a2d2e7..7bc9c019 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -318,6 +318,9 @@ merge_included (BusConfigParser *parser, if (included->keep_umask) parser->keep_umask = TRUE; + if (included->allow_anonymous) + parser->allow_anonymous = TRUE; + if (included->pidfile != NULL) { dbus_free (parser->pidfile); @@ -435,7 +438,12 @@ bus_config_parser_new (const DBusString *basedir, * and legitimate auth will fail. If interactive auth (ask user for * password) is allowed, then potentially it has to be quite long. */ - parser->limits.auth_timeout = 30000; /* 30 seconds */ + parser->limits.auth_timeout = 5000; /* 5 seconds */ + + /* Do not allow a fd to stay forever in dbus-daemon + * https://bugs.freedesktop.org/show_bug.cgi?id=80559 + */ + parser->limits.pending_fd_timeout = 150000; /* 2.5 minutes */ parser->limits.max_incomplete_connections = 64; parser->limits.max_connections_per_user = 256; @@ -464,7 +472,7 @@ bus_config_parser_new (const DBusString *basedir, /* this is effectively a limit on message queue size for messages * that require a reply */ - parser->limits.max_replies_per_connection = 1024*8; + parser->limits.max_replies_per_connection = 128; } parser->refcount = 1; @@ -1899,6 +1907,12 @@ set_limit (BusConfigParser *parser, must_be_int = TRUE; parser->limits.auth_timeout = value; } + else if (strcmp (name, "pending_fd_timeout") == 0) + { + must_be_positive = TRUE; + must_be_int = TRUE; + parser->limits.pending_fd_timeout = value; + } else if (strcmp (name, "reply_timeout") == 0) { must_be_positive = TRUE; @@ -3105,6 +3119,7 @@ limits_equal (const BusLimits *a, || a->max_message_unix_fds == b->max_message_unix_fds || a->activation_timeout == b->activation_timeout || a->auth_timeout == b->auth_timeout + || a->pending_fd_timeout == b->pending_fd_timeout || a->max_completed_connections == b->max_completed_connections || a->max_incomplete_connections == b->max_incomplete_connections || a->max_connections_per_user == b->max_connections_per_user diff --git a/bus/connection.c b/bus/connection.c index fddbc78a..519122c5 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -33,6 +33,7 @@ #include <dbus/dbus-list.h> #include <dbus/dbus-hash.h> #include <dbus/dbus-timeout.h> +#include <dbus/dbus-connection-internal.h> /* Trim executed commands to this length; we want to keep logs readable */ #define MAX_LOG_COMMAND_LEN 50 @@ -102,6 +103,8 @@ typedef struct int peak_match_rules; int peak_bus_names; #endif + int n_pending_unix_fds; + DBusTimeout *pending_unix_fds_timeout; } BusConnectionData; static dbus_bool_t bus_pending_reply_expired (BusExpireList *list, @@ -268,6 +271,15 @@ bus_connection_disconnected (DBusConnection *connection) dbus_connection_set_dispatch_status_function (connection, NULL, NULL, NULL); + + if (d->pending_unix_fds_timeout) + { + _dbus_loop_remove_timeout (bus_context_get_loop (d->connections->context), + d->pending_unix_fds_timeout); + _dbus_timeout_unref (d->pending_unix_fds_timeout); + } + d->pending_unix_fds_timeout = NULL; + _dbus_connection_set_pending_fds_function (connection, NULL, NULL); bus_connection_remove_transactions (connection); @@ -293,6 +305,10 @@ bus_connection_disconnected (DBusConnection *connection) _dbus_list_remove_link (&d->connections->incomplete, d->link_in_connection_list); d->link_in_connection_list = NULL; d->connections->n_incomplete -= 1; + + /* If we have dropped below the max. number of incomplete + * connections, start accept()ing again */ + bus_context_check_all_watches (d->connections->context); } _dbus_assert (d->connections->n_incomplete >= 0); @@ -588,6 +604,42 @@ oom: return FALSE; } +static void +check_pending_fds_cb (DBusConnection *connection) +{ + BusConnectionData *d = BUS_CONNECTION_DATA (connection); + int n_pending_unix_fds_old = d->n_pending_unix_fds; + int n_pending_unix_fds_new; + + n_pending_unix_fds_new = _dbus_connection_get_pending_fds_count (connection); + + _dbus_verbose ("Pending fds count changed on connection %p: %d -> %d\n", + connection, n_pending_unix_fds_old, n_pending_unix_fds_new); + + if (n_pending_unix_fds_old == 0 && n_pending_unix_fds_new > 0) + { + _dbus_timeout_set_interval (d->pending_unix_fds_timeout, + bus_context_get_pending_fd_timeout (d->connections->context)); + _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, TRUE); + } + + if (n_pending_unix_fds_old > 0 && n_pending_unix_fds_new == 0) + { + _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, FALSE); + } + + + d->n_pending_unix_fds = n_pending_unix_fds_new; +} + +static dbus_bool_t +pending_unix_fds_timeout_cb (void *data) +{ + DBusConnection *connection = data; + dbus_connection_close (connection); + return TRUE; +} + dbus_bool_t bus_connections_setup_connection (BusConnections *connections, DBusConnection *connection) @@ -683,36 +735,38 @@ bus_connections_setup_connection (BusConnections *connections, } } + /* Setup pending fds timeout (see #80559) */ + d->pending_unix_fds_timeout = _dbus_timeout_new (100, /* irrelevant */ + pending_unix_fds_timeout_cb, + connection, NULL); + if (d->pending_unix_fds_timeout == NULL) + goto out; + + _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, FALSE); + if (!_dbus_loop_add_timeout (bus_context_get_loop (connections->context), + d->pending_unix_fds_timeout)) + goto out; + + _dbus_connection_set_pending_fds_function (connection, + (DBusPendingFdsChangeFunction) check_pending_fds_cb, + connection); + _dbus_list_append_link (&connections->incomplete, d->link_in_connection_list); connections->n_incomplete += 1; dbus_connection_ref (connection); - /* Note that we might disconnect ourselves here, but it only takes - * effect on return to the main loop. We call this to free up - * expired connections if possible, and to queue the timeout for our - * own expiration. - */ bus_connections_expire_incomplete (connections); - /* And we might also disconnect ourselves here, but again it - * only takes effect on return to main loop. - */ - if (connections->n_incomplete > - bus_context_get_max_incomplete_connections (connections->context)) - { - _dbus_verbose ("Number of incomplete connections exceeds max, dropping oldest one\n"); - - _dbus_assert (connections->incomplete != NULL); - /* Disconnect the oldest unauthenticated connection. FIXME - * would it be more secure to drop a *random* connection? This - * algorithm seems to mean that if someone can create new - * connections quickly enough, they can keep anyone else from - * completing authentication. But random may or may not really - * help with that, a more elaborate solution might be required. - */ - dbus_connection_close (connections->incomplete->data); - } + /* The listening socket is removed from the main loop, + * i.e. does not accept(), while n_incomplete is at its + * maximum value; so we shouldn't get here in that case */ + _dbus_assert (connections->n_incomplete <= + bus_context_get_max_incomplete_connections (connections->context)); + + /* If we have the maximum number of incomplete connections, + * stop accept()ing any more, to avert a DoS. See fd.o #80919 */ + bus_context_check_all_watches (d->connections->context); retval = TRUE; @@ -744,6 +798,13 @@ bus_connections_setup_connection (BusConnections *connections, dbus_connection_set_dispatch_status_function (connection, NULL, NULL, NULL); + if (d->pending_unix_fds_timeout) + _dbus_timeout_unref (d->pending_unix_fds_timeout); + + d->pending_unix_fds_timeout = NULL; + + _dbus_connection_set_pending_fds_function (connection, NULL, NULL); + if (d->link_in_connection_list != NULL) { _dbus_assert (d->link_in_connection_list->next == NULL); @@ -1419,6 +1480,10 @@ bus_connection_complete (DBusConnection *connection, _dbus_assert (d->connections->n_incomplete >= 0); _dbus_assert (d->connections->n_completed > 0); + /* If we have dropped below the max. number of incomplete + * connections, start accept()ing again */ + bus_context_check_all_watches (d->connections->context); + /* See if we can remove the timeout */ bus_connections_expire_incomplete (d->connections); @@ -1435,6 +1500,42 @@ fail: return FALSE; } +dbus_bool_t +bus_connections_reload_policy (BusConnections *connections, + DBusError *error) +{ + BusConnectionData *d; + DBusConnection *connection; + DBusList *link; + + _dbus_assert (connections != NULL); + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + for (link = _dbus_list_get_first_link (&(connections->completed)); + link; + link = _dbus_list_get_next_link (&(connections->completed), link)) + { + connection = link->data; + d = BUS_CONNECTION_DATA (connection); + _dbus_assert (d != NULL); + _dbus_assert (d->policy != NULL); + + bus_client_policy_unref (d->policy); + d->policy = bus_context_create_client_policy (connections->context, + connection, + error); + if (d->policy == NULL) + { + _dbus_verbose ("Failed to create security policy for connection %p\n", + connection); + _DBUS_ASSERT_ERROR_IS_SET (error); + return FALSE; + } + } + + return TRUE; +} + const char * bus_connection_get_name (DBusConnection *connection) { @@ -1990,12 +2091,6 @@ bus_transaction_get_context (BusTransaction *transaction) return transaction->context; } -BusConnections* -bus_transaction_get_connections (BusTransaction *transaction) -{ - return bus_context_get_connections (transaction->context); -} - dbus_bool_t bus_transaction_send_from_driver (BusTransaction *transaction, DBusConnection *connection, @@ -2318,7 +2413,6 @@ bus_transaction_add_cancel_hook (BusTransaction *transaction, return TRUE; } -#ifdef DBUS_ENABLE_STATS int bus_connections_get_n_active (BusConnections *connections) { @@ -2331,6 +2425,7 @@ bus_connections_get_n_incomplete (BusConnections *connections) return connections->n_incomplete; } +#ifdef DBUS_ENABLE_STATS int bus_connections_get_total_match_rules (BusConnections *connections) { diff --git a/bus/connection.h b/bus/connection.h index c9360212..6fbcd38d 100644 --- a/bus/connection.h +++ b/bus/connection.h @@ -45,6 +45,8 @@ void bus_connections_foreach_active (BusConnections void *data); BusContext* bus_connections_get_context (BusConnections *connections); void bus_connections_increment_stamp (BusConnections *connections); +dbus_bool_t bus_connections_reload_policy (BusConnections *connections, + DBusError *error); BusContext* bus_connection_get_context (DBusConnection *connection); BusConnections* bus_connection_get_connections (DBusConnection *connection); BusRegistry* bus_connection_get_registry (DBusConnection *connection); @@ -120,7 +122,6 @@ typedef void (* BusTransactionCancelFunction) (void *data); BusTransaction* bus_transaction_new (BusContext *context); BusContext* bus_transaction_get_context (BusTransaction *transaction); -BusConnections* bus_transaction_get_connections (BusTransaction *transaction); dbus_bool_t bus_transaction_send (BusTransaction *transaction, DBusConnection *connection, DBusMessage *message); @@ -138,9 +139,10 @@ dbus_bool_t bus_transaction_add_cancel_hook (BusTransaction * void *data, DBusFreeFunction free_data_function); -/* called by stats.c, only present if DBUS_ENABLE_STATS */ int bus_connections_get_n_active (BusConnections *connections); int bus_connections_get_n_incomplete (BusConnections *connections); + +/* called by stats.c, only present if DBUS_ENABLE_STATS */ int bus_connections_get_total_match_rules (BusConnections *connections); int bus_connections_get_peak_match_rules (BusConnections *connections); int bus_connections_get_peak_match_rules_per_conn (BusConnections *connections); diff --git a/bus/dbus.service.in b/bus/dbus.service.in index 1b0bbb29..3bc4726a 100644 --- a/bus/dbus.service.in +++ b/bus/dbus.service.in @@ -1,5 +1,6 @@ [Unit] Description=D-Bus System Message Bus +Documentation=man:dbus-daemon(1) Requires=dbus.socket [Service] diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index 49ebc721..ce19fdc8 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -38,6 +38,7 @@ #include <dbus/dbus-internals.h> #include <dbus/dbus-list.h> +#include <dbus/dbus-sysdeps-unix.h> #include <dbus/dbus-watch.h> #include "dir-watch.h" @@ -236,6 +237,11 @@ _init_inotify (BusContext *context) _dbus_warn ("Cannot initialize inotify\n"); goto out; } + + /* In the inotify_init1 case this is unnecessary but harmless, + * in the other cases it's necessary */ + _dbus_fd_set_close_on_exec (inotify_fd); + loop = bus_context_get_loop (context); _dbus_loop_ref (loop); diff --git a/bus/dir-watch-kqueue.c b/bus/dir-watch-kqueue.c index c60560f0..c05a5997 100644 --- a/bus/dir-watch-kqueue.c +++ b/bus/dir-watch-kqueue.c @@ -73,12 +73,12 @@ _handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data) { kq = -1; if (watch != NULL) - { - _dbus_loop_remove_watch (loop, watch); + { + _dbus_loop_remove_watch (loop, watch); _dbus_watch_invalidate (watch); _dbus_watch_unref (watch); - watch = NULL; - } + watch = NULL; + } pid = getpid (); _dbus_verbose ("Sending SIGHUP signal since kqueue has been closed\n"); (void) kill (pid, SIGHUP); @@ -87,11 +87,49 @@ _handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data) return TRUE; } +static void _shutdown_kqueue (void *data) +{ + int i; + + if (kq < 0) + return; + + for (i = 0; i < MAX_DIRS_TO_WATCH; i++) + { + if (fds[i] >= 0) + { + close (fds[i]); + fds[i] = -1; + } + if (dirs[i] != NULL) + { + /* dbus_free() is necessary to pass memleak check */ + dbus_free (dirs[i]); + dirs[i] = NULL; + } + } + + if (loop) + { + _dbus_loop_remove_watch (loop, watch); + _dbus_loop_unref (loop); + loop = NULL; + } + + if (watch) + { + _dbus_watch_invalidate (watch); + _dbus_watch_unref (watch); + watch = NULL; + } + + close (kq); + kq = -1; +} + static int _init_kqueue (BusContext *context) { - int ret = 0; - if (kq < 0) { @@ -99,38 +137,61 @@ _init_kqueue (BusContext *context) if (kq < 0) { _dbus_warn ("Cannot create kqueue; error '%s'\n", _dbus_strerror (errno)); - goto out; - } - - loop = bus_context_get_loop (context); - - watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE, - _handle_kqueue_watch, NULL, NULL); - - if (watch == NULL) - { - _dbus_warn ("Unable to create kqueue watch\n"); - close (kq); - kq = -1; - goto out; - } - - if (!_dbus_loop_add_watch (loop, watch)) - { - _dbus_warn ("Unable to add reload watch to main loop"); - _dbus_watch_invalidate (watch); - _dbus_watch_unref (watch); - watch = NULL; - close (kq); - kq = -1; - goto out; - } + goto out; + } + + loop = bus_context_get_loop (context); + _dbus_loop_ref (loop); + + watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE, + _handle_kqueue_watch, NULL, NULL); + + if (watch == NULL) + { + _dbus_warn ("Unable to create kqueue watch\n"); + goto out1; + } + + if (!_dbus_loop_add_watch (loop, watch)) + { + _dbus_warn ("Unable to add reload watch to main loop"); + goto out2; + } + + if (!_dbus_register_shutdown_func (_shutdown_kqueue, NULL)) + { + _dbus_warn ("Unable to register shutdown function"); + goto out3; + } + } + + return 1; + +out3: + _dbus_loop_remove_watch (loop, watch); + +out2: + if (watch) + { + _dbus_watch_invalidate (watch); + _dbus_watch_unref (watch); + watch = NULL; } - ret = 1; +out1: + if (kq >= 0) + { + close (kq); + kq = -1; + } + if (loop) + { + _dbus_loop_unref (loop); + loop = NULL; + } out: - return ret; + return 0; } void @@ -141,6 +202,9 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) DBusList *link; int i, j, fd; struct kevent ev; +#ifdef O_CLOEXEC + dbus_bool_t cloexec_done = 0; +#endif if (!_init_kqueue (context)) goto out; @@ -169,12 +233,12 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) if (dirs[j] && strcmp (new_dirs[i], dirs[j]) == 0) { new_fds[i] = fds[j]; - new_dirs[i] = dirs[j]; - fds[j] = -1; - dirs[j] = NULL; - break; - } - } + new_dirs[i] = dirs[j]; + fds[j] = -1; + dirs[j] = NULL; + break; + } + } } /* Any directory we find in "fds" with a nonzero fd must @@ -185,10 +249,10 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) if (fds[j] != -1) { close (fds[j]); - dbus_free (dirs[j]); - fds[j] = -1; - dirs[j] = NULL; - } + dbus_free (dirs[j]); + fds[j] = -1; + dirs[j] = NULL; + } } for (i = 0; new_dirs[i]; i++) @@ -196,9 +260,17 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) if (new_fds[i] == -1) { /* FIXME - less lame error handling for failing to add a watch; - * we may need to sleep. - */ - fd = open (new_dirs[i], O_RDONLY); + * we may need to sleep. + */ +#ifdef O_CLOEXEC + fd = open (new_dirs[i], O_RDONLY | O_CLOEXEC); + cloexec_done = (fd >= 0); + + if (fd < 0 && errno == EINVAL) +#endif + { + fd = open (new_dirs[i], O_RDONLY); + } if (fd < 0) { if (errno != ENOENT) @@ -213,6 +285,12 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) continue; } } +#ifdef O_CLOEXEC + if (!cloexec_done) +#endif + { + _dbus_fd_set_close_on_exec (fd); + } EV_SET (&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME, 0, 0); @@ -223,18 +301,18 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) goto out; } - new_fds[i] = fd; - new_dirs[i] = _dbus_strdup (new_dirs[i]); - if (!new_dirs[i]) + new_fds[i] = fd; + new_dirs[i] = _dbus_strdup (new_dirs[i]); + if (!new_dirs[i]) { /* FIXME have less lame handling for OOM, we just silently fail to - * watch. (In reality though, the whole OOM handling in dbus is - * stupid but we won't go into that in this comment =) ) - */ + * watch. (In reality though, the whole OOM handling in dbus is + * stupid but we won't go into that in this comment =) ) + */ close (fd); - new_fds[i] = -1; - } - } + new_fds[i] = -1; + } + } } num_fds = i; diff --git a/bus/dispatch.c b/bus/dispatch.c index 5fc0d112..fa2cc968 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -133,7 +133,7 @@ bus_dispatch_matches (BusTransaction *transaction, } /* Now dispatch to others who look interested in this message */ - connections = bus_transaction_get_connections (transaction); + connections = bus_context_get_connections (context); dbus_error_init (&tmp_error); matchmaker = bus_context_get_matchmaker (context); @@ -433,6 +433,8 @@ bus_dispatch_remove_connection (DBusConnection *connection) #include <stdio.h> +#include "stats.h" + /* This is used to know whether we need to block in order to finish * sending a message, or whether the initial dbus_connection_send() * already flushed the queue. @@ -1393,20 +1395,21 @@ check_get_connection_unix_process_id (BusContext *context, * but the correct thing may include OOM errors. */ static dbus_bool_t -check_add_match_all (BusContext *context, - DBusConnection *connection) +check_add_match (BusContext *context, + DBusConnection *connection, + const char *rule) { DBusMessage *message; dbus_bool_t retval; dbus_uint32_t serial; DBusError error; - const char *empty = ""; retval = FALSE; dbus_error_init (&error); message = NULL; - _dbus_verbose ("check_add_match_all for %p\n", connection); + _dbus_verbose ("check_add_match for connection %p, rule %s\n", + connection, rule); message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, @@ -1416,8 +1419,7 @@ check_add_match_all (BusContext *context, if (message == NULL) return TRUE; - /* empty string match rule matches everything */ - if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &empty, + if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &rule, DBUS_TYPE_INVALID)) { dbus_message_unref (message); @@ -1521,6 +1523,132 @@ check_add_match_all (BusContext *context, return retval; } +#ifdef DBUS_ENABLE_STATS +/* returns TRUE if the correct thing happens, + * but the correct thing may include OOM errors. + */ +static dbus_bool_t +check_get_all_match_rules (BusContext *context, + DBusConnection *connection) +{ + DBusMessage *message; + dbus_bool_t retval; + dbus_uint32_t serial; + DBusError error; + + retval = FALSE; + dbus_error_init (&error); + message = NULL; + + _dbus_verbose ("check_get_all_match_rules for connection %p\n", + connection); + + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + BUS_INTERFACE_STATS, + "GetAllMatchRules"); + + if (message == NULL) + return TRUE; + + if (!dbus_connection_send (connection, message, &serial)) + { + dbus_message_unref (message); + return TRUE; + } + + dbus_message_unref (message); + message = NULL; + + dbus_connection_ref (connection); /* because we may get disconnected */ + + /* send our message */ + bus_test_run_clients_loop (SEND_PENDING (connection)); + + if (!dbus_connection_get_is_connected (connection)) + { + _dbus_verbose ("connection was disconnected\n"); + + dbus_connection_unref (connection); + + return TRUE; + } + + block_connection_until_message_from_bus (context, connection, "reply to AddMatch"); + + if (!dbus_connection_get_is_connected (connection)) + { + _dbus_verbose ("connection was disconnected\n"); + + dbus_connection_unref (connection); + + return TRUE; + } + + dbus_connection_unref (connection); + + message = pop_message_waiting_for_memory (connection); + if (message == NULL) + { + _dbus_warn ("Did not receive a reply to %s %d on %p\n", + "AddMatch", serial, connection); + goto out; + } + + verbose_message_received (connection, message); + + if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) + { + _dbus_warn ("Message has wrong sender %s\n", + dbus_message_get_sender (message) ? + dbus_message_get_sender (message) : "(none)"); + goto out; + } + + if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) + { + if (dbus_message_is_error (message, + DBUS_ERROR_NO_MEMORY)) + { + ; /* good, this is a valid response */ + } + else + { + warn_unexpected (connection, message, "not this error"); + + goto out; + } + } + else + { + if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) + { + ; /* good, expected */ + _dbus_assert (dbus_message_get_reply_serial (message) == serial); + } + else + { + warn_unexpected (connection, message, "method return for AddMatch"); + + goto out; + } + } + + if (!check_no_leftovers (context)) + goto out; + + retval = TRUE; + + out: + dbus_error_free (&error); + + if (message) + dbus_message_unref (message); + + return retval; +} +#endif + /* returns TRUE if the correct thing happens, * but the correct thing may include OOM errors. */ @@ -1561,7 +1689,7 @@ check_hello_connection (BusContext *context) } else { - if (!check_add_match_all (context, connection)) + if (!check_add_match (context, connection, "")) return FALSE; kill_client_connection (context, connection); @@ -4516,7 +4644,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, if (!check_double_hello_message (context, foo)) _dbus_assert_not_reached ("double hello message failed"); - if (!check_add_match_all (context, foo)) + if (!check_add_match (context, foo, "")) _dbus_assert_not_reached ("AddMatch message failed"); bar = dbus_connection_open_private (TEST_DEBUG_PIPE, &error); @@ -4531,7 +4659,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, if (!check_hello_message (context, bar)) _dbus_assert_not_reached ("hello message failed"); - if (!check_add_match_all (context, bar)) + if (!check_add_match (context, bar, "")) _dbus_assert_not_reached ("AddMatch message failed"); baz = dbus_connection_open_private (TEST_DEBUG_PIPE, &error); @@ -4546,9 +4674,17 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, if (!check_hello_message (context, baz)) _dbus_assert_not_reached ("hello message failed"); - if (!check_add_match_all (context, baz)) + if (!check_add_match (context, baz, "")) _dbus_assert_not_reached ("AddMatch message failed"); + if (!check_add_match (context, baz, "interface='com.example'")) + _dbus_assert_not_reached ("AddMatch message failed"); + +#ifdef DBUS_ENABLE_STATS + if (!check_get_all_match_rules (context, baz)) + _dbus_assert_not_reached ("GetAllMatchRules message failed"); +#endif + #ifdef DBUS_WIN_FIXME _dbus_warn("TODO: testing of GetConnectionUnixUser message skipped for now\n"); _dbus_warn("TODO: testing of GetConnectionUnixProcessID message skipped for now\n"); @@ -4665,7 +4801,7 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir, if (!check_double_hello_message (context, foo)) _dbus_assert_not_reached ("double hello message failed"); - if (!check_add_match_all (context, foo)) + if (!check_add_match (context, foo, "")) _dbus_assert_not_reached ("AddMatch message failed"); /* this only tests the activation.c user check */ @@ -4745,7 +4881,7 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir) if (!check_hello_message (context, foo)) _dbus_assert_not_reached ("hello message failed"); - if (!check_add_match_all (context, foo)) + if (!check_add_match (context, foo, "")) _dbus_assert_not_reached ("addmatch message failed"); if (!check_no_leftovers (context)) @@ -4794,7 +4930,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) if (!check_hello_message (context, foo)) _dbus_assert_not_reached ("hello message failed"); - if (!check_add_match_all (context, foo)) + if (!check_add_match (context, foo, "")) _dbus_assert_not_reached ("AddMatch message failed"); bar = dbus_connection_open_private (TEST_DEBUG_PIPE, &error); @@ -4809,7 +4945,7 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) if (!check_hello_message (context, bar)) _dbus_assert_not_reached ("hello message failed"); - if (!check_add_match_all (context, bar)) + if (!check_add_match (context, bar, "")) _dbus_assert_not_reached ("AddMatch message failed"); if (!(m = dbus_message_new_signal("/", "a.b.c", "d"))) diff --git a/bus/driver.c b/bus/driver.c index e95a79d9..777b2f89 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -1789,6 +1789,7 @@ static const MessageHandler introspectable_message_handlers[] = { static const MessageHandler stats_message_handlers[] = { { "GetStats", "", "a{sv}", bus_stats_handle_get_stats }, { "GetConnectionStats", "s", "a{sv}", bus_stats_handle_get_connection_stats }, + { "GetAllMatchRules", "", "a{sas}", bus_stats_handle_get_all_match_rules }, { NULL, NULL, NULL, NULL } }; #endif diff --git a/bus/example-session-disable-stats.conf.in b/bus/example-session-disable-stats.conf.in new file mode 100644 index 00000000..2863ef0f --- /dev/null +++ b/bus/example-session-disable-stats.conf.in @@ -0,0 +1,15 @@ +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + + <!-- If the Stats interface was enabled at compile-time, users can use it on + the session bus by default. Systems providing isolation of processes + with LSMs might want to restrict this. This can be achieved by copying + this file in @EXPANDED_SYSCONFDIR@/dbus-1/session.d/ --> + + <policy context="default"> + <deny send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.DBus.Debug.Stats"/> + </policy> + +</busconfig> diff --git a/bus/example-system-enable-stats.conf.in b/bus/example-system-enable-stats.conf.in new file mode 100644 index 00000000..a85aa835 --- /dev/null +++ b/bus/example-system-enable-stats.conf.in @@ -0,0 +1,15 @@ +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + + <!-- If the Stats interface was enabled at compile-time, only root may use it. + Replace USERNAME and copy this file in @EXPANDED_SYSCONFDIR@/dbus-1/system.d/ + if you want to enable other privileged users to view statistics and + debug info --> + + <policy user="USERNAME"> + <allow send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.DBus.Debug.Stats"/> + </policy> + +</busconfig> diff --git a/bus/selinux.c b/bus/selinux.c index 768e55ef..99994ca9 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -44,8 +44,6 @@ #include <syslog.h> #include <selinux/selinux.h> #include <selinux/avc.h> -#include <selinux/av_permissions.h> -#include <selinux/flask.h> #include <signal.h> #include <stdarg.h> #include <stdio.h> @@ -314,8 +312,27 @@ bus_selinux_pre_init (void) #endif } +/* + * Private Flask definitions; the order of these constants must + * exactly match that of the structure array below! + */ +/* security dbus class constants */ +#define SECCLASS_DBUS 1 + +/* dbus's per access vector constants */ +#define DBUS__ACQUIRE_SVC 1 +#define DBUS__SEND_MSG 2 + +#ifdef HAVE_SELINUX +static struct security_class_mapping dbus_map[] = { + { "dbus", { "acquire_svc", "send_msg", NULL } }, + { NULL } +}; +#endif /* HAVE_SELINUX */ + /** - * Initialize the user space access vector cache (AVC) for D-Bus and set up + * Establish dynamic object class and permission mapping and + * initialize the user space access vector cache (AVC) for D-Bus and set up * logging callbacks. */ dbus_bool_t @@ -334,6 +351,13 @@ bus_selinux_full_init (void) _dbus_verbose ("SELinux is enabled in this kernel.\n"); + if (selinux_set_mapping (dbus_map) < 0) + { + _dbus_warn ("Failed to set up security class mapping (selinux_set_mapping():%s).\n", + strerror (errno)); + return FALSE; + } + avc_entry_ref_init (&aeref); if (avc_init ("avc", &mem_cb, &log_cb, &thread_cb, &lock_cb) < 0) { diff --git a/bus/services.c b/bus/services.c index 6f380fac..584485b1 100644 --- a/bus/services.c +++ b/bus/services.c @@ -368,7 +368,7 @@ bus_registry_list_services (BusRegistry *registry, error: for (j = 0; j < i; j++) - dbus_free (retval[i]); + dbus_free (retval[j]); dbus_free (retval); return FALSE; @@ -588,8 +588,9 @@ bus_registry_acquire_service (BusRegistry *registry, activation = bus_context_get_activation (registry->context); retval = bus_activation_send_pending_auto_activation_messages (activation, service, - transaction, - error); + transaction); + if (!retval) + BUS_SET_OOM (error); out: return retval; diff --git a/bus/session.conf.in b/bus/session.conf.in index 74d9d1fd..cfe9544f 100644 --- a/bus/session.conf.in +++ b/bus/session.conf.in @@ -49,9 +49,11 @@ <limit name="max_outgoing_bytes">1000000000</limit> <limit name="max_outgoing_unix_fds">250000000</limit> <limit name="max_message_size">1000000000</limit> - <limit name="max_message_unix_fds">@DEFAULT_MESSAGE_UNIX_FDS@</limit> + <!-- We do not override max_message_unix_fds here since the in-kernel + limit is also relatively low --> <limit name="service_start_timeout">120000</limit> <limit name="auth_timeout">240000</limit> + <limit name="pending_fd_timeout">150000</limit> <limit name="max_completed_connections">100000</limit> <limit name="max_incomplete_connections">10000</limit> <limit name="max_connections_per_user">100000</limit> diff --git a/bus/signals.c b/bus/signals.c index 4c500c67..119d8130 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -22,6 +22,9 @@ */ #include <config.h> + +#include <string.h> + #include "signals.h" #include "services.h" #include "utils.h" @@ -118,10 +121,46 @@ bus_match_rule_unref (BusMatchRule *rule) } } -#ifdef DBUS_ENABLE_VERBOSE_MODE -/* Note this function does not do escaping, so it's only - * good for debug spew at the moment - */ +#if defined(DBUS_ENABLE_VERBOSE_MODE) || defined(DBUS_ENABLE_STATS) +static dbus_bool_t +append_key_and_escaped_value (DBusString *str, const char *token, const char *value) +{ + const char *p = value; + + if (!_dbus_string_append_printf (str, "%s='", token)) + return FALSE; + + while (*p != '\0') + { + const char *next = strchr (p, '\''); + + if (next) + { + if (!_dbus_string_append_printf (str, "%.*s", (int) (next - p), p)) + return FALSE; + /* Horrible escape sequence: single quote cannot be escaped inside + * a single quoted string. So we close the single quote, escape the + * single quote, and reopen a single quote. + */ + if (!_dbus_string_append_printf (str, "'\\''")) + return FALSE; + p = next + 1; + } + else + { + if (!_dbus_string_append_printf (str, "%s", p)) + return FALSE; + break; + } + } + + if (!_dbus_string_append_byte (str, '\'')) + return FALSE; + + return TRUE; +} + +/* returns NULL if no memory */ static char* match_rule_to_string (BusMatchRule *rule) { @@ -130,15 +169,12 @@ match_rule_to_string (BusMatchRule *rule) if (!_dbus_string_init (&str)) { - char *s; - while ((s = _dbus_strdup ("nomem")) == NULL) - ; /* only OK for debug spew... */ - return s; + return NULL; } if (rule->flags & BUS_MATCH_MESSAGE_TYPE) { - if (!_dbus_string_append_printf (&str, "type='%s'", + if (!append_key_and_escaped_value (&str, "type", dbus_message_type_to_string (rule->message_type))) goto nomem; } @@ -151,7 +187,7 @@ match_rule_to_string (BusMatchRule *rule) goto nomem; } - if (!_dbus_string_append_printf (&str, "interface='%s'", rule->interface)) + if (!append_key_and_escaped_value (&str, "interface", rule->interface)) goto nomem; } @@ -163,7 +199,7 @@ match_rule_to_string (BusMatchRule *rule) goto nomem; } - if (!_dbus_string_append_printf (&str, "member='%s'", rule->member)) + if (!append_key_and_escaped_value (&str, "member", rule->member)) goto nomem; } @@ -175,7 +211,7 @@ match_rule_to_string (BusMatchRule *rule) goto nomem; } - if (!_dbus_string_append_printf (&str, "path='%s'", rule->path)) + if (!append_key_and_escaped_value (&str, "path", rule->path)) goto nomem; } @@ -187,7 +223,7 @@ match_rule_to_string (BusMatchRule *rule) goto nomem; } - if (!_dbus_string_append_printf (&str, "path_namespace='%s'", rule->path)) + if (!append_key_and_escaped_value (&str, "path_namespace", rule->path)) goto nomem; } @@ -199,7 +235,7 @@ match_rule_to_string (BusMatchRule *rule) goto nomem; } - if (!_dbus_string_append_printf (&str, "sender='%s'", rule->sender)) + if (!append_key_and_escaped_value (&str, "sender", rule->sender)) goto nomem; } @@ -211,7 +247,7 @@ match_rule_to_string (BusMatchRule *rule) goto nomem; } - if (!_dbus_string_append_printf (&str, "destination='%s'", rule->destination)) + if (!append_key_and_escaped_value (&str, "destination", rule->destination)) goto nomem; } @@ -223,7 +259,7 @@ match_rule_to_string (BusMatchRule *rule) goto nomem; } - if (!_dbus_string_append_printf (&str, "eavesdrop='%s'", + if (!append_key_and_escaped_value (&str, "eavesdrop", (rule->flags & BUS_MATCH_CLIENT_IS_EAVESDROPPING) ? "true" : "false")) goto nomem; @@ -252,11 +288,12 @@ match_rule_to_string (BusMatchRule *rule) is_namespace = (rule->arg_lens[i] & BUS_MATCH_ARG_NAMESPACE) != 0; if (!_dbus_string_append_printf (&str, - "arg%d%s='%s'", + "arg%d%s", i, is_path ? "path" : - is_namespace ? "namespace" : "", - rule->args[i])) + is_namespace ? "namespace" : "")) + goto nomem; + if (!append_key_and_escaped_value (&str, "", rule->args[i])) goto nomem; } @@ -272,14 +309,9 @@ match_rule_to_string (BusMatchRule *rule) nomem: _dbus_string_free (&str); - { - char *s; - while ((s = _dbus_strdup ("nomem")) == NULL) - ; /* only OK for debug spew... */ - return s; - } + return NULL; } -#endif /* DBUS_ENABLE_VERBOSE_MODE */ +#endif /* defined(DBUS_ENABLE_VERBOSE_MODE) || defined(DBUS_ENABLE_STATS) */ dbus_bool_t bus_match_rule_set_message_type (BusMatchRule *rule, @@ -1141,6 +1173,74 @@ struct BusMatchmaker RulePool rules_by_type[DBUS_NUM_MESSAGE_TYPES]; }; +#ifdef DBUS_ENABLE_STATS +dbus_bool_t +bus_match_rule_dump (BusMatchmaker *matchmaker, + DBusConnection *conn_filter, + DBusMessageIter *arr_iter) +{ + int i; + + for (i = 0 ; i < DBUS_NUM_MESSAGE_TYPES ; i++) + { + DBusHashIter iter; + DBusList **list; + DBusList *link; + + _dbus_hash_iter_init (matchmaker->rules_by_type[i].rules_by_iface, &iter); + while (_dbus_hash_iter_next (&iter)) + { + list = _dbus_hash_iter_get_value (&iter); + for (link = _dbus_list_get_first_link (list); + link != NULL; + link = _dbus_list_get_next_link (list, link)) + { + BusMatchRule *rule = link->data; + + if (rule->matches_go_to == conn_filter) + { + char *s = match_rule_to_string (rule); + + if (s == NULL) + return FALSE; + + if (!dbus_message_iter_append_basic (arr_iter, DBUS_TYPE_STRING, &s)) + { + dbus_free (s); + return FALSE; + } + dbus_free (s); + } + } + } + list = &matchmaker->rules_by_type[i].rules_without_iface; + for (link = _dbus_list_get_first_link (list); + link != NULL; + link = _dbus_list_get_next_link (list, link)) + { + BusMatchRule *rule = link->data; + + if (rule->matches_go_to == conn_filter) + { + char *s = match_rule_to_string (rule); + + if (s == NULL) + return FALSE; + + if (!dbus_message_iter_append_basic (arr_iter, DBUS_TYPE_STRING, &s)) + { + dbus_free (s); + return FALSE; + } + dbus_free (s); + } + } + } + + return TRUE; +} +#endif + static void rule_list_free (DBusList **rules) { @@ -1359,7 +1459,7 @@ bus_matchmaker_add_rule (BusMatchmaker *matchmaker, char *s = match_rule_to_string (rule); _dbus_verbose ("Added match rule %s to connection %p\n", - s, rule->matches_go_to); + s ? s : "nomem", rule->matches_go_to); dbus_free (s); } #endif @@ -1452,7 +1552,7 @@ bus_matchmaker_remove_rule_link (DBusList **rules, char *s = match_rule_to_string (rule); _dbus_verbose ("Removed match rule %s for connection %p\n", - s, rule->matches_go_to); + s ? s : "nomem", rule->matches_go_to); dbus_free (s); } #endif @@ -1489,7 +1589,7 @@ bus_matchmaker_remove_rule (BusMatchmaker *matchmaker, char *s = match_rule_to_string (rule); _dbus_verbose ("Removed match rule %s for connection %p\n", - s, rule->matches_go_to); + s ? s : "nomem", rule->matches_go_to); dbus_free (s); } #endif @@ -1966,7 +2066,7 @@ get_recipients_from_list (DBusList **rules, char *s = match_rule_to_string (rule); _dbus_verbose ("Checking whether message matches rule %s for connection %p\n", - s, rule->matches_go_to); + s ? s : "nomem", rule->matches_go_to); dbus_free (s); } #endif @@ -2401,7 +2501,12 @@ static struct { { "type='method_call',arg3='foosh'", "arg3='foosh',type='method_call'" }, { "arg3='fool'", "arg3='fool'" }, { "arg0namespace='fool'", "arg0namespace='fool'" }, - { "member='food'", "member='food'" } + { "member='food'", "member='food'" }, + { "member=escape", "member='escape'" }, + { "member=icecream", "member=ice'cream'" }, + { "arg0='comma,type=comma',type=signal", "type=signal,arg0='comma,type=comma'" }, + { "arg0=escap\\e", "arg0='escap\\e'" }, + { "arg0=Time: 8 o\\'clock", "arg0='Time: 8 o'\\''clock'" }, }; static void @@ -2414,6 +2519,8 @@ test_equality (void) { BusMatchRule *first; BusMatchRule *second; + char *first_str, *second_str; + BusMatchRule *first_reparsed, *second_reparsed; int j; first = check_parse (TRUE, equality_tests[i].first); @@ -2429,6 +2536,21 @@ test_equality (void) exit (1); } + /* Check match_rule_to_string */ + first_str = match_rule_to_string (first); + _dbus_assert (first_str != NULL); + second_str = match_rule_to_string (second); + _dbus_assert (second_str != NULL); + _dbus_assert (strcmp (first_str, second_str) == 0); + first_reparsed = check_parse (TRUE, first_str); + second_reparsed = check_parse (TRUE, second_str); + _dbus_assert (match_rule_equal (first, first_reparsed)); + _dbus_assert (match_rule_equal (second, second_reparsed)); + bus_match_rule_unref (first_reparsed); + bus_match_rule_unref (second_reparsed); + dbus_free (first_str); + dbus_free (second_str); + bus_match_rule_unref (second); /* Check that the rule is not equal to any of the diff --git a/bus/signals.h b/bus/signals.h index a71d2e45..d19fc7c5 100644 --- a/bus/signals.h +++ b/bus/signals.h @@ -77,6 +77,12 @@ BusMatchRule* bus_match_rule_parse (DBusConnection *matches_go_to, const DBusString *rule_text, DBusError *error); +#ifdef DBUS_ENABLE_STATS +dbus_bool_t bus_match_rule_dump (BusMatchmaker *matchmaker, + DBusConnection *conn_filter, + DBusMessageIter *arr_iter); +#endif + BusMatchmaker* bus_matchmaker_new (void); BusMatchmaker* bus_matchmaker_ref (BusMatchmaker *matchmaker); void bus_matchmaker_unref (BusMatchmaker *matchmaker); diff --git a/bus/stats.c b/bus/stats.c index ec768ec7..859c6a52 100644 --- a/bus/stats.c +++ b/bus/stats.c @@ -30,6 +30,7 @@ #include "connection.h" #include "services.h" +#include "signals.h" #include "utils.h" #ifdef DBUS_ENABLE_STATS @@ -40,6 +41,7 @@ bus_stats_handle_get_stats (DBusConnection *connection, DBusMessage *message, DBusError *error) { + BusContext *context; BusConnections *connections; DBusMessage *reply = NULL; DBusMessageIter iter, arr_iter; @@ -48,7 +50,8 @@ bus_stats_handle_get_stats (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_CLEAR (error); - connections = bus_transaction_get_connections (transaction); + context = bus_transaction_get_context (transaction); + connections = bus_context_get_connections (context); reply = _dbus_asv_new_method_return (message, &iter, &arr_iter); @@ -215,4 +218,120 @@ oom: return FALSE; } + +dbus_bool_t +bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error) +{ + BusContext *context; + DBusString bus_name_str; + DBusMessage *reply = NULL; + DBusMessageIter iter, hash_iter, entry_iter, arr_iter; + BusRegistry *registry; + char **services = NULL; + int services_len; + DBusConnection *conn_filter = NULL; + BusMatchmaker *matchmaker; + int i; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + registry = bus_connection_get_registry (caller_connection); + context = bus_transaction_get_context (transaction); + matchmaker = bus_context_get_matchmaker (context); + + if (!bus_registry_list_services (registry, &services, &services_len)) + return FALSE; + + reply = dbus_message_new_method_return (message); + if (reply == NULL) + goto oom; + + dbus_message_iter_init_append (reply, &iter); + + if (!dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "{sas}", + &hash_iter)) + goto oom; + + for (i = 0 ; i < services_len ; i++) + { + BusService *service; + + /* To avoid duplicate entries, only look for unique names */ + if (services[i][0] != ':') + continue; + + _dbus_string_init_const (&bus_name_str, services[i]); + service = bus_registry_lookup (registry, &bus_name_str); + _dbus_assert (service != NULL); + + conn_filter = bus_service_get_primary_owners_connection (service); + _dbus_assert (conn_filter != NULL); + + if (!dbus_message_iter_open_container (&hash_iter, DBUS_TYPE_DICT_ENTRY, NULL, + &entry_iter)) + { + dbus_message_iter_abandon_container (&iter, &hash_iter); + goto oom; + } + + if (!dbus_message_iter_append_basic (&entry_iter, DBUS_TYPE_STRING, &services[i])) + { + dbus_message_iter_abandon_container (&hash_iter, &entry_iter); + dbus_message_iter_abandon_container (&iter, &hash_iter); + goto oom; + } + + if (!dbus_message_iter_open_container (&entry_iter, DBUS_TYPE_ARRAY, "s", + &arr_iter)) + { + dbus_message_iter_abandon_container (&hash_iter, &entry_iter); + dbus_message_iter_abandon_container (&iter, &hash_iter); + goto oom; + } + + if (!bus_match_rule_dump (matchmaker, conn_filter, &arr_iter)) + { + dbus_message_iter_abandon_container (&entry_iter, &arr_iter); + dbus_message_iter_abandon_container (&hash_iter, &entry_iter); + dbus_message_iter_abandon_container (&iter, &hash_iter); + goto oom; + } + + if (!dbus_message_iter_close_container (&entry_iter, &arr_iter)) + { + dbus_message_iter_abandon_container (&hash_iter, &entry_iter); + dbus_message_iter_abandon_container (&iter, &hash_iter); + goto oom; + } + if (!dbus_message_iter_close_container (&hash_iter, &entry_iter)) + { + dbus_message_iter_abandon_container (&iter, &hash_iter); + goto oom; + } + } + + if (!dbus_message_iter_close_container (&iter, &hash_iter)) + goto oom; + + if (!bus_transaction_send_from_driver (transaction, caller_connection, + reply)) + goto oom; + + dbus_message_unref (reply); + dbus_free_string_array (services); + return TRUE; + +oom: + if (reply != NULL) + dbus_message_unref (reply); + + dbus_free_string_array (services); + + BUS_SET_OOM (error); + return FALSE; +} + #endif diff --git a/bus/stats.h b/bus/stats.h index 0f843db5..dcb022c4 100644 --- a/bus/stats.h +++ b/bus/stats.h @@ -35,4 +35,9 @@ dbus_bool_t bus_stats_handle_get_connection_stats (DBusConnection *connection, DBusMessage *message, DBusError *error); +dbus_bool_t bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); + #endif /* multiple-inclusion guard */ diff --git a/bus/system.conf.in b/bus/system.conf.in index 92f4cc42..c1541bff 100644 --- a/bus/system.conf.in +++ b/bus/system.conf.in @@ -63,11 +63,24 @@ <allow receive_type="signal"/> <!-- Allow anyone to talk to the message bus --> - <allow send_destination="org.freedesktop.DBus"/> + <allow send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.DBus" /> + <allow send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.DBus.Introspectable"/> <!-- But disallow some specific bus services --> <deny send_destination="org.freedesktop.DBus" send_interface="org.freedesktop.DBus" send_member="UpdateActivationEnvironment"/> + <deny send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.DBus.Debug.Stats"/> + </policy> + + <!-- If the Stats interface was enabled at compile-time, root may use it. + Copy this into system.local.conf or system.d/*.conf if you want to + enable other privileged users to view statistics and debug info --> + <policy user="root"> + <allow send_destination="org.freedesktop.DBus" + send_interface="org.freedesktop.DBus.Debug.Stats"/> </policy> <!-- Config files are placed here that among other things, punch diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index fe111966..628a681a 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -73,7 +73,7 @@ set(EXPANDED_DATADIR ${DBUS_INSTALL_DIR}/${DBUS_DATADIR}) set(DBUS_MACHINE_UUID_FILE ${DBUS_INSTALL_DIR}/lib/dbus/machine-id) set(DBUS_BINDIR ${EXPANDED_BINDIR}) set(DBUS_DAEMONDIR ${EXPANDED_BINDIR}) - +set(DBUS_LOCALSTATEDIR ${DBUS_INSTALL_DIR}/var) #enable building of shared library SET(BUILD_SHARED_LIBS ON) @@ -107,8 +107,17 @@ option (DBUS_DISABLE_ASSERT "Disable assertion checking" OFF) option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF) +if(WIN32) + set(FD_SETSIZE "8192" CACHE STRING "The maximum number of connections that can be handled at once") +endif() + find_package(EXPAT) find_package(X11) +find_package(GLib2) +find_package(GObject) +if(GLIB2_FOUND AND GOBJECT_FOUND) + option (DBUS_WITH_GLIB "build with glib" ON) +endif() # analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac add_definitions(-D_GNU_SOURCE) @@ -127,7 +136,6 @@ if(VCS) endif(VCS) if(WIN32) - set(CMAKE_DEBUG_POSTFIX "d") if(MSVC) # controll folders in msvc projects include(ProjectSourceGroup) @@ -348,9 +356,8 @@ endif(X11_FOUND) # test binary names if (WIN32) - # Automake calls this EXEEXT, and CMake doesn't have a standard name - # for it; follow Automake's naming convention so we can share .in files - set (EXEEXT ".exe") + # follow Automake's naming convention so we can share .in files + set (EXEEXT ${CMAKE_EXECUTABLE_SUFFIX}) endif(WIN32) if (MSVC_IDE) @@ -393,13 +400,8 @@ endif (MSVC_IDE) endif (NOT $ENV{TEMP} STREQUAL "") endif (NOT $ENV{TMPDIR} STREQUAL "") -# TODO: fix redhet -if (WIN32) - # bus-test expects a non empty string - set (DBUS_SYSTEM_PID_FILE "/dbus-pid") -else (WIN32) - set (DBUS_SYSTEM_PID_FILE ${EXPANDED_LOCALSTATEDIR}/run/dbus/pid) -endif (WIN32) + # Not used on Windows, where there is no system bus +set (DBUS_SYSTEM_PID_FILE ${DBUS_LOCALSTATEDIR}/run/dbus/pid) if (WIN32) set (DBUS_CONSOLE_AUTH_DIR "") @@ -409,10 +411,6 @@ endif (WIN32) set (DBUS_USER ) -# In Autotools this has a different default on QNX, but there seems little -# point in replicating that here; if you're on an unusual Unix, use Autotools. -set (DEFAULT_MESSAGE_UNIX_FDS 1024) - # This won't work on Windows. It's not meant to - the system bus is # meaningless on Windows anyway. # @@ -421,7 +419,7 @@ set (DEFAULT_MESSAGE_UNIX_FDS 1024) # and also to connect to. If this ever changes, it'll need to be split into # two variables, one for the listening address and one for the connecting # address. -set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket" CACHE STRING "system bus default address") +set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=${DBUS_LOCALSTATEDIR}/run/dbus/system_bus_socket" CACHE STRING "system bus default address") if (WIN32) set (DBUS_SESSION_BUS_LISTEN_ADDRESS "autolaunch:" CACHE STRING "session bus default listening address") @@ -463,6 +461,7 @@ if (DBUS_BUILD_TESTS) set(DBUS_TEST_DATA ${CMAKE_BINARY_DIR}/test/data) set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} ) set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test) + set(TEST_BUS_LAUNCH_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-launch${EXEEXT}) if (UNIX) set (TEST_LISTEN "unix:tmpdir=${TEST_SOCKET_DIR}") endif (UNIX) @@ -539,19 +538,20 @@ message(" Docbook Generator: ${DOCBOOK_GENERATOR_NAME} " message(" gcc coverage profiling: ${DBUS_GCOV_ENABLED} ") message(" Building unit tests: ${DBUS_BUILD_TESTS} ") +message(" Building with GLib: ${DBUS_WITH_GLIB} ") message(" Building verbose mode: ${DBUS_ENABLE_VERBOSE_MODE} ") -message(" Building w/o assertions: ${DBUS_DISABLE_ASSERT} ") +message(" Building w/o assertions: ${DBUS_DISABLE_ASSERT} ") message(" Building w/o checks: ${DBUS_DISABLE_CHECKS} ") message(" Building bus stats API: ${DBUS_ENABLE_STATS} ") message(" installing system libs: ${DBUS_INSTALL_SYSTEM_LIBS} ") message(" Building inotify support: ${DBUS_BUS_ENABLE_INOTIFY} ") -message(" Building kqueue support: ${DBUS_BUS_ENABLE_KQUEUE} ") +message(" Building kqueue support: ${DBUS_BUS_ENABLE_KQUEUE} ") message(" Building Doxygen docs: ${DBUS_ENABLE_DOXYGEN_DOCS} ") message(" Building XML docs: ${DBUS_ENABLE_XML_DOCS} ") message(" Daemon executable name: ${DBUS_DAEMON_NAME}") if (WIN32) message(" System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} ") -message(" Session bus listens on: ${DBUS_SESSION_BUS_LISTEN_ADDRESS} ") +message(" Session bus listens on: ${DBUS_SESSION_BUS_LISTEN_ADDRESS} ") message(" Session clients connect to: ${DBUS_SESSION_BUS_CONNECT_ADDRESS} ") else (WIN32) message(" System bus socket: ${DBUS_SYSTEM_SOCKET} ") @@ -591,6 +591,11 @@ endif(NOT DBUS_DISABLE_ASSERT) if (DBUS_DISABLE_CHECKS) message("NOTE: building without checks for arguments passed to public API makes it harder to debug apps using D-BUS, but will slightly decrease D-BUS library size and _very_ slightly improve performance.") endif(DBUS_DISABLE_CHECKS) + +foreach(_note ${FOOTNOTES}) + message(${_note}) +endforeach() + MESSAGE(" ") INCLUDE(modules/CPackInstallConfig.cmake) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 2794975e..d290b0f2 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -90,7 +90,7 @@ find_program(DOXYGEN doxygen) find_program(XMLTO xmlto) if(MSVC) - SET(DBUS_VA_COPY_FUNC "_DBUS_VA_COPY_ASSIGN";) + SET(DBUS_VA_COPY_FUNC "_DBUS_VA_COPY_ASSIGN") else(MSVC) write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h> #include <stdlib.h> diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt index 9943584a..2ff6c9bc 100644 --- a/cmake/bus/CMakeLists.txt +++ b/cmake/bus/CMakeLists.txt @@ -1,21 +1,16 @@ -project(bus) - add_definitions(-DDBUS_COMPILATION) SET(EFENCE "") SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus) -set (config_DATA - session.conf - system.conf -) - # config files for installation CONFIGURE_FILE( "${BUS_DIR}/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY) FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d) -CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY) -FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d) +if(NOT WIN32) + CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY) + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d) +endif() # copy services for local daemon start to local service dir data/dbus-1/services SET (SERVICE_FILES test/data/valid-service-files) @@ -82,7 +77,11 @@ if(DBUS_ENABLE_STATS) ) endif(DBUS_ENABLE_STATS) -include_directories(${XML_INCLUDE_DIR}) +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/.. + ${XML_INCLUDE_DIR} +) add_executable(dbus-daemon ${BUS_SOURCES} ${BUS_DIR}/main.c) target_link_libraries(dbus-daemon ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) @@ -90,8 +89,16 @@ set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME}) set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) install_targets(/bin dbus-daemon) -install_files(/etc/dbus-1 FILES ${config_DATA}) -install(DIRECTORY . DESTINATION etc/dbus-1/session.d FILES_MATCHING PATTERN "*.conf") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION etc/dbus-1) +install(DIRECTORY DESTINATION etc/dbus-1/session.d) +install(DIRECTORY DESTINATION share/dbus-1/services) + +if(NOT WIN32) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION etc/dbus-1) + install(DIRECTORY DESTINATION etc/dbus-1/system.d) + install(DIRECTORY DESTINATION share/dbus-1/system-services) + install(DIRECTORY DESTINATION var/run/dbus) +endif() if (DBUS_SERVICE) set (dbus_service_SOURCES @@ -108,10 +115,19 @@ if (DBUS_SERVICE) endif (DBUS_SERVICE) if (DBUS_ENABLE_EMBEDDED_TESTS) - add_executable(bus-test ${BUS_SOURCES} ${BUS_DIR}/test-main.c) - target_link_libraries(bus-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) - set_target_properties(bus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) - add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_BINARY_DIR}/test/data) + set(SOURCES ${BUS_SOURCES} ${BUS_DIR}/test-main.c) + add_test_executable(test-bus "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) + set_target_properties(test-bus PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + if (NOT DBUS_WIN32) + set(test_bus_system_SOURCES + ${XML_SOURCES} + ${BUS_DIR}/config-parser-common.c + ${BUS_DIR}/config-parser-trivial.c + ${BUS_DIR}/utils.c + ${BUS_DIR}/test-system.c + ) + add_test_executable(test-bus-system "${test_bus_system_SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ${DBUS_BUS_LIBS}) + endif() endif (DBUS_ENABLE_EMBEDDED_TESTS) if(MSVC) @@ -148,11 +164,9 @@ if(NOT WIN32) set_target_properties(dbus-daemon-launch-helper-test PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST") target_link_libraries(dbus-daemon-launch-helper-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) - add_executable(bus-test-launch-helper ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c) - set_target_properties(bus-test-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM") - target_link_libraries(bus-test-launch-helper ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) - add_test(bus-test-launch-helper ${EXECUTABLE_OUTPUT_PATH}/bus-test-launch-helper ) - + set (SOURCES ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c) + add_test_executable(test-bus-launch-helper "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) + set_target_properties(test-bus-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM") endif(NOT WIN32) #### Init scripts fun diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index 37355609..eaec1e98 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -32,6 +32,7 @@ // test binaries #define DBUS_TEST_EXEC "@DBUS_TEST_EXEC@" #define DBUS_EXEEXT "@EXEEXT@" +#cmakedefine TEST_BUS_LAUNCH_BINARY "@TEST_BUS_LAUNCH_BINARY@" /* Some dbus features */ #cmakedefine DBUS_ENABLE_ANSI 1 @@ -81,8 +82,6 @@ # define DBUS_ENABLE_X11_AUTOLAUNCH 1 #endif -#define DBUS_DEFAULT_MESSAGE_UNIX_FDS @DEFAULT_MESSAGE_UNIX_FDS@ - #define _DBUS_VA_COPY_ASSIGN(a1,a2) { a1 = a2; } #cmakedefine DBUS_VA_COPY_FUNC @@ -195,6 +194,8 @@ /* Define to 1 if you have struct cmsgred */ #cmakedefine HAVE_CMSGCRED 1 +#cmakedefine FD_SETSIZE @FD_SETSIZE@ + // system type defines #if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE) # define DBUS_WIN diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index 0205f852..a6aaba07 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -1,5 +1,3 @@ -project(dbus-lib) - SET(DBUS_DIR ${CMAKE_SOURCE_DIR}/../dbus) configure_file(${DBUS_DIR}/dbus-arch-deps.h.in ${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h ) @@ -216,14 +214,12 @@ else (WIN32) ${DBUS_DIR}/dbus-sysdeps-unix.c ${DBUS_DIR}/dbus-sysdeps-pthread.c ${DBUS_DIR}/dbus-userdb.c - ${DBUS_DIR}/sd-daemon.c ) set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS} ${DBUS_DIR}/dbus-server-unix.h ${DBUS_DIR}/dbus-transport-unix.h ${DBUS_DIR}/dbus-sysdeps-unix.h ${DBUS_DIR}/dbus-userdb.h - ${DBUS_DIR}/sd-daemon.h ) set (DBUS_UTIL_SOURCES ${DBUS_UTIL_SOURCES} ${DBUS_DIR}/dbus-spawn.c @@ -263,13 +259,29 @@ add_library(dbus-1 SHARED ${libdbus_SOURCES} ${libdbus_HEADERS} ) +if(DBUS_LIBRARY_REVISION) + math(EXPR DBUS_LIBRARY_MAJOR "${DBUS_LIBRARY_CURRENT} - ${DBUS_LIBRARY_AGE}") +endif() + if(WIN32) + if(DBUS_LIBRARY_REVISION) + get_target_property(LEGACY_FILE_NAME dbus-1 LOCATION) + set_target_properties(dbus-1 PROPERTIES SUFFIX "-${DBUS_LIBRARY_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}") + add_custom_command(TARGET dbus-1 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:dbus-1>" "${LEGACY_FILE_NAME}" + COMMENT "Create non versioned dbus-1 library for legacy applications" + ) + install(FILES ${LEGACY_FILE_NAME} DESTINATION bin) + endif() if(WINCE) target_link_libraries(dbus-1 ws2) else(WINCE) target_link_libraries(dbus-1 ws2_32 advapi32 netapi32 iphlpapi) endif(WINCE) else(WIN32) + if(DBUS_LIBRARY_REVISION) + set_target_properties(dbus-1 PROPERTIES VERSION ${DBUS_LIBRARY_MAJOR}.${DBUS_LIBRARY_AGE}.${DBUS_LIBRARY_REVISION} SOVERSION ${DBUS_LIBRARY_MAJOR}) + endif() target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt) endif(WIN32) @@ -299,11 +311,8 @@ else(WIN32) endif(WIN32) if (DBUS_ENABLE_EMBEDDED_TESTS) - set (TESTS_ENVIRONMENT "DBUS_TEST_DATA=${CMAKE_SOURCE_DIR}/test/data DBUS_TEST_HOMEDIR=${CMAKE_BUILD_DIR}/dbus") - ADD_EXECUTABLE(dbus-test ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c) - target_link_libraries(dbus-test ${DBUS_INTERNAL_LIBRARIES}) - add_test(dbus-test ${EXECUTABLE_OUTPUT_PATH}/dbus-test ${CMAKE_SOURCE_DIR}/../test/data) - set_target_properties(dbus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + add_test_executable(test-dbus ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c ${DBUS_INTERNAL_LIBRARIES}) + set_target_properties(test-dbus PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) ENDIF (DBUS_ENABLE_EMBEDDED_TESTS) if (UNIX) diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt index 7fdfc219..807af60c 100644 --- a/cmake/doc/CMakeLists.txt +++ b/cmake/doc/CMakeLists.txt @@ -20,6 +20,8 @@ find_program(MEINPROC4_EXECUTABLE meinproc4) find_program(XMLTO_EXECUTABLE xmlto) +find_program(CYGPATH_EXECUTABLE cygpath) + if (MEINPROC4_EXECUTABLE OR XMLTO_EXECUTABLE) OPTION(DBUS_ENABLE_XML_DOCS "build XML documentation (requires xmlto or meinproc4)" ON) ADD_CUSTOM_TARGET(xmldoc ALL) @@ -71,6 +73,19 @@ macro (DOCBOOK _sources _format) ) endif () if (XMLTO_EXECUTABLE) + if (MSYS) + if (CYGPATH_EXECUTABLE) + execute_process( + COMMAND cygpath ${_infile} + OUTPUT_VARIABLE _infile) + else () + execute_process(COMMAND dirname ${_infile} OUTPUT_VARIABLE _path) + string(STRIP ${_path} _path) + execute_process(COMMAND sh -c "cd ${_path}; pwd -W" OUTPUT_VARIABLE _path) + string(STRIP ${_path} _path) + set(_infile "${_path}/${_name}") + endif(CYGPATH_EXECUTABLE) + endif (MSYS) ADD_CUSTOM_COMMAND( OUTPUT ${_outfile} COMMAND ${XMLTO_EXECUTABLE} -vv ${_format} ${_infile} diff --git a/cmake/modules/COPYING-CMAKE-SCRIPTS b/cmake/modules/COPYING-CMAKE-SCRIPTS new file mode 100644 index 00000000..53b6b71e --- /dev/null +++ b/cmake/modules/COPYING-CMAKE-SCRIPTS @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake deleted file mode 100644 index 1fdaee95..00000000 --- a/cmake/modules/FindGLIB.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Try to find the GLIB library -# Once done this will define -# -# GLIB_FOUND - system has GLIB -# GLIB_INCLUDES - the GLIB include directories -# GLIB_LIBRARIES - The libraries needed to use GLIB - -if (WIN32) - -INCLUDE(MacroGetenvWinPath) - -MACRO_GETENV_WIN_PATH(_program_FILES_DIR PROGRAMFILES) - -FIND_PATH(GLIB_INCLUDE_DIR glib.h - ${_program_FILES_DIR}/glib/include/glib-2.0 -) - - -# search for GLIB in the default install directory for applications (default of (n)make install) -FIND_LIBRARY(GLIB_LIBRARY NAMES glib-2.0 - PATHS - ${_program_FILES_DIR}/glib/lib -) - -if (GLIB_LIBRARY AND GLIB_INCLUDE_DIR) - set(GLIB_FOUND TRUE) - set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GLIB_INCLUDES}) - set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GLIB_LIBRARIES}) - -endif (GLIB_LIBRARY AND GLIB_INCLUDE_DIR) - -if (GLIB_FOUND) - if (NOT GLIB_FIND_QUIETLY) - message(STATUS "Found GLIB: ${GLIB_LIBRARY}") - endif (NOT GLIB_FIND_QUIETLY) -else (GLIB_FOUND) - if (GLIB_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find GLIB library") - endif (GLIB_FIND_REQUIRED) -endif (GLIB_FOUND) - -endif (WIN32) diff --git a/cmake/modules/FindGLib2.cmake b/cmake/modules/FindGLib2.cmake new file mode 100644 index 00000000..d72b2a09 --- /dev/null +++ b/cmake/modules/FindGLib2.cmake @@ -0,0 +1,60 @@ +# - Try to find the GLIB2 libraries +# Once done this will define +# +# GLIB2_FOUND - system has glib2 +# GLIB2_INCLUDE_DIR - the glib2 include directory +# GLIB2_LIBRARIES - glib2 library + +# Copyright (c) 2008 Laurent Montel, <montel@kde.org> +# Copyright (c) 2013 Ralf Habacker, <ralf.habacker@freenet.de> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) + # Already in cache, be silent + set(GLIB2_FIND_QUIETLY TRUE) +endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) + +if (NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0) +endif() + +find_path(GLIB2_MAIN_INCLUDE_DIR + NAMES glib.h + HINTS ${PC_LibGLIB2_INCLUDEDIR} + PATH_SUFFIXES glib-2.0) + +find_library(GLIB2_LIBRARY + NAMES glib-2.0 + HINTS ${PC_LibGLIB2_LIBDIR} +) + +find_library(GIO2_LIBRARY + NAMES gio-2.0 + HINTS ${PC_LibGLIB2_LIBDIR} +) + +set(GLIB2_LIBRARIES ${GLIB2_LIBRARY} ${GIO2_LIBRARY}) + +# search the glibconfig.h include dir under the same root where the library is found +get_filename_component(glib2LibDir "${GLIB2_LIBRARY}" PATH) + +find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h + PATH_SUFFIXES glib-2.0/include + HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) + +set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}") + +# not sure if this include dir is optional or required +# for now it is optional +if(GLIB2_INTERNAL_INCLUDE_DIR) + set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") +endif(GLIB2_INTERNAL_INCLUDE_DIR) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR) + +mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES) diff --git a/cmake/modules/FindGObject.cmake b/cmake/modules/FindGObject.cmake new file mode 100644 index 00000000..af0c9f73 --- /dev/null +++ b/cmake/modules/FindGObject.cmake @@ -0,0 +1,52 @@ +# - Try to find GObject +# Once done this will define +# +# GOBJECT_FOUND - system has GObject +# GOBJECT_INCLUDE_DIR - the GObject include directory +# GOBJECT_LIBRARIES - the libraries needed to use GObject +# GOBJECT_DEFINITIONS - Compiler switches required for using GObject + +# Copyright (c) 2011, Raphael Kubo da Costa <kubito@gmail.com> +# Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +FIND_PACKAGE(PkgConfig) +PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0) +SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER}) + +FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h + HINTS + ${PC_GOBJECT_INCLUDEDIR} + ${PC_GOBJECT_INCLUDE_DIRS} + PATH_SUFFIXES glib-2.0/gobject/ + ) + +FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) +FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) +FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) +FIND_LIBRARY(_GLibs NAMES glib-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) + +SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} ) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR) + +MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs) diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake index adb34b51..fd3f62c4 100644 --- a/cmake/modules/Macros.cmake +++ b/cmake/modules/Macros.cmake @@ -1,3 +1,28 @@ +if(DBUS_BUILD_TESTS AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + find_file(WINE_EXECUTABLE + NAMES wine + PATHS /usr/bin /usr/local/bin + NO_CMAKE_FIND_ROOT_PATH + ) + find_file(HAVE_BINFMT_WINE_SUPPORT + NAMES DOSWin wine Wine windows Windows + PATHS /proc/sys/fs/binfmt_misc + NO_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if(WINE_EXECUTABLE AND HAVE_BINFMT_WINE_SUPPORT) + list(APPEND FOOTNOTES "NOTE: The requirements to run cross compiled applications on your host system are achieved. You may run 'make check'.") + endif() + if(NOT WINE_EXECUTABLE) + list(APPEND FOOTNOTES "NOTE: You may install the Windows emulator 'wine' to be able to run cross compiled test applications.") + endif() + if(NOT HAVE_BINFMT_WINE_SUPPORT) + list(APPEND FOOTNOTES "NOTE: You may activate binfmt_misc support for wine to be able to run cross compiled test applications.") + endif() + else() + list(APPEND FOOTNOTES "NOTE: You will not be able to run cross compiled applications on your host system.") + endif() +endif() MACRO(TIMESTAMP RESULT) if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") @@ -10,3 +35,28 @@ MACRO(TIMESTAMP RESULT) EXECUTE_PROCESS(COMMAND "date" "+%Y%m%d%H%M" OUTPUT_VARIABLE ${RESULT}) endif () ENDMACRO() + +macro(add_test_executable _target _source) + add_executable(${_target} ${_source}) + target_link_libraries(${_target} ${ARGN}) + if (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows") + # run tests with binfmt_misc + set(PREFIX "z:") + set(_env "DBUS_TEST_DAEMON=${PREFIX}${CMAKE_BINARY_DIR}/bin/dbus-daemon${EXEEXT}") + add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}>) + else() + set(PREFIX) + set(_env "DBUS_TEST_DAEMON=${CMAKE_BINARY_DIR}/bin/dbus-daemon${EXEEXT}") + add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}>) + endif() + list(APPEND _env "DBUS_SESSION_BUS_ADDRESS=") + list(APPEND _env "DBUS_FATAL_WARNINGS=1") + list(APPEND _env "DBUS_TEST_DATA=${PREFIX}${CMAKE_BINARY_DIR}/test/data") + list(APPEND _env "DBUS_TEST_HOMEDIR=${PREFIX}${CMAKE_BINARY_DIR}/dbus") + set_tests_properties(${_target} PROPERTIES ENVIRONMENT "${_env}") +endmacro(add_test_executable) + +macro(add_helper_executable _target _source) + add_executable(${_target} ${_source}) + target_link_libraries(${_target} ${ARGN}) +endmacro(add_helper_executable) diff --git a/cmake/modules/MacrosAutotools.cmake b/cmake/modules/MacrosAutotools.cmake index 68e8ae51..2b1c59d4 100644 --- a/cmake/modules/MacrosAutotools.cmake +++ b/cmake/modules/MacrosAutotools.cmake @@ -10,6 +10,9 @@ # ${prefix}_MAJOR_VERSION # ${prefix}_MINOR_VERSION # ${prefix}_MICRO_VERSION +# ${prefix}_LIBRARY_AGE +# ${prefix}_LIBRARY_REVISION +# ${prefix}_LIBRARY_CURRENT # macro(autoversion config prefix) file (READ ${config} _configure_ac) @@ -19,7 +22,9 @@ macro(autoversion config prefix) string (REGEX REPLACE ".*${prefix}_micro_version], .([0-9]+).*" "\\1" ${prefix_upper}_MICRO_VERSION ${_configure_ac}) set (${prefix_upper}_VERSION ${${prefix_upper}_MAJOR_VERSION}.${${prefix_upper}_MINOR_VERSION}.${${prefix_upper}_MICRO_VERSION}) set (${prefix_upper}_VERSION_STRING "${${prefix_upper}_VERSION}") - + string (REGEX REPLACE ".*LT_AGE=([0-9]+).*" "\\1" ${prefix_upper}_LIBRARY_AGE ${_configure_ac}) + string (REGEX REPLACE ".*LT_CURRENT=([0-9]+).*" "\\1" ${prefix_upper}_LIBRARY_CURRENT ${_configure_ac}) + string (REGEX REPLACE ".*LT_REVISION=([0-9]+).*" "\\1" ${prefix_upper}_LIBRARY_REVISION ${_configure_ac}) endmacro() # diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index 8657e4c7..13f639b1 100644 --- a/cmake/test/CMakeLists.txt +++ b/cmake/test/CMakeLists.txt @@ -1,7 +1,10 @@ -project(test) add_definitions(${DBUS_INTERNAL_CLIENT_DEFINITIONS}) +include_directories(${CMAKE_SOURCE_DIR}/../test) + +set(DBUS_SESSION_BUS_LISTEN_ADDRESS ${TEST_LISTEN}) + add_library(dbus-testutils STATIC ${CMAKE_SOURCE_DIR}/../test/test-utils.h ${CMAKE_SOURCE_DIR}/../test/test-utils.c @@ -10,6 +13,10 @@ target_link_libraries(dbus-testutils ${DBUS_INTERNAL_LIBRARIES}) add_subdirectory( name-test ) +set (manual-dir-iter_SOURCES + ${CMAKE_SOURCE_DIR}/../test/manual-dir-iter.c +) + set (test-service_SOURCES ${CMAKE_SOURCE_DIR}/../test/test-service.c ) @@ -26,11 +33,11 @@ set (test-shell-service_SOURCES ${CMAKE_SOURCE_DIR}/../test/test-shell-service.c ) -set (shell-test_SOURCES +set (test-shell_SOURCES ${CMAKE_SOURCE_DIR}/../test/shell-test.c ) -set (spawn-test_SOURCES +set (test-spawn_SOURCES ${CMAKE_SOURCE_DIR}/../test/spawn-test.c ) @@ -46,30 +53,41 @@ set (test-sleep-forever_SOURCES ${CMAKE_SOURCE_DIR}/../test/test-sleep-forever.c ) -add_executable(test-service ${test-service_SOURCES}) -target_link_libraries(test-service dbus-testutils) - -add_executable(test-names ${test-names_SOURCES}) -target_link_libraries(test-names dbus-testutils) - -add_executable(shell-test ${shell-test_SOURCES}) -target_link_libraries(shell-test ${DBUS_INTERNAL_LIBRARIES}) -ADD_TEST(shell-test ${EXECUTABLE_OUTPUT_PATH}/shell-test${EXEEXT}) - -add_executable(test-shell-service ${test-shell-service_SOURCES}) -target_link_libraries(test-shell-service dbus-testutils) - -add_executable(spawn-test ${spawn-test_SOURCES}) -target_link_libraries(spawn-test ${DBUS_INTERNAL_LIBRARIES}) - -add_executable(test-exit ${test-exit_SOURCES}) -target_link_libraries(test-exit ${DBUS_INTERNAL_LIBRARIES}) - -add_executable(test-segfault ${test-segfault_SOURCES}) -target_link_libraries(test-segfault ${DBUS_INTERNAL_LIBRARIES}) - -add_executable(test-sleep-forever ${test-sleep-forever_SOURCES}) -target_link_libraries(test-sleep-forever ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(manual-dir-iter ${manual-dir-iter_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-service ${test-service_SOURCES} dbus-testutils) +add_helper_executable(test-names ${test-names_SOURCES} dbus-testutils) +add_test_executable(test-shell ${test-shell_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +add_test_executable(test-printf ${CMAKE_SOURCE_DIR}/../test/internals/printf.c dbus-testutils) +add_helper_executable(test-shell-service ${test-shell-service_SOURCES} dbus-testutils) +add_helper_executable(test-spawn ${test-spawn_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-exit ${test-exit_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-segfault ${test-segfault_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-sleep-forever ${test-sleep-forever_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) + +if(DBUS_WITH_GLIB) + message(STATUS "with glib test apps") + add_definitions( + ${GLIB2_DEFINITIONS} + ${GOBJECT_DEFINITIONS} + ) + include_directories( + ${GLIB2_INCLUDE_DIR} + ${GOBJECT_INCLUDE_DIR} + ${CMAKE_SOURCE_DIR}/../test + ) + set(TEST_LIBRARIES ${DBUS_INTERNAL_LIBRARIES} dbus-testutils ${GLIB2_LIBRARIES} ${GOBJECT_LIBRARIES}) + + add_test_executable(test-corrupt ${CMAKE_SOURCE_DIR}/../test/corrupt.c ${TEST_LIBRARIES}) + add_test_executable(test-dbus-daemon ${CMAKE_SOURCE_DIR}/../test/dbus-daemon.c ${TEST_LIBRARIES}) + add_test_executable(test-dbus-daemon-eavesdrop ${CMAKE_SOURCE_DIR}/../test/dbus-daemon-eavesdrop.c ${TEST_LIBRARIES}) + add_test_executable(test-loopback ${CMAKE_SOURCE_DIR}/../test/loopback.c ${TEST_LIBRARIES}) + add_test_executable(test-marshal ${CMAKE_SOURCE_DIR}/../test/marshal.c ${TEST_LIBRARIES}) + add_test_executable(test-refs ${CMAKE_SOURCE_DIR}/../test/internals/refs.c ${TEST_LIBRARIES}) + add_test_executable(test-relay ${CMAKE_SOURCE_DIR}/../test/relay.c ${TEST_LIBRARIES}) + add_test_executable(test-syntax ${CMAKE_SOURCE_DIR}/../test/syntax.c ${TEST_LIBRARIES}) + add_test_executable(test-syslog ${CMAKE_SOURCE_DIR}/../test/internals/syslog.c ${TEST_LIBRARIES}) + add_helper_executable(manual-authz ${CMAKE_SOURCE_DIR}/../test/manual-authz.c ${TEST_LIBRARIES}) +endif() ### keep these in creation order, i.e. uppermost dirs first set (TESTDIRS @@ -81,6 +99,7 @@ set (TESTDIRS test/data/sha-1 test/data/valid-config-files test/data/valid-config-files/basic.d + test/data/valid-config-files/session.d test/data/valid-config-files/system.d test/data/valid-config-files-system test/data/valid-introspection-files @@ -139,17 +158,18 @@ ENDFOREACH(FILE_TYPE) MESSAGE(STATUS "Copying generated bus config files to test directory") set (OUTDIR ${CMAKE_BINARY_DIR}/test/data/valid-config-files) -FILE(GLOB FILES "${CMAKE_BINARY_DIR}/bus/*.conf" ) +FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../bus/*.conf.in" ) FILE(MAKE_DIRECTORY ${OUTDIR}) FOREACH(FILE ${FILES}) GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME) + STRING(REGEX REPLACE "\\.in$" "" FILENAME ${FILENAME}) SET (TARGET ${OUTDIR}/${FILENAME}) - configure_file(${FILE} ${TARGET} COPYONLY) + configure_file(${FILE} ${TARGET} @ONLY) IF (CONFIG_VERBOSE) MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n") ENDIF (CONFIG_VERBOSE) ENDFOREACH(FILE) -# todo: for installation the TEST_..._BINARY variables must reflect the -# installation dir or has to be defined relative -# +add_custom_target(check + COMMAND ctest -R ^test-.* +) diff --git a/cmake/test/name-test/CMakeLists.txt b/cmake/test/name-test/CMakeLists.txt index bf096ba7..befb28f9 100644 --- a/cmake/test/name-test/CMakeLists.txt +++ b/cmake/test/name-test/CMakeLists.txt @@ -4,36 +4,12 @@ set (NAMEtest-DIR ../../../test/name-test) add_definitions(${DBUS_INTERNAL_CLIENT_DEFINITIONS}) -add_executable(test-pending-call-dispatch ${NAMEtest-DIR}/test-pending-call-dispatch.c) -target_link_libraries(test-pending-call-dispatch ${DBUS_INTERNAL_LIBRARIES}) -ADD_TEST(test-pending-call-dispatch ${EXECUTABLE_OUTPUT_PATH}/test-pending-call-dispatch) - -add_executable(test-pending-call-timeout ${NAMEtest-DIR}/test-pending-call-timeout.c) -target_link_libraries(test-pending-call-timeout ${DBUS_INTERNAL_LIBRARIES}) -ADD_TEST(test-pending-call-timeout ${EXECUTABLE_OUTPUT_PATH}/test-pending-call-timeout) - -add_executable(test-thread-init ${NAMEtest-DIR}/test-threads-init.c) -target_link_libraries(test-thread-init ${DBUS_INTERNAL_LIBRARIES}) -ADD_TEST(test-thread-init ${EXECUTABLE_OUTPUT_PATH}/test-thread-init) - -add_executable(test-ids ${NAMEtest-DIR}/test-ids.c) -target_link_libraries(test-ids ${DBUS_INTERNAL_LIBRARIES}) -ADD_TEST(test-ids ${EXECUTABLE_OUTPUT_PATH}/test-ids) - -add_executable(test-shutdown ${NAMEtest-DIR}/test-shutdown.c) -target_link_libraries(test-shutdown dbus-testutils) -ADD_TEST(test-shutdown ${EXECUTABLE_OUTPUT_PATH}/test-shutdown) - -add_executable(test-privserver ${NAMEtest-DIR}/test-privserver.c) -target_link_libraries(test-privserver dbus-testutils) -ADD_TEST(test-privserver ${EXECUTABLE_OUTPUT_PATH}/test-privserver) - -add_executable(test-privserver-client ${NAMEtest-DIR}/test-privserver-client.c) -target_link_libraries(test-privserver-client dbus-testutils) -ADD_TEST(test-privserver-client ${EXECUTABLE_OUTPUT_PATH}/test-privserver-client) - -add_executable(test-autolaunch ${NAMEtest-DIR}/test-autolaunch.c) -target_link_libraries(test-autolaunch dbus-testutils) -ADD_TEST(test-autolaunch ${EXECUTABLE_OUTPUT_PATH}/test-autolaunch) - +add_helper_executable(test-pending-call-dispatch ${NAMEtest-DIR}/test-pending-call-dispatch.c ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-pending-call-timeout ${NAMEtest-DIR}/test-pending-call-timeout.c ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-thread-init ${NAMEtest-DIR}/test-threads-init.c ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-ids ${NAMEtest-DIR}/test-ids.c ${DBUS_INTERNAL_LIBRARIES}) +add_helper_executable(test-shutdown ${NAMEtest-DIR}/test-shutdown.c dbus-testutils) +add_helper_executable(test-privserver ${NAMEtest-DIR}/test-privserver.c dbus-testutils) +add_helper_executable(test-privserver-client ${NAMEtest-DIR}/test-privserver-client.c dbus-testutils) +add_helper_executable(test-autolaunch ${NAMEtest-DIR}/test-autolaunch.c dbus-testutils) endif (DBUS_ENABLE_EMBEDDED_TESTS) diff --git a/cmake/tools/CMakeLists.txt b/cmake/tools/CMakeLists.txt index 101c7e60..9f363b7a 100644 --- a/cmake/tools/CMakeLists.txt +++ b/cmake/tools/CMakeLists.txt @@ -1,5 +1,3 @@ -project(tools) - set (dbus_send_SOURCES ../../tools/dbus-print-message.c ../../tools/dbus-print-message.h @@ -47,3 +45,6 @@ install_targets(/bin dbus-launch ) add_executable(dbus-monitor ${dbus_monitor_SOURCES}) target_link_libraries(dbus-monitor ${DBUS_LIBRARIES}) install_targets(/bin dbus-monitor ) + +# create the /var/lib/dbus directory for dbus-uuidgen +install(DIRECTORY DESTINATION var/lib/dbus) diff --git a/config.guess b/config.guess index b79252d6..1f5c50c0 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-06-10' +timestamp='2014-03-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -149,7 +149,7 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac @@ -826,7 +826,7 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -969,10 +969,10 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} exit ;; - or32:Linux:*:*) + or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) @@ -1260,16 +1260,26 @@ EOF if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; @@ -1361,154 +1371,6 @@ EOF exit ;; esac -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <<EOF $0: unable to guess system type diff --git a/config.h.in b/config.h.in index 7f9a1f32..e7ff3e4c 100644 --- a/config.h.in +++ b/config.h.in @@ -39,9 +39,6 @@ /* Directory for installing DBUS data files */ #undef DBUS_DATADIR -/* Default for dbus_connection_get_max_message_unix_fds() */ -#undef DBUS_DEFAULT_MESSAGE_UNIX_FDS - /* Disable assertion checking */ #undef DBUS_DISABLE_ASSERT @@ -129,10 +126,13 @@ /* Define if GLib, GObject, GIO are available */ #undef DBUS_WITH_GLIB +/* The maximum number of connections that can be handled at once */ +#undef FD_SETSIZE + /* The name of the gettext domain */ #undef GETTEXT_PACKAGE -/* Prevent post-2.32 APIs */ +/* Prevent post-2.38 APIs */ #undef GLIB_VERSION_MAX_ALLOWED /* Ignore post-2.26 deprecations */ @@ -153,7 +153,7 @@ /* Define to 1 if you have the <alloca.h> header file. */ #undef HAVE_ALLOCA_H -/* Define to 1 if you have the `backtrace' function. */ +/* Define to 1 if you have backtrace(). */ #undef HAVE_BACKTRACE /* Define to 1 if you have the <byteswap.h> header file. */ @@ -215,6 +215,9 @@ /* Define to 1 if you have the `getresuid' function. */ #undef HAVE_GETRESUID +/* Define to 1 if you have the `getrlimit' function. */ +#undef HAVE_GETRLIMIT + /* Have GNU-style varargs macros */ #undef HAVE_GNUC_VARARGS @@ -266,6 +269,12 @@ /* Have POSIX function getpwnam_r */ #undef HAVE_POSIX_GETPWNAM_R +/* Define to 1 if you have the `prctl' function. */ +#undef HAVE_PRCTL + +/* Define to 1 if you have the `raise' function. */ +#undef HAVE_RAISE + /* SELinux support */ #undef HAVE_SELINUX @@ -314,6 +323,9 @@ /* Define to 1 if you have the <sys/inotify.h> header file. */ #undef HAVE_SYS_INOTIFY_H +/* Define to 1 if you have the <sys/prctl.h> header file. */ +#undef HAVE_SYS_PRCTL_H + /* Define to 1 if you have the <sys/resource.h> header file. */ #undef HAVE_SYS_RESOURCE_H @@ -357,9 +369,6 @@ */ #undef LT_OBJDIR -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-08-10' +timestamp='2014-09-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -265,6 +265,7 @@ case $basic_machine in | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -282,8 +283,10 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -295,11 +298,11 @@ case $basic_machine in | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or1k | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -324,7 +327,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -381,6 +384,7 @@ case $basic_machine in | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -400,8 +404,10 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -413,6 +419,7 @@ case $basic_machine in | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -822,6 +829,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1367,14 +1378,14 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1592,9 +1603,6 @@ case $basic_machine in mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dbus 1.7.8. +# Generated by GNU Autoconf 2.69 for dbus 1.9.0. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=dbus>. # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dbus' PACKAGE_TARNAME='dbus' -PACKAGE_VERSION='1.7.8' -PACKAGE_STRING='dbus 1.7.8' +PACKAGE_VERSION='1.9.0' +PACKAGE_STRING='dbus 1.9.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=dbus' PACKAGE_URL='' @@ -632,6 +632,8 @@ ac_includes_default="\ # include <unistd.h> #endif" +ac_header_list= +ac_func_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -690,7 +692,6 @@ X_PRE_LIBS X_CFLAGS XMKMF LIBDBUS_LIBS -DEFAULT_MESSAGE_UNIX_FDS VALGRIND_LIBS VALGRIND_CFLAGS NETWORK_libs @@ -814,14 +815,14 @@ DBUS_MAJOR_VERSION LT_AGE LT_REVISION LT_CURRENT -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE GETTEXT_PACKAGE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -894,8 +895,8 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -enable_maintainer_mode enable_silent_rules +enable_maintainer_mode enable_dependency_tracking enable_shared enable_static @@ -1512,7 +1513,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dbus 1.7.8 to adapt to many kinds of systems. +\`configure' configures dbus 1.9.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1586,7 +1587,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dbus 1.7.8:";; + short | recursive ) echo "Configuration of dbus 1.9.0:";; esac cat <<\_ACEOF @@ -1594,12 +1595,15 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-maintainer-mode disable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --disable-maintainer-mode + disable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1637,7 +1641,7 @@ Optional Features: --enable-x11-autolaunch build with X11 auto-launch support --disable-Werror compile without -Werror (normally enabled in development builds) - --enable-stats enable bus daemon usage statistics + --disable-stats disable bus daemon usage statistics Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1780,7 +1784,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dbus configure 1.7.8 +dbus configure 1.9.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2499,7 +2503,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dbus $as_me 1.7.8, which was +It was created by dbus $as_me 1.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2779,6 +2783,9 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_header_list " sys/prctl.h" +as_fn_append ac_func_list " prctl" +as_fn_append ac_func_list " raise" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2953,7 +2960,7 @@ ac_config_headers="$ac_config_headers config.h" -am__api_version='1.11' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3050,9 +3057,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3063,32 +3067,40 @@ case `pwd` in esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -3100,6 +3112,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -3122,12 +3144,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -3139,10 +3161,10 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -3281,12 +3303,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -3369,6 +3385,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3391,7 +3446,7 @@ fi # Define the identity of the package. PACKAGE='dbus' - VERSION='1.7.8' + VERSION='1.9.0' cat >>confdefs.h <<_ACEOF @@ -3419,6 +3474,12 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used @@ -3426,86 +3487,125 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR='$${TAR-tar}' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } -# Loop over all known methods to create a tar archive until one works. +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' -_am_tools=${am_cv_prog_tar_ustar-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 + +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5 + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5 ($am__untar <conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir -if ${am_cv_prog_tar_ustar+:} false; then : + if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } @@ -3513,6 +3613,49 @@ $as_echo "$am_cv_prog_tar_ustar" >&6; } +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: <http://www.gnu.org/software/coreutils/>. + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + GETTEXT_PACKAGE=dbus-1 @@ -3552,10 +3695,10 @@ if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 @@ -3599,25 +3742,25 @@ _ACEOF # ## increment if the interface has additions, changes, removals. -LT_CURRENT=11 +LT_CURRENT=12 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=3 +LT_REVISION=0 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has ## precedence over adding, so set to 0 if both happened. -LT_AGE=8 +LT_AGE=9 DBUS_MAJOR_VERSION=1 -DBUS_MINOR_VERSION=7 -DBUS_MICRO_VERSION=8 -DBUS_VERSION=1.7.8 +DBUS_MINOR_VERSION=9 +DBUS_MICRO_VERSION=0 +DBUS_VERSION=1.9.0 @@ -4412,6 +4555,65 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4431,7 +4633,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -4487,8 +4689,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -4523,16 +4725,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4541,8 +4743,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -4550,7 +4752,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -4604,131 +4806,6 @@ else fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -4998,8 +5075,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -5034,16 +5111,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -5052,8 +5129,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -5061,7 +5138,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -7989,7 +8066,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -8014,7 +8091,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -8033,7 +8113,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -16448,6 +16531,11 @@ if test "$dbus_win" = yes; then $as_echo "#define DBUS_WIN 1" >>confdefs.h + # Yes, on Windows it really does work like this. + # http://support.microsoft.com/kb/111855 + +$as_echo "#define FD_SETSIZE 8192" >>confdefs.h + BUILD_TIMESTAMP=`date --iso-8601=minutes` # Assume DBUS_VERSION is always three numbers @@ -16835,7 +16923,7 @@ fi $as_echo "#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_26" >>confdefs.h -$as_echo "#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_32" >>confdefs.h +$as_echo "#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_38" >>confdefs.h with_glib=yes @@ -17078,8 +17166,8 @@ $as_echo "$as_me: Full test coverage (--enable-tests=yes) requires Python, dbus- if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.6" >&5 -$as_echo_n "checking whether $PYTHON version >= 2.6... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.6" >&5 +$as_echo_n "checking whether $PYTHON version is >= 2.6... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. @@ -17097,7 +17185,9 @@ sys.exit(sys.hexversion < minverhex)" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - as_fn_error $? "too old" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else @@ -17109,7 +17199,7 @@ if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -17216,6 +17306,25 @@ $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# <https://github.com/pypa/virtualenv/issues/118> +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 @@ -17229,7 +17338,14 @@ else else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -17266,7 +17382,14 @@ else else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -17316,8 +17439,8 @@ else if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.6" >&5 -$as_echo_n "checking whether $PYTHON version >= 2.6... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.6" >&5 +$as_echo_n "checking whether $PYTHON version is >= 2.6... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. @@ -17335,7 +17458,9 @@ sys.exit(sys.hexversion < minverhex)" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - as_fn_error $? "too old" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Python interpreter is too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else @@ -17347,7 +17472,7 @@ if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -17454,6 +17579,25 @@ $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# <https://github.com/pypa/virtualenv/issues/118> +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[:3] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 @@ -17467,7 +17611,14 @@ else else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -17504,7 +17655,14 @@ else else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -18516,7 +18674,7 @@ fi fi -for ac_func in vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull issetugid getresuid +for ac_func in vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull issetugid getresuid getrlimit do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -18556,6 +18714,48 @@ _ACEOF fi +# For test-segfault.c + + + + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + for ac_func in $ac_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + #### Check for broken poll; taken from Glib's configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll" >&5 @@ -18706,16 +18906,63 @@ if test "x$ac_cv_header_execinfo_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_EXECINFO_H 1 _ACEOF - for ac_func in backtrace -do : - ac_fn_c_check_func "$LINENO" "backtrace" "ac_cv_func_backtrace" -if test "x$ac_cv_func_backtrace" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BACKTRACE 1 -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 +$as_echo_n "checking for library containing backtrace... " >&6; } +if ${ac_cv_search_backtrace+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char backtrace (); +int +main () +{ +return backtrace (); + ; + return 0; +} +_ACEOF +for ac_lib in '' execinfo; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_backtrace=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_backtrace+:} false; then : + break fi done +if ${ac_cv_search_backtrace+:} false; then : + +else + ac_cv_search_backtrace=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 +$as_echo "$ac_cv_search_backtrace" >&6; } +ac_res=$ac_cv_search_backtrace +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_BACKTRACE 1" >>confdefs.h + +fi fi @@ -19250,123 +19497,6 @@ fi # unix:path=/foo or unix:abstract=/foo - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - #### Sort out XML library { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate_MM in -lexpat" >&5 @@ -20210,6 +20340,131 @@ if test -n "$SYSTEMD_CFLAGS"; then pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_LIBS"; then + pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsystemd >= 209" 2>&1` + else + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsystemd >= 209" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 +$as_echo_n "checking for SYSTEMD... " >&6; } + +if test -n "$SYSTEMD_CFLAGS"; then + pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_LIBS"; then + pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32" 2>&1` + else + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_systemd=no +elif test $pkg_failed = untried; then + have_systemd=no +else + SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS + SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_systemd=yes +fi +elif test $pkg_failed = untried; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 +$as_echo_n "checking for SYSTEMD... " >&6; } + +if test -n "$SYSTEMD_CFLAGS"; then + pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32") 2>&5 ac_status=$? @@ -20268,6 +20523,13 @@ else $as_echo "yes" >&6; } have_systemd=yes fi +else + SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS + SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_systemd=yes +fi fi if test x$have_systemd = xyes; then @@ -20586,24 +20848,8 @@ $as_echo "#define WITH_VALGRIND 1" >>confdefs.h fi -# Determine maximum number of Unix fds which may be passed -case $host_os in #( - *qnx*) : - DEFAULT_MESSAGE_UNIX_FDS=256 ;; #( - *) : - DEFAULT_MESSAGE_UNIX_FDS=1024 ;; #( - *) : - ;; -esac - -cat >>confdefs.h <<_ACEOF -#define DBUS_DEFAULT_MESSAGE_UNIX_FDS $DEFAULT_MESSAGE_UNIX_FDS -_ACEOF - - - #### Set up final flags -LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs" +LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $SYSTEMD_LIBS" ### X11 detection @@ -22251,7 +22497,7 @@ if test "x$with_systemdsystemunitdir" != xno; then systemdsystemunitdir=$with_systemdsystemunitdir fi - if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then + if test "x$have_systemd" != "xno" -a -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then HAVE_SYSTEMD_TRUE= HAVE_SYSTEMD_FALSE='#' else @@ -22583,7 +22829,7 @@ fi if test "${enable_stats+set}" = set; then : enableval=$enable_stats; else - enable_stats=no + enable_stats=yes fi if test "x$enable_stats" = xyes; then @@ -22592,7 +22838,7 @@ $as_echo "#define DBUS_ENABLE_STATS 1" >>confdefs.h fi -ac_config_files="$ac_config_files Doxyfile dbus/versioninfo.rc dbus/dbus-arch-deps.h bus/system.conf bus/session.conf bus/messagebus bus/messagebus-config bus/org.freedesktop.dbus-session.plist bus/rc.messagebus bus/dbus.service bus/dbus.socket Makefile dbus/Makefile bus/Makefile tools/Makefile test/Makefile test/name-test/Makefile doc/Makefile doc/dbus-cleanup-sockets.1.xml doc/dbus-daemon.1.xml doc/dbus-launch.1.xml doc/dbus-monitor.1.xml doc/dbus-run-session.1.xml doc/dbus-send.1.xml doc/dbus-uuidgen.1.xml dbus-1.pc dbus-1-uninstalled.pc test/data/valid-config-files/debug-allow-all.conf test/data/valid-config-files/debug-allow-all-sha1.conf test/data/valid-config-files/incoming-limit.conf test/data/valid-config-files-system/debug-allow-all-pass.conf test/data/valid-config-files-system/debug-allow-all-fail.conf test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service" +ac_config_files="$ac_config_files Doxyfile dbus/versioninfo.rc dbus/dbus-arch-deps.h bus/system.conf bus/session.conf bus/example-system-enable-stats.conf bus/example-session-disable-stats.conf bus/messagebus bus/messagebus-config bus/org.freedesktop.dbus-session.plist bus/rc.messagebus bus/dbus.service bus/dbus.socket Makefile dbus/Makefile bus/Makefile tools/Makefile test/Makefile test/name-test/Makefile doc/Makefile doc/dbus-cleanup-sockets.1.xml doc/dbus-daemon.1.xml doc/dbus-launch.1.xml doc/dbus-monitor.1.xml doc/dbus-run-session.1.xml doc/dbus-send.1.xml doc/dbus-uuidgen.1.xml dbus-1.pc dbus-1-uninstalled.pc test/data/valid-config-files/debug-allow-all.conf test/data/valid-config-files/debug-allow-all-sha1.conf test/data/valid-config-files/incoming-limit.conf test/data/valid-config-files-system/debug-allow-all-pass.conf test/data/valid-config-files-system/debug-allow-all-fail.conf test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -22703,6 +22949,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -23221,7 +23475,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dbus $as_me 1.7.8, which was +This file was extended by dbus $as_me 1.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23287,7 +23541,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dbus config.status 1.7.8 +dbus config.status 1.9.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -23885,6 +24139,8 @@ do "dbus/dbus-arch-deps.h") CONFIG_FILES="$CONFIG_FILES dbus/dbus-arch-deps.h" ;; "bus/system.conf") CONFIG_FILES="$CONFIG_FILES bus/system.conf" ;; "bus/session.conf") CONFIG_FILES="$CONFIG_FILES bus/session.conf" ;; + "bus/example-system-enable-stats.conf") CONFIG_FILES="$CONFIG_FILES bus/example-system-enable-stats.conf" ;; + "bus/example-session-disable-stats.conf") CONFIG_FILES="$CONFIG_FILES bus/example-session-disable-stats.conf" ;; "bus/messagebus") CONFIG_FILES="$CONFIG_FILES bus/messagebus" ;; "bus/messagebus-config") CONFIG_FILES="$CONFIG_FILES bus/messagebus-config" ;; "bus/org.freedesktop.dbus-session.plist") CONFIG_FILES="$CONFIG_FILES bus/org.freedesktop.dbus-session.plist" ;; @@ -24521,7 +24777,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -24534,7 +24790,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -24568,21 +24824,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || diff --git a/configure.ac b/configure.ac index f759cf48..2f62269e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ dnl -*- mode: m4 -*- AC_PREREQ([2.63]) m4_define([dbus_major_version], [1]) -m4_define([dbus_minor_version], [7]) -m4_define([dbus_micro_version], [8]) +m4_define([dbus_minor_version], [9]) +m4_define([dbus_micro_version], [0]) m4_define([dbus_version], [dbus_major_version.dbus_minor_version.dbus_micro_version]) AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus]) @@ -33,16 +33,16 @@ AC_DEFINE_UNQUOTED(DBUS_DAEMON_NAME,"dbus-daemon",[Name of executable]) # ## increment if the interface has additions, changes, removals. -LT_CURRENT=11 +LT_CURRENT=12 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=3 +LT_REVISION=0 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has ## precedence over adding, so set to 0 if both happened. -LT_AGE=8 +LT_AGE=9 AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) @@ -99,6 +99,9 @@ esac # Special defines for certain platforms if test "$dbus_win" = yes; then AC_DEFINE(DBUS_WIN,1,[Defined if we run on a W32 API based system]) + # Yes, on Windows it really does work like this. + # http://support.microsoft.com/kb/111855 + AC_DEFINE(FD_SETSIZE,8192,[The maximum number of connections that can be handled at once]) BUILD_TIMESTAMP=`date --iso-8601=minutes` AC_SUBST(BUILD_TIMESTAMP) # Assume DBUS_VERSION is always three numbers @@ -205,7 +208,7 @@ fi # or binaries. AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_26], [Ignore post-2.26 deprecations]) -AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_32], [Prevent post-2.32 APIs]) +AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_38], [Prevent post-2.38 APIs]) with_glib=yes @@ -588,13 +591,17 @@ AC_DEFINE_UNQUOTED([DBUS_USE_SYNC], [$have_sync], [Use the gcc __sync extension] AC_SEARCH_LIBS(socket,[socket network]) AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)]) -AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull issetugid getresuid) +AC_CHECK_FUNCS([vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull issetugid getresuid getrlimit]) AC_CHECK_HEADERS([syslog.h]) if test "x$ac_cv_header_syslog_h" = "xyes"; then AC_CHECK_DECLS([LOG_PERROR], [], [], [[#include <syslog.h>]]) fi +# For test-segfault.c +AC_CHECK_HEADERS_ONCE([sys/prctl.h]) +AC_CHECK_FUNCS_ONCE([prctl raise]) + #### Check for broken poll; taken from Glib's configure AC_MSG_CHECKING([for broken poll]) @@ -662,7 +669,10 @@ AC_CHECK_HEADERS(sys/resource.h) AC_CHECK_HEADERS(dirent.h) -AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)]) +AC_CHECK_HEADERS([execinfo.h], + [AC_SEARCH_LIBS([backtrace], [execinfo], + [AC_DEFINE([HAVE_BACKTRACE], [1], + [Define to 1 if you have backtrace().])])]) AC_CHECK_HEADERS(errno.h) @@ -894,8 +904,6 @@ fi # unix:path=/foo or unix:abstract=/foo AC_SUBST(DBUS_PATH_OR_ABSTRACT) -PKG_PROG_PKG_CONFIG - #### Sort out XML library AC_CHECK_LIB(expat, XML_ParserCreate_MM, @@ -1142,10 +1150,13 @@ dnl systemd detection if test x$enable_systemd = xno ; then have_systemd=no; else - PKG_CHECK_MODULES(SYSTEMD, - [libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32], - have_systemd=yes, - have_systemd=no) + PKG_CHECK_MODULES([SYSTEMD], + [libsystemd >= 209], + [have_systemd=yes], + [PKG_CHECK_MODULES([SYSTEMD], + [libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32], + [have_systemd=yes], + [have_systemd=no])]) fi if test x$have_systemd = xyes; then @@ -1234,19 +1245,8 @@ if test x$with_valgrind != xno; then AC_DEFINE([WITH_VALGRIND], [1], [Define to add Valgrind instrumentation]) fi -# Determine maximum number of Unix fds which may be passed -AS_CASE([$host_os], - [*qnx*], - [DEFAULT_MESSAGE_UNIX_FDS=256], - [*], - [DEFAULT_MESSAGE_UNIX_FDS=1024]) -AC_DEFINE_UNQUOTED([DBUS_DEFAULT_MESSAGE_UNIX_FDS], - [$DEFAULT_MESSAGE_UNIX_FDS], - [Default for dbus_connection_get_max_message_unix_fds()]) -AC_SUBST([DEFAULT_MESSAGE_UNIX_FDS]) - #### Set up final flags -LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs" +LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $SYSTEMD_LIBS" AC_SUBST([LIBDBUS_LIBS]) ### X11 detection @@ -1499,7 +1499,7 @@ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service if test "x$with_systemdsystemunitdir" != xno; then AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) fi -AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) +AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" != "xno" -a -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) ##### Set up location for system bus socket if ! test -z "$with_system_socket"; then @@ -1736,9 +1736,9 @@ AH_VERBATIM(_DARWIN_ENVIRON, ]) AC_ARG_ENABLE([stats], - [AS_HELP_STRING([--enable-stats], - [enable bus daemon usage statistics])], - [], [enable_stats=no]) + [AS_HELP_STRING([--disable-stats], + [disable bus daemon usage statistics])], + [], [enable_stats=yes]) if test "x$enable_stats" = xyes; then AC_DEFINE([DBUS_ENABLE_STATS], [1], [Define to enable bus daemon usage statistics]) @@ -1750,6 +1750,8 @@ dbus/versioninfo.rc dbus/dbus-arch-deps.h bus/system.conf bus/session.conf +bus/example-system-enable-stats.conf +bus/example-session-disable-stats.conf bus/messagebus bus/messagebus-config bus/org.freedesktop.dbus-session.plist diff --git a/dbus/Makefile.am b/dbus/Makefile.am index 0f9033d1..442fd27c 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -12,10 +12,6 @@ AM_CPPFLAGS = \ -DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\" \ $(NULL) -# On Linux with glibc 2.17, sd-daemon.c support for POSIX message queues -# results in an otherwise unnecessary dependency on librt. Disable it. -AM_CPPFLAGS += -DSD_DAEMON_DISABLE_MQ - # if assertions are enabled, improve backtraces AM_LDFLAGS = @R_DYNAMIC_LDFLAG@ @@ -108,8 +104,7 @@ DBUS_SHARED_arch_sources = \ dbus-transport-unix.h \ dbus-userdb.c \ dbus-userdb.h \ - sd-daemon.c \ - sd-daemon.h + $(NULL) DBUS_UTIL_arch_sources = \ dbus-sysdeps-util-unix.c \ @@ -295,7 +290,7 @@ libdbus_internal_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DDBUS_STATIC_BUILD \ $(NULL) -libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS) $(SYSTEMD_LIBS) +libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS) if DBUS_WIN # This must be a separate convenience library, otherwise libtool notices @@ -312,18 +307,14 @@ noinst_PROGRAMS = if DBUS_ENABLE_EMBEDDED_TESTS # We can't actually run this til we've reached test/ -noinst_PROGRAMS += dbus-test +noinst_PROGRAMS += test-dbus endif -dbus_test_SOURCES= \ +test_dbus_SOURCES= \ dbus-test-main.c -dbus_test_LDADD = libdbus-internal.la +test_dbus_LDADD = libdbus-internal.la ## mop up the gcov files clean-local: /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true - -update-systemd: - curl http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/sd-daemon.c > $(srcdir)/sd-daemon.c - curl http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h > $(srcdir)/sd-daemon.h diff --git a/dbus/Makefile.in b/dbus/Makefile.in index 43bc1ef4..3205e165 100644 --- a/dbus/Makefile.in +++ b/dbus/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -65,11 +92,11 @@ host_triplet = @host@ noinst_PROGRAMS = $(am__EXEEXT_1) # We can't actually run this til we've reached test/ -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__append_5 = dbus-test +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__append_5 = test-dbus subdir = dbus -DIST_COMMON = $(dbusinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/dbus-arch-deps.h.in \ - $(srcdir)/versioninfo.rc.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/versioninfo.rc.in $(srcdir)/dbus-arch-deps.h.in \ + $(top_srcdir)/depcomp $(dbusinclude_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -145,10 +172,9 @@ am__libdbus_1_la_SOURCES_DIST = dbus-address.c dbus-auth.c dbus-auth.h \ dbus-server-launchd.c dbus-file-unix.c dbus-pipe-unix.c \ dbus-sysdeps-unix.c dbus-sysdeps-unix.h dbus-sysdeps-pthread.c \ dbus-transport-unix.c dbus-transport-unix.h dbus-userdb.c \ - dbus-userdb.h sd-daemon.c sd-daemon.h \ - dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c \ - dbus-file-win.c dbus-pipe-win.c dbus-sockets-win.h \ - dbus-sysdeps-win.c dbus-sysdeps-win.h \ + dbus-userdb.h dbus-sysdeps-wince-glue.h \ + dbus-sysdeps-wince-glue.c dbus-file-win.c dbus-pipe-win.c \ + dbus-sockets-win.h dbus-sysdeps-win.c dbus-sysdeps-win.h \ dbus-sysdeps-thread-win.c dbus-transport-win.c \ dbus-transport-win.h dbus-sysdeps.c dbus-sysdeps.h \ dbus-valgrind-internal.h @@ -182,8 +208,7 @@ am__objects_2 = libdbus_1_la-dbus-address.lo libdbus_1_la-dbus-auth.lo \ @DBUS_WIN_FALSE@ libdbus_1_la-dbus-sysdeps-unix.lo \ @DBUS_WIN_FALSE@ libdbus_1_la-dbus-sysdeps-pthread.lo \ @DBUS_WIN_FALSE@ libdbus_1_la-dbus-transport-unix.lo \ -@DBUS_WIN_FALSE@ libdbus_1_la-dbus-userdb.lo \ -@DBUS_WIN_FALSE@ libdbus_1_la-sd-daemon.lo +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-userdb.lo @DBUS_WIN_TRUE@am__objects_5 = $(am__objects_4) \ @DBUS_WIN_TRUE@ libdbus_1_la-dbus-file-win.lo \ @DBUS_WIN_TRUE@ libdbus_1_la-dbus-pipe-win.lo \ @@ -202,6 +227,7 @@ libdbus_1_la_OBJECTS = $(am_libdbus_1_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libdbus_1_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdbus_1_la_LDFLAGS) $(LDFLAGS) -o $@ @@ -211,7 +237,7 @@ am__libdbus_init_win_la_SOURCES_DIST = dbus-init-win.cpp libdbus_init_win_la_OBJECTS = $(am_libdbus_init_win_la_OBJECTS) @DBUS_WIN_TRUE@am_libdbus_init_win_la_rpath = libdbus_internal_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__append_4) + $(am__append_4) am__libdbus_internal_la_SOURCES_DIST = dbus-address.c dbus-auth.c \ dbus-auth.h dbus-bus.c dbus-connection.c \ dbus-connection-internal.h dbus-credentials.c \ @@ -242,10 +268,9 @@ am__libdbus_internal_la_SOURCES_DIST = dbus-address.c dbus-auth.c \ dbus-server-launchd.c dbus-file-unix.c dbus-pipe-unix.c \ dbus-sysdeps-unix.c dbus-sysdeps-unix.h dbus-sysdeps-pthread.c \ dbus-transport-unix.c dbus-transport-unix.h dbus-userdb.c \ - dbus-userdb.h sd-daemon.c sd-daemon.h \ - dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c \ - dbus-file-win.c dbus-pipe-win.c dbus-sockets-win.h \ - dbus-sysdeps-win.c dbus-sysdeps-win.h \ + dbus-userdb.h dbus-sysdeps-wince-glue.h \ + dbus-sysdeps-wince-glue.c dbus-file-win.c dbus-pipe-win.c \ + dbus-sockets-win.h dbus-sysdeps-win.c dbus-sysdeps-win.h \ dbus-sysdeps-thread-win.c dbus-transport-win.c \ dbus-transport-win.h dbus-sysdeps.c dbus-sysdeps.h \ dbus-valgrind-internal.h dbus-asv-util.c dbus-asv-util.h \ @@ -298,8 +323,7 @@ am__objects_8 = libdbus_internal_la-dbus-address.lo \ @DBUS_WIN_FALSE@ libdbus_internal_la-dbus-sysdeps-unix.lo \ @DBUS_WIN_FALSE@ libdbus_internal_la-dbus-sysdeps-pthread.lo \ @DBUS_WIN_FALSE@ libdbus_internal_la-dbus-transport-unix.lo \ -@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-userdb.lo \ -@DBUS_WIN_FALSE@ libdbus_internal_la-sd-daemon.lo +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-userdb.lo @DBUS_WIN_TRUE@am__objects_11 = $(am__objects_10) \ @DBUS_WIN_TRUE@ libdbus_internal_la-dbus-file-win.lo \ @DBUS_WIN_TRUE@ libdbus_internal_la-dbus-pipe-win.lo \ @@ -346,11 +370,23 @@ am__objects_15 = libdbus_internal_la-dbus-asv-util.lo \ am_libdbus_internal_la_OBJECTS = $(am__objects_8) $(am__objects_12) \ $(am__objects_15) libdbus_internal_la_OBJECTS = $(am_libdbus_internal_la_OBJECTS) -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = dbus-test$(EXEEXT) +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = test-dbus$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) -am_dbus_test_OBJECTS = dbus-test-main.$(OBJEXT) -dbus_test_OBJECTS = $(am_dbus_test_OBJECTS) -dbus_test_DEPENDENCIES = libdbus-internal.la +am_test_dbus_OBJECTS = dbus-test-main.$(OBJEXT) +test_dbus_OBJECTS = $(am_test_dbus_OBJECTS) +test_dbus_DEPENDENCIES = libdbus-internal.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -363,17 +399,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ @@ -382,28 +417,44 @@ LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) -am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) -am__v_CXXLD_0 = @echo " CXXLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = SOURCES = $(libdbus_1_la_SOURCES) $(libdbus_init_win_la_SOURCES) \ - $(libdbus_internal_la_SOURCES) $(dbus_test_SOURCES) + $(libdbus_internal_la_SOURCES) $(test_dbus_SOURCES) DIST_SOURCES = $(am__libdbus_1_la_SOURCES_DIST) \ $(am__libdbus_init_win_la_SOURCES_DIST) \ - $(am__libdbus_internal_la_SOURCES_DIST) $(dbus_test_SOURCES) + $(am__libdbus_internal_la_SOURCES_DIST) $(test_dbus_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(dbusinclude_HEADERS) $(nodist_dbusarchinclude_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -459,7 +510,6 @@ DBUS_USER = @DBUS_USER@ DBUS_VERSION = @DBUS_VERSION@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ -DEFAULT_MESSAGE_UNIX_FDS = @DEFAULT_MESSAGE_UNIX_FDS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -613,15 +663,17 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ configdir = $(sysconfdir)/dbus-1 - -# On Linux with glibc 2.17, sd-daemon.c support for POSIX message queues -# results in an otherwise unnecessary dependency on librt. Disable it. -AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(SYSTEMD_CFLAGS) \ - $(VALGRIND_CFLAGS) -DDBUS_COMPILATION \ +AM_CPPFLAGS = \ + -I$(top_builddir) \ + -I$(top_srcdir) \ + $(SYSTEMD_CFLAGS) \ + $(VALGRIND_CFLAGS) \ + -DDBUS_COMPILATION \ -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \ -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \ -DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\" \ - $(NULL) -DSD_DAEMON_DISABLE_MQ + $(NULL) + # if assertions are enabled, improve backtraces AM_LDFLAGS = @R_DYNAMIC_LDFLAG@ @@ -671,8 +723,7 @@ lib_LTLIBRARIES = libdbus-1.la @DBUS_WIN_FALSE@ dbus-transport-unix.h \ @DBUS_WIN_FALSE@ dbus-userdb.c \ @DBUS_WIN_FALSE@ dbus-userdb.h \ -@DBUS_WIN_FALSE@ sd-daemon.c \ -@DBUS_WIN_FALSE@ sd-daemon.h +@DBUS_WIN_FALSE@ $(NULL) @DBUS_WIN_TRUE@DBUS_SHARED_arch_sources = \ @DBUS_WIN_TRUE@ $(wince_source) \ @@ -866,13 +917,12 @@ libdbus_internal_la_CPPFLAGS = \ -DDBUS_STATIC_BUILD \ $(NULL) -libdbus_internal_la_LIBADD = $(LIBDBUS_LIBS) $(SYSTEMD_LIBS) \ - $(am__append_4) +libdbus_internal_la_LIBADD = $(LIBDBUS_LIBS) $(am__append_4) @DBUS_WIN_TRUE@libdbus_init_win_la_SOURCES = dbus-init-win.cpp -dbus_test_SOURCES = \ +test_dbus_SOURCES = \ dbus-test-main.c -dbus_test_LDADD = libdbus-internal.la +test_dbus_LDADD = libdbus-internal.la all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -912,6 +962,7 @@ versioninfo.rc: $(top_builddir)/config.status $(srcdir)/versioninfo.rc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ dbus-arch-deps.h: $(top_builddir)/config.status $(srcdir)/dbus-arch-deps.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -938,25 +989,32 @@ uninstall-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libdbus-1.la: $(libdbus_1_la_OBJECTS) $(libdbus_1_la_DEPENDENCIES) $(EXTRA_libdbus_1_la_DEPENDENCIES) $(AM_V_CCLD)$(libdbus_1_la_LINK) -rpath $(libdir) $(libdbus_1_la_OBJECTS) $(libdbus_1_la_LIBADD) $(LIBS) + libdbus-init-win.la: $(libdbus_init_win_la_OBJECTS) $(libdbus_init_win_la_DEPENDENCIES) $(EXTRA_libdbus_init_win_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(am_libdbus_init_win_la_rpath) $(libdbus_init_win_la_OBJECTS) $(libdbus_init_win_la_LIBADD) $(LIBS) + libdbus-internal.la: $(libdbus_internal_la_OBJECTS) $(libdbus_internal_la_DEPENDENCIES) $(EXTRA_libdbus_internal_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdbus_internal_la_OBJECTS) $(libdbus_internal_la_LIBADD) $(LIBS) @@ -968,9 +1026,10 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -dbus-test$(EXEEXT): $(dbus_test_OBJECTS) $(dbus_test_DEPENDENCIES) $(EXTRA_dbus_test_DEPENDENCIES) - @rm -f dbus-test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(dbus_test_OBJECTS) $(dbus_test_LDADD) $(LIBS) + +test-dbus$(EXEEXT): $(test_dbus_OBJECTS) $(test_dbus_DEPENDENCIES) $(EXTRA_test_dbus_DEPENDENCIES) + @rm -f test-dbus$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_dbus_OBJECTS) $(test_dbus_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1035,7 +1094,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-userdb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-uuidgen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-watch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-sd-daemon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-asv-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-auth-script.Plo@am__quote@ @@ -1113,21 +1171,20 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-userdb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-uuidgen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-watch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-sd-daemon.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1472,13 +1529,6 @@ libdbus_1_la-dbus-userdb.lo: dbus-userdb.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-userdb.lo `test -f 'dbus-userdb.c' || echo '$(srcdir)/'`dbus-userdb.c -libdbus_1_la-sd-daemon.lo: sd-daemon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-sd-daemon.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-sd-daemon.Tpo -c -o libdbus_1_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-sd-daemon.Tpo $(DEPDIR)/libdbus_1_la-sd-daemon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sd-daemon.c' object='libdbus_1_la-sd-daemon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c - libdbus_1_la-dbus-sysdeps-wince-glue.lo: dbus-sysdeps-wince-glue.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sysdeps-wince-glue.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sysdeps-wince-glue.Tpo -c -o libdbus_1_la-dbus-sysdeps-wince-glue.lo `test -f 'dbus-sysdeps-wince-glue.c' || echo '$(srcdir)/'`dbus-sysdeps-wince-glue.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sysdeps-wince-glue.Tpo $(DEPDIR)/libdbus_1_la-dbus-sysdeps-wince-glue.Plo @@ -1864,13 +1914,6 @@ libdbus_internal_la-dbus-userdb.lo: dbus-userdb.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-userdb.lo `test -f 'dbus-userdb.c' || echo '$(srcdir)/'`dbus-userdb.c -libdbus_internal_la-sd-daemon.lo: sd-daemon.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-sd-daemon.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-sd-daemon.Tpo -c -o libdbus_internal_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-sd-daemon.Tpo $(DEPDIR)/libdbus_internal_la-sd-daemon.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sd-daemon.c' object='libdbus_internal_la-sd-daemon.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c - libdbus_internal_la-dbus-sysdeps-wince-glue.lo: dbus-sysdeps-wince-glue.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-wince-glue.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-wince-glue.Tpo -c -o libdbus_internal_la-dbus-sysdeps-wince-glue.lo `test -f 'dbus-sysdeps-wince-glue.c' || echo '$(srcdir)/'`dbus-sysdeps-wince-glue.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-wince-glue.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-wince-glue.Plo @@ -2143,26 +2186,15 @@ uninstall-nodist_dbusarchincludeHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dbusarchincludedir)'; $(am__uninstall_files_from_dir) -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -2174,15 +2206,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -2191,6 +2219,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -2340,22 +2383,23 @@ uninstall-am: uninstall-dbusincludeHEADERS uninstall-libLTLIBRARIES \ .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-dbusincludeHEADERS install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-nodist_dbusarchincludeHEADERS install-pdf \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dbusincludeHEADERS install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man \ + install-nodist_dbusarchincludeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-dbusincludeHEADERS \ - uninstall-libLTLIBRARIES \ + tags tags-am uninstall uninstall-am \ + uninstall-dbusincludeHEADERS uninstall-libLTLIBRARIES \ uninstall-nodist_dbusarchincludeHEADERS @@ -2365,10 +2409,6 @@ uninstall-am: uninstall-dbusincludeHEADERS uninstall-libLTLIBRARIES \ clean-local: /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true -update-systemd: - curl http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/sd-daemon.c > $(srcdir)/sd-daemon.c - curl http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h > $(srcdir)/sd-daemon.h - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/dbus/dbus-auth-script.c b/dbus/dbus-auth-script.c index c1f0c88e..164743b0 100644 --- a/dbus/dbus-auth-script.c +++ b/dbus/dbus-auth-script.c @@ -584,11 +584,11 @@ _dbus_auth_script_run (const DBusString *filename) { _dbus_warn ("not enough memory to call bytes_received, or can't add bytes to auth object already in end state\n"); _dbus_string_free (&to_send); - _dbus_auth_return_buffer (auth, buffer, 0); + _dbus_auth_return_buffer (auth, buffer); goto out; } - _dbus_auth_return_buffer (auth, buffer, _dbus_string_get_length (&to_send)); + _dbus_auth_return_buffer (auth, buffer); } _dbus_string_free (&to_send); diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index a0f72773..6a07665f 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -2533,12 +2533,10 @@ _dbus_auth_get_buffer (DBusAuth *auth, * * @param auth the auth conversation * @param buffer the buffer being returned - * @param bytes_read number of new bytes added */ void _dbus_auth_return_buffer (DBusAuth *auth, - DBusString *buffer, - int bytes_read) + DBusString *buffer) { _dbus_assert (buffer == &auth->incoming); _dbus_assert (auth->buffer_outstanding); diff --git a/dbus/dbus-auth.h b/dbus/dbus-auth.h index ae3f3647..ba1975f7 100644 --- a/dbus/dbus-auth.h +++ b/dbus/dbus-auth.h @@ -55,8 +55,7 @@ void _dbus_auth_bytes_sent (DBusAuth *auth, void _dbus_auth_get_buffer (DBusAuth *auth, DBusString **buffer); void _dbus_auth_return_buffer (DBusAuth *auth, - DBusString *buffer, - int bytes_read); + DBusString *buffer); void _dbus_auth_get_unused_bytes (DBusAuth *auth, const DBusString **str); void _dbus_auth_delete_unused_bytes (DBusAuth *auth); diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h index 2842f2f4..28974040 100644 --- a/dbus/dbus-connection-internal.h +++ b/dbus/dbus-connection-internal.h @@ -44,6 +44,8 @@ typedef enum /** default timeout value when waiting for a message reply, 25 seconds */ #define _DBUS_DEFAULT_TIMEOUT_VALUE (25 * 1000) +typedef void (* DBusPendingFdsChangeFunction) (void *data); + void _dbus_connection_lock (DBusConnection *connection); void _dbus_connection_unlock (DBusConnection *connection); DBusConnection * _dbus_connection_ref_unlocked (DBusConnection *connection); @@ -100,6 +102,10 @@ void _dbus_connection_test_get_locks (DBusConnectio DBusMutex **io_path_mutex_loc, DBusCondVar **dispatch_cond_loc, DBusCondVar **io_path_cond_loc); +int _dbus_connection_get_pending_fds_count (DBusConnection *connection); +void _dbus_connection_set_pending_fds_function (DBusConnection *connection, + DBusPendingFdsChangeFunction callback, + void *data); /* if DBUS_ENABLE_STATS */ void _dbus_connection_get_stats (DBusConnection *connection, diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index f0b6871e..b574207d 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -2549,6 +2549,33 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending) dbus_pending_call_unref (pending); } +/** + * Return how many file descriptors are pending in the loader + * + * @param connection the connection + */ +int +_dbus_connection_get_pending_fds_count (DBusConnection *connection) +{ + return _dbus_transport_get_pending_fds_count (connection->transport); +} + +/** + * Register a function to be called whenever the number of pending file + * descriptors in the loader change. + * + * @param connection the connection + * @param callback the callback + */ +void +_dbus_connection_set_pending_fds_function (DBusConnection *connection, + DBusPendingFdsChangeFunction callback, + void *data) +{ + _dbus_transport_set_pending_fds_function (connection->transport, + callback, data); +} + /** @} */ /** diff --git a/dbus/dbus-errors.c b/dbus/dbus-errors.c index a0571a50..5d8f194e 100644 --- a/dbus/dbus-errors.c +++ b/dbus/dbus-errors.c @@ -189,9 +189,9 @@ dbus_error_init (DBusError *error) { DBusRealError *real; - _dbus_return_if_fail (error != NULL); + _DBUS_STATIC_ASSERT (sizeof (DBusError) == sizeof (DBusRealError)); - _dbus_assert (sizeof (DBusError) == sizeof (DBusRealError)); + _dbus_return_if_fail (error != NULL); real = (DBusRealError *)error; diff --git a/dbus/dbus-hash.c b/dbus/dbus-hash.c index c80835aa..8f7d04bb 100644 --- a/dbus/dbus-hash.c +++ b/dbus/dbus-hash.c @@ -519,7 +519,7 @@ _dbus_hash_iter_init (DBusHashTable *table, { DBusRealHashIter *real; - _dbus_assert (sizeof (DBusHashIter) == sizeof (DBusRealHashIter)); + _DBUS_STATIC_ASSERT (sizeof (DBusHashIter) == sizeof (DBusRealHashIter)); real = (DBusRealHashIter*) iter; @@ -544,7 +544,7 @@ _dbus_hash_iter_next (DBusHashIter *iter) { DBusRealHashIter *real; - _dbus_assert (sizeof (DBusHashIter) == sizeof (DBusRealHashIter)); + _DBUS_STATIC_ASSERT (sizeof (DBusHashIter) == sizeof (DBusRealHashIter)); real = (DBusRealHashIter*) iter; @@ -746,7 +746,7 @@ _dbus_hash_iter_lookup (DBusHashTable *table, DBusHashEntry *entry; DBusHashEntry **bucket; - _dbus_assert (sizeof (DBusHashIter) == sizeof (DBusRealHashIter)); + _DBUS_STATIC_ASSERT (sizeof (DBusHashIter) == sizeof (DBusRealHashIter)); real = (DBusRealHashIter*) iter; diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c index e2482597..575a0875 100644 --- a/dbus/dbus-internals.c +++ b/dbus/dbus-internals.c @@ -745,10 +745,18 @@ _dbus_read_uuid_file_without_creating (const DBusString *filename, return FALSE; } -static dbus_bool_t -_dbus_create_uuid_file_exclusively (const DBusString *filename, - DBusGUID *uuid, - DBusError *error) +/** + * Write the give UUID to a file. + * + * @param filename the file to write + * @param uuid the UUID to save + * @param error used to raise an error + * @returns #FALSE on error + */ +dbus_bool_t +_dbus_write_uuid_file (const DBusString *filename, + const DBusGUID *uuid, + DBusError *error) { DBusString encoded; @@ -757,8 +765,6 @@ _dbus_create_uuid_file_exclusively (const DBusString *filename, _DBUS_SET_OOM (error); return FALSE; } - - _dbus_generate_uuid (uuid); if (!_dbus_uuid_encode (uuid, &encoded)) { @@ -825,7 +831,8 @@ _dbus_read_uuid_file (const DBusString *filename, else { dbus_error_free (&read_error); - return _dbus_create_uuid_file_exclusively (filename, uuid, error); + _dbus_generate_uuid (uuid); + return _dbus_write_uuid_file (filename, uuid, error); } } diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index c5a3c9b8..4658b67b 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -361,13 +361,17 @@ dbus_bool_t _dbus_read_uuid_file (const DBusString *filename, dbus_bool_t create_if_not_found, DBusError *error); +dbus_bool_t _dbus_write_uuid_file (const DBusString *filename, + const DBusGUID *uuid, + DBusError *error); + dbus_bool_t _dbus_get_local_machine_uuid_encoded (DBusString *uuid_str); #define _DBUS_PASTE2(a, b) a ## b #define _DBUS_PASTE(a, b) _DBUS_PASTE2 (a, b) #define _DBUS_STATIC_ASSERT(expr) \ typedef struct { char _assertion[(expr) ? 1 : -1]; } \ - _DBUS_PASTE (_DBUS_STATIC_ASSERT_, __LINE__) + _DBUS_PASTE (_DBUS_STATIC_ASSERT_, __LINE__) _DBUS_GNUC_UNUSED DBUS_END_DECLS diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h index cae4100e..8d6c3000 100644 --- a/dbus/dbus-macros.h +++ b/dbus/dbus-macros.h @@ -69,9 +69,12 @@ __attribute__((__format__ (__printf__, format_idx, arg_idx))) #define _DBUS_GNUC_NORETURN \ __attribute__((__noreturn__)) +#define _DBUS_GNUC_UNUSED \ + __attribute__((__unused__)) #else /* !__GNUC__ */ #define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) #define _DBUS_GNUC_NORETURN +#define _DBUS_GNUC_UNUSED #endif /* !__GNUC__ */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) diff --git a/dbus/dbus-marshal-basic.c b/dbus/dbus-marshal-basic.c index eafc2a9a..9bb5b761 100644 --- a/dbus/dbus-marshal-basic.c +++ b/dbus/dbus-marshal-basic.c @@ -599,7 +599,7 @@ marshal_2_octets (DBusString *str, dbus_bool_t retval; int orig_len; - _dbus_assert (sizeof (value) == 2); + _DBUS_STATIC_ASSERT (sizeof (value) == 2); if (byte_order != DBUS_COMPILER_BYTE_ORDER) value = DBUS_UINT16_SWAP_LE_BE (value); @@ -628,7 +628,7 @@ marshal_4_octets (DBusString *str, dbus_bool_t retval; int orig_len; - _dbus_assert (sizeof (value) == 4); + _DBUS_STATIC_ASSERT (sizeof (value) == 4); if (byte_order != DBUS_COMPILER_BYTE_ORDER) value = DBUS_UINT32_SWAP_LE_BE (value); @@ -657,7 +657,7 @@ marshal_8_octets (DBusString *str, dbus_bool_t retval; int orig_len; - _dbus_assert (sizeof (value) == 8); + _DBUS_STATIC_ASSERT (sizeof (value) == 8); swap_8_octets (&value, byte_order); diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c index 4a42b47e..0e2b4201 100644 --- a/dbus/dbus-marshal-recursive-util.c +++ b/dbus/dbus-marshal-recursive-util.c @@ -1774,10 +1774,13 @@ make_and_run_test_nodes (void) start_next_test ("All values in one big toplevel %d iteration\n", 1); { TestTypeNode *nodes[N_VALUES]; + TestTypeNode *node; i = 0; - while ((nodes[i] = value_generator (&i))) - ; + while ((node = value_generator (&i))) + { + nodes[i - 1] = node; + } run_test_nodes (nodes, N_VALUES); diff --git a/dbus/dbus-memory.c b/dbus/dbus-memory.c index d59e8f8c..22e80727 100644 --- a/dbus/dbus-memory.c +++ b/dbus/dbus-memory.c @@ -856,7 +856,7 @@ _dbus_register_shutdown_func_unlocked (DBusShutdownFunction func, * can be useful to free these internal data structures. * * dbus_shutdown() does NOT free memory that was returned - * to the application. It only returns libdbus-internal + * to the application. It only frees libdbus-internal * data structures. * * You MUST free all memory and release all reference counts diff --git a/dbus/dbus-message-internal.h b/dbus/dbus-message-internal.h index 5d6594e3..e9a9ec01 100644 --- a/dbus/dbus-message-internal.h +++ b/dbus/dbus-message-internal.h @@ -96,6 +96,10 @@ long _dbus_message_loader_get_max_message_size (DBusMessageLoader void _dbus_message_loader_set_max_message_unix_fds(DBusMessageLoader *loader, long n); long _dbus_message_loader_get_max_message_unix_fds(DBusMessageLoader *loader); +int _dbus_message_loader_get_pending_fds_count (DBusMessageLoader *loader); +void _dbus_message_loader_set_pending_fds_function (DBusMessageLoader *loader, + void (* callback) (void *), + void *data); typedef struct DBusInitialFDs DBusInitialFDs; DBusInitialFDs *_dbus_check_fdleaks_enter (void); diff --git a/dbus/dbus-message-private.h b/dbus/dbus-message-private.h index e1578abd..a611b095 100644 --- a/dbus/dbus-message-private.h +++ b/dbus/dbus-message-private.h @@ -80,6 +80,8 @@ struct DBusMessageLoader int *unix_fds; /**< File descriptors that have been read from the transport but not yet been handed to any message. Array will be allocated at first use. */ unsigned n_unix_fds_allocated; /**< Number of file descriptors this array has space for */ unsigned n_unix_fds; /**< Number of valid file descriptors in array */ + void (* unix_fds_change) (void *); /**< Notify when the pending fds change */ + void *unix_fds_change_data; #endif }; diff --git a/dbus/dbus-message-util.c b/dbus/dbus-message-util.c index f615af83..5266b013 100644 --- a/dbus/dbus-message-util.c +++ b/dbus/dbus-message-util.c @@ -1205,6 +1205,7 @@ _dbus_message_test (const char *test_data_dir) #endif char **decomposed; DBusInitialFDs *initial_fds; + dbus_bool_t ok; initial_fds = _dbus_check_fdleaks_enter (); @@ -1603,18 +1604,19 @@ _dbus_message_test (const char *test_data_dir) dbus_message_iter_init_append (message, &iter); - _dbus_assert (dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, + ok = dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, (DBUS_STRUCT_BEGIN_CHAR_AS_STRING DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_STRING_AS_STRING DBUS_STRUCT_END_CHAR_AS_STRING), - &array_iter)); - _dbus_assert (dbus_message_iter_open_container (&array_iter, DBUS_TYPE_STRUCT, - NULL, &struct_iter)); - + &array_iter); + _dbus_assert (ok); + ok = dbus_message_iter_open_container (&array_iter, DBUS_TYPE_STRUCT, + NULL, &struct_iter); + _dbus_assert (ok); s = "peaches"; - _dbus_assert (dbus_message_iter_append_basic (&struct_iter, DBUS_TYPE_STRING, - &s)); + ok = dbus_message_iter_append_basic (&struct_iter, DBUS_TYPE_STRING, &s); + _dbus_assert (ok); /* uh-oh, error, try and unwind */ diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 32ac37a2..974e8fa6 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -35,6 +35,7 @@ #include "dbus-list.h" #include "dbus-threads-internal.h" #ifdef HAVE_UNIX_FD_PASSING +#include "dbus-sysdeps.h" #include "dbus-sysdeps-unix.h" #endif @@ -812,7 +813,7 @@ _dbus_message_iter_get_args_valist (DBusMessageIter *iter, /* copy var_args first, then we can do another iteration over it to * free memory and close unix fds if parse failed at some point. */ - va_copy (copy_args, var_args); + DBUS_VA_COPY (copy_args, var_args); while (spec_type != DBUS_TYPE_INVALID) { @@ -2024,7 +2025,7 @@ _dbus_message_iter_init_common (DBusMessage *message, DBusMessageRealIter *real, int iter_type) { - _dbus_assert (sizeof (DBusMessageRealIter) <= sizeof (DBusMessageIter)); + _DBUS_STATIC_ASSERT (sizeof (DBusMessageRealIter) <= sizeof (DBusMessageIter)); /* Since the iterator will read or write who-knows-what from the * message, we need to get in the right byte order @@ -4058,6 +4059,9 @@ _dbus_message_loader_return_unix_fds(DBusMessageLoader *loader, loader->n_unix_fds += n_fds; loader->unix_fds_outstanding = FALSE; + + if (n_fds && loader->unix_fds_change) + loader->unix_fds_change (loader->unix_fds_change_data); #else _dbus_assert_not_reached("Platform doesn't support unix fd passing"); #endif @@ -4204,7 +4208,10 @@ load_message (DBusMessageLoader *loader, message->n_unix_fds_allocated = message->n_unix_fds = n_unix_fds; loader->n_unix_fds -= n_unix_fds; - memmove(loader->unix_fds + n_unix_fds, loader->unix_fds, loader->n_unix_fds); + memmove (loader->unix_fds, loader->unix_fds + n_unix_fds, loader->n_unix_fds * sizeof (loader->unix_fds[0])); + + if (loader->unix_fds_change) + loader->unix_fds_change (loader->unix_fds_change_data); } else message->unix_fds = NULL; @@ -4498,6 +4505,40 @@ _dbus_message_loader_get_max_message_unix_fds (DBusMessageLoader *loader) return loader->max_message_unix_fds; } +/** + * Return how many file descriptors are pending in the loader + * + * @param loader the loader + */ +int +_dbus_message_loader_get_pending_fds_count (DBusMessageLoader *loader) +{ +#ifdef HAVE_UNIX_FD_PASSING + return loader->n_unix_fds; +#else + return 0; +#endif +} + +/** + * Register a function to be called whenever the number of pending file + * descriptors in the loader change. + * + * @param loader the loader + * @param callback the callback + * @param data the data for the callback + */ +void +_dbus_message_loader_set_pending_fds_function (DBusMessageLoader *loader, + void (* callback) (void *), + void *data) +{ +#ifdef HAVE_UNIX_FD_PASSING + loader->unix_fds_change = callback; + loader->unix_fds_change_data = data; +#endif +} + static DBusDataSlotAllocator slot_allocator = _DBUS_DATA_SLOT_ALLOCATOR_INIT (_DBUS_LOCK_NAME (message_slots)); diff --git a/dbus/dbus-nonce.c b/dbus/dbus-nonce.c index ef037ef9..37f30f00 100644 --- a/dbus/dbus-nonce.c +++ b/dbus/dbus-nonce.c @@ -113,7 +113,15 @@ _dbus_read_nonce (const DBusString *fname, DBusString *nonce, DBusError* error) fp = fopen (_dbus_string_get_const_data (fname), "rb"); if (!fp) - return FALSE; + { + dbus_set_error (error, + _dbus_error_from_system_errno (), + "Failed to open %s for read: %s", + _dbus_string_get_const_data (fname), + _dbus_strerror_from_errno ()); + return FALSE; + } + nread = fread (buffer, 1, sizeof buffer - 1, fp); fclose (fp); if (!nread) diff --git a/dbus/dbus-server-launchd.c b/dbus/dbus-server-launchd.c index 9832875e..d9d5908c 100644 --- a/dbus/dbus-server-launchd.c +++ b/dbus/dbus-server-launchd.c @@ -42,6 +42,7 @@ #include "dbus-misc.h" #include "dbus-server-socket.h" +#include "dbus-sysdeps-unix.h" /* put other private launchd functions here */ diff --git a/dbus/dbus-server-protected.h b/dbus/dbus-server-protected.h index dd5234b9..e6dbd1e1 100644 --- a/dbus/dbus-server-protected.h +++ b/dbus/dbus-server-protected.h @@ -99,9 +99,8 @@ dbus_bool_t _dbus_server_add_watch (DBusServer *server, DBusWatch *watch); void _dbus_server_remove_watch (DBusServer *server, DBusWatch *watch); -void _dbus_server_toggle_watch (DBusServer *server, - DBusWatch *watch, - dbus_bool_t enabled); +void _dbus_server_toggle_all_watches (DBusServer *server, + dbus_bool_t enabled); dbus_bool_t _dbus_server_add_timeout (DBusServer *server, DBusTimeout *timeout); void _dbus_server_remove_timeout (DBusServer *server, diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index 19d8590c..c1d5f6e5 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -312,26 +312,17 @@ _dbus_server_remove_watch (DBusServer *server, } /** - * Toggles a watch and notifies app via server's - * DBusWatchToggledFunction if available. It's an error to call this - * function on a watch that was not previously added. + * Toggles all watch and notifies app via server's + * DBusWatchToggledFunction if available. * * @param server the server. - * @param watch the watch to toggle. * @param enabled whether to enable or disable */ void -_dbus_server_toggle_watch (DBusServer *server, - DBusWatch *watch, - dbus_bool_t enabled) +_dbus_server_toggle_all_watches (DBusServer *server, + dbus_bool_t enabled) { - _dbus_assert (watch != NULL); - - HAVE_LOCK_CHECK (server); - protected_change_watch (server, watch, - NULL, NULL, - _dbus_watch_list_toggle_watch, - enabled); + _dbus_watch_list_toggle_all_watches (server->watches, enabled); } /** Function to be called in protected_change_timeout() with refcount held */ diff --git a/dbus/dbus-signature.c b/dbus/dbus-signature.c index 8a4701c9..6f1521b1 100644 --- a/dbus/dbus-signature.c +++ b/dbus/dbus-signature.c @@ -428,7 +428,7 @@ _dbus_signature_test (void) const char *sig; dbus_bool_t boolres; - _dbus_assert (sizeof (DBusSignatureIter) >= sizeof (DBusSignatureRealIter)); + _DBUS_STATIC_ASSERT (sizeof (DBusSignatureIter) >= sizeof (DBusSignatureRealIter)); sig = ""; _dbus_assert (dbus_signature_validate (sig, NULL)); diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index d1478f00..b95cad6e 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -39,6 +39,9 @@ #include <errno.h> #endif #ifdef HAVE_SYSTEMD +#ifdef HAVE_SYSLOG_H +#include <syslog.h> +#endif #include <systemd/sd-journal.h> #endif @@ -1179,7 +1182,7 @@ babysit (pid_t grandchild_pid, * If sitter_p is #NULL, no babysitter is kept. * * @param sitter_p return location for babysitter or #NULL - * @log_name the name under which to log messages about this process being spawned + * @param log_name the name under which to log messages about this process being spawned * @param argv the executable and arguments * @param env the environment, or #NULL to copy the parent's * @param child_setup function to call in child pre-exec() diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c index c4e2e7fc..15cff9c6 100644 --- a/dbus/dbus-string.c +++ b/dbus/dbus-string.c @@ -133,11 +133,11 @@ _dbus_string_init_preallocated (DBusString *str, int allocate_size) { DBusRealString *real; - + + _DBUS_STATIC_ASSERT (sizeof (DBusString) == sizeof (DBusRealString)); + _dbus_assert (str != NULL); - _dbus_assert (sizeof (DBusString) == sizeof (DBusRealString)); - real = (DBusRealString*) str; /* It's very important not to touch anything @@ -234,6 +234,23 @@ _dbus_string_init_const_len (DBusString *str, } /** + * Initializes a string from another string. The + * string must eventually be freed with _dbus_string_free(). + * + * @param str memory to hold the string + * @param from instance from which the string is initialized + * @returns #TRUE on success, #FALSE if no memory + */ +dbus_bool_t +_dbus_string_init_from_string(DBusString *str, + const DBusString *from) +{ + if (!_dbus_string_init (str)) + return FALSE; + return _dbus_string_append (str, _dbus_string_get_const_data (from)); +} + +/** * Frees a string created by _dbus_string_init(). * * @param str memory where the string is stored. diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h index 86fb8c39..44860feb 100644 --- a/dbus/dbus-string.h +++ b/dbus/dbus-string.h @@ -75,6 +75,9 @@ void _dbus_string_init_const_len (DBusString *str, int len); dbus_bool_t _dbus_string_init_preallocated (DBusString *str, int allocate_size); + +dbus_bool_t _dbus_string_init_from_string (DBusString *str, + const DBusString *from); void _dbus_string_free (DBusString *str); void _dbus_string_lock (DBusString *str); dbus_bool_t _dbus_string_compact (DBusString *str, diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 07080045..544429a7 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -53,6 +53,7 @@ #include <sys/stat.h> #include <sys/wait.h> #include <netinet/in.h> +#include <netinet/tcp.h> #include <netdb.h> #include <grp.h> #include <arpa/inet.h> @@ -80,7 +81,9 @@ #include <bsm/adt.h> #endif -#include "sd-daemon.h" +#ifdef HAVE_SYSTEMD +#include <systemd/sd-daemon.h> +#endif #if !DBUS_USE_SYNC #include <pthread.h> @@ -320,6 +323,12 @@ _dbus_read_socket_with_unix_fds (int fd, m.msg_control = alloca(m.msg_controllen); memset(m.msg_control, 0, m.msg_controllen); + /* Do not include the padding at the end when we tell the kernel + * how much we're willing to receive. This avoids getting + * the padding filled with additional fds that we weren't expecting, + * if a (potentially malicious) sender included them. (fd.o #83622) */ + m.msg_controllen = CMSG_LEN (*n_fds * sizeof(int)); + again: bytes_read = recvmsg(fd, &m, 0 @@ -359,18 +368,49 @@ _dbus_read_socket_with_unix_fds (int fd, for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS) { - unsigned i; - - _dbus_assert(cm->cmsg_len <= CMSG_LEN(*n_fds * sizeof(int))); - *n_fds = (cm->cmsg_len - CMSG_LEN(0)) / sizeof(int); + size_t i; + int *payload = (int *) CMSG_DATA (cm); + size_t payload_len_bytes = (cm->cmsg_len - CMSG_LEN (0)); + size_t payload_len_fds = payload_len_bytes / sizeof (int); + size_t fds_to_use; + + /* Every non-negative int fits in a size_t without truncation, + * and we already know that *n_fds is non-negative, so + * casting (size_t) *n_fds is OK */ + _DBUS_STATIC_ASSERT (sizeof (size_t) >= sizeof (int)); + + if (_DBUS_LIKELY (payload_len_fds <= (size_t) *n_fds)) + { + /* The fds in the payload will fit in our buffer */ + fds_to_use = payload_len_fds; + } + else + { + /* Too many fds in the payload. This shouldn't happen + * any more because we're setting m.msg_controllen to + * the exact number we can accept, but be safe and + * truncate. */ + fds_to_use = (size_t) *n_fds; + + /* Close the excess fds to avoid DoS: if they stayed open, + * someone could send us an extra fd per message + * and we'd eventually run out. */ + for (i = fds_to_use; i < payload_len_fds; i++) + { + close (payload[i]); + } + } - memcpy(fds, CMSG_DATA(cm), *n_fds * sizeof(int)); + memcpy (fds, payload, fds_to_use * sizeof (int)); found = TRUE; + /* This cannot overflow because we have chosen fds_to_use + * to be <= *n_fds */ + *n_fds = (int) fds_to_use; /* Linux doesn't tell us whether MSG_CMSG_CLOEXEC actually worked, hence we need to go through this list and set CLOEXEC everywhere in any case */ - for (i = 0; i < *n_fds; i++) + for (i = 0; i < fds_to_use; i++) _dbus_fd_set_close_on_exec(fds[i]); break; @@ -999,7 +1039,6 @@ _dbus_listen_unix_socket (const char *path, int listen_fd; struct sockaddr_un addr; size_t path_len; - unsigned int reuseaddr; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -1066,7 +1105,7 @@ _dbus_listen_unix_socket (const char *path, if (path_len > _DBUS_MAX_SUN_PATH_LENGTH) { dbus_set_error (error, DBUS_ERROR_BAD_ADDRESS, - "Abstract socket name too long\n"); + "Socket name too long\n"); _dbus_close (listen_fd, NULL); return -1; } @@ -1074,13 +1113,6 @@ _dbus_listen_unix_socket (const char *path, strncpy (addr.sun_path, path, path_len); } - reuseaddr = 1; - if (setsockopt (listen_fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1) - { - _dbus_warn ("Failed to set socket option\"%s\": %s", - path, _dbus_strerror (errno)); - } - if (bind (listen_fd, (struct sockaddr*) &addr, _DBUS_STRUCT_OFFSET (struct sockaddr_un, sun_path) + path_len) < 0) { dbus_set_error (error, _dbus_error_from_errno (errno), @@ -1130,6 +1162,7 @@ int _dbus_listen_systemd_sockets (int **fds, DBusError *error) { +#ifdef HAVE_SYSTEMD int r, n; unsigned fd; int *new_fds; @@ -1205,6 +1238,11 @@ _dbus_listen_systemd_sockets (int **fds, dbus_free (new_fds); return -1; +#else + dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED, + "dbus was compiled without systemd support"); + return -1; +#endif } /** @@ -1395,7 +1433,7 @@ _dbus_listen_tcp_socket (const char *host, tmp = ai; while (tmp) { - int fd = -1, *newlisten_fd; + int fd = -1, *newlisten_fd, tcp_nodelay_on; if (!_dbus_open_socket (&fd, tmp->ai_family, SOCK_STREAM, 0, error)) { _DBUS_ASSERT_ERROR_IS_SET(error); @@ -1410,6 +1448,15 @@ _dbus_listen_tcp_socket (const char *host, host ? host : "*", port, _dbus_strerror (errno)); } + /* Nagle's algorithm imposes a huge delay on the initial messages + going over TCP. */ + tcp_nodelay_on = 1; + if (setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &tcp_nodelay_on, sizeof (tcp_nodelay_on)) == -1) + { + _dbus_warn ("Failed to set TCP_NODELAY socket option \"%s:%s\": %s", + host ? host : "*", port, _dbus_strerror (errno)); + } + if (bind (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) < 0) { saved_errno = errno; @@ -1572,13 +1619,19 @@ write_credentials_byte (int server_fd, |MSG_NOSIGNAL #endif ); -#else - bytes_written = send (server_fd, buf, 1, 0 -#if HAVE_DECL_MSG_NOSIGNAL - |MSG_NOSIGNAL + + /* If we HAVE_CMSGCRED, the OS still might not let us sendmsg() + * with a SOL_SOCKET/SCM_CREDS message - for instance, FreeBSD + * only allows that on AF_UNIX. Try just doing a send() instead. */ + if (bytes_written < 0 && errno == EINVAL) #endif - ); + { + bytes_written = send (server_fd, buf, 1, 0 +#if HAVE_DECL_MSG_NOSIGNAL + |MSG_NOSIGNAL #endif + ); + } if (bytes_written < 0 && errno == EINTR) goto again; @@ -1644,18 +1697,18 @@ _dbus_read_credentials_socket (int client_fd, } cmsg; #endif - uid_read = DBUS_UID_UNSET; - pid_read = DBUS_PID_UNSET; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - /* The POSIX spec certainly doesn't promise this, but * we need these assertions to fail as soon as we're wrong about * it so we can do the porting fixups */ - _dbus_assert (sizeof (pid_t) <= sizeof (dbus_pid_t)); - _dbus_assert (sizeof (uid_t) <= sizeof (dbus_uid_t)); - _dbus_assert (sizeof (gid_t) <= sizeof (dbus_gid_t)); + _DBUS_STATIC_ASSERT (sizeof (pid_t) <= sizeof (dbus_pid_t)); + _DBUS_STATIC_ASSERT (sizeof (uid_t) <= sizeof (dbus_uid_t)); + _DBUS_STATIC_ASSERT (sizeof (gid_t) <= sizeof (dbus_gid_t)); + + uid_read = DBUS_UID_UNSET; + pid_read = DBUS_PID_UNSET; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); _dbus_credentials_clear (credentials); @@ -1706,16 +1759,6 @@ _dbus_read_credentials_socket (int client_fd, return FALSE; } -#if defined(HAVE_CMSGCRED) - if (cmsg.hdr.cmsg_len < CMSG_LEN (sizeof (struct cmsgcred)) - || cmsg.hdr.cmsg_type != SCM_CREDS) - { - dbus_set_error (error, DBUS_ERROR_FAILED, - "Message from recvmsg() was not SCM_CREDS"); - return FALSE; - } -#endif - _dbus_verbose ("read credentials byte\n"); { @@ -1756,10 +1799,22 @@ _dbus_read_credentials_socket (int client_fd, * which makes it better than getpeereid(). */ struct cmsgcred *cred; + struct cmsghdr *cmsgp; - cred = (struct cmsgcred *) CMSG_DATA (&cmsg.hdr); - pid_read = cred->cmcred_pid; - uid_read = cred->cmcred_euid; + for (cmsgp = CMSG_FIRSTHDR (&msg); + cmsgp != NULL; + cmsgp = CMSG_NXTHDR (&msg, cmsgp)) + { + if (cmsgp->cmsg_type == SCM_CREDS && + cmsgp->cmsg_level == SOL_SOCKET && + cmsgp->cmsg_len >= CMSG_LEN (sizeof (struct cmsgcred))) + { + cred = (struct cmsgcred *) CMSG_DATA (cmsgp); + pid_read = cred->cmcred_pid; + uid_read = cred->cmcred_euid; + break; + } + } #elif defined(HAVE_GETPEERUCRED) /* Supported in at least Solaris >= 10. It should probably be higher @@ -1999,6 +2054,16 @@ _dbus_check_dir_is_private_to_user (DBusString *dir, DBusError *error) return FALSE; } + if (sb.st_uid != geteuid ()) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "%s directory is owned by user %lu, not %lu", + directory, + (unsigned long) sb.st_uid, + (unsigned long) geteuid ()); + return FALSE; + } + if ((S_IROTH & sb.st_mode) || (S_IWOTH & sb.st_mode) || (S_IRGRP & sb.st_mode) || (S_IWGRP & sb.st_mode)) { @@ -2324,9 +2389,9 @@ _dbus_credentials_add_from_current_process (DBusCredentials *credentials) * we need these assertions to fail as soon as we're wrong about * it so we can do the porting fixups */ - _dbus_assert (sizeof (pid_t) <= sizeof (dbus_pid_t)); - _dbus_assert (sizeof (uid_t) <= sizeof (dbus_uid_t)); - _dbus_assert (sizeof (gid_t) <= sizeof (dbus_gid_t)); + _DBUS_STATIC_ASSERT (sizeof (pid_t) <= sizeof (dbus_pid_t)); + _DBUS_STATIC_ASSERT (sizeof (uid_t) <= sizeof (dbus_uid_t)); + _DBUS_STATIC_ASSERT (sizeof (gid_t) <= sizeof (dbus_gid_t)); if (!_dbus_credentials_add_pid(credentials, _dbus_getpid())) return FALSE; @@ -2545,6 +2610,11 @@ _dbus_poll (DBusPollFD *fds, _DBUS_STRUCT_OFFSET (DBusPollFD, revents) == _DBUS_STRUCT_OFFSET (struct pollfd, revents)) { + if (timeout_milliseconds < -1) + { + timeout_milliseconds = -1; + } + return poll ((struct pollfd*) fds, n_fds, timeout_milliseconds); @@ -2886,7 +2956,7 @@ _dbus_disable_sigpipe (void) * @param fd the file descriptor */ void -_dbus_fd_set_close_on_exec (intptr_t fd) +_dbus_fd_set_close_on_exec (int fd) { int val; @@ -3466,6 +3536,7 @@ _dbus_get_autolaunch_address (const char *scope, * but that's done elsewhere, and if it worked, this function wouldn't * be called.) */ const char *display; + char *progpath; char *argv[6]; int i; DBusString uuid; @@ -3505,13 +3576,19 @@ _dbus_get_autolaunch_address (const char *scope, goto out; } - i = 0; #ifdef DBUS_ENABLE_EMBEDDED_TESTS if (_dbus_getenv ("DBUS_USE_TEST_BINARY") != NULL) - argv[i] = TEST_BUS_LAUNCH_BINARY; + progpath = TEST_BUS_LAUNCH_BINARY; else #endif - argv[i] = DBUS_BINDIR "/dbus-launch"; + progpath = DBUS_BINDIR "/dbus-launch"; + /* + * argv[0] is always dbus-launch, that's the name what we'll + * get from /proc, or ps(1), regardless what the progpath is, + * see fd.o#69716 + */ + i = 0; + argv[i] = "dbus-launch"; ++i; argv[i] = "--autolaunch"; ++i; @@ -3526,7 +3603,7 @@ _dbus_get_autolaunch_address (const char *scope, _dbus_assert (i == _DBUS_N_ELEMENTS (argv)); - retval = _read_subprocess_line_argv (argv[0], + retval = _read_subprocess_line_argv (progpath, TRUE, argv, address, error); @@ -3569,7 +3646,7 @@ _dbus_read_local_machine_uuid (DBusGUID *machine_id, _dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE); - b = _dbus_read_uuid_file (&filename, machine_id, create_if_not_found, error); + b = _dbus_read_uuid_file (&filename, machine_id, FALSE, error); if (b) return TRUE; @@ -3577,7 +3654,26 @@ _dbus_read_local_machine_uuid (DBusGUID *machine_id, /* Fallback to the system machine ID */ _dbus_string_init_const (&filename, "/etc/machine-id"); - return _dbus_read_uuid_file (&filename, machine_id, FALSE, error); + b = _dbus_read_uuid_file (&filename, machine_id, FALSE, error); + + if (b) + { + /* try to copy it to the DBUS_MACHINE_UUID_FILE, but do not + * complain if that isn't possible for whatever reason */ + _dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE); + _dbus_write_uuid_file (&filename, machine_id, NULL); + + return TRUE; + } + + if (!create_if_not_found) + return FALSE; + + /* if none found, try to make a new one */ + dbus_error_free (error); + _dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE); + _dbus_generate_uuid (machine_id); + return _dbus_write_uuid_file (&filename, machine_id, error); } /** @@ -4050,6 +4146,7 @@ _dbus_append_address_from_socket (int fd, } socket; char hostip[INET6_ADDRSTRLEN]; int size = sizeof (socket); + DBusString path_str; if (getsockname (fd, &socket.sa, &size)) goto err; @@ -4059,26 +4156,32 @@ _dbus_append_address_from_socket (int fd, case AF_UNIX: if (socket.un.sun_path[0]=='\0') { - if (_dbus_string_append_printf (address, "unix:abstract=%s", &(socket.un.sun_path[1]))) + _dbus_string_init_const (&path_str, &(socket.un.sun_path[1])); + if (_dbus_string_append (address, "unix:abstract=") && + _dbus_address_append_escaped (address, &path_str)) return TRUE; } else { - if (_dbus_string_append_printf (address, "unix:path=%s", socket.un.sun_path)) + _dbus_string_init_const (&path_str, socket.un.sun_path); + if (_dbus_string_append (address, "unix:path=") && + _dbus_address_append_escaped (address, &path_str)) return TRUE; } break; case AF_INET: if (inet_ntop (AF_INET, &socket.ipv4.sin_addr, hostip, sizeof (hostip))) if (_dbus_string_append_printf (address, "tcp:family=ipv4,host=%s,port=%u", - hostip, ntohs (socket.ipv4.sin_port))) + hostip, ntohs (socket.ipv4.sin_port))) return TRUE; break; #ifdef AF_INET6 case AF_INET6: + _dbus_string_init_const (&path_str, hostip); if (inet_ntop (AF_INET6, &socket.ipv6.sin6_addr, hostip, sizeof (hostip))) - if (_dbus_string_append_printf (address, "tcp:family=ipv6,host=%s,port=%u", - hostip, ntohs (socket.ipv6.sin6_port))) + if (_dbus_string_append_printf (address, "tcp:family=ipv6,port=%u,host=", + ntohs (socket.ipv6.sin6_port)) && + _dbus_address_append_escaped (address, &path_str)) return TRUE; break; #endif diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h index a265b335..df9902de 100644 --- a/dbus/dbus-sysdeps-unix.h +++ b/dbus/dbus-sysdeps-unix.h @@ -142,6 +142,8 @@ dbus_bool_t _dbus_append_address_from_socket (int fd, DBusString *address, DBusError *error); +void _dbus_fd_set_close_on_exec (int fd); + /** @} */ DBUS_END_DECLS diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index 0d8a66c7..d104e41c 100644 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@ -58,7 +58,9 @@ #include <sys/syslimits.h> #endif -#include "sd-daemon.h" +#ifdef HAVE_SYSTEMD +#include <systemd/sd-daemon.h> +#endif #ifndef O_BINARY #define O_BINARY 0 diff --git a/dbus/dbus-sysdeps-util-win.c b/dbus/dbus-sysdeps-util-win.c index 4678b11e..dd53417f 100644 --- a/dbus/dbus-sysdeps-util-win.c +++ b/dbus/dbus-sysdeps-util-win.c @@ -424,155 +424,15 @@ _dbus_stat(const DBusString *filename, return TRUE; } - -/* This file is part of the KDE project -Copyright (C) 2000 Werner Almesberger - -libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public License -along with this program; see the file COPYING. If not, write to -the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -Boston, MA 02110-1301, USA. -*/ -#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */ -#define HAVE_DD_LOCK /* have locking mechanism */ - -#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */ - -#define __dirfd(dir) (dir)->dd_fd - -/* struct dirent - same as Unix */ -struct dirent - { - long d_ino; /* inode (always 1 in WIN32) */ - off_t d_off; /* offset to this dirent */ - unsigned short d_reclen; /* length of d_name */ - char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ - }; - -/* typedef DIR - not the same as Unix */ -typedef struct - { - HANDLE handle; /* FindFirst/FindNext handle */ - short offset; /* offset into directory */ - short finished; /* 1 if there are not more files */ - WIN32_FIND_DATAA fileinfo; /* from FindFirst/FindNext */ - char *dir; /* the dir we are reading */ - struct dirent dent; /* the dirent to return */ - } -DIR; - -/********************************************************************** -* Implement dirent-style opendir/readdir/closedir on Window 95/NT -* -* Functions defined are opendir(), readdir() and closedir() with the -* same prototypes as the normal dirent.h implementation. -* -* Does not implement telldir(), seekdir(), rewinddir() or scandir(). -* The dirent struct is compatible with Unix, except that d_ino is -* always 1 and d_off is made up as we go along. -* -* Error codes are not available with errno but GetLastError. -* -* The DIR typedef is not compatible with Unix. -**********************************************************************/ - -static DIR * _dbus_opendir(const char *dir) -{ - DIR *dp; - char *filespec; - HANDLE handle; - int index; - - filespec = malloc(strlen(dir) + 2 + 1); - strcpy(filespec, dir); - index = strlen(filespec) - 1; - if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\')) - filespec[index] = '\0'; - strcat(filespec, "\\*"); - - dp = (DIR *)malloc(sizeof(DIR)); - dp->offset = 0; - dp->finished = 0; - dp->dir = strdup(dir); - - handle = FindFirstFileA(filespec, &(dp->fileinfo)); - if (handle == INVALID_HANDLE_VALUE) - { - if (GetLastError() == ERROR_NO_MORE_FILES) - dp->finished = 1; - else - return NULL; - } - - dp->handle = handle; - free(filespec); - - return dp; -} - -static struct dirent * _dbus_readdir(DIR *dp) -{ - int saved_err = GetLastError(); - - if (!dp || dp->finished) - return NULL; - - if (dp->offset != 0) - { - if (FindNextFileA(dp->handle, &(dp->fileinfo)) == 0) - { - if (GetLastError() == ERROR_NO_MORE_FILES) - { - SetLastError(saved_err); - dp->finished = 1; - } - return NULL; - } - } - dp->offset++; - - strncpy(dp->dent.d_name, dp->fileinfo.cFileName, _MAX_FNAME); - dp->dent.d_ino = 1; - dp->dent.d_reclen = strlen(dp->dent.d_name); - dp->dent.d_off = dp->offset; - - return &(dp->dent); -} - - -static int _dbus_closedir(DIR *dp) -{ - if (!dp) - return 0; - FindClose(dp->handle); - if (dp->dir) - free(dp->dir); - if (dp) - free(dp); - - return 0; -} - - /** * Internals of directory iterator */ struct DBusDirIter { - DIR *d; /**< The DIR* from opendir() */ - + HANDLE handle; + WIN32_FIND_DATAA fileinfo; /* from FindFirst/FindNext */ + dbus_bool_t finished; /* true if there are no more entries */ + int offset; }; /** @@ -586,35 +446,66 @@ DBusDirIter* _dbus_directory_open (const DBusString *filename, DBusError *error) { - DIR *d; DBusDirIter *iter; - const char *filename_c; + DBusString filespec; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - filename_c = _dbus_string_get_const_data (filename); - - d = _dbus_opendir (filename_c); - if (d == NULL) + if (!_dbus_string_init_from_string (&filespec, filename)) { - char *emsg = _dbus_win_error_string (GetLastError ()); - dbus_set_error (error, _dbus_win_error_from_last_error (), - "Failed to read directory \"%s\": %s", - filename_c, emsg); - _dbus_win_free_error_string (emsg); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "Could not allocate memory for directory filename copy"); return NULL; } + + if (_dbus_string_ends_with_c_str (&filespec, "/") || _dbus_string_ends_with_c_str (&filespec, "\\") ) + { + if (!_dbus_string_append (&filespec, "*")) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "Could not append filename wildcard"); + return NULL; + } + } + else if (!_dbus_string_ends_with_c_str (&filespec, "*")) + { + if (!_dbus_string_append (&filespec, "\\*")) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "Could not append filename wildcard 2"); + return NULL; + } + } + iter = dbus_new0 (DBusDirIter, 1); if (iter == NULL) { - _dbus_closedir (d); + _dbus_string_free (&filespec); dbus_set_error (error, DBUS_ERROR_NO_MEMORY, "Could not allocate memory for directory iterator"); return NULL; } - iter->d = d; - + iter->finished = FALSE; + iter->offset = 0; + iter->handle = FindFirstFileA (_dbus_string_get_const_data (&filespec), &(iter->fileinfo)); + if (iter->handle == INVALID_HANDLE_VALUE) + { + if (GetLastError () == ERROR_NO_MORE_FILES) + iter->finished = TRUE; + else + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to read directory \"%s\": %s", + _dbus_string_get_const_data (filename), emsg); + _dbus_win_free_error_string (emsg); + dbus_free ( iter ); + _dbus_string_free (&filespec); + return NULL; + } + } + _dbus_string_free (&filespec); return iter; } @@ -623,9 +514,6 @@ _dbus_directory_open (const DBusString *filename, * UNIX. If an error occurs, the contents of "filename" are * undefined. The error is never set if the function succeeds. * - * @todo for thread safety, I think we have to use - * readdir_r(). (GLib has the same issue, should file a bug.) - * * @param iter the iterator * @param filename string to be set to the next file in the dir * @param error return location for error @@ -636,40 +524,55 @@ _dbus_directory_get_next_file (DBusDirIter *iter, DBusString *filename, DBusError *error) { - struct dirent *ent; + int saved_err = GetLastError(); _DBUS_ASSERT_ERROR_IS_CLEAR (error); again: SetLastError (0); - ent = _dbus_readdir (iter->d); - if (ent == NULL) + + if (!iter || iter->finished) + return FALSE; + + if (iter->offset > 0) { - if (GetLastError() != 0) + if (FindNextFileA (iter->handle, &(iter->fileinfo)) == 0) { - char *emsg = _dbus_win_error_string (GetLastError ()); - dbus_set_error (error, _dbus_win_error_from_last_error (), - "Failed to get next in directory: %s", emsg); - _dbus_win_free_error_string (emsg); + if (GetLastError() == ERROR_NO_MORE_FILES) + { + SetLastError(saved_err); + iter->finished = 1; + } + else + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to get next in directory: %s", emsg); + _dbus_win_free_error_string (emsg); + return FALSE; + } } - return FALSE; } - else if (ent->d_name[0] == '.' && - (ent->d_name[1] == '\0' || - (ent->d_name[1] == '.' && ent->d_name[2] == '\0'))) - goto again; - else + + iter->offset++; + + if (iter->finished) + return FALSE; + + if (iter->fileinfo.cFileName[0] == '.' && + (iter->fileinfo.cFileName[1] == '\0' || + (iter->fileinfo.cFileName[1] == '.' && iter->fileinfo.cFileName[2] == '\0'))) + goto again; + + _dbus_string_set_length (filename, 0); + if (!_dbus_string_append (filename, iter->fileinfo.cFileName)) { - _dbus_string_set_length (filename, 0); - if (!_dbus_string_append (filename, ent->d_name)) - { - dbus_set_error (error, DBUS_ERROR_NO_MEMORY, - "No memory to read directory entry"); - return FALSE; - } - else - return TRUE; + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "No memory to read directory entry"); + return FALSE; } + + return TRUE; } /** @@ -678,7 +581,9 @@ again: void _dbus_directory_close (DBusDirIter *iter) { - _dbus_closedir (iter->d); + if (!iter) + return; + FindClose(iter->handle); dbus_free (iter); } diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 1c974c50..341db8ab 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -61,6 +61,7 @@ extern BOOL WINAPI ConvertStringSidToSidA (LPCSTR StringSid, PSID *Sid); extern BOOL WINAPI ConvertSidToStringSidA (PSID Sid, LPSTR *StringSid); #include <stdio.h> +#include <stdlib.h> #include <string.h> #if HAVE_ERRNO_H @@ -81,6 +82,11 @@ extern BOOL WINAPI ConvertSidToStringSidA (PSID Sid, LPSTR *StringSid); #define O_BINARY 0 #endif +#ifndef PROCESS_QUERY_LIMITED_INFORMATION +/* MinGW32 < 4 does not define this value in its headers */ +#define PROCESS_QUERY_LIMITED_INFORMATION (0x1000) +#endif + typedef int socklen_t; @@ -512,10 +518,10 @@ _dbus_close_socket (int fd, * on exec. Should be called for all file * descriptors in D-Bus code. * - * @param handle the Windows HANDLE + * @param handle the Windows HANDLE (a SOCKET is also OK) */ -void -_dbus_fd_set_close_on_exec (intptr_t handle) +static void +_dbus_win_handle_set_close_on_exec (HANDLE handle) { if ( !SetHandleInformation( (HANDLE) handle, HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE, @@ -1599,7 +1605,8 @@ _dbus_connect_tcp_socket_with_nonce (const char *host, } } - _dbus_fd_set_close_on_exec (fd); + /* Every SOCKET is also a HANDLE. */ + _dbus_win_handle_set_close_on_exec ((HANDLE) fd); if (!_dbus_set_fd_nonblocking (fd, error)) { @@ -1797,7 +1804,7 @@ _dbus_listen_tcp_socket (const char *host, for (i = 0 ; i < nlisten_fd ; i++) { - _dbus_fd_set_close_on_exec (listen_fd[i]); + _dbus_win_handle_set_close_on_exec ((HANDLE) listen_fd[i]); if (!_dbus_set_fd_nonblocking (listen_fd[i], error)) { goto failed; diff --git a/dbus/dbus-sysdeps-win.h b/dbus/dbus-sysdeps-win.h index 90d14de0..02e7a83f 100644 --- a/dbus/dbus-sysdeps-win.h +++ b/dbus/dbus-sysdeps-win.h @@ -27,7 +27,7 @@ #define DBUS_SYSDEPS_WIN_H extern void *_dbus_win_get_dll_hmodule (void); -#define _WINSOCKAPI_ +#define WIN32_LEAN_AND_MEAN #include "dbus-hash.h" #include "dbus-string.h" diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index de3a18cb..f4ba0fac 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -762,6 +762,20 @@ _dbus_get_is_errno_epipe (void) } /** + * See if errno is ETOOMANYREFS + * @returns #TRUE if errno == ETOOMANYREFS + */ +dbus_bool_t +_dbus_get_is_errno_etoomanyrefs (void) +{ +#ifdef ETOOMANYREFS + return errno == ETOOMANYREFS; +#else + return FALSE; +#endif +} + +/** * Get error message from errno * @returns _dbus_strerror(errno) */ diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index e586946f..955ba9aa 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -359,8 +359,6 @@ void _dbus_directory_close (DBusDirIter *iter); dbus_bool_t _dbus_check_dir_is_private_to_user (DBusString *dir, DBusError *error); -void _dbus_fd_set_close_on_exec (intptr_t fd); - const char* _dbus_get_tmpdir (void); /** @@ -384,6 +382,7 @@ dbus_bool_t _dbus_get_is_errno_eagain_or_ewouldblock (void); dbus_bool_t _dbus_get_is_errno_enomem (void); dbus_bool_t _dbus_get_is_errno_eintr (void); dbus_bool_t _dbus_get_is_errno_epipe (void); +dbus_bool_t _dbus_get_is_errno_etoomanyrefs (void); const char* _dbus_strerror_from_errno (void); void _dbus_disable_sigpipe (void); @@ -557,6 +556,14 @@ void _dbus_request_file_descriptor_limit (unsigned int limit); const char * _dbus_replace_install_prefix (const char *configure_time_path); +/* Do not set this too high: it is a denial-of-service risk. + * See <https://bugs.freedesktop.org/show_bug.cgi?id=82820> + * + * (This needs to be in the non-Unix-specific header so that + * the config-parser can use it.) + */ +#define DBUS_DEFAULT_MESSAGE_UNIX_FDS 16 + /** @} */ DBUS_END_DECLS diff --git a/dbus/dbus-test.c b/dbus/dbus-test.c index b707ee22..5990d6ec 100644 --- a/dbus/dbus-test.c +++ b/dbus/dbus-test.c @@ -41,7 +41,7 @@ check_memleaks (void) { dbus_shutdown (); - printf ("%s: checking for memleaks\n", "dbus-test"); + printf ("%s: checking for memleaks\n", "test-dbus"); if (_dbus_get_malloc_blocks_outstanding () != 0) { _dbus_warn ("%d dbus_malloc blocks were not freed\n", @@ -60,7 +60,7 @@ run_test (const char *test_name, { if (!specific_test || strcmp (specific_test, test_name) == 0) { - printf ("%s: running %s tests\n", "dbus-test", test_name); + printf ("%s: running %s tests\n", "test-dbus", test_name); if (!test ()) die (test_name); @@ -76,7 +76,7 @@ run_data_test (const char *test_name, { if (!specific_test || strcmp (specific_test, test_name) == 0) { - printf ("%s: running %s tests\n", "dbus-test", test_name); + printf ("%s: running %s tests\n", "test-dbus", test_name); if (!test (test_data_dir)) die (test_name); @@ -165,7 +165,7 @@ dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *speci run_data_test ("auth", specific_test, _dbus_auth_test, test_data_dir); - printf ("%s: completed successfully\n", "dbus-test"); + printf ("%s: completed successfully\n", "test-dbus"); #else printf ("Not compiled with unit tests, not running any\n"); #endif diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 44c7af7d..199d3b54 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -255,8 +255,7 @@ read_data_into_auth (DBusTransport *transport, bytes_read = _dbus_read_socket (socket_transport->fd, buffer, socket_transport->max_bytes_read_per_iteration); - _dbus_auth_return_buffer (transport->auth, buffer, - bytes_read > 0 ? bytes_read : 0); + _dbus_auth_return_buffer (transport->auth, buffer); if (bytes_read > 0) { @@ -646,12 +645,44 @@ do_writing (DBusTransport *transport) { /* EINTR already handled for us */ - /* For some discussion of why we also ignore EPIPE here, see + /* If the other end closed the socket with close() or shutdown(), we + * receive EPIPE here but we must not close the socket yet: there + * might still be some data to read. See: * http://lists.freedesktop.org/archives/dbus/2008-March/009526.html */ if (_dbus_get_is_errno_eagain_or_ewouldblock () || _dbus_get_is_errno_epipe ()) goto out; + + /* Since Linux commit 25888e (from 2.6.37-rc4, Nov 2010), sendmsg() + * on Unix sockets returns -1 errno=ETOOMANYREFS when the passfd + * mechanism (SCM_RIGHTS) is used recursively with a recursion level + * of maximum 4. The kernel does not have an API to check whether + * the passed fds can be forwarded and it can change asynchronously. + * See: + * https://bugs.freedesktop.org/show_bug.cgi?id=80163 + */ + + else if (_dbus_get_is_errno_etoomanyrefs ()) + { + /* We only send fds in the first byte of the message. + * ETOOMANYREFS cannot happen after. + */ + _dbus_assert (socket_transport->message_bytes_written == 0); + + _dbus_verbose (" discard message of %d bytes due to ETOOMANYREFS\n", + total_bytes_to_write); + + socket_transport->message_bytes_written = 0; + _dbus_string_set_length (&socket_transport->encoded_outgoing, 0); + _dbus_string_compact (&socket_transport->encoded_outgoing, 2048); + + /* The message was not actually sent but it needs to be removed + * from the outgoing queue + */ + _dbus_connection_message_sent_unlocked (transport->connection, + message); + } else { _dbus_verbose ("Error writing to remote app: %s\n", diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index ecc31827..f63e0ced 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -1512,6 +1512,33 @@ _dbus_transport_set_allow_anonymous (DBusTransport *transport, transport->allow_anonymous = value != FALSE; } +/** + * Return how many file descriptors are pending in the loader + * + * @param transport the transport + */ +int +_dbus_transport_get_pending_fds_count (DBusTransport *transport) +{ + return _dbus_message_loader_get_pending_fds_count (transport->loader); +} + +/** + * Register a function to be called whenever the number of pending file + * descriptors in the loader change. + * + * @param transport the transport + * @param callback the callback + */ +void +_dbus_transport_set_pending_fds_function (DBusTransport *transport, + void (* callback) (void *), + void *data) +{ + _dbus_message_loader_set_pending_fds_function (transport->loader, + callback, data); +} + #ifdef DBUS_ENABLE_STATS void _dbus_transport_get_stats (DBusTransport *transport, diff --git a/dbus/dbus-transport.h b/dbus/dbus-transport.h index 80fa24ef..39c74c46 100644 --- a/dbus/dbus-transport.h +++ b/dbus/dbus-transport.h @@ -97,6 +97,10 @@ dbus_bool_t _dbus_transport_set_auth_mechanisms (DBusTransport const char **mechanisms); void _dbus_transport_set_allow_anonymous (DBusTransport *transport, dbus_bool_t value); +int _dbus_transport_get_pending_fds_count (DBusTransport *transport); +void _dbus_transport_set_pending_fds_function (DBusTransport *transport, + void (* callback) (void *), + void *data); /* if DBUS_ENABLE_STATS */ void _dbus_transport_get_stats (DBusTransport *transport, diff --git a/dbus/dbus-watch.c b/dbus/dbus-watch.c index b82c57d4..76a5d641 100644 --- a/dbus/dbus-watch.c +++ b/dbus/dbus-watch.c @@ -455,6 +455,27 @@ _dbus_watch_list_toggle_watch (DBusWatchList *watch_list, } /** + * Sets all watches to the given enabled state, invoking the + * application's DBusWatchToggledFunction if appropriate. + * + * @param watch_list the watch list. + * @param enabled #TRUE to enable + */ +void +_dbus_watch_list_toggle_all_watches (DBusWatchList *watch_list, + dbus_bool_t enabled) +{ + DBusList *link; + + for (link = _dbus_list_get_first_link (&watch_list->watches); + link != NULL; + link = _dbus_list_get_next_link (&watch_list->watches, link)) + { + _dbus_watch_list_toggle_watch (watch_list, link->data, enabled); + } +} + +/** * Sets the handler for the watch. * * @todo this function only exists because of the weird diff --git a/dbus/dbus-watch.h b/dbus/dbus-watch.h index c5832141..321740ed 100644 --- a/dbus/dbus-watch.h +++ b/dbus/dbus-watch.h @@ -76,6 +76,8 @@ void _dbus_watch_list_remove_watch (DBusWatchList *watch_li void _dbus_watch_list_toggle_watch (DBusWatchList *watch_list, DBusWatch *watch, dbus_bool_t enabled); +void _dbus_watch_list_toggle_all_watches (DBusWatchList *watch_list, + dbus_bool_t enabled); dbus_bool_t _dbus_watch_get_enabled (DBusWatch *watch); dbus_bool_t _dbus_watch_get_oom_last_time (DBusWatch *watch); diff --git a/dbus/sd-daemon.c b/dbus/sd-daemon.c deleted file mode 100644 index 485b3010..00000000 --- a/dbus/sd-daemon.c +++ /dev/null @@ -1,520 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - -/*** - Copyright 2010 Lennart Poettering - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -***/ - -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <fcntl.h> -#include <netinet/in.h> -#include <stdlib.h> -#include <errno.h> -#include <unistd.h> -#include <string.h> -#include <stdarg.h> -#include <stdio.h> -#include <stddef.h> -#include <limits.h> - -#if defined(__linux__) && !defined(SD_DAEMON_DISABLE_MQ) -# include <mqueue.h> -#endif - -#include "sd-daemon.h" - -#if (__GNUC__ >= 4) -# ifdef SD_EXPORT_SYMBOLS -/* Export symbols */ -# define _sd_export_ __attribute__ ((visibility("default"))) -# else -/* Don't export the symbols */ -# define _sd_export_ __attribute__ ((visibility("hidden"))) -# endif -#else -# define _sd_export_ -#endif - -_sd_export_ int sd_listen_fds(int unset_environment) { - -#if defined(DISABLE_SYSTEMD) || !defined(__linux__) - return 0; -#else - int r, fd; - const char *e; - char *p = NULL; - unsigned long l; - - e = getenv("LISTEN_PID"); - if (!e) { - r = 0; - goto finish; - } - - errno = 0; - l = strtoul(e, &p, 10); - - if (errno > 0) { - r = -errno; - goto finish; - } - - if (!p || p == e || *p || l <= 0) { - r = -EINVAL; - goto finish; - } - - /* Is this for us? */ - if (getpid() != (pid_t) l) { - r = 0; - goto finish; - } - - e = getenv("LISTEN_FDS"); - if (!e) { - r = 0; - goto finish; - } - - errno = 0; - l = strtoul(e, &p, 10); - - if (errno > 0) { - r = -errno; - goto finish; - } - - if (!p || p == e || *p) { - r = -EINVAL; - goto finish; - } - - for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) { - int flags; - - flags = fcntl(fd, F_GETFD); - if (flags < 0) { - r = -errno; - goto finish; - } - - if (flags & FD_CLOEXEC) - continue; - - if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) { - r = -errno; - goto finish; - } - } - - r = (int) l; - -finish: - if (unset_environment) { - unsetenv("LISTEN_PID"); - unsetenv("LISTEN_FDS"); - } - - return r; -#endif -} - -_sd_export_ int sd_is_fifo(int fd, const char *path) { - struct stat st_fd; - - if (fd < 0) - return -EINVAL; - - if (fstat(fd, &st_fd) < 0) - return -errno; - - if (!S_ISFIFO(st_fd.st_mode)) - return 0; - - if (path) { - struct stat st_path; - - if (stat(path, &st_path) < 0) { - - if (errno == ENOENT || errno == ENOTDIR) - return 0; - - return -errno; - } - - return - st_path.st_dev == st_fd.st_dev && - st_path.st_ino == st_fd.st_ino; - } - - return 1; -} - -_sd_export_ int sd_is_special(int fd, const char *path) { - struct stat st_fd; - - if (fd < 0) - return -EINVAL; - - if (fstat(fd, &st_fd) < 0) - return -errno; - - if (!S_ISREG(st_fd.st_mode) && !S_ISCHR(st_fd.st_mode)) - return 0; - - if (path) { - struct stat st_path; - - if (stat(path, &st_path) < 0) { - - if (errno == ENOENT || errno == ENOTDIR) - return 0; - - return -errno; - } - - if (S_ISREG(st_fd.st_mode) && S_ISREG(st_path.st_mode)) - return - st_path.st_dev == st_fd.st_dev && - st_path.st_ino == st_fd.st_ino; - else if (S_ISCHR(st_fd.st_mode) && S_ISCHR(st_path.st_mode)) - return st_path.st_rdev == st_fd.st_rdev; - else - return 0; - } - - return 1; -} - -static int sd_is_socket_internal(int fd, int type, int listening) { - struct stat st_fd; - - if (fd < 0 || type < 0) - return -EINVAL; - - if (fstat(fd, &st_fd) < 0) - return -errno; - - if (!S_ISSOCK(st_fd.st_mode)) - return 0; - - if (type != 0) { - int other_type = 0; - socklen_t l = sizeof(other_type); - - if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0) - return -errno; - - if (l != sizeof(other_type)) - return -EINVAL; - - if (other_type != type) - return 0; - } - - if (listening >= 0) { - int accepting = 0; - socklen_t l = sizeof(accepting); - - if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0) - return -errno; - - if (l != sizeof(accepting)) - return -EINVAL; - - if (!accepting != !listening) - return 0; - } - - return 1; -} - -union sockaddr_union { - struct sockaddr sa; - struct sockaddr_in in4; - struct sockaddr_in6 in6; - struct sockaddr_un un; - struct sockaddr_storage storage; -}; - -_sd_export_ int sd_is_socket(int fd, int family, int type, int listening) { - int r; - - if (family < 0) - return -EINVAL; - - r = sd_is_socket_internal(fd, type, listening); - if (r <= 0) - return r; - - if (family > 0) { - union sockaddr_union sockaddr = {}; - socklen_t l = sizeof(sockaddr); - - if (getsockname(fd, &sockaddr.sa, &l) < 0) - return -errno; - - if (l < sizeof(sa_family_t)) - return -EINVAL; - - return sockaddr.sa.sa_family == family; - } - - return 1; -} - -_sd_export_ int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) { - union sockaddr_union sockaddr = {}; - socklen_t l = sizeof(sockaddr); - int r; - - if (family != 0 && family != AF_INET && family != AF_INET6) - return -EINVAL; - - r = sd_is_socket_internal(fd, type, listening); - if (r <= 0) - return r; - - if (getsockname(fd, &sockaddr.sa, &l) < 0) - return -errno; - - if (l < sizeof(sa_family_t)) - return -EINVAL; - - if (sockaddr.sa.sa_family != AF_INET && - sockaddr.sa.sa_family != AF_INET6) - return 0; - - if (family > 0) - if (sockaddr.sa.sa_family != family) - return 0; - - if (port > 0) { - if (sockaddr.sa.sa_family == AF_INET) { - if (l < sizeof(struct sockaddr_in)) - return -EINVAL; - - return htons(port) == sockaddr.in4.sin_port; - } else { - if (l < sizeof(struct sockaddr_in6)) - return -EINVAL; - - return htons(port) == sockaddr.in6.sin6_port; - } - } - - return 1; -} - -_sd_export_ int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) { - union sockaddr_union sockaddr = {}; - socklen_t l = sizeof(sockaddr); - int r; - - r = sd_is_socket_internal(fd, type, listening); - if (r <= 0) - return r; - - if (getsockname(fd, &sockaddr.sa, &l) < 0) - return -errno; - - if (l < sizeof(sa_family_t)) - return -EINVAL; - - if (sockaddr.sa.sa_family != AF_UNIX) - return 0; - - if (path) { - if (length == 0) - length = strlen(path); - - if (length == 0) - /* Unnamed socket */ - return l == offsetof(struct sockaddr_un, sun_path); - - if (path[0]) - /* Normal path socket */ - return - (l >= offsetof(struct sockaddr_un, sun_path) + length + 1) && - memcmp(path, sockaddr.un.sun_path, length+1) == 0; - else - /* Abstract namespace socket */ - return - (l == offsetof(struct sockaddr_un, sun_path) + length) && - memcmp(path, sockaddr.un.sun_path, length) == 0; - } - - return 1; -} - -_sd_export_ int sd_is_mq(int fd, const char *path) { -#if !defined(__linux__) || defined(SD_DAEMON_DISABLE_MQ) - return 0; -#else - struct mq_attr attr; - - if (fd < 0) - return -EINVAL; - - if (mq_getattr(fd, &attr) < 0) - return -errno; - - if (path) { - char fpath[PATH_MAX]; - struct stat a, b; - - if (path[0] != '/') - return -EINVAL; - - if (fstat(fd, &a) < 0) - return -errno; - - strncpy(stpcpy(fpath, "/dev/mqueue"), path, sizeof(fpath) - 12); - fpath[sizeof(fpath)-1] = 0; - - if (stat(fpath, &b) < 0) - return -errno; - - if (a.st_dev != b.st_dev || - a.st_ino != b.st_ino) - return 0; - } - - return 1; -#endif -} - -_sd_export_ int sd_notify(int unset_environment, const char *state) { -#if defined(DISABLE_SYSTEMD) || !defined(__linux__) || !defined(SOCK_CLOEXEC) - return 0; -#else - int fd = -1, r; - struct msghdr msghdr; - struct iovec iovec; - union sockaddr_union sockaddr; - const char *e; - - if (!state) { - r = -EINVAL; - goto finish; - } - - e = getenv("NOTIFY_SOCKET"); - if (!e) - return 0; - - /* Must be an abstract socket, or an absolute path */ - if ((e[0] != '@' && e[0] != '/') || e[1] == 0) { - r = -EINVAL; - goto finish; - } - - fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); - if (fd < 0) { - r = -errno; - goto finish; - } - - memset(&sockaddr, 0, sizeof(sockaddr)); - sockaddr.sa.sa_family = AF_UNIX; - strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path)); - - if (sockaddr.un.sun_path[0] == '@') - sockaddr.un.sun_path[0] = 0; - - memset(&iovec, 0, sizeof(iovec)); - iovec.iov_base = (char*) state; - iovec.iov_len = strlen(state); - - memset(&msghdr, 0, sizeof(msghdr)); - msghdr.msg_name = &sockaddr; - msghdr.msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(e); - - if (msghdr.msg_namelen > sizeof(struct sockaddr_un)) - msghdr.msg_namelen = sizeof(struct sockaddr_un); - - msghdr.msg_iov = &iovec; - msghdr.msg_iovlen = 1; - - if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) { - r = -errno; - goto finish; - } - - r = 1; - -finish: - if (unset_environment) - unsetenv("NOTIFY_SOCKET"); - - if (fd >= 0) - close(fd); - - return r; -#endif -} - -_sd_export_ int sd_notifyf(int unset_environment, const char *format, ...) { -#if defined(DISABLE_SYSTEMD) || !defined(__linux__) - return 0; -#else - va_list ap; - char *p = NULL; - int r; - - va_start(ap, format); - r = vasprintf(&p, format, ap); - va_end(ap); - - if (r < 0 || !p) - return -ENOMEM; - - r = sd_notify(unset_environment, p); - free(p); - - return r; -#endif -} - -_sd_export_ int sd_booted(void) { -#if defined(DISABLE_SYSTEMD) || !defined(__linux__) - return 0; -#else - struct stat st; - - /* We test whether the runtime unit file directory has been - * created. This takes place in mount-setup.c, so is - * guaranteed to happen very early during boot. */ - - if (lstat("/run/systemd/system/", &st) < 0) - return 0; - - return !!S_ISDIR(st.st_mode); -#endif -} diff --git a/dbus/sd-daemon.h b/dbus/sd-daemon.h deleted file mode 100644 index fb7456d5..00000000 --- a/dbus/sd-daemon.h +++ /dev/null @@ -1,282 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - -#ifndef foosddaemonhfoo -#define foosddaemonhfoo - -/*** - Copyright 2010 Lennart Poettering - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -***/ - -#include <sys/types.h> -#include <inttypes.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* - Reference implementation of a few systemd related interfaces for - writing daemons. These interfaces are trivial to implement. To - simplify porting we provide this reference implementation. - Applications are welcome to reimplement the algorithms described - here if they do not want to include these two source files. - - The following functionality is provided: - - - Support for logging with log levels on stderr - - File descriptor passing for socket-based activation - - Daemon startup and status notification - - Detection of systemd boots - - You may compile this with -DDISABLE_SYSTEMD to disable systemd - support. This makes all those calls NOPs that are directly related to - systemd (i.e. only sd_is_xxx() will stay useful). - - Since this is drop-in code we don't want any of our symbols to be - exported in any case. Hence we declare hidden visibility for all of - them. - - You may find an up-to-date version of these source files online: - - http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h - http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/sd-daemon.c - - This should compile on non-Linux systems, too, but with the - exception of the sd_is_xxx() calls all functions will become NOPs. - - See sd-daemon(3) for more information. -*/ - -#ifndef _sd_printf_attr_ -#if __GNUC__ >= 4 -#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b))) -#else -#define _sd_printf_attr_(a,b) -#endif -#endif - -/* - Log levels for usage on stderr: - - fprintf(stderr, SD_NOTICE "Hello World!\n"); - - This is similar to printk() usage in the kernel. -*/ -#define SD_EMERG "<0>" /* system is unusable */ -#define SD_ALERT "<1>" /* action must be taken immediately */ -#define SD_CRIT "<2>" /* critical conditions */ -#define SD_ERR "<3>" /* error conditions */ -#define SD_WARNING "<4>" /* warning conditions */ -#define SD_NOTICE "<5>" /* normal but significant condition */ -#define SD_INFO "<6>" /* informational */ -#define SD_DEBUG "<7>" /* debug-level messages */ - -/* The first passed file descriptor is fd 3 */ -#define SD_LISTEN_FDS_START 3 - -/* - Returns how many file descriptors have been passed, or a negative - errno code on failure. Optionally, removes the $LISTEN_FDS and - $LISTEN_PID file descriptors from the environment (recommended, but - problematic in threaded environments). If r is the return value of - this function you'll find the file descriptors passed as fds - SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative - errno style error code on failure. This function call ensures that - the FD_CLOEXEC flag is set for the passed file descriptors, to make - sure they are not passed on to child processes. If FD_CLOEXEC shall - not be set, the caller needs to unset it after this call for all file - descriptors that are used. - - See sd_listen_fds(3) for more information. -*/ -int sd_listen_fds(int unset_environment); - -/* - Helper call for identifying a passed file descriptor. Returns 1 if - the file descriptor is a FIFO in the file system stored under the - specified path, 0 otherwise. If path is NULL a path name check will - not be done and the call only verifies if the file descriptor - refers to a FIFO. Returns a negative errno style error code on - failure. - - See sd_is_fifo(3) for more information. -*/ -int sd_is_fifo(int fd, const char *path); - -/* - Helper call for identifying a passed file descriptor. Returns 1 if - the file descriptor is a special character device on the file - system stored under the specified path, 0 otherwise. - If path is NULL a path name check will not be done and the call - only verifies if the file descriptor refers to a special character. - Returns a negative errno style error code on failure. - - See sd_is_special(3) for more information. -*/ -int sd_is_special(int fd, const char *path); - -/* - Helper call for identifying a passed file descriptor. Returns 1 if - the file descriptor is a socket of the specified family (AF_INET, - ...) and type (SOCK_DGRAM, SOCK_STREAM, ...), 0 otherwise. If - family is 0 a socket family check will not be done. If type is 0 a - socket type check will not be done and the call only verifies if - the file descriptor refers to a socket. If listening is > 0 it is - verified that the socket is in listening mode. (i.e. listen() has - been called) If listening is == 0 it is verified that the socket is - not in listening mode. If listening is < 0 no listening mode check - is done. Returns a negative errno style error code on failure. - - See sd_is_socket(3) for more information. -*/ -int sd_is_socket(int fd, int family, int type, int listening); - -/* - Helper call for identifying a passed file descriptor. Returns 1 if - the file descriptor is an Internet socket, of the specified family - (either AF_INET or AF_INET6) and the specified type (SOCK_DGRAM, - SOCK_STREAM, ...), 0 otherwise. If version is 0 a protocol version - check is not done. If type is 0 a socket type check will not be - done. If port is 0 a socket port check will not be done. The - listening flag is used the same way as in sd_is_socket(). Returns a - negative errno style error code on failure. - - See sd_is_socket_inet(3) for more information. -*/ -int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port); - -/* - Helper call for identifying a passed file descriptor. Returns 1 if - the file descriptor is an AF_UNIX socket of the specified type - (SOCK_DGRAM, SOCK_STREAM, ...) and path, 0 otherwise. If type is 0 - a socket type check will not be done. If path is NULL a socket path - check will not be done. For normal AF_UNIX sockets set length to - 0. For abstract namespace sockets set length to the length of the - socket name (including the initial 0 byte), and pass the full - socket path in path (including the initial 0 byte). The listening - flag is used the same way as in sd_is_socket(). Returns a negative - errno style error code on failure. - - See sd_is_socket_unix(3) for more information. -*/ -int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length); - -/* - Helper call for identifying a passed file descriptor. Returns 1 if - the file descriptor is a POSIX Message Queue of the specified name, - 0 otherwise. If path is NULL a message queue name check is not - done. Returns a negative errno style error code on failure. -*/ -int sd_is_mq(int fd, const char *path); - -/* - Informs systemd about changed daemon state. This takes a number of - newline separated environment-style variable assignments in a - string. The following variables are known: - - READY=1 Tells systemd that daemon startup is finished (only - relevant for services of Type=notify). The passed - argument is a boolean "1" or "0". Since there is - little value in signaling non-readiness the only - value daemons should send is "READY=1". - - STATUS=... Passes a single-line status string back to systemd - that describes the daemon state. This is free-from - and can be used for various purposes: general state - feedback, fsck-like programs could pass completion - percentages and failing programs could pass a human - readable error message. Example: "STATUS=Completed - 66% of file system check..." - - ERRNO=... If a daemon fails, the errno-style error code, - formatted as string. Example: "ERRNO=2" for ENOENT. - - BUSERROR=... If a daemon fails, the D-Bus error-style error - code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut" - - MAINPID=... The main pid of a daemon, in case systemd did not - fork off the process itself. Example: "MAINPID=4711" - - WATCHDOG=1 Tells systemd to update the watchdog timestamp. - Services using this feature should do this in - regular intervals. A watchdog framework can use the - timestamps to detect failed services. - - Daemons can choose to send additional variables. However, it is - recommended to prefix variable names not listed above with X_. - - Returns a negative errno-style error code on failure. Returns > 0 - if systemd could be notified, 0 if it couldn't possibly because - systemd is not running. - - Example: When a daemon finished starting up, it could issue this - call to notify systemd about it: - - sd_notify(0, "READY=1"); - - See sd_notifyf() for more complete examples. - - See sd_notify(3) for more information. -*/ -int sd_notify(int unset_environment, const char *state); - -/* - Similar to sd_notify() but takes a format string. - - Example 1: A daemon could send the following after initialization: - - sd_notifyf(0, "READY=1\n" - "STATUS=Processing requests...\n" - "MAINPID=%lu", - (unsigned long) getpid()); - - Example 2: A daemon could send the following shortly before - exiting, on failure: - - sd_notifyf(0, "STATUS=Failed to start up: %s\n" - "ERRNO=%i", - strerror(errno), - errno); - - See sd_notifyf(3) for more information. -*/ -int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3); - -/* - Returns > 0 if the system was booted with systemd. Returns < 0 on - error. Returns 0 if the system was not booted with systemd. Note - that all of the functions above handle non-systemd boots just - fine. You should NOT protect them with a call to this function. Also - note that this function checks whether the system, not the user - session is controlled by systemd. However the functions above work - for both user and system services. - - See sd_booted(3) for more information. -*/ -int sd_booted(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/doc/Makefile.in b/doc/Makefile.in index e58e7693..a48c7e5a 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,13 +81,13 @@ host_triplet = @host@ @DBUS_XML_DOCS_ENABLED_TRUE@am__append_1 = $(XMLTO_HTML) @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@@DBUS_HAVE_XSLTPROC_TRUE@am__append_2 = dbus.devhelp subdir = doc -DIST_COMMON = $(dist_doc_DATA) $(dist_html_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/dbus-cleanup-sockets.1.xml.in \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/dbus-cleanup-sockets.1.xml.in \ $(srcdir)/dbus-daemon.1.xml.in $(srcdir)/dbus-launch.1.xml.in \ $(srcdir)/dbus-monitor.1.xml.in \ $(srcdir)/dbus-run-session.1.xml.in \ $(srcdir)/dbus-send.1.xml.in $(srcdir)/dbus-uuidgen.1.xml.in \ - TODO + $(dist_doc_DATA) $(dist_html_DATA) TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -77,12 +104,18 @@ CONFIG_CLEAN_FILES = dbus-cleanup-sockets.1.xml dbus-daemon.1.xml \ dbus-launch.1.xml dbus-monitor.1.xml dbus-run-session.1.xml \ dbus-send.1.xml dbus-uuidgen.1.xml CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -123,6 +156,7 @@ am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(docdir)" \ NROFF = nroff MANS = $(man1_MANS) DATA = $(dist_doc_DATA) $(dist_html_DATA) $(html_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADT_LIBS = @ADT_LIBS@ @@ -176,7 +210,6 @@ DBUS_USER = @DBUS_USER@ DBUS_VERSION = @DBUS_VERSION@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ -DEFAULT_MESSAGE_UNIX_FDS = @DEFAULT_MESSAGE_UNIX_FDS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -557,27 +590,14 @@ uninstall-htmlDATA: @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -646,8 +666,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@uninstall-local: @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@install-data-local: +@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@uninstall-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am @@ -721,20 +741,20 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-local install-dist_docDATA install-dist_htmlDATA \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-htmlDATA install-info \ - install-info-am install-man install-man1 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-dist_docDATA uninstall-dist_htmlDATA \ - uninstall-htmlDATA uninstall-local uninstall-man \ - uninstall-man1 + clean-libtool clean-local cscopelist-am ctags-am distclean \ + distclean-generic distclean-libtool distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-dist_docDATA \ + install-dist_htmlDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-htmlDATA \ + install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am uninstall-dist_docDATA \ + uninstall-dist_htmlDATA uninstall-htmlDATA uninstall-local \ + uninstall-man uninstall-man1 @DBUS_XML_DOCS_ENABLED_TRUE@%.html: %.xml diff --git a/doc/dbus-daemon.1.xml.in b/doc/dbus-daemon.1.xml.in index 1a1e42cd..cd7942c3 100644 --- a/doc/dbus-daemon.1.xml.in +++ b/doc/dbus-daemon.1.xml.in @@ -392,12 +392,13 @@ DBUS_SESSION_BUS_ADDRESS is set.</para> <para>Example: <listen>tcp:host=localhost,port=0</listen></para> -<para>tcp addresses also allow a bind=hostname option, which will override -the host option specifying what address to bind to, without changing -the address reported by the bus. The bind option can also take a -special name '*' to cause the bus to listen on all local address -(INADDR_ANY). The specified host should be a valid name of the local -machine or weird stuff will happen.</para> +<para>tcp/nonce-tcp addresses also allow a bind=hostname option, +used in a listenable address to configure the interface on which +the server will listen: either the hostname is the IP address of +one of the local machine's interfaces (most commonly 127.0.0.1), +or a DNS name that resolves to one of those IP addresses, or '*' +to listen on all interfaces simultaneously. If not specified, +the default is the same value as "host".</para> <para>Example: <listen>tcp:host=localhost,bind=*,port=0</listen></para> @@ -527,6 +528,10 @@ Available limit names are:</para> "auth_timeout" : milliseconds (thousandths) a connection is given to authenticate + "pending_fd_timeout" : milliseconds (thousandths) a + fd is given to be transmitted to + dbus-daemon before disconnecting the + connection "max_completed_connections" : max number of authenticated connections "max_incomplete_connections" : max number of unauthenticated connections diff --git a/doc/dbus-launch.1.xml.in b/doc/dbus-launch.1.xml.in index 31dd6eac..5135d9ca 100644 --- a/doc/dbus-launch.1.xml.in +++ b/doc/dbus-launch.1.xml.in @@ -106,7 +106,7 @@ run by your X session, such as or <filename>~/.Xclients</filename>.</para> -<para>To start a D-Bus session within a text\(hymode session, +<para>To start a D-Bus session within a text-mode session, do not use <emphasis remap='B'>dbus-launch</emphasis>. Instead, see <citerefentry><refentrytitle>dbus-run-session</refentrytitle><manvolnum>1</manvolnum></citerefentry>. </para> diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index bc374b9b..eea5eada 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -6,48 +6,48 @@ <article id="index"> <articleinfo> <title>D-Bus Specification</title> - <releaseinfo>Version 0.22</releaseinfo> - <date>2013-10-09</date> + <releaseinfo>Version 0.24</releaseinfo> + <date>2014-10-01</date> <authorgroup> <author> - <firstname>Havoc</firstname> - <surname>Pennington</surname> - <affiliation> - <orgname>Red Hat, Inc.</orgname> - <address> - <email>hp@pobox.com</email> - </address> - </affiliation> + <firstname>Havoc</firstname> + <surname>Pennington</surname> + <affiliation> + <orgname>Red Hat, Inc.</orgname> + <address> + <email>hp@pobox.com</email> + </address> + </affiliation> </author> <author> - <firstname>Anders</firstname> - <surname>Carlsson</surname> - <affiliation> - <orgname>CodeFactory AB</orgname> - <address> + <firstname>Anders</firstname> + <surname>Carlsson</surname> + <affiliation> + <orgname>CodeFactory AB</orgname> + <address> <email>andersca@codefactory.se</email> </address> - </affiliation> + </affiliation> </author> <author> - <firstname>Alexander</firstname> - <surname>Larsson</surname> - <affiliation> - <orgname>Red Hat, Inc.</orgname> - <address> + <firstname>Alexander</firstname> + <surname>Larsson</surname> + <affiliation> + <orgname>Red Hat, Inc.</orgname> + <address> <email>alexl@redhat.com</email> </address> - </affiliation> + </affiliation> </author> <author> - <firstname>Sven</firstname> - <surname>Herzberg</surname> - <affiliation> - <orgname>Imendio AB</orgname> - <address> + <firstname>Sven</firstname> + <surname>Herzberg</surname> + <affiliation> + <orgname>Imendio AB</orgname> + <address> <email>sven@imendio.com</email> </address> - </affiliation> + </affiliation> </author> <author> <firstname>Simon</firstname> @@ -63,15 +63,33 @@ <firstname>David</firstname> <surname>Zeuthen</surname> <affiliation> - <orgname>Red Hat, Inc.</orgname> <address> - <email>davidz@redhat.com</email> + <email>zeuthen@gmail.com</email> </address> </affiliation> </author> </authorgroup> <revhistory> <revision> + <revnumber>0.24</revnumber> + <date>2014-10-01</date> + <authorinitials>SMcV</authorinitials> + <revremark> + non-method-calls never expect a reply even without NO_REPLY_EXPECTED; + document how to quote match rules + </revremark> + </revision> + <revision> + <revnumber>0.23</revnumber> + <date>2014-01-06</date> + <authorinitials>SMcV, CY</authorinitials> + <revremark> + method call messages with no INTERFACE may be considered an error; + document tcp:bind=... and nonce-tcp:bind=...; define listenable + and connectable addresses + </revremark> + </revision> + <revision> <revnumber>0.22</revnumber> <date>2013-10-09</date> <authorinitials></authorinitials> @@ -757,14 +775,14 @@ <entry>0 (ASCII NUL)</entry> <entry>Not a valid type code, used to terminate signatures</entry> </row><row> - <entry><literal>BYTE</literal></entry> - <entry>121 (ASCII 'y')</entry> - <entry>8-bit unsigned integer</entry> + <entry><literal>BYTE</literal></entry> + <entry>121 (ASCII 'y')</entry> + <entry>8-bit unsigned integer</entry> + </row><row> + <entry><literal>BOOLEAN</literal></entry> + <entry>98 (ASCII 'b')</entry> + <entry>Boolean value, 0 is <literal>FALSE</literal> and 1 is <literal>TRUE</literal>. Everything else is invalid.</entry> </row><row> - <entry><literal>BOOLEAN</literal></entry> - <entry>98 (ASCII 'b')</entry> - <entry>Boolean value, 0 is <literal>FALSE</literal> and 1 is <literal>TRUE</literal>. Everything else is invalid.</entry> - </row><row> <entry><literal>INT16</literal></entry> <entry>110 (ASCII 'n')</entry> <entry>16-bit signed integer</entry> @@ -772,7 +790,7 @@ <entry><literal>UINT16</literal></entry> <entry>113 (ASCII 'q')</entry> <entry>16-bit unsigned integer</entry> - </row><row> + </row><row> <entry><literal>INT32</literal></entry> <entry>105 (ASCII 'i')</entry> <entry>32-bit signed integer</entry> @@ -780,7 +798,7 @@ <entry><literal>UINT32</literal></entry> <entry>117 (ASCII 'u')</entry> <entry>32-bit unsigned integer</entry> - </row><row> + </row><row> <entry><literal>INT64</literal></entry> <entry>120 (ASCII 'x')</entry> <entry>64-bit signed integer</entry> @@ -1101,7 +1119,7 @@ <entry> 8 </entry> - </row><row> + </row><row> <entry><literal>VARIANT</literal></entry> <entry> The marshaled <literal>SIGNATURE</literal> of a single @@ -1111,7 +1129,7 @@ <entry> 1 (alignment of the signature) </entry> - </row><row> + </row><row> <entry><literal>DICT_ENTRY</literal></entry> <entry> Identical to STRUCT. @@ -1128,7 +1146,7 @@ file descriptor in the array of file descriptors that accompany the message.</entry> <entry>4</entry> - </row> + </row> </tbody> </tgroup> </informaltable> @@ -1283,7 +1301,8 @@ <row> <entry><literal>METHOD_CALL</literal></entry> <entry>1</entry> - <entry>Method call.</entry> + <entry>Method call. This message type may prompt a + reply.</entry> </row> <row> <entry><literal>METHOD_RETURN</literal></entry> @@ -1320,11 +1339,26 @@ <row> <entry><literal>NO_REPLY_EXPECTED</literal></entry> <entry>0x1</entry> - <entry>This message does not expect method return replies or - error replies; the reply can be omitted as an - optimization. However, it is compliant with this specification - to return the reply despite this flag and the only harm - from doing so is extra network traffic. + <entry> + <para> + This message does not expect method return replies or + error replies, even if it is of a type that can + have a reply; the reply can be omitted as an + optimization. It is compliant with this specification + to return the reply despite this flag, although doing + so on a bus with a non-trivial security policy + (such as the well-known system bus) may result in + access denial messages being logged for the reply. + </para> + <para> + Note that METHOD_CALL is the only message type currently + defined in this specification that can expect a reply, + so the presence or absence of this flag in the other + three message types that are currently + documented is meaningless: replies to those message + types should not be sent, whether this flag is present + or not. + </para> </entry> </row> <row> @@ -1520,12 +1554,12 @@ </para> </listitem> - <listitem><para>Interface names must contain at least one '.' (period) + <listitem><para>Interface names must contain at least one '.' (period) character (and thus at least two elements). </para></listitem> - <listitem><para>Interface names must not begin with a '.' (period) character.</para></listitem> - <listitem><para>Interface names must not exceed the maximum name length.</para></listitem> + <listitem><para>Interface names must not begin with a '.' (period) character.</para></listitem> + <listitem><para>Interface names must not exceed the maximum name length.</para></listitem> </itemizedlist> </para> @@ -1584,12 +1618,12 @@ </para> </listitem> - <listitem><para>Bus names must contain at least one '.' (period) + <listitem><para>Bus names must contain at least one '.' (period) character (and thus at least two elements). </para></listitem> - <listitem><para>Bus names must not begin with a '.' (period) character.</para></listitem> - <listitem><para>Bus names must not exceed the maximum name length.</para></listitem> + <listitem><para>Bus names must not begin with a '.' (period) character.</para></listitem> + <listitem><para>Bus names must not exceed the maximum name length.</para></listitem> </itemizedlist> </para> <para> @@ -1627,12 +1661,12 @@ <para> Member (i.e. method or signal) names: <itemizedlist> - <listitem><para>Must only contain the ASCII characters + <listitem><para>Must only contain the ASCII characters "[A-Z][a-z][0-9]_" and may not begin with a digit.</para></listitem> - <listitem><para>Must not contain the '.' (period) character.</para></listitem> - <listitem><para>Must not exceed the maximum name length.</para></listitem> - <listitem><para>Must be at least 1 byte in length.</para></listitem> + <listitem><para>Must not contain the '.' (period) character.</para></listitem> + <listitem><para>Must not exceed the maximum name length.</para></listitem> + <listitem><para>Must be at least 1 byte in length.</para></listitem> </itemizedlist> </para> @@ -1680,12 +1714,25 @@ <para> A method call message is required to have a <literal>MEMBER</literal> header field indicating the name of the method. Optionally, the message has an - <literal>INTERFACE</literal> field giving the interface the method is a part of. In the - absence of an <literal>INTERFACE</literal> field, if two interfaces on the same object have - a method with the same name, it is undefined which of the two methods - will be invoked. Implementations may also choose to return an error in - this ambiguous case. However, if a method name is unique - implementations must not require an interface field. + <literal>INTERFACE</literal> field giving the interface the method is a part of. + Including the <literal>INTERFACE</literal> in all method call + messages is strongly recommended. + </para> + <para> + In the absence of an <literal>INTERFACE</literal> field, if two + or more interfaces on the same object have a method with the same + name, it is undefined which of those methods will be invoked. + Implementations may choose to either return an error, or deliver the + message as though it had an arbitrary one of those interfaces. + </para> + <para> + In some situations (such as the well-known system bus), messages + are filtered through an access-control list external to the + remote object implementation. If that filter rejects certain + messages by matching their interface, or accepts only messages + to specific interfaces, it must also reject messages that have no + <literal>INTERFACE</literal>: otherwise, malicious + applications could use this to bypass the filter. </para> <para> Method call messages also include a <literal>PATH</literal> field @@ -1963,23 +2010,23 @@ Commands from the client to the server are as follows: <itemizedlist> - <listitem><para>AUTH [mechanism] [initial-response]</para></listitem> - <listitem><para>CANCEL</para></listitem> - <listitem><para>BEGIN</para></listitem> - <listitem><para>DATA <data in hex encoding></para></listitem> - <listitem><para>ERROR [human-readable error explanation]</para></listitem> - <listitem><para>NEGOTIATE_UNIX_FD</para></listitem> - </itemizedlist> + <listitem><para>AUTH [mechanism] [initial-response]</para></listitem> + <listitem><para>CANCEL</para></listitem> + <listitem><para>BEGIN</para></listitem> + <listitem><para>DATA <data in hex encoding></para></listitem> + <listitem><para>ERROR [human-readable error explanation]</para></listitem> + <listitem><para>NEGOTIATE_UNIX_FD</para></listitem> + </itemizedlist> From server to client are as follows: <itemizedlist> - <listitem><para>REJECTED <space-separated list of mechanism names></para></listitem> - <listitem><para>OK <GUID in hex></para></listitem> - <listitem><para>DATA <data in hex encoding></para></listitem> - <listitem><para>ERROR</para></listitem> - <listitem><para>AGREE_UNIX_FD</para></listitem> - </itemizedlist> + <listitem><para>REJECTED <space-separated list of mechanism names></para></listitem> + <listitem><para>OK <GUID in hex></para></listitem> + <listitem><para>DATA <data in hex encoding></para></listitem> + <listitem><para>ERROR</para></listitem> + <listitem><para>AGREE_UNIX_FD</para></listitem> + </itemizedlist> </para> <para> Unofficial extensions to the command set must begin with the letters @@ -2209,18 +2256,18 @@ <para> <figure> - <title>Example of successful magic cookie authentication</title> - <programlisting> + <title>Example of successful magic cookie authentication</title> + <programlisting> (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 S: OK 1234deadbeef C: BEGIN </programlisting> - </figure> + </figure> <figure> - <title>Example of finding out mechanisms then picking one</title> - <programlisting> + <title>Example of finding out mechanisms then picking one</title> + <programlisting> C: AUTH S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2229,20 +2276,20 @@ S: OK 1234deadbeef C: BEGIN </programlisting> - </figure> + </figure> <figure> - <title>Example of client sends unknown command then falls back to regular auth</title> - <programlisting> + <title>Example of client sends unknown command then falls back to regular auth</title> + <programlisting> C: FOOBAR S: ERROR C: AUTH MAGIC_COOKIE 3736343435313230333039 S: OK 1234deadbeef C: BEGIN </programlisting> - </figure> + </figure> <figure> - <title>Example of server doesn't support initial auth mechanism</title> - <programlisting> + <title>Example of server doesn't support initial auth mechanism</title> + <programlisting> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2251,10 +2298,10 @@ S: OK 1234deadbeef C: BEGIN </programlisting> - </figure> + </figure> <figure> - <title>Example of wrong password or the like followed by successful retry</title> - <programlisting> + <title>Example of wrong password or the like followed by successful retry</title> + <programlisting> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2267,10 +2314,10 @@ S: OK 1234deadbeef C: BEGIN </programlisting> - </figure> + </figure> <figure> - <title>Example of skey cancelled and restarted</title> - <programlisting> + <title>Example of skey cancelled and restarted</title> + <programlisting> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -2283,10 +2330,10 @@ S: OK 1234deadbeef C: BEGIN </programlisting> - </figure> + </figure> <figure> - <title>Example of successful magic cookie authentication with successful negotiation of Unix FD passing</title> - <programlisting> + <title>Example of successful magic cookie authentication with successful negotiation of Unix FD passing</title> + <programlisting> (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 @@ -2295,10 +2342,10 @@ S: AGREE_UNIX_FD C: BEGIN </programlisting> - </figure> + </figure> <figure> - <title>Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing</title> - <programlisting> + <title>Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing</title> + <programlisting> (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 @@ -2307,7 +2354,7 @@ S: ERROR C: BEGIN </programlisting> - </figure> + </figure> </para> </sect2> <sect2 id="auth-states"> @@ -2930,6 +2977,35 @@ <programlisting>unix:path=/tmp/dbus-test;unix:path=/tmp/dbus-test2</programlisting> </para> + <para> + Some addresses are <firstterm>connectable</firstterm>. A connectable + address is one containing enough information for a client to connect + to it. For instance, <literal>tcp:host=127.0.0.1,port=4242</literal> + is a connectable address. It is not necessarily possible to listen + on every connectable address: for instance, it is not possible to + listen on a <literal>unixexec:</literal> address. + </para> + + <para> + Some addresses are <firstterm>listenable</firstterm>. A listenable + address is one containing enough information for a server to listen on + it, producing a connectable address (which may differ from the + original address). Many listenable addresses are not connectable: + for instance, <literal>tcp:host=127.0.0.1</literal> + is listenable, but not connectable (because it does not specify + a port number). + </para> + + <para> + Listening on an address that is not connectable will result in a + connectable address that is not the same as the listenable address. + For instance, listening on <literal>tcp:host=127.0.0.1</literal> + might result in the connectable address + <literal>tcp:host=127.0.0.1,port=30958</literal>, + or listening on <literal>unix:tmpdir=/tmp</literal> + might result in the connectable address + <literal>unix:abstract=/tmp/dbus-U8OSdmf7</literal>. + </para> </sect1> <sect1 id="transports"> @@ -2947,21 +3023,28 @@ <title>Unix Domain Sockets</title> <para> Unix domain sockets can be either paths in the file system or on Linux - kernels, they can be abstract which are similar to paths but - do not show up in the file system. + kernels, they can be abstract which are similar to paths but + do not show up in the file system. </para> <para> When a socket is opened by the D-Bus library it truncates the path - name right before the first trailing Nul byte. This is true for both - normal paths and abstract paths. Note that this is a departure from - previous versions of D-Bus that would create sockets with a fixed - length path name. Names which were shorter than the fixed length - would be padded by Nul bytes. + name right before the first trailing Nul byte. This is true for both + normal paths and abstract paths. Note that this is a departure from + previous versions of D-Bus that would create sockets with a fixed + length path name. Names which were shorter than the fixed length + would be padded by Nul bytes. </para> <para> Unix domain sockets are not available on Windows. </para> + <para> + Unix addresses that specify <literal>path</literal> or + <literal>abstract</literal> are both listenable and connectable. + Unix addresses that specify <literal>tmpdir</literal> are only + listenable: the corresponding connectable address will specify + either <literal>path</literal> or <literal>abstract</literal>. + </para> <sect3 id="transports-unix-domain-sockets-addresses"> <title>Server Address Format</title> <para> @@ -2991,11 +3074,16 @@ <row> <entry>abstract</entry> <entry>(string)</entry> - <entry>unique string (path) in the abstract namespace. If set, the "path" or "tempdir" key must not be set.</entry> + <entry>unique string (path) in the abstract namespace. If set, the "path" or "tmpdir" key must not be set. This key is only supported on platforms with "abstract Unix sockets", of which Linux is the only known example.</entry> </row> </tbody> </tgroup> </informaltable> + <para> + Exactly one of the keys <literal>path</literal>, + <literal>abstract</literal> or + <literal>tmpdir</literal> must be provided. + </para> </sect3> </sect2> <sect2 id="transports-launchd"> @@ -3019,6 +3107,9 @@ <para> launchd is not available on Microsoft Windows. </para> + <para> + launchd addresses are listenable and connectable. + </para> <sect3 id="transports-launchd-addresses"> <title>Server Address Format</title> <para> @@ -3043,6 +3134,9 @@ </tbody> </tgroup> </informaltable> + <para> + The <literal>env</literal> key is required. + </para> </sect3> </sect2> <sect2 id="transports-systemd"> @@ -3065,6 +3159,11 @@ <para> The systemd transport defines no parameter keys. </para> + <para> + systemd addresses are listenable, but not connectable. The + corresponding connectable address is the <literal>unix</literal> + or <literal>tcp</literal> address of the socket. + </para> </sect2> <sect2 id="transports-tcp-sockets"> <title>TCP Sockets</title> @@ -3077,9 +3176,16 @@ over a network is unsecure. </para> <para> - Windows notes: Because of the tcp stack on Windows does not provide sending - credentials over a tcp connection, the EXTERNAL authentification - mechanismus does not work. + On Windows and most Unix platforms, the TCP stack is unable to transfer + credentials over a TCP connection, so the EXTERNAL authentication + mechanism does not work for this transport. + </para> + <para> + All <literal>tcp</literal> addresses are listenable. + <literal>tcp</literal> addresses in which both + <literal>host</literal> and <literal>port</literal> are + specified, and <literal>port</literal> is non-zero, + are also connectable. </para> <sect3 id="transports-tcp-sockets-addresses"> <title>Server Address Format</title> @@ -3100,7 +3206,18 @@ <row> <entry>host</entry> <entry>(string)</entry> - <entry>dns name or ip address</entry> + <entry>DNS name or IP address</entry> + </row> + <row> + <entry>bind</entry> + <entry>(string)</entry> + <entry>Used in a listenable address to configure the interface + on which the server will listen: either the IP address of one of + the local machine's interfaces (most commonly <literal>127.0.0.1 + </literal>), or a DNS name that resolves to one of those IP + addresses, or '*' to listen on all interfaces simultaneously. + If not specified, the default is the same value as "host". + </entry> </row> <row> <entry>port</entry> @@ -3151,6 +3268,12 @@ key-value pair and send it over the socket. After that, the transport behaves like an unsecured tcp transport. </para> + <para> + All nonce-tcp addresses are listenable. nonce-tcp addresses in which + <literal>host</literal>, <literal>port</literal> and + <literal>noncefile</literal> are all specified, + and <literal>port</literal> is nonzero, are also connectable. + </para> <sect3 id="transports-nonce-tcp-sockets-addresses"> <title>Server Address Format</title> <para> @@ -3170,7 +3293,13 @@ <row> <entry>host</entry> <entry>(string)</entry> - <entry>dns name or ip address</entry> + <entry>DNS name or IP address</entry> + </row> + <row> + <entry>bind</entry> + <entry>(string)</entry> + <entry>The same as for tcp: addresses + </entry> </row> <row> <entry>port</entry> @@ -3188,7 +3317,10 @@ <row> <entry>noncefile</entry> <entry>(path)</entry> - <entry>file location containing the secret</entry> + <entry>File location containing the secret. + This is only meaningful in connectable addresses: + a listening D-Bus server that offers this transport + will always create a new nonce file.</entry> </row> </tbody> </tgroup> @@ -3211,6 +3343,10 @@ <para> Executed subprocesses are not available on Windows. </para> + <para> + <literal>unixexec</literal> addresses are connectable, but are not + listenable. + </para> <sect3 id="transports-exec-addresses"> <title>Server Address Format</title> <para> @@ -3269,6 +3405,15 @@ <para>The autolaunch transport provides a way for dbus clients to autodetect a running dbus session bus and to autolaunch a session bus if not present. </para> + <para> + On Unix, <literal>autolaunch</literal> addresses are connectable, + but not listenable. + </para> + <para> + On Windows, <literal>autolaunch</literal> addresses are both + connectable and listenable. + </para> + <sect3 id="meta-transports-autolaunch-addresses"> <title>Server Address Format</title> <para> @@ -3744,38 +3889,38 @@ <para> Method, interface, property, and signal elements may have "annotations", which are generic key/value pairs of metadata. - They are similar conceptually to Java's annotations and C# attributes. + They are similar conceptually to Java's annotations and C# attributes. Well-known annotations: </para> <informaltable> <tgroup cols="3"> - <thead> - <row> - <entry>Name</entry> - <entry>Values (separated by ,)</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>org.freedesktop.DBus.Deprecated</entry> - <entry>true,false</entry> - <entry>Whether or not the entity is deprecated; defaults to false</entry> - </row> - <row> - <entry>org.freedesktop.DBus.GLib.CSymbol</entry> - <entry>(string)</entry> - <entry>The C symbol; may be used for methods and interfaces</entry> - </row> - <row> - <entry>org.freedesktop.DBus.Method.NoReply</entry> - <entry>true,false</entry> - <entry>If set, don't expect a reply to the method call; defaults to false.</entry> - </row> - <row> - <entry>org.freedesktop.DBus.Property.EmitsChangedSignal</entry> - <entry>true,invalidates,false</entry> - <entry> + <thead> + <row> + <entry>Name</entry> + <entry>Values (separated by ,)</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>org.freedesktop.DBus.Deprecated</entry> + <entry>true,false</entry> + <entry>Whether or not the entity is deprecated; defaults to false</entry> + </row> + <row> + <entry>org.freedesktop.DBus.GLib.CSymbol</entry> + <entry>(string)</entry> + <entry>The C symbol; may be used for methods and interfaces</entry> + </row> + <row> + <entry>org.freedesktop.DBus.Method.NoReply</entry> + <entry>true,false</entry> + <entry>If set, don't expect a reply to the method call; defaults to false.</entry> + </row> + <row> + <entry>org.freedesktop.DBus.Property.EmitsChangedSignal</entry> + <entry>true,invalidates,false</entry> + <entry> <para> If set to <literal>false</literal>, the <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal> @@ -3800,8 +3945,8 @@ interface element. </para> </entry> - </row> - </tbody> + </row> + </tbody> </tgroup> </informaltable> </sect1> @@ -3914,11 +4059,11 @@ <entry>STRING</entry> <entry>Name to request</entry> </row> - <row> - <entry>1</entry> - <entry>UINT32</entry> - <entry>Flags</entry> - </row> + <row> + <entry>1</entry> + <entry>UINT32</entry> + <entry>Flags</entry> + </row> </tbody> </tgroup> </informaltable> @@ -4029,10 +4174,10 @@ </row> </thead> <tbody> - <row> - <entry>DBUS_NAME_FLAG_ALLOW_REPLACEMENT</entry> - <entry>0x1</entry> - <entry> + <row> + <entry>DBUS_NAME_FLAG_ALLOW_REPLACEMENT</entry> + <entry>0x1</entry> + <entry> If an application A specifies this flag and succeeds in becoming the owner of the name, and another application B @@ -4046,11 +4191,11 @@ application A as the owner. </entry> - </row> - <row> - <entry>DBUS_NAME_FLAG_REPLACE_EXISTING</entry> - <entry>0x2</entry> - <entry> + </row> + <row> + <entry>DBUS_NAME_FLAG_REPLACE_EXISTING</entry> + <entry>0x2</entry> + <entry> Try to replace the current owner if there is one. If this flag is not set the application will only become the owner of @@ -4059,11 +4204,11 @@ the current owner specified DBUS_NAME_FLAG_ALLOW_REPLACEMENT. </entry> - </row> - <row> - <entry>DBUS_NAME_FLAG_DO_NOT_QUEUE</entry> - <entry>0x4</entry> - <entry> + </row> + <row> + <entry>DBUS_NAME_FLAG_DO_NOT_QUEUE</entry> + <entry>0x4</entry> + <entry> Without this flag, if an application requests a name that is already owned, the application will be placed in a queue to @@ -4076,10 +4221,10 @@ became the name owner. </entry> - </row> - </tbody> - </tgroup> - </informaltable> + </row> + </tbody> + </tgroup> + </informaltable> The return code can be one of the following values: @@ -4093,41 +4238,41 @@ </row> </thead> <tbody> - <row> + <row> <entry>DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER</entry> - <entry>1</entry> <entry>The caller is now the primary owner of - the name, replacing any previous owner. Either the name had no - owner before, or the caller specified - DBUS_NAME_FLAG_REPLACE_EXISTING and the current owner specified + <entry>1</entry> <entry>The caller is now the primary owner of + the name, replacing any previous owner. Either the name had no + owner before, or the caller specified + DBUS_NAME_FLAG_REPLACE_EXISTING and the current owner specified DBUS_NAME_FLAG_ALLOW_REPLACEMENT.</entry> - </row> - <row> - <entry>DBUS_REQUEST_NAME_REPLY_IN_QUEUE</entry> - <entry>2</entry> + </row> + <row> + <entry>DBUS_REQUEST_NAME_REPLY_IN_QUEUE</entry> + <entry>2</entry> - <entry>The name already had an owner, + <entry>The name already had an owner, DBUS_NAME_FLAG_DO_NOT_QUEUE was not specified, and either the current owner did not specify DBUS_NAME_FLAG_ALLOW_REPLACEMENT or the requesting application did not specify DBUS_NAME_FLAG_REPLACE_EXISTING. </entry> - </row> - <row> - <entry>DBUS_REQUEST_NAME_REPLY_EXISTS</entry> <entry>3</entry> - <entry>The name already has an owner, - DBUS_NAME_FLAG_DO_NOT_QUEUE was specified, and either - DBUS_NAME_FLAG_ALLOW_REPLACEMENT was not specified by the - current owner, or DBUS_NAME_FLAG_REPLACE_EXISTING was not - specified by the requesting application.</entry> - </row> - <row> - <entry>DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER</entry> - <entry>4</entry> - <entry>The application trying to request ownership of a name is already the owner of it.</entry> - </row> - </tbody> - </tgroup> - </informaltable> + </row> + <row> + <entry>DBUS_REQUEST_NAME_REPLY_EXISTS</entry> <entry>3</entry> + <entry>The name already has an owner, + DBUS_NAME_FLAG_DO_NOT_QUEUE was specified, and either + DBUS_NAME_FLAG_ALLOW_REPLACEMENT was not specified by the + current owner, or DBUS_NAME_FLAG_REPLACE_EXISTING was not + specified by the requesting application.</entry> + </row> + <row> + <entry>DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER</entry> + <entry>4</entry> + <entry>The application trying to request ownership of a name is already the owner of it.</entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> </sect3> @@ -4200,7 +4345,7 @@ </row> </thead> <tbody> - <row> + <row> <entry>DBUS_RELEASE_NAME_REPLY_RELEASED</entry> <entry>1</entry> <entry>The caller has released his claim on the given name. Either the caller was the primary owner of @@ -4208,21 +4353,21 @@ waiting in the queue for the name, or the caller was waiting in the queue for the name and has now been removed from the queue.</entry> - </row> - <row> - <entry>DBUS_RELEASE_NAME_REPLY_NON_EXISTENT</entry> - <entry>2</entry> - <entry>The given name does not exist on this bus.</entry> - </row> - <row> - <entry>DBUS_RELEASE_NAME_REPLY_NOT_OWNER</entry> - <entry>3</entry> - <entry>The caller was not the primary owner of this name, + </row> + <row> + <entry>DBUS_RELEASE_NAME_REPLY_NON_EXISTENT</entry> + <entry>2</entry> + <entry>The given name does not exist on this bus.</entry> + </row> + <row> + <entry>DBUS_RELEASE_NAME_REPLY_NOT_OWNER</entry> + <entry>3</entry> + <entry>The caller was not the primary owner of this name, and was also not waiting in the queue to own this name.</entry> - </row> - </tbody> - </tgroup> - </informaltable> + </row> + </tbody> + </tgroup> + </informaltable> </para> </sect3> @@ -4303,7 +4448,9 @@ <literal>DESTINATION</literal> field is absent, it is considered to be a <firstterm>broadcast signal</firstterm>, and is sent to all applications with <firstterm>message matching rules</firstterm> that - match the message. Most signal messages are broadcasts. + match the message. Most signal messages are broadcasts, and + no other message types currently defined in this specification + may be broadcast. </para> <para> @@ -4343,7 +4490,7 @@ <para> Message bus implementations may impose a security policy which prevents certain messages from being sent or received. - When a message cannot be sent or received due to a security + When a method call message cannot be sent or received due to a security policy, the message bus should send an error reply, unless the original message had the <literal>NO_REPLY</literal> flag. </para> @@ -4384,7 +4531,7 @@ <sect3 id="message-bus-routing-match-rules"> <title>Match Rules</title> <para> - An important part of the message bus routing protocol is match + An important part of the message bus routing protocol is match rules. Match rules describe the messages that should be sent to a client, based on the contents of the message. Broadcast signals are only sent to clients which have a suitable match rule: this @@ -4413,6 +4560,32 @@ "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='Foo',path='/bar/foo',destination=':452345.34',arg2='bar'" </para> <para> + Within single quotes (ASCII apostrophe, U+0027), a backslash + (U+005C) represents itself, and an apostrophe ends the quoted + section. Outside single quotes, \' (backslash, apostrophe) + represents an apostrophe, and any backslash not followed by + an apostrophe represents itself. For instance, the match rules + <literal>arg0=''\''',arg1='\',arg2=',',arg3='\\'</literal> and + <literal>arg0=\',arg1=\,arg2=',',arg3=\\</literal> + both match messages where the arguments are a 1-character string + containing an apostrophe, a 1-character string containing a + backslash, a 1-character string containing a comma, and a + 2-character string containing two backslashes<footnote> + <para> + This idiosyncratic quoting style is based on the rules for + escaping items to appear inside single-quoted strings + in POSIX <literal>/bin/sh</literal>, but please + note that backslashes that are not inside single quotes have + different behaviour. This syntax does not offer any way to + represent an apostrophe inside single quotes (it is necessary + to leave the single-quoted section, backslash-escape the + apostrophe and re-enter single quotes), or to represent a + comma outside single quotes (it is necessary to wrap it in + a single-quoted section). + </para> + </footnote>. + </para> + <para> The following table describes the keys that can be used to create a match rule. <informaltable> @@ -4671,14 +4844,14 @@ and <literal>Exec</literal> (the command to be executed). <figure> - <title>Example service description file</title> - <programlisting> + <title>Example service description file</title> + <programlisting> # Sample service description file [D-BUS Service] Name=com.example.ConfigurationDatabase Exec=/usr/bin/sample-configd </programlisting> - </figure> + </figure> </para> <para> @@ -5260,16 +5433,16 @@ <entry>STRING</entry> <entry>Name with a new owner</entry> </row> - <row> - <entry>1</entry> - <entry>STRING</entry> - <entry>Old owner or empty string if none</entry> - </row> - <row> - <entry>2</entry> - <entry>STRING</entry> - <entry>New owner or empty string if none</entry> - </row> + <row> + <entry>1</entry> + <entry>STRING</entry> + <entry>Old owner or empty string if none</entry> + </row> + <row> + <entry>2</entry> + <entry>STRING</entry> + <entry>New owner or empty string if none</entry> + </row> </tbody> </tgroup> </informaltable> @@ -5369,11 +5542,11 @@ <entry>STRING</entry> <entry>Name of the service to start</entry> </row> - <row> - <entry>1</entry> - <entry>UINT32</entry> - <entry>Flags (currently not used)</entry> - </row> + <row> + <entry>1</entry> + <entry>UINT32</entry> + <entry>Flags (currently not used)</entry> + </row> </tbody> </tgroup> </informaltable> @@ -5411,7 +5584,7 @@ </row> </thead> <tbody> - <row> + <row> <entry>DBUS_START_REPLY_SUCCESS</entry> <entry>1</entry> <entry>The service was successfully started.</entry> @@ -5868,8 +6041,8 @@ </tgroup> </informaltable> Adds a match rule to match messages going through the message bus (see <xref linkend='message-bus-routing-match-rules'/>). - If the bus does not have enough resources the <literal>org.freedesktop.DBus.Error.OOM</literal> - error is returned. + If the bus does not have enough resources the <literal>org.freedesktop.DBus.Error.OOM</literal> + error is returned. </para> </sect3> <sect3 id="bus-messages-remove-match"> @@ -5899,8 +6072,8 @@ </tgroup> </informaltable> Removes the first rule that matches (see <xref linkend='message-bus-routing-match-rules'/>). - If the rule is not found the <literal>org.freedesktop.DBus.Error.MatchRuleNotFound</literal> - error is returned. + If the rule is not found the <literal>org.freedesktop.DBus.Error.MatchRuleNotFound</literal> + error is returned. </para> </sect3> @@ -6044,7 +6217,7 @@ <glossentry id="one-to-one"><glossterm>One-to-One</glossterm> <glossdef> - <para> + <para> An application talking directly to another application, without going through a message bus. One-to-one connections may be "peer to peer" or "client to server." The D-Bus protocol has no concept of client @@ -6084,7 +6257,7 @@ Services normally guarantee some particular features, for example they may guarantee that they will request a specific name such as "com.example.Screensaver", have a singleton object - "/com/example/Application", and that object will implement the + "/com/example/Application", and that object will implement the interface "com.example.Screensaver.Control". </para> </glossdef> diff --git a/doc/dbus-test-plan.xml b/doc/dbus-test-plan.xml index ee911149..e3efd2cd 100644 --- a/doc/dbus-test-plan.xml +++ b/doc/dbus-test-plan.xml @@ -48,7 +48,7 @@ <sect1 id="client-library"> <title>Testing the D-Bus client library</title> <para> - The tests for the client library consist of the dbus-test + The tests for the client library consist of the test-dbus program which is a unit test for all aspects of the client library. Whenever a bug in the client library is found and fixed, a test is added to make sure that the bug won't occur again. @@ -58,7 +58,7 @@ <para> The D-Bus client library consists of some data structures that are used internally; a linked list class, a hashtable class and - a string class. All aspects of those are tested by dbus-test. + a string class. All aspects of those are tested by test-dbus. </para> </sect2> <sect2 id="message-loader"> @@ -104,7 +104,7 @@ the D-Bus Reference Manual. </para> <para> - The message test part of dbus-test is using the message + The message test part of test-dbus is using the message builder to build different kinds of messages, both valid, invalid, and invalid ones, to make sure that the loader won't crash or leak memory of any of those, and that the loader @@ -170,10 +170,10 @@ a socket. </para> </sect2> - <sect2 id="bus-test"> - <title>The bus-test program</title> + <sect2 id="test-bus"> + <title>The test-bus program</title> <para> - The bus-test program is a program that is used to test various + The test-bus program is a program that is used to test various parts of the D-Bus bus daemon; robustness and that it conforms to the specifications. </para> @@ -185,7 +185,7 @@ testing easier. </para> <para> - The bus-test program should test all major features of the + The test-bus program should test all major features of the bus, such as service registration, notification when things occurs and message matching. </para> diff --git a/doc/dbus-tutorial.xml b/doc/dbus-tutorial.xml index c7580d15..3d14e5f7 100644 --- a/doc/dbus-tutorial.xml +++ b/doc/dbus-tutorial.xml @@ -882,7 +882,7 @@ <row> <entry><literal>ay</literal></entry> <entry>Array of bytes</entry> - <entry><literal>DBUS_TYPE_G_BYTE_ARRAY</literal></entry> + <entry><literal>DBUS_TYPE_G_UCHAR_ARRAY</literal></entry> <entry><literal>GArray *</literal></entry> <entry>g_array_free</entry> <entry></entry> @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.10 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.3" +VERSION="2.4.2 Debian-2.4.2-1.10" TIMESTAMP="" package_revision=1.3337 diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 02b4bbec..d7c043f4 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1312,7 +1312,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1333,7 +1333,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1352,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. @@ -160,7 +160,7 @@ give_advice () ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff --git a/test-driver b/test-driver new file mode 100755 index 00000000..d3060566 --- /dev/null +++ b/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <<END +Usage: + test-driver --test-name=NAME --log-file=PATH --trs-file=PATH + [--expect-failure={yes|no}] [--color-tests={yes|no}] + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] +The '--test-name', '--log-file' and '--trs-file' options are mandatory. +END +} + +test_name= # Used for reporting. +log_file= # Where to save the output of the test script. +trs_file= # Where to save the metadata of the test run. +expect_failure=no +color_tests=no +enable_hard_errors=yes +while test $# -gt 0; do + case $1 in + --help) print_usage; exit $?;; + --version) echo "test-driver $scriptversion"; exit $?;; + --test-name) test_name=$2; shift;; + --log-file) log_file=$2; shift;; + --trs-file) trs_file=$2; shift;; + --color-tests) color_tests=$2; shift;; + --expect-failure) expect_failure=$2; shift;; + --enable-hard-errors) enable_hard_errors=$2; shift;; + --) shift; break;; + -*) usage_error "invalid option: '$1'";; + *) break;; + esac + shift +done + +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + +if test $color_tests = yes; then + # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. + red='[0;31m' # Red. + grn='[0;32m' # Green. + lgn='[1;32m' # Light green. + blu='[1;34m' # Blue. + mgn='[0;35m' # Magenta. + std='[m' # No color. +else + red= grn= lgn= blu= mgn= std= +fi + +do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' +trap "st=129; $do_exit" 1 +trap "st=130; $do_exit" 2 +trap "st=141; $do_exit" 13 +trap "st=143; $do_exit" 15 + +# Test script is run here. +"$@" >$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/test/Makefile.am b/test/Makefile.am index 870ce321..1ceb5b68 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -61,7 +61,7 @@ if DBUS_ENABLE_EMBEDDED_TESTS ## break-loader removed for now ## these binaries are used in tests but are not themselves tests TEST_BINARIES = \ - spawn-test \ + test-spawn \ test-exit \ test-names \ test-segfault \ @@ -74,13 +74,13 @@ TEST_BINARIES = \ ## order, but we don't want to run them til we arrive in this directory, ## since they depend on stuff from this directory TESTS = \ - ../bus/bus-test$(EXEEXT) \ - ../bus/bus-test-system$(EXEEXT) \ - ../dbus/dbus-test$(EXEEXT) \ + ../bus/test-bus$(EXEEXT) \ + ../dbus/test-dbus$(EXEEXT) \ $(NULL) if DBUS_UNIX -TESTS += ../bus/bus-test-launch-helper$(EXEEXT) +TESTS += ../bus/test-bus-launch-helper$(EXEEXT) +TESTS += ../bus/test-bus-system$(EXEEXT) endif else !DBUS_ENABLE_EMBEDDED_TESTS @@ -100,10 +100,12 @@ test_names_LDADD = libdbus-testutils-internal.la ## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la test_shell_service_CPPFLAGS = $(static_cppflags) test_shell_service_LDADD = libdbus-testutils-internal.la -shell_test_CPPFLAGS = $(static_cppflags) -shell_test_LDADD = libdbus-testutils-internal.la -spawn_test_CPPFLAGS = $(static_cppflags) -spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la +test_shell_SOURCES = shell-test.c +test_shell_CPPFLAGS = $(static_cppflags) +test_shell_LDADD = libdbus-testutils-internal.la +test_spawn_SOURCES = spawn-test.c +test_spawn_CPPFLAGS = $(static_cppflags) +test_spawn_LDADD = $(top_builddir)/dbus/libdbus-internal.la test_printf_SOURCES = internals/printf.c test_printf_CPPFLAGS = $(static_cppflags) @@ -117,6 +119,10 @@ test_syslog_SOURCES = internals/syslog.c test_syslog_CPPFLAGS = $(static_cppflags) test_syslog_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS) +manual_dir_iter_SOURCES = manual-dir-iter.c +manual_dir_iter_CPPFLAGS = $(static_cppflags) +manual_dir_iter_LDADD = $(top_builddir)/dbus/libdbus-internal.la + EXTRA_DIST = dbus-test-runner testexecdir = $(libdir)/dbus-1.0/test @@ -124,10 +130,11 @@ testexecdir = $(libdir)/dbus-1.0/test testexec_PROGRAMS = installable_tests = \ - shell-test \ + test-shell \ test-printf \ $(NULL) installable_manual_tests = \ + manual-dir-iter \ $(NULL) if DBUS_WITH_GLIB @@ -149,12 +156,13 @@ endif DBUS_WITH_GLIB installcheck_tests = installcheck_environment = \ + XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \ DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \ DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir) TESTS_ENVIRONMENT = \ - DBUS_BLOCK_ON_ABORT=1 \ + XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \ DBUS_FATAL_WARNINGS=1 \ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ DBUS_TEST_DATA=@abs_top_builddir@/test/data \ @@ -368,7 +376,7 @@ imported_data = \ $(NULL) noinst_DATA = $(imported_data) -CLEANFILES = $(noinst_DATA) +CLEANFILES = $(noinst_DATA) XDG_RUNTIME_DIR $(imported_data): data/valid-config-files/%.conf: $(top_builddir)/bus/%.conf $(AM_V_at)$(MKDIR_P) data/valid-config-files diff --git a/test/Makefile.in b/test/Makefile.in index 90ebd74d..46b8c095 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -59,12 +86,12 @@ host_triplet = @host@ # same binary. @DBUS_WITH_DBUS_GLIB_TRUE@am__append_1 = libdbus-testutils.la @DBUS_ENABLE_EMBEDDED_TESTS_FALSE@TESTS = $(am__EXEEXT_8) -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@TESTS = ../bus/bus-test$(EXEEXT) \ -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ ../bus/bus-test-system$(EXEEXT) \ -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ ../dbus/dbus-test$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@TESTS = ../bus/test-bus$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ ../dbus/test-dbus$(EXEEXT) \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ $(am__append_2) \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ $(am__EXEEXT_8) -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = ../bus/bus-test-launch-helper$(EXEEXT) +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@am__append_2 = ../bus/test-bus-launch-helper$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@@DBUS_UNIX_TRUE@ ../bus/test-bus-system$(EXEEXT) noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_6) testexec_PROGRAMS = $(am__EXEEXT_7) @DBUS_WITH_GLIB_TRUE@am__append_3 = \ @@ -88,7 +115,8 @@ testexec_PROGRAMS = $(am__EXEEXT_7) @DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_7 = $(installable_tests) $(installable_manual_tests) @DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__append_8 = $(installable_tests) $(installable_manual_tests) subdir = test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -113,6 +141,7 @@ libdbus_testutils_internal_la_OBJECTS = \ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = am__DEPENDENCIES_1 = @DBUS_WITH_DBUS_GLIB_TRUE@libdbus_testutils_la_DEPENDENCIES = \ @DBUS_WITH_DBUS_GLIB_TRUE@ $(top_builddir)/dbus/libdbus-1.la \ @@ -123,7 +152,7 @@ am__libdbus_testutils_la_SOURCES_DIST = test-utils.c test-utils.h @DBUS_WITH_DBUS_GLIB_TRUE@ test-utils.lo libdbus_testutils_la_OBJECTS = $(am_libdbus_testutils_la_OBJECTS) @DBUS_WITH_DBUS_GLIB_TRUE@am_libdbus_testutils_la_rpath = -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = spawn-test$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@am__EXEEXT_1 = test-spawn$(EXEEXT) \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-exit$(EXEEXT) \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-names$(EXEEXT) \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-segfault$(EXEEXT) \ @@ -137,10 +166,10 @@ libdbus_testutils_la_OBJECTS = $(am_libdbus_testutils_la_OBJECTS) @DBUS_WITH_GLIB_TRUE@ test-marshal$(EXEEXT) test-refs$(EXEEXT) \ @DBUS_WITH_GLIB_TRUE@ test-relay$(EXEEXT) test-syntax$(EXEEXT) \ @DBUS_WITH_GLIB_TRUE@ test-syslog$(EXEEXT) -am__EXEEXT_3 = shell-test$(EXEEXT) test-printf$(EXEEXT) \ +am__EXEEXT_3 = test-shell$(EXEEXT) test-printf$(EXEEXT) \ $(am__EXEEXT_2) @DBUS_WITH_GLIB_TRUE@am__EXEEXT_4 = manual-authz$(EXEEXT) -am__EXEEXT_5 = $(am__EXEEXT_4) +am__EXEEXT_5 = manual-dir-iter$(EXEEXT) $(am__EXEEXT_4) @DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_3) \ @DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@ $(am__EXEEXT_5) @DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_7 = $(am__EXEEXT_3) \ @@ -151,12 +180,11 @@ am_manual_authz_OBJECTS = manual_authz-manual-authz.$(OBJEXT) manual_authz_OBJECTS = $(am_manual_authz_OBJECTS) manual_authz_DEPENDENCIES = $(testutils_shared_if_possible_libs) \ $(am__DEPENDENCIES_1) -shell_test_SOURCES = shell-test.c -shell_test_OBJECTS = shell_test-shell-test.$(OBJEXT) -shell_test_DEPENDENCIES = libdbus-testutils-internal.la -spawn_test_SOURCES = spawn-test.c -spawn_test_OBJECTS = spawn_test-spawn-test.$(OBJEXT) -spawn_test_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la +am_manual_dir_iter_OBJECTS = \ + manual_dir_iter-manual-dir-iter.$(OBJEXT) +manual_dir_iter_OBJECTS = $(am_manual_dir_iter_OBJECTS) +manual_dir_iter_DEPENDENCIES = \ + $(top_builddir)/dbus/libdbus-internal.la am_test_corrupt_OBJECTS = test_corrupt-corrupt.$(OBJEXT) test_corrupt_OBJECTS = $(am_test_corrupt_OBJECTS) test_corrupt_DEPENDENCIES = $(testutils_shared_if_possible_libs) \ @@ -202,6 +230,9 @@ test_segfault_LDADD = $(LDADD) test_service_SOURCES = test-service.c test_service_OBJECTS = test_service-test-service.$(OBJEXT) test_service_DEPENDENCIES = libdbus-testutils-internal.la +am_test_shell_OBJECTS = test_shell-shell-test.$(OBJEXT) +test_shell_OBJECTS = $(am_test_shell_OBJECTS) +test_shell_DEPENDENCIES = libdbus-testutils-internal.la test_shell_service_SOURCES = test-shell-service.c test_shell_service_OBJECTS = \ test_shell_service-test-shell-service.$(OBJEXT) @@ -209,6 +240,9 @@ test_shell_service_DEPENDENCIES = libdbus-testutils-internal.la test_sleep_forever_SOURCES = test-sleep-forever.c test_sleep_forever_OBJECTS = test-sleep-forever.$(OBJEXT) test_sleep_forever_LDADD = $(LDADD) +am_test_spawn_OBJECTS = test_spawn-spawn-test.$(OBJEXT) +test_spawn_OBJECTS = $(am_test_spawn_OBJECTS) +test_spawn_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la am_test_syntax_OBJECTS = syntax.$(OBJEXT) test_syntax_OBJECTS = $(am_test_syntax_OBJECTS) test_syntax_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la \ @@ -217,6 +251,18 @@ am_test_syslog_OBJECTS = test_syslog-syslog.$(OBJEXT) test_syslog_OBJECTS = $(am_test_syslog_OBJECTS) test_syslog_DEPENDENCIES = libdbus-testutils-internal.la \ $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -229,47 +275,46 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libdbus_testutils_internal_la_SOURCES) \ $(libdbus_testutils_la_SOURCES) $(manual_authz_SOURCES) \ - shell-test.c spawn-test.c $(test_corrupt_SOURCES) \ + $(manual_dir_iter_SOURCES) $(test_corrupt_SOURCES) \ $(test_dbus_daemon_SOURCES) \ $(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \ $(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \ $(test_printf_SOURCES) $(test_refs_SOURCES) \ $(test_relay_SOURCES) test-segfault.c test-service.c \ - test-shell-service.c test-sleep-forever.c \ + $(test_shell_SOURCES) test-shell-service.c \ + test-sleep-forever.c $(test_spawn_SOURCES) \ $(test_syntax_SOURCES) $(test_syslog_SOURCES) DIST_SOURCES = $(libdbus_testutils_internal_la_SOURCES) \ $(am__libdbus_testutils_la_SOURCES_DIST) \ - $(manual_authz_SOURCES) shell-test.c spawn-test.c \ + $(manual_authz_SOURCES) $(manual_dir_iter_SOURCES) \ $(test_corrupt_SOURCES) $(test_dbus_daemon_SOURCES) \ $(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \ $(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \ $(test_printf_SOURCES) $(test_refs_SOURCES) \ $(test_relay_SOURCES) test-segfault.c test-service.c \ - test-shell-service.c test-sleep-forever.c \ + $(test_shell_SOURCES) test-shell-service.c \ + test-sleep-forever.c $(test_spawn_SOURCES) \ $(test_syntax_SOURCES) $(test_syslog_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -278,14 +323,235 @@ am__can_run_installinfo = \ DATA = $(noinst_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + check recheck distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) @DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_8 = $(am__EXEEXT_3) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -364,7 +630,6 @@ DBUS_USER = @DBUS_USER@ DBUS_VERSION = @DBUS_VERSION@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ -DEFAULT_MESSAGE_UNIX_FDS = @DEFAULT_MESSAGE_UNIX_FDS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -571,7 +836,7 @@ libdbus_testutils_internal_la_LIBADD = \ @DBUS_ENABLE_EMBEDDED_TESTS_FALSE@TEST_BINARIES = @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@TEST_BINARIES = \ -@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ spawn-test \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-spawn \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-exit \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-names \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-segfault \ @@ -586,10 +851,12 @@ test_names_CPPFLAGS = $(static_cppflags) test_names_LDADD = libdbus-testutils-internal.la test_shell_service_CPPFLAGS = $(static_cppflags) test_shell_service_LDADD = libdbus-testutils-internal.la -shell_test_CPPFLAGS = $(static_cppflags) -shell_test_LDADD = libdbus-testutils-internal.la -spawn_test_CPPFLAGS = $(static_cppflags) -spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la +test_shell_SOURCES = shell-test.c +test_shell_CPPFLAGS = $(static_cppflags) +test_shell_LDADD = libdbus-testutils-internal.la +test_spawn_SOURCES = spawn-test.c +test_spawn_CPPFLAGS = $(static_cppflags) +test_spawn_LDADD = $(top_builddir)/dbus/libdbus-internal.la test_printf_SOURCES = internals/printf.c test_printf_CPPFLAGS = $(static_cppflags) test_printf_LDADD = $(top_builddir)/dbus/libdbus-internal.la @@ -599,18 +866,22 @@ test_refs_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS) test_syslog_SOURCES = internals/syslog.c test_syslog_CPPFLAGS = $(static_cppflags) test_syslog_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS) +manual_dir_iter_SOURCES = manual-dir-iter.c +manual_dir_iter_CPPFLAGS = $(static_cppflags) +manual_dir_iter_LDADD = $(top_builddir)/dbus/libdbus-internal.la EXTRA_DIST = dbus-test-runner $(in_data) $(static_data) testexecdir = $(libdir)/dbus-1.0/test -installable_tests = shell-test test-printf $(NULL) $(am__append_3) -installable_manual_tests = $(NULL) $(am__append_4) +installable_tests = test-shell test-printf $(NULL) $(am__append_3) +installable_manual_tests = manual-dir-iter $(NULL) $(am__append_4) installcheck_tests = $(am__append_6) installcheck_environment = \ + XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \ DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \ DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir) TESTS_ENVIRONMENT = \ - DBUS_BLOCK_ON_ABORT=1 \ + XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \ DBUS_FATAL_WARNINGS=1 \ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ DBUS_TEST_DATA=@abs_top_builddir@/test/data \ @@ -771,11 +1042,11 @@ imported_data = \ $(NULL) noinst_DATA = $(imported_data) -CLEANFILES = $(noinst_DATA) +CLEANFILES = $(noinst_DATA) XDG_RUNTIME_DIR all: all-recursive .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -809,14 +1080,18 @@ $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libdbus-testutils-internal.la: $(libdbus_testutils_internal_la_OBJECTS) $(libdbus_testutils_internal_la_DEPENDENCIES) $(EXTRA_libdbus_testutils_internal_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdbus_testutils_internal_la_OBJECTS) $(libdbus_testutils_internal_la_LIBADD) $(LIBS) + libdbus-testutils.la: $(libdbus_testutils_la_OBJECTS) $(libdbus_testutils_la_DEPENDENCIES) $(EXTRA_libdbus_testutils_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libdbus_testutils_la_rpath) $(libdbus_testutils_la_OBJECTS) $(libdbus_testutils_la_LIBADD) $(LIBS) @@ -837,10 +1112,12 @@ install-testexecPROGRAMS: $(testexec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -861,7 +1138,8 @@ uninstall-testexecPROGRAMS: @list='$(testexec_PROGRAMS)'; test -n "$(testexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(testexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(testexecdir)" && rm -f $$files @@ -874,60 +1152,83 @@ clean-testexecPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + manual-authz$(EXEEXT): $(manual_authz_OBJECTS) $(manual_authz_DEPENDENCIES) $(EXTRA_manual_authz_DEPENDENCIES) @rm -f manual-authz$(EXEEXT) $(AM_V_CCLD)$(LINK) $(manual_authz_OBJECTS) $(manual_authz_LDADD) $(LIBS) -shell-test$(EXEEXT): $(shell_test_OBJECTS) $(shell_test_DEPENDENCIES) $(EXTRA_shell_test_DEPENDENCIES) - @rm -f shell-test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(shell_test_OBJECTS) $(shell_test_LDADD) $(LIBS) -spawn-test$(EXEEXT): $(spawn_test_OBJECTS) $(spawn_test_DEPENDENCIES) $(EXTRA_spawn_test_DEPENDENCIES) - @rm -f spawn-test$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(spawn_test_OBJECTS) $(spawn_test_LDADD) $(LIBS) + +manual-dir-iter$(EXEEXT): $(manual_dir_iter_OBJECTS) $(manual_dir_iter_DEPENDENCIES) $(EXTRA_manual_dir_iter_DEPENDENCIES) + @rm -f manual-dir-iter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(manual_dir_iter_OBJECTS) $(manual_dir_iter_LDADD) $(LIBS) + test-corrupt$(EXEEXT): $(test_corrupt_OBJECTS) $(test_corrupt_DEPENDENCIES) $(EXTRA_test_corrupt_DEPENDENCIES) @rm -f test-corrupt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_corrupt_OBJECTS) $(test_corrupt_LDADD) $(LIBS) + test-dbus-daemon$(EXEEXT): $(test_dbus_daemon_OBJECTS) $(test_dbus_daemon_DEPENDENCIES) $(EXTRA_test_dbus_daemon_DEPENDENCIES) @rm -f test-dbus-daemon$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dbus_daemon_OBJECTS) $(test_dbus_daemon_LDADD) $(LIBS) + test-dbus-daemon-eavesdrop$(EXEEXT): $(test_dbus_daemon_eavesdrop_OBJECTS) $(test_dbus_daemon_eavesdrop_DEPENDENCIES) $(EXTRA_test_dbus_daemon_eavesdrop_DEPENDENCIES) @rm -f test-dbus-daemon-eavesdrop$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_dbus_daemon_eavesdrop_OBJECTS) $(test_dbus_daemon_eavesdrop_LDADD) $(LIBS) + test-exit$(EXEEXT): $(test_exit_OBJECTS) $(test_exit_DEPENDENCIES) $(EXTRA_test_exit_DEPENDENCIES) @rm -f test-exit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_exit_OBJECTS) $(test_exit_LDADD) $(LIBS) + test-loopback$(EXEEXT): $(test_loopback_OBJECTS) $(test_loopback_DEPENDENCIES) $(EXTRA_test_loopback_DEPENDENCIES) @rm -f test-loopback$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_loopback_OBJECTS) $(test_loopback_LDADD) $(LIBS) + test-marshal$(EXEEXT): $(test_marshal_OBJECTS) $(test_marshal_DEPENDENCIES) $(EXTRA_test_marshal_DEPENDENCIES) @rm -f test-marshal$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_marshal_OBJECTS) $(test_marshal_LDADD) $(LIBS) + test-names$(EXEEXT): $(test_names_OBJECTS) $(test_names_DEPENDENCIES) $(EXTRA_test_names_DEPENDENCIES) @rm -f test-names$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_names_OBJECTS) $(test_names_LDADD) $(LIBS) + test-printf$(EXEEXT): $(test_printf_OBJECTS) $(test_printf_DEPENDENCIES) $(EXTRA_test_printf_DEPENDENCIES) @rm -f test-printf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_printf_OBJECTS) $(test_printf_LDADD) $(LIBS) + test-refs$(EXEEXT): $(test_refs_OBJECTS) $(test_refs_DEPENDENCIES) $(EXTRA_test_refs_DEPENDENCIES) @rm -f test-refs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_refs_OBJECTS) $(test_refs_LDADD) $(LIBS) + test-relay$(EXEEXT): $(test_relay_OBJECTS) $(test_relay_DEPENDENCIES) $(EXTRA_test_relay_DEPENDENCIES) @rm -f test-relay$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_relay_OBJECTS) $(test_relay_LDADD) $(LIBS) + test-segfault$(EXEEXT): $(test_segfault_OBJECTS) $(test_segfault_DEPENDENCIES) $(EXTRA_test_segfault_DEPENDENCIES) @rm -f test-segfault$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_segfault_OBJECTS) $(test_segfault_LDADD) $(LIBS) + test-service$(EXEEXT): $(test_service_OBJECTS) $(test_service_DEPENDENCIES) $(EXTRA_test_service_DEPENDENCIES) @rm -f test-service$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_service_OBJECTS) $(test_service_LDADD) $(LIBS) + +test-shell$(EXEEXT): $(test_shell_OBJECTS) $(test_shell_DEPENDENCIES) $(EXTRA_test_shell_DEPENDENCIES) + @rm -f test-shell$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_shell_OBJECTS) $(test_shell_LDADD) $(LIBS) + test-shell-service$(EXEEXT): $(test_shell_service_OBJECTS) $(test_shell_service_DEPENDENCIES) $(EXTRA_test_shell_service_DEPENDENCIES) @rm -f test-shell-service$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_shell_service_OBJECTS) $(test_shell_service_LDADD) $(LIBS) + test-sleep-forever$(EXEEXT): $(test_sleep_forever_OBJECTS) $(test_sleep_forever_DEPENDENCIES) $(EXTRA_test_sleep_forever_DEPENDENCIES) @rm -f test-sleep-forever$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sleep_forever_OBJECTS) $(test_sleep_forever_LDADD) $(LIBS) + +test-spawn$(EXEEXT): $(test_spawn_OBJECTS) $(test_spawn_DEPENDENCIES) $(EXTRA_test_spawn_DEPENDENCIES) + @rm -f test-spawn$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_spawn_OBJECTS) $(test_spawn_LDADD) $(LIBS) + test-syntax$(EXEEXT): $(test_syntax_OBJECTS) $(test_syntax_DEPENDENCIES) $(EXTRA_test_syntax_DEPENDENCIES) @rm -f test-syntax$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_syntax_OBJECTS) $(test_syntax_LDADD) $(LIBS) + test-syslog$(EXEEXT): $(test_syslog_OBJECTS) $(test_syslog_DEPENDENCIES) $(EXTRA_test_syslog_DEPENDENCIES) @rm -f test-syslog$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_syslog_OBJECTS) $(test_syslog_LDADD) $(LIBS) @@ -940,9 +1241,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_testutils_internal_la-test-utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manual_authz-manual-authz.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manual_dir_iter-manual-dir-iter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marshal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell_test-shell-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn_test-spawn-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syntax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-exit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-segfault.Po@am__quote@ @@ -957,7 +1257,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_refs-refs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_relay-relay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_service-test-service.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shell-shell-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shell_service-test-shell-service.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spawn-spawn-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_syslog-syslog.Po@am__quote@ .c.o: @@ -965,14 +1267,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1002,33 +1304,19 @@ manual_authz-manual-authz.obj: manual-authz.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_authz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_authz-manual-authz.obj `if test -f 'manual-authz.c'; then $(CYGPATH_W) 'manual-authz.c'; else $(CYGPATH_W) '$(srcdir)/manual-authz.c'; fi` -shell_test-shell-test.o: shell-test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shell_test-shell-test.o -MD -MP -MF $(DEPDIR)/shell_test-shell-test.Tpo -c -o shell_test-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shell_test-shell-test.Tpo $(DEPDIR)/shell_test-shell-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='shell_test-shell-test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shell_test-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c - -shell_test-shell-test.obj: shell-test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT shell_test-shell-test.obj -MD -MP -MF $(DEPDIR)/shell_test-shell-test.Tpo -c -o shell_test-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/shell_test-shell-test.Tpo $(DEPDIR)/shell_test-shell-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='shell_test-shell-test.obj' libtool=no @AMDEPBACKSLASH@ +manual_dir_iter-manual-dir-iter.o: manual-dir-iter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_dir_iter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT manual_dir_iter-manual-dir-iter.o -MD -MP -MF $(DEPDIR)/manual_dir_iter-manual-dir-iter.Tpo -c -o manual_dir_iter-manual-dir-iter.o `test -f 'manual-dir-iter.c' || echo '$(srcdir)/'`manual-dir-iter.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/manual_dir_iter-manual-dir-iter.Tpo $(DEPDIR)/manual_dir_iter-manual-dir-iter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='manual-dir-iter.c' object='manual_dir_iter-manual-dir-iter.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(shell_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o shell_test-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_dir_iter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_dir_iter-manual-dir-iter.o `test -f 'manual-dir-iter.c' || echo '$(srcdir)/'`manual-dir-iter.c -spawn_test-spawn-test.o: spawn-test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spawn_test-spawn-test.o -MD -MP -MF $(DEPDIR)/spawn_test-spawn-test.Tpo -c -o spawn_test-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spawn_test-spawn-test.Tpo $(DEPDIR)/spawn_test-spawn-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='spawn_test-spawn-test.o' libtool=no @AMDEPBACKSLASH@ +manual_dir_iter-manual-dir-iter.obj: manual-dir-iter.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_dir_iter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT manual_dir_iter-manual-dir-iter.obj -MD -MP -MF $(DEPDIR)/manual_dir_iter-manual-dir-iter.Tpo -c -o manual_dir_iter-manual-dir-iter.obj `if test -f 'manual-dir-iter.c'; then $(CYGPATH_W) 'manual-dir-iter.c'; else $(CYGPATH_W) '$(srcdir)/manual-dir-iter.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/manual_dir_iter-manual-dir-iter.Tpo $(DEPDIR)/manual_dir_iter-manual-dir-iter.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='manual-dir-iter.c' object='manual_dir_iter-manual-dir-iter.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spawn_test-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c - -spawn_test-spawn-test.obj: spawn-test.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spawn_test-spawn-test.obj -MD -MP -MF $(DEPDIR)/spawn_test-spawn-test.Tpo -c -o spawn_test-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/spawn_test-spawn-test.Tpo $(DEPDIR)/spawn_test-spawn-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='spawn_test-spawn-test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(spawn_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spawn_test-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_dir_iter_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_dir_iter-manual-dir-iter.obj `if test -f 'manual-dir-iter.c'; then $(CYGPATH_W) 'manual-dir-iter.c'; else $(CYGPATH_W) '$(srcdir)/manual-dir-iter.c'; fi` test_corrupt-corrupt.o: corrupt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_corrupt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_corrupt-corrupt.o -MD -MP -MF $(DEPDIR)/test_corrupt-corrupt.Tpo -c -o test_corrupt-corrupt.o `test -f 'corrupt.c' || echo '$(srcdir)/'`corrupt.c @@ -1156,6 +1444,20 @@ test_service-test-service.obj: test-service.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_service-test-service.obj `if test -f 'test-service.c'; then $(CYGPATH_W) 'test-service.c'; else $(CYGPATH_W) '$(srcdir)/test-service.c'; fi` +test_shell-shell-test.o: shell-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_shell-shell-test.o -MD -MP -MF $(DEPDIR)/test_shell-shell-test.Tpo -c -o test_shell-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_shell-shell-test.Tpo $(DEPDIR)/test_shell-shell-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='test_shell-shell-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_shell-shell-test.o `test -f 'shell-test.c' || echo '$(srcdir)/'`shell-test.c + +test_shell-shell-test.obj: shell-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_shell-shell-test.obj -MD -MP -MF $(DEPDIR)/test_shell-shell-test.Tpo -c -o test_shell-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_shell-shell-test.Tpo $(DEPDIR)/test_shell-shell-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell-test.c' object='test_shell-shell-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_shell-shell-test.obj `if test -f 'shell-test.c'; then $(CYGPATH_W) 'shell-test.c'; else $(CYGPATH_W) '$(srcdir)/shell-test.c'; fi` + test_shell_service-test-shell-service.o: test-shell-service.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_shell_service-test-shell-service.o -MD -MP -MF $(DEPDIR)/test_shell_service-test-shell-service.Tpo -c -o test_shell_service-test-shell-service.o `test -f 'test-shell-service.c' || echo '$(srcdir)/'`test-shell-service.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_shell_service-test-shell-service.Tpo $(DEPDIR)/test_shell_service-test-shell-service.Po @@ -1170,6 +1472,20 @@ test_shell_service-test-shell-service.obj: test-shell-service.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_shell_service_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_shell_service-test-shell-service.obj `if test -f 'test-shell-service.c'; then $(CYGPATH_W) 'test-shell-service.c'; else $(CYGPATH_W) '$(srcdir)/test-shell-service.c'; fi` +test_spawn-spawn-test.o: spawn-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_spawn-spawn-test.o -MD -MP -MF $(DEPDIR)/test_spawn-spawn-test.Tpo -c -o test_spawn-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_spawn-spawn-test.Tpo $(DEPDIR)/test_spawn-spawn-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='test_spawn-spawn-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_spawn-spawn-test.o `test -f 'spawn-test.c' || echo '$(srcdir)/'`spawn-test.c + +test_spawn-spawn-test.obj: spawn-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_spawn-spawn-test.obj -MD -MP -MF $(DEPDIR)/test_spawn-spawn-test.Tpo -c -o test_spawn-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_spawn-spawn-test.Tpo $(DEPDIR)/test_spawn-spawn-test.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spawn-test.c' object='test_spawn-spawn-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_spawn_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_spawn-spawn-test.obj `if test -f 'spawn-test.c'; then $(CYGPATH_W) 'spawn-test.c'; else $(CYGPATH_W) '$(srcdir)/spawn-test.c'; fi` + test_syslog-syslog.o: internals/syslog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_syslog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_syslog-syslog.o -MD -MP -MF $(DEPDIR)/test_syslog-syslog.Tpo -c -o test_syslog-syslog.o `test -f 'internals/syslog.c' || echo '$(srcdir)/'`internals/syslog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_syslog-syslog.Tpo $(DEPDIR)/test_syslog-syslog.Po @@ -1191,22 +1507,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1221,57 +1540,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1287,12 +1561,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1304,15 +1573,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1321,102 +1586,285 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - skipped="($$skip tests were not run)"; \ + color_start= color_end=; \ fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test-shell.log: test-shell$(EXEEXT) + @p='test-shell$(EXEEXT)'; \ + b='test-shell'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-printf.log: test-printf$(EXEEXT) + @p='test-printf$(EXEEXT)'; \ + b='test-printf'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-corrupt.log: test-corrupt$(EXEEXT) + @p='test-corrupt$(EXEEXT)'; \ + b='test-corrupt'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-dbus-daemon.log: test-dbus-daemon$(EXEEXT) + @p='test-dbus-daemon$(EXEEXT)'; \ + b='test-dbus-daemon'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-dbus-daemon-eavesdrop.log: test-dbus-daemon-eavesdrop$(EXEEXT) + @p='test-dbus-daemon-eavesdrop$(EXEEXT)'; \ + b='test-dbus-daemon-eavesdrop'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-loopback.log: test-loopback$(EXEEXT) + @p='test-loopback$(EXEEXT)'; \ + b='test-loopback'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-marshal.log: test-marshal$(EXEEXT) + @p='test-marshal$(EXEEXT)'; \ + b='test-marshal'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-refs.log: test-refs$(EXEEXT) + @p='test-refs$(EXEEXT)'; \ + b='test-refs'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-relay.log: test-relay$(EXEEXT) + @p='test-relay$(EXEEXT)'; \ + b='test-relay'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-syntax.log: test-syntax$(EXEEXT) + @p='test-syntax$(EXEEXT)'; \ + b='test-syntax'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-syslog.log: test-syslog$(EXEEXT) + @p='test-syslog$(EXEEXT)'; \ + b='test-syslog'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +../bus/test-bus.log: ../bus/test-bus$(EXEEXT) + @p='../bus/test-bus$(EXEEXT)'; \ + b='../bus/test-bus'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +../dbus/test-dbus.log: ../dbus/test-dbus$(EXEEXT) + @p='../dbus/test-dbus$(EXEEXT)'; \ + b='../dbus/test-dbus'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +../bus/test-bus-launch-helper.log: ../bus/test-bus-launch-helper$(EXEEXT) + @p='../bus/test-bus-launch-helper$(EXEEXT)'; \ + b='../bus/test-bus-launch-helper'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +../bus/test-bus-system.log: ../bus/test-bus-system$(EXEEXT) + @p='../bus/test-bus-system$(EXEEXT)'; \ + b='../bus/test-bus-system'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1502,6 +1950,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) @@ -1585,14 +2036,12 @@ ps-am: uninstall-am: uninstall-testexecPROGRAMS -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) check-am install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-TESTS check-am clean \ - clean-generic clean-libtool clean-local \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - clean-testexecPROGRAMS ctags ctags-recursive distclean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + check check-TESTS check-am clean clean-generic clean-libtool \ + clean-local clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ + clean-testexecPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -1603,8 +2052,8 @@ uninstall-am: uninstall-testexecPROGRAMS installcheck-am installcheck-local installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-testexecPROGRAMS + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am uninstall-testexecPROGRAMS # If we're installing the tests into a DESTDIR we can't run them diff --git a/test/dbus-daemon-eavesdrop.c b/test/dbus-daemon-eavesdrop.c index 2c45f54e..a78d8888 100644 --- a/test/dbus-daemon-eavesdrop.c +++ b/test/dbus-daemon-eavesdrop.c @@ -151,6 +151,8 @@ spawn_dbus_daemon (gchar *binary, if (newline != NULL) { + if ((newline > address->str) && ('\r' == newline[-1])) + newline -= 1; g_string_truncate (address, newline - address->str); break; } @@ -409,7 +411,14 @@ setup (Fixture *f, config = g_strdup ("--session"); } - address = spawn_dbus_daemon (dbus_daemon, config, &f->daemon_pid); + if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL) + { + address = g_strdup (g_getenv ("DBUS_TEST_DAEMON_ADDRESS")); + } + else + { + address = spawn_dbus_daemon (dbus_daemon, config, &f->daemon_pid); + } g_free (dbus_daemon); g_free (config); diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index 22ea23e3..4b3b61e5 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -119,6 +119,8 @@ spawn_dbus_daemon (gchar *binary, if (newline != NULL) { + if ((newline > address->str) && ('\r' == newline[-1])) + newline -= 1; g_string_truncate (address, newline - address->str); break; } @@ -194,6 +196,14 @@ setup (Fixture *f, if (config != NULL && config->config_file != NULL) { + if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL) + { + g_message ("SKIP: cannot use DBUS_TEST_DAEMON_ADDRESS for " + "unusally-configured dbus-daemon"); + f->skip = TRUE; + return; + } + if (g_getenv ("DBUS_TEST_DATA") == NULL) { g_message ("SKIP: set DBUS_TEST_DATA to a directory containing %s", @@ -227,7 +237,14 @@ setup (Fixture *f, if (dbus_daemon == NULL) dbus_daemon = g_strdup ("dbus-daemon"); - address = spawn_dbus_daemon (dbus_daemon, arg, &f->daemon_pid); + if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL) + { + address = g_strdup (g_getenv ("DBUS_TEST_DAEMON_ADDRESS")); + } + else + { + address = spawn_dbus_daemon (dbus_daemon, arg, &f->daemon_pid); + } g_free (dbus_daemon); g_free (arg); diff --git a/test/internals/syslog.c b/test/internals/syslog.c index 2811b757..7e0eae79 100644 --- a/test/internals/syslog.c +++ b/test/internals/syslog.c @@ -51,6 +51,7 @@ static void test_syslog (Fixture *f, gconstpointer data) { +#ifndef G_OS_WIN32 if (g_test_trap_fork (0, 0)) { _dbus_init_system_log (FALSE); @@ -73,7 +74,7 @@ test_syslog (Fixture *f, g_test_trap_assert_passed (); g_test_trap_assert_stderr ("*" MESSAGE "42\n*" MESSAGE "666\n*"); - +#endif /* manual test (this is the best we can do on Windows) */ _dbus_init_system_log (FALSE); _dbus_system_log (DBUS_SYSTEM_LOG_INFO, MESSAGE "%d", 42); diff --git a/test/manual-dir-iter.c b/test/manual-dir-iter.c new file mode 100644 index 00000000..21ac0e95 --- /dev/null +++ b/test/manual-dir-iter.c @@ -0,0 +1,92 @@ +#include <config.h> +#include "test-utils.h" + +#include "dbus/dbus-macros.h" +#include "dbus/dbus-sysdeps.h" + +static void oom (const char *doing) _DBUS_GNUC_NORETURN; +static void die (const char *message) _DBUS_GNUC_NORETURN; + +void +oom (const char *doing) +{ + fprintf (stderr, "*** manual-dir-iter: OOM while %s\n", doing); + exit (1); +} + +void +die (const char *message) +{ + fprintf (stderr, "*** manual-dir-iter: %s\n", message); + exit (1); +} + +static void +debug (const char *message) +{ + fprintf (stdout, "+++ manual-dir-iter: %s\n", message); +} + +int +main (int argc, + char **argv) +{ + DBusString filename; + DBusString dirname; + DBusError tmp_error; + DBusDirIter *dir; + + if (argc != 2) + die ("syntax: manual-dir-iter <path>"); + + dbus_error_init (&tmp_error); + + if (!_dbus_string_init (&filename)) + oom ("init filename"); + + if (!_dbus_string_init (&dirname)) + oom ("init dirname"); + + _dbus_string_append (&dirname, argv[1]); + dir = _dbus_directory_open (&dirname, &tmp_error); + + if (dir == NULL) + { + fprintf (stderr, "could not open directory: %s: %s\n", + tmp_error.name, tmp_error.message); + exit(1); + } + + while (_dbus_directory_get_next_file (dir, &filename, &tmp_error)) + { + DBusString full_path; + if (!_dbus_string_init (&full_path)) + { + oom ("init full_path"); + } + + if (!_dbus_string_copy (&dirname, 0, &full_path, 0)) + { + oom ("copying full_path to dirname"); + } + + if (!_dbus_concat_dir_and_file (&full_path, &filename)) + { + oom ("concat full_path"); + } + debug (_dbus_string_get_const_data (&filename)); + _dbus_string_free (&full_path); + } + + if (dbus_error_is_set (&tmp_error)) + die (tmp_error.message); + + _dbus_string_free (&filename); + + if (dir) + _dbus_directory_close (dir); + + _dbus_verbose ("*** Test dir name exiting\n"); + + return 0; +} diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index da41e58b..8ed1e160 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -19,7 +19,9 @@ TESTS_ENVIRONMENT = \ PYTHON=@PYTHON@ \ DBUS_TEST_DATA=@abs_top_builddir@/test/data \ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ + XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \ $(NULL) + TESTS=run-test.sh run-test-systemserver.sh else TESTS= diff --git a/test/name-test/Makefile.in b/test/name-test/Makefile.in index 089c7adb..466bd54d 100644 --- a/test/name-test/Makefile.in +++ b/test/name-test/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -62,7 +89,8 @@ host_triplet = @host@ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-privserver-client$(EXEEXT) \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ test-autolaunch$(EXEEXT) subdir = test/name-test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -84,6 +112,7 @@ test_autolaunch_OBJECTS = test-autolaunch.$(OBJEXT) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = test_ids_SOURCES = test-ids.c test_ids_OBJECTS = test-ids.$(OBJEXT) @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_ids_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la @@ -107,6 +136,18 @@ test_shutdown_OBJECTS = test-shutdown.$(OBJEXT) test_threads_init_SOURCES = test-threads-init.c test_threads_init_OBJECTS = test-threads-init.$(OBJEXT) @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@test_threads_init_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -119,20 +160,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = test-autolaunch.c test-ids.c test-pending-call-dispatch.c \ test-pending-call-timeout.c test-privserver.c \ test-privserver-client.c test-shutdown.c test-threads-init.c @@ -145,10 +182,229 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADT_LIBS = @ADT_LIBS@ @@ -202,7 +458,6 @@ DBUS_USER = @DBUS_USER@ DBUS_VERSION = @DBUS_VERSION@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ -DEFAULT_MESSAGE_UNIX_FDS = @DEFAULT_MESSAGE_UNIX_FDS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -373,6 +628,7 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ PYTHON=@PYTHON@ \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ DBUS_TEST_DATA=@abs_top_builddir@/test/data \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ +@DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \ @DBUS_ENABLE_EMBEDDED_TESTS_TRUE@ $(NULL) EXTRA_DIST = run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py @@ -387,7 +643,7 @@ EXTRA_DIST = run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-act all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -427,27 +683,35 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + test-autolaunch$(EXEEXT): $(test_autolaunch_OBJECTS) $(test_autolaunch_DEPENDENCIES) $(EXTRA_test_autolaunch_DEPENDENCIES) @rm -f test-autolaunch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_autolaunch_OBJECTS) $(test_autolaunch_LDADD) $(LIBS) + test-ids$(EXEEXT): $(test_ids_OBJECTS) $(test_ids_DEPENDENCIES) $(EXTRA_test_ids_DEPENDENCIES) @rm -f test-ids$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ids_OBJECTS) $(test_ids_LDADD) $(LIBS) + test-pending-call-dispatch$(EXEEXT): $(test_pending_call_dispatch_OBJECTS) $(test_pending_call_dispatch_DEPENDENCIES) $(EXTRA_test_pending_call_dispatch_DEPENDENCIES) @rm -f test-pending-call-dispatch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_pending_call_dispatch_OBJECTS) $(test_pending_call_dispatch_LDADD) $(LIBS) + test-pending-call-timeout$(EXEEXT): $(test_pending_call_timeout_OBJECTS) $(test_pending_call_timeout_DEPENDENCIES) $(EXTRA_test_pending_call_timeout_DEPENDENCIES) @rm -f test-pending-call-timeout$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_pending_call_timeout_OBJECTS) $(test_pending_call_timeout_LDADD) $(LIBS) + test-privserver$(EXEEXT): $(test_privserver_OBJECTS) $(test_privserver_DEPENDENCIES) $(EXTRA_test_privserver_DEPENDENCIES) @rm -f test-privserver$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_privserver_OBJECTS) $(test_privserver_LDADD) $(LIBS) + test-privserver-client$(EXEEXT): $(test_privserver_client_OBJECTS) $(test_privserver_client_DEPENDENCIES) $(EXTRA_test_privserver_client_DEPENDENCIES) @rm -f test-privserver-client$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_privserver_client_OBJECTS) $(test_privserver_client_LDADD) $(LIBS) + test-shutdown$(EXEEXT): $(test_shutdown_OBJECTS) $(test_shutdown_DEPENDENCIES) $(EXTRA_test_shutdown_DEPENDENCIES) @rm -f test-shutdown$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_shutdown_OBJECTS) $(test_shutdown_LDADD) $(LIBS) + test-threads-init$(EXEEXT): $(test_threads_init_OBJECTS) $(test_threads_init_DEPENDENCIES) $(EXTRA_test_threads_init_DEPENDENCIES) @rm -f test-threads-init$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_threads_init_OBJECTS) $(test_threads_init_LDADD) $(LIBS) @@ -472,14 +736,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -494,26 +758,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -525,15 +778,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -542,102 +791,194 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - skipped="($$skip tests were not run)"; \ + color_start= color_end=; \ fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +run-test.sh.log: run-test.sh + @p='run-test.sh'; \ + b='run-test.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +run-test-systemserver.sh.log: run-test-systemserver.sh + @p='run-test-systemserver.sh'; \ + b='run-test-systemserver.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -694,6 +1035,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -777,9 +1121,9 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-generic clean-libtool clean-noinstPROGRAMS ctags \ - distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -789,7 +1133,7 @@ uninstall-am: installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + recheck tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/test/name-test/run-test-systemserver.sh b/test/name-test/run-test-systemserver.sh index afd1f045..90c03723 100755 --- a/test/name-test/run-test-systemserver.sh +++ b/test/name-test/run-test-systemserver.sh @@ -30,6 +30,11 @@ if test -n "$DBUS_TEST_MONITOR"; then dbus-monitor --session & fi +XDG_RUNTIME_DIR="$DBUS_TOP_BUILDDIR"/test/XDG_RUNTIME_DIR +test -d "$XDG_RUNTIME_DIR" || mkdir "$XDG_RUNTIME_DIR" +chmod 0700 "$XDG_RUNTIME_DIR" +export XDG_RUNTIME_DIR + echo "running test-expected-echo-fail" ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/tools/dbus-send --print-reply --dest=org.freedesktop.DBus.TestSuiteEchoService /org/freedesktop/TestSuite org.freedesktop.TestSuite.Echo string:hi >echo-error-output.tmp 2>&1 if ! grep -q 'DBus.Error' echo-error-output.tmp; then diff --git a/test/name-test/run-test.sh b/test/name-test/run-test.sh index cad5937e..84379c4a 100755 --- a/test/name-test/run-test.sh +++ b/test/name-test/run-test.sh @@ -30,6 +30,11 @@ if test -n "$DBUS_TEST_MONITOR"; then dbus-monitor --session & fi +XDG_RUNTIME_DIR="$DBUS_TOP_BUILDDIR"/test/XDG_RUNTIME_DIR +test -d "$XDG_RUNTIME_DIR" || mkdir "$XDG_RUNTIME_DIR" +chmod 0700 "$XDG_RUNTIME_DIR" +export XDG_RUNTIME_DIR + echo "running test-ids" ${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-ids || die "test-ids failed" diff --git a/test/test-segfault.c b/test/test-segfault.c index 329a21fd..c062ce1c 100644 --- a/test/test-segfault.c +++ b/test/test-segfault.c @@ -9,18 +9,34 @@ #include <sys/resource.h> #endif +#ifdef HAVE_SYS_PRCTL_H +#include <sys/prctl.h> +#endif + int main (int argc, char **argv) { char *p; #if HAVE_SETRLIMIT + /* No core dumps please, we know we crashed. */ struct rlimit r = { 0, }; getrlimit (RLIMIT_CORE, &r); r.rlim_cur = 0; setrlimit (RLIMIT_CORE, &r); - +#endif + +#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) + /* Really, no core dumps please. On Linux, if core_pattern is + * set to a pipe (for abrt/apport/corekeeper/etc.), RLIMIT_CORE of 0 + * is ignored (deliberately, so people can debug init(8) and other + * early stuff); but Linux has PR_SET_DUMPABLE, so we can avoid core + * dumps anyway. */ + prctl (PR_SET_DUMPABLE, 0, 0, 0, 0); +#endif + +#ifdef HAVE_RAISE raise (SIGSEGV); #endif p = NULL; diff --git a/tools/Makefile.in b/tools/Makefile.in index db619be6..dd562f10 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -60,7 +87,8 @@ bin_PROGRAMS = dbus-launch$(EXEEXT) dbus-monitor$(EXEEXT) \ @DBUS_UNIX_TRUE@ $(NULL) subdir = tools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ $(top_srcdir)/m4/compiler.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -86,6 +114,7 @@ dbus_cleanup_sockets_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = am__dbus_launch_SOURCES_DIST = dbus-launch.c dbus-launch-x11.c \ dbus-launch.h dbus-launch-win.c @DBUS_WIN_FALSE@am_dbus_launch_OBJECTS = dbus-launch.$(OBJEXT) \ @@ -112,6 +141,18 @@ dbus_send_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la am_dbus_uuidgen_OBJECTS = dbus-uuidgen.$(OBJEXT) dbus_uuidgen_OBJECTS = $(am_dbus_uuidgen_OBJECTS) dbus_uuidgen_DEPENDENCIES = $(top_builddir)/dbus/libdbus-1.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -124,20 +165,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(dbus_cleanup_sockets_SOURCES) $(dbus_launch_SOURCES) \ $(dbus_monitor_SOURCES) $(dbus_run_session_SOURCES) \ $(dbus_send_SOURCES) $(dbus_uuidgen_SOURCES) @@ -150,6 +187,23 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -205,7 +259,6 @@ DBUS_USER = @DBUS_USER@ DBUS_VERSION = @DBUS_VERSION@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ -DEFAULT_MESSAGE_UNIX_FDS = @DEFAULT_MESSAGE_UNIX_FDS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ @@ -466,10 +519,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -490,7 +545,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -503,21 +559,27 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + dbus-cleanup-sockets$(EXEEXT): $(dbus_cleanup_sockets_OBJECTS) $(dbus_cleanup_sockets_DEPENDENCIES) $(EXTRA_dbus_cleanup_sockets_DEPENDENCIES) @rm -f dbus-cleanup-sockets$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_cleanup_sockets_OBJECTS) $(dbus_cleanup_sockets_LDADD) $(LIBS) + dbus-launch$(EXEEXT): $(dbus_launch_OBJECTS) $(dbus_launch_DEPENDENCIES) $(EXTRA_dbus_launch_DEPENDENCIES) @rm -f dbus-launch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_launch_OBJECTS) $(dbus_launch_LDADD) $(LIBS) + dbus-monitor$(EXEEXT): $(dbus_monitor_OBJECTS) $(dbus_monitor_DEPENDENCIES) $(EXTRA_dbus_monitor_DEPENDENCIES) @rm -f dbus-monitor$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_monitor_OBJECTS) $(dbus_monitor_LDADD) $(LIBS) + dbus-run-session$(EXEEXT): $(dbus_run_session_OBJECTS) $(dbus_run_session_DEPENDENCIES) $(EXTRA_dbus_run_session_DEPENDENCIES) @rm -f dbus-run-session$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_run_session_OBJECTS) $(dbus_run_session_LDADD) $(LIBS) + dbus-send$(EXEEXT): $(dbus_send_OBJECTS) $(dbus_send_DEPENDENCIES) $(EXTRA_dbus_send_DEPENDENCIES) @rm -f dbus-send$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_send_OBJECTS) $(dbus_send_LDADD) $(LIBS) + dbus-uuidgen$(EXEEXT): $(dbus_uuidgen_OBJECTS) $(dbus_uuidgen_DEPENDENCIES) $(EXTRA_dbus_uuidgen_DEPENDENCIES) @rm -f dbus-uuidgen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dbus_uuidgen_OBJECTS) $(dbus_uuidgen_LDADD) $(LIBS) @@ -543,14 +605,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -565,26 +627,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -596,15 +647,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -613,6 +660,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -757,20 +819,20 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-local install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installcheck-local installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installcheck-local \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS # create the /var/lib/dbus directory for dbus-uuidgen diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c index 7ecee63e..41a20e83 100644 --- a/tools/dbus-launch.c +++ b/tools/dbus-launch.c @@ -406,6 +406,9 @@ static pid_t bus_pid_to_kill = -1; static void kill_bus(void) { + if (bus_pid_to_kill <= 0) + return; + verbose ("Killing message bus and exiting babysitter\n"); kill (bus_pid_to_kill, SIGTERM); sleep (3); @@ -533,7 +536,7 @@ kill_bus_when_session_ends (void) if (tty_fd < 0 && x_fd < 0) { fprintf (stderr, "No terminal on standard input and no X display; cannot attach message bus to session lifetime\n"); - exit (1); + kill_bus_and_exit (1); } while (TRUE) @@ -1275,6 +1278,10 @@ main (int argc, char **argv) bus_pid = val; + /* Have to initialize bus_pid_to_kill ASAP, so that the + X error callback can kill it if an error happens. */ + bus_pid_to_kill = bus_pid; + close (bus_pid_to_launcher_pipe[READ_END]); #ifdef DBUS_ENABLE_X11_AUTOLAUNCH @@ -1291,7 +1298,6 @@ main (int argc, char **argv) { char *address = NULL; /* another window got added. Return its address */ - bus_pid_to_kill = bus_pid; if (x11_get_address (&address, &bus_pid, &wid) && address != NULL) { diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c index 75d00aca..6f02ea38 100644 --- a/tools/dbus-print-message.c +++ b/tools/dbus-print-message.c @@ -23,6 +23,17 @@ #include <config.h> #include "dbus-print-message.h" +#ifdef DBUS_UNIX +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <unistd.h> +#include <netinet/in.h> +#include <netinet/ip.h> +#include <arpa/inet.h> +#endif + #include <stdlib.h> #include "config.h" @@ -143,6 +154,151 @@ print_ay (DBusMessageIter *iter, int depth) } static void +print_fd (int fd, int depth) +{ +#ifdef DBUS_UNIX + int ret; + struct stat statbuf = {0,}; + union { + struct sockaddr sa; + struct sockaddr_storage storage; + struct sockaddr_un un; + struct sockaddr_in ipv4; + struct sockaddr_in6 ipv6; + } addr, peer; + char hostip[INET6_ADDRSTRLEN]; + int addrlen = sizeof (addr); + int peerlen = sizeof (peer); + int has_peer; +#endif + + /* Don't print the fd number: it is different in every process and since + * dbus-monitor closes the fd after reading it, the same number would be + * printed again and again. + */ + printf ("file descriptor\n"); + if (fd == -1) + return; + +#ifdef DBUS_UNIX + ret = fstat (fd, &statbuf); + if (ret == -1) + return; + + indent (depth+1); + printf ("inode: %d\n", (int) statbuf.st_ino); + + indent (depth+1); + printf ("type: "); + if (S_ISREG(statbuf.st_mode)) + printf ("file\n"); + if (S_ISDIR(statbuf.st_mode)) + printf ("directory\n"); + if (S_ISCHR(statbuf.st_mode)) + printf ("char\n"); + if (S_ISBLK(statbuf.st_mode)) + printf ("block\n"); + if (S_ISFIFO(statbuf.st_mode)) + printf ("fifo\n"); + if (S_ISLNK(statbuf.st_mode)) + printf ("link\n"); + if (S_ISSOCK(statbuf.st_mode)) + printf ("socket\n"); + + /* If it's not a socket, getsockname will just return -1 with errno + * ENOTSOCK. */ + + memset (&addr, 0, sizeof (addr)); + memset (&peer, 0, sizeof (peer)); + + if (getsockname(fd, &addr.sa, &addrlen)) + return; + + has_peer = !getpeername(fd, &peer.sa, &peerlen); + + indent (depth+1); + printf ("address family: "); + switch (addr.sa.sa_family) + { + case AF_UNIX: + printf("unix\n"); + if (addr.un.sun_path[0] == '\0') + { + /* Abstract socket might not be zero-terminated and length is + * variable. Who designed this interface? + * Write the name in the same way as /proc/net/unix + * See manual page unix(7) + */ + indent (depth+1); + printf ("name @%.*s\n", + (int) (addrlen - sizeof (sa_family_t) - 1), + &(addr.un.sun_path[1])); + + if (has_peer) + { + indent (depth+1); + printf ("peer @%.*s\n", + (int) (addrlen - sizeof (sa_family_t) - 1), + &(addr.un.sun_path[1])); + } + } + else + { + indent (depth+1); + printf ("name %s\n", addr.un.sun_path); + if (has_peer) + { + indent (depth+1); + printf ("peer %s\n", peer.un.sun_path); + } + } + break; + + case AF_INET: + printf ("inet\n"); + if (inet_ntop (AF_INET, &addr.ipv4.sin_addr, hostip, sizeof (hostip))) + { + indent (depth+1); + printf ("name %s port %u\n", hostip, ntohs (addr.ipv4.sin_port)); + } + if (has_peer && inet_ntop (AF_INET, &peer.ipv4.sin_addr, hostip, sizeof (hostip))) + { + indent (depth+1); + printf ("peer %s port %u\n", hostip, ntohs (peer.ipv4.sin_port)); + } + + break; + +#ifdef AF_INET6 + case AF_INET6: + printf ("inet6\n"); + if (inet_ntop (AF_INET6, &addr.ipv6.sin6_addr, hostip, sizeof (hostip))) + { + indent (depth+1); + printf ("name %s port %u\n", hostip, ntohs (addr.ipv6.sin6_port)); + } + if (has_peer && inet_ntop (AF_INET6, &peer.ipv6.sin6_addr, hostip, sizeof (hostip))) + { + indent (depth+1); + printf ("peer %s port %u\n", hostip, ntohs (peer.ipv6.sin6_port)); + } + break; +#endif + +#ifdef AF_BLUETOOTH + case AF_BLUETOOTH: + printf ("bluetooth\n"); + break; +#endif + + default: + printf ("unknown (%d)\n", addr.sa.sa_family); + break; + } +#endif +} + +static void print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth) { do @@ -346,7 +502,23 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth) printf("}\n"); break; } - + + case DBUS_TYPE_UNIX_FD: + { + int fd; + dbus_message_iter_get_basic (iter, &fd); + + print_fd (fd, depth+1); + + /* dbus_message_iter_get_basic() duplicated the fd, we need to + * close it after use. The original fd will be closed when the + * DBusMessage is released. + */ + close (fd); + + break; + } + default: printf (" (dbus-monitor too dumb to decipher arg type '%c')\n", type); break; |