[yast-commit] r55753 - in /branches/tmp/lslezak/core: ./ dbus/namespace_service/
Author: lslezak Date: Wed Feb 25 17:34:27 2009 New Revision: 55753 URL: http://svn.opensuse.org/viewcvs/yast?rev=55753&view=rev Log: - better string constant expansion Added: branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.service.in.in Removed: branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.service.in Modified: branches/tmp/lslezak/core/configure.in.in branches/tmp/lslezak/core/dbus/namespace_service/Makefile.am branches/tmp/lslezak/core/dbus/namespace_service/Yast_dbus_names.h.in branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.conf.in Modified: branches/tmp/lslezak/core/configure.in.in URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/configure.in.in?rev=55753&r1=55752&r2=55753&view=diff ============================================================================== --- branches/tmp/lslezak/core/configure.in.in (original) +++ branches/tmp/lslezak/core/configure.in.in Wed Feb 25 17:34:27 2009 @@ -136,10 +136,22 @@ ACCESS_MODE=deny fi +YAST_DBUS_SERVICE=org.opensuse.YaST.modules +AC_SUBST(YAST_DBUS_SERVICE) +YAST_DBUS_RAW_INTERFACE=org.opensuse.YaST.Values +AC_SUBST(YAST_DBUS_RAW_INTERFACE) +YAST_DBUS_YCP_INTERFACE=org.opensuse.YaST.YCPValues +AC_SUBST(YAST_DBUS_YCP_INTERFACE) +YAST_DBUS_MGR_INTERFACE=org.opensuse.YaST.modules.ModuleManager +AC_SUBST(YAST_DBUS_MGR_INTERFACE) + +YAST_POLKIT_PREFIX_MANAGER=org.opensuse.yast.module-manager +AC_SUBST(YAST_POLKIT_PREFIX_MANAGER) YAST_SCR_SERVICE=org.opensuse.yast.SCR YAST_SCR_INTERFACE=org.opensuse.yast.SCR YAST_SCR_SERVICE_METHODS=$YAST_SCR_SERVICE.Methods + # @ybindir@ expands to ${prefix}/lib/..., force full expansion here YAST_SCR_SERVICE_DIR=$ybindir AC_SUBST(YAST_SCR_SERVICE) @@ -153,14 +165,14 @@ AC_SUBST(HAVE_POLKIT) AM_CONDITIONAL([HAVE_POLKIT], [test "x$HAVE_POLKIT" = x1]) -YAST_DBUS_SERVICE=org.opensuse.yast.modules -AC_SUBST(YAST_DBUS_SERVICE) - ## and generate the output AC_CONFIG_FILES([ scr/doc/SCR.html scr/doc/intro_to_scr.html dbus/namespace_service/Yast_dbus_names.h + dbus/namespace_service/org.opensuse.yast.modules.policy + dbus/namespace_service/org.opensuse.yast.modules.conf + dbus/namespace_service/org.opensuse.yast.modules.service.in dbus/SCR_service/org.opensuse.yast.SCR.conf dbus/SCR_service/org.opensuse.yast.SCR.service.in dbus/SCR_service/scr_names.h Modified: branches/tmp/lslezak/core/dbus/namespace_service/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/dbus/namespace_service/Makefile.am?rev=55753&r1=55752&r2=55753&view=diff ============================================================================== --- branches/tmp/lslezak/core/dbus/namespace_service/Makefile.am (original) +++ branches/tmp/lslezak/core/dbus/namespace_service/Makefile.am Wed Feb 25 17:34:27 2009 @@ -2,7 +2,7 @@ # Makefile.am for dbus/service # -EXTRA_DIST=org.opensuse.yast.modules.service.in org.opensuse.yast.modules.conf.in org.opensuse.yast.modules.policy \ +EXTRA_DIST=org.opensuse.yast.modules.service.in.in org.opensuse.yast.modules.conf.in org.opensuse.yast.modules.policy.in \ Yast_dbus_names.h.in AM_CXXFLAGS = -DY2LOG=\"DBus-service\" -DSUSEVERSION=\"${SUSEVERSION}\" @@ -31,29 +31,15 @@ # FIXME?? dbus pkgconfig provides only 'session_bus_services_dir' dbus_servicesdir = `pkg-config --print-errors --variable prefix dbus-1`/share/dbus-1/system-services +# Can't use autoconf only because @ybindir@ expands to '${prefix}/...'. +# So must use %YBINDIR% and expand it via sed during make +# Ouch, ouch, ouch dbus_services_in_files = org.opensuse.yast.modules.service.in - dbus_services_DATA = $(dbus_services_in_files:.service.in=.service) - $(dbus_services_DATA): $(dbus_services_in_files) - sed -e "s|\@YBINDIR\@|$(ybindir)|" $< > $@ + sed -e "s|\%YBINDIR\%|$(ybindir)|" $< > $@ # service config - dbus_confdir = `pkg-config --print-errors --variable sysconfdir dbus-1`/dbus-1/system.d - -dbus_conf_in_files = org.opensuse.yast.modules.conf.in - -dbus_conf_DATA = $(dbus_conf_in_files:.conf.in=.conf) - -# set access mode according to the PolicyKit status -# if policykit is disabled only root can access the service -if HAVE_POLKIT -dbus_access_mode=allow -else -dbus_access_mode=deny -endif - -$(dbus_conf_DATA): $(dbus_conf_in_files) - sed -e "s|\@ACCESS_MODE\@|$(dbus_access_mode)|" $< > $@ +dbus_conf_DATA = org.opensuse.yast.modules.conf Modified: branches/tmp/lslezak/core/dbus/namespace_service/Yast_dbus_names.h.in URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/dbus/namespace_service/Yast_dbus_names.h.in?rev=55753&r1=55752&r2=55753&view=diff ============================================================================== --- branches/tmp/lslezak/core/dbus/namespace_service/Yast_dbus_names.h.in (original) +++ branches/tmp/lslezak/core/dbus/namespace_service/Yast_dbus_names.h.in Wed Feb 25 17:34:27 2009 @@ -10,16 +10,16 @@ #define YAST_DBUS_SERVICE_NAME "@YAST_DBUS_SERVICE@" // interface name for marshalled YCPValues - using (bsv) DBus structure -#define YAST_DBUS_YCP_INTERFACE "org.opensuse.yast.modules.YCPValues" +#define YAST_DBUS_YCP_INTERFACE "@YAST_DBUS_YCP_INTERFACE@" // interface name for raw (direct) DBus values -#define YAST_DBUS_RAW_INTERFACE "org.opensuse.yast.modules.Values" +#define YAST_DBUS_RAW_INTERFACE "@YAST_DBUS_RAW_INTERFACE@" // interface name for management functions (Import, Lock...) -#define YAST_DBUS_MGR_INTERFACE "org.opensuse.yast.modules.ModuleManager" +#define YAST_DBUS_MGR_INTERFACE "@YAST_DBUS_MGR_INTERFACE@" // prefix for PolicyKit action IDs - namespace calls #define YAST_POLKIT_PREFIX_MODULES "org.opensuse.yast.modules" // prefix for PolicyKit action IDs - manager calls -#define YAST_POLKIT_PREFIX_MANAGER "org.opensuse.yast.module_manager" +#define YAST_POLKIT_PREFIX_MANAGER "@YAST_POLKIT_PREFIX_MANAGER@" #define YAST_DBUS_MANAGER_IMPORT_METHOD "Import" Modified: branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.conf.in URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.conf.in?rev=55753&r1=55752&r2=55753&view=diff ============================================================================== --- branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.conf.in (original) +++ branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.conf.in Wed Feb 25 17:34:27 2009 @@ -1,11 +1,15 @@ <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig> <policy user="root"> - <allow own="org.opensuse.yast.modules"/> - <allow send_interface="org.opensuse.yast.modules.Methods"/> + <allow own="@YAST_DBUS_SERVICE@"/> + <allow send_interface="@YAST_DBUS_MGR_INTERFACE@"/> + <allow send_interface="@YAST_DBUS_RAW_INTERFACE@"/> + <allow send_interface="@YAST_DBUS_YCP_INTERFACE@"/> </policy> <policy context="default"> - <deny own="org.opensuse.yast.modules"/> - <@ACCESS_MODE@ send_interface="org.opensuse.yast.modules.Methods"/> + <deny own="@YAST_DBUS_SERVICE@"/> + <@ACCESS_MODE@ send_interface="@YAST_DBUS_MGR_INTERFACE@"/> + <@ACCESS_MODE@ send_interface="@YAST_DBUS_RAW_INTERFACE@"/> + <@ACCESS_MODE@ send_interface="@YAST_DBUS_YCP_INTERFACE@"/> </policy> </busconfig> Added: branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.service.in.in URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.service.in.in?rev=55753&view=auto ============================================================================== --- branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.service.in.in (added) +++ branches/tmp/lslezak/core/dbus/namespace_service/org.opensuse.yast.modules.service.in.in Wed Feb 25 17:34:27 2009 @@ -0,0 +1,5 @@ +# DBus service activation config +[D-BUS Service] +Name=@YAST_DBUS_SERVICE@ +Exec=%YBINDIR%/Yast_dbus_server +User=root -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org