]> pere.pagekite.me Git - homepage.git/blob - blog/tags/isenkram/isenkram.rss
d0126946ecd67fcfb6614825a0424871b90c040c
[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://www.hungry.com/~pere/blog/</link>
7
8
9 <item>
10 <title>Some of my 2024 free software activities</title>
11 <link>http://www.hungry.com/~pere/blog/Some_of_my_2024_free_software_activities.html</link>
12 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Some_of_my_2024_free_software_activities.html</guid>
13 <pubDate>Mon, 10 Feb 2025 09:30:00 +0100</pubDate>
14 <description>&lt;p&gt;It is a while since I posted a summary of the free software and
15 open culture activities and projects I have worked on. Here is a
16 quick summary of the major ones from last year.&lt;/p&gt;
17
18 &lt;p&gt;I guess the biggest project of the year has been migrating orphaned
19 packages in Debian without a version control system to have a git
20 repository on salsa.debian.org. When I started in April around 450
21 the orphaned packages needed git. I&#39;ve since migrated around 250 of
22 the packages to a salsa git repository, and around 40 packages were
23 left when I took a break. Not sure who did the around 160 conversions
24 I was not involved in, but I am very glad I got some help on the
25 project. I stopped partly because some of the remaining packages
26 needed more disk space to build than I have available on my
27 development machine, and partly because some had a strange build setup
28 I could not figure out. I had a time budget of 20 minutes per
29 package, if the package proved problematic and likely to take longer,
30 I moved to another package. Might continue later, if I manage to free
31 up some disk space.&lt;/p&gt;
32
33 &lt;p&gt;Another rather big project was the translation to Norwegian Bokmål
34 and publishing of the first book ever published by a Sámi woman, the
35 «&lt;a href=&quot;http://www.hungry.com/~pere/publisher/#infoerlifellerdoed2024&quot;&gt;Møter
36 vi liv eller død?&lt;/a&gt;» book by Elsa Laua, with a PD0 and CC-BY
37 license. I released it during the summer, and to my surprise it has
38 already sold several copies. As I suck at marketing, I did not expect
39 to sell any.&lt;/p&gt;
40
41 &lt;p&gt;A smaller, but more long term project (for more than 10 years now),
42 and related to orphaned packages in Debian, is my project to ensure a
43 simple way to install hardware related packages in Debian when the
44 relevant hardware is present in a machine. It made a fairly big
45 advance forward last year, partly because I have been poking and
46 begging package maintainers and upstream developers to include
47 AppStream metadata XML in their packages. I&#39;ve also released a few
48 new versions of the isenkram system with some robustness improvements.
49 Today 127 packages in Debian provide such information, allowing
50 &lt;tt&gt;isenkram-lookup&lt;/tt&gt; to propose them. Will keep pushing until the
51 around 35 package names currently hard coded in the isenkram package
52 are down to zero, so only information provided by individual packages
53 are used for this feature.&lt;/p&gt;
54
55 &lt;p&gt;As part of the work on AppStream, I have sponsored several packages
56 into Debian where the maintainer wanted to fix the issue but lacked
57 direct upload rights. I&#39;ve also sponsored a few other packages, when
58 approached by the maintainer.&lt;/p&gt;
59
60 &lt;p&gt;I would also like to mention two hardware related packages in
61 particular where I have been involved, the megactl and mfi-util
62 packages. Both work with the hardware RAID systems in several Dell
63 PowerEdge servers, and the first one is already available in Debian
64 (and of course, proposed by isenkram when used on the appropriate Dell
65 server), the other is waiting for NEW processing since this autumn. I
66 manage several such Dell servers and would like the tools needed to
67 monitor and configure these RAID controllers to be available from
68 within Debian out of the box.&lt;/p&gt;
69
70 &lt;p&gt;Vaguely related to hardware support in Debian, I have also been
71 trying to find ways to help out the Debian ROCm team, to improve the
72 support in Debian for my artificial idiocy (AI) compute node. So far
73 only uploaded one package, helped test the initial packaging of
74 llama.cpp and tried to figure out how to get good speech recognition
75 like Whisper into Debian.&lt;p&gt;
76
77 &lt;p&gt;I am still involved in the LinuxCNC project, and organised a
78 developer gathering in Norway last summer. A new one is planned the
79 summer of 2025. I&#39;ve also helped evaluate patches and uploaded new
80 versions of LinuxCNC into Debian.&lt;/p&gt;
81
82 &lt;p&gt;After a 10 years long break, we managed to get a new and improved
83 upstream version of &lt;tt&gt;lsdvd&lt;/tt&gt; released just before Christmas. As
84 I use it regularly to maintain my DVD archive, I was very happy to
85 finally get out a version supporting DVDDiscID useful for uniquely
86 identifying DVDs. I am dreaming of a Internet service mapping DVD IDs
87 to IMDB movie IDs, to make life as a DVD collector easier.&lt;/p&gt;
88
89 &lt;p&gt;My involvement in Norwegian archive standardisation and the free
90 software implementation of the vendor neutral Noark 5 API continued
91 for the entire year. I&#39;ve been pushing patches into both the API and
92 the test code for the API, participated in several editorial meetings
93 regarding the Noark 5 Tjenestegrensesnitt specification, submitted
94 several proposals for improvements for the same. We also organised a
95 small seminar for Noark 5 interested people, and is organising a new
96 seminar in a month.&lt;/p&gt;
97
98 &lt;p&gt;Part of the year was spent working on and coordinating a Norwegian
99 Bokmål translation of the marvellous children&#39;s book
100 «&lt;a href=&quot;https://fsfe.org/activities/ada-zangemann/&quot;&gt;Ada and
101 Zangemann&lt;a&gt;», which focus on the right to repair and control your own
102 property, and the value of controlling the software on the devices you
103 own. The translation is mostly complete, and is now waiting for a
104 transformation of the project and manuscript to use Docbook XML
105 instead of a home made semi-text based format. Great progress is
106 being made and the new book build process is almost complete.&lt;/p&gt;
107
108 &lt;p&gt;I have also been looking at how to companies in Norway can use free
109 software to report their accounting summaries to the Norwegian
110 government. Several new regulations make it very hard for companies
111 to do use free software for accounting, and I would like to change
112 this. Found a few drafts for opening up the reporting process, and
113 have read up on some of the specifications, but nothing much is
114 working yet.&lt;/p&gt;
115
116 &lt;p&gt;These were just the top of the iceberg, but I guess this blog post
117 is long enough now. If you would like to help with any of these
118 projects, please get in touch, either directly on the project mailing
119 lists and forums, or with me via email, IRC or Signal. :)&lt;/p&gt;
120
121 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
122 activities, please send Bitcoin donations to my address
123 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
124 </description>
125 </item>
126
127 <item>
128 <title>121 packages in Debian mapped to hardware for automatic recommendation</title>
129 <link>http://www.hungry.com/~pere/blog/121_packages_in_Debian_mapped_to_hardware_for_automatic_recommendation.html</link>
130 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/121_packages_in_Debian_mapped_to_hardware_for_automatic_recommendation.html</guid>
131 <pubDate>Sun, 19 Jan 2025 12:40:00 +0100</pubDate>
132 <description>&lt;p&gt;For some years now, I have been working on a automatic hardware
133 based package recommendation system for Debian and other Linux
134 distributions. The isenkram system I started on back in 2013 now
135 consist of two subsystems, one locating firmware files using the
136 information provided by apt-file, and one matching hardware to
137 packages using information provided by AppStream. The former is very
138 similar to the mechanism implemented in debian-installer to pick the
139 right firmware packages to install. This post is about the latter
140 system. Thanks to steady progress and good help from both other
141 Debian and upstream developers, I am happy to report that
142 &lt;a href=&quot;https://tracker.debian.org/pkg/isenkram&quot;&gt;the Isenkram
143 system&lt;/a&gt; now are able to recommend 121 packages using information
144 provided via
145 &lt;a href=&quot;https://www.freedesktop.org/wiki/Distributions/AppStream/&quot;&gt;AppStream&lt;/a&gt;.&lt;/p&gt;
146
147 &lt;p&gt;The mapping is done using modalias information provided by the
148 kernel, the same information used by udev when creating device files,
149 and the kernel when deciding which kernel modules to load. To get all
150 the modalias identifiers relevant for your machine, you can run the
151 following command on the command line:&lt;/p&gt;
152
153 &lt;pre&gt;
154 find /sys/devices -name modalias -print0 | xargs -0 sort -u
155 &lt;/pre&gt;
156
157 &lt;p&gt;The modalias identifiers can look something like this:&lt;/p&gt;
158
159 &lt;pre&gt;
160 acpi:PNP0000
161 cpu:type:x86,ven0000fam0006mod003F:feature:,0000,0001,0002,0003,0004,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0015,0016,0017,0018,0019,001A,001B,001C,001D,001F,002B,0034,003A,003B,003D,0068,006B,006C,006D,006F,0070,0072,0074,0075,0076,0078,0079,007C,0080,0081,0082,0083,0084,0085,0086,0087,0088,0089,008B,008C,008D,008E,008F,0091,0092,0093,0094,0095,0096,0097,0098,0099,009A,009B,009C,009D,009E,00C0,00C5,00E1,00E3,00EB,00ED,00F0,00F1,00F3,00F5,00F6,00F9,00FA,00FB,00FD,00FF,0100,0101,0102,0103,0111,0120,0121,0123,0125,0127,0128,0129,012A,012C,012D,0140,0160,0161,0165,016C,017B,01C0,01C1,01C2,01C4,01C5,01C6,01F9,024A,025A,025B,025C,025F,0282
162 dmi:bvnDellInc.:bvr2.18.1:bd08/14/2023:br2.18:svnDellInc.:pnPowerEdgeR730:pvr:rvnDellInc.:rn0H21J3:rvrA09:cvnDellInc.:ct23:cvr:skuSKU=NotProvided
163 pci:v00008086d00008D3Bsv00001028sd00000600bc07sc80i00
164 platform:serial8250
165 scsi:t-0x05
166 usb:v413CpA001d0000dc09dsc00dp00ic09isc00ip00in00
167 &lt;/pre&gt;
168
169 &lt;p&gt;The entries above are a selection of the complete set available on
170 a Dell PowerEdge R730 machine I have access to, to give an idea about
171 the various styles of hardware identifiers presented in the modalias
172 format. When looking up relevant packages in a Debian Testing
173 installation on the same R730, I get this list of packages
174 proposed:&lt;/p&gt;
175
176 &lt;pre&gt;
177 % sudo isenkram-lookup
178 firmware-bnx2x
179 firmware-nvidia-graphics
180 firmware-qlogic
181 megactl
182 wsl
183 %
184 &lt;/pre&gt;
185
186 &lt;p&gt;The list consist of firmware packages requested by kernel modules,
187 as well packages with program to get the status from the RAID
188 controller and to maintain the LAN console. When the edac-utils
189 package providing tools to check the ECC RAM status will enter testing
190 in a few days, it will also show up as a proposal from isenkram. In
191 addition, once the mfiutil package we uploaded in October get past the
192 NEW processing, it will also propose a tool to configure the RAID
193 controller.&lt;/p&gt;
194
195 &lt;p&gt;Another example is the trusty old Lenovo Thinkpad X230, which have
196 hardware handled by several packages in the archive. This is running
197 on Debian Stable:&lt;/p&gt;
198
199 &lt;pre&gt;
200 % isenkram-lookup
201 beignet-opencl-icd
202 bluez
203 cheese
204 ethtool
205 firmware-iwlwifi
206 firmware-misc-nonfree
207 fprintd
208 fprintd-demo
209 gkrellm-thinkbat
210 hdapsd
211 libpam-fprintd
212 pidgin-blinklight
213 thinkfan
214 tlp
215 tp-smapi-dkms
216 tpb
217 %
218 &lt;/pre&gt;
219
220 &lt;p&gt;Here there proposal consist of software to handle the camera,
221 bluetooth, network card, wifi card, GPU, fan, fingerprint reader and
222 acceleration sensor on the machine.&lt;/p&gt;
223
224 &lt;p&gt;Here is the complete set of packages currently providing hardware
225 mapping via AppStream in Debian Unstable: air-quality-sensor,
226 alsa-firmware-loaders, antpm, array-info, avarice, avrdude,
227 bmusb-v4l2proxy, brltty, calibre, colorhug-client, concordance-common,
228 consolekit, dahdi-firmware-nonfree, dahdi-linux, edac-utils,
229 eegdev-plugins-free, ekeyd, elogind, firmware-amd-graphics,
230 firmware-ath9k-htc, firmware-atheros, firmware-b43-installer,
231 firmware-b43legacy-installer, firmware-bnx2, firmware-bnx2x,
232 firmware-brcm80211, firmware-carl9170, firmware-cavium,
233 firmware-intel-graphics, firmware-intel-misc, firmware-ipw2x00,
234 firmware-ivtv, firmware-iwlwifi, firmware-libertas,
235 firmware-linux-free, firmware-mediatek, firmware-misc-nonfree,
236 firmware-myricom, firmware-netronome, firmware-netxen,
237 firmware-nvidia-graphics, firmware-qcom-soc, firmware-qlogic,
238 firmware-realtek, firmware-ti-connectivity, fpga-icestorm, g810-led,
239 galileo, garmin-forerunner-tools, gkrellm-thinkbat, goldencheetah,
240 gpsman, gpstrans, gqrx-sdr, i8kutils, imsprog, ledger-wallets-udev,
241 libairspy0, libam7xxx0.1, libbladerf2, libgphoto2-6t64,
242 libhamlib-utils, libm2k0.9.0, libmirisdr4, libnxt, libopenxr1-monado,
243 libosmosdr0, librem5-flash-image, librtlsdr0, libticables2-8,
244 libx52pro0, libykpers-1-1, libyubikey-udev, limesuite,
245 linuxcnc-uspace, lomoco, madwimax, media-player-info, megactl, mixxx,
246 mkgmap, msi-keyboard, mu-editor, mustang-plug, nbc, nitrokey-app, nqc,
247 ola, openfpgaloader, openocd, openrazer-driver-dkms, pcmciautils,
248 pcscd, pidgin-blinklight, ponyprog, printer-driver-splix,
249 python-yubico-tools, python3-btchip, qlcplus, rosegarden, scdaemon,
250 sispmctl, solaar, spectools, sunxi-tools, t2n, thinkfan, tlp,
251 tp-smapi-dkms, trezor, tucnak, ubertooth, usbrelay, uuu, viking,
252 w1retap, wsl, xawtv, xinput-calibrator, xserver-xorg-input-wacom and
253 xtrx-dkms.&lt;/p&gt;
254
255 &lt;p&gt;In addition to these, there are several
256 &lt;a href=&quot;https://udd.debian.org/cgi-bin/bts-usertags.cgi?user=pere%40hungry.com&amp;tag=appstream-modalias&quot;&gt;with
257 patches pending in the Debian bug tracking system&lt;/a&gt;, and even more
258 where no-one wrote patches yet. Good candiates for the latter are
259 packages
260 &lt;a href=&quot;https://udd.debian.org/lintian-tag.cgi?tag=appstream-metadata-missing-modalias-provide&quot;&gt;with
261 udev rules but no AppStream hardware information&lt;/a&gt;.&lt;/p&gt;
262
263 &lt;p&gt;The isenkram system consist of two packages, isenkram-cli with the
264 command line tools, and isenkram with a GUI background process. The
265 latter will listen for dbus events from udev emitted when new hardware
266 become available (like when inserting a USB dongle or discovering a
267 new bluetooth device), look up the modalias entry for this piece of
268 hardware in AppStream (and a hard coded list of mappings from isenkram
269 - currently working hard to move this list to AppStream), and pop up a
270 dialog proposing to install any not already installed packages
271 supporting this hardware. It work very well today when inserting the
272 LEGO Mindstorms RCX, NXT and EV3 controllers. :) If you want to make
273 sure more hardware related packages get recommended, please help out
274 fixing the remaining packages in Debian to provide AppStream metadata
275 with hardware mappings.&lt;/p&gt;
276
277 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
278 activities, please send Bitcoin donations to my address
279 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
280 </description>
281 </item>
282
283 <item>
284 <title>What is the most supported MIME type in Debian in 2025?</title>
285 <link>http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2025_.html</link>
286 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2025_.html</guid>
287 <pubDate>Sat, 18 Jan 2025 10:30:00 +0100</pubDate>
288 <description>&lt;p&gt;&lt;a href=&quot;http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html&quot;&gt;Seven&lt;/a&gt;
289 and
290 &lt;a href=&quot;http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html&quot;&gt;twelve&lt;/a&gt;
291 years ago, I measured what the most supported MIME type in Debian
292 was&lt;/a&gt;, first by analysing the desktop files in all packages in the
293 archive, then by analysing the DEP-11 AppStream data set. I guess it
294 is time to repeat the measurement, only for unstable as last time:&lt;/p&gt;
295
296 &lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
297
298 &lt;pre&gt;
299 count MIME type
300 ----- -----------------------
301 63 image/png
302 63 image/jpeg
303 57 image/tiff
304 54 image/gif
305 51 image/bmp
306 50 audio/mpeg
307 48 text/plain
308 42 audio/x-mp3
309 40 application/ogg
310 39 audio/x-wav
311 39 audio/x-flac
312 36 audio/x-vorbis+ogg
313 35 audio/x-mpeg
314 34 audio/x-mpegurl
315 34 audio/ogg
316 33 application/x-ogg
317 32 audio/mp4
318 31 audio/x-scpls
319 31 application/pdf
320 29 audio/x-ms-wma
321 &lt;/pre&gt;
322
323 &lt;p&gt;The list was created like this using a sid chroot:&lt;/p&gt;
324
325 &lt;pre&gt;
326 cat /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz | \
327 zcat | awk &#39;/^ - \S+\/\S+$/ {print $2 }&#39; | sort | \
328 uniq -c | sort -nr | head -20
329 &lt;/pre&gt;
330
331 &lt;p&gt;It is nice to see that the same number of packages now support PNG
332 and JPEG. Last time JPEG had more support than PNG. Most of the MIME
333 types are known to me, but the &#39;audio/x-scpls&#39; one I have no idea what
334 represent, except it being an audio format. To find the packages
335 claiming support for this format, the appstreamcli command from the
336 appstream package can be used:
337
338 &lt;pre&gt;
339 % appstreamcli what-provides mediatype audio/x-scpls | grep Package: | sort -u
340 Package: alsaplayer-common
341 Package: amarok
342 Package: audacious
343 Package: brasero
344 Package: celluloid
345 Package: clapper
346 Package: clementine
347 Package: cynthiune.app
348 Package: elisa
349 Package: gtranscribe
350 Package: kaffeine
351 Package: kmplayer
352 Package: kylin-burner
353 Package: lollypop
354 Package: mediaconch-gui
355 Package: mediainfo-gui
356 Package: mplayer-gui
357 Package: mpv
358 Package: mystiq
359 Package: parlatype
360 Package: parole
361 Package: pragha
362 Package: qmmp
363 Package: rhythmbox
364 Package: sayonara
365 Package: shotcut
366 Package: smplayer
367 Package: soundconverter
368 Package: strawberry
369 Package: syncplay
370 Package: vlc
371 %
372 &lt;/pre&gt;
373
374 &lt;p&gt;Look like several video and auto tools understand the format.
375 Similarly one can check out the number of packages supporting the STL
376 format commonly used for 3D printing:&lt;/p&gt;
377
378 &lt;pre&gt;
379 % appstreamcli what-provides mediatype model/stl | grep Package: | sort -u
380 Package: cura
381 Package: freecad
382 Package: open3d-viewer
383 %
384 &lt;/pre&gt;
385
386 &lt;p&gt;How strange the
387 &lt;a href=&quot;https://tracker.debian.org/pkg/slic3r&quot;&gt;slic3r&lt;/a&gt; and
388 &lt;a href=&quot;https://tracker.debian.org/pkg/slic3r-prusa&quot;&gt;prusa-slicer&lt;/a&gt;
389 packages do not support STL. Perhaps just missing package metadata?
390 Luckily the amount of package metadata in Debian is getting better,
391 and hopefully this way of locating relevant packages for any file
392 format will be the preferred one soon.
393
394 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
395 activities, please send Bitcoin donations to my address
396 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
397 </description>
398 </item>
399
400 <item>
401 <title>RAID status from LSI Megaraid controllers in Debian</title>
402 <link>http://www.hungry.com/~pere/blog/RAID_status_from_LSI_Megaraid_controllers_in_Debian.html</link>
403 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/RAID_status_from_LSI_Megaraid_controllers_in_Debian.html</guid>
404 <pubDate>Wed, 17 Apr 2024 17:00:00 +0200</pubDate>
405 <description>&lt;p&gt;I am happy to report that
406 &lt;a href=&quot;https://github.com/namiltd/megactl&quot;&gt;the megactl package&lt;/a&gt;,
407 useful to fetch RAID status when using the LSI Megaraid controller,
408 now is available in Debian. It passed NEW a few days ago, and is now
409 &lt;a href=&quot;https://tracker.debian.org/pkg/megactl&quot;&gt;available in
410 unstable&lt;/a&gt;, and probably showing up in testing in a weeks time. The
411 new version should provide Appstream hardware mapping and should
412 integrate nicely with isenkram.&lt;/p&gt;
413
414 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
415 activities, please send Bitcoin donations to my address
416 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
417
418 </description>
419 </item>
420
421 <item>
422 <title>RAID status from LSI Megaraid controllers using free software</title>
423 <link>http://www.hungry.com/~pere/blog/RAID_status_from_LSI_Megaraid_controllers_using_free_software.html</link>
424 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/RAID_status_from_LSI_Megaraid_controllers_using_free_software.html</guid>
425 <pubDate>Sun, 3 Mar 2024 22:40:00 +0100</pubDate>
426 <description>&lt;p&gt;The last few days I have revisited RAID setup using the LSI
427 Megaraid controller. These are a family of controllers called PERC by
428 Dell, and is present in several old PowerEdge servers, and I recently
429 got my hands on one of these. I had forgotten how to handle this RAID
430 controller in Debian, so I had to take a peek in the
431 &lt;a href=&quot;https://wiki.debian.org/LinuxRaidForAdmins&quot;&gt;Debian wiki page
432 &quot;Linux and Hardware RAID: an administrator&#39;s summary&quot;&lt;/a&gt; to remember
433 what kind of software is available to configure and monitor the disks
434 and controller. I prefer Free Software alternatives to proprietary
435 tools, as the later tend to fall into disarray once the manufacturer
436 loose interest, and often do not work with newer Linux Distributions.
437 Sadly there is no free software tool to configure the RAID setup, only
438 to monitor it. RAID can provide improved reliability and resilience in
439 a storage solution, but only if it is being regularly checked and any
440 broken disks are being replaced in time. I thus want to ensure some
441 automatic monitoring is available.&lt;/p&gt;
442
443 &lt;p&gt;In the discovery process, I came across a old free software tool to
444 monitor PERC2, PERC3, PERC4 and PERC5 controllers, which to my
445 surprise is not present in debian. To help change that I created a
446 &lt;a href=&quot;https://bugs.debian.org/1065322&quot;&gt;request for packaging of the
447 megactl package&lt;/a&gt;, and tried to track down a usable version.
448 &lt;a href=&quot;https://sourceforge.net/p/megactl/&quot;&gt;The original project
449 site&lt;/a&gt; is on Sourceforge, but as far as I can tell that project has
450 been dead for more than 15 years. I managed to find a
451 &lt;a href=&quot;https://github.com/hmage/megactl&quot;&gt;more recent fork on
452 github&lt;/a&gt; from user hmage, but it is unclear to me if this is still
453 being maintained. It has not seen much improvements since 2016. A
454 &lt;a href=&quot;https://github.com/namiltd/megactl&quot;&gt;more up to date
455 edition&lt;/a&gt; is a git fork from the original github fork by user
456 namiltd, and this newer fork seem a lot more promising. The owner of
457 this github repository has replied to change proposals within hours,
458 and had already added some improvements and support for more hardware.
459 Sadly he is reluctant to commit to maintaining the tool and stated in
460 &lt;a href=&quot;https://github.com/namiltd/megactl/pull/1&quot;&gt;my first pull
461 request&lt;/A&gt; that he think a new release should be made based on the
462 git repository owned by hmage. I perfectly understand this
463 reluctance, as I feel the same about maintaining yet another package
464 in Debian when I barely have time to take care of the ones I already
465 maintain, but do not really have high hopes that hmage will have time
466 to spend on it and hope namiltd will change his mind.&lt;/p&gt;
467
468 &lt;p&gt;In any case, I created
469 &lt;a href=&quot;https://salsa.debian.org/debian/megactl&quot;&gt;a draft package&lt;/a&gt;
470 based on the namiltd edition and put it under the debian group on
471 salsa.debian.org. If you own a Dell PowerEdge server with one of the
472 PERC controllers, or any other RAID controller using the megaraid or
473 megaraid_sas Linux kernel modules, you might want to check it out. If
474 enough people are interested, perhaps the package will make it into
475 the Debian archive.&lt;/p&gt;
476
477 &lt;p&gt;There are two tools provided, megactl for the megaraid Linux kernel
478 module, and megasasctl for the megaraid_sas Linux kernel module. The
479 simple output from the command on one of my machines look like this
480 (yes, I know some of the disks have problems. :).&lt;/p&gt;
481
482 &lt;pre&gt;
483 # megasasctl
484 a0 PERC H730 Mini encl:1 ldrv:2 batt:good
485 a0d0 558GiB RAID 1 1x2 optimal
486 a0d1 3067GiB RAID 0 1x11 optimal
487 a0e32s0 558GiB a0d0 online errs: media:0 other:19
488 a0e32s1 279GiB a0d1 online
489 a0e32s2 279GiB a0d1 online
490 a0e32s3 279GiB a0d1 online
491 a0e32s4 279GiB a0d1 online
492 a0e32s5 279GiB a0d1 online
493 a0e32s6 279GiB a0d1 online
494 a0e32s8 558GiB a0d0 online errs: media:0 other:17
495 a0e32s9 279GiB a0d1 online
496 a0e32s10 279GiB a0d1 online
497 a0e32s11 279GiB a0d1 online
498 a0e32s12 279GiB a0d1 online
499 a0e32s13 279GiB a0d1 online
500
501 #
502 &lt;/pre&gt;
503
504 &lt;p&gt;In addition to displaying a simple status report, it can also test
505 individual drives and print the various event logs. Perhaps you too
506 find it useful?&lt;/p&gt;
507
508 &lt;p&gt;In the packaging process I provided some patches upstream to
509 improve installation and ensure
510 &lt;ahref=&quot;https://github.com/namiltd/megactl/pull/2&quot;&gt;a Appstream
511 metainfo file is provided&lt;/a&gt; to list all supported HW, to allow
512 &lt;a href=&quot;https://tracker.debian.org/isenkram&quot;&gt;isenkram&lt;/a&gt; to propose
513 the package on all servers with a relevant PCI card.&lt;/p&gt;
514
515 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
516 activities, please send Bitcoin donations to my address
517 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
518
519 </description>
520 </item>
521
522 <item>
523 <title>What is the most supported MIME type in Debian in 2018?</title>
524 <link>http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html</link>
525 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html</guid>
526 <pubDate>Mon, 9 Jul 2018 08:05:00 +0200</pubDate>
527 <description>&lt;p&gt;Five years ago,
528 &lt;a href=&quot;http://www.hungry.com/~pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html&quot;&gt;I
529 measured what the most supported MIME type in Debian was&lt;/a&gt;, by
530 analysing the desktop files in all packages in the archive. Since
531 then, the DEP-11 AppStream system has been put into production, making
532 the task a lot easier. This made me want to repeat the measurement,
533 to see how much things changed. Here are the new numbers, for
534 unstable only this time:
535
536 &lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
537
538 &lt;pre&gt;
539 count MIME type
540 ----- -----------------------
541 56 image/jpeg
542 55 image/png
543 49 image/tiff
544 48 image/gif
545 39 image/bmp
546 38 text/plain
547 37 audio/mpeg
548 34 application/ogg
549 33 audio/x-flac
550 32 audio/x-mp3
551 30 audio/x-wav
552 30 audio/x-vorbis+ogg
553 29 image/x-portable-pixmap
554 27 inode/directory
555 27 image/x-portable-bitmap
556 27 audio/x-mpeg
557 26 application/x-ogg
558 25 audio/x-mpegurl
559 25 audio/ogg
560 24 text/html
561 &lt;/pre&gt;
562
563 &lt;p&gt;The list was created like this using a sid chroot: &quot;cat
564 /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz| zcat | awk &#39;/^
565 - \S+\/\S+$/ {print $2 }&#39; | sort | uniq -c | sort -nr | head -20&quot;&lt;/p&gt;
566
567 &lt;p&gt;It is interesting to see how image formats have passed text/plain
568 as the most announced supported MIME type. These days, thanks to the
569 AppStream system, if you run into a file format you do not know, and
570 want to figure out which packages support the format, you can find the
571 MIME type of the file using &quot;file --mime &amp;lt;filename&amp;gt;&quot;, and then
572 look up all packages announcing support for this format in their
573 AppStream metadata (XML or .desktop file) using &quot;appstreamcli
574 what-provides mimetype &amp;lt;mime-type&amp;gt;. For example if you, like
575 me, want to know which packages support inode/directory, you can get a
576 list like this:&lt;/p&gt;
577
578 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
579 % appstreamcli what-provides mimetype inode/directory | grep Package: | sort
580 Package: anjuta
581 Package: audacious
582 Package: baobab
583 Package: cervisia
584 Package: chirp
585 Package: dolphin
586 Package: doublecmd-common
587 Package: easytag
588 Package: enlightenment
589 Package: ephoto
590 Package: filelight
591 Package: gwenview
592 Package: k4dirstat
593 Package: kaffeine
594 Package: kdesvn
595 Package: kid3
596 Package: kid3-qt
597 Package: nautilus
598 Package: nemo
599 Package: pcmanfm
600 Package: pcmanfm-qt
601 Package: qweborf
602 Package: ranger
603 Package: sirikali
604 Package: spacefm
605 Package: spacefm
606 Package: vifm
607 %
608 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
609
610 &lt;p&gt;Using the same method, I can quickly discover that the Sketchup file
611 format is not yet supported by any package in Debian:&lt;/p&gt;
612
613 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
614 % appstreamcli what-provides mimetype application/vnd.sketchup.skp
615 Could not find component providing &#39;mimetype::application/vnd.sketchup.skp&#39;.
616 %
617 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
618
619 &lt;p&gt;Yesterday I used it to figure out which packages support the STL 3D
620 format:&lt;/p&gt;
621
622 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
623 % appstreamcli what-provides mimetype application/sla|grep Package
624 Package: cura
625 Package: meshlab
626 Package: printrun
627 %
628 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
629
630 &lt;p&gt;PS: A new version of Cura was uploaded to Debian yesterday.&lt;/p&gt;
631
632 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
633 activities, please send Bitcoin donations to my address
634 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
635 </description>
636 </item>
637
638 <item>
639 <title>Appstream just learned how to map hardware to packages too!</title>
640 <link>http://www.hungry.com/~pere/blog/Appstream_just_learned_how_to_map_hardware_to_packages_too_.html</link>
641 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Appstream_just_learned_how_to_map_hardware_to_packages_too_.html</guid>
642 <pubDate>Fri, 23 Dec 2016 10:30:00 +0100</pubDate>
643 <description>&lt;p&gt;I received a very nice Christmas present today. As my regular
644 readers probably know, I have been working on the
645 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;the Isenkram
646 system&lt;/a&gt; for many years. The goal of the Isenkram system is to make
647 it easier for users to figure out what to install to get a given piece
648 of hardware to work in Debian, and a key part of this system is a way
649 to map hardware to packages. Isenkram have its own mapping database,
650 and also uses data provided by each package using the AppStream
651 metadata format. And today,
652 &lt;a href=&quot;https://tracker.debian.org/pkg/appstream&quot;&gt;AppStream&lt;/a&gt; in
653 Debian learned to look up hardware the same way Isenkram is doing it,
654 ie using fnmatch():&lt;/p&gt;
655
656 &lt;p&gt;&lt;pre&gt;
657 % appstreamcli what-provides modalias \
658 usb:v1130p0202d0100dc00dsc00dp00ic03isc00ip00in00
659 Identifier: pymissile [generic]
660 Name: pymissile
661 Summary: Control original Striker USB Missile Launcher
662 Package: pymissile
663 % appstreamcli what-provides modalias usb:v0694p0002d0000
664 Identifier: libnxt [generic]
665 Name: libnxt
666 Summary: utility library for talking to the LEGO Mindstorms NXT brick
667 Package: libnxt
668 ---
669 Identifier: t2n [generic]
670 Name: t2n
671 Summary: Simple command-line tool for Lego NXT
672 Package: t2n
673 ---
674 Identifier: python-nxt [generic]
675 Name: python-nxt
676 Summary: Python driver/interface/wrapper for the Lego Mindstorms NXT robot
677 Package: python-nxt
678 ---
679 Identifier: nbc [generic]
680 Name: nbc
681 Summary: C compiler for LEGO Mindstorms NXT bricks
682 Package: nbc
683 %
684 &lt;/pre&gt;&lt;/p&gt;
685
686 &lt;p&gt;A similar query can be done using the combined AppStream and
687 Isenkram databases using the isenkram-lookup tool:&lt;/p&gt;
688
689 &lt;p&gt;&lt;pre&gt;
690 % isenkram-lookup usb:v1130p0202d0100dc00dsc00dp00ic03isc00ip00in00
691 pymissile
692 % isenkram-lookup usb:v0694p0002d0000
693 libnxt
694 nbc
695 python-nxt
696 t2n
697 %
698 &lt;/pre&gt;&lt;/p&gt;
699
700 &lt;p&gt;You can find modalias values relevant for your machine using
701 &lt;tt&gt;cat $(find /sys/devices/ -name modalias)&lt;/tt&gt;.
702
703 &lt;p&gt;If you want to make this system a success and help Debian users
704 make the most of the hardware they have, please help
705 &lt;a href=&quot;https://wiki.debian.org/AppStream/Guidelines&quot;&gt;add AppStream
706 metadata for your package following the guidelines&lt;/a&gt; documented in
707 the wiki. So far only 11 packages provide such information, among the
708 several hundred hardware specific packages in Debian. The Isenkram
709 database on the other hand contain 101 packages, mostly related to USB
710 dongles. Most of the packages with hardware mapping in AppStream are
711 LEGO Mindstorms related, because I have, as part of my involvement in
712 &lt;a href=&quot;https://wiki.debian.org/LegoDesigners&quot;&gt;the Debian LEGO
713 team&lt;/a&gt; given priority to making sure LEGO users get proposed the
714 complete set of packages in Debian for that particular hardware. The
715 team also got a nice Christmas present today. The
716 &lt;a href=&quot;https://tracker.debian.org/pkg/nxt-firmware&quot;&gt;nxt-firmware
717 package&lt;/a&gt; made it into Debian. With this package in place, it is
718 now possible to use the LEGO Mindstorms NXT unit with only free
719 software, as the nxt-firmware package contain the source and firmware
720 binaries for the NXT brick.&lt;/p&gt;
721
722 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
723 activities, please send Bitcoin donations to my address
724 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
725 </description>
726 </item>
727
728 <item>
729 <title>Isenkram updated with a lot more hardware-package mappings</title>
730 <link>http://www.hungry.com/~pere/blog/Isenkram_updated_with_a_lot_more_hardware_package_mappings.html</link>
731 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Isenkram_updated_with_a_lot_more_hardware_package_mappings.html</guid>
732 <pubDate>Tue, 20 Dec 2016 11:55:00 +0100</pubDate>
733 <description>&lt;p&gt;&lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;The Isenkram
734 system&lt;/a&gt; I wrote two years ago to make it easier in Debian to find
735 and install packages to get your hardware dongles to work, is still
736 going strong. It is a system to look up the hardware present on or
737 connected to the current system, and map the hardware to Debian
738 packages. It can either be done using the tools in isenkram-cli or
739 using the user space daemon in the isenkram package. The latter will
740 notify you, when inserting new hardware, about what packages to
741 install to get the dongle working. It will even provide a button to
742 click on to ask packagekit to install the packages.&lt;/p&gt;
743
744 &lt;p&gt;Here is an command line example from my Thinkpad laptop:&lt;/p&gt;
745
746 &lt;p&gt;&lt;pre&gt;
747 % isenkram-lookup
748 bluez
749 cheese
750 ethtool
751 fprintd
752 fprintd-demo
753 gkrellm-thinkbat
754 hdapsd
755 libpam-fprintd
756 pidgin-blinklight
757 thinkfan
758 tlp
759 tp-smapi-dkms
760 tp-smapi-source
761 tpb
762 %
763 &lt;/pre&gt;&lt;/p&gt;
764
765 &lt;p&gt;It can also list the firware package providing firmware requested
766 by the load kernel modules, which in my case is an empty list because
767 I have all the firmware my machine need:
768
769 &lt;p&gt;&lt;pre&gt;
770 % /usr/sbin/isenkram-autoinstall-firmware -l
771 info: did not find any firmware files requested by loaded kernel modules. exiting
772 %
773 &lt;/pre&gt;&lt;/p&gt;
774
775 &lt;p&gt;The last few days I had a look at several of the around 250
776 packages in Debian with udev rules. These seem like good candidates
777 to install when a given hardware dongle is inserted, and I found
778 several that should be proposed by isenkram. I have not had time to
779 check all of them, but am happy to report that now there are 97
780 packages packages mapped to hardware by Isenkram. 11 of these
781 packages provide hardware mapping using AppStream, while the rest are
782 listed in the modaliases file provided in isenkram.&lt;/p&gt;
783
784 &lt;p&gt;These are the packages with hardware mappings at the moment. The
785 &lt;strong&gt;marked packages&lt;/strong&gt; are also announcing their hardware
786 support using AppStream, for everyone to use:&lt;/p&gt;
787
788 &lt;p&gt;air-quality-sensor, alsa-firmware-loaders, argyll,
789 &lt;strong&gt;array-info&lt;/strong&gt;, avarice, avrdude, b43-fwcutter,
790 bit-babbler, bluez, bluez-firmware, &lt;strong&gt;brltty&lt;/strong&gt;,
791 &lt;strong&gt;broadcom-sta-dkms&lt;/strong&gt;, calibre, cgminer, cheese, colord,
792 &lt;strong&gt;colorhug-client&lt;/strong&gt;, dahdi-firmware-nonfree, dahdi-linux,
793 dfu-util, dolphin-emu, ekeyd, ethtool, firmware-ipw2x00, fprintd,
794 fprintd-demo, &lt;strong&gt;galileo&lt;/strong&gt;, gkrellm-thinkbat, gphoto2,
795 gpsbabel, gpsbabel-gui, gpsman, gpstrans, gqrx-sdr, gr-fcdproplus,
796 gr-osmosdr, gtkpod, hackrf, hdapsd, hdmi2usb-udev, hpijs-ppds, hplip,
797 ipw3945-source, ipw3945d, kde-config-tablet, kinect-audio-setup,
798 &lt;strong&gt;libnxt&lt;/strong&gt;, libpam-fprintd, &lt;strong&gt;lomoco&lt;/strong&gt;,
799 madwimax, minidisc-utils, mkgmap, msi-keyboard, mtkbabel,
800 &lt;strong&gt;nbc&lt;/strong&gt;, &lt;strong&gt;nqc&lt;/strong&gt;, nut-hal-drivers, ola,
801 open-vm-toolbox, open-vm-tools, openambit, pcgminer, pcmciautils,
802 pcscd, pidgin-blinklight, printer-driver-splix,
803 &lt;strong&gt;pymissile&lt;/strong&gt;, python-nxt, qlandkartegt,
804 qlandkartegt-garmin, rosegarden, rt2x00-source, sispmctl,
805 soapysdr-module-hackrf, solaar, squeak-plugins-scratch, sunxi-tools,
806 &lt;strong&gt;t2n&lt;/strong&gt;, thinkfan, thinkfinger-tools, tlp, tp-smapi-dkms,
807 tp-smapi-source, tpb, tucnak, uhd-host, usbmuxd, viking,
808 virtualbox-ose-guest-x11, w1retap, xawtv, xserver-xorg-input-vmmouse,
809 xserver-xorg-input-wacom, xserver-xorg-video-qxl,
810 xserver-xorg-video-vmware, yubikey-personalization and
811 zd1211-firmware&lt;/p&gt;
812
813 &lt;p&gt;If you know of other packages, please let me know with a wishlist
814 bug report against the isenkram-cli package, and ask the package
815 maintainer to
816 &lt;a href=&quot;https://wiki.debian.org/AppStream/Guidelines&quot;&gt;add AppStream
817 metadata according to the guidelines&lt;/a&gt; to provide the information
818 for everyone. In time, I hope to get rid of the isenkram specific
819 hardware mapping and depend exclusively on AppStream.&lt;/p&gt;
820
821 &lt;p&gt;Note, the AppStream metadata for broadcom-sta-dkms is matching too
822 much hardware, and suggest that the package with with any ethernet
823 card. See &lt;a href=&quot;http://bugs.debian.org/838735&quot;&gt;bug #838735&lt;/a&gt; for
824 the details. I hope the maintainer find time to address it soon. In
825 the mean time I provide an override in isenkram.&lt;/p&gt;
826 </description>
827 </item>
828
829 <item>
830 <title>Isenkram, Appstream and udev make life as a LEGO builder easier</title>
831 <link>http://www.hungry.com/~pere/blog/Isenkram__Appstream_and_udev_make_life_as_a_LEGO_builder_easier.html</link>
832 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Isenkram__Appstream_and_udev_make_life_as_a_LEGO_builder_easier.html</guid>
833 <pubDate>Fri, 7 Oct 2016 09:50:00 +0200</pubDate>
834 <description>&lt;p&gt;&lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;The Isenkram
835 system&lt;/a&gt; provide a practical and easy way to figure out which
836 packages support the hardware in a given machine. The command line
837 tool &lt;tt&gt;isenkram-lookup&lt;/tt&gt; and the tasksel options provide a
838 convenient way to list and install packages relevant for the current
839 hardware during system installation, both user space packages and
840 firmware packages. The GUI background daemon on the other hand provide
841 a pop-up proposing to install packages when a new dongle is inserted
842 while using the computer. For example, if you plug in a smart card
843 reader, the system will ask if you want to install &lt;tt&gt;pcscd&lt;/tt&gt; if
844 that package isn&#39;t already installed, and if you plug in a USB video
845 camera the system will ask if you want to install &lt;tt&gt;cheese&lt;/tt&gt; if
846 cheese is currently missing. This already work just fine.&lt;/p&gt;
847
848 &lt;p&gt;But Isenkram depend on a database mapping from hardware IDs to
849 package names. When I started no such database existed in Debian, so
850 I made my own data set and included it with the isenkram package and
851 made isenkram fetch the latest version of this database from git using
852 http. This way the isenkram users would get updated package proposals
853 as soon as I learned more about hardware related packages.&lt;/p&gt;
854
855 &lt;p&gt;The hardware is identified using modalias strings. The modalias
856 design is from the Linux kernel where most hardware descriptors are
857 made available as a strings that can be matched using filename style
858 globbing. It handle USB, PCI, DMI and a lot of other hardware related
859 identifiers.&lt;/p&gt;
860
861 &lt;p&gt;The downside to the Isenkram specific database is that there is no
862 information about relevant distribution / Debian version, making
863 isenkram propose obsolete packages too. But along came AppStream, a
864 cross distribution mechanism to store and collect metadata about
865 software packages. When I heard about the proposal, I contacted the
866 people involved and suggested to add a hardware matching rule using
867 modalias strings in the specification, to be able to use AppStream for
868 mapping hardware to packages. This idea was accepted and AppStream is
869 now a great way for a package to announce the hardware it support in a
870 distribution neutral way. I wrote
871 &lt;a href=&quot;http://www.hungry.com/~pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html&quot;&gt;a
872 recipe on how to add such meta-information&lt;/a&gt; in a blog post last
873 December. If you have a hardware related package in Debian, please
874 announce the relevant hardware IDs using AppStream.&lt;/p&gt;
875
876 &lt;p&gt;In Debian, almost all packages that can talk to a LEGO Mindestorms
877 RCX or NXT unit, announce this support using AppStream. The effect is
878 that when you insert such LEGO robot controller into your Debian
879 machine, Isenkram will propose to install the packages needed to get
880 it working. The intention is that this should allow the local user to
881 start programming his robot controller right away without having to
882 guess what packages to use or which permissions to fix.&lt;/p&gt;
883
884 &lt;p&gt;But when I sat down with my son the other day to program our NXT
885 unit using his Debian Stretch computer, I discovered something
886 annoying. The local console user (ie my son) did not get access to
887 the USB device for programming the unit. This used to work, but no
888 longer in Jessie and Stretch. After some investigation and asking
889 around on #debian-devel, I discovered that this was because udev had
890 changed the mechanism used to grant access to local devices. The
891 ConsoleKit mechanism from &lt;tt&gt;/lib/udev/rules.d/70-udev-acl.rules&lt;/tt&gt;
892 no longer applied, because LDAP users no longer was added to the
893 plugdev group during login. Michael Biebl told me that this method
894 was obsolete and the new method used ACLs instead. This was good
895 news, as the plugdev mechanism is a mess when using a remote user
896 directory like LDAP. Using ACLs would make sure a user lost device
897 access when she logged out, even if the user left behind a background
898 process which would retain the plugdev membership with the ConsoleKit
899 setup. Armed with this knowledge I moved on to fix the access problem
900 for the LEGO Mindstorms related packages.&lt;/p&gt;
901
902 &lt;p&gt;The new system uses a udev tag, &#39;uaccess&#39;. It can either be
903 applied directly for a device, or is applied in
904 /lib/udev/rules.d/70-uaccess.rules for classes of devices. As the
905 LEGO Mindstorms udev rules did not have a class, I decided to add the
906 tag directly in the udev rules files included in the packages. Here
907 is one example. For the nqc C compiler for the RCX, the
908 &lt;tt&gt;/lib/udev/rules.d/60-nqc.rules&lt;/tt&gt; file now look like this:
909
910 &lt;p&gt;&lt;pre&gt;
911 SUBSYSTEM==&quot;usb&quot;, ACTION==&quot;add&quot;, ATTR{idVendor}==&quot;0694&quot;, ATTR{idProduct}==&quot;0001&quot;, \
912 SYMLINK+=&quot;rcx-%k&quot;, TAG+=&quot;uaccess&quot;
913 &lt;/pre&gt;&lt;/p&gt;
914
915 &lt;p&gt;The key part is the &#39;TAG+=&quot;uaccess&quot;&#39; at the end. I suspect all
916 packages using plugdev in their /lib/udev/rules.d/ files should be
917 changed to use this tag (either directly or indirectly via
918 &lt;tt&gt;70-uaccess.rules&lt;/tt&gt;). Perhaps a lintian check should be created
919 to detect this?&lt;/p&gt;
920
921 &lt;p&gt;I&#39;ve been unable to find good documentation on the uaccess feature.
922 It is unclear to me if the uaccess tag is an internal implementation
923 detail like the udev-acl tag used by
924 &lt;tt&gt;/lib/udev/rules.d/70-udev-acl.rules&lt;/tt&gt;. If it is, I guess the
925 indirect method is the preferred way. Michael
926 &lt;a href=&quot;https://github.com/systemd/systemd/issues/4288&quot;&gt;asked for more
927 documentation from the systemd project&lt;/a&gt; and I hope it will make
928 this clearer. For now I use the generic classes when they exist and
929 is already handled by &lt;tt&gt;70-uaccess.rules&lt;/tt&gt;, and add the tag
930 directly if no such class exist.&lt;/p&gt;
931
932 &lt;p&gt;To learn more about the isenkram system, please check out
933 &lt;a href=&quot;http://www.hungry.com/~pere/blog/tags/isenkram/&quot;&gt;my
934 blog posts tagged isenkram&lt;/a&gt;.&lt;/p&gt;
935
936 &lt;p&gt;To help out making life for LEGO constructors in Debian easier,
937 please join us on our IRC channel
938 &lt;a href=&quot;irc://irc.debian.org/%23debian-lego&quot;&gt;#debian-lego&lt;/a&gt; and join
939 the &lt;a href=&quot;https://alioth.debian.org/projects/debian-lego/&quot;&gt;Debian
940 LEGO team&lt;/a&gt; in the Alioth project we created yesterday. A mailing
941 list is not yet created, but we are working on it. :)&lt;/p&gt;
942
943 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
944 activities, please send Bitcoin donations to my address
945 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
946 </description>
947 </item>
948
949 <item>
950 <title>Isenkram with PackageKit support - new version 0.23 available in Debian unstable</title>
951 <link>http://www.hungry.com/~pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</link>
952 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html</guid>
953 <pubDate>Wed, 25 May 2016 10:20:00 +0200</pubDate>
954 <description>&lt;p&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/isenkram&quot;&gt;The isenkram
955 system&lt;/a&gt; is a user-focused solution in Debian for handling hardware
956 related packages. The idea is to have a database of mappings between
957 hardware and packages, and pop up a dialog suggesting for the user to
958 install the packages to use a given hardware dongle. Some use cases
959 are when you insert a Yubikey, it proposes to install the software
960 needed to control it; when you insert a braille reader list it
961 proposes to install the packages needed to send text to the reader;
962 and when you insert a ColorHug screen calibrator it suggests to
963 install the driver for it. The system work well, and even have a few
964 command line tools to install firmware packages and packages for the
965 hardware already in the machine (as opposed to hotpluggable hardware).&lt;/p&gt;
966
967 &lt;p&gt;The system was initially written using aptdaemon, because I found
968 good documentation and example code on how to use it. But aptdaemon
969 is going away and is generally being replaced by
970 &lt;a href=&quot;http://www.freedesktop.org/software/PackageKit/&quot;&gt;PackageKit&lt;/a&gt;,
971 so Isenkram needed a rewrite. And today, thanks to the great patch
972 from my college Sunil Mohan Adapa in the FreedomBox project, the
973 rewrite finally took place. I&#39;ve just uploaded a new version of
974 Isenkram into Debian Unstable with the patch included, and the default
975 for the background daemon is now to use PackageKit. To check it out,
976 install the &lt;tt&gt;isenkram&lt;/tt&gt; package and insert some hardware dongle
977 and see if it is recognised.&lt;/p&gt;
978
979 &lt;p&gt;If you want to know what kind of packages isenkram would propose for
980 the machine it is running on, you can check out the isenkram-lookup
981 program. This is what it look like on a Thinkpad X230:&lt;/p&gt;
982
983 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
984 % isenkram-lookup
985 bluez
986 cheese
987 fprintd
988 fprintd-demo
989 gkrellm-thinkbat
990 hdapsd
991 libpam-fprintd
992 pidgin-blinklight
993 thinkfan
994 tleds
995 tp-smapi-dkms
996 tp-smapi-source
997 tpb
998 %p
999 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
1000
1001 &lt;p&gt;The hardware mappings come from several places. The preferred way
1002 is for packages to announce their hardware support using
1003 &lt;a href=&quot;https://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
1004 cross distribution appstream system&lt;/a&gt;.
1005 See
1006 &lt;a href=&quot;http://www.hungry.com/~pere/blog/tags/isenkram/&quot;&gt;previous
1007 blog posts about isenkram&lt;/a&gt; to learn how to do that.&lt;/p&gt;
1008 </description>
1009 </item>
1010
1011 <item>
1012 <title>Using appstream with isenkram to install hardware related packages in Debian</title>
1013 <link>http://www.hungry.com/~pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</link>
1014 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</guid>
1015 <pubDate>Sun, 20 Dec 2015 12:20:00 +0100</pubDate>
1016 <description>&lt;p&gt;Around three years ago, I created
1017 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;the isenkram
1018 system&lt;/a&gt; to get a more practical solution in Debian for handing
1019 hardware related packages. A GUI system in the isenkram package will
1020 present a pop-up dialog when some hardware dongle supported by
1021 relevant packages in Debian is inserted into the machine. The same
1022 lookup mechanism to detect packages is available as command line
1023 tools in the isenkram-cli package. In addition to mapping hardware,
1024 it will also map kernel firmware files to packages and make it easy to
1025 install needed firmware packages automatically. The key for this
1026 system to work is a good way to map hardware to packages, in other
1027 words, allow packages to announce what hardware they will work
1028 with.&lt;/p&gt;
1029
1030 &lt;p&gt;I started by providing data files in the isenkram source, and
1031 adding code to download the latest version of these data files at run
1032 time, to ensure every user had the most up to date mapping available.
1033 I also added support for storing the mapping in the Packages file in
1034 the apt repositories, but did not push this approach because while I
1035 was trying to figure out how to best store hardware/package mappings,
1036 &lt;a href=&quot;http://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
1037 appstream system&lt;/a&gt; was announced. I got in touch and suggested to
1038 add the hardware mapping into that data set to be able to use
1039 appstream as a data source, and this was accepted at least for the
1040 Debian version of appstream.&lt;/p&gt;
1041
1042 &lt;p&gt;A few days ago using appstream in Debian for this became possible,
1043 and today I uploaded a new version 0.20 of isenkram adding support for
1044 appstream as a data source for mapping hardware to packages. The only
1045 package so far using appstream to announce its hardware support is my
1046 pymissile package. I got help from Matthias Klumpp with figuring out
1047 how do add the required
1048 &lt;a href=&quot;https://appstream.debian.org/html/sid/main/metainfo/pymissile.html&quot;&gt;metadata
1049 in pymissile&lt;/a&gt;. I added a file debian/pymissile.metainfo.xml with
1050 this content:&lt;/p&gt;
1051
1052 &lt;blockquote&gt;&lt;pre&gt;
1053 &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
1054 &amp;lt;component&amp;gt;
1055 &amp;lt;id&amp;gt;pymissile&amp;lt;/id&amp;gt;
1056 &amp;lt;metadata_license&amp;gt;MIT&amp;lt;/metadata_license&amp;gt;
1057 &amp;lt;name&amp;gt;pymissile&amp;lt;/name&amp;gt;
1058 &amp;lt;summary&amp;gt;Control original Striker USB Missile Launcher&amp;lt;/summary&amp;gt;
1059 &amp;lt;description&amp;gt;
1060 &amp;lt;p&amp;gt;
1061 Pymissile provides a curses interface to control an original
1062 Marks and Spencer / Striker USB Missile Launcher, as well as a
1063 motion control script to allow a webcamera to control the
1064 launcher.
1065 &amp;lt;/p&amp;gt;
1066 &amp;lt;/description&amp;gt;
1067 &amp;lt;provides&amp;gt;
1068 &amp;lt;modalias&amp;gt;usb:v1130p0202d*&amp;lt;/modalias&amp;gt;
1069 &amp;lt;/provides&amp;gt;
1070 &amp;lt;/component&amp;gt;
1071 &lt;/pre&gt;&lt;/blockquote&gt;
1072
1073 &lt;p&gt;The key for isenkram is the component/provides/modalias value,
1074 which is a glob style match rule for hardware specific strings
1075 (modalias strings) provided by the Linux kernel. In this case, it
1076 will map to all USB devices with vendor code 1130 and product code
1077 0202.&lt;/p&gt;
1078
1079 &lt;p&gt;Note, it is important that the license of all the metadata files
1080 are compatible to have permissions to aggregate them into archive wide
1081 appstream files. Matthias suggested to use MIT or BSD licenses for
1082 these files. A challenge is figuring out a good id for the data, as
1083 it is supposed to be globally unique and shared across distributions
1084 (in other words, best to coordinate with upstream what to use). But
1085 it can be changed later or, so we went with the package name as
1086 upstream for this project is dormant.&lt;/p&gt;
1087
1088 &lt;p&gt;To get the metadata file installed in the correct location for the
1089 mirror update scripts to pick it up and include its content the
1090 appstream data source, the file must be installed in the binary
1091 package under /usr/share/appdata/. I did this by adding the following
1092 line to debian/pymissile.install:&lt;/p&gt;
1093
1094 &lt;blockquote&gt;&lt;pre&gt;
1095 debian/pymissile.metainfo.xml usr/share/appdata
1096 &lt;/pre&gt;&lt;/blockquote&gt;
1097
1098 &lt;p&gt;With that in place, the command line tool isenkram-lookup will list
1099 all packages useful on the current computer automatically, and the GUI
1100 pop-up handler will propose to install the package not already
1101 installed if a hardware dongle is inserted into the machine in
1102 question.&lt;/p&gt;
1103
1104 &lt;p&gt;Details of the modalias field in appstream is available from the
1105 &lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;DEP-11&lt;/a&gt; proposal.&lt;/p&gt;
1106
1107 &lt;p&gt;To locate the modalias values of all hardware present in a machine,
1108 try running this command on the command line:&lt;/p&gt;
1109
1110 &lt;blockquote&gt;&lt;pre&gt;
1111 cat $(find /sys/devices/|grep modalias)
1112 &lt;/pre&gt;&lt;/blockquote&gt;
1113
1114 &lt;p&gt;To learn more about the isenkram system, please check out
1115 &lt;a href=&quot;http://www.hungry.com/~pere/blog/tags/isenkram/&quot;&gt;my
1116 blog posts tagged isenkram&lt;/a&gt;.&lt;/p&gt;
1117 </description>
1118 </item>
1119
1120 <item>
1121 <title>Debian Jessie, PXE and automatic firmware installation</title>
1122 <link>http://www.hungry.com/~pere/blog/Debian_Jessie__PXE_and_automatic_firmware_installation.html</link>
1123 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Debian_Jessie__PXE_and_automatic_firmware_installation.html</guid>
1124 <pubDate>Fri, 17 Oct 2014 14:10:00 +0200</pubDate>
1125 <description>&lt;p&gt;When PXE installing laptops with Debian, I often run into the
1126 problem that the WiFi card require some firmware to work properly.
1127 And it has been a pain to fix this using preseeding in Debian.
1128 Normally something more is needed. But thanks to
1129 &lt;a href=&quot;https://packages.qa.debian.org/i/isenkram.html&quot;&gt;my isenkram
1130 package&lt;/a&gt; and its recent tasksel extension, it has now become easy
1131 to do this using simple preseeding.&lt;/p&gt;
1132
1133 &lt;p&gt;The isenkram-cli package provide tasksel tasks which will install
1134 firmware for the hardware found in the machine (actually, requested by
1135 the kernel modules for the hardware). (It can also install user space
1136 programs supporting the hardware detected, but that is not the focus
1137 of this story.)&lt;/p&gt;
1138
1139 &lt;p&gt;To get this working in the default installation, two preeseding
1140 values are needed. First, the isenkram-cli package must be installed
1141 into the target chroot (aka the hard drive) before tasksel is executed
1142 in the pkgsel step of the debian-installer system. This is done by
1143 preseeding the base-installer/includes debconf value to include the
1144 isenkram-cli package. The package name is next passed to debootstrap
1145 for installation. With the isenkram-cli package in place, tasksel
1146 will automatically use the isenkram tasks to detect hardware specific
1147 packages for the machine being installed and install them, because
1148 isenkram-cli contain tasksel tasks.&lt;/p&gt;
1149
1150 &lt;p&gt;Second, one need to enable the non-free APT repository, because
1151 most firmware unfortunately is non-free. This is done by preseeding
1152 the apt-mirror-setup step. This is unfortunate, but for a lot of
1153 hardware it is the only option in Debian.&lt;/p&gt;
1154
1155 &lt;p&gt;The end result is two lines needed in your preseeding file to get
1156 firmware installed automatically by the installer:&lt;/p&gt;
1157
1158 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
1159 base-installer base-installer/includes string isenkram-cli
1160 apt-mirror-setup apt-setup/non-free boolean true
1161 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
1162
1163 &lt;p&gt;The current version of isenkram-cli in testing/jessie will install
1164 both firmware and user space packages when using this method. It also
1165 do not work well, so use version 0.15 or later. Installing both
1166 firmware and user space packages might give you a bit more than you
1167 want, so I decided to split the tasksel task in two, one for firmware
1168 and one for user space programs. The firmware task is enabled by
1169 default, while the one for user space programs is not. This split is
1170 implemented in the package currently in unstable.&lt;/p&gt;
1171
1172 &lt;p&gt;If you decide to give this a go, please let me know (via email) how
1173 this recipe work for you. :)&lt;/p&gt;
1174
1175 &lt;p&gt;So, I bet you are wondering, how can this work. First and
1176 foremost, it work because tasksel is modular, and driven by whatever
1177 files it find in /usr/lib/tasksel/ and /usr/share/tasksel/. So the
1178 isenkram-cli package place two files for tasksel to find. First there
1179 is the task description file (/usr/share/tasksel/descs/isenkram.desc):&lt;/p&gt;
1180
1181 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
1182 Task: isenkram-packages
1183 Section: hardware
1184 Description: Hardware specific packages (autodetected by isenkram)
1185 Based on the detected hardware various hardware specific packages are
1186 proposed.
1187 Test-new-install: show show
1188 Relevance: 8
1189 Packages: for-current-hardware
1190
1191 Task: isenkram-firmware
1192 Section: hardware
1193 Description: Hardware specific firmware packages (autodetected by isenkram)
1194 Based on the detected hardware various hardware specific firmware
1195 packages are proposed.
1196 Test-new-install: mark show
1197 Relevance: 8
1198 Packages: for-current-hardware-firmware
1199 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
1200
1201 &lt;p&gt;The key parts are Test-new-install which indicate how the task
1202 should be handled and the Packages line referencing to a script in
1203 /usr/lib/tasksel/packages/. The scripts use other scripts to get a
1204 list of packages to install. The for-current-hardware-firmware script
1205 look like this to list relevant firmware for the machine:
1206
1207 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
1208 #!/bin/sh
1209 #
1210 PATH=/usr/sbin:$PATH
1211 export PATH
1212 isenkram-autoinstall-firmware -l
1213 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
1214
1215 &lt;p&gt;With those two pieces in place, the firmware is installed by
1216 tasksel during the normal d-i run. :)&lt;/p&gt;
1217
1218 &lt;p&gt;If you want to test what tasksel will install when isenkram-cli is
1219 installed, run &lt;tt&gt;DEBIAN_PRIORITY=critical tasksel --test
1220 --new-install&lt;/tt&gt; to get the list of packages that tasksel would
1221 install.&lt;/p&gt;
1222
1223 &lt;p&gt;&lt;a href=&quot;https://wiki.debian.org/DebianEdu/&quot;&gt;Debian Edu&lt;/a&gt; will be
1224 pilots in testing this feature, as isenkram is used there now to
1225 install firmware, replacing the earlier scripts.&lt;/p&gt;
1226 </description>
1227 </item>
1228
1229 <item>
1230 <title>Install hardware dependent packages using tasksel (Isenkram 0.7)</title>
1231 <link>http://www.hungry.com/~pere/blog/Install_hardware_dependent_packages_using_tasksel__Isenkram_0_7_.html</link>
1232 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Install_hardware_dependent_packages_using_tasksel__Isenkram_0_7_.html</guid>
1233 <pubDate>Wed, 23 Apr 2014 14:50:00 +0200</pubDate>
1234 <description>&lt;p&gt;It would be nice if it was easier in Debian to get all the hardware
1235 related packages relevant for the computer installed automatically.
1236 So I implemented one, using
1237 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;my Isenkram
1238 package&lt;/a&gt;. To use it, install the tasksel and isenkram packages and
1239 run tasksel as user root. You should be presented with a new option,
1240 &quot;Hardware specific packages (autodetected by isenkram)&quot;. When you
1241 select it, tasksel will install the packages isenkram claim is fit for
1242 the current hardware, hot pluggable or not.&lt;p&gt;
1243
1244 &lt;p&gt;The implementation is in two files, one is the tasksel menu entry
1245 description, and the other is the script used to extract the list of
1246 packages to install. The first part is in
1247 &lt;tt&gt;/usr/share/tasksel/descs/isenkram.desc&lt;/tt&gt; and look like
1248 this:&lt;/p&gt;
1249
1250 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
1251 Task: isenkram
1252 Section: hardware
1253 Description: Hardware specific packages (autodetected by isenkram)
1254 Based on the detected hardware various hardware specific packages are
1255 proposed.
1256 Test-new-install: mark show
1257 Relevance: 8
1258 Packages: for-current-hardware
1259 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
1260
1261 &lt;p&gt;The second part is in
1262 &lt;tt&gt;/usr/lib/tasksel/packages/for-current-hardware&lt;/tt&gt; and look like
1263 this:&lt;/p&gt;
1264
1265 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
1266 #!/bin/sh
1267 #
1268 (
1269 isenkram-lookup
1270 isenkram-autoinstall-firmware -l
1271 ) | sort -u
1272 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
1273
1274 &lt;p&gt;All in all, a very short and simple implementation making it
1275 trivial to install the hardware dependent package we all may want to
1276 have installed on our machines. I&#39;ve not been able to find a way to
1277 get tasksel to tell you exactly which packages it plan to install
1278 before doing the installation. So if you are curious or careful,
1279 check the output from the isenkram-* command line tools first.&lt;/p&gt;
1280
1281 &lt;p&gt;The information about which packages are handling which hardware is
1282 fetched either from the isenkram package itself in
1283 /usr/share/isenkram/, from git.debian.org or from the APT package
1284 database (using the Modaliases header). The APT package database
1285 parsing have caused a nasty resource leak in the isenkram daemon (bugs
1286 &lt;a href=&quot;http://bugs.debian.org/719837&quot;&gt;#719837&lt;/a&gt; and
1287 &lt;a href=&quot;http://bugs.debian.org/730704&quot;&gt;#730704&lt;/a&gt;). The cause is in
1288 the python-apt code (bug
1289 &lt;a href=&quot;http://bugs.debian.org/745487&quot;&gt;#745487&lt;/a&gt;), but using a
1290 workaround I was able to get rid of the file descriptor leak and
1291 reduce the memory leak from ~30 MiB per hardware detection down to
1292 around 2 MiB per hardware detection. It should make the desktop
1293 daemon a lot more useful. The fix is in version 0.7 uploaded to
1294 unstable today.&lt;/p&gt;
1295
1296 &lt;p&gt;I believe the current way of mapping hardware to packages in
1297 Isenkram is is a good draft, but in the future I expect isenkram to
1298 use the AppStream data source for this. A proposal for getting proper
1299 AppStream support into Debian is floating around as
1300 &lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;DEP-11&lt;/a&gt;, and
1301 &lt;a href=&quot;https://wiki.debian.org/SummerOfCode2014/Projects#SummerOfCode2014.2FProjects.2FAppStreamDEP11Implementation.AppStream.2FDEP-11_for_the_Debian_Archive&quot;&gt;GSoC
1302 project&lt;/a&gt; will take place this summer to improve the situation. I
1303 look forward to seeing the result, and welcome patches for isenkram to
1304 start using the information when it is ready.&lt;/p&gt;
1305
1306 &lt;p&gt;If you want your package to map to some specific hardware, either
1307 add a &quot;Xb-Modaliases&quot; header to your control file like I did in
1308 &lt;a href=&quot;http://packages.qa.debian.org/pymissile&quot;&gt;the pymissile
1309 package&lt;/a&gt; or submit a bug report with the details to the isenkram
1310 package. See also
1311 &lt;a href=&quot;http://www.hungry.com/~pere/blog/tags/isenkram/&quot;&gt;all my
1312 blog posts tagged isenkram&lt;/a&gt; for details on the notation. I expect
1313 the information will be migrated to AppStream eventually, but for the
1314 moment I got no better place to store it.&lt;/p&gt;
1315 </description>
1316 </item>
1317
1318 <item>
1319 <title>Automatically locate and install required firmware packages on Debian (Isenkram 0.4)</title>
1320 <link>http://www.hungry.com/~pere/blog/Automatically_locate_and_install_required_firmware_packages_on_Debian__Isenkram_0_4_.html</link>
1321 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Automatically_locate_and_install_required_firmware_packages_on_Debian__Isenkram_0_4_.html</guid>
1322 <pubDate>Tue, 25 Jun 2013 11:50:00 +0200</pubDate>
1323 <description>&lt;p&gt;It annoys me when the computer fail to do automatically what it is
1324 perfectly capable of, and I have to do it manually to get things
1325 working. One such task is to find out what firmware packages are
1326 needed to get the hardware on my computer working. Most often this
1327 affect the wifi card, but some times it even affect the RAID
1328 controller or the ethernet card. Today I pushed version 0.4 of the
1329 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;Isenkram package&lt;/a&gt;
1330 including a new script isenkram-autoinstall-firmware handling the
1331 process of asking all the loaded kernel modules what firmware files
1332 they want, find debian packages providing these files and install the
1333 debian packages. Here is a test run on my laptop:&lt;/p&gt;
1334
1335 &lt;p&gt;&lt;pre&gt;
1336 # isenkram-autoinstall-firmware
1337 info: kernel drivers requested extra firmware: ipw2200-bss.fw ipw2200-ibss.fw ipw2200-sniffer.fw
1338 info: fetching http://http.debian.net/debian/dists/squeeze/Contents-i386.gz
1339 info: locating packages with the requested firmware files
1340 info: Updating APT sources after adding non-free APT source
1341 info: trying to install firmware-ipw2x00
1342 firmware-ipw2x00
1343 firmware-ipw2x00
1344 Preconfiguring packages ...
1345 Selecting previously deselected package firmware-ipw2x00.
1346 (Reading database ... 259727 files and directories currently installed.)
1347 Unpacking firmware-ipw2x00 (from .../firmware-ipw2x00_0.28+squeeze1_all.deb) ...
1348 Setting up firmware-ipw2x00 (0.28+squeeze1) ...
1349 #
1350 &lt;/pre&gt;&lt;/p&gt;
1351
1352 &lt;p&gt;When all the requested firmware is present, a simple message is
1353 printed instead:&lt;/p&gt;
1354
1355 &lt;p&gt;&lt;pre&gt;
1356 # isenkram-autoinstall-firmware
1357 info: did not find any firmware files requested by loaded kernel modules. exiting
1358 #
1359 &lt;/pre&gt;&lt;/p&gt;
1360
1361 &lt;p&gt;It could use some polish, but it is already working well and saving
1362 me some time when setting up new machines. :)&lt;/p&gt;
1363
1364 &lt;p&gt;So, how does it work? It look at the set of currently loaded
1365 kernel modules, and look up each one of them using modinfo, to find
1366 the firmware files listed in the module meta-information. Next, it
1367 download the Contents file from a nearby APT mirror, and search for
1368 the firmware files in this file to locate the package with the
1369 requested firmware file. If the package is in the non-free section, a
1370 non-free APT source is added and the package is installed using
1371 &lt;tt&gt;apt-get install&lt;/tt&gt;. The end result is a slightly better working
1372 machine.&lt;/p&gt;
1373
1374 &lt;p&gt;I hope someone find time to implement a more polished version of
1375 this script as part of the hw-detect debian-installer module, to
1376 finally fix &lt;a href=&quot;http://bugs.debian.org/655507&quot;&gt;BTS report
1377 #655507&lt;/a&gt;. There really is no need to insert USB sticks with
1378 firmware during a PXE install when the packages already are available
1379 from the nearby Debian mirror.&lt;/p&gt;
1380 </description>
1381 </item>
1382
1383 <item>
1384 <title>Isenkram 0.2 finally in the Debian archive</title>
1385 <link>http://www.hungry.com/~pere/blog/Isenkram_0_2_finally_in_the_Debian_archive.html</link>
1386 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Isenkram_0_2_finally_in_the_Debian_archive.html</guid>
1387 <pubDate>Wed, 3 Apr 2013 23:40:00 +0200</pubDate>
1388 <description>&lt;p&gt;Today the &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;Isenkram
1389 package&lt;/a&gt; finally made it into the archive, after lingering in NEW
1390 for many months. I uploaded it to the Debian experimental suite
1391 2013-01-27, and today it was accepted into the archive.&lt;/p&gt;
1392
1393 &lt;p&gt;Isenkram is a system for suggesting to users what packages to
1394 install to work with a pluggable hardware device. The suggestion pop
1395 up when the device is plugged in. For example if a Lego Mindstorm NXT
1396 is inserted, it will suggest to install the program needed to program
1397 the NXT controller. Give it a go, and report bugs and suggestions to
1398 BTS. :)&lt;/p&gt;
1399 </description>
1400 </item>
1401
1402 <item>
1403 <title>Welcome to the world, Isenkram!</title>
1404 <link>http://www.hungry.com/~pere/blog/Welcome_to_the_world__Isenkram_.html</link>
1405 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Welcome_to_the_world__Isenkram_.html</guid>
1406 <pubDate>Tue, 22 Jan 2013 22:00:00 +0100</pubDate>
1407 <description>&lt;p&gt;Yesterday, I
1408 &lt;a href=&quot;http://www.hungry.com/~pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html&quot;&gt;asked
1409 for testers&lt;/a&gt; for my prototype for making Debian better at handling
1410 pluggable hardware devices, which I
1411 &lt;a href=&quot;http://www.hungry.com/~pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;set
1412 out to create&lt;/a&gt; earlier this month. Several valuable testers showed
1413 up, and caused me to really want to to open up the development to more
1414 people. But before I did this, I want to come up with a sensible name
1415 for this project. Today I finally decided on a new name, and I have
1416 renamed the project from hw-support-handler to this new name. In the
1417 process, I moved the source to git and made it available as a
1418 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git&quot;&gt;collab-maint&lt;/a&gt;
1419 repository in Debian. The new name? It is &lt;strong&gt;Isenkram&lt;/strong&gt;.
1420 To fetch and build the latest version of the source, use&lt;/p&gt;
1421
1422 &lt;pre&gt;
1423 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
1424 cd isenkram &amp;&amp; git-buildpackage -us -uc
1425 &lt;/pre&gt;
1426
1427 &lt;p&gt;I have not yet adjusted all files to use the new name yet. If you
1428 want to hack on the source or improve the package, please go ahead.
1429 But please talk to me first on IRC or via email before you do major
1430 changes, to make sure we do not step on each others toes. :)&lt;/p&gt;
1431
1432 &lt;p&gt;If you wonder what &#39;isenkram&#39; is, it is a Norwegian word for iron
1433 stuff, typically meaning tools, nails, screws, etc. Typical hardware
1434 stuff, in other words. I&#39;ve been told it is the Norwegian variant of
1435 the German word eisenkram, for those that are familiar with that
1436 word.&lt;/p&gt;
1437
1438 &lt;p&gt;&lt;strong&gt;Update 2013-01-26&lt;/strong&gt;: Added -us -us to build
1439 instructions, to avoid confusing people with an error from the signing
1440 process.&lt;/p&gt;
1441
1442 &lt;p&gt;&lt;strong&gt;Update 2013-01-27&lt;/strong&gt;: Switch to HTTP URL for the git
1443 clone argument to avoid the need for authentication.&lt;/p&gt;
1444 </description>
1445 </item>
1446
1447 <item>
1448 <title>First prototype ready making hardware easier to use in Debian</title>
1449 <link>http://www.hungry.com/~pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</link>
1450 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</guid>
1451 <pubDate>Mon, 21 Jan 2013 12:00:00 +0100</pubDate>
1452 <description>&lt;p&gt;Early this month I set out to try to
1453 &lt;a href=&quot;http://www.hungry.com/~pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;improve
1454 the Debian support for pluggable hardware devices&lt;/a&gt;. Now my
1455 prototype is working, and it is ready for a larger audience. To test
1456 it, fetch the
1457 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;source
1458 from the Debian Edu subversion repository&lt;/a&gt;, build and install the
1459 package. You might have to log out and in again activate the
1460 autostart script.&lt;/p&gt;
1461
1462 &lt;p&gt;The design is simple:&lt;/p&gt;
1463
1464 &lt;ul&gt;
1465
1466 &lt;li&gt;Add desktop entry in /usr/share/autostart/ causing a program
1467 hw-support-handlerd to start when the user log in.&lt;/li&gt;
1468
1469 &lt;li&gt;This program listen for kernel events about new hardware (directly
1470 from the kernel like udev does), not using HAL dbus events as I
1471 initially did.&lt;/li&gt;
1472
1473 &lt;li&gt;When new hardware is inserted, look up the hardware modalias in
1474 the APT database, a database
1475 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup&quot;&gt;available
1476 via HTTP&lt;/a&gt; and a database available as part of the package.&lt;/li&gt;
1477
1478 &lt;li&gt;If a package is mapped to the hardware in question, the package
1479 isn&#39;t installed yet and this is the first time the hardware was
1480 plugged in, show a desktop notification suggesting to install the
1481 package or packages.&lt;/li&gt;
1482
1483 &lt;li&gt;If the user click on the &#39;install package now&#39; button, ask
1484 aptdaemon via the PackageKit API to install the requrired package.&lt;/li&gt;
1485
1486 &lt;li&gt;aptdaemon ask for root password or sudo password, and install the
1487 package while showing progress information in a window.&lt;/li&gt;
1488
1489 &lt;/ul&gt;
1490
1491 &lt;p&gt;I still need to come up with a better name for the system. Here
1492 are some screen shots showing the prototype in action. First the
1493 notification, then the password request, and finally the request to
1494 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.&lt;/p&gt;
1495
1496 &lt;p&gt;&lt;img src=&quot;http://www.hungry.com/~pere/blog/images/2013-01-21-hw-support-1-notification.png&quot;&gt;
1497 &lt;br&gt;&lt;img src=&quot;http://www.hungry.com/~pere/blog/images/2013-01-21-hw-support-2-password.png&quot;&gt;
1498 &lt;br&gt;&lt;img src=&quot;http://www.hungry.com/~pere/blog/images/2013-01-21-hw-support-3-dependencies.png&quot;&gt;
1499 &lt;br&gt;&lt;img src=&quot;http://www.hungry.com/~pere/blog/images/2013-01-21-hw-support-4-installing.png&quot;&gt;
1500 &lt;br&gt;&lt;img src=&quot;http://www.hungry.com/~pere/blog/images/2013-01-21-hw-support-5-installing-details.png&quot; width=&quot;70%&quot;&gt;&lt;/p&gt;
1501
1502 &lt;p&gt;The prototype still need to be improved with longer timeouts, but
1503 is already useful. The database of hardware to package mappings also
1504 need more work. It is currently compatible with the Ubuntu way of
1505 storing such information in the package control file, but could be
1506 changed to use other formats instead or in addition to the current
1507 method. I&#39;ve dropped the use of discover for this mapping, as the
1508 modalias approach is more flexible and easier to use on Linux as long
1509 as the Linux kernel expose its modalias strings directly.&lt;/p&gt;
1510
1511 &lt;p&gt;&lt;strong&gt;Update 2013-01-21 16:50&lt;/strong&gt;: Due to popular demand,
1512 here is the command required to check out and build the source: Use
1513 &#39;&lt;tt&gt;svn checkout
1514 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
1515 hw-support-handler; debuild&lt;/tt&gt;&#39;. If you lack debuild, install the
1516 devscripts package.&lt;/p&gt;
1517
1518 &lt;p&gt;&lt;strong&gt;Update 2013-01-23 12:00&lt;/strong&gt;: The project is now
1519 renamed to Isenkram and the source moved from the Debian Edu
1520 subversion repository to a Debian collab-maint git repository. See
1521 &lt;a href=&quot;http://www.hungry.com/~pere/blog/Welcome_to_the_world__Isenkram_.html&quot;&gt;build
1522 instructions&lt;/a&gt; for details.&lt;/p&gt;
1523 </description>
1524 </item>
1525
1526 <item>
1527 <title>Using modalias info to find packages handling my hardware</title>
1528 <link>http://www.hungry.com/~pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</link>
1529 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</guid>
1530 <pubDate>Tue, 15 Jan 2013 08:00:00 +0100</pubDate>
1531 <description>&lt;p&gt;Yesterday, I wrote about the
1532 &lt;a href=&quot;http://www.hungry.com/~pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html&quot;&gt;modalias
1533 values provided by the Linux kernel&lt;/a&gt; following my hope for
1534 &lt;a href=&quot;http://www.hungry.com/~pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;better
1535 dongle support in Debian&lt;/a&gt;. Using this knowledge, I have tested how
1536 modalias values attached to package names can be used to map packages
1537 to hardware. This allow the system to look up and suggest relevant
1538 packages when I plug in some new hardware into my machine, and replace
1539 discover and discover-data as the database used to map hardware to
1540 packages.&lt;/p&gt;
1541
1542 &lt;p&gt;I create a modaliases file with entries like the following,
1543 containing package name, kernel module name (if relevant, otherwise
1544 the package name) and globs matching the relevant hardware
1545 modalias.&lt;/p&gt;
1546
1547 &lt;p&gt;&lt;blockquote&gt;
1548 Package: package-name
1549 &lt;br&gt;Modaliases: module(modaliasglob, modaliasglob, modaliasglob)&lt;/p&gt;
1550 &lt;/blockquote&gt;&lt;/p&gt;
1551
1552 &lt;p&gt;It is fairly trivial to write code to find the relevant packages
1553 for a given modalias value using this file.&lt;/p&gt;
1554
1555 &lt;p&gt;An entry like this would suggest the video and picture application
1556 cheese for many USB web cameras (interface bus class 0E01):&lt;/p&gt;
1557
1558 &lt;p&gt;&lt;blockquote&gt;
1559 Package: cheese
1560 &lt;br&gt;Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)&lt;/p&gt;
1561 &lt;/blockquote&gt;&lt;/p&gt;
1562
1563 &lt;p&gt;An entry like this would suggest the pcmciautils package when a
1564 CardBus bridge (bus class 0607) PCI device is present:&lt;/p&gt;
1565
1566 &lt;p&gt;&lt;blockquote&gt;
1567 Package: pcmciautils
1568 &lt;br&gt;Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
1569 &lt;/blockquote&gt;&lt;/p&gt;
1570
1571 &lt;p&gt;An entry like this would suggest the package colorhug-client when
1572 plugging in a ColorHug with USB IDs 04D8:F8DA:&lt;/p&gt;
1573
1574 &lt;p&gt;&lt;blockquote&gt;
1575 Package: colorhug-client
1576 &lt;br&gt;Modaliases: colorhug-client(usb:v04D8pF8DAd*)&lt;/p&gt;
1577 &lt;/blockquote&gt;&lt;/p&gt;
1578
1579 &lt;p&gt;I believe the format is compatible with the format of the Packages
1580 file in the Debian archive. Ubuntu already uses their Packages file
1581 to store their mappings from packages to hardware.&lt;/p&gt;
1582
1583 &lt;p&gt;By adding a XB-Modaliases: header in debian/control, any .deb can
1584 announce the hardware it support in a way my prototype understand.
1585 This allow those publishing packages in an APT source outside the
1586 Debian archive as well as those backporting packages to make sure the
1587 hardware mapping are included in the package meta information. I&#39;ve
1588 tested such header in the pymissile package, and its modalias mapping
1589 is working as it should with my prototype. It even made it to Ubuntu
1590 Raring.&lt;/p&gt;
1591
1592 &lt;p&gt;To test if it was possible to look up supported hardware using only
1593 the shell tools available in the Debian installer, I wrote a shell
1594 implementation of the lookup code. The idea is to create files for
1595 each modalias and let the shell do the matching. Please check out and
1596 try the
1597 &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;
1598 shell script. It run without any extra dependencies and fetch the
1599 hardware mappings from the Debian archive and the subversion
1600 repository where I currently work on my prototype.&lt;/p&gt;
1601
1602 &lt;p&gt;When I use it on a machine with a yubikey inserted, it suggest to
1603 install yubikey-personalization:&lt;/p&gt;
1604
1605 &lt;p&gt;&lt;blockquote&gt;
1606 % ./hw-support-lookup
1607 &lt;br&gt;yubikey-personalization
1608 &lt;br&gt;%
1609 &lt;/blockquote&gt;&lt;/p&gt;
1610
1611 &lt;p&gt;When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
1612 propose to install the pcmciautils package:&lt;/p&gt;
1613
1614 &lt;p&gt;&lt;blockquote&gt;
1615 % ./hw-support-lookup
1616 &lt;br&gt;pcmciautils
1617 &lt;br&gt;%
1618 &lt;/blockquote&gt;&lt;/p&gt;
1619
1620 &lt;p&gt;If you know of any hardware-package mapping that should be added to
1621 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co&quot;&gt;my
1622 database&lt;/a&gt;, please tell me about it.&lt;/p&gt;
1623
1624 &lt;p&gt;It could be possible to generate several of the mappings between
1625 packages and hardware. One source would be to look at packages with
1626 kernel modules, ie packages with *.ko files in /lib/modules/, and
1627 extract their modalias information. Another would be to look at
1628 packages with udev rules, ie packages with files in
1629 /lib/udev/rules.d/, and extract their vendor/model information to
1630 generate a modalias matching rule. I have not tested any of these to
1631 see if it work.&lt;/p&gt;
1632
1633 &lt;p&gt;If you want to help implementing a system to let us propose what
1634 packages to install when new hardware is plugged into a Debian
1635 machine, please send me an email or talk to me on
1636 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
1637 </description>
1638 </item>
1639
1640 <item>
1641 <title>Modalias strings - a practical way to map &quot;stuff&quot; to hardware</title>
1642 <link>http://www.hungry.com/~pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</link>
1643 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</guid>
1644 <pubDate>Mon, 14 Jan 2013 11:20:00 +0100</pubDate>
1645 <description>&lt;p&gt;While looking into how to look up Debian packages based on hardware
1646 information, to find the packages that support a given piece of
1647 hardware, I refreshed my memory regarding modalias values, and decided
1648 to document the details. Here are my findings so far, also available
1649 in
1650 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
1651 Debian Edu subversion repository&lt;/a&gt;:
1652
1653 &lt;p&gt;&lt;strong&gt;Modalias decoded&lt;/strong&gt;&lt;/p&gt;
1654
1655 &lt;p&gt;This document try to explain what the different types of modalias
1656 values stands for. It is in part based on information from
1657 &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;,
1658 &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;,
1659 &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
1660 &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;.
1661
1662 &lt;p&gt;The modalias entries for a given Linux machine can be found using
1663 this shell script:&lt;/p&gt;
1664
1665 &lt;pre&gt;
1666 find /sys -name modalias -print0 | xargs -0 cat | sort -u
1667 &lt;/pre&gt;
1668
1669 &lt;p&gt;The supported modalias globs for a given kernel module can be found
1670 using modinfo:&lt;/p&gt;
1671
1672 &lt;pre&gt;
1673 % /sbin/modinfo psmouse | grep alias:
1674 alias: serio:ty05pr*id*ex*
1675 alias: serio:ty01pr*id*ex*
1676 %
1677 &lt;/pre&gt;
1678
1679 &lt;p&gt;&lt;strong&gt;PCI subtype&lt;/strong&gt;&lt;/p&gt;
1680
1681 &lt;p&gt;A typical PCI entry can look like this. This is an Intel Host
1682 Bridge memory controller:&lt;/p&gt;
1683
1684 &lt;p&gt;&lt;blockquote&gt;
1685 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
1686 &lt;/blockquote&gt;&lt;/p&gt;
1687
1688 &lt;p&gt;This represent these values:&lt;/p&gt;
1689
1690 &lt;pre&gt;
1691 v 00008086 (vendor)
1692 d 00002770 (device)
1693 sv 00001028 (subvendor)
1694 sd 000001AD (subdevice)
1695 bc 06 (bus class)
1696 sc 00 (bus subclass)
1697 i 00 (interface)
1698 &lt;/pre&gt;
1699
1700 &lt;p&gt;The vendor/device values are the same values outputted from &#39;lspci
1701 -n&#39; as 8086:2770. The bus class/subclass is also shown by lspci as
1702 0600. The 0600 class is a host bridge. Other useful bus values are
1703 0300 (VGA compatible card) and 0200 (Ethernet controller).&lt;/p&gt;
1704
1705 &lt;p&gt;Not sure how to figure out the interface value, nor what it
1706 means.&lt;/p&gt;
1707
1708 &lt;p&gt;&lt;strong&gt;USB subtype&lt;/strong&gt;&lt;/p&gt;
1709
1710 &lt;p&gt;Some typical USB entries can look like this. This is an internal
1711 USB hub in a laptop:&lt;/p&gt;
1712
1713 &lt;p&gt;&lt;blockquote&gt;
1714 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
1715 &lt;/blockquote&gt;&lt;/p&gt;
1716
1717 &lt;p&gt;Here is the values included in this alias:&lt;/p&gt;
1718
1719 &lt;pre&gt;
1720 v 1D6B (device vendor)
1721 p 0001 (device product)
1722 d 0206 (bcddevice)
1723 dc 09 (device class)
1724 dsc 00 (device subclass)
1725 dp 00 (device protocol)
1726 ic 09 (interface class)
1727 isc 00 (interface subclass)
1728 ip 00 (interface protocol)
1729 &lt;/pre&gt;
1730
1731 &lt;p&gt;The 0900 device class/subclass means hub. Some times the relevant
1732 class is in the interface class section. For a simple USB web camera,
1733 these alias entries show up:&lt;/p&gt;
1734
1735 &lt;p&gt;&lt;blockquote&gt;
1736 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
1737 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
1738 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
1739 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
1740 &lt;/blockquote&gt;&lt;/p&gt;
1741
1742 &lt;p&gt;Interface class 0E01 is video control, 0E02 is video streaming (aka
1743 camera), 0101 is audio control device and 0102 is audio streaming (aka
1744 microphone). Thus this is a camera with microphone included.&lt;/p&gt;
1745
1746 &lt;p&gt;&lt;strong&gt;ACPI subtype&lt;/strong&gt;&lt;/p&gt;
1747
1748 &lt;p&gt;The ACPI type is used for several non-PCI/USB stuff. This is an IR
1749 receiver in a Thinkpad X40:&lt;/p&gt;
1750
1751 &lt;p&gt;&lt;blockquote&gt;
1752 acpi:IBM0071:PNP0511:
1753 &lt;/blockquote&gt;&lt;/p&gt;
1754
1755 &lt;p&gt;The values between the colons are IDs.&lt;/p&gt;
1756
1757 &lt;p&gt;&lt;strong&gt;DMI subtype&lt;/strong&gt;&lt;/p&gt;
1758
1759 &lt;p&gt;The DMI table contain lots of information about the computer case
1760 and model. This is an entry for a IBM Thinkpad X40, fetched from
1761 /sys/devices/virtual/dmi/id/modalias:&lt;/p&gt;
1762
1763 &lt;p&gt;&lt;blockquote&gt;
1764 dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
1765 &lt;/blockquote&gt;&lt;/p&gt;
1766
1767 &lt;p&gt;The values present are&lt;/p&gt;
1768
1769 &lt;pre&gt;
1770 bvn IBM (BIOS vendor)
1771 bvr 1UETB6WW(1.66) (BIOS version)
1772 bd 06/15/2005 (BIOS date)
1773 svn IBM (system vendor)
1774 pn 2371H4G (product name)
1775 pvr ThinkPadX40 (product version)
1776 rvn IBM (board vendor)
1777 rn 2371H4G (board name)
1778 rvr NotAvailable (board version)
1779 cvn IBM (chassis vendor)
1780 ct 10 (chassis type)
1781 cvr NotAvailable (chassis version)
1782 &lt;/pre&gt;
1783
1784 &lt;p&gt;The chassis type 10 is Notebook. Other interesting values can be
1785 found in the dmidecode source:&lt;/p&gt;
1786
1787 &lt;pre&gt;
1788 3 Desktop
1789 4 Low Profile Desktop
1790 5 Pizza Box
1791 6 Mini Tower
1792 7 Tower
1793 8 Portable
1794 9 Laptop
1795 10 Notebook
1796 11 Hand Held
1797 12 Docking Station
1798 13 All In One
1799 14 Sub Notebook
1800 15 Space-saving
1801 16 Lunch Box
1802 17 Main Server Chassis
1803 18 Expansion Chassis
1804 19 Sub Chassis
1805 20 Bus Expansion Chassis
1806 21 Peripheral Chassis
1807 22 RAID Chassis
1808 23 Rack Mount Chassis
1809 24 Sealed-case PC
1810 25 Multi-system
1811 26 CompactPCI
1812 27 AdvancedTCA
1813 28 Blade
1814 29 Blade Enclosing
1815 &lt;/pre&gt;
1816
1817 &lt;p&gt;The chassis type values are not always accurately set in the DMI
1818 table. For example my home server is a tower, but the DMI modalias
1819 claim it is a desktop.&lt;/p&gt;
1820
1821 &lt;p&gt;&lt;strong&gt;SerIO subtype&lt;/strong&gt;&lt;/p&gt;
1822
1823 &lt;p&gt;This type is used for PS/2 mouse plugs. One example is from my
1824 test machine:&lt;/p&gt;
1825
1826 &lt;p&gt;&lt;blockquote&gt;
1827 serio:ty01pr00id00ex00
1828 &lt;/blockquote&gt;&lt;/p&gt;
1829
1830 &lt;p&gt;The values present are&lt;/p&gt;
1831
1832 &lt;pre&gt;
1833 ty 01 (type)
1834 pr 00 (prototype)
1835 id 00 (id)
1836 ex 00 (extra)
1837 &lt;/pre&gt;
1838
1839 &lt;p&gt;This type is supported by the psmouse driver. I am not sure what
1840 the valid values are.&lt;/p&gt;
1841
1842 &lt;p&gt;&lt;strong&gt;Other subtypes&lt;/strong&gt;&lt;/p&gt;
1843
1844 &lt;p&gt;There are heaps of other modalias subtypes according to
1845 file2alias.c. There is the rest of the list from that source: amba,
1846 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
1847 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
1848 vmbus, x86cpu and zorro. I did not spend time documenting all of
1849 these, as they do not seem relevant for my intended use with mapping
1850 hardware to packages when new stuff is inserted during run time.&lt;/p&gt;
1851
1852 &lt;p&gt;&lt;strong&gt;Looking up kernel modules using modalias values&lt;/strong&gt;&lt;/p&gt;
1853
1854 &lt;p&gt;To check which kernel modules provide support for a given modalias,
1855 one can use the following shell script:&lt;/p&gt;
1856
1857 &lt;pre&gt;
1858 for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
1859 echo &quot;$id&quot; ; \
1860 /sbin/modprobe --show-depends &quot;$id&quot;|sed &#39;s/^/ /&#39; ; \
1861 done
1862 &lt;/pre&gt;
1863
1864 &lt;p&gt;The output can look like this (only the first few entries as the
1865 list is very long on my test machine):&lt;/p&gt;
1866
1867 &lt;pre&gt;
1868 acpi:ACPI0003:
1869 insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko
1870 acpi:device:
1871 FATAL: Module acpi:device: not found.
1872 acpi:IBM0068:
1873 insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko
1874 insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko
1875 insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko
1876 insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko
1877 acpi:IBM0071:PNP0511:
1878 insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko
1879 insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko
1880 insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko
1881 [...]
1882 &lt;/pre&gt;
1883
1884 &lt;p&gt;If you want to help implementing a system to let us propose what
1885 packages to install when new hardware is plugged into a Debian
1886 machine, please send me an email or talk to me on
1887 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
1888
1889 &lt;p&gt;&lt;strong&gt;Update 2013-01-15:&lt;/strong&gt; Rewrite &quot;cat $(find ...)&quot; to
1890 &quot;find ... -print0 | xargs -0 cat&quot; to make sure it handle directories
1891 in /sys/ with space in them.&lt;/p&gt;
1892 </description>
1893 </item>
1894
1895 <item>
1896 <title>Moved the pymissile Debian packaging to collab-maint</title>
1897 <link>http://www.hungry.com/~pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</link>
1898 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</guid>
1899 <pubDate>Thu, 10 Jan 2013 20:40:00 +0100</pubDate>
1900 <description>&lt;p&gt;As part of my investigation on how to improve the support in Debian
1901 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
1902 Launcher and updated the Debian package
1903 &lt;a href=&quot;http://packages.qa.debian.org/pymissile&quot;&gt;pymissile&lt;/a&gt; to make
1904 sure udev will fix the device permissions when it is plugged in. I
1905 also added a &quot;Modaliases&quot; header to test it in the Debian archive and
1906 hopefully make the package be proposed by jockey in Ubuntu when a user
1907 plug in his rocket launcher. In the process I moved the source to a
1908 git repository under collab-maint, to make it easier for any DD to
1909 contribute. &lt;a href=&quot;http://code.google.com/p/pymissile/&quot;&gt;Upstream&lt;/a&gt;
1910 is not very active, but the software still work for me even after five
1911 years of relative silence. The new git repository is not listed in
1912 the uploaded package yet, because I want to test the other changes a
1913 bit more before I upload the new version. If you want to check out
1914 the new version with a .desktop file included, visit the
1915 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git&quot;&gt;gitweb
1916 view&lt;/a&gt; or use &quot;&lt;tt&gt;git clone
1917 git://anonscm.debian.org/collab-maint/pymissile.git&lt;/tt&gt;&quot;.&lt;/p&gt;
1918 </description>
1919 </item>
1920
1921 <item>
1922 <title>Lets make hardware dongles easier to use in Debian</title>
1923 <link>http://www.hungry.com/~pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</link>
1924 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html</guid>
1925 <pubDate>Wed, 9 Jan 2013 15:40:00 +0100</pubDate>
1926 <description>&lt;p&gt;One thing that annoys me with Debian and Linux distributions in
1927 general, is that there is a great package management system with the
1928 ability to automatically install software packages by downloading them
1929 from the distribution mirrors, but no way to get it to automatically
1930 install the packages I need to use the hardware I plug into my
1931 machine. Even if the package to use it is easily available from the
1932 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
1933 suggest to automatically install the python-nxt, nbc and t2n packages
1934 I need to talk to it. When I plug in a Yubikey, it could propose the
1935 yubikey-personalization package. The information required to do this
1936 is available, but no-one have pulled all the pieces together.&lt;/p&gt;
1937
1938 &lt;p&gt;Some years ago, I proposed to
1939 &lt;a href=&quot;http://lists.debian.org/debian-devel/2010/05/msg01206.html&quot;&gt;use
1940 the discover subsystem to implement this&lt;/a&gt;. The idea is fairly
1941 simple:
1942
1943 &lt;ul&gt;
1944
1945 &lt;li&gt;Add a desktop entry in /usr/share/autostart/ pointing to a program
1946 starting when a user log in.&lt;/li&gt;
1947
1948 &lt;li&gt;Set this program up to listen for kernel events emitted when new
1949 hardware is inserted into the computer.&lt;/li&gt;
1950
1951 &lt;li&gt;When new hardware is inserted, look up the hardware ID in a
1952 database mapping to packages, and take note of any non-installed
1953 packages.&lt;/li&gt;
1954
1955 &lt;li&gt;Show a message to the user proposing to install the discovered
1956 package, and make it easy to install it.&lt;/li&gt;
1957
1958 &lt;/ul&gt;
1959
1960 &lt;p&gt;I am not sure what the best way to implement this is, but my
1961 initial idea was to use dbus events to discover new hardware, the
1962 discover database to find packages and
1963 &lt;a href=&quot;http://www.packagekit.org/&quot;&gt;PackageKit&lt;/a&gt; to install
1964 packages.&lt;/p&gt;
1965
1966 &lt;p&gt;Yesterday, I found time to try to implement this idea, and the
1967 draft package is now checked into
1968 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
1969 Debian Edu subversion repository&lt;/a&gt;. In the process, I updated the
1970 &lt;a href=&quot;http://packages.qa.debian.org/d/discover-data.html&quot;&gt;discover-data&lt;/a&gt;
1971 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
1972 the relevant packages in Debian, and uploaded a new version
1973 2.2013.01.09 to unstable. I also discovered that the current
1974 &lt;a href=&quot;http://packages.qa.debian.org/d/discover.html&quot;&gt;discover&lt;/a&gt;
1975 package in Debian no longer discovered any USB devices, because
1976 /proc/bus/usb/devices is no longer present. I ported it to use
1977 libusb as a fall back option to get it working. The fixed package
1978 version 2.1.2-6 is now in experimental (didn&#39;t upload it to unstable
1979 because of the freeze).&lt;/p&gt;
1980
1981 &lt;p&gt;With this prototype in place, I can insert my Yubikey, and get this
1982 desktop notification to show up (only once, the first time it is
1983 inserted):&lt;/p&gt;
1984
1985 &lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://www.hungry.com/~pere/blog/images/2013-01-09-hw-autoinstall.png&quot;&gt;&lt;/p&gt;
1986
1987 &lt;p&gt;For this prototype to be really useful, some way to automatically
1988 install the proposed packages by pressing the &quot;Please install
1989 program(s)&quot; button should to be implemented.&lt;/p&gt;
1990
1991 &lt;p&gt;If this idea seem useful to you, and you want to help make it
1992 happen, please help me update the discover-data database with mappings
1993 from hardware to Debian packages. Check if &#39;discover-pkginstall -l&#39;
1994 list the package you would like to have installed when a given
1995 hardware device is inserted into your computer, and report bugs using
1996 reportbug if it isn&#39;t. Or, if you know of a better way to provide
1997 such mapping, please let me know.&lt;/p&gt;
1998
1999 &lt;p&gt;This prototype need more work, and there are several questions that
2000 should be considered before it is ready for production use. Is dbus
2001 the correct way to detect new hardware? At the moment I look for HAL
2002 dbus events on the system bus, because that is the events I could see
2003 on my Debian Squeeze KDE desktop. Are there better events to use?
2004 How should the user be notified? Is the desktop notification
2005 mechanism the best option, or should the background daemon raise a
2006 popup instead? How should packages be installed? When should they
2007 not be installed?&lt;/p&gt;
2008
2009 &lt;p&gt;If you want to help getting such feature implemented in Debian,
2010 please send me an email. :)&lt;/p&gt;
2011 </description>
2012 </item>
2013
2014 </channel>
2015 </rss>