From ff8947952618b0134d0a66343eea5d6c324d6f20 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 25 Feb 2015 15:39:04 +0000 Subject: [PATCH 2/2] Move session & system bus configuration to datadir, by default. Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ --- bus/Makefile.am | 9 ++++++--- bus/legacy-config/session.conf | 20 ++++++++++++++++++++ bus/legacy-config/system.conf | 20 ++++++++++++++++++++ bus/session.conf.in | 7 ++++++- bus/system.conf.in | 7 ++++++- configure.ac | 5 +++++ dbus-1.pc.in | 2 ++ dbus/Makefile.am | 2 +- test/Makefile.am | 8 ++++---- tools/Makefile.am | 2 +- 10 files changed, 71 insertions(+), 11 deletions(-) create mode 100644 bus/legacy-config/session.conf create mode 100644 bus/legacy-config/system.conf diff --git a/bus/Makefile.am b/bus/Makefile.am index ac2b4fc..f4688bb 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -1,4 +1,5 @@ -configdir=$(sysconfdir)/dbus-1 +configdir=$(datadir)/dbus-1 +legacyconfigdir=$(sysconfdir)/dbus-1 dbus_daemon_execdir = $(DBUS_DAEMONDIR) DBUS_BUS_LIBS = \ @@ -39,9 +40,11 @@ CONFIG_IN_FILES= \ $(NULL) config_DATA = session.conf +legacyconfig_DATA = legacy-config/session.conf if DBUS_UNIX config_DATA += system.conf +legacyconfig_DATA += legacy-config/system.conf endif examplesdir = ${docdir}/examples @@ -232,11 +235,11 @@ clean-local: install-data-hook: $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d - $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services + $(mkinstalldirs) $(DESTDIR)$(configdir)/services if DBUS_UNIX $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d - $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services + $(mkinstalldirs) $(DESTDIR)$(configdir)/system-services endif if HAVE_SYSTEMD # Install dbus.socket as default implementation of a D-Bus stack. diff --git a/bus/legacy-config/session.conf b/bus/legacy-config/session.conf new file mode 100644 index 0000000..a19a1e5 --- /dev/null +++ b/bus/legacy-config/session.conf @@ -0,0 +1,20 @@ + + + + + diff --git a/bus/legacy-config/system.conf b/bus/legacy-config/system.conf new file mode 100644 index 0000000..bd1bb8c --- /dev/null +++ b/bus/legacy-config/system.conf @@ -0,0 +1,20 @@ + + + + + diff --git a/bus/session.conf.in b/bus/session.conf.in index cfe9544..63ed476 100644 --- a/bus/session.conf.in +++ b/bus/session.conf.in @@ -25,13 +25,18 @@ + + @DBUS_SYSCONFDIR@/dbus-1/session.conf + session.d + @DBUS_SYSCONFDIR@/dbus-1/session.d + - session-local.conf + @DBUS_SYSCONFDIR@/dbus-1/session-local.conf contexts/dbus_contexts diff --git a/bus/system.conf.in b/bus/system.conf.in index ac78c73..3679115 100644 --- a/bus/system.conf.in +++ b/bus/system.conf.in @@ -97,13 +97,18 @@ send_interface="org.freedesktop.DBus.Debug.Stats"/> + + @DBUS_SYSCONFDIR@/dbus-1/system.conf + system.d + @DBUS_SYSCONFDIR@/dbus-1/system.d + - system-local.conf + @DBUS_SYSCONFDIR@/dbus-1/system-local.conf contexts/dbus_contexts diff --git a/configure.ac b/configure.ac index bea630a..a8f2b4c 100644 --- a/configure.ac +++ b/configure.ac @@ -1678,6 +1678,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` diff --git a/dbus-1.pc.in b/dbus-1.pc.in index f93d156..bb78332 100644 --- a/dbus-1.pc.in +++ b/dbus-1.pc.in @@ -10,6 +10,8 @@ sysconfdir=@sysconfdir@ session_bus_services_dir=${datadir}/dbus-1/services system_bus_services_dir=${datadir}/dbus-1/system-services interfaces_dir=${datadir}/dbus-1/interfaces +session_bus_config_dir=${datadir}/dbus-1/session.d +system_bus_config_dir=${datadir}/dbus-1/system.d daemondir=@dbus_daemondir@ Name: dbus diff --git a/dbus/Makefile.am b/dbus/Makefile.am index e5a5688..1b19f5c 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -1,5 +1,5 @@ -configdir=$(sysconfdir)/dbus-1 +configdir=$(datadir)/dbus-1 AM_CPPFLAGS = \ -I$(top_builddir) \ diff --git a/test/Makefile.am b/test/Makefile.am index f384859..51349f9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -434,10 +434,10 @@ 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/session.d $(DESTDIR)$(testexecdir)/data/valid-config-files/session.d + ln -nfs $(datadir)/dbus-1/system.conf $(DESTDIR)$(testexecdir)/data/valid-config-files/system.conf + ln -nfs $(datadir)/dbus-1/system.d $(DESTDIR)$(testexecdir)/data/valid-config-files/system.d else @: endif diff --git a/tools/Makefile.am b/tools/Makefile.am index 0743b52..08d7502 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,4 +1,4 @@ -configdir=$(sysconfdir)/dbus-1 +configdir=$(datadir)/dbus-1 AM_CPPFLAGS = \ -I$(top_srcdir) \ -- 2.1.0