]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
New post.
[homepage.git] / blog / index.rss
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">
3 <channel>
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" />
8
9 <item>
10 <title>Hva stemte hver stortingsrepresentant i voteringene om datalagringsdirektivet?</title>
11 <link>http://people.skolelinux.org/pere/blog/Hva_stemte_hver_stortingsrepresentant_i_voteringene_om_datalagringsdirektivet_.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Hva_stemte_hver_stortingsrepresentant_i_voteringene_om_datalagringsdirektivet_.html</guid>
13 <pubDate>Sat, 9 Feb 2013 18:10:00 +0100</pubDate>
14 <description>&lt;p&gt;Nytt stortingsvalg er på trappene, og folket får igjen mulighet til
15 å påvirke sammensetningen i vår lovgivende forsamling. Da er det
16 relevant å vite hvilke representanter og partier som har støttet
17 innføringen av brev- og besøkskontroll av hele den norske
18 befolkningen, det vil si datalagringsdirektivet.&lt;/p&gt;
19
20 &lt;p&gt;Hvis du vil vite hva hver enkelt stortingsrepresentant har stemt i
21 stortingsvoteringene om datalagringsdirektivet, så har nettstedet til
22 &lt;a href=&quot;http://www.holderdeord.no/&quot;&gt;Holder De Ord&lt;/a&gt; den (så vidt jeg
23 vet) eneste komplette oversikten på sin temaside om
24 &lt;a href=&quot;http://beta.holderdeord.no/issues/innfore-datalagringsdirektivet&quot;&gt;innføringen
25 av datalagringsdirektivet&lt;/a&gt;. Den har detaljene fra de 11 relevante
26 forslagene som har vært fremmet så lagt. De har vært votert over
27 2011-04-04, 2011-04-11, 2012-06-11, 2012-10-05 og 2012-12-06.&lt;/p&gt;
28
29 &lt;p&gt;Hvis du lurer på hva som er problemet med datalagringsdirektivet,
30 anbefaler jeg å lese &lt;a href=&quot;http://www.uhuru.biz/?cat=84&quot;&gt;artiklene
31 fra Jon Wessel-Aas&lt;/a&gt; om temaet, samt informasjon fra foreningen
32 &lt;a href=&quot;http://www.digitaltpersonvern.no/&quot;&gt;Digitalt
33 Personvern&lt;/a&gt;.&lt;/p&gt;
34 </description>
35 </item>
36
37 <item>
38 <title>Økt overvåkning applauderes igjen av Arbeiderpartiet, Høyre og Fremskrittspartiet</title>
39 <link>http://people.skolelinux.org/pere/blog/_kt_overv_kning_applauderes_igjen_av_Arbeiderpartiet__H_yre_og_Fremskrittspartiet.html</link>
40 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/_kt_overv_kning_applauderes_igjen_av_Arbeiderpartiet__H_yre_og_Fremskrittspartiet.html</guid>
41 <pubDate>Mon, 4 Feb 2013 00:30:00 +0100</pubDate>
42 <description>&lt;p&gt;Jeg ser med gru at Arbeiderpartiet, Høyre og Fremskrittspartiet
43 &lt;a href=&quot;http://www.aftenposten.no/nyheter/iriks/Positive-til-mer-smuglerovervaking-7110348.html&quot;&gt;applauderer
44 tollvesenets forslag&lt;/a&gt; om å øke overvåkningen i Norge nok et hakk.
45 Det er ikke så rart, da de som uttaler seg jo også har støttet
46 innføringen av datalagringsdirektivet eller i hvert fall ikke veldig
47 aktivt har motarbeidet det. Innføringen av datalagringsdirektivet er
48 en lovendring som innebærer brev og besøkskontroll for hele
49 befolkningen.&lt;/p&gt;
50
51 &lt;p&gt;&lt;a href=&quot;http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/?p=48717&quot;&gt;Datalagringsdirektivet&lt;/a&gt;
52 har vært oppe til votering i stortinget tre ganger så langt. Det ble
53 &lt;a href=&quot;http://svartelisten.org/&quot;&gt;vedtatt første gang 2011-04-04&lt;/a&gt;
54 og
55 &lt;a href=&quot;https://github.com/holderdeord/hdo-folketingparser/blob/master/data/votering-2011-04-11.xml&quot;&gt;andre
56 gang 2011-04-11&lt;/a&gt; (lovendringer voteres to ganger), og forslag om å
57 stoppe loven ble
58 &lt;a href=&quot;http://www.stortinget.no/no/Saker-og-publikasjoner/Saker/Sak/Voteringsoversikt/?p=53844&amp;dnid=1&quot;&gt;nedstemt
59 2012-12-06&lt;/a&gt; (se også
60 &lt;a href=&quot;http://beta.holderdeord.no/issues/innfore-datalagringsdirektivet&quot;&gt;oversikt fra Holder De
61 Ord&lt;/a&gt;).&lt;/p&gt;
62
63 &lt;p&gt;Jan Bøhler i Arbeiderpartiet stemte for å innføre
64 datalagringsdirektivet i lovverket i første votering, var ikke
65 tilstede i andre votering og støttet loven i tredje votering. André
66 Oktay Dahl i Høyre var ikke til stede i første og andre votering men
67 støttet loven i tredje votering. Ulf Leirstein i Fremskrittspartiet
68 stemte mot loven i første votering men var ikke til stede i andre og
69 tredje votering.&lt;/p&gt;
70
71 &lt;p&gt;Hvis du lurer på hva som er problemet med datalagringsdirektivet,
72 anbefaler jeg å lese &lt;a href=&quot;http://www.uhuru.biz/?cat=84&quot;&gt;artiklene
73 fra Jon Wessel-Aas&lt;/a&gt; om temaet, samt informasjon fra foreningen
74 &lt;a href=&quot;http://www.digitaltpersonvern.no/&quot;&gt;Digitalt
75 Personvern&lt;/a&gt;.&lt;/p&gt;
76
77 &lt;p&gt;&lt;strong&gt;Oppdatering 2013-03-09&lt;/strong&gt;: Endret lenke til Holder De
78 Ord, som har byttet mange lenker i forbindelse med import av
79 voteringsdata for 2010-2011.&lt;/p&gt;
80 </description>
81 </item>
82
83 <item>
84 <title>Bitcoin GUI now available from Debian/unstable (and Ubuntu/raring)</title>
85 <link>http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html</link>
86 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html</guid>
87 <pubDate>Sat, 2 Feb 2013 09:00:00 +0100</pubDate>
88 <description>&lt;p&gt;My
89 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/How_to_backport_bitcoin_qt_version_0_7_2_2_to_Debian_Squeeze.html&quot;&gt;last
90 bitcoin related blog post&lt;/a&gt; mentioned that the new
91 &lt;a href=&quot;http://packages.qa.debian.org/bitcoin&quot;&gt;bitcoin package&lt;/a&gt; for
92 Debian was waiting in NEW. It was accepted by the Debian ftp-masters
93 2013-01-19, and have been available in unstable since then. It was
94 automatically copied to Ubuntu, and is available in their Raring
95 version too.&lt;/p&gt;
96
97 &lt;p&gt;But there is a strange problem with the build that block this new
98 version from being available on the i386 and kfreebsd-i386
99 architectures. For some strange reason, the autobuilders in Debian
100 for these architectures fail to run the test suite on these
101 architectures (&lt;a href=&quot;http://bugs.debian.org/672524&quot;&gt;BTS #672524&lt;/a&gt;).
102 We are so far unable to reproduce it when building it manually, and
103 no-one have been able to propose a fix. If you got an idea what is
104 failing, please let us know via the BTS.&lt;/p&gt;
105
106 &lt;p&gt;One feature that is annoying me with of the bitcoin client, because
107 I often run low on disk space, is the fact that the client will exit
108 if it run short on space (&lt;a href=&quot;http://bugs.debian.org/696715&quot;&gt;BTS
109 #696715&lt;/a&gt;). So make sure you have enough disk space when you run
110 it. :)&lt;/p&gt;
111
112 &lt;p&gt;As usual, if you use bitcoin and want to show your support of my
113 activities, please send Bitcoin donations to my address
114 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&amp;label=PetterReinholdtsenBlog&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
115 </description>
116 </item>
117
118 <item>
119 <title>Welcome to the world, Isenkram!</title>
120 <link>http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</link>
121 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html</guid>
122 <pubDate>Tue, 22 Jan 2013 22:00:00 +0100</pubDate>
123 <description>&lt;p&gt;Yesterday, I
124 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html&quot;&gt;asked
125 for testers&lt;/a&gt; for my prototype for making Debian better at handling
126 pluggable hardware devices, which I
127 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;set
128 out to create&lt;/a&gt; earlier this month. Several valuable testers showed
129 up, and caused me to really want to to open up the development to more
130 people. But before I did this, I want to come up with a sensible name
131 for this project. Today I finally decided on a new name, and I have
132 renamed the project from hw-support-handler to this new name. In the
133 process, I moved the source to git and made it available as a
134 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git&quot;&gt;collab-maint&lt;/a&gt;
135 repository in Debian. The new name? It is &lt;strong&gt;Isenkram&lt;/strong&gt;.
136 To fetch and build the latest version of the source, use&lt;/p&gt;
137
138 &lt;pre&gt;
139 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
140 cd isenkram &amp;&amp; git-buildpackage -us -uc
141 &lt;/pre&gt;
142
143 &lt;p&gt;I have not yet adjusted all files to use the new name yet. If you
144 want to hack on the source or improve the package, please go ahead.
145 But please talk to me first on IRC or via email before you do major
146 changes, to make sure we do not step on each others toes. :)&lt;/p&gt;
147
148 &lt;p&gt;If you wonder what &#39;isenkram&#39; is, it is a Norwegian word for iron
149 stuff, typically meaning tools, nails, screws, etc. Typical hardware
150 stuff, in other words. I&#39;ve been told it is the Norwegian variant of
151 the German word eisenkram, for those that are familiar with that
152 word.&lt;/p&gt;
153
154 &lt;p&gt;&lt;strong&gt;Update 2013-01-26&lt;/strong&gt;: Added -us -us to build
155 instructions, to avoid confusing people with an error from the signing
156 process.&lt;/p&gt;
157
158 &lt;p&gt;&lt;strong&gt;Update 2013-01-27&lt;/strong&gt;: Switch to HTTP URL for the git
159 clone argument to avoid the need for authentication.&lt;/p&gt;
160 </description>
161 </item>
162
163 <item>
164 <title>First prototype ready making hardware easier to use in Debian</title>
165 <link>http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</link>
166 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html</guid>
167 <pubDate>Mon, 21 Jan 2013 12:00:00 +0100</pubDate>
168 <description>&lt;p&gt;Early this month I set out to try to
169 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;improve
170 the Debian support for pluggable hardware devices&lt;/a&gt;. Now my
171 prototype is working, and it is ready for a larger audience. To test
172 it, fetch the
173 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;source
174 from the Debian Edu subversion repository&lt;/a&gt;, build and install the
175 package. You might have to log out and in again activate the
176 autostart script.&lt;/p&gt;
177
178 &lt;p&gt;The design is simple:&lt;/p&gt;
179
180 &lt;ul&gt;
181
182 &lt;li&gt;Add desktop entry in /usr/share/autostart/ causing a program
183 hw-support-handlerd to start when the user log in.&lt;/li&gt;
184
185 &lt;li&gt;This program listen for kernel events about new hardware (directly
186 from the kernel like udev does), not using HAL dbus events as I
187 initially did.&lt;/li&gt;
188
189 &lt;li&gt;When new hardware is inserted, look up the hardware modalias in
190 the APT database, a database
191 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup&quot;&gt;available
192 via HTTP&lt;/a&gt; and a database available as part of the package.&lt;/li&gt;
193
194 &lt;li&gt;If a package is mapped to the hardware in question, the package
195 isn&#39;t installed yet and this is the first time the hardware was
196 plugged in, show a desktop notification suggesting to install the
197 package or packages.&lt;/li&gt;
198
199 &lt;li&gt;If the user click on the &#39;install package now&#39; button, ask
200 aptdaemon via the PackageKit API to install the requrired package.&lt;/li&gt;
201
202 &lt;li&gt;aptdaemon ask for root password or sudo password, and install the
203 package while showing progress information in a window.&lt;/li&gt;
204
205 &lt;/ul&gt;
206
207 &lt;p&gt;I still need to come up with a better name for the system. Here
208 are some screen shots showing the prototype in action. First the
209 notification, then the password request, and finally the request to
210 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.&lt;/p&gt;
211
212 &lt;p&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-1-notification.png&quot;&gt;
213 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-2-password.png&quot;&gt;
214 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-3-dependencies.png&quot;&gt;
215 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-4-installing.png&quot;&gt;
216 &lt;br&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-5-installing-details.png&quot; width=&quot;70%&quot;&gt;&lt;/p&gt;
217
218 &lt;p&gt;The prototype still need to be improved with longer timeouts, but
219 is already useful. The database of hardware to package mappings also
220 need more work. It is currently compatible with the Ubuntu way of
221 storing such information in the package control file, but could be
222 changed to use other formats instead or in addition to the current
223 method. I&#39;ve dropped the use of discover for this mapping, as the
224 modalias approach is more flexible and easier to use on Linux as long
225 as the Linux kernel expose its modalias strings directly.&lt;/p&gt;
226
227 &lt;p&gt;&lt;strong&gt;Update 2013-01-21 16:50&lt;/strong&gt;: Due to popular demand,
228 here is the command required to check out and build the source: Use
229 &#39;&lt;tt&gt;svn checkout
230 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
231 hw-support-handler; debuild&lt;/tt&gt;&#39;. If you lack debuild, install the
232 devscripts package.&lt;/p&gt;
233
234 &lt;p&gt;&lt;strong&gt;Update 2013-01-23 12:00&lt;/strong&gt;: The project is now
235 renamed to Isenkram and the source moved from the Debian Edu
236 subversion repository to a Debian collab-maint git repository. See
237 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html&quot;&gt;build
238 instructions&lt;/a&gt; for details.&lt;/p&gt;
239 </description>
240 </item>
241
242 <item>
243 <title>Thank you Thinkpad X41, for your long and trustworthy service</title>
244 <link>http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</link>
245 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html</guid>
246 <pubDate>Sat, 19 Jan 2013 09:20:00 +0100</pubDate>
247 <description>&lt;p&gt;This Christmas my trusty old laptop died. It died quietly and
248 suddenly in bed. With a quiet whimper, it went completely quiet and
249 black. The power button was no longer able to turn it on. It was a
250 IBM Thinkpad X41, and the best laptop I ever had. Better than both
251 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
252 Compaq I had before that. Now I need to find a replacement. To keep
253 going during Christmas, I moved the one year old SSD disk to my old
254 X40 where it fitted (only one I had left that could use it), but it is
255 not a durable solution.
256
257 &lt;p&gt;My laptop needs are fairly modest. This is my wishlist from when I
258 got a new one more than 10 years ago. It still holds true.:)&lt;/p&gt;
259
260 &lt;ul&gt;
261
262 &lt;li&gt;Lightweight (around 1 kg) and small volume (preferably smaller
263 than A4).&lt;/li&gt;
264 &lt;li&gt;Robust, it will be in my backpack every day.&lt;/li&gt;
265 &lt;li&gt;Three button mouse and a mouse pin instead of touch pad.&lt;/li&gt;
266 &lt;li&gt;Long battery life time. Preferable a week.&lt;/li&gt;
267 &lt;li&gt;Internal WIFI network card.&lt;/li&gt;
268 &lt;li&gt;Internal Twisted Pair network card.&lt;/li&gt;
269 &lt;li&gt;Some USB slots (2-3 is plenty)&lt;/li&gt;
270 &lt;li&gt;Good keyboard - similar to the Thinkpad.&lt;/li&gt;
271 &lt;li&gt;Video resolution at least 1024x768, with size around 12&quot; (A4 paper
272 size).&lt;/li&gt;
273 &lt;li&gt;Hardware supported by Debian Stable, ie the default kernel and
274 X.org packages.&lt;/li&gt;
275 &lt;li&gt;Quiet, preferably fan free (or at least not using the fan most of
276 the time).
277
278 &lt;/ul&gt;
279
280 &lt;p&gt;You will notice that there are no RAM and CPU requirements in the
281 list. The reason is simply that the specifications on laptops the
282 last 10-15 years have been sufficient for my needs, and I have to look
283 at other features to choose my laptop. But are there still made as
284 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
285 robust, and Thinkpads seem to be heading in the wrong direction since
286 Lenovo took over. But I&#39;ve been told that X220 and X1 Carbon might
287 still be useful.&lt;/p&gt;
288
289 &lt;p&gt;Perhaps I should rethink my needs, and look for a pad with an
290 external keyboard? I&#39;ll have to check the
291 &lt;a href=&quot;http://www.linux-laptop.net/&quot;&gt;Linux Laptops site&lt;/a&gt; for
292 well-supported laptops, or perhaps just buy one preinstalled from one
293 of the vendors listed on the &lt;a href=&quot;http://linuxpreloaded.com/&quot;&gt;Linux
294 Pre-loaded site&lt;/a&gt;.&lt;/p&gt;
295 </description>
296 </item>
297
298 <item>
299 <title>How to find a browser plugin supporting a given MIME type</title>
300 <link>http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</link>
301 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html</guid>
302 <pubDate>Fri, 18 Jan 2013 10:40:00 +0100</pubDate>
303 <description>&lt;p&gt;Some times I try to figure out which Iceweasel browser plugin to
304 install to get support for a given MIME type. Thanks to
305 &lt;a href=&quot;https://wiki.ubuntu.com/MozillaTeam/Plugins&quot;&gt;specifications
306 done by Ubuntu&lt;/a&gt; and Mozilla, it is possible to do this in Debian.
307 Unfortunately, not very many packages provide the needed meta
308 information, Anyway, here is a small script to look up all browser
309 plugin packages announcing ther MIME support using this specification:&lt;/p&gt;
310
311 &lt;pre&gt;
312 #!/usr/bin/python
313 import sys
314 import apt
315 def pkgs_handling_mimetype(mimetype):
316 cache = apt.Cache()
317 cache.open(None)
318 thepkgs = []
319 for pkg in cache:
320 version = pkg.candidate
321 if version is None:
322 version = pkg.installed
323 if version is None:
324 continue
325 record = version.record
326 if not record.has_key(&#39;Npp-MimeType&#39;):
327 continue
328 mime_types = record[&#39;Npp-MimeType&#39;].split(&#39;,&#39;)
329 for t in mime_types:
330 t = t.rstrip().strip()
331 if t == mimetype:
332 thepkgs.append(pkg.name)
333 return thepkgs
334 mimetype = &quot;audio/ogg&quot;
335 if 1 &lt; len(sys.argv):
336 mimetype = sys.argv[1]
337 print &quot;Browser plugin packages supporting %s:&quot; % mimetype
338 for pkg in pkgs_handling_mimetype(mimetype):
339 print &quot; %s&quot; %pkg
340 &lt;/pre&gt;
341
342 &lt;p&gt;It can be used like this to look up a given MIME type:&lt;/p&gt;
343
344 &lt;pre&gt;
345 % ./apt-find-browserplug-for-mimetype
346 Browser plugin packages supporting audio/ogg:
347 gecko-mediaplayer
348 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
349 Browser plugin packages supporting application/x-shockwave-flash:
350 browser-plugin-gnash
351 %
352 &lt;/pre&gt;
353
354 &lt;p&gt;In Ubuntu this mechanism is combined with support in the browser
355 itself to query for plugins and propose to install the needed
356 packages. It would be great if Debian supported such feature too. Is
357 anyone working on adding it?&lt;/p&gt;
358
359 &lt;p&gt;&lt;strong&gt;Update 2013-01-18 14:20&lt;/strong&gt;: The Debian BTS
360 request for icweasel support for this feature is
361 &lt;a href=&quot;http://bugs.debian.org/484010&quot;&gt;#484010&lt;/a&gt; from 2008 (and
362 &lt;a href=&quot;http://bugs.debian.org/698426&quot;&gt;#698426&lt;/a&gt; from today). Lack
363 of manpower and wish for a different design is the reason thus feature
364 is not yet in iceweasel from Debian.&lt;/p&gt;
365 </description>
366 </item>
367
368 <item>
369 <title>What is the most supported MIME type in Debian?</title>
370 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</link>
371 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html</guid>
372 <pubDate>Wed, 16 Jan 2013 10:10:00 +0100</pubDate>
373 <description>&lt;p&gt;The &lt;a href=&quot;http://wiki.debian.org/AppStreamDebianProposal&quot;&gt;DEP-11
374 proposal to add AppStream information to the Debian archive&lt;/a&gt;, is a
375 proposal to make it possible for a Desktop application to propose to
376 the user some package to install to gain support for a given MIME
377 type, font, library etc. that is currently missing. With such
378 mechanism in place, it would be possible for the desktop to
379 automatically propose and install leocad if some LDraw file is
380 downloaded by the browser.&lt;/p&gt;
381
382 &lt;p&gt;To get some idea about the current content of the archive, I decided
383 to write a simple program to extract all .desktop files from the
384 Debian archive and look up the claimed MIME support there. The result
385 can be found on the
386 &lt;a href=&quot;http://ftp.skolelinux.org/pub/AppStreamTest&quot;&gt;Skolelinux FTP
387 site&lt;/a&gt;. Using the collected information, it become possible to
388 answer the question in the title. Here are the 20 most supported MIME
389 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
390 The complete list is available from the link above.&lt;/p&gt;
391
392 &lt;p&gt;&lt;strong&gt;Debian Stable:&lt;/strong&gt;&lt;/p&gt;
393
394 &lt;pre&gt;
395 count MIME type
396 ----- -----------------------
397 32 text/plain
398 30 audio/mpeg
399 29 image/png
400 28 image/jpeg
401 27 application/ogg
402 26 audio/x-mp3
403 25 image/tiff
404 25 image/gif
405 22 image/bmp
406 22 audio/x-wav
407 20 audio/x-flac
408 19 audio/x-mpegurl
409 18 video/x-ms-asf
410 18 audio/x-musepack
411 18 audio/x-mpeg
412 18 application/x-ogg
413 17 video/mpeg
414 17 audio/x-scpls
415 17 audio/ogg
416 16 video/x-ms-wmv
417 &lt;/pre&gt;
418
419 &lt;p&gt;&lt;strong&gt;Debian Testing:&lt;/strong&gt;&lt;/p&gt;
420
421 &lt;pre&gt;
422 count MIME type
423 ----- -----------------------
424 33 text/plain
425 32 image/png
426 32 image/jpeg
427 29 audio/mpeg
428 27 image/gif
429 26 image/tiff
430 26 application/ogg
431 25 audio/x-mp3
432 22 image/bmp
433 21 audio/x-wav
434 19 audio/x-mpegurl
435 19 audio/x-mpeg
436 18 video/mpeg
437 18 audio/x-scpls
438 18 audio/x-flac
439 18 application/x-ogg
440 17 video/x-ms-asf
441 17 text/html
442 17 audio/x-musepack
443 16 image/x-xbitmap
444 &lt;/pre&gt;
445
446 &lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
447
448 &lt;pre&gt;
449 count MIME type
450 ----- -----------------------
451 31 text/plain
452 31 image/png
453 31 image/jpeg
454 29 audio/mpeg
455 28 application/ogg
456 27 image/gif
457 26 image/tiff
458 26 audio/x-mp3
459 23 audio/x-wav
460 22 image/bmp
461 21 audio/x-flac
462 20 audio/x-mpegurl
463 19 audio/x-mpeg
464 18 video/x-ms-asf
465 18 video/mpeg
466 18 audio/x-scpls
467 18 application/x-ogg
468 17 audio/x-musepack
469 16 video/x-ms-wmv
470 16 video/x-msvideo
471 &lt;/pre&gt;
472
473 &lt;p&gt;I am told that PackageKit can provide an API to access the kind of
474 information mentioned in DEP-11. I have not yet had time to look at
475 it, but hope the PackageKit people in Debian are on top of these
476 issues.&lt;/p&gt;
477
478 &lt;p&gt;&lt;strong&gt;Update 2013-01-16 13:35&lt;/strong&gt;: Updated numbers after
479 discovering a typo in my script.&lt;/p&gt;
480 </description>
481 </item>
482
483 <item>
484 <title>Using modalias info to find packages handling my hardware</title>
485 <link>http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</link>
486 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html</guid>
487 <pubDate>Tue, 15 Jan 2013 08:00:00 +0100</pubDate>
488 <description>&lt;p&gt;Yesterday, I wrote about the
489 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html&quot;&gt;modalias
490 values provided by the Linux kernel&lt;/a&gt; following my hope for
491 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html&quot;&gt;better
492 dongle support in Debian&lt;/a&gt;. Using this knowledge, I have tested how
493 modalias values attached to package names can be used to map packages
494 to hardware. This allow the system to look up and suggest relevant
495 packages when I plug in some new hardware into my machine, and replace
496 discover and discover-data as the database used to map hardware to
497 packages.&lt;/p&gt;
498
499 &lt;p&gt;I create a modaliases file with entries like the following,
500 containing package name, kernel module name (if relevant, otherwise
501 the package name) and globs matching the relevant hardware
502 modalias.&lt;/p&gt;
503
504 &lt;p&gt;&lt;blockquote&gt;
505 Package: package-name
506 &lt;br&gt;Modaliases: module(modaliasglob, modaliasglob, modaliasglob)&lt;/p&gt;
507 &lt;/blockquote&gt;&lt;/p&gt;
508
509 &lt;p&gt;It is fairly trivial to write code to find the relevant packages
510 for a given modalias value using this file.&lt;/p&gt;
511
512 &lt;p&gt;An entry like this would suggest the video and picture application
513 cheese for many USB web cameras (interface bus class 0E01):&lt;/p&gt;
514
515 &lt;p&gt;&lt;blockquote&gt;
516 Package: cheese
517 &lt;br&gt;Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)&lt;/p&gt;
518 &lt;/blockquote&gt;&lt;/p&gt;
519
520 &lt;p&gt;An entry like this would suggest the pcmciautils package when a
521 CardBus bridge (bus class 0607) PCI device is present:&lt;/p&gt;
522
523 &lt;p&gt;&lt;blockquote&gt;
524 Package: pcmciautils
525 &lt;br&gt;Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
526 &lt;/blockquote&gt;&lt;/p&gt;
527
528 &lt;p&gt;An entry like this would suggest the package colorhug-client when
529 plugging in a ColorHug with USB IDs 04D8:F8DA:&lt;/p&gt;
530
531 &lt;p&gt;&lt;blockquote&gt;
532 Package: colorhug-client
533 &lt;br&gt;Modaliases: colorhug-client(usb:v04D8pF8DAd*)&lt;/p&gt;
534 &lt;/blockquote&gt;&lt;/p&gt;
535
536 &lt;p&gt;I believe the format is compatible with the format of the Packages
537 file in the Debian archive. Ubuntu already uses their Packages file
538 to store their mappings from packages to hardware.&lt;/p&gt;
539
540 &lt;p&gt;By adding a XB-Modaliases: header in debian/control, any .deb can
541 announce the hardware it support in a way my prototype understand.
542 This allow those publishing packages in an APT source outside the
543 Debian archive as well as those backporting packages to make sure the
544 hardware mapping are included in the package meta information. I&#39;ve
545 tested such header in the pymissile package, and its modalias mapping
546 is working as it should with my prototype. It even made it to Ubuntu
547 Raring.&lt;/p&gt;
548
549 &lt;p&gt;To test if it was possible to look up supported hardware using only
550 the shell tools available in the Debian installer, I wrote a shell
551 implementation of the lookup code. The idea is to create files for
552 each modalias and let the shell do the matching. Please check out and
553 try the
554 &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;
555 shell script. It run without any extra dependencies and fetch the
556 hardware mappings from the Debian archive and the subversion
557 repository where I currently work on my prototype.&lt;/p&gt;
558
559 &lt;p&gt;When I use it on a machine with a yubikey inserted, it suggest to
560 install yubikey-personalization:&lt;/p&gt;
561
562 &lt;p&gt;&lt;blockquote&gt;
563 % ./hw-support-lookup
564 &lt;br&gt;yubikey-personalization
565 &lt;br&gt;%
566 &lt;/blockquote&gt;&lt;/p&gt;
567
568 &lt;p&gt;When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
569 propose to install the pcmciautils package:&lt;/p&gt;
570
571 &lt;p&gt;&lt;blockquote&gt;
572 % ./hw-support-lookup
573 &lt;br&gt;pcmciautils
574 &lt;br&gt;%
575 &lt;/blockquote&gt;&lt;/p&gt;
576
577 &lt;p&gt;If you know of any hardware-package mapping that should be added to
578 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co&quot;&gt;my
579 database&lt;/a&gt;, please tell me about it.&lt;/p&gt;
580
581 &lt;p&gt;It could be possible to generate several of the mappings between
582 packages and hardware. One source would be to look at packages with
583 kernel modules, ie packages with *.ko files in /lib/modules/, and
584 extract their modalias information. Another would be to look at
585 packages with udev rules, ie packages with files in
586 /lib/udev/rules.d/, and extract their vendor/model information to
587 generate a modalias matching rule. I have not tested any of these to
588 see if it work.&lt;/p&gt;
589
590 &lt;p&gt;If you want to help implementing a system to let us propose what
591 packages to install when new hardware is plugged into a Debian
592 machine, please send me an email or talk to me on
593 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
594 </description>
595 </item>
596
597 <item>
598 <title>Modalias strings - a practical way to map &quot;stuff&quot; to hardware</title>
599 <link>http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</link>
600 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html</guid>
601 <pubDate>Mon, 14 Jan 2013 11:20:00 +0100</pubDate>
602 <description>&lt;p&gt;While looking into how to look up Debian packages based on hardware
603 information, to find the packages that support a given piece of
604 hardware, I refreshed my memory regarding modalias values, and decided
605 to document the details. Here are my findings so far, also available
606 in
607 &lt;a href=&quot;http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/&quot;&gt;the
608 Debian Edu subversion repository&lt;/a&gt;:
609
610 &lt;p&gt;&lt;strong&gt;Modalias decoded&lt;/strong&gt;&lt;/p&gt;
611
612 &lt;p&gt;This document try to explain what the different types of modalias
613 values stands for. It is in part based on information from
614 &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;,
615 &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;,
616 &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
617 &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;.
618
619 &lt;p&gt;The modalias entries for a given Linux machine can be found using
620 this shell script:&lt;/p&gt;
621
622 &lt;pre&gt;
623 find /sys -name modalias -print0 | xargs -0 cat | sort -u
624 &lt;/pre&gt;
625
626 &lt;p&gt;The supported modalias globs for a given kernel module can be found
627 using modinfo:&lt;/p&gt;
628
629 &lt;pre&gt;
630 % /sbin/modinfo psmouse | grep alias:
631 alias: serio:ty05pr*id*ex*
632 alias: serio:ty01pr*id*ex*
633 %
634 &lt;/pre&gt;
635
636 &lt;p&gt;&lt;strong&gt;PCI subtype&lt;/strong&gt;&lt;/p&gt;
637
638 &lt;p&gt;A typical PCI entry can look like this. This is an Intel Host
639 Bridge memory controller:&lt;/p&gt;
640
641 &lt;p&gt;&lt;blockquote&gt;
642 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
643 &lt;/blockquote&gt;&lt;/p&gt;
644
645 &lt;p&gt;This represent these values:&lt;/p&gt;
646
647 &lt;pre&gt;
648 v 00008086 (vendor)
649 d 00002770 (device)
650 sv 00001028 (subvendor)
651 sd 000001AD (subdevice)
652 bc 06 (bus class)
653 sc 00 (bus subclass)
654 i 00 (interface)
655 &lt;/pre&gt;
656
657 &lt;p&gt;The vendor/device values are the same values outputted from &#39;lspci
658 -n&#39; as 8086:2770. The bus class/subclass is also shown by lspci as
659 0600. The 0600 class is a host bridge. Other useful bus values are
660 0300 (VGA compatible card) and 0200 (Ethernet controller).&lt;/p&gt;
661
662 &lt;p&gt;Not sure how to figure out the interface value, nor what it
663 means.&lt;/p&gt;
664
665 &lt;p&gt;&lt;strong&gt;USB subtype&lt;/strong&gt;&lt;/p&gt;
666
667 &lt;p&gt;Some typical USB entries can look like this. This is an internal
668 USB hub in a laptop:&lt;/p&gt;
669
670 &lt;p&gt;&lt;blockquote&gt;
671 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
672 &lt;/blockquote&gt;&lt;/p&gt;
673
674 &lt;p&gt;Here is the values included in this alias:&lt;/p&gt;
675
676 &lt;pre&gt;
677 v 1D6B (device vendor)
678 p 0001 (device product)
679 d 0206 (bcddevice)
680 dc 09 (device class)
681 dsc 00 (device subclass)
682 dp 00 (device protocol)
683 ic 09 (interface class)
684 isc 00 (interface subclass)
685 ip 00 (interface protocol)
686 &lt;/pre&gt;
687
688 &lt;p&gt;The 0900 device class/subclass means hub. Some times the relevant
689 class is in the interface class section. For a simple USB web camera,
690 these alias entries show up:&lt;/p&gt;
691
692 &lt;p&gt;&lt;blockquote&gt;
693 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
694 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
695 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
696 &lt;br&gt;usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
697 &lt;/blockquote&gt;&lt;/p&gt;
698
699 &lt;p&gt;Interface class 0E01 is video control, 0E02 is video streaming (aka
700 camera), 0101 is audio control device and 0102 is audio streaming (aka
701 microphone). Thus this is a camera with microphone included.&lt;/p&gt;
702
703 &lt;p&gt;&lt;strong&gt;ACPI subtype&lt;/strong&gt;&lt;/p&gt;
704
705 &lt;p&gt;The ACPI type is used for several non-PCI/USB stuff. This is an IR
706 receiver in a Thinkpad X40:&lt;/p&gt;
707
708 &lt;p&gt;&lt;blockquote&gt;
709 acpi:IBM0071:PNP0511:
710 &lt;/blockquote&gt;&lt;/p&gt;
711
712 &lt;p&gt;The values between the colons are IDs.&lt;/p&gt;
713
714 &lt;p&gt;&lt;strong&gt;DMI subtype&lt;/strong&gt;&lt;/p&gt;
715
716 &lt;p&gt;The DMI table contain lots of information about the computer case
717 and model. This is an entry for a IBM Thinkpad X40, fetched from
718 /sys/devices/virtual/dmi/id/modalias:&lt;/p&gt;
719
720 &lt;p&gt;&lt;blockquote&gt;
721 dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
722 &lt;/blockquote&gt;&lt;/p&gt;
723
724 &lt;p&gt;The values present are&lt;/p&gt;
725
726 &lt;pre&gt;
727 bvn IBM (BIOS vendor)
728 bvr 1UETB6WW(1.66) (BIOS version)
729 bd 06/15/2005 (BIOS date)
730 svn IBM (system vendor)
731 pn 2371H4G (product name)
732 pvr ThinkPadX40 (product version)
733 rvn IBM (board vendor)
734 rn 2371H4G (board name)
735 rvr NotAvailable (board version)
736 cvn IBM (chassis vendor)
737 ct 10 (chassis type)
738 cvr NotAvailable (chassis version)
739 &lt;/pre&gt;
740
741 &lt;p&gt;The chassis type 10 is Notebook. Other interesting values can be
742 found in the dmidecode source:&lt;/p&gt;
743
744 &lt;pre&gt;
745 3 Desktop
746 4 Low Profile Desktop
747 5 Pizza Box
748 6 Mini Tower
749 7 Tower
750 8 Portable
751 9 Laptop
752 10 Notebook
753 11 Hand Held
754 12 Docking Station
755 13 All In One
756 14 Sub Notebook
757 15 Space-saving
758 16 Lunch Box
759 17 Main Server Chassis
760 18 Expansion Chassis
761 19 Sub Chassis
762 20 Bus Expansion Chassis
763 21 Peripheral Chassis
764 22 RAID Chassis
765 23 Rack Mount Chassis
766 24 Sealed-case PC
767 25 Multi-system
768 26 CompactPCI
769 27 AdvancedTCA
770 28 Blade
771 29 Blade Enclosing
772 &lt;/pre&gt;
773
774 &lt;p&gt;The chassis type values are not always accurately set in the DMI
775 table. For example my home server is a tower, but the DMI modalias
776 claim it is a desktop.&lt;/p&gt;
777
778 &lt;p&gt;&lt;strong&gt;SerIO subtype&lt;/strong&gt;&lt;/p&gt;
779
780 &lt;p&gt;This type is used for PS/2 mouse plugs. One example is from my
781 test machine:&lt;/p&gt;
782
783 &lt;p&gt;&lt;blockquote&gt;
784 serio:ty01pr00id00ex00
785 &lt;/blockquote&gt;&lt;/p&gt;
786
787 &lt;p&gt;The values present are&lt;/p&gt;
788
789 &lt;pre&gt;
790 ty 01 (type)
791 pr 00 (prototype)
792 id 00 (id)
793 ex 00 (extra)
794 &lt;/pre&gt;
795
796 &lt;p&gt;This type is supported by the psmouse driver. I am not sure what
797 the valid values are.&lt;/p&gt;
798
799 &lt;p&gt;&lt;strong&gt;Other subtypes&lt;/strong&gt;&lt;/p&gt;
800
801 &lt;p&gt;There are heaps of other modalias subtypes according to
802 file2alias.c. There is the rest of the list from that source: amba,
803 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
804 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
805 vmbus, x86cpu and zorro. I did not spend time documenting all of
806 these, as they do not seem relevant for my intended use with mapping
807 hardware to packages when new stuff is inserted during run time.&lt;/p&gt;
808
809 &lt;p&gt;&lt;strong&gt;Looking up kernel modules using modalias values&lt;/strong&gt;&lt;/p&gt;
810
811 &lt;p&gt;To check which kernel modules provide support for a given modalias,
812 one can use the following shell script:&lt;/p&gt;
813
814 &lt;pre&gt;
815 for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
816 echo &quot;$id&quot; ; \
817 /sbin/modprobe --show-depends &quot;$id&quot;|sed &#39;s/^/ /&#39; ; \
818 done
819 &lt;/pre&gt;
820
821 &lt;p&gt;The output can look like this (only the first few entries as the
822 list is very long on my test machine):&lt;/p&gt;
823
824 &lt;pre&gt;
825 acpi:ACPI0003:
826 insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko
827 acpi:device:
828 FATAL: Module acpi:device: not found.
829 acpi:IBM0068:
830 insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko
831 insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko
832 insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko
833 insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko
834 acpi:IBM0071:PNP0511:
835 insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko
836 insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko
837 insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko
838 [...]
839 &lt;/pre&gt;
840
841 &lt;p&gt;If you want to help implementing a system to let us propose what
842 packages to install when new hardware is plugged into a Debian
843 machine, please send me an email or talk to me on
844 &lt;a href=&quot;irc://irc.debian.org/%23debian-devel&quot;&gt;#debian-devel&lt;/a&gt;.&lt;/p&gt;
845
846 &lt;p&gt;&lt;strong&gt;Update 2013-01-15:&lt;/strong&gt; Rewrite &quot;cat $(find ...)&quot; to
847 &quot;find ... -print0 | xargs -0 cat&quot; to make sure it handle directories
848 in /sys/ with space in them.&lt;/p&gt;
849 </description>
850 </item>
851
852 </channel>
853 </rss>