<br><br><div><span class="gmail_quote">On 10/19/06, <b class="gmail_sendername"><a href="mailto:dbus-request@lists.freedesktop.org">dbus-request@lists.freedesktop.org</a></b> <<a href="mailto:dbus-request@lists.freedesktop.org">
dbus-request@lists.freedesktop.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send dbus mailing list submissions to
<br> <a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br> <a href="http://lists.freedesktop.org/mailman/listinfo/dbus">
http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>or, via email, send a message with subject or body 'help' to<br> <a href="mailto:dbus-request@lists.freedesktop.org">dbus-request@lists.freedesktop.org
</a><br><br>You can reach the person managing the list at<br> <a href="mailto:dbus-owner@lists.freedesktop.org">dbus-owner@lists.freedesktop.org</a><br><br>When replying, please edit your Subject line so it is more specific
<br>than "Re: Contents of dbus digest..."<br><br><br>Today's Topics:<br><br> 1. Re: PATCH: configure error when cross compiling dbus core<br> 0.94 (John (J5) Palmieri)<br> 2. Re: [rfc] move activation to a helper process (Havoc Pennington)
<br> 3. Re: [rfc] move activation to a helper process (John (J5) Palmieri)<br> 4. [PATCH] run uuidgen --ensure in the init script<br> (John (J5) Palmieri)<br> 5. Re: [rfc] move activation to a helper process (Havoc Pennington)
<br> 6. Re: [PATCH] run uuidgen --ensure in the init script<br> (Havoc Pennington)<br> 7. Re: [PATCH] run uuidgen --ensure in the init script<br> (Havoc Pennington)<br> 8. Re: [PATCH] run uuidgen --ensure in the init script
<br> (John (J5) Palmieri)<br> 9. Re: [PATCH] run uuidgen --ensure in the init script<br> (Havoc Pennington)<br> 10. Re: [PATCH] run uuidgen --ensure in the init script<br> (John (J5) Palmieri)<br><br><br>
----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 18 Oct 2006 15:33:20 -0400<br>From: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com
</a>><br>Subject: Re: PATCH: configure error when cross compiling dbus core<br> 0.94<br>To: Marco Pracucci <<a href="mailto:development@pracucci.com">development@pracucci.com</a>><br>Cc: Dbus Mailing list <
<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>><br>Message-ID: <1161200000.3155.34.camel@phuket><br>Content-Type: text/plain<br><br>On Wed, 2006-10-18 at 19:26 +0000, Marco Pracucci wrote:
<br>> Hi John,<br>> > Doh, I thought I caught all these. Which is correct? AC_TRY_RUN or<br>> > AC_RUN_IF_ELSE. I saw reference in the autoconf manual in the cross<br>> > compiling section that one of them was deprecated but from the language
<br>> > I couldn't figure out which one (apparently we use both).<br>> ><br>> |AC_TRY_RUN| has been marked as obsolete and has been replaced with<br>> |AC_RUN_IFELSE|.<br>> > Patch looks good. If you could, could you check the other AC_TRY_RUN
<br>> > macros and fix them up if they are wrong. Thanks.<br>> ><br>> |<br>> | I've replaced the two instances of AC_TRY_RUN with AC_RUN_IFELSE. I've<br>> attached a cumulative patch below.<br>
<br>Thanks for the patch, committing it now. Next time it would be nice if<br>you send it as an attachment. My mail client changed tabs to spaces and<br>added CR's. I had to manually apply the diff. Hopefully now cross
<br>compile issues are behind us.<br><br>--<br>John (J5) Palmieri <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br><br><br><br>------------------------------<br><br>Message: 2<br>Date: Thu, 19 Oct 2006 10:27:07 -0400
<br>From: Havoc Pennington <<a href="mailto:hp@redhat.com">hp@redhat.com</a>><br>Subject: Re: [rfc] move activation to a helper process<br>To: David Zeuthen <<a href="mailto:david@fubar.dk">david@fubar.dk</a>>
<br>Cc: <a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>Message-ID: <<a href="mailto:45378B3B.3090002@redhat.com">45378B3B.3090002@redhat.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br><br>Hi,<br><br>This is sort of a half-review, but a few comments from skimming:<br><br> - Sending all those DBUS_MAXIMUM_NAME_LENGTH blocks that are usually<br> mostly-nul seems a little wasteful, despite premature optimization
<br> and all that ...<br> - Why not send the .service file name instead of the bus name to<br> activate, then we don't need the inefficient<br> _scan_service_dir_for_desktop_file<br> - the fork-without-exec is inherently somewhat confusing, I think
<br> a nice way to make it clearer would be to have a single<br> file where all code runs in the child, exporting one<br> function like bus_activation_helper_start_child(),<br> where this function is called in the child immediately post-fork.
<br> but I don't know if this is easily done. I think it'd be<br> nicer to split the BusActivationHelper struct up instead of having<br> the in_helper flag, also.<br> - breaking up the handle_watch function would improve readability
<br> - in handle_bus_pipe the "should never happen" should use _dbus_warn<br> or _dbus_assert_not_reached so we can see it if it does<br> - the system headers (especially unix-specific ones) aren't allowed
<br> in bus/*.c in general; the current exception is dir-watch-* which<br> is configure-protected. string.h is allowed but almost always<br> DBusString should be used instead (trivial strcmp, strlen is OK,<br> but if you're doing pointer math, DBusString is much safer)
<br> The minimum fix is just wrap all the system calls in a trivial way<br> in dbus-sysdeps-unix.[hc], better though is to come up with a<br> higher-level wrapper that could work on windows ... probably on<br> windows it needs to use threads instead of fork ... remember that
<br> the sysdeps abstractions don't need to be glib/nspr-worthy, they<br> can be a little ad hoc or special purpose.<br> One thought is to encapsulate the two pipes and make them look<br> like a full duplex pipe (could even use socketpair when available)
<br> and allow using some other mechanism on windows; and then also<br> encapsulate threads vs. process. so basically have "run this<br> code async in another thread or process, with a full duplex<br> stream to talk to it" as the abstraction. The stream might
<br> have its own read/write methods, since I don't think using sockets<br> on windows will make sense, which means the current _dbus_read_socket<br> etc. won't work.<br> - officially at the moment dbus_uint64_t is "optional" (requires
<br> DBUS_HAVE_INT64 checks) but I think GLib and Qt both require 64-bit<br> int now, so making it optional is probably stupid. I was just copying<br> older glib here and I don't think anyone is aware of a<br>
currently-interesting platform that lacks int64.<br><br>Havoc<br><br><br>------------------------------<br><br>Message: 3<br>Date: Thu, 19 Oct 2006 10:38:41 -0400<br>From: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">
johnp@redhat.com</a>><br>Subject: Re: [rfc] move activation to a helper process<br>To: Havoc Pennington <<a href="mailto:hp@redhat.com">hp@redhat.com</a>><br>Cc: David Zeuthen <<a href="mailto:david@fubar.dk">
david@fubar.dk</a>>, <a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>Message-ID: <1161268721.27822.6.camel@phuket><br>Content-Type: text/plain<br><br>On Thu, 2006-10-19 at 10:27 -0400, Havoc Pennington wrote:
<br>> Hi,<br>><br>> This is sort of a half-review, but a few comments from skimming:<br>><br>> - Sending all those DBUS_MAXIMUM_NAME_LENGTH blocks that are usually<br>> mostly-nul seems a little wasteful, despite premature optimization
<br>> and all that ...<br>> - Why not send the .service file name instead of the bus name to<br>> activate, then we don't need the inefficient<br>> _scan_service_dir_for_desktop_file<br><br>I would rather not have the bus tied to the .service file and instead
<br>leave that as an implementation detail for the daemon (perhaps with some<br>standard behind it). The reason I say this is on OLPC we might want to<br>make our own daemon which forks and loads python files to avoid the
<br>overhead of loading another instance of python.<br><br>The daemon itself should cache service files the way D-Bus does now.<br><br>--<br>John (J5) Palmieri <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>>
<br><br><br><br>------------------------------<br><br>Message: 4<br>Date: Thu, 19 Oct 2006 10:53:37 -0400<br>From: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>Subject: [PATCH] run uuidgen --ensure in the init script
<br>To: Dbus Mailing list <<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>><br>Message-ID: <1161269617.27822.13.camel@phuket><br>Content-Type: text/plain; charset="us-ascii"
<br><br>Distros that run a session bus without a system bus will have to do it<br>some other way but this covers both mainstream installed distros and<br>stateless systems like livecds. That is assuming a stateless system has
<br>a writable /etc. If this is not the norm we should figure out a better<br>place to put the machine-id file.<br><br>--<br>John (J5) Palmieri <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>-------------- next part --------------
<br>A non-text attachment was scrubbed...<br>Name: dbus-run-uuidgen-on-init.patch<br>Type: text/x-patch<br>Size: 1156 bytes<br>Desc: not available<br>Url : <a href="http://lists.freedesktop.org/archives/dbus/attachments/20061019/7e725dc7/dbus-run-uuidgen-on-init-0001.bin">
http://lists.freedesktop.org/archives/dbus/attachments/20061019/7e725dc7/dbus-run-uuidgen-on-init-0001.bin</a><br><br>------------------------------<br><br>Message: 5<br>Date: Thu, 19 Oct 2006 11:15:38 -0400<br>From: Havoc Pennington <
<a href="mailto:hp@redhat.com">hp@redhat.com</a>><br>Subject: Re: [rfc] move activation to a helper process<br>To: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>Cc: David Zeuthen <
<a href="mailto:david@fubar.dk">david@fubar.dk</a>>, <a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>Message-ID: <<a href="mailto:4537969A.90806@redhat.com">4537969A.90806@redhat.com</a>
><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>John (J5) Palmieri wrote:<br>> I would rather not have the bus tied to the .service file and instead<br>> leave that as an implementation detail for the daemon (perhaps with some
<br>> standard behind it). The reason I say this is on OLPC we might want to<br>> make our own daemon which forks and loads python files to avoid the<br>> overhead of loading another instance of python.<br>><br>
> The daemon itself should cache service files the way D-Bus does now.<br>><br><br>I don't think this is related to this patch, though. The helper is an<br>implementation detail of the bus daemon, it is not any kind of public
<br>interface (OLPC would not for example want to provide a replacement<br>helper, or at least there's certainly no provision in this patch to<br>enable that).<br><br>If we want to make activation pluggable I'd suggest that we do something
<br>like: apps can own the org.freedesktop.DBus.ServiceFactory bus name, and<br>if that name is owned the bus asks it to launch stuff either before or<br>after it looks at .service files.<br><br>This is probably fairly questionable on the system bus, but then having
<br>the system bus spawning python stuff seems avoidable.<br><br>Havoc<br><br><br>------------------------------<br><br>Message: 6<br>Date: Thu, 19 Oct 2006 11:16:45 -0400<br>From: Havoc Pennington <<a href="mailto:hp@redhat.com">
hp@redhat.com</a>><br>Subject: Re: [PATCH] run uuidgen --ensure in the init script<br>To: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>Cc: Dbus Mailing list <<a href="mailto:dbus@lists.freedesktop.org">
dbus@lists.freedesktop.org</a>><br>Message-ID: <<a href="mailto:453796DD.8050303@redhat.com">453796DD.8050303@redhat.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br><br><br>John (J5) Palmieri wrote:
<br>> Distros that run a session bus without a system bus will have to do it<br>> some other way but this covers both mainstream installed distros and<br>> stateless systems like livecds. That is assuming a stateless system has
<br>> a writable /etc. If this is not the norm we should figure out a better<br>> place to put the machine-id file.<br>><br><br>This patch looks fine, I think we should go ahead and put the machine id<br>in /var anyway but that won't affect this patch.
<br><br>Havoc<br><br><br>------------------------------<br><br>Message: 7<br>Date: Thu, 19 Oct 2006 11:49:08 -0400<br>From: Havoc Pennington <<a href="mailto:hp@redhat.com">hp@redhat.com</a>><br>Subject: Re: [PATCH] run uuidgen --ensure in the init script
<br>To: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>Cc: Dbus Mailing list <<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>><br>Message-ID: <
<a href="mailto:45379E74.1060601@redhat.com">45379E74.1060601@redhat.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>btw, just noticed that the init scripts don't implement reload since it
<br>wasn't possible originally, but they could now implement it since the<br>daemon supports -HUP for that now I think<br><br>Havoc<br><br><br><br>------------------------------<br><br>Message: 8<br>Date: Thu, 19 Oct 2006 12:09:31 -0400
<br>From: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>Subject: Re: [PATCH] run uuidgen --ensure in the init script<br>To: Havoc Pennington <<a href="mailto:hp@redhat.com">
hp@redhat.com</a>><br>Cc: Dbus Mailing list <<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>><br>Message-ID: <1161274171.27822.28.camel@phuket><br>Content-Type: text/plain; charset="us-ascii"
<br><br>On Thu, 2006-10-19 at 11:49 -0400, Havoc Pennington wrote:<br>> btw, just noticed that the init scripts don't implement reload since it<br>> wasn't possible originally, but they could now implement it since the
<br>> daemon supports -HUP for that now I think<br><br>This should be correct.<br><br>--<br>John (J5) Palmieri <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>Name: dbus-implement-reload.patch<br>Type: text/x-patch<br>Size: 1019 bytes<br>Desc: not available<br>Url : <a href="http://lists.freedesktop.org/archives/dbus/attachments/20061019/213ea0f1/dbus-implement-reload-0001.bin">
http://lists.freedesktop.org/archives/dbus/attachments/20061019/213ea0f1/dbus-implement-reload-0001.bin</a><br><br>------------------------------<br><br>Message: 9<br>Date: Thu, 19 Oct 2006 12:10:41 -0400<br>From: Havoc Pennington <
<a href="mailto:hp@redhat.com">hp@redhat.com</a>><br>Subject: Re: [PATCH] run uuidgen --ensure in the init script<br>To: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>
Cc: Dbus Mailing list <<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a>><br>Message-ID: <<a href="mailto:4537A381.6060206@redhat.com">4537A381.6060206@redhat.com</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<br><br><br><br>John (J5) Palmieri wrote:<br>> On Thu, 2006-10-19 at 11:49 -0400, Havoc Pennington wrote:<br>>> btw, just noticed that the init scripts don't implement reload since it<br>>> wasn't possible originally, but they could now implement it since the
<br>>> daemon supports -HUP for that now I think<br>><br>> This should be correct.<br>><br><br>If the init script knows about a pid file presumably we can avoid<br>killall and just kill the pid? I would expect some other init scripts
<br>already do this or even that one of the standard shell functions<br>available to Fedora init scripts does this for you? Reload on HUP is<br>pretty standard.<br><br>This will HUP all session daemons also, is the main issue.
<br><br>Havoc<br><br><br>------------------------------<br><br>Message: 10<br>Date: Thu, 19 Oct 2006 12:18:00 -0400<br>From: "John (J5) Palmieri" <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br>
Subject: Re: [PATCH] run uuidgen --ensure in the init script<br>To: Havoc Pennington <<a href="mailto:hp@redhat.com">hp@redhat.com</a>><br>Cc: Dbus Mailing list <<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org
</a>><br>Message-ID: <1161274680.27822.33.camel@phuket><br>Content-Type: text/plain<br><br>On Thu, 2006-10-19 at 12:10 -0400, Havoc Pennington wrote:<br>><br>> John (J5) Palmieri wrote:<br>> > On Thu, 2006-10-19 at 11:49 -0400, Havoc Pennington wrote:
<br>> >> btw, just noticed that the init scripts don't implement reload since it<br>> >> wasn't possible originally, but they could now implement it since the<br>> >> daemon supports -HUP for that now I think
<br>> ><br>> > This should be correct.<br>> ><br>><br>> If the init script knows about a pid file presumably we can avoid<br>> killall and just kill the pid? I would expect some other init scripts
<br>> already do this or even that one of the standard shell functions<br>> available to Fedora init scripts does this for you? Reload on HUP is<br>> pretty standard.<br>><br>> This will HUP all session daemons also, is the main issue.
<br><br>The stop for <a href="http://rc.messagebus.in">rc.messagebus.in</a> just does a killall so I used the same<br>convention. I mean <a href="http://rc.messagebus.in">rc.messagebus.in</a> seems broken in many cases such as
<br>not cleaning up the pid file. <a href="http://messagebus.in">messagebus.in</a> is the more sane Red Hat<br>style scripts. Perhaps someone who doesn't use the Red Hat style<br>scripts should fix it up.<br><br>--<br>
John (J5) Palmieri <<a href="mailto:johnp@redhat.com">johnp@redhat.com</a>><br><br><br><br>------------------------------<br><br>_______________________________________________<br>dbus mailing list<br><a href="mailto:dbus@lists.freedesktop.org">
dbus@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/dbus">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br><br><br>End of dbus Digest, Vol 15, Issue 32<br>************************************
<br></blockquote></div><br>