README
      1 Sections in this file describe:
      2  - introduction and overview
      3  - low-level vs. high-level API
      4  - version numbers
      5  - options to the configure script
      6  - ABI stability policy
      7 
      8 Introduction
      9 ===
     10 
     11 D-Bus is a simple system for interprocess communication and coordination.
     12 
     13 The "and coordination" part is important; D-Bus provides a bus daemon that does things like:
     14  - notify applications when other apps exit
     15  - start services on demand
     16  - support single-instance applications
     17 
     18 See http://www.freedesktop.org/software/dbus/ for lots of documentation, 
     19 mailing lists, etc.
     20 
     21 See also the file HACKING for notes of interest to developers working on D-Bus.
     22 
     23 If you're considering D-Bus for use in a project, you should be aware
     24 that D-Bus was designed for a couple of specific use cases, a "system
     25 bus" and a "desktop session bus." These are documented in more detail
     26 in the D-Bus specification and FAQ available on the web site.
     27 
     28 If your use-case isn't one of these, D-Bus may still be useful, but
     29 only by accident; so you should evaluate carefully whether D-Bus makes
     30 sense for your project.
     31 
     32 Note: low-level API vs. high-level binding APIs
     33 ===
     34 
     35 A core concept of the D-Bus implementation is that "libdbus" is
     36 intended to be a low-level API. Most programmers are intended to use
     37 the bindings to GLib, Qt, Python, Mono, Java, or whatever. These
     38 bindings have varying levels of completeness and are maintained as
     39 separate projects from the main D-Bus package. The main D-Bus package
     40 contains the low-level libdbus, the bus daemon, and a few command-line
     41 tools such as dbus-launch.
     42 
     43 If you use the low-level API directly, you're signing up for some
     44 pain. Think of the low-level API as analogous to Xlib or GDI, and the
     45 high-level API as analogous to Qt/GTK+/HTML.
     46 
     47 Version numbers
     48 ===
     49 
     50 D-Bus uses the common "Linux kernel" versioning system, where
     51 even-numbered minor versions are stable and odd-numbered minor
     52 versions are development snapshots.
     53 
     54 So for example, development snapshots: 1.1.1, 1.1.2, 1.1.3, 1.3.4
     55 Stable versions: 1.0, 1.0.1, 1.0.2, 1.2.1, 1.2.3
     56 
     57 All pre-1.0 versions were development snapshots.
     58 
     59 Development snapshots make no ABI stability guarantees for new ABI
     60 introduced since the last stable release. Development snapshots are
     61 likely to have more bugs than stable releases, obviously.
     62 
     63 Configuration 
     64 ===
     65 
     66 dbus could be build by using autotools or cmake. 
     67 
     68 When using autotools the configure step is initiated by running ./configure 
     69 with our without additional configuration flags. 
     70 
     71 When using cmake the configure step is initiated by running the cmake 
     72 program with our without additional configuration flags. 
     73 
     74 Configuration flags
     75 ===
     76 
     77 When using autools the dbus-specific configuration flags that can be given to
     78 the ./configure program are these 
     79 
     80   --enable-tests             enable unit test code
     81   --enable-verbose-mode      support verbose debug mode
     82   --enable-asserts           include assertion checks
     83   --enable-checks            include sanity checks on public API
     84   --enable-xml-docs          build XML documentation (requires xmlto)
     85   --enable-doxygen-docs      build DOXYGEN documentation (requires Doxygen)
     86   --enable-gcov              compile with coverage profiling instrumentation (gcc only)
     87   --enable-abstract-sockets  use abstract socket namespace (linux only)
     88   --enable-selinux           build with SELinux support
     89   --enable-dnotify           build with dnotify support (linux only)
     90   --enable-kqueue            build with kqueue support (*BSD only)
     91   --with-xml=libxml/expat           XML library to use
     92   --with-init-scripts=redhat        Style of init scripts to install
     93   --with-session-socket-dir=dirname Where to put sockets for the per-login-session message bus
     94   --with-test-socket-dir=dirname    Where to put sockets for make check
     95   --with-system-pid-file=pidfile    PID file for systemwide daemon
     96   --with-system-socket=filename     UNIX domain socket for systemwide daemon
     97   --with-console-auth-dir=dirname   directory to check for console ownerhip
     98   --with-dbus-user=<user>           User for running the DBUS daemon (messagebus)
     99   --with-gnu-ld                     assume the C compiler uses GNU ld [default=no]
    100   --with-tags[=TAGS]                include additional configurations [automatic]
    101   --with-x                          use the X Window System
    102 
    103 When using the cmake build system the dbus-specific configuration flags that can be given 
    104 to the cmake program are these (use -D<key>=<value> on command line)
    105 
    106     CMAKE_BUILD_TYPE                   set dbus build mode - one of Debug|Release|RelWithDebInfo|MinSizeRel
    107     DBUS_BUILD_TESTS                   enable unit test code  default=ON
    108     DBUS_BUILD_X11                     Build X11-dependent code default=ON
    109     HAVE_CONSOLE_OWNER_FILE            enable console owner file (solaris only) ) default=ON
    110     DBUS_DISABLE_ASSERTS               Disable assertion checking default=OFF
    111     DBUS_DISABLE_CHECKS                Disable public API sanity checking default=OFF
    112     DBUS_ENABLE_ABSTRACT_SOCKETS       enable support for abstract sockets (linux only) default=ON
    113     DBUS_ENABLE_ANSI                   enable -ansi -pedantic gcc flags default=OFF
    114     DBUS_ENABLE_DNOTIFY                build with dnotify support (linux only) default=ON
    115     DBUS_ENABLE_VERBOSE_MODE           support verbose debug mode default=ON
    116     DBUS_ENABLE_DOXYGEN_DOCS           build DOXYGEN documentation (requires Doxygen) default=ON
    117     DBUS_GCOV_ENABLED                  compile with coverage profiling instrumentation (gcc only) default=OFF
    118     DBUS_INSTALL_SYSTEM_LIBS           install required system libraries default (windows only) =OFF
    119     DBUS_USE_EXPAT                     Use expat (== ON) or libxml2 (==OFF) default=ON [1]
    120     DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS Use nonce tcp default address default=OFF
    121     DBUS_USE_OUTPUT_DEBUG_STRING       enable win32 debug port for message output default=OFF
    122     
    123     [1] requires installed development package of the related dependency 
    124 
    125     
    126 API/ABI Policy
    127 ===
    128 
    129 Now that D-Bus has reached version 1.0, the objective is that all
    130 applications dynamically linked to libdbus will continue working
    131 indefinitely with the most recent system and session bus daemons.
    132 
    133  - The protocol will never be broken again; any message bus should 
    134    work with any client forever. However, extensions are possible
    135    where the protocol is extensible.
    136 
    137  - If the library API is modified incompatibly, we will rename it 
    138    as in http://ometer.com/parallel.html - in other words, 
    139    it will always be possible to compile against and use the older 
    140    API, and apps will always get the API they expect.
    141 
    142 Interfaces can and probably will be _added_. This means both new
    143 functions and types in libdbus, and new methods exported to
    144 applications by the bus daemon.
    145 
    146 The above policy is intended to make D-Bus as API-stable as other
    147 widely-used libraries (such as GTK+, Qt, Xlib, or your favorite
    148 example). If you have questions or concerns they are very welcome on
    149 the D-Bus mailing list.
    150 
    151 NOTE ABOUT DEVELOPMENT SNAPSHOTS AND VERSIONING
    152 
    153 Odd-numbered minor releases (1.1.x, 1.3.x, 2.1.x, etc. -
    154 major.minor.micro) are devel snapshots for testing, and any new ABI
    155 they introduce relative to the last stable version is subject to
    156 change during the development cycle.
    157 
    158 Any ABI found in a stable release, however, is frozen.
    159 
    160 ABI will not be added in a stable series if we can help it. i.e. the
    161 ABI of 1.2.0 and 1.2.5 you can expect to be the same, while the ABI of
    162 1.4.x may add more stuff not found in 1.2.x.
    163 
    164 NOTE ABOUT STATIC LINKING
    165 
    166 We are not yet firmly freezing all runtime dependencies of the libdbus
    167 library. For example, the library may read certain files as part of
    168 its implementation, and these files may move around between versions.
    169 
    170 As a result, we don't yet recommend statically linking to
    171 libdbus. Also, reimplementations of the protocol from scratch might
    172 have to work to stay in sync with how libdbus behaves.
    173 
    174 To lock things down and declare static linking and reimplementation to
    175 be safe, we'd like to see all the internal dependencies of libdbus
    176 (for example, files read) well-documented in the specification, and
    177 we'd like to have a high degree of confidence that these dependencies
    178 are supportable over the long term and extensible where required.
    179 
    180 NOTE ABOUT HIGH-LEVEL BINDINGS
    181 
    182 Note that the high-level bindings are _separate projects_ from the
    183 main D-Bus package, and have their own release cycles, levels of
    184 maturity, and ABI stability policies. Please consult the documentation
    185 for your binding.
    186 README.cygwin
README.dbus4win
      1 On 2009-10-21 I (Tor Lillqvist <tml (a] iki.fi>) cherry-picked a bunch of
      2 commits from the dbus4win-noncetcp branch of the dbus4win repository
      3 to (my clone of) dbus upstream's master branch.
      4 
      5 The dbus4win repository is at least currently at
      6 git://repo.or.cz/dbus4win.git
      7 
      8 I went through the commits done to the dbus4win-noncetcp branch since
      9 the dbus-1.2.14 tag, i.e. commit f719d454329a1a54ff2d569feaf10ceee7cead50.
     10 
     11 The following commits were left out because they either 0) were
     12 already upstream, 1) seemed broken, or 2) seemed pointless to me,
     13 especially if the commit message didn't say much. For each commit left
     14 out, below is three lines: its id, the first log comment line, and an
     15 explanation why I left it out.
     16 
     17 f719d454329a1a54ff2d569feaf10ceee7cead50
     18 configure.in: not all gccs support -Wno-pointer-sign
     19 already upstream
     20 
     21 6eddb6e1229b617ad44c8d61107983229dc7d589
     22 configure.in: fail abstract socket test gracefully when cross-compilin
     23 already upstream
     24 
     25 c54dd9eefa5ed0d54be3b09cf30c12f05130fda1
     26 r783: one ifdef lesser
     27 probably pointless
     28 
     29 93c288ca3e86e7760d3ac3fa6490257c1b6dc544
     30 r783: compile if ENOMEM or EINTR is undefined.
     31 huh, ENOMEM and EINTR is defined in the Microsoft C library
     32 
     33 4f4ba13357da15c35a9d4ad111bf972a5d0d5db0
     34 r783: introduced _dbus_daemon_release() function called in _dbus_loop_quit()...
     35 this can't be right, there can be nested dbus loops afaik
     36 
     37 124eb334324472a10de2c7e0a1455d353431f08f
     38 unix build fixes against windbus-svn
     39 can't be right to make a char* const when the code below then assigns through it
     40 
     41 594bd19a0c45822d8763871e3491d99beb4d22cb
     42 introduce DBUS_DIR_SEPERATOR and make use of it. On windows, disable some system service tests
     43 "forward" slashes work fine on Windows, no need to uglify code with DBUS_DIR_SEPARATOR
     44 
     45 cd2cdb3457f72cf058d5b19796ee691ceca6b52c
     46 r783: introduced DBUS_CLEANUP_OLD_SERVICES that does cleanup prev zombie-instances...
     47 unsure about this. something specific to KDE-on-Windows?
     48 
     49 eeedba5b2f5b008819619764943caddd52441adf
     50 build fixes for OS X, xcode 3.1.2, gcc 4.2.1
     51 doesn't apply, seems to be upstream?
     52 
     53 7dc7f71cf3003e006f6e177b5460d14a7cdbf2de
     54 configure.in: fix pthread detection
     55 doesn't apply
     56 
     57 05b37fa87b1f6aa670de9007879f53a8198a7a89
     58 configure.in: suppress -fPIC, -fPIE for W32
     59 doesn't apply
     60 
     61 b0d14fed92d9f539cd3478e72dc2f3ea75f3941a
     62 configure.in: only check for wspiapi.h on Windows
     63 nah, no harm checking for it on UNIX too
     64 
     65 1724fc10e516e2d570537d522d8608abba90be5e
     66 prototypes cleanup
     67 related to cd2cdb3457f72cf058d5b19796ee691ceca6b52c which was skipped above
     68 README.wince
      1 DBus Daemon for Windows CE/Windows Mobile 6.5
      2 =============================================
      3 
      4 Bugs in upstream for any window version:
      5 * MoveFileExA < 0 result check bug
      6 * double dbus_free somewhere I forgot where (check in -ugly)
      7 * alignment issue
      8 * CreateProcess process information handle leak
      9 * _dbus_getsid NULL vs INVALID_HANDLE_VALUE
     10 * win_account_to_sid
     11 
     12 Customisation
     13 =============
     14 
     15 1) At installation, the following registry value should be set to the
     16 installation directory of the dbus installation (the directory
     17 containing the bin, etc, share folders):
     18 
     19 HKLM\Software\freedesktop\DBus\Install Directory
     20 
     21 2) Instead of environment variable DBUS_VERBOSE, use
     22 HKLM\Software\freedesktop\DBus\Verbose
     23 
     24 2) The keyring directory is MYDOCUMENTS\dbus-keyrings, not
     25 HOMEPATH\.dbus-keyrings.
     26 
     27 
     28 Compilation
     29 ===========
     30 
     31 ./configure --host=arm-mingw32ce CPPFLAGS=-I/path/to/expat/include LDFLAGS=-L/path/to/expat/lib
     32 
     33 A recent version of libtool is required, with this change:
     34 
     35 2010-02-28  Pierre Ossman  <ossman (a] ossman.lkpg.cendio.se>  (tiny change)
     36             Ralf Wildenhues <Ralf.Wildenhues (a] gmx.de>
     37 
     38        Fix deplibs check fallback for 64-bit Windows and Windows CE.
     39        * libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): Accept file formats
     40        'pe-arm-wince' and 'pe-x86-64'.  Add note about consistency with ...
     41        * libltdl/config/ltmain.m4sh (func_win32_libid): ... the respective
     42        pattern here; sync pattern from the former.
     43        * tests/deplibs-mingw.at (deplibs without file command): New
     44        file, new test.
     45        * Makefile.am (TESTSUITE_AT): Update.
     46        * NEWS: Update.
     47 
     48 
     49 MB vs WCHAR
     50 ===========
     51 
     52 Windows CE only supports the Unicode interface, while DBus Daemon uses
     53 the Multi-Byte interface on Windows by default.  The glue code does
     54 not support multibyte in all cases.  In particular, the _mbsrchr
     55 function is not correctly implemented.  It could be correctly
     56 implemented, or dbus daemon could use the wchar interface more
     57 consistently on all Windows targets.  For now, the Windows CE port
     58 will only work for filesystems without some weird characters in file
     59 names.  Is this a serious limitation?
     60 
     61 
     62 Known Issues
     63 ============
     64 
     65 Autolaunch is broken so far.
     66 
     67 Environment variables are faked.  Some are punted to the registry, but
     68 in any case they can not be used reliably for IPC.
     69 
     70 The test suite is not ported yet.
     71 
     72 dbus-pipe.c:
     73  * Uses libc file descriptors.  Needed for --print-address and
     74    --print-pid which probably don't work yet.
     75 
     76 dbus-sysdeps-win.c:
     77  * Backtraces have been disabled.
     78  * _dbus_fd_set_close_on_exec Not supported, maybe we should disable
     79    the warning.
     80  * SearchPathA: Uses HKLM\\Software\\freedesktop\\DBus\\Install Directory
     81    to locate binaries.
     82 README.windbus