dbus/cmake
Simon McVittie 1477ca5035 build: Introduce ${runstatedir} and use it for the pid file
By default ${runstatedir} is the same as ${localstatedir}/run, but many
Linux distributions configure it to be /run and mount a tmpfs in that
location. All other factors being equal, it is preferable to use /run
where available because it is guaranteed to be local, whereas traversing
/var might involve automounting a networked filesystem (even though
/var/run itself is very likely to be a tmpfs).

/run or /var/run is currently only used in a few places in dbus, but
I plan to make more use of it during the development of
<https://bugs.freedesktop.org/show_bug.cgi?id=100344>.

The pid file is not part of the API between dbus and other software
(other than distribution init scripts for dbus itself), so we do not
need to keep it strictly compatible; so it is OK to move it.

We do not yet use /run for the system bus socket, because that is
part of the API between D-Bus clients and servers, and has always been
"officially" /var/run/dbus/system_bus_socket.
<https://bugs.freedesktop.org/show_bug.cgi?id=101628> tracks the
possibility of changing that.

Similarly, we do not replace /var/run/console with /run/console, because
that path is part of the API between dbus-daemon and the obsolete PAM
modules pam_console and pam_foreground that used /var/run/console.
<https://bugs.freedesktop.org/show_bug.cgi?id=101629> tracks the possible
future removal of that code path.

In the CMake build system, the equivalent of ${runstatedir} remains
hard-coded to the equivalent of ${localstatedir}/run for simplicity. For
the sort of system-wide installations that would consider redefining
${runstatedir} to /run, the Autotools build system is strongly
recommended: in particular this is what Linux distributions are expected
to use.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101569
2017-06-30 10:51:14 +01:00
..
bus build: Remove indirection from uses of Expat 2017-04-10 12:40:52 +01:00
dbus cmake: Keep include file install locations on Windows in sync with Unix. 2017-02-13 20:22:47 +01:00
doc Add dbus-update-activation-environment tool 2015-02-24 11:15:52 +00:00
modules test/dbus-daemon: Exercise the Peer interface 2017-06-08 17:00:38 +01:00
test Add test-uid-permissions test case to cmake build system. 2017-01-30 17:47:43 +01:00
tools Replace deprecated cmake install_ functions with related install(...) calls. 2017-01-30 17:47:35 +01:00
bus-test.bat.cmake * cmake: new directory, contains cmake build support. 2007-03-03 14:32:17 +00:00
CMakeLists.txt build: Introduce ${runstatedir} and use it for the pid file 2017-06-30 10:51:14 +01:00
config.h.cmake build: Introduce ${runstatedir} and use it for the pid file 2017-06-30 10:51:14 +01:00
ConfigureChecks.cmake Add missing include file for cmake function check_include_files() (commit 2d2b5af) 2015-03-05 14:45:18 +01:00
dbus-env.bat.cmake Split DBUS_SESSION_BUS_DEFAULT_ADDRESS into listen, connect addresses and set better defaults 2012-08-13 19:57:13 +01:00
DBus1Config.cmake.in cmake, autotools: Add find package config support for cmake clients 2017-03-20 14:18:45 +00:00
DBus1Config.pkgconfig.in cmake, autotools: Add find package config support for cmake clients 2017-03-20 14:18:45 +00:00
DBus1ConfigVersion.cmake.in cmake, autotools: Add find package config support for cmake clients 2017-03-20 14:18:45 +00:00
i686-w64-mingw32.cmake add travis-ci.org build machinery 2015-12-02 00:53:01 +01:00