Commit graph

5779 commits

Author SHA1 Message Date
Ralf Habacker
10b2cd53fb Merge branch 'FGasper/dbus-2ormore' 2019-03-13 08:54:31 +01:00
Felipe Gasper
1471a25a01 Update dbus-specification.xml to avoid implying that an interface name may consist of only 1 element. 2019-03-13 08:52:54 +01:00
Ralf Habacker
b81487d72d Merge branch 'readme-cmake-add-cross-compile-hints' into 'master'
README.cmake: Add cross compile hints

See merge request dbus/dbus!100
2019-03-13 07:45:01 +00:00
Ralf Habacker
2a21c7f006 README.cmake: Fix doc for building on linux
Remove -G flag and let user use the default generator.
2019-03-12 12:29:45 +01:00
Ralf Habacker
015ecf15dd README.cmake: Add cross building for Windows 2019-03-12 12:29:45 +01:00
Simon McVittie
47953c5d85 Merge branch 'nss-fds' into 'master'
_dbus_test_main: Exercise NSS modules before running tests

Closes #256

See merge request dbus/dbus!93

Reviewed-by: pwithnall
Tested-by: rhabacker
2019-01-28 11:18:16 +00:00
Simon McVittie
af89e0db8d Merge branch 'unused-userdb' into 'master'
Remove unused bits of userdb

See merge request dbus/dbus!92

Reviewed-by: pwithnall
2019-01-25 11:52:48 +00:00
Simon McVittie
02e3c4fdfa _dbus_test_main: Exercise NSS modules before running tests
Some NSS modules like those for sssd and LDAP might allocate fds
on a one-per-process basis, for example a socket to talk to sssd.
Make sure those have already been allocated before we enter the code
under test, so that they don't show up as having been "leaked" by the
first module of code under test that happens to do a NSS lookup.

The call to _dbus_test_check_memleaks tears down libdbus' own memory
allocations, but not any hidden state in libc or NSS.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-25 11:49:56 +00:00
Simon McVittie
b6826ae43e Merge branch 'finish-reformat-cmake-files' into 'master'
Finish formatting cmake files

See merge request dbus/dbus!91
2019-01-24 16:22:22 +00:00
Ralf Habacker
6332f7d4b1 Fixes remaining indentations that are not covered by the cmake formatting script in CMakeLists.txt files 2019-01-24 09:08:15 +01:00
Ralf Habacker
2798e68776 Adjust indents of CMakeLists.txt files always to 4 spaces 2019-01-24 09:08:15 +01:00
Ralf Habacker
f4032b05ed tools/cmake-format: Add option --check-indents to check indentations independently from other options
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-24 09:07:45 +01:00
Ralf Habacker
904fa97a1b Remove obsolete parameter in end... cmake keywords 2019-01-24 09:07:27 +01:00
Ralf Habacker
5972bbe382 Remove spaces between cmake command and opening bracket 2019-01-24 09:07:27 +01:00
Ralf Habacker
3927b1dd39 Use lower case cmake keywords in CMakeLists.txt files 2019-01-24 09:07:27 +01:00
Ralf Habacker
7dd83ba874 Replace tabs by 4 spaces in CMakeLists.txt files 2019-01-24 09:07:27 +01:00
Ralf Habacker
38b7c2859e Remove trailing spaces in CMakeLists.txt files 2019-01-24 09:07:27 +01:00
Ralf Habacker
eb4b378958 tools/cmake-format: Do not exclude CMakeLists.txt files
This fixes a regression of merge request !82 introduced
with the rebase to !84.
2019-01-24 09:07:10 +01:00
Simon McVittie
ad7e2749cf Merge branch 'reformat-cmake-files' into 'master'
Reformat cmake files

Closes #252

See merge request dbus/dbus!82
2019-01-23 20:52:37 +00:00
Simon McVittie
6d8280ec93 Merge branch 'code-coverage' into 'master'
Adapt to API change in AX_CODE_COVERAGE version 28

Closes #249

See merge request dbus/dbus!88

Reviewed-by: @pwithnall
2019-01-23 20:45:32 +00:00
Ralf Habacker
81df96d103 Adjust indents of cmake build system files always to 4 spaces 2019-01-23 21:34:24 +01:00
Ralf Habacker
54800ede4e Remove obsolete parameter in end... cmake keywords 2019-01-23 21:34:24 +01:00
Ralf Habacker
382857a265 Remove spaces between cmake command and opening bracket 2019-01-23 21:34:24 +01:00
Ralf Habacker
592251948c Use lower case cmake keywords 2019-01-23 21:34:24 +01:00
Ralf Habacker
781afd86a3 Replace tabs by 4 spaces in cmake build system files 2019-01-23 21:34:24 +01:00
Ralf Habacker
58b3d6ff20 Remove trailing spaces in cmake related files 2019-01-23 21:34:24 +01:00
Ralf Habacker
f855d0bb48 Add script for formatting cmake files
The prefered call order is

  tools/cmake-format --trailing-spaces
  # create git commit
  tools/cmake-format --tabs
  # create git commit
  tools/cmake-format --keyword-case
  # create git commit
  tools/cmake-format --keyword-spaces
  # create git commit
  tools/cmake-format --end-args
  # create git commit
  tools/cmake-format --indents
  # create git commit

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-23 21:34:08 +01:00
Ralf Habacker
fc205cb4e4 Merge branch 'move-cmake-toplevel' into 'master'
Move cmake related build system to top level

See merge request dbus/dbus!84

Reviewed-by: @smcv
2019-01-23 19:50:57 +00:00
Simon McVittie
2091cd73b1 _dbus_user_database_get_groupname: Inline into its only caller
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-23 12:09:27 +00:00
Simon McVittie
ffa34d6a54 _dbus_user_database_get_gid: Remove unused function
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-23 12:09:04 +00:00
Simon McVittie
bd860d7525 _dbus_parse_uid: Remove unused function
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-23 12:05:54 +00:00
Simon McVittie
c2a3bc30e6 dbus-userdb: Remove unused _dbus_homedir_from_username()
Everything that wants a home directory uses either
_dbus_homedir_from_uid() or _dbus_homedir_from_current_process().

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-23 11:57:42 +00:00
Simon McVittie
3f11735086 dbus-userdb: Remove unimplemented declaration of _dbus_credentials_from_uid()
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-23 11:56:51 +00:00
Simon McVittie
269bb1dcf2 cmake: Set working directory to be a native path
If we're cross-compiling for Windows on Unix, CTest needs to chdir() to
the native Unix path.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-22 09:58:28 +01:00
Ralf Habacker
a8e5e5c552 Add cmake macros add_executable_version_info and add_library_version_info
This helps to reduce duplicated code.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:58:27 +01:00
Ralf Habacker
b641eddd6e Remove duplicated cmake variable definition
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:58:14 +01:00
Ralf Habacker
88331affd5 Install devhelp2 and api doc with cmake
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:58:08 +01:00
Ralf Habacker
d9fa5aee84 Generate documentation html index file from doc/index.html.in for autotools and cmake
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:57:57 +01:00
Ralf Habacker
3bf97922bd Move cmake related build system to top level
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2019-01-22 09:57:40 +01:00
Simon McVittie
83be61aa2d Consistently add CODE_COVERAGE_CPPFLAGS everywhere
We forgot this in a couple of places.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 18:46:07 +00:00
Simon McVittie
e0ea7a130c Consistently add CODE_COVERAGE_LIBS everywhere
We need to link the code coverage objects, directly or indirectly,
into every executable and every shared library. The rule I've followed
to make it clear that we do this, without too much repetition, is:
each executable, shared library or convenience library has
CODE_COVERAGE_LIBS in its LDADD or LIBADD, unless it is linked to a
convenience library in the same directory that has CODE_COVERAGE_LIBS
in *its* LIBADD.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 18:45:38 +00:00
Simon McVittie
2938c2125e Adapt to API change in AX_CODE_COVERAGE version 28
AX_CODE_COVERAGE recently changed the way it embedded its Makefile rules
in the output file: instead of using @CODE_COVERAGE_RULES@, users
are now meant to include aminclude_static.am.

The new AX_CODE_COVERAGE is only in the latest autoconf-archive release,
version 2019.01.06, which is inconveniently new, so bundle everything
we need for the moment.

This requires us to stop using the deprecated CODE_COVERAGE_LDFLAGS
(which we still used to support older versions of autoconf-archive)
and replace them with CODE_COVERAGE_LIBS.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 18:43:08 +00:00
Simon McVittie
8747c9b5a0 Merge branch 'cmake-dist' into 'master'
CI: Do the CMake native debug build from an Autotools `make dist`

Closes #255

See merge request dbus/dbus!87
2019-01-21 16:23:53 +00:00
Simon McVittie
402344e89e Merge branch 'ax-missing' into 'master'
configure.ac: Forbid AX_-prefixed patterns more selectively

Closes #249

See merge request dbus/dbus!86

Reviewed-by: @pwithnall
2019-01-21 16:22:14 +00:00
Simon McVittie
2ebc5101ec Merge branch 'test-bundling' into 'master'
Move some test code from dbus/ and bus/ into test/

Closes #223

See merge request dbus/dbus!1

Reviewed-by: @rhabacker
[smcv: Use ${TEST_DIR} as requested during review]
2019-01-21 15:48:12 +00:00
Simon McVittie
1972390d42 test: Move _dbus_list_test() here
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 15:22:07 +00:00
Simon McVittie
0296c1fcbf test: Move _dbus_transport_unix_test() here
This requires exposing _dbus_connection_get_address() as an internal
symbol, but that seems worth it.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 15:22:07 +00:00
Simon McVittie
d9dfe4ee3e test: Move _dbus_server_test() here
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 15:22:07 +00:00
Simon McVittie
58fc8a0360 test: Move _dbus_misc_test() here
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 15:22:06 +00:00
Simon McVittie
0dd9853a37 test: Move _dbus_signature_test() here
This is all public API, so there's no need to embed it in the library.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 15:22:06 +00:00