[14:55] Keybuk: how's the code? [16:04] sadmac2: finished the refactoring [16:04] just got to finish d-bus stuff [16:04] very nice [17:06] Keybuk: I'm still unhappy with the idea of nfs-server having content in portmaps' job file. [17:06] I just cann't imagine how packagers will deal with it. [17:06] Make my fears go away! [17:07] Are they just additions or larger changes? [17:07] well, it does anyway, since it needs to be in the portmap maps file [17:08] portmap is _really_ the only example of this kind of job I can think of [17:09] It fails with more than one thing depending on portmap, doesn't it? [17:09] Have update-portmap-job within the portmap package, which combines files from .../portmap/job.d/* to /etc/init/jobs.d/portmap? [17:09] You know. I guess it doesn't really matter. Mine as well just run portmap when portmap is installed, period. [17:10] And just rely on the package manager to enable/disable it. [17:10] Or have upstart read /etc/init.d/jobs.d/portmap.d/* as a single job? :-) [17:11] wasabi: why would it fail? [17:12] there _is_ a much more entertaining way to do it [17:12] /etc/init/jobs.d/nfs-server: [17:12] env REQUIRE_PORTMAP=1 [17:12] export REQUIRE_PORTMAP [17:12] /etc/init/jobs.d/portmap: [17:12] start on starting REQUIRE_PORTMAP=1 [17:13] you don't _have_ to match on the job name ;) [17:13] oh that's crazy [17:13] dude. that's slick. [17:13] though how do you make it stop? :0 [17:13] if there's really a large number of jobs that should behave like this, we can codify that [17:13] ie. have a "depends portmap" type syntax [17:13] which adds to the job event environment [17:13] oh you could also have portmap's job file keep a ref count. [17:13] or something [17:13] yeah [17:14] that'd work with states too [17:14] state portmap-dependency [17:14] from starting REQUIRE_PORTMAP=1 [17:14] start could increment the count, and run the daemon. pre-stop could decrement it and only allow stopping when it hits 0 [17:14] until stopped $JOB [17:14] end state [17:14] then portmap would have [17:14] while portmap-dependency [17:15] (theoretical) [17:15] that is intriguing. i have yet to read about states. [17:15] I've yet to invent them properly [17:15] you and I did the ground work back in SF [17:15] I remember that much [17:15] over very hot thai [17:16] The next morning was not pleasant. [17:16] when I realised that upstart's design allows it to do dependency-based init with _no_ special contortions, I knew we'd reached elegance [17:16] events can be used to emulate them just fine [17:17] design nirvana. === Amaranth_ is now known as Amaranth [17:31] A bit like doing sequential code with side-effects using monads in a functional programming language. Good, clean architecture that doesn't restrict your choices when you need to have something the worse architecture does well. :-) [19:09] Keybuk: get a chance to look at that email I sent? [19:14] not yet [19:14] this week is performance review week [19:14] and UDS planning [19:14] Ahh [19:15] and I wanted to get 0.5.0 out before worrying too much about what comes after ;) [19:15] I'm stuck in a hotel in london next week, so bar going out skating, I'll have plenty of time to code that and reply to mails :) [19:17] sweet [19:17] what's still loose in the dbus code? [19:19] just the writing of the functions now [19:19] it registers the objects on the bus [19:19] and maintains a connection to the bus, dropping it and reopening when necessary [19:19] so just need to write the actual methods ;) [19:30] heh. cool [19:33] So Upstart will be the first program ever not to crap itself when dbus goes for a short walk? :-) [19:37] You writing the dbus integrating in pid 1? [19:38] wasabi: yeah [19:38] scary. [19:38] linking to libdbus? [19:39] Scary? [19:40] wasabi: yup [19:40] That sounds frightening for some reason. [19:41] Frightening? [19:41] Uh huh. Just ot have that much complexity in pid 1. [19:44] Well, for it to talk with other processes, there must be *some* implementation of *some* protocol anyway in pid 1. :-) [19:47] wasabi: libdbus is nice enough [19:48] having our own ipc implementation was scarier, since it's not as audited [19:52] It might scare people who don't want dbus on their systems (server installs) [19:52] Do you mean dbus-the-protocol or dbus-the-daemon? [19:53] I have no practical claims. Only political claims. [19:56] wasabi: those people won't get a choice? [19:59] Well, is libdbus.so required? [20:03] yes [20:12] libdbus.so? surely it would be safer to statically link /sbin/init to libdbus.a rather than use the shared library? [20:18] why safer? [20:18] shared libraries are safer since they can be updated for security updates [20:35] Keybuk: libdbus upgrade, .so version changes (e.g. from .so.3 to .so.4), upstart package isn't upgraded, reboot, *won't boot because of missing lib* [20:36] that's what we have package managers for [20:36] upstart would depend on libdbus3 and so libdbus.so.3 would be still installed [20:36] while libdbus4 containing libdbus.so.4 would be used by the other apps [20:36] Yeah, soname bumps never break anything. [20:36] but then again I'm speaking from my experience in a smaller distro where maintainers didn't get dependencies right and sometimes forgot to rebuild packages :) [20:37] happily dbus isn't due for a soname change [20:37] It's not their job to get the dependencies right, the packaging tools make the shlibdeps. [20:37] and if it were, it's maintainers have very very carefully made sure it would not be a problem [20:37] even the include files are parallel installable [20:38] ion_: debian's packaging tools may do that, pacman's packaging tools don't [20:39] alexextreme: Just copy the functionality from $other_distro. :-) [20:39] hah [21:01] that was interesting [21:11] alexextreme: Well, nothing prevents you from linking statically, it's just safer the other way. :-) [21:14] the main worry of linking external libraries to process runnning pid 1, is that pid 1 should never ever crash [21:14] so one needs to be sure the libraries linked to are rock solid [21:14] and aren't built on assumptations like "it's ok to crash if malloc() fails" [21:21] suihkulokki: see also, Why Keybuk Does Not Like GLib :) [21:22] the only doofus assumption in libdbus was that it could call exit() if the connection to the bus was dropped [21:22] and that was at least an option [21:22] (but the code that set the option for bus connection was in the wrong place, which I had to fix) [22:16] I think limiting scope of exposure is important. If every libdbus version upgrade is vetted by a team of trained professionals before being deployed, so as not to break upstart, then it's good. [22:16] But I think in reality that does not happen, and it could break. [22:16] Hence you'd limit scope in order to reduce the maintenance burden on the maintainer. upstart is super critical. [22:26] not so much [22:26] if every Upstart upgrade was vetted by the team of trained professionals [22:26] who carefully read through my IPC codfe [22:27] then I might feel happy ;) [22:27] since they don't, using a shared IPC protocol that has had more eyes over it is better [22:28] ...or just switch to a language that simply won't have any buffer overflows or stuff like that. :-) [22:28] then I'd have to put my faith into that language interpreter [22:28] and they really don't tend to be great ;) [22:29] :-) [22:31] D-Bus over homebrew IPC is compelling for several reasons [22:32] 1) security - D-Bus is used more widely and has had more people look at the code, including NSA verification, it's less likely to have extant security flaws than the homebrew [22:32] 2) response to flaws when they are found - D-Bus has active maintainership, when flaws are found the response will be rapid and a matter of replacing the library [22:33] 3) maintainability - homebrew IPC is a bitch to maintain, and touches lots of areas of UNIX that are unpleasant ;) [22:33] much better to let someone else worry about those issues [22:33] 4) compatibility - there are already bindings for d-bus in most languages, and it's well known [22:33] means more people will write software that talks to upstart [22:33] (I actually didn't mean an interpreted language, but the same of course applies to higher-level language compilers.) [22:34] 5) authentication - D-Bus already solved the authentication issues for individual connections *and* for messages [22:34] ion_: are there higher level compilers that remove the risk of buffer overflows? [22:34] As i said, the same (what you mentioned) applies to them. :-) [22:34] well, that and they don't exist? :p [22:35] I'm not writing Upstart in Pascal [22:35] I've been trying to study Haskell recently with great interest, incidentally. [22:36] The more bits and pieces about it i get into my blob of grey matter, the more awesome it seems. :-) [22:36] Still, i have no idea whether the compiler (well, the glasgow compiler in this case, probably) contains bugs that could lead to security holes. [22:36] hmm, Haskell [22:37] that's basically writing in spreadsheets isn't it? :) [22:37] Well, something like that. :-P [22:39] I've yet to see someone implement something useful in Haskell that doesn't have very very scary end-of-the-universe problems [22:40] end-of-the-universe? :-) [22:41] as in, there's no point the program saying "Please wait" [22:41] it won't be done before you are [22:42] Sorry, i don't see what you mean. [22:43] that it's easy to write programs that have very difficult upper bounds [22:44] and can end up stuck resolving their next course of action [22:44] they do complete [22:44] but it can, in extreme cases, be calculated to require billions of years [22:44] Oh, ok [23:09] you could use ada :P