From 95a48fea57aab3f66f0a49b336a10b8238f8955c Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 25 Feb 2015 15:39:04 +0000 Subject: [PATCH 1/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 | 21 +++++++++++++-------- bus/legacy-config/session.conf.in | 20 ++++++++++++++++++++ bus/legacy-config/system.conf.in | 20 ++++++++++++++++++++ bus/session.conf.in | 7 ++++++- bus/system.conf.in | 7 ++++++- configure.ac | 7 +++++++ dbus/Makefile.am | 6 +++--- test/Makefile.am | 6 ++---- tools/Makefile.am | 2 -- 9 files changed, 77 insertions(+), 19 deletions(-) create mode 100644 bus/legacy-config/session.conf.in create mode 100644 bus/legacy-config/system.conf.in diff --git a/bus/Makefile.am b/bus/Makefile.am index ac2b4fc..38c0558 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -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. diff --git a/bus/legacy-config/session.conf.in b/bus/legacy-config/session.conf.in new file mode 100644 index 0000000..aaea910 --- /dev/null +++ b/bus/legacy-config/session.conf.in @@ -0,0 +1,20 @@ + + + diff --git a/bus/legacy-config/system.conf.in b/bus/legacy-config/system.conf.in new file mode 100644 index 0000000..84ed296 --- /dev/null +++ b/bus/legacy-config/system.conf.in @@ -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..cff4e2f 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` @@ -1837,6 +1842,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 diff --git a/dbus/Makefile.am b/dbus/Makefile.am index e5a5688..a7b3491 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -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 = diff --git a/test/Makefile.am b/test/Makefile.am index f384859..1267496 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -434,10 +434,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 diff --git a/tools/Makefile.am b/tools/Makefile.am index 0743b52..56a0b7f 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,3 @@ -configdir=$(sysconfdir)/dbus-1 - AM_CPPFLAGS = \ -I$(top_srcdir) \ $(DBUS_STATIC_BUILD_CPPFLAGS) \ -- 2.1.0