]> pere.pagekite.me Git - homepage.git/blob - blog/tags/isenkram/isenkram.rss
abae76120fc9b8acac8dd302f925c44b34d45996
[homepage.git] / blog / tags / isenkram / isenkram.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries tagged isenkram</title>
5 <description>Entries tagged isenkram</description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7
8
9 <item>
10 <title>Appstream just learned how to map hardware to packages too!</title>
11 <link>http://people.skolelinux.org/pere/blog/Appstream_just_learned_how_to_map_hardware_to_packages_too_.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Appstream_just_learned_how_to_map_hardware_to_packages_too_.html</guid>
13 <pubDate>Fri, 23 Dec 2016 10:30:00 +0100</pubDate>
14 <description>&lt;p&gt;I received a very nice Christmas present today. As my regular
15 readers probably know, I have been working on the
16 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;the Isenkram
17 system&lt;/a&gt; for many years. The goal of the Isenkram system is to make
18 it easier for users to figure out what to install to get a given piece
19 of hardware to work in Debian, and a key part of this system is a way
20 to map hardware to packages. Isenkram have its own mapping database,
21 and also uses data provided by each package using the AppStream
22 metadata format. And today,
23 &lt;a href=&quot;https://tracker.debian.org/pkg/appstream&quot;&gt;AppStream&lt;/a&gt; in
24 Debian learned to look up hardware the same way Isenkram is doing it,
25 ie using fnmatch():&lt;/p&gt;
26
27 &lt;p&gt;&lt;pre&gt;
28 % appstreamcli what-provides modalias \
29 usb:v1130p0202d0100dc00dsc00dp00ic03isc00ip00in00
30 Identifier: pymissile [generic]
31 Name: pymissile
32 Summary: Control original Striker USB Missile Launcher
33 Package: pymissile
34 % appstreamcli what-provides modalias usb:v0694p0002d0000
35 Identifier: libnxt [generic]
36 Name: libnxt
37 Summary: utility library for talking to the LEGO Mindstorms NXT brick
38 Package: libnxt
39 ---
40 Identifier: t2n [generic]
41 Name: t2n
42 Summary: Simple command-line tool for Lego NXT
43 Package: t2n
44 ---
45 Identifier: python-nxt [generic]
46 Name: python-nxt
47 Summary: Python driver/interface/wrapper for the Lego Mindstorms NXT robot
48 Package: python-nxt
49 ---
50 Identifier: nbc [generic]
51 Name: nbc
52 Summary: C compiler for LEGO Mindstorms NXT bricks
53 Package: nbc
54 %
55 &lt;/pre&gt;&lt;/p&gt;
56
57 &lt;p&gt;A similar query can be done using the combined AppStream and
58 Isenkram databases using the isenkram-lookup tool:&lt;/p&gt;
59
60 &lt;p&gt;&lt;pre&gt;
61 % isenkram-lookup usb:v1130p0202d0100dc00dsc00dp00ic03isc00ip00in00
62 pymissile
63 % isenkram-lookup usb:v0694p0002d0000
64 libnxt
65 nbc
66 python-nxt
67 t2n
68 %
69 &lt;/pre&gt;&lt;/p&gt;
70
71 &lt;p&gt;If you want to make this system a success and help Debian users
72 make the most of the hardware they have, please
73 help&lt;a href=&quot;https://wiki.debian.org/AppStream/Guidelines&quot;&gt;add
74 AppStream metadata for your package following the guidelines&lt;/a&gt;
75 documented in the wiki. So far only 11 packages provide such
76 information, among the several hundred hardware specific packages in
77 Debian. The Isenkram database on the other hand contain 101 packages,
78 mostly related to USB dongles. Most of the packages with hardware
79 mapping in AppStream are LEGO Mindstorms related, because I have, as
80 part of my involvement in
81 &lt;a href=&quot;https://wiki.debian.org/LegoDesigners&quot;&gt;the Debian LEGO
82 team&lt;/a&gt; given priority to making sure LEGO users get proposed the
83 complete set of packages in Debian for that particular hardware. The
84 team also got a nice Christmas present today. The
85 &lt;a href=&quot;https://tracker.debian.org/pkg/nxt-firmware&quot;&gt;nxt-firmware
86 package&lt;/a&gt; made it into Debian. With this package in place, it is
87 not possible to use the LEGO Mindstorms NXT unit with only free
88 software, as the nxt-firmware package contain the source and firmware
89 binaries for the NXT brick.&lt;/p&gt;
90
91 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
92 activities, please send Bitcoin donations to my address
93 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&amp;label=PetterReinholdtsenBlog&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
94 </description>
95 </item>
96
97 <item>
98 <title>Isenkram updated with a lot more hardware-package mappings</title>
99 <link>http://people.skolelinux.org/pere/blog/Isenkram_updated_with_a_lot_more_hardware_package_mappings.html</link>
100 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Isenkram_updated_with_a_lot_more_hardware_package_mappings.html</guid>
101 <pubDate>Tue, 20 Dec 2016 11:55:00 +0100</pubDate>
102 <description>&lt;p&gt;&lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;The Isenkram
103 system&lt;/a&gt; I wrote two years ago to make it easier in Debian to find
104 and install packages to get your hardware dongles to work, is still
105 going strong. It is a system to look up the hardware present on or
106 connected to the current system, and map the hardware to Debian
107 packages. It can either be done using the tools in isenkram-cli or
108 using the user space daemon in the isenkram package. The latter will
109 notify you, when inserting new hardware, about what packages to
110 install to get the dongle working. It will even provide a button to
111 click on to ask packagekit to install the packages.&lt;/p&gt;
112
113 &lt;p&gt;Here is an command line example from my Thinkpad laptop:&lt;/p&gt;
114
115 &lt;p&gt;&lt;pre&gt;
116 % isenkram-lookup
117 bluez
118 cheese
119 ethtool
120 fprintd
121 fprintd-demo
122 gkrellm-thinkbat
123 hdapsd
124 libpam-fprintd
125 pidgin-blinklight
126 thinkfan
127 tlp
128 tp-smapi-dkms
129 tp-smapi-source
130 tpb
131 %
132 &lt;/pre&gt;&lt;/p&gt;
133
134 &lt;p&gt;It can also list the firware package providing firmware requested
135 by the load kernel modules, which in my case is an empty list because
136 I have all the firmware my machine need:
137
138 &lt;p&gt;&lt;pre&gt;
139 % /usr/sbin/isenkram-autoinstall-firmware -l
140 info: did not find any firmware files requested by loaded kernel modules. exiting
141 %
142 &lt;/pre&gt;&lt;/p&gt;
143
144 &lt;p&gt;The last few days I had a look at several of the around 250
145 packages in Debian with udev rules. These seem like good candidates
146 to install when a given hardware dongle is inserted, and I found
147 several that should be proposed by isenkram. I have not had time to
148 check all of them, but am happy to report that now there are 97
149 packages packages mapped to hardware by Isenkram. 11 of these
150 packages provide hardware mapping using AppStream, while the rest are
151 listed in the modaliases file provided in isenkram.&lt;/p&gt;
152
153 &lt;p&gt;These are the packages with hardware mappings at the moment. The
154 &lt;strong&gt;marked packages&lt;/strong&gt; are also announcing their hardware
155 support using AppStream, for everyone to use:&lt;/p&gt;
156
157 &lt;p&gt;air-quality-sensor, alsa-firmware-loaders, argyll,
158 &lt;strong&gt;array-info&lt;/strong&gt;, avarice, avrdude, b43-fwcutter,
159 bit-babbler, bluez, bluez-firmware, &lt;strong&gt;brltty&lt;/strong&gt;,
160 &lt;strong&gt;broadcom-sta-dkms&lt;/strong&gt;, calibre, cgminer, cheese, colord,
161 &lt;strong&gt;colorhug-client&lt;/strong&gt;, dahdi-firmware-nonfree, dahdi-linux,
162 dfu-util, dolphin-emu, ekeyd, ethtool, firmware-ipw2x00, fprintd,
163 fprintd-demo, &lt;strong&gt;galileo&lt;/strong&gt;, gkrellm-thinkbat, gphoto2,
164 gpsbabel, gpsbabel-gui, gpsman, gpstrans, gqrx-sdr, gr-fcdproplus,
165 gr-osmosdr, gtkpod, hackrf, hdapsd, hdmi2usb-udev, hpijs-ppds, hplip,
166 ipw3945-source, ipw3945d, kde-config-tablet, kinect-audio-setup,
167 &lt;strong&gt;libnxt&lt;/strong&gt;, libpam-fprintd, &lt;strong&gt;lomoco&lt;/strong&gt;,
168 madwimax, minidisc-utils, mkgmap, msi-keyboard, mtkbabel,
169 &lt;strong&gt;nbc&lt;/strong&gt;, &lt;strong&gt;nqc&lt;/strong&gt;, nut-hal-drivers, ola,
170 open-vm-toolbox, open-vm-tools, openambit, pcgminer, pcmciautils,
171 pcscd, pidgin-blinklight, printer-driver-splix,
172 &lt;strong&gt;pymissile&lt;/strong&gt;, python-nxt, qlandkartegt,
173 qlandkartegt-garmin, rosegarden, rt2x00-source, sispmctl,
174 soapysdr-module-hackrf, solaar, squeak-plugins-scratch, sunxi-tools,
175 &lt;strong&gt;t2n&lt;/strong&gt;, thinkfan, thinkfinger-tools, tlp, tp-smapi-dkms,
176 tp-smapi-source, tpb, tucnak, uhd-host, usbmuxd, viking,
177 virtualbox-ose-guest-x11, w1retap, xawtv, xserver-xorg-input-vmmouse,
178 xserver-xorg-input-wacom, xserver-xorg-video-qxl,
179 xserver-xorg-video-vmware, yubikey-personalization and
180 zd1211-firmware&lt;/p&gt;
181
182 &lt;p&gt;If you know of other packages, please let me know with a wishlist
183 bug report against the isenkram-cli package, and ask the package
184 maintainer to
185 &lt;a href=&quot;https://wiki.debian.org/AppStream/Guidelines&quot;&gt;add AppStream
186 metadata according to the guidelines&lt;/a&gt; to provide the information
187 for everyone. In time, I hope to get rid of the isenkram specific
188 hardware mapping and depend exclusively on AppStream.&lt;/p&gt;
189
190 &lt;p&gt;Note, the AppStream metadata for broadcom-sta-dkms is matching too
191 much hardware, and suggest that the package with with any ethernet
192 card. See &lt;a href=&quot;http://bugs.debian.org/838735&quot;&gt;bug #838735&lt;/a&gt; for
193 the details. I hope the maintainer find time to address it soon. In
194 the mean time I provide an override in isenkram.&lt;/p&gt;
195 </description>
196 </item>
197
198 <item>
199 <title>Isenkram, Appstream and udev make life as a LEGO builder easier</title>
200 <link>http://people.skolelinux.org/pere/blog/Isenkram__Appstream_and_udev_make_life_as_a_LEGO_builder_easier.html</link>
201 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Isenkram__Appstream_and_udev_make_life_as_a_LEGO_builder_easier.html</guid>
202 <pubDate>Fri, 7 Oct 2016 09:50:00 +0200</pubDate>
203 <description>&lt;p&gt;&lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;The Isenkram
204 system&lt;/a&gt; provide a practical and easy way to figure out which
205 packages support the hardware in a given machine. The command line
206 tool &lt;tt&gt;isenkram-lookup&lt;/tt&gt; and the tasksel options provide a
207 convenient way to list and install packages relevant for the current
208 hardware during system installation, both user space packages and
209 firmware packages. The GUI background daemon on the other hand provide
210 a pop-up proposing to install packages when a new dongle is inserted
211 while using the computer. For example, if you plug in a smart card
212 reader, the system will ask if you want to install &lt;tt&gt;pcscd&lt;/tt&gt; if
213 that package isn&#39;t already installed, and if you plug in a USB video
214 camera the system will ask if you want to install &lt;tt&gt;cheese&lt;/tt&gt; if
215 cheese is currently missing. This already work just fine.&lt;/p&gt;
216
217 &lt;p&gt;But Isenkram depend on a database mapping from hardware IDs to
218 package names. When I started no such database existed in Debian, so
219 I made my own data set and included it with the isenkram package and
220 made isenkram fetch the latest version of this database from git using
221 http. This way the isenkram users would get updated package proposals
222 as soon as I learned more about hardware related packages.&lt;/p&gt;
223
224 &lt;p&gt;The hardware is identified using modalias strings. The modalias
225 design is from the Linux kernel where most hardware descriptors are
226 made available as a strings that can be matched using filename style
227 globbing. It handle USB, PCI, DMI and a lot of other hardware related
228 identifiers.&lt;/p&gt;
229
230 &lt;p&gt;The downside to the Isenkram specific database is that there is no
231 information about relevant distribution / Debian version, making
232 isenkram propose obsolete packages too. But along came AppStream, a
233 cross distribution mechanism to store and collect metadata about
234 software packages. When I heard about the proposal, I contacted the
235 people involved and suggested to add a hardware matching rule using
236 modalias strings in the specification, to be able to use AppStream for
237 mapping hardware to packages. This idea was accepted and AppStream is
238 now a great way for a package to announce the hardware it support in a
239 distribution neutral way. I wrote
240 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html&quot;&gt;a
241 recipe on how to add such meta-information&lt;/a&gt; in a blog post last
242 December. If you have a hardware related package in Debian, please
243 announce the relevant hardware IDs using AppStream.&lt;/p&gt;
244
245 &lt;p&gt;In Debian, almost all packages that can talk to a LEGO Mindestorms
246 RCX or NXT unit, announce this support using AppStream. The effect is
247 that when you insert such LEGO robot controller into your Debian
248 machine, Isenkram will propose to install the packages needed to get
249 it working. The intention is that this should allow the local user to
250 start programming his robot controller right away without having to
251 guess what packages to use or which permissions to fix.&lt;/p&gt;
252
253 &lt;p&gt;But when I sat down with my son the other day to program our NXT
254 unit using his Debian Stretch computer, I discovered something
255 annoying. The local console user (ie my son) did not get access to
256 the USB device for programming the unit. This used to work, but no
257 longer in Jessie and Stretch. After some investigation and asking
258 around on #debian-devel, I discovered that this was because udev had
259 changed the mechanism used to grant access to local devices. The
260 ConsoleKit mechanism from &lt;tt&gt;/lib/udev/rules.d/70-udev-acl.rules&lt;/tt&gt;
261 no longer applied, because LDAP users no longer was added to the
262 plugdev group during login. Michael Biebl told me that this method
263 was obsolete and the new method used ACLs instead. This was good
264 news, as the plugdev mechanism is a mess when using a remote user
265 directory like LDAP. Using ACLs would make sure a user lost device
266 access when she logged out, even if the user left behind a background
267 process which would retain the plugdev membership with the ConsoleKit
268 setup. Armed with this knowledge I moved on to fix the access problem
269 for the LEGO Mindstorms related packages.&lt;/p&gt;
270
271 &lt;p&gt;The new system uses a udev tag, &#39;uaccess&#39;. It can either be
272 applied directly for a device, or is applied in
273 /lib/udev/rules.d/70-uaccess.rules for classes of devices. As the
274 LEGO Mindstorms udev rules did not have a class, I decided to add the
275 tag directly in the udev rules files included in the packages. Here
276 is one example. For the nqc C compiler for the RCX, the
277 &lt;tt&gt;/lib/udev/rules.d/60-nqc.rules&lt;/tt&gt; file now look like this:
278
279 &lt;p&gt;&lt;pre&gt;
280 SUBSYSTEM==&quot;usb&quot;, ACTION==&quot;add&quot;, ATTR{idVendor}==&quot;0694&quot;, ATTR{idProduct}==&quot;0001&quot;, \
281 SYMLINK+=&quot;rcx-%k&quot;, TAG+=&quot;uaccess&quot;
282 &lt;/pre&gt;&lt;/p&gt;
283
284 &lt;p&gt;The key part is the &#39;TAG+=&quot;uaccess&quot;&#39; at the end. I suspect all
285 packages using plugdev in their /lib/udev/rules.d/ files should be
286 changed to use this tag (either directly or indirectly via
287 &lt;tt&gt;70-uaccess.rules&lt;/tt&gt;). Perhaps a lintian check should be created
288 to detect this?&lt;/p&gt;
289
290 &lt;p&gt;I&#39;ve been unable to find good documentation on the uaccess feature.
291 It is unclear to me if the uaccess tag is an internal implementation
292 detail like the udev-acl tag used by
293 &lt;tt&gt;/lib/udev/rules.d/70-udev-acl.rules&lt;/tt&gt;. If it is, I guess the
294 indirect method is the preferred way. Michael
295 &lt;a href=&quot;https://github.com/systemd/systemd/issues/4288&quot;&gt;asked for more
296 documentation from the systemd project&lt;/a&gt; and I hope it will make
297 this clearer. For now I use the generic classes when they exist and
298 is already handled by &lt;tt&gt;70-uaccess.rules&lt;/tt&gt;, and add the tag
299 directly if no such class exist.&lt;/p&gt;
300
301 &lt;p&gt;To learn more about the isenkram system, please check out
302 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;my
303 blog posts tagged isenkram&lt;/a&gt;.&lt;/p&gt;
304
305 &lt;p&gt;To help out making life for LEGO constructors in Debian easier,
306 please join us on our IRC channel
307 &lt;a href=&quot;irc://irc.debian.org/%23debian-lego&quot;&gt;#debian-lego&lt;/a&gt; and join
308 the &lt;a href=&quot;https://alioth.debian.org/projects/debian-lego/&quot;&gt;Debian
309 LEGO team&lt;/a&gt; in the Alioth project we created yesterday. A mailing
310 list is not yet created, but we are working on it. :)&lt;/p&gt;
311
312 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
313 activities, please send Bitcoin donations to my address
314 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&amp;label=PetterReinholdtsenBlog&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
315 </description>
316 </item>
317
318 <item>
319 <title>Isenkram with PackageKit support - new version 0.23 available in Debian unstable</title>
320 <link>http://people.skolelinux.org/pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</link>
321 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</guid>
322 <pubDate>Wed, 25 May 2016 10:20:00 +0200</pubDate>
323 <description>&lt;p&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/isenkram&quot;&gt;The isenkram
324 system&lt;/a&gt; is a user-focused solution in Debian for handling hardware
325 related packages. The idea is to have a database of mappings between
326 hardware and packages, and pop up a dialog suggesting for the user to
327 install the packages to use a given hardware dongle. Some use cases
328 are when you insert a Yubikey, it proposes to install the software
329 needed to control it; when you insert a braille reader list it
330 proposes to install the packages needed to send text to the reader;
331 and when you insert a ColorHug screen calibrator it suggests to
332 install the driver for it. The system work well, and even have a few
333 command line tools to install firmware packages and packages for the
334 hardware already in the machine (as opposed to hotpluggable hardware).&lt;/p&gt;
335
336 &lt;p&gt;The system was initially written using aptdaemon, because I found
337 good documentation and example code on how to use it. But aptdaemon
338 is going away and is generally being replaced by
339 &lt;a href=&quot;http://www.freedesktop.org/software/PackageKit/&quot;&gt;PackageKit&lt;/a&gt;,
340 so Isenkram needed a rewrite. And today, thanks to the great patch
341 from my college Sunil Mohan Adapa in the FreedomBox project, the
342 rewrite finally took place. I&#39;ve just uploaded a new version of
343 Isenkram into Debian Unstable with the patch included, and the default
344 for the background daemon is now to use PackageKit. To check it out,
345 install the &lt;tt&gt;isenkram&lt;/tt&gt; package and insert some hardware dongle
346 and see if it is recognised.&lt;/p&gt;
347
348 &lt;p&gt;If you want to know what kind of packages isenkram would propose for
349 the machine it is running on, you can check out the isenkram-lookup
350 program. This is what it look like on a Thinkpad X230:&lt;/p&gt;
351
352 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
353 % isenkram-lookup
354 bluez
355 cheese
356 fprintd
357 fprintd-demo
358 gkrellm-thinkbat
359 hdapsd
360 libpam-fprintd
361 pidgin-blinklight
362 thinkfan
363 tleds
364 tp-smapi-dkms
365 tp-smapi-source
366 tpb
367 %p
368 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
369
370 &lt;p&gt;The hardware mappings come from several places. The preferred way
371 is for packages to announce their hardware support using
372 &lt;a href=&quot;https://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
373 cross distribution appstream system&lt;/a&gt;.
374 See
375 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;previous
376 blog posts about isenkram&lt;/a&gt; to learn how to do that.&lt;/p&gt;
377 </description>
378 </item>
379
380 <item>
381 <title>Using appstream with isenkram to install hardware related packages in Debian</title>
382 <link>http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</link>
383 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</guid>
384 <pubDate>Sun, 20 Dec 2015 12:20:00 +0100</pubDate>
385 <description>&lt;p&gt;Around three years ago, I created
386 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;the isenkram
387 system&lt;/a&gt; to get a more practical solution in Debian for handing
388 hardware related packages. A GUI system in the isenkram package will
389 present a pop-up dialog when some hardware dongle supported by
390 relevant packages in Debian is inserted into the machine. The same
391 lookup mechanism to detect packages is available as command line
392 tools in the isenkram-cli package. In addition to mapping hardware,
393 it will also map kernel firmware files to packages and make it easy to
394 install needed firmware packages automatically. The key for this
395 system to work is a good way to map hardware to packages, in other
396 words, allow packages to announce what hardware they will work
397 with.&lt;/p&gt;
398
399 &lt;p&gt;I started by providing data files in the isenkram source, and
400 adding code to download the latest version of these data files at run
401 time, to ensure every user had the most up to date mapping available.
402 I also added support for storing the mapping in the Packages file in
403 the apt repositories, but did not push this approach because while I
404 was trying to figure out how to best store hardware/package mappings,
405 &lt;a href=&quot;http://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
406 appstream system&lt;/a&gt; was announced. I got in touch and suggested to
407 add the hardware mapping into that data set to be able to use
408 appstream as a data source, and this was accepted at least for the
409 Debian version of appstream.&lt;/p&gt;
410
411 &lt;p&gt;A few days ago using appstream in Debian for this became possible,
412 and today I uploaded a new version 0.20 of isenkram adding support for
413 appstream as a data source for mapping hardware to packages. The only
414 package so far using appstream to announce its hardware support is my
415 pymissile package. I got help from Matthias Klumpp with figuring out
416 how do add the required
417 &lt;a href=&quot;https://appstream.debian.org/html/sid/main/metainfo/pymissile.html&quot;&gt;metadata
418 in pymissile&lt;/a&gt;. I added a file debian/pymissile.metainfo.xml with
419 this content:&lt;/p&gt;
420
421 &lt;blockquote&gt;&lt;pre&gt;
422 &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
423 &amp;lt;component&amp;gt;
424 &amp;lt;id&amp;gt;pymissile&amp;lt;/id&amp;gt;
425 &amp;lt;metadata_license&amp;gt;MIT&amp;lt;/metadata_license&amp;gt;
426 &amp;lt;name&amp;gt;pymissile&amp;lt;/name&amp;gt;
427 &amp;lt;summary&amp;gt;Control original Striker USB Missile Launcher&amp;lt;/summary&amp;gt;
428 &amp;lt;description&amp;gt;
429 &amp;lt;p&amp;gt;
430 Pymissile provides a curses interface to control an original
431 Marks and Spencer / Striker USB Missile Launcher, as well as a
432 motion control script to allow a webcamera to control the
433 launcher.
434 &amp;lt;/p&amp;gt;
435 &amp;lt;/description&amp;gt;
436 &amp;lt;provides&amp;gt;
437 &amp;lt;modalias&amp;gt;usb:v1130p0202d*&amp;lt;/modalias&amp;gt;
438 &amp;lt;/provides&amp;gt;
439 &amp;lt;/component&amp;gt;
440 &lt;/pre&gt;&lt;/blockquote&gt;
441
442 &lt;p&gt;The key for isenkram is the component/provides/modalias value,
443 which is a glob style match rule for hardware specific strings
444 (modalias strings) provided by the Linux kernel. In this case, it
445 will map to all USB devices with vendor code 1130 and product code
446 0202.&lt;/p&gt;
447
448 &lt;p&gt;Note, it is important that the license of all the metadata files
449 are compatible to have permissions to aggregate them into archive wide
450 appstream files. Matthias suggested to use MIT or BSD licenses for
451 these files. A challenge is figuring out a good id for the data, as
452 it is supposed to be globally unique and shared across distributions
453 (in other words, best to coordinate with upstream what to use). But
454 it can be changed later or, so we went with the package name as
455 upstream for this project is dormant.&lt;/p&gt;
456
457 &lt;p&gt;To get the metadata file installed in the correct location for the
458 mirror update scripts to pick it up and include its content the
459 appstream data source, the file must be installed in the binary
460 package under /usr/share/appdata/. I did this by adding the following
461 line to debian/pymissile.install:&lt;/p&gt;
462
463 &lt;blockquote&gt;&lt;pre&gt;
464 debian/pymissile.metainfo.xml usr/share/appdata
465 &lt;/pre&gt;&lt;/blockquote&gt;
466
467 &lt;p&gt;With that in place, the command line tool isenkram-lookup will list
468 all packages useful on the current computer automatically, and the GUI
469 pop-up handler will propose to install the package not already
470 installed if a hardware dongle is inserted into the machine in
471 question.&lt;/p&gt;
472
473 &lt;p&gt;Details of the modalias field in appstream is available from the
474 &lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;DEP-11&lt;/a&gt; proposal.&lt;/p&gt;
475
476 &lt;p&gt;To locate the modalias values of all hardware present in a machine,
477 try running this command on the command line:&lt;/p&gt;
478
479 &lt;blockquote&gt;&lt;pre&gt;
480 cat $(find /sys/devices/|grep modalias)
481 &lt;/pre&gt;&lt;/blockquote&gt;
482
483 &lt;p&gt;To learn more about the isenkram system, please check out
484 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;my
485 blog posts tagged isenkram&lt;/a&gt;.&lt;/p&gt;
486 </description>
487 </item>
488
489 <item>
490 <title>Debian Jessie, PXE and automatic firmware installation</title>
491 <link>http://people.skolelinux.org/pere/blog/Debian_Jessie__PXE_and_automatic_firmware_installation.html</link>
492 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Debian_Jessie__PXE_and_automatic_firmware_installation.html</guid>
493 <pubDate>Fri, 17 Oct 2014 14:10:00 +0200</pubDate>
494 <description>&lt;p&gt;When PXE installing laptops with Debian, I often run into the
495 problem that the WiFi card require some firmware to work properly.
496 And it has been a pain to fix this using preseeding in Debian.
497 Normally something more is needed. But thanks to
498 &lt;a href=&quot;https://packages.qa.debian.org/i/isenkram.html&quot;&gt;my isenkram
499 package&lt;/a&gt; and its recent tasksel extension, it has now become easy
500 to do this using simple preseeding.&lt;/p&gt;
501
502 &lt;p&gt;The isenkram-cli package provide tasksel tasks which will install
503 firmware for the hardware found in the machine (actually, requested by
504 the kernel modules for the hardware). (It can also install user space
505 programs supporting the hardware detected, but that is not the focus
506 of this story.)&lt;/p&gt;
507
508 &lt;p&gt;To get this working in the default installation, two preeseding
509 values are needed. First, the isenkram-cli package must be installed
510 into the target chroot (aka the hard drive) before tasksel is executed
511 in the pkgsel step of the debian-installer system. This is done by
512 preseeding the base-installer/includes debconf value to include the
513 isenkram-cli package. The package name is next passed to debootstrap
514 for installation. With the isenkram-cli package in place, tasksel
515 will automatically use the isenkram tasks to detect hardware specific
516 packages for the machine being installed and install them, because
517 isenkram-cli contain tasksel tasks.&lt;/p&gt;
518
519 &lt;p&gt;Second, one need to enable the non-free APT repository, because
520 most firmware unfortunately is non-free. This is done by preseeding
521 the apt-mirror-setup step. This is unfortunate, but for a lot of
522 hardware it is the only option in Debian.&lt;/p&gt;
523
524 &lt;p&gt;The end result is two lines needed in your preseeding file to get
525 firmware installed automatically by the installer:&lt;/p&gt;
526
527 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
528 base-installer base-installer/includes string isenkram-cli
529 apt-mirror-setup apt-setup/non-free boolean true
530 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
531
532 &lt;p&gt;The current version of isenkram-cli in testing/jessie will install
533 both firmware and user space packages when using this method. It also
534 do not work well, so use version 0.15 or later. Installing both
535 firmware and user space packages might give you a bit more than you
536 want, so I decided to split the tasksel task in two, one for firmware
537 and one for user space programs. The firmware task is enabled by
538 default, while the one for user space programs is not. This split is
539 implemented in the package currently in unstable.&lt;/p&gt;
540
541 &lt;p&gt;If you decide to give this a go, please let me know (via email) how
542 this recipe work for you. :)&lt;/p&gt;
543
544 &lt;p&gt;So, I bet you are wondering, how can this work. First and
545 foremost, it work because tasksel is modular, and driven by whatever
546 files it find in /usr/lib/tasksel/ and /usr/share/tasksel/. So the
547 isenkram-cli package place two files for tasksel to find. First there
548 is the task description file (/usr/share/tasksel/descs/isenkram.desc):&lt;/p&gt;
549
550 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
551 Task: isenkram-packages
552 Section: hardware
553 Description: Hardware specific packages (autodetected by isenkram)
554 Based on the detected hardware various hardware specific packages are
555 proposed.
556 Test-new-install: show show
557 Relevance: 8
558 Packages: for-current-hardware
559
560 Task: isenkram-firmware
561 Section: hardware
562 Description: Hardware specific firmware packages (autodetected by isenkram)
563 Based on the detected hardware various hardware specific firmware
564 packages are proposed.
565 Test-new-install: mark show
566 Relevance: 8
567 Packages: for-current-hardware-firmware
568 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
569
570 &lt;p&gt;The key parts are Test-new-install which indicate how the task
571 should be handled and the Packages line referencing to a script in
572 /usr/lib/tasksel/packages/. The scripts use other scripts to get a
573 list of packages to install. The for-current-hardware-firmware script
574 look like this to list relevant firmware for the machine:
575
576 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
577 #!/bin/sh
578 #
579 PATH=/usr/sbin:$PATH
580 export PATH
581 isenkram-autoinstall-firmware -l
582 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
583
584 &lt;p&gt;With those two pieces in place, the firmware is installed by
585 tasksel during the normal d-i run. :)&lt;/p&gt;
586
587 &lt;p&gt;If you want to test what tasksel will install when isenkram-cli is
588 installed, run &lt;tt&gt;DEBIAN_PRIORITY=critical tasksel --test
589 --new-install&lt;/tt&gt; to get the list of packages that tasksel would
590 install.&lt;/p&gt;
591
592 &lt;p&gt;&lt;a href=&quot;https://wiki.debian.org/DebianEdu/&quot;&gt;Debian Edu&lt;/a&gt; will be
593 pilots in testing this feature, as isenkram is used there now to
594 install firmware, replacing the earlier scripts.&lt;/p&gt;
595 </description>
596 </item>
597
598 <item>
599 <title>Install hardware dependent packages using tasksel (Isenkram 0.7)</title>
600 <link>http://people.skolelinux.org/pere/blog/Install_hardware_dependent_packages_using_tasksel__Isenkram_0_7_.html</link>
601 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Install_hardware_dependent_packages_using_tasksel__Isenkram_0_7_.html</guid>
602 <pubDate>Wed, 23 Apr 2014 14:50:00 +0200</pubDate>
603 <description>&lt;p&gt;It would be nice if it was easier in Debian to get all the hardware
604 related packages relevant for the computer installed automatically.
605 So I implemented one, using
606 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;my Isenkram
607 package&lt;/a&gt;. To use it, install the tasksel and isenkram packages and
608 run tasksel as user root. You should be presented with a new option,
609 &quot;Hardware specific packages (autodetected by isenkram)&quot;. When you
610 select it, tasksel will install the packages isenkram claim is fit for
611 the current hardware, hot pluggable or not.&lt;p&gt;
612
613 &lt;p&gt;The implementation is in two files, one is the tasksel menu entry
614 description, and the other is the script used to extract the list of
615 packages to install. The first part is in
616 &lt;tt&gt;/usr/share/tasksel/descs/isenkram.desc&lt;/tt&gt; and look like
617 this:&lt;/p&gt;
618
619 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
620 Task: isenkram
621 Section: hardware
622 Description: Hardware specific packages (autodetected by isenkram)
623 Based on the detected hardware various hardware specific packages are
624 proposed.
625 Test-new-install: mark show
626 Relevance: 8
627 Packages: for-current-hardware
628 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
629
630 &lt;p&gt;The second part is in
631 &lt;tt&gt;/usr/lib/tasksel/packages/for-current-hardware&lt;/tt&gt; and look like
632 this:&lt;/p&gt;
633
634 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
635 #!/bin/sh
636 #
637 (
638 isenkram-lookup
639 isenkram-autoinstall-firmware -l
640 ) | sort -u
641 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
642
643 &lt;p&gt;All in all, a very short and simple implementation making it
644 trivial to install the hardware dependent package we all may want to
645 have installed on our machines. I&#39;ve not been able to find a way to
646 get tasksel to tell you exactly which packages it plan to install
647 before doing the installation. So if you are curious or careful,
648 check the output from the isenkram-* command line tools first.&lt;/p&gt;
649
650 &lt;p&gt;The information about which packages are handling which hardware is
651 fetched either from the isenkram package itself in
652 /usr/share/isenkram/, from git.debian.org or from the APT package
653 database (using the Modaliases header). The APT package database
654 parsing have caused a nasty resource leak in the isenkram daemon (bugs
655 &lt;a href=&quot;http://bugs.debian.org/719837&quot;&gt;#719837&lt;/a&gt; and
656 &lt;a href=&quot;http://bugs.debian.org/730704&quot;&gt;#730704&lt;/a&gt;). The cause is in
657 the python-apt code (bug
658 &lt;a href=&quot;http://bugs.debian.org/745487&quot;&gt;#745487&lt;/a&gt;), but using a
659 workaround I was able to get rid of the file descriptor leak and
660 reduce the memory leak from ~30 MiB per hardware detection down to
661 around 2 MiB per hardware detection. It should make the desktop
662 daemon a lot more useful. The fix is in version 0.7 uploaded to
663 unstable today.&lt;/p&gt;
664
665 &lt;p&gt;I believe the current way of mapping hardware to packages in
666 Isenkram is is a good draft, but in the future I expect isenkram to
667 use the AppStream data source for this. A proposal for getting proper
668 AppStream support into Debian is floating around as
669 &lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;DEP-11&lt;/a&gt;, and
670 &lt;a href=&quot;https://wiki.debian.org/SummerOfCode2014/Projects#SummerOfCode2014.2FProjects.2FAppStreamDEP11Implementation.AppStream.2FDEP-11_for_the_Debian_Archive&quot;&gt;GSoC
671 project&lt;/a&gt; will take place this summer to improve the situation. I
672 look forward to seeing the result, and welcome patches for isenkram to
673 start using the information when it is ready.&lt;/p&gt;
674
675 &lt;p&gt;If you want your package to map to some specific hardware, either
676 add a &quot;Xb-Modaliases&quot; header to your control file like I did in
677 &lt;a href=&quot;http://packages.qa.debian.org/pymissile&quot;&gt;the pymissile
678 package&lt;/a&gt; or submit a bug report with the details to the isenkram
679 package. See also
680 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;all my
681 blog posts tagged isenkram&lt;/a&gt; for details on the notation. I expect
682 the information will be migrated to AppStream eventually, but for the
683 moment I got no better place to store it.&lt;/p&gt;
684 </description>
685 </item>
686
687 <item>
688 <title>Automatically locate and install required firmware packages on Debian (Isenkram 0.4)</title>
689 <link>http://people.skolelinux.org/pere/blog/Automatically_locate_and_install_required_firmware_packages_on_Debian__Isenkram_0_4_.html</link>
690 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Automatically_locate_and_install_required_firmware_packages_on_Debian__Isenkram_0_4_.html</guid>
691 <pubDate>Tue, 25 Jun 2013 11:50:00 +0200</pubDate>
692 <description>&lt;p&gt;It annoys me when the computer fail to do automatically what it is
693 perfectly capable of, and I have to do it manually to get things
694 working. One such task is to find out what firmware packages are
695 needed to get the hardware on my computer working. Most often this
696 affect the wifi card, but some times it even affect the RAID
697 controller or the ethernet card. Today I pushed version 0.4 of the
698 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;Isenkram package&lt;/a&gt;
699 including a new script isenkram-autoinstall-firmware handling the
700 process of asking all the loaded kernel modules what firmware files
701 they want, find debian packages providing these files and install the
702 debian packages. Here is a test run on my laptop:&lt;/p&gt;
703
704 &lt;p&gt;&lt;pre&gt;
705 # isenkram-autoinstall-firmware
706 info: kernel drivers requested extra firmware: ipw2200-bss.fw ipw2200-ibss.fw ipw2200-sniffer.fw
707 info: fetching http://http.debian.net/debian/dists/squeeze/Contents-i386.gz
708 info: locating packages with the requested firmware files
709 info: Updating APT sources after adding non-free APT source
710 info: trying to install firmware-ipw2x00
711 firmware-ipw2x00
712 firmware-ipw2x00
713 Preconfiguring packages ...
714 Selecting previously deselected package firmware-ipw2x00.
715 (Reading database ... 259727 files and directories currently installed.)
716 Unpacking firmware-ipw2x00 (from .../firmware-ipw2x00_0.28+squeeze1_all.deb) ...
717 Setting up firmware-ipw2x00 (0.28+squeeze1) ...
718 #
719 &lt;/pre&gt;&lt;/p&gt;
720
721 &lt;p&gt;When all the requested firmware is present, a simple message is
722 printed instead:&lt;/p&gt;
723
724 &lt;p&gt;&lt;pre&gt;
725 # isenkram-autoinstall-firmware
726 info: did not find any firmware files requested by loaded kernel modules. exiting
727 #
728 &lt;/pre&gt;&lt;/p&gt;
729
730 &lt;p&gt;It could use some polish, but it is already working well and saving
731 me some time when setting up new machines. :)&lt;/p&gt;
732
733 &lt;p&gt;So, how does it work? It look at the set of currently loaded
734 kernel modules, and look up each one of them using modinfo, to find
735 the firmware files listed in the module meta-information. Next, it
736 download the Contents file from a nearby APT mirror, and search for
737 the firmware files in this file to locate the package with the
738 requested firmware file. If the package is in the non-free section, a
739 non-free APT source is added and the package is installed using
740 &lt;tt&gt;apt-get install&lt;/tt&gt;. The end result is a slightly better working
741 machine.&lt;/p&gt;
742
743 &lt;p&gt;I hope someone find time to implement a more polished version of
744 this script as part of the hw-detect debian-installer module, to
745 finally fix &lt;a href=&quot;http://bugs.debian.org/655507&quot;&gt;BTS report
746 #655507&lt;/a&gt;. There really is no need to insert USB sticks with
747 firmware during a PXE install when the packages already are available
748 from the nearby Debian mirror.&lt;/p&gt;
749 </description>
750 </item>
751
752 <item>
753 <title>Isenkram 0.2 finally in the Debian archive</title>
754 <link>http://people.skolelinux.org/pere/blog/Isenkram_0_2_finally_in_the_Debian_archive.html</link>
755 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Isenkram_0_2_finally_in_the_Debian_archive.html</guid>
756 <pubDate>Wed, 3 Apr 2013 23:40:00 +0200</pubDate>
757 <description>&lt;p&gt;Today the &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;Isenkram
758 package&lt;/a&gt; finally made it into the archive, after lingering in NEW
759 for many months. I uploaded it to the Debian experimental suite
760 2013-01-27, and today it was accepted into the archive.&lt;/p&gt;
761
762 &lt;p&gt;Isenkram is a system for suggesting to users what packages to
763 install to work with a pluggable hardware device. The suggestion pop
764 up when the device is plugged in. For example if a Lego Mindstorm NXT
765 is inserted, it will suggest to install the program needed to program
766 the NXT controller. Give it a go, and report bugs and suggestions to
767 BTS. :)&lt;/p&gt;
768 </description>
769 </item>
770
771 <item>
772 <title>Welcome to the world, Isenkram!</title>
773 <link>http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</link>
774 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</guid>
775 <pubDate>Tue, 22 Jan 2013 22:00:00 +0100</pubDate>
776 <description>&lt;p&gt;Yesterday, I
777 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html&quot;&gt;asked
778 for testers&lt;/a&gt; for my prototype for making Debian better at handling
779 pluggable hardware devices, which I
780 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;set
781 out to create&lt;/a&gt; earlier this month. Several valuable testers showed
782 up, and caused me to really want to to open up the development to more
783 people. But before I did this, I want to come up with a sensible name
784 for this project. Today I finally decided on a new name, and I have
785 renamed the project from hw-support-handler to this new name. In the
786 process, I moved the source to git and made it available as a
787 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git&quot;&gt;collab-maint&lt;/a&gt;
788 repository in Debian. The new name? It is &lt;strong&gt;Isenkram&lt;/strong&gt;.
789 To fetch and build the latest version of the source, use&lt;/p&gt;
790
791 &lt;pre&gt;
792 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
793 cd isenkram &amp;&amp; git-buildpackage -us -uc
794 &lt;/pre&gt;
795
796 &lt;p&gt;I have not yet adjusted all files to use the new name yet. If you
797 want to hack on the source or improve the package, please go ahead.
798 But please talk to me first on IRC or via email before you do major
799 changes, to make sure we do not step on each others toes. :)&lt;/p&gt;
800
801 &lt;p&gt;If you wonder what &#39;isenkram&#39; is, it is a Norwegian word for iron
802 stuff, typically meaning tools, nails, screws, etc. Typical hardware
803 stuff, in other words. I&#39;ve been told it is the Norwegian variant of
804 the German word eisenkram, for those that are familiar with that
805 word.&lt;/p&gt;
806
807 &lt;p&gt;&lt;strong&gt;Update 2013-01-26&lt;/strong&gt;: Added -us -us to build
808 instructions, to avoid confusing people with an error from the signing
809 process.&lt;/p&gt;
810
811 &lt;p&gt;&lt;strong&gt;Update 2013-01-27&lt;/strong&gt;: Switch to HTTP URL for the git
812 clone argument to avoid the need for authentication.&lt;/p&gt;
813 </description>
814 </item>
815
816 <item>
817 <title>First prototype ready making hardware easier to use in Debian</title>
818 <link>http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</link>
819 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</guid>
820 <pubDate>Mon, 21 Jan 2013 12:00:00 +0100</pubDate>
821 <description>&lt;p&gt;Early this month I set out to try to
822 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;improve
823 the Debian support for pluggable hardware devices&lt;/a&gt;. Now my
824 prototype is working, and it is ready for a larger audience. To test
825 it, fetch the
826 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;source
827 from the Debian Edu subversion repository&lt;/a&gt;, build and install the
828 package. You might have to log out and in again activate the
829 autostart script.&lt;/p&gt;
830
831 &lt;p&gt;The design is simple:&lt;/p&gt;
832
833 &lt;ul&gt;
834
835 &lt;li&gt;Add desktop entry in /usr/share/autostart/ causing a program
836 hw-support-handlerd to start when the user log in.&lt;/li&gt;
837
838 &lt;li&gt;This program listen for kernel events about new hardware (directly
839 from the kernel like udev does), not using HAL dbus events as I
840 initially did.&lt;/li&gt;
841
842 &lt;li&gt;When new hardware is inserted, look up the hardware modalias in
843 the APT database, a database
844 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup&quot;&gt;available
845 via HTTP&lt;/a&gt; and a database available as part of the package.&lt;/li&gt;
846
847 &lt;li&gt;If a package is mapped to the hardware in question, the package
848 isn&#39;t installed yet and this is the first time the hardware was
849 plugged in, show a desktop notification suggesting to install the
850 package or packages.&lt;/li&gt;
851
852 &lt;li&gt;If the user click on the &#39;install package now&#39; button, ask
853 aptdaemon via the PackageKit API to install the requrired package.&lt;/li&gt;
854
855 &lt;li&gt;aptdaemon ask for root password or sudo password, and install the
856 package while showing progress information in a window.&lt;/li&gt;
857
858 &lt;/ul&gt;
859
860 &lt;p&gt;I still need to come up with a better name for the system. Here
861 are some screen shots showing the prototype in action. First the
862 notification, then the password request, and finally the request to
863 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.&lt;/p&gt;
864
865 &lt;p&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-1-notification.png&quot;&gt;
866 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-2-password.png&quot;&gt;
867 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-3-dependencies.png&quot;&gt;
868 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-4-installing.png&quot;&gt;
869 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-5-installing-details.png&quot; width=&quot;70%&quot;&gt;&lt;/p&gt;
870
871 &lt;p&gt;The prototype still need to be improved with longer timeouts, but
872 is already useful. The database of hardware to package mappings also
873 need more work. It is currently compatible with the Ubuntu way of
874 storing such information in the package control file, but could be
875 changed to use other formats instead or in addition to the current
876 method. I&#39;ve dropped the use of discover for this mapping, as the
877 modalias approach is more flexible and easier to use on Linux as long
878 as the Linux kernel expose its modalias strings directly.&lt;/p&gt;
879
880 &lt;p&gt;&lt;strong&gt;Update 2013-01-21 16:50&lt;/strong&gt;: Due to popular demand,
881 here is the command required to check out and build the source: Use
882 &#39;&lt;tt&gt;svn checkout
883 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
884 hw-support-handler; debuild&lt;/tt&gt;&#39;. If you lack debuild, install the
885 devscripts package.&lt;/p&gt;
886
887 &lt;p&gt;&lt;strong&gt;Update 2013-01-23 12:00&lt;/strong&gt;: The project is now
888 renamed to Isenkram and the source moved from the Debian Edu
889 subversion repository to a Debian collab-maint git repository. See
890 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html&quot;&gt;build
891 instructions&lt;/a&gt; for details.&lt;/p&gt;
892 </description>
893 </item>
894
895 <item>
896 <title>Using modalias info to find packages handling my hardware</title>
897 <link>http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</link>
898 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</guid>
899 <pubDate>Tue, 15 Jan 2013 08:00:00 +0100</pubDate>
900 <description>&lt;p&gt;Yesterday, I wrote about the
901 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html&quot;&gt;modalias
902 values provided by the Linux kernel&lt;/a&gt; following my hope for
903 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;better
904 dongle support in Debian&lt;/a&gt;. Using this knowledge, I have tested how
905 modalias values attached to package names can be used to map packages
906 to hardware. This allow the system to look up and suggest relevant
907 packages when I plug in some new hardware into my machine, and replace
908 discover and discover-data as the database used to map hardware to
909 packages.&lt;/p&gt;
910
911 &lt;p&gt;I create a modaliases file with entries like the following,
912 containing package name, kernel module name (if relevant, otherwise
913 the package name) and globs matching the relevant hardware
914 modalias.&lt;/p&gt;
915
916 &lt;p&gt;&lt;blockquote&gt;
917 Package: package-name
918 &lt;br&gt;Modaliases: module(modaliasglob, modaliasglob, modaliasglob)&lt;/p&gt;
919 &lt;/blockquote&gt;&lt;/p&gt;
920
921 &lt;p&gt;It is fairly trivial to write code to find the relevant packages
922 for a given modalias value using this file.&lt;/p&gt;
923
924 &lt;p&gt;An entry like this would suggest the video and picture application
925 cheese for many USB web cameras (interface bus class 0E01):&lt;/p&gt;
926
927 &lt;p&gt;&lt;blockquote&gt;
928 Package: cheese
929 &lt;br&gt;Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)&lt;/p&gt;
930 &lt;/blockquote&gt;&lt;/p&gt;
931
932 &lt;p&gt;An entry like this would suggest the pcmciautils package when a
933 CardBus bridge (bus class 0607) PCI device is present:&lt;/p&gt;
934
935 &lt;p&gt;&lt;blockquote&gt;
936 Package: pcmciautils
937 &lt;br&gt;Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
938 &lt;/blockquote&gt;&lt;/p&gt;
939
940 &lt;p&gt;An entry like this would suggest the package colorhug-client when
941 plugging in a ColorHug with USB IDs 04D8:F8DA:&lt;/p&gt;
942
943 &lt;p&gt;&lt;blockquote&gt;
944 Package: colorhug-client
945 &lt;br&gt;Modaliases: colorhug-client(usb:v04D8pF8DAd*)&lt;/p&gt;
946 &lt;/blockquote&gt;&lt;/p&gt;
947
948 &lt;p&gt;I believe the format is compatible with the format of the Packages
949 file in the Debian archive. Ubuntu already uses their Packages file
950 to store their mappings from packages to hardware.&lt;/p&gt;
951
952 &lt;p&gt;By adding a XB-Modaliases: header in debian/control, any .deb can
953 announce the hardware it support in a way my prototype understand.
954 This allow those publishing packages in an APT source outside the
955 Debian archive as well as those backporting packages to make sure the
956 hardware mapping are included in the package meta information. I&#39;ve
957 tested such header in the pymissile package, and its modalias mapping
958 is working as it should with my prototype. It even made it to Ubuntu
959 Raring.&lt;/p&gt;
960
961 &lt;p&gt;To test if it was possible to look up supported hardware using only
962 the shell tools available in the Debian installer, I wrote a shell
963 implementation of the lookup code. The idea is to create files for
964 each modalias and let the shell do the matching. Please check out and
965 try the
966 &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;
967 shell script. It run without any extra dependencies and fetch the
968 hardware mappings from the Debian archive and the subversion
969 repository where I currently work on my prototype.&lt;/p&gt;
970
971 &lt;p&gt;When I use it on a machine with a yubikey inserted, it suggest to
972 install yubikey-personalization:&lt;/p&gt;
973
974 &lt;p&gt;&lt;blockquote&gt;
975 % ./hw-support-lookup
976 &lt;br&gt;yubikey-personalization
977 &lt;br&gt;%
978 &lt;/blockquote&gt;&lt;/p&gt;
979
980 &lt;p&gt;When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
981 propose to install the pcmciautils package:&lt;/p&gt;
982
983 &lt;p&gt;&lt;blockquote&gt;
984 % ./hw-support-lookup
985 &lt;br&gt;pcmciautils
986 &lt;br&gt;%
987 &lt;/blockquote&gt;&lt;/p&gt;
988
989 &lt;p&gt;If you know of any hardware-package mapping that should be added to
990 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co&quot;&gt;my
991 database&lt;/a&gt;, please tell me about it.&lt;/p&gt;
992
993 &lt;p&gt;It could be possible to generate several of the mappings between
994 packages and hardware. One source would be to look at packages with
995 kernel modules, ie packages with *.ko files in /lib/modules/, and
996 extract their modalias information. Another would be to look at
997 packages with udev rules, ie packages with files in
998 /lib/udev/rules.d/, and extract their vendor/model information to
999 generate a modalias matching rule. I have not tested any of these to
1000 see if it work.&lt;/p&gt;
1001
1002 &lt;p&gt;If you want to help implementing a system to let us propose what
1003 packages to install when new hardware is plugged into a Debian
1004 machine, please send me an email or talk to me on
1005 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
1006 </description>
1007 </item>
1008
1009 <item>
1010 <title>Modalias strings - a practical way to map &quot;stuff&quot; to hardware</title>
1011 <link>http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</link>
1012 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</guid>
1013 <pubDate>Mon, 14 Jan 2013 11:20:00 +0100</pubDate>
1014 <description>&lt;p&gt;While looking into how to look up Debian packages based on hardware
1015 information, to find the packages that support a given piece of
1016 hardware, I refreshed my memory regarding modalias values, and decided
1017 to document the details. Here are my findings so far, also available
1018 in
1019 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
1020 Debian Edu subversion repository&lt;/a&gt;:
1021
1022 &lt;p&gt;&lt;strong&gt;Modalias decoded&lt;/strong&gt;&lt;/p&gt;
1023
1024 &lt;p&gt;This document try to explain what the different types of modalias
1025 values stands for. It is in part based on information from
1026 &amp;lt;URL: &lt;a href=&quot;https://wiki.archlinux.org/index.php/Modalias&quot;&gt;https://wiki.archlinux.org/index.php/Modalias&lt;/a&gt; &amp;gt;,
1027 &amp;lt;URL: &lt;a href=&quot;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&quot;&gt;http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device&lt;/a&gt; &amp;gt;,
1028 &amp;lt;URL: &lt;a href=&quot;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&quot;&gt;http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c&lt;/a&gt; &amp;gt; and
1029 &amp;lt;URL: &lt;a href=&quot;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&quot;&gt;http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&amp;view=markup&lt;/a&gt; &amp;gt;.
1030
1031 &lt;p&gt;The modalias entries for a given Linux machine can be found using
1032 this shell script:&lt;/p&gt;
1033
1034 &lt;pre&gt;
1035 find /sys -name modalias -print0 | xargs -0 cat | sort -u
1036 &lt;/pre&gt;
1037
1038 &lt;p&gt;The supported modalias globs for a given kernel module can be found
1039 using modinfo:&lt;/p&gt;
1040
1041 &lt;pre&gt;
1042 % /sbin/modinfo psmouse | grep alias:
1043 alias: serio:ty05pr*id*ex*
1044 alias: serio:ty01pr*id*ex*
1045 %
1046 &lt;/pre&gt;
1047
1048 &lt;p&gt;&lt;strong&gt;PCI subtype&lt;/strong&gt;&lt;/p&gt;
1049
1050 &lt;p&gt;A typical PCI entry can look like this. This is an Intel Host
1051 Bridge memory controller:&lt;/p&gt;
1052
1053 &lt;p&gt;&lt;blockquote&gt;
1054 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
1055 &lt;/blockquote&gt;&lt;/p&gt;
1056
1057 &lt;p&gt;This represent these values:&lt;/p&gt;
1058
1059 &lt;pre&gt;
1060 v 00008086 (vendor)
1061 d 00002770 (device)
1062 sv 00001028 (subvendor)
1063 sd 000001AD (subdevice)
1064 bc 06 (bus class)
1065 sc 00 (bus subclass)
1066 i 00 (interface)
1067 &lt;/pre&gt;
1068
1069 &lt;p&gt;The vendor/device values are the same values outputted from &#39;lspci
1070 -n&#39; as 8086:2770. The bus class/subclass is also shown by lspci as
1071 0600. The 0600 class is a host bridge. Other useful bus values are
1072 0300 (VGA compatible card) and 0200 (Ethernet controller).&lt;/p&gt;
1073
1074 &lt;p&gt;Not sure how to figure out the interface value, nor what it
1075 means.&lt;/p&gt;
1076
1077 &lt;p&gt;&lt;strong&gt;USB subtype&lt;/strong&gt;&lt;/p&gt;
1078
1079 &lt;p&gt;Some typical USB entries can look like this. This is an internal
1080 USB hub in a laptop:&lt;/p&gt;
1081
1082 &lt;p&gt;&lt;blockquote&gt;
1083 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
1084 &lt;/blockquote&gt;&lt;/p&gt;
1085
1086 &lt;p&gt;Here is the values included in this alias:&lt;/p&gt;
1087
1088 &lt;pre&gt;
1089 v 1D6B (device vendor)
1090 p 0001 (device product)
1091 d 0206 (bcddevice)
1092 dc 09 (device class)
1093 dsc 00 (device subclass)
1094 dp 00 (device protocol)
1095 ic 09 (interface class)
1096 isc 00 (interface subclass)
1097 ip 00 (interface protocol)
1098 &lt;/pre&gt;
1099
1100 &lt;p&gt;The 0900 device class/subclass means hub. Some times the relevant
1101 class is in the interface class section. For a simple USB web camera,
1102 these alias entries show up:&lt;/p&gt;
1103
1104 &lt;p&gt;&lt;blockquote&gt;
1105 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
1106 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
1107 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
1108 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
1109 &lt;/blockquote&gt;&lt;/p&gt;
1110
1111 &lt;p&gt;Interface class 0E01 is video control, 0E02 is video streaming (aka
1112 camera), 0101 is audio control device and 0102 is audio streaming (aka
1113 microphone). Thus this is a camera with microphone included.&lt;/p&gt;
1114
1115 &lt;p&gt;&lt;strong&gt;ACPI subtype&lt;/strong&gt;&lt;/p&gt;
1116
1117 &lt;p&gt;The ACPI type is used for several non-PCI/USB stuff. This is an IR
1118 receiver in a Thinkpad X40:&lt;/p&gt;
1119
1120 &lt;p&gt;&lt;blockquote&gt;
1121 acpi:IBM0071:PNP0511:
1122 &lt;/blockquote&gt;&lt;/p&gt;
1123
1124 &lt;p&gt;The values between the colons are IDs.&lt;/p&gt;
1125
1126 &lt;p&gt;&lt;strong&gt;DMI subtype&lt;/strong&gt;&lt;/p&gt;
1127
1128 &lt;p&gt;The DMI table contain lots of information about the computer case
1129 and model. This is an entry for a IBM Thinkpad X40, fetched from
1130 /sys/devices/virtual/dmi/id/modalias:&lt;/p&gt;
1131
1132 &lt;p&gt;&lt;blockquote&gt;
1133 dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
1134 &lt;/blockquote&gt;&lt;/p&gt;
1135
1136 &lt;p&gt;The values present are&lt;/p&gt;
1137
1138 &lt;pre&gt;
1139 bvn IBM (BIOS vendor)
1140 bvr 1UETB6WW(1.66) (BIOS version)
1141 bd 06/15/2005 (BIOS date)
1142 svn IBM (system vendor)
1143 pn 2371H4G (product name)
1144 pvr ThinkPadX40 (product version)
1145 rvn IBM (board vendor)
1146 rn 2371H4G (board name)
1147 rvr NotAvailable (board version)
1148 cvn IBM (chassis vendor)
1149 ct 10 (chassis type)
1150 cvr NotAvailable (chassis version)
1151 &lt;/pre&gt;
1152
1153 &lt;p&gt;The chassis type 10 is Notebook. Other interesting values can be
1154 found in the dmidecode source:&lt;/p&gt;
1155
1156 &lt;pre&gt;
1157 3 Desktop
1158 4 Low Profile Desktop
1159 5 Pizza Box
1160 6 Mini Tower
1161 7 Tower
1162 8 Portable
1163 9 Laptop
1164 10 Notebook
1165 11 Hand Held
1166 12 Docking Station
1167 13 All In One
1168 14 Sub Notebook
1169 15 Space-saving
1170 16 Lunch Box
1171 17 Main Server Chassis
1172 18 Expansion Chassis
1173 19 Sub Chassis
1174 20 Bus Expansion Chassis
1175 21 Peripheral Chassis
1176 22 RAID Chassis
1177 23 Rack Mount Chassis
1178 24 Sealed-case PC
1179 25 Multi-system
1180 26 CompactPCI
1181 27 AdvancedTCA
1182 28 Blade
1183 29 Blade Enclosing
1184 &lt;/pre&gt;
1185
1186 &lt;p&gt;The chassis type values are not always accurately set in the DMI
1187 table. For example my home server is a tower, but the DMI modalias
1188 claim it is a desktop.&lt;/p&gt;
1189
1190 &lt;p&gt;&lt;strong&gt;SerIO subtype&lt;/strong&gt;&lt;/p&gt;
1191
1192 &lt;p&gt;This type is used for PS/2 mouse plugs. One example is from my
1193 test machine:&lt;/p&gt;
1194
1195 &lt;p&gt;&lt;blockquote&gt;
1196 serio:ty01pr00id00ex00
1197 &lt;/blockquote&gt;&lt;/p&gt;
1198
1199 &lt;p&gt;The values present are&lt;/p&gt;
1200
1201 &lt;pre&gt;
1202 ty 01 (type)
1203 pr 00 (prototype)
1204 id 00 (id)
1205 ex 00 (extra)
1206 &lt;/pre&gt;
1207
1208 &lt;p&gt;This type is supported by the psmouse driver. I am not sure what
1209 the valid values are.&lt;/p&gt;
1210
1211 &lt;p&gt;&lt;strong&gt;Other subtypes&lt;/strong&gt;&lt;/p&gt;
1212
1213 &lt;p&gt;There are heaps of other modalias subtypes according to
1214 file2alias.c. There is the rest of the list from that source: amba,
1215 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
1216 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
1217 vmbus, x86cpu and zorro. I did not spend time documenting all of
1218 these, as they do not seem relevant for my intended use with mapping
1219 hardware to packages when new stuff is inserted during run time.&lt;/p&gt;
1220
1221 &lt;p&gt;&lt;strong&gt;Looking up kernel modules using modalias values&lt;/strong&gt;&lt;/p&gt;
1222
1223 &lt;p&gt;To check which kernel modules provide support for a given modalias,
1224 one can use the following shell script:&lt;/p&gt;
1225
1226 &lt;pre&gt;
1227 for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
1228 echo &quot;$id&quot; ; \
1229 /sbin/modprobe --show-depends &quot;$id&quot;|sed &#39;s/^/ /&#39; ; \
1230 done
1231 &lt;/pre&gt;
1232
1233 &lt;p&gt;The output can look like this (only the first few entries as the
1234 list is very long on my test machine):&lt;/p&gt;
1235
1236 &lt;pre&gt;
1237 acpi:ACPI0003:
1238 insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko
1239 acpi:device:
1240 FATAL: Module acpi:device: not found.
1241 acpi:IBM0068:
1242 insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko
1243 insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko
1244 insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko
1245 insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko
1246 acpi:IBM0071:PNP0511:
1247 insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko
1248 insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko
1249 insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko
1250 [...]
1251 &lt;/pre&gt;
1252
1253 &lt;p&gt;If you want to help implementing a system to let us propose what
1254 packages to install when new hardware is plugged into a Debian
1255 machine, please send me an email or talk to me on
1256 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
1257
1258 &lt;p&gt;&lt;strong&gt;Update 2013-01-15:&lt;/strong&gt; Rewrite &quot;cat $(find ...)&quot; to
1259 &quot;find ... -print0 | xargs -0 cat&quot; to make sure it handle directories
1260 in /sys/ with space in them.&lt;/p&gt;
1261 </description>
1262 </item>
1263
1264 <item>
1265 <title>Moved the pymissile Debian packaging to collab-maint</title>
1266 <link>http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</link>
1267 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</guid>
1268 <pubDate>Thu, 10 Jan 2013 20:40:00 +0100</pubDate>
1269 <description>&lt;p&gt;As part of my investigation on how to improve the support in Debian
1270 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
1271 Launcher and updated the Debian package
1272 &lt;a href=&quot;http://packages.qa.debian.org/pymissile&quot;&gt;pymissile&lt;/a&gt; to make
1273 sure udev will fix the device permissions when it is plugged in. I
1274 also added a &quot;Modaliases&quot; header to test it in the Debian archive and
1275 hopefully make the package be proposed by jockey in Ubuntu when a user
1276 plug in his rocket launcher. In the process I moved the source to a
1277 git repository under collab-maint, to make it easier for any DD to
1278 contribute. &lt;a href=&quot;http://code.google.com/p/pymissile/&quot;&gt;Upstream&lt;/a&gt;
1279 is not very active, but the software still work for me even after five
1280 years of relative silence. The new git repository is not listed in
1281 the uploaded package yet, because I want to test the other changes a
1282 bit more before I upload the new version. If you want to check out
1283 the new version with a .desktop file included, visit the
1284 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git&quot;&gt;gitweb
1285 view&lt;/a&gt; or use &quot;&lt;tt&gt;git clone
1286 git://anonscm.debian.org/collab-maint/pymissile.git&lt;/tt&gt;&quot;.&lt;/p&gt;
1287 </description>
1288 </item>
1289
1290 <item>
1291 <title>Lets make hardware dongles easier to use in Debian</title>
1292 <link>http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</link>
1293 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</guid>
1294 <pubDate>Wed, 9 Jan 2013 15:40:00 +0100</pubDate>
1295 <description>&lt;p&gt;One thing that annoys me with Debian and Linux distributions in
1296 general, is that there is a great package management system with the
1297 ability to automatically install software packages by downloading them
1298 from the distribution mirrors, but no way to get it to automatically
1299 install the packages I need to use the hardware I plug into my
1300 machine. Even if the package to use it is easily available from the
1301 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
1302 suggest to automatically install the python-nxt, nbc and t2n packages
1303 I need to talk to it. When I plug in a Yubikey, it could propose the
1304 yubikey-personalization package. The information required to do this
1305 is available, but no-one have pulled all the pieces together.&lt;/p&gt;
1306
1307 &lt;p&gt;Some years ago, I proposed to
1308 &lt;a href=&quot;http://lists.debian.org/debian-devel/2010/05/msg01206.html&quot;&gt;use
1309 the discover subsystem to implement this&lt;/a&gt;. The idea is fairly
1310 simple:
1311
1312 &lt;ul&gt;
1313
1314 &lt;li&gt;Add a desktop entry in /usr/share/autostart/ pointing to a program
1315 starting when a user log in.&lt;/li&gt;
1316
1317 &lt;li&gt;Set this program up to listen for kernel events emitted when new
1318 hardware is inserted into the computer.&lt;/li&gt;
1319
1320 &lt;li&gt;When new hardware is inserted, look up the hardware ID in a
1321 database mapping to packages, and take note of any non-installed
1322 packages.&lt;/li&gt;
1323
1324 &lt;li&gt;Show a message to the user proposing to install the discovered
1325 package, and make it easy to install it.&lt;/li&gt;
1326
1327 &lt;/ul&gt;
1328
1329 &lt;p&gt;I am not sure what the best way to implement this is, but my
1330 initial idea was to use dbus events to discover new hardware, the
1331 discover database to find packages and
1332 &lt;a href=&quot;http://www.packagekit.org/&quot;&gt;PackageKit&lt;/a&gt; to install
1333 packages.&lt;/p&gt;
1334
1335 &lt;p&gt;Yesterday, I found time to try to implement this idea, and the
1336 draft package is now checked into
1337 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
1338 Debian Edu subversion repository&lt;/a&gt;. In the process, I updated the
1339 &lt;a href=&quot;http://packages.qa.debian.org/d/discover-data.html&quot;&gt;discover-data&lt;/a&gt;
1340 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
1341 the relevant packages in Debian, and uploaded a new version
1342 2.2013.01.09 to unstable. I also discovered that the current
1343 &lt;a href=&quot;http://packages.qa.debian.org/d/discover.html&quot;&gt;discover&lt;/a&gt;
1344 package in Debian no longer discovered any USB devices, because
1345 /proc/bus/usb/devices is no longer present. I ported it to use
1346 libusb as a fall back option to get it working. The fixed package
1347 version 2.1.2-6 is now in experimental (didn&#39;t upload it to unstable
1348 because of the freeze).&lt;/p&gt;
1349
1350 &lt;p&gt;With this prototype in place, I can insert my Yubikey, and get this
1351 desktop notification to show up (only once, the first time it is
1352 inserted):&lt;/p&gt;
1353
1354 &lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-09-hw-autoinstall.png&quot;&gt;&lt;/p&gt;
1355
1356 &lt;p&gt;For this prototype to be really useful, some way to automatically
1357 install the proposed packages by pressing the &quot;Please install
1358 program(s)&quot; button should to be implemented.&lt;/p&gt;
1359
1360 &lt;p&gt;If this idea seem useful to you, and you want to help make it
1361 happen, please help me update the discover-data database with mappings
1362 from hardware to Debian packages. Check if &#39;discover-pkginstall -l&#39;
1363 list the package you would like to have installed when a given
1364 hardware device is inserted into your computer, and report bugs using
1365 reportbug if it isn&#39;t. Or, if you know of a better way to provide
1366 such mapping, please let me know.&lt;/p&gt;
1367
1368 &lt;p&gt;This prototype need more work, and there are several questions that
1369 should be considered before it is ready for production use. Is dbus
1370 the correct way to detect new hardware? At the moment I look for HAL
1371 dbus events on the system bus, because that is the events I could see
1372 on my Debian Squeeze KDE desktop. Are there better events to use?
1373 How should the user be notified? Is the desktop notification
1374 mechanism the best option, or should the background daemon raise a
1375 popup instead? How should packages be installed? When should they
1376 not be installed?&lt;/p&gt;
1377
1378 &lt;p&gt;If you want to help getting such feature implemented in Debian,
1379 please send me an email. :)&lt;/p&gt;
1380 </description>
1381 </item>
1382
1383 </channel>
1384 </rss>