]> pere.pagekite.me Git - homepage.git/blob - blog/index.html
Generated.
[homepage.git] / blog / 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</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="http://people.skolelinux.org/pere/blog/index.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
22 <div class="entry">
23 <div class="title"><a href="http://people.skolelinux.org/pere/blog/First_Jessie_based_Debian_Edu_released__alpha0_.html">First Jessie based Debian Edu released (alpha0)</a></div>
24 <div class="date">27th October 2014</div>
25 <div class="body"><p>I am happy to report that I just sent out
26 <a href="https://lists.debian.org/debian-edu-announce/2014/10/msg00000.html">this
27 announcement</a>:</p>
28
29 <pre>
30 The Debian Edu Team is pleased to announce the release of Debian Edu
31 Jessie 8.0+edu0~alpha0
32
33 Debian Edu is a complete operating system for schools. Through its
34 various installation profiles you can install servers, workstations
35 and laptops which will work together on the school network. With
36 Debian Edu, the teachers themselves or their technical support can
37 roll out a complete multi-user multi-machine study environment within
38 hours or a few days. Debian Edu comes with hundreds of applications
39 pre-installed, but you can always add more packages from Debian.
40
41 For those who want to give Debian Edu Jessie a try, download and
42 installation instructions are available, including detailed
43 instructions in the manual[1] explaining the first steps, such as
44 setting up a network or adding users. Please note that the password
45 for the user your prompted for during installation must have a length
46 of at least 5 characters!
47
48 [1] &lt;URL: <a href="https://wiki.debian.org/DebianEdu/Documentation/Jessie">https://wiki.debian.org/DebianEdu/Documentation/Jessie</a> &gt;
49
50 Would you like to give your school's computer a longer life? Are you
51 tired of sneaker administration, running from computer to computer
52 reinstalling the operating system? Would you like to administrate all
53 the computers in your school using only a couple of hours every week?
54 Check out Debian Edu Jessie!
55
56 Skolelinux is used by at least two hundred schools all over the world,
57 mostly in Germany and Norway.
58
59 About Debian Edu and Skolelinux
60 ===============================
61
62 Debian Edu, also known as Skolelinux[2], is a Linux distribution based
63 on Debian providing an out-of-the box environment of a completely
64 configured school network. Immediately after installation a school
65 server running all services needed for a school network is set up just
66 waiting for users and machines being added via GOsa², a comfortable
67 Web-UI. A netbooting environment is prepared using PXE, so after
68 initial installation of the main server from CD or USB stick all other
69 machines can be installed via the network. The provided school server
70 provides LDAP database and Kerberos authentication service,
71 centralized home directories, DHCP server, web proxy and many other
72 services. The desktop contains more than 60 educational software
73 packages[3] and more are available from the Debian archive, and
74 schools can choose between KDE, Gnome, LXDE, Xfce and MATE desktop
75 environment.
76
77 [2] &lt;URL: <a href="http://www.skolelinux.org/">http://www.skolelinux.org/</a> &gt;
78 [3] &lt;URL: <a href="http://people.skolelinux.org/pere/blog/Educational_applications_included_in_Debian_Edu___Skolelinux__the_screenshot_collection____.html">http://people.skolelinux.org/pere/blog/Educational_applications_included_in_Debian_Edu___Skolelinux__the_screenshot_collection____.html</a> &gt;
79
80 Full release notes and manual
81 =============================
82
83 Below the download URLs there is a list of some of the new features
84 and bugfixes of Debian Edu 8.0+edu0~alpha0 Codename Jessie. The full
85 list is part of the manual. (See the feature list in the manual[4] for
86 the English version.) For some languages manual translations are
87 available, see the manual translation overview[5].
88
89 [4] &lt;URL: <a href="https://wiki.debian.org/DebianEdu/Documentation/Jessie/Features">https://wiki.debian.org/DebianEdu/Documentation/Jessie/Features</a> &gt;
90 [5] &lt;URL: <a href="http://maintainer.skolelinux.org/debian-edu-doc/">http://maintainer.skolelinux.org/debian-edu-doc/</a> &gt;
91
92 Where to get it
93 ---------------
94
95 To download the multiarch netinstall CD release (624 MiB) you can use
96
97 * <a href="ftp://ftp.skolelinux.org/skolelinux-cd/debian-edu-8.0+edu0~alpha0-CD.iso">ftp://ftp.skolelinux.org/skolelinux-cd/debian-edu-8.0+edu0~alpha0-CD.iso</a>
98 * <a href="http://ftp.skolelinux.org/skolelinux-cd/debian-edu-8.0+edu0~alpha0-CD.iso">http://ftp.skolelinux.org/skolelinux-cd/debian-edu-8.0+edu0~alpha0-CD.iso</a>
99 * rsync -avzP ftp.skolelinux.org::skolelinux-cd/debian-edu-8.0+edu0~alpha0-CD.iso .
100
101 The SHA1SUM of this image is: 361188818e036ce67280a572f757de82ebfeb095
102
103 New features for Debian Edu 8.0+edu0~alpha0 Codename Jessie released 2014-10-27
104 ===============================================================================
105
106
107 Installation changes
108 --------------------
109
110 * PXE installation now installs firmware automatically for the hardware present.
111
112 Software updates
113 ----------------
114
115 Everything which is new in Debian Jessie 8.0, eg:
116
117 * Linux kernel 3.16.x
118 * Desktop environments KDE "Plasma" 4.11.12, GNOME 3.14, Xfce 4.10,
119 LXDE 0.5.6 and MATE 1.8 (KDE "Plasma" is installed by default; to
120 choose one of the others see manual.)
121 * the browsers Iceweasel 31 ESR and Chromium 38
122 * !LibreOffice 4.3.3
123 * GOsa 2.7.4
124 * LTSP 5.5.4
125 * CUPS print system 1.7.5
126 * new boot framework: systemd
127 * Educational toolbox GCompris 14.07
128 * Music creator Rosegarden 14.02
129 * Image editor Gimp 2.8.14
130 * Virtual stargazer Stellarium 0.13.0
131 * golearn 0.9
132 * tuxpaint 0.9.22
133 * New version of debian-installer from Debian Jessie.
134 * Debian Jessie includes about 42000 packages available for
135 installation.
136 * More information about Debian Jessie 8.0 is provided in the release
137 notes[6] and the installation manual[7].
138
139 [6] &lt;URL: <a href="http://www.debian.org/releases/jessie/releasenotes">http://www.debian.org/releases/jessie/releasenotes</a> &gt;
140 [7] &lt;URL: <a href="http://www.debian.org/releases/jessie/installmanual">http://www.debian.org/releases/jessie/installmanual</a> &gt;
141
142 Fixed bugs
143 ----------
144
145 * Inserting incorrect DNS information in Gosa will no longer break
146 DNS completely, but instead stop DNS updates until the incorrect
147 information is corrected (Debian bug #710362)
148 * and many others.
149
150 Documentation and translation updates
151 -------------------------------------
152
153 * The Debian Edu Jessie Manual is fully translated to German, French,
154 Italian, Danish and Dutch. Partly translated versions exist for
155 Norwegian Bokmal and Spanish.
156
157 Other changes
158 -------------
159
160 * Due to new Squid settings, powering off or rebooting the main
161 server takes more time.
162 * To manage printers localhost:631 has to be used, currently www:631
163 doesn't work.
164
165 Regressions / known problems
166 ----------------------------
167
168 * Installing LTSP chroot fails with a bug related to eatmydata about
169 exim4-config failing to run its postinst (see Debian bug #765694
170 and Debian bug #762103).
171 * Munin collection is not properly configured on clients (Debian bug
172 #764594). The fix is available in a newer version of munin-node.
173 * PXE setup for Main Server and Thin Client Server setup does not
174 work when installing on a machine without direct Internet access.
175 Will be fixed when Debian bug #766960 is fixed in Jessie.
176
177 See the status page[8] for the complete list.
178
179 [8] &lt;URL: <a href="https://wiki.debian.org/DebianEdu/Status/Jessie">https://wiki.debian.org/DebianEdu/Status/Jessie</a> &gt;
180
181 How to report bugs
182 ------------------
183
184 &lt;URL: <a href="http://wiki.debian.org/DebianEdu/HowTo/ReportBugs">http://wiki.debian.org/DebianEdu/HowTo/ReportBugs</a> &gt;
185
186 About Debian
187 ============
188
189 The Debian Project was founded in 1993 by Ian Murdock to be a truly
190 free community project. Since then the project has grown to be one of
191 the largest and most influential open source projects. Thousands of
192 volunteers from all over the world work together to create and
193 maintain Debian software. Available in 70 languages, and supporting a
194 huge range of computer types, Debian calls itself the universal
195 operating system.
196
197 Contact Information
198 For further information, please visit the Debian web pages[9] or send
199 mail to press@debian.org.
200
201 [9] &lt;URL: <a href="http://www.debian.org/">http://www.debian.org/</a> &gt;
202 </pre>
203 </div>
204 <div class="tags">
205
206
207 Tags: <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>.
208
209
210 </div>
211 </div>
212 <div class="padding"></div>
213
214 <div class="entry">
215 <div class="title"><a href="http://people.skolelinux.org/pere/blog/I_spent_last_weekend_recording_MakerCon_Nordic.html">I spent last weekend recording MakerCon Nordic</a></div>
216 <div class="date">23rd October 2014</div>
217 <div class="body"><p>I spent last weekend at <a href="http://www.makercon.no/">Makercon
218 Nordic</a>, a great conference and workshop for makers in Norway and
219 the surrounding countries. I had volunteered on behalf of the
220 Norwegian Unix Users Group (NUUG) to video record the talks, and we
221 had a great and exhausting time recording the entire day, two days in
222 a row. There were only two of us, Hans-Petter and me, and we used the
223 regular video equipment for NUUG, with a
224 <a href="http://dvswitch.alioth.debian.org/wiki/">dvswitch</a>, a
225 camera and a VGA to DV convert box, and mixed video and slides
226 live.</p>
227
228 <p>Hans-Petter did the post-processing, consisting of uploading the
229 around 180 GiB of raw video to Youtube, and the result is
230 <a href="https://www.youtube.com/user/MakerConNordic/">now becoming
231 public</a> on the MakerConNordic account. The videos have the license
232 NUUG always use on our recordings, which is
233 <a href="http://creativecommons.org/licenses/by-sa/3.0/no/">Creative
234 Commons Navngivelse-Del på samme vilkår 3.0 Norge</a>. Many great
235 talks available. Check it out! :)</p>
236 </div>
237 <div class="tags">
238
239
240 Tags: <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/video">video</a>.
241
242
243 </div>
244 </div>
245 <div class="padding"></div>
246
247 <div class="entry">
248 <div class="title"><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></div>
249 <div class="date">22nd October 2014</div>
250 <div class="body"><p>If you ever had to moderate a mailman list, like the ones on
251 alioth.debian.org, you know the web interface is fairly slow to
252 operate. First you visit one web page, enter the moderation password
253 and get a new page shown with a list of all the messages to moderate
254 and various options for each email address. This take a while for
255 every list you moderate, and you need to do it regularly to do a good
256 job as a list moderator. But there is a quick alternative,
257 <a href="http://heim.ifi.uio.no/kjetilho/hacks/#listadmin">the
258 listadmin program</a>. It allow you to check lists for new messages
259 to moderate in a fraction of a second. Here is a test run on two
260 lists I recently took over:</p>
261
262 <p><blockquote><pre>
263 % time listadmin xiph
264 fetching data for pkg-xiph-commits@lists.alioth.debian.org ... nothing in queue
265 fetching data for pkg-xiph-maint@lists.alioth.debian.org ... nothing in queue
266
267 real 0m1.709s
268 user 0m0.232s
269 sys 0m0.012s
270 %
271 </pre></blockquote></p>
272
273 <p>In 1.7 seconds I had checked two mailing lists and confirmed that
274 there are no message in the moderation queue. Every morning I
275 currently moderate 68 mailman lists, and it normally take around two
276 minutes. When I took over the two pkg-xiph lists above a few days
277 ago, there were 400 emails waiting in the moderator queue. It took me
278 less than 15 minutes to process them all using the listadmin
279 program.</p>
280
281 <p>If you install
282 <a href="https://tracker.debian.org/pkg/listadmin">the listadmin
283 package</a> from Debian and create a file <tt>~/.listadmin.ini</tt>
284 with content like this, the moderation task is a breeze:</p>
285
286 <p><blockquote><pre>
287 username username@example.org
288 spamlevel 23
289 default discard
290 discard_if_reason "Posting restricted to members only. Remove us from your mail list."
291
292 password secret
293 adminurl https://{domain}/mailman/admindb/{list}
294 mailman-list@lists.example.com
295
296 password hidden
297 other-list@otherserver.example.org
298 </pre></blockquote></p>
299
300 <p>There are other options to set as well. Check the manual page to
301 learn the details.</p>
302
303 <p>If you are forced to moderate lists on a mailman installation where
304 the SSL certificate is self signed or not properly signed by a
305 generally accepted signing authority, you can set a environment
306 variable when calling listadmin to disable SSL verification:</p>
307
308 <p><blockquote><pre>
309 PERL_LWP_SSL_VERIFY_HOSTNAME=0 listadmin
310 </pre></blockquote></p>
311
312 <p>If you want to moderate a subset of the lists you take care of, you
313 can provide an argument to the listadmin script like I do in the
314 initial screen dump (the xiph argument). Using an argument, only
315 lists matching the argument string will be processed. This make it
316 quick to accept messages if you notice the moderation request in your
317 email.</p>
318
319 <p>Without the listadmin program, I would never be the moderator of 68
320 mailing lists, as I simply do not have time to spend on that if the
321 process was any slower. The listadmin program have saved me hours of
322 time I could spend elsewhere over the years. It truly is nice free
323 software.</p>
324
325 <p>As usual, if you use Bitcoin and want to show your support of my
326 activities, please send Bitcoin donations to my address
327 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&label=PetterReinholdtsenBlog">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
328
329 <p>Update 2014-10-27: Added missing 'username' statement in
330 configuration example. Also, I've been told that the
331 PERL_LWP_SSL_VERIFY_HOSTNAME=0 setting do not work for everyone. Not
332 sure why.</p>
333 </div>
334 <div class="tags">
335
336
337 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>.
338
339
340 </div>
341 </div>
342 <div class="padding"></div>
343
344 <div class="entry">
345 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Debian_Jessie__PXE_and_automatic_firmware_installation.html">Debian Jessie, PXE and automatic firmware installation</a></div>
346 <div class="date">17th October 2014</div>
347 <div class="body"><p>When PXE installing laptops with Debian, I often run into the
348 problem that the WiFi card require some firmware to work properly.
349 And it has been a pain to fix this using preseeding in Debian.
350 Normally something more is needed. But thanks to
351 <a href="https://packages.qa.debian.org/i/isenkram.html">my isenkram
352 package</a> and its recent tasksel extension, it has now become easy
353 to do this using simple preseeding.</p>
354
355 <p>The isenkram-cli package provide tasksel tasks which will install
356 firmware for the hardware found in the machine (actually, requested by
357 the kernel modules for the hardware). (It can also install user space
358 programs supporting the hardware detected, but that is not the focus
359 of this story.)</p>
360
361 <p>To get this working in the default installation, two preeseding
362 values are needed. First, the isenkram-cli package must be installed
363 into the target chroot (aka the hard drive) before tasksel is executed
364 in the pkgsel step of the debian-installer system. This is done by
365 preseeding the base-installer/includes debconf value to include the
366 isenkram-cli package. The package name is next passed to debootstrap
367 for installation. With the isenkram-cli package in place, tasksel
368 will automatically use the isenkram tasks to detect hardware specific
369 packages for the machine being installed and install them, because
370 isenkram-cli contain tasksel tasks.</p>
371
372 <p>Second, one need to enable the non-free APT repository, because
373 most firmware unfortunately is non-free. This is done by preseeding
374 the apt-mirror-setup step. This is unfortunate, but for a lot of
375 hardware it is the only option in Debian.</p>
376
377 <p>The end result is two lines needed in your preseeding file to get
378 firmware installed automatically by the installer:</p>
379
380 <p><blockquote><pre>
381 base-installer base-installer/includes string isenkram-cli
382 apt-mirror-setup apt-setup/non-free boolean true
383 </pre></blockquote></p>
384
385 <p>The current version of isenkram-cli in testing/jessie will install
386 both firmware and user space packages when using this method. It also
387 do not work well, so use version 0.15 or later. Installing both
388 firmware and user space packages might give you a bit more than you
389 want, so I decided to split the tasksel task in two, one for firmware
390 and one for user space programs. The firmware task is enabled by
391 default, while the one for user space programs is not. This split is
392 implemented in the package currently in unstable.</p>
393
394 <p>If you decide to give this a go, please let me know (via email) how
395 this recipe work for you. :)</p>
396
397 <p>So, I bet you are wondering, how can this work. First and
398 foremost, it work because tasksel is modular, and driven by whatever
399 files it find in /usr/lib/tasksel/ and /usr/share/tasksel/. So the
400 isenkram-cli package place two files for tasksel to find. First there
401 is the task description file (/usr/share/tasksel/descs/isenkram.desc):</p>
402
403 <p><blockquote><pre>
404 Task: isenkram-packages
405 Section: hardware
406 Description: Hardware specific packages (autodetected by isenkram)
407 Based on the detected hardware various hardware specific packages are
408 proposed.
409 Test-new-install: show show
410 Relevance: 8
411 Packages: for-current-hardware
412
413 Task: isenkram-firmware
414 Section: hardware
415 Description: Hardware specific firmware packages (autodetected by isenkram)
416 Based on the detected hardware various hardware specific firmware
417 packages are proposed.
418 Test-new-install: mark show
419 Relevance: 8
420 Packages: for-current-hardware-firmware
421 </pre></blockquote></p>
422
423 <p>The key parts are Test-new-install which indicate how the task
424 should be handled and the Packages line referencing to a script in
425 /usr/lib/tasksel/packages/. The scripts use other scripts to get a
426 list of packages to install. The for-current-hardware-firmware script
427 look like this to list relevant firmware for the machine:
428
429 <p><blockquote><pre>
430 #!/bin/sh
431 #
432 PATH=/usr/sbin:$PATH
433 export PATH
434 isenkram-autoinstall-firmware -l
435 </pre></blockquote></p>
436
437 <p>With those two pieces in place, the firmware is installed by
438 tasksel during the normal d-i run. :)</p>
439
440 <p>If you want to test what tasksel will install when isenkram-cli is
441 installed, run <tt>DEBIAN_PRIORITY=critical tasksel --test
442 --new-install</tt> to get the list of packages that tasksel would
443 install.</p>
444
445 <p><a href="https://wiki.debian.org/DebianEdu/">Debian Edu</a> will be
446 pilots in testing this feature, as isenkram is used there now to
447 install firmware, replacing the earlier scripts.</p>
448 </div>
449 <div class="tags">
450
451
452 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>.
453
454
455 </div>
456 </div>
457 <div class="padding"></div>
458
459 <div class="entry">
460 <div class="title"><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></div>
461 <div class="date"> 4th October 2014</div>
462 <div class="body"><p>Today I came across an unexpected Ubuntu boot screen. Above the
463 bread shelf on the ICA shop at Storo in Oslo, the grub menu of Ubuntu
464 with Linux kernel 3.2.0-23 (ie probably version 12.04 LTS) was stuck
465 on a screen normally showing the bread types and prizes:</p>
466
467 <p align="center"><img width="70%" src="http://people.skolelinux.org/pere/blog/images/2014-10-04-ubuntu-ica-storo-crop.jpeg"></p>
468
469 <p>If it had booted as it was supposed to, I would never had known
470 about this hidden Linux installation. It is interesting what
471 <a href="http://revealingerrors.com/">errors can reveal</a>.</p>
472 </div>
473 <div class="tags">
474
475
476 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>.
477
478
479 </div>
480 </div>
481 <div class="padding"></div>
482
483 <div class="entry">
484 <div class="title"><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></div>
485 <div class="date"> 4th October 2014</div>
486 <div class="body"><p>The <a href="https://sourceforge.net/p/lsdvd/">lsdvd project</a>
487 got a new set of developers a few weeks ago, after the original
488 developer decided to step down and pass the project to fresh blood.
489 This project is now maintained by Petter Reinholdtsen and Steve
490 Dibb.</p>
491
492 <p>I just wrapped up
493 <a href="https://sourceforge.net/p/lsdvd/mailman/message/32896061/">a
494 new lsdvd release</a>, available in git or from
495 <a href="https://sourceforge.net/projects/lsdvd/files/lsdvd/">the
496 download page</a>. This is the changelog dated 2014-10-03 for version
497 0.17.</p>
498
499 <ul>
500
501 <li>Ignore 'phantom' audio, subtitle tracks</li>
502 <li>Check for garbage in the program chains, which indicate that a track is
503 non-existant, to work around additional copy protection</li>
504 <li>Fix displaying content type for audio tracks, subtitles</li>
505 <li>Fix pallete display of first entry</li>
506 <li>Fix include orders</li>
507 <li>Ignore read errors in titles that would not be displayed anyway</li>
508 <li>Fix the chapter count</li>
509 <li>Make sure the array size and the array limit used when initialising
510 the palette size is the same.</li>
511 <li>Fix array printing.</li>
512 <li>Correct subsecond calculations.</li>
513 <li>Add sector information to the output format.</li>
514 <li>Clean up code to be closer to ANSI C and compile without warnings
515 with more GCC compiler warnings.</li>
516
517 </ul>
518
519 <p>This change bring together patches for lsdvd in use in various
520 Linux and Unix distributions, as well as patches submitted to the
521 project the last nine years. Please check it out. :)</p>
522 </div>
523 <div class="tags">
524
525
526 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>.
527
528
529 </div>
530 </div>
531 <div class="padding"></div>
532
533 <div class="entry">
534 <div class="title"><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></div>
535 <div class="date">26th September 2014</div>
536 <div class="body"><p>The <a href="http://www.skolelinux.org/">Debian Edu / Skolelinux
537 project</a> provide a Linux solution for schools, including a
538 powerful desktop with education software, a central server providing
539 web pages, user database, user home directories, central login and PXE
540 boot of both clients without disk and the installation to install Debian
541 Edu on machines with disk (and a few other services perhaps to small
542 to mention here). We in the Debian Edu team are currently working on
543 the Jessie based version, trying to get everything in shape before the
544 freeze, to avoid having to maintain our own package repository in the
545 future. The
546 <a href="https://wiki.debian.org/DebianEdu/Status/Jessie">current
547 status</a> can be seen on the Debian wiki, and there is still heaps of
548 work left. Some fatal problems block testing, breaking the installer,
549 but it is possible to work around these to get anyway. Here is a
550 recipe on how to get the installation limping along.</p>
551
552 <p>First, download the test ISO via
553 <a href="ftp://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso">ftp</a>,
554 <a href="http://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso">http</a>
555 or rsync (use
556 ftp.skolelinux.org::cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso).
557 The ISO build was broken on Tuesday, so we do not get a new ISO every
558 12 hours or so, but thankfully the ISO we already got we are able to
559 install with some tweaking.</p>
560
561 <p>When you get to the Debian Edu profile question, go to tty2
562 (use Alt-Ctrl-F2), run</p>
563
564 <p><blockquote><pre>
565 nano /usr/bin/edu-eatmydata-install
566 </pre></blockquote></p>
567
568 <p>and add 'exit 0' as the second line, disabling the eatmydata
569 optimization. Return to the installation, select the profile you want
570 and continue. Without this change, exim4-config will fail to install
571 due to a known bug in eatmydata.</p>
572
573 <p>When you get the grub question at the end, answer /dev/sda (or if
574 this do not work, figure out what your correct value would be. All my
575 test machines need /dev/sda, so I have no advice if it do not fit
576 your need.</p>
577
578 <p>If you installed a profile including a graphical desktop, log in as
579 root after the initial boot from hard drive, and install the
580 education-desktop-XXX metapackage. XXX can be kde, gnome, lxde, xfce
581 or mate. If you want several desktop options, install more than one
582 metapackage. Once this is done, reboot and you should have a working
583 graphical login screen. This workaround should no longer be needed
584 once the education-tasks package version 1.801 enter testing in two
585 days.</p>
586
587 <p>I believe the ISO build will start working on two days when the new
588 tasksel package enter testing and Steve McIntyre get a chance to
589 update the debian-cd git repository. The eatmydata, grub and desktop
590 issues are already fixed in unstable and testing, and should show up
591 on the ISO as soon as the ISO build start working again. Well the
592 eatmydata optimization is really just disabled. The proper fix
593 require an upload by the eatmydata maintainer applying the patch
594 provided in bug <a href="https://bugs.debian.org/702711">#702711</a>.
595 The rest have proper fixes in unstable.</p>
596
597 <p>I hope this get you going with the installation testing, as we are
598 quickly running out of time trying to get our Jessie based
599 installation ready before the distribution freeze in a month.</p>
600 </div>
601 <div class="tags">
602
603
604 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>.
605
606
607 </div>
608 </div>
609 <div class="padding"></div>
610
611 <div class="entry">
612 <div class="title"><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></div>
613 <div class="date">25th September 2014</div>
614 <div class="body"><p>I use the <a href="https://sourceforge.net/p/lsdvd/">lsdvd tool</a>
615 to handle my fairly large DVD collection. It is a nice command line
616 tool to get details about a DVD, like title, tracks, track length,
617 etc, in XML, Perl or human readable format. But lsdvd have not seen
618 any new development since 2006 and had a few irritating bugs affecting
619 its use with some DVDs. Upstream seemed to be dead, and in January I
620 sent a small probe asking for a version control repository for the
621 project, without any reply. But I use it regularly and would like to
622 get <a href="https://packages.qa.debian.org/lsdvd">an updated version
623 into Debian</a>. So two weeks ago I tried harder to get in touch with
624 the project admin, and after getting a reply from him explaining that
625 he was no longer interested in the project, I asked if I could take
626 over. And yesterday, I became project admin.</p>
627
628 <p>I've been in touch with a Gentoo developer and the Debian
629 maintainer interested in joining forces to maintain the upstream
630 project, and I hope we can get a new release out fairly quickly,
631 collecting the patches spread around on the internet into on place.
632 I've added the relevant Debian patches to the freshly created git
633 repository, and expect the Gentoo patches to make it too. If you got
634 a DVD collection and care about command line tools, check out
635 <a href="https://sourceforge.net/p/lsdvd/git/ci/master/tree/">the git source</a> and join
636 <a href="https://sourceforge.net/p/lsdvd/mailman/">the project mailing
637 list</a>. :)</p>
638 </div>
639 <div class="tags">
640
641
642 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>.
643
644
645 </div>
646 </div>
647 <div class="padding"></div>
648
649 <div class="entry">
650 <div class="title"><a href="http://people.skolelinux.org/pere/blog/Hva_henger_under_skibrua_over_E16_p__Sollih_gda_.html">Hva henger under skibrua over E16 på Sollihøgda?</a></div>
651 <div class="date">21st September 2014</div>
652 <div class="body"><p>Rundt omkring i Oslo og Østlandsområdet henger det bokser over
653 veiene som jeg har lurt på hva gjør. De har ut fra plassering og
654 vinkling sett ut som bokser som sniffer ut et eller annet fra
655 forbipasserende trafikk, men det har vært uklart for meg hva det er de
656 leser av. Her om dagen tok jeg bilde av en slik boks som henger under
657 <a href="http://www.openstreetmap.no/?zoom=19&mlat=59.96396&mlon=10.34443&layers=B00000">ei
658 skibru på Sollihøgda</a>:</p>
659
660 <p align="center"><img width="60%" src="http://people.skolelinux.org/pere/blog/images/2014-09-13-kapsch-sollihogda-crop.jpeg"></p>
661
662 <p>Boksen er tydelig merket «Kapsch >>>», logoen til
663 <a href="http://www.kapsch.net/">det sveitsiske selskapet Kapsch</a> som
664 blant annet lager sensorsystemer for veitrafikk. Men de lager mye
665 forskjellig, og jeg kjente ikke igjen boksen på utseendet etter en
666 kjapp titt på produktlista til selskapet.</p>
667
668 <p>I og med at boksen henger over veien E16, en riksvei vedlikeholdt
669 av Statens Vegvesen, så antok jeg at det burde være mulig å bruke
670 REST-API-et som gir tilgang til vegvesenets database over veier,
671 skilter og annet veirelatert til å finne ut hva i alle dager dette
672 kunne være. De har både
673 <a href="https://www.vegvesen.no/nvdb/api/dokumentasjon/datakatalog">en
674 datakatalog</a> og
675 <a href="https://www.vegvesen.no/nvdb/api/dokumentasjon/sok">et
676 søk</a>, der en kan søke etter ulike typer oppføringer innen for et
677 gitt geografisk område. Jeg laget et enkelt shell-script for å hente
678 ut antall av en gitt type innenfor området skibrua dekker, og listet
679 opp navnet på typene som ble funnet. Orket ikke slå opp hvordan
680 URL-koding av aktuelle strenger kunne gjøres mer generisk, og brukte
681 en stygg sed-linje i stedet.</p>
682
683 <blockquote><pre>
684 #!/bin/sh
685 urlmap() {
686 sed \
687 -e 's/ / /g' -e 's/{/%7B/g' \
688 -e 's/}/%7D/g' -e 's/\[/%5B/g' \
689 -e 's/\]/%5D/g' -e 's/ /%20/g' \
690 -e 's/,/%2C/g' -e 's/\"/%22/g' \
691 -e 's/:/%3A/g'
692 }
693
694 lookup() {
695 url="$1"
696 curl -s -H 'Accept: application/vnd.vegvesen.nvdb-v1+xml' \
697 "https://www.vegvesen.no/nvdb/api$url" | xmllint --format -
698 }
699
700 for id in $(seq 1 874) ; do
701 search="{
702 lokasjon: {
703 bbox: \"10.34425,59.96386,10.34458,59.96409\",
704 srid: \"WGS84\"
705 },
706 objektTyper: [{
707 id: $id, antall: 10
708 }]
709 }"
710
711 query=/sok?kriterie=$(echo $search | urlmap)
712 if lookup "$query" |
713 grep -q '&lt;totaltAntallReturnert>0&lt;'
714 then
715 :
716 else
717 echo $id
718 lookup "/datakatalog/objekttyper/$id" |grep '^ &lt;navn>'
719 fi
720 done
721
722 exit 0
723 </pre></blockquote>
724
725 Aktuelt ID-område 1-874 var riktig i datakatalogen da jeg laget
726 scriptet. Det vil endre seg over tid. Skriptet listet så opp
727 aktuelle typer i og rundt skibrua:
728
729 <blockquote><pre>
730 5
731 &lt;navn>Rekkverk&lt;/navn>
732 14
733 &lt;navn>Rekkverksende&lt;/navn>
734 47
735 &lt;navn>Trafikklomme&lt;/navn>
736 49
737 &lt;navn>Trafikkøy&lt;/navn>
738 60
739 &lt;navn>Bru&lt;/navn>
740 79
741 &lt;navn>Stikkrenne/Kulvert&lt;/navn>
742 80
743 &lt;navn>Grøft, åpen&lt;/navn>
744 86
745 &lt;navn>Belysningsstrekning&lt;/navn>
746 95
747 &lt;navn>Skiltpunkt&lt;/navn>
748 96
749 &lt;navn>Skiltplate&lt;/navn>
750 98
751 &lt;navn>Referansestolpe&lt;/navn>
752 99
753 &lt;navn>Vegoppmerking, langsgående&lt;/navn>
754 105
755 &lt;navn>Fartsgrense&lt;/navn>
756 106
757 &lt;navn>Vinterdriftsstrategi&lt;/navn>
758 172
759 &lt;navn>Trafikkdeler&lt;/navn>
760 241
761 &lt;navn>Vegdekke&lt;/navn>
762 293
763 &lt;navn>Breddemåling&lt;/navn>
764 301
765 &lt;navn>Kantklippareal&lt;/navn>
766 318
767 &lt;navn>Snø-/isrydding&lt;/navn>
768 445
769 &lt;navn>Skred&lt;/navn>
770 446
771 &lt;navn>Dokumentasjon&lt;/navn>
772 452
773 &lt;navn>Undergang&lt;/navn>
774 528
775 &lt;navn>Tverrprofil&lt;/navn>
776 532
777 &lt;navn>Vegreferanse&lt;/navn>
778 534
779 &lt;navn>Region&lt;/navn>
780 535
781 &lt;navn>Fylke&lt;/navn>
782 536
783 &lt;navn>Kommune&lt;/navn>
784 538
785 &lt;navn>Gate&lt;/navn>
786 539
787 &lt;navn>Transportlenke&lt;/navn>
788 540
789 &lt;navn>Trafikkmengde&lt;/navn>
790 570
791 &lt;navn>Trafikkulykke&lt;/navn>
792 571
793 &lt;navn>Ulykkesinvolvert enhet&lt;/navn>
794 572
795 &lt;navn>Ulykkesinvolvert person&lt;/navn>
796 579
797 &lt;navn>Politidistrikt&lt;/navn>
798 583
799 &lt;navn>Vegbredde&lt;/navn>
800 591
801 &lt;navn>Høydebegrensning&lt;/navn>
802 592
803 &lt;navn>Nedbøyningsmåling&lt;/navn>
804 597
805 &lt;navn>Støy-luft, Strekningsdata&lt;/navn>
806 601
807 &lt;navn>Oppgravingsdata&lt;/navn>
808 602
809 &lt;navn>Oppgravingslag&lt;/navn>
810 603
811 &lt;navn>PMS-parsell&lt;/navn>
812 604
813 &lt;navn>Vegnormalstrekning&lt;/navn>
814 605
815 &lt;navn>Værrelatert strekning&lt;/navn>
816 616
817 &lt;navn>Feltstrekning&lt;/navn>
818 617
819 &lt;navn>Adressepunkt&lt;/navn>
820 626
821 &lt;navn>Friksjonsmåleserie&lt;/navn>
822 629
823 &lt;navn>Vegdekke, flatelapping&lt;/navn>
824 639
825 &lt;navn>Kurvatur, horisontalelement&lt;/navn>
826 640
827 &lt;navn>Kurvatur, vertikalelement&lt;/navn>
828 642
829 &lt;navn>Kurvatur, vertikalpunkt&lt;/navn>
830 643
831 &lt;navn>Statistikk, trafikkmengde&lt;/navn>
832 647
833 &lt;navn>Statistikk, vegbredde&lt;/navn>
834 774
835 &lt;navn>Nedbøyningsmåleserie&lt;/navn>
836 775
837 &lt;navn>ATK, influensstrekning&lt;/navn>
838 794
839 &lt;navn>Systemobjekt&lt;/navn>
840 810
841 &lt;navn>Vinterdriftsklasse&lt;/navn>
842 821
843 &lt;navn>Funksjonell vegklasse&lt;/navn>
844 825
845 &lt;navn>Kurvatur, stigning&lt;/navn>
846 838
847 &lt;navn>Vegbredde, beregnet&lt;/navn>
848 862
849 &lt;navn>Reisetidsregistreringspunkt&lt;/navn>
850 871
851 &lt;navn>Bruksklasse&lt;/navn>
852 </pre></blockquote>
853
854 <p>Av disse ser ID 775 og 862 mest relevant ut. ID 775 antar jeg
855 refererer til fotoboksen som står like ved brua, mens
856 «Reisetidsregistreringspunkt» kanskje kan være boksen som henger der.
857 Hvordan finner jeg så ut hva dette kan være for noe. En titt på
858 <a href="http://labs.vegdata.no/nvdb-datakatalog/862-Reisetidsregistreringspunkt/">datakatalogsiden
859 for ID 862/Reisetidsregistreringspunkt</a> viser at det er finnes 53
860 slike målere i Norge, og hvor de er plassert, men gir ellers få
861 detaljer. Det er plassert 40 på østlandet og 13 i Trondheimsregionen.
862 Men siden nevner «AutoPASS», og hvis en slår opp oppføringen på
863 Sollihøgda nevner den «Ciber AS» som ID for eksternt system. (Kan det
864 være snakk om
865 <a href="http://www.proff.no/selskap/ciber-norge-as/oslo/internettdesign-og-programmering/Z0I3KMF4/">Ciber
866 Norge AS</a>, et selskap eid av Ciber Europe Bv?) Et nettsøk på
867 «Ciber AS autopass» fører meg til en artikkel fra NRK Trøndelag i
868 2013 med tittel
869 «<a href="http://www.nrk.no/trondelag/sjekk-dette-hvis-du-vil-unnga-ko-1.11327947">Sjekk
870 dette hvis du vil unngå kø</a>». Artikkelen henviser til vegvesenets
871 nettside
872 <a href="http://www.reisetider.no/reisetid/forside.html">reisetider.no</a>
873 som har en
874 <a href="http://www.reisetider.no/reisetid/omrade.html?omrade=5">kartside
875 for Østlandet</a> som viser at det måles mellom Sandvika og Sollihøgda.
876 Det kan dermed se ut til at jeg har funnet ut hva boksene gjør.</p>
877
878 <p>Hvis det stemmer, så er dette bokser som leser av AutoPASS-ID-en
879 til alle passerende biler med AutoPASS-brikke, og dermed gjør det mulig
880 for de som kontrollerer boksene å holde rede på hvor en gitt bil er
881 når den passerte et slikt målepunkt. NRK-artikkelen forteller at
882 denne informasjonen i dag kun brukes til å koble to
883 AutoPASS-brikkepasseringer passeringer sammen for å beregne
884 reisetiden, og at bruken er godkjent av Datatilsynet. Det er desverre
885 ikke mulig for en sjåfør som passerer under en slik boks å kontrollere
886 at AutoPASS-ID-en kun brukes til dette i dag og i fremtiden.</p>
887
888 <p>I tillegg til denne type AutoPASS-sniffere vet jeg at det også
889 finnes mange automatiske stasjoner som tar betalt pr. passering (aka
890 bomstasjoner), og der lagres informasjon om tid, sted og bilnummer i
891 10 år. Finnes det andre slike sniffere plassert ut på veiene?</p>
892
893 <p>Personlig har jeg valgt å ikke bruke AutoPASS-brikke, for å gjøre
894 det vanskeligere og mer kostbart for de som vil invadere privatsfæren
895 og holde rede på hvor bilen min beveger seg til enhver tid. Jeg håper
896 flere vil gjøre det samme, selv om det gir litt høyere private
897 utgifter (dyrere bompassering). Vern om privatsfæren koster i disse
898 dager.</p>
899
900 <p>Takk til Jan Kristian Jensen i Statens Vegvesen for tips om
901 dokumentasjon på vegvesenets REST-API.</p>
902 </div>
903 <div class="tags">
904
905
906 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/kart">kart</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk</a>, <a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern</a>, <a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid</a>, <a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance</a>.
907
908
909 </div>
910 </div>
911 <div class="padding"></div>
912
913 <div class="entry">
914 <div class="title"><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></div>
915 <div class="date">16th September 2014</div>
916 <div class="body"><p>The <a href="https://www.debian.org/">Debian</a> installer could be
917 a lot quicker. When we install more than 2000 packages in
918 <a href="http://www.skolelinux.org/">Skolelinux / Debian Edu</a> using
919 tasksel in the installer, unpacking the binary packages take forever.
920 A part of the slow I/O issue was discussed in
921 <a href="https://bugs.debian.org/613428">bug #613428</a> about too
922 much file system sync-ing done by dpkg, which is the package
923 responsible for unpacking the binary packages. Other parts (like code
924 executed by postinst scripts) might also sync to disk during
925 installation. All this sync-ing to disk do not really make sense to
926 me. If the machine crash half-way through, I start over, I do not try
927 to salvage the half installed system. So the failure sync-ing is
928 supposed to protect against, hardware or system crash, is not really
929 relevant while the installer is running.</p>
930
931 <p>A few days ago, I thought of a way to get rid of all the file
932 system sync()-ing in a fairly non-intrusive way, without the need to
933 change the code in several packages. The idea is not new, but I have
934 not heard anyone propose the approach using dpkg-divert before. It
935 depend on the small and clever package
936 <a href="https://packages.qa.debian.org/eatmydata">eatmydata</a>, which
937 uses LD_PRELOAD to replace the system functions for syncing data to
938 disk with functions doing nothing, thus allowing programs to live
939 dangerous while speeding up disk I/O significantly. Instead of
940 modifying the implementation of dpkg, apt and tasksel (which are the
941 packages responsible for selecting, fetching and installing packages),
942 it occurred to me that we could just divert the programs away, replace
943 them with a simple shell wrapper calling
944 "eatmydata&nbsp;$program&nbsp;$@", to get the same effect.
945 Two days ago I decided to test the idea, and wrapped up a simple
946 implementation for the Debian Edu udeb.</p>
947
948 <p>The effect was stunning. In my first test it reduced the running
949 time of the pkgsel step (installing tasks) from 64 to less than 44
950 minutes (20 minutes shaved off the installation) on an old Dell
951 Latitude D505 machine. I am not quite sure what the optimised time
952 would have been, as I messed up the testing a bit, causing the debconf
953 priority to get low enough for two questions to pop up during
954 installation. As soon as I saw the questions I moved the installation
955 along, but do not know how long the question were holding up the
956 installation. I did some more measurements using Debian Edu Jessie,
957 and got these results. The time measured is the time stamp in
958 /var/log/syslog between the "pkgsel: starting tasksel" and the
959 "pkgsel: finishing up" lines, if you want to do the same measurement
960 yourself. In Debian Edu, the tasksel dialog do not show up, and the
961 timing thus do not depend on how quickly the user handle the tasksel
962 dialog.</p>
963
964 <p><table>
965
966 <tr>
967 <th>Machine/setup</th>
968 <th>Original tasksel</th>
969 <th>Optimised tasksel</th>
970 <th>Reduction</th>
971 </tr>
972
973 <tr>
974 <td>Latitude D505 Main+LTSP LXDE</td>
975 <td>64 min (07:46-08:50)</td>
976 <td><44 min (11:27-12:11)</td>
977 <td>>20 min 18%</td>
978 </tr>
979
980 <tr>
981 <td>Latitude D505 Roaming LXDE</td>
982 <td>57 min (08:48-09:45)</td>
983 <td>34 min (07:43-08:17)</td>
984 <td>23 min 40%</td>
985 </tr>
986
987 <tr>
988 <td>Latitude D505 Minimal</td>
989 <td>22 min (10:37-10:59)</td>
990 <td>11 min (11:16-11:27)</td>
991 <td>11 min 50%</td>
992 </tr>
993
994 <tr>
995 <td>Thinkpad X200 Minimal</td>
996 <td>6 min (08:19-08:25)</td>
997 <td>4 min (08:04-08:08)</td>
998 <td>2 min 33%</td>
999 </tr>
1000
1001 <tr>
1002 <td>Thinkpad X200 Roaming KDE</td>
1003 <td>19 min (09:21-09:40)</td>
1004 <td>15 min (10:25-10:40)</td>
1005 <td>4 min 21%</td>
1006 </tr>
1007
1008 </table></p>
1009
1010 <p>The test is done using a netinst ISO on a USB stick, so some of the
1011 time is spent downloading packages. The connection to the Internet
1012 was 100Mbit/s during testing, so downloading should not be a
1013 significant factor in the measurement. Download typically took a few
1014 seconds to a few minutes, depending on the amount of packages being
1015 installed.</p>
1016
1017 <p>The speedup is implemented by using two hooks in
1018 <a href="https://www.debian.org/devel/debian-installer/">Debian
1019 Installer</a>, the pre-pkgsel.d hook to set up the diverts, and the
1020 finish-install.d hook to remove the divert at the end of the
1021 installation. I picked the pre-pkgsel.d hook instead of the
1022 post-base-installer.d hook because I test using an ISO without the
1023 eatmydata package included, and the post-base-installer.d hook in
1024 Debian Edu can only operate on packages included in the ISO. The
1025 negative effect of this is that I am unable to activate this
1026 optimization for the kernel installation step in d-i. If the code is
1027 moved to the post-base-installer.d hook, the speedup would be larger
1028 for the entire installation.</p>
1029
1030 <p>I've implemented this in the
1031 <a href="https://packages.qa.debian.org/debian-edu-install">debian-edu-install</a>
1032 git repository, and plan to provide the optimization as part of the
1033 Debian Edu installation. If you want to test this yourself, you can
1034 create two files in the installer (or in an udeb). One shell script
1035 need do go into /usr/lib/pre-pkgsel.d/, with content like this:</p>
1036
1037 <p><blockquote><pre>
1038 #!/bin/sh
1039 set -e
1040 . /usr/share/debconf/confmodule
1041 info() {
1042 logger -t my-pkgsel "info: $*"
1043 }
1044 error() {
1045 logger -t my-pkgsel "error: $*"
1046 }
1047 override_install() {
1048 apt-install eatmydata || true
1049 if [ -x /target/usr/bin/eatmydata ] ; then
1050 for bin in dpkg apt-get aptitude tasksel ; do
1051 file=/usr/bin/$bin
1052 # Test that the file exist and have not been diverted already.
1053 if [ -f /target$file ] ; then
1054 info "diverting $file using eatmydata"
1055 printf "#!/bin/sh\neatmydata $bin.distrib \"\$@\"\n" \
1056 > /target$file.edu
1057 chmod 755 /target$file.edu
1058 in-target dpkg-divert --package debian-edu-config \
1059 --rename --quiet --add $file
1060 ln -sf ./$bin.edu /target$file
1061 else
1062 error "unable to divert $file, as it is missing."
1063 fi
1064 done
1065 else
1066 error "unable to find /usr/bin/eatmydata after installing the eatmydata pacage"
1067 fi
1068 }
1069
1070 override_install
1071 </pre></blockquote></p>
1072
1073 <p>To clean up, another shell script should go into
1074 /usr/lib/finish-install.d/ with code like this:
1075
1076 <p><blockquote><pre>
1077 #! /bin/sh -e
1078 . /usr/share/debconf/confmodule
1079 error() {
1080 logger -t my-finish-install "error: $@"
1081 }
1082 remove_install_override() {
1083 for bin in dpkg apt-get aptitude tasksel ; do
1084 file=/usr/bin/$bin
1085 if [ -x /target$file.edu ] ; then
1086 rm /target$file
1087 in-target dpkg-divert --package debian-edu-config \
1088 --rename --quiet --remove $file
1089 rm /target$file.edu
1090 else
1091 error "Missing divert for $file."
1092 fi
1093 done
1094 sync # Flush file buffers before continuing
1095 }
1096
1097 remove_install_override
1098 </pre></blockquote></p>
1099
1100 <p>In Debian Edu, I placed both code fragments in a separate script
1101 edu-eatmydata-install and call it from the pre-pkgsel.d and
1102 finish-install.d scripts.</p>
1103
1104 <p>By now you might ask if this change should get into the normal
1105 Debian installer too? I suspect it should, but am not sure the
1106 current debian-installer coordinators find it useful enough. It also
1107 depend on the side effects of the change. I'm not aware of any, but I
1108 guess we will see if the change is safe after some more testing.
1109 Perhaps there is some package in Debian depending on sync() and
1110 fsync() having effect? Perhaps it should go into its own udeb, to
1111 allow those of us wanting to enable it to do so without affecting
1112 everyone.</p>
1113
1114 <p>Update 2014-09-24: Since a few days ago, enabling this optimization
1115 will break installation of all programs using gnutls because of
1116 <a href="https://bugs.debian.org/702711">bug #702711</a>. An updated
1117 eatmydata package in Debian will solve it.</p>
1118
1119 <p>Update 2014-10-17: The bug mentioned above is fixed in testing and
1120 the optimization work again. And I have discovered that the
1121 dpkg-divert trick is not really needed and implemented a slightly
1122 simpler approach as part of the debian-edu-install package. See
1123 tools/edu-eatmydata-install in the source package.</p>
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/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>.
1129
1130
1131 </div>
1132 </div>
1133 <div class="padding"></div>
1134
1135 <p style="text-align: right;"><a href="index.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS feed" width="36" height="14" /></a></p>
1136 <div id="sidebar">
1137
1138
1139
1140 <h2>Archive</h2>
1141 <ul>
1142
1143 <li>2014
1144 <ul>
1145
1146 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/01/">January (2)</a></li>
1147
1148 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/02/">February (3)</a></li>
1149
1150 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/03/">March (8)</a></li>
1151
1152 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/04/">April (7)</a></li>
1153
1154 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/05/">May (1)</a></li>
1155
1156 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/06/">June (2)</a></li>
1157
1158 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/07/">July (2)</a></li>
1159
1160 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/08/">August (2)</a></li>
1161
1162 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/09/">September (5)</a></li>
1163
1164 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/10/">October (6)</a></li>
1165
1166 </ul></li>
1167
1168 <li>2013
1169 <ul>
1170
1171 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (11)</a></li>
1172
1173 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/02/">February (9)</a></li>
1174
1175 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/03/">March (9)</a></li>
1176
1177 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/04/">April (6)</a></li>
1178
1179 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/05/">May (9)</a></li>
1180
1181 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/06/">June (10)</a></li>
1182
1183 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/07/">July (7)</a></li>
1184
1185 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/08/">August (3)</a></li>
1186
1187 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/09/">September (5)</a></li>
1188
1189 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
1190
1191 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (9)</a></li>
1192
1193 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/12/">December (3)</a></li>
1194
1195 </ul></li>
1196
1197 <li>2012
1198 <ul>
1199
1200 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
1201
1202 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
1203
1204 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
1205
1206 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
1207
1208 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
1209
1210 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
1211
1212 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
1213
1214 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
1215
1216 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
1217
1218 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
1219
1220 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
1221
1222 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
1223
1224 </ul></li>
1225
1226 <li>2011
1227 <ul>
1228
1229 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
1230
1231 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
1232
1233 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
1234
1235 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
1236
1237 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
1238
1239 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
1240
1241 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
1242
1243 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
1244
1245 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
1246
1247 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
1248
1249 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
1250
1251 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
1252
1253 </ul></li>
1254
1255 <li>2010
1256 <ul>
1257
1258 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
1259
1260 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
1261
1262 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
1263
1264 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
1265
1266 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
1267
1268 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
1269
1270 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
1271
1272 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
1273
1274 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
1275
1276 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
1277
1278 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
1279
1280 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
1281
1282 </ul></li>
1283
1284 <li>2009
1285 <ul>
1286
1287 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
1288
1289 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
1290
1291 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
1292
1293 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
1294
1295 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
1296
1297 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
1298
1299 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
1300
1301 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
1302
1303 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
1304
1305 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
1306
1307 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
1308
1309 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
1310
1311 </ul></li>
1312
1313 <li>2008
1314 <ul>
1315
1316 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
1317
1318 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
1319
1320 </ul></li>
1321
1322 </ul>
1323
1324
1325
1326 <h2>Tags</h2>
1327 <ul>
1328
1329 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (13)</a></li>
1330
1331 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
1332
1333 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
1334
1335 <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
1336
1337 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (8)</a></li>
1338
1339 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (14)</a></li>
1340
1341 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
1342
1343 <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
1344
1345 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (107)</a></li>
1346
1347 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (151)</a></li>
1348
1349 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
1350
1351 <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (15)</a></li>
1352
1353 <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (12)</a></li>
1354
1355 <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
1356
1357 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (261)</a></li>
1358
1359 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (21)</a></li>
1360
1361 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
1362
1363 <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (13)</a></li>
1364
1365 <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (8)</a></li>
1366
1367 <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (11)</a></li>
1368
1369 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (41)</a></li>
1370
1371 <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (10)</a></li>
1372
1373 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (19)</a></li>
1374
1375 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (9)</a></li>
1376
1377 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (8)</a></li>
1378
1379 <li><a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (2)</a></li>
1380
1381 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
1382
1383 <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
1384
1385 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (31)</a></li>
1386
1387 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (248)</a></li>
1388
1389 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (163)</a></li>
1390
1391 <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (11)</a></li>
1392
1393 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
1394
1395 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (48)</a></li>
1396
1397 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (75)</a></li>
1398
1399 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
1400
1401 <li><a href="http://people.skolelinux.org/pere/blog/tags/reactos">reactos (1)</a></li>
1402
1403 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
1404
1405 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
1406
1407 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (9)</a></li>
1408
1409 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
1410
1411 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (4)</a></li>
1412
1413 <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
1414
1415 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (41)</a></li>
1416
1417 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
1418
1419 <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (4)</a></li>
1420
1421 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (45)</a></li>
1422
1423 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (3)</a></li>
1424
1425 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (9)</a></li>
1426
1427 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (26)</a></li>
1428
1429 <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (2)</a></li>
1430
1431 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (8)</a></li>
1432
1433 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (44)</a></li>
1434
1435 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
1436
1437 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (33)</a></li>
1438
1439 </ul>
1440
1441
1442 </div>
1443 <p style="text-align: right">
1444 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.6</a>
1445 </p>
1446
1447 </body>
1448 </html>