/srv/irclogs.ubuntu.com/2008/05/11/#upstart.txt

KeybukI can't help but notice that little discussion is actually happening on #unix-init00:15
Keybukor the attached mailing list00:15
ion_Heh, yeah00:19
KeybukI still want to know what the big security panic is00:28
ion_Security panic?00:33
Keybukyeah, still embargo'd01:04
KeybukI have no idea what it is01:04
Keybukjust that I was told not to ask lest by weekend be ruined by the panic01:04
ion_Wait, what? I don’t understand anything you said. :-) I must be missing something obvious here.01:27
ion_Security, as in the hardy-security repo perhaps? Embargo? I haven’t been reading mailing lists for a while. :-)01:28
rglhi08:37
rglhow do we disable an event from starting? 08:37
rglI mean, I created /etc/event.d/foo but how do I disable it?  doing a stop foo stops the service, but the next time the system boots, its started again.08:38
Keybukwhen testing arrays of int, it's very hard not to use the numbers 4, 8, 15, 16, 23 & 4212:02
Keybuktoday's task:12:43
Keybukdesign an API for D-Bus properties12:43
Keybukcan't decide which would be best12:43
ion_Hehe (the numbers)13:24
Keybukfor the property API, which sounds better13:37
Keybuk1) for each property, you have to define a _get and _set function13:37
Keybuk2) for each property, you have to define a single function which takes two arguments (set from first, store old value in second)13:38
Keybuk3) you have to define a single _get and _set function, which gets passed the property to set/get and a union of the possible types13:38
ion_What are these properties?13:47
Keybukjob name, description, goal, state, etc.13:48
ion_I don’t like 2) a lot. 1) would make a pretty API, but because of C’s lack of dynamicity, you wouldn’t be able to e.g. iterate over an array of properties and _get each one of them (for a GUI for instance).13:51
Keybuksure you would13:52
ion_So i guess i’d choose 3). Perhaps i’m missing some considerations.13:52
Keybukremember that these are accessor functions13:52
Keybukfor job in manager.GetAllJobs():13:52
Keybuk    for name, value in job.GetAllProperties():13:53
ion_Oh, sorry, i thought this being a C API, not a D-Bus API.13:53
Keybuk        print name, value13:53
KeybukC API you just do obj->value ;)13:53
ion_Ah, ok.13:53
Keybukthis is the functions to convert the struct into d-bus properties that the GUIs can use13:53
Keybukso there'd be a goal property, a state property, a name property, etc.13:54
Keybukhaving13:54
Keybukjob_class_get_name (...)13:54
Keybukjob_get_goal (...)13:54
Keybukjob_get_state (...)13:54
Keybukis a lot of properties13:54
Keybukadmittedly, almost all of them are going to be get only given the design13:55
Keybukwith class one settable to the object that made them I guess13:56
ion_I’m not sure whether to pick 1) or 3).13:57
Keybukthe main problem with 3 is that the types are so varied I guess13:57
Keybukso you'd need a "JobClassProperty" union13:57
Keybukwhich is a bit crappy13:57
Keybukat least 1) you just write lots of very very simple functions13:57
ion_Indeed13:58
Keybukint13:58
Keybukjob_get_goal (Job *job, NihDBusMessage *message)13:58
Keybuk{13:58
Keybuk err.13:58
Keybukint13:58
Keybukjob_get_goal (Job *job, NihDBusMessage *message, const char **goal)13:58
Keybuk{13:58
Keybuk    *goal = job_goal_name (job);13:58
Keybuk    return 0;13:58
Keybuk}13:58
ion_If the amount of functions with 1) isn’t a problem, i’d pick it.13:58
KeybukI think that the thought that they'll be get only for the majority has made me happier about that13:59
Keybuknot sure how to do job setup13:59
Keybukyou'd do a d-bus call to define a source, which would be attached to your d-bus unique name (so if you disconnect, your jobs are all deleted)14:00
Keybukyou'd then need to define files and attach jobs to them14:00
Keybukand set up the jobs before committing them14:00
Keybukafter committing, you wouldn't be able to change the job14:00
Keybukyou'd create a new one and delete the old14:00
Keybukor the changes could be always permitted, and always result in the old being automatically deleted14:00
Keybukion_: security embargos are no fun :-(20:07
Keybukeven I'm not allowed to know what the big security panic is20:07
Keybukall I'm told is that it's very scary, and we'll all know on Tuesday20:07
sadmacKeybuk: yo22:18
sadmacKeybuk: RH is still sorting through the assignment agreement, but I could get going now and just wait to commit until they straighten it out22:19
Keybuksadmac: tbh, most of the help I need right now is in testing22:40
Keybukam making fast progress now22:40
sadmacKeybuk: good to hear :)22:45
Keybukif you can compile it with -DDEBUG and create test jobs in /etc/init/jobs.d (you get a "debug" event instead of a startup one)22:46
Keybukand see if you can crash it then22:46
sadmacKeybuk: I have only my laptop now (left my school housing, so my boxen are packed away) so I'll probably have to wait until I get to westford to requesition a good test box22:47
sadmacThough I don't mind crashing the lappy a bit.22:47
Keybukheh, don't install22:48
Keybukif compiled with DEBUG you can just run init as a normal user out of the src directory22:53
sadmacKeybuk: and when doing that it will look in /etc/init/jobs.d?22:55
Keybukyeah22:56
sadmacyeehaw22:56
sadmacin 2 days I'll probably be running 0.3.9 by default22:57
sadmacassuming I can get upgraded right away22:57
sadmacKeybuk: getting these:23:10
sadmacconfigure.ac:31: required file `intl/Makefile.in' not found23:10
sadmacconfigure.ac:14: required file `./ABOUT-NLS' not found23:10
sadmacconfigure.ac:18: required file `./ltmain.sh' not found23:10
sadmacMakefile.am:3: required directory ./intl does not exist23:10
sadmactrying to build libnih23:11
Keybukdid you run autoreconf -i ?23:11
sadmacno -i23:11
Keybukthat might help23:11
sadmacheh23:12
sadmacKeybuk: does init fork or should I launch it in the background?23:16
Keybukjust leave it in the foreground so you can watch the output?23:17
sadmacKeybuk: ahh23:17
* sadmac Ctrl+a c23:17
sadmacKeybuk: it seems initctl doesn't build by default in trunk23:59
Keybukno, it's not done yet23:59
sadmacKeybuk: ahh. that'd do it23:59

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