/srv/irclogs.ubuntu.com/2014/06/24/#upstart.txt

afourniermorning08:22
afournieri am working with upstart 1.6.1 and packaging it with oe. I would like to play with the dbus interface but the com.ubuntu.Upstart.*.xml are not installed (in /usr/share/dbus-1/) is it possible to do so with the provided Makefile, or i have to install it manualy ?08:27
xnoxafournier: upstart is not dbus activatable service.08:28
afournieri don't really get what you mean, but what i want to do it use dbus to start, stop and monitor daemons using the dbus interface08:29
afournierhttp://upstart.ubuntu.com/wiki/DBusInterface08:29
xnoxafournier: USR1 signal is used by upstart to connect to system dbus.08:29
xnoxafournier: after that upstart is available on the system dbus.08:30
xnox(and thus the dbus interface)08:30
afournieri read about that some days ago, the thing is dbus needs a patch for this and i could not apply it08:30
afournierbut still i don't want to do things like "start on <dbus event>"08:31
afournieri just want to talk to upstart thru its dbus interface08:31
afournierand rpc com.ubuntu.Upstart0_6.GetAllJobs and EmitEvent and stuff like that08:31
xnoxafournier: (a) start system dbus (b) make post-start of dbus call "exec kill -USR1 1" (c) upstart will be available on the system bus (d) open e.g. d-feet and read the job statuses via dbus api08:32
xnoxafournier: initctl tool uses dbus API to upstart only, and can do so via system/session DBUS and private sockets.08:32
afournieri think it's possible as netstat tells me there are two active dbus connections on @/com/ubuntu/upstart08:32
afournierok08:33
xnoxafournier: that's private socket, that uses the same dbus IPC, the socket is always available. If upstart is not on the system dbus, you need to send USR1 signal to upstart.08:33
afournierok08:33
afournierthen i need to patch dbus08:33
afournierno ?08:33
xnoxafournier: no.08:34
xnoxafournier: why?!08:34
xnoxafournier: upstart connects to system dbus and publishes an object.... no more no less08:34
afournierdbus only has "--systemd-activation"08:34
xnoxafournier: DBusInterface is not about dbus activation styles, above will give you dbus api to start/stop/restart upstart jobs.08:35
xnoxafournier: it will not give you ability to control dbus activated daemons through upstart's $ initctl stop, command for example.08:35
afourniergood, then my init/dbus.conf has "post-start exec kill -USR1 1"08:35
afournierso let's go back to the first question :)08:35
xnoxthat's all you need.08:35
afournierupstart does not install it's dbus schemas by default, i don't want to use d-feet or something like this. I'd like to code my own client using dbusxx-xml2cpp and some c++08:37
afournieri could make an upstart request to introspect the upstart dbus interface, but it's not fair for "offline" compilation08:38
afourniers/upstart request/dbus call/08:38
afournierdo you get my point ? :p08:38
xnoxafournier: one is expected to copy the partial schema of the things you will use only into your source code. Use whichever code generator appropriate for your language.08:38
xnoxafournier: we do not indeed install developer headers at all, and well didn't in 1.608:39
xnoxafournier: in recent upstart, we have libupstart which is compiled client side dbus library.08:39
xnoxafournier: look at the code of the upstart bridges.08:39
afournierwouldn't be cleaner to introspect directly from system directories like /usr/share/dbus-1/.../com.ubuntu.Upstart.xml ?08:39
afournieri mean generate code08:39
xnoxafournier: it's dbus client apis, you don't need them published.08:39
afournieri must be completly wrong then as i am new to dbus, but i thought each installed program would publish it's schemas so you can generate your dbus bindings easily08:41
xnoxafournier: it looks like there is /usr/share/dbus-1/interfaces where things drop their interface files, we don't at the moment. I can add that for next release, but that will not change history.08:41
afournierno it won't, it just makes things cleaner i think :)08:41
xnoxafournier: whilst it wasn't planned at the beginning upstart dbus has never changed, and is stable.08:41
afournierso when you compile somethign against your distro, you know your dbus bindings are up to date08:41
afournieri see08:42
xnoxafournier: if you complile complete bindings into your app / service you will get a lot of generated code into your app.08:42
afournierthat's true08:43
afournierbut upstart dbusinterface is well done and i think all methods could be usefull :)08:43
xnoxafournier: hence e.g. mountall has it's own private ./dbus/com.ubuntu.Upstart.xml with only 6 methods and 2 properties of the interface.08:44
afournierinteresting08:44
xnoxlibupstart1.so.1.0.0 generated into C with nih-dbus-tool is 156k, which is a lot if you only need a couple methods.08:44
xnox(dbus methods / properties)08:45
afourniereven so code generator could use filters based on methods names or something like this to filter out useless methods. this would avoid useless copy of dbus interfaces. I am no dbus programmer :) so i must be completly wrong.08:46
afournieri just don't like copy paste08:47
afournier:)08:47
afournierbut as you said no big deal08:47
afournierby the way the upstart dbus interface is splitted in 3 files, so we can go under 156k if needed :)08:48
afournierthat a good trade-off08:49
=== JanC_ is now known as JanC

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!