On 4/15/07, Randy McMurchy <[EMAIL PROTECTED]> wrote:
Dan Nicholson wrote these words on 04/15/07 13:44 CST: > On 4/15/07, Randy McMurchy <[EMAIL PROTECTED]> wrote: >> The Perl Modules page is a perfect example of what I'm talking >> about. In fact, Dan, if you'd like I'll knock out the D-Bus >> bindings page and put it in the book. Let me know.
Here's my first crack at updating the dbus page and bootscript. Sorry for the delay. In trying to test hal, I entered an enormous tangent to build gnome-2.18. So, I'm pretty sure it works. Comments on the attached diff. I'm assuming that all the bindings stuff will be on a separate page, so I ripped it all out. I'd also appreciate any comment on installing the doxygen generated man pages. It puts them in the tree in a man/man3dbus directory, so I put it in the same section on the system: /usr/share/man/man3dbus. Normally I wouldn't want to do that, but there are a lot of pages and it looks like some might conflict. I didn't investigate that, though. That's certainly up for debate. I made a couple changes to the bootscript. Assuming you install the new lfs-bootscripts tarball I rolled earlier today, the passing of -p $pidfile to loadproc and killproc should work correctly now. I've added this here so that you don't kill off any session buses trying to restart the system bus. This works reliably in my testing and I've had a fully stocked gnome desktop survive many system bus restarts. Also, during killproc, since -p is passed in, it will take care of removing the pid file if dbus-daemon was actually killed. I then made it so that the bus socket wouldn't get removed unless the killproc returned successfully. I'll try to post the hal diff a bit later, but it might not make a lot of sense until the dbus core + bindings gets worked out. -- Dan
Index: BOOK/general.ent =================================================================== --- BOOK/general.ent (revision 6749) +++ BOOK/general.ent (working copy) @@ -179,7 +179,7 @@ <!ENTITY mc-version "4.6.1"> <!ENTITY sysstat-version "7.0.4"> <!ENTITY apache-ant-version "1.7.0"> -<!ENTITY dbus-version "0.62"> +<!ENTITY dbus-version "1.0.2"> <!ENTITY hal-version "0.5.7.1"> <!-- Chapter 12 --> Index: BOOK/general/sysutils/dbus.xml =================================================================== --- BOOK/general/sysutils/dbus.xml (revision 6749) +++ BOOK/general/sysutils/dbus.xml (working copy) @@ -4,12 +4,12 @@ <!ENTITY % general-entities SYSTEM "../../general.ent"> %general-entities; - <!ENTITY dbus-download-http "http://dbus.freedesktop.org/releases/dbus-&dbus-version;.tar.gz"> + <!ENTITY dbus-download-http "http://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.gz"> <!ENTITY dbus-download-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/dbus-&dbus-version;.tar.gz"> - <!ENTITY dbus-md5sum "ba7692f63d0e9f1ef06703dff56cb650b"> - <!ENTITY dbus-size "1.7 MB"> - <!ENTITY dbus-buildsize "69.4 MB (includes building and installing all docs)"> - <!ENTITY dbus-time "1.0 SBU"> + <!ENTITY dbus-md5sum "0552a9b54beb4a044951b7cdbc8fc855"> + <!ENTITY dbus-size "1.3 MB"> + <!ENTITY dbus-buildsize "39.5 MB (includes building and installing all docs)"> + <!ENTITY dbus-time "0.3 SBU"> ]> <sect1 id="dbus" xreflabel="D-BUS-&dbus-version;"> @@ -63,80 +63,16 @@ <bridgehead renderas="sect3">D-BUS Dependencies</bridgehead> + <bridgehead renderas="sect4">Required</bridgehead> + <para role="required"><xref linkend="expat"/> or <xref linkend="pkgconfig"/> + and <xref linkend="libxml2"/></para> + <bridgehead renderas="sect4">Optional</bridgehead> - <para role="optional"><xref linkend="pkgconfig"/>, - <xref linkend="expat"/> or <xref linkend="libxml2"/>, - <xref linkend="glib2"/>, - <xref linkend="gtk2"/>, - <xref linkend="qt"/>, - <ulink url="http://www.trolltech.com/products/qt">Qt-4.x.x</ulink>, - <xref linkend="x-window-system"/>, - <xref linkend="gcc"/> (for the Java compiler and tools), - <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/">Pyrex</ulink> - (<ulink url="ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/Pyrex-0.9.4.1.tar.gz">version - 0.9.4.1</ulink> is known to work and requires <xref linkend="python"/>), - <ulink url="http://www.mono-project.com/GtkSharp">GtkSharp-1.0.x</ulink> - (requires <ulink url="http://go-mono.org">Mono</ulink>), - <ulink url="http://go-mono.com/sources-stable/">Monodoc</ulink>, + <para role="optional"><xref linkend="x-window-system"/>, <xref linkend="doxygen"/> (to generate the API documentation), and <ulink url="http://cyberelk.net/tim/xmlto/">xmlto</ulink> (to generate HTML documentation and manuals)</para> - <para>Listed below are some additional notes about the dependencies</para> - - <itemizedlist spacing="compact"> - <listitem> - <para>Review the information from running - <command>./configure --help</command> for the available parameters to - pass to the <command>configure</command> script to enable the various - dependencies.</para> - </listitem> - <listitem> - <para>To build the <application>Mono</application> bindings, you must - have <application>GtkSharp</application> installed. If you wish to use - recent versions of <application>GtkSharp</application>, you'll need to - make some trivial patches to the <application>D-BUS</application> - sources. See <ulink url="http://www.mono-project.com/GtkSharpUpgrade"/> - for details.</para> - </listitem> - <listitem> - <para>If you have a recent version of <ulink - url="http://go-mono.com/sources-stable/">Monodoc</ulink> installed - (>= 1.1.10) and you passed the <option>--enable-mono-docs</option> - parameter to <command>configure</command>, the - <application>D-BUS</application> build will fail. You can review the - parts of this patch (<ulink - url="http://www.mail-archive.com/[EMAIL PROTECTED]/msg10156.html"/>) - that apply to the <application>Monodoc</application> installation, to - fix the build problems. Note this is untested by the BLFS Team, but - should work just fine.</para> - </listitem> - </itemizedlist> - - <bridgehead renderas="sect4" id="hal-requirements" - xreflabel="HAL Requirements">HAL Requirements</bridgehead> - - <para><xref linkend="glib2"/> must be installed before you begin building - <application>D-BUS</application> if you plan on installing - <xref linkend="hal"/>. <application>GLib</application> is required to build - the <filename class='libraryfile'>libdbus-glib</filename> library, which is - required by the <application>HAL</application> daemon.</para> - - <para>If you plan on using <application>HAL</application> with - <application>KDE</application>, you'll need to link - <application>D-BUS</application> with the <application>Qt</application> - libraries. Ensure you've installed <application>Qt</application> before - beginning the <application>D-BUS</application> installation.</para> - - <para>If you desire to use the <xref linkend="hal-device-manager"/> - program, <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/"> - Pyrex</ulink> (note the known working version listed in the dependencies) - must be installed before you begin building - <application>D-BUS</application> as the <application>D-BUS</application> - <application>Python</application> bindings are required. You will also - need to remove the <parameter>--disable-python</parameter> parameter from - the <command>configure</command> command in the instructions below.</para> - <para condition="html" role="usernotes">User Notes: <ulink url="&blfs-wiki;/dbus"/></para> @@ -174,8 +110,7 @@ <screen><userinput>./configure --prefix=/usr \ --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-python && + --localstatedir=/var && make</userinput></screen> <para>The <option>--enable-doxygen-docs</option> parameter does not work @@ -194,15 +129,26 @@ <screen role="root"><userinput>make install && install -v -m755 -d /usr/share/doc/dbus-&dbus-version; && -install -v -m644 doc/{TODO,*.{dtd,xml,xsl,html,txt,c}} \ +install -v -m644 doc/{TODO,*.{dtd,xml,xsl,txt,c}} \ /usr/share/doc/dbus-&dbus-version;</userinput></screen> + <para>If you built the HTML documentation, install it by issuing the + following commands as the <systemitem class="username">root</systemitem> user:</para> + +<screen role="root"><userinput> +install -v -m644 doc/*.html \ + /usr/share/doc/dbus-&dbus-version;</userinput></screen> + <para>If you built the API documentation, install it by issuing the following commands as the <systemitem class="username">root</systemitem> user:</para> -<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/dbus-&dbus-version;/api && +<screen role="root"><userinput> +install -v -m755 -d /usr/share/doc/dbus-&dbus-version;/api \ + /usr/share/man/man3dbus && install -v -m644 doc/api/html/* \ - /usr/share/doc/dbus-&dbus-version;/api</userinput></screen> + /usr/share/doc/dbus-&dbus-version;/api && +install -v -m644 doc/api/man/man3dbus/* \ + /usr/share/man/man3dbus</userinput></screen> </sect2> @@ -210,16 +156,11 @@ <title>Command Explanations</title> <para><parameter>--localstatedir=/var</parameter>: This parameter causes - the daemon PID file to be created in - <filename class="directory">/var/run/dbus</filename> instead of - <filename class="directory">/usr/var/run/dbus</filename>.</para> + the daemon PID file, system bus socket and machine uuid file to be + created in the <filename class="directory">/var</filename> directory + instead of the <filename class="directory">/usr/var</filename> + directory.</para> - <para><parameter>--disable-python</parameter>: This parameter is required - if <application>Python</application> is not installed. Remove the parameter - if <application>Python</application> (and <application>Pyrex</application>) - is installed and you wish to build the - <application>Python</application> bindings.</para> - </sect2> <sect2 role="configuration"> @@ -362,19 +303,16 @@ <segmentedlist> <segtitle>Installed Programs</segtitle> - <segtitle>Installed Libraries</segtitle> + <segtitle>Installed Library</segtitle> <segtitle>Installed Directories</segtitle> <seglistitem> - <seg>dbus-binding-tool, dbus-cleanup-sockets, dbus-daemon, dbus-launch, - dbus-monitor, dbus-send and dbus-viewer</seg> - <seg>libdbus-1.{so,a} and optionally, dbus-1.jar, libdbus-gcj-1.{so,a}, - libdbus-glib-1.{so,a}, libdbus-qt-1.{so,a}, libdbus-qt4-1.{so,a}, - libdbus-mono-1.{so,a} and <application>Python</application> - modules</seg> + <seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor, + dbus-send, dbus-uuidgen</seg> + <seg>libdbus-1.{so,a}</seg> <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0, - /usr/lib/python2.4/site-packages/dbus, /usr/share/dbus-1, - /usr/share/doc/dbus-&dbus-version; and /var/run/dbus</seg> + /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;, + /usr/share/man/man3dbus, /var/lib/dbus and /var/run/dbus</seg> </seglistitem> </segmentedlist> @@ -383,17 +321,6 @@ <?dbfo list-presentation="list"?> <?dbhtml list-presentation="table"?> - <varlistentry id="dbus-binding-tool"> - <term><command>dbus-binding-tool</command></term> - <listitem> - <para>is used to create header files from - <application>GLib</application> object files.</para> - <indexterm zone="dbus dbus-binding-tool"> - <primary sortas="b-dbus-binding-tool">dbus-binding-tool</primary> - </indexterm> - </listitem> - </varlistentry> - <varlistentry id="dbus-cleanup-sockets"> <term><command>dbus-cleanup-sockets</command></term> <listitem> @@ -449,13 +376,12 @@ </listitem> </varlistentry> - <varlistentry id="dbus-viewer"> - <term><command>dbus-viewer</command></term> + <varlistentry id="dbus-uuidgen"> + <term><command>dbus-uuidgen</command></term> <listitem> - <para>is a graphical <application>D-BUS</application> frontend - utility.</para> - <indexterm zone="dbus dbus-viewer"> - <primary sortas="b-dbus-viewer">dbus-viewer</primary> + <para>is used to generate or read a universally unique ID.</para> + <indexterm zone="dbus dbus-uuidgen"> + <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary> </indexterm> </listitem> </varlistentry> Index: BOOK/general/sysutils/hal.xml =================================================================== --- BOOK/general/sysutils/hal.xml (revision 6749) +++ BOOK/general/sysutils/hal.xml (working copy) @@ -70,7 +70,10 @@ <bridgehead renderas="sect4">Required</bridgehead> <para role="required"><xref linkend="glib2"/>, + <!-- <xref linkend="dbus"/> (see the <xref linkend="hal-requirements"/>), + --> + <xref linkend="dbus"/>, <xref linkend="python"/>, and <xref linkend="perl-xml-parser"/></para> Index: bootscripts/blfs/init.d/dbus =================================================================== --- bootscripts/blfs/init.d/dbus (revision 6749) +++ bootscripts/blfs/init.d/dbus (working copy) @@ -10,17 +10,20 @@ . /etc/sysconfig/rc . $rc_functions +pidfile=/var/run/dbus/pid +socket=/var/run/dbus/system_bus_socket + case "$1" in start) boot_mesg "Starting the D-Bus Messagebus Daemon..." - loadproc /usr/bin/dbus-daemon --config-file=/etc/dbus-1/system.conf + /usr/bin/dbus-uuidgen --ensure + loadproc -p "$pidfile" /usr/bin/dbus-daemon --system ;; stop) boot_mesg "Stopping the D-Bus Messagebus Daemon..." - killproc /usr/bin/dbus-daemon - rm /var/run/dbus/pid - rm /var/run/dbus/system_bus_socket + killproc -p "$pidfile" /usr/bin/dbus-daemon + [ $? -eq 0 ] && rm -f "$socket" ;; restart)
-- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
