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