]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2014/09/index.html
Generated.
[homepage.git] / blog / archive / 2014 / 09 / 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 from September 2014</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="09.rss" type="application/rss+xml" />
10 </head>
11 <body>
12 <!-- XML FEED -->
13 <div class="title">
14 <h1>
15 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
16
17 </h1>
18
19 </div>
20
21
22 <h3>Entries from September 2014.</h3>
23
24 <div class="entry">
25 <div class="title">
26 <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>
27 </div>
28 <div class="date">
29 26th September 2014
30 </div>
31 <div class="body">
32 <p>The <a href="http://www.skolelinux.org/">Debian Edu / Skolelinux
33 project</a> provide a Linux solution for schools, including a
34 powerful desktop with education software, a central server providing
35 web pages, user database, user home directories, central login and PXE
36 boot of both clients without disk and the installation to install Debian
37 Edu on machines with disk (and a few other services perhaps to small
38 to mention here). We in the Debian Edu team are currently working on
39 the Jessie based version, trying to get everything in shape before the
40 freeze, to avoid having to maintain our own package repository in the
41 future. The
42 <a href="https://wiki.debian.org/DebianEdu/Status/Jessie">current
43 status</a> can be seen on the Debian wiki, and there is still heaps of
44 work left. Some fatal problems block testing, breaking the installer,
45 but it is possible to work around these to get anyway. Here is a
46 recipe on how to get the installation limping along.</p>
47
48 <p>First, download the test ISO via
49 <a href="ftp://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso">ftp</a>,
50 <a href="http://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso">http</a>
51 or rsync (use
52 ftp.skolelinux.org::cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso).
53 The ISO build was broken on Tuesday, so we do not get a new ISO every
54 12 hours or so, but thankfully the ISO we already got we are able to
55 install with some tweaking.</p>
56
57 <p>When you get to the Debian Edu profile question, go to tty2
58 (use Alt-Ctrl-F2), run</p>
59
60 <p><blockquote><pre>
61 nano /usr/bin/edu-eatmydata-install
62 </pre></blockquote></p>
63
64 <p>and add 'exit 0' as the second line, disabling the eatmydata
65 optimization. Return to the installation, select the profile you want
66 and continue. Without this change, exim4-config will fail to install
67 due to a known bug in eatmydata.</p>
68
69 <p>When you get the grub question at the end, answer /dev/sda (or if
70 this do not work, figure out what your correct value would be. All my
71 test machines need /dev/sda, so I have no advice if it do not fit
72 your need.</p>
73
74 <p>If you installed a profile including a graphical desktop, log in as
75 root after the initial boot from hard drive, and install the
76 education-desktop-XXX metapackage. XXX can be kde, gnome, lxde, xfce
77 or mate. If you want several desktop options, install more than one
78 metapackage. Once this is done, reboot and you should have a working
79 graphical login screen. This workaround should no longer be needed
80 once the education-tasks package version 1.801 enter testing in two
81 days.</p>
82
83 <p>I believe the ISO build will start working on two days when the new
84 tasksel package enter testing and Steve McIntyre get a chance to
85 update the debian-cd git repository. The eatmydata, grub and desktop
86 issues are already fixed in unstable and testing, and should show up
87 on the ISO as soon as the ISO build start working again. Well the
88 eatmydata optimization is really just disabled. The proper fix
89 require an upload by the eatmydata maintainer applying the patch
90 provided in bug <a href="https://bugs.debian.org/702711">#702711</a>.
91 The rest have proper fixes in unstable.</p>
92
93 <p>I hope this get you going with the installation testing, as we are
94 quickly running out of time trying to get our Jessie based
95 installation ready before the distribution freeze in a month.</p>
96
97 </div>
98 <div class="tags">
99
100
101 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>.
102
103
104 </div>
105 </div>
106 <div class="padding"></div>
107
108 <div class="entry">
109 <div class="title">
110 <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>
111 </div>
112 <div class="date">
113 25th September 2014
114 </div>
115 <div class="body">
116 <p>I use the <a href="https://sourceforge.net/p/lsdvd/">lsdvd tool</a>
117 to handle my fairly large DVD collection. It is a nice command line
118 tool to get details about a DVD, like title, tracks, track length,
119 etc, in XML, Perl or human readable format. But lsdvd have not seen
120 any new development since 2006 and had a few irritating bugs affecting
121 its use with some DVDs. Upstream seemed to be dead, and in January I
122 sent a small probe asking for a version control repository for the
123 project, without any reply. But I use it regularly and would like to
124 get <a href="https://packages.qa.debian.org/lsdvd">an updated version
125 into Debian</a>. So two weeks ago I tried harder to get in touch with
126 the project admin, and after getting a reply from him explaining that
127 he was no longer interested in the project, I asked if I could take
128 over. And yesterday, I became project admin.</p>
129
130 <p>I've been in touch with a Gentoo developer and the Debian
131 maintainer interested in joining forces to maintain the upstream
132 project, and I hope we can get a new release out fairly quickly,
133 collecting the patches spread around on the internet into on place.
134 I've added the relevant Debian patches to the freshly created git
135 repository, and expect the Gentoo patches to make it too. If you got
136 a DVD collection and care about command line tools, check out
137 <a href="https://sourceforge.net/p/lsdvd/git/ci/master/tree/">the git source</a> and join
138 <a href="https://sourceforge.net/p/lsdvd/mailman/">the project mailing
139 list</a>. :)</p>
140
141 </div>
142 <div class="tags">
143
144
145 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>.
146
147
148 </div>
149 </div>
150 <div class="padding"></div>
151
152 <div class="entry">
153 <div class="title">
154 <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>
155 </div>
156 <div class="date">
157 21st September 2014
158 </div>
159 <div class="body">
160 <p>Rundt omkring i Oslo og Østlandsområdet henger det bokser over
161 veiene som jeg har lurt på hva gjør. De har ut fra plassering og
162 vinkling sett ut som bokser som sniffer ut et eller annet fra
163 forbipasserende trafikk, men det har vært uklart for meg hva det er de
164 leser av. Her om dagen tok jeg bilde av en slik boks som henger under
165 <a href="http://www.openstreetmap.no/?zoom=19&mlat=59.96396&mlon=10.34443&layers=B00000">ei
166 skibru på Sollihøgda</a>:</p>
167
168 <p align="center"><img width="60%" src="http://people.skolelinux.org/pere/blog/images/2014-09-13-kapsch-sollihogda-crop.jpeg"></p>
169
170 <p>Boksen er tydelig merket «Kapsch >>>», logoen til
171 <a href="http://www.kapsch.net/">det sveitsiske selskapet Kapsch</a> som
172 blant annet lager sensorsystemer for veitrafikk. Men de lager mye
173 forskjellig, og jeg kjente ikke igjen boksen på utseendet etter en
174 kjapp titt på produktlista til selskapet.</p>
175
176 <p>I og med at boksen henger over veien E16, en riksvei vedlikeholdt
177 av Statens Vegvesen, så antok jeg at det burde være mulig å bruke
178 REST-API-et som gir tilgang til vegvesenets database over veier,
179 skilter og annet veirelatert til å finne ut hva i alle dager dette
180 kunne være. De har både
181 <a href="https://www.vegvesen.no/nvdb/api/dokumentasjon/datakatalog">en
182 datakatalog</a> og
183 <a href="https://www.vegvesen.no/nvdb/api/dokumentasjon/sok">et
184 søk</a>, der en kan søke etter ulike typer oppføringer innen for et
185 gitt geografisk område. Jeg laget et enkelt shell-script for å hente
186 ut antall av en gitt type innenfor området skibrua dekker, og listet
187 opp navnet på typene som ble funnet. Orket ikke slå opp hvordan
188 URL-koding av aktuelle strenger kunne gjøres mer generisk, og brukte
189 en stygg sed-linje i stedet.</p>
190
191 <blockquote><pre>
192 #!/bin/sh
193 urlmap() {
194 sed \
195 -e 's/ / /g' -e 's/{/%7B/g' \
196 -e 's/}/%7D/g' -e 's/\[/%5B/g' \
197 -e 's/\]/%5D/g' -e 's/ /%20/g' \
198 -e 's/,/%2C/g' -e 's/\"/%22/g' \
199 -e 's/:/%3A/g'
200 }
201
202 lookup() {
203 url="$1"
204 curl -s -H 'Accept: application/vnd.vegvesen.nvdb-v1+xml' \
205 "https://www.vegvesen.no/nvdb/api$url" | xmllint --format -
206 }
207
208 for id in $(seq 1 874) ; do
209 search="{
210 lokasjon: {
211 bbox: \"10.34425,59.96386,10.34458,59.96409\",
212 srid: \"WGS84\"
213 },
214 objektTyper: [{
215 id: $id, antall: 10
216 }]
217 }"
218
219 query=/sok?kriterie=$(echo $search | urlmap)
220 if lookup "$query" |
221 grep -q '&lt;totaltAntallReturnert>0&lt;'
222 then
223 :
224 else
225 echo $id
226 lookup "/datakatalog/objekttyper/$id" |grep '^ &lt;navn>'
227 fi
228 done
229
230 exit 0
231 </pre></blockquote>
232
233 Aktuelt ID-område 1-874 var riktig i datakatalogen da jeg laget
234 scriptet. Det vil endre seg over tid. Skriptet listet så opp
235 aktuelle typer i og rundt skibrua:
236
237 <blockquote><pre>
238 5
239 &lt;navn>Rekkverk&lt;/navn>
240 14
241 &lt;navn>Rekkverksende&lt;/navn>
242 47
243 &lt;navn>Trafikklomme&lt;/navn>
244 49
245 &lt;navn>Trafikkøy&lt;/navn>
246 60
247 &lt;navn>Bru&lt;/navn>
248 79
249 &lt;navn>Stikkrenne/Kulvert&lt;/navn>
250 80
251 &lt;navn>Grøft, åpen&lt;/navn>
252 86
253 &lt;navn>Belysningsstrekning&lt;/navn>
254 95
255 &lt;navn>Skiltpunkt&lt;/navn>
256 96
257 &lt;navn>Skiltplate&lt;/navn>
258 98
259 &lt;navn>Referansestolpe&lt;/navn>
260 99
261 &lt;navn>Vegoppmerking, langsgående&lt;/navn>
262 105
263 &lt;navn>Fartsgrense&lt;/navn>
264 106
265 &lt;navn>Vinterdriftsstrategi&lt;/navn>
266 172
267 &lt;navn>Trafikkdeler&lt;/navn>
268 241
269 &lt;navn>Vegdekke&lt;/navn>
270 293
271 &lt;navn>Breddemåling&lt;/navn>
272 301
273 &lt;navn>Kantklippareal&lt;/navn>
274 318
275 &lt;navn>Snø-/isrydding&lt;/navn>
276 445
277 &lt;navn>Skred&lt;/navn>
278 446
279 &lt;navn>Dokumentasjon&lt;/navn>
280 452
281 &lt;navn>Undergang&lt;/navn>
282 528
283 &lt;navn>Tverrprofil&lt;/navn>
284 532
285 &lt;navn>Vegreferanse&lt;/navn>
286 534
287 &lt;navn>Region&lt;/navn>
288 535
289 &lt;navn>Fylke&lt;/navn>
290 536
291 &lt;navn>Kommune&lt;/navn>
292 538
293 &lt;navn>Gate&lt;/navn>
294 539
295 &lt;navn>Transportlenke&lt;/navn>
296 540
297 &lt;navn>Trafikkmengde&lt;/navn>
298 570
299 &lt;navn>Trafikkulykke&lt;/navn>
300 571
301 &lt;navn>Ulykkesinvolvert enhet&lt;/navn>
302 572
303 &lt;navn>Ulykkesinvolvert person&lt;/navn>
304 579
305 &lt;navn>Politidistrikt&lt;/navn>
306 583
307 &lt;navn>Vegbredde&lt;/navn>
308 591
309 &lt;navn>Høydebegrensning&lt;/navn>
310 592
311 &lt;navn>Nedbøyningsmåling&lt;/navn>
312 597
313 &lt;navn>Støy-luft, Strekningsdata&lt;/navn>
314 601
315 &lt;navn>Oppgravingsdata&lt;/navn>
316 602
317 &lt;navn>Oppgravingslag&lt;/navn>
318 603
319 &lt;navn>PMS-parsell&lt;/navn>
320 604
321 &lt;navn>Vegnormalstrekning&lt;/navn>
322 605
323 &lt;navn>Værrelatert strekning&lt;/navn>
324 616
325 &lt;navn>Feltstrekning&lt;/navn>
326 617
327 &lt;navn>Adressepunkt&lt;/navn>
328 626
329 &lt;navn>Friksjonsmåleserie&lt;/navn>
330 629
331 &lt;navn>Vegdekke, flatelapping&lt;/navn>
332 639
333 &lt;navn>Kurvatur, horisontalelement&lt;/navn>
334 640
335 &lt;navn>Kurvatur, vertikalelement&lt;/navn>
336 642
337 &lt;navn>Kurvatur, vertikalpunkt&lt;/navn>
338 643
339 &lt;navn>Statistikk, trafikkmengde&lt;/navn>
340 647
341 &lt;navn>Statistikk, vegbredde&lt;/navn>
342 774
343 &lt;navn>Nedbøyningsmåleserie&lt;/navn>
344 775
345 &lt;navn>ATK, influensstrekning&lt;/navn>
346 794
347 &lt;navn>Systemobjekt&lt;/navn>
348 810
349 &lt;navn>Vinterdriftsklasse&lt;/navn>
350 821
351 &lt;navn>Funksjonell vegklasse&lt;/navn>
352 825
353 &lt;navn>Kurvatur, stigning&lt;/navn>
354 838
355 &lt;navn>Vegbredde, beregnet&lt;/navn>
356 862
357 &lt;navn>Reisetidsregistreringspunkt&lt;/navn>
358 871
359 &lt;navn>Bruksklasse&lt;/navn>
360 </pre></blockquote>
361
362 <p>Av disse ser ID 775 og 862 mest relevant ut. ID 775 antar jeg
363 refererer til fotoboksen som står like ved brua, mens
364 «Reisetidsregistreringspunkt» kanskje kan være boksen som henger der.
365 Hvordan finner jeg så ut hva dette kan være for noe. En titt på
366 <a href="http://labs.vegdata.no/nvdb-datakatalog/862-Reisetidsregistreringspunkt/">datakatalogsiden
367 for ID 862/Reisetidsregistreringspunkt</a> viser at det er finnes 53
368 slike målere i Norge, og hvor de er plassert, men gir ellers få
369 detaljer. Det er plassert 40 på østlandet og 13 i Trondheimsregionen.
370 Men siden nevner «AutoPASS», og hvis en slår opp oppføringen på
371 Sollihøgda nevner den «Ciber AS» som ID for eksternt system. (Kan det
372 være snakk om
373 <a href="http://www.proff.no/selskap/ciber-norge-as/oslo/internettdesign-og-programmering/Z0I3KMF4/">Ciber
374 Norge AS</a>, et selskap eid av Ciber Europe Bv?) Et nettsøk på
375 «Ciber AS autopass» fører meg til en artikkel fra NRK Trøndelag i
376 2013 med tittel
377 «<a href="http://www.nrk.no/trondelag/sjekk-dette-hvis-du-vil-unnga-ko-1.11327947">Sjekk
378 dette hvis du vil unngå kø</a>». Artikkelen henviser til vegvesenets
379 nettside
380 <a href="http://www.reisetider.no/reisetid/forside.html">reisetider.no</a>
381 som har en
382 <a href="http://www.reisetider.no/reisetid/omrade.html?omrade=5">kartside
383 for Østlandet</a> som viser at det måles mellom Sandvika og Sollihøgda.
384 Det kan dermed se ut til at jeg har funnet ut hva boksene gjør.</p>
385
386 <p>Hvis det stemmer, så er dette bokser som leser av AutoPASS-ID-en
387 til alle passerende biler med AutoPASS-brikke, og dermed gjør det mulig
388 for de som kontrollerer boksene å holde rede på hvor en gitt bil er
389 når den passerte et slikt målepunkt. NRK-artikkelen forteller at
390 denne informasjonen i dag kun brukes til å koble to
391 AutoPASS-brikkepasseringer passeringer sammen for å beregne
392 reisetiden, og at bruken er godkjent av Datatilsynet. Det er desverre
393 ikke mulig for en sjåfør som passerer under en slik boks å kontrollere
394 at AutoPASS-ID-en kun brukes til dette i dag og i fremtiden.</p>
395
396 <p>I tillegg til denne type AutoPASS-sniffere vet jeg at det også
397 finnes mange automatiske stasjoner som tar betalt pr. passering (aka
398 bomstasjoner), og der lagres informasjon om tid, sted og bilnummer i
399 10 år. Finnes det andre slike sniffere plassert ut på veiene?</p>
400
401 <p>Personlig har jeg valgt å ikke bruke AutoPASS-brikke, for å gjøre
402 det vanskeligere og mer kostbart for de som vil invadere privatsfæren
403 og holde rede på hvor bilen min beveger seg til enhver tid. Jeg håper
404 flere vil gjøre det samme, selv om det gir litt høyere private
405 utgifter (dyrere bompassering). Vern om privatsfæren koster i disse
406 dager.</p>
407
408 <p>Takk til Jan Kristian Jensen i Statens Vegvesen for tips om
409 dokumentasjon på vegvesenets REST-API.</p>
410
411 </div>
412 <div class="tags">
413
414
415 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>.
416
417
418 </div>
419 </div>
420 <div class="padding"></div>
421
422 <div class="entry">
423 <div class="title">
424 <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>
425 </div>
426 <div class="date">
427 16th September 2014
428 </div>
429 <div class="body">
430 <p>The <a href="https://www.debian.org/">Debian</a> installer could be
431 a lot quicker. When we install more than 2000 packages in
432 <a href="http://www.skolelinux.org/">Skolelinux / Debian Edu</a> using
433 tasksel in the installer, unpacking the binary packages take forever.
434 A part of the slow I/O issue was discussed in
435 <a href="https://bugs.debian.org/613428">bug #613428</a> about too
436 much file system sync-ing done by dpkg, which is the package
437 responsible for unpacking the binary packages. Other parts (like code
438 executed by postinst scripts) might also sync to disk during
439 installation. All this sync-ing to disk do not really make sense to
440 me. If the machine crash half-way through, I start over, I do not try
441 to salvage the half installed system. So the failure sync-ing is
442 supposed to protect against, hardware or system crash, is not really
443 relevant while the installer is running.</p>
444
445 <p>A few days ago, I thought of a way to get rid of all the file
446 system sync()-ing in a fairly non-intrusive way, without the need to
447 change the code in several packages. The idea is not new, but I have
448 not heard anyone propose the approach using dpkg-divert before. It
449 depend on the small and clever package
450 <a href="https://packages.qa.debian.org/eatmydata">eatmydata</a>, which
451 uses LD_PRELOAD to replace the system functions for syncing data to
452 disk with functions doing nothing, thus allowing programs to live
453 dangerous while speeding up disk I/O significantly. Instead of
454 modifying the implementation of dpkg, apt and tasksel (which are the
455 packages responsible for selecting, fetching and installing packages),
456 it occurred to me that we could just divert the programs away, replace
457 them with a simple shell wrapper calling
458 "eatmydata&nbsp;$program&nbsp;$@", to get the same effect.
459 Two days ago I decided to test the idea, and wrapped up a simple
460 implementation for the Debian Edu udeb.</p>
461
462 <p>The effect was stunning. In my first test it reduced the running
463 time of the pkgsel step (installing tasks) from 64 to less than 44
464 minutes (20 minutes shaved off the installation) on an old Dell
465 Latitude D505 machine. I am not quite sure what the optimised time
466 would have been, as I messed up the testing a bit, causing the debconf
467 priority to get low enough for two questions to pop up during
468 installation. As soon as I saw the questions I moved the installation
469 along, but do not know how long the question were holding up the
470 installation. I did some more measurements using Debian Edu Jessie,
471 and got these results. The time measured is the time stamp in
472 /var/log/syslog between the "pkgsel: starting tasksel" and the
473 "pkgsel: finishing up" lines, if you want to do the same measurement
474 yourself. In Debian Edu, the tasksel dialog do not show up, and the
475 timing thus do not depend on how quickly the user handle the tasksel
476 dialog.</p>
477
478 <p><table>
479
480 <tr>
481 <th>Machine/setup</th>
482 <th>Original tasksel</th>
483 <th>Optimised tasksel</th>
484 <th>Reduction</th>
485 </tr>
486
487 <tr>
488 <td>Latitude D505 Main+LTSP LXDE</td>
489 <td>64 min (07:46-08:50)</td>
490 <td><44 min (11:27-12:11)</td>
491 <td>>20 min 18%</td>
492 </tr>
493
494 <tr>
495 <td>Latitude D505 Roaming LXDE</td>
496 <td>57 min (08:48-09:45)</td>
497 <td>34 min (07:43-08:17)</td>
498 <td>23 min 40%</td>
499 </tr>
500
501 <tr>
502 <td>Latitude D505 Minimal</td>
503 <td>22 min (10:37-10:59)</td>
504 <td>11 min (11:16-11:27)</td>
505 <td>11 min 50%</td>
506 </tr>
507
508 <tr>
509 <td>Thinkpad X200 Minimal</td>
510 <td>6 min (08:19-08:25)</td>
511 <td>4 min (08:04-08:08)</td>
512 <td>2 min 33%</td>
513 </tr>
514
515 <tr>
516 <td>Thinkpad X200 Roaming KDE</td>
517 <td>19 min (09:21-09:40)</td>
518 <td>15 min (10:25-10:40)</td>
519 <td>4 min 21%</td>
520 </tr>
521
522 </table></p>
523
524 <p>The test is done using a netinst ISO on a USB stick, so some of the
525 time is spent downloading packages. The connection to the Internet
526 was 100Mbit/s during testing, so downloading should not be a
527 significant factor in the measurement. Download typically took a few
528 seconds to a few minutes, depending on the amount of packages being
529 installed.</p>
530
531 <p>The speedup is implemented by using two hooks in
532 <a href="https://www.debian.org/devel/debian-installer/">Debian
533 Installer</a>, the pre-pkgsel.d hook to set up the diverts, and the
534 finish-install.d hook to remove the divert at the end of the
535 installation. I picked the pre-pkgsel.d hook instead of the
536 post-base-installer.d hook because I test using an ISO without the
537 eatmydata package included, and the post-base-installer.d hook in
538 Debian Edu can only operate on packages included in the ISO. The
539 negative effect of this is that I am unable to activate this
540 optimization for the kernel installation step in d-i. If the code is
541 moved to the post-base-installer.d hook, the speedup would be larger
542 for the entire installation.</p>
543
544 <p>I've implemented this in the
545 <a href="https://packages.qa.debian.org/debian-edu-install">debian-edu-install</a>
546 git repository, and plan to provide the optimization as part of the
547 Debian Edu installation. If you want to test this yourself, you can
548 create two files in the installer (or in an udeb). One shell script
549 need do go into /usr/lib/pre-pkgsel.d/, with content like this:</p>
550
551 <p><blockquote><pre>
552 #!/bin/sh
553 set -e
554 . /usr/share/debconf/confmodule
555 info() {
556 logger -t my-pkgsel "info: $*"
557 }
558 error() {
559 logger -t my-pkgsel "error: $*"
560 }
561 override_install() {
562 apt-install eatmydata || true
563 if [ -x /target/usr/bin/eatmydata ] ; then
564 for bin in dpkg apt-get aptitude tasksel ; do
565 file=/usr/bin/$bin
566 # Test that the file exist and have not been diverted already.
567 if [ -f /target$file ] ; then
568 info "diverting $file using eatmydata"
569 printf "#!/bin/sh\neatmydata $bin.distrib \"\$@\"\n" \
570 > /target$file.edu
571 chmod 755 /target$file.edu
572 in-target dpkg-divert --package debian-edu-config \
573 --rename --quiet --add $file
574 ln -sf ./$bin.edu /target$file
575 else
576 error "unable to divert $file, as it is missing."
577 fi
578 done
579 else
580 error "unable to find /usr/bin/eatmydata after installing the eatmydata pacage"
581 fi
582 }
583
584 override_install
585 </pre></blockquote></p>
586
587 <p>To clean up, another shell script should go into
588 /usr/lib/finish-install.d/ with code like this:
589
590 <p><blockquote><pre>
591 #! /bin/sh -e
592 . /usr/share/debconf/confmodule
593 error() {
594 logger -t my-finish-install "error: $@"
595 }
596 remove_install_override() {
597 for bin in dpkg apt-get aptitude tasksel ; do
598 file=/usr/bin/$bin
599 if [ -x /target$file.edu ] ; then
600 rm /target$file
601 in-target dpkg-divert --package debian-edu-config \
602 --rename --quiet --remove $file
603 rm /target$file.edu
604 else
605 error "Missing divert for $file."
606 fi
607 done
608 sync # Flush file buffers before continuing
609 }
610
611 remove_install_override
612 </pre></blockquote></p>
613
614 <p>In Debian Edu, I placed both code fragments in a separate script
615 edu-eatmydata-install and call it from the pre-pkgsel.d and
616 finish-install.d scripts.</p>
617
618 <p>By now you might ask if this change should get into the normal
619 Debian installer too? I suspect it should, but am not sure the
620 current debian-installer coordinators find it useful enough. It also
621 depend on the side effects of the change. I'm not aware of any, but I
622 guess we will see if the change is safe after some more testing.
623 Perhaps there is some package in Debian depending on sync() and
624 fsync() having effect? Perhaps it should go into its own udeb, to
625 allow those of us wanting to enable it to do so without affecting
626 everyone.</p>
627
628 <p>Update 2014-09-24: Since a few days ago, enabling this optimization
629 will break installation of all programs using gnutls because of
630 <a href="https://bugs.debian.org/702711">bug #702711. An updated
631 eatmydata package in Debian will solve it.</p>
632
633 </div>
634 <div class="tags">
635
636
637 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>.
638
639
640 </div>
641 </div>
642 <div class="padding"></div>
643
644 <div class="entry">
645 <div class="title">
646 <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>
647 </div>
648 <div class="date">
649 10th September 2014
650 </div>
651 <div class="body">
652 <p>Yesterday, I had the pleasure of attending a talk with the
653 <a href="http://www.nuug.no/">Norwegian Unix User Group</a> about
654 <a href="http://www.nuug.no/aktiviteter/20140909-sks-keyservers/">the
655 OpenPGP keyserver pool sks-keyservers.net</a>, and was very happy to
656 learn that there is a large set of publicly available key servers to
657 use when looking for peoples public key. So far I have used
658 subkeys.pgp.net, and some times wwwkeys.nl.pgp.net when the former
659 were misbehaving, but those days are ended. The servers I have used
660 up until yesterday have been slow and some times unavailable. I hope
661 those problems are gone now.</p>
662
663 <p>Behind the round robin DNS entry of the
664 <a href="https://sks-keyservers.net/">sks-keyservers.net</a> service
665 there is a pool of more than 100 keyservers which are checked every
666 day to ensure they are well connected and up to date. It must be
667 better than what I have used so far. :)</p>
668
669 <p>Yesterdays speaker told me that the service is the default
670 keyserver provided by the default configuration in GnuPG, but this do
671 not seem to be used in Debian. Perhaps it should?</p>
672
673 <p>Anyway, I've updated my ~/.gnupg/options file to now include this
674 line:</p>
675
676 <p><blockquote><pre>
677 keyserver pool.sks-keyservers.net
678 </pre></blockquote></p>
679
680 <p>With GnuPG version 2 one can also locate the keyserver using SRV
681 entries in DNS. Just for fun, I did just that at work, so now every
682 user of GnuPG at the University of Oslo should find a OpenGPG
683 keyserver automatically should their need it:</p>
684
685 <p><blockquote><pre>
686 % host -t srv _pgpkey-http._tcp.uio.no
687 _pgpkey-http._tcp.uio.no has SRV record 0 100 11371 pool.sks-keyservers.net.
688 %
689 </pre></blockquote></p>
690
691 <p>Now if only
692 <a href="http://ietfreport.isoc.org/idref/draft-shaw-openpgp-hkp/">the
693 HKP lookup protocol</a> supported finding signature paths, I would be
694 very happy. It can look up a given key or search for a user ID, but I
695 normally do not want that, but to find a trust path from my key to
696 another key. Given a user ID or key ID, I would like to find (and
697 download) the keys representing a signature path from my key to the
698 key in question, to be able to get a trust path between the two keys.
699 This is as far as I can tell not possible today. Perhaps something
700 for a future version of the protocol?</p>
701
702 </div>
703 <div class="tags">
704
705
706 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>.
707
708
709 </div>
710 </div>
711 <div class="padding"></div>
712
713 <p style="text-align: right;"><a href="09.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS Feed" width="36" height="14" /></a></p>
714 <div id="sidebar">
715
716
717
718 <h2>Archive</h2>
719 <ul>
720
721 <li>2014
722 <ul>
723
724 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/01/">January (2)</a></li>
725
726 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/02/">February (3)</a></li>
727
728 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/03/">March (8)</a></li>
729
730 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/04/">April (7)</a></li>
731
732 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/05/">May (1)</a></li>
733
734 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/06/">June (2)</a></li>
735
736 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/07/">July (2)</a></li>
737
738 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/08/">August (2)</a></li>
739
740 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/09/">September (5)</a></li>
741
742 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/10/">October (3)</a></li>
743
744 </ul></li>
745
746 <li>2013
747 <ul>
748
749 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (11)</a></li>
750
751 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/02/">February (9)</a></li>
752
753 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/03/">March (9)</a></li>
754
755 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/04/">April (6)</a></li>
756
757 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/05/">May (9)</a></li>
758
759 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/06/">June (10)</a></li>
760
761 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/07/">July (7)</a></li>
762
763 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/08/">August (3)</a></li>
764
765 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/09/">September (5)</a></li>
766
767 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
768
769 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (9)</a></li>
770
771 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/12/">December (3)</a></li>
772
773 </ul></li>
774
775 <li>2012
776 <ul>
777
778 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
779
780 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
781
782 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
783
784 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
785
786 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
787
788 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
789
790 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
791
792 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
793
794 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
795
796 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
797
798 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
799
800 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
801
802 </ul></li>
803
804 <li>2011
805 <ul>
806
807 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
808
809 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
810
811 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
812
813 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
814
815 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
816
817 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
818
819 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
820
821 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
822
823 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
824
825 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
826
827 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
828
829 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
830
831 </ul></li>
832
833 <li>2010
834 <ul>
835
836 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
837
838 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
839
840 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
841
842 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
843
844 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
845
846 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
847
848 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
849
850 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
851
852 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
853
854 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
855
856 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
857
858 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
859
860 </ul></li>
861
862 <li>2009
863 <ul>
864
865 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
866
867 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
868
869 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
870
871 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
872
873 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
874
875 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
876
877 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
878
879 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
880
881 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
882
883 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
884
885 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
886
887 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
888
889 </ul></li>
890
891 <li>2008
892 <ul>
893
894 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
895
896 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
897
898 </ul></li>
899
900 </ul>
901
902
903
904 <h2>Tags</h2>
905 <ul>
906
907 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (13)</a></li>
908
909 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
910
911 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
912
913 <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
914
915 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (8)</a></li>
916
917 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (14)</a></li>
918
919 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
920
921 <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
922
923 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (106)</a></li>
924
925 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (150)</a></li>
926
927 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
928
929 <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (15)</a></li>
930
931 <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (12)</a></li>
932
933 <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
934
935 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (258)</a></li>
936
937 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (21)</a></li>
938
939 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
940
941 <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (13)</a></li>
942
943 <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (8)</a></li>
944
945 <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (11)</a></li>
946
947 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (41)</a></li>
948
949 <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (10)</a></li>
950
951 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (19)</a></li>
952
953 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (9)</a></li>
954
955 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (8)</a></li>
956
957 <li><a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (2)</a></li>
958
959 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
960
961 <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
962
963 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (31)</a></li>
964
965 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (248)</a></li>
966
967 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (162)</a></li>
968
969 <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (11)</a></li>
970
971 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
972
973 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (48)</a></li>
974
975 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (75)</a></li>
976
977 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
978
979 <li><a href="http://people.skolelinux.org/pere/blog/tags/reactos">reactos (1)</a></li>
980
981 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
982
983 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
984
985 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (9)</a></li>
986
987 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
988
989 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (4)</a></li>
990
991 <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
992
993 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (41)</a></li>
994
995 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
996
997 <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (4)</a></li>
998
999 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (45)</a></li>
1000
1001 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (3)</a></li>
1002
1003 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (9)</a></li>
1004
1005 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (26)</a></li>
1006
1007 <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (2)</a></li>
1008
1009 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (8)</a></li>
1010
1011 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (43)</a></li>
1012
1013 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
1014
1015 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (33)</a></li>
1016
1017 </ul>
1018
1019
1020 </div>
1021 <p style="text-align: right">
1022 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.6</a>
1023 </p>
1024
1025 </body>
1026 </html>