1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/' xmlns:
atom=
"http://www.w3.org/2005/Atom">
4 <title>Petter Reinholdtsen
</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
7 <atom:link href=
"http://people.skolelinux.org/pere/blog/index.rss" rel=
"self" type=
"application/rss+xml" />
10 <title>Økt overvåkning applauderes igjen av Arbeiderpartiet, Høyre og Fremskrittspartiet
</title>
11 <link>http://people.skolelinux.org/pere/blog/_kt_overv_kning_applauderes_igjen_av_Arbeiderpartiet__H_yre_og_Fremskrittspartiet.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/_kt_overv_kning_applauderes_igjen_av_Arbeiderpartiet__H_yre_og_Fremskrittspartiet.html
</guid>
13 <pubDate>Mon,
4 Feb
2013 00:
30:
00 +
0100</pubDate>
14 <description><p
>Jeg ser med gru at Arbeiderpartiet, Høyre og Fremskrittspartiet
15 <a href=
"http://www.aftenposten.no/nyheter/iriks/Positive-til-mer-smuglerovervaking-
7110348.html
">applauderer
16 tollvesenets forslag
</a
> om å øke overvåkningen i Norge nok et hakk.
17 Det er ikke så rart, da de som uttaler seg jo også har støttet
18 innføringen av datalagringsdirektivet eller i hvert fall ikke veldig
19 aktivt har motarbeidet det. Innføringen av datalagringsdirektivet er
20 en lovendring som innebærer brev og besøkskontroll for hele
21 befolkningen.
</p
>
23 <p
><a href=
"http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/?p=
48717">Datalagringsdirektivet
</a
>
24 har vært oppe til votering i stortinget tre ganger så langt. Det ble
25 <a href=
"http://svartelisten.org/
">vedtatt første gang
2011-
04-
04</a
>
27 <a href=
"https://github.com/holderdeord/hdo-folketingparser/blob/master/data/votering-
2011-
04-
11.xml
">andre
28 gang
2011-
04-
11</a
> (lovendringer voteres to ganger), og forslag om å
30 <a href=
"http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/Voteringsoversikt/?p=
53844&dnid=
1">nedstemt
31 2012-
12-
06</a
> (se også
32 <a href=
"http://beta.holderdeord.no/issues/innfore-datalagringsdirektivet
">oversikt fra Holder De
33 Ord
</a
>).
</p
>
35 <p
>Jan Bøhler i Arbeiderpartiet stemte for å innføre
36 datalagringsdirektivet i lovverket i første votering, var ikke
37 tilstede i andre votering og støttet loven i tredje votering. André
38 Oktay Dahl i Høyre var ikke til stede i første og andre votering men
39 støttet loven i tredje votering. Ulf Leirstein i Fremskrittspartiet
40 stemte mot loven i første votering men var ikke til stede i andre og
41 tredje votering.
</p
>
43 <p
>Hvis du lurer på hva som er problemet med datalagringsdirektivet,
44 anbefaler jeg å lese
<a href=
"http://www.uhuru.biz/?cat=
84">artiklene
45 fra Jon Wessel-Aas
</a
> om temaet, samt informasjon fra foreningen
46 <a href=
"http://www.digitaltpersonvern.no/
">Digitalt
47 Personvern
</a
>.
</p
>
49 <p
><strong
>Oppdatering
2013-
03-
09</strong
>: Endret lenke til Holder De
50 Ord, som har byttet mange lenker i forbindelse med import av
51 voteringsdata for
2010-
2011.
</p
>
56 <title>Bitcoin GUI now available from Debian/unstable (and Ubuntu/raring)
</title>
57 <link>http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html
</link>
58 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html
</guid>
59 <pubDate>Sat,
2 Feb
2013 09:
00:
00 +
0100</pubDate>
60 <description><p
>My
61 <a href=
"http://people.skolelinux.org/pere/blog/How_to_backport_bitcoin_qt_version_0_7_2_2_to_Debian_Squeeze.html
">last
62 bitcoin related blog post
</a
> mentioned that the new
63 <a href=
"http://packages.qa.debian.org/bitcoin
">bitcoin package
</a
> for
64 Debian was waiting in NEW. It was accepted by the Debian ftp-masters
65 2013-
01-
19, and have been available in unstable since then. It was
66 automatically copied to Ubuntu, and is available in their Raring
67 version too.
</p
>
69 <p
>But there is a strange problem with the build that block this new
70 version from being available on the i386 and kfreebsd-i386
71 architectures. For some strange reason, the autobuilders in Debian
72 for these architectures fail to run the test suite on these
73 architectures (
<a href=
"http://bugs.debian.org/
672524">BTS #
672524</a
>).
74 We are so far unable to reproduce it when building it manually, and
75 no-one have been able to propose a fix. If you got an idea what is
76 failing, please let us know via the BTS.
</p
>
78 <p
>One feature that is annoying me with of the bitcoin client, because
79 I often run low on disk space, is the fact that the client will exit
80 if it run short on space (
<a href=
"http://bugs.debian.org/
696715">BTS
81 #
696715</a
>). So make sure you have enough disk space when you run
84 <p
>As usual, if you use bitcoin and want to show your support of my
85 activities, please send Bitcoin donations to my address
86 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
&label=PetterReinholdtsenBlog
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
91 <title>Welcome to the world, Isenkram!
</title>
92 <link>http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html
</link>
93 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html
</guid>
94 <pubDate>Tue,
22 Jan
2013 22:
00:
00 +
0100</pubDate>
95 <description><p
>Yesterday, I
96 <a href=
"http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html
">asked
97 for testers
</a
> for my prototype for making Debian better at handling
98 pluggable hardware devices, which I
99 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
">set
100 out to create
</a
> earlier this month. Several valuable testers showed
101 up, and caused me to really want to to open up the development to more
102 people. But before I did this, I want to come up with a sensible name
103 for this project. Today I finally decided on a new name, and I have
104 renamed the project from hw-support-handler to this new name. In the
105 process, I moved the source to git and made it available as a
106 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git
">collab-maint
</a
>
107 repository in Debian. The new name? It is
<strong
>Isenkram
</strong
>.
108 To fetch and build the latest version of the source, use
</p
>
111 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
112 cd isenkram
&& git-buildpackage -us -uc
115 <p
>I have not yet adjusted all files to use the new name yet. If you
116 want to hack on the source or improve the package, please go ahead.
117 But please talk to me first on IRC or via email before you do major
118 changes, to make sure we do not step on each others toes. :)
</p
>
120 <p
>If you wonder what
'isenkram
' is, it is a Norwegian word for iron
121 stuff, typically meaning tools, nails, screws, etc. Typical hardware
122 stuff, in other words. I
've been told it is the Norwegian variant of
123 the German word eisenkram, for those that are familiar with that
126 <p
><strong
>Update
2013-
01-
26</strong
>: Added -us -us to build
127 instructions, to avoid confusing people with an error from the signing
130 <p
><strong
>Update
2013-
01-
27</strong
>: Switch to HTTP URL for the git
131 clone argument to avoid the need for authentication.
</p
>
136 <title>First prototype ready making hardware easier to use in Debian
</title>
137 <link>http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html
</link>
138 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html
</guid>
139 <pubDate>Mon,
21 Jan
2013 12:
00:
00 +
0100</pubDate>
140 <description><p
>Early this month I set out to try to
141 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
">improve
142 the Debian support for pluggable hardware devices
</a
>. Now my
143 prototype is working, and it is ready for a larger audience. To test
145 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/
">source
146 from the Debian Edu subversion repository
</a
>, build and install the
147 package. You might have to log out and in again activate the
148 autostart script.
</p
>
150 <p
>The design is simple:
</p
>
154 <li
>Add desktop entry in /usr/share/autostart/ causing a program
155 hw-support-handlerd to start when the user log in.
</li
>
157 <li
>This program listen for kernel events about new hardware (directly
158 from the kernel like udev does), not using HAL dbus events as I
159 initially did.
</li
>
161 <li
>When new hardware is inserted, look up the hardware modalias in
162 the APT database, a database
163 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup
">available
164 via HTTP
</a
> and a database available as part of the package.
</li
>
166 <li
>If a package is mapped to the hardware in question, the package
167 isn
't installed yet and this is the first time the hardware was
168 plugged in, show a desktop notification suggesting to install the
169 package or packages.
</li
>
171 <li
>If the user click on the
'install package now
' button, ask
172 aptdaemon via the PackageKit API to install the requrired package.
</li
>
174 <li
>aptdaemon ask for root password or sudo password, and install the
175 package while showing progress information in a window.
</li
>
179 <p
>I still need to come up with a better name for the system. Here
180 are some screen shots showing the prototype in action. First the
181 notification, then the password request, and finally the request to
182 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.
</p
>
184 <p
><img src=
"http://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
1-notification.png
">
185 <br
><img src=
"http://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
2-password.png
">
186 <br
><img src=
"http://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
3-dependencies.png
">
187 <br
><img src=
"http://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
4-installing.png
">
188 <br
><img src=
"http://people.skolelinux.org/pere/blog/images/
2013-
01-
21-hw-support-
5-installing-details.png
" width=
"70%
"></p
>
190 <p
>The prototype still need to be improved with longer timeouts, but
191 is already useful. The database of hardware to package mappings also
192 need more work. It is currently compatible with the Ubuntu way of
193 storing such information in the package control file, but could be
194 changed to use other formats instead or in addition to the current
195 method. I
've dropped the use of discover for this mapping, as the
196 modalias approach is more flexible and easier to use on Linux as long
197 as the Linux kernel expose its modalias strings directly.
</p
>
199 <p
><strong
>Update
2013-
01-
21 16:
50</strong
>: Due to popular demand,
200 here is the command required to check out and build the source: Use
201 '<tt
>svn checkout
202 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
203 hw-support-handler; debuild
</tt
>'. If you lack debuild, install the
204 devscripts package.
</p
>
206 <p
><strong
>Update
2013-
01-
23 12:
00</strong
>: The project is now
207 renamed to Isenkram and the source moved from the Debian Edu
208 subversion repository to a Debian collab-maint git repository. See
209 <a href=
"http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html
">build
210 instructions
</a
> for details.
</p
>
215 <title>Thank you Thinkpad X41, for your long and trustworthy service
</title>
216 <link>http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html
</link>
217 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html
</guid>
218 <pubDate>Sat,
19 Jan
2013 09:
20:
00 +
0100</pubDate>
219 <description><p
>This Christmas my trusty old laptop died. It died quietly and
220 suddenly in bed. With a quiet whimper, it went completely quiet and
221 black. The power button was no longer able to turn it on. It was a
222 IBM Thinkpad X41, and the best laptop I ever had. Better than both
223 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
224 Compaq I had before that. Now I need to find a replacement. To keep
225 going during Christmas, I moved the one year old SSD disk to my old
226 X40 where it fitted (only one I had left that could use it), but it is
227 not a durable solution.
229 <p
>My laptop needs are fairly modest. This is my wishlist from when I
230 got a new one more than
10 years ago. It still holds true.:)
</p
>
234 <li
>Lightweight (around
1 kg) and small volume (preferably smaller
236 <li
>Robust, it will be in my backpack every day.
</li
>
237 <li
>Three button mouse and a mouse pin instead of touch pad.
</li
>
238 <li
>Long battery life time. Preferable a week.
</li
>
239 <li
>Internal WIFI network card.
</li
>
240 <li
>Internal Twisted Pair network card.
</li
>
241 <li
>Some USB slots (
2-
3 is plenty)
</li
>
242 <li
>Good keyboard - similar to the Thinkpad.
</li
>
243 <li
>Video resolution at least
1024x768, with size around
12" (A4 paper
245 <li
>Hardware supported by Debian Stable, ie the default kernel and
246 X.org packages.
</li
>
247 <li
>Quiet, preferably fan free (or at least not using the fan most of
252 <p
>You will notice that there are no RAM and CPU requirements in the
253 list. The reason is simply that the specifications on laptops the
254 last
10-
15 years have been sufficient for my needs, and I have to look
255 at other features to choose my laptop. But are there still made as
256 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
257 robust, and Thinkpads seem to be heading in the wrong direction since
258 Lenovo took over. But I
've been told that X220 and X1 Carbon might
259 still be useful.
</p
>
261 <p
>Perhaps I should rethink my needs, and look for a pad with an
262 external keyboard? I
'll have to check the
263 <a href=
"http://www.linux-laptop.net/
">Linux Laptops site
</a
> for
264 well-supported laptops, or perhaps just buy one preinstalled from one
265 of the vendors listed on the
<a href=
"http://linuxpreloaded.com/
">Linux
266 Pre-loaded site
</a
>.
</p
>
271 <title>How to find a browser plugin supporting a given MIME type
</title>
272 <link>http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html
</link>
273 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html
</guid>
274 <pubDate>Fri,
18 Jan
2013 10:
40:
00 +
0100</pubDate>
275 <description><p
>Some times I try to figure out which Iceweasel browser plugin to
276 install to get support for a given MIME type. Thanks to
277 <a href=
"https://wiki.ubuntu.com/MozillaTeam/Plugins
">specifications
278 done by Ubuntu
</a
> and Mozilla, it is possible to do this in Debian.
279 Unfortunately, not very many packages provide the needed meta
280 information, Anyway, here is a small script to look up all browser
281 plugin packages announcing ther MIME support using this specification:
</p
>
287 def pkgs_handling_mimetype(mimetype):
292 version = pkg.candidate
294 version = pkg.installed
297 record = version.record
298 if not record.has_key(
'Npp-MimeType
'):
300 mime_types = record[
'Npp-MimeType
'].split(
',
')
302 t = t.rstrip().strip()
304 thepkgs.append(pkg.name)
306 mimetype =
"audio/ogg
"
307 if
1 < len(sys.argv):
308 mimetype = sys.argv[
1]
309 print
"Browser plugin packages supporting %s:
" % mimetype
310 for pkg in pkgs_handling_mimetype(mimetype):
311 print
" %s
" %pkg
314 <p
>It can be used like this to look up a given MIME type:
</p
>
317 % ./apt-find-browserplug-for-mimetype
318 Browser plugin packages supporting audio/ogg:
320 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
321 Browser plugin packages supporting application/x-shockwave-flash:
326 <p
>In Ubuntu this mechanism is combined with support in the browser
327 itself to query for plugins and propose to install the needed
328 packages. It would be great if Debian supported such feature too. Is
329 anyone working on adding it?
</p
>
331 <p
><strong
>Update
2013-
01-
18 14:
20</strong
>: The Debian BTS
332 request for icweasel support for this feature is
333 <a href=
"http://bugs.debian.org/
484010">#
484010</a
> from
2008 (and
334 <a href=
"http://bugs.debian.org/
698426">#
698426</a
> from today). Lack
335 of manpower and wish for a different design is the reason thus feature
336 is not yet in iceweasel from Debian.
</p
>
341 <title>What is the most supported MIME type in Debian?
</title>
342 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html
</link>
343 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html
</guid>
344 <pubDate>Wed,
16 Jan
2013 10:
10:
00 +
0100</pubDate>
345 <description><p
>The
<a href=
"http://wiki.debian.org/AppStreamDebianProposal
">DEP-
11
346 proposal to add AppStream information to the Debian archive
</a
>, is a
347 proposal to make it possible for a Desktop application to propose to
348 the user some package to install to gain support for a given MIME
349 type, font, library etc. that is currently missing. With such
350 mechanism in place, it would be possible for the desktop to
351 automatically propose and install leocad if some LDraw file is
352 downloaded by the browser.
</p
>
354 <p
>To get some idea about the current content of the archive, I decided
355 to write a simple program to extract all .desktop files from the
356 Debian archive and look up the claimed MIME support there. The result
358 <a href=
"http://ftp.skolelinux.org/pub/AppStreamTest
">Skolelinux FTP
359 site
</a
>. Using the collected information, it become possible to
360 answer the question in the title. Here are the
20 most supported MIME
361 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
362 The complete list is available from the link above.
</p
>
364 <p
><strong
>Debian Stable:
</strong
></p
>
368 ----- -----------------------
391 <p
><strong
>Debian Testing:
</strong
></p
>
395 ----- -----------------------
418 <p
><strong
>Debian Unstable:
</strong
></p
>
422 ----- -----------------------
445 <p
>I am told that PackageKit can provide an API to access the kind of
446 information mentioned in DEP-
11. I have not yet had time to look at
447 it, but hope the PackageKit people in Debian are on top of these
450 <p
><strong
>Update
2013-
01-
16 13:
35</strong
>: Updated numbers after
451 discovering a typo in my script.
</p
>
456 <title>Using modalias info to find packages handling my hardware
</title>
457 <link>http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html
</link>
458 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html
</guid>
459 <pubDate>Tue,
15 Jan
2013 08:
00:
00 +
0100</pubDate>
460 <description><p
>Yesterday, I wrote about the
461 <a href=
"http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html
">modalias
462 values provided by the Linux kernel
</a
> following my hope for
463 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
">better
464 dongle support in Debian
</a
>. Using this knowledge, I have tested how
465 modalias values attached to package names can be used to map packages
466 to hardware. This allow the system to look up and suggest relevant
467 packages when I plug in some new hardware into my machine, and replace
468 discover and discover-data as the database used to map hardware to
471 <p
>I create a modaliases file with entries like the following,
472 containing package name, kernel module name (if relevant, otherwise
473 the package name) and globs matching the relevant hardware
476 <p
><blockquote
>
477 Package: package-name
478 <br
>Modaliases: module(modaliasglob, modaliasglob, modaliasglob)
</p
>
479 </blockquote
></p
>
481 <p
>It is fairly trivial to write code to find the relevant packages
482 for a given modalias value using this file.
</p
>
484 <p
>An entry like this would suggest the video and picture application
485 cheese for many USB web cameras (interface bus class
0E01):
</p
>
487 <p
><blockquote
>
489 <br
>Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)
</p
>
490 </blockquote
></p
>
492 <p
>An entry like this would suggest the pcmciautils package when a
493 CardBus bridge (bus class
0607) PCI device is present:
</p
>
495 <p
><blockquote
>
497 <br
>Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
498 </blockquote
></p
>
500 <p
>An entry like this would suggest the package colorhug-client when
501 plugging in a ColorHug with USB IDs
04D8:F8DA:
</p
>
503 <p
><blockquote
>
504 Package: colorhug-client
505 <br
>Modaliases: colorhug-client(usb:v04D8pF8DAd*)
</p
>
506 </blockquote
></p
>
508 <p
>I believe the format is compatible with the format of the Packages
509 file in the Debian archive. Ubuntu already uses their Packages file
510 to store their mappings from packages to hardware.
</p
>
512 <p
>By adding a XB-Modaliases: header in debian/control, any .deb can
513 announce the hardware it support in a way my prototype understand.
514 This allow those publishing packages in an APT source outside the
515 Debian archive as well as those backporting packages to make sure the
516 hardware mapping are included in the package meta information. I
've
517 tested such header in the pymissile package, and its modalias mapping
518 is working as it should with my prototype. It even made it to Ubuntu
521 <p
>To test if it was possible to look up supported hardware using only
522 the shell tools available in the Debian installer, I wrote a shell
523 implementation of the lookup code. The idea is to create files for
524 each modalias and let the shell do the matching. Please check out and
526 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co
">hw-support-lookup
</a
>
527 shell script. It run without any extra dependencies and fetch the
528 hardware mappings from the Debian archive and the subversion
529 repository where I currently work on my prototype.
</p
>
531 <p
>When I use it on a machine with a yubikey inserted, it suggest to
532 install yubikey-personalization:
</p
>
534 <p
><blockquote
>
535 % ./hw-support-lookup
536 <br
>yubikey-personalization
538 </blockquote
></p
>
540 <p
>When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
541 propose to install the pcmciautils package:
</p
>
543 <p
><blockquote
>
544 % ./hw-support-lookup
545 <br
>pcmciautils
547 </blockquote
></p
>
549 <p
>If you know of any hardware-package mapping that should be added to
550 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co
">my
551 database
</a
>, please tell me about it.
</p
>
553 <p
>It could be possible to generate several of the mappings between
554 packages and hardware. One source would be to look at packages with
555 kernel modules, ie packages with *.ko files in /lib/modules/, and
556 extract their modalias information. Another would be to look at
557 packages with udev rules, ie packages with files in
558 /lib/udev/rules.d/, and extract their vendor/model information to
559 generate a modalias matching rule. I have not tested any of these to
560 see if it work.
</p
>
562 <p
>If you want to help implementing a system to let us propose what
563 packages to install when new hardware is plugged into a Debian
564 machine, please send me an email or talk to me on
565 <a href=
"irc://irc.debian.org/%
23debian-devel
">#debian-devel
</a
>.
</p
>
570 <title>Modalias strings - a practical way to map
"stuff
" to hardware
</title>
571 <link>http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html
</link>
572 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html
</guid>
573 <pubDate>Mon,
14 Jan
2013 11:
20:
00 +
0100</pubDate>
574 <description><p
>While looking into how to look up Debian packages based on hardware
575 information, to find the packages that support a given piece of
576 hardware, I refreshed my memory regarding modalias values, and decided
577 to document the details. Here are my findings so far, also available
579 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/
">the
580 Debian Edu subversion repository
</a
>:
582 <p
><strong
>Modalias decoded
</strong
></p
>
584 <p
>This document try to explain what the different types of modalias
585 values stands for. It is in part based on information from
586 &lt;URL:
<a href=
"https://wiki.archlinux.org/index.php/Modalias
">https://wiki.archlinux.org/index.php/Modalias
</a
> &gt;,
587 &lt;URL:
<a href=
"http://unix.stackexchange.com/questions/
26132/how-to-assign-usb-driver-to-device
">http://unix.stackexchange.com/questions/
26132/how-to-assign-usb-driver-to-device
</a
> &gt;,
588 &lt;URL:
<a href=
"http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c
">http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c
</a
> &gt; and
589 &lt;URL:
<a href=
"http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode
&view=markup
">http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode
&view=markup
</a
> &gt;.
591 <p
>The modalias entries for a given Linux machine can be found using
592 this shell script:
</p
>
595 find /sys -name modalias -print0 | xargs -
0 cat | sort -u
598 <p
>The supported modalias globs for a given kernel module can be found
599 using modinfo:
</p
>
602 % /sbin/modinfo psmouse | grep alias:
603 alias: serio:ty05pr*id*ex*
604 alias: serio:ty01pr*id*ex*
608 <p
><strong
>PCI subtype
</strong
></p
>
610 <p
>A typical PCI entry can look like this. This is an Intel Host
611 Bridge memory controller:
</p
>
613 <p
><blockquote
>
614 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
615 </blockquote
></p
>
617 <p
>This represent these values:
</p
>
622 sv
00001028 (subvendor)
623 sd
000001AD (subdevice)
629 <p
>The vendor/device values are the same values outputted from
'lspci
630 -n
' as
8086:
2770. The bus class/subclass is also shown by lspci as
631 0600. The
0600 class is a host bridge. Other useful bus values are
632 0300 (VGA compatible card) and
0200 (Ethernet controller).
</p
>
634 <p
>Not sure how to figure out the interface value, nor what it
637 <p
><strong
>USB subtype
</strong
></p
>
639 <p
>Some typical USB entries can look like this. This is an internal
640 USB hub in a laptop:
</p
>
642 <p
><blockquote
>
643 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
644 </blockquote
></p
>
646 <p
>Here is the values included in this alias:
</p
>
649 v
1D6B (device vendor)
650 p
0001 (device product)
653 dsc
00 (device subclass)
654 dp
00 (device protocol)
655 ic
09 (interface class)
656 isc
00 (interface subclass)
657 ip
00 (interface protocol)
660 <p
>The
0900 device class/subclass means hub. Some times the relevant
661 class is in the interface class section. For a simple USB web camera,
662 these alias entries show up:
</p
>
664 <p
><blockquote
>
665 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
666 <br
>usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
667 <br
>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
668 <br
>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
669 </blockquote
></p
>
671 <p
>Interface class
0E01 is video control,
0E02 is video streaming (aka
672 camera),
0101 is audio control device and
0102 is audio streaming (aka
673 microphone). Thus this is a camera with microphone included.
</p
>
675 <p
><strong
>ACPI subtype
</strong
></p
>
677 <p
>The ACPI type is used for several non-PCI/USB stuff. This is an IR
678 receiver in a Thinkpad X40:
</p
>
680 <p
><blockquote
>
681 acpi:IBM0071:PNP0511:
682 </blockquote
></p
>
684 <p
>The values between the colons are IDs.
</p
>
686 <p
><strong
>DMI subtype
</strong
></p
>
688 <p
>The DMI table contain lots of information about the computer case
689 and model. This is an entry for a IBM Thinkpad X40, fetched from
690 /sys/devices/virtual/dmi/id/modalias:
</p
>
692 <p
><blockquote
>
693 dmi:bvnIBM:bvr1UETB6WW(
1.66):bd06/
15/
2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
694 </blockquote
></p
>
696 <p
>The values present are
</p
>
699 bvn IBM (BIOS vendor)
700 bvr
1UETB
6WW(
1.66) (BIOS version)
701 bd
06/
15/
2005 (BIOS date)
702 svn IBM (system vendor)
703 pn
2371H4G (product name)
704 pvr ThinkPadX40 (product version)
705 rvn IBM (board vendor)
706 rn
2371H4G (board name)
707 rvr NotAvailable (board version)
708 cvn IBM (chassis vendor)
710 cvr NotAvailable (chassis version)
713 <p
>The chassis type
10 is Notebook. Other interesting values can be
714 found in the dmidecode source:
</p
>
718 4 Low Profile Desktop
731 17 Main Server Chassis
734 20 Bus Expansion Chassis
735 21 Peripheral Chassis
737 23 Rack Mount Chassis
746 <p
>The chassis type values are not always accurately set in the DMI
747 table. For example my home server is a tower, but the DMI modalias
748 claim it is a desktop.
</p
>
750 <p
><strong
>SerIO subtype
</strong
></p
>
752 <p
>This type is used for PS/
2 mouse plugs. One example is from my
753 test machine:
</p
>
755 <p
><blockquote
>
756 serio:ty01pr00id00ex00
757 </blockquote
></p
>
759 <p
>The values present are
</p
>
768 <p
>This type is supported by the psmouse driver. I am not sure what
769 the valid values are.
</p
>
771 <p
><strong
>Other subtypes
</strong
></p
>
773 <p
>There are heaps of other modalias subtypes according to
774 file2alias.c. There is the rest of the list from that source: amba,
775 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
776 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
777 vmbus, x86cpu and zorro. I did not spend time documenting all of
778 these, as they do not seem relevant for my intended use with mapping
779 hardware to packages when new stuff is inserted during run time.
</p
>
781 <p
><strong
>Looking up kernel modules using modalias values
</strong
></p
>
783 <p
>To check which kernel modules provide support for a given modalias,
784 one can use the following shell script:
</p
>
787 for id in $(find /sys -name modalias -print0 | xargs -
0 cat | sort -u); do \
788 echo
"$id
" ; \
789 /sbin/modprobe --show-depends
"$id
"|sed
's/^/ /
' ; \
793 <p
>The output can look like this (only the first few entries as the
794 list is very long on my test machine):
</p
>
798 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/acpi/ac.ko
800 FATAL: Module acpi:device: not found.
802 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/char/nvram.ko
803 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/leds/led-class.ko
804 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/rfkill/rfkill.ko
805 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/platform/x86/thinkpad_acpi.ko
806 acpi:IBM0071:PNP0511:
807 insmod /lib/modules/
2.6.32-
5-
686/kernel/lib/crc-ccitt.ko
808 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/irda/irda.ko
809 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/net/irda/nsc-ircc.ko
813 <p
>If you want to help implementing a system to let us propose what
814 packages to install when new hardware is plugged into a Debian
815 machine, please send me an email or talk to me on
816 <a href=
"irc://irc.debian.org/%
23debian-devel
">#debian-devel
</a
>.
</p
>
818 <p
><strong
>Update
2013-
01-
15:
</strong
> Rewrite
"cat $(find ...)
" to
819 "find ... -print0 | xargs -
0 cat
" to make sure it handle directories
820 in /sys/ with space in them.
</p
>
825 <title>Moved the pymissile Debian packaging to collab-maint
</title>
826 <link>http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html
</link>
827 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html
</guid>
828 <pubDate>Thu,
10 Jan
2013 20:
40:
00 +
0100</pubDate>
829 <description><p
>As part of my investigation on how to improve the support in Debian
830 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
831 Launcher and updated the Debian package
832 <a href=
"http://packages.qa.debian.org/pymissile
">pymissile
</a
> to make
833 sure udev will fix the device permissions when it is plugged in. I
834 also added a
"Modaliases
" header to test it in the Debian archive and
835 hopefully make the package be proposed by jockey in Ubuntu when a user
836 plug in his rocket launcher. In the process I moved the source to a
837 git repository under collab-maint, to make it easier for any DD to
838 contribute.
<a href=
"http://code.google.com/p/pymissile/
">Upstream
</a
>
839 is not very active, but the software still work for me even after five
840 years of relative silence. The new git repository is not listed in
841 the uploaded package yet, because I want to test the other changes a
842 bit more before I upload the new version. If you want to check out
843 the new version with a .desktop file included, visit the
844 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git
">gitweb
845 view
</a
> or use
"<tt
>git clone
846 git://anonscm.debian.org/collab-maint/pymissile.git
</tt
>".
</p
>