<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for acj</title>
    <link>http://www.advogato.org/person/acj/</link>
    <description>Advogato blog for acj</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Tue, 7 Oct 2008 19:38:42 GMT</pubDate>
    <item>
      <pubDate>Fri, 11 Jul 2008 15:25:01 GMT</pubDate>
      <title>11 Jul 2008</title>
      <link>http://www.advogato.org/person/acj/diary.html?start=5</link>
      <guid>http://www.advogato.org/person/acj/diary.html?start=5</guid>
      <description>Yesterday, 10 July, was the due date for the second&#xD;
milestone of my work on DebGraph.  I am happy to report that&#xD;
we are roughly two weeks ahead of schedule, so meeting this&#xD;
milestone was not a cause for worry.&#xD;
&#xD;
&lt;p&gt; We now have support for the following graph operators:&#xD;
&lt;ul&gt;&lt;li&gt;Difference&#xD;
&lt;li&gt;Intersection&#xD;
&lt;li&gt;Filter (by properties)&#xD;
&lt;li&gt;Find Cycles (via &lt;a href="http://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm" &gt;Tarjan's&#xD;
algorithm&lt;/a&gt;)&#xD;
&lt;li&gt;Find Dependencies&#xD;
&lt;li&gt;Find Reverse Dependencies&#xD;
&lt;li&gt;Symmetric Difference (XOR)&#xD;
&lt;li&gt;Union&lt;/ul&gt;&#xD;
&#xD;
&lt;p&gt; The next milestone includes the development of a high-level&#xD;
language (or integration with an existing extension&#xD;
language) that streamlines the construction of complex&#xD;
queries using the operators listed above.  We can build&#xD;
arbitrarily complex queries using the C++ operators, but&#xD;
dealing with the static typing and compiler toolchain can be&#xD;
very clunky.  As such, I have spent the past week working on&#xD;
Lua bindings for DebGraph, which will enable us to query the&#xD;
graph of Debian packages from a clean, dynamically typed&#xD;
language.  Lua has a powerful C API that exposes the Lua&#xD;
stack and lets us move DebGraph information to and from the&#xD;
Lua interpreter.  I'm writing documentation that outlines&#xD;
how to use DebGraph from both C++ and Lua in order to make&#xD;
this work accessible to more folks.&#xD;
&#xD;
&lt;p&gt; &lt;b&gt;Sneak peak&lt;/b&gt;&lt;br&gt;&#xD;
As an example, we can utilize the FindCycles operator in Lua&#xD;
as follows:&#xD;
&lt;pre&gt;&#xD;
libdg = package.loadlib("./libdebgraph.so",&#xD;
"luaopen_libdebgraph")&#xD;
libdg()&#xD;
LoadPackages('cache')&#xD;
-- 'g' is the main graph of unstable binary-arm packages&#xD;
cycles = FindCycles(g)&#xD;
print("Found " .. #fc .. " cycles")&#xD;
for comp_key,comp in pairs(cycles) do&#xD;
    comp_nodes = ""&#xD;
    for node_key,node in pairs(comp) do&#xD;
        prop = GetProperty(node, "Package")&#xD;
        comp_nodes = comp_nodes .. prop .. " "&#xD;
    end&#xD;
    print("* " .. comp_nodes)&#xD;
end&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; The above Lua script produces the following result:&#xD;
&lt;pre&gt;&#xD;
reading cache/unstable/main/binary-arm/Packages&#xD;
Found 61 cycles&#xD;
* debconf-english debconf-i18n debconf&#xD;
* perl-modules perl &#xD;
* cdebconf fontconfig-config fontconfig gsfonts-x11&#xD;
libcairo2 libfontconfig1 libgtk2.0-0 libpango1.0-0&#xD;
libpango1.0-common libxft2 ucf x11-utils xutils&#xD;
[...]&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; These are the package names in the strongly connected&#xD;
components, shown in alphabetical order.&#xD;
&#xD;
&lt;p&gt; There is still a lot of work to do before the Lua binding&#xD;
will achieve feature parity with the core library, but we&#xD;
have now laid the foundation (and a brick or two).</description>
    </item>
    <item>
      <pubDate>Tue, 17 Jun 2008 15:31:31 GMT</pubDate>
      <title>17 Jun 2008</title>
      <link>http://www.advogato.org/person/acj/diary.html?start=4</link>
      <guid>http://www.advogato.org/person/acj/diary.html?start=4</guid>
      <description>The overall situation (admittedly a bit of a stretch):&#xD;
&lt;br&gt;&lt;img src="http://linuxguy.org/software/debgraph/images/chickencycle.png" alt="The chicken cycle"&gt;&#xD;
&lt;br&gt;(The soil depends on the chicken to keep it fertilized.&#xD;
Work with me here.)&#xD;
&#xD;
&lt;p&gt; There are an infinitude of cycles that could be extracted&#xD;
from this, but we're only interested in the set of&#xD;
shortest-length cycles.&#xD;
&#xD;
&lt;p&gt; Exhibit A:&#xD;
&lt;br&gt;&lt;img src="http://linuxguy.org/software/debgraph/images/chickencycle-1.png"/&gt;&#xD;
&#xD;
&lt;p&gt; Exhibit B:&#xD;
&lt;br&gt;&lt;img src="http://linuxguy.org/software/debgraph/images/chickencycle-2.png"/&gt;&#xD;
&#xD;
&lt;p&gt; And the classic philosophical gem, Exhibit C:&#xD;
&lt;br&gt;&lt;img src="http://linuxguy.org/software/debgraph/images/chickencycle-0.png"/&gt;&#xD;
&#xD;
&lt;p&gt; Is the problem solved, then?  Not quite.  The current&#xD;
DebGraph cycle detection operator works well for&#xD;
dependencies, but we also want to discover cycles of&#xD;
conflicting packages.  Furthermore, one of our documented&#xD;
use cases involves finding nodes that depend on &lt;i&gt;and&lt;/i&gt;&#xD;
conflict with one another.</description>
    </item>
    <item>
      <pubDate>Thu, 12 Jun 2008 15:09:56 GMT</pubDate>
      <title>12 Jun 2008</title>
      <link>http://www.advogato.org/person/acj/diary.html?start=3</link>
      <guid>http://www.advogato.org/person/acj/diary.html?start=3</guid>
      <description>The GNU C library (packaged as &lt;tt&gt;libc6&lt;/tt&gt; in&#xD;
Debian) is the bedrock of a lot of code.  What are the&#xD;
packages that it depends on?  (Yo, DebGraph!)&#xD;
&#xD;
&lt;p&gt; &lt;img src="http://linuxguy.org/software/debgraph/images/libc6-finddeps-thumb.png"/&gt;&#xD;
&#xD;
&lt;p&gt; &lt;a href="http://linuxguy.org/software/debgraph/images/libc6-finddeps-sm.png" &gt;Original&#xD;
image&lt;/a&gt; [997 kB]&#xD;
&#xD;
&lt;p&gt; &lt;tt&gt;libc6&lt;/tt&gt; is one of the well-connected vertices in the&#xD;
lower-left corner (third quadrant, if you like).  For graphs&#xD;
like this one, we would like DebGraph to identify dependency&#xD;
cycles (loops).  For example, &lt;tt&gt;libc6&lt;/tt&gt; depends on&#xD;
&lt;tt&gt;libgcc1&lt;/tt&gt;, which in turn depends on &lt;tt&gt;libc6&lt;/tt&gt;. &#xD;
This can be seen in the graph above by applying some careful&#xD;
scrutiny, but why not let the computer work its magic for&#xD;
us?  (To be continued.)&#xD;
&#xD;
&lt;p&gt; As a bonus, who depends on &lt;tt&gt;arping&lt;/tt&gt; 2.05-2 for i386?&#xD;
&#xD;
&lt;p&gt; &lt;img src="http://linuxguy.org/software/debgraph/images/arping-findreversedeps-sm.png"/&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 9 Jun 2008 15:39:23 GMT</pubDate>
      <title>9 Jun 2008</title>
      <link>http://www.advogato.org/person/acj/diary.html?start=2</link>
      <guid>http://www.advogato.org/person/acj/diary.html?start=2</guid>
      <description>The roadmap for DebGraph outlines three sets of graph&#xD;
operators: &lt;tt&gt;essential&lt;/tt&gt;, &lt;tt&gt;useful&lt;/tt&gt;, and&#xD;
&lt;tt&gt;exotic&lt;/tt&gt;.  Naturally, each successive set extends the&#xD;
previous set's functionality, and in many cases the&#xD;
complexity of the work performed by the operators increases&#xD;
accordingly.&#xD;
&#xD;
&lt;p&gt; Over the weekend, I wrapped up work on the&#xD;
&lt;tt&gt;essential&lt;/tt&gt; operators and separated the unit test&#xD;
suite into its own subdirectory and executable.  Having a&#xD;
few simple operators around means that we can do basic queries:&#xD;
&lt;ul&gt;&lt;li&gt;Show me all &lt;tt&gt;3dchess&lt;/tt&gt; packages.&#xD;
&lt;br&gt;&lt;a href="http://linuxguy.org/software/debgraph/images/3dchess-sm.png" &gt;&lt;img src="http://linuxguy.org/software/debgraph/images/3dchess-thumb.png" border="0"/&gt;&lt;/a&gt;&#xD;
&lt;li&gt;Show me all all &lt;tt&gt;libc6&lt;/tt&gt; packages.&#xD;
&lt;br&gt;&lt;a href="http://linuxguy.org/software/debgraph/images/libc6-sm.png" &gt;&lt;img src="http://linuxguy.org/software/debgraph/images/libc6-thumb.png" border="0"/&gt;&lt;/a&gt;&#xD;
&lt;li&gt;Show me the union of the two previous results, including&#xD;
dependencies between the two groups.&#xD;
&lt;br&gt;&lt;a href="http://linuxguy.org/software/debgraph/images/3dchess-libc6-union-sm.png" &gt;&lt;img src="http://linuxguy.org/software/debgraph/images/3dchess-libc6-union-thumb.png" border="0"/&gt;&lt;/a&gt;&lt;/ul&gt;&#xD;
(Click the graphs for a larger version.)&#xD;
&#xD;
&lt;p&gt; These graphs can be helpful, but they are rather trivial. &#xD;
More useful would be an operator that could, say, find all&#xD;
dependency loops (cycles) and return them in such a way that&#xD;
each cycle could be examined individually.&#xD;
&#xD;
&lt;p&gt; Next step: an operator that computes all dependencies for a&#xD;
given package.</description>
    </item>
    <item>
      <pubDate>Sat, 24 May 2008 14:58:50 GMT</pubDate>
      <title>24 May 2008</title>
      <link>http://www.advogato.org/person/acj/diary.html?start=1</link>
      <guid>http://www.advogato.org/person/acj/diary.html?start=1</guid>
      <description>Last week I bought a Netgear WG511 wireless adapter for my&#xD;
laptop, intending to replace the archaic prism2-based&#xD;
adapter that didn't support WPA and barely worked.  Initial&#xD;
searches indicated success in making it work with Linux, so&#xD;
I wasn't worried.&#xD;
&#xD;
&lt;p&gt; It turns out that there are at least three different&#xD;
versions of this card, each with a different chipset, and&#xD;
the only clear delineation is the "Made in X" label on the&#xD;
adapter, where X is either "China" or "Taiwan".  My WG511&#xD;
was made in China and has a Marvell chipset.  Among other&#xD;
things, this means that I'm forced to use&#xD;
&lt;tt&gt;ndiswrapper&lt;/tt&gt; and the Windows 2000 drivers.  (The&#xD;
adapters made in Taiwan are natively supported by the&#xD;
prism54 driver included with the Linux kernel.)  &lt;i&gt;Okay,&#xD;
fine&lt;/i&gt;, I thought.  It's not ideal, but the adapter is&#xD;
popular enough that maybe development of a &lt;a href="http://article.gmane.org/gmane.linux.kernel.wireless.general/14579" &gt;native&#xD;
Marvell&#xD;
driver&lt;/a&gt; is&#xD;
underway.&#xD;
&#xD;
&lt;p&gt; The next step was to get WPA working.  The NetworkManager&#xD;
applet listed my ESSID with good signal strength, but after&#xD;
repeated unsuccessful attempts to associate it was clear&#xD;
that something was wrong.  The applet would spin for a few&#xD;
seconds trying to connect before immediately returning to&#xD;
the "no connection" icon.  I tried the Windows XP drivers&#xD;
with the same result.  I tried rebooting to give the card a&#xD;
chance to reset: same result.&#xD;
&#xD;
&lt;p&gt; The solution was to use &lt;tt&gt;wpasupplicant&lt;/tt&gt; directly,&#xD;
specifying my ESSID, pre-shared key, algorithms, and so on&#xD;
directly in the &lt;tt&gt;wpa_supplicant.conf&lt;/tt&gt;.  After a few&#xD;
seconds of key negotiation, I was associated and had&#xD;
acquired an IP address.&#xD;
&#xD;
&lt;p&gt; So:&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Manufacturers need to play ball more.  Openness &lt;i&gt;will&#xD;
sell more units&lt;/i&gt;!&#xD;
&lt;li&gt;What exactly is causing nm-applet to fail?&#xD;
&lt;li&gt;Yay for SoC hacking on the front porch.&#xD;
&lt;/ul&gt;</description>
    </item>
    <item>
      <pubDate>Sat, 24 May 2008 13:37:00 GMT</pubDate>
      <title>24 May 2008</title>
      <link>http://www.advogato.org/person/acj/diary.html?start=0</link>
      <guid>http://www.advogato.org/person/acj/diary.html?start=0</guid>
      <description>This summer, I'm working on &lt;a href="http://code.google.com/soc/2008/debian/appinfo.html?csaid=1862C567E3002AD2" &gt;DebGraph&lt;/a&gt;&#xD;
(for &lt;a href="http://debian.org" &gt;Debian&lt;/a&gt;, as part of &lt;a href="http://code.google.com/soc/2008" &gt;GSoC&lt;/a&gt;) with &lt;a href="http://semistable.com" &gt;Robert Lemmen&lt;/a&gt;.  Below is a&#xD;
brief description of where we're headed.&#xD;
&#xD;
&lt;p&gt; DebGraph is a tool that provides a simple, intuitive&#xD;
interface to the Debian package graph.  The package graph&#xD;
contains information about packages (name, version,&#xD;
description, etc), their dependencies, and other useful&#xD;
details.  By providing an easy way to interact with this&#xD;
graph, DebGraph enables useful analyses that can identify&#xD;
interesting or problematic constellations.&#xD;
&#xD;
&lt;p&gt; As an example, it is helpful for the Debian QA team to track&#xD;
cyclic dependencies (that is, packages that [in]directly&#xD;
depend on themselves).  Such dependency cycles can be&#xD;
symptoms of package problems, and therefore it is important&#xD;
that there is tool support for locating and&#xD;
tracking them.&#xD;
&#xD;
&lt;p&gt; To date, many tools have been written to perform various&#xD;
tasks that involve analyzing Debian packages.  The `lintian'&#xD;
tool performs tests on packages to ensure that they are&#xD;
complete.  `Britney', another package&#xD;
analysis tool, assists the release and quality assurance&#xD;
teams by verifying package dependencies before promoting&#xD;
packages from the `unstable' distribution to `testing'.&#xD;
&#xD;
&lt;p&gt; As the number of packages in Debian has grown, the&#xD;
complexity of the package dependency graph has become&#xD;
difficult to manage.  Development of new scripts that&#xD;
interact with package information involves addressing &#xD;
that complexity.  This involves writing code that can&#xD;
represent the graph in memory and manipulate it, and such&#xD;
work is typically delicate and error-prone.  It would be&#xD;
helpful to separate this functionality into a library that&#xD;
could provide generic graph infrastructure to anyone who&#xD;
needs to query or manipulate the Debian package dependency&#xD;
graph.&#xD;
&#xD;
&lt;p&gt; DebGraph aims to provide this generic infrastructure through&#xD;
a set of graph operators (e.g., union, intersection,&#xD;
find-cycles, and so on) that can be composed in complex ways&#xD;
to facilitate powerful analysis of&#xD;
the graph.  In addition, the development of a functional&#xD;
query language will enable graph queries from&#xD;
domain-specific languages, thus removing the constraint of&#xD;
using C++ code to perform queries.&#xD;
&#xD;
&lt;p&gt; This work relieves developers of the burden of duplicating&#xD;
graph-specific code when developing new tools (or extending&#xD;
existing ones) that need access to the package dependency&#xD;
graph.  By providing a generic infrastructure to support&#xD;
such tools, DebGraph enables tool developers (and others in&#xD;
the community) to focus on the issue at hand without&#xD;
becoming swamped with low-level details.</description>
    </item>
  </channel>
</rss>
