mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-19 22:50:35 +01:00
Move session & system bus configuration to datadir, by default.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89280 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
4cbe3019c7
commit
b2c61ca6ea
9 changed files with 77 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
configdir=$(sysconfdir)/dbus-1
|
||||
dbusdatadir=$(datadir)/dbus-1
|
||||
legacydbusdatadir=$(sysconfdir)/dbus-1
|
||||
dbus_daemon_execdir = $(DBUS_DAEMONDIR)
|
||||
|
||||
DBUS_BUS_LIBS = \
|
||||
|
|
@ -21,7 +22,7 @@ AM_CPPFLAGS = \
|
|||
$(DBUS_STATIC_BUILD_CPPFLAGS) \
|
||||
$(XML_CFLAGS) \
|
||||
$(APPARMOR_CFLAGS) \
|
||||
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
|
||||
-DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
|
||||
-DDBUS_COMPILATION \
|
||||
$(NULL)
|
||||
|
||||
|
|
@ -33,15 +34,19 @@ EFENCE=
|
|||
CONFIG_IN_FILES= \
|
||||
session.conf.in \
|
||||
system.conf.in \
|
||||
legacy-config/session.conf.in \
|
||||
legacy-config/system.conf.in \
|
||||
org.freedesktop.dbus-session.plist.in \
|
||||
example-system-enable-stats.conf.in \
|
||||
example-session-disable-stats.conf.in \
|
||||
$(NULL)
|
||||
|
||||
config_DATA = session.conf
|
||||
dbusdata_DATA = session.conf
|
||||
legacydbusdata_DATA = legacy-config/session.conf
|
||||
|
||||
if DBUS_UNIX
|
||||
config_DATA += system.conf
|
||||
dbusdata_DATA += system.conf
|
||||
legacydbusdata_DATA += legacy-config/system.conf
|
||||
endif
|
||||
|
||||
examplesdir = ${docdir}/examples
|
||||
|
|
@ -231,12 +236,12 @@ clean-local:
|
|||
/bin/rm *.bb *.bbg *.da *.gcov || true
|
||||
|
||||
install-data-hook:
|
||||
$(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
|
||||
$(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/session.d
|
||||
$(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/services
|
||||
if DBUS_UNIX
|
||||
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
|
||||
$(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
|
||||
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
|
||||
$(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/system.d
|
||||
$(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/system-services
|
||||
endif
|
||||
if HAVE_SYSTEMD
|
||||
# Install dbus.socket as default implementation of a D-Bus stack.
|
||||
|
|
|
|||
20
bus/legacy-config/session.conf.in
Normal file
20
bus/legacy-config/session.conf.in
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!--
|
||||
This configuration file is no longer required and may be removed.
|
||||
|
||||
In older versions of dbus, this file defined the behaviour of the well-known
|
||||
session bus. That behaviour is now determined by
|
||||
@DBUS_DATADIR@/dbus-1/session.conf, which should not be edited.
|
||||
|
||||
For local configuration changes, create a file
|
||||
@DBUS_SYSCONFDIR@/dbus-1/session-local.conf or files matching
|
||||
@DBUS_SYSCONFDIR@/dbus-1/session.d/*.conf, with a <busconfig>
|
||||
element containing configuration directives. These directives can
|
||||
override D-Bus or OS defaults.
|
||||
|
||||
For upstream or distribution-wide defaults that can be overridden
|
||||
by a local sysadmin, create files matching
|
||||
@DBUS_DATADIR@/dbus-1/session.d/*.conf instead.
|
||||
-->
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig></busconfig>
|
||||
20
bus/legacy-config/system.conf.in
Normal file
20
bus/legacy-config/system.conf.in
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!--
|
||||
This configuration file is no longer required and may be removed.
|
||||
|
||||
In older versions of dbus, this file defined the behaviour of the well-known
|
||||
system bus. That behaviour is now determined by
|
||||
@DBUS_DATADIR@/dbus-1/system.conf, which should not be edited.
|
||||
|
||||
For local configuration changes, create a file
|
||||
@DBUS_SYSCONFDIR@/dbus-1/system-local.conf or files matching
|
||||
@DBUS_SYSCONFDIR@/dbus-1/system.d/*.conf, with a <busconfig>
|
||||
element containing configuration directives. These directives can
|
||||
override D-Bus or OS defaults.
|
||||
|
||||
For upstream or distribution-wide defaults that can be overridden
|
||||
by a local sysadmin, create files matching
|
||||
@DBUS_DATADIR@/dbus-1/system.d/*.conf instead.
|
||||
-->
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig></busconfig>
|
||||
|
|
@ -35,13 +35,18 @@
|
|||
<allow own="*"/>
|
||||
</policy>
|
||||
|
||||
<!-- Include legacy configuration location -->
|
||||
<include ignore_missing="yes">@DBUS_SYSCONFDIR@/dbus-1/session.conf</include>
|
||||
|
||||
<!-- Config files are placed here that among other things,
|
||||
further restrict the above policy for specific services. -->
|
||||
<includedir>session.d</includedir>
|
||||
|
||||
<includedir>@DBUS_SYSCONFDIR@/dbus-1/session.d</includedir>
|
||||
|
||||
<!-- This is included last so local configuration can override what's
|
||||
in this standard file -->
|
||||
<include ignore_missing="yes">session-local.conf</include>
|
||||
<include ignore_missing="yes">@DBUS_SYSCONFDIR@/dbus-1/session-local.conf</include>
|
||||
|
||||
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
|
||||
|
||||
|
|
|
|||
|
|
@ -97,13 +97,18 @@
|
|||
send_interface="org.freedesktop.DBus.Debug.Stats"/>
|
||||
</policy>
|
||||
|
||||
<!-- Include legacy configuration location -->
|
||||
<include ignore_missing="yes">@DBUS_SYSCONFDIR@/dbus-1/system.conf</include>
|
||||
|
||||
<!-- Config files are placed here that among other things, punch
|
||||
holes in the above policy for specific services. -->
|
||||
<includedir>system.d</includedir>
|
||||
|
||||
<includedir>@DBUS_SYSCONFDIR@/dbus-1/system.d</includedir>
|
||||
|
||||
<!-- This is included last so local configuration can override what's
|
||||
in this standard file -->
|
||||
<include ignore_missing="yes">system-local.conf</include>
|
||||
<include ignore_missing="yes">@DBUS_SYSCONFDIR@/dbus-1/system-local.conf</include>
|
||||
|
||||
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
|
||||
|
||||
|
|
|
|||
|
|
@ -1689,6 +1689,11 @@ DBUS_LIBEXECDIR="$EXPANDED_LIBEXECDIR"
|
|||
AC_SUBST(DBUS_LIBEXECDIR)
|
||||
AC_DEFINE_UNQUOTED(DBUS_LIBEXECDIR,"$DBUS_LIBEXECDIR", [Directory for installing the libexec binaries])
|
||||
|
||||
#### Directory to source sysconfdir configuration from
|
||||
DBUS_SYSCONFDIR="$EXPANDED_SYSCONFDIR"
|
||||
AC_SUBST(DBUS_SYSCONFDIR)
|
||||
AC_DEFINE_UNQUOTED(DBUS_SYSCONFDIR,"$DBUS_SYSCONFDIR", [Directory to source sysconfdir configuration from])
|
||||
|
||||
#### Tell tests where to find certain stuff in builddir
|
||||
|
||||
DBUS_PWD=`pwd`
|
||||
|
|
@ -1848,6 +1853,8 @@ dbus/versioninfo.rc
|
|||
dbus/dbus-arch-deps.h
|
||||
bus/system.conf
|
||||
bus/session.conf
|
||||
bus/legacy-config/system.conf
|
||||
bus/legacy-config/session.conf
|
||||
bus/example-system-enable-stats.conf
|
||||
bus/example-session-disable-stats.conf
|
||||
bus/messagebus
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
configdir=$(sysconfdir)/dbus-1
|
||||
dbusdatadir=$(datadir)/dbus-1
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
|
|
@ -9,8 +9,8 @@ AM_CPPFLAGS = \
|
|||
$(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"\" \
|
||||
-DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
|
||||
-DDBUS_SESSION_CONFIG_FILE=\""$(dbusdatadir)/session.conf"\" \
|
||||
$(NULL)
|
||||
|
||||
AM_CFLAGS =
|
||||
|
|
|
|||
|
|
@ -459,10 +459,8 @@ if DBUS_ENABLE_INSTALLED_TESTS
|
|||
install -d "$(DESTDIR)$(testexecdir)/$${F%/*}"; \
|
||||
install -m644 "installable/$${F%.in}" "$(DESTDIR)$(testexecdir)/$${F%.in}"; \
|
||||
done
|
||||
ln -nfs $(sysconfdir)/dbus-1/session.conf $(DESTDIR)$(testexecdir)/data/valid-config-files/session.conf
|
||||
ln -nfs $(sysconfdir)/dbus-1/session.d $(DESTDIR)$(testexecdir)/data/valid-config-files/session.d
|
||||
ln -nfs $(sysconfdir)/dbus-1/system.conf $(DESTDIR)$(testexecdir)/data/valid-config-files/system.conf
|
||||
ln -nfs $(sysconfdir)/dbus-1/system.d $(DESTDIR)$(testexecdir)/data/valid-config-files/system.d
|
||||
ln -nfs $(datadir)/dbus-1/session.conf $(DESTDIR)$(testexecdir)/data/valid-config-files/session.conf
|
||||
ln -nfs $(datadir)/dbus-1/system.conf $(DESTDIR)$(testexecdir)/data/valid-config-files/system.conf
|
||||
else
|
||||
@:
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
configdir=$(sysconfdir)/dbus-1
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(DBUS_STATIC_BUILD_CPPFLAGS) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue