[yast-devel] Yast as a DBus service
Hi all, I'd like to announce the Yast DBus service which is now available in SVN Trunk and in FACTORY. You just need to install yast2-core-2.18.7 package [*]. The new service can export every Yast name space, even non YCP modules like Users (Perl) or Pkg:: (C++). This service should be used as the base component for our new Yast Web interface. For more information look at http://en.opensuse.org/YaST/DBus_Service/Description I'm looking forward to your feed back. [*] Actually the service was initially submitted in yast2-core-2.18.6, but I did a very small API change in 2.18.7. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Hi Ladislav, thank you for the great implementation and the nice docu. It looks very good ! I have two additional questions: "Each exported function (actually its action ID) must be defined in a PolicyKit configuration file. See PolicyKit documentation http://hal.freedesktop.org/docs/PolicyKit/polkit-conf.html#conf-declaring-ac... . *Defining a PolicyKit action ID means that the function is officially supported over the DBus service.* It is a good idea to validate the PolicyKit config during /make check/, just add /check-local/ target to /Makefile.am/: " - Would it be possible to generate the PolicyKit configuration files automatically while running make ? So the package maintainer would not have to take care. - The main problem while using SCR:execute in combination with the YaST command line interface is the speed. Have you already tested how long it takes to e.g. add a user or get a list of local users ? Greetings Stefan Ladislav Slezak schrieb:
Hi all,
I'd like to announce the Yast DBus service which is now available in SVN Trunk and in FACTORY. You just need to install yast2-core-2.18.7 package [*].
The new service can export every Yast name space, even non YCP modules like Users (Perl) or Pkg:: (C++).
This service should be used as the base component for our new Yast Web interface.
For more information look at http://en.opensuse.org/YaST/DBus_Service/Description
I'm looking forward to your feed back.
[*] Actually the service was initially submitted in yast2-core-2.18.6, but I did a very small API change in 2.18.7.
--
Best Regards
Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/
-- ******************************************************************************* Stefan Schubert SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany e-mail: schubi@suse.de ------------------------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Stefan Schubert wrote:
- Would it be possible to generate the PolicyKit configuration files automatically while running make ? So the package maintainer would not have to take care.
Yes, that could be possible. But I would rather prefer some kind of template or config file provided by developers which would be converted to a PolicyKit config file. We need some way to tell users of the service which Yast modules and methods they can use via DBus. Simply, what we support. I think that defining a PolicyKit config should mean that all functions defined there are supposed to be used via DBus. Now you can use any Yast module via DBus, the DBus service can export all public functions. The problem is that the modules were not designed for multiple parallel access, there might be race conditions between clients due to state full API or the API might not be suitable for DBus access (too big/complicated data structures) or the module is internal and should not be used from outside at all...
- The main problem while using SCR:execute in combination with the YaST command line interface is the speed. Have you already tested how long it takes to e.g. add a user or get a list of local users ?
No, not yet. But Klaus wrote a testing ruby script - test_SCR_dbus_server.rb in core/dbus/SCR_service. We could reuse it for benchmarking. The main problem is that the Yast modules were not designed for DBus/Web usage. E.g. getting complete user data might take very long time for several thousands users. In such case we should redesign the API - return just subset of the users. The Web UI would just read first 100 users. Next 100 users would be read after pressing [2] or [Next]. Or there should be [Search] button... This is another reason for explicitly marking functions as DBus enabled. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Ladislav Slezak wrote:
Hi all,
I'd like to announce the Yast DBus service which is now available in SVN Trunk and in FACTORY. You just need to install yast2-core-2.18.7 package [*].
The new service can export every Yast name space, even non YCP modules like Users (Perl) or Pkg:: (C++).
This service should be used as the base component for our new Yast Web interface.
For more information look at http://en.opensuse.org/YaST/DBus_Service/Description
I'm looking forward to your feed back.
Ladislav, can you show us a more concrete example? For example, I want to enable the firewall, and open port 8080, using dbus. 1) what would be the policykit policies for this 2) what would I need to call via dbus? -- Duncan Mac-Vicar P. - Engineering Manager, YaST SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Duncan Mac-Vicar Prett schrieb:
Ladislav Slezak wrote:
Hi all,
I'd like to announce the Yast DBus service which is now available in SVN Trunk and in FACTORY. You just need to install yast2-core-2.18.7 package [*].
The new service can export every Yast name space, even non YCP modules like Users (Perl) or Pkg:: (C++).
This service should be used as the base component for our new Yast Web interface.
For more information look at http://en.opensuse.org/YaST/DBus_Service/Description
I'm looking forward to your feed back.
Ladislav, can you show us a more concrete example?
For example, I want to enable the firewall, and open port 8080, using dbus.
1) what would be the policykit policies for this 2) what would I need to call via dbus?
One nice example is here: core/dbus/namespace_service/doc/YaPI_Samba.examples -- ******************************************************************************* Stefan Schubert SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany e-mail: schubi@suse.de ------------------------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Stefan Schubert wrote:
One nice example is here:
core/dbus/namespace_service/doc/YaPI_Samba.examples
There's even a desktop integration example, see core/dbus/namespace_service/doc/dbus_samba_export.README The example adds a new context menu ("Export directory as a Samba share") to directories in Dolphin/Konqueror. It doesn't work fully, e.g. the samba service is not reloaded, but /etc/samba/smb.conf is updated properly. This is just a proof of concept showing that the Yast functionality can be simply used on desktop. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Ladislav Slezak <lslezak@suse.cz> [Apr 24. 2009 10:33]:
Hi all,
I'd like to announce the Yast DBus service which is now available in SVN Trunk and in FACTORY. You just need to install yast2-core-2.18.7 package [*].
Great, thanks ! Have you thought about splitting off a separate yast2-dbus-service package ? This would allow to maintain the D-Bus interface separate from yast2-core. Adding the service well be just another package (ideally, without modifying the yast2-core package). Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Klaus Kaempf wrote:
Have you thought about splitting off a separate yast2-dbus-service package ? This would allow to maintain the D-Bus interface separate from yast2-core. Adding the service well be just another package (ideally, without modifying the yast2-core package).
Yes, actually it has been reported as bnc#431208 ("yast2-core should not require PolicyKit"), the solution is to split off the DBus part into a separate package. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (4)
-
Duncan Mac-Vicar Prett
-
Klaus Kaempf
-
Ladislav Slezak
-
Stefan Schubert