]> pere.pagekite.me Git - homepage.git/blob - blog/tags/debian/index.html
d83b571da92c9075fb75172e50daf263cd9ccc00
[homepage.git] / blog / tags / debian / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6 <title>Petter Reinholdtsen: Entries Tagged debian</title>
7 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/style.css" />
8 <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/vim.css" />
9 <link rel="alternate" title="RSS Feed" href="debian.rss" type="application/rss+xml" />
10 </head>
11 <body>
12 <div class="title">
13 <h1>
14 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
15
16 </h1>
17
18 </div>
19
20
21 <h3>Entries tagged "debian".</h3>
22
23 <div class="entry">
24 <div class="title">
25 <a href="http://people.skolelinux.org/pere/blog/Learn_to_program_with_Minetest_on_Debian.html">Learn to program with Minetest on Debian</a>
26 </div>
27 <div class="date">
28 15th December 2018
29 </div>
30 <div class="body">
31 <p>A fun way to learn how to program
32 <a href="https://www.python.org/">Python</a> is to follow the
33 instructions in the book
34 "<a href="https://nostarch.com/programwithminecraft">Learn to program
35 with Minecraft</a>", which introduces programming in Python to people
36 who like to play with Minecraft. The book uses a Python library to
37 talk to a TCP/IP socket with an API accepting build instructions and
38 providing information about the current players in a Minecraft world.
39 The TCP/IP API was first created for the Minecraft implementation for
40 Raspberry Pi, and has since been ported to some server versions of
41 Minecraft. The book contain recipes for those using Windows, MacOSX
42 and Raspian. But a little known fact is that you can follow the same
43 recipes using the free software construction game
44 <a href="https://minetest.net/">Minetest</a>.</p>
45
46 <p>There is <a href="https://github.com/sprintingkiwi/pycraft_mod">a
47 Minetest module implementing the same API</a>, making it possible to
48 use the Python programs coded to talk to Minecraft with Minetest too.
49 I
50 <a href="https://ftp-master.debian.org/new/minetest-mod-pycraft_0.20%2Bgit20180331.0376a0a%2Bdfsg-1.html">uploaded
51 this module</a> to Debian two weeks ago, and as soon as it clears the
52 FTP masters NEW queue, learning to program Python with Minetest on
53 Debian will be a simple 'apt install' away. The Debian package is
54 maintained as part of the Debian Games team, and
55 <a href="https://salsa.debian.org/games-team/unfinished/minetest-mod-pycraft">the
56 packaging rules</a> are currently located under 'unfinished' on
57 Salsa.</p>
58
59 <p>You will most likely need to install several of the Minetest
60 modules in Debian for the examples included with the library to work
61 well, as there are several blocks used by the example scripts that are
62 provided via modules in Minetest. Without the required blocks, a
63 simple stone block is used instead. My initial testing with a analog
64 clock did not get gold arms as instructed in the python library, but
65 instead used stone arms.</p>
66
67 <p>I tried to find a way to add the API to the desktop version of
68 Minecraft, but were unable to find any working recipes. The
69 <a href="https://www.epiphanydigest.com/tag/minecraft-python-api/">recipes</a>
70 I <a href="https://github.com/kbsriram/mcpiapi">found</a> are only
71 working with a standalone Minecraft server setup. Are there any
72 options to use with the normal desktop version?</p>
73
74 <p>As usual, if you use Bitcoin and want to show your support of my
75 activities, please send Bitcoin donations to my address
76 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
77
78 </div>
79 <div class="tags">
80
81
82 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
83
84
85 </div>
86 </div>
87 <div class="padding"></div>
88
89 <div class="entry">
90 <div class="title">
91 <a href="http://people.skolelinux.org/pere/blog/Time_for_an_official_MIME_type_for_patches_.html">Time for an official MIME type for patches?</a>
92 </div>
93 <div class="date">
94 1st November 2018
95 </div>
96 <div class="body">
97 <p>As part of my involvement in
98 <a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core">the Nikita
99 archive API project</a>, I've been importing a fairly large lump of
100 emails into a test instance of the archive to see how well this would
101 go. I picked a subset of <a href="https://notmuchmail.org/">my
102 notmuch email database</a>, all public emails sent to me via
103 @lists.debian.org, giving me a set of around 216 000 emails to import.
104 In the process, I had a look at the various attachments included in
105 these emails, to figure out what to do with attachments, and noticed
106 that one of the most common attachment formats do not have
107 <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">an
108 official MIME type</a> registered with IANA/IETF. The output from
109 diff, ie the input for patch, is on the top 10 list of formats
110 included in these emails. At the moment people seem to use either
111 text/x-patch or text/x-diff, but neither is officially registered. It
112 would be better if one official MIME type were registered and used
113 everywhere.</p>
114
115 <p>To try to get one official MIME type for these files, I've brought
116 up the topic on
117 <a href="https://www.ietf.org/mailman/listinfo/media-types">the
118 media-types mailing list</a>. If you are interested in discussion
119 which MIME type to use as the official for patch files, or involved in
120 making software using a MIME type for patches, perhaps you would like
121 to join the discussion?</p>
122
123 <p>As usual, if you use Bitcoin and want to show your support of my
124 activities, please send Bitcoin donations to my address
125 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
126
127 </div>
128 <div class="tags">
129
130
131 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/standard">standard</a>.
132
133
134 </div>
135 </div>
136 <div class="padding"></div>
137
138 <div class="entry">
139 <div class="title">
140 <a href="http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html">Automatic Google Drive sync using grive in Debian</a>
141 </div>
142 <div class="date">
143 4th October 2018
144 </div>
145 <div class="body">
146 <p>A few days, I rescued a Windows victim over to Debian. To try to
147 rescue the remains, I helped set up automatic sync with Google Drive.
148 I did not find any sensible Debian package handling this
149 automatically, so I rebuild the grive2 source from
150 <a href="http://www.webupd8.org/">the Ubuntu UPD8 PPA</a> to do the
151 task and added a autostart desktop entry and a small shell script to
152 run in the background while the user is logged in to do the sync.
153 Here is a sketch of the setup for future reference.</p>
154
155 <p>I first created <tt>~/googledrive</tt>, entered the directory and
156 ran '<tt>grive -a</tt>' to authenticate the machine/user. Next, I
157 created a autostart hook in <tt>~/.config/autostart/grive.desktop</tt>
158 to start the sync when the user log in:</p>
159
160 <p><blockquote><pre>
161 [Desktop Entry]
162 Name=Google drive autosync
163 Type=Application
164 Exec=/home/user/bin/grive-sync
165 </pre></blockquote></p>
166
167 <p>Finally, I wrote the <tt>~/bin/grive-sync</tt> script to sync
168 ~/googledrive/ with the files in Google Drive.</p>
169
170 <p><blockquote><pre>
171 #!/bin/sh
172 set -e
173 cd ~/
174 cleanup() {
175 if [ "$syncpid" ] ; then
176 kill $syncpid
177 fi
178 }
179 trap cleanup EXIT INT QUIT
180 /usr/lib/grive/grive-sync.sh listen googledrive 2>&1 | sed "s%^%$0:%" &
181 syncpdi=$!
182 while true; do
183 if ! xhost >/dev/null 2>&1 ; then
184 echo "no DISPLAY, exiting as the user probably logged out"
185 exit 1
186 fi
187 if [ ! -e /run/user/1000/grive-sync.sh_googledrive ] ; then
188 /usr/lib/grive/grive-sync.sh sync googledrive
189 fi
190 sleep 300
191 done 2>&1 | sed "s%^%$0:%"
192 </pre></blockquote></p>
193
194 <p>Feel free to use the setup if you want. It can be assumed to be
195 GNU GPL v2 licensed (or any later version, at your leisure), but I
196 doubt this code is possible to claim copyright on.</p>
197
198 <p>As usual, if you use Bitcoin and want to show your support of my
199 activities, please send Bitcoin donations to my address
200 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
201
202 </div>
203 <div class="tags">
204
205
206 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
207
208
209 </div>
210 </div>
211 <div class="padding"></div>
212
213 <div class="entry">
214 <div class="title">
215 <a href="http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html">Using the Kodi API to play Youtube videos</a>
216 </div>
217 <div class="date">
218 2nd September 2018
219 </div>
220 <div class="body">
221 <p>I continue to explore my Kodi installation, and today I wanted to
222 tell it to play a youtube URL I received in a chat, without having to
223 insert search terms using the on-screen keyboard. After searching the
224 web for API access to the Youtube plugin and testing a bit, I managed
225 to find a recipe that worked. If you got a kodi instance with its API
226 available from http://kodihost/jsonrpc, you can try the following to
227 have check out a nice cover band.</p>
228
229 <p><blockquote><pre>curl --silent --header 'Content-Type: application/json' \
230 --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open",
231 "params": {"item": { "file":
232 "plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg" } } }' \
233 http://projector.local/jsonrpc</pre></blockquote></p>
234
235 <p>I've extended kodi-stream program to take a video source as its
236 first argument. It can now handle direct video links, youtube links
237 and 'desktop' to stream my desktop to Kodi. It is almost like a
238 Chromecast. :)</p>
239
240 <p>As usual, if you use Bitcoin and want to show your support of my
241 activities, please send Bitcoin donations to my address
242 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
243
244 </div>
245 <div class="tags">
246
247
248 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
249
250
251 </div>
252 </div>
253 <div class="padding"></div>
254
255 <div class="entry">
256 <div class="title">
257 <a href="http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html">Sharing images with friends and family using RSS and EXIF/XMP metadata</a>
258 </div>
259 <div class="date">
260 31st July 2018
261 </div>
262 <div class="body">
263 <p>For a while now, I have looked for a sensible way to share images
264 with my family using a self hosted solution, as it is unacceptable to
265 place images from my personal life under the control of strangers
266 working for data hoarders like Google or Dropbox. The last few days I
267 have drafted an approach that might work out, and I would like to
268 share it with you. I would like to publish images on a server under
269 my control, and point some Internet connected display units using some
270 free and open standard to the images I published. As my primary
271 language is not limited to ASCII, I need to store metadata using
272 UTF-8. Many years ago, I hoped to find a digital photo frame capable
273 of reading a RSS feed with image references (aka using the
274 &lt;enclosure&gt; RSS tag), but was unable to find a current supplier
275 of such frames. In the end I gave up that approach.</p>
276
277 <p>Some months ago, I discovered that
278 <a href="https://www.jwz.org/xscreensaver/">XScreensaver</a> is able to
279 read images from a RSS feed, and used it to set up a screen saver on
280 my home info screen, showing images from the Daily images feed from
281 NASA. This proved to work well. More recently I discovered that
282 <a href="https://kodi.tv">Kodi</a> (both using
283 <a href="https://www.openelec.tv/">OpenELEC</a> and
284 <a href="https://libreelec.tv">LibreELEC</a>) provide the
285 <a href="https://github.com/grinsted/script.screensaver.feedreader">Feedreader</a>
286 screen saver capable of reading a RSS feed with images and news. For
287 fun, I used it this summer to test Kodi on my parents TV by hooking up
288 a Raspberry PI unit with LibreELEC, and wanted to provide them with a
289 screen saver showing selected pictures from my selection.</p>
290
291 <p>Armed with motivation and a test photo frame, I set out to generate
292 a RSS feed for the Kodi instance. I adjusted my <a
293 href="https://freedombox.org/">Freedombox</a> instance, created
294 /var/www/html/privatepictures/, wrote a small Perl script to extract
295 title and description metadata from the photo files and generate the
296 RSS file. I ended up using Perl instead of python, as the
297 libimage-exiftool-perl Debian package seemed to handle the EXIF/XMP
298 tags I ended up using, while python3-exif did not. The relevant EXIF
299 tags only support ASCII, so I had to find better alternatives. XMP
300 seem to have the support I need.</p>
301
302 <p>I am a bit unsure which EXIF/XMP tags to use, as I would like to
303 use tags that can be easily added/updated using normal free software
304 photo managing software. I ended up using the tags set using this
305 exiftool command, as these tags can also be set using digiKam:</p>
306
307 <blockquote><pre>
308 exiftool -headline='The RSS image title' \
309 -description='The RSS image description.' \
310 -subject+=for-family photo.jpeg
311 </pre></blockquote>
312
313 <p>I initially tried the "-title" and "keyword" tags, but they were
314 invisible in digiKam, so I changed to "-headline" and "-subject". I
315 use the keyword/subject 'for-family' to flag that the photo should be
316 shared with my family. Images with this keyword set are located and
317 copied into my Freedombox for the RSS generating script to find.</p>
318
319 <p>Are there better ways to do this? Get in touch if you have better
320 suggestions.</p>
321
322 <p>As usual, if you use Bitcoin and want to show your support of my
323 activities, please send Bitcoin donations to my address
324 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
325
326 </div>
327 <div class="tags">
328
329
330 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
331
332
333 </div>
334 </div>
335 <div class="padding"></div>
336
337 <div class="entry">
338 <div class="title">
339 <a href="http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html">Simple streaming the Linux desktop to Kodi using GStreamer and RTP</a>
340 </div>
341 <div class="date">
342 12th July 2018
343 </div>
344 <div class="body">
345 <p>Last night, I wrote
346 <a href="http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html">a
347 recipe to stream a Linux desktop using VLC to a instance of Kodi</a>.
348 During the day I received valuable feedback, and thanks to the
349 suggestions I have been able to rewrite the recipe into a much simpler
350 approach requiring no setup at all. It is a single script that take
351 care of it all.</p>
352
353 <p>This new script uses GStreamer instead of VLC to capture the
354 desktop and stream it to Kodi. This fixed the video quality issue I
355 saw initially. It further removes the need to add a m3u file on the
356 Kodi machine, as it instead connects to
357 <a href="https://kodi.wiki/view/JSON-RPC_API/v8">the JSON-RPC API in
358 Kodi</a> and simply ask Kodi to play from the stream created using
359 GStreamer. Streaming the desktop to Kodi now become trivial. Copy
360 the script below, run it with the DNS name or IP address of the kodi
361 server to stream to as the only argument, and watch your screen show
362 up on the Kodi screen. Note, it depend on multicast on the local
363 network, so if you need to stream outside the local network, the
364 script must be modified. Also note, I have no idea if audio work, as
365 I only care about the picture part.</p>
366
367 <blockquote><pre>
368 #!/bin/sh
369 #
370 # Stream the Linux desktop view to Kodi. See
371 # http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
372 # for backgorund information.
373
374 # Make sure the stream is stopped in Kodi and the gstreamer process is
375 # killed if something go wrong (for example if curl is unable to find the
376 # kodi server). Do the same when interrupting this script.
377 kodicmd() {
378 host="$1"
379 cmd="$2"
380 params="$3"
381 curl --silent --header 'Content-Type: application/json' \
382 --data-binary "{ \"id\": 1, \"jsonrpc\": \"2.0\", \"method\": \"$cmd\", \"params\": $params }" \
383 "http://$host/jsonrpc"
384 }
385 cleanup() {
386 if [ -n "$kodihost" ] ; then
387 # Stop the playing when we end
388 playerid=$(kodicmd "$kodihost" Player.GetActivePlayers "{}" |
389 jq .result[].playerid)
390 kodicmd "$kodihost" Player.Stop "{ \"playerid\" : $playerid }" > /dev/null
391 fi
392 if [ "$gstpid" ] && kill -0 "$gstpid" >/dev/null 2>&1; then
393 kill "$gstpid"
394 fi
395 }
396 trap cleanup EXIT INT
397
398 if [ -n "$1" ]; then
399 kodihost=$1
400 shift
401 else
402 kodihost=kodi.local
403 fi
404
405 mcast=239.255.0.1
406 mcastport=1234
407 mcastttl=1
408
409 pasrc=$(pactl list | grep -A2 'Source #' | grep 'Name: .*\.monitor$' | \
410 cut -d" " -f2|head -1)
411 gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
412 videoconvert ! queue2 ! \
413 x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
414 key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
415 mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
416 udpsink host=$mcast port=$mcastport ttl-mc=$mcastttl auto-multicast=1 sync=0 \
417 pulsesrc device=$pasrc ! audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. \
418 > /dev/null 2>&1 &
419 gstpid=$!
420
421 # Give stream a second to get going
422 sleep 1
423
424 # Ask kodi to start streaming using its JSON-RPC API
425 kodicmd "$kodihost" Player.Open \
426 "{\"item\": { \"file\": \"udp://@$mcast:$mcastport\" } }" > /dev/null
427
428 # wait for gst to end
429 wait "$gstpid"
430 </pre></blockquote>
431
432 <p>I hope you find the approach useful. I know I do.</p>
433
434 <p>As usual, if you use Bitcoin and want to show your support of my
435 activities, please send Bitcoin donations to my address
436 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
437
438 </div>
439 <div class="tags">
440
441
442 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
443
444
445 </div>
446 </div>
447 <div class="padding"></div>
448
449 <div class="entry">
450 <div class="title">
451 <a href="http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html">Streaming the Linux desktop to Kodi using VLC and RTSP</a>
452 </div>
453 <div class="date">
454 12th July 2018
455 </div>
456 <div class="body">
457 <p>PS: See
458 <ahref="http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html">the
459 followup post</a> for a even better approach.</p>
460
461 <p>A while back, I was asked by a friend how to stream the desktop to
462 my projector connected to Kodi. I sadly had to admit that I had no
463 idea, as it was a task I never had tried. Since then, I have been
464 looking for a way to do so, preferable without much extra software to
465 install on either side. Today I found a way that seem to kind of
466 work. Not great, but it is a start.</p>
467
468 <p>I had a look at several approaches, for example
469 <a href="https://github.com/mfoetsch/dlna_live_streaming">using uPnP
470 DLNA as described in 2011</a>, but it required a uPnP server, fuse and
471 local storage enough to store the stream locally. This is not going
472 to work well for me, lacking enough free space, and it would
473 impossible for my friend to get working.</p>
474
475 <p>Next, it occurred to me that perhaps I could use VLC to create a
476 video stream that Kodi could play. Preferably using
477 broadcast/multicast, to avoid having to change any setup on the Kodi
478 side when starting such stream. Unfortunately, the only recipe I
479 could find using multicast used the rtp protocol, and this protocol
480 seem to not be supported by Kodi.</p>
481
482 <p>On the other hand, the rtsp protocol is working! Unfortunately I
483 have to specify the IP address of the streaming machine in both the
484 sending command and the file on the Kodi server. But it is showing my
485 desktop, and thus allow us to have a shared look on the big screen at
486 the programs I work on.</p>
487
488 <p>I did not spend much time investigating codeces. I combined the
489 rtp and rtsp recipes from
490 <a href="https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/">the
491 VLC Streaming HowTo/Command Line Examples</a>, and was able to get
492 this working on the desktop/streaming end.</p>
493
494 <blockquote><pre>
495 vlc screen:// --sout \
496 '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{dst=projector.local,port=1234,sdp=rtsp://192.168.11.4:8080/test.sdp}'
497 </pre></blockquote>
498
499 <p>I ssh-ed into my Kodi box and created a file like this with the
500 same IP address:</p>
501
502 <blockquote><pre>
503 echo rtsp://192.168.11.4:8080/test.sdp \
504 > /storage/videos/screenstream.m3u
505 </pre></blockquote>
506
507 <p>Note the 192.168.11.4 IP address is my desktops IP address. As far
508 as I can tell the IP must be hardcoded for this to work. In other
509 words, if someone elses machine is going to do the steaming, you have
510 to update screenstream.m3u on the Kodi machine and adjust the vlc
511 recipe. To get started, locate the file in Kodi and select the m3u
512 file while the VLC stream is running. The desktop then show up in my
513 big screen. :)</p>
514
515 <p>When using the same technique to stream a video file with audio,
516 the audio quality is really bad. No idea if the problem is package
517 loss or bad parameters for the transcode. I do not know VLC nor Kodi
518 enough to tell.</p>
519
520 <p><strong>Update 2018-07-12</strong>: Johannes Schauer send me a few
521 succestions and reminded me about an important step. The "screen:"
522 input source is only available once the vlc-plugin-access-extra
523 package is installed on Debian. Without it, you will see this error
524 message: "VLC is unable to open the MRL 'screen://'. Check the log
525 for details." He further found that it is possible to drop some parts
526 of the VLC command line to reduce the amount of hardcoded information.
527 It is also useful to consider using cvlc to avoid having the VLC
528 window in the desktop view. In sum, this give us this command line on
529 the source end
530
531 <blockquote><pre>
532 cvlc screen:// --sout \
533 '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{sdp=rtsp://:8080/}'
534 </pre></blockquote>
535
536 <p>and this on the Kodi end<p>
537
538 <blockquote><pre>
539 echo rtsp://192.168.11.4:8080/ \
540 > /storage/videos/screenstream.m3u
541 </pre></blockquote>
542
543 <p>Still bad image quality, though. But I did discover that streaming
544 a DVD using dvdsimple:///dev/dvd as the source had excellent video and
545 audio quality, so I guess the issue is in the input or transcoding
546 parts, not the rtsp part. I've tried to change the vb and ab
547 parameters to use more bandwidth, but it did not make a
548 difference.</p>
549
550 <p>I further received a suggestion from Einar Haraldseid to try using
551 gstreamer instead of VLC, and this proved to work great! He also
552 provided me with the trick to get Kodi to use a multicast stream as
553 its source. By using this monstrous oneliner, I can stream my desktop
554 with good video quality in reasonable framerate to the 239.255.0.1
555 multicast address on port 1234:
556
557 <blockquote><pre>
558 gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
559 videoconvert ! queue2 ! \
560 x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
561 key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
562 mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
563 udpsink host=239.255.0.1 port=1234 ttl-mc=1 auto-multicast=1 sync=0 \
564 pulsesrc device=$(pactl list | grep -A2 'Source #' | \
565 grep 'Name: .*\.monitor$' | cut -d" " -f2|head -1) ! \
566 audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
567 </pre></blockquote>
568
569 <p>and this on the Kodi end<p>
570
571 <blockquote><pre>
572 echo udp://@239.255.0.1:1234 \
573 > /storage/videos/screenstream.m3u
574 </pre></blockquote>
575
576 <p>Note the trick to pick a valid pulseaudio source. It might not
577 pick the one you need. This approach will of course lead to trouble
578 if more than one source uses the same multicast port and address.
579 Note the ttl-mc=1 setting, which limit the multicast packages to the
580 local network. If the value is increased, your screen will be
581 broadcasted further, one network "hop" for each increase (read up on
582 multicast to learn more. :)!</p>
583
584 <p>Having cracked how to get Kodi to receive multicast streams, I
585 could use this VLC command to stream to the same multicast address.
586 The image quality is way better than the rtsp approach, but gstreamer
587 seem to be doing a better job.</p>
588
589 <blockquote><pre>
590 cvlc screen:// --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{mux=ts,dst=239.255.0.1,port=1234,sdp=sap}'
591 </pre></blockquote>
592
593 <p>As usual, if you use Bitcoin and want to show your support of my
594 activities, please send Bitcoin donations to my address
595 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
596
597 </div>
598 <div class="tags">
599
600
601 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
602
603
604 </div>
605 </div>
606 <div class="padding"></div>
607
608 <div class="entry">
609 <div class="title">
610 <a href="http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html">What is the most supported MIME type in Debian in 2018?</a>
611 </div>
612 <div class="date">
613 9th July 2018
614 </div>
615 <div class="body">
616 <p>Five years ago,
617 <a href="http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html">I
618 measured what the most supported MIME type in Debian was</a>, by
619 analysing the desktop files in all packages in the archive. Since
620 then, the DEP-11 AppStream system has been put into production, making
621 the task a lot easier. This made me want to repeat the measurement,
622 to see how much things changed. Here are the new numbers, for
623 unstable only this time:
624
625 <p><strong>Debian Unstable:</strong></p>
626
627 <pre>
628 count MIME type
629 ----- -----------------------
630 56 image/jpeg
631 55 image/png
632 49 image/tiff
633 48 image/gif
634 39 image/bmp
635 38 text/plain
636 37 audio/mpeg
637 34 application/ogg
638 33 audio/x-flac
639 32 audio/x-mp3
640 30 audio/x-wav
641 30 audio/x-vorbis+ogg
642 29 image/x-portable-pixmap
643 27 inode/directory
644 27 image/x-portable-bitmap
645 27 audio/x-mpeg
646 26 application/x-ogg
647 25 audio/x-mpegurl
648 25 audio/ogg
649 24 text/html
650 </pre>
651
652 <p>The list was created like this using a sid chroot: "cat
653 /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz| zcat | awk '/^
654 - \S+\/\S+$/ {print $2 }' | sort | uniq -c | sort -nr | head -20"</p>
655
656 <p>It is interesting to see how image formats have passed text/plain
657 as the most announced supported MIME type. These days, thanks to the
658 AppStream system, if you run into a file format you do not know, and
659 want to figure out which packages support the format, you can find the
660 MIME type of the file using "file --mime &lt;filename&gt;", and then
661 look up all packages announcing support for this format in their
662 AppStream metadata (XML or .desktop file) using "appstreamcli
663 what-provides mimetype &lt;mime-type&gt;. For example if you, like
664 me, want to know which packages support inode/directory, you can get a
665 list like this:</p>
666
667 <p><blockquote><pre>
668 % appstreamcli what-provides mimetype inode/directory | grep Package: | sort
669 Package: anjuta
670 Package: audacious
671 Package: baobab
672 Package: cervisia
673 Package: chirp
674 Package: dolphin
675 Package: doublecmd-common
676 Package: easytag
677 Package: enlightenment
678 Package: ephoto
679 Package: filelight
680 Package: gwenview
681 Package: k4dirstat
682 Package: kaffeine
683 Package: kdesvn
684 Package: kid3
685 Package: kid3-qt
686 Package: nautilus
687 Package: nemo
688 Package: pcmanfm
689 Package: pcmanfm-qt
690 Package: qweborf
691 Package: ranger
692 Package: sirikali
693 Package: spacefm
694 Package: spacefm
695 Package: vifm
696 %
697 </pre></blockquote></p>
698
699 <p>Using the same method, I can quickly discover that the Sketchup file
700 format is not yet supported by any package in Debian:</p>
701
702 <p><blockquote><pre>
703 % appstreamcli what-provides mimetype application/vnd.sketchup.skp
704 Could not find component providing 'mimetype::application/vnd.sketchup.skp'.
705 %
706 </pre></blockquote></p>
707
708 <p>Yesterday I used it to figure out which packages support the STL 3D
709 format:</p>
710
711 <p><blockquote><pre>
712 % appstreamcli what-provides mimetype application/sla|grep Package
713 Package: cura
714 Package: meshlab
715 Package: printrun
716 %
717 </pre></blockquote></p>
718
719 <p>PS: A new version of Cura was uploaded to Debian yesterday.</p>
720
721 <p>As usual, if you use Bitcoin and want to show your support of my
722 activities, please send Bitcoin donations to my address
723 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
724
725 </div>
726 <div class="tags">
727
728
729 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
730
731
732 </div>
733 </div>
734 <div class="padding"></div>
735
736 <div class="entry">
737 <div class="title">
738 <a href="http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html">Debian APT upgrade without enough free space on the disk...</a>
739 </div>
740 <div class="date">
741 8th July 2018
742 </div>
743 <div class="body">
744 <p>Quite regularly, I let my Debian Sid/Unstable chroot stay untouch
745 for a while, and when I need to update it there is not enough free
746 space on the disk for apt to do a normal 'apt upgrade'. I normally
747 would resolve the issue by doing 'apt install &lt;somepackages&gt;' to
748 upgrade only some of the packages in one batch, until the amount of
749 packages to download fall below the amount of free space available.
750 Today, I had about 500 packages to upgrade, and after a while I got
751 tired of trying to install chunks of packages manually. I concluded
752 that I did not have the spare hours required to complete the task, and
753 decided to see if I could automate it. I came up with this small
754 script which I call 'apt-in-chunks':</p>
755
756 <p><blockquote><pre>
757 #!/bin/sh
758 #
759 # Upgrade packages when the disk is too full to upgrade every
760 # upgradable package in one lump. Fetching packages to upgrade using
761 # apt, and then installing using dpkg, to avoid changing the package
762 # flag for manual/automatic.
763
764 set -e
765
766 ignore() {
767 if [ "$1" ]; then
768 grep -v "$1"
769 else
770 cat
771 fi
772 }
773
774 for p in $(apt list --upgradable | ignore "$@" |cut -d/ -f1 | grep -v '^Listing...'); do
775 echo "Upgrading $p"
776 apt clean
777 apt install --download-only -y $p
778 for f in /var/cache/apt/archives/*.deb; do
779 if [ -e "$f" ]; then
780 dpkg -i /var/cache/apt/archives/*.deb
781 break
782 fi
783 done
784 done
785 </pre></blockquote></p>
786
787 <p>The script will extract the list of packages to upgrade, try to
788 download the packages needed to upgrade one package, install the
789 downloaded packages using dpkg. The idea is to upgrade packages
790 without changing the APT mark for the package (ie the one recording of
791 the package was manually requested or pulled in as a dependency). To
792 use it, simply run it as root from the command line. If it fail, try
793 'apt install -f' to clean up the mess and run the script again. This
794 might happen if the new packages conflict with one of the old
795 packages. dpkg is unable to remove, while apt can do this.</p>
796
797 <p>It take one option, a package to ignore in the list of packages to
798 upgrade. The option to ignore a package is there to be able to skip
799 the packages that are simply too large to unpack. Today this was
800 'ghc', but I have run into other large packages causing similar
801 problems earlier (like TeX).</p>
802
803 <p>Update 2018-07-08: Thanks to Paul Wise, I am aware of two
804 alternative ways to handle this. The "unattended-upgrades
805 --minimal-upgrade-steps" option will try to calculate upgrade sets for
806 each package to upgrade, and then upgrade them in order, smallest set
807 first. It might be a better option than my above mentioned script.
808 Also, "aptutude upgrade" can upgrade single packages, thus avoiding
809 the need for using "dpkg -i" in the script above.</p>
810
811 <p>As usual, if you use Bitcoin and want to show your support of my
812 activities, please send Bitcoin donations to my address
813 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
814
815 </div>
816 <div class="tags">
817
818
819 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
820
821
822 </div>
823 </div>
824 <div class="padding"></div>
825
826 <div class="entry">
827 <div class="title">
828 <a href="http://people.skolelinux.org/pere/blog/Version_3_1_of_Cura__the_3D_print_slicer__is_now_in_Debian.html">Version 3.1 of Cura, the 3D print slicer, is now in Debian</a>
829 </div>
830 <div class="date">
831 13th February 2018
832 </div>
833 <div class="body">
834 <p>A new version of the
835 <a href="https://tracker.debian.org/pkg/cura">3D printer slicer
836 software Cura</a>, version 3.1.0, is now available in Debian Testing
837 (aka Buster) and Debian Unstable (aka Sid). I hope you find it
838 useful. It was uploaded the last few days, and the last update will
839 enter testing tomorrow. See the
840 <a href="https://ultimaker.com/en/products/cura-software/release-notes">release
841 notes</a> for the list of bug fixes and new features. Version 3.2
842 was announced 6 days ago. We will try to get it into Debian as
843 well.</p>
844
845 <p>More information related to 3D printing is available on the
846 <a href="https://wiki.debian.org/3DPrinting">3D printing</a> and
847 <a href="https://wiki.debian.org/3D-printer">3D printer</a> wiki pages
848 in Debian.</p>
849
850 <p>As usual, if you use Bitcoin and want to show your support of my
851 activities, please send Bitcoin donations to my address
852 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
853
854 </div>
855 <div class="tags">
856
857
858 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
859
860
861 </div>
862 </div>
863 <div class="padding"></div>
864
865 <div class="entry">
866 <div class="title">
867 <a href="http://people.skolelinux.org/pere/blog/Cura__the_nice_3D_print_slicer__is_now_in_Debian_Unstable.html">Cura, the nice 3D print slicer, is now in Debian Unstable</a>
868 </div>
869 <div class="date">
870 17th December 2017
871 </div>
872 <div class="body">
873 <p>After several months of working and waiting, I am happy to report
874 that the nice and user friendly 3D printer slicer software Cura just
875 entered Debian Unstable. It consist of five packages,
876 <a href="https://tracker.debian.org/pkg/cura">cura</a>,
877 <a href="https://tracker.debian.org/pkg/cura-engine">cura-engine</a>,
878 <a href="https://tracker.debian.org/pkg/libarcus">libarcus</a>,
879 <a href="https://tracker.debian.org/pkg/fdm-materials">fdm-materials</a>,
880 <a href="https://tracker.debian.org/pkg/libsavitar">libsavitar</a> and
881 <a href="https://tracker.debian.org/pkg/uranium">uranium</a>. The last
882 two, uranium and cura, entered Unstable yesterday. This should make
883 it easier for Debian users to print on at least the Ultimaker class of
884 3D printers. My nearest 3D printer is an Ultimaker 2+, so it will
885 make life easier for at least me. :)</p>
886
887 <p>The work to make this happen was done by Gregor Riepl, and I was
888 happy to assist him in sponsoring the packages. With the introduction
889 of Cura, Debian is up to three 3D printer slicers at your service,
890 Cura, Slic3r and Slic3r Prusa. If you own or have access to a 3D
891 printer, give it a go. :)</p>
892
893 <p>The 3D printer software is maintained by the 3D printer Debian
894 team, flocking together on the
895 <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/3dprinter-general">3dprinter-general</a>
896 mailing list and the
897 <a href="irc://irc.debian.org/#debian-3dprinting">#debian-3dprinting</a>
898 IRC channel.</p>
899
900 <p>The next step for Cura in Debian is to update the cura package to
901 version 3.0.3 and then update the entire set of packages to version
902 3.1.0 which showed up the last few days.</p>
903
904 </div>
905 <div class="tags">
906
907
908 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
909
910
911 </div>
912 </div>
913 <div class="padding"></div>
914
915 <div class="entry">
916 <div class="title">
917 <a href="http://people.skolelinux.org/pere/blog/Generating_3D_prints_in_Debian_using_Cura_and_Slic3r__prusa_.html">Generating 3D prints in Debian using Cura and Slic3r(-prusa)</a>
918 </div>
919 <div class="date">
920 9th October 2017
921 </div>
922 <div class="body">
923 <p>At my nearby maker space,
924 <a href="http://sonen.ifi.uio.no/">Sonen</a>, I heard the story that it
925 was easier to generate gcode files for theyr 3D printers (Ultimake 2+)
926 on Windows and MacOS X than Linux, because the software involved had
927 to be manually compiled and set up on Linux while premade packages
928 worked out of the box on Windows and MacOS X. I found this annoying,
929 as the software involved,
930 <a href="https://github.com/Ultimaker/Cura">Cura</a>, is free software
931 and should be trivial to get up and running on Linux if someone took
932 the time to package it for the relevant distributions. I even found
933 <a href="https://bugs.debian.org/706656">a request for adding into
934 Debian</a> from 2013, which had seem some activity over the years but
935 never resulted in the software showing up in Debian. So a few days
936 ago I offered my help to try to improve the situation.</p>
937
938 <p>Now I am very happy to see that all the packages required by a
939 working Cura in Debian are uploaded into Debian and waiting in the NEW
940 queue for the ftpmasters to have a look. You can track the progress
941 on
942 <a href="https://qa.debian.org/developer.php?email=3dprinter-general%40lists.alioth.debian.org">the
943 status page for the 3D printer team</a>.</p>
944
945 <p>The uploaded packages are a bit behind upstream, and was uploaded
946 now to get slots in <a href="https://ftp-master.debian.org/new.html">the NEW
947 queue</a> while we work up updating the packages to the latest
948 upstream version.</p>
949
950 <p>On a related note, two competitors for Cura, which I found harder
951 to use and was unable to configure correctly for Ultimaker 2+ in the
952 short time I spent on it, are already in Debian. If you are looking
953 for 3D printer "slicers" and want something already available in
954 Debian, check out
955 <a href="https://tracker.debian.org/pkg/slic3r">slic3r</a> and
956 <a href="https://tracker.debian.org/pkg/slic3r-prusa">slic3r-prusa</a>.
957 The latter is a fork of the former.</p>
958
959 <p>As usual, if you use Bitcoin and want to show your support of my
960 activities, please send Bitcoin donations to my address
961 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
962
963 </div>
964 <div class="tags">
965
966
967 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
968
969
970 </div>
971 </div>
972 <div class="padding"></div>
973
974 <div class="entry">
975 <div class="title">
976 <a href="http://people.skolelinux.org/pere/blog/Visualizing_GSM_radio_chatter_using_gr_gsm_and_Hopglass.html">Visualizing GSM radio chatter using gr-gsm and Hopglass</a>
977 </div>
978 <div class="date">
979 29th September 2017
980 </div>
981 <div class="body">
982 <p>Every mobile phone announce its existence over radio to the nearby
983 mobile cell towers. And this radio chatter is available for anyone
984 with a radio receiver capable of receiving them. Details about the
985 mobile phones with very good accuracy is of course collected by the
986 phone companies, but this is not the topic of this blog post. The
987 mobile phone radio chatter make it possible to figure out when a cell
988 phone is nearby, as it include the SIM card ID (IMSI). By paying
989 attention over time, one can see when a phone arrive and when it leave
990 an area. I believe it would be nice to make this information more
991 available to the general public, to make more people aware of how
992 their phones are announcing their whereabouts to anyone that care to
993 listen.</p>
994
995 <p>I am very happy to report that we managed to get something
996 visualizing this information up and running for
997 <a href="http://norwaymakers.org/osf17">Oslo Skaperfestival 2017</a>
998 (Oslo Makers Festival) taking place today and tomorrow at Deichmanske
999 library. The solution is based on the
1000 <a href="http://people.skolelinux.org/pere/blog/Easier_recipe_to_observe_the_cell_phones_around_you.html">simple
1001 recipe for listening to GSM chatter</a> I posted a few days ago, and
1002 will show up at the stand of <a href="http://sonen.ifi.uio.no/">Ã…pen
1003 Sone from the Computer Science department of the University of
1004 Oslo</a>. The presentation will show the nearby mobile phones (aka
1005 IMSIs) as dots in a web browser graph, with lines to the dot
1006 representing mobile base station it is talking to. It was working in
1007 the lab yesterday, and was moved into place this morning.</p>
1008
1009 <p>We set up a fairly powerful desktop machine using Debian
1010 Buster/Testing with several (five, I believe) RTL2838 DVB-T receivers
1011 connected and visualize the visible cell phone towers using an
1012 <a href="https://github.com/marlow925/hopglass">English version of
1013 Hopglass</a>. A fairly powerfull machine is needed as the
1014 grgsm_livemon_headless processes from
1015 <a href="https://tracker.debian.org/pkg/gr-gsm">gr-gsm</a> converting
1016 the radio signal to data packages is quite CPU intensive.</p>
1017
1018 <p>The frequencies to listen to, are identified using a slightly
1019 patched scan-and-livemon (to set the --args values for each receiver),
1020 and the Hopglass data is generated using the
1021 <a href="https://github.com/petterreinholdtsen/IMSI-catcher/tree/meshviewer-output">patches
1022 in my meshviewer-output branch</a>. For some reason we could not get
1023 more than four SDRs working. There is also a geographical map trying
1024 to show the location of the base stations, but I believe their
1025 coordinates are hardcoded to some random location in Germany, I
1026 believe. The code should be replaced with code to look up location in
1027 a text file, a sqlite database or one of the online databases
1028 mentioned in
1029 <a href="https://github.com/Oros42/IMSI-catcher/issues/14">the github
1030 issue for the topic</a>.
1031
1032 <p>If this sound interesting, visit the stand at the festival!</p>
1033
1034 </div>
1035 <div class="tags">
1036
1037
1038 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
1039
1040
1041 </div>
1042 </div>
1043 <div class="padding"></div>
1044
1045 <div class="entry">
1046 <div class="title">
1047 <a href="http://people.skolelinux.org/pere/blog/Easier_recipe_to_observe_the_cell_phones_around_you.html">Easier recipe to observe the cell phones around you</a>
1048 </div>
1049 <div class="date">
1050 24th September 2017
1051 </div>
1052 <div class="body">
1053 <p>A little more than a month ago I wrote
1054 <a href="http://people.skolelinux.org/pere/blog/Simpler_recipe_on_how_to_make_a_simple__7_IMSI_Catcher_using_Debian.html">how
1055 to observe the SIM card ID (aka IMSI number) of mobile phones talking
1056 to nearby mobile phone base stations using Debian GNU/Linux and a
1057 cheap USB software defined radio</a>, and thus being able to pinpoint
1058 the location of people and equipment (like cars and trains) with an
1059 accuracy of a few kilometer. Since then we have worked to make the
1060 procedure even simpler, and it is now possible to do this without any
1061 manual frequency tuning and without building your own packages.</p>
1062
1063 <p>The <a href="https://tracker.debian.org/pkg/gr-gsm">gr-gsm</a>
1064 package is now included in Debian testing and unstable, and the
1065 IMSI-catcher code no longer require root access to fetch and decode
1066 the GSM data collected using gr-gsm.</p>
1067
1068 <p>Here is an updated recipe, using packages built by Debian and a git
1069 clone of two python scripts:</p>
1070
1071 <ol>
1072
1073 <li>Start with a Debian machine running the Buster version (aka
1074 testing).</li>
1075
1076 <li>Run '<tt>apt install gr-gsm python-numpy python-scipy
1077 python-scapy</tt>' as root to install required packages.</li>
1078
1079 <li>Fetch the code decoding GSM packages using '<tt>git clone
1080 github.com/Oros42/IMSI-catcher.git</tt>'.</li>
1081
1082 <li>Insert USB software defined radio supported by GNU Radio.</li>
1083
1084 <li>Enter the IMSI-catcher directory and run '<tt>python
1085 scan-and-livemon</tt>' to locate the frequency of nearby base
1086 stations and start listening for GSM packages on one of them.</li>
1087
1088 <li>Enter the IMSI-catcher directory and run '<tt>python
1089 simple_IMSI-catcher.py</tt>' to display the collected information.</li>
1090
1091 </ol>
1092
1093 <p>Note, due to a bug somewhere the scan-and-livemon program (actually
1094 <a href="https://github.com/ptrkrysik/gr-gsm/issues/336">its underlying
1095 program grgsm_scanner</a>) do not work with the HackRF radio. It does
1096 work with RTL 8232 and other similar USB radio receivers you can get
1097 very cheaply
1098 (<a href="https://www.ebay.com/sch/items/?_nkw=rtl+2832">for example
1099 from ebay</a>), so for now the solution is to scan using the RTL radio
1100 and only use HackRF for fetching GSM data.</p>
1101
1102 <p>As far as I can tell, a cell phone only show up on one of the
1103 frequencies at the time, so if you are going to track and count every
1104 cell phone around you, you need to listen to all the frequencies used.
1105 To listen to several frequencies, use the --numrecv argument to
1106 scan-and-livemon to use several receivers. Further, I am not sure if
1107 phones using 3G or 4G will show as talking GSM to base stations, so
1108 this approach might not see all phones around you. I typically see
1109 0-400 IMSI numbers an hour when looking around where I live.</p>
1110
1111 <p>I've tried to run the scanner on a
1112 <a href="https://wiki.debian.org/RaspberryPi">Raspberry Pi 2 and 3
1113 running Debian Buster</a>, but the grgsm_livemon_headless process seem
1114 to be too CPU intensive to keep up. When GNU Radio print 'O' to
1115 stdout, I am told there it is caused by a buffer overflow between the
1116 radio and GNU Radio, caused by the program being unable to read the
1117 GSM data fast enough. If you see a stream of 'O's from the terminal
1118 where you started scan-and-livemon, you need a give the process more
1119 CPU power. Perhaps someone are able to optimize the code to a point
1120 where it become possible to set up RPi3 based GSM sniffers? I tried
1121 using Raspbian instead of Debian, but there seem to be something wrong
1122 with GNU Radio on raspbian, causing glibc to abort().</p>
1123
1124 </div>
1125 <div class="tags">
1126
1127
1128 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
1129
1130
1131 </div>
1132 </div>
1133 <div class="padding"></div>
1134
1135 <div class="entry">
1136 <div class="title">
1137 <a href="http://people.skolelinux.org/pere/blog/Simpler_recipe_on_how_to_make_a_simple__7_IMSI_Catcher_using_Debian.html">Simpler recipe on how to make a simple $7 IMSI Catcher using Debian</a>
1138 </div>
1139 <div class="date">
1140 9th August 2017
1141 </div>
1142 <div class="body">
1143 <p>On friday, I came across an interesting article in the Norwegian
1144 web based ICT news magazine digi.no on
1145 <a href="https://www.digi.no/artikler/sikkerhetsforsker-lagde-enkel-imsi-catcher-for-60-kroner-na-kan-mobiler-kartlegges-av-alle/398588">how
1146 to collect the IMSI numbers of nearby cell phones</a> using the cheap
1147 DVB-T software defined radios. The article refered to instructions
1148 and <a href="https://www.youtube.com/watch?v=UjwgNd_as30">a recipe by
1149 Keld Norman on Youtube on how to make a simple $7 IMSI Catcher</a>, and I decided to test them out.</p>
1150
1151 <p>The instructions said to use Ubuntu, install pip using apt (to
1152 bypass apt), use pip to install pybombs (to bypass both apt and pip),
1153 and the ask pybombs to fetch and build everything you need from
1154 scratch. I wanted to see if I could do the same on the most recent
1155 Debian packages, but this did not work because pybombs tried to build
1156 stuff that no longer build with the most recent openssl library or
1157 some other version skew problem. While trying to get this recipe
1158 working, I learned that the apt->pip->pybombs route was a long detour,
1159 and the only piece of software dependency missing in Debian was the
1160 gr-gsm package. I also found out that the lead upstream developer of
1161 gr-gsm (the name stand for GNU Radio GSM) project already had a set of
1162 Debian packages provided in an Ubuntu PPA repository. All I needed to
1163 do was to dget the Debian source package and built it.</p>
1164
1165 <p>The IMSI collector is a python script listening for packages on the
1166 loopback network device and printing to the terminal some specific GSM
1167 packages with IMSI numbers in them. The code is fairly short and easy
1168 to understand. The reason this work is because gr-gsm include a tool
1169 to read GSM data from a software defined radio like a DVB-T USB stick
1170 and other software defined radios, decode them and inject them into a
1171 network device on your Linux machine (using the loopback device by
1172 default). This proved to work just fine, and I've been testing the
1173 collector for a few days now.</p>
1174
1175 <p>The updated and simpler recipe is thus to</p>
1176
1177 <ol>
1178
1179 <li>start with a Debian machine running Stretch or newer,</li>
1180
1181 <li>build and install the gr-gsm package available from
1182 <a href="http://ppa.launchpad.net/ptrkrysik/gr-gsm/ubuntu/pool/main/g/gr-gsm/">http://ppa.launchpad.net/ptrkrysik/gr-gsm/ubuntu/pool/main/g/gr-gsm/</a>,</li>
1183
1184 <li>clone the git repostory from <a href="https://github.com/Oros42/IMSI-catcher">https://github.com/Oros42/IMSI-catcher</a>,</li>
1185
1186 <li>run grgsm_livemon and adjust the frequency until the terminal
1187 where it was started is filled with a stream of text (meaning you
1188 found a GSM station).</li>
1189
1190 <li>go into the IMSI-catcher directory and run 'sudo python simple_IMSI-catcher.py' to extract the IMSI numbers.</li>
1191
1192 </ol>
1193
1194 <p>To make it even easier in the future to get this sniffer up and
1195 running, I decided to package
1196 <a href="https://github.com/ptrkrysik/gr-gsm/">the gr-gsm project</a>
1197 for Debian (<a href="https://bugs.debian.org/871055">WNPP
1198 #871055</a>), and the package was uploaded into the NEW queue today.
1199 Luckily the gnuradio maintainer has promised to help me, as I do not
1200 know much about gnuradio stuff yet.</p>
1201
1202 <p>I doubt this "IMSI cacher" is anywhere near as powerfull as
1203 commercial tools like
1204 <a href="https://www.thespyphone.com/portable-imsi-imei-catcher/">The
1205 Spy Phone Portable IMSI / IMEI Catcher</a> or the
1206 <a href="https://en.wikipedia.org/wiki/Stingray_phone_tracker">Harris
1207 Stingray</a>, but I hope the existance of cheap alternatives can make
1208 more people realise how their whereabouts when carrying a cell phone
1209 is easily tracked. Seeing the data flow on the screen, realizing that
1210 I live close to a police station and knowing that the police is also
1211 wearing cell phones, I wonder how hard it would be for criminals to
1212 track the position of the police officers to discover when there are
1213 police near by, or for foreign military forces to track the location
1214 of the Norwegian military forces, or for anyone to track the location
1215 of government officials...</p>
1216
1217 <p>It is worth noting that the data reported by the IMSI-catcher
1218 script mentioned above is only a fraction of the data broadcasted on
1219 the GSM network. It will only collect one frequency at the time,
1220 while a typical phone will be using several frequencies, and not all
1221 phones will be using the frequencies tracked by the grgsm_livemod
1222 program. Also, there is a lot of radio chatter being ignored by the
1223 simple_IMSI-catcher script, which would be collected by extending the
1224 parser code. I wonder if gr-gsm can be set up to listen to more than
1225 one frequency?</p>
1226
1227 </div>
1228 <div class="tags">
1229
1230
1231 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
1232
1233
1234 </div>
1235 </div>
1236 <div class="padding"></div>
1237
1238 <div class="entry">
1239 <div class="title">
1240 <a href="http://people.skolelinux.org/pere/blog/Norwegian_Bokm_l_edition_of_Debian_Administrator_s_Handbook_is_now_available.html">Norwegian Bokmål edition of Debian Administrator's Handbook is now available</a>
1241 </div>
1242 <div class="date">
1243 25th July 2017
1244 </div>
1245 <div class="body">
1246 <p align="center"><img align="center" src="http://people.skolelinux.org/pere/blog/images/2017-07-25-debian-handbook-nb-testprint.png"/></p>
1247
1248 <p>I finally received a copy of the Norwegian Bokmål edition of
1249 "<a href="https://debian-handbook.info/">The Debian Administrator's
1250 Handbook</a>". This test copy arrived in the mail a few days ago, and
1251 I am very happy to hold the result in my hand. We spent around one and a half year translating it. This paperbook edition
1252 <a href="https://debian-handbook.info/get/#norwegian">is available
1253 from lulu.com</a>. If you buy it quickly, you save 25% on the list
1254 price. The book is also available for download in electronic form as
1255 PDF, EPUB and Mobipocket, as can be
1256 <a href="https://debian-handbook.info/browse/nb-NO/stable/">read online
1257 as a web page</a>.</p>
1258
1259 <p>This is the second book I publish (the first was the book
1260 "<a href="http://free-culture.cc/">Free Culture</a>" by Lawrence Lessig
1261 in
1262 <a href="http://www.lulu.com/shop/lawrence-lessig/free-culture/paperback/product-22440520.html">English</a>,
1263 <a href="http://www.lulu.com/shop/lawrence-lessig/culture-libre/paperback/product-22645082.html">French</a>
1264 and
1265 <a href="http://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-22441576.html">Norwegian
1266 Bokmål</a>), and I am very excited to finally wrap up this
1267 project. I hope
1268 "<a href="http://www.lulu.com/shop/rapha%C3%ABl-hertzog-and-roland-mas/h%C3%A5ndbok-for-debian-administratoren/paperback/product-23262290.html">HÃ¥ndbok
1269 for Debian-administratoren</a>" will be well received.</p>
1270
1271 </div>
1272 <div class="tags">
1273
1274
1275 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian-handbook">debian-handbook</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
1276
1277
1278 </div>
1279 </div>
1280 <div class="padding"></div>
1281
1282 <div class="entry">
1283 <div class="title">
1284 <a href="http://people.skolelinux.org/pere/blog/N_r_nynorskoversettelsen_svikter_til_eksamen___.html">NÃ¥r nynorskoversettelsen svikter til eksamen...</a>
1285 </div>
1286 <div class="date">
1287 3rd June 2017
1288 </div>
1289 <div class="body">
1290 <p><a href="http://www.aftenposten.no/norge/Krever-at-elever-ma-fa-annullert-eksamen-etter-rot-med-oppgavetekster-622459b.html">Aftenposten
1291 melder i dag</a> om feil i eksamensoppgavene for eksamen i politikk og
1292 menneskerettigheter, der teksten i bokmåls og nynorskutgaven ikke var
1293 like. Oppgaveteksten er gjengitt i artikkelen, og jeg ble nysgjerring
1294 på om den fri oversetterløsningen
1295 <a href="https://www.apertium.org/">Apertium</a> ville gjort en bedre
1296 jobb enn Utdanningsdirektoratet. Det kan se slik ut.</p>
1297
1298 <p>Her er bokmålsoppgaven fra eksamenen:</p>
1299
1300 <blockquote>
1301 <p>Drøft utfordringene knyttet til nasjonalstatenes og andre aktørers
1302 rolle og muligheter til å håndtere internasjonale utfordringer, som
1303 for eksempel flykningekrisen.</p>
1304
1305 <p>Vedlegge er eksempler på tekster som kan gi relevante perspektiver
1306 på temaet:</p>
1307 <ol>
1308 <li>Flykningeregnskapet 2016, UNHCR og IDMC
1309 <li>«Grenseløst Europa for fall» A-Magasinet, 26. november 2015
1310 </ol>
1311
1312 </blockquote>
1313
1314 <p>Dette oversetter Apertium slik:</p>
1315
1316 <blockquote>
1317 <p>Drøft utfordringane knytte til nasjonalstatane sine og rolla til
1318 andre aktørar og høve til å handtera internasjonale utfordringar, som
1319 til dømes *flykningekrisen.</p>
1320
1321 <p>Vedleggja er døme på tekster som kan gje relevante perspektiv på
1322 temaet:</p>
1323
1324 <ol>
1325 <li>*Flykningeregnskapet 2016, *UNHCR og *IDMC</li>
1326 <li>«*Grenseløst Europa for fall» A-Magasinet, 26. november 2015</li>
1327 </ol>
1328
1329 </blockquote>
1330
1331 <p>Ord som ikke ble forstått er markert med stjerne (*), og trenger
1332 ekstra språksjekk. Men ingen ord er forsvunnet, slik det var i
1333 oppgaven elevene fikk presentert på eksamen. Jeg mistenker dog at
1334 "andre aktørers rolle og muligheter til ..." burde vært oversatt til
1335 "rolla til andre aktørar og deira høve til ..." eller noe slikt, men
1336 det er kanskje flisespikking. Det understreker vel bare at det alltid
1337 trengs korrekturlesning etter automatisk oversettelse.</p>
1338
1339 </div>
1340 <div class="tags">
1341
1342
1343 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll</a>.
1344
1345
1346 </div>
1347 </div>
1348 <div class="padding"></div>
1349
1350 <div class="entry">
1351 <div class="title">
1352 <a href="http://people.skolelinux.org/pere/blog/Detecting_NFS_hangs_on_Linux_without_hanging_yourself___.html">Detecting NFS hangs on Linux without hanging yourself...</a>
1353 </div>
1354 <div class="date">
1355 9th March 2017
1356 </div>
1357 <div class="body">
1358 <p>Over the years, administrating thousand of NFS mounting linux
1359 computers at the time, I often needed a way to detect if the machine
1360 was experiencing NFS hang. If you try to use <tt>df</tt> or look at a
1361 file or directory affected by the hang, the process (and possibly the
1362 shell) will hang too. So you want to be able to detect this without
1363 risking the detection process getting stuck too. It has not been
1364 obvious how to do this. When the hang has lasted a while, it is
1365 possible to find messages like these in dmesg:</p>
1366
1367 <p><blockquote>
1368 nfs: server nfsserver not responding, still trying
1369 <br>nfs: server nfsserver OK
1370 </blockquote></p>
1371
1372 <p>It is hard to know if the hang is still going on, and it is hard to
1373 be sure looking in dmesg is going to work. If there are lots of other
1374 messages in dmesg the lines might have rotated out of site before they
1375 are noticed.</p>
1376
1377 <p>While reading through the nfs client implementation in linux kernel
1378 code, I came across some statistics that seem to give a way to detect
1379 it. The om_timeouts sunrpc value in the kernel will increase every
1380 time the above log entry is inserted into dmesg. And after digging a
1381 bit further, I discovered that this value show up in
1382 /proc/self/mountstats on Linux.</p>
1383
1384 <p>The mountstats content seem to be shared between files using the
1385 same file system context, so it is enough to check one of the
1386 mountstats files to get the state of the mount point for the machine.
1387 I assume this will not show lazy umounted NFS points, nor NFS mount
1388 points in a different process context (ie with a different filesystem
1389 view), but that does not worry me.</p>
1390
1391 <p>The content for a NFS mount point look similar to this:</p>
1392
1393 <p><blockquote><pre>
1394 [...]
1395 device /dev/mapper/Debian-var mounted on /var with fstype ext3
1396 device nfsserver:/mnt/nfsserver/home0 mounted on /mnt/nfsserver/home0 with fstype nfs statvers=1.1
1397 opts: rw,vers=3,rsize=65536,wsize=65536,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,soft,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=129.240.3.145,mountvers=3,mountport=4048,mountproto=udp,local_lock=all
1398 age: 7863311
1399 caps: caps=0x3fe7,wtmult=4096,dtsize=8192,bsize=0,namlen=255
1400 sec: flavor=1,pseudoflavor=1
1401 events: 61063112 732346265 1028140 35486205 16220064 8162542 761447191 71714012 37189 3891185 45561809 110486139 4850138 420353 15449177 296502 52736725 13523379 0 52182 9016896 1231 0 0 0 0 0
1402 bytes: 166253035039 219519120027 0 0 40783504807 185466229638 11677877 45561809
1403 RPC iostats version: 1.0 p/v: 100003/3 (nfs)
1404 xprt: tcp 925 1 6810 0 0 111505412 111480497 109 2672418560317 0 248 53869103 22481820
1405 per-op statistics
1406 NULL: 0 0 0 0 0 0 0 0
1407 GETATTR: 61063106 61063108 0 9621383060 6839064400 453650 77291321 78926132
1408 SETATTR: 463469 463470 0 92005440 66739536 63787 603235 687943
1409 LOOKUP: 17021657 17021657 0 3354097764 4013442928 57216 35125459 35566511
1410 ACCESS: 14281703 14290009 5 2318400592 1713803640 1709282 4865144 7130140
1411 READLINK: 125 125 0 20472 18620 0 1112 1118
1412 READ: 4214236 4214237 0 715608524 41328653212 89884 22622768 22806693
1413 WRITE: 8479010 8494376 22 187695798568 1356087148 178264904 51506907 231671771
1414 CREATE: 171708 171708 0 38084748 46702272 873 1041833 1050398
1415 MKDIR: 3680 3680 0 773980 993920 26 23990 24245
1416 SYMLINK: 903 903 0 233428 245488 6 5865 5917
1417 MKNOD: 80 80 0 20148 21760 0 299 304
1418 REMOVE: 429921 429921 0 79796004 61908192 3313 2710416 2741636
1419 RMDIR: 3367 3367 0 645112 484848 22 5782 6002
1420 RENAME: 466201 466201 0 130026184 121212260 7075 5935207 5961288
1421 LINK: 289155 289155 0 72775556 67083960 2199 2565060 2585579
1422 READDIR: 2933237 2933237 0 516506204 13973833412 10385 3190199 3297917
1423 READDIRPLUS: 1652839 1652839 0 298640972 6895997744 84735 14307895 14448937
1424 FSSTAT: 6144 6144 0 1010516 1032192 51 9654 10022
1425 FSINFO: 2 2 0 232 328 0 1 1
1426 PATHCONF: 1 1 0 116 140 0 0 0
1427 COMMIT: 0 0 0 0 0 0 0 0
1428
1429 device binfmt_misc mounted on /proc/sys/fs/binfmt_misc with fstype binfmt_misc
1430 [...]
1431 </pre></blockquote></p>
1432
1433 <p>The key number to look at is the third number in the per-op list.
1434 It is the number of NFS timeouts experiences per file system
1435 operation. Here 22 write timeouts and 5 access timeouts. If these
1436 numbers are increasing, I believe the machine is experiencing NFS
1437 hang. Unfortunately the timeout value do not start to increase right
1438 away. The NFS operations need to time out first, and this can take a
1439 while. The exact timeout value depend on the setup. For example the
1440 defaults for TCP and UDP mount points are quite different, and the
1441 timeout value is affected by the soft, hard, timeo and retrans NFS
1442 mount options.</p>
1443
1444 <p>The only way I have been able to get working on Debian and RedHat
1445 Enterprise Linux for getting the timeout count is to peek in /proc/.
1446 But according to
1447 <ahref="http://docs.oracle.com/cd/E19253-01/816-4555/netmonitor-12/index.html">Solaris
1448 10 System Administration Guide: Network Services</a>, the 'nfsstat -c'
1449 command can be used to get these timeout values. But this do not work
1450 on Linux, as far as I can tell. I
1451 <ahref="http://bugs.debian.org/857043">asked Debian about this</a>,
1452 but have not seen any replies yet.</p>
1453
1454 <p>Is there a better way to figure out if a Linux NFS client is
1455 experiencing NFS hangs? Is there a way to detect which processes are
1456 affected? Is there a way to get the NFS mount going quickly once the
1457 network problem causing the NFS hang has been cleared? I would very
1458 much welcome some clues, as we regularly run into NFS hangs.</p>
1459
1460 </div>
1461 <div class="tags">
1462
1463
1464 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin</a>.
1465
1466
1467 </div>
1468 </div>
1469 <div class="padding"></div>
1470
1471 <div class="entry">
1472 <div class="title">
1473 <a href="http://people.skolelinux.org/pere/blog/Norwegian_Bokm_l_translation_of_The_Debian_Administrator_s_Handbook_complete__proofreading_in_progress.html">Norwegian Bokmål translation of The Debian Administrator's Handbook complete, proofreading in progress</a>
1474 </div>
1475 <div class="date">
1476 3rd March 2017
1477 </div>
1478 <div class="body">
1479 <p>For almost a year now, we have been working on making a Norwegian
1480 Bokmål edition of <a href="https://debian-handbook.info/">The Debian
1481 Administrator's Handbook</a>. Now, thanks to the tireless effort of
1482 Ole-Erik, Ingrid and Andreas, the initial translation is complete, and
1483 we are working on the proof reading to ensure consistent language and
1484 use of correct computer science terms. The plan is to make the book
1485 available on paper, as well as in electronic form. For that to
1486 happen, the proof reading must be completed and all the figures need
1487 to be translated. If you want to help out, get in touch.</p>
1488
1489 <p><a href="http://people.skolelinux.org/pere/debian-handbook/debian-handbook-nb-NO.pdf">A
1490
1491 fresh PDF edition</a> in A4 format (the final book will have smaller
1492 pages) of the book created every morning is available for
1493 proofreading. If you find any errors, please
1494 <a href="https://hosted.weblate.org/projects/debian-handbook/">visit
1495 Weblate and correct the error</a>. The
1496 <a href="http://l.github.io/debian-handbook/stat/nb-NO/index.html">state
1497 of the translation including figures</a> is a useful source for those
1498 provide Norwegian bokmål screen shots and figures.</p>
1499
1500 </div>
1501 <div class="tags">
1502
1503
1504 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian-handbook">debian-handbook</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
1505
1506
1507 </div>
1508 </div>
1509 <div class="padding"></div>
1510
1511 <div class="entry">
1512 <div class="title">
1513 <a href="http://people.skolelinux.org/pere/blog/Unlimited_randomness_with_the_ChaosKey_.html">Unlimited randomness with the ChaosKey?</a>
1514 </div>
1515 <div class="date">
1516 1st March 2017
1517 </div>
1518 <div class="body">
1519 <p>A few days ago I ordered a small batch of
1520 <a href="http://altusmetrum.org/ChaosKey/">the ChaosKey</a>, a small
1521 USB dongle for generating entropy created by Bdale Garbee and Keith
1522 Packard. Yesterday it arrived, and I am very happy to report that it
1523 work great! According to its designers, to get it to work out of the
1524 box, you need the Linux kernel version 4.1 or later. I tested on a
1525 Debian Stretch machine (kernel version 4.9), and there it worked just
1526 fine, increasing the available entropy very quickly. I wrote a small
1527 test oneliner to test. It first print the current entropy level,
1528 drain /dev/random, and then print the entropy level for five seconds.
1529 Here is the situation without the ChaosKey inserted:</p>
1530
1531 <blockquote><pre>
1532 % cat /proc/sys/kernel/random/entropy_avail; \
1533 dd bs=1M if=/dev/random of=/dev/null count=1; \
1534 for n in $(seq 1 5); do \
1535 cat /proc/sys/kernel/random/entropy_avail; \
1536 sleep 1; \
1537 done
1538 300
1539 0+1 oppføringer inn
1540 0+1 oppføringer ut
1541 28 byte kopiert, 0,000264565 s, 106 kB/s
1542 4
1543 8
1544 12
1545 17
1546 21
1547 %
1548 </pre></blockquote>
1549
1550 <p>The entropy level increases by 3-4 every second. In such case any
1551 application requiring random bits (like a HTTPS enabled web server)
1552 will halt and wait for more entrpy. And here is the situation with
1553 the ChaosKey inserted:</p>
1554
1555 <blockquote><pre>
1556 % cat /proc/sys/kernel/random/entropy_avail; \
1557 dd bs=1M if=/dev/random of=/dev/null count=1; \
1558 for n in $(seq 1 5); do \
1559 cat /proc/sys/kernel/random/entropy_avail; \
1560 sleep 1; \
1561 done
1562 1079
1563 0+1 oppføringer inn
1564 0+1 oppføringer ut
1565 104 byte kopiert, 0,000487647 s, 213 kB/s
1566 433
1567 1028
1568 1031
1569 1035
1570 1038
1571 %
1572 </pre></blockquote>
1573
1574 <p>Quite the difference. :) I bought a few more than I need, in case
1575 someone want to buy one here in Norway. :)</p>
1576
1577 <p>Update: The dongle was presented at Debconf last year. You might
1578 find <a href="https://debconf16.debconf.org/talks/94/">the talk
1579 recording illuminating</a>. It explains exactly what the source of
1580 randomness is, if you are unable to spot it from the schema drawing
1581 available from the ChaosKey web site linked at the start of this blog
1582 post.</p>
1583
1584 </div>
1585 <div class="tags">
1586
1587
1588 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
1589
1590
1591 </div>
1592 </div>
1593 <div class="padding"></div>
1594
1595 <div class="entry">
1596 <div class="title">
1597 <a href="http://people.skolelinux.org/pere/blog/Where_did_that_package_go___mdash__geolocated_IP_traceroute.html">Where did that package go? &mdash; geolocated IP traceroute</a>
1598 </div>
1599 <div class="date">
1600 9th January 2017
1601 </div>
1602 <div class="body">
1603 <p>Did you ever wonder where the web trafic really flow to reach the
1604 web servers, and who own the network equipment it is flowing through?
1605 It is possible to get a glimpse of this from using traceroute, but it
1606 is hard to find all the details. Many years ago, I wrote a system to
1607 map the Norwegian Internet (trying to figure out if our plans for a
1608 network game service would get low enough latency, and who we needed
1609 to talk to about setting up game servers close to the users. Back
1610 then I used traceroute output from many locations (I asked my friends
1611 to run a script and send me their traceroute output) to create the
1612 graph and the map. The output from traceroute typically look like
1613 this:
1614
1615 <p><pre>
1616 traceroute to www.stortinget.no (85.88.67.10), 30 hops max, 60 byte packets
1617 1 uio-gw10.uio.no (129.240.202.1) 0.447 ms 0.486 ms 0.621 ms
1618 2 uio-gw8.uio.no (129.240.24.229) 0.467 ms 0.578 ms 0.675 ms
1619 3 oslo-gw1.uninett.no (128.39.65.17) 0.385 ms 0.373 ms 0.358 ms
1620 4 te3-1-2.br1.fn3.as2116.net (193.156.90.3) 1.174 ms 1.172 ms 1.153 ms
1621 5 he16-1-1.cr1.san110.as2116.net (195.0.244.234) 2.627 ms he16-1-1.cr2.oslosda310.as2116.net (195.0.244.48) 3.172 ms he16-1-1.cr1.san110.as2116.net (195.0.244.234) 2.857 ms
1622 6 ae1.ar8.oslosda310.as2116.net (195.0.242.39) 0.662 ms 0.637 ms ae0.ar8.oslosda310.as2116.net (195.0.242.23) 0.622 ms
1623 7 89.191.10.146 (89.191.10.146) 0.931 ms 0.917 ms 0.955 ms
1624 8 * * *
1625 9 * * *
1626 [...]
1627 </pre></p>
1628
1629 <p>This show the DNS names and IP addresses of (at least some of the)
1630 network equipment involved in getting the data traffic from me to the
1631 www.stortinget.no server, and how long it took in milliseconds for a
1632 package to reach the equipment and return to me. Three packages are
1633 sent, and some times the packages do not follow the same path. This
1634 is shown for hop 5, where three different IP addresses replied to the
1635 traceroute request.</p>
1636
1637 <p>There are many ways to measure trace routes. Other good traceroute
1638 implementations I use are traceroute (using ICMP packages) mtr (can do
1639 both ICMP, UDP and TCP) and scapy (python library with ICMP, UDP, TCP
1640 traceroute and a lot of other capabilities). All of them are easily
1641 available in <a href="https://www.debian.org/">Debian</a>.</p>
1642
1643 <p>This time around, I wanted to know the geographic location of
1644 different route points, to visualize how visiting a web page spread
1645 information about the visit to a lot of servers around the globe. The
1646 background is that a web site today often will ask the browser to get
1647 from many servers the parts (for example HTML, JSON, fonts,
1648 JavaScript, CSS, video) required to display the content. This will
1649 leak information about the visit to those controlling these servers
1650 and anyone able to peek at the data traffic passing by (like your ISP,
1651 the ISPs backbone provider, FRA, GCHQ, NSA and others).</p>
1652
1653 <p>Lets pick an example, the Norwegian parliament web site
1654 www.stortinget.no. It is read daily by all members of parliament and
1655 their staff, as well as political journalists, activits and many other
1656 citizens of Norway. A visit to the www.stortinget.no web site will
1657 ask your browser to contact 8 other servers: ajax.googleapis.com,
1658 insights.hotjar.com, script.hotjar.com, static.hotjar.com,
1659 stats.g.doubleclick.net, www.google-analytics.com,
1660 www.googletagmanager.com and www.netigate.se. I extracted this by
1661 asking <a href="http://phantomjs.org/">PhantomJS</a> to visit the
1662 Stortinget web page and tell me all the URLs PhantomJS downloaded to
1663 render the page (in HAR format using
1664 <a href="https://github.com/ariya/phantomjs/blob/master/examples/netsniff.js">their
1665 netsniff example</a>. I am very grateful to Gorm for showing me how
1666 to do this). My goal is to visualize network traces to all IP
1667 addresses behind these DNS names, do show where visitors personal
1668 information is spread when visiting the page.</p>
1669
1670 <p align="center"><a href="www.stortinget.no-geoip.kml"><img
1671 src="http://people.skolelinux.org/pere/blog/images/2017-01-09-www.stortinget.no-geoip-small.png" alt="map of combined traces for URLs used by www.stortinget.no using GeoIP"/></a></p>
1672
1673 <p>When I had a look around for options, I could not find any good
1674 free software tools to do this, and decided I needed my own traceroute
1675 wrapper outputting KML based on locations looked up using GeoIP. KML
1676 is easy to work with and easy to generate, and understood by several
1677 of the GIS tools I have available. I got good help from by NUUG
1678 colleague Anders Einar with this, and the result can be seen in
1679 <a href="https://github.com/petterreinholdtsen/kmltraceroute">my
1680 kmltraceroute git repository</a>. Unfortunately, the quality of the
1681 free GeoIP databases I could find (and the for-pay databases my
1682 friends had access to) is not up to the task. The IP addresses of
1683 central Internet infrastructure would typically be placed near the
1684 controlling companies main office, and not where the router is really
1685 located, as you can see from <a href="www.stortinget.no-geoip.kml">the
1686 KML file I created</a> using the GeoLite City dataset from MaxMind.
1687
1688 <p align="center"><a href="http://people.skolelinux.org/pere/blog/images/2017-01-09-www.stortinget.no-scapy.svg"><img
1689 src="http://people.skolelinux.org/pere/blog/images/2017-01-09-www.stortinget.no-scapy-small.png" alt="scapy traceroute graph for URLs used by www.stortinget.no"/></a></p>
1690
1691 <p>I also had a look at the visual traceroute graph created by
1692 <a href="http://www.secdev.org/projects/scapy/">the scrapy project</a>,
1693 showing IP network ownership (aka AS owner) for the IP address in
1694 question.
1695 <a href="http://people.skolelinux.org/pere/blog/images/2017-01-09-www.stortinget.no-scapy.svg">The
1696 graph display a lot of useful information about the traceroute in SVG
1697 format</a>, and give a good indication on who control the network
1698 equipment involved, but it do not include geolocation. This graph
1699 make it possible to see the information is made available at least for
1700 UNINETT, Catchcom, Stortinget, Nordunet, Google, Amazon, Telia, Level
1701 3 Communications and NetDNA.</p>
1702
1703 <p align="center"><a href="https://geotraceroute.com/index.php?node=4&host=www.stortinget.no"><img
1704 src="http://people.skolelinux.org/pere/blog/images/2017-01-09-www.stortinget.no-geotraceroute-small.png" alt="example geotraceroute view for www.stortinget.no"/></a></p>
1705
1706 <p>In the process, I came across the
1707 <a href="https://geotraceroute.com/">web service GeoTraceroute</a> by
1708 Salim Gasmi. Its methology of combining guesses based on DNS names,
1709 various location databases and finally use latecy times to rule out
1710 candidate locations seemed to do a very good job of guessing correct
1711 geolocation. But it could only do one trace at the time, did not have
1712 a sensor in Norway and did not make the geolocations easily available
1713 for postprocessing. So I contacted the developer and asked if he
1714 would be willing to share the code (he refused until he had time to
1715 clean it up), but he was interested in providing the geolocations in a
1716 machine readable format, and willing to set up a sensor in Norway. So
1717 since yesterday, it is possible to run traces from Norway in this
1718 service thanks to a sensor node set up by
1719 <a href="https://www.nuug.no/">the NUUG assosiation</a>, and get the
1720 trace in KML format for further processing.</p>
1721
1722 <p align="center"><a href="http://people.skolelinux.org/pere/blog/images/2017-01-09-www.stortinget.no-geotraceroute-kml-join.kml"><img
1723 src="http://people.skolelinux.org/pere/blog/images/2017-01-09-www.stortinget.no-geotraceroute-kml-join.png" alt="map of combined traces for URLs used by www.stortinget.no using geotraceroute"/></a></p>
1724
1725 <p>Here we can see a lot of trafic passes Sweden on its way to
1726 Denmark, Germany, Holland and Ireland. Plenty of places where the
1727 Snowden confirmations verified the traffic is read by various actors
1728 without your best interest as their top priority.</p>
1729
1730 <p>Combining KML files is trivial using a text editor, so I could loop
1731 over all the hosts behind the urls imported by www.stortinget.no and
1732 ask for the KML file from GeoTraceroute, and create a combined KML
1733 file with all the traces (unfortunately only one of the IP addresses
1734 behind the DNS name is traced this time. To get them all, one would
1735 have to request traces using IP number instead of DNS names from
1736 GeoTraceroute). That might be the next step in this project.</p>
1737
1738 <p>Armed with these tools, I find it a lot easier to figure out where
1739 the IP traffic moves and who control the boxes involved in moving it.
1740 And every time the link crosses for example the Swedish border, we can
1741 be sure Swedish Signal Intelligence (FRA) is listening, as GCHQ do in
1742 Britain and NSA in USA and cables around the globe. (Hm, what should
1743 we tell them? :) Keep that in mind if you ever send anything
1744 unencrypted over the Internet.</p>
1745
1746 <p>PS: KML files are drawn using
1747 <a href="http://ivanrublev.me/kml/">the KML viewer from Ivan
1748 Rublev<a/>, as it was less cluttered than the local Linux application
1749 Marble. There are heaps of other options too.</p>
1750
1751 <p>As usual, if you use Bitcoin and want to show your support of my
1752 activities, please send Bitcoin donations to my address
1753 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
1754
1755 </div>
1756 <div class="tags">
1757
1758
1759 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kart">kart</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
1760
1761
1762 </div>
1763 </div>
1764 <div class="padding"></div>
1765
1766 <div class="entry">
1767 <div class="title">
1768 <a href="http://people.skolelinux.org/pere/blog/Appstream_just_learned_how_to_map_hardware_to_packages_too_.html">Appstream just learned how to map hardware to packages too!</a>
1769 </div>
1770 <div class="date">
1771 23rd December 2016
1772 </div>
1773 <div class="body">
1774 <p>I received a very nice Christmas present today. As my regular
1775 readers probably know, I have been working on the
1776 <a href="http://packages.qa.debian.org/isenkram">the Isenkram
1777 system</a> for many years. The goal of the Isenkram system is to make
1778 it easier for users to figure out what to install to get a given piece
1779 of hardware to work in Debian, and a key part of this system is a way
1780 to map hardware to packages. Isenkram have its own mapping database,
1781 and also uses data provided by each package using the AppStream
1782 metadata format. And today,
1783 <a href="https://tracker.debian.org/pkg/appstream">AppStream</a> in
1784 Debian learned to look up hardware the same way Isenkram is doing it,
1785 ie using fnmatch():</p>
1786
1787 <p><pre>
1788 % appstreamcli what-provides modalias \
1789 usb:v1130p0202d0100dc00dsc00dp00ic03isc00ip00in00
1790 Identifier: pymissile [generic]
1791 Name: pymissile
1792 Summary: Control original Striker USB Missile Launcher
1793 Package: pymissile
1794 % appstreamcli what-provides modalias usb:v0694p0002d0000
1795 Identifier: libnxt [generic]
1796 Name: libnxt
1797 Summary: utility library for talking to the LEGO Mindstorms NXT brick
1798 Package: libnxt
1799 ---
1800 Identifier: t2n [generic]
1801 Name: t2n
1802 Summary: Simple command-line tool for Lego NXT
1803 Package: t2n
1804 ---
1805 Identifier: python-nxt [generic]
1806 Name: python-nxt
1807 Summary: Python driver/interface/wrapper for the Lego Mindstorms NXT robot
1808 Package: python-nxt
1809 ---
1810 Identifier: nbc [generic]
1811 Name: nbc
1812 Summary: C compiler for LEGO Mindstorms NXT bricks
1813 Package: nbc
1814 %
1815 </pre></p>
1816
1817 <p>A similar query can be done using the combined AppStream and
1818 Isenkram databases using the isenkram-lookup tool:</p>
1819
1820 <p><pre>
1821 % isenkram-lookup usb:v1130p0202d0100dc00dsc00dp00ic03isc00ip00in00
1822 pymissile
1823 % isenkram-lookup usb:v0694p0002d0000
1824 libnxt
1825 nbc
1826 python-nxt
1827 t2n
1828 %
1829 </pre></p>
1830
1831 <p>You can find modalias values relevant for your machine using
1832 <tt>cat $(find /sys/devices/ -name modalias)</tt>.
1833
1834 <p>If you want to make this system a success and help Debian users
1835 make the most of the hardware they have, please
1836 help<a href="https://wiki.debian.org/AppStream/Guidelines">add
1837 AppStream metadata for your package following the guidelines</a>
1838 documented in the wiki. So far only 11 packages provide such
1839 information, among the several hundred hardware specific packages in
1840 Debian. The Isenkram database on the other hand contain 101 packages,
1841 mostly related to USB dongles. Most of the packages with hardware
1842 mapping in AppStream are LEGO Mindstorms related, because I have, as
1843 part of my involvement in
1844 <a href="https://wiki.debian.org/LegoDesigners">the Debian LEGO
1845 team</a> given priority to making sure LEGO users get proposed the
1846 complete set of packages in Debian for that particular hardware. The
1847 team also got a nice Christmas present today. The
1848 <a href="https://tracker.debian.org/pkg/nxt-firmware">nxt-firmware
1849 package</a> made it into Debian. With this package in place, it is
1850 now possible to use the LEGO Mindstorms NXT unit with only free
1851 software, as the nxt-firmware package contain the source and firmware
1852 binaries for the NXT brick.</p>
1853
1854 <p>As usual, if you use Bitcoin and want to show your support of my
1855 activities, please send Bitcoin donations to my address
1856 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
1857
1858 </div>
1859 <div class="tags">
1860
1861
1862 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
1863
1864
1865 </div>
1866 </div>
1867 <div class="padding"></div>
1868
1869 <div class="entry">
1870 <div class="title">
1871 <a href="http://people.skolelinux.org/pere/blog/Isenkram_updated_with_a_lot_more_hardware_package_mappings.html">Isenkram updated with a lot more hardware-package mappings</a>
1872 </div>
1873 <div class="date">
1874 20th December 2016
1875 </div>
1876 <div class="body">
1877 <p><a href="http://packages.qa.debian.org/isenkram">The Isenkram
1878 system</a> I wrote two years ago to make it easier in Debian to find
1879 and install packages to get your hardware dongles to work, is still
1880 going strong. It is a system to look up the hardware present on or
1881 connected to the current system, and map the hardware to Debian
1882 packages. It can either be done using the tools in isenkram-cli or
1883 using the user space daemon in the isenkram package. The latter will
1884 notify you, when inserting new hardware, about what packages to
1885 install to get the dongle working. It will even provide a button to
1886 click on to ask packagekit to install the packages.</p>
1887
1888 <p>Here is an command line example from my Thinkpad laptop:</p>
1889
1890 <p><pre>
1891 % isenkram-lookup
1892 bluez
1893 cheese
1894 ethtool
1895 fprintd
1896 fprintd-demo
1897 gkrellm-thinkbat
1898 hdapsd
1899 libpam-fprintd
1900 pidgin-blinklight
1901 thinkfan
1902 tlp
1903 tp-smapi-dkms
1904 tp-smapi-source
1905 tpb
1906 %
1907 </pre></p>
1908
1909 <p>It can also list the firware package providing firmware requested
1910 by the load kernel modules, which in my case is an empty list because
1911 I have all the firmware my machine need:
1912
1913 <p><pre>
1914 % /usr/sbin/isenkram-autoinstall-firmware -l
1915 info: did not find any firmware files requested by loaded kernel modules. exiting
1916 %
1917 </pre></p>
1918
1919 <p>The last few days I had a look at several of the around 250
1920 packages in Debian with udev rules. These seem like good candidates
1921 to install when a given hardware dongle is inserted, and I found
1922 several that should be proposed by isenkram. I have not had time to
1923 check all of them, but am happy to report that now there are 97
1924 packages packages mapped to hardware by Isenkram. 11 of these
1925 packages provide hardware mapping using AppStream, while the rest are
1926 listed in the modaliases file provided in isenkram.</p>
1927
1928 <p>These are the packages with hardware mappings at the moment. The
1929 <strong>marked packages</strong> are also announcing their hardware
1930 support using AppStream, for everyone to use:</p>
1931
1932 <p>air-quality-sensor, alsa-firmware-loaders, argyll,
1933 <strong>array-info</strong>, avarice, avrdude, b43-fwcutter,
1934 bit-babbler, bluez, bluez-firmware, <strong>brltty</strong>,
1935 <strong>broadcom-sta-dkms</strong>, calibre, cgminer, cheese, colord,
1936 <strong>colorhug-client</strong>, dahdi-firmware-nonfree, dahdi-linux,
1937 dfu-util, dolphin-emu, ekeyd, ethtool, firmware-ipw2x00, fprintd,
1938 fprintd-demo, <strong>galileo</strong>, gkrellm-thinkbat, gphoto2,
1939 gpsbabel, gpsbabel-gui, gpsman, gpstrans, gqrx-sdr, gr-fcdproplus,
1940 gr-osmosdr, gtkpod, hackrf, hdapsd, hdmi2usb-udev, hpijs-ppds, hplip,
1941 ipw3945-source, ipw3945d, kde-config-tablet, kinect-audio-setup,
1942 <strong>libnxt</strong>, libpam-fprintd, <strong>lomoco</strong>,
1943 madwimax, minidisc-utils, mkgmap, msi-keyboard, mtkbabel,
1944 <strong>nbc</strong>, <strong>nqc</strong>, nut-hal-drivers, ola,
1945 open-vm-toolbox, open-vm-tools, openambit, pcgminer, pcmciautils,
1946 pcscd, pidgin-blinklight, printer-driver-splix,
1947 <strong>pymissile</strong>, python-nxt, qlandkartegt,
1948 qlandkartegt-garmin, rosegarden, rt2x00-source, sispmctl,
1949 soapysdr-module-hackrf, solaar, squeak-plugins-scratch, sunxi-tools,
1950 <strong>t2n</strong>, thinkfan, thinkfinger-tools, tlp, tp-smapi-dkms,
1951 tp-smapi-source, tpb, tucnak, uhd-host, usbmuxd, viking,
1952 virtualbox-ose-guest-x11, w1retap, xawtv, xserver-xorg-input-vmmouse,
1953 xserver-xorg-input-wacom, xserver-xorg-video-qxl,
1954 xserver-xorg-video-vmware, yubikey-personalization and
1955 zd1211-firmware</p>
1956
1957 <p>If you know of other packages, please let me know with a wishlist
1958 bug report against the isenkram-cli package, and ask the package
1959 maintainer to
1960 <a href="https://wiki.debian.org/AppStream/Guidelines">add AppStream
1961 metadata according to the guidelines</a> to provide the information
1962 for everyone. In time, I hope to get rid of the isenkram specific
1963 hardware mapping and depend exclusively on AppStream.</p>
1964
1965 <p>Note, the AppStream metadata for broadcom-sta-dkms is matching too
1966 much hardware, and suggest that the package with with any ethernet
1967 card. See <a href="http://bugs.debian.org/838735">bug #838735</a> for
1968 the details. I hope the maintainer find time to address it soon. In
1969 the mean time I provide an override in isenkram.</p>
1970
1971 </div>
1972 <div class="tags">
1973
1974
1975 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
1976
1977
1978 </div>
1979 </div>
1980 <div class="padding"></div>
1981
1982 <div class="entry">
1983 <div class="title">
1984 <a href="http://people.skolelinux.org/pere/blog/Oolite__a_life_in_space_as_vagabond_and_mercenary___nice_free_software.html">Oolite, a life in space as vagabond and mercenary - nice free software</a>
1985 </div>
1986 <div class="date">
1987 11th December 2016
1988 </div>
1989 <div class="body">
1990 <p align="center"><img width="70%" src="http://people.skolelinux.org/pere/blog/images/2016-12-11-nice-oolite.png"/></p>
1991
1992 <p>In my early years, I played
1993 <a href="http://wiki.alioth.net/index.php/Classic_Elite">the epic game
1994 Elite</a> on my PC. I spent many months trading and fighting in
1995 space, and reached the 'elite' fighting status before I moved on. The
1996 original Elite game was available on Commodore 64 and the IBM PC
1997 edition I played had a 64 KB executable. I am still impressed today
1998 that the authors managed to squeeze both a 3D engine and details about
1999 more than 2000 planet systems across 7 galaxies into a binary so
2000 small.</p>
2001
2002 <p>I have known about <a href="http://www.oolite.org/">the free
2003 software game Oolite inspired by Elite</a> for a while, but did not
2004 really have time to test it properly until a few days ago. It was
2005 great to discover that my old knowledge about trading routes were
2006 still valid. But my fighting and flying abilities were gone, so I had
2007 to retrain to be able to dock on a space station. And I am still not
2008 able to make much resistance when I am attacked by pirates, so I
2009 bougth and mounted the most powerful laser in the rear to be able to
2010 put up at least some resistance while fleeing for my life. :)</p>
2011
2012 <p>When playing Elite in the late eighties, I had to discover
2013 everything on my own, and I had long lists of prices seen on different
2014 planets to be able to decide where to trade what. This time I had the
2015 advantages of the
2016 <a href="http://wiki.alioth.net/index.php/Main_Page">Elite wiki</a>,
2017 where information about each planet is easily available with common
2018 price ranges and suggested trading routes. This improved my ability
2019 to earn money and I have been able to earn enough to buy a lot of
2020 useful equipent in a few days. I believe I originally played for
2021 months before I could get a docking computer, while now I could get it
2022 after less then a week.</p>
2023
2024 <p>If you like science fiction and dreamed of a life as a vagabond in
2025 space, you should try out Oolite. It is available for Linux, MacOSX
2026 and Windows, and is included in Debian and derivatives since 2011.</p>
2027
2028 <p>As usual, if you use Bitcoin and want to show your support of my
2029 activities, please send Bitcoin donations to my address
2030 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
2031
2032 </div>
2033 <div class="tags">
2034
2035
2036 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software</a>.
2037
2038
2039 </div>
2040 </div>
2041 <div class="padding"></div>
2042
2043 <div class="entry">
2044 <div class="title">
2045 <a href="http://people.skolelinux.org/pere/blog/Quicker_Debian_installations_using_eatmydata.html">Quicker Debian installations using eatmydata</a>
2046 </div>
2047 <div class="date">
2048 25th November 2016
2049 </div>
2050 <div class="body">
2051 <p>Two years ago, I did some experiments with eatmydata and the Debian
2052 installation system, observing how using
2053 <a href="http://people.skolelinux.org/pere/blog/Speeding_up_the_Debian_installer_using_eatmydata_and_dpkg_divert.html">eatmydata
2054 could speed up the installation</a> quite a bit. My testing measured
2055 speedup around 20-40 percent for Debian Edu, where we install around
2056 1000 packages from within the installer. The eatmydata package
2057 provide a way to disable/delay file system flushing. This is a bit
2058 risky in the general case, as files that should be stored on disk will
2059 stay only in memory a bit longer than expected, causing problems if a
2060 machine crashes at an inconvenient time. But for an installation, if
2061 the machine crashes during installation the process is normally
2062 restarted, and avoiding disk operations as much as possible to speed
2063 up the process make perfect sense.
2064
2065 <p>I added code in the Debian Edu specific installation code to enable
2066 <a href="https://tracker.debian.org/pkg/libeatmydata">eatmydata</a>,
2067 but did not have time to push it any further. But a few months ago I
2068 picked it up again and worked with the libeatmydata package maintainer
2069 Mattia Rizzolo to make it easier for everyone to get this installation
2070 speedup in Debian. Thanks to our cooperation There is now an
2071 eatmydata-udeb package in Debian testing and unstable, and simply
2072 enabling/installing it in debian-installer (d-i) is enough to get the
2073 quicker installations. It can be enabled using preseeding. The
2074 following untested kernel argument should do the trick:</p>
2075
2076 <blockquote><pre>
2077 preseed/early_command="anna-install eatmydata-udeb"
2078 </pre></blockquote>
2079
2080 <p>This should ask d-i to install the package inside the d-i
2081 environment early in the installation sequence. Having it installed
2082 in d-i in turn will make sure the relevant scripts are called just
2083 after debootstrap filled /target/ with the freshly installed Debian
2084 system to configure apt to run dpkg with eatmydata. This is enough to
2085 speed up the installation process. There is a proposal to
2086 <a href="https://bugs.debian.org/841153">extend the idea a bit further
2087 by using /etc/ld.so.preload instead of apt.conf</a>, but I have not
2088 tested its impact.</p>
2089
2090
2091 </div>
2092 <div class="tags">
2093
2094
2095 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
2096
2097
2098 </div>
2099 </div>
2100 <div class="padding"></div>
2101
2102 <div class="entry">
2103 <div class="title">
2104 <a href="http://people.skolelinux.org/pere/blog/Oversette_bokm_l_til_nynorsk__enklere_enn_du_tror_takket_v_re_Apertium.html">Oversette bokmål til nynorsk, enklere enn du tror takket være Apertium</a>
2105 </div>
2106 <div class="date">
2107 24th November 2016
2108 </div>
2109 <div class="body">
2110 <p>I Norge er det mange som trenger å skrive både bokmål og nynorsk.
2111 Eksamensoppgaver, offentlige brev og nyheter er eksempler på tekster
2112 der det er krav om skriftspråk. I tillegg til alle skoleoppgavene som
2113 elever over det ganske land skal levere inn hvert år. Det mange ikke
2114 vet er at selv om de kommersielle alternativene
2115 <a href="https://translate.google.com/">Google Translate</a> og
2116 <a href="https://www.bing.com/translator/">Bing Translator</a> ikke kan
2117 bidra med å oversette mellom bokmål og nynorsk, så finnes det et
2118 utmerket fri programvarealternativ som kan. Oversetterverktøyet
2119 Apertium har støtte for en rekke språkkombinasjoner, og takket være
2120 den utrettelige innsatsen til blant annet Kevin Brubeck Unhammer, kan
2121 en bruke webtjenesten til å fylle inn en tekst på bokmål eller
2122 nynorsk, og få den automatoversatt til det andre skriftspråket.
2123 Resultatet er ikke perfekt, men et svært godt utgangspunkt. Av og til
2124 er resultatet så bra at det kan benyttes uten endringer. Jeg vet
2125 f.eks. at store deler av Joomla ble oversatt til nynorsk ved hjelp
2126 Apertium. Høres det ut som noe du kan ha bruk for? Besøk i så fall
2127 <a href="https://www.apertium.org/">Apertium.org</a> og fyll inn
2128 teksten din i webskjemaet der.
2129
2130 <p>Hvis du trenger maskinell tilgang til den bakenforliggende
2131 teknologien kan du enten installere pakken
2132 <a href="https://tracker.debian.org/apertium-nno-nob">apertium-nno-nob</a>
2133 på en Debian-maskin eller bruke web-API-et tilgjengelig fra
2134 api.apertium.org. Se
2135 <a href="http://wiki.apertium.org/wiki/Apertium-apy">API-dokumentasjonen</a>
2136 for detaljer om web-API-et. Her kan du se hvordan resultatet blir for
2137 denne teksten som ble skrevet på bokmål over maskinoversatt til
2138 nynorsk.</p>
2139
2140 <hr/>
2141
2142 <p>I Noreg er det mange som treng å skriva både bokmål og nynorsk.
2143 Eksamensoppgåver, offentlege brev og nyhende er døme på tekster der
2144 det er krav om skriftspråk. I tillegg til alle skuleoppgåvene som
2145 elevar over det ganske land skal levera inn kvart år. Det mange ikkje
2146 veit er at sjølv om dei kommersielle alternativa
2147 <a href="https://translate.google.com/">Google *Translate</a> og
2148 <a href="https://www.bing.com/translator/">Bing *Translator</a> ikkje
2149 kan bidra med å omsetja mellom bokmål og nynorsk, så finst det eit
2150 utmerka fri programvarealternativ som kan. Omsetjarverktøyet
2151 *Apertium har støtte for ei rekkje språkkombinasjonar, og takka vera
2152 den utrøyttelege innsatsen til blant anna Kevin Brubeck Unhammer, kan
2153 ein bruka *webtjenesten til å fylla inn ei tekst på bokmål eller
2154 nynorsk, og få den *automatoversatt til det andre skriftspråket.
2155 Resultatet er ikkje perfekt, men eit svært godt utgangspunkt. Av og
2156 til er resultatet så bra at det kan nyttast utan endringar. Eg veit
2157 t.d. at store delar av *Joomla vart omsett til nynorsk ved hjelp
2158 *Apertium. Høyrast det ut som noko du kan ha bruk for? Besøk i så
2159 fall <a href="https://www.apertium.org/">*Apertium.org</a> og fyll inn
2160 teksta di i *webskjemaet der.
2161
2162 <p>Viss du treng *maskinell tilgjenge til den *bakenforliggende
2163 teknologien kan du anten installera pakken
2164 <a href="https://tracker.debian.org/apertium-nno-nob">*apertium-*nno-*nob</a>
2165 på ein *Debian-maskin eller bruka *web-*API-eit tilgjengeleg frå
2166 *api.*apertium.org. Sjå
2167 <a href="http://wiki.apertium.org/wiki/Apertium-apy">*API-dokumentasjonen</a>
2168 for detaljar om *web-*API-eit. Her kan du sjå korleis resultatet vert
2169 for denne teksta som vart skreva på bokmål over *maskinoversatt til
2170 nynorsk.</p>
2171
2172 </div>
2173 <div class="tags">
2174
2175
2176 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll</a>.
2177
2178
2179 </div>
2180 </div>
2181 <div class="padding"></div>
2182
2183 <div class="entry">
2184 <div class="title">
2185 <a href="http://people.skolelinux.org/pere/blog/Coz_profiler_for_multi_threaded_software_is_now_in_Debian.html">Coz profiler for multi-threaded software is now in Debian</a>
2186 </div>
2187 <div class="date">
2188 13th November 2016
2189 </div>
2190 <div class="body">
2191 <p><a href="http://coz-profiler.org/">The Coz profiler</a>, a nice
2192 profiler able to run benchmarking experiments on the instrumented
2193 multi-threaded program, finally
2194 <a href="https://tracker.debian.org/pkg/coz-profiler">made it into
2195 Debian unstable yesterday</A>. Lluís Vilanova and I have spent many
2196 months since
2197 <a href="http://people.skolelinux.org/pere/blog/Coz_can_help_you_find_bottlenecks_in_multi_threaded_software___nice_free_software.html">I
2198 blogged about the coz tool</a> in August working with upstream to make
2199 it suitable for Debian. There are still issues with clang
2200 compatibility, inline assembly only working x86 and minimized
2201 JavaScript libraries.</p>
2202
2203 <p>To test it, install 'coz-profiler' using apt and run it like this:</p>
2204
2205 <p><blockquote>
2206 <tt>coz run --- /path/to/binary-with-debug-info</tt>
2207 </blockquote></p>
2208
2209 <p>This will produce a profile.coz file in the current working
2210 directory with the profiling information. This is then given to a
2211 JavaScript application provided in the package and available from
2212 <a href="http://plasma-umass.github.io/coz/">a project web page</a>.
2213 To start the local copy, invoke it in a browser like this:</p>
2214
2215 <p><blockquote>
2216 <tt>sensible-browser /usr/share/coz-profiler/viewer/index.htm</tt>
2217 </blockquote></p>
2218
2219 <p>See the project home page and the
2220 <a href="https://www.usenix.org/publications/login/summer2016/curtsinger">USENIX
2221 ;login: article on Coz</a> for more information on how it is
2222 working.</p>
2223
2224 </div>
2225 <div class="tags">
2226
2227
2228 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
2229
2230
2231 </div>
2232 </div>
2233 <div class="padding"></div>
2234
2235 <div class="entry">
2236 <div class="title">
2237 <a href="http://people.skolelinux.org/pere/blog/My_own_self_balancing_Lego_Segway.html">My own self balancing Lego Segway</a>
2238 </div>
2239 <div class="date">
2240 4th November 2016
2241 </div>
2242 <div class="body">
2243 <p>A while back I received a Gyro sensor for the NXT
2244 <a href="mindstorms.lego.com">Mindstorms</a> controller as a birthday
2245 present. It had been on my wishlist for a while, because I wanted to
2246 build a Segway like balancing lego robot. I had already built
2247 <a href="http://www.nxtprograms.com/NXT2/segway/">a simple balancing
2248 robot</a> with the kids, using the light/color sensor included in the
2249 NXT kit as the balance sensor, but it was not working very well. It
2250 could balance for a while, but was very sensitive to the light
2251 condition in the room and the reflective properties of the surface and
2252 would fall over after a short while. I wanted something more robust,
2253 and had
2254 <a href="https://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NGY1044">the
2255 gyro sensor from HiTechnic</a> I believed would solve it on my
2256 wishlist for some years before it suddenly showed up as a gift from my
2257 loved ones. :)</p>
2258
2259 <p>Unfortunately I have not had time to sit down and play with it
2260 since then. But that changed some days ago, when I was searching for
2261 lego segway information and came across a recipe from HiTechnic for
2262 building
2263 <a href="http://www.hitechnic.com/blog/gyro-sensor/htway/">the
2264 HTWay</a>, a segway like balancing robot. Build instructions and
2265 <a href="https://www.hitechnic.com/upload/786-HTWayC.nxc">source
2266 code</a> was included, so it was just a question of putting it all
2267 together. And thanks to the great work of many Debian developers, the
2268 compiler needed to build the source for the NXT is already included in
2269 Debian, so I was read to go in less than an hour. The resulting robot
2270 do not look very impressive in its simplicity:</p>
2271
2272 <p align="center"><img width="70%" src="http://people.skolelinux.org/pere/blog/images/2016-11-04-lego-htway-robot.jpeg"></p>
2273
2274 <p>Because I lack the infrared sensor used to control the robot in the
2275 design from HiTechnic, I had to comment out the last task
2276 (taskControl). I simply placed /* and */ around it get the program
2277 working without that sensor present. Now it balances just fine until
2278 the battery status run low:</p>
2279
2280 <p align="center"><video width="70%" controls="true">
2281 <source src="http://people.skolelinux.org/pere/blog/images/2016-11-04-lego-htway-balancing.ogv" type="video/ogg">
2282 </video></p>
2283
2284 <p>Now we would like to teach it how to follow a line and take remote
2285 control instructions using the included Bluetooth receiver in the NXT.</p>
2286
2287 <p>If you, like me, love LEGO and want to make sure we find the tools
2288 they need to work with LEGO in Debian and all our derivative
2289 distributions like Ubuntu, check out
2290 <a href="http://wiki.debian.org/LegoDesigners">the LEGO designers
2291 project page</a> and join the Debian LEGO team. Personally I own a
2292 RCX and NXT controller (no EV3), and would like to make sure the
2293 Debian tools needed to program the systems I own work as they
2294 should.</p>
2295
2296 </div>
2297 <div class="tags">
2298
2299
2300 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/lego">lego</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>.
2301
2302
2303 </div>
2304 </div>
2305 <div class="padding"></div>
2306
2307 <div class="entry">
2308 <div class="title">
2309 <a href="http://people.skolelinux.org/pere/blog/Experience_and_updated_recipe_for_using_the_Signal_app_without_a_mobile_phone.html">Experience and updated recipe for using the Signal app without a mobile phone</a>
2310 </div>
2311 <div class="date">
2312 10th October 2016
2313 </div>
2314 <div class="body">
2315 <p>In July
2316 <a href="http://people.skolelinux.org/pere/blog/How_to_use_the_Signal_app_if_you_only_have_a_land_line__ie_no_mobile_phone_.html">I
2317 wrote how to get the Signal Chrome/Chromium app working</a> without
2318 the ability to receive SMS messages (aka without a cell phone). It is
2319 time to share some experiences and provide an updated setup.</p>
2320
2321 <p>The Signal app have worked fine for several months now, and I use
2322 it regularly to chat with my loved ones. I had a major snag at the
2323 end of my summer vacation, when the the app completely forgot my
2324 setup, identity and keys. The reason behind this major mess was
2325 running out of disk space. To avoid that ever happening again I have
2326 started storing everything in <tt>userdata/</tt> in git, to be able to
2327 roll back to an earlier version if the files are wiped by mistake. I
2328 had to use it once after introducing the git backup. When rolling
2329 back to an earlier version, one need to use the 'reset session' option
2330 in Signal to get going, and notify the people you talk with about the
2331 problem. I assume there is some sequence number tracking in the
2332 protocol to detect rollback attacks. The git repository is rather big
2333 (674 MiB so far), but I have not tried to figure out if some of the
2334 content can be added to a .gitignore file due to lack of spare
2335 time.</p>
2336
2337 <p>I've also hit the 90 days timeout blocking, and noticed that this
2338 make it impossible to send messages using Signal. I could still
2339 receive them, but had to patch the code with a new timestamp to send.
2340 I believe the timeout is added by the developers to force people to
2341 upgrade to the latest version of the app, even when there is no
2342 protocol changes, to reduce the version skew among the user base and
2343 thus try to keep the number of support requests down.</p>
2344
2345 <p>Since my original recipe, the Signal source code changed slightly,
2346 making the old patch fail to apply cleanly. Below is an updated
2347 patch, including the shell wrapper I use to start Signal. The
2348 original version required a new user to locate the JavaScript console
2349 and call a function from there. I got help from a friend with more
2350 JavaScript knowledge than me to modify the code to provide a GUI
2351 button instead. This mean that to get started you just need to run
2352 the wrapper and click the 'Register without mobile phone' to get going
2353 now. I've also modified the timeout code to always set it to 90 days
2354 in the future, to avoid having to patch the code regularly.</p>
2355
2356 <p>So, the updated recipe for Debian Jessie:</p>
2357
2358 <ol>
2359
2360 <li>First, install required packages to get the source code and the
2361 browser you need. Signal only work with Chrome/Chromium, as far as I
2362 know, so you need to install it.
2363
2364 <pre>
2365 apt install git tor chromium
2366 git clone https://github.com/WhisperSystems/Signal-Desktop.git
2367 </pre></li>
2368
2369 <li>Modify the source code using command listed in the the patch
2370 block below.</li>
2371
2372 <li>Start Signal using the run-signal-app wrapper (for example using
2373 <tt>`pwd`/run-signal-app</tt>).
2374
2375 <li>Click on the 'Register without mobile phone', will in a phone
2376 number you can receive calls to the next minute, receive the
2377 verification code and enter it into the form field and press
2378 'Register'. Note, the phone number you use will be user Signal
2379 username, ie the way others can find you on Signal.</li>
2380
2381 <li>You can now use Signal to contact others. Note, new contacts do
2382 not show up in the contact list until you restart Signal, and there is
2383 no way to assign names to Contacts. There is also no way to create or
2384 update chat groups. I suspect this is because the web app do not have
2385 a associated contact database.</li>
2386
2387 </ol>
2388
2389 <p>I am still a bit uneasy about using Signal, because of the way its
2390 main author moxie0 reject federation and accept dependencies to major
2391 corporations like Google (part of the code is fetched from Google) and
2392 Amazon (the central coordination point is owned by Amazon). See for
2393 example
2394 <a href="https://github.com/LibreSignal/LibreSignal/issues/37">the
2395 LibreSignal issue tracker</a> for a thread documenting the authors
2396 view on these issues. But the network effect is strong in this case,
2397 and several of the people I want to communicate with already use
2398 Signal. Perhaps we can all move to <a href="https://ring.cx/">Ring</a>
2399 once it <a href="https://bugs.debian.org/830265">work on my
2400 laptop</a>? It already work on Windows and Android, and is included
2401 in <a href="https://tracker.debian.org/pkg/ring">Debian</a> and
2402 <a href="https://launchpad.net/ubuntu/+source/ring">Ubuntu</a>, but not
2403 working on Debian Stable.</p>
2404
2405 <p>Anyway, this is the patch I apply to the Signal code to get it
2406 working. It switch to the production servers, disable to timeout,
2407 make registration easier and add the shell wrapper:</p>
2408
2409 <pre>
2410 cd Signal-Desktop; cat &lt;&lt;EOF | patch -p1
2411 diff --git a/js/background.js b/js/background.js
2412 index 24b4c1d..579345f 100644
2413 --- a/js/background.js
2414 +++ b/js/background.js
2415 @@ -33,9 +33,9 @@
2416 });
2417 });
2418
2419 - var SERVER_URL = 'https://textsecure-service-staging.whispersystems.org';
2420 + var SERVER_URL = 'https://textsecure-service-ca.whispersystems.org';
2421 var SERVER_PORTS = [80, 4433, 8443];
2422 - var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments-staging.s3.amazonaws.com';
2423 + var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments.s3.amazonaws.com';
2424 var messageReceiver;
2425 window.getSocketStatus = function() {
2426 if (messageReceiver) {
2427 diff --git a/js/expire.js b/js/expire.js
2428 index 639aeae..beb91c3 100644
2429 --- a/js/expire.js
2430 +++ b/js/expire.js
2431 @@ -1,6 +1,6 @@
2432 ;(function() {
2433 'use strict';
2434 - var BUILD_EXPIRATION = 0;
2435 + var BUILD_EXPIRATION = Date.now() + (90 * 24 * 60 * 60 * 1000);
2436
2437 window.extension = window.extension || {};
2438
2439 diff --git a/js/views/install_view.js b/js/views/install_view.js
2440 index 7816f4f..1d6233b 100644
2441 --- a/js/views/install_view.js
2442 +++ b/js/views/install_view.js
2443 @@ -38,7 +38,8 @@
2444 return {
2445 'click .step1': this.selectStep.bind(this, 1),
2446 'click .step2': this.selectStep.bind(this, 2),
2447 - 'click .step3': this.selectStep.bind(this, 3)
2448 + 'click .step3': this.selectStep.bind(this, 3),
2449 + 'click .callreg': function() { extension.install('standalone') },
2450 };
2451 },
2452 clearQR: function() {
2453 diff --git a/options.html b/options.html
2454 index dc0f28e..8d709f6 100644
2455 --- a/options.html
2456 +++ b/options.html
2457 @@ -14,7 +14,10 @@
2458 &lt;div class='nav'>
2459 &lt;h1>{{ installWelcome }}&lt;/h1>
2460 &lt;p>{{ installTagline }}&lt;/p>
2461 - &lt;div> &lt;a class='button step2'>{{ installGetStartedButton }}&lt;/a> &lt;/div>
2462 + &lt;div> &lt;a class='button step2'>{{ installGetStartedButton }}&lt;/a>
2463 + &lt;br> &lt;a class="button callreg">Register without mobile phone&lt;/a>
2464 +
2465 + &lt;/div>
2466 &lt;span class='dot step1 selected'>&lt;/span>
2467 &lt;span class='dot step2'>&lt;/span>
2468 &lt;span class='dot step3'>&lt;/span>
2469 --- /dev/null 2016-10-07 09:55:13.730181472 +0200
2470 +++ b/run-signal-app 2016-10-10 08:54:09.434172391 +0200
2471 @@ -0,0 +1,12 @@
2472 +#!/bin/sh
2473 +set -e
2474 +cd $(dirname $0)
2475 +mkdir -p userdata
2476 +userdata="`pwd`/userdata"
2477 +if [ -d "$userdata" ] && [ ! -d "$userdata/.git" ] ; then
2478 + (cd $userdata && git init)
2479 +fi
2480 +(cd $userdata && git add . && git commit -m "Current status." || true)
2481 +exec chromium \
2482 + --proxy-server="socks://localhost:9050" \
2483 + --user-data-dir=$userdata --load-and-launch-app=`pwd`
2484 EOF
2485 chmod a+rx run-signal-app
2486 </pre>
2487
2488 <p>As usual, if you use Bitcoin and want to show your support of my
2489 activities, please send Bitcoin donations to my address
2490 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
2491
2492 </div>
2493 <div class="tags">
2494
2495
2496 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
2497
2498
2499 </div>
2500 </div>
2501 <div class="padding"></div>
2502
2503 <div class="entry">
2504 <div class="title">
2505 <a href="http://people.skolelinux.org/pere/blog/Isenkram__Appstream_and_udev_make_life_as_a_LEGO_builder_easier.html">Isenkram, Appstream and udev make life as a LEGO builder easier</a>
2506 </div>
2507 <div class="date">
2508 7th October 2016
2509 </div>
2510 <div class="body">
2511 <p><a href="http://packages.qa.debian.org/isenkram">The Isenkram
2512 system</a> provide a practical and easy way to figure out which
2513 packages support the hardware in a given machine. The command line
2514 tool <tt>isenkram-lookup</tt> and the tasksel options provide a
2515 convenient way to list and install packages relevant for the current
2516 hardware during system installation, both user space packages and
2517 firmware packages. The GUI background daemon on the other hand provide
2518 a pop-up proposing to install packages when a new dongle is inserted
2519 while using the computer. For example, if you plug in a smart card
2520 reader, the system will ask if you want to install <tt>pcscd</tt> if
2521 that package isn't already installed, and if you plug in a USB video
2522 camera the system will ask if you want to install <tt>cheese</tt> if
2523 cheese is currently missing. This already work just fine.</p>
2524
2525 <p>But Isenkram depend on a database mapping from hardware IDs to
2526 package names. When I started no such database existed in Debian, so
2527 I made my own data set and included it with the isenkram package and
2528 made isenkram fetch the latest version of this database from git using
2529 http. This way the isenkram users would get updated package proposals
2530 as soon as I learned more about hardware related packages.</p>
2531
2532 <p>The hardware is identified using modalias strings. The modalias
2533 design is from the Linux kernel where most hardware descriptors are
2534 made available as a strings that can be matched using filename style
2535 globbing. It handle USB, PCI, DMI and a lot of other hardware related
2536 identifiers.</p>
2537
2538 <p>The downside to the Isenkram specific database is that there is no
2539 information about relevant distribution / Debian version, making
2540 isenkram propose obsolete packages too. But along came AppStream, a
2541 cross distribution mechanism to store and collect metadata about
2542 software packages. When I heard about the proposal, I contacted the
2543 people involved and suggested to add a hardware matching rule using
2544 modalias strings in the specification, to be able to use AppStream for
2545 mapping hardware to packages. This idea was accepted and AppStream is
2546 now a great way for a package to announce the hardware it support in a
2547 distribution neutral way. I wrote
2548 <a href="http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html">a
2549 recipe on how to add such meta-information</a> in a blog post last
2550 December. If you have a hardware related package in Debian, please
2551 announce the relevant hardware IDs using AppStream.</p>
2552
2553 <p>In Debian, almost all packages that can talk to a LEGO Mindestorms
2554 RCX or NXT unit, announce this support using AppStream. The effect is
2555 that when you insert such LEGO robot controller into your Debian
2556 machine, Isenkram will propose to install the packages needed to get
2557 it working. The intention is that this should allow the local user to
2558 start programming his robot controller right away without having to
2559 guess what packages to use or which permissions to fix.</p>
2560
2561 <p>But when I sat down with my son the other day to program our NXT
2562 unit using his Debian Stretch computer, I discovered something
2563 annoying. The local console user (ie my son) did not get access to
2564 the USB device for programming the unit. This used to work, but no
2565 longer in Jessie and Stretch. After some investigation and asking
2566 around on #debian-devel, I discovered that this was because udev had
2567 changed the mechanism used to grant access to local devices. The
2568 ConsoleKit mechanism from <tt>/lib/udev/rules.d/70-udev-acl.rules</tt>
2569 no longer applied, because LDAP users no longer was added to the
2570 plugdev group during login. Michael Biebl told me that this method
2571 was obsolete and the new method used ACLs instead. This was good
2572 news, as the plugdev mechanism is a mess when using a remote user
2573 directory like LDAP. Using ACLs would make sure a user lost device
2574 access when she logged out, even if the user left behind a background
2575 process which would retain the plugdev membership with the ConsoleKit
2576 setup. Armed with this knowledge I moved on to fix the access problem
2577 for the LEGO Mindstorms related packages.</p>
2578
2579 <p>The new system uses a udev tag, 'uaccess'. It can either be
2580 applied directly for a device, or is applied in
2581 /lib/udev/rules.d/70-uaccess.rules for classes of devices. As the
2582 LEGO Mindstorms udev rules did not have a class, I decided to add the
2583 tag directly in the udev rules files included in the packages. Here
2584 is one example. For the nqc C compiler for the RCX, the
2585 <tt>/lib/udev/rules.d/60-nqc.rules</tt> file now look like this:
2586
2587 <p><pre>
2588 SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0694", ATTR{idProduct}=="0001", \
2589 SYMLINK+="rcx-%k", TAG+="uaccess"
2590 </pre></p>
2591
2592 <p>The key part is the 'TAG+="uaccess"' at the end. I suspect all
2593 packages using plugdev in their /lib/udev/rules.d/ files should be
2594 changed to use this tag (either directly or indirectly via
2595 <tt>70-uaccess.rules</tt>). Perhaps a lintian check should be created
2596 to detect this?</p>
2597
2598 <p>I've been unable to find good documentation on the uaccess feature.
2599 It is unclear to me if the uaccess tag is an internal implementation
2600 detail like the udev-acl tag used by
2601 <tt>/lib/udev/rules.d/70-udev-acl.rules</tt>. If it is, I guess the
2602 indirect method is the preferred way. Michael
2603 <a href="https://github.com/systemd/systemd/issues/4288">asked for more
2604 documentation from the systemd project</a> and I hope it will make
2605 this clearer. For now I use the generic classes when they exist and
2606 is already handled by <tt>70-uaccess.rules</tt>, and add the tag
2607 directly if no such class exist.</p>
2608
2609 <p>To learn more about the isenkram system, please check out
2610 <a href="http://people.skolelinux.org/pere/blog/tags/isenkram/">my
2611 blog posts tagged isenkram</a>.</p>
2612
2613 <p>To help out making life for LEGO constructors in Debian easier,
2614 please join us on our IRC channel
2615 <a href="irc://irc.debian.org/%23debian-lego">#debian-lego</a> and join
2616 the <a href="https://alioth.debian.org/projects/debian-lego/">Debian
2617 LEGO team</a> in the Alioth project we created yesterday. A mailing
2618 list is not yet created, but we are working on it. :)</p>
2619
2620 <p>As usual, if you use Bitcoin and want to show your support of my
2621 activities, please send Bitcoin donations to my address
2622 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
2623
2624 </div>
2625 <div class="tags">
2626
2627
2628 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>, <a href="http://people.skolelinux.org/pere/blog/tags/lego">lego</a>.
2629
2630
2631 </div>
2632 </div>
2633 <div class="padding"></div>
2634
2635 <div class="entry">
2636 <div class="title">
2637 <a href="http://people.skolelinux.org/pere/blog/First_draft_Norwegian_Bokm_l_edition_of_The_Debian_Administrator_s_Handbook_now_public.html">First draft Norwegian Bokmål edition of The Debian Administrator's Handbook now public</a>
2638 </div>
2639 <div class="date">
2640 30th August 2016
2641 </div>
2642 <div class="body">
2643 <p>In April we
2644 <a href="http://people.skolelinux.org/pere/blog/Lets_make_a_Norwegian_Bokm_l_edition_of_The_Debian_Administrator_s_Handbook.html">started
2645 to work</a> on a Norwegian Bokmål edition of the "open access" book on
2646 how to set up and administrate a Debian system. Today I am happy to
2647 report that the first draft is now publicly available. You can find
2648 it on <a href="https://debian-handbook.info/get/">get the Debian
2649 Administrator's Handbook page</a> (under Other languages). The first
2650 eight chapters have a first draft translation, and we are working on
2651 proofreading the content. If you want to help out, please start
2652 contributing using
2653 <a href="https://hosted.weblate.org/projects/debian-handbook/">the
2654 hosted weblate project page</a>, and get in touch using
2655 <a href="http://lists.alioth.debian.org/mailman/listinfo/debian-handbook-translators">the
2656 translators mailing list</a>. Please also check out
2657 <a href="https://debian-handbook.info/contribute/">the instructions for
2658 contributors</a>. A good way to contribute is to proofread the text
2659 and update weblate if you find errors.</p>
2660
2661 <p>Our goal is still to make the Norwegian book available on paper as well as
2662 electronic form.</p>
2663
2664 </div>
2665 <div class="tags">
2666
2667
2668 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian-handbook">debian-handbook</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
2669
2670
2671 </div>
2672 </div>
2673 <div class="padding"></div>
2674
2675 <div class="entry">
2676 <div class="title">
2677 <a href="http://people.skolelinux.org/pere/blog/Coz_can_help_you_find_bottlenecks_in_multi_threaded_software___nice_free_software.html">Coz can help you find bottlenecks in multi-threaded software - nice free software</a>
2678 </div>
2679 <div class="date">
2680 11th August 2016
2681 </div>
2682 <div class="body">
2683 <p>This summer, I read a great article
2684 "<a href="https://www.usenix.org/publications/login/summer2016/curtsinger">coz:
2685 This Is the Profiler You're Looking For</a>" in USENIX ;login: about
2686 how to profile multi-threaded programs. It presented a system for
2687 profiling software by running experiences in the running program,
2688 testing how run time performance is affected by "speeding up" parts of
2689 the code to various degrees compared to a normal run. It does this by
2690 slowing down parallel threads while the "faster up" code is running
2691 and measure how this affect processing time. The processing time is
2692 measured using probes inserted into the code, either using progress
2693 counters (COZ_PROGRESS) or as latency meters (COZ_BEGIN/COZ_END). It
2694 can also measure unmodified code by measuring complete the program
2695 runtime and running the program several times instead.</p>
2696
2697 <p>The project and presentation was so inspiring that I would like to
2698 get the system into Debian. I
2699 <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830708">created
2700 a WNPP request for it</a> and contacted upstream to try to make the
2701 system ready for Debian by sending patches. The build process need to
2702 be changed a bit to avoid running 'git clone' to get dependencies, and
2703 to include the JavaScript web page used to visualize the collected
2704 profiling information included in the source package.
2705 But I expect that should work out fairly soon.</p>
2706
2707 <p>The way the system work is fairly simple. To run an coz experiment
2708 on a binary with debug symbols available, start the program like this:
2709
2710 <p><blockquote><pre>
2711 coz run --- program-to-run
2712 </pre></blockquote></p>
2713
2714 <p>This will create a text file profile.coz with the instrumentation
2715 information. To show what part of the code affect the performance
2716 most, use a web browser and either point it to
2717 <a href="http://plasma-umass.github.io/coz/">http://plasma-umass.github.io/coz/</a>
2718 or use the copy from git (in the gh-pages branch). Check out this web
2719 site to have a look at several example profiling runs and get an idea what the end result from the profile runs look like. To make the
2720 profiling more useful you include &lt;coz.h&gt; and insert the
2721 COZ_PROGRESS or COZ_BEGIN and COZ_END at appropriate places in the
2722 code, rebuild and run the profiler. This allow coz to do more
2723 targeted experiments.</p>
2724
2725 <p>A video published by ACM
2726 <a href="https://www.youtube.com/watch?v=jE0V-p1odPg">presenting the
2727 Coz profiler</a> is available from Youtube. There is also a paper
2728 from the 25th Symposium on Operating Systems Principles available
2729 titled
2730 <a href="https://www.usenix.org/conference/atc16/technical-sessions/presentation/curtsinger">Coz:
2731 finding code that counts with causal profiling</a>.</p>
2732
2733 <p><a href="https://github.com/plasma-umass/coz">The source code</a>
2734 for Coz is available from github. It will only build with clang
2735 because it uses a
2736 <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606">C++
2737 feature missing in GCC</a>, but I've submitted
2738 <a href="https://github.com/plasma-umass/coz/pull/67">a patch to solve
2739 it</a> and hope it will be included in the upstream source soon.</p>
2740
2741 <p>Please get in touch if you, like me, would like to see this piece
2742 of software in Debian. I would very much like some help with the
2743 packaging effort, as I lack the in depth knowledge on how to package
2744 C++ libraries.</p>
2745
2746 </div>
2747 <div class="tags">
2748
2749
2750 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software</a>.
2751
2752
2753 </div>
2754 </div>
2755 <div class="padding"></div>
2756
2757 <div class="entry">
2758 <div class="title">
2759 <a href="http://people.skolelinux.org/pere/blog/Unlocking_HTC_Desire_HD_on_Linux_using_unruu_and_fastboot.html">Unlocking HTC Desire HD on Linux using unruu and fastboot</a>
2760 </div>
2761 <div class="date">
2762 7th July 2016
2763 </div>
2764 <div class="body">
2765 <p>Yesterday, I tried to unlock a HTC Desire HD phone, and it proved
2766 to be a slight challenge. Here is the recipe if I ever need to do it
2767 again. It all started by me wanting to try the recipe to set up
2768 <a href="https://blog.torproject.org/blog/mission-impossible-hardening-android-security-and-privacy">an
2769 hardened Android installation</a> from the Tor project blog on a
2770 device I had access to. It is a old mobile phone with a broken
2771 microphone The initial idea had been to just
2772 <a href="http://wiki.cyanogenmod.org/w/Install_CM_for_ace">install
2773 CyanogenMod on it</a>, but did not quite find time to start on it
2774 until a few days ago.</p>
2775
2776 <p>The unlock process is supposed to be simple: (1) Boot into the boot
2777 loader (press volume down and power at the same time), (2) select
2778 'fastboot' before (3) connecting the device via USB to a Linux
2779 machine, (4) request the device identifier token by running 'fastboot
2780 oem get_identifier_token', (5) request the device unlocking key using
2781 the <a href="http://www.htcdev.com/bootloader/">HTC developer web
2782 site</a> and unlock the phone using the key file emailed to you.</p>
2783
2784 <p>Unfortunately, this only work fi you have hboot version 2.00.0029
2785 or newer, and the device I was working on had 2.00.0027. This
2786 apparently can be easily fixed by downloading a Windows program and
2787 running it on your Windows machine, if you accept the terms Microsoft
2788 require you to accept to use Windows - which I do not. So I had to
2789 come up with a different approach. I got a lot of help from AndyCap
2790 on #nuug, and would not have been able to get this working without
2791 him.</p>
2792
2793 <p>First I needed to extract the hboot firmware from
2794 <a href="http://www.htcdev.com/ruu/PD9810000_Ace_Sense30_S_hboot_2.00.0029.exe">the
2795 windows binary for HTC Desire HD</a> downloaded as 'the RUU' from HTC.
2796 For this there is is <a href="https://github.com/kmdm/unruu/">a github
2797 project named unruu</a> using libunshield. The unshield tool did not
2798 recognise the file format, but unruu worked and extracted rom.zip,
2799 containing the new hboot firmware and a text file describing which
2800 devices it would work for.</p>
2801
2802 <p>Next, I needed to get the new firmware into the device. For this I
2803 followed some instructions
2804 <a href="http://www.htc1guru.com/2013/09/new-ruu-zips-posted/">available
2805 from HTC1Guru.com</a>, and ran these commands as root on a Linux
2806 machine with Debian testing:</p>
2807
2808 <p><pre>
2809 adb reboot-bootloader
2810 fastboot oem rebootRUU
2811 fastboot flash zip rom.zip
2812 fastboot flash zip rom.zip
2813 fastboot reboot
2814 </pre></p>
2815
2816 <p>The flash command apparently need to be done twice to take effect,
2817 as the first is just preparations and the second one do the flashing.
2818 The adb command is just to get to the boot loader menu, so turning the
2819 device on while holding volume down and the power button should work
2820 too.</p>
2821
2822 <p>With the new hboot version in place I could start following the
2823 instructions on the HTC developer web site. I got the device token
2824 like this:</p>
2825
2826 <p><pre>
2827 fastboot oem get_identifier_token 2>&1 | sed 's/(bootloader) //'
2828 </pre>
2829
2830 <p>And once I got the unlock code via email, I could use it like
2831 this:</p>
2832
2833 <p><pre>
2834 fastboot flash unlocktoken Unlock_code.bin
2835 </pre></p>
2836
2837 <p>And with that final step in place, the phone was unlocked and I
2838 could start stuffing the software of my own choosing into the device.
2839 So far I only inserted a replacement recovery image to wipe the phone
2840 before I start. We will see what happen next. Perhaps I should
2841 install <a href="https://www.debian.org/">Debian</a> on it. :)</p>
2842
2843 </div>
2844 <div class="tags">
2845
2846
2847 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
2848
2849
2850 </div>
2851 </div>
2852 <div class="padding"></div>
2853
2854 <div class="entry">
2855 <div class="title">
2856 <a href="http://people.skolelinux.org/pere/blog/How_to_use_the_Signal_app_if_you_only_have_a_land_line__ie_no_mobile_phone_.html">How to use the Signal app if you only have a land line (ie no mobile phone)</a>
2857 </div>
2858 <div class="date">
2859 3rd July 2016
2860 </div>
2861 <div class="body">
2862 <p>For a while now, I have wanted to test
2863 <a href="https://whispersystems.org/">the Signal app</a>, as it is
2864 said to provide end to end encrypted communication and several of my
2865 friends and family are already using it. As I by choice do not own a
2866 mobile phone, this proved to be harder than expected. And I wanted to
2867 have the source of the client and know that it was the code used on my
2868 machine. But yesterday I managed to get it working. I used the
2869 Github source, compared it to the source in
2870 <a href="https://chrome.google.com/webstore/detail/signal-private-messenger/bikioccmkafdpakkkcpdbppfkghcmihk?hl=en-US">the
2871 Signal Chrome app</a> available from the Chrome web store, applied
2872 patches to use the production Signal servers, started the app and
2873 asked for the hidden "register without a smart phone" form. Here is
2874 the recipe how I did it.</p>
2875
2876 <p>First, I fetched the Signal desktop source from Github, using
2877
2878 <pre>
2879 git clone https://github.com/WhisperSystems/Signal-Desktop.git
2880 </pre>
2881
2882 <p>Next, I patched the source to use the production servers, to be
2883 able to talk to other Signal users:</p>
2884
2885 <pre>
2886 cat &lt;&lt;EOF | patch -p0
2887 diff -ur ./js/background.js userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/background.js
2888 --- ./js/background.js 2016-06-29 13:43:15.630344628 +0200
2889 +++ userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/background.js 2016-06-29 14:06:29.530300934 +0200
2890 @@ -47,8 +47,8 @@
2891 });
2892 });
2893
2894 - var SERVER_URL = 'https://textsecure-service-staging.whispersystems.org';
2895 - var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments-staging.s3.amazonaws.com';
2896 + var SERVER_URL = 'https://textsecure-service-ca.whispersystems.org:4433';
2897 + var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments.s3.amazonaws.com';
2898 var messageReceiver;
2899 window.getSocketStatus = function() {
2900 if (messageReceiver) {
2901 diff -ur ./js/expire.js userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/expire.js
2902 --- ./js/expire.js 2016-06-29 13:43:15.630344628 +0200
2903 +++ userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/expire.js2016-06-29 14:06:29.530300934 +0200
2904 @@ -1,6 +1,6 @@
2905 ;(function() {
2906 'use strict';
2907 - var BUILD_EXPIRATION = 0;
2908 + var BUILD_EXPIRATION = 1474492690000;
2909
2910 window.extension = window.extension || {};
2911
2912 EOF
2913 </pre>
2914
2915 <p>The first part is changing the servers, and the second is updating
2916 an expiration timestamp. This timestamp need to be updated regularly.
2917 It is set 90 days in the future by the build process (Gruntfile.js).
2918 The value is seconds since 1970 times 1000, as far as I can tell.</p>
2919
2920 <p>Based on a tip and good help from the #nuug IRC channel, I wrote a
2921 script to launch Signal in Chromium.</p>
2922
2923 <pre>
2924 #!/bin/sh
2925 cd $(dirname $0)
2926 mkdir -p userdata
2927 exec chromium \
2928 --proxy-server="socks://localhost:9050" \
2929 --user-data-dir=`pwd`/userdata --load-and-launch-app=`pwd`
2930 </pre>
2931
2932 <p> The script start the app and configure Chromium to use the Tor
2933 SOCKS5 proxy to make sure those controlling the Signal servers (today
2934 Amazon and Whisper Systems) as well as those listening on the lines
2935 will have a harder time location my laptop based on the Signal
2936 connections if they use source IP address.</p>
2937
2938 <p>When the script starts, one need to follow the instructions under
2939 "Standalone Registration" in the CONTRIBUTING.md file in the git
2940 repository. I right clicked on the Signal window to get up the
2941 Chromium debugging tool, visited the 'Console' tab and wrote
2942 'extension.install("standalone")' on the console prompt to get the
2943 registration form. Then I entered by land line phone number and
2944 pressed 'Call'. 5 seconds later the phone rang and a robot voice
2945 repeated the verification code three times. After entering the number
2946 into the verification code field in the form, I could start using
2947 Signal from my laptop.
2948
2949 <p>As far as I can tell, The Signal app will leak who is talking to
2950 whom and thus who know who to those controlling the central server,
2951 but such leakage is hard to avoid with a centrally controlled server
2952 setup. It is something to keep in mind when using Signal - the
2953 content of your chats are harder to intercept, but the meta data
2954 exposing your contact network is available to people you do not know.
2955 So better than many options, but not great. And sadly the usage is
2956 connected to my land line, thus allowing those controlling the server
2957 to associate it to my home and person. I would prefer it if only
2958 those I knew could tell who I was on Signal. There are options
2959 avoiding such information leakage, but most of my friends are not
2960 using them, so I am stuck with Signal for now.</p>
2961
2962 <p><strong>Update 2017-01-10</strong>: There is an updated blog post
2963 on this topic in
2964 <a href="http://people.skolelinux.org/pere/blog/Experience_and_updated_recipe_for_using_the_Signal_app_without_a_mobile_phone.html">Experience
2965 and updated recipe for using the Signal app without a mobile
2966 phone</a>.</p>
2967
2968 </div>
2969 <div class="tags">
2970
2971
2972 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
2973
2974
2975 </div>
2976 </div>
2977 <div class="padding"></div>
2978
2979 <div class="entry">
2980 <div class="title">
2981 <a href="http://people.skolelinux.org/pere/blog/The_new__best__multimedia_player_in_Debian_.html">The new "best" multimedia player in Debian?</a>
2982 </div>
2983 <div class="date">
2984 6th June 2016
2985 </div>
2986 <div class="body">
2987 <p>When I set out a few weeks ago to figure out
2988 <a href="http://people.skolelinux.org/pere/blog/What_is_the_best_multimedia_player_in_Debian_.html">which
2989 multimedia player in Debian claimed to support most file formats /
2990 MIME types</a>, I was a bit surprised how varied the sets of MIME types
2991 the various players claimed support for. The range was from 55 to 130
2992 MIME types. I suspect most media formats are supported by all
2993 players, but this is not really reflected in the MimeTypes values in
2994 their desktop files. There are probably also some bogus MIME types
2995 listed, but it is hard to identify which one this is.</p>
2996
2997 <p>Anyway, in the mean time I got in touch with upstream for some of
2998 the players suggesting to add more MIME types to their desktop files,
2999 and decided to spend some time myself improving the situation for my
3000 favorite media player VLC. The fixes for VLC entered Debian unstable
3001 yesterday. The complete list of MIME types can be seen on the
3002 <a href="https://wiki.debian.org/DebianMultimedia/PlayerSupport">Multimedia
3003 player MIME type support status</a> Debian wiki page.</p>
3004
3005 <p>The new "best" multimedia player in Debian? It is VLC, followed by
3006 totem, parole, kplayer, gnome-mpv, mpv, smplayer, mplayer-gui and
3007 kmplayer. I am sure some of the other players desktop files support
3008 several of the formats currently listed as working only with vlc,
3009 toten and parole.</p>
3010
3011 <p>A sad observation is that only 14 MIME types are listed as
3012 supported by all the tested multimedia players in Debian in their
3013 desktop files: audio/mpeg, audio/vnd.rn-realaudio, audio/x-mpegurl,
3014 audio/x-ms-wma, audio/x-scpls, audio/x-wav, video/mp4, video/mpeg,
3015 video/quicktime, video/vnd.rn-realvideo, video/x-matroska,
3016 video/x-ms-asf, video/x-ms-wmv and video/x-msvideo. Personally I find
3017 it sad that video/ogg and video/webm is not supported by all the media
3018 players in Debian. As far as I can tell, all of them can handle both
3019 formats.</p>
3020
3021 </div>
3022 <div class="tags">
3023
3024
3025 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
3026
3027
3028 </div>
3029 </div>
3030 <div class="padding"></div>
3031
3032 <div class="entry">
3033 <div class="title">
3034 <a href="http://people.skolelinux.org/pere/blog/A_program_should_be_able_to_open_its_own_files_on_Linux.html">A program should be able to open its own files on Linux</a>
3035 </div>
3036 <div class="date">
3037 5th June 2016
3038 </div>
3039 <div class="body">
3040 <p>Many years ago, when koffice was fresh and with few users, I
3041 decided to test its presentation tool when making the slides for a
3042 talk I was giving for NUUG on Japhar, a free Java virtual machine. I
3043 wrote the first draft of the slides, saved the result and went to bed
3044 the day before I would give the talk. The next day I took a plane to
3045 the location where the meeting should take place, and on the plane I
3046 started up koffice again to polish the talk a bit, only to discover
3047 that kpresenter refused to load its own data file. I cursed a bit and
3048 started making the slides again from memory, to have something to
3049 present when I arrived. I tested that the saved files could be
3050 loaded, and the day seemed to be rescued. I continued to polish the
3051 slides until I suddenly discovered that the saved file could no longer
3052 be loaded into kpresenter. In the end I had to rewrite the slides
3053 three times, condensing the content until the talk became shorter and
3054 shorter. After the talk I was able to pinpoint the problem &ndash;
3055 kpresenter wrote inline images in a way itself could not understand.
3056 Eventually that bug was fixed and kpresenter ended up being a great
3057 program to make slides. The point I'm trying to make is that we
3058 expect a program to be able to load its own data files, and it is
3059 embarrassing to its developers if it can't.</p>
3060
3061 <p>Did you ever experience a program failing to load its own data
3062 files from the desktop file browser? It is not a uncommon problem. A
3063 while back I discovered that the screencast recorder
3064 gtk-recordmydesktop would save an Ogg Theora video file the KDE file
3065 browser would refuse to open. No video player claimed to understand
3066 such file. I tracked down the cause being <tt>file --mime-type</tt>
3067 returning the application/ogg MIME type, which no video player I had
3068 installed listed as a MIME type they would understand. I asked for
3069 <a href="http://bugs.gw.com/view.php?id=382">file to change its
3070 behavour</a> and use the MIME type video/ogg instead. I also asked
3071 several video players to add video/ogg to their desktop files, to give
3072 the file browser an idea what to do about Ogg Theora files. After a
3073 while, the desktop file browsers in Debian started to handle the
3074 output from gtk-recordmydesktop properly.</p>
3075
3076 <p>But history repeats itself. A few days ago I tested the music
3077 system Rosegarden again, and I discovered that the KDE and xfce file
3078 browsers did not know what to do with the Rosegarden project files
3079 (*.rg). I've reported <a href="http://bugs.debian.org/825993">the
3080 rosegarden problem to BTS</a> and a fix is commited to git and will be
3081 included in the next upload. To increase the chance of me remembering
3082 how to fix the problem next time some program fail to load its files
3083 from the file browser, here are some notes on how to fix it.</p>
3084
3085 <p>The file browsers in Debian in general operates on MIME types.
3086 There are two sources for the MIME type of a given file. The output from
3087 <tt>file --mime-type</tt> mentioned above, and the content of the
3088 shared MIME type registry (under /usr/share/mime/). The file MIME
3089 type is mapped to programs supporting the MIME type, and this
3090 information is collected from
3091 <a href="https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/">the
3092 desktop files</a> available in /usr/share/applications/. If there is
3093 one desktop file claiming support for the MIME type of the file, it is
3094 activated when asking to open a given file. If there are more, one
3095 can normally select which one to use by right-clicking on the file and
3096 selecting the wanted one using 'Open with' or similar. In general
3097 this work well. But it depend on each program picking a good MIME
3098 type (preferably
3099 <a href="http://www.iana.org/assignments/media-types/media-types.xhtml">a
3100 MIME type registered with IANA</a>), file and/or the shared MIME
3101 registry recognizing the file and the desktop file to list the MIME
3102 type in its list of supported MIME types.</p>
3103
3104 <p>The <tt>/usr/share/mime/packages/rosegarden.xml</tt> entry for
3105 <a href="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec">the
3106 Shared MIME database</a> look like this:</p>
3107
3108 <p><blockquote><pre>
3109 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
3110 &lt;mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"&gt;
3111 &lt;mime-type type="audio/x-rosegarden"&gt;
3112 &lt;sub-class-of type="application/x-gzip"/&gt;
3113 &lt;comment&gt;Rosegarden project file&lt;/comment&gt;
3114 &lt;glob pattern="*.rg"/&gt;
3115 &lt;/mime-type&gt;
3116 &lt;/mime-info&gt;
3117 </pre></blockquote></p>
3118
3119 <p>This states that audio/x-rosegarden is a kind of application/x-gzip
3120 (it is a gzipped XML file). Note, it is much better to use an
3121 official MIME type registered with IANA than it is to make up ones own
3122 unofficial ones like the x-rosegarden type used by rosegarden.</p>
3123
3124 <p>The desktop file of the rosegarden program failed to list
3125 audio/x-rosegarden in its list of supported MIME types, causing the
3126 file browsers to have no idea what to do with *.rg files:</p>
3127
3128 <p><blockquote><pre>
3129 % grep Mime /usr/share/applications/rosegarden.desktop
3130 MimeType=audio/x-rosegarden-composition;audio/x-rosegarden-device;audio/x-rosegarden-project;audio/x-rosegarden-template;audio/midi;
3131 X-KDE-NativeMimeType=audio/x-rosegarden-composition
3132 %
3133 </pre></blockquote></p>
3134
3135 <p>The fix was to add "audio/x-rosegarden;" at the end of the
3136 MimeType= line.</p>
3137
3138 <p>If you run into a file which fail to open the correct program when
3139 selected from the file browser, please check out the output from
3140 <tt>file --mime-type</tt> for the file, ensure the file ending and
3141 MIME type is registered somewhere under /usr/share/mime/ and check
3142 that some desktop file under /usr/share/applications/ is claiming
3143 support for this MIME type. If not, please report a bug to have it
3144 fixed. :)</p>
3145
3146 </div>
3147 <div class="tags">
3148
3149
3150 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3151
3152
3153 </div>
3154 </div>
3155 <div class="padding"></div>
3156
3157 <div class="entry">
3158 <div class="title">
3159 <a href="http://people.skolelinux.org/pere/blog/Isenkram_with_PackageKit_support___new_version_0_23_available_in_Debian_unstable.html">Isenkram with PackageKit support - new version 0.23 available in Debian unstable</a>
3160 </div>
3161 <div class="date">
3162 25th May 2016
3163 </div>
3164 <div class="body">
3165 <p><a href="https://tracker.debian.org/pkg/isenkram">The isenkram
3166 system</a> is a user-focused solution in Debian for handling hardware
3167 related packages. The idea is to have a database of mappings between
3168 hardware and packages, and pop up a dialog suggesting for the user to
3169 install the packages to use a given hardware dongle. Some use cases
3170 are when you insert a Yubikey, it proposes to install the software
3171 needed to control it; when you insert a braille reader list it
3172 proposes to install the packages needed to send text to the reader;
3173 and when you insert a ColorHug screen calibrator it suggests to
3174 install the driver for it. The system work well, and even have a few
3175 command line tools to install firmware packages and packages for the
3176 hardware already in the machine (as opposed to hotpluggable hardware).</p>
3177
3178 <p>The system was initially written using aptdaemon, because I found
3179 good documentation and example code on how to use it. But aptdaemon
3180 is going away and is generally being replaced by
3181 <a href="http://www.freedesktop.org/software/PackageKit/">PackageKit</a>,
3182 so Isenkram needed a rewrite. And today, thanks to the great patch
3183 from my college Sunil Mohan Adapa in the FreedomBox project, the
3184 rewrite finally took place. I've just uploaded a new version of
3185 Isenkram into Debian Unstable with the patch included, and the default
3186 for the background daemon is now to use PackageKit. To check it out,
3187 install the <tt>isenkram</tt> package and insert some hardware dongle
3188 and see if it is recognised.</p>
3189
3190 <p>If you want to know what kind of packages isenkram would propose for
3191 the machine it is running on, you can check out the isenkram-lookup
3192 program. This is what it look like on a Thinkpad X230:</p>
3193
3194 <p><blockquote><pre>
3195 % isenkram-lookup
3196 bluez
3197 cheese
3198 fprintd
3199 fprintd-demo
3200 gkrellm-thinkbat
3201 hdapsd
3202 libpam-fprintd
3203 pidgin-blinklight
3204 thinkfan
3205 tleds
3206 tp-smapi-dkms
3207 tp-smapi-source
3208 tpb
3209 %p
3210 </pre></blockquote></p>
3211
3212 <p>The hardware mappings come from several places. The preferred way
3213 is for packages to announce their hardware support using
3214 <a href="https://www.freedesktop.org/software/appstream/docs/">the
3215 cross distribution appstream system</a>.
3216 See
3217 <a href="http://people.skolelinux.org/pere/blog/tags/isenkram/">previous
3218 blog posts about isenkram</a> to learn how to do that.</p>
3219
3220 </div>
3221 <div class="tags">
3222
3223
3224 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
3225
3226
3227 </div>
3228 </div>
3229 <div class="padding"></div>
3230
3231 <div class="entry">
3232 <div class="title">
3233 <a href="http://people.skolelinux.org/pere/blog/Discharge_rate_estimate_in_new_battery_statistics_collector_for_Debian.html">Discharge rate estimate in new battery statistics collector for Debian</a>
3234 </div>
3235 <div class="date">
3236 23rd May 2016
3237 </div>
3238 <div class="body">
3239 <p>Yesterday I updated the
3240 <a href="https://tracker.debian.org/pkg/battery-stats">battery-stats
3241 package in Debian</a> with a few patches sent to me by skilled and
3242 enterprising users. There were some nice user and visible changes.
3243 First of all, both desktop menu entries now work. A design flaw in
3244 one of the script made the history graph fail to show up (its PNG was
3245 dumped in ~/.xsession-errors) if no controlling TTY was available.
3246 The script worked when called from the command line, but not when
3247 called from the desktop menu. I changed this to look for a DISPLAY
3248 variable or a TTY before deciding where to draw the graph, and now the
3249 graph window pop up as expected.</p>
3250
3251 <p>The next new feature is a discharge rate estimator in one of the
3252 graphs (the one showing the last few hours). New is also the user of
3253 colours showing charging in blue and discharge in red. The percentages
3254 of this graph is relative to last full charge, not battery design
3255 capacity.</p>
3256
3257 <p align="center"><img src="http://people.skolelinux.org/pere/blog/images/2016-05-23-battery-stats-rate.png"/></p>
3258
3259 <p>The other graph show the entire history of the collected battery
3260 statistics, comparing it to the design capacity of the battery to
3261 visualise how the battery life time get shorter over time. The red
3262 line in this graph is what the previous graph considers 100 percent:
3263
3264 <p align="center"><img src="http://people.skolelinux.org/pere/blog/images/2016-05-23-battery-stats-history.png"/></p>
3265
3266 <p>In this graph you can see that I only charge the battery to 80
3267 percent of last full capacity, and how the capacity of the battery is
3268 shrinking. :(</p>
3269
3270 <p>The last new feature is in the collector, which now will handle
3271 more hardware models. On some hardware, Linux power supply
3272 information is stored in /sys/class/power_supply/ACAD/, while the
3273 collector previously only looked in /sys/class/power_supply/AC/. Now
3274 both are checked to figure if there is power connected to the
3275 machine.</p>
3276
3277 <p>If you are interested in how your laptop battery is doing, please
3278 check out the
3279 <a href="https://tracker.debian.org/pkg/battery-stats">battery-stats</a>
3280 in Debian unstable, or rebuild it on Jessie to get it working on
3281 Debian stable. :) The upstream source is available from <a
3282 href="https://github.com/petterreinholdtsen/battery-stats">github</a>.
3283 Patches are very welcome.</p>
3284
3285 <p>As usual, if you use Bitcoin and want to show your support of my
3286 activities, please send Bitcoin donations to my address
3287 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
3288
3289 </div>
3290 <div class="tags">
3291
3292
3293 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3294
3295
3296 </div>
3297 </div>
3298 <div class="padding"></div>
3299
3300 <div class="entry">
3301 <div class="title">
3302 <a href="http://people.skolelinux.org/pere/blog/Debian_now_with_ZFS_on_Linux_included.html">Debian now with ZFS on Linux included</a>
3303 </div>
3304 <div class="date">
3305 12th May 2016
3306 </div>
3307 <div class="body">
3308 <p>Today, after many years of hard work from many people,
3309 <a href="http://zfsonlinux.org/">ZFS for Linux</a> finally entered
3310 Debian. The package status can be seen on
3311 <a href="https://tracker.debian.org/pkg/zfs-linux">the package tracker
3312 for zfs-linux</a>. and
3313 <a href="https://qa.debian.org/developer.php?login=pkg-zfsonlinux-devel@lists.alioth.debian.org">the
3314 team status page</a>. If you want to help out, please join us.
3315 <a href="http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/zfs.git">The
3316 source code</a> is available via git on Alioth. It would also be
3317 great if you could help out with
3318 <a href="https://tracker.debian.org/pkg/dkms">the dkms package</a>, as
3319 it is an important piece of the puzzle to get ZFS working.</p>
3320
3321 </div>
3322 <div class="tags">
3323
3324
3325 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3326
3327
3328 </div>
3329 </div>
3330 <div class="padding"></div>
3331
3332 <div class="entry">
3333 <div class="title">
3334 <a href="http://people.skolelinux.org/pere/blog/What_is_the_best_multimedia_player_in_Debian_.html">What is the best multimedia player in Debian?</a>
3335 </div>
3336 <div class="date">
3337 8th May 2016
3338 </div>
3339 <div class="body">
3340 <p><strong>Where I set out to figure out which multimedia player in
3341 Debian claim support for most file formats.</strong></p>
3342
3343 <p>A few years ago, I had a look at the media support for Browser
3344 plugins in Debian, to get an idea which plugins to include in Debian
3345 Edu. I created a script to extract the set of supported MIME types
3346 for each plugin, and used this to find out which multimedia browser
3347 plugin supported most file formats / media types.
3348 <a href="https://wiki.debian.org/DebianEdu/BrowserMultimedia">The
3349 result</a> can still be seen on the Debian wiki, even though it have
3350 not been updated for a while. But browser plugins are less relevant
3351 these days, so I thought it was time to look at standalone
3352 players.</p>
3353
3354 <p>A few days ago I was tired of VLC not being listed as a viable
3355 player when I wanted to play videos from the Norwegian National
3356 Broadcasting Company, and decided to investigate why. The cause is a
3357 <a href="https://bugs.debian.org/822245">missing MIME type in the VLC
3358 desktop file</a>. In the process I wrote a script to compare the set
3359 of MIME types announced in the desktop file and the browser plugin,
3360 only to discover that there is quite a large difference between the
3361 two for VLC. This discovery made me dig up the script I used to
3362 compare browser plugins, and adjust it to compare desktop files
3363 instead, to try to figure out which multimedia player in Debian
3364 support most file formats.</p>
3365
3366 <p>The result can be seen on the Debian Wiki, as
3367 <a href="https://wiki.debian.org/DebianMultimedia/PlayerSupport">a
3368 table listing all MIME types supported by one of the packages included
3369 in the table</a>, with the package supporting most MIME types being
3370 listed first in the table.</p>
3371
3372 </p>The best multimedia player in Debian? It is totem, followed by
3373 parole, kplayer, mpv, vlc, smplayer mplayer-gui gnome-mpv and
3374 kmplayer. Time for the other players to update their announced MIME
3375 support?</p>
3376
3377 </div>
3378 <div class="tags">
3379
3380
3381 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
3382
3383
3384 </div>
3385 </div>
3386 <div class="padding"></div>
3387
3388 <div class="entry">
3389 <div class="title">
3390 <a href="http://people.skolelinux.org/pere/blog/The_Pyra___handheld_computer_with_Debian_preinstalled.html">The Pyra - handheld computer with Debian preinstalled</a>
3391 </div>
3392 <div class="date">
3393 4th May 2016
3394 </div>
3395 <div class="body">
3396 A friend of mine made me aware of
3397 <a href="https://pyra-handheld.com/boards/pages/pyra/">The Pyra</a>, a
3398 handheld computer which will be delivered with Debian preinstalled. I
3399 would love to get one of those for my birthday. :)</p>
3400
3401 <p>The machine is a complete ARM-based PC with micro HDMI, SATA, USB
3402 plugs and many others connectors, and include a full keyboard and a 5"
3403 LCD touch screen. The 6000mAh battery is claimed to provide a whole
3404 day of battery life time, but I have not seen any independent tests
3405 confirming this. The vendor is still collecting preorders, and the
3406 last I heard last night was that 22 more orders were needed before
3407 production started.</p>
3408
3409 <p>As far as I know, this is the first handheld preinstalled with
3410 Debian. Please let me know if you know of any others. Is it the
3411 first computer being sold with Debian preinstalled?</p>
3412
3413 </div>
3414 <div class="tags">
3415
3416
3417 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3418
3419
3420 </div>
3421 </div>
3422 <div class="padding"></div>
3423
3424 <div class="entry">
3425 <div class="title">
3426 <a href="http://people.skolelinux.org/pere/blog/Lets_make_a_Norwegian_Bokm_l_edition_of_The_Debian_Administrator_s_Handbook.html">Lets make a Norwegian Bokmål edition of The Debian Administrator's Handbook</a>
3427 </div>
3428 <div class="date">
3429 10th April 2016
3430 </div>
3431 <div class="body">
3432 <p>During this weekends
3433 <a href="http://www.nuug.no/news/Oslo__Takk_for_feilfiksingsfesten.shtml">bug
3434 squashing party and developer gathering</a>, we decided to do our part
3435 to make sure there are good books about Debian available in Norwegian
3436 Bokmål, and got in touch with the people behind the
3437 <a href="http://debian-handbook.info/">Debian Administrator's Handbook
3438 project</a> to get started. If you want to help out, please start
3439 contributing using
3440 <a href="https://hosted.weblate.org/projects/debian-handbook/">the
3441 hosted weblate project page</a>, and get in touch using
3442 <a href="http://lists.alioth.debian.org/mailman/listinfo/debian-handbook-translators">the
3443 translators mailing list</a>. Please also check out
3444 <a href="https://debian-handbook.info/contribute/">the instructions for
3445 contributors</a>.</p>
3446
3447 <p>The book is already available on paper in English, French and
3448 Japanese, and our goal is to get it available on paper in Norwegian
3449 Bokmål too. In addition to the paper edition, there are also EPUB and
3450 Mobi versions available. And there are incomplete translations
3451 available for many more languages.</p>
3452
3453 </div>
3454 <div class="tags">
3455
3456
3457 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian-handbook">debian-handbook</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3458
3459
3460 </div>
3461 </div>
3462 <div class="padding"></div>
3463
3464 <div class="entry">
3465 <div class="title">
3466 <a href="http://people.skolelinux.org/pere/blog/One_in_two_hundred_Debian_users_using_ZFS_on_Linux_.html">One in two hundred Debian users using ZFS on Linux?</a>
3467 </div>
3468 <div class="date">
3469 7th April 2016
3470 </div>
3471 <div class="body">
3472 <p>Just for fun I had a look at the popcon number of ZFS related
3473 packages in Debian, and was quite surprised with what I found. I use
3474 ZFS myself at home, but did not really expect many others to do so.
3475 But I might be wrong.</p>
3476
3477 <p>According to
3478 <a href="https://qa.debian.org/popcon.php?package=spl-linux">the popcon
3479 results for spl-linux</a>, there are 1019 Debian installations, or
3480 0.53% of the population, with the package installed. As far as I know
3481 the only use of the spl-linux package is as a support library for ZFS
3482 on Linux, so I use it here as proxy for measuring the number of ZFS
3483 installation on Linux in Debian. In the kFreeBSD variant of Debian
3484 the ZFS feature is already available, and there
3485 <a href="https://qa.debian.org/popcon.php?package=zfsutils">the popcon
3486 results for zfsutils</a> show 1625 Debian installations or 0.84% of
3487 the population. So I guess I am not alone in using ZFS on Debian.</p>
3488
3489 <p>But even though the Debian project leader Lucas Nussbaum
3490 <a href="https://lists.debian.org/debian-devel-announce/2015/04/msg00006.html">announced
3491 in April 2015</a> that the legal obstacles blocking ZFS on Debian were
3492 cleared, the package is still not in Debian. The package is again in
3493 the NEW queue. Several uploads have been rejected so far because the
3494 debian/copyright file was incomplete or wrong, but there is no reason
3495 to give up. The current status can be seen on
3496 <a href="https://qa.debian.org/developer.php?login=pkg-zfsonlinux-devel@lists.alioth.debian.org">the
3497 team status page</a>, and
3498 <a href="http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/zfs.git">the
3499 source code</a> is available on Alioth.</p>
3500
3501 <p>As I want ZFS to be included in next version of Debian to make sure
3502 my home server can function in the future using only official Debian
3503 packages, and the current blocker is to get the debian/copyright file
3504 accepted by the FTP masters in Debian, I decided a while back to try
3505 to help out the team. This was the background for my blog post about
3506 <a href="http://people.skolelinux.org/pere/blog/Creating__updating_and_checking_debian_copyright_semi_automatically.html">creating,
3507 updating and checking debian/copyright semi-automatically</a>, and I
3508 used the techniques I explored there to try to find any errors in the
3509 copyright file. It is not very easy to check every one of the around
3510 2000 files in the source package, but I hope we this time got it
3511 right. If you want to help out, check out the git source and try to
3512 find missing entries in the debian/copyright file.</p>
3513
3514 </div>
3515 <div class="tags">
3516
3517
3518 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3519
3520
3521 </div>
3522 </div>
3523 <div class="padding"></div>
3524
3525 <div class="entry">
3526 <div class="title">
3527 <a href="http://people.skolelinux.org/pere/blog/Full_battery_stats_collector_is_now_available_in_Debian.html">Full battery stats collector is now available in Debian</a>
3528 </div>
3529 <div class="date">
3530 23rd March 2016
3531 </div>
3532 <div class="body">
3533 <p>Since this morning, the battery-stats package in Debian include an
3534 extended collector that will collect the complete battery history for
3535 later processing and graphing. The original collector store the
3536 battery level as percentage of last full level, while the new
3537 collector also record battery vendor, model, serial number, design
3538 full level, last full level and current battery level. This make it
3539 possible to predict the lifetime of the battery as well as visualise
3540 the energy flow when the battery is charging or discharging.</p>
3541
3542 <p>The new tools are available in <tt>/usr/share/battery-stats/</tt>
3543 in the version 0.5.1 package in unstable. Get the new battery level graph
3544 and lifetime prediction by running:
3545
3546 <p><pre>
3547 /usr/share/battery-stats/battery-stats-graph /var/log/battery-stats.csv
3548 </pre></p>
3549
3550 <p>Or select the 'Battery Level Graph' from your application menu.</p>
3551
3552 <p>The flow in/out of the battery can be seen by running (no menu
3553 entry yet):</p>
3554
3555 <p><pre>
3556 /usr/share/battery-stats/battery-stats-graph-flow
3557 </pre></p>
3558
3559 <p>I'm not quite happy with the way the data is visualised, at least
3560 when there are few data points. The graphs look a bit better with a
3561 few years of data.</p>
3562
3563 <p>A while back one important feature I use in the battery stats
3564 collector broke in Debian. The scripts in
3565 <tt>/usr/lib/pm-utils/power.d/</tt> were no longer executed. I
3566 suspect it happened when Jessie started using systemd, but I do not
3567 know. The issue is reported as
3568 <a href="https://bugs.debian.org/818649">bug #818649</a> against
3569 pm-utils. I managed to work around it by adding an udev rule to call
3570 the collector script every time the power connector is connected and
3571 disconnected. With this fix in place it was finally time to make a
3572 new release of the package, and get it into Debian.</p>
3573
3574 <p>If you are interested in how your laptop battery is doing, please
3575 check out the
3576 <a href="https://tracker.debian.org/pkg/battery-stats">battery-stats</a>
3577 in Debian unstable, or rebuild it on Jessie to get it working on
3578 Debian stable. :) The upstream source is available from
3579 <a href="https://github.com/petterreinholdtsen/battery-stats">github</a>.
3580 As always, patches are very welcome.</p>
3581
3582 </div>
3583 <div class="tags">
3584
3585
3586 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3587
3588
3589 </div>
3590 </div>
3591 <div class="padding"></div>
3592
3593 <div class="entry">
3594 <div class="title">
3595 <a href="http://people.skolelinux.org/pere/blog/Making_battery_measurements_a_little_easier_in_Debian.html">Making battery measurements a little easier in Debian</a>
3596 </div>
3597 <div class="date">
3598 15th March 2016
3599 </div>
3600 <div class="body">
3601 <p>Back in September, I blogged about
3602 <a href="http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html">the
3603 system I wrote to collect statistics about my laptop battery</a>, and
3604 how it showed the decay and death of this battery (now replaced). I
3605 created a simple deb package to handle the collection and graphing,
3606 but did not want to upload it to Debian as there were already
3607 <a href="https://tracker.debian.org/pkg/battery-stats">a battery-stats
3608 package in Debian</a> that should do the same thing, and I did not see
3609 a point of uploading a competing package when battery-stats could be
3610 fixed instead. I reported a few bugs about its non-function, and
3611 hoped someone would step in and fix it. But no-one did.</p>
3612
3613 <p>I got tired of waiting a few days ago, and took matters in my own
3614 hands. The end result is that I am now the new upstream developer of
3615 battery stats (<a href="https://github.com/petterreinholdtsen/battery-stats">available from github</a>) and part of the team maintaining
3616 battery-stats in Debian, and the package in Debian unstable is finally
3617 able to collect battery status using the <tt>/sys/class/power_supply/</tt>
3618 information provided by the Linux kernel. If you install the
3619 battery-stats package from unstable now, you will be able to get a
3620 graph of the current battery fill level, to get some idea about the
3621 status of the battery. The source package build and work just fine in
3622 Debian testing and stable (and probably oldstable too, but I have not
3623 tested). The default graph you get for that system look like this:</p>
3624
3625 <p align="center"><img src="http://people.skolelinux.org/pere/blog/images/2016-03-15-battery-stats-graph-example.png" width="70%" align="center"></p>
3626
3627 <p>My plans for the future is to merge my old scripts into the
3628 battery-stats package, as my old scripts collected a lot more details
3629 about the battery. The scripts are merged into the upstream
3630 battery-stats git repository already, but I am not convinced they work
3631 yet, as I changed a lot of paths along the way. Will have to test a
3632 bit more before I make a new release.</p>
3633
3634 <p>I will also consider changing the file format slightly, as I
3635 suspect the way I combine several values into one field might make it
3636 impossible to know the type of the value when using it for processing
3637 and graphing.</p>
3638
3639 <p>If you would like I would like to keep an close eye on your laptop
3640 battery, check out the battery-stats package in
3641 <a href="https://tracker.debian.org/pkg/battery-stats">Debian</a> and
3642 on
3643 <a href="https://github.com/petterreinholdtsen/battery-stats">github</a>.
3644 I would love some help to improve the system further.</p>
3645
3646 </div>
3647 <div class="tags">
3648
3649
3650 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3651
3652
3653 </div>
3654 </div>
3655 <div class="padding"></div>
3656
3657 <div class="entry">
3658 <div class="title">
3659 <a href="http://people.skolelinux.org/pere/blog/Creating__updating_and_checking_debian_copyright_semi_automatically.html">Creating, updating and checking debian/copyright semi-automatically</a>
3660 </div>
3661 <div class="date">
3662 19th February 2016
3663 </div>
3664 <div class="body">
3665 <p>Making packages for Debian requires quite a lot of attention to
3666 details. And one of the details is the content of the
3667 debian/copyright file, which should list all relevant licenses used by
3668 the code in the package in question, preferably in
3669 <a href="https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/">machine
3670 readable DEP5 format</a>.</p>
3671
3672 <p>For large packages with lots of contributors it is hard to write
3673 and update this file manually, and if you get some detail wrong, the
3674 package is normally rejected by the ftpmasters. So getting it right
3675 the first time around get the package into Debian faster, and save
3676 both you and the ftpmasters some work.. Today, while trying to figure
3677 out what was wrong with
3678 <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686447">the
3679 zfsonlinux copyright file</a>, I decided to spend some time on
3680 figuring out the options for doing this job automatically, or at least
3681 semi-automatically.</p>
3682
3683 <p>Lucikly, there are at least two tools available for generating the
3684 file based on the code in the source package,
3685 <tt><a href="https://tracker.debian.org/pkg/debmake">debmake</a></tt>
3686 and <tt><a href="https://tracker.debian.org/pkg/cme">cme</a></tt>. I'm
3687 not sure which one of them came first, but both seem to be able to
3688 create a sensible draft file. As far as I can tell, none of them can
3689 be trusted to get the result just right, so the content need to be
3690 polished a bit before the file is OK to upload. I found the debmake
3691 option in
3692 <a href="http://goofying-with-debian.blogspot.com/2014/07/debmake-checking-source-against-dep-5.html">a
3693 blog posts from 2014</a>.
3694
3695 <p>To generate using debmake, use the -cc option:
3696
3697 <p><pre>
3698 debmake -cc > debian/copyright
3699 </pre></p>
3700
3701 <p>Note there are some problems with python and non-ASCII names, so
3702 this might not be the best option.</p>
3703
3704 <p>The cme option is based on a config parsing library, and I found
3705 this approach in
3706 <a href="https://ddumont.wordpress.com/2015/04/05/improving-creation-of-debian-copyright-file/">a
3707 blog post from 2015</a>. To generate using cme, use the 'update
3708 dpkg-copyright' option:
3709
3710 <p><pre>
3711 cme update dpkg-copyright
3712 </pre></p>
3713
3714 <p>This will create or update debian/copyright. The cme tool seem to
3715 handle UTF-8 names better than debmake.</p>
3716
3717 <p>When the copyright file is created, I would also like some help to
3718 check if the file is correct. For this I found two good options,
3719 <tt>debmake -k</tt> and <tt>license-reconcile</tt>. The former seem
3720 to focus on license types and file matching, and is able to detect
3721 ineffective blocks in the copyright file. The latter reports missing
3722 copyright holders and years, but was confused by inconsistent license
3723 names (like CDDL vs. CDDL-1.0). I suspect it is good to use both and
3724 fix all issues reported by them before uploading. But I do not know
3725 if the tools and the ftpmasters agree on what is important to fix in a
3726 copyright file, so the package might still be rejected.</p>
3727
3728 <p>The devscripts tool <tt>licensecheck</tt> deserve mentioning. It
3729 will read through the source and try to find all copyright statements.
3730 It is not comparing the result to the content of debian/copyright, but
3731 can be useful when verifying the content of the copyright file.</p>
3732
3733 <p>Are you aware of better tools in Debian to create and update
3734 debian/copyright file. Please let me know, or blog about it on
3735 planet.debian.org.</p>
3736
3737 <p>As usual, if you use Bitcoin and want to show your support of my
3738 activities, please send Bitcoin donations to my address
3739 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
3740
3741 <p><strong>Update 2016-02-20</strong>: I got a tip from Mike Gabriel
3742 on how to use licensecheck and cdbs to create a draft copyright file
3743
3744 <p><pre>
3745 licensecheck --copyright -r `find * -type f` | \
3746 /usr/lib/cdbs/licensecheck2dep5 > debian/copyright.auto
3747 </pre></p>
3748
3749 <p>He mentioned that he normally check the generated file into the
3750 version control system to make it easier to discover license and
3751 copyright changes in the upstream source. I will try to do the same
3752 with my packages in the future.</p>
3753
3754 <p><strong>Update 2016-02-21</strong>: The cme author recommended
3755 against using -quiet for new users, so I removed it from the proposed
3756 command line.</p>
3757
3758 </div>
3759 <div class="tags">
3760
3761
3762 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3763
3764
3765 </div>
3766 </div>
3767 <div class="padding"></div>
3768
3769 <div class="entry">
3770 <div class="title">
3771 <a href="http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html">Using appstream in Debian to locate packages with firmware and mime type support</a>
3772 </div>
3773 <div class="date">
3774 4th February 2016
3775 </div>
3776 <div class="body">
3777 <p>The <a href="https://wiki.debian.org/DEP-11">appstream system</a>
3778 is taking shape in Debian, and one provided feature is a very
3779 convenient way to tell you which package to install to make a given
3780 firmware file available when the kernel is looking for it. This can
3781 be done using apt-file too, but that is for someone else to blog
3782 about. :)</p>
3783
3784 <p>Here is a small recipe to find the package with a given firmware
3785 file, in this example I am looking for ctfw-3.2.3.0.bin, randomly
3786 picked from the set of firmware announced using appstream in Debian
3787 unstable. In general you would be looking for the firmware requested
3788 by the kernel during kernel module loading. To find the package
3789 providing the example file, do like this:</p>
3790
3791 <blockquote><pre>
3792 % apt install appstream
3793 [...]
3794 % apt update
3795 [...]
3796 % appstreamcli what-provides firmware:runtime ctfw-3.2.3.0.bin | \
3797 awk '/Package:/ {print $2}'
3798 firmware-qlogic
3799 %
3800 </pre></blockquote>
3801
3802 <p>See <a href="https://wiki.debian.org/AppStream/Guidelines">the
3803 appstream wiki</a> page to learn how to embed the package metadata in
3804 a way appstream can use.</p>
3805
3806 <p>This same approach can be used to find any package supporting a
3807 given MIME type. This is very useful when you get a file you do not
3808 know how to handle. First find the mime type using <tt>file
3809 --mime-type</tt>, and next look up the package providing support for
3810 it. Lets say you got an SVG file. Its MIME type is image/svg+xml,
3811 and you can find all packages handling this type like this:</p>
3812
3813 <blockquote><pre>
3814 % apt install appstream
3815 [...]
3816 % apt update
3817 [...]
3818 % appstreamcli what-provides mimetype image/svg+xml | \
3819 awk '/Package:/ {print $2}'
3820 bkchem
3821 phototonic
3822 inkscape
3823 shutter
3824 tetzle
3825 geeqie
3826 xia
3827 pinta
3828 gthumb
3829 karbon
3830 comix
3831 mirage
3832 viewnior
3833 postr
3834 ristretto
3835 kolourpaint4
3836 eog
3837 eom
3838 gimagereader
3839 midori
3840 %
3841 </pre></blockquote>
3842
3843 <p>I believe the MIME types are fetched from the desktop file for
3844 packages providing appstream metadata.</p>
3845
3846 </div>
3847 <div class="tags">
3848
3849
3850 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
3851
3852
3853 </div>
3854 </div>
3855 <div class="padding"></div>
3856
3857 <div class="entry">
3858 <div class="title">
3859 <a href="http://people.skolelinux.org/pere/blog/Creepy__visualise_geotagged_social_media_information___nice_free_software.html">Creepy, visualise geotagged social media information - nice free software</a>
3860 </div>
3861 <div class="date">
3862 24th January 2016
3863 </div>
3864 <div class="body">
3865 <p>Most people seem not to realise that every time they walk around
3866 with the computerised radio beacon known as a mobile phone their
3867 position is tracked by the phone company and often stored for a long
3868 time (like every time a SMS is received or sent). And if their
3869 computerised radio beacon is capable of running programs (often called
3870 mobile apps) downloaded from the Internet, these programs are often
3871 also capable of tracking their location (if the app requested access
3872 during installation). And when these programs send out information to
3873 central collection points, the location is often included, unless
3874 extra care is taken to not send the location. The provided
3875 information is used by several entities, for good and bad (what is
3876 good and bad, depend on your point of view). What is certain, is that
3877 the private sphere and the right to free movement is challenged and
3878 perhaps even eradicated for those announcing their location this way,
3879 when they share their whereabouts with private and public
3880 entities.</p>
3881
3882 <p align="center"><img width="70%" src="http://people.skolelinux.org/pere/blog/images/2016-01-24-nice-creepy-desktop-window.png"></p>
3883
3884 <p>The phone company logs provide a register of locations to check out
3885 when one want to figure out what the tracked person was doing. It is
3886 unavailable for most of us, but provided to selected government
3887 officials, company staff, those illegally buying information from
3888 unfaithful servants and crackers stealing the information. But the
3889 public information can be collected and analysed, and a free software
3890 tool to do so is called
3891 <a href="http://www.geocreepy.com/">Creepy or Cree.py</a>. I
3892 discovered it when I read
3893 <a href="http://www.aftenposten.no/kultur/Slik-kan-du-bli-overvaket-pa-Twitter-og-Instagram-uten-a-ane-det-7787884.html">an
3894 article about Creepy</a> in the Norwegian newspaper Aftenposten i
3895 November 2014, and decided to check if it was available in Debian.
3896 The python program was in Debian, but
3897 <a href="https://tracker.debian.org/pkg/creepy">the version in
3898 Debian</a> was completely broken and practically unmaintained. I
3899 uploaded a new version which did not work quite right, but did not
3900 have time to fix it then. This Christmas I decided to finally try to
3901 get Creepy operational in Debian. Now a fixed version is available in
3902 Debian unstable and testing, and almost all Debian specific patches
3903 are now included
3904 <a href="https://github.com/jkakavas/creepy">upstream</a>.</p>
3905
3906 <p>The Creepy program visualises geolocation information fetched from
3907 Twitter, Instagram, Flickr and Google+, and allow one to get a
3908 complete picture of every social media message posted recently in a
3909 given area, or track the movement of a given individual across all
3910 these services. Earlier it was possible to use the search API of at
3911 least some of these services without identifying oneself, but these
3912 days it is impossible. This mean that to use Creepy, you need to
3913 configure it to log in as yourself on these services, and provide
3914 information to them about your search interests. This should be taken
3915 into account when using Creepy, as it will also share information
3916 about yourself with the services.</p>
3917
3918 <p>The picture above show the twitter messages sent from (or at least
3919 geotagged with a position from) the city centre of Oslo, the capital
3920 of Norway. One useful way to use Creepy is to first look at
3921 information tagged with an area of interest, and next look at all the
3922 information provided by one or more individuals who was in the area.
3923 I tested it by checking out which celebrity provide their location in
3924 twitter messages by checkout out who sent twitter messages near a
3925 Norwegian TV station, and next could track their position over time,
3926 making it possible to locate their home and work place, among other
3927 things. A similar technique have been
3928 <a href="http://www.buzzfeed.com/maxseddon/does-this-soldiers-instagram-account-prove-russia-is-covertl">used
3929 to locate Russian soldiers in Ukraine</a>, and it is both a powerful
3930 tool to discover lying governments, and a useful tool to help people
3931 understand the value of the private information they provide to the
3932 public.</p>
3933
3934 <p>The package is not trivial to backport to Debian Stable/Jessie, as
3935 it depend on several python modules currently missing in Jessie (at
3936 least python-instagram, python-flickrapi and
3937 python-requests-toolbelt).</p>
3938
3939 <p>(I have uploaded
3940 <a href="https://screenshots.debian.net/package/creepy">the image to
3941 screenshots.debian.net</a> and licensed it under the same terms as the
3942 Creepy program in Debian.)</p>
3943
3944 </div>
3945 <div class="tags">
3946
3947
3948 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software</a>.
3949
3950
3951 </div>
3952 </div>
3953 <div class="padding"></div>
3954
3955 <div class="entry">
3956 <div class="title">
3957 <a href="http://people.skolelinux.org/pere/blog/Always_download_Debian_packages_using_Tor___the_simple_recipe.html">Always download Debian packages using Tor - the simple recipe</a>
3958 </div>
3959 <div class="date">
3960 15th January 2016
3961 </div>
3962 <div class="body">
3963 <p>During his DebConf15 keynote, Jacob Appelbaum
3964 <a href="https://summit.debconf.org/debconf15/meeting/331/what-is-to-be-done/">observed
3965 that those listening on the Internet lines would have good reason to
3966 believe a computer have a given security hole</a> if it download a
3967 security fix from a Debian mirror. This is a good reason to always
3968 use encrypted connections to the Debian mirror, to make sure those
3969 listening do not know which IP address to attack. In August, Richard
3970 Hartmann observed that encryption was not enough, when it was possible
3971 to interfere download size to security patches or the fact that
3972 download took place shortly after a security fix was released, and
3973 <a href="http://richardhartmann.de/blog/posts/2015/08/24-Tor-enabled_Debian_mirror/">proposed
3974 to always use Tor to download packages from the Debian mirror</a>. He
3975 was not the first to propose this, as the
3976 <tt><a href="https://tracker.debian.org/pkg/apt-transport-tor">apt-transport-tor</a></tt>
3977 package by Tim Retout already existed to make it easy to convince apt
3978 to use <a href="https://www.torproject.org/">Tor</a>, but I was not
3979 aware of that package when I read the blog post from Richard.</p>
3980
3981 <p>Richard discussed the idea with Peter Palfrader, one of the Debian
3982 sysadmins, and he set up a Tor hidden service on one of the central
3983 Debian mirrors using the address vwakviie2ienjx6t.onion, thus making
3984 it possible to download packages directly between two tor nodes,
3985 making sure the network traffic always were encrypted.</p>
3986
3987 <p>Here is a short recipe for enabling this on your machine, by
3988 installing <tt>apt-transport-tor</tt> and replacing http and https
3989 urls with tor+http and tor+https, and using the hidden service instead
3990 of the official Debian mirror site. I recommend installing
3991 <tt>etckeeper</tt> before you start to have a history of the changes
3992 done in /etc/.</p>
3993
3994 <blockquote><pre>
3995 apt install apt-transport-tor
3996 sed -i 's% http://ftp.debian.org/% tor+http://vwakviie2ienjx6t.onion/%' /etc/apt/sources.list
3997 sed -i 's% http% tor+http%' /etc/apt/sources.list
3998 </pre></blockquote>
3999
4000 <p>If you have more sources listed in /etc/apt/sources.list.d/, run
4001 the sed commands for these too. The sed command is assuming your are
4002 using the ftp.debian.org Debian mirror. Adjust the command (or just
4003 edit the file manually) to match your mirror.</p>
4004
4005 <p>This work in Debian Jessie and later. Note that tools like
4006 <tt>apt-file</tt> only recently started using the apt transport
4007 system, and do not work with these tor+http URLs. For
4008 <tt>apt-file</tt> you need the version currently in experimental,
4009 which need a recent apt version currently only in unstable. So if you
4010 need a working <tt>apt-file</tt>, this is not for you.</p>
4011
4012 <p>Another advantage from this change is that your machine will start
4013 using Tor regularly and at fairly random intervals (every time you
4014 update the package lists or upgrade or install a new package), thus
4015 masking other Tor traffic done from the same machine. Using Tor will
4016 become normal for the machine in question.</p>
4017
4018 <p>On <a href="https://wiki.debian.org/FreedomBox">Freedombox</a>, APT
4019 is set up by default to use <tt>apt-transport-tor</tt> when Tor is
4020 enabled. It would be great if it was the default on any Debian
4021 system.</p>
4022
4023 </div>
4024 <div class="tags">
4025
4026
4027 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
4028
4029
4030 </div>
4031 </div>
4032 <div class="padding"></div>
4033
4034 <div class="entry">
4035 <div class="title">
4036 <a href="http://people.skolelinux.org/pere/blog/OpenALPR__find_car_license_plates_in_video_streams___nice_free_software.html">OpenALPR, find car license plates in video streams - nice free software</a>
4037 </div>
4038 <div class="date">
4039 23rd December 2015
4040 </div>
4041 <div class="body">
4042 <p>When I was a kid, we used to collect "car numbers", as we used to
4043 call the car license plate numbers in those days. I would write the
4044 numbers down in my little book and compare notes with the other kids
4045 to see how many region codes we had seen and if we had seen some
4046 exotic or special region codes and numbers. It was a fun game to pass
4047 time, as we kids have plenty of it.</p>
4048
4049 <p>A few days I came across
4050 <a href="https://github.com/openalpr/openalpr">the OpenALPR
4051 project</a>, a free software project to automatically discover and
4052 report license plates in images and video streams, and provide the
4053 "car numbers" in a machine readable format. I've been looking for
4054 such system for a while now, because I believe it is a bad idea that the
4055 <a href="https://en.wikipedia.org/wiki/Automatic_number_plate_recognition">automatic
4056 number plate recognition</a> tool only is available in the hands of
4057 the powerful, and want it to be available also for the powerless to
4058 even the score when it comes to surveillance and sousveillance. I
4059 discovered the developer
4060 <a href="https://bugs.debian.org/747509">wanted to get the tool into
4061 Debian</a>, and as I too wanted it to be in Debian, I volunteered to
4062 help him get it into shape to get the package uploaded into the Debian
4063 archive.</p>
4064
4065 <p>Today we finally managed to get the package into shape and uploaded
4066 it into Debian, where it currently
4067 <a href="https://ftp-master.debian.org//new/openalpr_2.2.1-1.html">waits
4068 in the NEW queue</a> for review by the Debian ftpmasters.</p>
4069
4070 <p>I guess you are wondering why on earth such tool would be useful
4071 for the common folks, ie those not running a large government
4072 surveillance system? Well, I plan to put it in a computer on my bike
4073 and in my car, tracking the cars nearby and allowing me to be notified
4074 when number plates on my watch list are discovered. Another use case
4075 was suggested by a friend of mine, who wanted to set it up at his home
4076 to open the car port automatically when it discovered the plate on his
4077 car. When I mentioned it perhaps was a bit foolhardy to allow anyone
4078 capable of placing his license plate number of a piece of cardboard to
4079 open his car port, men replied that it was always unlocked anyway. I
4080 guess for such use case it make sense. I am sure there are other use
4081 cases too, for those with imagination and a vision.</p>
4082
4083 <p>If you want to build your own version of the Debian package, check
4084 out the upstream git source and symlink ./distros/debian to ./debian/
4085 before running "debuild" to build the source. Or wait a bit until the
4086 package show up in unstable.</p>
4087
4088 </div>
4089 <div class="tags">
4090
4091
4092 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software</a>.
4093
4094
4095 </div>
4096 </div>
4097 <div class="padding"></div>
4098
4099 <div class="entry">
4100 <div class="title">
4101 <a href="http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html">Using appstream with isenkram to install hardware related packages in Debian</a>
4102 </div>
4103 <div class="date">
4104 20th December 2015
4105 </div>
4106 <div class="body">
4107 <p>Around three years ago, I created
4108 <a href="http://packages.qa.debian.org/isenkram">the isenkram
4109 system</a> to get a more practical solution in Debian for handing
4110 hardware related packages. A GUI system in the isenkram package will
4111 present a pop-up dialog when some hardware dongle supported by
4112 relevant packages in Debian is inserted into the machine. The same
4113 lookup mechanism to detect packages is available as command line
4114 tools in the isenkram-cli package. In addition to mapping hardware,
4115 it will also map kernel firmware files to packages and make it easy to
4116 install needed firmware packages automatically. The key for this
4117 system to work is a good way to map hardware to packages, in other
4118 words, allow packages to announce what hardware they will work
4119 with.</p>
4120
4121 <p>I started by providing data files in the isenkram source, and
4122 adding code to download the latest version of these data files at run
4123 time, to ensure every user had the most up to date mapping available.
4124 I also added support for storing the mapping in the Packages file in
4125 the apt repositories, but did not push this approach because while I
4126 was trying to figure out how to best store hardware/package mappings,
4127 <a href="http://www.freedesktop.org/software/appstream/docs/">the
4128 appstream system</a> was announced. I got in touch and suggested to
4129 add the hardware mapping into that data set to be able to use
4130 appstream as a data source, and this was accepted at least for the
4131 Debian version of appstream.</p>
4132
4133 <p>A few days ago using appstream in Debian for this became possible,
4134 and today I uploaded a new version 0.20 of isenkram adding support for
4135 appstream as a data source for mapping hardware to packages. The only
4136 package so far using appstream to announce its hardware support is my
4137 pymissile package. I got help from Matthias Klumpp with figuring out
4138 how do add the required
4139 <a href="https://appstream.debian.org/html/sid/main/metainfo/pymissile.html">metadata
4140 in pymissile</a>. I added a file debian/pymissile.metainfo.xml with
4141 this content:</p>
4142
4143 <blockquote><pre>
4144 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
4145 &lt;component&gt;
4146 &lt;id&gt;pymissile&lt;/id&gt;
4147 &lt;metadata_license&gt;MIT&lt;/metadata_license&gt;
4148 &lt;name&gt;pymissile&lt;/name&gt;
4149 &lt;summary&gt;Control original Striker USB Missile Launcher&lt;/summary&gt;
4150 &lt;description&gt;
4151 &lt;p&gt;
4152 Pymissile provides a curses interface to control an original
4153 Marks and Spencer / Striker USB Missile Launcher, as well as a
4154 motion control script to allow a webcamera to control the
4155 launcher.
4156 &lt;/p&gt;
4157 &lt;/description&gt;
4158 &lt;provides&gt;
4159 &lt;modalias&gt;usb:v1130p0202d*&lt;/modalias&gt;
4160 &lt;/provides&gt;
4161 &lt;/component&gt;
4162 </pre></blockquote>
4163
4164 <p>The key for isenkram is the component/provides/modalias value,
4165 which is a glob style match rule for hardware specific strings
4166 (modalias strings) provided by the Linux kernel. In this case, it
4167 will map to all USB devices with vendor code 1130 and product code
4168 0202.</p>
4169
4170 <p>Note, it is important that the license of all the metadata files
4171 are compatible to have permissions to aggregate them into archive wide
4172 appstream files. Matthias suggested to use MIT or BSD licenses for
4173 these files. A challenge is figuring out a good id for the data, as
4174 it is supposed to be globally unique and shared across distributions
4175 (in other words, best to coordinate with upstream what to use). But
4176 it can be changed later or, so we went with the package name as
4177 upstream for this project is dormant.</p>
4178
4179 <p>To get the metadata file installed in the correct location for the
4180 mirror update scripts to pick it up and include its content the
4181 appstream data source, the file must be installed in the binary
4182 package under /usr/share/appdata/. I did this by adding the following
4183 line to debian/pymissile.install:</p>
4184
4185 <blockquote><pre>
4186 debian/pymissile.metainfo.xml usr/share/appdata
4187 </pre></blockquote>
4188
4189 <p>With that in place, the command line tool isenkram-lookup will list
4190 all packages useful on the current computer automatically, and the GUI
4191 pop-up handler will propose to install the package not already
4192 installed if a hardware dongle is inserted into the machine in
4193 question.</p>
4194
4195 <p>Details of the modalias field in appstream is available from the
4196 <a href="https://wiki.debian.org/DEP-11">DEP-11</a> proposal.</p>
4197
4198 <p>To locate the modalias values of all hardware present in a machine,
4199 try running this command on the command line:</p>
4200
4201 <blockquote><pre>
4202 cat $(find /sys/devices/|grep modalias)
4203 </pre></blockquote>
4204
4205 <p>To learn more about the isenkram system, please check out
4206 <a href="http://people.skolelinux.org/pere/blog/tags/isenkram/">my
4207 blog posts tagged isenkram</a>.</p>
4208
4209 </div>
4210 <div class="tags">
4211
4212
4213 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
4214
4215
4216 </div>
4217 </div>
4218 <div class="padding"></div>
4219
4220 <div class="entry">
4221 <div class="title">
4222 <a href="http://people.skolelinux.org/pere/blog/The_GNU_General_Public_License_is_not_magic_pixie_dust.html">The GNU General Public License is not magic pixie dust</a>
4223 </div>
4224 <div class="date">
4225 30th November 2015
4226 </div>
4227 <div class="body">
4228 <p>A blog post from my fellow Debian developer Paul Wise titled
4229 "<a href="http://bonedaddy.net/pabs3/log/2015/11/27/sfc-supporter/">The
4230 GPL is not magic pixie dust</a>" explain the importance of making sure
4231 the <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> is enforced.
4232 I quote the blog post from Paul in full here with his permission:<p>
4233
4234 <blockquote>
4235
4236 <p><a href="https://sfconservancy.org/supporter/"><img src="https://sfconservancy.org/img/supporter-badge.png" width="194" height="90" alt="Become a Software Freedom Conservancy Supporter!" align="right" border="0" /></a></p>
4237
4238 <blockquote>
4239 The GPL is not magic pixie dust. It does not work by itself.<br/>
4240
4241 The first step is to choose a
4242 <a href="https://copyleft.org/">copyleft</a> license for your
4243 code.<br/>
4244
4245 The next step is, when someone fails to follow that copyleft license,
4246 <b>it must be enforced</b><br/>
4247
4248 and its a simple fact of our modern society that such type of
4249 work<br/>
4250
4251 is incredibly expensive to do and incredibly difficult to do.
4252 </blockquote>
4253
4254 <p><small>-- <a href="http://ebb.org/bkuhn/">Bradley Kuhn</a>, in
4255 <a href="http://faif.us/" title="Free as in Freedom">FaiF</a>
4256 <a href="http://faif.us/cast/2015/nov/24/0x57/">episode
4257 0x57</a></small></p>
4258
4259 <p>As the Debian Website
4260 <a href="https://bugs.debian.org/794116">used</a>
4261 <a href="https://anonscm.debian.org/viewvc/webwml/webwml/english/intro/free.wml?r1=1.24&amp;r2=1.25">to</a>
4262 imply, public domain and permissively licensed software can lead to
4263 the production of more proprietary software as people discover useful
4264 software, extend it and or incorporate it into their hardware or
4265 software products. Copyleft licenses such as the GNU GPL were created
4266 to close off this avenue to the production of proprietary software but
4267 such licenses are not enough. With the ongoing adoption of Free
4268 Software by individuals and groups, inevitably the community's
4269 expectations of license compliance are violated, usually out of
4270 ignorance of the way Free Software works, but not always. As Karen
4271 and Bradley explained in <a href="http://faif.us/" title="Free as in
4272 Freedom">FaiF</a>
4273 <a href="http://faif.us/cast/2015/nov/24/0x57/">episode 0x57</a>,
4274 copyleft is nothing if no-one is willing and able to stand up in court
4275 to protect it. The reality of today's world is that legal
4276 representation is expensive, difficult and time consuming. With
4277 <a href="http://gpl-violations.org/">gpl-violations.org</a> in hiatus
4278 <a href="http://gpl-violations.org/news/20151027-homepage-recovers/">until</a>
4279 some time in 2016, the <a href="https://sfconservancy.org/">Software
4280 Freedom Conservancy</a> (a tax-exempt charity) is the major defender
4281 of the Linux project, Debian and other groups against GPL violations.
4282 In March the SFC supported a
4283 <a href="https://sfconservancy.org/news/2015/mar/05/vmware-lawsuit/">lawsuit
4284 by Christoph Hellwig</a> against VMware for refusing to
4285 <a href="https://sfconservancy.org/linux-compliance/vmware-lawsuit-faq.html">comply
4286 with the GPL</a> in relation to their use of parts of the Linux
4287 kernel. Since then two of their sponsors pulled corporate funding and
4288 conferences
4289 <a href="https://sfconservancy.org/blog/2015/nov/24/faif-carols-fundraiser/">blocked
4290 or cancelled their talks</a>. As a result they have decided to rely
4291 less on corporate funding and more on the broad community of
4292 individuals who support Free Software and copyleft. So the SFC has
4293 <a href="https://sfconservancy.org/news/2015/nov/23/2015fundraiser/">launched</a>
4294 a <a href="https://sfconservancy.org/supporter/">campaign</a> to create
4295 a community of folks who stand up for copyleft and the GPL by
4296 supporting their work on promoting and supporting copyleft and Free
4297 Software.</p>
4298
4299 <p>If you support Free Software,
4300 <a href="https://sfconservancy.org/blog/2015/nov/26/like-what-I-do/">like</a>
4301 what the SFC do, agree with their
4302 <a href="https://sfconservancy.org/linux-compliance/principles.html">compliance
4303 principles</a>, are happy about their
4304 <a href="https://sfconservancy.org/supporter/">successes</a> in 2015,
4305 work on a project that is an SFC
4306 <a href="https://sfconservancy.org/members/current/">member</a> and or
4307 just want to stand up for copyleft, please join
4308 <a href="https://identi.ca/cwebber/image/JQGPA4qbTyyp3-MY8QpvuA">Christopher
4309 Allan Webber</a>,
4310 <a href="https://sfconservancy.org/blog/2015/nov/24/faif-carols-fundraiser/">Carol
4311 Smith</a>,
4312 <a href="http://www.jonobacon.org/2015/11/25/supporting-software-freedom-conservancy/">Jono
4313 Bacon</a>, myself and
4314 <a href="https://sfconservancy.org/sponsors/#supporters">others</a> in
4315 becoming a
4316 <a href="https://sfconservancy.org/supporter/">supporter</a>. For the
4317 next week your donation will be
4318 <a href="https://sfconservancy.org/news/2015/nov/27/black-friday/">matched</a>
4319 by an anonymous donor. Please also consider asking your employer to
4320 match your donation or become a sponsor of SFC. Don't forget to
4321 spread the word about your support for SFC via email, your blog and or
4322 social media accounts.</p>
4323
4324 </blockquote>
4325
4326 <p>I agree with Paul on this topic and just signed up as a Supporter
4327 of Software Freedom Conservancy myself. Perhaps you should be a
4328 supporter too?</p>
4329
4330 </div>
4331 <div class="tags">
4332
4333
4334 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett</a>.
4335
4336
4337 </div>
4338 </div>
4339 <div class="padding"></div>
4340
4341 <div class="entry">
4342 <div class="title">
4343 <a href="http://people.skolelinux.org/pere/blog/PGP_key_transition_statement_for_key_EE4E02F9.html">PGP key transition statement for key EE4E02F9</a>
4344 </div>
4345 <div class="date">
4346 17th November 2015
4347 </div>
4348 <div class="body">
4349 <p>I've needed a new OpenPGP key for a while, but have not had time to
4350 set it up properly. I wanted to generate it offline and have it
4351 available on <a href="http://shop.kernelconcepts.de/#openpgp">a OpenPGP
4352 smart card</a> for daily use, and learning how to do it and finding
4353 time to sit down with an offline machine almost took forever. But
4354 finally I've been able to complete the process, and have now moved
4355 from my old GPG key to a new GPG key. See
4356 <a href="http://people.skolelinux.org/pere/blog/images/2015-11-17-new-gpg-key-transition.txt">the
4357 full transition statement, signed with both my old and new key</a> for
4358 the details. This is my new key:</p>
4359
4360 <pre>
4361 pub 3936R/<a href="http://pgp.cs.uu.nl/stats/111D6B29EE4E02F9.html">111D6B29EE4E02F9</a> 2015-11-03 [expires: 2019-11-14]
4362 Key fingerprint = 3AC7 B2E3 ACA5 DF87 78F1 D827 111D 6B29 EE4E 02F9
4363 uid Petter Reinholdtsen &lt;pere@hungry.com&gt;
4364 uid Petter Reinholdtsen &lt;pere@debian.org&gt;
4365 sub 4096R/87BAFB0E 2015-11-03 [expires: 2019-11-02]
4366 sub 4096R/F91E6DE9 2015-11-03 [expires: 2019-11-02]
4367 sub 4096R/A0439BAB 2015-11-03 [expires: 2019-11-02]
4368 </pre>
4369
4370 <p>The key can be downloaded from the OpenPGP key servers, signed by
4371 my old key.</p>
4372
4373 <p>If you signed my old key
4374 (<a href="http://pgp.cs.uu.nl/stats/DB4CCC4B2A30D729.html">DB4CCC4B2A30D729</a>),
4375 I'd very much appreciate a signature on my new key, details and
4376 instructions in the transition statement. I m happy to reciprocate if
4377 you have a similarly signed transition statement to present.</p>
4378
4379 </div>
4380 <div class="tags">
4381
4382
4383 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
4384
4385
4386 </div>
4387 </div>
4388 <div class="padding"></div>
4389
4390 <div class="entry">
4391 <div class="title">
4392 <a href="http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html">The life and death of a laptop battery</a>
4393 </div>
4394 <div class="date">
4395 24th September 2015
4396 </div>
4397 <div class="body">
4398 <p>When I get a new laptop, the battery life time at the start is OK.
4399 But this do not last. The last few laptops gave me a feeling that
4400 within a year, the life time is just a fraction of what it used to be,
4401 and it slowly become painful to use the laptop without power connected
4402 all the time. Because of this, when I got a new Thinkpad X230 laptop
4403 about two years ago, I decided to monitor its battery state to have
4404 more hard facts when the battery started to fail.</p>
4405
4406 <img src="http://people.skolelinux.org/pere/blog/images/2015-09-24-laptop-battery-graph.png"/>
4407
4408 <p>First I tried to find a sensible Debian package to record the
4409 battery status, assuming that this must be a problem already handled
4410 by someone else. I found
4411 <a href="https://tracker.debian.org/pkg/battery-stats">battery-stats</a>,
4412 which collects statistics from the battery, but it was completely
4413 broken. I sent a few suggestions to the maintainer, but decided to
4414 write my own collector as a shell script while I waited for feedback
4415 from him. Via
4416 <a href="http://www.ifweassume.com/2013/08/the-de-evolution-of-my-laptop-battery.html">a
4417 blog post about the battery development on a MacBook Air</a> I also
4418 discovered
4419 <a href="https://github.com/jradavenport/batlog.git">batlog</a>, not
4420 available in Debian.</p>
4421
4422 <p>I started my collector 2013-07-15, and it has been collecting
4423 battery stats ever since. Now my
4424 /var/log/hjemmenett-battery-status.log file contain around 115,000
4425 measurements, from the time the battery was working great until now,
4426 when it is unable to charge above 7% of original capacity. My
4427 collector shell script is quite simple and look like this:</p>
4428
4429 <pre>
4430 #!/bin/sh
4431 # Inspired by
4432 # http://www.ifweassume.com/2013/08/the-de-evolution-of-my-laptop-battery.html
4433 # See also
4434 # http://blog.sleeplessbeastie.eu/2013/01/02/debian-how-to-monitor-battery-capacity/
4435 logfile=/var/log/hjemmenett-battery-status.log
4436
4437 files="manufacturer model_name technology serial_number \
4438 energy_full energy_full_design energy_now cycle_count status"
4439
4440 if [ ! -e "$logfile" ] ; then
4441 (
4442 printf "timestamp,"
4443 for f in $files; do
4444 printf "%s," $f
4445 done
4446 echo
4447 ) > "$logfile"
4448 fi
4449
4450 log_battery() {
4451 # Print complete message in one echo call, to avoid race condition
4452 # when several log processes run in parallel.
4453 msg=$(printf "%s," $(date +%s); \
4454 for f in $files; do \
4455 printf "%s," $(cat $f); \
4456 done)
4457 echo "$msg"
4458 }
4459
4460 cd /sys/class/power_supply
4461
4462 for bat in BAT*; do
4463 (cd $bat && log_battery >> "$logfile")
4464 done
4465 </pre>
4466
4467 <p>The script is called when the power management system detect a
4468 change in the power status (power plug in or out), and when going into
4469 and out of hibernation and suspend. In addition, it collect a value
4470 every 10 minutes. This make it possible for me know when the battery
4471 is discharging, charging and how the maximum charge change over time.
4472 The code for the Debian package
4473 <a href="https://github.com/petterreinholdtsen/battery-status">is now
4474 available on github</a>.</p>
4475
4476 <p>The collected log file look like this:</p>
4477
4478 <pre>
4479 timestamp,manufacturer,model_name,technology,serial_number,energy_full,energy_full_design,energy_now,cycle_count,status,
4480 1376591133,LGC,45N1025,Li-ion,974,62800000,62160000,39050000,0,Discharging,
4481 [...]
4482 1443090528,LGC,45N1025,Li-ion,974,4900000,62160000,4900000,0,Full,
4483 1443090601,LGC,45N1025,Li-ion,974,4900000,62160000,4900000,0,Full,
4484 </pre>
4485
4486 <p>I wrote a small script to create a graph of the charge development
4487 over time. This graph depicted above show the slow death of my laptop
4488 battery.</p>
4489
4490 <p>But why is this happening? Why are my laptop batteries always
4491 dying in a year or two, while the batteries of space probes and
4492 satellites keep working year after year. If we are to believe
4493 <a href="http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries">Battery
4494 University</a>, the cause is me charging the battery whenever I have a
4495 chance, and the fix is to not charge the Lithium-ion batteries to 100%
4496 all the time, but to stay below 90% of full charge most of the time.
4497 I've been told that the Tesla electric cars
4498 <a href="http://my.teslamotors.com/de_CH/forum/forums/battery-charge-limit">limit
4499 the charge of their batteries to 80%</a>, with the option to charge to
4500 100% when preparing for a longer trip (not that I would want a car
4501 like Tesla where rights to privacy is abandoned, but that is another
4502 story), which I guess is the option we should have for laptops on
4503 Linux too.</p>
4504
4505 <p>Is there a good and generic way with Linux to tell the battery to
4506 stop charging at 80%, unless requested to charge to 100% once in
4507 preparation for a longer trip? I found
4508 <a href="http://askubuntu.com/questions/34452/how-can-i-limit-battery-charging-to-80-capacity">one
4509 recipe on askubuntu for Ubuntu to limit charging on Thinkpad to
4510 80%</a>, but could not get it to work (kernel module refused to
4511 load).</p>
4512
4513 <p>I wonder why the battery capacity was reported to be more than 100%
4514 at the start. I also wonder why the "full capacity" increases some
4515 times, and if it is possible to repeat the process to get the battery
4516 back to design capacity. And I wonder if the discharge and charge
4517 speed change over time, or if this stay the same. I did not yet try
4518 to write a tool to calculate the derivative values of the battery
4519 level, but suspect some interesting insights might be learned from
4520 those.</p>
4521
4522 <p>Update 2015-09-24: I got a tip to install the packages
4523 acpi-call-dkms and tlp (unfortunately missing in Debian stable)
4524 packages instead of the tp-smapi-dkms package I had tried to use
4525 initially, and use 'tlp setcharge 40 80' to change when charging start
4526 and stop. I've done so now, but expect my existing battery is toast
4527 and need to be replaced. The proposal is unfortunately Thinkpad
4528 specific.</p>
4529
4530 </div>
4531 <div class="tags">
4532
4533
4534 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
4535
4536
4537 </div>
4538 </div>
4539 <div class="padding"></div>
4540
4541 <div class="entry">
4542 <div class="title">
4543 <a href="http://people.skolelinux.org/pere/blog/New_laptop___some_more_clues_and_ideas_based_on_feedback.html">New laptop - some more clues and ideas based on feedback</a>
4544 </div>
4545 <div class="date">
4546 5th July 2015
4547 </div>
4548 <div class="body">
4549 <p>Several people contacted me after my previous blog post about my
4550 need for a new laptop, and provided very useful feedback. I wish to
4551 thank every one of these. Several pointed me to the possibility of
4552 fixing my X230, and I am already in the process of getting Lenovo to
4553 do so thanks to the on site, next day support contract covering the
4554 machine. But the battery is almost useless (I expect to replace it
4555 with a non-official battery) and I do not expect the machine to live
4556 for many more years, so it is time to plan its replacement. If I did
4557 not have a support contract, it was suggested to find replacement parts
4558 using <a href="http://www.francecrans.com/">FrancEcrans</a>, but it
4559 might present a language barrier as I do not understand French.</p>
4560
4561 <p>One tip I got was to use the
4562 <a href="https://skinflint.co.uk/?cat=nb">Skinflint</a> web service to
4563 compare laptop models. It seem to have more models available than
4564 prisjakt.no. Another tip I got from someone I know have similar
4565 keyboard preferences was that the HP EliteBook 840 keyboard is not
4566 very good, and this matches my experience with earlier EliteBook
4567 keyboards I tested. Because of this, I will not consider it any further.
4568
4569 <p>When I wrote my blog post, I was not aware of Thinkpad X250, the
4570 newest Thinkpad X model. The keyboard reintroduces mouse buttons
4571 (which is missing from the X240), and is working fairly well with
4572 Debian Sid/Unstable according to
4573 <a href="http://www.corsac.net/X250/">Corsac.net</a>. The reports I
4574 got on the keyboard quality are not consistent. Some say the keyboard
4575 is good, others say it is ok, while others say it is not very good.
4576 Those with experience from X41 and and X60 agree that the X250
4577 keyboard is not as good as those trusty old laptops, and suggest I
4578 keep and fix my X230 instead of upgrading, or get a used X230 to
4579 replace it. I'm also told that the X250 lack leds for caps lock, disk
4580 activity and battery status, which is very convenient on my X230. I'm
4581 also told that the CPU fan is running very often, making it a bit
4582 noisy. In any case, the X250 do not work out of the box with Debian
4583 Stable/Jessie, one of my requirements.</p>
4584
4585 <p>I have also gotten a few vendor proposals, one was
4586 <a href="http://pro-star.com">Pro-Star</a>, another was
4587 <a href="http://shop.gluglug.org.uk/product/libreboot-x200/">Libreboot</a>.
4588 The latter look very attractive to me.</p>
4589
4590 <p>Again, thank you all for the very useful feedback. It help a lot
4591 as I keep looking for a replacement.</p>
4592
4593 <p>Update 2015-07-06: I was recommended to check out the
4594 <a href="">lapstore.de</a> web shop for used laptops. They got several
4595 different
4596 <a href="http://www.lapstore.de/f.php/shop/lapstore/f/411/lang/x/kw/Lenovo_ThinkPad_X_Serie/">old
4597 thinkpad X models</a>, and provide one year warranty.</p>
4598
4599 </div>
4600 <div class="tags">
4601
4602
4603 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
4604
4605
4606 </div>
4607 </div>
4608 <div class="padding"></div>
4609
4610 <div class="entry">
4611 <div class="title">
4612 <a href="http://people.skolelinux.org/pere/blog/Time_to_find_a_new_laptop__as_the_old_one_is_broken_after_only_two_years.html">Time to find a new laptop, as the old one is broken after only two years</a>
4613 </div>
4614 <div class="date">
4615 3rd July 2015
4616 </div>
4617 <div class="body">
4618 <p>My primary work horse laptop is failing, and will need a
4619 replacement soon. The left 5 cm of the screen on my Thinkpad X230
4620 started flickering yesterday, and I suspect the cause is a broken
4621 cable, as changing the angle of the screen some times get rid of the
4622 flickering.</p>
4623
4624 <p>My requirements have not really changed since I bought it, and is
4625 still as
4626 <a href="http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html">I
4627 described them in 2013</a>. The last time I bought a laptop, I had
4628 good help from
4629 <a href="http://www.prisjakt.no/category.php?k=353">prisjakt.no</a>
4630 where I could select at least a few of the requirements (mouse pin,
4631 wifi, weight) and go through the rest manually. Three button mouse
4632 and a good keyboard is not available as an option, and all the three
4633 laptop models proposed today (Thinkpad X240, HP EliteBook 820 G1 and
4634 G2) lack three mouse buttons). It is also unclear to me how good the
4635 keyboard on the HP EliteBooks are. I hope Lenovo have not messed up
4636 the keyboard, even if the quality and robustness in the X series have
4637 deteriorated since X41.</p>
4638
4639 <p>I wonder how I can find a sensible laptop when none of the options
4640 seem sensible to me? Are there better services around to search the
4641 set of available laptops for features? Please send me an email if you
4642 have suggestions.</p>
4643
4644 <p>Update 2015-07-23: I got a suggestion to check out the FSF
4645 <a href="http://www.fsf.org/resources/hw/endorsement/respects-your-freedom">list
4646 of endorsed hardware</a>, which is useful background information.</p>
4647
4648 </div>
4649 <div class="tags">
4650
4651
4652 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
4653
4654
4655 </div>
4656 </div>
4657 <div class="padding"></div>
4658
4659 <div class="entry">
4660 <div class="title">
4661 <a href="http://people.skolelinux.org/pere/blog/How_to_stay_with_sysvinit_in_Debian_Jessie.html">How to stay with sysvinit in Debian Jessie</a>
4662 </div>
4663 <div class="date">
4664 22nd November 2014
4665 </div>
4666 <div class="body">
4667 <p>By now, it is well known that Debian Jessie will not be using
4668 sysvinit as its boot system by default. But how can one keep using
4669 sysvinit in Jessie? It is fairly easy, and here are a few recipes,
4670 courtesy of
4671 <a href="http://www.vitavonni.de/blog/201410/2014102101-avoiding-systemd.html">Erich
4672 Schubert</a> and
4673 <a href="http://smcv.pseudorandom.co.uk/2014/still_universal/">Simon
4674 McVittie</a>.
4675
4676 <p>If you already are using Wheezy and want to upgrade to Jessie and
4677 keep sysvinit as your boot system, create a file
4678 <tt>/etc/apt/preferences.d/use-sysvinit</tt> with this content before
4679 you upgrade:</p>
4680
4681 <p><blockquote><pre>
4682 Package: systemd-sysv
4683 Pin: release o=Debian
4684 Pin-Priority: -1
4685 </pre></blockquote><p>
4686
4687 <p>This file content will tell apt and aptitude to not consider
4688 installing systemd-sysv as part of any installation and upgrade
4689 solution when resolving dependencies, and thus tell it to avoid
4690 systemd as a default boot system. The end result should be that the
4691 upgraded system keep using sysvinit.</p>
4692
4693 <p>If you are installing Jessie for the first time, there is no way to
4694 get sysvinit installed by default (debootstrap used by
4695 debian-installer have no option for this), but one can tell the
4696 installer to switch to sysvinit before the first boot. Either by
4697 using a kernel argument to the installer, or by adding a line to the
4698 preseed file used. First, the kernel command line argument:
4699
4700 <p><blockquote><pre>
4701 preseed/late_command="in-target apt-get install --purge -y sysvinit-core"
4702 </pre></blockquote><p>
4703
4704 <p>Next, the line to use in a preseed file:</p>
4705
4706 <p><blockquote><pre>
4707 d-i preseed/late_command string in-target apt-get install -y sysvinit-core
4708 </pre></blockquote><p>
4709
4710 <p>One can of course also do this after the first boot by installing
4711 the sysvinit-core package.</p>
4712
4713 <p>I recommend only using sysvinit if you really need it, as the
4714 sysvinit boot sequence in Debian have several hardware specific bugs
4715 on Linux caused by the fact that it is unpredictable when hardware
4716 devices show up during boot. But on the other hand, the new default
4717 boot system still have a few rough edges I hope will be fixed before
4718 Jessie is released.</p>
4719
4720 <p>Update 2014-11-26: Inspired by
4721 <ahref="https://www.mirbsd.org/permalinks/wlog-10-tg_e20141125-tg.htm#e20141125-tg_wlog-10-tg">a
4722 blog post by Torsten Glaser</a>, added --purge to the preseed
4723 line.</p>
4724
4725 </div>
4726 <div class="tags">
4727
4728
4729 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
4730
4731
4732 </div>
4733 </div>
4734 <div class="padding"></div>
4735
4736 <div class="entry">
4737 <div class="title">
4738 <a href="http://people.skolelinux.org/pere/blog/A_Debian_package_for_SMTP_via_Tor__aka_SMTorP__using_exim4.html">A Debian package for SMTP via Tor (aka SMTorP) using exim4</a>
4739 </div>
4740 <div class="date">
4741 10th November 2014
4742 </div>
4743 <div class="body">
4744 <p>The right to communicate with your friends and family in private,
4745 without anyone snooping, is a right every citicen have in a liberal
4746 democracy. But this right is under serious attack these days.</p>
4747
4748 <p>A while back it occurred to me that one way to make the dragnet
4749 surveillance conducted by NSA, GCHQ, FRA and others (and confirmed by
4750 the whisleblower Snowden) more expensive for Internet email,
4751 is to deliver all email using SMTP via Tor. Such SMTP option would be
4752 a nice addition to the FreedomBox project if we could send email
4753 between FreedomBox machines without leaking metadata about the emails
4754 to the people peeking on the wire. I
4755 <a href="http://lists.alioth.debian.org/pipermail/freedombox-discuss/2014-October/006493.html">proposed
4756 this on the FreedomBox project mailing list in October</a> and got a
4757 lot of useful feedback and suggestions. It also became obvious to me
4758 that this was not a novel idea, as the same idea was tested and
4759 documented by Johannes Berg as early as 2006, and both
4760 <a href="https://github.com/pagekite/Mailpile/wiki/SMTorP">the
4761 Mailpile</a> and <a href="http://dee.su/cables">the Cables</a> systems
4762 propose a similar method / protocol to pass emails between users.</p>
4763
4764 <p>To implement such system one need to set up a Tor hidden service
4765 providing the SMTP protocol on port 25, and use email addresses
4766 looking like username@hidden-service-name.onion. With such addresses
4767 the connections to port 25 on hidden-service-name.onion using Tor will
4768 go to the correct SMTP server. To do this, one need to configure the
4769 Tor daemon to provide the hidden service and the mail server to accept
4770 emails for this .onion domain. To learn more about Exim configuration
4771 in Debian and test the design provided by Johannes Berg in his FAQ, I
4772 set out yesterday to create a Debian package for making it trivial to
4773 set up such SMTP over Tor service based on Debian. Getting it to work
4774 were fairly easy, and
4775 <a href="https://github.com/petterreinholdtsen/exim4-smtorp">the
4776 source code for the Debian package</a> is available from github. I
4777 plan to move it into Debian if further testing prove this to be a
4778 useful approach.</p>
4779
4780 <p>If you want to test this, set up a blank Debian machine without any
4781 mail system installed (or run <tt>apt-get purge exim4-config</tt> to
4782 get rid of exim4). Install tor, clone the git repository mentioned
4783 above, build the deb and install it on the machine. Next, run
4784 <tt>/usr/lib/exim4-smtorp/setup-exim-hidden-service</tt> and follow
4785 the instructions to get the service up and running. Restart tor and
4786 exim when it is done, and test mail delivery using swaks like
4787 this:</p>
4788
4789 <p><blockquote><pre>
4790 torsocks swaks --server dutlqrrmjhtfa3vp.onion \
4791 --to fbx@dutlqrrmjhtfa3vp.onion
4792 </pre></blockquote></p>
4793
4794 <p>This will test the SMTP delivery using tor. Replace the email
4795 address with your own address to test your server. :)</p>
4796
4797 <p>The setup procedure is still to complex, and I hope it can be made
4798 easier and more automatic. Especially the tor setup need more work.
4799 Also, the package include a tor-smtp tool written in C, but its task
4800 should probably be rewritten in some script language to make the deb
4801 architecture independent. It would probably also make the code easier
4802 to review. The tor-smtp tool currently need to listen on a socket for
4803 exim to talk to it and is started using xinetd. It would be better if
4804 no daemon and no socket is needed. I suspect it is possible to get
4805 exim to run a command line tool for delivery instead of talking to a
4806 socket, and hope to figure out how in a future version of this
4807 system.</p>
4808
4809 <p>Until I wipe my test machine, I can be reached using the
4810 <tt>fbx@dutlqrrmjhtfa3vp.onion</tt> mail address, deliverable over
4811 SMTorP. :)</p>
4812
4813 </div>
4814 <div class="tags">
4815
4816
4817 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
4818
4819
4820 </div>
4821 </div>
4822 <div class="padding"></div>
4823
4824 <div class="entry">
4825 <div class="title">
4826 <a href="http://people.skolelinux.org/pere/blog/listadmin__the_quick_way_to_moderate_mailman_lists___nice_free_software.html">listadmin, the quick way to moderate mailman lists - nice free software</a>
4827 </div>
4828 <div class="date">
4829 22nd October 2014
4830 </div>
4831 <div class="body">
4832 <p>If you ever had to moderate a mailman list, like the ones on
4833 alioth.debian.org, you know the web interface is fairly slow to
4834 operate. First you visit one web page, enter the moderation password
4835 and get a new page shown with a list of all the messages to moderate
4836 and various options for each email address. This take a while for
4837 every list you moderate, and you need to do it regularly to do a good
4838 job as a list moderator. But there is a quick alternative,
4839 <a href="http://heim.ifi.uio.no/kjetilho/hacks/#listadmin">the
4840 listadmin program</a>. It allow you to check lists for new messages
4841 to moderate in a fraction of a second. Here is a test run on two
4842 lists I recently took over:</p>
4843
4844 <p><blockquote><pre>
4845 % time listadmin xiph
4846 fetching data for pkg-xiph-commits@lists.alioth.debian.org ... nothing in queue
4847 fetching data for pkg-xiph-maint@lists.alioth.debian.org ... nothing in queue
4848
4849 real 0m1.709s
4850 user 0m0.232s
4851 sys 0m0.012s
4852 %
4853 </pre></blockquote></p>
4854
4855 <p>In 1.7 seconds I had checked two mailing lists and confirmed that
4856 there are no message in the moderation queue. Every morning I
4857 currently moderate 68 mailman lists, and it normally take around two
4858 minutes. When I took over the two pkg-xiph lists above a few days
4859 ago, there were 400 emails waiting in the moderator queue. It took me
4860 less than 15 minutes to process them all using the listadmin
4861 program.</p>
4862
4863 <p>If you install
4864 <a href="https://tracker.debian.org/pkg/listadmin">the listadmin
4865 package</a> from Debian and create a file <tt>~/.listadmin.ini</tt>
4866 with content like this, the moderation task is a breeze:</p>
4867
4868 <p><blockquote><pre>
4869 username username@example.org
4870 spamlevel 23
4871 default discard
4872 discard_if_reason "Posting restricted to members only. Remove us from your mail list."
4873
4874 password secret
4875 adminurl https://{domain}/mailman/admindb/{list}
4876 mailman-list@lists.example.com
4877
4878 password hidden
4879 other-list@otherserver.example.org
4880 </pre></blockquote></p>
4881
4882 <p>There are other options to set as well. Check the manual page to
4883 learn the details.</p>
4884
4885 <p>If you are forced to moderate lists on a mailman installation where
4886 the SSL certificate is self signed or not properly signed by a
4887 generally accepted signing authority, you can set a environment
4888 variable when calling listadmin to disable SSL verification:</p>
4889
4890 <p><blockquote><pre>
4891 PERL_LWP_SSL_VERIFY_HOSTNAME=0 listadmin
4892 </pre></blockquote></p>
4893
4894 <p>If you want to moderate a subset of the lists you take care of, you
4895 can provide an argument to the listadmin script like I do in the
4896 initial screen dump (the xiph argument). Using an argument, only
4897 lists matching the argument string will be processed. This make it
4898 quick to accept messages if you notice the moderation request in your
4899 email.</p>
4900
4901 <p>Without the listadmin program, I would never be the moderator of 68
4902 mailing lists, as I simply do not have time to spend on that if the
4903 process was any slower. The listadmin program have saved me hours of
4904 time I could spend elsewhere over the years. It truly is nice free
4905 software.</p>
4906
4907 <p>As usual, if you use Bitcoin and want to show your support of my
4908 activities, please send Bitcoin donations to my address
4909 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
4910
4911 <p>Update 2014-10-27: Added missing 'username' statement in
4912 configuration example. Also, I've been told that the
4913 PERL_LWP_SSL_VERIFY_HOSTNAME=0 setting do not work for everyone. Not
4914 sure why.</p>
4915
4916 </div>
4917 <div class="tags">
4918
4919
4920 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software</a>.
4921
4922
4923 </div>
4924 </div>
4925 <div class="padding"></div>
4926
4927 <div class="entry">
4928 <div class="title">
4929 <a href="http://people.skolelinux.org/pere/blog/Debian_Jessie__PXE_and_automatic_firmware_installation.html">Debian Jessie, PXE and automatic firmware installation</a>
4930 </div>
4931 <div class="date">
4932 17th October 2014
4933 </div>
4934 <div class="body">
4935 <p>When PXE installing laptops with Debian, I often run into the
4936 problem that the WiFi card require some firmware to work properly.
4937 And it has been a pain to fix this using preseeding in Debian.
4938 Normally something more is needed. But thanks to
4939 <a href="https://packages.qa.debian.org/i/isenkram.html">my isenkram
4940 package</a> and its recent tasksel extension, it has now become easy
4941 to do this using simple preseeding.</p>
4942
4943 <p>The isenkram-cli package provide tasksel tasks which will install
4944 firmware for the hardware found in the machine (actually, requested by
4945 the kernel modules for the hardware). (It can also install user space
4946 programs supporting the hardware detected, but that is not the focus
4947 of this story.)</p>
4948
4949 <p>To get this working in the default installation, two preeseding
4950 values are needed. First, the isenkram-cli package must be installed
4951 into the target chroot (aka the hard drive) before tasksel is executed
4952 in the pkgsel step of the debian-installer system. This is done by
4953 preseeding the base-installer/includes debconf value to include the
4954 isenkram-cli package. The package name is next passed to debootstrap
4955 for installation. With the isenkram-cli package in place, tasksel
4956 will automatically use the isenkram tasks to detect hardware specific
4957 packages for the machine being installed and install them, because
4958 isenkram-cli contain tasksel tasks.</p>
4959
4960 <p>Second, one need to enable the non-free APT repository, because
4961 most firmware unfortunately is non-free. This is done by preseeding
4962 the apt-mirror-setup step. This is unfortunate, but for a lot of
4963 hardware it is the only option in Debian.</p>
4964
4965 <p>The end result is two lines needed in your preseeding file to get
4966 firmware installed automatically by the installer:</p>
4967
4968 <p><blockquote><pre>
4969 base-installer base-installer/includes string isenkram-cli
4970 apt-mirror-setup apt-setup/non-free boolean true
4971 </pre></blockquote></p>
4972
4973 <p>The current version of isenkram-cli in testing/jessie will install
4974 both firmware and user space packages when using this method. It also
4975 do not work well, so use version 0.15 or later. Installing both
4976 firmware and user space packages might give you a bit more than you
4977 want, so I decided to split the tasksel task in two, one for firmware
4978 and one for user space programs. The firmware task is enabled by
4979 default, while the one for user space programs is not. This split is
4980 implemented in the package currently in unstable.</p>
4981
4982 <p>If you decide to give this a go, please let me know (via email) how
4983 this recipe work for you. :)</p>
4984
4985 <p>So, I bet you are wondering, how can this work. First and
4986 foremost, it work because tasksel is modular, and driven by whatever
4987 files it find in /usr/lib/tasksel/ and /usr/share/tasksel/. So the
4988 isenkram-cli package place two files for tasksel to find. First there
4989 is the task description file (/usr/share/tasksel/descs/isenkram.desc):</p>
4990
4991 <p><blockquote><pre>
4992 Task: isenkram-packages
4993 Section: hardware
4994 Description: Hardware specific packages (autodetected by isenkram)
4995 Based on the detected hardware various hardware specific packages are
4996 proposed.
4997 Test-new-install: show show
4998 Relevance: 8
4999 Packages: for-current-hardware
5000
5001 Task: isenkram-firmware
5002 Section: hardware
5003 Description: Hardware specific firmware packages (autodetected by isenkram)
5004 Based on the detected hardware various hardware specific firmware
5005 packages are proposed.
5006 Test-new-install: mark show
5007 Relevance: 8
5008 Packages: for-current-hardware-firmware
5009 </pre></blockquote></p>
5010
5011 <p>The key parts are Test-new-install which indicate how the task
5012 should be handled and the Packages line referencing to a script in
5013 /usr/lib/tasksel/packages/. The scripts use other scripts to get a
5014 list of packages to install. The for-current-hardware-firmware script
5015 look like this to list relevant firmware for the machine:
5016
5017 <p><blockquote><pre>
5018 #!/bin/sh
5019 #
5020 PATH=/usr/sbin:$PATH
5021 export PATH
5022 isenkram-autoinstall-firmware -l
5023 </pre></blockquote></p>
5024
5025 <p>With those two pieces in place, the firmware is installed by
5026 tasksel during the normal d-i run. :)</p>
5027
5028 <p>If you want to test what tasksel will install when isenkram-cli is
5029 installed, run <tt>DEBIAN_PRIORITY=critical tasksel --test
5030 --new-install</tt> to get the list of packages that tasksel would
5031 install.</p>
5032
5033 <p><a href="https://wiki.debian.org/DebianEdu/">Debian Edu</a> will be
5034 pilots in testing this feature, as isenkram is used there now to
5035 install firmware, replacing the earlier scripts.</p>
5036
5037 </div>
5038 <div class="tags">
5039
5040
5041 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin</a>.
5042
5043
5044 </div>
5045 </div>
5046 <div class="padding"></div>
5047
5048 <div class="entry">
5049 <div class="title">
5050 <a href="http://people.skolelinux.org/pere/blog/Ubuntu_used_to_show_the_bread_prizes_at_ICA_Storo.html">Ubuntu used to show the bread prizes at ICA Storo</a>
5051 </div>
5052 <div class="date">
5053 4th October 2014
5054 </div>
5055 <div class="body">
5056 <p>Today I came across an unexpected Ubuntu boot screen. Above the
5057 bread shelf on the ICA shop at Storo in Oslo, the grub menu of Ubuntu
5058 with Linux kernel 3.2.0-23 (ie probably version 12.04 LTS) was stuck
5059 on a screen normally showing the bread types and prizes:</p>
5060
5061 <p align="center"><img width="70%" src="http://people.skolelinux.org/pere/blog/images/2014-10-04-ubuntu-ica-storo-crop.jpeg"></p>
5062
5063 <p>If it had booted as it was supposed to, I would never had known
5064 about this hidden Linux installation. It is interesting what
5065 <a href="http://revealingerrors.com/">errors can reveal</a>.</p>
5066
5067 </div>
5068 <div class="tags">
5069
5070
5071 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
5072
5073
5074 </div>
5075 </div>
5076 <div class="padding"></div>
5077
5078 <div class="entry">
5079 <div class="title">
5080 <a href="http://people.skolelinux.org/pere/blog/New_lsdvd_release_version_0_17_is_ready.html">New lsdvd release version 0.17 is ready</a>
5081 </div>
5082 <div class="date">
5083 4th October 2014
5084 </div>
5085 <div class="body">
5086 <p>The <a href="https://sourceforge.net/p/lsdvd/">lsdvd project</a>
5087 got a new set of developers a few weeks ago, after the original
5088 developer decided to step down and pass the project to fresh blood.
5089 This project is now maintained by Petter Reinholdtsen and Steve
5090 Dibb.</p>
5091
5092 <p>I just wrapped up
5093 <a href="https://sourceforge.net/p/lsdvd/mailman/message/32896061/">a
5094 new lsdvd release</a>, available in git or from
5095 <a href="https://sourceforge.net/projects/lsdvd/files/lsdvd/">the
5096 download page</a>. This is the changelog dated 2014-10-03 for version
5097 0.17.</p>
5098
5099 <ul>
5100
5101 <li>Ignore 'phantom' audio, subtitle tracks</li>
5102 <li>Check for garbage in the program chains, which indicate that a track is
5103 non-existant, to work around additional copy protection</li>
5104 <li>Fix displaying content type for audio tracks, subtitles</li>
5105 <li>Fix pallete display of first entry</li>
5106 <li>Fix include orders</li>
5107 <li>Ignore read errors in titles that would not be displayed anyway</li>
5108 <li>Fix the chapter count</li>
5109 <li>Make sure the array size and the array limit used when initialising
5110 the palette size is the same.</li>
5111 <li>Fix array printing.</li>
5112 <li>Correct subsecond calculations.</li>
5113 <li>Add sector information to the output format.</li>
5114 <li>Clean up code to be closer to ANSI C and compile without warnings
5115 with more GCC compiler warnings.</li>
5116
5117 </ul>
5118
5119 <p>This change bring together patches for lsdvd in use in various
5120 Linux and Unix distributions, as well as patches submitted to the
5121 project the last nine years. Please check it out. :)</p>
5122
5123 </div>
5124 <div class="tags">
5125
5126
5127 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>.
5128
5129
5130 </div>
5131 </div>
5132 <div class="padding"></div>
5133
5134 <div class="entry">
5135 <div class="title">
5136 <a href="http://people.skolelinux.org/pere/blog/How_to_test_Debian_Edu_Jessie_despite_some_fatal_problems_with_the_installer.html">How to test Debian Edu Jessie despite some fatal problems with the installer</a>
5137 </div>
5138 <div class="date">
5139 26th September 2014
5140 </div>
5141 <div class="body">
5142 <p>The <a href="http://www.skolelinux.org/">Debian Edu / Skolelinux
5143 project</a> provide a Linux solution for schools, including a
5144 powerful desktop with education software, a central server providing
5145 web pages, user database, user home directories, central login and PXE
5146 boot of both clients without disk and the installation to install Debian
5147 Edu on machines with disk (and a few other services perhaps to small
5148 to mention here). We in the Debian Edu team are currently working on
5149 the Jessie based version, trying to get everything in shape before the
5150 freeze, to avoid having to maintain our own package repository in the
5151 future. The
5152 <a href="https://wiki.debian.org/DebianEdu/Status/Jessie">current
5153 status</a> can be seen on the Debian wiki, and there is still heaps of
5154 work left. Some fatal problems block testing, breaking the installer,
5155 but it is possible to work around these to get anyway. Here is a
5156 recipe on how to get the installation limping along.</p>
5157
5158 <p>First, download the test ISO via
5159 <a href="ftp://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso">ftp</a>,
5160 <a href="http://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso">http</a>
5161 or rsync (use
5162 ftp.skolelinux.org::cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso).
5163 The ISO build was broken on Tuesday, so we do not get a new ISO every
5164 12 hours or so, but thankfully the ISO we already got we are able to
5165 install with some tweaking.</p>
5166
5167 <p>When you get to the Debian Edu profile question, go to tty2
5168 (use Alt-Ctrl-F2), run</p>
5169
5170 <p><blockquote><pre>
5171 nano /usr/bin/edu-eatmydata-install
5172 </pre></blockquote></p>
5173
5174 <p>and add 'exit 0' as the second line, disabling the eatmydata
5175 optimization. Return to the installation, select the profile you want
5176 and continue. Without this change, exim4-config will fail to install
5177 due to a known bug in eatmydata.</p>
5178
5179 <p>When you get the grub question at the end, answer /dev/sda (or if
5180 this do not work, figure out what your correct value would be. All my
5181 test machines need /dev/sda, so I have no advice if it do not fit
5182 your need.</p>
5183
5184 <p>If you installed a profile including a graphical desktop, log in as
5185 root after the initial boot from hard drive, and install the
5186 education-desktop-XXX metapackage. XXX can be kde, gnome, lxde, xfce
5187 or mate. If you want several desktop options, install more than one
5188 metapackage. Once this is done, reboot and you should have a working
5189 graphical login screen. This workaround should no longer be needed
5190 once the education-tasks package version 1.801 enter testing in two
5191 days.</p>
5192
5193 <p>I believe the ISO build will start working on two days when the new
5194 tasksel package enter testing and Steve McIntyre get a chance to
5195 update the debian-cd git repository. The eatmydata, grub and desktop
5196 issues are already fixed in unstable and testing, and should show up
5197 on the ISO as soon as the ISO build start working again. Well the
5198 eatmydata optimization is really just disabled. The proper fix
5199 require an upload by the eatmydata maintainer applying the patch
5200 provided in bug <a href="https://bugs.debian.org/702711">#702711</a>.
5201 The rest have proper fixes in unstable.</p>
5202
5203 <p>I hope this get you going with the installation testing, as we are
5204 quickly running out of time trying to get our Jessie based
5205 installation ready before the distribution freeze in a month.</p>
5206
5207 </div>
5208 <div class="tags">
5209
5210
5211 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
5212
5213
5214 </div>
5215 </div>
5216 <div class="padding"></div>
5217
5218 <div class="entry">
5219 <div class="title">
5220 <a href="http://people.skolelinux.org/pere/blog/Suddenly_I_am_the_new_upstream_of_the_lsdvd_command_line_tool.html">Suddenly I am the new upstream of the lsdvd command line tool</a>
5221 </div>
5222 <div class="date">
5223 25th September 2014
5224 </div>
5225 <div class="body">
5226 <p>I use the <a href="https://sourceforge.net/p/lsdvd/">lsdvd tool</a>
5227 to handle my fairly large DVD collection. It is a nice command line
5228 tool to get details about a DVD, like title, tracks, track length,
5229 etc, in XML, Perl or human readable format. But lsdvd have not seen
5230 any new development since 2006 and had a few irritating bugs affecting
5231 its use with some DVDs. Upstream seemed to be dead, and in January I
5232 sent a small probe asking for a version control repository for the
5233 project, without any reply. But I use it regularly and would like to
5234 get <a href="https://packages.qa.debian.org/lsdvd">an updated version
5235 into Debian</a>. So two weeks ago I tried harder to get in touch with
5236 the project admin, and after getting a reply from him explaining that
5237 he was no longer interested in the project, I asked if I could take
5238 over. And yesterday, I became project admin.</p>
5239
5240 <p>I've been in touch with a Gentoo developer and the Debian
5241 maintainer interested in joining forces to maintain the upstream
5242 project, and I hope we can get a new release out fairly quickly,
5243 collecting the patches spread around on the internet into on place.
5244 I've added the relevant Debian patches to the freshly created git
5245 repository, and expect the Gentoo patches to make it too. If you got
5246 a DVD collection and care about command line tools, check out
5247 <a href="https://sourceforge.net/p/lsdvd/git/ci/master/tree/">the git source</a> and join
5248 <a href="https://sourceforge.net/p/lsdvd/mailman/">the project mailing
5249 list</a>. :)</p>
5250
5251 </div>
5252 <div class="tags">
5253
5254
5255 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>.
5256
5257
5258 </div>
5259 </div>
5260 <div class="padding"></div>
5261
5262 <div class="entry">
5263 <div class="title">
5264 <a href="http://people.skolelinux.org/pere/blog/Speeding_up_the_Debian_installer_using_eatmydata_and_dpkg_divert.html">Speeding up the Debian installer using eatmydata and dpkg-divert</a>
5265 </div>
5266 <div class="date">
5267 16th September 2014
5268 </div>
5269 <div class="body">
5270 <p>The <a href="https://www.debian.org/">Debian</a> installer could be
5271 a lot quicker. When we install more than 2000 packages in
5272 <a href="http://www.skolelinux.org/">Skolelinux / Debian Edu</a> using
5273 tasksel in the installer, unpacking the binary packages take forever.
5274 A part of the slow I/O issue was discussed in
5275 <a href="https://bugs.debian.org/613428">bug #613428</a> about too
5276 much file system sync-ing done by dpkg, which is the package
5277 responsible for unpacking the binary packages. Other parts (like code
5278 executed by postinst scripts) might also sync to disk during
5279 installation. All this sync-ing to disk do not really make sense to
5280 me. If the machine crash half-way through, I start over, I do not try
5281 to salvage the half installed system. So the failure sync-ing is
5282 supposed to protect against, hardware or system crash, is not really
5283 relevant while the installer is running.</p>
5284
5285 <p>A few days ago, I thought of a way to get rid of all the file
5286 system sync()-ing in a fairly non-intrusive way, without the need to
5287 change the code in several packages. The idea is not new, but I have
5288 not heard anyone propose the approach using dpkg-divert before. It
5289 depend on the small and clever package
5290 <a href="https://packages.qa.debian.org/eatmydata">eatmydata</a>, which
5291 uses LD_PRELOAD to replace the system functions for syncing data to
5292 disk with functions doing nothing, thus allowing programs to live
5293 dangerous while speeding up disk I/O significantly. Instead of
5294 modifying the implementation of dpkg, apt and tasksel (which are the
5295 packages responsible for selecting, fetching and installing packages),
5296 it occurred to me that we could just divert the programs away, replace
5297 them with a simple shell wrapper calling
5298 "eatmydata&nbsp;$program&nbsp;$@", to get the same effect.
5299 Two days ago I decided to test the idea, and wrapped up a simple
5300 implementation for the Debian Edu udeb.</p>
5301
5302 <p>The effect was stunning. In my first test it reduced the running
5303 time of the pkgsel step (installing tasks) from 64 to less than 44
5304 minutes (20 minutes shaved off the installation) on an old Dell
5305 Latitude D505 machine. I am not quite sure what the optimised time
5306 would have been, as I messed up the testing a bit, causing the debconf
5307 priority to get low enough for two questions to pop up during
5308 installation. As soon as I saw the questions I moved the installation
5309 along, but do not know how long the question were holding up the
5310 installation. I did some more measurements using Debian Edu Jessie,
5311 and got these results. The time measured is the time stamp in
5312 /var/log/syslog between the "pkgsel: starting tasksel" and the
5313 "pkgsel: finishing up" lines, if you want to do the same measurement
5314 yourself. In Debian Edu, the tasksel dialog do not show up, and the
5315 timing thus do not depend on how quickly the user handle the tasksel
5316 dialog.</p>
5317
5318 <p><table>
5319
5320 <tr>
5321 <th>Machine/setup</th>
5322 <th>Original tasksel</th>
5323 <th>Optimised tasksel</th>
5324 <th>Reduction</th>
5325 </tr>
5326
5327 <tr>
5328 <td>Latitude D505 Main+LTSP LXDE</td>
5329 <td>64 min (07:46-08:50)</td>
5330 <td><44 min (11:27-12:11)</td>
5331 <td>>20 min 18%</td>
5332 </tr>
5333
5334 <tr>
5335 <td>Latitude D505 Roaming LXDE</td>
5336 <td>57 min (08:48-09:45)</td>
5337 <td>34 min (07:43-08:17)</td>
5338 <td>23 min 40%</td>
5339 </tr>
5340
5341 <tr>
5342 <td>Latitude D505 Minimal</td>
5343 <td>22 min (10:37-10:59)</td>
5344 <td>11 min (11:16-11:27)</td>
5345 <td>11 min 50%</td>
5346 </tr>
5347
5348 <tr>
5349 <td>Thinkpad X200 Minimal</td>
5350 <td>6 min (08:19-08:25)</td>
5351 <td>4 min (08:04-08:08)</td>
5352 <td>2 min 33%</td>
5353 </tr>
5354
5355 <tr>
5356 <td>Thinkpad X200 Roaming KDE</td>
5357 <td>19 min (09:21-09:40)</td>
5358 <td>15 min (10:25-10:40)</td>
5359 <td>4 min 21%</td>
5360 </tr>
5361
5362 </table></p>
5363
5364 <p>The test is done using a netinst ISO on a USB stick, so some of the
5365 time is spent downloading packages. The connection to the Internet
5366 was 100Mbit/s during testing, so downloading should not be a
5367 significant factor in the measurement. Download typically took a few
5368 seconds to a few minutes, depending on the amount of packages being
5369 installed.</p>
5370
5371 <p>The speedup is implemented by using two hooks in
5372 <a href="https://www.debian.org/devel/debian-installer/">Debian
5373 Installer</a>, the pre-pkgsel.d hook to set up the diverts, and the
5374 finish-install.d hook to remove the divert at the end of the
5375 installation. I picked the pre-pkgsel.d hook instead of the
5376 post-base-installer.d hook because I test using an ISO without the
5377 eatmydata package included, and the post-base-installer.d hook in
5378 Debian Edu can only operate on packages included in the ISO. The
5379 negative effect of this is that I am unable to activate this
5380 optimization for the kernel installation step in d-i. If the code is
5381 moved to the post-base-installer.d hook, the speedup would be larger
5382 for the entire installation.</p>
5383
5384 <p>I've implemented this in the
5385 <a href="https://packages.qa.debian.org/debian-edu-install">debian-edu-install</a>
5386 git repository, and plan to provide the optimization as part of the
5387 Debian Edu installation. If you want to test this yourself, you can
5388 create two files in the installer (or in an udeb). One shell script
5389 need do go into /usr/lib/pre-pkgsel.d/, with content like this:</p>
5390
5391 <p><blockquote><pre>
5392 #!/bin/sh
5393 set -e
5394 . /usr/share/debconf/confmodule
5395 info() {
5396 logger -t my-pkgsel "info: $*"
5397 }
5398 error() {
5399 logger -t my-pkgsel "error: $*"
5400 }
5401 override_install() {
5402 apt-install eatmydata || true
5403 if [ -x /target/usr/bin/eatmydata ] ; then
5404 for bin in dpkg apt-get aptitude tasksel ; do
5405 file=/usr/bin/$bin
5406 # Test that the file exist and have not been diverted already.
5407 if [ -f /target$file ] ; then
5408 info "diverting $file using eatmydata"
5409 printf "#!/bin/sh\neatmydata $bin.distrib \"\$@\"\n" \
5410 > /target$file.edu
5411 chmod 755 /target$file.edu
5412 in-target dpkg-divert --package debian-edu-config \
5413 --rename --quiet --add $file
5414 ln -sf ./$bin.edu /target$file
5415 else
5416 error "unable to divert $file, as it is missing."
5417 fi
5418 done
5419 else
5420 error "unable to find /usr/bin/eatmydata after installing the eatmydata pacage"
5421 fi
5422 }
5423
5424 override_install
5425 </pre></blockquote></p>
5426
5427 <p>To clean up, another shell script should go into
5428 /usr/lib/finish-install.d/ with code like this:
5429
5430 <p><blockquote><pre>
5431 #! /bin/sh -e
5432 . /usr/share/debconf/confmodule
5433 error() {
5434 logger -t my-finish-install "error: $@"
5435 }
5436 remove_install_override() {
5437 for bin in dpkg apt-get aptitude tasksel ; do
5438 file=/usr/bin/$bin
5439 if [ -x /target$file.edu ] ; then
5440 rm /target$file
5441 in-target dpkg-divert --package debian-edu-config \
5442 --rename --quiet --remove $file
5443 rm /target$file.edu
5444 else
5445 error "Missing divert for $file."
5446 fi
5447 done
5448 sync # Flush file buffers before continuing
5449 }
5450
5451 remove_install_override
5452 </pre></blockquote></p>
5453
5454 <p>In Debian Edu, I placed both code fragments in a separate script
5455 edu-eatmydata-install and call it from the pre-pkgsel.d and
5456 finish-install.d scripts.</p>
5457
5458 <p>By now you might ask if this change should get into the normal
5459 Debian installer too? I suspect it should, but am not sure the
5460 current debian-installer coordinators find it useful enough. It also
5461 depend on the side effects of the change. I'm not aware of any, but I
5462 guess we will see if the change is safe after some more testing.
5463 Perhaps there is some package in Debian depending on sync() and
5464 fsync() having effect? Perhaps it should go into its own udeb, to
5465 allow those of us wanting to enable it to do so without affecting
5466 everyone.</p>
5467
5468 <p>Update 2014-09-24: Since a few days ago, enabling this optimization
5469 will break installation of all programs using gnutls because of
5470 <a href="https://bugs.debian.org/702711">bug #702711</a>. An updated
5471 eatmydata package in Debian will solve it.</p>
5472
5473 <p>Update 2014-10-17: The bug mentioned above is fixed in testing and
5474 the optimization work again. And I have discovered that the
5475 dpkg-divert trick is not really needed and implemented a slightly
5476 simpler approach as part of the debian-edu-install package. See
5477 tools/edu-eatmydata-install in the source package.</p>
5478
5479 <p>Update 2014-11-11: Unfortunately, a new
5480 <a href="http://bugs.debian.org/765738">bug #765738</a> in eatmydata only
5481 triggering on i386 made it into testing, and broke this installation
5482 optimization again. If <a href="http://bugs.debian.org/768893">unblock
5483 request 768893</a> is accepted, it should be working again.</p>
5484
5485 </div>
5486 <div class="tags">
5487
5488
5489 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
5490
5491
5492 </div>
5493 </div>
5494 <div class="padding"></div>
5495
5496 <div class="entry">
5497 <div class="title">
5498 <a href="http://people.skolelinux.org/pere/blog/Good_bye_subkeys_pgp_net__welcome_pool_sks_keyservers_net.html">Good bye subkeys.pgp.net, welcome pool.sks-keyservers.net</a>
5499 </div>
5500 <div class="date">
5501 10th September 2014
5502 </div>
5503 <div class="body">
5504 <p>Yesterday, I had the pleasure of attending a talk with the
5505 <a href="http://www.nuug.no/">Norwegian Unix User Group</a> about
5506 <a href="http://www.nuug.no/aktiviteter/20140909-sks-keyservers/">the
5507 OpenPGP keyserver pool sks-keyservers.net</a>, and was very happy to
5508 learn that there is a large set of publicly available key servers to
5509 use when looking for peoples public key. So far I have used
5510 subkeys.pgp.net, and some times wwwkeys.nl.pgp.net when the former
5511 were misbehaving, but those days are ended. The servers I have used
5512 up until yesterday have been slow and some times unavailable. I hope
5513 those problems are gone now.</p>
5514
5515 <p>Behind the round robin DNS entry of the
5516 <a href="https://sks-keyservers.net/">sks-keyservers.net</a> service
5517 there is a pool of more than 100 keyservers which are checked every
5518 day to ensure they are well connected and up to date. It must be
5519 better than what I have used so far. :)</p>
5520
5521 <p>Yesterdays speaker told me that the service is the default
5522 keyserver provided by the default configuration in GnuPG, but this do
5523 not seem to be used in Debian. Perhaps it should?</p>
5524
5525 <p>Anyway, I've updated my ~/.gnupg/options file to now include this
5526 line:</p>
5527
5528 <p><blockquote><pre>
5529 keyserver pool.sks-keyservers.net
5530 </pre></blockquote></p>
5531
5532 <p>With GnuPG version 2 one can also locate the keyserver using SRV
5533 entries in DNS. Just for fun, I did just that at work, so now every
5534 user of GnuPG at the University of Oslo should find a OpenGPG
5535 keyserver automatically should their need it:</p>
5536
5537 <p><blockquote><pre>
5538 % host -t srv _pgpkey-http._tcp.uio.no
5539 _pgpkey-http._tcp.uio.no has SRV record 0 100 11371 pool.sks-keyservers.net.
5540 %
5541 </pre></blockquote></p>
5542
5543 <p>Now if only
5544 <a href="http://ietfreport.isoc.org/idref/draft-shaw-openpgp-hkp/">the
5545 HKP lookup protocol</a> supported finding signature paths, I would be
5546 very happy. It can look up a given key or search for a user ID, but I
5547 normally do not want that, but to find a trust path from my key to
5548 another key. Given a user ID or key ID, I would like to find (and
5549 download) the keys representing a signature path from my key to the
5550 key in question, to be able to get a trust path between the two keys.
5551 This is as far as I can tell not possible today. Perhaps something
5552 for a future version of the protocol?</p>
5553
5554 </div>
5555 <div class="tags">
5556
5557
5558 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
5559
5560
5561 </div>
5562 </div>
5563 <div class="padding"></div>
5564
5565 <div class="entry">
5566 <div class="title">
5567 <a href="http://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html">From English wiki to translated PDF and epub via Docbook</a>
5568 </div>
5569 <div class="date">
5570 17th June 2014
5571 </div>
5572 <div class="body">
5573 <p>The <a href="http://www.skolelinux.org/">Debian Edu / Skolelinux
5574 project</a> provide an instruction manual for teachers, system
5575 administrators and other users that contain useful tips for setting up
5576 and maintaining a Debian Edu installation. This text is about how the
5577 text processing of this manual is handled in the project.</p>
5578
5579 <p>One goal of the project is to provide information in the native
5580 language of its users, and for this we need to handle translations.
5581 But we also want to make sure each language contain the same
5582 information, so for this we need a good way to keep the translations
5583 in sync. And we want it to be easy for our users to improve the
5584 documentation, avoiding the need to learn special formats or tools to
5585 contribute, and the obvious way to do this is to make it possible to
5586 edit the documentation using a web browser. We also want it to be
5587 easy for translators to keep the translation up to date, and give them
5588 help in figuring out what need to be translated. Here is the list of
5589 tools and the process we have found trying to reach all these
5590 goals.</p>
5591
5592 <p>We maintain the authoritative source of our manual in the
5593 <a href="https://wiki.debian.org/DebianEdu/Documentation/Wheezy/">Debian
5594 wiki</a>, as several wiki pages written in English. It consist of one
5595 front page with references to the different chapters, several pages
5596 for each chapter, and finally one "collection page" gluing all the
5597 chapters together into one large web page (aka
5598 <a href="https://wiki.debian.org/DebianEdu/Documentation/Wheezy/AllInOne">the
5599 AllInOne page</a>). The AllInOne page is the one used for further
5600 processing and translations. Thanks to the fact that the
5601 <a href="http://moinmo.in/">MoinMoin</a> installation on
5602 wiki.debian.org support exporting pages in
5603 <a href="http://www.docbook.org/">the Docbook format</a>, we can fetch
5604 the list of pages to export using the raw version of the AllInOne
5605 page, loop over each of them to generate a Docbook XML version of the
5606 manual. This process also download images and transform image
5607 references to use the locally downloaded images. The generated
5608 Docbook XML files are slightly broken, so some post-processing is done
5609 using the <tt>documentation/scripts/get_manual</tt> program, and the
5610 result is a nice Docbook XML file (debian-edu-wheezy-manual.xml) and
5611 a handfull of images. The XML file can now be used to generate PDF, HTML
5612 and epub versions of the English manual. This is the basic step of
5613 our process, making PDF (using dblatex), HTML (using xsltproc) and
5614 epub (using dbtoepub) version from Docbook XML, and the resulting files
5615 are placed in the debian-edu-doc-en binary package.</p>
5616
5617 <p>But English documentation is not enough for us. We want translated
5618 documentation too, and we want to make it easy for translators to
5619 track the English original. For this we use the
5620 <a href="http://packages.qa.debian.org/p/poxml.html">poxml</a> package,
5621 which allow us to transform the English Docbook XML file into a
5622 translation file (a .pot file), usable with the normal gettext based
5623 translation tools used by those translating free software. The pot
5624 file is used to create and maintain translation files (several .po
5625 files), which the translations update with the native language
5626 translations of all titles, paragraphs and blocks of text in the
5627 original. The next step is combining the original English Docbook XML
5628 and the translation file (say debian-edu-wheezy-manual.nb.po), to
5629 create a translated Docbook XML file (in this case
5630 debian-edu-wheezy-manual.nb.xml). This translated (or partly
5631 translated, if the translation is not complete) Docbook XML file can
5632 then be used like the original to create a PDF, HTML and epub version
5633 of the documentation.</p>
5634
5635 <p>The translators use different tools to edit the .po files. We
5636 recommend using
5637 <a href="http://www.kde.org/applications/development/lokalize/">lokalize</a>,
5638 while some use emacs and vi, others can use web based editors like
5639 <a href="http://pootle.translatehouse.org/">Poodle</a> or
5640 <a href="https://www.transifex.com/">Transifex</a>. All we care about
5641 is where the .po file end up, in our git repository. Updated
5642 translations can either be committed directly to git, or submitted as
5643 <a href="https://bugs.debian.org/src:debian-edu-doc">bug reports
5644 against the debian-edu-doc package</a>.</p>
5645
5646 <p>One challenge is images, which both might need to be translated (if
5647 they show translated user applications), and are needed in different
5648 formats when creating PDF and HTML versions (epub is a HTML version in
5649 this regard). For this we transform the original PNG images to the
5650 needed density and format during build, and have a way to provide
5651 translated images by storing translated versions in
5652 images/$LANGUAGECODE/. I am a bit unsure about the details here. The
5653 package maintainers know more.</p>
5654
5655 <p>If you wonder what the result look like, we provide
5656 <a href="http://maintainer.skolelinux.org/debian-edu-doc/">the content
5657 of the documentation packages on the web</a>. See for example the
5658 <a href="http://maintainer.skolelinux.org/debian-edu-doc/it/debian-edu-wheezy-manual.pdf">Italian
5659 PDF version</a> or the
5660 <a href="http://maintainer.skolelinux.org/debian-edu-doc/de/debian-edu-wheezy-manual.html">German
5661 HTML version</a>. We do not yet build the epub version by default,
5662 but perhaps it will be done in the future.</p>
5663
5664 <p>To learn more, check out
5665 <a href="http://packages.qa.debian.org/d/debian-edu-doc.html">the
5666 debian-edu-doc package</a>,
5667 <a href="https://wiki.debian.org/DebianEdu/Documentation/Wheezy/">the
5668 manual on the wiki</a> and
5669 <a href="https://wiki.debian.org/DebianEdu/Documentation/Wheezy/Translations">the
5670 translation instructions</a> in the manual.</p>
5671
5672 </div>
5673 <div class="tags">
5674
5675
5676 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
5677
5678
5679 </div>
5680 </div>
5681 <div class="padding"></div>
5682
5683 <div class="entry">
5684 <div class="title">
5685 <a href="http://people.skolelinux.org/pere/blog/Install_hardware_dependent_packages_using_tasksel__Isenkram_0_7_.html">Install hardware dependent packages using tasksel (Isenkram 0.7)</a>
5686 </div>
5687 <div class="date">
5688 23rd April 2014
5689 </div>
5690 <div class="body">
5691 <p>It would be nice if it was easier in Debian to get all the hardware
5692 related packages relevant for the computer installed automatically.
5693 So I implemented one, using
5694 <a href="http://packages.qa.debian.org/isenkram">my Isenkram
5695 package</a>. To use it, install the tasksel and isenkram packages and
5696 run tasksel as user root. You should be presented with a new option,
5697 "Hardware specific packages (autodetected by isenkram)". When you
5698 select it, tasksel will install the packages isenkram claim is fit for
5699 the current hardware, hot pluggable or not.<p>
5700
5701 <p>The implementation is in two files, one is the tasksel menu entry
5702 description, and the other is the script used to extract the list of
5703 packages to install. The first part is in
5704 <tt>/usr/share/tasksel/descs/isenkram.desc</tt> and look like
5705 this:</p>
5706
5707 <p><blockquote><pre>
5708 Task: isenkram
5709 Section: hardware
5710 Description: Hardware specific packages (autodetected by isenkram)
5711 Based on the detected hardware various hardware specific packages are
5712 proposed.
5713 Test-new-install: mark show
5714 Relevance: 8
5715 Packages: for-current-hardware
5716 </pre></blockquote></p>
5717
5718 <p>The second part is in
5719 <tt>/usr/lib/tasksel/packages/for-current-hardware</tt> and look like
5720 this:</p>
5721
5722 <p><blockquote><pre>
5723 #!/bin/sh
5724 #
5725 (
5726 isenkram-lookup
5727 isenkram-autoinstall-firmware -l
5728 ) | sort -u
5729 </pre></blockquote></p>
5730
5731 <p>All in all, a very short and simple implementation making it
5732 trivial to install the hardware dependent package we all may want to
5733 have installed on our machines. I've not been able to find a way to
5734 get tasksel to tell you exactly which packages it plan to install
5735 before doing the installation. So if you are curious or careful,
5736 check the output from the isenkram-* command line tools first.</p>
5737
5738 <p>The information about which packages are handling which hardware is
5739 fetched either from the isenkram package itself in
5740 /usr/share/isenkram/, from git.debian.org or from the APT package
5741 database (using the Modaliases header). The APT package database
5742 parsing have caused a nasty resource leak in the isenkram daemon (bugs
5743 <a href="http://bugs.debian.org/719837">#719837</a> and
5744 <a href="http://bugs.debian.org/730704">#730704</a>). The cause is in
5745 the python-apt code (bug
5746 <a href="http://bugs.debian.org/745487">#745487</a>), but using a
5747 workaround I was able to get rid of the file descriptor leak and
5748 reduce the memory leak from ~30 MiB per hardware detection down to
5749 around 2 MiB per hardware detection. It should make the desktop
5750 daemon a lot more useful. The fix is in version 0.7 uploaded to
5751 unstable today.</p>
5752
5753 <p>I believe the current way of mapping hardware to packages in
5754 Isenkram is is a good draft, but in the future I expect isenkram to
5755 use the AppStream data source for this. A proposal for getting proper
5756 AppStream support into Debian is floating around as
5757 <a href="https://wiki.debian.org/DEP-11">DEP-11</a>, and
5758 <a href="https://wiki.debian.org/SummerOfCode2014/Projects#SummerOfCode2014.2FProjects.2FAppStreamDEP11Implementation.AppStream.2FDEP-11_for_the_Debian_Archive">GSoC
5759 project</a> will take place this summer to improve the situation. I
5760 look forward to seeing the result, and welcome patches for isenkram to
5761 start using the information when it is ready.</p>
5762
5763 <p>If you want your package to map to some specific hardware, either
5764 add a "Xb-Modaliases" header to your control file like I did in
5765 <a href="http://packages.qa.debian.org/pymissile">the pymissile
5766 package</a> or submit a bug report with the details to the isenkram
5767 package. See also
5768 <a href="http://people.skolelinux.org/pere/blog/tags/isenkram/">all my
5769 blog posts tagged isenkram</a> for details on the notation. I expect
5770 the information will be migrated to AppStream eventually, but for the
5771 moment I got no better place to store it.</p>
5772
5773 </div>
5774 <div class="tags">
5775
5776
5777 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
5778
5779
5780 </div>
5781 </div>
5782 <div class="padding"></div>
5783
5784 <div class="entry">
5785 <div class="title">
5786 <a href="http://people.skolelinux.org/pere/blog/FreedomBox_milestone___all_packages_now_in_Debian_Sid.html">FreedomBox milestone - all packages now in Debian Sid</a>
5787 </div>
5788 <div class="date">
5789 15th April 2014
5790 </div>
5791 <div class="body">
5792 <p>The <a href="https://wiki.debian.org/FreedomBox">Freedombox
5793 project</a> is working on providing the software and hardware to make
5794 it easy for non-technical people to host their data and communication
5795 at home, and being able to communicate with their friends and family
5796 encrypted and away from prying eyes. It is still going strong, and
5797 today a major mile stone was reached.</p>
5798
5799 <p>Today, the last of the packages currently used by the project to
5800 created the system images were accepted into Debian Unstable. It was
5801 the freedombox-setup package, which is used to configure the images
5802 during build and on the first boot. Now all one need to get going is
5803 the build code from the freedom-maker git repository and packages from
5804 Debian. And once the freedombox-setup package enter testing, we can
5805 build everything directly from Debian. :)</p>
5806
5807 <p>Some key packages used by Freedombox are
5808 <a href="http://packages.qa.debian.org/freedombox-setup">freedombox-setup</a>,
5809 <a href="http://packages.qa.debian.org/plinth">plinth</a>,
5810 <a href="http://packages.qa.debian.org/pagekite">pagekite</a>,
5811 <a href="http://packages.qa.debian.org/tor">tor</a>,
5812 <a href="http://packages.qa.debian.org/privoxy">privoxy</a>,
5813 <a href="http://packages.qa.debian.org/owncloud">owncloud</a> and
5814 <a href="http://packages.qa.debian.org/dnsmasq">dnsmasq</a>. There
5815 are plans to integrate more packages into the setup. User
5816 documentation is maintained on the Debian wiki. Please
5817 <a href="https://wiki.debian.org/FreedomBox/Manual/Jessie">check out
5818 the manual</a> and help us improve it.</p>
5819
5820 <p>To test for yourself and create boot images with the FreedomBox
5821 setup, run this on a Debian machine using a user with sudo rights to
5822 become root:</p>
5823
5824 <p><pre>
5825 sudo apt-get install git vmdebootstrap mercurial python-docutils \
5826 mktorrent extlinux virtualbox qemu-user-static binfmt-support \
5827 u-boot-tools
5828 git clone http://anonscm.debian.org/git/freedombox/freedom-maker.git \
5829 freedom-maker
5830 make -C freedom-maker dreamplug-image raspberry-image virtualbox-image
5831 </pre></p>
5832
5833 <p>Root access is needed to run debootstrap and mount loopback
5834 devices. See the README in the freedom-maker git repo for more
5835 details on the build. If you do not want all three images, trim the
5836 make line. Note that the virtualbox-image target is not really
5837 virtualbox specific. It create a x86 image usable in kvm, qemu,
5838 vmware and any other x86 virtual machine environment. You might need
5839 the version of vmdebootstrap in Jessie to get the build working, as it
5840 include fixes for a race condition with kpartx.</p>
5841
5842 <p>If you instead want to install using a Debian CD and the preseed
5843 method, boot a Debian Wheezy ISO and use this boot argument to load
5844 the preseed values:</p>
5845
5846 <p><pre>
5847 url=<a href="http://www.reinholdtsen.name/freedombox/preseed-jessie.dat">http://www.reinholdtsen.name/freedombox/preseed-jessie.dat</a>
5848 </pre></p>
5849
5850 <p>I have not tested it myself the last few weeks, so I do not know if
5851 it still work.</p>
5852
5853 <p>If you wonder how to help, one task you could look at is using
5854 systemd as the boot system. It will become the default for Linux in
5855 Jessie, so we need to make sure it is usable on the Freedombox. I did
5856 a simple test a few weeks ago, and noticed dnsmasq failed to start
5857 during boot when using systemd. I suspect there are other problems
5858 too. :) To detect problems, there is a test suite included, which can
5859 be run from the plinth web interface.</p>
5860
5861 <p>Give it a go and let us know how it goes on the mailing list, and help
5862 us get the new release published. :) Please join us on
5863 <a href="irc://irc.debian.org:6667/%23freedombox">IRC (#freedombox on
5864 irc.debian.org)</a> and
5865 <a href="http://lists.alioth.debian.org/mailman/listinfo/freedombox-discuss">the
5866 mailing list</a> if you want to help make this vision come true.</p>
5867
5868 </div>
5869 <div class="tags">
5870
5871
5872 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
5873
5874
5875 </div>
5876 </div>
5877 <div class="padding"></div>
5878
5879 <div class="entry">
5880 <div class="title">
5881 <a href="http://people.skolelinux.org/pere/blog/S3QL__a_locally_mounted_cloud_file_system___nice_free_software.html">S3QL, a locally mounted cloud file system - nice free software</a>
5882 </div>
5883 <div class="date">
5884 9th April 2014
5885 </div>
5886 <div class="body">
5887 <p>For a while now, I have been looking for a sensible offsite backup
5888 solution for use at home. My requirements are simple, it must be
5889 cheap and locally encrypted (in other words, I keep the encryption
5890 keys, the storage provider do not have access to my private files).
5891 One idea me and my friends had many years ago, before the cloud
5892 storage providers showed up, was to use Google mail as storage,
5893 writing a Linux block device storing blocks as emails in the mail
5894 service provided by Google, and thus get heaps of free space. On top
5895 of this one can add encryption, RAID and volume management to have
5896 lots of (fairly slow, I admit that) cheap and encrypted storage. But
5897 I never found time to implement such system. But the last few weeks I
5898 have looked at a system called
5899 <a href="https://bitbucket.org/nikratio/s3ql/">S3QL</a>, a locally
5900 mounted network backed file system with the features I need.</p>
5901
5902 <p>S3QL is a fuse file system with a local cache and cloud storage,
5903 handling several different storage providers, any with Amazon S3,
5904 Google Drive or OpenStack API. There are heaps of such storage
5905 providers. S3QL can also use a local directory as storage, which
5906 combined with sshfs allow for file storage on any ssh server. S3QL
5907 include support for encryption, compression, de-duplication, snapshots
5908 and immutable file systems, allowing me to mount the remote storage as
5909 a local mount point, look at and use the files as if they were local,
5910 while the content is stored in the cloud as well. This allow me to
5911 have a backup that should survive fire. The file system can not be
5912 shared between several machines at the same time, as only one can
5913 mount it at the time, but any machine with the encryption key and
5914 access to the storage service can mount it if it is unmounted.</p>
5915
5916 <p>It is simple to use. I'm using it on Debian Wheezy, where the
5917 package is included already. So to get started, run <tt>apt-get
5918 install s3ql</tt>. Next, pick a storage provider. I ended up picking
5919 Greenqloud, after reading their nice recipe on
5920 <a href="https://greenqloud.zendesk.com/entries/44611757-How-To-Use-S3QL-to-mount-a-StorageQloud-bucket-on-Debian-Wheezy">how
5921 to use S3QL with their Amazon S3 service</a>, because I trust the laws
5922 in Iceland more than those in USA when it come to keeping my personal
5923 data safe and private, and thus would rather spend money on a company
5924 in Iceland. Another nice recipe is available from the article
5925 <a href="http://www.admin-magazine.com/HPC/Articles/HPC-Cloud-Storage">S3QL
5926 Filesystem for HPC Storage</a> by Jeff Layton in the HPC section of
5927 Admin magazine. When the provider is picked, figure out how to get
5928 the API key needed to connect to the storage API. With Greencloud,
5929 the key did not show up until I had added payment details to my
5930 account.</p>
5931
5932 <p>Armed with the API access details, it is time to create the file
5933 system. First, create a new bucket in the cloud. This bucket is the
5934 file system storage area. I picked a bucket name reflecting the
5935 machine that was going to store data there, but any name will do.
5936 I'll refer to it as <tt>bucket-name</tt> below. In addition, one need
5937 the API login and password, and a locally created password. Store it
5938 all in ~root/.s3ql/authinfo2 like this:
5939
5940 <p><blockquote><pre>
5941 [s3c]
5942 storage-url: s3c://s.greenqloud.com:443/bucket-name
5943 backend-login: API-login
5944 backend-password: API-password
5945 fs-passphrase: local-password
5946 </pre></blockquote></p>
5947
5948 <p>I create my local passphrase using <tt>pwget 50</tt> or similar,
5949 but any sensible way to create a fairly random password should do it.
5950 Armed with these details, it is now time to run mkfs, entering the API
5951 details and password to create it:</p>
5952
5953 <p><blockquote><pre>
5954 # mkdir -m 700 /var/lib/s3ql-cache
5955 # mkfs.s3ql --cachedir /var/lib/s3ql-cache --authfile /root/.s3ql/authinfo2 \
5956 --ssl s3c://s.greenqloud.com:443/bucket-name
5957 Enter backend login:
5958 Enter backend password:
5959 Before using S3QL, make sure to read the user's guide, especially
5960 the 'Important Rules to Avoid Loosing Data' section.
5961 Enter encryption password:
5962 Confirm encryption password:
5963 Generating random encryption key...
5964 Creating metadata tables...
5965 Dumping metadata...
5966 ..objects..
5967 ..blocks..
5968 ..inodes..
5969 ..inode_blocks..
5970 ..symlink_targets..
5971 ..names..
5972 ..contents..
5973 ..ext_attributes..
5974 Compressing and uploading metadata...
5975 Wrote 0.00 MB of compressed metadata.
5976 # </pre></blockquote></p>
5977
5978 <p>The next step is mounting the file system to make the storage available.
5979
5980 <p><blockquote><pre>
5981 # mount.s3ql --cachedir /var/lib/s3ql-cache --authfile /root/.s3ql/authinfo2 \
5982 --ssl --allow-root s3c://s.greenqloud.com:443/bucket-name /s3ql
5983 Using 4 upload threads.
5984 Downloading and decompressing metadata...
5985 Reading metadata...
5986 ..objects..
5987 ..blocks..
5988 ..inodes..
5989 ..inode_blocks..
5990 ..symlink_targets..
5991 ..names..
5992 ..contents..
5993 ..ext_attributes..
5994 Mounting filesystem...
5995 # df -h /s3ql
5996 Filesystem Size Used Avail Use% Mounted on
5997 s3c://s.greenqloud.com:443/bucket-name 1.0T 0 1.0T 0% /s3ql
5998 #
5999 </pre></blockquote></p>
6000
6001 <p>The file system is now ready for use. I use rsync to store my
6002 backups in it, and as the metadata used by rsync is downloaded at
6003 mount time, no network traffic (and storage cost) is triggered by
6004 running rsync. To unmount, one should not use the normal umount
6005 command, as this will not flush the cache to the cloud storage, but
6006 instead running the umount.s3ql command like this:
6007
6008 <p><blockquote><pre>
6009 # umount.s3ql /s3ql
6010 #
6011 </pre></blockquote></p>
6012
6013 <p>There is a fsck command available to check the file system and
6014 correct any problems detected. This can be used if the local server
6015 crashes while the file system is mounted, to reset the "already
6016 mounted" flag. This is what it look like when processing a working
6017 file system:</p>
6018
6019 <p><blockquote><pre>
6020 # fsck.s3ql --force --ssl s3c://s.greenqloud.com:443/bucket-name
6021 Using cached metadata.
6022 File system seems clean, checking anyway.
6023 Checking DB integrity...
6024 Creating temporary extra indices...
6025 Checking lost+found...
6026 Checking cached objects...
6027 Checking names (refcounts)...
6028 Checking contents (names)...
6029 Checking contents (inodes)...
6030 Checking contents (parent inodes)...
6031 Checking objects (reference counts)...
6032 Checking objects (backend)...
6033 ..processed 5000 objects so far..
6034 ..processed 10000 objects so far..
6035 ..processed 15000 objects so far..
6036 Checking objects (sizes)...
6037 Checking blocks (referenced objects)...
6038 Checking blocks (refcounts)...
6039 Checking inode-block mapping (blocks)...
6040 Checking inode-block mapping (inodes)...
6041 Checking inodes (refcounts)...
6042 Checking inodes (sizes)...
6043 Checking extended attributes (names)...
6044 Checking extended attributes (inodes)...
6045 Checking symlinks (inodes)...
6046 Checking directory reachability...
6047 Checking unix conventions...
6048 Checking referential integrity...
6049 Dropping temporary indices...
6050 Backing up old metadata...
6051 Dumping metadata...
6052 ..objects..
6053 ..blocks..
6054 ..inodes..
6055 ..inode_blocks..
6056 ..symlink_targets..
6057 ..names..
6058 ..contents..
6059 ..ext_attributes..
6060 Compressing and uploading metadata...
6061 Wrote 0.89 MB of compressed metadata.
6062 #
6063 </pre></blockquote></p>
6064
6065 <p>Thanks to the cache, working on files that fit in the cache is very
6066 quick, about the same speed as local file access. Uploading large
6067 amount of data is to me limited by the bandwidth out of and into my
6068 house. Uploading 685 MiB with a 100 MiB cache gave me 305 kiB/s,
6069 which is very close to my upload speed, and downloading the same
6070 Debian installation ISO gave me 610 kiB/s, close to my download speed.
6071 Both were measured using <tt>dd</tt>. So for me, the bottleneck is my
6072 network, not the file system code. I do not know what a good cache
6073 size would be, but suspect that the cache should e larger than your
6074 working set.</p>
6075
6076 <p>I mentioned that only one machine can mount the file system at the
6077 time. If another machine try, it is told that the file system is
6078 busy:</p>
6079
6080 <p><blockquote><pre>
6081 # mount.s3ql --cachedir /var/lib/s3ql-cache --authfile /root/.s3ql/authinfo2 \
6082 --ssl --allow-root s3c://s.greenqloud.com:443/bucket-name /s3ql
6083 Using 8 upload threads.
6084 Backend reports that fs is still mounted elsewhere, aborting.
6085 #
6086 </pre></blockquote></p>
6087
6088 <p>The file content is uploaded when the cache is full, while the
6089 metadata is uploaded once every 24 hour by default. To ensure the
6090 file system content is flushed to the cloud, one can either umount the
6091 file system, or ask S3QL to flush the cache and metadata using
6092 s3qlctrl:
6093
6094 <p><blockquote><pre>
6095 # s3qlctrl upload-meta /s3ql
6096 # s3qlctrl flushcache /s3ql
6097 #
6098 </pre></blockquote></p>
6099
6100 <p>If you are curious about how much space your data uses in the
6101 cloud, and how much compression and deduplication cut down on the
6102 storage usage, you can use s3qlstat on the mounted file system to get
6103 a report:</p>
6104
6105 <p><blockquote><pre>
6106 # s3qlstat /s3ql
6107 Directory entries: 9141
6108 Inodes: 9143
6109 Data blocks: 8851
6110 Total data size: 22049.38 MB
6111 After de-duplication: 21955.46 MB (99.57% of total)
6112 After compression: 21877.28 MB (99.22% of total, 99.64% of de-duplicated)
6113 Database size: 2.39 MB (uncompressed)
6114 (some values do not take into account not-yet-uploaded dirty blocks in cache)
6115 #
6116 </pre></blockquote></p>
6117
6118 <p>I mentioned earlier that there are several possible suppliers of
6119 storage. I did not try to locate them all, but am aware of at least
6120 <a href="https://www.greenqloud.com/">Greenqloud</a>,
6121 <a href="http://drive.google.com/">Google Drive</a>,
6122 <a href="http://aws.amazon.com/s3/">Amazon S3 web serivces</a>,
6123 <a href="http://www.rackspace.com/">Rackspace</a> and
6124 <a href="http://crowncloud.net/">Crowncloud</A>. The latter even
6125 accept payment in Bitcoin. Pick one that suit your need. Some of
6126 them provide several GiB of free storage, but the prize models are
6127 quite different and you will have to figure out what suits you
6128 best.</p>
6129
6130 <p>While researching this blog post, I had a look at research papers
6131 and posters discussing the S3QL file system. There are several, which
6132 told me that the file system is getting a critical check by the
6133 science community and increased my confidence in using it. One nice
6134 poster is titled
6135 "<a href="http://www.lanl.gov/orgs/adtsc/publications/science_highlights_2013/docs/pg68_69.pdf">An
6136 Innovative Parallel Cloud Storage System using OpenStack’s SwiftObject
6137 Store and Transformative Parallel I/O Approach</a>" by Hsing-Bung
6138 Chen, Benjamin McClelland, David Sherrill, Alfred Torrez, Parks Fields
6139 and Pamela Smith. Please have a look.</p>
6140
6141 <p>Given my problems with different file systems earlier, I decided to
6142 check out the mounted S3QL file system to see if it would be usable as
6143 a home directory (in other word, that it provided POSIX semantics when
6144 it come to locking and umask handling etc). Running
6145 <a href="http://people.skolelinux.org/pere/blog/Testing_if_a_file_system_can_be_used_for_home_directories___.html">my
6146 test code to check file system semantics</a>, I was happy to discover that
6147 no error was found. So the file system can be used for home
6148 directories, if one chooses to do so.</p>
6149
6150 <p>If you do not want a locally file system, and want something that
6151 work without the Linux fuse file system, I would like to mention the
6152 <a href="http://www.tarsnap.com/">Tarsnap service</a>, which also
6153 provide locally encrypted backup using a command line client. It have
6154 a nicer access control system, where one can split out read and write
6155 access, allowing some systems to write to the backup and others to
6156 only read from it.</p>
6157
6158 <p>As usual, if you use Bitcoin and want to show your support of my
6159 activities, please send Bitcoin donations to my address
6160 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
6161
6162 </div>
6163 <div class="tags">
6164
6165
6166 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
6167
6168
6169 </div>
6170 </div>
6171 <div class="padding"></div>
6172
6173 <div class="entry">
6174 <div class="title">
6175 <a href="http://people.skolelinux.org/pere/blog/Freedombox_on_Dreamplug__Raspberry_Pi_and_virtual_x86_machine.html">Freedombox on Dreamplug, Raspberry Pi and virtual x86 machine</a>
6176 </div>
6177 <div class="date">
6178 14th March 2014
6179 </div>
6180 <div class="body">
6181 <p>The <a href="https://wiki.debian.org/FreedomBox">Freedombox
6182 project</a> is working on providing the software and hardware for
6183 making it easy for non-technical people to host their data and
6184 communication at home, and being able to communicate with their
6185 friends and family encrypted and away from prying eyes. It has been
6186 going on for a while, and is slowly progressing towards a new test
6187 release (0.2).</p>
6188
6189 <p>And what day could be better than the Pi day to announce that the
6190 new version will provide "hard drive" / SD card / USB stick images for
6191 Dreamplug, Raspberry Pi and VirtualBox (or any other virtualization
6192 system), and can also be installed using a Debian installer preseed
6193 file. The Debian based Freedombox is now based on Debian Jessie,
6194 where most of the needed packages used are already present. Only one,
6195 the freedombox-setup package, is missing. To try to build your own
6196 boot image to test the current status, fetch the freedom-maker scripts
6197 and build using
6198 <a href="http://packages.qa.debian.org/vmdebootstrap">vmdebootstrap</a>
6199 with a user with sudo access to become root:
6200
6201 <pre>
6202 git clone http://anonscm.debian.org/git/freedombox/freedom-maker.git \
6203 freedom-maker
6204 sudo apt-get install git vmdebootstrap mercurial python-docutils \
6205 mktorrent extlinux virtualbox qemu-user-static binfmt-support \
6206 u-boot-tools
6207 make -C freedom-maker dreamplug-image raspberry-image virtualbox-image
6208 </pre>
6209
6210 <p>Root access is needed to run debootstrap and mount loopback
6211 devices. See the README for more details on the build. If you do not
6212 want all three images, trim the make line. But note that thanks to <a
6213 href="https://bugs.debian.org/741407">a race condition in
6214 vmdebootstrap</a>, the build might fail without the patch to the
6215 kpartx call.</p>
6216
6217 <p>If you instead want to install using a Debian CD and the preseed
6218 method, boot a Debian Wheezy ISO and use this boot argument to load
6219 the preseed values:</p>
6220
6221 <pre>
6222 url=<a href="http://www.reinholdtsen.name/freedombox/preseed-jessie.dat">http://www.reinholdtsen.name/freedombox/preseed-jessie.dat</a>
6223 </pre>
6224
6225 <p>But note that due to <a href="https://bugs.debian.org/740673">a
6226 recently introduced bug in apt in Jessie</a>, the installer will
6227 currently hang while setting up APT sources. Killing the
6228 '<tt>apt-cdrom ident</tt>' process when it hang a few times during the
6229 installation will get the installation going. This affect all
6230 installations in Jessie, and I expect it will be fixed soon.</p>
6231
6232 <p>Give it a go and let us know how it goes on the mailing list, and help
6233 us get the new release published. :) Please join us on
6234 <a href="irc://irc.debian.org:6667/%23freedombox">IRC (#freedombox on
6235 irc.debian.org)</a> and
6236 <a href="http://lists.alioth.debian.org/mailman/listinfo/freedombox-discuss">the
6237 mailing list</a> if you want to help make this vision come true.</p>
6238
6239 </div>
6240 <div class="tags">
6241
6242
6243 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
6244
6245
6246 </div>
6247 </div>
6248 <div class="padding"></div>
6249
6250 <div class="entry">
6251 <div class="title">
6252 <a href="http://people.skolelinux.org/pere/blog/New_home_and_release_1_0_for_netgroup_and_innetgr__aka_ng_utils_.html">New home and release 1.0 for netgroup and innetgr (aka ng-utils)</a>
6253 </div>
6254 <div class="date">
6255 22nd February 2014
6256 </div>
6257 <div class="body">
6258 <p>Many years ago, I wrote a GPL licensed version of the netgroup and
6259 innetgr tools, because I needed them in
6260 <a href="http://www.skolelinux.org/">Skolelinux</a>. I called the project
6261 ng-utils, and it has served me well. I placed the project under the
6262 <a href="http://www.hungry.com/">Hungry Programmer</a> umbrella, and it was maintained in our CVS
6263 repository. But many years ago, the CVS repository was dropped (lost,
6264 not migrated to new hardware, not sure), and the project have lacked a
6265 proper home since then.</p>
6266
6267 <p>Last summer, I had a look at the package and made a new release
6268 fixing a irritating crash bug, but was unable to store the changes in
6269 a proper source control system. I applied for a project on
6270 <a href="https://alioth.debian.org/">Alioth</a>, but did not have time
6271 to follow up on it. Until today. :)</p>
6272
6273 <p>After many hours of cleaning and migration, the ng-utils project
6274 now have a new home, and a git repository with the highlight of the
6275 history of the project. I published all release tarballs and imported
6276 them into the git repository. As the project is really stable and not
6277 expected to gain new features any time soon, I decided to make a new
6278 release and call it 1.0. Visit the new project home on
6279 <a href="https://alioth.debian.org/projects/ng-utils/">https://alioth.debian.org/projects/ng-utils/</a>
6280 if you want to check it out. The new version is also uploaded into
6281 <a href="http://packages.qa.debian.org/n/ng-utils.html">Debian Unstable</a>.</p>
6282
6283 </div>
6284 <div class="tags">
6285
6286
6287 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
6288
6289
6290 </div>
6291 </div>
6292 <div class="padding"></div>
6293
6294 <div class="entry">
6295 <div class="title">
6296 <a href="http://people.skolelinux.org/pere/blog/Testing_sysvinit_from_experimental_in_Debian_Hurd.html">Testing sysvinit from experimental in Debian Hurd</a>
6297 </div>
6298 <div class="date">
6299 3rd February 2014
6300 </div>
6301 <div class="body">
6302 <p>A few days ago I decided to try to help the Hurd people to get
6303 their changes into sysvinit, to allow them to use the normal sysvinit
6304 boot system instead of their old one. This follow up on the
6305 <a href="https://teythoon.cryptobitch.de//categories/gsoc.html">great
6306 Google Summer of Code work</a> done last summer by Justus Winter to
6307 get Debian on Hurd working more like Debian on Linux. To get started,
6308 I downloaded a prebuilt hard disk image from
6309 <a href="http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz">http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz</a>,
6310 and started it using virt-manager.</p>
6311
6312 <p>The first think I had to do after logging in (root without any
6313 password) was to get the network operational. I followed
6314 <a href="https://www.debian.org/ports/hurd/hurd-install">the
6315 instructions on the Debian GNU/Hurd ports page</a> and ran these
6316 commands as root to get the machine to accept a IP address from the
6317 kvm internal DHCP server:</p>
6318
6319 <p><blockquote><pre>
6320 settrans -fgap /dev/netdde /hurd/netdde
6321 kill $(ps -ef|awk '/[p]finet/ { print $2}')
6322 kill $(ps -ef|awk '/[d]evnode/ { print $2}')
6323 dhclient /dev/eth0
6324 </pre></blockquote></p>
6325
6326 <p>After this, the machine had internet connectivity, and I could
6327 upgrade it and install the sysvinit packages from experimental and
6328 enable it as the default boot system in Hurd.</p>
6329
6330 <p>But before I did that, I set a password on the root user, as ssh is
6331 running on the machine it for ssh login to work a password need to be
6332 set. Also, note that a bug somewhere in openssh on Hurd block
6333 compression from working. Remember to turn that off on the client
6334 side.</p>
6335
6336 <p>Run these commands as root to upgrade and test the new sysvinit
6337 stuff:</p>
6338
6339 <p><blockquote><pre>
6340 cat > /etc/apt/sources.list.d/experimental.list &lt;&lt;EOF
6341 deb http://http.debian.net/debian/ experimental main
6342 EOF
6343 apt-get update
6344 apt-get dist-upgrade
6345 apt-get install -t experimental initscripts sysv-rc sysvinit \
6346 sysvinit-core sysvinit-utils
6347 update-alternatives --config runsystem
6348 </pre></blockquote></p>
6349
6350 <p>To reboot after switching boot system, you have to use
6351 <tt>reboot-hurd</tt> instead of just <tt>reboot</tt>, as there is not
6352 yet a sysvinit process able to receive the signals from the normal
6353 'reboot' command. After switching to sysvinit as the boot system,
6354 upgrading every package and rebooting, the network come up with DHCP
6355 after boot as it should, and the settrans/pkill hack mentioned at the
6356 start is no longer needed. But for some strange reason, there are no
6357 longer any login prompt in the virtual console, so I logged in using
6358 ssh instead.
6359
6360 <p>Note that there are some race conditions in Hurd making the boot
6361 fail some times. No idea what the cause is, but hope the Hurd porters
6362 figure it out. At least Justus said on IRC (#debian-hurd on
6363 irc.debian.org) that they are aware of the problem. A way to reduce
6364 the impact is to upgrade to the Hurd packages built by Justus by
6365 adding this repository to the machine:</p>
6366
6367 <p><blockquote><pre>
6368 cat > /etc/apt/sources.list.d/hurd-ci.list &lt;&lt;EOF
6369 deb http://darnassus.sceen.net/~teythoon/hurd-ci/ sid main
6370 EOF
6371 </pre></blockquote></p>
6372
6373 <p>At the moment the prebuilt virtual machine get some packages from
6374 http://ftp.debian-ports.org/debian, because some of the packages in
6375 unstable do not yet include the required patches that are lingering in
6376 BTS. This is the completely list of "unofficial" packages installed:</p>
6377
6378 <p><blockquote><pre>
6379 # aptitude search '?narrow(?version(CURRENT),?origin(Debian Ports))'
6380 i emacs - GNU Emacs editor (metapackage)
6381 i gdb - GNU Debugger
6382 i hurd-recommended - Miscellaneous translators
6383 i isc-dhcp-client - ISC DHCP client
6384 i isc-dhcp-common - common files used by all the isc-dhcp* packages
6385 i libc-bin - Embedded GNU C Library: Binaries
6386 i libc-dev-bin - Embedded GNU C Library: Development binaries
6387 i libc0.3 - Embedded GNU C Library: Shared libraries
6388 i A libc0.3-dbg - Embedded GNU C Library: detached debugging symbols
6389 i libc0.3-dev - Embedded GNU C Library: Development Libraries and Hea
6390 i multiarch-support - Transitional package to ensure multiarch compatibilit
6391 i A x11-common - X Window System (X.Org) infrastructure
6392 i xorg - X.Org X Window System
6393 i A xserver-xorg - X.Org X server
6394 i A xserver-xorg-input-all - X.Org X server -- input driver metapackage
6395 #
6396 </pre></blockquote></p>
6397
6398 <p>All in all, testing hurd has been an interesting experience. :)
6399 X.org did not work out of the box and I never took the time to follow
6400 the porters instructions to fix it. This time I was interested in the
6401 command line stuff.<p>
6402
6403 </div>
6404 <div class="tags">
6405
6406
6407 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
6408
6409
6410 </div>
6411 </div>
6412 <div class="padding"></div>
6413
6414 <div class="entry">
6415 <div class="title">
6416 <a href="http://people.skolelinux.org/pere/blog/New_chrpath_release_0_16.html">New chrpath release 0.16</a>
6417 </div>
6418 <div class="date">
6419 14th January 2014
6420 </div>
6421 <div class="body">
6422 <p><a href="http://www.coverity.com/">Coverity</a> is a nice tool to
6423 find problems in C, C++ and Java code using static source code
6424 analysis. It can detect a lot of different problems, and is very
6425 useful to find memory and locking bugs in the error handling part of
6426 the source. The company behind it provide
6427 <a href="https://scan.coverity.com/">check of free software projects as
6428 a community service</a>, and many hundred free software projects are
6429 already checked. A few days ago I decided to have a closer look at
6430 the Coverity system, and discovered that the
6431 <a href="http://www.gnu.org/software/gnash/">gnash</a> and
6432 <a href="http://sourceforge.net/projects/ipmitool/">ipmitool</a>
6433 projects I am involved with was already registered. But these are
6434 fairly big, and I would also like to have a small and easy project to
6435 check, and decided to <a href="http://scan.coverity.com/projects/1179">request
6436 checking of the chrpath project</a>. It was
6437 added to the checker and discovered seven potential defects. Six of
6438 these were real, mostly resource "leak" when the program detected an
6439 error. Nothing serious, as the resources would be released a fraction
6440 of a second later when the program exited because of the error, but it
6441 is nice to do it right in case the source of the program some time in
6442 the future end up in a library. Having fixed all defects and added
6443 <a href="https://lists.alioth.debian.org/mailman/listinfo/chrpath-devel">a
6444 mailing list for the chrpath developers</a>, I decided it was time to
6445 publish a new release. These are the release notes:</p>
6446
6447 <p>New in 0.16 released 2014-01-14:</p>
6448
6449 <ul>
6450
6451 <li>Fixed all minor bugs discovered by Coverity.</li>
6452 <li>Updated config.sub and config.guess from the GNU project.</li>
6453 <li>Mention new project mailing list in the documentation.</li>
6454
6455 </ul>
6456
6457 <p>You can
6458 <a href="https://alioth.debian.org/frs/?group_id=31052">download the
6459 new version 0.16 from alioth</a>. Please let us know via the Alioth
6460 project if something is wrong with the new release. The test suite
6461 did not discover any old errors, so if you find a new one, please also
6462 include a test suite check.</p>
6463
6464 </div>
6465 <div class="tags">
6466
6467
6468 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
6469
6470
6471 </div>
6472 </div>
6473 <div class="padding"></div>
6474
6475 <div class="entry">
6476 <div class="title">
6477 <a href="http://people.skolelinux.org/pere/blog/New_chrpath_release_0_15.html">New chrpath release 0.15</a>
6478 </div>
6479 <div class="date">
6480 24th November 2013
6481 </div>
6482 <div class="body">
6483 <p>After many years break from the package and a vain hope that
6484 development would be continued by someone else, I finally pulled my
6485 acts together this morning and wrapped up a new release of chrpath,
6486 the command line tool to modify the rpath and runpath of already
6487 compiled ELF programs. The update was triggered by the persistence of
6488 Isha Vishnoi at IBM, which needed a new config.guess file to get
6489 support for the ppc64le architecture (powerpc 64-bit Little Endian) he
6490 is working on. I checked the
6491 <a href="http://packages.qa.debian.org/chrpath">Debian</a>,
6492 <a href="https://launchpad.net/ubuntu/+source/chrpath">Ubuntu</a> and
6493 <a href="https://admin.fedoraproject.org/pkgdb/acls/name/chrpath">Fedora</a>
6494 packages for interesting patches (failed to find the source from
6495 OpenSUSE and Mandriva packages), and found quite a few nice fixes.
6496 These are the release notes:</p>
6497
6498 <p>New in 0.15 released 2013-11-24:</p>
6499
6500 <ul>
6501
6502 <li>Updated config.sub and config.guess from the GNU project to work
6503 with newer architectures. Thanks to isha vishnoi for the heads
6504 up.</li>
6505
6506 <li>Updated README with current URLs.</li>
6507
6508 <li>Added byteswap fix found in Ubuntu, credited Jeremy Kerr and
6509 Matthias Klose.</li>
6510
6511 <li>Added missing help for -k|--keepgoing option, using patch by
6512 Petr Machata found in Fedora.</li>
6513
6514 <li>Rewrite removal of RPATH/RUNPATH to make sure the entry in
6515 .dynamic is a NULL terminated string. Based on patch found in
6516 Fedora credited Axel Thimm and Christian Krause.</li>
6517
6518 </ul>
6519
6520 <p>You can
6521 <a href="https://alioth.debian.org/frs/?group_id=31052">download the
6522 new version 0.15 from alioth</a>. Please let us know via the Alioth
6523 project if something is wrong with the new release. The test suite
6524 did not discover any old errors, so if you find a new one, please also
6525 include a testsuite check.</p>
6526
6527 </div>
6528 <div class="tags">
6529
6530
6531 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
6532
6533
6534 </div>
6535 </div>
6536 <div class="padding"></div>
6537
6538 <div class="entry">
6539 <div class="title">
6540 <a href="http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html">Debian init.d boot script example for rsyslog</a>
6541 </div>
6542 <div class="date">
6543 2nd November 2013
6544 </div>
6545 <div class="body">
6546 <p>If one of the points of switching to a new init system in Debian is
6547 <a href="http://thomas.goirand.fr/blog/?p=147">to get rid of huge
6548 init.d scripts</a>, I doubt we need to switch away from sysvinit and
6549 init.d scripts at all. Here is an example init.d script, ie a rewrite
6550 of /etc/init.d/rsyslog:</p>
6551
6552 <p><pre>
6553 #!/lib/init/init-d-script
6554 ### BEGIN INIT INFO
6555 # Provides: rsyslog
6556 # Required-Start: $remote_fs $time
6557 # Required-Stop: umountnfs $time
6558 # X-Stop-After: sendsigs
6559 # Default-Start: 2 3 4 5
6560 # Default-Stop: 0 1 6
6561 # Short-Description: enhanced syslogd
6562 # Description: Rsyslog is an enhanced multi-threaded syslogd.
6563 # It is quite compatible to stock sysklogd and can be
6564 # used as a drop-in replacement.
6565 ### END INIT INFO
6566 DESC="enhanced syslogd"
6567 DAEMON=/usr/sbin/rsyslogd
6568 </pre></p>
6569
6570 <p>Pretty minimalistic to me... For the record, the original sysv-rc
6571 script was 137 lines, and the above is just 15 lines, most of it meta
6572 info/comments.</p>
6573
6574 <p>How to do this, you ask? Well, one create a new script
6575 /lib/init/init-d-script looking something like this:
6576
6577 <p><pre>
6578 #!/bin/sh
6579
6580 # Define LSB log_* functions.
6581 # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
6582 # and status_of_proc is working.
6583 . /lib/lsb/init-functions
6584
6585 #
6586 # Function that starts the daemon/service
6587
6588 #
6589 do_start()
6590 {
6591 # Return
6592 # 0 if daemon has been started
6593 # 1 if daemon was already running
6594 # 2 if daemon could not be started
6595 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
6596 || return 1
6597 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
6598 $DAEMON_ARGS \
6599 || return 2
6600 # Add code here, if necessary, that waits for the process to be ready
6601 # to handle requests from services started subsequently which depend
6602 # on this one. As a last resort, sleep for some time.
6603 }
6604
6605 #
6606 # Function that stops the daemon/service
6607 #
6608 do_stop()
6609 {
6610 # Return
6611 # 0 if daemon has been stopped
6612 # 1 if daemon was already stopped
6613 # 2 if daemon could not be stopped
6614 # other if a failure occurred
6615 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
6616 RETVAL="$?"
6617 [ "$RETVAL" = 2 ] && return 2
6618 # Wait for children to finish too if this is a daemon that forks
6619 # and if the daemon is only ever run from this initscript.
6620 # If the above conditions are not satisfied then add some other code
6621 # that waits for the process to drop all resources that could be
6622 # needed by services started subsequently. A last resort is to
6623 # sleep for some time.
6624 start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
6625 [ "$?" = 2 ] && return 2
6626 # Many daemons don't delete their pidfiles when they exit.
6627 rm -f $PIDFILE
6628 return "$RETVAL"
6629 }
6630
6631 #
6632 # Function that sends a SIGHUP to the daemon/service
6633 #
6634 do_reload() {
6635 #
6636 # If the daemon can reload its configuration without
6637 # restarting (for example, when it is sent a SIGHUP),
6638 # then implement that here.
6639 #
6640 start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
6641 return 0
6642 }
6643
6644 SCRIPTNAME=$1
6645 scriptbasename="$(basename $1)"
6646 echo "SN: $scriptbasename"
6647 if [ "$scriptbasename" != "init-d-library" ] ; then
6648 script="$1"
6649 shift
6650 . $script
6651 else
6652 exit 0
6653 fi
6654
6655 NAME=$(basename $DAEMON)
6656 PIDFILE=/var/run/$NAME.pid
6657
6658 # Exit if the package is not installed
6659 #[ -x "$DAEMON" ] || exit 0
6660
6661 # Read configuration variable file if it is present
6662 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
6663
6664 # Load the VERBOSE setting and other rcS variables
6665 . /lib/init/vars.sh
6666
6667 case "$1" in
6668 start)
6669 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
6670 do_start
6671 case "$?" in
6672 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
6673 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
6674 esac
6675 ;;
6676 stop)
6677 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
6678 do_stop
6679 case "$?" in
6680 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
6681 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
6682 esac
6683 ;;
6684 status)
6685 status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
6686 ;;
6687 #reload|force-reload)
6688 #
6689 # If do_reload() is not implemented then leave this commented out
6690 # and leave 'force-reload' as an alias for 'restart'.
6691 #
6692 #log_daemon_msg "Reloading $DESC" "$NAME"
6693 #do_reload
6694 #log_end_msg $?
6695 #;;
6696 restart|force-reload)
6697 #
6698 # If the "reload" option is implemented then remove the
6699 # 'force-reload' alias
6700 #
6701 log_daemon_msg "Restarting $DESC" "$NAME"
6702 do_stop
6703 case "$?" in
6704 0|1)
6705 do_start
6706 case "$?" in
6707 0) log_end_msg 0 ;;
6708 1) log_end_msg 1 ;; # Old process is still running
6709 *) log_end_msg 1 ;; # Failed to start
6710 esac
6711 ;;
6712 *)
6713 # Failed to stop
6714 log_end_msg 1
6715 ;;
6716 esac
6717 ;;
6718 *)
6719 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
6720 exit 3
6721 ;;
6722 esac
6723
6724 :
6725 </pre></p>
6726
6727 <p>It is based on /etc/init.d/skeleton, and could be improved quite a
6728 lot. I did not really polish the approach, so it might not always
6729 work out of the box, but you get the idea. I did not try very hard to
6730 optimize it nor make it more robust either.</p>
6731
6732 <p>A better argument for switching init system in Debian than reducing
6733 the size of init scripts (which is a good thing to do anyway), is to
6734 get boot system that is able to handle the kernel events sensibly and
6735 robustly, and do not depend on the boot to run sequentially. The boot
6736 and the kernel have not behaved sequentially in years.</p>
6737
6738 </div>
6739 <div class="tags">
6740
6741
6742 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
6743
6744
6745 </div>
6746 </div>
6747 <div class="padding"></div>
6748
6749 <div class="entry">
6750 <div class="title">
6751 <a href="http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html">Browser plugin for SPICE (spice-xpi) uploaded to Debian</a>
6752 </div>
6753 <div class="date">
6754 1st November 2013
6755 </div>
6756 <div class="body">
6757 <p><a href="http://www.spice-space.org/">The SPICE protocol</a> for
6758 remote display access is the preferred solution with oVirt and RedHat
6759 Enterprise Virtualization, and I was sad to discover the other day
6760 that the browser plugin needed to use these systems seamlessly was
6761 missing in Debian. The <a href="http://bugs.debian.org/668284">request
6762 for a package</a> was from 2012-04-10 with no progress since
6763 2013-04-01, so I decided to wrap up a package based on the great work
6764 from Cajus Pollmeier and put it in a collab-maint maintained git
6765 repository to get a package I could use. I would very much like
6766 others to help me maintain the package (or just take over, I do not
6767 mind), but as no-one had volunteered so far, I just uploaded it to
6768 NEW. I hope it will be available in Debian in a few days.</p>
6769
6770 <p>The source is now available from
6771 <a href="http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary">http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary</a>.</p>
6772
6773 </div>
6774 <div class="tags">
6775
6776
6777 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
6778
6779
6780 </div>
6781 </div>
6782 <div class="padding"></div>
6783
6784 <div class="entry">
6785 <div class="title">
6786 <a href="http://people.skolelinux.org/pere/blog/Teaching_vmdebootstrap_to_create_Raspberry_Pi_SD_card_images.html">Teaching vmdebootstrap to create Raspberry Pi SD card images</a>
6787 </div>
6788 <div class="date">
6789 27th October 2013
6790 </div>
6791 <div class="body">
6792 <p>The
6793 <a href="http://packages.qa.debian.org/v/vmdebootstrap.html">vmdebootstrap</a>
6794 program is a a very nice system to create virtual machine images. It
6795 create a image file, add a partition table, mount it and run
6796 debootstrap in the mounted directory to create a Debian system on a
6797 stick. Yesterday, I decided to try to teach it how to make images for
6798 <a href="https://wiki.debian.org/RaspberryPi">Raspberry Pi</a>, as part
6799 of a plan to simplify the build system for
6800 <a href="https://wiki.debian.org/FreedomBox">the FreedomBox
6801 project</a>. The FreedomBox project already uses vmdebootstrap for
6802 the virtualbox images, but its current build system made multistrap
6803 based system for Dreamplug images, and it is lacking support for
6804 Raspberry Pi.</p>
6805
6806 <p>Armed with the knowledge on how to build "foreign" (aka non-native
6807 architecture) chroots for Raspberry Pi, I dived into the vmdebootstrap
6808 code and adjusted it to be able to build armel images on my amd64
6809 Debian laptop. I ended up giving vmdebootstrap five new options,
6810 allowing me to replicate the image creation process I use to make
6811 <a href="http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html">Debian
6812 Jessie based mesh node images for the Raspberry Pi</a>. First, the
6813 <tt>--foreign /path/to/binfm_handler</tt> option tell vmdebootstrap to
6814 call debootstrap with --foreign and to copy the handler into the
6815 generated chroot before running the second stage. This allow
6816 vmdebootstrap to create armel images on an amd64 host. Next I added
6817 two new options <tt>--bootsize size</tt> and <tt>--boottype
6818 fstype</tt> to teach it to create a separate /boot/ partition with the
6819 given file system type, allowing me to create an image with a vfat
6820 partition for the /boot/ stuff. I also added a <tt>--variant
6821 variant</tt> option to allow me to create smaller images without the
6822 Debian base system packages installed. Finally, I added an option
6823 <tt>--no-extlinux</tt> to tell vmdebootstrap to not install extlinux
6824 as a boot loader. It is not needed on the Raspberry Pi and probably
6825 most other non-x86 architectures. The changes were accepted by the
6826 upstream author of vmdebootstrap yesterday and today, and is now
6827 available from
6828 <a href="http://git.liw.fi/cgi-bin/cgit/cgit.cgi/vmdebootstrap/">the
6829 upstream project page</a>.</p>
6830
6831 <p>To use it to build a Raspberry Pi image using Debian Jessie, first
6832 create a small script (the customize script) to add the non-free
6833 binary blob needed to boot the Raspberry Pi and the APT source
6834 list:</p>
6835
6836 <p><pre>
6837 #!/bin/sh
6838 set -e # Exit on first error
6839 rootdir="$1"
6840 cd "$rootdir"
6841 cat &lt;&lt;EOF > etc/apt/sources.list
6842 deb http://http.debian.net/debian/ jessie main contrib non-free
6843 EOF
6844 # Install non-free binary blob needed to boot Raspberry Pi. This
6845 # install a kernel somewhere too.
6846 wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update \
6847 -O $rootdir/usr/bin/rpi-update
6848 chmod a+x $rootdir/usr/bin/rpi-update
6849 mkdir -p $rootdir/lib/modules
6850 touch $rootdir/boot/start.elf
6851 chroot $rootdir rpi-update
6852 </pre></p>
6853
6854 <p>Next, fetch the latest vmdebootstrap script and call it like this
6855 to build the image:</p>
6856
6857 <pre>
6858 sudo ./vmdebootstrap \
6859 --variant minbase \
6860 --arch armel \
6861 --distribution jessie \
6862 --mirror http://http.debian.net/debian \
6863 --image test.img \
6864 --size 600M \
6865 --bootsize 64M \
6866 --boottype vfat \
6867 --log-level debug \
6868 --verbose \
6869 --no-kernel \
6870 --no-extlinux \
6871 --root-password raspberry \
6872 --hostname raspberrypi \
6873 --foreign /usr/bin/qemu-arm-static \
6874 --customize `pwd`/customize \
6875 --package netbase \
6876 --package git-core \
6877 --package binutils \
6878 --package ca-certificates \
6879 --package wget \
6880 --package kmod
6881 </pre></p>
6882
6883 <p>The list of packages being installed are the ones needed by
6884 rpi-update to make the image bootable on the Raspberry Pi, with the
6885 exception of netbase, which is needed by debootstrap to find
6886 /etc/hosts with the minbase variant. I really wish there was a way to
6887 set up an Raspberry Pi using only packages in the Debian archive, but
6888 that is not possible as far as I know, because it boots from the GPU
6889 using a non-free binary blob.</p>
6890
6891 <p>The build host need debootstrap, kpartx and qemu-user-static and
6892 probably a few others installed. I have not checked the complete
6893 build dependency list.</p>
6894
6895 <p>The resulting image will not use the hardware floating point unit
6896 on the Raspberry PI, because the armel architecture in Debian is not
6897 optimized for that use. So the images created will be a bit slower
6898 than <a href="http://www.raspbian.org/">Raspbian</a> based images.</p>
6899
6900 </div>
6901 <div class="tags">
6902
6903
6904 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox</a>, <a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network</a>.
6905
6906
6907 </div>
6908 </div>
6909 <div class="padding"></div>
6910
6911 <div class="entry">
6912 <div class="title">
6913 <a href="http://people.skolelinux.org/pere/blog/Good_causes__Debian_Outreach_Program_for_Women__EFF_documenting_the_spying_and_Open_access_in_Norway.html">Good causes: Debian Outreach Program for Women, EFF documenting the spying and Open access in Norway</a>
6914 </div>
6915 <div class="date">
6916 15th October 2013
6917 </div>
6918 <div class="body">
6919 <p>The last few days I came across a few good causes that should get
6920 wider attention. I recommend signing and donating to each one of
6921 these. :)</p>
6922
6923 <p>Via <a href="http://www.debian.org/News/weekly/2013/18/">Debian
6924 Project News for 2013-10-14</a> I came across the Outreach Program for
6925 Women program which is a Google Summer of Code like initiative to get
6926 more women involved in free software. One debian sponsor has offered
6927 to match <a href="http://debian.ch/opw2013">any donation done to Debian
6928 earmarked</a> for this initiative. I donated a few minutes ago, and
6929 hope you will to. :)</p>
6930
6931 <p>And the Electronic Frontier Foundation just announced plans to
6932 create <a href="https://supporters.eff.org/donate/nsa-videos">video
6933 documentaries about the excessive spying</a> on every Internet user that
6934 take place these days, and their need to fund the work. I've already
6935 donated. Are you next?</p>
6936
6937 <p>For my Norwegian audience, the organisation Studentenes og
6938 Akademikernes Internasjonale Hjelpefond is collecting signatures for a
6939 statement under the heading
6940 <a href="http://saih.no/Bloggers_United/">Bloggers United for Open
6941 Access</a> for those of us asking for more focus on open access in the
6942 Norwegian government. So far 499 signatures. I hope you will sign it
6943 too.</p>
6944
6945 </div>
6946 <div class="tags">
6947
6948
6949 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
6950
6951
6952 </div>
6953 </div>
6954 <div class="padding"></div>
6955
6956 <div class="entry">
6957 <div class="title">
6958 <a href="http://people.skolelinux.org/pere/blog/Videos_about_the_Freedombox_project___for_inspiration_and_learning.html">Videos about the Freedombox project - for inspiration and learning</a>
6959 </div>
6960 <div class="date">
6961 27th September 2013
6962 </div>
6963 <div class="body">
6964 <p>The <a href="http://www.freedomboxfoundation.org/">Freedombox
6965 project</a> have been going on for a while, and have presented the
6966 vision, ideas and solution several places. Here is a little
6967 collection of videos of talks and presentation of the project.</p>
6968
6969 <ul>
6970
6971 <li><a href="http://www.youtube.com/watch?v=ukvUz5taxvA">FreedomBox -
6972 2,5 minute marketing film</a> (Youtube)</li>
6973
6974 <li><a href="http://www.youtube.com/watch?v=SzW25QTVWsE">Eben Moglen
6975 discusses the Freedombox on CBS news 2011</a> (Youtube)</li>
6976
6977 <li><a href="http://www.youtube.com/watch?v=Ae8SZbxfE0g">Eben Moglen -
6978 Freedom in the Cloud - Software Freedom, Privacy and and Security for
6979 Web 2.0 and Cloud computing at ISOC-NY Public Meeting 2010</a>
6980 (Youtube)</li>
6981
6982 <li><a href="http://www.youtube.com/watch?v=vNaIji_3xBE">Fosdem 2011
6983 Keynote by Eben Moglen presenting the Freedombox</a> (Youtube)</li>
6984
6985 <li><a href="http://www.youtube.com/watch?v=9bDDUyJSQ9s">Presentation of
6986 the Freedombox by James Vasile at Elevate in Gratz 2011</a> (Youtube)</li>
6987
6988 <li><a href="http://www.youtube.com/watch?v=zQTmnk27g9s"> Freedombox -
6989 Discovery, Identity, and Trust by Nick Daly at Freedombox Hackfest New
6990 York City in 2012</a> (Youtube)</li>
6991
6992 <li><a href="http://www.youtube.com/watch?v=tkbSB4Ba7Ck">Introduction
6993 to the Freedombox at Freedombox Hackfest New York City in 2012</a>
6994 (Youtube)</li>
6995
6996 <li><a href="http://www.youtube.com/watch?v=z-P2Jaeg0aQ">Freedom, Out
6997 of the Box! by Bdale Garbee at linux.conf.au Ballarat, 2012</a> (Youtube) </li>
6998
6999 <li><a href="https://archive.fosdem.org/2013/schedule/event/freedombox/">Freedombox
7000 1.0 by Eben Moglen and Bdale Garbee at Fosdem 2013</a> (FOSDEM) </li>
7001
7002 <li><a href="http://www.youtube.com/watch?v=e1LpYX2zVYg">What is the
7003 FreedomBox today by Bdale Garbee at Debconf13 in Vaumarcus
7004 2013</a> (Youtube)</li>
7005
7006 </ul>
7007
7008 <p>A larger list is available from
7009 <a href="https://wiki.debian.org/FreedomBox/TalksAndPresentations">the
7010 Freedombox Wiki</a>.</p>
7011
7012 <p>On other news, I am happy to report that Freedombox based on Debian
7013 Jessie is coming along quite well, and soon both Owncloud and using
7014 Tor should be available for testers of the Freedombox solution. :) In
7015 a few weeks I hope everything needed to test it is included in Debian.
7016 The withsqlite package is already in Debian, and the plinth package is
7017 pending in NEW. The third and vital part of that puzzle is the
7018 metapackage/setup framework, which is still pending an upload. Join
7019 us on <a href="irc://irc.debian.org:6667/%23freedombox">IRC
7020 (#freedombox on irc.debian.org)</a> and
7021 <a href="http://lists.alioth.debian.org/mailman/listinfo/freedombox-discuss">the
7022 mailing list</a> if you want to help make this vision come true.</p>
7023
7024 </div>
7025 <div class="tags">
7026
7027
7028 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
7029
7030
7031 </div>
7032 </div>
7033 <div class="padding"></div>
7034
7035 <div class="entry">
7036 <div class="title">
7037 <a href="http://people.skolelinux.org/pere/blog/Recipe_to_test_the_Freedombox_project_on_amd64_or_Raspberry_Pi.html">Recipe to test the Freedombox project on amd64 or Raspberry Pi</a>
7038 </div>
7039 <div class="date">
7040 10th September 2013
7041 </div>
7042 <div class="body">
7043 <p>I was introduced to the
7044 <a href="http://www.freedomboxfoundation.org/">Freedombox project</a>
7045 in 2010, when Eben Moglen presented his vision about serving the need
7046 of non-technical people to keep their personal information private and
7047 within the legal protection of their own homes. The idea is to give
7048 people back the power over their network and machines, and return
7049 Internet back to its intended peer-to-peer architecture. Instead of
7050 depending on a central service, the Freedombox will give everyone
7051 control over their own basic infrastructure.</p>
7052
7053 <p>I've intended to join the effort since then, but other tasks have
7054 taken priority. But this summers nasty news about the misuse of trust
7055 and privilege exercised by the "western" intelligence gathering
7056 communities increased my eagerness to contribute to a point where I
7057 actually started working on the project a while back.</p>
7058
7059 <p>The <a href="https://alioth.debian.org/projects/freedombox/">initial
7060 Debian initiative</a> based on the vision from Eben Moglen, is to
7061 create a simple and cheap Debian based appliance that anyone can hook
7062 up in their home and get access to secure and private services and
7063 communication. The initial deployment platform have been the
7064 <a href="http://www.globalscaletechnologies.com/t-dreamplugdetails.aspx">Dreamplug</a>,
7065 which is a piece of hardware I do not own. So to be able to test what
7066 the current Freedombox setup look like, I had to come up with a way to install
7067 it on some hardware I do have access to. I have rewritten the
7068 <a href="https://github.com/NickDaly/freedom-maker">freedom-maker</a>
7069 image build framework to use .deb packages instead of only copying
7070 setup into the boot images, and thanks to this rewrite I am able to
7071 set up any machine supported by Debian Wheezy as a Freedombox, using
7072 the previously mentioned deb (and a few support debs for packages
7073 missing in Debian).</p>
7074
7075 <p>The current Freedombox setup consist of a set of bootstrapping
7076 scripts
7077 (<a href="https://github.com/petterreinholdtsen/freedombox-setup">freedombox-setup</a>),
7078 and a administrative web interface
7079 (<a href="https://github.com/NickDaly/Plinth">plinth</a> + exmachina +
7080 withsqlite), as well as a privacy enhancing proxy based on
7081 <a href="http://packages.qa.debian.org/privoxy">privoxy</a>
7082 (freedombox-privoxy). There is also a web/javascript based XMPP
7083 client (<a href="http://packages.qa.debian.org/jwchat">jwchat</a>)
7084 trying (unsuccessfully so far) to talk to the XMPP server
7085 (<a href="http://packages.qa.debian.org/ejabberd">ejabberd</a>). The
7086 web interface is pluggable, and the goal is to use it to enable OpenID
7087 services, mesh network connectivity, use of TOR, etc, etc. Not much of
7088 this is really working yet, see
7089 <a href="https://github.com/NickDaly/freedombox-todos/blob/master/TODO">the
7090 project TODO</a> for links to GIT repositories. Most of the code is
7091 on github at the moment. The HTTP proxy is operational out of the
7092 box, and the admin web interface can be used to add/remove plinth
7093 users. I've not been able to do anything else with it so far, but
7094 know there are several branches spread around github and other places
7095 with lots of half baked features.</p>
7096
7097 <p>Anyway, if you want to have a look at the current state, the
7098 following recipes should work to give you a test machine to poke
7099 at.</p>
7100
7101 <p><strong>Debian Wheezy amd64</strong></p>
7102
7103 <ol>
7104
7105 <li>Fetch normal Debian Wheezy installation ISO.</li>
7106 <li>Boot from it, either as CD or USB stick.</li>
7107 <li><p>Press [tab] on the boot prompt and add this as a boot argument
7108 to the Debian installer:<p>
7109 <pre>url=<a href="http://www.reinholdtsen.name/freedombox/preseed-wheezy.dat">http://www.reinholdtsen.name/freedombox/preseed-wheezy.dat</a></pre></li>
7110
7111 <li>Answer the few language/region/password questions and pick disk to
7112 install on.</li>
7113
7114 <li>When the installation is finished and the machine have rebooted a
7115 few times, your Freedombox is ready for testing.</li>
7116
7117 </ol>
7118
7119 <p><strong>Raspberry Pi Raspbian</strong></p>
7120
7121 <ol>
7122
7123 <li>Fetch a Raspbian SD card image, create SD card.</li>
7124 <li>Boot from SD card, extend file system to fill the card completely.</li>
7125 <li><p>Log in and add this to /etc/sources.list:</p>
7126 <pre>
7127 deb <a href="http://www.reinholdtsen.name/freedombox/">http://www.reinholdtsen.name/freedombox</a> wheezy main
7128 </pre></li>
7129 <li><p>Run this as root:</p>
7130 <pre>
7131 wget -O - http://www.reinholdtsen.name/freedombox/BE1A583D.asc | \
7132 apt-key add -
7133 apt-get update
7134 apt-get install freedombox-setup
7135 /usr/lib/freedombox/setup
7136 </pre></li>
7137 <li>Reboot into your freshly created Freedombox.</li>
7138
7139 </ol>
7140
7141 <p>You can test it on other architectures too, but because the
7142 freedombox-privoxy package is binary, it will only work as intended on
7143 the architectures where I have had time to build the binary and put it
7144 in my APT repository. But do not let this stop you. It is only a
7145 short "<tt>apt-get source -b freedombox-privoxy</tt>" away. :)</p>
7146
7147 <p>Note that by default Freedombox is a DHCP server on the
7148 192.168.1.0/24 subnet, so if this is your subnet be careful and turn
7149 off the DHCP server by running "<tt>update-rc.d isc-dhcp-server
7150 disable</tt>" as root.</p>
7151
7152 <p>Please let me know if this works for you, or if you have any
7153 problems. We gather on the IRC channel
7154 <a href="irc://irc.debian.org:6667/%23freedombox">#freedombox</a> on
7155 irc.debian.org and the
7156 <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss">project
7157 mailing list</a>.</p>
7158
7159 <p>Once you get your freedombox operational, you can visit
7160 <tt>http://your-host-name:8001/</tt> to see the state of the plint
7161 welcome screen (dead end - do not be surprised if you are unable to
7162 get past it), and next visit <tt>http://your-host-name:8001/help/</tt>
7163 to look at the rest of plinth. The default user is 'admin' and the
7164 default password is 'secret'.</p>
7165
7166 </div>
7167 <div class="tags">
7168
7169
7170 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
7171
7172
7173 </div>
7174 </div>
7175 <div class="padding"></div>
7176
7177 <div class="entry">
7178 <div class="title">
7179 <a href="http://people.skolelinux.org/pere/blog/Intel_180_SSD_disk_with_Lenovo_firmware_can_not_use_Intel_firmware.html">Intel 180 SSD disk with Lenovo firmware can not use Intel firmware</a>
7180 </div>
7181 <div class="date">
7182 18th August 2013
7183 </div>
7184 <div class="body">
7185 <p>Earlier, I reported about
7186 <a href="http://people.skolelinux.org/pere/blog/How_to_fix_a_Thinkpad_X230_with_a_broken_180_GB_SSD_disk.html">my
7187 problems using an Intel SSD 520 Series 180 GB disk</a>. Friday I was
7188 told by IBM that the original disk should be thrown away. And as
7189 there no longer was a problem if I bricked the firmware, I decided
7190 today to try to install Intel firmware to replace the Lenovo firmware
7191 currently on the disk.</p>
7192
7193 <p>I searched the Intel site for firmware, and found
7194 <a href="https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=3472&DwnldID=18363&ProductFamily=Solid-State+Drives+and+Caching&ProductLine=Intel%c2%ae+High+Performance+Solid-State+Drive&ProductProduct=Intel%c2%ae+SSD+520+Series+(180GB%2c+2.5in+SATA+6Gb%2fs%2c+25nm%2c+MLC)&lang=eng">issdfut_2.0.4.iso</a>
7195 (aka Intel SATA Solid-State Drive Firmware Update Tool) which
7196 according to the site should contain the latest firmware for SSD
7197 disks. I inserted the broken disk in one of my spare laptops and
7198 booted the ISO from a USB stick. The disk was recognized, but the
7199 program claimed the newest firmware already were installed and refused
7200 to insert any Intel firmware. So no change, and the disk is still
7201 unable to handle write load. :( I guess the only way to get them
7202 working would be if Lenovo releases new firmware. No idea how likely
7203 that is. Anyway, just blogging about this test for completeness. I
7204 got a working Samsung disk, and see no point in spending more time on
7205 the broken disks.</p>
7206
7207 </div>
7208 <div class="tags">
7209
7210
7211 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7212
7213
7214 </div>
7215 </div>
7216 <div class="padding"></div>
7217
7218 <div class="entry">
7219 <div class="title">
7220 <a href="http://people.skolelinux.org/pere/blog/How_to_fix_a_Thinkpad_X230_with_a_broken_180_GB_SSD_disk.html">How to fix a Thinkpad X230 with a broken 180 GB SSD disk</a>
7221 </div>
7222 <div class="date">
7223 17th July 2013
7224 </div>
7225 <div class="body">
7226 <p>Today I switched to
7227 <a href="http://people.skolelinux.org/pere/blog/The_Thinkpad_is_dead__long_live_the_Thinkpad_X230_.html">my
7228 new laptop</a>. I've previously written about the problems I had with
7229 my new Thinkpad X230, which was delivered with an
7230 <a href="http://people.skolelinux.org/pere/blog/Intel_SSD_520_Series_180_GB_with_Lenovo_firmware_still_lock_up_from_sustained_writes.html">180
7231 GB Intel SSD disk with Lenovo firmware</a> that did not handle
7232 sustained writes. My hardware supplier have been very forthcoming in
7233 trying to find a solution, and after first trying with another
7234 identical 180 GB disks they decided to send me a 256 GB Samsung SSD
7235 disk instead to fix it once and for all. The Samsung disk survived
7236 the installation of Debian with encrypted disks (filling the disk with
7237 random data during installation killed the first two), and I thus
7238 decided to trust it with my data. I have installed it as a Debian Edu
7239 Wheezy roaming workstation hooked up with my Debian Edu Squeeze main
7240 server at home using Kerberos and LDAP, and will use it as my work
7241 station from now on.</p>
7242
7243 <p>As this is a solid state disk with no moving parts, I believe the
7244 Debian Wheezy default installation need to be tuned a bit to increase
7245 performance and increase life time of the disk. The Linux kernel and
7246 user space applications do not yet adjust automatically to such
7247 environment. To make it easier for my self, I created a draft Debian
7248 package <tt>ssd-setup</tt> to handle this tuning. The
7249 <a href="http://anonscm.debian.org/gitweb/?p=collab-maint/ssd-setup.git">source
7250 for the ssd-setup package</a> is available from collab-maint, and it
7251 is set up to adjust the setup of the machine by just installing the
7252 package. If there is any non-SSD disk in the machine, the package
7253 will refuse to install, as I did not try to write any logic to sort
7254 file systems in SSD and non-SSD file systems.</p>
7255
7256 <p>I consider the package a draft, as I am a bit unsure how to best
7257 set up Debian Wheezy with an SSD. It is adjusted to my use case,
7258 where I set up the machine with one large encrypted partition (in
7259 addition to /boot), put LVM on top of this and set up partitions on
7260 top of this again. See the README file in the package source for the
7261 references I used to pick the settings. At the moment these
7262 parameters are tuned:</p>
7263
7264 <ul>
7265
7266 <li>Set up cryptsetup to pass TRIM commands to the physical disk
7267 (adding discard to /etc/crypttab)</li>
7268
7269 <li>Set up LVM to pass on TRIM commands to the underlying device (in
7270 this case a cryptsetup partition) by changing issue_discards from
7271 0 to 1 in /etc/lvm/lvm.conf.</li>
7272
7273 <li>Set relatime as a file system option for ext3 and ext4 file
7274 systems.</li>
7275
7276 <li>Tell swap to use TRIM commands by adding 'discard' to
7277 /etc/fstab.</li>
7278
7279 <li>Change I/O scheduler from cfq to deadline using a udev rule.</li>
7280
7281 <li>Run fstrim on every ext3 and ext4 file system every night (from
7282 cron.daily).</li>
7283
7284 <li>Adjust sysctl values vm.swappiness to 1 and vm.vfs_cache_pressure
7285 to 50 to reduce the kernel eagerness to swap out processes.</li>
7286
7287 </ul>
7288
7289 <p>During installation, I cancelled the part where the installer fill
7290 the disk with random data, as this would kill the SSD performance for
7291 little gain. My goal with the encrypted file system is to ensure
7292 those stealing my laptop end up with a brick and not a working
7293 computer. I have no hope in keeping the really resourceful people
7294 from getting the data on the disk (see
7295 <a href="http://xkcd.com/538/">XKCD #538</a> for an explanation why).
7296 Thus I concluded that adding the discard option to crypttab is the
7297 right thing to do.</p>
7298
7299 <p>I considered using the noop I/O scheduler, as several recommended
7300 it for SSD, but others recommended deadline and a benchmark I found
7301 indicated that deadline might be better for interactive use.</p>
7302
7303 <p>I also considered using the 'discard' file system option for ext3
7304 and ext4, but read that it would give a performance hit ever time a
7305 file is removed, and thought it best to that that slowdown once a day
7306 instead of during my work.</p>
7307
7308 <p>My package do not set up tmpfs on /var/run, /var/lock and /tmp, as
7309 this is already done by Debian Edu.</p>
7310
7311 <p>I have not yet started on the user space tuning. I expect
7312 iceweasel need some tuning, and perhaps other applications too, but
7313 have not yet had time to investigate those parts.</p>
7314
7315 <p>The package should work on Ubuntu too, but I have not yet tested it
7316 there.</p>
7317
7318 <p>As for the answer to the question in the title of this blog post,
7319 as far as I know, the only solution I know about is to replace the
7320 disk. It might be possible to flash it with Intel firmware instead of
7321 the Lenovo firmware. But I have not tried and did not want to do so
7322 without approval from Lenovo as I wanted to keep the warranty on the
7323 disk until a solution was found and they wanted the broken disks
7324 back.</p>
7325
7326 </div>
7327 <div class="tags">
7328
7329
7330 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7331
7332
7333 </div>
7334 </div>
7335 <div class="padding"></div>
7336
7337 <div class="entry">
7338 <div class="title">
7339 <a href="http://people.skolelinux.org/pere/blog/Intel_SSD_520_Series_180_GB_with_Lenovo_firmware_still_lock_up_from_sustained_writes.html">Intel SSD 520 Series 180 GB with Lenovo firmware still lock up from sustained writes</a>
7340 </div>
7341 <div class="date">
7342 10th July 2013
7343 </div>
7344 <div class="body">
7345 <p>A few days ago, I wrote about
7346 <a href="http://people.skolelinux.org/pere/blog/The_Thinkpad_is_dead__long_live_the_Thinkpad_X230_.html">the
7347 problems I experienced with my new X230 and its SSD disk</a>, which
7348 was dying during installation because it is unable to cope with
7349 sustained write. My supplier is in contact with
7350 <a href="http://www.lenovo.com/">Lenovo</a>, and they wanted to send a
7351 replacement disk to try to fix the problem. They decided to send an
7352 identical model, so my hopes for a permanent fix was slim.</p>
7353
7354 <p>Anyway, today I got the replacement disk and tried to install
7355 Debian Edu Wheezy with encrypted disk on it. The new disk have the
7356 same firmware version as the original. This time my hope raised
7357 slightly as the installation progressed, as the original disk used to
7358 die after 4-7% of the disk was written to, while this time it kept
7359 going past 10%, 20%, 40% and even past 50%. But around 60%, the disk
7360 died again and I was back on square one. I still do not have a new
7361 laptop with a disk I can trust. I can not live with a disk that might
7362 lock up when I download a new
7363 <a href="http://www.skolelinux.org/">Debian Edu / Skolelinux</a> ISO or
7364 other large files. I look forward to hearing from my supplier with
7365 the next proposal from Lenovo.</p>
7366
7367 <p>The original disk is marked Intel SSD 520 Series 180 GB,
7368 11S0C38722Z1ZNME35X1TR, ISN: CVCV321407HB180EGN, SA: G57560302, FW:
7369 LF1i, 29MAY2013, PBA: G39779-300, LBA 351,651,888, LI P/N: 0C38722,
7370 Pb-free 2LI, LC P/N: 16-200366, WWN: 55CD2E40002756C4, Model:
7371 SSDSC2BW180A3L 2.5" 6Gb/s SATA SSD 180G 5V 1A, ASM P/N 0C38732, FRU
7372 P/N 45N8295, P0C38732.</p>
7373
7374 <p>The replacement disk is marked Intel SSD 520 Series 180 GB,
7375 11S0C38722Z1ZNDE34N0L0, ISN: CVCV315306RK180EGN, SA: G57560-302, FW:
7376 LF1i, 22APR2013, PBA: G39779-300, LBA 351,651,888, LI P/N: 0C38722,
7377 Pb-free 2LI, LC P/N: 16-200366, WWN: 55CD2E40000AB69E, Model:
7378 SSDSC2BW180A3L 2.5" 6Gb/s SATA SSD 180G 5V 1A, ASM P/N 0C38732, FRU
7379 P/N 45N8295, P0C38732.</p>
7380
7381 <p>The only difference is in the first number (serial number?), ISN,
7382 SA, date and WNPP values. Mentioning all the details here in case
7383 someone is able to use the information to find a way to identify the
7384 failing disk among working ones (if any such working disk actually
7385 exist).</p>
7386
7387 </div>
7388 <div class="tags">
7389
7390
7391 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7392
7393
7394 </div>
7395 </div>
7396 <div class="padding"></div>
7397
7398 <div class="entry">
7399 <div class="title">
7400 <a href="http://people.skolelinux.org/pere/blog/July_13th__Debian_Ubuntu_BSP_and_Skolelinux_Debian_Edu_developer_gathering_in_Oslo.html">July 13th: Debian/Ubuntu BSP and Skolelinux/Debian Edu developer gathering in Oslo</a>
7401 </div>
7402 <div class="date">
7403 9th July 2013
7404 </div>
7405 <div class="body">
7406 <p>The upcoming Saturday, 2013-07-13, we are organising a combined
7407 Debian Edu developer gathering and Debian and Ubuntu bug squashing
7408 party in Oslo. It is organised by <a href="http://www.nuug.no/">the
7409 member assosiation NUUG</a> and
7410 <a href="http://www.skolelinux.org/">the Debian Edu / Skolelinux
7411 project</a> together with <a href="http://bitraf.no/">the hack space
7412 Bitraf</a>.</p>
7413
7414 <p>It starts 10:00 and continue until late evening. Everyone is
7415 welcome, and there is no fee to participate. There is on the other
7416 hand limited space, and only room for 30 people. Please put your name
7417 on <a href="http://wiki.debian.org/BSP/2013/07/13/no/Oslo">the event
7418 wiki page</a> if you plan to join us.</p>
7419
7420 </div>
7421 <div class="tags">
7422
7423
7424 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
7425
7426
7427 </div>
7428 </div>
7429 <div class="padding"></div>
7430
7431 <div class="entry">
7432 <div class="title">
7433 <a href="http://people.skolelinux.org/pere/blog/The_Thinkpad_is_dead__long_live_the_Thinkpad_X230_.html">The Thinkpad is dead, long live the Thinkpad X230?</a>
7434 </div>
7435 <div class="date">
7436 5th July 2013
7437 </div>
7438 <div class="body">
7439 <p>Half a year ago, I reported that I had to find a
7440 <a href="http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html">replacement
7441 for my trusty old Thinkpad X41</a>. Unfortunately I did not have much
7442 time to spend on it, and it took a while to find a model I believe
7443 will do the job, but two days ago the replacement finally arrived. I
7444 ended up picking a
7445 <a href="http://www.linlap.com/lenovo_thinkpad_x230">Thinkpad X230</a>
7446 with SSD disk (NZDAJMN). I first test installed Debian Edu Wheezy as
7447 a roaming workstation, and it seemed to work flawlessly. But my
7448 second installation with encrypted disk was not as successful. More
7449 on that below.</p>
7450
7451 <p>I had a hard time trying to track down a good laptop, as my most
7452 important requirements (robust and with a good keyboard) are never
7453 listed in the feature list. But I did get good help from the search
7454 feature at <a href="http://www.prisjakt.no/">Prisjakt</a>, which
7455 allowed me to limit the list of interesting laptops based on my other
7456 requirements. A bit surprising that SSD disk are not disks according
7457 to that search interface, so I had to drop specifying the number of
7458 disks from my search parameters. I also asked around among friends to
7459 get their impression on keyboards and robustness.</p>
7460
7461 <p>So the new laptop arrived, and it is quite a lot wider than the
7462 X41. I am not quite convinced about the keyboard, as it is
7463 significantly wider than my old keyboard, and I have to stretch my
7464 hand a lot more to reach the edges. But the key response is fairly
7465 good and the individual key shape is fairly easy to handle, so I hope
7466 I will get used to it. My old X40 was starting to fail, and I really
7467 needed a new laptop now. :)</p>
7468
7469 <p>Turning off the touch pad was simple. All it took was a quick
7470 visit to the BIOS during boot it disable it.</p>
7471
7472 <p>But there is a fatal problem with the laptop. The 180 GB SSD disk
7473 lock up during load. And this happen when installing Debian Wheezy
7474 with encrypted disk, while the disk is being filled with random data.
7475 I also tested to install Ubuntu Raring, and it happen there too if I
7476 reenable the code to fill the disk with random data (it is disabled by
7477 default in Ubuntu). And the bug with is already known. It was
7478 reported to Debian as <a href="http://bugs.debian.org/691427">BTS
7479 report #691427 2012-10-25</a> (journal commit I/O error on brand-new
7480 Thinkpad T430s ext4 on lvm on SSD). It is also reported to the Linux
7481 kernel developers as
7482 <a href="https://bugzilla.kernel.org/show_bug.cgi?id=51861">Kernel bugzilla
7483 report #51861 2012-12-20</a> (Intel SSD 520 stops working under load
7484 (SSDSC2BW180A3L in Lenovo ThinkPad T430s)). It is also reported on the
7485 Lenovo forums, both for
7486 <a href="http://forums.lenovo.com/t5/T400-T500-and-newer-T-series/T430s-Intel-SSD-520-180GB-issue/m-p/1070549">T430
7487 2012-11-10</a> and for
7488 <a href="http://forums.lenovo.com/t5/X-Series-ThinkPad-Laptops/x230-SATA-errors-with-180GB-Intel-520-SSD-under-heavy-write-load/m-p/1068147">X230
7489 03-20-2013</a>. The problem do not only affect installation. The
7490 reports state that the disk lock up during use if many writes are done
7491 on the disk, so it is much no use to work around the installation
7492 problem and end up with a computer that can lock up at any moment.
7493 There is even a
7494 <a href="https://git.efficios.com/?p=test-ssd.git">small C program
7495 available</a> that will lock up the hard drive after running a few
7496 minutes by writing to a file.</p>
7497
7498 <p>I've contacted my supplier and asked how to handle this, and after
7499 contacting PCHELP Norway (request 01D1FDP) which handle support
7500 requests for Lenovo, his first suggestion was to upgrade the disk
7501 firmware. Unfortunately there is no newer firmware available from
7502 Lenovo, as my disk already have the most recent one (version LF1i). I
7503 hope to hear more from him today and hope the problem can be
7504 fixed. :)</p>
7505
7506 </div>
7507 <div class="tags">
7508
7509
7510 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7511
7512
7513 </div>
7514 </div>
7515 <div class="padding"></div>
7516
7517 <div class="entry">
7518 <div class="title">
7519 <a href="http://people.skolelinux.org/pere/blog/The_Thinkpad_is_dead__long_live_the_Thinkpad_X230.html">The Thinkpad is dead, long live the Thinkpad X230</a>
7520 </div>
7521 <div class="date">
7522 4th July 2013
7523 </div>
7524 <div class="body">
7525 <p>Half a year ago, I reported that I had to find a replacement for my
7526 trusty old Thinkpad X41. Unfortunately I did not have much time to
7527 spend on it, but today the replacement finally arrived. I ended up
7528 picking a <a href="http://www.linlap.com/lenovo_thinkpad_x230">Thinkpad
7529 X230</a> with SSD disk (NZDAJMN). I first test installed Debian Edu
7530 Wheezy as a roaming workstation, and it worked flawlessly. As I write
7531 this, it is installing what I hope will be a more final installation,
7532 with a encrypted hard drive to ensure any dope head stealing it end up
7533 with an expencive door stop.</p>
7534
7535 <p>I had a hard time trying to track down a good laptop, as my most
7536 important requirements (robust and with a good keyboard) are never
7537 listed in the feature list. But I did get good help from the search
7538 feature at <ahref="http://www.prisjakt.no/">Prisjakt</a>, which
7539 allowed me to limit the list of interesting laptops based on my other
7540 requirements. A bit surprising that SSD disk are not disks, so I had
7541 to drop number of disks from my search parameters.</p>
7542
7543 <p>I am not quite convinced about the keyboard, as it is significantly
7544 wider than my old keyboard, and I have to stretch my hand a lot more
7545 to reach the edges. But the key response is fairly good and the
7546 individual key shape is fairly easy to handle, so I hope I will get
7547 used to it. My old X40 was starting to fail, and I really needed a
7548 new laptop now. :)</p>
7549
7550 <p>I look forward to figuring out how to turn off the touch pad.</p>
7551
7552 </div>
7553 <div class="tags">
7554
7555
7556 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7557
7558
7559 </div>
7560 </div>
7561 <div class="padding"></div>
7562
7563 <div class="entry">
7564 <div class="title">
7565 <a href="http://people.skolelinux.org/pere/blog/Automatically_locate_and_install_required_firmware_packages_on_Debian__Isenkram_0_4_.html">Automatically locate and install required firmware packages on Debian (Isenkram 0.4)</a>
7566 </div>
7567 <div class="date">
7568 25th June 2013
7569 </div>
7570 <div class="body">
7571 <p>It annoys me when the computer fail to do automatically what it is
7572 perfectly capable of, and I have to do it manually to get things
7573 working. One such task is to find out what firmware packages are
7574 needed to get the hardware on my computer working. Most often this
7575 affect the wifi card, but some times it even affect the RAID
7576 controller or the ethernet card. Today I pushed version 0.4 of the
7577 <a href="http://packages.qa.debian.org/isenkram">Isenkram package</a>
7578 including a new script isenkram-autoinstall-firmware handling the
7579 process of asking all the loaded kernel modules what firmware files
7580 they want, find debian packages providing these files and install the
7581 debian packages. Here is a test run on my laptop:</p>
7582
7583 <p><pre>
7584 # isenkram-autoinstall-firmware
7585 info: kernel drivers requested extra firmware: ipw2200-bss.fw ipw2200-ibss.fw ipw2200-sniffer.fw
7586 info: fetching http://http.debian.net/debian/dists/squeeze/Contents-i386.gz
7587 info: locating packages with the requested firmware files
7588 info: Updating APT sources after adding non-free APT source
7589 info: trying to install firmware-ipw2x00
7590 firmware-ipw2x00
7591 firmware-ipw2x00
7592 Preconfiguring packages ...
7593 Selecting previously deselected package firmware-ipw2x00.
7594 (Reading database ... 259727 files and directories currently installed.)
7595 Unpacking firmware-ipw2x00 (from .../firmware-ipw2x00_0.28+squeeze1_all.deb) ...
7596 Setting up firmware-ipw2x00 (0.28+squeeze1) ...
7597 #
7598 </pre></p>
7599
7600 <p>When all the requested firmware is present, a simple message is
7601 printed instead:</p>
7602
7603 <p><pre>
7604 # isenkram-autoinstall-firmware
7605 info: did not find any firmware files requested by loaded kernel modules. exiting
7606 #
7607 </pre></p>
7608
7609 <p>It could use some polish, but it is already working well and saving
7610 me some time when setting up new machines. :)</p>
7611
7612 <p>So, how does it work? It look at the set of currently loaded
7613 kernel modules, and look up each one of them using modinfo, to find
7614 the firmware files listed in the module meta-information. Next, it
7615 download the Contents file from a nearby APT mirror, and search for
7616 the firmware files in this file to locate the package with the
7617 requested firmware file. If the package is in the non-free section, a
7618 non-free APT source is added and the package is installed using
7619 <tt>apt-get install</tt>. The end result is a slightly better working
7620 machine.</p>
7621
7622 <p>I hope someone find time to implement a more polished version of
7623 this script as part of the hw-detect debian-installer module, to
7624 finally fix <a href="http://bugs.debian.org/655507">BTS report
7625 #655507</a>. There really is no need to insert USB sticks with
7626 firmware during a PXE install when the packages already are available
7627 from the nearby Debian mirror.</p>
7628
7629 </div>
7630 <div class="tags">
7631
7632
7633 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
7634
7635
7636 </div>
7637 </div>
7638 <div class="padding"></div>
7639
7640 <div class="entry">
7641 <div class="title">
7642 <a href="http://people.skolelinux.org/pere/blog/Fixing_the_Linux_black_screen_of_death_on_machines_with_Intel_HD_video.html">Fixing the Linux black screen of death on machines with Intel HD video</a>
7643 </div>
7644 <div class="date">
7645 11th June 2013
7646 </div>
7647 <div class="body">
7648 <p>When installing RedHat, Fedora, Debian and Ubuntu on some machines,
7649 the screen just turn black when Linux boot, either during installation
7650 or on first boot from the hard disk. I've seen it once in a while the
7651 last few years, but only recently understood the cause. I've seen it
7652 on HP laptops, and on my latest acquaintance the Packard Bell laptop.
7653 The reason seem to be in the wiring of some laptops. The system to
7654 control the screen background light is inverted, so when Linux try to
7655 turn the brightness fully on, it end up turning it off instead. I do
7656 not know which Linux drivers are affected, but this post is about the
7657 i915 driver used by the
7658 <a href="http://www.linlap.com/packard_bell_easynote_lv">Packard Bell
7659 EasyNote LV</a>, Thinkpad X40 and many other laptops.</p>
7660
7661 <p>The problem can be worked around two ways. Either by adding
7662 i915.invert_brightness=1 as a kernel option, or by adding a file in
7663 /etc/modprobe.d/ to tell modprobe to add the invert_brightness=1
7664 option when it load the i915 kernel module. On Debian and Ubuntu, it
7665 can be done by running these commands as root:</p>
7666
7667 <pre>
7668 echo options i915 invert_brightness=1 | tee /etc/modprobe.d/i915.conf
7669 update-initramfs -u -k all
7670 </pre>
7671
7672 <p>Since March 2012 there is
7673 <a href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4dca20efb1a9c2efefc28ad2867e5d6c3f5e1955">a
7674 mechanism in the Linux kernel</a> to tell the i915 driver which
7675 hardware have this problem, and get the driver to invert the
7676 brightness setting automatically. To use it, one need to add a row in
7677 <a href="http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/i915/intel_display.c">the
7678 intel_quirks array</a> in the driver source
7679 <tt>drivers/gpu/drm/i915/intel_display.c</tt> (look for "<tt>static
7680 struct intel_quirk intel_quirks</tt>"), specifying the PCI device
7681 number (vendor number 8086 is assumed) and subdevice vendor and device
7682 number.</p>
7683
7684 <p>My Packard Bell EasyNote LV got this output from <tt>lspci
7685 -vvnn</tt> for the video card in question:</p>
7686
7687 <p><pre>
7688 00:02.0 VGA compatible controller [0300]: Intel Corporation \
7689 3rd Gen Core processor Graphics Controller [8086:0156] \
7690 (rev 09) (prog-if 00 [VGA controller])
7691 Subsystem: Acer Incorporated [ALI] Device [1025:0688]
7692 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- \
7693 ParErr- Stepping- SE RR- FastB2B- DisINTx+
7694 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- \
7695 <TAbort- <MAbort->SERR- <PERR- INTx-
7696 Latency: 0
7697 Interrupt: pin A routed to IRQ 42
7698 Region 0: Memory at c2000000 (64-bit, non-prefetchable) [size=4M]
7699 Region 2: Memory at b0000000 (64-bit, prefetchable) [size=256M]
7700 Region 4: I/O ports at 4000 [size=64]
7701 Expansion ROM at <unassigned> [disabled]
7702 Capabilities: <access denied>
7703 Kernel driver in use: i915
7704 </pre></p>
7705
7706 <p>The resulting intel_quirks entry would then look like this:</p>
7707
7708 <p><pre>
7709 struct intel_quirk intel_quirks[] = {
7710 ...
7711 /* Packard Bell EasyNote LV11HC needs invert brightness quirk */
7712 { 0x0156, 0x1025, 0x0688, quirk_invert_brightness },
7713 ...
7714 }
7715 </pre></p>
7716
7717 <p>According to the kernel module instructions (as seen using
7718 <tt>modinfo i915</tt>), information about hardware needing the
7719 invert_brightness flag should be sent to the
7720 <a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel">dri-devel
7721 (at) lists.freedesktop.org</a> mailing list to reach the kernel
7722 developers. But my email about the laptop sent 2013-06-03 have not
7723 yet shown up in
7724 <a href="http://lists.freedesktop.org/archives/dri-devel/2013-June/thread.html">the
7725 web archive for the mailing list</a>, so I suspect they do not accept
7726 emails from non-subscribers. Because of this, I sent my patch also to
7727 the Debian bug tracking system instead as
7728 <a href="http://bugs.debian.org/710938">BTS report #710938</a>, to make
7729 sure the patch is not lost.</p>
7730
7731 <p>Unfortunately, it is not enough to fix the kernel to get Laptops
7732 with this problem working properly with Linux. If you use Gnome, your
7733 worries should be over at this point. But if you use KDE, there is
7734 something in KDE ignoring the invert_brightness setting and turning on
7735 the screen during login. I've reported it to Debian as
7736 <a href="http://bugs.debian.org/711237">BTS report #711237</a>, and
7737 have no idea yet how to figure out exactly what subsystem is doing
7738 this. Perhaps you can help? Perhaps you know what the Gnome
7739 developers did to handle this, and this can give a clue to the KDE
7740 developers? Or you know where in KDE the screen brightness is changed
7741 during login? If so, please update the BTS report (or get in touch if
7742 you do not know how to update BTS).</p>
7743
7744 <p>Update 2013-07-19: The correct fix for this machine seem to be
7745 acpi_backlight=vendor, to disable ACPI backlight support completely,
7746 as the ACPI information on the machine is trash and it is better to
7747 leave it to the intel video driver to control the screen
7748 backlight.</p>
7749
7750 </div>
7751 <div class="tags">
7752
7753
7754 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7755
7756
7757 </div>
7758 </div>
7759 <div class="padding"></div>
7760
7761 <div class="entry">
7762 <div class="title">
7763 <a href="http://people.skolelinux.org/pere/blog/How_to_install_Linux_on_a_Packard_Bell_Easynote_LV_preinstalled_with_Windows_8.html">How to install Linux on a Packard Bell Easynote LV preinstalled with Windows 8</a>
7764 </div>
7765 <div class="date">
7766 27th May 2013
7767 </div>
7768 <div class="body">
7769 <p>Two days ago, I asked
7770 <a href="http://people.skolelinux.org/pere/blog/How_can_I_install_Linux_on_a_Packard_Bell_Easynote_LV_preinstalled_with_Windows_8_.html">how
7771 I could install Linux on a Packard Bell EasyNote LV computer
7772 preinstalled with Windows 8</a>. I found a solution, but am horrified
7773 with the obstacles put in the way of Linux users on a laptop with UEFI
7774 and Windows 8.</p>
7775
7776 <p>I never found out if the cause of my problems were the use of UEFI
7777 secure booting or fast boot. I suspect fast boot was the problem,
7778 causing the firmware to boot directly from HD without considering any
7779 key presses and alternative devices, but do not know UEFI settings
7780 enough to tell.</p>
7781
7782 <p>There is no way to install Linux on the machine in question without
7783 opening the box and disconnecting the hard drive! This is as far as I
7784 can tell, the only way to get access to the firmware setup menu
7785 without accepting the Windows 8 license agreement. I am told (and
7786 found description on how to) that it is possible to configure the
7787 firmware setup once booted into Windows 8. But as I believe the terms
7788 of that agreement are completely unacceptable, accepting the license
7789 was never an alternative. I do not enter agreements I do not intend
7790 to follow.</p>
7791
7792 <p>I feared I had to return the laptops and ask for a refund, and
7793 waste many hours on this, but luckily there was a way to get it to
7794 work. But I would not recommend it to anyone planning to run Linux on
7795 it, and I have become sceptical to Windows 8 certified laptops. Is
7796 this the way Linux will be forced out of the market place, by making
7797 it close to impossible for "normal" users to install Linux without
7798 accepting the Microsoft Windows license terms? Or at least not
7799 without risking to loose the warranty?</p>
7800
7801 <p>I've updated the
7802 <a href="http://www.linlap.com/packard_bell_easynote_lv">Linux Laptop
7803 wiki page for Packard Bell EasyNote LV</a>, to ensure the next person
7804 do not have to struggle as much as I did to get Linux into the
7805 machine.</p>
7806
7807 <p>Thanks to Bob Rosbag, Florian Weimer, Philipp Kern, Ben Hutching,
7808 Michael Tokarev and others for feedback and ideas.</p>
7809
7810 </div>
7811 <div class="tags">
7812
7813
7814 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7815
7816
7817 </div>
7818 </div>
7819 <div class="padding"></div>
7820
7821 <div class="entry">
7822 <div class="title">
7823 <a href="http://people.skolelinux.org/pere/blog/How_can_I_install_Linux_on_a_Packard_Bell_Easynote_LV_preinstalled_with_Windows_8_.html">How can I install Linux on a Packard Bell Easynote LV preinstalled with Windows 8?</a>
7824 </div>
7825 <div class="date">
7826 25th May 2013
7827 </div>
7828 <div class="body">
7829 <p>I've run into quite a problem the last few days. I bought three
7830 new laptops for my parents and a few others. I bought Packard Bell
7831 Easynote LV to run Kubuntu on and use as their home computer. But I
7832 am completely unable to figure out how to install Linux on it. The
7833 computer is preinstalled with Windows 8, and I suspect it uses UEFI
7834 instead of a BIOS to boot.</p>
7835
7836 <p>The problem is that I am unable to get it to PXE boot, and unable
7837 to get it to boot the Linux installer from my USB stick. I have yet
7838 to try the DVD install, and still hope it will work. when I turn on
7839 the computer, there is no information on what buttons to press to get
7840 the normal boot menu. I expect to get some boot menu to select PXE or
7841 USB stick booting. When booting, it first ask for the language to
7842 use, then for some regional settings, and finally if I will accept the
7843 Windows 8 terms of use. As these terms are completely unacceptable to
7844 me, I have no other choice but to turn off the computer and try again
7845 to get it to boot the Linux installer.</p>
7846
7847 <p>I have gathered my findings so far on a Linlap page about the
7848 <a href="http://www.linlap.com/packard_bell_easynote_lv">Packard Bell
7849 EasyNote LV</a> model. If you have any idea how to get Linux
7850 installed on this machine, please get in touch or update that wiki
7851 page. If I can't find a way to install Linux, I will have to return
7852 the laptop to the seller and find another machine for my parents.</p>
7853
7854 <p>I wonder, is this the way Linux will be forced out of the market
7855 using UEFI and "secure boot" by making it impossible to install Linux
7856 on new Laptops?</p>
7857
7858 </div>
7859 <div class="tags">
7860
7861
7862 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7863
7864
7865 </div>
7866 </div>
7867 <div class="padding"></div>
7868
7869 <div class="entry">
7870 <div class="title">
7871 <a href="http://people.skolelinux.org/pere/blog/How_to_transform_a_Debian_based_system_to_a_Debian_Edu_installation.html">How to transform a Debian based system to a Debian Edu installation</a>
7872 </div>
7873 <div class="date">
7874 17th May 2013
7875 </div>
7876 <div class="body">
7877 <p><a href="http://www.skolelinux.org/">Debian Edu / Skolelinux</a> is
7878 an operating system based on Debian intended for use in schools. It
7879 contain a turn-key solution for the computer network provided to
7880 pupils in the primary schools. It provide both the central server,
7881 network boot servers and desktop environments with heaps of
7882 educational software. The project was founded almost 12 years ago,
7883 2001-07-02. If you want to support the project, which is in need for
7884 cash to fund developer gatherings and other project related activity,
7885 <a href="http://www.linuxiskolen.no/slxdebianlabs/donations.html">please
7886 donate some money</a>.
7887
7888 <p>A topic that come up again and again on the Debian Edu mailing
7889 lists and elsewhere, is the question on how to transform a Debian or
7890 Ubuntu installation into a Debian Edu installation. It isn't very
7891 hard, and last week I wrote a script to replicate the steps done by
7892 the Debian Edu installer.</p>
7893
7894 <p>The script,
7895 <a href="http://anonscm.debian.org/viewvc/debian-edu/branches/wheezy/debian-edu-config/share/debian-edu-config/tools/debian-edu-bless?view=markup">debian-edu-bless<a/>
7896 in the debian-edu-config package, will go through these six steps and
7897 transform an existing Debian Wheezy or Ubuntu (untested) installation
7898 into a Debian Edu Workstation:</p>
7899
7900 <ol>
7901
7902 <li>Add skolelinux related APT sources.</li>
7903 <li>Create /etc/debian-edu/config with the wanted configuration.</li>
7904 <li>Install debian-edu-install to load preseeding values and pull in
7905 our configuration.</li>
7906 <li>Preseed debconf database with profile setup in
7907 /etc/debian-edu/config, and run tasksel to install packages
7908 according to the profile specified in the config above,
7909 overriding some of the Debian automation machinery.</li>
7910 <li>Run debian-edu-cfengine-D installation to configure everything
7911 that could not be done using preseeding.</li>
7912 <li>Ask for a reboot to enable all the configuration changes.</li>
7913
7914 </ol>
7915
7916 <p>There are some steps in the Debian Edu installation that can not be
7917 replicated like this. Disk partitioning and LVM setup, for example.
7918 So this script just assume there is enough disk space to install all
7919 the needed packages.</p>
7920
7921 <p>The script was created to help a Debian Edu student working on
7922 setting up <a href="http://www.raspberrypi.org">Raspberry Pi</a> as a
7923 Debian Edu client, and using it he can take the existing
7924 <a href="http://www.raspbian.org/FrontPage‎">Raspbian</a> installation and
7925 transform it into a fully functioning Debian Edu Workstation (or
7926 Roaming Workstation, or whatever :).</p>
7927
7928 <p>The default setting in the script is to create a KDE Workstation.
7929 If a LXDE based Roaming workstation is wanted instead, modify the
7930 PROFILE and DESKTOP values at the top to look like this instead:</p>
7931
7932 <p><pre>
7933 PROFILE="Roaming-Workstation"
7934 DESKTOP="lxde"
7935 </pre></p>
7936
7937 <p>The script could even become useful to set up Debian Edu servers in
7938 the cloud, by starting with a virtual Debian installation at some
7939 virtual hosting service and setting up all the services on first
7940 boot.</p>
7941
7942 </div>
7943 <div class="tags">
7944
7945
7946 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
7947
7948
7949 </div>
7950 </div>
7951 <div class="padding"></div>
7952
7953 <div class="entry">
7954 <div class="title">
7955 <a href="http://people.skolelinux.org/pere/blog/Debian__the_Linux_distribution_of_choice_for_LEGO_designers_.html">Debian, the Linux distribution of choice for LEGO designers?</a>
7956 </div>
7957 <div class="date">
7958 11th May 2013
7959 </div>
7960 <div class="body">
7961 <P>In January,
7962 <a href="http://people.skolelinux.org/pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html">I
7963 announced a</a> new <a href="irc://irc.debian.org/%23debian-lego">IRC
7964 channel #debian-lego</a>, for those of us in the Debian and Linux
7965 community interested in <a href="http://www.lego.com/">LEGO</a>, the
7966 marvellous construction system from Denmark. We also created
7967 <a href="http://wiki.debian.org/LegoDesigners">a wiki page</a> to have
7968 a place to take notes and write down our plans and hopes. And several
7969 people showed up to help. I was very happy to see the effect of my
7970 call. Since the small start, we have a debtags tag
7971 <a href="http://debtags.debian.net/search/bytag?wl=hardware::hobby:lego">hardware::hobby:lego</a>
7972 tag for LEGO related packages, and now count 10 packages related to
7973 LEGO and <a href="http://mindstorms.lego.com/">Mindstorms</a>:</p>
7974
7975 <p><table>
7976 <tr><td><a href="http://packages.qa.debian.org/brickos">brickos</a></td><td>alternative OS for LEGO Mindstorms RCX. Supports development in C/C++</td></tr>
7977 <tr><td><a href="http://packages.qa.debian.org/leocad">leocad</a></td><td>virtual brick CAD software</td></tr>
7978 <tr><td><a href="http://packages.qa.debian.org/libnxt">libnxt</a></td><td>utility library for talking to the LEGO Mindstorms NX</td></tr>
7979 <tr><td><a href="http://packages.qa.debian.org/lnpd">lnpd</a></td><td>daemon for LNP communication with BrickOS</td></tr>
7980 <tr><td><a href="http://packages.qa.debian.org/nbc">nbc</a></td><td>compiler for LEGO Mindstorms NXT bricks</td></tr>
7981 <tr><td><a href="http://packages.qa.debian.org/nqc">nqc</a></td><td>Not Quite C compiler for LEGO Mindstorms RCX</td></tr>
7982 <tr><td><a href="http://packages.qa.debian.org/python-nxt">python-nxt</a></td><td>python driver/interface/wrapper for the Lego Mindstorms NXT robot</td></tr>
7983 <tr><td><a href="http://packages.qa.debian.org/python-nxt-filer">python-nxt-filer</a></td><td>simple GUI to manage files on a LEGO Mindstorms NXT</td></tr>
7984 <tr><td><a href="http://packages.qa.debian.org/scratch">scratch</a></td><td>easy to use programming environment for ages 8 and up</td></tr>
7985 <tr><td><a href="http://packages.qa.debian.org/t2n">t2n</a></td><td>simple command-line tool for Lego NXT</td></tr>
7986 </table></p>
7987
7988 <p>Some of these are available in Wheezy, and all but one are
7989 currently available in Jessie/testing. leocad is so far only
7990 available in experimental.</p>
7991
7992 <p>If you care about LEGO in Debian, please join us on IRC and help
7993 adding the rest of the great free software tools available on Linux
7994 for LEGO designers.</p>
7995
7996 </div>
7997 <div class="tags">
7998
7999
8000 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/lego">lego</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>.
8001
8002
8003 </div>
8004 </div>
8005 <div class="padding"></div>
8006
8007 <div class="entry">
8008 <div class="title">
8009 <a href="http://people.skolelinux.org/pere/blog/Debian_Wheezy_is_out___and_Debian_Edu___Skolelinux_should_soon_follow___newinwheezy.html">Debian Wheezy is out - and Debian Edu / Skolelinux should soon follow! #newinwheezy</a>
8010 </div>
8011 <div class="date">
8012 5th May 2013
8013 </div>
8014 <div class="body">
8015 <p>When I woke up this morning, I was very happy to see that the
8016 <a href="http://www.debian.org/News/2013/20130504">release announcement
8017 for Debian Wheezy</a> was waiting in my mail box. This is a great
8018 Debian release, and I expect to move my machines at home over to it fairly
8019 soon.</p>
8020
8021 <p>The new debian release contain heaps of new stuff, and one program
8022 in particular make me very happy to see included. The
8023 <a href="http://scratch.mit.edu/">Scratch</a> program, made famous by
8024 the <a href="http://www.code.org/">Teach kids code</a> movement, is
8025 included for the first time. Alongside similar programs like
8026 <a href="http://edu.kde.org/kturtle/">kturtle</a> and
8027 <a href="http://wiki.sugarlabs.org/go/Activities/Turtle_Art">turtleart</a>,
8028 it allow for visual programming where syntax errors can not happen,
8029 and a friendly programming environment for learning to control the
8030 computer. Scratch will also be included in the next release of Debian
8031 Edu.</a>
8032
8033 <p>And now that Wheezy is wrapped up, we can wrap up the next Debian
8034 Edu/Skolelinux release too. The
8035 <a href="http://lists.debian.org/debian-edu/2013/04/msg00132.html">first
8036 alpha release</a> went out last week, and the next should soon
8037 follow.<p>
8038
8039 </div>
8040 <div class="tags">
8041
8042
8043 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
8044
8045
8046 </div>
8047 </div>
8048 <div class="padding"></div>
8049
8050 <div class="entry">
8051 <div class="title">
8052 <a href="http://people.skolelinux.org/pere/blog/Isenkram_0_2_finally_in_the_Debian_archive.html">Isenkram 0.2 finally in the Debian archive</a>
8053 </div>
8054 <div class="date">
8055 3rd April 2013
8056 </div>
8057 <div class="body">
8058 <p>Today the <a href="http://packages.qa.debian.org/isenkram">Isenkram
8059 package</a> finally made it into the archive, after lingering in NEW
8060 for many months. I uploaded it to the Debian experimental suite
8061 2013-01-27, and today it was accepted into the archive.</p>
8062
8063 <p>Isenkram is a system for suggesting to users what packages to
8064 install to work with a pluggable hardware device. The suggestion pop
8065 up when the device is plugged in. For example if a Lego Mindstorm NXT
8066 is inserted, it will suggest to install the program needed to program
8067 the NXT controller. Give it a go, and report bugs and suggestions to
8068 BTS. :)</p>
8069
8070 </div>
8071 <div class="tags">
8072
8073
8074 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
8075
8076
8077 </div>
8078 </div>
8079 <div class="padding"></div>
8080
8081 <div class="entry">
8082 <div class="title">
8083 <a href="http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html">Bitcoin GUI now available from Debian/unstable (and Ubuntu/raring)</a>
8084 </div>
8085 <div class="date">
8086 2nd February 2013
8087 </div>
8088 <div class="body">
8089 <p>My
8090 <a href="http://people.skolelinux.org/pere/blog/How_to_backport_bitcoin_qt_version_0_7_2_2_to_Debian_Squeeze.html">last
8091 bitcoin related blog post</a> mentioned that the new
8092 <a href="http://packages.qa.debian.org/bitcoin">bitcoin package</a> for
8093 Debian was waiting in NEW. It was accepted by the Debian ftp-masters
8094 2013-01-19, and have been available in unstable since then. It was
8095 automatically copied to Ubuntu, and is available in their Raring
8096 version too.</p>
8097
8098 <p>But there is a strange problem with the build that block this new
8099 version from being available on the i386 and kfreebsd-i386
8100 architectures. For some strange reason, the autobuilders in Debian
8101 for these architectures fail to run the test suite on these
8102 architectures (<a href="http://bugs.debian.org/672524">BTS #672524</a>).
8103 We are so far unable to reproduce it when building it manually, and
8104 no-one have been able to propose a fix. If you got an idea what is
8105 failing, please let us know via the BTS.</p>
8106
8107 <p>One feature that is annoying me with of the bitcoin client, because
8108 I often run low on disk space, is the fact that the client will exit
8109 if it run short on space (<a href="http://bugs.debian.org/696715">BTS
8110 #696715</a>). So make sure you have enough disk space when you run
8111 it. :)</p>
8112
8113 <p>As usual, if you use bitcoin and want to show your support of my
8114 activities, please send Bitcoin donations to my address
8115 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
8116
8117 </div>
8118 <div class="tags">
8119
8120
8121 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
8122
8123
8124 </div>
8125 </div>
8126 <div class="padding"></div>
8127
8128 <div class="entry">
8129 <div class="title">
8130 <a href="http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html">Welcome to the world, Isenkram!</a>
8131 </div>
8132 <div class="date">
8133 22nd January 2013
8134 </div>
8135 <div class="body">
8136 <p>Yesterday, I
8137 <a href="http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html">asked
8138 for testers</a> for my prototype for making Debian better at handling
8139 pluggable hardware devices, which I
8140 <a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">set
8141 out to create</a> earlier this month. Several valuable testers showed
8142 up, and caused me to really want to to open up the development to more
8143 people. But before I did this, I want to come up with a sensible name
8144 for this project. Today I finally decided on a new name, and I have
8145 renamed the project from hw-support-handler to this new name. In the
8146 process, I moved the source to git and made it available as a
8147 <a href="http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git">collab-maint</a>
8148 repository in Debian. The new name? It is <strong>Isenkram</strong>.
8149 To fetch and build the latest version of the source, use</p>
8150
8151 <pre>
8152 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
8153 cd isenkram && git-buildpackage -us -uc
8154 </pre>
8155
8156 <p>I have not yet adjusted all files to use the new name yet. If you
8157 want to hack on the source or improve the package, please go ahead.
8158 But please talk to me first on IRC or via email before you do major
8159 changes, to make sure we do not step on each others toes. :)</p>
8160
8161 <p>If you wonder what 'isenkram' is, it is a Norwegian word for iron
8162 stuff, typically meaning tools, nails, screws, etc. Typical hardware
8163 stuff, in other words. I've been told it is the Norwegian variant of
8164 the German word eisenkram, for those that are familiar with that
8165 word.</p>
8166
8167 <p><strong>Update 2013-01-26</strong>: Added -us -us to build
8168 instructions, to avoid confusing people with an error from the signing
8169 process.</p>
8170
8171 <p><strong>Update 2013-01-27</strong>: Switch to HTTP URL for the git
8172 clone argument to avoid the need for authentication.</p>
8173
8174 </div>
8175 <div class="tags">
8176
8177
8178 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
8179
8180
8181 </div>
8182 </div>
8183 <div class="padding"></div>
8184
8185 <div class="entry">
8186 <div class="title">
8187 <a href="http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html">First prototype ready making hardware easier to use in Debian</a>
8188 </div>
8189 <div class="date">
8190 21st January 2013
8191 </div>
8192 <div class="body">
8193 <p>Early this month I set out to try to
8194 <a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">improve
8195 the Debian support for pluggable hardware devices</a>. Now my
8196 prototype is working, and it is ready for a larger audience. To test
8197 it, fetch the
8198 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">source
8199 from the Debian Edu subversion repository</a>, build and install the
8200 package. You might have to log out and in again activate the
8201 autostart script.</p>
8202
8203 <p>The design is simple:</p>
8204
8205 <ul>
8206
8207 <li>Add desktop entry in /usr/share/autostart/ causing a program
8208 hw-support-handlerd to start when the user log in.</li>
8209
8210 <li>This program listen for kernel events about new hardware (directly
8211 from the kernel like udev does), not using HAL dbus events as I
8212 initially did.</li>
8213
8214 <li>When new hardware is inserted, look up the hardware modalias in
8215 the APT database, a database
8216 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup">available
8217 via HTTP</a> and a database available as part of the package.</li>
8218
8219 <li>If a package is mapped to the hardware in question, the package
8220 isn't installed yet and this is the first time the hardware was
8221 plugged in, show a desktop notification suggesting to install the
8222 package or packages.</li>
8223
8224 <li>If the user click on the 'install package now' button, ask
8225 aptdaemon via the PackageKit API to install the requrired package.</li>
8226
8227 <li>aptdaemon ask for root password or sudo password, and install the
8228 package while showing progress information in a window.</li>
8229
8230 </ul>
8231
8232 <p>I still need to come up with a better name for the system. Here
8233 are some screen shots showing the prototype in action. First the
8234 notification, then the password request, and finally the request to
8235 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.</p>
8236
8237 <p><img src="http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-1-notification.png">
8238 <br><img src="http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-2-password.png">
8239 <br><img src="http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-3-dependencies.png">
8240 <br><img src="http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-4-installing.png">
8241 <br><img src="http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-5-installing-details.png" width="70%"></p>
8242
8243 <p>The prototype still need to be improved with longer timeouts, but
8244 is already useful. The database of hardware to package mappings also
8245 need more work. It is currently compatible with the Ubuntu way of
8246 storing such information in the package control file, but could be
8247 changed to use other formats instead or in addition to the current
8248 method. I've dropped the use of discover for this mapping, as the
8249 modalias approach is more flexible and easier to use on Linux as long
8250 as the Linux kernel expose its modalias strings directly.</p>
8251
8252 <p><strong>Update 2013-01-21 16:50</strong>: Due to popular demand,
8253 here is the command required to check out and build the source: Use
8254 '<tt>svn checkout
8255 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
8256 hw-support-handler; debuild</tt>'. If you lack debuild, install the
8257 devscripts package.</p>
8258
8259 <p><strong>Update 2013-01-23 12:00</strong>: The project is now
8260 renamed to Isenkram and the source moved from the Debian Edu
8261 subversion repository to a Debian collab-maint git repository. See
8262 <a href="http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html">build
8263 instructions</a> for details.</p>
8264
8265 </div>
8266 <div class="tags">
8267
8268
8269 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
8270
8271
8272 </div>
8273 </div>
8274 <div class="padding"></div>
8275
8276 <div class="entry">
8277 <div class="title">
8278 <a href="http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html">Thank you Thinkpad X41, for your long and trustworthy service</a>
8279 </div>
8280 <div class="date">
8281 19th January 2013
8282 </div>
8283 <div class="body">
8284 <p>This Christmas my trusty old laptop died. It died quietly and
8285 suddenly in bed. With a quiet whimper, it went completely quiet and
8286 black. The power button was no longer able to turn it on. It was a
8287 IBM Thinkpad X41, and the best laptop I ever had. Better than both
8288 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
8289 Compaq I had before that. Now I need to find a replacement. To keep
8290 going during Christmas, I moved the one year old SSD disk to my old
8291 X40 where it fitted (only one I had left that could use it), but it is
8292 not a durable solution.
8293
8294 <p>My laptop needs are fairly modest. This is my wishlist from when I
8295 got a new one more than 10 years ago. It still holds true.:)</p>
8296
8297 <ul>
8298
8299 <li>Lightweight (around 1 kg) and small volume (preferably smaller
8300 than A4).</li>
8301 <li>Robust, it will be in my backpack every day.</li>
8302 <li>Three button mouse and a mouse pin instead of touch pad.</li>
8303 <li>Long battery life time. Preferable a week.</li>
8304 <li>Internal WIFI network card.</li>
8305 <li>Internal Twisted Pair network card.</li>
8306 <li>Some USB slots (2-3 is plenty)</li>
8307 <li>Good keyboard - similar to the Thinkpad.</li>
8308 <li>Video resolution at least 1024x768, with size around 12" (A4 paper
8309 size).</li>
8310 <li>Hardware supported by Debian Stable, ie the default kernel and
8311 X.org packages.</li>
8312 <li>Quiet, preferably fan free (or at least not using the fan most of
8313 the time).
8314
8315 </ul>
8316
8317 <p>You will notice that there are no RAM and CPU requirements in the
8318 list. The reason is simply that the specifications on laptops the
8319 last 10-15 years have been sufficient for my needs, and I have to look
8320 at other features to choose my laptop. But are there still made as
8321 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
8322 robust, and Thinkpads seem to be heading in the wrong direction since
8323 Lenovo took over. But I've been told that X220 and X1 Carbon might
8324 still be useful.</p>
8325
8326 <p>Perhaps I should rethink my needs, and look for a pad with an
8327 external keyboard? I'll have to check the
8328 <a href="http://www.linux-laptop.net/">Linux Laptops site</a> for
8329 well-supported laptops, or perhaps just buy one preinstalled from one
8330 of the vendors listed on the <a href="http://linuxpreloaded.com/">Linux
8331 Pre-loaded site</a>.</p>
8332
8333 </div>
8334 <div class="tags">
8335
8336
8337 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
8338
8339
8340 </div>
8341 </div>
8342 <div class="padding"></div>
8343
8344 <div class="entry">
8345 <div class="title">
8346 <a href="http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html">How to find a browser plugin supporting a given MIME type</a>
8347 </div>
8348 <div class="date">
8349 18th January 2013
8350 </div>
8351 <div class="body">
8352 <p>Some times I try to figure out which Iceweasel browser plugin to
8353 install to get support for a given MIME type. Thanks to
8354 <a href="https://wiki.ubuntu.com/MozillaTeam/Plugins">specifications
8355 done by Ubuntu</a> and Mozilla, it is possible to do this in Debian.
8356 Unfortunately, not very many packages provide the needed meta
8357 information, Anyway, here is a small script to look up all browser
8358 plugin packages announcing ther MIME support using this specification:</p>
8359
8360 <pre>
8361 #!/usr/bin/python
8362 import sys
8363 import apt
8364 def pkgs_handling_mimetype(mimetype):
8365 cache = apt.Cache()
8366 cache.open(None)
8367 thepkgs = []
8368 for pkg in cache:
8369 version = pkg.candidate
8370 if version is None:
8371 version = pkg.installed
8372 if version is None:
8373 continue
8374 record = version.record
8375 if not record.has_key('Npp-MimeType'):
8376 continue
8377 mime_types = record['Npp-MimeType'].split(',')
8378 for t in mime_types:
8379 t = t.rstrip().strip()
8380 if t == mimetype:
8381 thepkgs.append(pkg.name)
8382 return thepkgs
8383 mimetype = "audio/ogg"
8384 if 1 < len(sys.argv):
8385 mimetype = sys.argv[1]
8386 print "Browser plugin packages supporting %s:" % mimetype
8387 for pkg in pkgs_handling_mimetype(mimetype):
8388 print " %s" %pkg
8389 </pre>
8390
8391 <p>It can be used like this to look up a given MIME type:</p>
8392
8393 <pre>
8394 % ./apt-find-browserplug-for-mimetype
8395 Browser plugin packages supporting audio/ogg:
8396 gecko-mediaplayer
8397 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
8398 Browser plugin packages supporting application/x-shockwave-flash:
8399 browser-plugin-gnash
8400 %
8401 </pre>
8402
8403 <p>In Ubuntu this mechanism is combined with support in the browser
8404 itself to query for plugins and propose to install the needed
8405 packages. It would be great if Debian supported such feature too. Is
8406 anyone working on adding it?</p>
8407
8408 <p><strong>Update 2013-01-18 14:20</strong>: The Debian BTS
8409 request for icweasel support for this feature is
8410 <a href="http://bugs.debian.org/484010">#484010</a> from 2008 (and
8411 <a href="http://bugs.debian.org/698426">#698426</a> from today). Lack
8412 of manpower and wish for a different design is the reason thus feature
8413 is not yet in iceweasel from Debian.</p>
8414
8415 </div>
8416 <div class="tags">
8417
8418
8419 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
8420
8421
8422 </div>
8423 </div>
8424 <div class="padding"></div>
8425
8426 <div class="entry">
8427 <div class="title">
8428 <a href="http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html">What is the most supported MIME type in Debian?</a>
8429 </div>
8430 <div class="date">
8431 16th January 2013
8432 </div>
8433 <div class="body">
8434 <p>The <a href="http://wiki.debian.org/AppStreamDebianProposal">DEP-11
8435 proposal to add AppStream information to the Debian archive</a>, is a
8436 proposal to make it possible for a Desktop application to propose to
8437 the user some package to install to gain support for a given MIME
8438 type, font, library etc. that is currently missing. With such
8439 mechanism in place, it would be possible for the desktop to
8440 automatically propose and install leocad if some LDraw file is
8441 downloaded by the browser.</p>
8442
8443 <p>To get some idea about the current content of the archive, I decided
8444 to write a simple program to extract all .desktop files from the
8445 Debian archive and look up the claimed MIME support there. The result
8446 can be found on the
8447 <a href="http://ftp.skolelinux.org/pub/AppStreamTest">Skolelinux FTP
8448 site</a>. Using the collected information, it become possible to
8449 answer the question in the title. Here are the 20 most supported MIME
8450 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
8451 The complete list is available from the link above.</p>
8452
8453 <p><strong>Debian Stable:</strong></p>
8454
8455 <pre>
8456 count MIME type
8457 ----- -----------------------
8458 32 text/plain
8459 30 audio/mpeg
8460 29 image/png
8461 28 image/jpeg
8462 27 application/ogg
8463 26 audio/x-mp3
8464 25 image/tiff
8465 25 image/gif
8466 22 image/bmp
8467 22 audio/x-wav
8468 20 audio/x-flac
8469 19 audio/x-mpegurl
8470 18 video/x-ms-asf
8471 18 audio/x-musepack
8472 18 audio/x-mpeg
8473 18 application/x-ogg
8474 17 video/mpeg
8475 17 audio/x-scpls
8476 17 audio/ogg
8477 16 video/x-ms-wmv
8478 </pre>
8479
8480 <p><strong>Debian Testing:</strong></p>
8481
8482 <pre>
8483 count MIME type
8484 ----- -----------------------
8485 33 text/plain
8486 32 image/png
8487 32 image/jpeg
8488 29 audio/mpeg
8489 27 image/gif
8490 26 image/tiff
8491 26 application/ogg
8492 25 audio/x-mp3
8493 22 image/bmp
8494 21 audio/x-wav
8495 19 audio/x-mpegurl
8496 19 audio/x-mpeg
8497 18 video/mpeg
8498 18 audio/x-scpls
8499 18 audio/x-flac
8500 18 application/x-ogg
8501 17 video/x-ms-asf
8502 17 text/html
8503 17 audio/x-musepack
8504 16 image/x-xbitmap
8505 </pre>
8506
8507 <p><strong>Debian Unstable:</strong></p>
8508
8509 <pre>
8510 count MIME type
8511 ----- -----------------------
8512 31 text/plain
8513 31 image/png
8514 31 image/jpeg
8515 29 audio/mpeg
8516 28 application/ogg
8517 27 image/gif
8518 26 image/tiff
8519 26 audio/x-mp3
8520 23 audio/x-wav
8521 22 image/bmp
8522 21 audio/x-flac
8523 20 audio/x-mpegurl
8524 19 audio/x-mpeg
8525 18 video/x-ms-asf
8526 18 video/mpeg
8527 18 audio/x-scpls
8528 18 application/x-ogg
8529 17 audio/x-musepack
8530 16 video/x-ms-wmv
8531 16 video/x-msvideo
8532 </pre>
8533
8534 <p>I am told that PackageKit can provide an API to access the kind of
8535 information mentioned in DEP-11. I have not yet had time to look at
8536 it, but hope the PackageKit people in Debian are on top of these
8537 issues.</p>
8538
8539 <p><strong>Update 2013-01-16 13:35</strong>: Updated numbers after
8540 discovering a typo in my script.</p>
8541
8542 </div>
8543 <div class="tags">
8544
8545
8546 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
8547
8548
8549 </div>
8550 </div>
8551 <div class="padding"></div>
8552
8553 <div class="entry">
8554 <div class="title">
8555 <a href="http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html">Using modalias info to find packages handling my hardware</a>
8556 </div>
8557 <div class="date">
8558 15th January 2013
8559 </div>
8560 <div class="body">
8561 <p>Yesterday, I wrote about the
8562 <a href="http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html">modalias
8563 values provided by the Linux kernel</a> following my hope for
8564 <a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">better
8565 dongle support in Debian</a>. Using this knowledge, I have tested how
8566 modalias values attached to package names can be used to map packages
8567 to hardware. This allow the system to look up and suggest relevant
8568 packages when I plug in some new hardware into my machine, and replace
8569 discover and discover-data as the database used to map hardware to
8570 packages.</p>
8571
8572 <p>I create a modaliases file with entries like the following,
8573 containing package name, kernel module name (if relevant, otherwise
8574 the package name) and globs matching the relevant hardware
8575 modalias.</p>
8576
8577 <p><blockquote>
8578 Package: package-name
8579 <br>Modaliases: module(modaliasglob, modaliasglob, modaliasglob)</p>
8580 </blockquote></p>
8581
8582 <p>It is fairly trivial to write code to find the relevant packages
8583 for a given modalias value using this file.</p>
8584
8585 <p>An entry like this would suggest the video and picture application
8586 cheese for many USB web cameras (interface bus class 0E01):</p>
8587
8588 <p><blockquote>
8589 Package: cheese
8590 <br>Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)</p>
8591 </blockquote></p>
8592
8593 <p>An entry like this would suggest the pcmciautils package when a
8594 CardBus bridge (bus class 0607) PCI device is present:</p>
8595
8596 <p><blockquote>
8597 Package: pcmciautils
8598 <br>Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
8599 </blockquote></p>
8600
8601 <p>An entry like this would suggest the package colorhug-client when
8602 plugging in a ColorHug with USB IDs 04D8:F8DA:</p>
8603
8604 <p><blockquote>
8605 Package: colorhug-client
8606 <br>Modaliases: colorhug-client(usb:v04D8pF8DAd*)</p>
8607 </blockquote></p>
8608
8609 <p>I believe the format is compatible with the format of the Packages
8610 file in the Debian archive. Ubuntu already uses their Packages file
8611 to store their mappings from packages to hardware.</p>
8612
8613 <p>By adding a XB-Modaliases: header in debian/control, any .deb can
8614 announce the hardware it support in a way my prototype understand.
8615 This allow those publishing packages in an APT source outside the
8616 Debian archive as well as those backporting packages to make sure the
8617 hardware mapping are included in the package meta information. I've
8618 tested such header in the pymissile package, and its modalias mapping
8619 is working as it should with my prototype. It even made it to Ubuntu
8620 Raring.</p>
8621
8622 <p>To test if it was possible to look up supported hardware using only
8623 the shell tools available in the Debian installer, I wrote a shell
8624 implementation of the lookup code. The idea is to create files for
8625 each modalias and let the shell do the matching. Please check out and
8626 try the
8627 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co">hw-support-lookup</a>
8628 shell script. It run without any extra dependencies and fetch the
8629 hardware mappings from the Debian archive and the subversion
8630 repository where I currently work on my prototype.</p>
8631
8632 <p>When I use it on a machine with a yubikey inserted, it suggest to
8633 install yubikey-personalization:</p>
8634
8635 <p><blockquote>
8636 % ./hw-support-lookup
8637 <br>yubikey-personalization
8638 <br>%
8639 </blockquote></p>
8640
8641 <p>When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
8642 propose to install the pcmciautils package:</p>
8643
8644 <p><blockquote>
8645 % ./hw-support-lookup
8646 <br>pcmciautils
8647 <br>%
8648 </blockquote></p>
8649
8650 <p>If you know of any hardware-package mapping that should be added to
8651 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co">my
8652 database</a>, please tell me about it.</p>
8653
8654 <p>It could be possible to generate several of the mappings between
8655 packages and hardware. One source would be to look at packages with
8656 kernel modules, ie packages with *.ko files in /lib/modules/, and
8657 extract their modalias information. Another would be to look at
8658 packages with udev rules, ie packages with files in
8659 /lib/udev/rules.d/, and extract their vendor/model information to
8660 generate a modalias matching rule. I have not tested any of these to
8661 see if it work.</p>
8662
8663 <p>If you want to help implementing a system to let us propose what
8664 packages to install when new hardware is plugged into a Debian
8665 machine, please send me an email or talk to me on
8666 <a href="irc://irc.debian.org/%23debian-devel">#debian-devel</a>.</p>
8667
8668 </div>
8669 <div class="tags">
8670
8671
8672 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
8673
8674
8675 </div>
8676 </div>
8677 <div class="padding"></div>
8678
8679 <div class="entry">
8680 <div class="title">
8681 <a href="http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html">Modalias strings - a practical way to map "stuff" to hardware</a>
8682 </div>
8683 <div class="date">
8684 14th January 2013
8685 </div>
8686 <div class="body">
8687 <p>While looking into how to look up Debian packages based on hardware
8688 information, to find the packages that support a given piece of
8689 hardware, I refreshed my memory regarding modalias values, and decided
8690 to document the details. Here are my findings so far, also available
8691 in
8692 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
8693 Debian Edu subversion repository</a>:
8694
8695 <p><strong>Modalias decoded</strong></p>
8696
8697 <p>This document try to explain what the different types of modalias
8698 values stands for. It is in part based on information from
8699 &lt;URL: <a href="https://wiki.archlinux.org/index.php/Modalias">https://wiki.archlinux.org/index.php/Modalias</a> &gt;,
8700 &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;,
8701 &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
8702 &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;.
8703
8704 <p>The modalias entries for a given Linux machine can be found using
8705 this shell script:</p>
8706
8707 <pre>
8708 find /sys -name modalias -print0 | xargs -0 cat | sort -u
8709 </pre>
8710
8711 <p>The supported modalias globs for a given kernel module can be found
8712 using modinfo:</p>
8713
8714 <pre>
8715 % /sbin/modinfo psmouse | grep alias:
8716 alias: serio:ty05pr*id*ex*
8717 alias: serio:ty01pr*id*ex*
8718 %
8719 </pre>
8720
8721 <p><strong>PCI subtype</strong></p>
8722
8723 <p>A typical PCI entry can look like this. This is an Intel Host
8724 Bridge memory controller:</p>
8725
8726 <p><blockquote>
8727 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
8728 </blockquote></p>
8729
8730 <p>This represent these values:</p>
8731
8732 <pre>
8733 v 00008086 (vendor)
8734 d 00002770 (device)
8735 sv 00001028 (subvendor)
8736 sd 000001AD (subdevice)
8737 bc 06 (bus class)
8738 sc 00 (bus subclass)
8739 i 00 (interface)
8740 </pre>
8741
8742 <p>The vendor/device values are the same values outputted from 'lspci
8743 -n' as 8086:2770. The bus class/subclass is also shown by lspci as
8744 0600. The 0600 class is a host bridge. Other useful bus values are
8745 0300 (VGA compatible card) and 0200 (Ethernet controller).</p>
8746
8747 <p>Not sure how to figure out the interface value, nor what it
8748 means.</p>
8749
8750 <p><strong>USB subtype</strong></p>
8751
8752 <p>Some typical USB entries can look like this. This is an internal
8753 USB hub in a laptop:</p>
8754
8755 <p><blockquote>
8756 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
8757 </blockquote></p>
8758
8759 <p>Here is the values included in this alias:</p>
8760
8761 <pre>
8762 v 1D6B (device vendor)
8763 p 0001 (device product)
8764 d 0206 (bcddevice)
8765 dc 09 (device class)
8766 dsc 00 (device subclass)
8767 dp 00 (device protocol)
8768 ic 09 (interface class)
8769 isc 00 (interface subclass)
8770 ip 00 (interface protocol)
8771 </pre>
8772
8773 <p>The 0900 device class/subclass means hub. Some times the relevant
8774 class is in the interface class section. For a simple USB web camera,
8775 these alias entries show up:</p>
8776
8777 <p><blockquote>
8778 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
8779 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
8780 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
8781 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
8782 </blockquote></p>
8783
8784 <p>Interface class 0E01 is video control, 0E02 is video streaming (aka
8785 camera), 0101 is audio control device and 0102 is audio streaming (aka
8786 microphone). Thus this is a camera with microphone included.</p>
8787
8788 <p><strong>ACPI subtype</strong></p>
8789
8790 <p>The ACPI type is used for several non-PCI/USB stuff. This is an IR
8791 receiver in a Thinkpad X40:</p>
8792
8793 <p><blockquote>
8794 acpi:IBM0071:PNP0511:
8795 </blockquote></p>
8796
8797 <p>The values between the colons are IDs.</p>
8798
8799 <p><strong>DMI subtype</strong></p>
8800
8801 <p>The DMI table contain lots of information about the computer case
8802 and model. This is an entry for a IBM Thinkpad X40, fetched from
8803 /sys/devices/virtual/dmi/id/modalias:</p>
8804
8805 <p><blockquote>
8806 dmi:bvnIBM:bvr1UETB6WW(1.66):bd06/15/2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
8807 </blockquote></p>
8808
8809 <p>The values present are</p>
8810
8811 <pre>
8812 bvn IBM (BIOS vendor)
8813 bvr 1UETB6WW(1.66) (BIOS version)
8814 bd 06/15/2005 (BIOS date)
8815 svn IBM (system vendor)
8816 pn 2371H4G (product name)
8817 pvr ThinkPadX40 (product version)
8818 rvn IBM (board vendor)
8819 rn 2371H4G (board name)
8820 rvr NotAvailable (board version)
8821 cvn IBM (chassis vendor)
8822 ct 10 (chassis type)
8823 cvr NotAvailable (chassis version)
8824 </pre>
8825
8826 <p>The chassis type 10 is Notebook. Other interesting values can be
8827 found in the dmidecode source:</p>
8828
8829 <pre>
8830 3 Desktop
8831 4 Low Profile Desktop
8832 5 Pizza Box
8833 6 Mini Tower
8834 7 Tower
8835 8 Portable
8836 9 Laptop
8837 10 Notebook
8838 11 Hand Held
8839 12 Docking Station
8840 13 All In One
8841 14 Sub Notebook
8842 15 Space-saving
8843 16 Lunch Box
8844 17 Main Server Chassis
8845 18 Expansion Chassis
8846 19 Sub Chassis
8847 20 Bus Expansion Chassis
8848 21 Peripheral Chassis
8849 22 RAID Chassis
8850 23 Rack Mount Chassis
8851 24 Sealed-case PC
8852 25 Multi-system
8853 26 CompactPCI
8854 27 AdvancedTCA
8855 28 Blade
8856 29 Blade Enclosing
8857 </pre>
8858
8859 <p>The chassis type values are not always accurately set in the DMI
8860 table. For example my home server is a tower, but the DMI modalias
8861 claim it is a desktop.</p>
8862
8863 <p><strong>SerIO subtype</strong></p>
8864
8865 <p>This type is used for PS/2 mouse plugs. One example is from my
8866 test machine:</p>
8867
8868 <p><blockquote>
8869 serio:ty01pr00id00ex00
8870 </blockquote></p>
8871
8872 <p>The values present are</p>
8873
8874 <pre>
8875 ty 01 (type)
8876 pr 00 (prototype)
8877 id 00 (id)
8878 ex 00 (extra)
8879 </pre>
8880
8881 <p>This type is supported by the psmouse driver. I am not sure what
8882 the valid values are.</p>
8883
8884 <p><strong>Other subtypes</strong></p>
8885
8886 <p>There are heaps of other modalias subtypes according to
8887 file2alias.c. There is the rest of the list from that source: amba,
8888 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
8889 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
8890 vmbus, x86cpu and zorro. I did not spend time documenting all of
8891 these, as they do not seem relevant for my intended use with mapping
8892 hardware to packages when new stuff is inserted during run time.</p>
8893
8894 <p><strong>Looking up kernel modules using modalias values</strong></p>
8895
8896 <p>To check which kernel modules provide support for a given modalias,
8897 one can use the following shell script:</p>
8898
8899 <pre>
8900 for id in $(find /sys -name modalias -print0 | xargs -0 cat | sort -u); do \
8901 echo "$id" ; \
8902 /sbin/modprobe --show-depends "$id"|sed 's/^/ /' ; \
8903 done
8904 </pre>
8905
8906 <p>The output can look like this (only the first few entries as the
8907 list is very long on my test machine):</p>
8908
8909 <pre>
8910 acpi:ACPI0003:
8911 insmod /lib/modules/2.6.32-5-686/kernel/drivers/acpi/ac.ko
8912 acpi:device:
8913 FATAL: Module acpi:device: not found.
8914 acpi:IBM0068:
8915 insmod /lib/modules/2.6.32-5-686/kernel/drivers/char/nvram.ko
8916 insmod /lib/modules/2.6.32-5-686/kernel/drivers/leds/led-class.ko
8917 insmod /lib/modules/2.6.32-5-686/kernel/net/rfkill/rfkill.ko
8918 insmod /lib/modules/2.6.32-5-686/kernel/drivers/platform/x86/thinkpad_acpi.ko
8919 acpi:IBM0071:PNP0511:
8920 insmod /lib/modules/2.6.32-5-686/kernel/lib/crc-ccitt.ko
8921 insmod /lib/modules/2.6.32-5-686/kernel/net/irda/irda.ko
8922 insmod /lib/modules/2.6.32-5-686/kernel/drivers/net/irda/nsc-ircc.ko
8923 [...]
8924 </pre>
8925
8926 <p>If you want to help implementing a system to let us propose what
8927 packages to install when new hardware is plugged into a Debian
8928 machine, please send me an email or talk to me on
8929 <a href="irc://irc.debian.org/%23debian-devel">#debian-devel</a>.</p>
8930
8931 <p><strong>Update 2013-01-15:</strong> Rewrite "cat $(find ...)" to
8932 "find ... -print0 | xargs -0 cat" to make sure it handle directories
8933 in /sys/ with space in them.</p>
8934
8935 </div>
8936 <div class="tags">
8937
8938
8939 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
8940
8941
8942 </div>
8943 </div>
8944 <div class="padding"></div>
8945
8946 <div class="entry">
8947 <div class="title">
8948 <a href="http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html">Moved the pymissile Debian packaging to collab-maint</a>
8949 </div>
8950 <div class="date">
8951 10th January 2013
8952 </div>
8953 <div class="body">
8954 <p>As part of my investigation on how to improve the support in Debian
8955 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
8956 Launcher and updated the Debian package
8957 <a href="http://packages.qa.debian.org/pymissile">pymissile</a> to make
8958 sure udev will fix the device permissions when it is plugged in. I
8959 also added a "Modaliases" header to test it in the Debian archive and
8960 hopefully make the package be proposed by jockey in Ubuntu when a user
8961 plug in his rocket launcher. In the process I moved the source to a
8962 git repository under collab-maint, to make it easier for any DD to
8963 contribute. <a href="http://code.google.com/p/pymissile/">Upstream</a>
8964 is not very active, but the software still work for me even after five
8965 years of relative silence. The new git repository is not listed in
8966 the uploaded package yet, because I want to test the other changes a
8967 bit more before I upload the new version. If you want to check out
8968 the new version with a .desktop file included, visit the
8969 <a href="http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git">gitweb
8970 view</a> or use "<tt>git clone
8971 git://anonscm.debian.org/collab-maint/pymissile.git</tt>".</p>
8972
8973 </div>
8974 <div class="tags">
8975
8976
8977 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>.
8978
8979
8980 </div>
8981 </div>
8982 <div class="padding"></div>
8983
8984 <div class="entry">
8985 <div class="title">
8986 <a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">Lets make hardware dongles easier to use in Debian</a>
8987 </div>
8988 <div class="date">
8989 9th January 2013
8990 </div>
8991 <div class="body">
8992 <p>One thing that annoys me with Debian and Linux distributions in
8993 general, is that there is a great package management system with the
8994 ability to automatically install software packages by downloading them
8995 from the distribution mirrors, but no way to get it to automatically
8996 install the packages I need to use the hardware I plug into my
8997 machine. Even if the package to use it is easily available from the
8998 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
8999 suggest to automatically install the python-nxt, nbc and t2n packages
9000 I need to talk to it. When I plug in a Yubikey, it could propose the
9001 yubikey-personalization package. The information required to do this
9002 is available, but no-one have pulled all the pieces together.</p>
9003
9004 <p>Some years ago, I proposed to
9005 <a href="http://lists.debian.org/debian-devel/2010/05/msg01206.html">use
9006 the discover subsystem to implement this</a>. The idea is fairly
9007 simple:
9008
9009 <ul>
9010
9011 <li>Add a desktop entry in /usr/share/autostart/ pointing to a program
9012 starting when a user log in.</li>
9013
9014 <li>Set this program up to listen for kernel events emitted when new
9015 hardware is inserted into the computer.</li>
9016
9017 <li>When new hardware is inserted, look up the hardware ID in a
9018 database mapping to packages, and take note of any non-installed
9019 packages.</li>
9020
9021 <li>Show a message to the user proposing to install the discovered
9022 package, and make it easy to install it.</li>
9023
9024 </ul>
9025
9026 <p>I am not sure what the best way to implement this is, but my
9027 initial idea was to use dbus events to discover new hardware, the
9028 discover database to find packages and
9029 <a href="http://www.packagekit.org/">PackageKit</a> to install
9030 packages.</p>
9031
9032 <p>Yesterday, I found time to try to implement this idea, and the
9033 draft package is now checked into
9034 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
9035 Debian Edu subversion repository</a>. In the process, I updated the
9036 <a href="http://packages.qa.debian.org/d/discover-data.html">discover-data</a>
9037 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
9038 the relevant packages in Debian, and uploaded a new version
9039 2.2013.01.09 to unstable. I also discovered that the current
9040 <a href="http://packages.qa.debian.org/d/discover.html">discover</a>
9041 package in Debian no longer discovered any USB devices, because
9042 /proc/bus/usb/devices is no longer present. I ported it to use
9043 libusb as a fall back option to get it working. The fixed package
9044 version 2.1.2-6 is now in experimental (didn't upload it to unstable
9045 because of the freeze).</p>
9046
9047 <p>With this prototype in place, I can insert my Yubikey, and get this
9048 desktop notification to show up (only once, the first time it is
9049 inserted):</p>
9050
9051 <p align="center"><img src="http://people.skolelinux.org/pere/blog/images/2013-01-09-hw-autoinstall.png"></p>
9052
9053 <p>For this prototype to be really useful, some way to automatically
9054 install the proposed packages by pressing the "Please install
9055 program(s)" button should to be implemented.</p>
9056
9057 <p>If this idea seem useful to you, and you want to help make it
9058 happen, please help me update the discover-data database with mappings
9059 from hardware to Debian packages. Check if 'discover-pkginstall -l'
9060 list the package you would like to have installed when a given
9061 hardware device is inserted into your computer, and report bugs using
9062 reportbug if it isn't. Or, if you know of a better way to provide
9063 such mapping, please let me know.</p>
9064
9065 <p>This prototype need more work, and there are several questions that
9066 should be considered before it is ready for production use. Is dbus
9067 the correct way to detect new hardware? At the moment I look for HAL
9068 dbus events on the system bus, because that is the events I could see
9069 on my Debian Squeeze KDE desktop. Are there better events to use?
9070 How should the user be notified? Is the desktop notification
9071 mechanism the best option, or should the background daemon raise a
9072 popup instead? How should packages be installed? When should they
9073 not be installed?</p>
9074
9075 <p>If you want to help getting such feature implemented in Debian,
9076 please send me an email. :)</p>
9077
9078 </div>
9079 <div class="tags">
9080
9081
9082 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram</a>.
9083
9084
9085 </div>
9086 </div>
9087 <div class="padding"></div>
9088
9089 <div class="entry">
9090 <div class="title">
9091 <a href="http://people.skolelinux.org/pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html">New IRC channel for LEGO designers using Debian</a>
9092 </div>
9093 <div class="date">
9094 2nd January 2013
9095 </div>
9096 <div class="body">
9097 <p>During Christmas, I have worked a bit on the Debian support for
9098 <a href="http://mindstorms.lego.com/en-us/Default.aspx">LEGO Mindstorm
9099 NXT</a>. My son and I have played a bit with my NXT set, and I
9100 discovered I had to build all the tools myself because none were
9101 already in Debian Squeeze. If Debian support for LEGO is something
9102 you care about, please join me on the IRC channel
9103 <a href="irc://irc.debian.org/%23debian-lego">#debian-lego</a> (server
9104 irc.debian.org). There is a lot that could be done to improve the
9105 Debian support for LEGO designers. For example both CAD software
9106 and Mindstorm compilers are missing. :)</p>
9107
9108 <p>Update 2012-01-03: A
9109 <a href="http://wiki.debian.org/LegoDesigners">project page</a>
9110 including links to Lego related packages is now available.</p>
9111
9112 </div>
9113 <div class="tags">
9114
9115
9116 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/lego">lego</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot">robot</a>.
9117
9118
9119 </div>
9120 </div>
9121 <div class="padding"></div>
9122
9123 <div class="entry">
9124 <div class="title">
9125 <a href="http://people.skolelinux.org/pere/blog/How_to_backport_bitcoin_qt_version_0_7_2_2_to_Debian_Squeeze.html">How to backport bitcoin-qt version 0.7.2-2 to Debian Squeeze</a>
9126 </div>
9127 <div class="date">
9128 25th December 2012
9129 </div>
9130 <div class="body">
9131 <p>Let me start by wishing you all marry Christmas and a happy new
9132 year! I hope next year will prove to be a good year.</p>
9133
9134 <p><a href="http://www.bitcoin.org/">Bitcoin</a>, the digital
9135 decentralised "currency" that allow people to transfer bitcoins
9136 between each other with minimal overhead, is a very interesting
9137 experiment. And as I wrote a few days ago, the bitcoin situation in
9138 <a href="http://www.debian.org/">Debian</a> is about to improve a bit.
9139 The <a href="http://packages.qa.debian.org/bitcoin">new debian source
9140 package</a> (version 0.7.2-2) was uploaded yesterday, and is waiting
9141 in <a href="http://ftp-master.debian.org/new.html">the NEW queue</A>
9142 for one of the ftpmasters to approve the new bitcoin-qt package
9143 name.</p>
9144
9145 <p>And thanks to the great work of Jonas and the rest of the bitcoin
9146 team in Debian, you can easily test the package in Debian Squeeze
9147 using the following steps to get a set of working packages:</p>
9148
9149 <blockquote><pre>
9150 git clone git://git.debian.org/git/collab-maint/bitcoin
9151 cd bitcoin
9152 DEB_MAINTAINER_MODE=1 DEB_BUILD_OPTIONS=noupnp fakeroot debian/rules clean
9153 DEB_BUILD_OPTIONS=noupnp git-buildpackage --git-ignore-new
9154 </pre></blockquote>
9155
9156 <p>You might have to install some build dependencies as well. The
9157 list of commands should give you two packages, bitcoind and
9158 bitcoin-qt, ready for use in a Squeeze environment. Note that the
9159 client will download the complete set of bitcoin "blocks", which need
9160 around 5.6 GiB of data on my machine at the moment. Make sure your
9161 ~/.bitcoin/ directory have lots of spare room if you want to download
9162 all the blocks. The client will warn if the disk is getting full, so
9163 there is not really a problem if you got too little room, but you will
9164 not be able to get all the features out of the client.</p>
9165
9166 <p>As usual, if you use bitcoin and want to show your support of my
9167 activities, please send Bitcoin donations to my address
9168 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
9169
9170 </div>
9171 <div class="tags">
9172
9173
9174 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
9175
9176
9177 </div>
9178 </div>
9179 <div class="padding"></div>
9180
9181 <div class="entry">
9182 <div class="title">
9183 <a href="http://people.skolelinux.org/pere/blog/A_word_on_bitcoin_support_in_Debian.html">A word on bitcoin support in Debian</a>
9184 </div>
9185 <div class="date">
9186 21st December 2012
9187 </div>
9188 <div class="body">
9189 <p>It has been a while since I wrote about
9190 <a href="http://www.bitcoin.org/">bitcoin</a>, the decentralised
9191 peer-to-peer based crypto-currency, and the reason is simply that I
9192 have been busy elsewhere. But two days ago, I started looking at the
9193 state of <a href="http://packages.qa.debian.org/bitcoin">bitcoin in
9194 Debian</a> again to try to recover my old bitcoin wallet. The package
9195 is now maintained by a
9196 <a href="https://alioth.debian.org/projects/pkg-bitcoin/">team of
9197 people</a>, and the grunt work had already been done by this team. We
9198 owe a huge thank you to all these team members. :)
9199 But I was sad to discover that the bitcoin client is missing in
9200 Wheezy. It is only available in Sid (and an outdated client from
9201 backports). The client had several RC bugs registered in BTS blocking
9202 it from entering testing. To try to help the team and improve the
9203 situation, I spent some time providing patches and triaging the bug
9204 reports. I also had a look at the bitcoin package available from Matt
9205 Corallo in a
9206 <a href="https://launchpad.net/~bitcoin/+archive/bitcoin">PPA for
9207 Ubuntu</a>, and moved the useful pieces from that version into the
9208 Debian package.</p>
9209
9210 <p>After checking with the main package maintainer Jonas Smedegaard on
9211 IRC, I pushed several patches into the collab-maint git repository to
9212 improve the package. It now contains fixes for the RC issues (not from
9213 me, but fixed by Scott Howard), build rules for a Qt GUI client
9214 package, konqueror support for the bitcoin: URI and bash completion
9215 setup. As I work on Debian Squeeze, I also created
9216 <a href="http://lists.alioth.debian.org/pipermail/pkg-bitcoin-devel/Week-of-Mon-20121217/000041.html">a
9217 patch to backport</a> the latest version. Jonas is going to look at
9218 it and try to integrate it into the git repository before uploading a
9219 new version to unstable.
9220
9221 <p>I would very much like bitcoin to succeed, to get rid of the
9222 centralized control currently exercised in the monetary system. I
9223 find it completely unacceptable that the USA government is collecting
9224 transaction data for almost all international money transfers (most are done in USD and transaction logs shipped to the spooks), and
9225 that the major credit card companies can block legal money
9226 transactions to Wikileaks. But for bitcoin to succeed, more people
9227 need to use bitcoins, and more people need to accept bitcoins when
9228 they sell products and services. Improving the bitcoin support in
9229 Debian is a small step in the right direction, but not enough.
9230 Unfortunately the user experience when browsing the web and wanting to
9231 pay with bitcoin is still not very good. The bitcoin: URI is a step
9232 in the right direction, but need to work in most or every browser in
9233 use. Also the bitcoin-qt client is too heavy to fire up to do a
9234 quick transaction. I believe there are other clients available, but
9235 have not tested them.</p>
9236
9237 <p>My
9238 <a href="http://people.skolelinux.org/pere/blog/Now_accepting_bitcoins___anonymous_and_distributed_p2p_crypto_money.html">experiment
9239 with bitcoins</a> showed that at least some of my readers use bitcoin.
9240 I received 20.15 BTC so far on the address I provided in my blog two
9241 years ago, as can be
9242 <a href="http://blockexplorer.com/address/15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">seen
9243 on the blockexplorer service</a>. Thank you everyone for your
9244 donation. The blockexplorer service demonstrates quite well that
9245 bitcoin is not quite anonymous and untracked. :) I wonder if the
9246 number of users have gone up since then. If you use bitcoin and want
9247 to show your support of my activity, please send Bitcoin donations to
9248 the same address as last time,
9249 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
9250
9251 </div>
9252 <div class="tags">
9253
9254
9255 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
9256
9257
9258 </div>
9259 </div>
9260 <div class="padding"></div>
9261
9262 <div class="entry">
9263 <div class="title">
9264 <a href="http://people.skolelinux.org/pere/blog/Git_repository_for_song_book_for_Computer_Scientists.html">Git repository for song book for Computer Scientists</a>
9265 </div>
9266 <div class="date">
9267 7th September 2012
9268 </div>
9269 <div class="body">
9270 <p>As I
9271 <a href="http://people.skolelinux.org/pere/blog/Song_book_for_Computer_Scientists.html">mentioned
9272 this summer</a>, I have created a Computer Science song book a few
9273 years ago, and today I finally found time to create a public
9274 <a href="https://gitorious.org/pere-cs-songbook/pere-cs-songbook">Gitorious
9275 repository for the project</a>.</p>
9276
9277 <p>If you want to help out, please clone the source and submit patches
9278 to the HTML version. To generate the PDF and PostScript version,
9279 please use prince XML, or let me know about a useful free software
9280 processor capable of creating a good looking PDF from the HTML.</p>
9281
9282 <p>Want to sing? You can still find the song book in HTML, PDF and
9283 PostScript formats at
9284 <a href="http://www.hungry.com/~pere/cs-songbook/">Petter's Computer
9285 Science Songbook</a>.</p>
9286
9287 </div>
9288 <div class="tags">
9289
9290
9291 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>.
9292
9293
9294 </div>
9295 </div>
9296 <div class="padding"></div>
9297
9298 <div class="entry">
9299 <div class="title">
9300 <a href="http://people.skolelinux.org/pere/blog/Gratulerer_med_19__rsdagen__Debian_.html">Gratulerer med 19-Ã¥rsdagen, Debian!</a>
9301 </div>
9302 <div class="date">
9303 16th August 2012
9304 </div>
9305 <div class="body">
9306 <p>I dag fyller
9307 <a href="http://www.debian.org/News/2012/20120813">Debian-prosjektet 19
9308 år</a>. Jeg har fulgt det de siste 12 årene, og er veldig glad for å kunne
9309 si gratulerer med dagen, Debian!</p>
9310
9311 </div>
9312 <div class="tags">
9313
9314
9315 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>.
9316
9317
9318 </div>
9319 </div>
9320 <div class="padding"></div>
9321
9322 <div class="entry">
9323 <div class="title">
9324 <a href="http://people.skolelinux.org/pere/blog/Song_book_for_Computer_Scientists.html">Song book for Computer Scientists</a>
9325 </div>
9326 <div class="date">
9327 24th June 2012
9328 </div>
9329 <div class="body">
9330 <p>Many years ago, while studying Computer Science at the
9331 <a href="http://www.uit.no/">University of Tromsø</a>, I started
9332 collecting computer related songs for use at parties. The original
9333 version was written in LaTeX, but a few years ago I got help from
9334 HÃ¥kon W. Lie, one of the inventors of W3C CSS, to convert it to HTML
9335 while keeping the ability to create a nice book in PDF format. I have
9336 not had time to maintain the book for a while now, and guess I should
9337 put it up on some public version control repository where others can
9338 help me extend and update the book. If anyone is volunteering to help
9339 me with this, send me an email. Also let me know if there are songs
9340 missing in my book.</p>
9341
9342 <p>I have not mentioned the book on my blog so far, and it occured to
9343 me today that I really should let all my readers share the joys of
9344 singing out load about programming, computers and computer networks.
9345 Especially now that <a href="http://debconf12.debconf.org/">Debconf
9346 12</a> is about to start (and I am not going). Want to sing? Check
9347 out <a href="http://www.hungry.com/~pere/cs-songbook/">Petter's
9348 Computer Science Songbook</a>.
9349
9350 </div>
9351 <div class="tags">
9352
9353
9354 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>.
9355
9356
9357 </div>
9358 </div>
9359 <div class="padding"></div>
9360
9361 <div class="entry">
9362 <div class="title">
9363 <a href="http://people.skolelinux.org/pere/blog/Automatically_upgrading_server_firmware_on_Dell_PowerEdge.html">Automatically upgrading server firmware on Dell PowerEdge</a>
9364 </div>
9365 <div class="date">
9366 21st November 2011
9367 </div>
9368 <div class="body">
9369 <p>At work we have heaps of servers. I believe the total count is
9370 around 1000 at the moment. To be able to get help from the vendors
9371 when something go wrong, we want to keep the firmware on the servers
9372 up to date. If the firmware isn't the latest and greatest, the
9373 vendors typically refuse to start debugging any problems until the
9374 firmware is upgraded. So before every reboot, we want to upgrade the
9375 firmware, and we would really like everyone handling servers at the
9376 university to do this themselves when they plan to reboot a machine.
9377 For that to happen we at the unix server admin group need to provide
9378 the tools to do so.</p>
9379
9380 <p>To make firmware upgrading easier, I am working on a script to
9381 fetch and install the latest firmware for the servers we got. Most of
9382 our hardware are from Dell and HP, so I have focused on these servers
9383 so far. This blog post is about the Dell part.</P>
9384
9385 <p>On the Dell FTP site I was lucky enough to find
9386 <a href="ftp://ftp.us.dell.com/catalog/Catalog.xml.gz">an XML file</a>
9387 with firmware information for all 11th generation servers, listing
9388 which firmware should be used on a given model and where on the FTP
9389 site I can find it. Using a simple perl XML parser I can then
9390 download the shell scripts Dell provides to do firmware upgrades from
9391 within Linux and reboot when all the firmware is primed and ready to
9392 be activated on the first reboot.</p>
9393
9394 <p>This is the Dell related fragment of the perl code I am working on.
9395 Are there anyone working on similar tools for firmware upgrading all
9396 servers at a site? Please get in touch and lets share resources.</p>
9397
9398 <p><pre>
9399 #!/usr/bin/perl
9400 use strict;
9401 use warnings;
9402 use File::Temp qw(tempdir);
9403 BEGIN {
9404 # Install needed RHEL packages if missing
9405 my %rhelmodules = (
9406 'XML::Simple' => 'perl-XML-Simple',
9407 );
9408 for my $module (keys %rhelmodules) {
9409 eval "use $module;";
9410 if ($@) {
9411 my $pkg = $rhelmodules{$module};
9412 system("yum install -y $pkg");
9413 eval "use $module;";
9414 }
9415 }
9416 }
9417 my $errorsto = 'pere@hungry.com';
9418
9419 upgrade_dell();
9420
9421 exit 0;
9422
9423 sub run_firmware_script {
9424 my ($opts, $script) = @_;
9425 unless ($script) {
9426 print STDERR "fail: missing script name\n";
9427 exit 1
9428 }
9429 print STDERR "Running $script\n\n";
9430
9431 if (0 == system("sh $script $opts")) { # FIXME correct exit code handling
9432 print STDERR "success: firmware script ran succcessfully\n";
9433 } else {
9434 print STDERR "fail: firmware script returned error\n";
9435 }
9436 }
9437
9438 sub run_firmware_scripts {
9439 my ($opts, @dirs) = @_;
9440 # Run firmware packages
9441 for my $dir (@dirs) {
9442 print STDERR "info: Running scripts in $dir\n";
9443 opendir(my $dh, $dir) or die "Unable to open directory $dir: $!";
9444 while (my $s = readdir $dh) {
9445 next if $s =~ m/^\.\.?/;
9446 run_firmware_script($opts, "$dir/$s");
9447 }
9448 closedir $dh;
9449 }
9450 }
9451
9452 sub download {
9453 my $url = shift;
9454 print STDERR "info: Downloading $url\n";
9455 system("wget --quiet \"$url\"");
9456 }
9457
9458 sub upgrade_dell {
9459 my @dirs;
9460 my $product = `dmidecode -s system-product-name`;
9461 chomp $product;
9462
9463 if ($product =~ m/PowerEdge/) {
9464
9465 # on RHEL, these pacakges are needed by the firwmare upgrade scripts
9466 system('yum install -y compat-libstdc++-33.i686 libstdc++.i686 libxml2.i686 procmail');
9467
9468 my $tmpdir = tempdir(
9469 CLEANUP => 1
9470 );
9471 chdir($tmpdir);
9472 fetch_dell_fw('catalog/Catalog.xml.gz');
9473 system('gunzip Catalog.xml.gz');
9474 my @paths = fetch_dell_fw_list('Catalog.xml');
9475 # -q is quiet, disabling interactivity and reducing console output
9476 my $fwopts = "-q";
9477 if (@paths) {
9478 for my $url (@paths) {
9479 fetch_dell_fw($url);
9480 }
9481 run_firmware_scripts($fwopts, $tmpdir);
9482 } else {
9483 print STDERR "error: Unsupported Dell model '$product'.\n";
9484 print STDERR "error: Please report to $errorsto.\n";
9485 }
9486 chdir('/');
9487 } else {
9488 print STDERR "error: Unsupported Dell model '$product'.\n";
9489 print STDERR "error: Please report to $errorsto.\n";
9490 }
9491 }
9492
9493 sub fetch_dell_fw {
9494 my $path = shift;
9495 my $url = "ftp://ftp.us.dell.com/$path";
9496 download($url);
9497 }
9498
9499 # Using ftp://ftp.us.dell.com/catalog/Catalog.xml.gz, figure out which
9500 # firmware packages to download from Dell. Only work for Linux
9501 # machines and 11th generation Dell servers.
9502 sub fetch_dell_fw_list {
9503 my $filename = shift;
9504
9505 my $product = `dmidecode -s system-product-name`;
9506 chomp $product;
9507 my ($mybrand, $mymodel) = split(/\s+/, $product);
9508
9509 print STDERR "Finding firmware bundles for $mybrand $mymodel\n";
9510
9511 my $xml = XMLin($filename);
9512 my @paths;
9513 for my $bundle (@{$xml->{SoftwareBundle}}) {
9514 my $brand = $bundle->{TargetSystems}->{Brand}->{Display}->{content};
9515 my $model = $bundle->{TargetSystems}->{Brand}->{Model}->{Display}->{content};
9516 my $oscode;
9517 if ("ARRAY" eq ref $bundle->{TargetOSes}->{OperatingSystem}) {
9518 $oscode = $bundle->{TargetOSes}->{OperatingSystem}[0]->{osCode};
9519 } else {
9520 $oscode = $bundle->{TargetOSes}->{OperatingSystem}->{osCode};
9521 }
9522 if ($mybrand eq $brand && $mymodel eq $model && "LIN" eq $oscode)
9523 {
9524 @paths = map { $_->{path} } @{$bundle->{Contents}->{Package}};
9525 }
9526 }
9527 for my $component (@{$xml->{SoftwareComponent}}) {
9528 my $componenttype = $component->{ComponentType}->{value};
9529
9530 # Drop application packages, only firmware and BIOS
9531 next if 'APAC' eq $componenttype;
9532
9533 my $cpath = $component->{path};
9534 for my $path (@paths) {
9535 if ($cpath =~ m%/$path$%) {
9536 push(@paths, $cpath);
9537 }
9538 }
9539 }
9540 return @paths;
9541 }
9542 </pre>
9543
9544 <p>The code is only tested on RedHat Enterprise Linux, but I suspect
9545 it could work on other platforms with some tweaking. Anyone know a
9546 index like Catalog.xml is available from HP for HP servers? At the
9547 moment I maintain a similar list manually and it is quickly getting
9548 outdated.</p>
9549
9550 </div>
9551 <div class="tags">
9552
9553
9554 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
9555
9556
9557 </div>
9558 </div>
9559 <div class="padding"></div>
9560
9561 <div class="entry">
9562 <div class="title">
9563 <a href="http://people.skolelinux.org/pere/blog/How_is_booting_into_runlevel_1_different_from_single_user_boots_.html">How is booting into runlevel 1 different from single user boots?</a>
9564 </div>
9565 <div class="date">
9566 4th August 2011
9567 </div>
9568 <div class="body">
9569 <p>Wouter Verhelst have some
9570 <a href="http://grep.be/blog/en/retorts/pere_kubuntu_boot">interesting
9571 comments and opinions</a> on my blog post on
9572 <a href="http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html">the
9573 need to clean up /etc/rcS.d/ in Debian</a> and my blog post about
9574 <a href="http://people.skolelinux.org/pere/blog/What_is_missing_in_the_Debian_desktop__or_why_my_parents_use_Kubuntu.html">the
9575 default KDE desktop in Debian</a>. I only have time to address one
9576 small piece of his comment now, and though it best to address the
9577 misunderstanding he bring forward:</p>
9578
9579 <p><blockquote>
9580 Currently, a system admin has four options: [...] boot to a
9581 single-user system (by adding 'single' to the kernel command line;
9582 this runs rcS and rc1 scripts)
9583 </blockquote></p>
9584
9585 <p>This make me believe Wouter believe booting into single user mode
9586 and booting into runlevel 1 is the same. I am not surprised he
9587 believe this, because it would make sense and is a quite sensible
9588 thing to believe. But because the boot in Debian is slightly broken,
9589 runlevel 1 do not work properly and it isn't the same as single user
9590 mode. I'll try to explain what is actually happing, but it is a bit
9591 hard to explain.</p>
9592
9593 <p>Single user mode is defined like this in /etc/inittab:
9594 "<tt>~~:S:wait:/sbin/sulogin</tt>". This means the only thing that is
9595 executed in single user mode is sulogin. Single user mode is a boot
9596 state "between" the runlevels, and when booting into single user mode,
9597 only the scripts in /etc/rcS.d/ are executed before the init process
9598 enters the single user state. When switching to runlevel 1, the state
9599 is in fact not ending in runlevel 1, but it passes through runlevel 1
9600 and end up in the single user mode (see /etc/rc1.d/S03single, which
9601 runs "init -t1 S" to switch to single user mode at the end of runlevel
9602 1. It is confusing that the 'S' (single user) init mode is not the
9603 mode enabled by /etc/rcS.d/ (which is more like the initial boot
9604 mode).</p>
9605
9606 <p>This summary might make it clearer. When booting for the first
9607 time into single user mode, the following commands are executed:
9608 "<tt>/etc/init.d/rc S; /sbin/sulogin</tt>". When booting into
9609 runlevel 1, the following commands are executed: "<tt>/etc/init.d/rc
9610 S; /etc/init.d/rc 1; /sbin/sulogin</tt>". A problem show up when
9611 trying to continue after visiting single user mode. Not all services
9612 are started again as they should, causing the machine to end up in an
9613 unpredicatble state. This is why Debian admins recommend rebooting
9614 after visiting single user mode.</p>
9615
9616 <p>A similar problem with runlevel 1 is caused by the amount of
9617 scripts executed from /etc/rcS.d/. When switching from say runlevel 2
9618 to runlevel 1, the services started from /etc/rcS.d/ are not properly
9619 stopped when passing through the scripts in /etc/rc1.d/, and not
9620 started again when switching away from runlevel 1 to the runlevels
9621 2-5. I believe the problem is best fixed by moving all the scripts
9622 out of /etc/rcS.d/ that are not <strong>required</strong> to get a
9623 functioning single user mode during boot.</p>
9624
9625 <p>I have spent several years investigating the Debian boot system,
9626 and discovered this problem a few years ago. I suspect it originates
9627 from when sysvinit was introduced into Debian, a long time ago.</p>
9628
9629 </div>
9630 <div class="tags">
9631
9632
9633 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
9634
9635
9636 </div>
9637 </div>
9638 <div class="padding"></div>
9639
9640 <div class="entry">
9641 <div class="title">
9642 <a href="http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html">What should start from /etc/rcS.d/ in Debian? - almost nothing</a>
9643 </div>
9644 <div class="date">
9645 30th July 2011
9646 </div>
9647 <div class="body">
9648 <p>In the Debian boot system, several packages include scripts that
9649 are started from /etc/rcS.d/. In fact, there is a bite more of them
9650 than make sense, and this causes a few problems. What kind of
9651 problems, you might ask. There are at least two problems. The first
9652 is that it is not possible to recover a machine after switching to
9653 runlevel 1. One need to actually reboot to get the machine back to
9654 the expected state. The other is that single user boot will sometimes
9655 run into problems because some of the subsystems are activated before
9656 the root login is presented, causing problems when trying to recover a
9657 machine from a problem in that subsystem. A minor additional point is
9658 that moving more scripts out of rcS.d/ and into the other rc#.d/
9659 directories will increase the amount of scripts that can run in
9660 parallel during boot, and thus decrease the boot time.</p>
9661
9662 <p>So, which scripts should start from rcS.d/. In short, only the
9663 scripts that _have_ to execute before the root login prompt is
9664 presented during a single user boot should go there. Everything else
9665 should go into the numeric runlevels. This means things like
9666 lm-sensors, fuse and x11-common should not run from rcS.d, but from
9667 the numeric runlevels. Today in Debian, there are around 115 init.d
9668 scripts that are started from rcS.d/, and most of them should be moved
9669 out. Do your package have one of them? Please help us make single
9670 user and runlevel 1 better by moving it.</p>
9671
9672 <p>Scripts setting up the screen, keyboard, system partitions
9673 etc. should still be started from rcS.d/, but there is for example no
9674 need to have the network enabled before the single user login prompt
9675 is presented.</p>
9676
9677 <p>As always, things are not so easy to fix as they sound. To keep
9678 Debian systems working while scripts migrate and during upgrades, the
9679 scripts need to be moved from rcS.d/ to rc2.d/ in reverse dependency
9680 order, ie the scripts that nothing in rcS.d/ depend on can be moved,
9681 and the next ones can only be moved when their dependencies have been
9682 moved first. This migration must be done sequentially while we ensure
9683 that the package system upgrade packages in the right order to keep
9684 the system state correct. This will require some coordination when it
9685 comes to network related packages, but most of the packages with
9686 scripts that should migrate do not have anything in rcS.d/ depending
9687 on them. Some packages have already been updated, like the sudo
9688 package, while others are still left to do. I wish I had time to work
9689 on this myself, but real live constrains make it unlikely that I will
9690 find time to push this forward.</p>
9691
9692 </div>
9693 <div class="tags">
9694
9695
9696 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
9697
9698
9699 </div>
9700 </div>
9701 <div class="padding"></div>
9702
9703 <div class="entry">
9704 <div class="title">
9705 <a href="http://people.skolelinux.org/pere/blog/What_is_missing_in_the_Debian_desktop__or_why_my_parents_use_Kubuntu.html">What is missing in the Debian desktop, or why my parents use Kubuntu</a>
9706 </div>
9707 <div class="date">
9708 29th July 2011
9709 </div>
9710 <div class="body">
9711 <p>While at Debconf11, I have several times during discussions
9712 mentioned the issues I believe should be improved in Debian for its
9713 desktop to be useful for more people. The use case for this is my
9714 parents, which are currently running Kubuntu which solve the
9715 issues.</p>
9716
9717 <p>I suspect these four missing features are not very hard to
9718 implement. After all, they are present in Ubuntu, so if we wanted to
9719 do this in Debian we would have a source.</p>
9720
9721 <ol>
9722
9723 <li><strong>Simple GUI based upgrade of packages.</strong> When there
9724 are new packages available for upgrades, a icon in the KDE status bar
9725 indicate this, and clicking on it will activate the simple upgrade
9726 tool to handle it. I have no problem guiding both of my parents
9727 through the process over the phone. If a kernel reboot is required,
9728 this too is indicated by the status bars and the upgrade tool. Last
9729 time I checked, nothing with the same features was working in KDE in
9730 Debian.</li>
9731
9732 <li><strong>Simple handling of missing Firefox browser
9733 plugins.</strong> When the browser encounter a MIME type it do not
9734 currently have a handler for, it will ask the user if the system
9735 should search for a package that would add support for this MIME type,
9736 and if the user say yes, the APT sources will be searched for packages
9737 advertising the MIME type in their control file (visible in the
9738 Packages file in the APT archive). If one or more packages are found,
9739 it is a simple click of the mouse to add support for the missing mime
9740 type. If the package require the user to accept some non-free
9741 license, this is explained to the user. The entire process make it
9742 more clear to the user why something do not work in the browser, and
9743 make the chances higher for the user to blame the web page authors and
9744 not the browser for any missing features.</li>
9745
9746 <li><strong>Simple handling of missing multimedia codec/format
9747 handlers.</strong> When the media players encounter a format or codec
9748 it is not supporting, a dialog pop up asking the user if the system
9749 should search for a package that would add support for it. This
9750 happen with things like MP3, Windows Media or H.264. The selection
9751 and installation procedure is very similar to the Firefox browser
9752 plugin handling. This is as far as I know implemented using a
9753 gstreamer hook. The end result is that the user easily get access to
9754 the codecs that are present from the APT archives available, while
9755 explaining more on why a given format is unsupported by Ubuntu.</li>
9756
9757 <li><strong>Better browser handling of some MIME types.</strong> When
9758 displaying a text/plain file in my Debian browser, it will propose to
9759 start emacs to show it. If I remember correctly, when doing the same
9760 in Kunbutu it show the file as a text file in the browser. At least I
9761 know Opera will show text files within the browser. I much prefer the
9762 latter behaviour.</li>
9763
9764 </ol>
9765
9766 <p>There are other nice features as well, like the simplified suite
9767 upgrader, but given that I am the one mostly doing the dist-upgrade,
9768 it do not matter much.</p>
9769
9770 <p>I really hope we could get these features in place for the next
9771 Debian release. It would require the coordinated effort of several
9772 maintainers, but would make the end user experience a lot better.</p>
9773
9774 </div>
9775 <div class="tags">
9776
9777
9778 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/h264">h264</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
9779
9780
9781 </div>
9782 </div>
9783 <div class="padding"></div>
9784
9785 <div class="entry">
9786 <div class="title">
9787 <a href="http://people.skolelinux.org/pere/blog/Perl_modules_used_by_FixMyStreet_which_are_missing_in_Debian_Squeeze.html">Perl modules used by FixMyStreet which are missing in Debian/Squeeze</a>
9788 </div>
9789 <div class="date">
9790 26th July 2011
9791 </div>
9792 <div class="body">
9793 <p>The Norwegian <a href="http://www.fiksgatami.no/">FiksGataMi</A>
9794 site is build on Debian/Squeeze, and this platform was chosen because
9795 I am most familiar with Debian (being a Debian Developer for around 10
9796 years) because it is the latest stable Debian release which should get
9797 security support for a few years.</p>
9798
9799 <p>The web service is written in Perl, and depend on some perl modules
9800 that are missing in Debian at the moment. It would be great if these
9801 modules were added to the Debian archive, allowing anyone to set up
9802 their own <a href="http://www.fixmystreet.com">FixMyStreet</a> clone
9803 in their own country using only Debian packages. The list of modules
9804 missing in Debian/Squeeze isn't very long, and I hope the perl group
9805 will find time to package the 12 modules Catalyst::Plugin::SmartURI,
9806 Catalyst::Plugin::Unicode::Encoding, Catalyst::View::TT, Devel::Hide,
9807 Sort::Key, Statistics::Distributions, Template::Plugin::Comma,
9808 Template::Plugin::DateTime::Format, Term::Size::Any, Term::Size::Perl,
9809 URI::SmartURI and Web::Scraper to make the maintenance of FixMyStreet
9810 easier in the future.</p>
9811
9812 <p>Thanks to the great tools in Debian, getting the missing modules
9813 installed on my server was a simple call to 'cpan2deb Module::Name'
9814 and 'dpkg -i' to install the resulting package. But this leave me
9815 with the responsibility of tracking security problems, which I really
9816 do not have time for.</p>
9817
9818 </div>
9819 <div class="tags">
9820
9821
9822 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami</a>.
9823
9824
9825 </div>
9826 </div>
9827 <div class="padding"></div>
9828
9829 <div class="entry">
9830 <div class="title">
9831 <a href="http://people.skolelinux.org/pere/blog/A_Norwegian_FixMyStreet_have_kept_me_busy_the_last_few_weeks.html">A Norwegian FixMyStreet have kept me busy the last few weeks</a>
9832 </div>
9833 <div class="date">
9834 3rd April 2011
9835 </div>
9836 <div class="body">
9837 <p>Here is a small update for my English readers. Most of my blog
9838 posts have been in Norwegian the last few weeks, so here is a short
9839 update in English.</p>
9840
9841 <p>The kids still keep me too busy to get much free software work
9842 done, but I did manage to organise a project to get a Norwegian port
9843 of the British service
9844 <a href="http://www.fixmystreet.com/">FixMyStreet</a> up and running,
9845 and it has been running for a month now. The entire project has been
9846 organised by me and two others. Around Christmas we gathered sponsors
9847 to fund the development work. In January I drafted a contract with
9848 <a href="http://www.mysociety.org/">mySociety</a> on what to develop,
9849 and in February the development took place. Most of it involved
9850 converting the source to use GPS coordinates instead of British
9851 easting/northing, and the resulting code should be a lot easier to get
9852 running in any country by now. The Norwegian
9853 <a href="http://www.fiksgatami.no/">FiksGataMi</a> is using
9854 <a href="http://www.openstreetmap.org/">OpenStreetmap</a> as the map
9855 source and the source for administrative borders in Norway, and
9856 support for this had to be added/fixed.</p>
9857
9858 <p>The Norwegian version went live March 3th, and we spent the weekend
9859 polishing the system before we announced it March 7th. The system is
9860 running on a KVM instance of Debian/Squeeze, and has seen almost 3000
9861 problem reports in a few weeks. Soon we hope to announce the Android
9862 and iPhone versions making it even easier to report problems with the
9863 public infrastructure.</p>
9864
9865 <p>Perhaps something to consider for those of you in countries without
9866 such service?</p>
9867
9868 </div>
9869 <div class="tags">
9870
9871
9872 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kart">kart</a>.
9873
9874
9875 </div>
9876 </div>
9877 <div class="padding"></div>
9878
9879 <div class="entry">
9880 <div class="title">
9881 <a href="http://people.skolelinux.org/pere/blog/Using_NVD_and_CPE_to_track_CVEs_in_locally_maintained_software.html">Using NVD and CPE to track CVEs in locally maintained software</a>
9882 </div>
9883 <div class="date">
9884 28th January 2011
9885 </div>
9886 <div class="body">
9887 <p>The last few days I have looked at ways to track open security
9888 issues here at my work with the University of Oslo. My idea is that
9889 it should be possible to use the information about security issues
9890 available on the Internet, and check our locally
9891 maintained/distributed software against this information. It should
9892 allow us to verify that no known security issues are forgotten. The
9893 CVE database listing vulnerabilities seem like a great central point,
9894 and by using the package lists from Debian mapped to CVEs provided by
9895 the testing security team, I believed it should be possible to figure
9896 out which security holes were present in our free software
9897 collection.</p>
9898
9899 <p>After reading up on the topic, it became obvious that the first
9900 building block is to be able to name software packages in a unique and
9901 consistent way across data sources. I considered several ways to do
9902 this, for example coming up with my own naming scheme like using URLs
9903 to project home pages or URLs to the Freshmeat entries, or using some
9904 existing naming scheme. And it seem like I am not the first one to
9905 come across this problem, as MITRE already proposed and implemented a
9906 solution. Enter the <a href="http://cpe.mitre.org/index.html">Common
9907 Platform Enumeration</a> dictionary, a vocabulary for referring to
9908 software, hardware and other platform components. The CPE ids are
9909 mapped to CVEs in the <a href="http://web.nvd.nist.gov/">National
9910 Vulnerability Database</a>, allowing me to look up know security
9911 issues for any CPE name. With this in place, all I need to do is to
9912 locate the CPE id for the software packages we use at the university.
9913 This is fairly trivial (I google for 'cve cpe $package' and check the
9914 NVD entry if a CVE for the package exist).</p>
9915
9916 <p>To give you an example. The GNU gzip source package have the CPE
9917 name cpe:/a:gnu:gzip. If the old version 1.3.3 was the package to
9918 check out, one could look up
9919 <a href="http://web.nvd.nist.gov/view/vuln/search?cpe=cpe%3A%2Fa%3Agnu%3Agzip:1.3.3">cpe:/a:gnu:gzip:1.3.3
9920 in NVD</a> and get a list of 6 security holes with public CVE entries.
9921 The most recent one is
9922 <a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0001">CVE-2010-0001</a>,
9923 and at the bottom of the NVD page for this vulnerability the complete
9924 list of affected versions is provided.</p>
9925
9926 <p>The NVD database of CVEs is also available as a XML dump, allowing
9927 for offline processing of issues. Using this dump, I've written a
9928 small script taking a list of CPEs as input and list all CVEs
9929 affecting the packages represented by these CPEs. One give it CPEs
9930 with version numbers as specified above and get a list of open
9931 security issues out.</p>
9932
9933 <p>Of course for this approach to be useful, the quality of the NVD
9934 information need to be high. For that to happen, I believe as many as
9935 possible need to use and contribute to the NVD database. I notice
9936 RHEL is providing
9937 <a href="https://www.redhat.com/security/data/metrics/rhsamapcpe.txt">a
9938 map from CVE to CPE</a>, indicating that they are using the CPE
9939 information. I'm not aware of Debian and Ubuntu doing the same.</p>
9940
9941 <p>To get an idea about the quality for free software, I spent some
9942 time making it possible to compare the CVE database from Debian with
9943 the CVE database in NVD. The result look fairly good, but there are
9944 some inconsistencies in NVD (same software package having several
9945 CPEs), and some inaccuracies (NVD not mentioning buggy packages that
9946 Debian believe are affected by a CVE). Hope to find time to improve
9947 the quality of NVD, but that require being able to get in touch with
9948 someone maintaining it. So far my three emails with questions and
9949 corrections have not seen any reply, but I hope contact can be
9950 established soon.</p>
9951
9952 <p>An interesting application for CPEs is cross platform package
9953 mapping. It would be useful to know which packages in for example
9954 RHEL, OpenSuSe and Mandriva are missing from Debian and Ubuntu, and
9955 this would be trivial if all linux distributions provided CPE entries
9956 for their packages.</p>
9957
9958 </div>
9959 <div class="tags">
9960
9961
9962 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
9963
9964
9965 </div>
9966 </div>
9967 <div class="padding"></div>
9968
9969 <div class="entry">
9970 <div class="title">
9971 <a href="http://people.skolelinux.org/pere/blog/Which_module_is_loaded_for_a_given_PCI_and_USB_device_.html">Which module is loaded for a given PCI and USB device?</a>
9972 </div>
9973 <div class="date">
9974 23rd January 2011
9975 </div>
9976 <div class="body">
9977 <p>In the
9978 <a href="http://packages.qa.debian.org/discover-data">discover-data</a>
9979 package in Debian, there is a script to report useful information
9980 about the running hardware for use when people report missing
9981 information. One part of this script that I find very useful when
9982 debugging hardware problems, is the part mapping loaded kernel module
9983 to the PCI device it claims. It allow me to quickly see if the kernel
9984 module I expect is driving the hardware I am struggling with. To see
9985 the output, make sure discover-data is installed and run
9986 <tt>/usr/share/bug/discover-data 3>&1</tt>. The relevant output on
9987 one of my machines like this:</p>
9988
9989 <pre>
9990 loaded modules:
9991 10de:03eb i2c_nforce2
9992 10de:03f1 ohci_hcd
9993 10de:03f2 ehci_hcd
9994 10de:03f0 snd_hda_intel
9995 10de:03ec pata_amd
9996 10de:03f6 sata_nv
9997 1022:1103 k8temp
9998 109e:036e bttv
9999 109e:0878 snd_bt87x
10000 11ab:4364 sky2
10001 </pre>
10002
10003 <p>The code in question look like this, slightly modified for
10004 readability and to drop the output to file descriptor 3:</p>
10005
10006 <pre>
10007 if [ -d /sys/bus/pci/devices/ ] ; then
10008 echo loaded pci modules:
10009 (
10010 cd /sys/bus/pci/devices/
10011 for address in * ; do
10012 if [ -d "$address/driver/module" ] ; then
10013 module=`cd $address/driver/module ; pwd -P | xargs basename`
10014 if grep -q "^$module " /proc/modules ; then
10015 address=$(echo $address |sed s/0000://)
10016 id=`lspci -n -s $address | tail -n 1 | awk '{print $3}'`
10017 echo "$id $module"
10018 fi
10019 fi
10020 done
10021 )
10022 echo
10023 fi
10024 </pre>
10025
10026 <p>Similar code could be used to extract USB device module
10027 mappings:</p>
10028
10029 <pre>
10030 if [ -d /sys/bus/usb/devices/ ] ; then
10031 echo loaded usb modules:
10032 (
10033 cd /sys/bus/usb/devices/
10034 for address in * ; do
10035 if [ -d "$address/driver/module" ] ; then
10036 module=`cd $address/driver/module ; pwd -P | xargs basename`
10037 if grep -q "^$module " /proc/modules ; then
10038 address=$(echo $address |sed s/0000://)
10039 id=$(lsusb -s $address | tail -n 1 | awk '{print $6}')
10040 if [ "$id" ] ; then
10041 echo "$id $module"
10042 fi
10043 fi
10044 fi
10045 done
10046 )
10047 echo
10048 fi
10049 </pre>
10050
10051 <p>This might perhaps be something to include in other tools as
10052 well.</p>
10053
10054 </div>
10055 <div class="tags">
10056
10057
10058 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
10059
10060
10061 </div>
10062 </div>
10063 <div class="padding"></div>
10064
10065 <div class="entry">
10066 <div class="title">
10067 <a href="http://people.skolelinux.org/pere/blog/How_to_test_if_a_laptop_is_working_with_Linux.html">How to test if a laptop is working with Linux</a>
10068 </div>
10069 <div class="date">
10070 22nd December 2010
10071 </div>
10072 <div class="body">
10073 <p>The last few days I have spent at work here at the <a
10074 href="http://www.uio.no/">University of Oslo</a> testing if the new
10075 batch of computers will work with Linux. Every year for the last few
10076 years the university have organised shared bid of a few thousand
10077 computers, and this year HP won the bid. Two different desktops and
10078 five different laptops are on the list this year. We in the UNIX
10079 group want to know which one of these computers work well with RHEL
10080 and Ubuntu, the two Linux distributions we currently handle at the
10081 university.</p>
10082
10083 <p>My test method is simple, and I share it here to get feedback and
10084 perhaps inspire others to test hardware as well. To test, I PXE
10085 install the OS version of choice, and log in as my normal user and run
10086 a few applications and plug in selected pieces of hardware. When
10087 something fail, I make a note about this in the test matrix and move
10088 on. If I have some spare time I try to report the bug to the OS
10089 vendor, but as I only have the machines for a short time, I rarely
10090 have the time to do this for all the problems I find.</p>
10091
10092 <p>Anyway, to get to the point of this post. Here is the simple tests
10093 I perform on a new model.</p>
10094
10095 <ul>
10096
10097 <li>Is PXE installation working? I'm testing with RHEL6, Ubuntu Lucid
10098 and Ubuntu Maverik at the moment. If I feel like it, I also test with
10099 RHEL5 and Debian Edu/Squeeze.</li>
10100
10101 <li>Is X.org working? If the graphical login screen show up after
10102 installation, X.org is working.</li>
10103
10104 <li>Is hardware accelerated OpenGL working? Running glxgears (in
10105 package mesa-utils on Ubuntu) and writing down the frames per second
10106 reported by the program.</li>
10107
10108 <li>Is sound working? With Gnome and KDE, a sound is played when
10109 logging in, and if I can hear this the test is successful. If there
10110 are several audio exits on the machine, I try them all and check if
10111 the Gnome/KDE audio mixer can control where to send the sound. I
10112 normally test this by playing
10113 <a href="http://www.nuug.no/aktiviteter/20101012-chef/ ">a HTML5
10114 video</a> in Firefox/Iceweasel.</li>
10115
10116 <li>Is the USB subsystem working? I test this by plugging in a USB
10117 memory stick and see if Gnome/KDE notices this.</li>
10118
10119 <li>Is the CD/DVD player working? I test this by inserting any CD/DVD
10120 I have lying around, and see if Gnome/KDE notices this.</li>
10121
10122 <li>Is any built in camera working? Test using cheese, and see if a
10123 picture from the v4l device show up.</li>
10124
10125 <li>Is bluetooth working? Use the Gnome/KDE browsing tool to see if
10126 any bluetooth devices are discovered. In my office, I normally see a
10127 few.</li>
10128
10129 <li>For laptops, is the SD or Compaq Flash reader working. I have
10130 memory modules lying around, and stick them in and see if Gnome/KDE
10131 notice this.</li>
10132
10133 <li>For laptops, is suspend/hibernate working? I'm testing if the
10134 special button work, and if the laptop continue to work after
10135 resume.</li>
10136
10137 <li>For laptops, is the extra buttons working, like audio level,
10138 adjusting background light, switching on/off external video output,
10139 switching on/off wifi, bluetooth, etc? The set of buttons differ from
10140 laptop to laptop, so I just write down which are working and which are
10141 not.</li>
10142
10143 <li>Some laptops have smart card readers, finger print readers,
10144 acceleration sensors etc. I rarely test these, as I do not know how
10145 to quickly test if they are working or not, so I only document their
10146 existence.</li>
10147
10148 </ul>
10149
10150 <p>By now I suspect you are really curious what the test results are
10151 for the HP machines I am testing. I'm not done yet, so I will report
10152 the test results later. For now I can report that HP 8100 Elite work
10153 fine, and hibernation fail with HP EliteBook 8440p on Ubuntu Lucid,
10154 and audio fail on RHEL6. Ubuntu Maverik worked with 8440p. As you
10155 can see, I have most machines left to test. One interesting
10156 observation is that Ubuntu Lucid has almost twice the frame rate than
10157 RHEL6 with glxgears. No idea why.</p>
10158
10159 </div>
10160 <div class="tags">
10161
10162
10163 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
10164
10165
10166 </div>
10167 </div>
10168 <div class="padding"></div>
10169
10170 <div class="entry">
10171 <div class="title">
10172 <a href="http://people.skolelinux.org/pere/blog/Some_thoughts_on_BitCoins.html">Some thoughts on BitCoins</a>
10173 </div>
10174 <div class="date">
10175 11th December 2010
10176 </div>
10177 <div class="body">
10178 <p>As I continue to explore
10179 <a href="http://www.bitcoin.org/">BitCoin</a>, I've starting to wonder
10180 what properties the system have, and how it will be affected by laws
10181 and regulations here in Norway. Here are some random notes.</p>
10182
10183 <p>One interesting thing to note is that since the transactions are
10184 verified using a peer to peer network, all details about a transaction
10185 is known to everyone. This means that if a BitCoin address has been
10186 published like I did with mine in my initial post about BitCoin, it is
10187 possible for everyone to see how many BitCoins have been transfered to
10188 that address. There is even a web service to look at the details for
10189 all transactions. There I can see that my address
10190 <a href="http://blockexplorer.com/address/15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a>
10191 have received 16.06 Bitcoin, the
10192 <a href="http://blockexplorer.com/address/1LfdGnGuWkpSJgbQySxxCWhv8MHqvwst3">1LfdGnGuWkpSJgbQySxxCWhv8MHqvwst3</a>
10193 address of Simon Phipps have received 181.97 BitCoin and the address
10194 <a href="http://blockexplorer.com/address/1MCwBbhNGp5hRm5rC1Aims2YFRe2SXPYKt">1MCwBbhNGp5hRm5rC1Aims2YFRe2SXPYKt</A>
10195 of EFF have received 2447.38 BitCoins so far. Thank you to each and
10196 every one of you that donated bitcoins to support my activity. The
10197 fact that anyone can see how much money was transfered to a given
10198 address make it more obvious why the BitCoin community recommend to
10199 generate and hand out a new address for each transaction. I'm told
10200 there is no way to track which addresses belong to a given person or
10201 organisation without the person or organisation revealing it
10202 themselves, as Simon, EFF and I have done.</p>
10203
10204 <p>In Norway, and in most other countries, there are laws and
10205 regulations limiting how much money one can transfer across the border
10206 without declaring it. There are money laundering, tax and accounting
10207 laws and regulations I would expect to apply to the use of BitCoin.
10208 If the Skolelinux foundation
10209 (<a href="http://linuxiskolen.no/slxdebianlabs/donations.html">SLX
10210 Debian Labs</a>) were to accept donations in BitCoin in addition to
10211 normal bank transfers like EFF is doing, how should this be accounted?
10212 Given that it is impossible to know if money can cross the border or
10213 not, should everything or nothing be declared? What exchange rate
10214 should be used when calculating taxes? Would receivers have to pay
10215 income tax if the foundation were to pay Skolelinux contributors in
10216 BitCoin? I have no idea, but it would be interesting to know.</p>
10217
10218 <p>For a currency to be useful and successful, it must be trusted and
10219 accepted by a lot of users. It must be possible to get easy access to
10220 the currency (as a wage or using currency exchanges), and it must be
10221 easy to spend it. At the moment BitCoin seem fairly easy to get
10222 access to, but there are very few places to spend it. I am not really
10223 a regular user of any of the vendor types currently accepting BitCoin,
10224 so I wonder when my kind of shop would start accepting BitCoins. I
10225 would like to buy electronics, travels and subway tickets, not herbs
10226 and books. :) The currency is young, and this will improve over time
10227 if it become popular, but I suspect regular banks will start to lobby
10228 to get BitCoin declared illegal if it become popular. I'm sure they
10229 will claim it is helping fund terrorism and money laundering (which
10230 probably would be true, as is any currency in existence), but I
10231 believe the problems should be solved elsewhere and not by blaming
10232 currencies.</p>
10233
10234 <p>The process of creating new BitCoins is called mining, and it is
10235 CPU intensive process that depend on a bit of luck as well (as one is
10236 competing against all the other miners currently spending CPU cycles
10237 to see which one get the next lump of cash). The "winner" get 50
10238 BitCoin when this happen. Yesterday I came across the obvious way to
10239 join forces to increase ones changes of getting at least some coins,
10240 by coordinating the work on mining BitCoins across several machines
10241 and people, and sharing the result if one is lucky and get the 50
10242 BitCoins. Check out
10243 <a href="http://www.bluishcoder.co.nz/bitcoin-pool/">BitCoin Pool</a>
10244 if this sounds interesting. I have not had time to try to set up a
10245 machine to participate there yet, but have seen that running on ones
10246 own for a few days have not yield any BitCoins througth mining
10247 yet.</p>
10248
10249 <p>Update 2010-12-15: Found an <a
10250 href="http://inertia.posterous.com/reply-to-the-underground-economist-why-bitcoi">interesting
10251 criticism</a> of bitcoin. Not quite sure how valid it is, but thought
10252 it was interesting to read. The arguments presented seem to be
10253 equally valid for gold, which was used as a currency for many years.</p>
10254
10255 </div>
10256 <div class="tags">
10257
10258
10259 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
10260
10261
10262 </div>
10263 </div>
10264 <div class="padding"></div>
10265
10266 <div class="entry">
10267 <div class="title">
10268 <a href="http://people.skolelinux.org/pere/blog/Now_accepting_bitcoins___anonymous_and_distributed_p2p_crypto_money.html">Now accepting bitcoins - anonymous and distributed p2p crypto-money</a>
10269 </div>
10270 <div class="date">
10271 10th December 2010
10272 </div>
10273 <div class="body">
10274 <p>With this weeks lawless
10275 <a href="http://www.salon.com/news/opinion/glenn_greenwald/2010/12/06/wikileaks/index.html">governmental
10276 attacks</a> on Wikileak and
10277 <a href="http://www.salon.com/technology/dan_gillmor/2010/12/06/war_on_speech">free
10278 speech</a>, it has become obvious that PayPal, visa and mastercard can
10279 not be trusted to handle money transactions.
10280 A blog post from
10281 <a href="http://webmink.com/2010/12/06/now-accepting-bitcoin/">Simon
10282 Phipps on bitcoin</a> reminded me about a project that a friend of
10283 mine mentioned earlier. I decided to follow Simon's example, and get
10284 involved with <a href="http://www.bitcoin.org/">BitCoin</a>. I got
10285 some help from my friend to get it all running, and he even handed me
10286 some bitcoins to get started. I even donated a few bitcoins to Simon
10287 for helping me remember BitCoin.</p>
10288
10289 <p>So, what is bitcoins, you probably wonder? It is a digital
10290 crypto-currency, decentralised and handled using peer-to-peer
10291 networks. It allows anonymous transactions and prohibits central
10292 control over the transactions, making it impossible for governments
10293 and companies alike to block donations and other transactions. The
10294 source is free software, and while the key dependency wxWidgets 2.9
10295 for the graphical user interface is missing in Debian, the command
10296 line client builds just fine. Hopefully Jonas
10297 <a href="http://bugs.debian.org/578157">will get the package into
10298 Debian</a> soon.</p>
10299
10300 <p>Bitcoins can be converted to other currencies, like USD and EUR.
10301 There are <a href="http://www.bitcoin.org/trade">companies accepting
10302 bitcoins</a> when selling services and goods, and there are even
10303 currency "stock" markets where the exchange rate is decided. There
10304 are not many users so far, but the concept seems promising. If you
10305 want to get started and lack a friend with any bitcoins to spare,
10306 you can even get
10307 <a href="https://freebitcoins.appspot.com/">some for free</a> (0.05
10308 bitcoin at the time of writing). Use
10309 <a href="http://www.bitcoinwatch.com/">BitcoinWatch</a> to keep an eye
10310 on the current exchange rates.</p>
10311
10312 <p>As an experiment, I have decided to set up bitcoind on one of my
10313 machines. If you want to support my activity, please send Bitcoin
10314 donations to the address
10315 <b>15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</b>. Thank you!</p>
10316
10317 </div>
10318 <div class="tags">
10319
10320
10321 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
10322
10323
10324 </div>
10325 </div>
10326 <div class="padding"></div>
10327
10328 <div class="entry">
10329 <div class="title">
10330 <a href="http://people.skolelinux.org/pere/blog/Why_isn_t_Debian_Edu_using_VLC_.html">Why isn't Debian Edu using VLC?</a>
10331 </div>
10332 <div class="date">
10333 27th November 2010
10334 </div>
10335 <div class="body">
10336 <p>In the latest issue of Linux Journal, the readers choices were
10337 presented, and the winner among the multimedia player were VLC.
10338 Personally, I like VLC, and it is my player of choice when I first try
10339 to play a video file or stream. Only if VLC fail will I drag out
10340 gmplayer to see if it can do better. The reason is mostly the failure
10341 model and trust. When VLC fail, it normally pop up a error message
10342 reporting the problem. When mplayer fail, it normally segfault or
10343 just hangs. The latter failure mode drain my trust in the program.<p>
10344
10345 <p>But even if VLC is my player of choice, we have choosen to use
10346 mplayer in <a href="http://www.skolelinux.org/">Debian
10347 Edu/Skolelinux</a>. The reason is simple. We need a good browser
10348 plugin to play web videos seamlessly, and the VLC browser plugin is
10349 not very good. For example, it lack in-line control buttons, so there
10350 is no way for the user to pause the video. Also, when I
10351 <a href="http://wiki.debian.org/DebianEdu/BrowserMultimedia">last
10352 tested the browser plugins</a> available in Debian, the VLC plugin
10353 failed on several video pages where mplayer based plugins worked. If
10354 the browser plugin for VLC was as good as the gecko-mediaplayer
10355 package (which uses mplayer), we would switch.</P>
10356
10357 <p>While VLC is a good player, its user interface is slightly
10358 annoying. The most annoying feature is its inconsistent use of
10359 keyboard shortcuts. When the player is in full screen mode, its
10360 shortcuts are different from when it is playing the video in a window.
10361 For example, space only work as pause when in full screen mode. I
10362 wish it had consisten shortcuts and that space also would work when in
10363 window mode. Another nice shortcut in gmplayer is [enter] to restart
10364 the current video. It is very nice when playing short videos from the
10365 web and want to restart it when new people arrive to have a look at
10366 what is going on.</p>
10367
10368 </div>
10369 <div class="tags">
10370
10371
10372 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
10373
10374
10375 </div>
10376 </div>
10377 <div class="padding"></div>
10378
10379 <div class="entry">
10380 <div class="title">
10381 <a href="http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades_of_the_Gnome_and_KDE_desktop__now_with_apt_get_autoremove.html">Lenny->Squeeze upgrades of the Gnome and KDE desktop, now with apt-get autoremove</a>
10382 </div>
10383 <div class="date">
10384 22nd November 2010
10385 </div>
10386 <div class="body">
10387 <p>Michael Biebl suggested to me on IRC, that I changed my automated
10388 upgrade testing of the
10389 <a href="http://people.skolelinux.org/~pere/debian-upgrade-testing/">Lenny
10390 Gnome and KDE Desktop</a> to do <tt>apt-get autoremove</tt> when using apt-get.
10391 This seem like a very good idea, so I adjusted by test scripts and
10392 can now present the updated result from today:</p>
10393
10394 <p>This is for Gnome:</p>
10395
10396 <p>Installed using apt-get, missing with aptitude</p>
10397
10398 <blockquote><p>
10399 apache2.2-bin
10400 aptdaemon
10401 baobab
10402 binfmt-support
10403 browser-plugin-gnash
10404 cheese-common
10405 cli-common
10406 cups-pk-helper
10407 dmz-cursor-theme
10408 empathy
10409 empathy-common
10410 freedesktop-sound-theme
10411 freeglut3
10412 gconf-defaults-service
10413 gdm-themes
10414 gedit-plugins
10415 geoclue
10416 geoclue-hostip
10417 geoclue-localnet
10418 geoclue-manual
10419 geoclue-yahoo
10420 gnash
10421 gnash-common
10422 gnome
10423 gnome-backgrounds
10424 gnome-cards-data
10425 gnome-codec-install
10426 gnome-core
10427 gnome-desktop-environment
10428 gnome-disk-utility
10429 gnome-screenshot
10430 gnome-search-tool
10431 gnome-session-canberra
10432 gnome-system-log
10433 gnome-themes-extras
10434 gnome-themes-more
10435 gnome-user-share
10436 gstreamer0.10-fluendo-mp3
10437 gstreamer0.10-tools
10438 gtk2-engines
10439 gtk2-engines-pixbuf
10440 gtk2-engines-smooth
10441 hamster-applet
10442 libapache2-mod-dnssd
10443 libapr1
10444 libaprutil1
10445 libaprutil1-dbd-sqlite3
10446 libaprutil1-ldap
10447 libart2.0-cil
10448 libboost-date-time1.42.0
10449 libboost-python1.42.0
10450 libboost-thread1.42.0
10451 libchamplain-0.4-0
10452 libchamplain-gtk-0.4-0
10453 libcheese-gtk18
10454 libclutter-gtk-0.10-0
10455 libcryptui0
10456 libdiscid0
10457 libelf1
10458 libepc-1.0-2
10459 libepc-common
10460 libepc-ui-1.0-2
10461 libfreerdp-plugins-standard
10462 libfreerdp0
10463 libgconf2.0-cil
10464 libgdata-common
10465 libgdata7
10466 libgdu-gtk0
10467 libgee2
10468 libgeoclue0
10469 libgexiv2-0
10470 libgif4
10471 libglade2.0-cil
10472 libglib2.0-cil
10473 libgmime2.4-cil
10474 libgnome-vfs2.0-cil
10475 libgnome2.24-cil
10476 libgnomepanel2.24-cil
10477 libgpod-common
10478 libgpod4
10479 libgtk2.0-cil
10480 libgtkglext1
10481 libgtksourceview2.0-common
10482 libmono-addins-gui0.2-cil
10483 libmono-addins0.2-cil
10484 libmono-cairo2.0-cil
10485 libmono-corlib2.0-cil
10486 libmono-i18n-west2.0-cil
10487 libmono-posix2.0-cil
10488 libmono-security2.0-cil
10489 libmono-sharpzip2.84-cil
10490 libmono-system2.0-cil
10491 libmtp8
10492 libmusicbrainz3-6
10493 libndesk-dbus-glib1.0-cil
10494 libndesk-dbus1.0-cil
10495 libopal3.6.8
10496 libpolkit-gtk-1-0
10497 libpt2.6.7
10498 libpython2.6
10499 librpm1
10500 librpmio1
10501 libsdl1.2debian
10502 libsrtp0
10503 libssh-4
10504 libtelepathy-farsight0
10505 libtelepathy-glib0
10506 libtidy-0.99-0
10507 media-player-info
10508 mesa-utils
10509 mono-2.0-gac
10510 mono-gac
10511 mono-runtime
10512 nautilus-sendto
10513 nautilus-sendto-empathy
10514 p7zip-full
10515 pkg-config
10516 python-aptdaemon
10517 python-aptdaemon-gtk
10518 python-axiom
10519 python-beautifulsoup
10520 python-bugbuddy
10521 python-clientform
10522 python-coherence
10523 python-configobj
10524 python-crypto
10525 python-cupshelpers
10526 python-elementtree
10527 python-epsilon
10528 python-evolution
10529 python-feedparser
10530 python-gdata
10531 python-gdbm
10532 python-gst0.10
10533 python-gtkglext1
10534 python-gtksourceview2
10535 python-httplib2
10536 python-louie
10537 python-mako
10538 python-markupsafe
10539 python-mechanize
10540 python-nevow
10541 python-notify
10542 python-opengl
10543 python-openssl
10544 python-pam
10545 python-pkg-resources
10546 python-pyasn1
10547 python-pysqlite2
10548 python-rdflib
10549 python-serial
10550 python-tagpy
10551 python-twisted-bin
10552 python-twisted-conch
10553 python-twisted-core
10554 python-twisted-web
10555 python-utidylib
10556 python-webkit
10557 python-xdg
10558 python-zope.interface
10559 remmina
10560 remmina-plugin-data
10561 remmina-plugin-rdp
10562 remmina-plugin-vnc
10563 rhythmbox-plugin-cdrecorder
10564 rhythmbox-plugins
10565 rpm-common
10566 rpm2cpio
10567 seahorse-plugins
10568 shotwell
10569 software-center
10570 system-config-printer-udev
10571 telepathy-gabble
10572 telepathy-mission-control-5
10573 telepathy-salut
10574 tomboy
10575 totem
10576 totem-coherence
10577 totem-mozilla
10578 totem-plugins
10579 transmission-common
10580 xdg-user-dirs
10581 xdg-user-dirs-gtk
10582 xserver-xephyr
10583 </p></blockquote>
10584
10585 <p>Installed using apt-get, removed with aptitude</p>
10586
10587 <blockquote><p>
10588 cheese
10589 ekiga
10590 eog
10591 epiphany-extensions
10592 evolution-exchange
10593 fast-user-switch-applet
10594 file-roller
10595 gcalctool
10596 gconf-editor
10597 gdm
10598 gedit
10599 gedit-common
10600 gnome-games
10601 gnome-games-data
10602 gnome-nettool
10603 gnome-system-tools
10604 gnome-themes
10605 gnuchess
10606 gucharmap
10607 guile-1.8-libs
10608 libavahi-ui0
10609 libdmx1
10610 libgalago3
10611 libgtk-vnc-1.0-0
10612 libgtksourceview2.0-0
10613 liblircclient0
10614 libsdl1.2debian-alsa
10615 libspeexdsp1
10616 libsvga1
10617 rhythmbox
10618 seahorse
10619 sound-juicer
10620 system-config-printer
10621 totem-common
10622 transmission-gtk
10623 vinagre
10624 vino
10625 </p></blockquote>
10626
10627 <p>Installed using aptitude, missing with apt-get</p>
10628
10629 <blockquote><p>
10630 gstreamer0.10-gnomevfs
10631 </p></blockquote>
10632
10633 <p>Installed using aptitude, removed with apt-get</p>
10634
10635 <blockquote><p>
10636 [nothing]
10637 </p></blockquote>
10638
10639 <p>This is for KDE:</p>
10640
10641 <p>Installed using apt-get, missing with aptitude</p>
10642
10643 <blockquote><p>
10644 ksmserver
10645 </p></blockquote>
10646
10647 <p>Installed using apt-get, removed with aptitude</p>
10648
10649 <blockquote><p>
10650 kwin
10651 network-manager-kde
10652 </p></blockquote>
10653
10654 <p>Installed using aptitude, missing with apt-get</p>
10655
10656 <blockquote><p>
10657 arts
10658 dolphin
10659 freespacenotifier
10660 google-gadgets-gst
10661 google-gadgets-xul
10662 kappfinder
10663 kcalc
10664 kcharselect
10665 kde-core
10666 kde-plasma-desktop
10667 kde-standard
10668 kde-window-manager
10669 kdeartwork
10670 kdeartwork-emoticons
10671 kdeartwork-style
10672 kdeartwork-theme-icon
10673 kdebase
10674 kdebase-apps
10675 kdebase-workspace
10676 kdebase-workspace-bin
10677 kdebase-workspace-data
10678 kdeeject
10679 kdelibs
10680 kdeplasma-addons
10681 kdeutils
10682 kdewallpapers
10683 kdf
10684 kfloppy
10685 kgpg
10686 khelpcenter4
10687 kinfocenter
10688 konq-plugins-l10n
10689 konqueror-nsplugins
10690 kscreensaver
10691 kscreensaver-xsavers
10692 ktimer
10693 kwrite
10694 libgle3
10695 libkde4-ruby1.8
10696 libkonq5
10697 libkonq5-templates
10698 libnetpbm10
10699 libplasma-ruby
10700 libplasma-ruby1.8
10701 libqt4-ruby1.8
10702 marble-data
10703 marble-plugins
10704 netpbm
10705 nuvola-icon-theme
10706 plasma-dataengines-workspace
10707 plasma-desktop
10708 plasma-desktopthemes-artwork
10709 plasma-runners-addons
10710 plasma-scriptengine-googlegadgets
10711 plasma-scriptengine-python
10712 plasma-scriptengine-qedje
10713 plasma-scriptengine-ruby
10714 plasma-scriptengine-webkit
10715 plasma-scriptengines
10716 plasma-wallpapers-addons
10717 plasma-widget-folderview
10718 plasma-widget-networkmanagement
10719 ruby
10720 sweeper
10721 update-notifier-kde
10722 xscreensaver-data-extra
10723 xscreensaver-gl
10724 xscreensaver-gl-extra
10725 xscreensaver-screensaver-bsod
10726 </p></blockquote>
10727
10728 <p>Installed using aptitude, removed with apt-get</p>
10729
10730 <blockquote><p>
10731 ark
10732 google-gadgets-common
10733 google-gadgets-qt
10734 htdig
10735 kate
10736 kdebase-bin
10737 kdebase-data
10738 kdepasswd
10739 kfind
10740 klipper
10741 konq-plugins
10742 konqueror
10743 ksysguard
10744 ksysguardd
10745 libarchive1
10746 libcln6
10747 libeet1
10748 libeina-svn-06
10749 libggadget-1.0-0b
10750 libggadget-qt-1.0-0b
10751 libgps19
10752 libkdecorations4
10753 libkephal4
10754 libkonq4
10755 libkonqsidebarplugin4a
10756 libkscreensaver5
10757 libksgrd4
10758 libksignalplotter4
10759 libkunitconversion4
10760 libkwineffects1a
10761 libmarblewidget4
10762 libntrack-qt4-1
10763 libntrack0
10764 libplasma-geolocation-interface4
10765 libplasmaclock4a
10766 libplasmagenericshell4
10767 libprocesscore4a
10768 libprocessui4a
10769 libqalculate5
10770 libqedje0a
10771 libqtruby4shared2
10772 libqzion0a
10773 libruby1.8
10774 libscim8c2a
10775 libsmokekdecore4-3
10776 libsmokekdeui4-3
10777 libsmokekfile3
10778 libsmokekhtml3
10779 libsmokekio3
10780 libsmokeknewstuff2-3
10781 libsmokeknewstuff3-3
10782 libsmokekparts3
10783 libsmokektexteditor3
10784 libsmokekutils3
10785 libsmokenepomuk3
10786 libsmokephonon3
10787 libsmokeplasma3
10788 libsmokeqtcore4-3
10789 libsmokeqtdbus4-3
10790 libsmokeqtgui4-3
10791 libsmokeqtnetwork4-3
10792 libsmokeqtopengl4-3
10793 libsmokeqtscript4-3
10794 libsmokeqtsql4-3
10795 libsmokeqtsvg4-3
10796 libsmokeqttest4-3
10797 libsmokeqtuitools4-3
10798 libsmokeqtwebkit4-3
10799 libsmokeqtxml4-3
10800 libsmokesolid3
10801 libsmokesoprano3
10802 libtaskmanager4a
10803 libtidy-0.99-0
10804 libweather-ion4a
10805 libxklavier16
10806 libxxf86misc1
10807 okteta
10808 oxygencursors
10809 plasma-dataengines-addons
10810 plasma-scriptengine-superkaramba
10811 plasma-widget-lancelot
10812 plasma-widgets-addons
10813 plasma-widgets-workspace
10814 polkit-kde-1
10815 ruby1.8
10816 systemsettings
10817 update-notifier-common
10818 </p></blockquote>
10819
10820 <p>Running apt-get autoremove made the results using apt-get and
10821 aptitude a bit more similar, but there are still quite a lott of
10822 differences. I have no idea what packages should be installed after
10823 the upgrade, but hope those that do can have a look.</p>
10824
10825 </div>
10826 <div class="tags">
10827
10828
10829 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
10830
10831
10832 </div>
10833 </div>
10834 <div class="padding"></div>
10835
10836 <div class="entry">
10837 <div class="title">
10838 <a href="http://people.skolelinux.org/pere/blog/Migrating_Xen_virtual_machines_using_LVM_to_KVM_using_disk_images.html">Migrating Xen virtual machines using LVM to KVM using disk images</a>
10839 </div>
10840 <div class="date">
10841 22nd November 2010
10842 </div>
10843 <div class="body">
10844 <p>Most of the computers in use by the
10845 <a href="http://www.skolelinux.org/">Debian Edu/Skolelinux project</a>
10846 are virtual machines. And they have been Xen machines running on a
10847 fairly old IBM eserver xseries 345 machine, and we wanted to migrate
10848 them to KVM on a newer Dell PowerEdge 2950 host machine. This was a
10849 bit harder that it could have been, because we set up the Xen virtual
10850 machines to get the virtual partitions from LVM, which as far as I
10851 know is not supported by KVM. So to migrate, we had to convert
10852 several LVM logical volumes to partitions on a virtual disk file.</p>
10853
10854 <p>I found
10855 <a href="http://searchnetworking.techtarget.com.au/articles/35011-Six-steps-for-migrating-Xen-virtual-machines-to-KVM">a
10856 nice recipe</a> to do this, and wrote the following script to do the
10857 migration. It uses qemu-img from the qemu package to make the disk
10858 image, parted to partition it, losetup and kpartx to present the disk
10859 image partions as devices, and dd to copy the data. I NFS mounted the
10860 new servers storage area on the old server to do the migration.</p>
10861
10862 <pre>
10863 #!/bin/sh
10864
10865 # Based on
10866 # http://searchnetworking.techtarget.com.au/articles/35011-Six-steps-for-migrating-Xen-virtual-machines-to-KVM
10867
10868 set -e
10869 set -x
10870
10871 if [ -z "$1" ] ; then
10872 echo "Usage: $0 &lt;hostname&gt;"
10873 exit 1
10874 else
10875 host="$1"
10876 fi
10877
10878 if [ ! -e /dev/vg_data/$host-disk ] ; then
10879 echo "error: unable to find LVM volume for $host"
10880 exit 1
10881 fi
10882
10883 # Partitions need to be a bit bigger than the LVM LVs. not sure why.
10884 disksize=$( lvs --units m | grep $host-disk | awk '{sum = sum + $4} END { print int(sum * 1.05) }')
10885 swapsize=$( lvs --units m | grep $host-swap | awk '{sum = sum + $4} END { print int(sum * 1.05) }')
10886 totalsize=$(( ( $disksize + $swapsize ) ))
10887
10888 img=$host.img
10889 #dd if=/dev/zero of=$img bs=1M count=$(( $disksize + $swapsize ))
10890 qemu-img create $img ${totalsize}MMaking room on the Debian Edu/Sqeeze DVD
10891
10892 parted $img mklabel msdos
10893 parted $img mkpart primary linux-swap 0 $disksize
10894 parted $img mkpart primary ext2 $disksize $totalsize
10895 parted $img set 1 boot on
10896
10897 modprobe dm-mod
10898 losetup /dev/loop0 $img
10899 kpartx -a /dev/loop0
10900
10901 dd if=/dev/vg_data/$host-disk of=/dev/mapper/loop0p1 bs=1M
10902 fsck.ext3 -f /dev/mapper/loop0p1 || true
10903 mkswap /dev/mapper/loop0p2
10904
10905 kpartx -d /dev/loop0
10906 losetup -d /dev/loop0
10907 </pre>
10908
10909 <p>The script is perhaps so simple that it is not copyrightable, but
10910 if it is, it is licenced using GPL v2 or later at your discretion.</p>
10911
10912 <p>After doing this, I booted a Debian CD in rescue mode in KVM with
10913 the new disk image attached, installed grub-pc and linux-image-686 and
10914 set up grub to boot from the disk image. After this, the KVM machines
10915 seem to work just fine.</p>
10916
10917 </div>
10918 <div class="tags">
10919
10920
10921 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
10922
10923
10924 </div>
10925 </div>
10926 <div class="padding"></div>
10927
10928 <div class="entry">
10929 <div class="title">
10930 <a href="http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__apt_vs_aptitude_with_the_Gnome_and_KDE_desktop.html">Lenny->Squeeze upgrades, apt vs aptitude with the Gnome and KDE desktop</a>
10931 </div>
10932 <div class="date">
10933 20th November 2010
10934 </div>
10935 <div class="body">
10936 <p>I'm still running upgrade testing of the
10937 <a href="http://people.skolelinux.org/~pere/debian-upgrade-testing/">Lenny
10938 Gnome and KDE Desktop</a>, but have not had time to spend on reporting the
10939 status. Here is a short update based on a test I ran 20101118.</p>
10940
10941 <p>I still do not know what a correct migration should look like, so I
10942 report any differences between apt and aptitude and hope someone else
10943 can see if anything should be changed.</p>
10944
10945 <p>This is for Gnome:</p>
10946
10947 <p>Installed using apt-get, missing with aptitude</p>
10948
10949 <blockquote><p>
10950 apache2.2-bin aptdaemon at-spi baobab binfmt-support
10951 browser-plugin-gnash cheese-common cli-common cpp-4.3 cups-pk-helper
10952 dmz-cursor-theme empathy empathy-common finger
10953 freedesktop-sound-theme freeglut3 gconf-defaults-service gdm-themes
10954 gedit-plugins geoclue geoclue-hostip geoclue-localnet geoclue-manual
10955 geoclue-yahoo gnash gnash-common gnome gnome-backgrounds
10956 gnome-cards-data gnome-codec-install gnome-core
10957 gnome-desktop-environment gnome-disk-utility gnome-screenshot
10958 gnome-search-tool gnome-session-canberra gnome-spell
10959 gnome-system-log gnome-themes-extras gnome-themes-more
10960 gnome-user-share gs-common gstreamer0.10-fluendo-mp3
10961 gstreamer0.10-tools gtk2-engines gtk2-engines-pixbuf
10962 gtk2-engines-smooth hal-info hamster-applet libapache2-mod-dnssd
10963 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
10964 libart2.0-cil libatspi1.0-0 libboost-date-time1.42.0
10965 libboost-python1.42.0 libboost-thread1.42.0 libchamplain-0.4-0
10966 libchamplain-gtk-0.4-0 libcheese-gtk18 libclutter-gtk-0.10-0
10967 libcryptui0 libcupsys2 libdiscid0 libeel2-data libelf1 libepc-1.0-2
10968 libepc-common libepc-ui-1.0-2 libfreerdp-plugins-standard
10969 libfreerdp0 libgail-common libgconf2.0-cil libgdata-common libgdata7
10970 libgdl-1-common libgdu-gtk0 libgee2 libgeoclue0 libgexiv2-0 libgif4
10971 libglade2.0-cil libglib2.0-cil libgmime2.4-cil libgnome-vfs2.0-cil
10972 libgnome2.24-cil libgnomepanel2.24-cil libgnomeprint2.2-data
10973 libgnomeprintui2.2-common libgnomevfs2-bin libgpod-common libgpod4
10974 libgtk2.0-cil libgtkglext1 libgtksourceview-common
10975 libgtksourceview2.0-common libmono-addins-gui0.2-cil
10976 libmono-addins0.2-cil libmono-cairo2.0-cil libmono-corlib2.0-cil
10977 libmono-i18n-west2.0-cil libmono-posix2.0-cil
10978 libmono-security2.0-cil libmono-sharpzip2.84-cil
10979 libmono-system2.0-cil libmtp8 libmusicbrainz3-6
10980 libndesk-dbus-glib1.0-cil libndesk-dbus1.0-cil libopal3.6.8
10981 libpolkit-gtk-1-0 libpt-1.10.10-plugins-alsa
10982 libpt-1.10.10-plugins-v4l libpt2.6.7 libpython2.6 librpm1 librpmio1
10983 libsdl1.2debian libservlet2.4-java libsrtp0 libssh-4
10984 libtelepathy-farsight0 libtelepathy-glib0 libtidy-0.99-0
10985 libxalan2-java libxerces2-java media-player-info mesa-utils
10986 mono-2.0-gac mono-gac mono-runtime nautilus-sendto
10987 nautilus-sendto-empathy openoffice.org-writer2latex
10988 openssl-blacklist p7zip p7zip-full pkg-config python-4suite-xml
10989 python-aptdaemon python-aptdaemon-gtk python-axiom
10990 python-beautifulsoup python-bugbuddy python-clientform
10991 python-coherence python-configobj python-crypto python-cupshelpers
10992 python-cupsutils python-eggtrayicon python-elementtree
10993 python-epsilon python-evolution python-feedparser python-gdata
10994 python-gdbm python-gst0.10 python-gtkglext1 python-gtkmozembed
10995 python-gtksourceview2 python-httplib2 python-louie python-mako
10996 python-markupsafe python-mechanize python-nevow python-notify
10997 python-opengl python-openssl python-pam python-pkg-resources
10998 python-pyasn1 python-pysqlite2 python-rdflib python-serial
10999 python-tagpy python-twisted-bin python-twisted-conch
11000 python-twisted-core python-twisted-web python-utidylib python-webkit
11001 python-xdg python-zope.interface remmina remmina-plugin-data
11002 remmina-plugin-rdp remmina-plugin-vnc rhythmbox-plugin-cdrecorder
11003 rhythmbox-plugins rpm-common rpm2cpio seahorse-plugins shotwell
11004 software-center svgalibg1 system-config-printer-udev
11005 telepathy-gabble telepathy-mission-control-5 telepathy-salut tomboy
11006 totem totem-coherence totem-mozilla totem-plugins
11007 transmission-common xdg-user-dirs xdg-user-dirs-gtk xserver-xephyr
11008 zip
11009 </p></blockquote>
11010
11011 Installed using apt-get, removed with aptitude
11012
11013 <blockquote><p>
11014 arj bluez-utils cheese dhcdbd djvulibre-desktop ekiga eog
11015 epiphany-extensions epiphany-gecko evolution-exchange
11016 fast-user-switch-applet file-roller gcalctool gconf-editor gdm gedit
11017 gedit-common gnome-app-install gnome-games gnome-games-data
11018 gnome-nettool gnome-system-tools gnome-themes gnome-utils
11019 gnome-vfs-obexftp gnome-volume-manager gnuchess gucharmap
11020 guile-1.8-libs hal libavahi-compat-libdnssd1 libavahi-core5
11021 libavahi-ui0 libbind9-50 libbluetooth2 libcamel1.2-11 libcdio7
11022 libcucul0 libcurl3 libdirectfb-1.0-0 libdmx1 libdvdread3
11023 libedata-cal1.2-6 libedataserver1.2-9 libeel2-2.20 libepc-1.0-1
11024 libepc-ui-1.0-1 libexchange-storage1.2-3 libfaad0 libgadu3
11025 libgalago3 libgd2-noxpm libgda3-3 libgda3-common libggz2 libggzcore9
11026 libggzmod4 libgksu1.2-0 libgksuui1.0-1 libgmyth0 libgnome-desktop-2
11027 libgnome-pilot2 libgnomecups1.0-1 libgnomeprint2.2-0
11028 libgnomeprintui2.2-0 libgpod3 libgraphviz4 libgtk-vnc-1.0-0
11029 libgtkhtml2-0 libgtksourceview1.0-0 libgtksourceview2.0-0
11030 libgucharmap6 libhesiod0 libicu38 libisccc50 libisccfg50 libiw29
11031 libjaxp1.3-java-gcj libkpathsea4 liblircclient0 libltdl3 liblwres50
11032 libmagick++10 libmagick10 libmalaga7 libmozjs1d libmpfr1ldbl libmtp7
11033 libmysqlclient15off libnautilus-burn4 libneon27 libnm-glib0
11034 libnm-util0 libopal-2.2 libosp5 libparted1.8-10 libpisock9
11035 libpisync1 libpoppler-glib3 libpoppler3 libpt-1.10.10 libraw1394-8
11036 libsdl1.2debian-alsa libsensors3 libsexy2 libsmbios2 libsoup2.2-8
11037 libspeexdsp1 libssh2-1 libsuitesparse-3.1.0 libsvga1
11038 libswfdec-0.6-90 libtalloc1 libtotem-plparser10 libtrackerclient0
11039 libvoikko1 libxalan2-java-gcj libxerces2-java-gcj libxklavier12
11040 libxtrap6 libxxf86misc1 libzephyr3 mysql-common rhythmbox seahorse
11041 sound-juicer swfdec-gnome system-config-printer totem-common
11042 totem-gstreamer transmission-gtk vinagre vino w3c-dtd-xhtml wodim
11043 </p></blockquote>
11044
11045 <p>Installed using aptitude, missing with apt-get</p>
11046
11047 <blockquote><p>
11048 gstreamer0.10-gnomevfs
11049 </p></blockquote>
11050
11051 <p>Installed using aptitude, removed with apt-get</p>
11052
11053 <blockquote><p>
11054 [nothing]
11055 </p></blockquote>
11056
11057 <p>This is for KDE:</p>
11058
11059 <p>Installed using apt-get, missing with aptitude</p>
11060
11061 <blockquote><p>
11062 autopoint bomber bovo cantor cantor-backend-kalgebra cpp-4.3 dcoprss
11063 edict espeak espeak-data eyesapplet fifteenapplet finger gettext
11064 ghostscript-x git gnome-audio gnugo granatier gs-common
11065 gstreamer0.10-pulseaudio indi kaddressbook-plugins kalgebra
11066 kalzium-data kanjidic kapman kate-plugins kblocks kbreakout kbstate
11067 kde-icons-mono kdeaccessibility kdeaddons-kfile-plugins
11068 kdeadmin-kfile-plugins kdeartwork-misc kdeartwork-theme-window
11069 kdeedu kdeedu-data kdeedu-kvtml-data kdegames kdegames-card-data
11070 kdegames-mahjongg-data kdegraphics-kfile-plugins kdelirc
11071 kdemultimedia-kfile-plugins kdenetwork-kfile-plugins
11072 kdepim-kfile-plugins kdepim-kio-plugins kdessh kdetoys kdewebdev
11073 kdiamond kdnssd kfilereplace kfourinline kgeography-data kigo
11074 killbots kiriki klettres-data kmoon kmrml knewsticker-scripts
11075 kollision kpf krosspython ksirk ksmserver ksquares kstars-data
11076 ksudoku kubrick kweather libasound2-plugins libboost-python1.42.0
11077 libcfitsio3 libconvert-binhex-perl libcrypt-ssleay-perl libdb4.6++
11078 libdjvulibre-text libdotconf1.0 liberror-perl libespeak1
11079 libfinance-quote-perl libgail-common libgsl0ldbl libhtml-parser-perl
11080 libhtml-tableextract-perl libhtml-tagset-perl libhtml-tree-perl
11081 libio-stringy-perl libkdeedu4 libkdegames5 libkiten4 libkpathsea5
11082 libkrossui4 libmailtools-perl libmime-tools-perl
11083 libnews-nntpclient-perl libopenbabel3 libportaudio2 libpulse-browse0
11084 libservlet2.4-java libspeechd2 libtiff-tools libtimedate-perl
11085 libunistring0 liburi-perl libwww-perl libxalan2-java libxerces2-java
11086 lirc luatex marble networkstatus noatun-plugins
11087 openoffice.org-writer2latex palapeli palapeli-data parley
11088 parley-data poster psutils pulseaudio pulseaudio-esound-compat
11089 pulseaudio-module-x11 pulseaudio-utils quanta-data rocs rsync
11090 speech-dispatcher step svgalibg1 texlive-binaries texlive-luatex
11091 ttf-sazanami-gothic
11092 </p></blockquote>
11093
11094 <p>Installed using apt-get, removed with aptitude</p>
11095
11096 <blockquote><p>
11097 amor artsbuilder atlantik atlantikdesigner blinken bluez-utils cvs
11098 dhcdbd djvulibre-desktop imlib-base imlib11 kalzium kanagram kandy
11099 kasteroids katomic kbackgammon kbattleship kblackbox kbounce kbruch
11100 kcron kdat kdemultimedia-kappfinder-data kdeprint kdict kdvi kedit
11101 keduca kenolaba kfax kfaxview kfouleggs kgeography kghostview
11102 kgoldrunner khangman khexedit kiconedit kig kimagemapeditor
11103 kitchensync kiten kjumpingcube klatin klettres klickety klines
11104 klinkstatus kmag kmahjongg kmailcvt kmenuedit kmid kmilo kmines
11105 kmousetool kmouth kmplot knetwalk kodo kolf kommander konquest kooka
11106 kpager kpat kpdf kpercentage kpilot kpoker kpovmodeler krec
11107 kregexpeditor kreversi ksame ksayit kshisen ksig ksim ksirc ksirtet
11108 ksmiletris ksnake ksokoban kspaceduel kstars ksvg ksysv kteatime
11109 ktip ktnef ktouch ktron kttsd ktuberling kturtle ktux kuickshow
11110 kverbos kview kviewshell kvoctrain kwifimanager kwin kwin4 kwordquiz
11111 kworldclock kxsldbg libakode2 libarts1-akode libarts1-audiofile
11112 libarts1-mpeglib libarts1-xine libavahi-compat-libdnssd1
11113 libavahi-core5 libavc1394-0 libbind9-50 libbluetooth2
11114 libboost-python1.34.1 libcucul0 libcurl3 libcvsservice0
11115 libdirectfb-1.0-0 libdjvulibre21 libdvdread3 libfaad0 libfreebob0
11116 libgd2-noxpm libgraphviz4 libgsmme1c2a libgtkhtml2-0 libicu38
11117 libiec61883-0 libindex0 libisccc50 libisccfg50 libiw29
11118 libjaxp1.3-java-gcj libk3b3 libkcal2b libkcddb1 libkdeedu3
11119 libkdegames1 libkdepim1a libkgantt0 libkleopatra1 libkmime2
11120 libkpathsea4 libkpimexchange1 libkpimidentities1 libkscan1
11121 libksieve0 libktnef1 liblockdev1 libltdl3 liblwres50 libmagick10
11122 libmimelib1c2a libmodplug0c2 libmozjs1d libmpcdec3 libmpfr1ldbl
11123 libneon27 libnm-util0 libopensync0 libpisock9 libpoppler-glib3
11124 libpoppler-qt2 libpoppler3 libraw1394-8 librss1 libsensors3
11125 libsmbios2 libssh2-1 libsuitesparse-3.1.0 libswfdec-0.6-90
11126 libtalloc1 libxalan2-java-gcj libxerces2-java-gcj libxtrap6 lskat
11127 mpeglib network-manager-kde noatun pmount tex-common texlive-base
11128 texlive-common texlive-doc-base texlive-fonts-recommended tidy
11129 ttf-dustin ttf-kochi-gothic ttf-sjfonts
11130 </p></blockquote>
11131
11132 <p>Installed using aptitude, missing with apt-get</p>
11133
11134 <blockquote><p>
11135 dolphin kde-core kde-plasma-desktop kde-standard kde-window-manager
11136 kdeartwork kdebase kdebase-apps kdebase-workspace
11137 kdebase-workspace-bin kdebase-workspace-data kdeutils kscreensaver
11138 kscreensaver-xsavers libgle3 libkonq5 libkonq5-templates libnetpbm10
11139 netpbm plasma-widget-folderview plasma-widget-networkmanagement
11140 xscreensaver-data-extra xscreensaver-gl xscreensaver-gl-extra
11141 xscreensaver-screensaver-bsod
11142 </p></blockquote>
11143
11144 <p>Installed using aptitude, removed with apt-get</p>
11145
11146 <blockquote><p>
11147 kdebase-bin konq-plugins konqueror
11148 </p></blockquote>
11149
11150 </div>
11151 <div class="tags">
11152
11153
11154 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
11155
11156
11157 </div>
11158 </div>
11159 <div class="padding"></div>
11160
11161 <div class="entry">
11162 <div class="title">
11163 <a href="http://people.skolelinux.org/pere/blog/Gnash_buildbot_slave_and_Debian_kfreebsd.html">Gnash buildbot slave and Debian kfreebsd</a>
11164 </div>
11165 <div class="date">
11166 20th November 2010
11167 </div>
11168 <div class="body">
11169 <p>Answering
11170 <a href="http://www.listware.net/201011/gnash-dev/67431-gnash-dev-buildbot-looking-for-slaves.html">the
11171 call from the Gnash project</a> for
11172 <a href="http://www.gnashdev.org:8010">buildbot</a> slaves to test the
11173 current source, I have set up a virtual KVM machine on the Debian
11174 Edu/Skolelinux virtualization host to test the git source on
11175 Debian/Squeeze. I hope this can help the developers in getting new
11176 releases out more often.</p>
11177
11178 <p>As the developers want less main-stream build platforms tested to,
11179 I have considered setting up a <a
11180 href="http://www.debian.org/ports/kfreebsd-gnu/">Debian/kfreebsd</a>
11181 machine as well. I have also considered using the kfreebsd
11182 architecture in Debian as a file server in NUUG to get access to the 5
11183 TB zfs volume we currently use to store DV video. Because of this, I
11184 finally got around to do a test installation of Debian/Squeeze with
11185 kfreebsd. Installation went fairly smooth, thought I noticed some
11186 visual glitches in the cdebconf dialogs (black cursor left on the
11187 screen at random locations). Have not gotten very far with the
11188 testing. Noticed cfdisk did not work, but fdisk did so it was not a
11189 fatal problem. Have to spend some more time on it to see if it is
11190 useful as a file server for NUUG. Will try to find time to set up a
11191 gnash buildbot slave on the Debian Edu/Skolelinux this weekend.</p>
11192
11193 </div>
11194 <div class="tags">
11195
11196
11197 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
11198
11199
11200 </div>
11201 </div>
11202 <div class="padding"></div>
11203
11204 <div class="entry">
11205 <div class="title">
11206 <a href="http://people.skolelinux.org/pere/blog/Debian_in_3D.html">Debian in 3D</a>
11207 </div>
11208 <div class="date">
11209 9th November 2010
11210 </div>
11211 <div class="body">
11212 <p><img src="http://thingiverse-production.s3.amazonaws.com/renders/23/e0/c4/f9/2b/debswagtdose_preview_medium.jpg"></p>
11213
11214 <p>3D printing is just great. I just came across this Debian logo in
11215 3D linked in from
11216 <a href="http://blog.thingiverse.com/2010/11/09/participatory-branding/">the
11217 thingiverse blog</a>.</p>
11218
11219 </div>
11220 <div class="tags">
11221
11222
11223 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
11224
11225
11226 </div>
11227 </div>
11228 <div class="padding"></div>
11229
11230 <div class="entry">
11231 <div class="title">
11232 <a href="http://people.skolelinux.org/pere/blog/Software_updates_2010_10_24.html">Software updates 2010-10-24</a>
11233 </div>
11234 <div class="date">
11235 24th October 2010
11236 </div>
11237 <div class="body">
11238 <p>Some updates.</p>
11239
11240 <p>My <a href="http://pledgebank.com/gnash-avm2">gnash pledge</a> to
11241 raise money for the project is going well. The lower limit of 10
11242 signers was reached in 24 hours, and so far 13 people have signed it.
11243 More signers and more funding is most welcome, and I am really curious
11244 how far we can get before the time limit of December 24 is reached.
11245 :)</p>
11246
11247 <p>On the #gnash IRC channel on irc.freenode.net, I was just tipped
11248 about what appear to be a great code coverage tool capable of
11249 generating code coverage stats without any changes to the source code.
11250 It is called
11251 <a href="http://simonkagstrom.github.com/kcov/index.html">kcov</a>,
11252 and can be used using <tt>kcov &lt;directory&gt; &lt;binary&gt;</tt>.
11253 It is missing in Debian, but the git source built just fine in Squeeze
11254 after I installed libelf-dev, libdwarf-dev, pkg-config and
11255 libglib2.0-dev. Failed to build in Lenny, but suspect that is
11256 solvable. I hope kcov make it into Debian soon.</p>
11257
11258 <p>Finally found time to wrap up the release notes for <a
11259 href="http://lists.debian.org/debian-edu-announce/2010/10/msg00002.html">a
11260 new alpha release of Debian Edu</a>, and just published the second
11261 alpha test release of the Squeeze based Debian Edu /
11262 <a href="http://www.skolelinux.org/">Skolelinux</a>
11263 release. Give it a try if you need a complete linux solution for your
11264 school, including central infrastructure server, workstations, thin
11265 client servers and diskless workstations. A nice touch added
11266 yesterday is RDP support on the thin client servers, for windows
11267 clients to get a Linux desktop on request.</p>
11268
11269 </div>
11270 <div class="tags">
11271
11272
11273 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>.
11274
11275
11276 </div>
11277 </div>
11278 <div class="padding"></div>
11279
11280 <div class="entry">
11281 <div class="title">
11282 <a href="http://people.skolelinux.org/pere/blog/Some_notes_on_Flash_in_Debian_and_Debian_Edu.html">Some notes on Flash in Debian and Debian Edu</a>
11283 </div>
11284 <div class="date">
11285 4th September 2010
11286 </div>
11287 <div class="body">
11288 <p>In the <a href="http://popcon.debian.org/unknown/by_vote">Debian
11289 popularity-contest numbers</a>, the adobe-flashplugin package the
11290 second most popular used package that is missing in Debian. The sixth
11291 most popular is flashplayer-mozilla. This is a clear indication that
11292 working flash is important for Debian users. Around 10 percent of the
11293 users submitting data to popcon.debian.org have this package
11294 installed.</p>
11295
11296 <p>In the report written by Lars Risan in August 2008
11297 («<a href="http://wiki.skolelinux.no/Dokumentasjon/Rapporter?action=AttachFile&do=view&target=Skolelinux_i_bruk_rapport_1.0.pdf">Skolelinux
11298 i bruk – Rapport for Hurum kommune, Universitetet i Agder og
11299 stiftelsen SLX Debian Labs</a>»), one of the most important problems
11300 schools experienced with <a href="http://www.skolelinux.org/">Debian
11301 Edu/Skolelinux</a> was the lack of working Flash. A lot of educational
11302 web sites require Flash to work, and lacking working Flash support in
11303 the web browser and the problems with installing it was perceived as a
11304 good reason to stay with Windows.</p>
11305
11306 <p>I once saw a funny and sad comment in a web forum, where Linux was
11307 said to be the retarded cousin that did not really understand
11308 everything you told him but could work fairly well. This was a
11309 comment regarding the problems Linux have with proprietary formats and
11310 non-standard web pages, and is sad because it exposes a fairly common
11311 understanding of whose fault it is if web pages that only work in for
11312 example Internet Explorer 6 fail to work on Firefox, and funny because
11313 it explain very well how annoying it is for users when Linux
11314 distributions do not work with the documents they receive or the web
11315 pages they want to visit.</p>
11316
11317 <p>This is part of the reason why I believe it is important for Debian
11318 and Debian Edu to have a well working Flash implementation in the
11319 distribution, to get at least popular sites as Youtube and Google
11320 Video to working out of the box. For Squeeze, Debian have the chance
11321 to include the latest version of Gnash that will make this happen, as
11322 the new release 0.8.8 was published a few weeks ago and is resting in
11323 unstable. The new version work with more sites that version 0.8.7.
11324 The Gnash maintainers have asked for a freeze exception, but the
11325 release team have not had time to reply to it yet. I hope they agree
11326 with me that Flash is important for the Debian desktop users, and thus
11327 accept the new package into Squeeze.</p>
11328
11329 </div>
11330 <div class="tags">
11331
11332
11333 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
11334
11335
11336 </div>
11337 </div>
11338 <div class="padding"></div>
11339
11340 <div class="entry">
11341 <div class="title">
11342 <a href="http://people.skolelinux.org/pere/blog/Circular_package_dependencies_harms_apt_recovery.html">Circular package dependencies harms apt recovery</a>
11343 </div>
11344 <div class="date">
11345 27th July 2010
11346 </div>
11347 <div class="body">
11348 <p>I discovered this while doing
11349 <a href="http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html">automated
11350 testing of upgrades from Debian Lenny to Squeeze</a>. A few packages
11351 in Debian still got circular dependencies, and it is often claimed
11352 that apt and aptitude should be able to handle this just fine, but
11353 some times these dependency loops causes apt to fail.</p>
11354
11355 <p>An example is from todays
11356 <a href="http://people.skolelinux.org/~pere/debian-upgrade-testing//test-20100727-lenny-squeeze-kde-aptitude.txt">upgrade
11357 of KDE using aptitude</a>. In it, a bug in kdebase-workspace-data
11358 causes perl-modules to fail to upgrade. The cause is simple. If a
11359 package fail to unpack, then only part of packages with the circular
11360 dependency might end up being unpacked when unpacking aborts, and the
11361 ones already unpacked will fail to configure in the recovery phase
11362 because its dependencies are unavailable.</p>
11363
11364 <p>In this log, the problem manifest itself with this error:</p>
11365
11366 <blockquote><pre>
11367 dpkg: dependency problems prevent configuration of perl-modules:
11368 perl-modules depends on perl (>= 5.10.1-1); however:
11369 Version of perl on system is 5.10.0-19lenny2.
11370 dpkg: error processing perl-modules (--configure):
11371 dependency problems - leaving unconfigured
11372 </pre></blockquote>
11373
11374 <p>The perl/perl-modules circular dependency is already
11375 <a href="http://bugs.debian.org/527917">reported as a bug</a>, and will
11376 hopefully be solved as soon as possible, but it is not the only one,
11377 and each one of these loops in the dependency tree can cause similar
11378 failures. Of course, they only occur when there are bugs in other
11379 packages causing the unpacking to fail, but it is rather nasty when
11380 the failure of one package causes the problem to become worse because
11381 of dependency loops.</p>
11382
11383 <p>Thanks to
11384 <a href="http://lists.debian.org/debian-devel/2010/06/msg00116.html">the
11385 tireless effort by Bill Allombert</a>, the number of circular
11386 dependencies
11387 <a href="http://debian.semistable.com/debgraph.out.html">left in Debian
11388 is dropping</a>, and perhaps it will reach zero one day. :)</p>
11389
11390 <p>Todays testing also exposed a bug in
11391 <a href="http://bugs.debian.org/590605">update-notifier</a> and
11392 <a href="http://bugs.debian.org/590604">different behaviour</a> between
11393 apt-get and aptitude, the latter possibly caused by some circular
11394 dependency. Reported both to BTS to try to get someone to look at
11395 it.</p>
11396
11397 </div>
11398 <div class="tags">
11399
11400
11401 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
11402
11403
11404 </div>
11405 </div>
11406 <div class="padding"></div>
11407
11408 <div class="entry">
11409 <div class="title">
11410 <a href="http://people.skolelinux.org/pere/blog/What_are_they_searching_for___PowerDNS_and_ISC_DHCP_in_LDAP.html">What are they searching for - PowerDNS and ISC DHCP in LDAP</a>
11411 </div>
11412 <div class="date">
11413 17th July 2010
11414 </div>
11415 <div class="body">
11416 <p>This is a
11417 <a href="http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html">followup</a>
11418 on my
11419 <a href="http://people.skolelinux.org/pere/blog/Idea_for_a_change_to_LDAP_schemas_allowing_DNS_and_DHCP_info_to_be_combined_into_one_object.html">previous
11420 work</a> on
11421 <a href="http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html">merging
11422 all</a> the computer related LDAP objects in Debian Edu.</p>
11423
11424 <p>As a step to try to see if it possible to merge the DNS and DHCP
11425 LDAP objects, I have had a look at how the packages pdns-backend-ldap
11426 and dhcp3-server-ldap in Debian use the LDAP server. The two
11427 implementations are quite different in how they use LDAP.</p>
11428
11429 To get this information, I started slapd with debugging enabled and
11430 dumped the debug output to a file to get the LDAP searches performed
11431 on a Debian Edu main-server. Here is a summary.
11432
11433 <p><strong>powerdns</strong></p>
11434
11435 <a href="http://www.linuxnetworks.de/doc/index.php/PowerDNS_LDAP_Backend">Clues
11436 on how to</a> set up PowerDNS to use a LDAP backend is available on
11437 the web.
11438
11439 <p>PowerDNS have two modes of operation using LDAP as its backend.
11440 One "strict" mode where the forward and reverse DNS lookups are done
11441 using the same LDAP objects, and a "tree" mode where the forward and
11442 reverse entries are in two different subtrees in LDAP with a structure
11443 based on the DNS names, as in tjener.intern and
11444 2.2.0.10.in-addr.arpa.</p>
11445
11446 <p>In tree mode, the server is set up to use a LDAP subtree as its
11447 base, and uses a "base" scoped search for the DNS name by adding
11448 "dc=tjener,dc=intern," to the base with a filter for
11449 "(associateddomain=tjener.intern)" for the forward entry and
11450 "dc=2,dc=2,dc=0,dc=10,dc=in-addr,dc=arpa," with a filter for
11451 "(associateddomain=2.2.0.10.in-addr.arpa)" for the reverse entry. For
11452 forward entries, it is looking for attributes named dnsttl, arecord,
11453 nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord, mxrecord,
11454 txtrecord, rprecord, afsdbrecord, keyrecord, aaaarecord, locrecord,
11455 srvrecord, naptrrecord, kxrecord, certrecord, dsrecord, sshfprecord,
11456 ipseckeyrecord, rrsigrecord, nsecrecord, dnskeyrecord, dhcidrecord,
11457 spfrecord and modifytimestamp. For reverse entries it is looking for
11458 the attributes dnsttl, arecord, nsrecord, cnamerecord, soarecord,
11459 ptrrecord, hinforecord, mxrecord, txtrecord, rprecord, aaaarecord,
11460 locrecord, srvrecord, naptrrecord and modifytimestamp. The equivalent
11461 ldapsearch commands could look like this:</p>
11462
11463 <blockquote><pre>
11464 ldapsearch -h ldap \
11465 -b dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no \
11466 -s base -x '(associateddomain=tjener.intern)' dNSTTL aRecord nSRecord \
11467 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
11468 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
11469 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
11470 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
11471
11472 ldapsearch -h ldap \
11473 -b dc=2,dc=2,dc=0,dc=10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no \
11474 -s base -x '(associateddomain=2.2.0.10.in-addr.arpa)'
11475 dnsttl, arecord, nsrecord, cnamerecord soarecord ptrrecord \
11476 hinforecord mxrecord txtrecord rprecord aaaarecord locrecord \
11477 srvrecord naptrrecord modifytimestamp
11478 </pre></blockquote>
11479
11480 <p>In Debian Edu/Lenny, the PowerDNS tree mode is used with
11481 ou=hosts,dc=skole,dc=skolelinux,dc=no as the base, and these are two
11482 example LDAP objects used there. In addition to these objects, the
11483 parent objects all th way up to ou=hosts,dc=skole,dc=skolelinux,dc=no
11484 also exist.</p>
11485
11486 <blockquote><pre>
11487 dn: dc=tjener,dc=intern,ou=hosts,dc=skole,dc=skolelinux,dc=no
11488 objectclass: top
11489 objectclass: dnsdomain
11490 objectclass: domainrelatedobject
11491 dc: tjener
11492 arecord: 10.0.2.2
11493 associateddomain: tjener.intern
11494
11495 dn: dc=2,dc=2,dc=0,dc=10,dc=in-addr,dc=arpa,ou=hosts,dc=skole,dc=skolelinux,dc=no
11496 objectclass: top
11497 objectclass: dnsdomain2
11498 objectclass: domainrelatedobject
11499 dc: 2
11500 ptrrecord: tjener.intern
11501 associateddomain: 2.2.0.10.in-addr.arpa
11502 </pre></blockquote>
11503
11504 <p>In strict mode, the server behaves differently. When looking for
11505 forward DNS entries, it is doing a "subtree" scoped search with the
11506 same base as in the tree mode for a object with filter
11507 "(associateddomain=tjener.intern)" and requests the attributes dnsttl,
11508 arecord, nsrecord, cnamerecord, soarecord, ptrrecord, hinforecord,
11509 mxrecord, txtrecord, rprecord, aaaarecord, locrecord, srvrecord,
11510 naptrrecord and modifytimestamp. For reverse entires it also do a
11511 subtree scoped search but this time the filter is "(arecord=10.0.2.2)"
11512 and the requested attributes are associateddomain, dnsttl and
11513 modifytimestamp. In short, in strict mode the objects with ptrrecord
11514 go away, and the arecord attribute in the forward object is used
11515 instead.</p>
11516
11517 <p>The forward and reverse searches can be simulated using ldapsearch
11518 like this:</p>
11519
11520 <blockquote><pre>
11521 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
11522 '(associateddomain=tjener.intern)' dNSTTL aRecord nSRecord \
11523 cNAMERecord sOARecord pTRRecord hInfoRecord mXRecord tXTRecord \
11524 rPRecord aFSDBRecord KeyRecord aAAARecord lOCRecord sRVRecord \
11525 nAPTRRecord kXRecord certRecord dSRecord sSHFPRecord iPSecKeyRecord \
11526 rRSIGRecord nSECRecord dNSKeyRecord dHCIDRecord sPFRecord modifyTimestamp
11527
11528 ldapsearch -h ldap -b ou=hosts,dc=skole,dc=skolelinux,dc=no -s sub -x \
11529 '(arecord=10.0.2.2)' associateddomain dnsttl modifytimestamp
11530 </pre></blockquote>
11531
11532 <p>In addition to the forward and reverse searches , there is also a
11533 search for SOA records, which behave similar to the forward and
11534 reverse lookups.</p>
11535
11536 <p>A thing to note with the PowerDNS behaviour is that it do not
11537 specify any objectclass names, and instead look for the attributes it
11538 need to generate a DNS reply. This make it able to work with any
11539 objectclass that provide the needed attributes.</p>
11540
11541 <p>The attributes are normally provided in the cosine (RFC 1274) and
11542 dnsdomain2 schemas. The latter is used for reverse entries like
11543 ptrrecord and recent DNS additions like aaaarecord and srvrecord.</p>
11544
11545 <p>In Debian Edu, we have created DNS objects using the object classes
11546 dcobject (for dc), dnsdomain or dnsdomain2 (structural, for the DNS
11547 attributes) and domainrelatedobject (for associatedDomain). The use
11548 of structural object classes make it impossible to combine these
11549 classes with the object classes used by DHCP.</p>
11550
11551 <p>There are other schemas that could be used too, for example the
11552 dnszone structural object class used by Gosa and bind-sdb for the DNS
11553 attributes combined with the domainrelatedobject object class, but in
11554 this case some unused attributes would have to be included as well
11555 (zonename and relativedomainname).</p>
11556
11557 <p>My proposal for Debian Edu would be to switch PowerDNS to strict
11558 mode and not use any of the existing objectclasses (dnsdomain,
11559 dnsdomain2 and dnszone) when one want to combine the DNS information
11560 with DHCP information, and instead create a auxiliary object class
11561 defined something like this (using the attributes defined for
11562 dnsdomain and dnsdomain2 or dnszone):</p>
11563
11564 <blockquote><pre>
11565 objectclass ( some-oid NAME 'dnsDomainAux'
11566 SUP top
11567 AUXILIARY
11568 MAY ( ARecord $ MDRecord $ MXRecord $ NSRecord $ SOARecord $ CNAMERecord $
11569 DNSTTL $ DNSClass $ PTRRecord $ HINFORecord $ MINFORecord $
11570 TXTRecord $ SIGRecord $ KEYRecord $ AAAARecord $ LOCRecord $
11571 NXTRecord $ SRVRecord $ NAPTRRecord $ KXRecord $ CERTRecord $
11572 A6Record $ DNAMERecord
11573 ))
11574 </pre></blockquote>
11575
11576 <p>This will allow any object to become a DNS entry when combined with
11577 the domainrelatedobject object class, and allow any entity to include
11578 all the attributes PowerDNS wants. I've sent an email to the PowerDNS
11579 developers asking for their view on this schema and if they are
11580 interested in providing such schema with PowerDNS, and I hope my
11581 message will be accepted into their mailing list soon.</p>
11582
11583 <p><strong>ISC dhcp</strong></p>
11584
11585 <p>The DHCP server searches for specific objectclass and requests all
11586 the object attributes, and then uses the attributes it want. This
11587 make it harder to figure out exactly what attributes are used, but
11588 thanks to the working example in Debian Edu I can at least get an idea
11589 what is needed without having to read the source code.</p>
11590
11591 <p>In the DHCP server configuration, the LDAP base to use and the
11592 search filter to use to locate the correct dhcpServer entity is
11593 stored. These are the relevant entries from
11594 /etc/dhcp3/dhcpd.conf:</p>
11595
11596 <blockquote><pre>
11597 ldap-base-dn "dc=skole,dc=skolelinux,dc=no";
11598 ldap-dhcp-server-cn "dhcp";
11599 </pre></blockquote>
11600
11601 <p>The DHCP server uses this information to nest all the DHCP
11602 configuration it need. The cn "dhcp" is located using the given LDAP
11603 base and the filter "(&(objectClass=dhcpServer)(cn=dhcp))". The
11604 search result is this entry:</p>
11605
11606 <blockquote><pre>
11607 dn: cn=dhcp,dc=skole,dc=skolelinux,dc=no
11608 cn: dhcp
11609 objectClass: top
11610 objectClass: dhcpServer
11611 dhcpServiceDN: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
11612 </pre></blockquote>
11613
11614 <p>The content of the dhcpServiceDN attribute is next used to locate the
11615 subtree with DHCP configuration. The DHCP configuration subtree base
11616 is located using a base scope search with base "cn=DHCP
11617 Config,dc=skole,dc=skolelinux,dc=no" and filter
11618 "(&(objectClass=dhcpService)(|(dhcpPrimaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)(dhcpSecondaryDN=cn=dhcp,dc=skole,dc=skolelinux,dc=no)))".
11619 The search result is this entry:</p>
11620
11621 <blockquote><pre>
11622 dn: cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
11623 cn: DHCP Config
11624 objectClass: top
11625 objectClass: dhcpService
11626 objectClass: dhcpOptions
11627 dhcpPrimaryDN: cn=dhcp, dc=skole,dc=skolelinux,dc=no
11628 dhcpStatements: ddns-update-style none
11629 dhcpStatements: authoritative
11630 dhcpOption: smtp-server code 69 = array of ip-address
11631 dhcpOption: www-server code 72 = array of ip-address
11632 dhcpOption: wpad-url code 252 = text
11633 </pre></blockquote>
11634
11635 <p>Next, the entire subtree is processed, one level at the time. When
11636 all the DHCP configuration is loaded, it is ready to receive requests.
11637 The subtree in Debian Edu contain objects with object classes
11638 top/dhcpService/dhcpOptions, top/dhcpSharedNetwork/dhcpOptions,
11639 top/dhcpSubnet, top/dhcpGroup and top/dhcpHost. These provide options
11640 and information about netmasks, dynamic range etc. Leaving out the
11641 details here because it is not relevant for the focus of my
11642 investigation, which is to see if it is possible to merge dns and dhcp
11643 related computer objects.</p>
11644
11645 <p>When a DHCP request come in, LDAP is searched for the MAC address
11646 of the client (00:00:00:00:00:00 in this example), using a subtree
11647 scoped search with "cn=DHCP Config,dc=skole,dc=skolelinux,dc=no" as
11648 the base and "(&(objectClass=dhcpHost)(dhcpHWAddress=ethernet
11649 00:00:00:00:00:00))" as the filter. This is what a host object look
11650 like:</p>
11651
11652 <blockquote><pre>
11653 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
11654 cn: hostname
11655 objectClass: top
11656 objectClass: dhcpHost
11657 dhcpHWAddress: ethernet 00:00:00:00:00:00
11658 dhcpStatements: fixed-address hostname
11659 </pre></blockquote>
11660
11661 <p>There is less flexiblity in the way LDAP searches are done here.
11662 The object classes need to have fixed names, and the configuration
11663 need to be stored in a fairly specific LDAP structure. On the
11664 positive side, the invidiual dhcpHost entires can be anywhere without
11665 the DN pointed to by the dhcpServer entries. The latter should make
11666 it possible to group all host entries in a subtree next to the
11667 configuration entries, and this subtree can also be shared with the
11668 DNS server if the schema proposed above is combined with the dhcpHost
11669 structural object class.
11670
11671 <p><strong>Conclusion</strong></p>
11672
11673 <p>The PowerDNS implementation seem to be very flexible when it come
11674 to which LDAP schemas to use. While its "tree" mode is rigid when it
11675 come to the the LDAP structure, the "strict" mode is very flexible,
11676 allowing DNS objects to be stored anywhere under the base cn specified
11677 in the configuration.</p>
11678
11679 <p>The DHCP implementation on the other hand is very inflexible, both
11680 regarding which LDAP schemas to use and which LDAP structure to use.
11681 I guess one could implement ones own schema, as long as the
11682 objectclasses and attributes have the names used, but this do not
11683 really help when the DHCP subtree need to have a fairly fixed
11684 structure.</p>
11685
11686 <p>Based on the observed behaviour, I suspect a LDAP structure like
11687 this might work for Debian Edu:</p>
11688
11689 <blockquote><pre>
11690 ou=services
11691 cn=machine-info (dhcpService) - dhcpServiceDN points here
11692 cn=dhcp (dhcpServer)
11693 cn=dhcp-internal (dhcpSharedNetwork/dhcpOptions)
11694 cn=10.0.2.0 (dhcpSubnet)
11695 cn=group1 (dhcpGroup/dhcpOptions)
11696 cn=dhcp-thinclients (dhcpSharedNetwork/dhcpOptions)
11697 cn=192.168.0.0 (dhcpSubnet)
11698 cn=group1 (dhcpGroup/dhcpOptions)
11699 ou=machines - PowerDNS base points here
11700 cn=hostname (dhcpHost/domainrelatedobject/dnsDomainAux)
11701 </pre></blockquote>
11702
11703 <P>This is not tested yet. If the DHCP server require the dhcpHost
11704 entries to be in the dhcpGroup subtrees, the entries can be stored
11705 there instead of a common machines subtree, and the PowerDNS base
11706 would have to be moved one level up to the machine-info subtree.</p>
11707
11708 <p>The combined object under the machines subtree would look something
11709 like this:</p>
11710
11711 <blockquote><pre>
11712 dn: dc=hostname,ou=machines,cn=machine-info,dc=skole,dc=skolelinux,dc=no
11713 dc: hostname
11714 objectClass: top
11715 objectClass: dhcpHost
11716 objectclass: domainrelatedobject
11717 objectclass: dnsDomainAux
11718 associateddomain: hostname.intern
11719 arecord: 10.11.12.13
11720 dhcpHWAddress: ethernet 00:00:00:00:00:00
11721 dhcpStatements: fixed-address hostname.intern
11722 </pre></blockquote>
11723
11724 </p>One could even add the LTSP configuration associated with a given
11725 machine, as long as the required attributes are available in a
11726 auxiliary object class.</p>
11727
11728 </div>
11729 <div class="tags">
11730
11731
11732 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
11733
11734
11735 </div>
11736 </div>
11737 <div class="padding"></div>
11738
11739 <div class="entry">
11740 <div class="title">
11741 <a href="http://people.skolelinux.org/pere/blog/Combining_PowerDNS_and_ISC_DHCP_LDAP_objects.html">Combining PowerDNS and ISC DHCP LDAP objects</a>
11742 </div>
11743 <div class="date">
11744 14th July 2010
11745 </div>
11746 <div class="body">
11747 <p>For a while now, I have wanted to find a way to change the DNS and
11748 DHCP services in Debian Edu to use the same LDAP objects for a given
11749 computer, to avoid the possibility of having a inconsistent state for
11750 a computer in LDAP (as in DHCP but no DNS entry or the other way
11751 around) and make it easier to add computers to LDAP.</p>
11752
11753 <p>I've looked at how powerdns and dhcpd is using LDAP, and using this
11754 information finally found a solution that seem to work.</p>
11755
11756 <p>The old setup required three LDAP objects for a given computer.
11757 One forward DNS entry, one reverse DNS entry and one DHCP entry. If
11758 we switch powerdns to use its strict LDAP method (ldap-method=strict
11759 in pdns-debian-edu.conf), the forward and reverse DNS entries are
11760 merged into one while making it impossible to transfer the reverse map
11761 to a slave DNS server.</p>
11762
11763 <p>If we also replace the object class used to get the DNS related
11764 attributes to one allowing these attributes to be combined with the
11765 dhcphost object class, we can merge the DNS and DHCP entries into one.
11766 I've written such object class in the dnsdomainaux.schema file (need
11767 proper OIDs, but that is a minor issue), and tested the setup. It
11768 seem to work.</p>
11769
11770 <p>With this test setup in place, we can get away with one LDAP object
11771 for both DNS and DHCP, and even the LTSP configuration I suggested in
11772 an earlier email. The combined LDAP object will look something like
11773 this:</p>
11774
11775 <blockquote><pre>
11776 dn: cn=hostname,cn=group1,cn=THINCLIENTS,cn=DHCP Config,dc=skole,dc=skolelinux,dc=no
11777 cn: hostname
11778 objectClass: dhcphost
11779 objectclass: domainrelatedobject
11780 objectclass: dnsdomainaux
11781 associateddomain: hostname.intern
11782 arecord: 10.11.12.13
11783 dhcphwaddress: ethernet 00:00:00:00:00:00
11784 dhcpstatements: fixed-address hostname
11785 ldapconfigsound: Y
11786 </pre></blockquote>
11787
11788 <p>The DNS server uses the associateddomain and arecord entries, while
11789 the DHCP server uses the dhcphwaddress and dhcpstatements entries
11790 before asking DNS to resolve the fixed-adddress. LTSP will use
11791 dhcphwaddress or associateddomain and the ldapconfig* attributes.</p>
11792
11793 <p>I am not yet sure if I can get the DHCP server to look for its
11794 dhcphost in a different location, to allow us to put the objects
11795 outside the "DHCP Config" subtree, but hope to figure out a way to do
11796 that. If I can't figure out a way to do that, we can still get rid of
11797 the hosts subtree and move all its content into the DHCP Config tree
11798 (which probably should be renamed to be more related to the new
11799 content. I suspect cn=dnsdhcp,ou=services or something like that
11800 might be a good place to put it.</p>
11801
11802 <p>If you want to help out with implementing this for Debian Edu,
11803 please contact us on debian-edu@lists.debian.org.</p>
11804
11805 </div>
11806 <div class="tags">
11807
11808
11809 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
11810
11811
11812 </div>
11813 </div>
11814 <div class="padding"></div>
11815
11816 <div class="entry">
11817 <div class="title">
11818 <a href="http://people.skolelinux.org/pere/blog/Idea_for_storing_LTSP_configuration_in_LDAP.html">Idea for storing LTSP configuration in LDAP</a>
11819 </div>
11820 <div class="date">
11821 11th July 2010
11822 </div>
11823 <div class="body">
11824 <p>Vagrant mentioned on IRC today that ltsp_config now support
11825 sourcing files from /usr/share/ltsp/ltsp_config.d/ on the thin
11826 clients, and that this can be used to fetch configuration from LDAP if
11827 Debian Edu choose to store configuration there.</p>
11828
11829 <p>Armed with this information, I got inspired and wrote a test module
11830 to get configuration from LDAP. The idea is to look up the MAC
11831 address of the client in LDAP, and look for attributes on the form
11832 ltspconfigsetting=value, and use this to export SETTING=value to the
11833 LTSP clients.</p>
11834
11835 <p>The goal is to be able to store the LTSP configuration attributes
11836 in a "computer" LDAP object used by both DNS and DHCP, and thus
11837 allowing us to store all information about a computer in one place.</p>
11838
11839 <p>This is a untested draft implementation, and I welcome feedback on
11840 this approach. A real LDAP schema for the ltspClientAux objectclass
11841 need to be written. Comments, suggestions, etc?</p>
11842
11843 <blockquote><pre>
11844 # Store in /opt/ltsp/$arch/usr/share/ltsp/ltsp_config.d/ldap-config
11845 #
11846 # Fetch LTSP client settings from LDAP based on MAC address
11847 #
11848 # Uses ethernet address as stored in the dhcpHost objectclass using
11849 # the dhcpHWAddress attribute or ethernet address stored in the
11850 # ieee802Device objectclass with the macAddress attribute.
11851 #
11852 # This module is written to be schema agnostic, and only depend on the
11853 # existence of attribute names.
11854 #
11855 # The LTSP configuration variables are saved directly using a
11856 # ltspConfig prefix and uppercasing the rest of the attribute name.
11857 # To set the SERVER variable, set the ltspConfigServer attribute.
11858 #
11859 # Some LDAP schema should be created with all the relevant
11860 # configuration settings. Something like this should work:
11861 #
11862 # objectclass ( 1.1.2.2 NAME 'ltspClientAux'
11863 # SUP top
11864 # AUXILIARY
11865 # MAY ( ltspConfigServer $ ltsConfigSound $ ... )
11866
11867 LDAPSERVER=$(debian-edu-ldapserver)
11868 if [ "$LDAPSERVER" ] ; then
11869 LDAPBASE=$(debian-edu-ldapserver -b)
11870 for MAC in $(LANG=C ifconfig |grep -i hwaddr| awk '{print $5}'|sort -u) ; do
11871 filter="(|(dhcpHWAddress=ethernet $MAC)(macAddress=$MAC))"
11872 ldapsearch -h "$LDAPSERVER" -b "$LDAPBASE" -v -x "$filter" | \
11873 grep '^ltspConfig' | while read attr value ; do
11874 # Remove prefix and convert to upper case
11875 attr=$(echo $attr | sed 's/^ltspConfig//i' | tr a-z A-Z)
11876 # bass value on to clients
11877 eval "$attr=$value; export $attr"
11878 done
11879 done
11880 fi
11881 </pre></blockquote>
11882
11883 <p>I'm not sure this shell construction will work, because I suspect
11884 the while block might end up in a subshell causing the variables set
11885 there to not show up in ltsp-config, but if that is the case I am sure
11886 the code can be restructured to make sure the variables are passed on.
11887 I expect that can be solved with some testing. :)</p>
11888
11889 <p>If you want to help out with implementing this for Debian Edu,
11890 please contact us on debian-edu@lists.debian.org.</p>
11891
11892 <p>Update 2010-07-17: I am aware of another effort to store LTSP
11893 configuration in LDAP that was created around year 2000 by
11894 <a href="http://www.pcxperience.com/thinclient/documentation/ldap.html">PC
11895 Xperience, Inc., 2000</a>. I found its
11896 <a href="http://people.redhat.com/alikins/ltsp/ldap/">files</a> on a
11897 personal home page over at redhat.com.</p>
11898
11899 </div>
11900 <div class="tags">
11901
11902
11903 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
11904
11905
11906 </div>
11907 </div>
11908 <div class="padding"></div>
11909
11910 <div class="entry">
11911 <div class="title">
11912 <a href="http://people.skolelinux.org/pere/blog/jXplorer__a_very_nice_LDAP_GUI.html">jXplorer, a very nice LDAP GUI</a>
11913 </div>
11914 <div class="date">
11915 9th July 2010
11916 </div>
11917 <div class="body">
11918 <p>Since
11919 <a href="http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html">my
11920 last post</a> about available LDAP tools in Debian, I was told about a
11921 LDAP GUI that is even better than luma. The java application
11922 <a href="http://jxplorer.org/">jXplorer</a> is claimed to be capable of
11923 moving LDAP objects and subtrees using drag-and-drop, and can
11924 authenticate using Kerberos. I have only tested the Kerberos
11925 authentication, but do not have a LDAP setup allowing me to rewrite
11926 LDAP with my test user yet. It is
11927 <a href="http://packages.qa.debian.org/j/jxplorer.html">available in
11928 Debian</a> testing and unstable at the moment. The only problem I
11929 have with it is how it handle errors. If something go wrong, its
11930 non-intuitive behaviour require me to go through some query work list
11931 and remove the failing query. Nothing big, but very annoying.</p>
11932
11933 </div>
11934 <div class="tags">
11935
11936
11937 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
11938
11939
11940 </div>
11941 </div>
11942 <div class="padding"></div>
11943
11944 <div class="entry">
11945 <div class="title">
11946 <a href="http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__apt_vs_aptitude_with_the_Gnome_desktop.html">Lenny->Squeeze upgrades, apt vs aptitude with the Gnome desktop</a>
11947 </div>
11948 <div class="date">
11949 3rd July 2010
11950 </div>
11951 <div class="body">
11952 <p>Here is a short update on my <a
11953 href="http://people.skolelinux.org/~pere/debian-upgrade-testing/">my
11954 Debian Lenny->Squeeze upgrade testing</a>. Here is a summary of the
11955 difference for Gnome when it is upgraded by apt-get and aptitude. I'm
11956 not reporting the status for KDE, because the upgrade crashes when
11957 aptitude try because of missing conflicts
11958 (<a href="http://bugs.debian.org/584861">#584861</a> and
11959 <a href="http://bugs.debian.org/585716">#585716</a>).</p>
11960
11961 <p>At the end of the upgrade test script, dpkg -l is executed to get a
11962 complete list of the installed packages. Based on this I see these
11963 differences when I did a test run today. As usual, I do not really
11964 know what the correct set of packages would be, but thought it best to
11965 publish the difference.</p>
11966
11967 <p>Installed using apt-get, missing with aptitude</p>
11968
11969 <blockquote><p>
11970 at-spi cpp-4.3 finger gnome-spell gstreamer0.10-gnomevfs
11971 libatspi1.0-0 libcupsys2 libeel2-data libgail-common libgdl-1-common
11972 libgnomeprint2.2-data libgnomeprintui2.2-common libgnomevfs2-bin
11973 libgtksourceview-common libpt-1.10.10-plugins-alsa
11974 libpt-1.10.10-plugins-v4l libservlet2.4-java libxalan2-java
11975 libxerces2-java openoffice.org-writer2latex openssl-blacklist p7zip
11976 python-4suite-xml python-eggtrayicon python-gtkhtml2
11977 python-gtkmozembed svgalibg1 xserver-xephyr zip
11978 </p></blockquote>
11979
11980 <p>Installed using apt-get, removed with aptitude</p>
11981
11982 <blockquote><p>
11983 bluez-utils dhcdbd djvulibre-desktop epiphany-gecko
11984 gnome-app-install gnome-mount gnome-vfs-obexftp gnome-volume-manager
11985 libao2 libavahi-compat-libdnssd1 libavahi-core5 libbind9-50
11986 libbluetooth2 libcamel1.2-11 libcdio7 libcucul0 libcurl3
11987 libdirectfb-1.0-0 libdvdread3 libedata-cal1.2-6 libedataserver1.2-9
11988 libeel2-2.20 libepc-1.0-1 libepc-ui-1.0-1 libexchange-storage1.2-3
11989 libfaad0 libgd2-noxpm libgda3-3 libgda3-common libggz2 libggzcore9
11990 libggzmod4 libgksu1.2-0 libgksuui1.0-1 libgmyth0 libgnome-desktop-2
11991 libgnome-pilot2 libgnomecups1.0-1 libgnomeprint2.2-0
11992 libgnomeprintui2.2-0 libgpod3 libgraphviz4 libgtkhtml2-0
11993 libgtksourceview1.0-0 libgucharmap6 libhesiod0 libicu38 libisccc50
11994 libisccfg50 libiw29 libkpathsea4 libltdl3 liblwres50 libmagick++10
11995 libmagick10 libmalaga7 libmtp7 libmysqlclient15off libnautilus-burn4
11996 libneon27 libnm-glib0 libnm-util0 libopal-2.2 libosp5
11997 libparted1.8-10 libpisock9 libpisync1 libpoppler-glib3 libpoppler3
11998 libpt-1.10.10 libraw1394-8 libsensors3 libsmbios2 libsoup2.2-8
11999 libssh2-1 libsuitesparse-3.1.0 libswfdec-0.6-90 libtalloc1
12000 libtotem-plparser10 libtrackerclient0 libvoikko1 libxalan2-java-gcj
12001 libxerces2-java-gcj libxklavier12 libxtrap6 libxxf86misc1 libzephyr3
12002 mysql-common swfdec-gnome totem-gstreamer wodim
12003 </p></blockquote>
12004
12005 <p>Installed using aptitude, missing with apt-get</p>
12006
12007 <blockquote><p>
12008 gnome gnome-desktop-environment hamster-applet python-gnomeapplet
12009 python-gnomekeyring python-wnck rhythmbox-plugins xorg
12010 xserver-xorg-input-all xserver-xorg-input-evdev
12011 xserver-xorg-input-kbd xserver-xorg-input-mouse
12012 xserver-xorg-input-synaptics xserver-xorg-video-all
12013 xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati
12014 xserver-xorg-video-chips xserver-xorg-video-cirrus
12015 xserver-xorg-video-dummy xserver-xorg-video-fbdev
12016 xserver-xorg-video-glint xserver-xorg-video-i128
12017 xserver-xorg-video-i740 xserver-xorg-video-mach64
12018 xserver-xorg-video-mga xserver-xorg-video-neomagic
12019 xserver-xorg-video-nouveau xserver-xorg-video-nv
12020 xserver-xorg-video-r128 xserver-xorg-video-radeon
12021 xserver-xorg-video-radeonhd xserver-xorg-video-rendition
12022 xserver-xorg-video-s3 xserver-xorg-video-s3virge
12023 xserver-xorg-video-savage xserver-xorg-video-siliconmotion
12024 xserver-xorg-video-sis xserver-xorg-video-sisusb
12025 xserver-xorg-video-tdfx xserver-xorg-video-tga
12026 xserver-xorg-video-trident xserver-xorg-video-tseng
12027 xserver-xorg-video-vesa xserver-xorg-video-vmware
12028 xserver-xorg-video-voodoo
12029 </p></blockquote>
12030
12031 <p>Installed using aptitude, removed with apt-get</p>
12032
12033 <blockquote><p>
12034 deskbar-applet xserver-xorg xserver-xorg-core
12035 xserver-xorg-input-wacom xserver-xorg-video-intel
12036 xserver-xorg-video-openchrome
12037 </p></blockquote>
12038
12039 <p>I was told on IRC that the xorg-xserver package was
12040 <a href="http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git;a=commit;h=9c8080d06c457932d3bfec021c69ac000aa60120">changed
12041 in git</a> today to try to get apt-get to not remove xorg completely.
12042 No idea when it hits Squeeze, but when it does I hope it will reduce
12043 the difference somewhat.
12044
12045 </div>
12046 <div class="tags">
12047
12048
12049 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12050
12051
12052 </div>
12053 </div>
12054 <div class="padding"></div>
12055
12056 <div class="entry">
12057 <div class="title">
12058 <a href="http://people.skolelinux.org/pere/blog/LUMA__a_very_nice_LDAP_GUI.html">LUMA, a very nice LDAP GUI</a>
12059 </div>
12060 <div class="date">
12061 28th June 2010
12062 </div>
12063 <div class="body">
12064 <p>The last few days I have been looking into the status of the LDAP
12065 directory in Debian Edu, and in the process I started to miss a GUI
12066 tool to browse the LDAP tree. The only one I was able to find in
12067 Debian/Squeeze and Lenny is
12068 <a href="http://luma.sourceforge.net/">LUMA</a>, which has proved to
12069 be a great tool to get a overview of the current LDAP directory
12070 populated by default in Skolelinux. Thanks to it, I have been able to
12071 find empty and obsolete subtrees, misplaced objects and duplicate
12072 objects. It will be installed by default in Debian/Squeeze. If you
12073 are working with LDAP, give it a go. :)</p>
12074
12075 <p>I did notice one problem with it I have not had time to report to
12076 the BTS yet. There is no .desktop file in the package, so the tool do
12077 not show up in the Gnome and KDE menus, but only deep down in in the
12078 Debian submenu in KDE. I hope that can be fixed before Squeeze is
12079 released.</p>
12080
12081 <p>I have not yet been able to get it to modify the tree yet. I would
12082 like to move objects and remove subtrees directly in the GUI, but have
12083 not found a way to do that with LUMA yet. So in the mean time, I use
12084 <a href="http://www.lichteblau.com/ldapvi/">ldapvi</a> for that.</p>
12085
12086 <p>If you have tips on other GUI tools for LDAP that might be useful
12087 in Debian Edu, please contact us on debian-edu@lists.debian.org.</p>
12088
12089 <p>Update 2010-06-29: Ross Reedstrom tipped us about the
12090 <a href="http://packages.qa.debian.org/g/gq.html">gq</a> package as a
12091 useful GUI alternative. It seem like a good tool, but is unmaintained
12092 in Debian and got a RC bug keeping it out of Squeeze. Unless that
12093 changes, it will not be an option for Debian Edu based on Squeeze.</p>
12094
12095 </div>
12096 <div class="tags">
12097
12098
12099 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
12100
12101
12102 </div>
12103 </div>
12104 <div class="padding"></div>
12105
12106 <div class="entry">
12107 <div class="title">
12108 <a href="http://people.skolelinux.org/pere/blog/Idea_for_a_change_to_LDAP_schemas_allowing_DNS_and_DHCP_info_to_be_combined_into_one_object.html">Idea for a change to LDAP schemas allowing DNS and DHCP info to be combined into one object</a>
12109 </div>
12110 <div class="date">
12111 24th June 2010
12112 </div>
12113 <div class="body">
12114 <p>A while back, I
12115 <a href="http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html">complained
12116 about the fact</a> that it is not possible with the provided schemas
12117 for storing DNS and DHCP information in LDAP to combine the two sets
12118 of information into one LDAP object representing a computer.</p>
12119
12120 <p>In the mean time, I discovered that a simple fix would be to make
12121 the dhcpHost object class auxiliary, to allow it to be combined with
12122 the dNSDomain object class, and thus forming one object for one
12123 computer when storing both DHCP and DNS information in LDAP.</p>
12124
12125 <p>If I understand this correctly, it is not safe to do this change
12126 without also changing the assigned number for the object class, and I
12127 do not know enough about LDAP schema design to do that properly for
12128 Debian Edu.</p>
12129
12130 <p>Anyway, for future reference, this is how I believe we could change
12131 the
12132 <a href="http://tools.ietf.org/html/draft-ietf-dhc-ldap-schema-00">DHCP
12133 schema</a> to solve at least part of the problem with the LDAP schemas
12134 available today from IETF.</p>
12135
12136 <pre>
12137 --- dhcp.schema (revision 65192)
12138 +++ dhcp.schema (working copy)
12139 @@ -376,7 +376,7 @@
12140 objectclass ( 2.16.840.1.113719.1.203.6.6
12141 NAME 'dhcpHost'
12142 DESC 'This represents information about a particular client'
12143 - SUP top
12144 + SUP top AUXILIARY
12145 MUST cn
12146 MAY (dhcpLeaseDN $ dhcpHWAddress $ dhcpOptionsDN $ dhcpStatements $ dhcpComments $ dhcpOption)
12147 X-NDS_CONTAINMENT ('dhcpService' 'dhcpSubnet' 'dhcpGroup') )
12148 </pre>
12149
12150 <p>I very much welcome clues on how to do this properly for Debian
12151 Edu/Squeeze. We provide the DHCP schema in our debian-edu-config
12152 package, and should thus be free to rewrite it as we see fit.</p>
12153
12154 <p>If you want to help out with implementing this for Debian Edu,
12155 please contact us on debian-edu@lists.debian.org.</p>
12156
12157 </div>
12158 <div class="tags">
12159
12160
12161 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
12162
12163
12164 </div>
12165 </div>
12166 <div class="padding"></div>
12167
12168 <div class="entry">
12169 <div class="title">
12170 <a href="http://people.skolelinux.org/pere/blog/Calling_tasksel_like_the_installer__while_still_getting_useful_output.html">Calling tasksel like the installer, while still getting useful output</a>
12171 </div>
12172 <div class="date">
12173 16th June 2010
12174 </div>
12175 <div class="body">
12176 <p>A few times I have had the need to simulate the way tasksel
12177 installs packages during the normal debian-installer run. Until now,
12178 I have ended up letting tasksel do the work, with the annoying problem
12179 of not getting any feedback at all when something fails (like a
12180 conffile question from dpkg or a download that fails), using code like
12181 this:
12182
12183 <blockquote><pre>
12184 export DEBIAN_FRONTEND=noninteractive
12185 tasksel --new-install
12186 </pre></blockquote>
12187
12188 This would invoke tasksel, let its automatic task selection pick the
12189 tasks to install, and continue to install the requested tasks without
12190 any output what so ever.
12191
12192 Recently I revisited this problem while working on the automatic
12193 package upgrade testing, because tasksel would some times hang without
12194 any useful feedback, and I want to see what is going on when it
12195 happen. Then it occured to me, I can parse the output from tasksel
12196 when asked to run in test mode, and use that aptitude command line
12197 printed by tasksel then to simulate the tasksel run. I ended up using
12198 code like this:
12199
12200 <blockquote><pre>
12201 export DEBIAN_FRONTEND=noninteractive
12202 cmd="$(in_target tasksel -t --new-install | sed 's/debconf-apt-progress -- //')"
12203 $cmd
12204 </pre></blockquote>
12205
12206 <p>The content of $cmd is typically something like "<tt>aptitude -q
12207 --without-recommends -o APT::Install-Recommends=no -y install
12208 ~t^desktop$ ~t^gnome-desktop$ ~t^laptop$ ~pstandard ~prequired
12209 ~pimportant</tt>", which will install the gnome desktop task, the
12210 laptop task and all packages with priority standard , required and
12211 important, just like tasksel would have done it during
12212 installation.</p>
12213
12214 <p>A better approach is probably to extend tasksel to be able to
12215 install packages without using debconf-apt-progress, for use cases
12216 like this.</p>
12217
12218 </div>
12219 <div class="tags">
12220
12221
12222 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
12223
12224
12225 </div>
12226 </div>
12227 <div class="padding"></div>
12228
12229 <div class="entry">
12230 <div class="title">
12231 <a href="http://people.skolelinux.org/pere/blog/Lenny__Squeeze_upgrades__removals_by_apt_and_aptitude.html">Lenny->Squeeze upgrades, removals by apt and aptitude</a>
12232 </div>
12233 <div class="date">
12234 13th June 2010
12235 </div>
12236 <div class="body">
12237 <p>My
12238 <a href="http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html">testing
12239 of Debian upgrades</a> from Lenny to Squeeze continues, and I've
12240 finally made the upgrade logs available from
12241 <a href="http://people.skolelinux.org/pere/debian-upgrade-testing/">http://people.skolelinux.org/pere/debian-upgrade-testing/</a>.
12242 I am now testing dist-upgrade of Gnome and KDE in a chroot using both
12243 apt and aptitude, and found their differences interesting. This time
12244 I will only focus on their removal plans.</p>
12245
12246 <p>After installing a Gnome desktop and the laptop task, apt-get wants
12247 to remove 72 packages when dist-upgrading from Lenny to Squeeze. The
12248 surprising part is that it want to remove xorg and all
12249 xserver-xorg-video* drivers. Clearly not a good choice, but I am not
12250 sure why. When asking aptitude to do the same, it want to remove 129
12251 packages, but most of them are library packages I suspect are no
12252 longer needed. Both of them want to remove bluetooth packages, which
12253 I do not know. Perhaps these bluetooth packages are obsolete?</p>
12254
12255 <p>For KDE, apt-get want to remove 82 packages, among them kdebase
12256 which seem like a bad idea and xorg the same way as with Gnome. Asking
12257 aptitude for the same, it wants to remove 192 packages, none which are
12258 too surprising.</p>
12259
12260 <p>I guess the removal of xorg during upgrades should be investigated
12261 and avoided, and perhaps others as well. Here are the complete list
12262 of planned removals. The complete logs is available from the URL
12263 above. Note if you want to repeat these tests, that the upgrade test
12264 for kde+apt-get hung in the tasksel setup because of dpkg asking
12265 conffile questions. No idea why. I worked around it by using
12266 '<tt>echo >> /proc/<em>pidofdpkg</em>/fd/0</tt>' to tell dpkg to
12267 continue.</p>
12268
12269 <p><b>apt-get gnome 72</b>
12270 <br>bluez-gnome cupsddk-drivers deskbar-applet gnome
12271 gnome-desktop-environment gnome-network-admin gtkhtml3.14
12272 iceweasel-gnome-support libavcodec51 libdatrie0 libgdl-1-0
12273 libgnomekbd2 libgnomekbdui2 libmetacity0 libslab0 libxcb-xlib0
12274 nautilus-cd-burner python-gnome2-desktop python-gnome2-extras
12275 serpentine swfdec-mozilla update-manager xorg xserver-xorg
12276 xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev
12277 xserver-xorg-input-kbd xserver-xorg-input-mouse
12278 xserver-xorg-input-synaptics xserver-xorg-input-wacom
12279 xserver-xorg-video-all xserver-xorg-video-apm xserver-xorg-video-ark
12280 xserver-xorg-video-ati xserver-xorg-video-chips
12281 xserver-xorg-video-cirrus xserver-xorg-video-cyrix
12282 xserver-xorg-video-dummy xserver-xorg-video-fbdev
12283 xserver-xorg-video-glint xserver-xorg-video-i128
12284 xserver-xorg-video-i740 xserver-xorg-video-imstt
12285 xserver-xorg-video-intel xserver-xorg-video-mach64
12286 xserver-xorg-video-mga xserver-xorg-video-neomagic
12287 xserver-xorg-video-nsc xserver-xorg-video-nv
12288 xserver-xorg-video-openchrome xserver-xorg-video-r128
12289 xserver-xorg-video-radeon xserver-xorg-video-radeonhd
12290 xserver-xorg-video-rendition xserver-xorg-video-s3
12291 xserver-xorg-video-s3virge xserver-xorg-video-savage
12292 xserver-xorg-video-siliconmotion xserver-xorg-video-sis
12293 xserver-xorg-video-sisusb xserver-xorg-video-tdfx
12294 xserver-xorg-video-tga xserver-xorg-video-trident
12295 xserver-xorg-video-tseng xserver-xorg-video-v4l
12296 xserver-xorg-video-vesa xserver-xorg-video-vga
12297 xserver-xorg-video-vmware xserver-xorg-video-voodoo xulrunner-1.9
12298 xulrunner-1.9-gnome-support</p>
12299
12300 <p><b>aptitude gnome 129</b>
12301
12302 <br>bluez-gnome bluez-utils cpp-4.3 cupsddk-drivers dhcdbd
12303 djvulibre-desktop finger gnome-app-install gnome-mount
12304 gnome-network-admin gnome-spell gnome-vfs-obexftp
12305 gnome-volume-manager gstreamer0.10-gnomevfs gtkhtml3.14 libao2
12306 libavahi-compat-libdnssd1 libavahi-core5 libavcodec51 libbluetooth2
12307 libcamel1.2-11 libcdio7 libcucul0 libcupsys2 libcurl3 libdatrie0
12308 libdirectfb-1.0-0 libdvdread3 libedataserver1.2-9 libeel2-2.20
12309 libeel2-data libepc-1.0-1 libepc-ui-1.0-1 libfaad0 libgail-common
12310 libgd2-noxpm libgda3-3 libgda3-common libgdl-1-0 libgdl-1-common
12311 libggz2 libggzcore9 libggzmod4 libgksu1.2-0 libgksuui1.0-1 libgmyth0
12312 libgnomecups1.0-1 libgnomekbd2 libgnomekbdui2 libgnomeprint2.2-0
12313 libgnomeprint2.2-data libgnomeprintui2.2-0 libgnomeprintui2.2-common
12314 libgnomevfs2-bin libgpod3 libgraphviz4 libgtkhtml2-0
12315 libgtksourceview-common libgtksourceview1.0-0 libgucharmap6
12316 libhesiod0 libicu38 libiw29 libkpathsea4 libltdl3 libmagick++10
12317 libmagick10 libmalaga7 libmetacity0 libmtp7 libmysqlclient15off
12318 libnautilus-burn4 libneon27 libnm-glib0 libnm-util0 libopal-2.2
12319 libosp5 libparted1.8-10 libpoppler-glib3 libpoppler3 libpt-1.10.10
12320 libpt-1.10.10-plugins-alsa libpt-1.10.10-plugins-v4l libraw1394-8
12321 libsensors3 libslab0 libsmbios2 libsoup2.2-8 libssh2-1
12322 libsuitesparse-3.1.0 libswfdec-0.6-90 libtalloc1 libtotem-plparser10
12323 libtrackerclient0 libxalan2-java libxalan2-java-gcj libxcb-xlib0
12324 libxerces2-java libxerces2-java-gcj libxklavier12 libxtrap6
12325 libxxf86misc1 libzephyr3 mysql-common nautilus-cd-burner
12326 openoffice.org-writer2latex openssl-blacklist p7zip
12327 python-4suite-xml python-eggtrayicon python-gnome2-desktop
12328 python-gnome2-extras python-gtkhtml2 python-gtkmozembed
12329 python-numeric python-sexy serpentine svgalibg1 swfdec-gnome
12330 swfdec-mozilla totem-gstreamer update-manager wodim
12331 xserver-xorg-video-cyrix xserver-xorg-video-imstt
12332 xserver-xorg-video-nsc xserver-xorg-video-v4l xserver-xorg-video-vga
12333 zip</p>
12334
12335 <p><b>apt-get kde 82</b>
12336
12337 <br>cupsddk-drivers karm kaudiocreator kcoloredit kcontrol kde kde-core
12338 kdeaddons kdeartwork kdebase kdebase-bin kdebase-bin-kde3
12339 kdebase-kio-plugins kdesktop kdeutils khelpcenter kicker
12340 kicker-applets knewsticker kolourpaint konq-plugins konqueror korn
12341 kpersonalizer kscreensaver ksplash libavcodec51 libdatrie0 libkiten1
12342 libxcb-xlib0 quanta superkaramba texlive-base-bin xorg xserver-xorg
12343 xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev
12344 xserver-xorg-input-kbd xserver-xorg-input-mouse
12345 xserver-xorg-input-synaptics xserver-xorg-input-wacom
12346 xserver-xorg-video-all xserver-xorg-video-apm xserver-xorg-video-ark
12347 xserver-xorg-video-ati xserver-xorg-video-chips
12348 xserver-xorg-video-cirrus xserver-xorg-video-cyrix
12349 xserver-xorg-video-dummy xserver-xorg-video-fbdev
12350 xserver-xorg-video-glint xserver-xorg-video-i128
12351 xserver-xorg-video-i740 xserver-xorg-video-imstt
12352 xserver-xorg-video-intel xserver-xorg-video-mach64
12353 xserver-xorg-video-mga xserver-xorg-video-neomagic
12354 xserver-xorg-video-nsc xserver-xorg-video-nv
12355 xserver-xorg-video-openchrome xserver-xorg-video-r128
12356 xserver-xorg-video-radeon xserver-xorg-video-radeonhd
12357 xserver-xorg-video-rendition xserver-xorg-video-s3
12358 xserver-xorg-video-s3virge xserver-xorg-video-savage
12359 xserver-xorg-video-siliconmotion xserver-xorg-video-sis
12360 xserver-xorg-video-sisusb xserver-xorg-video-tdfx
12361 xserver-xorg-video-tga xserver-xorg-video-trident
12362 xserver-xorg-video-tseng xserver-xorg-video-v4l
12363 xserver-xorg-video-vesa xserver-xorg-video-vga
12364 xserver-xorg-video-vmware xserver-xorg-video-voodoo xulrunner-1.9</p>
12365
12366 <p><b>aptitude kde 192</b>
12367 <br>bluez-utils cpp-4.3 cupsddk-drivers cvs dcoprss dhcdbd
12368 djvulibre-desktop dosfstools eyesapplet fifteenapplet finger gettext
12369 ghostscript-x imlib-base imlib11 indi kandy karm kasteroids
12370 kaudiocreator kbackgammon kbstate kcoloredit kcontrol kcron kdat
12371 kdeadmin-kfile-plugins kdeartwork-misc kdeartwork-theme-window
12372 kdebase-bin-kde3 kdebase-kio-plugins kdeedu-data
12373 kdegraphics-kfile-plugins kdelirc kdemultimedia-kappfinder-data
12374 kdemultimedia-kfile-plugins kdenetwork-kfile-plugins
12375 kdepim-kfile-plugins kdepim-kio-plugins kdeprint kdesktop kdessh
12376 kdict kdnssd kdvi kedit keduca kenolaba kfax kfaxview kfouleggs
12377 kghostview khelpcenter khexedit kiconedit kitchensync klatin
12378 klickety kmailcvt kmenuedit kmid kmilo kmoon kmrml kodo kolourpaint
12379 kooka korn kpager kpdf kpercentage kpf kpilot kpoker kpovmodeler
12380 krec kregexpeditor ksayit ksim ksirc ksirtet ksmiletris ksmserver
12381 ksnake ksokoban ksplash ksvg ksysv ktip ktnef kuickshow kverbos
12382 kview kviewshell kvoctrain kwifimanager kwin kwin4 kworldclock
12383 kxsldbg libakode2 libao2 libarts1-akode libarts1-audiofile
12384 libarts1-mpeglib libarts1-xine libavahi-compat-libdnssd1
12385 libavahi-core5 libavc1394-0 libavcodec51 libbluetooth2
12386 libboost-python1.34.1 libcucul0 libcurl3 libcvsservice0 libdatrie0
12387 libdirectfb-1.0-0 libdjvulibre21 libdvdread3 libfaad0 libfreebob0
12388 libgail-common libgd2-noxpm libgraphviz4 libgsmme1c2a libgtkhtml2-0
12389 libicu38 libiec61883-0 libindex0 libiw29 libk3b3 libkcal2b libkcddb1
12390 libkdeedu3 libkdepim1a libkgantt0 libkiten1 libkleopatra1 libkmime2
12391 libkpathsea4 libkpimexchange1 libkpimidentities1 libkscan1
12392 libksieve0 libktnef1 liblockdev1 libltdl3 libmagick10 libmimelib1c2a
12393 libmozjs1d libmpcdec3 libneon27 libnm-util0 libopensync0 libpisock9
12394 libpoppler-glib3 libpoppler-qt2 libpoppler3 libraw1394-8 libsmbios2
12395 libssh2-1 libsuitesparse-3.1.0 libtalloc1 libtiff-tools
12396 libxalan2-java libxalan2-java-gcj libxcb-xlib0 libxerces2-java
12397 libxerces2-java-gcj libxtrap6 mpeglib networkstatus
12398 openoffice.org-writer2latex pmount poster psutils quanta quanta-data
12399 superkaramba svgalibg1 tex-common texlive-base texlive-base-bin
12400 texlive-common texlive-doc-base texlive-fonts-recommended
12401 xserver-xorg-video-cyrix xserver-xorg-video-imstt
12402 xserver-xorg-video-nsc xserver-xorg-video-v4l xserver-xorg-video-vga
12403 xulrunner-1.9</p>
12404
12405
12406 </div>
12407 <div class="tags">
12408
12409
12410 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12411
12412
12413 </div>
12414 </div>
12415 <div class="padding"></div>
12416
12417 <div class="entry">
12418 <div class="title">
12419 <a href="http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html">Automatic upgrade testing from Lenny to Squeeze</a>
12420 </div>
12421 <div class="date">
12422 11th June 2010
12423 </div>
12424 <div class="body">
12425 <p>The last few days I have done some upgrade testing in Debian, to
12426 see if the upgrade from Lenny to Squeeze will go smoothly. A few bugs
12427 have been discovered and reported in the process
12428 (<a href="http://bugs.debian.org/585410">#585410</a> in nagios3-cgi,
12429 <a href="http://bugs.debian.org/584879">#584879</a> already fixed in
12430 enscript and <a href="http://bugs.debian.org/584861">#584861</a> in
12431 kdebase-workspace-data), and to get a more regular testing going on, I
12432 am working on a script to automate the test.</p>
12433
12434 <p>The idea is to create a Lenny chroot and use tasksel to install a
12435 Gnome or KDE desktop installation inside the chroot before upgrading
12436 it. To ensure no services are started in the chroot, a policy-rc.d
12437 script is inserted. To make sure tasksel believe it is to install a
12438 desktop on a laptop, the tasksel tests are replaced in the chroot
12439 (only acceptable because this is a throw-away chroot).</p>
12440
12441 <p>A naive upgrade from Lenny to Squeeze using aptitude dist-upgrade
12442 currently always fail because udev refuses to upgrade with the kernel
12443 in Lenny, so to avoid that problem the file /etc/udev/kernel-upgrade
12444 is created. The bug report
12445 <a href="http://bugs.debian.org/566000">#566000</a> make me suspect
12446 this problem do not trigger in a chroot, but I touch the file anyway
12447 to make sure the upgrade go well. Testing on virtual and real
12448 hardware have failed me because of udev so far, and creating this file
12449 do the trick in such settings anyway. This is a
12450 <a href="http://www.linuxquestions.org/questions/debian-26/failed-dist-upgrade-due-to-udev-config_sysfs_deprecated-nonsense-804130/">known
12451 issue</a> and the current udev behaviour is intended by the udev
12452 maintainer because he lack the resources to rewrite udev to keep
12453 working with old kernels or something like that. I really wish the
12454 udev upstream would keep udev backwards compatible, to avoid such
12455 upgrade problem, but given that they fail to do so, I guess
12456 documenting the way out of this mess is the best option we got for
12457 Debian Squeeze.</p>
12458
12459 <p>Anyway, back to the task at hand, testing upgrades. This test
12460 script, which I call <tt>upgrade-test</tt> for now, is doing the
12461 trick:</p>
12462
12463 <blockquote><pre>
12464 #!/bin/sh
12465 set -ex
12466
12467 if [ "$1" ] ; then
12468 desktop=$1
12469 else
12470 desktop=gnome
12471 fi
12472
12473 from=lenny
12474 to=squeeze
12475
12476 exec &lt; /dev/null
12477 unset LANG
12478 mirror=http://ftp.skolelinux.org/debian
12479 tmpdir=chroot-$from-upgrade-$to-$desktop
12480 fuser -mv .
12481 debootstrap $from $tmpdir $mirror
12482 chroot $tmpdir aptitude update
12483 cat > $tmpdir/usr/sbin/policy-rc.d &lt;&lt;EOF
12484 #!/bin/sh
12485 exit 101
12486 EOF
12487 chmod a+rx $tmpdir/usr/sbin/policy-rc.d
12488 exit_cleanup() {
12489 umount $tmpdir/proc
12490 }
12491 mount -t proc proc $tmpdir/proc
12492 # Make sure proc is unmounted also on failure
12493 trap exit_cleanup EXIT INT
12494
12495 chroot $tmpdir aptitude -y install debconf-utils
12496
12497 # Make sure tasksel autoselection trigger. It need the test scripts
12498 # to return the correct answers.
12499 echo tasksel tasksel/desktop multiselect $desktop | \
12500 chroot $tmpdir debconf-set-selections
12501
12502 # Include the desktop and laptop task
12503 for test in desktop laptop ; do
12504 echo > $tmpdir/usr/lib/tasksel/tests/$test &lt;&lt;EOF
12505 #!/bin/sh
12506 exit 2
12507 EOF
12508 chmod a+rx $tmpdir/usr/lib/tasksel/tests/$test
12509 done
12510
12511 DEBIAN_FRONTEND=noninteractive
12512 DEBIAN_PRIORITY=critical
12513 export DEBIAN_FRONTEND DEBIAN_PRIORITY
12514 chroot $tmpdir tasksel --new-install
12515
12516 echo deb $mirror $to main > $tmpdir/etc/apt/sources.list
12517 chroot $tmpdir aptitude update
12518 touch $tmpdir/etc/udev/kernel-upgrade
12519 chroot $tmpdir aptitude -y dist-upgrade
12520 fuser -mv
12521 </pre></blockquote>
12522
12523 <p>I suspect it would be useful to test upgrades with both apt-get and
12524 with aptitude, but I have not had time to look at how they behave
12525 differently so far. I hope to get a cron job running to do the test
12526 regularly and post the result on the web. The Gnome upgrade currently
12527 work, while the KDE upgrade fail because of the bug in
12528 kdebase-workspace-data</p>
12529
12530 <p>I am not quite sure what kind of extract from the huge upgrade logs
12531 (KDE 167 KiB, Gnome 516 KiB) it make sense to include in this blog
12532 post, so I will refrain from trying. I can report that for Gnome,
12533 aptitude report 760 packages upgraded, 448 newly installed, 129 to
12534 remove and 1 not upgraded and 1024MB need to be downloaded while for
12535 KDE the same numbers are 702 packages upgraded, 507 newly installed,
12536 193 to remove and 0 not upgraded and 1117MB need to be downloaded</p>
12537
12538 <p>I am very happy to notice that the Gnome desktop + laptop upgrade
12539 is able to migrate to dependency based boot sequencing and parallel
12540 booting without a hitch. Was unsure if there were still bugs with
12541 packages failing to clean up their obsolete init.d script during
12542 upgrades, and no such problem seem to affect the Gnome desktop+laptop
12543 packages.</p>
12544
12545 </div>
12546 <div class="tags">
12547
12548
12549 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12550
12551
12552 </div>
12553 </div>
12554 <div class="padding"></div>
12555
12556 <div class="entry">
12557 <div class="title">
12558 <a href="http://people.skolelinux.org/pere/blog/Upstart_or_sysvinit___as_init_d_scripts_see_it.html">Upstart or sysvinit - as init.d scripts see it</a>
12559 </div>
12560 <div class="date">
12561 6th June 2010
12562 </div>
12563 <div class="body">
12564 <p>If Debian is to migrate to upstart on Linux, I expect some init.d
12565 scripts to migrate (some of) their operations to upstart job while
12566 keeping the init.d for hurd and kfreebsd. The packages with such
12567 needs will need a way to get their init.d scripts to behave
12568 differently when used with sysvinit and with upstart. Because of
12569 this, I had a look at the environment variables set when a init.d
12570 script is running under upstart, and when it is not.</p>
12571
12572 <p>With upstart, I notice these environment variables are set when a
12573 script is started from rcS.d/ (ignoring some irrelevant ones like
12574 COLUMNS):</p>
12575
12576 <blockquote><pre>
12577 DEFAULT_RUNLEVEL=2
12578 previous=N
12579 PREVLEVEL=
12580 RUNLEVEL=
12581 runlevel=S
12582 UPSTART_EVENTS=startup
12583 UPSTART_INSTANCE=
12584 UPSTART_JOB=rc-sysinit
12585 </pre></blockquote>
12586
12587 <p>With sysvinit, these environment variables are set for the same
12588 script.</p>
12589
12590 <blockquote><pre>
12591 INIT_VERSION=sysvinit-2.88
12592 previous=N
12593 PREVLEVEL=N
12594 RUNLEVEL=S
12595 runlevel=S
12596 </pre></blockquote>
12597
12598 <p>The RUNLEVEL and PREVLEVEL environment variables passed on from
12599 sysvinit are not set by upstart. Not sure if it is intentional or not
12600 to not be compatible with sysvinit in this regard.</p>
12601
12602 <p>For scripts needing to behave differently when upstart is used,
12603 looking for the UPSTART_JOB environment variable seem to be a good
12604 choice.</p>
12605
12606 </div>
12607 <div class="tags">
12608
12609
12610 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12611
12612
12613 </div>
12614 </div>
12615 <div class="padding"></div>
12616
12617 <div class="entry">
12618 <div class="title">
12619 <a href="http://people.skolelinux.org/pere/blog/A_manual_for_standards_wars___.html">A manual for standards wars...</a>
12620 </div>
12621 <div class="date">
12622 6th June 2010
12623 </div>
12624 <div class="body">
12625 <p>Via the
12626 <a href="http://feedproxy.google.com/~r/robweir/antic-atom/~3/QzU4RgoAGMg/weekly-links-10.html">blog
12627 of Rob Weir</a> I came across the very interesting essay named
12628 <a href="http://faculty.haas.berkeley.edu/shapiro/wars.pdf">The Art of
12629 Standards Wars</a> (PDF 25 pages). I recommend it for everyone
12630 following the standards wars of today.</p>
12631
12632 </div>
12633 <div class="tags">
12634
12635
12636 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/standard">standard</a>.
12637
12638
12639 </div>
12640 </div>
12641 <div class="padding"></div>
12642
12643 <div class="entry">
12644 <div class="title">
12645 <a href="http://people.skolelinux.org/pere/blog/Sitesummary_tip__Listing_computer_hardware_models_used_at_site.html">Sitesummary tip: Listing computer hardware models used at site</a>
12646 </div>
12647 <div class="date">
12648 3rd June 2010
12649 </div>
12650 <div class="body">
12651 <p>When using sitesummary at a site to track machines, it is possible
12652 to get a list of the machine types in use thanks to the DMI
12653 information extracted from each machine. The script to do so is
12654 included in the sitesummary package, and here is example output from
12655 the Skolelinux build servers:</p>
12656
12657 <blockquote><pre>
12658 maintainer:~# /usr/lib/sitesummary/hardware-model-summary
12659 vendor count
12660 Dell Computer Corporation 1
12661 PowerEdge 1750 1
12662 IBM 1
12663 eserver xSeries 345 -[8670M1X]- 1
12664 Intel 2
12665 [no-dmi-info] 3
12666 maintainer:~#
12667 </pre></blockquote>
12668
12669 <p>The quality of the report depend on the quality of the DMI tables
12670 provided in each machine. Here there are Intel machines without model
12671 information listed with Intel as vendor and no model, and virtual Xen
12672 machines listed as [no-dmi-info]. One can add -l as a command line
12673 option to list the individual machines.</p>
12674
12675 <p>A larger list is
12676 <a href="http://narvikskolen.no/sitesummary/">available from the the
12677 city of Narvik</a>, which uses Skolelinux on all their shools and also
12678 provide the basic sitesummary report publicly. In their report there
12679 are ~1400 machines. I know they use both Ubuntu and Skolelinux on
12680 their machines, and as sitesummary is available in both distributions,
12681 it is trivial to get all of them to report to the same central
12682 collector.</p>
12683
12684 </div>
12685 <div class="tags">
12686
12687
12688 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary</a>.
12689
12690
12691 </div>
12692 </div>
12693 <div class="padding"></div>
12694
12695 <div class="entry">
12696 <div class="title">
12697 <a href="http://people.skolelinux.org/pere/blog/KDM_fail_at_boot_with_NVidia_cards___and_no_one_try_to_fix_it_.html">KDM fail at boot with NVidia cards - and no one try to fix it?</a>
12698 </div>
12699 <div class="date">
12700 1st June 2010
12701 </div>
12702 <div class="body">
12703 <p>It is strange to watch how a bug in Debian causing KDM to fail to
12704 start at boot when an NVidia video card is used is handled. The
12705 problem seem to be that the nvidia X.org driver uses a long time to
12706 initialize, and this duration is longer than kdm is configured to
12707 wait.</p>
12708
12709 <p>I came across two bugs related to this issue,
12710 <a href="http://bugs.debian.org/583312">#583312</a> initially filed
12711 against initscripts and passed on to nvidia-glx when it became obvious
12712 that the nvidia drivers were involved, and
12713 <a href="http://bugs.debian.org/524751">#524751</a> initially filed against
12714 kdm and passed on to src:nvidia-graphics-drivers for unknown reasons.</p>
12715
12716 <p>To me, it seem that no-one is interested in actually solving the
12717 problem nvidia video card owners experience and make sure the Debian
12718 distribution work out of the box for these users. The nvidia driver
12719 maintainers expect kdm to be set up to wait longer, while kdm expect
12720 the nvidia driver maintainers to fix the driver to start faster, and
12721 while they wait for each other I guess the users end up switching to a
12722 distribution that work for them. I have no idea what the solution is,
12723 but I am pretty sure that waiting for each other is not it.</p>
12724
12725 <p>I wonder why we end up handling bugs this way.</p>
12726
12727 </div>
12728 <div class="tags">
12729
12730
12731 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12732
12733
12734 </div>
12735 </div>
12736 <div class="padding"></div>
12737
12738 <div class="entry">
12739 <div class="title">
12740 <a href="http://people.skolelinux.org/pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html">Parallellized boot seem to hold up well in Debian/testing</a>
12741 </div>
12742 <div class="date">
12743 27th May 2010
12744 </div>
12745 <div class="body">
12746 <p>A few days ago, parallel booting was enabled in Debian/testing.
12747 The feature seem to hold up pretty well, but three fairly serious
12748 issues are known and should be solved:
12749
12750 <p><ul>
12751
12752 <li>The wicd package seen to
12753 <a href="http://bugs.debian.org/508289">break NFS mounting</a> and
12754 <a href="http://bugs.debian.org/581586">network setup</a> when
12755 parallel booting is enabled. No idea why, but the wicd maintainer
12756 seem to be on the case.</li>
12757
12758 <li>The nvidia X driver seem to
12759 <a href="http://bugs.debian.org/583312">have a race condition</a>
12760 triggered more easily when parallel booting is in effect. The
12761 maintainer is on the case.</li>
12762
12763 <li>The sysv-rc package fail to properly enable dependency based boot
12764 sequencing (the shutdown is broken) when old file-rc users
12765 <a href="http://bugs.debian.org/575080">try to switch back</a> to
12766 sysv-rc. One way to solve it would be for file-rc to create
12767 /etc/init.d/.legacy-bootordering, and another is to try to make
12768 sysv-rc more robust. Will investigate some more and probably upload a
12769 workaround in sysv-rc to help those trying to move from file-rc to
12770 sysv-rc get a working shutdown.</li>
12771
12772 </ul></p>
12773
12774 <p>All in all not many surprising issues, and all of them seem
12775 solvable before Squeeze is released. In addition to these there are
12776 some packages with bugs in their dependencies and run level settings,
12777 which I expect will be fixed in a reasonable time span.</p>
12778
12779 <p>If you report any problems with dependencies in init.d scripts to
12780 the BTS, please usertag the report to get it to show up at
12781 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
12782 list of usertagged bugs related to this</a>.</p>
12783
12784 <p>Update: Correct bug number to file-rc issue.</p>
12785
12786 </div>
12787 <div class="tags">
12788
12789
12790 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12791
12792
12793 </div>
12794 </div>
12795 <div class="padding"></div>
12796
12797 <div class="entry">
12798 <div class="title">
12799 <a href="http://people.skolelinux.org/pere/blog/More_flexible_firmware_handling_in_debian_installer.html">More flexible firmware handling in debian-installer</a>
12800 </div>
12801 <div class="date">
12802 22nd May 2010
12803 </div>
12804 <div class="body">
12805 <p>After a long break from debian-installer development, I finally
12806 found time today to return to the project. Having to spend less time
12807 working dependency based boot in debian, as it is almost complete now,
12808 definitely helped freeing some time.</p>
12809
12810 <p>A while back, I ran into a problem while working on Debian Edu. We
12811 include some firmware packages on the Debian Edu CDs, those needed to
12812 get disk and network controllers working. Without having these
12813 firmware packages available during installation, it is impossible to
12814 install Debian Edu on the given machine, and because our target group
12815 are non-technical people, asking them to provide firmware packages on
12816 an external medium is a support pain. Initially, I expected it to be
12817 enough to include the firmware packages on the CD to get
12818 debian-installer to find and use them. This proved to be wrong.
12819 Next, I hoped it was enough to symlink the relevant firmware packages
12820 to some useful location on the CD (tried /cdrom/ and
12821 /cdrom/firmware/). This also proved to not work, and at this point I
12822 found time to look at the debian-installer code to figure out what was
12823 going to work.</p>
12824
12825 <p>The firmware loading code is in the hw-detect package, and a closer
12826 look revealed that it would only look for firmware packages outside
12827 the installation media, so the CD was never checked for firmware
12828 packages. It would only check USB sticks, floppies and other
12829 "external" media devices. Today I changed it to also look in the
12830 /cdrom/firmware/ directory on the mounted CD or DVD, which should
12831 solve the problem I ran into with Debian edu. I also changed it to
12832 look in /firmware/, to make sure the installer also find firmware
12833 provided in the initrd when booting the installer via PXE, to allow us
12834 to provide the same feature in the PXE setup included in Debian
12835 Edu.</p>
12836
12837 <p>To make sure firmware deb packages with a license questions are not
12838 activated without asking if the license is accepted, I extended
12839 hw-detect to look for preinst scripts in the firmware packages, and
12840 run these before activating the firmware during installation. The
12841 license question is asked using debconf in the preinst, so this should
12842 solve the issue for the firmware packages I have looked at so far.</p>
12843
12844 <p>If you want to discuss the details of these features, please
12845 contact us on debian-boot@lists.debian.org.</p>
12846
12847 </div>
12848 <div class="tags">
12849
12850
12851 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12852
12853
12854 </div>
12855 </div>
12856 <div class="padding"></div>
12857
12858 <div class="entry">
12859 <div class="title">
12860 <a href="http://people.skolelinux.org/pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html">Parallellized boot is now the default in Debian/unstable</a>
12861 </div>
12862 <div class="date">
12863 14th May 2010
12864 </div>
12865 <div class="body">
12866 <p>Since this evening, parallel booting is the default in
12867 Debian/unstable for machines using dependency based boot sequencing.
12868 Apparently the testing of concurrent booting has been wider than
12869 expected, if I am to believe the
12870 <a href="http://lists.debian.org/debian-devel/2010/05/msg00122.html">input
12871 on debian-devel@</a>, and I concluded a few days ago to move forward
12872 with the feature this weekend, to give us some time to detect any
12873 remaining problems before Squeeze is frozen. If serious problems are
12874 detected, it is simple to change the default back to sequential boot.
12875 The upload of the new sysvinit package also activate a new upstream
12876 version.</p>
12877
12878 More information about
12879 <a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
12880 based boot sequencing</a> is available from the Debian wiki. It is
12881 currently possible to disable parallel booting when one run into
12882 problems caused by it, by adding this line to /etc/default/rcS:</p>
12883
12884 <blockquote><pre>
12885 CONCURRENCY=none
12886 </pre></blockquote>
12887
12888 <p>If you report any problems with dependencies in init.d scripts to
12889 the BTS, please usertag the report to get it to show up at
12890 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
12891 list of usertagged bugs related to this</a>.</p>
12892
12893 </div>
12894 <div class="tags">
12895
12896
12897 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
12898
12899
12900 </div>
12901 </div>
12902 <div class="padding"></div>
12903
12904 <div class="entry">
12905 <div class="title">
12906 <a href="http://people.skolelinux.org/pere/blog/Sitesummary_tip__Listing_MAC_address_of_all_clients.html">Sitesummary tip: Listing MAC address of all clients</a>
12907 </div>
12908 <div class="date">
12909 14th May 2010
12910 </div>
12911 <div class="body">
12912 <p>In the recent Debian Edu versions, the
12913 <a href="http://wiki.debian.org/DebianEdu/HowTo/SiteSummary">sitesummary
12914 system</a> is used to keep track of the machines in the school
12915 network. Each machine will automatically report its status to the
12916 central server after boot and once per night. The network setup is
12917 also reported, and using this information it is possible to get the
12918 MAC address of all network interfaces in the machines. This is useful
12919 to update the DHCP configuration.</p>
12920
12921 <p>To give some idea how to use sitesummary, here is a one-liner to
12922 ist all MAC addresses of all machines reporting to sitesummary. Run
12923 this on the collector host:</p>
12924
12925 <blockquote><pre>
12926 perl -MSiteSummary -e 'for_all_hosts(sub { print join(" ", get_macaddresses(shift)), "\n"; });'
12927 </pre></blockquote>
12928
12929 <p>This will list all MAC addresses assosiated with all machine, one
12930 line per machine and with space between the MAC addresses.</p>
12931
12932 <p>To allow system administrators easier job at adding static DHCP
12933 addresses for hosts, it would be possible to extend this to fetch
12934 machine information from sitesummary and update the DHCP and DNS
12935 tables in LDAP using this information. Such tool is unfortunately not
12936 written yet.</p>
12937
12938 </div>
12939 <div class="tags">
12940
12941
12942 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary</a>.
12943
12944
12945 </div>
12946 </div>
12947 <div class="padding"></div>
12948
12949 <div class="entry">
12950 <div class="title">
12951 <a href="http://people.skolelinux.org/pere/blog/systemd__an_interesting_alternative_to_upstart.html">systemd, an interesting alternative to upstart</a>
12952 </div>
12953 <div class="date">
12954 13th May 2010
12955 </div>
12956 <div class="body">
12957 <p>The last few days a new boot system called
12958 <a href="http://www.freedesktop.org/wiki/Software/systemd">systemd</a>
12959 has been
12960 <a href="http://0pointer.de/blog/projects/systemd.html">introduced</a>
12961
12962 to the free software world. I have not yet had time to play around
12963 with it, but it seem to be a very interesting alternative to
12964 <a href="http://upstart.ubuntu.com/">upstart</a>, and might prove to be
12965 a good alternative for Debian when we are able to switch to an event
12966 based boot system. Tollef is
12967 <a href="http://bugs.debian.org/580814">in the process</a> of getting
12968 systemd into Debian, and I look forward to seeing how well it work. I
12969 like the fact that systemd handles init.d scripts with dependency
12970 information natively, allowing them to run in parallel where upstart
12971 at the moment do not.</p>
12972
12973 <p>Unfortunately do systemd have the same problem as upstart regarding
12974 platform support. It only work on recent Linux kernels, and also need
12975 some new kernel features enabled to function properly. This means
12976 kFreeBSD and Hurd ports of Debian will need a port or a different boot
12977 system. Not sure how that will be handled if systemd proves to be the
12978 way forward.</p>
12979
12980 <p>In the mean time, based on the
12981 <a href="http://lists.debian.org/debian-devel/2010/05/msg00122.html">input
12982 on debian-devel@</a> regarding parallel booting in Debian, I have
12983 decided to enable full parallel booting as the default in Debian as
12984 soon as possible (probably this weekend or early next week), to see if
12985 there are any remaining serious bugs in the init.d dependencies. A
12986 new version of the sysvinit package implementing this change is
12987 already in experimental. If all go well, Squeeze will be released
12988 with parallel booting enabled by default.</p>
12989
12990 </div>
12991 <div class="tags">
12992
12993
12994 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
12995
12996
12997 </div>
12998 </div>
12999 <div class="padding"></div>
13000
13001 <div class="entry">
13002 <div class="title">
13003 <a href="http://people.skolelinux.org/pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html">Parallellizing the boot in Debian Squeeze - ready for wider testing</a>
13004 </div>
13005 <div class="date">
13006 6th May 2010
13007 </div>
13008 <div class="body">
13009 <p>These days, the init.d script dependencies in Squeeze are quite
13010 complete, so complete that it is actually possible to run all the
13011 init.d scripts in parallell based on these dependencies. If you want
13012 to test your Squeeze system, make sure
13013 <a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
13014 based boot sequencing</a> is enabled, and add this line to
13015 /etc/default/rcS:</p>
13016
13017 <blockquote><pre>
13018 CONCURRENCY=makefile
13019 </pre></blockquote>
13020
13021 <p>That is it. It will cause sysv-rc to use the startpar tool to run
13022 scripts in parallel using the dependency information stored in
13023 /etc/init.d/.depend.boot, /etc/init.d/.depend.start and
13024 /etc/init.d/.depend.stop to order the scripts. Startpar is configured
13025 to try to start the kdm and gdm scripts as early as possible, and will
13026 start the facilities required by kdm or gdm as early as possible to
13027 make this happen.</p>
13028
13029 <p>Give it a try, and see if you like the result. If some services
13030 fail to start properly, it is most likely because they have incomplete
13031 init.d script dependencies in their startup script (or some of their
13032 dependent scripts have incomplete dependencies). Report bugs and get
13033 the package maintainers to fix it. :)</p>
13034
13035 <p>Running scripts in parallel could be the default in Debian when we
13036 manage to get the init.d script dependencies complete and correct. I
13037 expect we will get there in Squeeze+1, if we get manage to test and
13038 fix the remaining issues.</p>
13039
13040 <p>If you report any problems with dependencies in init.d scripts to
13041 the BTS, please usertag the report to get it to show up at
13042 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
13043 list of usertagged bugs related to this</a>.</p>
13044
13045 </div>
13046 <div class="tags">
13047
13048
13049 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
13050
13051
13052 </div>
13053 </div>
13054 <div class="padding"></div>
13055
13056 <div class="entry">
13057 <div class="title">
13058 <a href="http://people.skolelinux.org/pere/blog/Debian_has_switched_to_dependency_based_boot_sequencing.html">Debian has switched to dependency based boot sequencing</a>
13059 </div>
13060 <div class="date">
13061 27th July 2009
13062 </div>
13063 <div class="body">
13064 <p>Since this evening, with the upload of sysvinit version 2.87dsf-2,
13065 and the upload of insserv version 1.12.0-10 yesterday, Debian unstable
13066 have been migrated to using dependency based boot sequencing. This
13067 conclude work me and others have been doing for the last three days.
13068 It feels great to see this finally part of the default Debian
13069 installation. Now we just need to weed out the last few problems that
13070 are bound to show up, to get everything ready for Squeeze.</p>
13071
13072 <p>The next step is migrating /sbin/init from sysvinit to upstart, and
13073 fixing the more fundamental problem of handing the event based
13074 non-predictable kernel in the early boot.</p>
13075
13076 </div>
13077 <div class="tags">
13078
13079
13080 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
13081
13082
13083 </div>
13084 </div>
13085 <div class="padding"></div>
13086
13087 <div class="entry">
13088 <div class="title">
13089 <a href="http://people.skolelinux.org/pere/blog/Taking_over_sysvinit_development.html">Taking over sysvinit development</a>
13090 </div>
13091 <div class="date">
13092 22nd July 2009
13093 </div>
13094 <div class="body">
13095 <p>After several years of frustration with the lack of activity from
13096 the existing sysvinit upstream developer, I decided a few weeks ago to
13097 take over the package and become the new upstream. The number of
13098 patches to track for the Debian package was becoming a burden, and the
13099 lack of synchronization between the distribution made it hard to keep
13100 the package up to date.</p>
13101
13102 <p>On the new sysvinit team is the SuSe maintainer Dr. Werner Fink,
13103 and my Debian co-maintainer Kel Modderman. About 10 days ago, I made
13104 a new upstream tarball with version number 2.87dsf (for Debian, SuSe
13105 and Fedora), based on the patches currently in use in these
13106 distributions. We Debian maintainers plan to move to this tarball as
13107 the new upstream as soon as we find time to do the merge. Since the
13108 new tarball was created, we agreed with Werner at SuSe to make a new
13109 upstream project at <a href="http://savannah.nongnu.org/">Savannah</a>, and continue
13110 development there. The project is registered and currently waiting
13111 for approval by the Savannah administrators, and as soon as it is
13112 approved, we will import the old versions from svn and continue
13113 working on the future release.</p>
13114
13115 <p>It is a bit ironic that this is done now, when some of the involved
13116 distributions are moving to upstart as a syvinit replacement.</p>
13117
13118 </div>
13119 <div class="tags">
13120
13121
13122 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
13123
13124
13125 </div>
13126 </div>
13127 <div class="padding"></div>
13128
13129 <div class="entry">
13130 <div class="title">
13131 <a href="http://people.skolelinux.org/pere/blog/Debian_boots_quicker_and_quicker.html">Debian boots quicker and quicker</a>
13132 </div>
13133 <div class="date">
13134 24th June 2009
13135 </div>
13136 <div class="body">
13137 <p>I spent Monday and tuesday this week in London with a lot of the
13138 people involved in the boot system on Debian and Ubuntu, to see if we
13139 could find more ways to speed up the boot system. This was an Ubuntu
13140 funded
13141 <a href="https://wiki.ubuntu.com/FoundationsTeam/BootPerformance/DebianUbuntuSprint">developer
13142 gathering</a>. It was quite productive. We also discussed the future
13143 of boot systems, and ways to handle the increasing number of boot
13144 issues introduced by the Linux kernel becoming more and more
13145 asynchronous and event base. The Ubuntu approach using udev and
13146 upstart might be a good way forward. Time will show.</p>
13147
13148 <p>Anyway, there are a few ways at the moment to speed up the boot
13149 process in Debian. All of these should be applied to get a quick
13150 boot:</p>
13151
13152 <ul>
13153
13154 <li>Use dash as /bin/sh.</li>
13155
13156 <li>Disable the init.d/hwclock*.sh scripts and make sure the hardware
13157 clock is in UTC.</li>
13158
13159 <li>Install and activate the insserv package to enable
13160 <a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
13161 based boot sequencing</a>, and enable concurrent booting.</li>
13162
13163 </ul>
13164
13165 These points are based on the Google summer of code work done by
13166 <a href="http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/">Carlos
13167 Villegas</a>.
13168
13169 <p>Support for makefile-style concurrency during boot was uploaded to
13170 unstable yesterday. When we tested it, we were able to cut 6 seconds
13171 from the boot sequence. It depend on very correct dependency
13172 declaration in all init.d scripts, so I expect us to find edge cases
13173 where the dependences in some scripts are slightly wrong when we start
13174 using this.</p>
13175
13176 <p>On our IRC channel for this effort, #pkg-sysvinit, a new idea was
13177 introduced by Raphael Geissert today, one that could affect the
13178 startup speed as well. Instead of starting some scripts concurrently
13179 from rcS.d/ and another set of scripts from rc2.d/, it would be
13180 possible to run a of them in the same process. A quick way to test
13181 this would be to enable insserv and run 'mv /etc/rc2.d/S* /etc/rcS.d/;
13182 insserv'. Will need to test if that work. :)</p>
13183
13184 </div>
13185 <div class="tags">
13186
13187
13188 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
13189
13190
13191 </div>
13192 </div>
13193 <div class="padding"></div>
13194
13195 <div class="entry">
13196 <div class="title">
13197 <a href="http://people.skolelinux.org/pere/blog/BSAs_p_stander_om_piratkopiering_m_ter_motstand.html">BSAs påstander om piratkopiering møter motstand</a>
13198 </div>
13199 <div class="date">
13200 17th May 2009
13201 </div>
13202 <div class="body">
13203 <p>Hvert år de siste årene har BSA, lobbyfronten til de store
13204 programvareselskapene som Microsoft og Apple, publisert en rapport der
13205 de gjetter på hvor mye piratkopiering påfører i tapte inntekter i
13206 ulike land rundt om i verden. Resultatene er tendensiøse. For noen
13207 dager siden kom
13208 <a href="http://global.bsa.org/globalpiracy2008/studies/globalpiracy2008.pdf">siste
13209 rapport</a>, og det er flere kritiske kommentarer publisert de siste
13210 dagene. Et spesielt interessant kommentar fra Sverige,
13211 <a href="http://www.idg.se/2.1085/1.229795/bsa-hoftade-sverigesiffror">BSA
13212 höftade Sverigesiffror</a>, oppsummeres slik:</p>
13213
13214 <blockquote>
13215 I sin senaste rapport slår BSA fast att 25 procent av all mjukvara i
13216 Sverige är piratkopierad. Det utan att ha pratat med ett enda svenskt
13217 företag. "Man bör nog kanske inte se de här siffrorna som helt
13218 exakta", säger BSAs Sverigechef John Hugosson.
13219 </blockquote>
13220
13221 <p>Mon tro om de er like metodiske når de gjetter på andelen piratkopiering i Norge? To andre kommentarer er <a
13222 href="http://www.vnunet.com/vnunet/comment/2242134/bsa-piracy-figures-shot-reality">BSA
13223 piracy figures need a shot of reality</a> og <a
13224 href="http://www.michaelgeist.ca/content/view/3958/125/">Does The WIPO
13225 Copyright Treaty Work?</a></p>
13226
13227 <p>Fant lenkene via <a
13228 href="http://tech.slashdot.org/article.pl?sid=09/05/17/1632242">oppslag
13229 på Slashdot</a>.</p>
13230
13231 </div>
13232 <div class="tags">
13233
13234
13235 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>.
13236
13237
13238 </div>
13239 </div>
13240 <div class="padding"></div>
13241
13242 <div class="entry">
13243 <div class="title">
13244 <a href="http://people.skolelinux.org/pere/blog/IDG_mener_linux_i_servermarkedet_vil_vokse_med_21__i_2009.html">IDG mener linux i servermarkedet vil vokse med 21% i 2009</a>
13245 </div>
13246 <div class="date">
13247 7th May 2009
13248 </div>
13249 <div class="body">
13250 <p>Kom over
13251 <a href="http://news.cnet.com/8301-13505_3-10216873-16.html">interessante
13252 tall</a> fra IDG om utviklingen av linuxservermarkedet. Fikk meg til
13253 å tenke på antall tjenermaskiner ved Universitetet i Oslo der jeg
13254 jobber til daglig. En rask opptelling forteller meg at vi har 490
13255 (61%) fysiske unix-tjener (mest linux men også noen solaris) og 196
13256 (25%) windowstjenere, samt 112 (14%) virtuelle unix-tjenere. Med den
13257 bakgrunnskunnskapen kan jeg godt tro at IDG er inne på noe.</p>
13258
13259 </div>
13260 <div class="tags">
13261
13262
13263 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
13264
13265
13266 </div>
13267 </div>
13268 <div class="padding"></div>
13269
13270 <div class="entry">
13271 <div class="title">
13272 <a href="http://people.skolelinux.org/pere/blog/Kryptert_harddisk___naturligvis.html">Kryptert harddisk - naturligvis</a>
13273 </div>
13274 <div class="date">
13275 2nd May 2009
13276 </div>
13277 <div class="body">
13278 <p><a href="http://www.dagensit.no/trender/article1658676.ece">Dagens
13279 IT melder</a> at Intel hevder at det er dyrt å miste en datamaskin,
13280 når en tar tap av arbeidstid, fortrolige dokumenter,
13281 personopplysninger og alt annet det innebærer. Det er ingen tvil om
13282 at det er en kostbar affære å miste sin datamaskin, og det er årsaken
13283 til at jeg har kryptert harddisken på både kontormaskinen og min
13284 bærbare. Begge inneholder personopplysninger jeg ikke ønsker skal
13285 komme på avveie, den første informasjon relatert til jobben min ved
13286 Universitetet i Oslo, og den andre relatert til blant annet
13287 foreningsarbeide. Kryptering av diskene gjør at det er lite
13288 sannsynlig at dophoder som kan finne på å rappe maskinene får noe ut
13289 av dem. Maskinene låses automatisk etter noen minutter uten bruk,
13290 og en reboot vil gjøre at de ber om passord før de vil starte opp.
13291 Jeg bruker Debian på begge maskinene, og installasjonssystemet der
13292 gjør det trivielt å sette opp krypterte disker. Jeg har LVM på toppen
13293 av krypterte partisjoner, slik at alt av datapartisjoner er kryptert.
13294 Jeg anbefaler alle å kryptere diskene på sine bærbare. Kostnaden når
13295 det er gjort slik jeg gjør det er minimale, og gevinstene er
13296 betydelige. En bør dog passe på passordet. Hvis det går tapt, må
13297 maskinen reinstalleres og alt er tapt.</p>
13298
13299 <p>Krypteringen vil ikke stoppe kompetente angripere som f.eks. kjøler
13300 ned minnebrikkene før maskinen rebootes med programvare for å hente ut
13301 krypteringsnøklene. Kostnaden med å forsvare seg mot slike angripere
13302 er for min del høyere enn gevinsten. Jeg tror oddsene for at
13303 f.eks. etteretningsorganisasjoner har glede av å titte på mine
13304 maskiner er minimale, og ulempene jeg ville oppnå ved å forsøke å
13305 gjøre det vanskeligere for angripere med kompetanse og ressurser er
13306 betydelige.</p>
13307
13308 </div>
13309 <div class="tags">
13310
13311
13312 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet</a>.
13313
13314
13315 </div>
13316 </div>
13317 <div class="padding"></div>
13318
13319 <div class="entry">
13320 <div class="title">
13321 <a href="http://people.skolelinux.org/pere/blog/Two_projects_that_have_improved_the_quality_of_free_software_a_lot.html">Two projects that have improved the quality of free software a lot</a>
13322 </div>
13323 <div class="date">
13324 2nd May 2009
13325 </div>
13326 <div class="body">
13327 <p>There are two software projects that have had huge influence on the
13328 quality of free software, and I wanted to mention both in case someone
13329 do not yet know them.</p>
13330
13331 <p>The first one is <a href="http://valgrind.org/">valgrind</a>, a
13332 tool to detect and expose errors in the memory handling of programs.
13333 It is easy to use, all one need to do is to run 'valgrind program',
13334 and it will report any problems on stdout. It is even better if the
13335 program include debug information. With debug information, it is able
13336 to report the source file name and line number where the problem
13337 occurs. It can report things like 'reading past memory block in file
13338 X line N, the memory block was allocated in file Y, line M', and
13339 'using uninitialised value in control logic'. This tool has made it
13340 trivial to investigate reproducible crash bugs in programs, and have
13341 reduced the number of this kind of bugs in free software a lot.
13342
13343 <p>The second one is
13344 <a href="http://en.wikipedia.org/wiki/Coverity">Coverity</a> which is
13345 a source code checker. It is able to process the source of a program
13346 and find problems in the logic without running the program. It
13347 started out as the Stanford Checker and became well known when it was
13348 used to find bugs in the Linux kernel. It is now a commercial tool
13349 and the company behind it is running
13350 <a href="http://www.scan.coverity.com/">a community service</a> for the
13351 free software community, where a lot of free software projects get
13352 their source checked for free. Several thousand defects have been
13353 found and fixed so far. It can find errors like 'lock L taken in file
13354 X line N is never released if exiting in line M', or 'the code in file
13355 Y lines O to P can never be executed'. The projects included in the
13356 community service project have managed to get rid of a lot of
13357 reliability problems thanks to Coverity.</p>
13358
13359 <p>I believe tools like this, that are able to automatically find
13360 errors in the source, are vital to improve the quality of software and
13361 make sure we can get rid of the crashing and failing software we are
13362 surrounded by today.</p>
13363
13364 </div>
13365 <div class="tags">
13366
13367
13368 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
13369
13370
13371 </div>
13372 </div>
13373 <div class="padding"></div>
13374
13375 <div class="entry">
13376 <div class="title">
13377 <a href="http://people.skolelinux.org/pere/blog/No_patch_is_not_better_than_a_useless_patch.html">No patch is not better than a useless patch</a>
13378 </div>
13379 <div class="date">
13380 28th April 2009
13381 </div>
13382 <div class="body">
13383 <p>Julien Blache
13384 <a href="http://blog.technologeek.org/2009/04/12/214">claim that no
13385 patch is better than a useless patch</a>. I completely disagree, as a
13386 patch allow one to discuss a concrete and proposed solution, and also
13387 prove that the issue at hand is important enough for someone to spent
13388 time on fixing it. No patch do not provide any of these positive
13389 properties.</p>
13390
13391 </div>
13392 <div class="tags">
13393
13394
13395 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
13396
13397
13398 </div>
13399 </div>
13400 <div class="padding"></div>
13401
13402 <div class="entry">
13403 <div class="title">
13404 <a href="http://people.skolelinux.org/pere/blog/Standardize_on_protocols_and_formats__not_vendors_and_applications.html">Standardize on protocols and formats, not vendors and applications</a>
13405 </div>
13406 <div class="date">
13407 30th March 2009
13408 </div>
13409 <div class="body">
13410 <p>Where I work at the University of Oslo, one decision stand out as a
13411 very good one to form a long lived computer infrastructure. It is the
13412 simple one, lost by many in todays computer industry: Standardize on
13413 open network protocols and open exchange/storage formats, not applications.
13414 Applications come and go, while protocols and files tend to stay, and
13415 thus one want to make it easy to change application and vendor, while
13416 avoiding conversion costs and locking users to a specific platform or
13417 application.</p>
13418
13419 <p>This approach make it possible to replace the client applications
13420 independently of the server applications. One can even allow users to
13421 use several different applications as long as they handle the selected
13422 protocol and format. In the normal case, only one client application
13423 is recommended and users only get help if they choose to use this
13424 application, but those that want to deviate from the easy path are not
13425 blocked from doing so.</p>
13426
13427 <p>It also allow us to replace the server side without forcing the
13428 users to replace their applications, and thus allow us to select the
13429 best server implementation at any moment, when scale and resouce
13430 requirements change.</p>
13431
13432 <p>I strongly recommend standardizing - on open network protocols and
13433 open formats, but I would never recommend standardizing on a single
13434 application that do not use open network protocol or open formats.</p>
13435
13436 </div>
13437 <div class="tags">
13438
13439
13440 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>, <a href="http://people.skolelinux.org/pere/blog/tags/standard">standard</a>.
13441
13442
13443 </div>
13444 </div>
13445 <div class="padding"></div>
13446
13447 <div class="entry">
13448 <div class="title">
13449 <a href="http://people.skolelinux.org/pere/blog/Returning_from_Skolelinux_developer_gathering.html">Returning from Skolelinux developer gathering</a>
13450 </div>
13451 <div class="date">
13452 29th March 2009
13453 </div>
13454 <div class="body">
13455 <p>I'm sitting on the train going home from this weekends Debian
13456 Edu/Skolelinux development gathering. I got a bit done tuning the
13457 desktop, and looked into the dynamic service location protocol
13458 implementation avahi. It look like it could be useful for us. Almost
13459 30 people participated, and I believe it was a great environment to
13460 get to know the Skolelinux system. Walter Bender, involved in the
13461 development of the Sugar educational platform, presented his stuff and
13462 also helped me improve my OLPC installation. He also showed me that
13463 his Turtle Art application can be used in standalone mode, and we
13464 agreed that I would help getting it packaged for Debian. As a
13465 standalone application it would be great for Debian Edu. We also
13466 tried to get the video conferencing working with two OLPCs, but that
13467 proved to be too hard for us. The application seem to need more work
13468 before it is ready for me. I look forward to getting home and relax
13469 now. :)</p>
13470
13471 </div>
13472 <div class="tags">
13473
13474
13475 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
13476
13477
13478 </div>
13479 </div>
13480 <div class="padding"></div>
13481
13482 <div class="entry">
13483 <div class="title">
13484 <a href="http://people.skolelinux.org/pere/blog/Time_for_new__LDAP_schemas_replacing_RFC_2307_.html">Time for new LDAP schemas replacing RFC 2307?</a>
13485 </div>
13486 <div class="date">
13487 29th March 2009
13488 </div>
13489 <div class="body">
13490 <p>The state of standardized LDAP schemas on Linux is far from
13491 optimal. There is RFC 2307 documenting one way to store NIS maps in
13492 LDAP, and a modified version of this normally called RFC 2307bis, with
13493 some modifications to be compatible with Active Directory. The RFC
13494 specification handle the content of a lot of system databases, but do
13495 not handle DNS zones and DHCP configuration.</p>
13496
13497 <p>In <a href="http://www.skolelinux.org/">Debian Edu/Skolelinux</a>,
13498 we would like to store information about users, SMB clients/hosts,
13499 filegroups, netgroups (users and hosts), DHCP and DNS configuration,
13500 and LTSP configuration in LDAP. These objects have a lot in common,
13501 but with the current LDAP schemas it is not possible to have one
13502 object per entity. For example, one need to have at least three LDAP
13503 objects for a given computer, one with the SMB related stuff, one with
13504 DNS information and another with DHCP information. The schemas
13505 provided for DNS and DHCP are impossible to combine into one LDAP
13506 object. In addition, it is impossible to implement quick queries for
13507 netgroup membership, because of the way NIS triples are implemented.
13508 It just do not scale. I believe it is time for a few RFC
13509 specifications to cleam up this mess.</p>
13510
13511 <p>I would like to have one LDAP object representing each computer in
13512 the network, and this object can then keep the SMB (ie host key), DHCP
13513 (mac address/name) and DNS (name/IP address) settings in one place.
13514 It need to be efficently stored to make sure it scale well.</p>
13515
13516 <p>I would also like to have a quick way to map from a user or
13517 computer and to the net group this user or computer is a member.</p>
13518
13519 <p>Active Directory have done a better job than unix heads like myself
13520 in this regard, and the unix side need to catch up. Time to start a
13521 new IETF work group?</p>
13522
13523 </div>
13524 <div class="tags">
13525
13526
13527 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
13528
13529
13530 </div>
13531 </div>
13532 <div class="padding"></div>
13533
13534 <div class="entry">
13535 <div class="title">
13536 <a href="http://people.skolelinux.org/pere/blog/Endelig_er_Debian_Lenny_gitt_ut.html">Endelig er Debian Lenny gitt ut</a>
13537 </div>
13538 <div class="date">
13539 15th February 2009
13540 </div>
13541 <div class="body">
13542 <p>Endelig er <a href="http://www.debian.org/">Debian</a>
13543 <a href="http://www.debian.org/News/2009/20090214">Lenny</a> gitt ut.
13544 Et langt steg videre for Debian-prosjektet, og en rekke nye
13545 programpakker blir nå tilgjengelig for de av oss som bruker den
13546 stabile utgaven av Debian. Neste steg er nå å få
13547 <a href="http://www.skolelinux.org/">Skolelinux</a> /
13548 <a href="http://wiki.debian.org/DebianEdu/">Debian Edu</a> ferdig
13549 oppdatert for den nye utgaven, slik at en oppdatert versjon kan
13550 slippes løs på skolene. Takk til alle debian-utviklerne som har
13551 gjort dette mulig. Endelig er f.eks. fungerende avhengighetsstyrt
13552 bootsekvens tilgjengelig i stabil utgave, vha pakken
13553 <tt>insserv</tt>.</p>
13554
13555 </div>
13556 <div class="tags">
13557
13558
13559 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>.
13560
13561
13562 </div>
13563 </div>
13564 <div class="padding"></div>
13565
13566 <div class="entry">
13567 <div class="title">
13568 <a href="http://people.skolelinux.org/pere/blog/Devcamp_brought_us_closer_to_the_Lenny_based_Debian_Edu_release.html">Devcamp brought us closer to the Lenny based Debian Edu release</a>
13569 </div>
13570 <div class="date">
13571 7th December 2008
13572 </div>
13573 <div class="body">
13574 <p>This weekend we had a small developer gathering for Debian Edu in
13575 Oslo. Most of Saturday was used for the general assemly for the
13576 member organization, but the rest of the weekend I used to tune the
13577 LTSP installation. LTSP now work out of the box on the 10-network.
13578 Acer Aspire One proved to be a very nice thin client, with both
13579 screen, mouse and keybard in a small box. Was working on getting the
13580 diskless workstation setup configured out of the box, but did not
13581 finish it before the weekend was up.</p>
13582
13583 <p>Did not find time to look at the 4 VGA cards in one box we got from
13584 the Brazilian group, so that will have to wait for the next
13585 development gathering. Would love to have the Debian Edu installer
13586 automatically detect and configure a multiseat setup when it find one
13587 of these cards.</p>
13588
13589 </div>
13590 <div class="tags">
13591
13592
13593 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp</a>.
13594
13595
13596 </div>
13597 </div>
13598 <div class="padding"></div>
13599
13600 <div class="entry">
13601 <div class="title">
13602 <a href="http://people.skolelinux.org/pere/blog/The_sorry_state_of_multimedia_browser_plugins_in_Debian.html">The sorry state of multimedia browser plugins in Debian</a>
13603 </div>
13604 <div class="date">
13605 25th November 2008
13606 </div>
13607 <div class="body">
13608 <p>Recently I have spent some time evaluating the multimedia browser
13609 plugins available in Debian Lenny, to see which one we should use by
13610 default in Debian Edu. We need an embedded video playing plugin with
13611 control buttons to pause or stop the video, and capable of streaming
13612 all the multimedia content available on the web. The test results and
13613 notes are available on
13614 <a href="http://wiki.debian.org/DebianEdu/BrowserMultimedia">the
13615 Debian wiki</a>. I was surprised how few of the plugins are able to
13616 fill this need. My personal video player favorite, VLC, has a really
13617 bad plugin which fail on a lot of the test pages. A lot of the MIME
13618 types I would expect to work with any free software player (like
13619 video/ogg), just do not work. And simple formats like the
13620 audio/x-mplegurl format (m3u playlists), just isn't supported by the
13621 totem and vlc plugins. I hope the situation will improve soon. No
13622 wonder sites use the proprietary Adobe flash to play video.</p>
13623
13624 <p>For Lenny, we seem to end up with the mplayer plugin. It seem to
13625 be the only one fitting our needs. :/</p>
13626
13627 </div>
13628 <div class="tags">
13629
13630
13631 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia</a>, <a href="http://people.skolelinux.org/pere/blog/tags/web">web</a>.
13632
13633
13634 </div>
13635 </div>
13636 <div class="padding"></div>
13637
13638 <p style="text-align: right;"><a href="debian.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS Feed" width="36" height="14" /></a></p>
13639 <div id="sidebar">
13640
13641
13642
13643 <h2>Archive</h2>
13644 <ul>
13645
13646 <li>2019
13647 <ul>
13648
13649 <li><a href="http://people.skolelinux.org/pere/blog/archive/2019/01/">January (1)</a></li>
13650
13651 </ul></li>
13652
13653 <li>2018
13654 <ul>
13655
13656 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/01/">January (1)</a></li>
13657
13658 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/02/">February (5)</a></li>
13659
13660 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/03/">March (5)</a></li>
13661
13662 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/04/">April (3)</a></li>
13663
13664 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/06/">June (2)</a></li>
13665
13666 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/07/">July (5)</a></li>
13667
13668 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/08/">August (3)</a></li>
13669
13670 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/09/">September (3)</a></li>
13671
13672 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/10/">October (5)</a></li>
13673
13674 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/11/">November (2)</a></li>
13675
13676 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/12/">December (4)</a></li>
13677
13678 </ul></li>
13679
13680 <li>2017
13681 <ul>
13682
13683 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/01/">January (4)</a></li>
13684
13685 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/02/">February (3)</a></li>
13686
13687 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/03/">March (5)</a></li>
13688
13689 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/04/">April (2)</a></li>
13690
13691 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/06/">June (5)</a></li>
13692
13693 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/07/">July (1)</a></li>
13694
13695 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/08/">August (1)</a></li>
13696
13697 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/09/">September (3)</a></li>
13698
13699 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/10/">October (5)</a></li>
13700
13701 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/11/">November (3)</a></li>
13702
13703 <li><a href="http://people.skolelinux.org/pere/blog/archive/2017/12/">December (4)</a></li>
13704
13705 </ul></li>
13706
13707 <li>2016
13708 <ul>
13709
13710 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/01/">January (3)</a></li>
13711
13712 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/02/">February (2)</a></li>
13713
13714 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/03/">March (3)</a></li>
13715
13716 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/04/">April (8)</a></li>
13717
13718 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/05/">May (8)</a></li>
13719
13720 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/06/">June (2)</a></li>
13721
13722 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/07/">July (2)</a></li>
13723
13724 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/08/">August (5)</a></li>
13725
13726 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/09/">September (2)</a></li>
13727
13728 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/10/">October (3)</a></li>
13729
13730 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/11/">November (8)</a></li>
13731
13732 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/12/">December (5)</a></li>
13733
13734 </ul></li>
13735
13736 <li>2015
13737 <ul>
13738
13739 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/01/">January (7)</a></li>
13740
13741 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/02/">February (6)</a></li>
13742
13743 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/03/">March (1)</a></li>
13744
13745 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/04/">April (4)</a></li>
13746
13747 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/05/">May (3)</a></li>
13748
13749 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/06/">June (4)</a></li>
13750
13751 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/07/">July (6)</a></li>
13752
13753 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/08/">August (2)</a></li>
13754
13755 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/09/">September (2)</a></li>
13756
13757 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/10/">October (9)</a></li>
13758
13759 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/11/">November (6)</a></li>
13760
13761 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/12/">December (3)</a></li>
13762
13763 </ul></li>
13764
13765 <li>2014
13766 <ul>
13767
13768 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/01/">January (2)</a></li>
13769
13770 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/02/">February (3)</a></li>
13771
13772 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/03/">March (8)</a></li>
13773
13774 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/04/">April (7)</a></li>
13775
13776 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/05/">May (1)</a></li>
13777
13778 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/06/">June (2)</a></li>
13779
13780 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/07/">July (2)</a></li>
13781
13782 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/08/">August (2)</a></li>
13783
13784 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/09/">September (5)</a></li>
13785
13786 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/10/">October (6)</a></li>
13787
13788 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/11/">November (3)</a></li>
13789
13790 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/12/">December (5)</a></li>
13791
13792 </ul></li>
13793
13794 <li>2013
13795 <ul>
13796
13797 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (11)</a></li>
13798
13799 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/02/">February (9)</a></li>
13800
13801 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/03/">March (9)</a></li>
13802
13803 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/04/">April (6)</a></li>
13804
13805 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/05/">May (9)</a></li>
13806
13807 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/06/">June (10)</a></li>
13808
13809 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/07/">July (7)</a></li>
13810
13811 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/08/">August (3)</a></li>
13812
13813 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/09/">September (5)</a></li>
13814
13815 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
13816
13817 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (9)</a></li>
13818
13819 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/12/">December (3)</a></li>
13820
13821 </ul></li>
13822
13823 <li>2012
13824 <ul>
13825
13826 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
13827
13828 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
13829
13830 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
13831
13832 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
13833
13834 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
13835
13836 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
13837
13838 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
13839
13840 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
13841
13842 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
13843
13844 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
13845
13846 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
13847
13848 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
13849
13850 </ul></li>
13851
13852 <li>2011
13853 <ul>
13854
13855 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
13856
13857 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
13858
13859 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
13860
13861 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
13862
13863 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
13864
13865 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
13866
13867 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
13868
13869 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
13870
13871 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
13872
13873 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
13874
13875 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
13876
13877 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
13878
13879 </ul></li>
13880
13881 <li>2010
13882 <ul>
13883
13884 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
13885
13886 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
13887
13888 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
13889
13890 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
13891
13892 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
13893
13894 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
13895
13896 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
13897
13898 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
13899
13900 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
13901
13902 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
13903
13904 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
13905
13906 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
13907
13908 </ul></li>
13909
13910 <li>2009
13911 <ul>
13912
13913 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
13914
13915 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
13916
13917 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
13918
13919 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
13920
13921 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
13922
13923 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
13924
13925 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
13926
13927 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
13928
13929 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
13930
13931 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
13932
13933 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
13934
13935 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
13936
13937 </ul></li>
13938
13939 <li>2008
13940 <ul>
13941
13942 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
13943
13944 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
13945
13946 </ul></li>
13947
13948 </ul>
13949
13950
13951
13952 <h2>Tags</h2>
13953 <ul>
13954
13955 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (16)</a></li>
13956
13957 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
13958
13959 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
13960
13961 <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
13962
13963 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (10)</a></li>
13964
13965 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (17)</a></li>
13966
13967 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
13968
13969 <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
13970
13971 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (165)</a></li>
13972
13973 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (158)</a></li>
13974
13975 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian-handbook">debian-handbook (4)</a></li>
13976
13977 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
13978
13979 <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (17)</a></li>
13980
13981 <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (25)</a></li>
13982
13983 <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
13984
13985 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (396)</a></li>
13986
13987 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
13988
13989 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (13)</a></li>
13990
13991 <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (32)</a></li>
13992
13993 <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (9)</a></li>
13994
13995 <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (20)</a></li>
13996
13997 <li><a href="http://people.skolelinux.org/pere/blog/tags/h264">h264 (20)</a></li>
13998
13999 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (42)</a></li>
14000
14001 <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (16)</a></li>
14002
14003 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (20)</a></li>
14004
14005 <li><a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi (4)</a></li>
14006
14007 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (9)</a></li>
14008
14009 <li><a href="http://people.skolelinux.org/pere/blog/tags/lego">lego (4)</a></li>
14010
14011 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (8)</a></li>
14012
14013 <li><a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (2)</a></li>
14014
14015 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
14016
14017 <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
14018
14019 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (42)</a></li>
14020
14021 <li><a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software (11)</a></li>
14022
14023 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (300)</a></li>
14024
14025 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (191)</a></li>
14026
14027 <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (34)</a></li>
14028
14029 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
14030
14031 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (72)</a></li>
14032
14033 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (108)</a></li>
14034
14035 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (2)</a></li>
14036
14037 <li><a href="http://people.skolelinux.org/pere/blog/tags/reactos">reactos (1)</a></li>
14038
14039 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
14040
14041 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
14042
14043 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (10)</a></li>
14044
14045 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
14046
14047 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (6)</a></li>
14048
14049 <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
14050
14051 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (55)</a></li>
14052
14053 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
14054
14055 <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (5)</a></li>
14056
14057 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (58)</a></li>
14058
14059 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (6)</a></li>
14060
14061 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (12)</a></li>
14062
14063 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (55)</a></li>
14064
14065 <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (4)</a></li>
14066
14067 <li><a href="http://people.skolelinux.org/pere/blog/tags/usenix">usenix (2)</a></li>
14068
14069 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (9)</a></li>
14070
14071 <li><a href="http://people.skolelinux.org/pere/blog/tags/verkidetfri">verkidetfri (14)</a></li>
14072
14073 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (72)</a></li>
14074
14075 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
14076
14077 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (42)</a></li>
14078
14079 </ul>
14080
14081
14082 </div>
14083 <p style="text-align: right">
14084 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.6</a>
14085 </p>
14086
14087 </body>
14088 </html>