Commit graph

42 commits

Author SHA1 Message Date
Simon McVittie
3cd51e7b92 build: Remove indirection from uses of Expat
We haven't supported XML libraries other than Expat since 2013.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69801
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
2017-04-10 12:40:52 +01:00
Ralf Habacker
6a8d0ae586 Replace deprecated cmake install_ functions with related install(...) calls.
Reviewed-by: Simon McVittie <smcv@debian.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99586
2017-01-30 17:47:35 +01:00
Simon McVittie
8415c2ab57 Only compile test-bus-launch-helper, etc. if embedded tests are enabled
These source files are specific to the embedded tests and make no sense
otherwise.

Also remove a comment in the CMake build system about fixing the
build of the activation helper on Windows: the activation helper
is Unix-specific and always will be, since it relies on Unix setuid
to function.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94094
2016-08-16 14:26:40 +01:00
Simon McVittie
327a52e4eb bus: move shared libaudit code to a new audit.[ch]
This fixes various duplicated libaudit interactions in both
SELinux and AppArmor code paths, including opening two audit sockets
if both SELinux and AppArmor were enabled at compile time.
In particular, audit.c is now the only user of libcap-ng.

This commit is not intended to introduce any functional changes,
except for the de-duplication.

The actual audit_log_user_avc_message() call is still duplicated,
because the SELinux and AppArmor code paths use different mechanisms
to compose the audit message: the SELinux path uses a statically-sized
buffer on the stack which might be subject to truncation, whereas
the AppArmor path uses malloc() (via DBusString) and falls back to
using syslog on a memory allocation failure.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89225
Reviewed-by: Colin Walters <walters@verbum.org>
[smcv: minor issues raised during review are subsequently fixed]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-08-06 17:12:36 +01:00
Dimitri John Ledkov
70950325c7 Adjust cmake build to match autoconf installation locations.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89280
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-05-27 11:49:41 +01:00
Tyler Hicks
06033cb20f Add apparmor element support to bus config parsing
The <apparmor> element can contain a single mode attribute that has one
of three values:

 "enabled"
 "disabled"
 "required"

"enabled" means that kernel support is autodetected and, if available,
AppArmor mediation occurs in dbus-daemon. If kernel support is not
detected, mediation is disabled. "disabled" means that mediation does
not occur. "required" means that kernel support must be detected for
dbus-daemon to start.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-02-18 17:04:00 +00:00
Ralf Habacker
fd4f3ca3f6 Fix usage of undefined variable DBUS_WIN32 on cmake build system
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88010
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2015-01-05 11:50:11 +01:00
Ralf Habacker
96646adbe9 Build test-bus-system with cmake on non win32 platforms.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83583
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-09-18 02:41:45 +02:00
Ralf Habacker
6864780bd6 Fix installation of empty directories for cmake build system.
The differences has been found out by comparing with the cross compiled
mingw..-dbus packages.

[exclude system bus support bits on Windows -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83583
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-09-15 13:33:23 +02:00
Ralf Habacker
7e373d4527 Rename bus-test-launch-helper to test-bus-launch_helper to match common test application naming scheme.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17 16:29:37 +00:00
Ralf Habacker
3ce5d21edf Rename bus-test to test-bus to match common test application naming scheme.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=73495
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-17 16:29:37 +00:00
Ralf Habacker
8e728f36d1 Use macros for test and helper executable targets on cmake build system.
The new macros add_test_executables and add helper_executables provides a
platform independent way for specifing dbus test and service applications.

On native Windows and Linux/UNIX systems the test applications are
directly runable.

When cross compiling for Windows on Linux test applications could be
executed on the Linux host system with the help of wine and activated
binfmt_misc support for wine.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41252
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-10 01:24:56 +01:00
Ralf Habacker
9866c2d785 Remove obsolete cmake project tags in sub directories; we only have one project.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68506
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2014-01-08 01:35:49 +01:00
Chengwei Yang
0cb7d487bc tests to embedded tests: replaced in cmake files
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28 12:18:32 +01:00
Chengwei Yang
1ec2e5a538 cmake: align dir watch backend detection with autotools
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28 11:55:52 +01:00
Chengwei Yang
46602768c5 XML: hard depends on expat and delete libxml
[The libxml code path has been broken for at least 2.5 years, and Expat
is tiny, so there seems no point in supporting both. -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20253
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-06 13:02:24 +01:00
Ralf Habacker
6676a7db9c Moved docbook sources used by cmake into doc subdir and adapted cmake build system.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:22 +00:00
Ralf Habacker
fccb9560b3 Create missing directories in cmake <build-root>/bus/session.d and <build-root>/bus/system.d
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-15 09:32:14 +01:00
Alban Crequy
97c11fe286 doc: update documentation with own_prefix policy rules
https://bugs.freedesktop.org/show_bug.cgi?id=46886
2012-03-22 11:28:58 +00:00
Simon McVittie
f56a55af1a Revert "made session service dirs customizable: cmake part"
This reverts commit 89e453216c.
It makes the tests fail under autotools.
2012-01-04 18:20:15 +00:00
Ralf Habacker
89e453216c made session service dirs customizable: cmake part 2011-11-21 12:21:01 +01:00
Ralf Habacker
797b511deb Install empty session.d config directory using cmake, otherwise dbus-daemon will not start
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
2011-10-17 15:45:49 +02:00
Ralf Habacker
7973504156 Merged cmake and autotools session bus configuration
cmake and autotools session bus configuration templates are identical,
so cmake now uses the autotools.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
2011-09-29 14:08:03 +02:00
Ralf Habacker
a7f98d8819 Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. 2011-07-02 00:53:23 +02:00
Ralf Habacker
4d3fefc7f7 Keep in sync with autotools. 2010-06-07 13:59:21 +02:00
unknown
2154acb349 Make the windows binaries and build match the linux one with cmake buildsystem.
This is performed by including the files from the client lib in the internal one
and by removing the linking to dbus-1 for targets using the internal library.
2010-03-22 10:41:06 +01:00
Ralf Habacker
d999abdaa8 CMake dbus libraries usage cleanup.
Renamed DBUS_LIBRARIES to DBUS_INTERNAL_LIBRARIES and moved to top level CMakeLists.txt.
Removed obsolate references of dbus-internal library.
Added DBUS_LIBRARIES definition which contains only the dbus library.
2010-03-20 22:33:58 +01:00
Ralf Habacker
0793857c92 added some docs for windows and updated the documentation index 2010-02-10 13:03:19 +01:00
Romain Pokrzywka
1cd84d8258 remove DBUS_DAEMON_EXECUTABLE_NAME, we already have DBUS_DAEMON_NAME, and use the specified name for the executable when building with cmake 2010-02-07 00:32:46 +01:00
Romain Pokrzywka
196b310dd1 remove the debug postfix for the executables, it only makes sense for the lib 2010-02-07 00:32:45 +01:00
Romain Pokrzywka
b0e0cd03e8 commented bits cleanup 2010-02-07 00:32:44 +01:00
Romain Pokrzywka
ce69516585 refactor the cmake build to match with autotools: only export client symbols in dbus-1 and use and internal library for the rest. Currently this library is statically linked to the apps but it can be made dynamic if wanted 2010-02-07 00:32:39 +01:00
Frank Osterfeld
c263a6dfff disable launch-helper on windows for now until it builds (cherry picked from commit 48da3a0450172f711c25a459ce70c2521d22ee27) 2009-11-30 11:39:22 +01:00
Frank Osterfeld
c89d506700 bus-test-launch-helper is a unit test, test-service and test-shell-service are not. Rename test-shell to shell-test to match autotools (cherry picked from commit b106387b73d6a300a013a15f6507244e82f007ed) 2009-11-30 11:39:21 +01:00
Frank Osterfeld
7ce953f038 build dbus-daemon-launch-helper-test and friends set all TEST vars needed for the .in files (cherry picked from commit fcd9ba392927b0433e5e037d393230774edae303) 2009-11-30 11:09:25 +01:00
Frank Osterfeld
6e8fcdf889 do not add d suffix on non-windows (cherry picked from commit 27980491d3cac6166c30c4adc2c71d80c3e4e13a) 2009-11-30 11:09:24 +01:00
Frank Osterfeld
8f15f6713b use correct test data dir (cherry picked from commit ef471a74068b198ed10fe2a377520aa6a68b8370) 2009-11-30 11:09:21 +01:00
Christian Ehrlicher
4668480458 merge changes done to the cmake-buildsystem from the sf.net windbus-svn trunk. tested and works fine with at least msvc2008. (cherry picked from commit 45c168fd61e3f6447e014df4bb6417efbe725ccd) 2009-11-30 10:32:04 +01:00
Ralf Habacker
17b84104f2 * cmake/: don't install test applications and service files, moved CMAKE_DEBUG_POSTFIX to top level CMakeLists.txt 2007-04-28 19:37:25 +00:00
Ralf Habacker
4bd8418548 * cmake: added debug postfixes to debug exe's for easier debugging.
* dbus\dbus-sysdeps-win.c (_dbus_win_set_error_from_win_error): print error code in case no string message is available.
2007-04-26 09:30:38 +00:00
Ralf Habacker
4b876d8cb4 * cmake/dbus/CMakeLists.txt,cmake/bus/CMakeLists.txt,
cmake/CMakeLists.txt: win32 compile fix
2007-03-06 20:51:02 +00:00
Ralf Habacker
36ebfd411b * cmake: new directory, contains cmake build support.
See http://www.cmake.org for more informations.
Currently only unix will be buildable because some
win32 required files are still missing.
2007-03-03 14:32:17 +00:00