callouts/org.freedesktop.nm_dispatcher.service and system-settings/src/org.freedesktop.NetworkManagerSystemSettings.service use hardcoded path names like /usr/sbin and /usr/libexec. This is problematic, as e.g. Debian/Ubuntu don't have /usr/libexec or if you want to install into /usr/local. The attached patch uses @libexecdir@ and @sbindir@ and processes *service.in files to create the final service files. Before applying the patch, please run svn mv org.freedesktop.NetworkManagerSystemSettings.service org.freedesktop.NetworkManagerSystemSettings.service.in in system-settings/src/ and svn mv org.freedesktop.nm_dispatcher.service org.freedesktop.nm_dispatcher.service.in in callouts/. Otherwise the svn history is not correctly presevered (svn is too dumb unfortunately). Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Index: system-settings/src/Makefile.am =================================================================== --- system-settings/src/Makefile.am (Revision 3616) +++ system-settings/src/Makefile.am (Arbeitskopie) @@ -51,13 +51,24 @@ dbusservicedir = $(DBUS_SYS_DIR) dbusservice_DATA = nm-system-settings.conf -dbusactivationdir = $(prefix)/share/dbus-1/system-services -dbusactivation_DATA = org.freedesktop.NetworkManagerSystemSettings.service +dbusactivationdir = $(datadir)/dbus-1/system-services +dbusactivation_in_files = org.freedesktop.NetworkManagerSystemSettings.service.in +dbusactivation_DATA = $(dbusactivation_in_files:.service.in=.service) +$(dbusactivation_DATA): $(dbusactivation_in_files) Makefile + $(edit) $< >$@ + +edit = sed \ + -e 's|@sbindir[ ]|$(sbindir)|g' \ + -e 's|@sysconfdir[ ]|$(sysconfdir)|g' \ + -e 's|@localstatedir[ ]|$(localstatedir)|g' \ + -e 's|@libexecdir[ ]|$(libexecdir)|g' + EXTRA_DIST = \ $(dbusservice_DATA) \ - $(dbusactivation_DATA) + $(dbusactivation_in_files) CLEANFILES = \ - $(BUILT_SOURCES) + $(BUILT_SOURCES) \ + $(dbusactivation_DATA) Index: system-settings/src/org.freedesktop.NetworkManagerSystemSettings.service.in =================================================================== --- system-settings/src/org.freedesktop.NetworkManagerSystemSettings.service.in (Revision 3616) +++ system-settings/src/org.freedesktop.NetworkManagerSystemSettings.service.in (Arbeitskopie) @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.freedesktop.NetworkManagerSystemSettings -Exec=/usr/sbin/nm-system-settings --config /etc/nm-system-settings.conf +Exec= sbindir@/nm-system-settings --config /etc/nm-system-settings.conf User=root Index: callouts/org.freedesktop.nm_dispatcher.service.in =================================================================== --- callouts/org.freedesktop.nm_dispatcher.service.in (Revision 3616) +++ callouts/org.freedesktop.nm_dispatcher.service.in (Arbeitskopie) @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.freedesktop.nm_dispatcher -Exec=/usr/libexec/nm-dispatcher.action +Exec= libexecdir@/nm-dispatcher.action User=root Index: callouts/Makefile.am =================================================================== --- callouts/Makefile.am (Revision 3616) +++ callouts/Makefile.am (Arbeitskopie) @@ -46,15 +46,25 @@ nm-dispatcher-glue.h: nm-dispatcher.xml dbus-binding-tool --prefix=nm_dispatcher --mode=glib-server --output=nm-dispatcher-glue.h $(top_srcdir)/callouts/nm-dispatcher.xml -dbusactivationdir = $(prefix)/share/dbus-1/system-services -dbusactivation_DATA = org.freedesktop.nm_dispatcher.service +dbusactivationdir = $(datadir)/dbus-1/system-services +dbusactivation_in_files = org.freedesktop.nm_dispatcher.service.in +dbusactivation_DATA = $(dbusactivation_in_files:.service.in=.service) +$(dbusactivation_DATA): $(dbusactivation_in_files) Makefile + $(edit) $< >$@ + +edit = sed \ + -e 's|@sbindir[ ]|$(sbindir)|g' \ + -e 's|@sysconfdir[ ]|$(sysconfdir)|g' \ + -e 's|@localstatedir[ ]|$(localstatedir)|g' \ + -e 's|@libexecdir[ ]|$(libexecdir)|g' + BUILT_SOURCES = nm-dispatcher-glue.h -CLEANFILES = $(BUILT_SOURCES) +CLEANFILES = $(BUILT_SOURCES) $(dbusactivation_DATA) EXTRA_DIST = \ $(dbusservice_DATA) \ - $(dbusactivation_DATA) \ + $(dbusactivation_in_files) \ nm-dispatcher.xml
Attachment:
signature.asc
Description: OpenPGP digital signature