]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index 2ffa1fda26dd572a7cc23fc37794d4c630f8aaa5..1025ac9c73ff8f72bd8f11e5adf51ada1133d2a9 100644 (file)
@@ -6,6 +6,120 @@
                 <link>http://people.skolelinux.org/pere/blog/</link>
                 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
        
+       <item>
+               <title>Using modalias info to find packages handling my hardware</title>
+               <link>http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</guid>
+                <pubDate>Tue, 15 Jan 2013 08:00:00 +0100</pubDate>
+               <description>&lt;p&gt;Yesterday, I wrote about the
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html&quot;&gt;modalias
+values provided by the Linux kernel&lt;/a&gt; following my hope for
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;better
+dongle support in Debian&lt;/a&gt;.  Using this knowledge, I have tested how
+modalias values attached to package names can be used to map packages
+to hardware.  This allow the system to look up and suggest relevant
+packages when I plug in some new hardware into my machine, and replace
+discover and discover-data as the database used to map hardware to
+packages.&lt;/p&gt;
+
+&lt;p&gt;I create a modaliases file with entries like the following,
+containing package name, kernel module name (if relevant, otherwise
+the package name) and globs matching the relevant hardware
+modalias.&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;
+Package: package-name
+&lt;br&gt;Modaliases: module(modaliasglob, modaliasglob, modaliasglob)&lt;/p&gt;
+&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;It is fairly trivial to write code to find the relevant packages
+for a given modalias value using this file.&lt;/p&gt;
+
+&lt;p&gt;An entry like this would suggest the video and picture application
+cheese for many USB web cameras (interface bus class 0E01):&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;
+Package: cheese
+&lt;br&gt;Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)&lt;/p&gt;
+&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;An entry like this would suggest the pcmciautils package when a
+CardBus bridge (bus class 0607) PCI device is present:&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;
+Package: pcmciautils
+&lt;br&gt;Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
+&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;An entry like this would suggest the package colorhug-client when
+plugging in a ColorHug with USB IDs 04D8:F8DA:&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;
+Package: colorhug-client
+&lt;br&gt;Modaliases: colorhug-client(usb:v04D8pF8DAd*)&lt;/p&gt;
+&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;I believe the format is compatible with the format of the Packages
+file in the Debian archive.  Ubuntu already uses their Packages file
+to store their mappings from packages to hardware.&lt;/p&gt;
+
+&lt;p&gt;By adding a XB-Modaliases: header in debian/control, any .deb can
+announce the hardware it support in a way my prototype understand.
+This allow those publishing packages in an APT source outside the
+Debian archive as well as those backporting packages to make sure the
+hardware mapping are included in the package meta information.  I&#39;ve
+tested such header in the pymissile package, and its modalias mapping
+is working as it should with my prototype.  It even made it to Ubuntu
+Raring.&lt;/p&gt;
+
+&lt;p&gt;To test if it was possible to look up supported hardware using only
+the shell tools available in the Debian installer, I wrote a shell
+implementation of the lookup code.  The idea is to create files for
+each modalias and let the shell do the matching.  Please check out and
+try the
+&lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co&quot;&gt;hw-support-lookup&lt;/a&gt;
+shell script.  It run without any extra dependencies and fetch the
+hardware mappings from the Debian archive and the subversion
+repository where I currently work on my prototype.&lt;/p&gt;
+
+&lt;p&gt;When I use it on a machine with a yubikey inserted, it suggest to
+install yubikey-personalization:&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;
+% ./hw-support-lookup
+&lt;br&gt;yubikey-personalization:
+&lt;br&gt;%
+&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
+propose to install the pcmciautils package:&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;
+% ./hw-support-lookup 
+&lt;br&gt;pcmciautils
+&lt;br&gt;%
+&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;If you know of any hardware-package mapping that should be added to
+&lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co&quot;&gt;my
+database&lt;/a&gt;, please tell me about it.&lt;/p&gt;
+
+&lt;p&gt;It could be possible to generate several of the mappings between
+packages and hardware.  One source would be to look at packages with
+kernel modules, ie packages with *.ko files in /lib/modules/, and
+extract their modalias information.  Another would be to look at
+packages with udev rules, ie packages with files in
+/lib/udev/rules.d/, and extract their vendor/model information to
+generate a modalias matching rule.  I have not tested any of these to
+see if it work.&lt;/p&gt;
+
+&lt;p&gt;If you want to help implementing a system to let us propose what
+packages to install when new hardware is plugged into a Debian
+machine, please send me an email or talk to me on
+&lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
        <item>
                <title>Modalias strings - a practical way to map &quot;stuff&quot; to hardware</title>
                <link>http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</link>
@@ -727,64 +841,5 @@ misforstÃ¥else.&lt;/p&gt;
 </description>
        </item>
        
-       <item>
-               <title>Ledger - double-entry accounting using text based storage format</title>
-               <link>http://people.skolelinux.org/pere/blog/Ledger___double_entry_accounting_using_text_based_storage_format.html</link>
-               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Ledger___double_entry_accounting_using_text_based_storage_format.html</guid>
-                <pubDate>Tue, 18 Dec 2012 23:30:00 +0100</pubDate>
-               <description>&lt;p&gt;A few days ago I came across
-&lt;a href=&quot;http://joeyh.name/blog/entry/hledger/&quot;&gt;a blog post from Joey
-Hess&lt;/a&gt; describing &lt;a href=&quot;http://ledger-cli.org/&quot;&gt;ledger&lt;/a&gt; and
-hledger, a text based system for double-entry accounting.  I found it
-interesting, as I am involved with several organizations where
-accounting is an issue, and I have not really become too friendly with
-the different web based systems we use.  I find it hard to find what I
-look for in the menus and even harder try to get sensible data out of
-the systems.  Ledger seem different.  The accounting data is kept in
-text files that can be stored in a version control system, and there
-
-are at least &lt;a href=&quot;https://github.com/ledger/ledger/wiki/Ports&quot;&gt;five
-different implementations&lt;/a&gt; able to read the format.  An example
-entry look like this, and is simple enough that it will be trivial to
-generate entries based on CVS files fetched from the bank:&lt;/p&gt;
-
-&lt;blockquote&gt;&lt;pre&gt;
-2004-05-27 Book Store
-      Expenses:Books                 $20.00
-      Liabilities:Visa
-&lt;/pre&gt;&lt;/blockquote&gt;
-
-&lt;p&gt;The concept seemed interesting enough for me to check it out and
-look for others using it.  I found blog posts from
-&lt;a href=&quot;http://blog.spang.cc/posts/hledger_rocks_my_world/&quot;&gt;Christine
-Spang&lt;/a&gt;,
-&lt;a href=&quot;http://bugsplat.info/2010-05-23-keeping-finances-with-ledger.html&quot;&gt;Pete
-Keen&lt;/a&gt;,
-&lt;a href=&quot;http://blog.andrewcantino.com/blog/2010/11/06/command-line-accounting-with-ledger-and-reckon/&quot;&gt;Andrew
-Cantino&lt;/a&gt; and
-&lt;a href=&quot;http://blog.iphoting.com/blog/2012/11/29/command-line-double-entry-accounting/&quot;&gt;Ronald
-Ip&lt;/a&gt; describing how they use it, as well as a post from
-&lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/ledger-cli/r0oWjwbQ9Bo&quot;&gt;Bradley
-M. Kuhn&lt;/a&gt; at the Software Freedom Conservancy.  All seemed like good
-recommendations fitting my need.&lt;/p&gt;
-
-&lt;p&gt;The &lt;a href=&quot;http://packages.qa.debian.org/l/ledger.html&quot;&gt;ledger&lt;/a&gt;
-package is available in Debian Squeeze, while the
-&lt;a href=&quot;http://packages.qa.debian.org/h/haskell-hledger.html&quot;&gt;hledger&lt;/a&gt;
-package only is available in Debian Sid.  As I use Squeeze, ledger
-seemed the best choice to get started.&lt;/p&gt;
-
-&lt;p&gt;To get some real data to test on, I wrote a
-&lt;a href=&quot;http://www.nuug.no/tools/lodo2ledger&quot;&gt;web scraper&lt;/a&gt; for
-&lt;a href=&quot;http://www.lodo.no/&quot;&gt;LODO&lt;/a&gt;, the accounting system used by
-the &lt;a href=&quot;http://www.nuug.no/&quot;&gt;NUUG&lt;/a&gt; association, and started to
-play with the data set.  I&#39;m not really deeply into accounting, but I
-am able to get a simple balance and accounting status for example
-using the &quot;&lt;tt&gt;ledger balance&lt;/tt&gt;&quot; command.  But I will have to
-gather more experience before I know if the ledger way is a good fit
-for the organisations I am involved in.&lt;/p&gt;
-</description>
-       </item>
-       
         </channel>
 </rss>