]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2014/09/09.rss
Generated.
[homepage.git] / blog / archive / 2014 / 09 / 09.rss
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries from September 2014</title>
5 <description>Entries from September 2014</description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7
8
9 <item>
10 <title>How to test Debian Edu Jessie despite some fatal problems with the installer</title>
11 <link>http://people.skolelinux.org/pere/blog/How_to_test_Debian_Edu_Jessie_despite_some_fatal_problems_with_the_installer.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/How_to_test_Debian_Edu_Jessie_despite_some_fatal_problems_with_the_installer.html</guid>
13 <pubDate>Fri, 26 Sep 2014 12:20:00 +0200</pubDate>
14 <description>&lt;p&gt;The &lt;a href=&quot;http://www.skolelinux.org/&quot;&gt;Debian Edu / Skolelinux
15 project&lt;/a&gt; provide a Linux solution for schools, including a
16 powerful desktop with education software, a central server providing
17 web pages, user database, user home directories, central login and PXE
18 boot of both clients without disk and the installation to install Debian
19 Edu on machines with disk (and a few other services perhaps to small
20 to mention here). We in the Debian Edu team are currently working on
21 the Jessie based version, trying to get everything in shape before the
22 freeze, to avoid having to maintain our own package repository in the
23 future. The
24 &lt;a href=&quot;https://wiki.debian.org/DebianEdu/Status/Jessie&quot;&gt;current
25 status&lt;/a&gt; can be seen on the Debian wiki, and there is still heaps of
26 work left. Some fatal problems block testing, breaking the installer,
27 but it is possible to work around these to get anyway. Here is a
28 recipe on how to get the installation limping along.&lt;/p&gt;
29
30 &lt;p&gt;First, download the test ISO via
31 &lt;a href=&quot;ftp://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso&quot;&gt;ftp&lt;/a&gt;,
32 &lt;a href=&quot;http://ftp.skolelinux.no/cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso&quot;&gt;http&lt;/a&gt;
33 or rsync (use
34 ftp.skolelinux.org::cd-edu-testing-nolocal-netinst/debian-edu-amd64-i386-NETINST-1.iso).
35 The ISO build was broken on Tuesday, so we do not get a new ISO every
36 12 hours or so, but thankfully the ISO we already got we are able to
37 install with some tweaking.&lt;/p&gt;
38
39 &lt;p&gt;When you get to the Debian Edu profile question, go to tty2
40 (use Alt-Ctrl-F2), run&lt;/p&gt;
41
42 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
43 nano /usr/bin/edu-eatmydata-install
44 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
45
46 &lt;p&gt;and add &#39;exit 0&#39; as the second line, disabling the eatmydata
47 optimization. Return to the installation, select the profile you want
48 and continue. Without this change, exim4-config will fail to install
49 due to a known bug in eatmydata.&lt;/p&gt;
50
51 &lt;p&gt;When you get the grub question at the end, answer /dev/sda (or if
52 this do not work, figure out what your correct value would be. All my
53 test machines need /dev/sda, so I have no advice if it do not fit
54 your need.&lt;/p&gt;
55
56 &lt;p&gt;If you installed a profile including a graphical desktop, log in as
57 root after the initial boot from hard drive, and install the
58 education-desktop-XXX metapackage. XXX can be kde, gnome, lxde, xfce
59 or mate. If you want several desktop options, install more than one
60 metapackage. Once this is done, reboot and you should have a working
61 graphical login screen. This workaround should no longer be needed
62 once the education-tasks package version 1.801 enter testing in two
63 days.&lt;/p&gt;
64
65 &lt;p&gt;I believe the ISO build will start working on two days when the new
66 tasksel package enter testing and Steve McIntyre get a chance to
67 update the debian-cd git repository. The eatmydata, grub and desktop
68 issues are already fixed in unstable and testing, and should show up
69 on the ISO as soon as the ISO build start working again. Well the
70 eatmydata optimization is really just disabled. The proper fix
71 require an upload by the eatmydata maintainer applying the patch
72 provided in bug &lt;a href=&quot;https://bugs.debian.org/702711&quot;&gt;#702711&lt;/a&gt;.
73 The rest have proper fixes in unstable.&lt;/p&gt;
74
75 &lt;p&gt;I hope this get you going with the installation testing, as we are
76 quickly running out of time trying to get our Jessie based
77 installation ready before the distribution freeze in a month.&lt;/p&gt;
78 </description>
79 </item>
80
81 <item>
82 <title>Suddenly I am the new upstream of the lsdvd command line tool</title>
83 <link>http://people.skolelinux.org/pere/blog/Suddenly_I_am_the_new_upstream_of_the_lsdvd_command_line_tool.html</link>
84 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Suddenly_I_am_the_new_upstream_of_the_lsdvd_command_line_tool.html</guid>
85 <pubDate>Thu, 25 Sep 2014 11:20:00 +0200</pubDate>
86 <description>&lt;p&gt;I use the &lt;a href=&quot;https://sourceforge.net/p/lsdvd/&quot;&gt;lsdvd tool&lt;/a&gt;
87 to handle my fairly large DVD collection. It is a nice command line
88 tool to get details about a DVD, like title, tracks, track length,
89 etc, in XML, Perl or human readable format. But lsdvd have not seen
90 any new development since 2006 and had a few irritating bugs affecting
91 its use with some DVDs. Upstream seemed to be dead, and in January I
92 sent a small probe asking for a version control repository for the
93 project, without any reply. But I use it regularly and would like to
94 get &lt;a href=&quot;https://packages.qa.debian.org/lsdvd&quot;&gt;an updated version
95 into Debian&lt;/a&gt;. So two weeks ago I tried harder to get in touch with
96 the project admin, and after getting a reply from him explaining that
97 he was no longer interested in the project, I asked if I could take
98 over. And yesterday, I became project admin.&lt;/p&gt;
99
100 &lt;p&gt;I&#39;ve been in touch with a Gentoo developer and the Debian
101 maintainer interested in joining forces to maintain the upstream
102 project, and I hope we can get a new release out fairly quickly,
103 collecting the patches spread around on the internet into on place.
104 I&#39;ve added the relevant Debian patches to the freshly created git
105 repository, and expect the Gentoo patches to make it too. If you got
106 a DVD collection and care about command line tools, check out
107 &lt;a href=&quot;https://sourceforge.net/p/lsdvd/git/ci/master/tree/&quot;&gt;the git source&lt;/a&gt; and join
108 &lt;a href=&quot;https://sourceforge.net/p/lsdvd/mailman/&quot;&gt;the project mailing
109 list&lt;/a&gt;. :)&lt;/p&gt;
110 </description>
111 </item>
112
113 <item>
114 <title>Hva henger under skibrua over E16 på Sollihøgda?</title>
115 <link>http://people.skolelinux.org/pere/blog/Hva_henger_under_skibrua_over_E16_p__Sollih_gda_.html</link>
116 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Hva_henger_under_skibrua_over_E16_p__Sollih_gda_.html</guid>
117 <pubDate>Sun, 21 Sep 2014 09:50:00 +0200</pubDate>
118 <description>&lt;p&gt;Rundt omkring i Oslo og Østlandsområdet henger det bokser over
119 veiene som jeg har lurt på hva gjør. De har ut fra plassering og
120 vinkling sett ut som bokser som sniffer ut et eller annet fra
121 forbipasserende trafikk, men det har vært uklart for meg hva det er de
122 leser av. Her om dagen tok jeg bilde av en slik boks som henger under
123 &lt;a href=&quot;http://www.openstreetmap.no/?zoom=19&amp;mlat=59.96396&amp;mlon=10.34443&amp;layers=B00000&quot;&gt;ei
124 skibru på Sollihøgda&lt;/a&gt;:&lt;/p&gt;
125
126 &lt;p align=&quot;center&quot;&gt;&lt;img width=&quot;60%&quot; src=&quot;http://people.skolelinux.org/pere/blog/images/2014-09-13-kapsch-sollihogda-crop.jpeg&quot;&gt;&lt;/p&gt;
127
128 &lt;p&gt;Boksen er tydelig merket «Kapsch &gt;&gt;&gt;», logoen til
129 &lt;a href=&quot;http://www.kapsch.net/&quot;&gt;det sveitsiske selskapet Kapsch&lt;/a&gt; som
130 blant annet lager sensorsystemer for veitrafikk. Men de lager mye
131 forskjellig, og jeg kjente ikke igjen boksen på utseendet etter en
132 kjapp titt på produktlista til selskapet.&lt;/p&gt;
133
134 &lt;p&gt;I og med at boksen henger over veien E16, en riksvei vedlikeholdt
135 av Statens Vegvesen, så antok jeg at det burde være mulig å bruke
136 REST-API-et som gir tilgang til vegvesenets database over veier,
137 skilter og annet veirelatert til å finne ut hva i alle dager dette
138 kunne være. De har både
139 &lt;a href=&quot;https://www.vegvesen.no/nvdb/api/dokumentasjon/datakatalog&quot;&gt;en
140 datakatalog&lt;/a&gt; og
141 &lt;a href=&quot;https://www.vegvesen.no/nvdb/api/dokumentasjon/sok&quot;&gt;et
142 søk&lt;/a&gt;, der en kan søke etter ulike typer oppføringer innen for et
143 gitt geografisk område. Jeg laget et enkelt shell-script for å hente
144 ut antall av en gitt type innenfor området skibrua dekker, og listet
145 opp navnet på typene som ble funnet. Orket ikke slå opp hvordan
146 URL-koding av aktuelle strenger kunne gjøres mer generisk, og brukte
147 en stygg sed-linje i stedet.&lt;/p&gt;
148
149 &lt;blockquote&gt;&lt;pre&gt;
150 #!/bin/sh
151 urlmap() {
152 sed \
153 -e &#39;s/ / /g&#39; -e &#39;s/{/%7B/g&#39; \
154 -e &#39;s/}/%7D/g&#39; -e &#39;s/\[/%5B/g&#39; \
155 -e &#39;s/\]/%5D/g&#39; -e &#39;s/ /%20/g&#39; \
156 -e &#39;s/,/%2C/g&#39; -e &#39;s/\&quot;/%22/g&#39; \
157 -e &#39;s/:/%3A/g&#39;
158 }
159
160 lookup() {
161 url=&quot;$1&quot;
162 curl -s -H &#39;Accept: application/vnd.vegvesen.nvdb-v1+xml&#39; \
163 &quot;https://www.vegvesen.no/nvdb/api$url&quot; | xmllint --format -
164 }
165
166 for id in $(seq 1 874) ; do
167 search=&quot;{
168 lokasjon: {
169 bbox: \&quot;10.34425,59.96386,10.34458,59.96409\&quot;,
170 srid: \&quot;WGS84\&quot;
171 },
172 objektTyper: [{
173 id: $id, antall: 10
174 }]
175 }&quot;
176
177 query=/sok?kriterie=$(echo $search | urlmap)
178 if lookup &quot;$query&quot; |
179 grep -q &#39;&amp;lt;totaltAntallReturnert&gt;0&amp;lt;&#39;
180 then
181 :
182 else
183 echo $id
184 lookup &quot;/datakatalog/objekttyper/$id&quot; |grep &#39;^ &amp;lt;navn&gt;&#39;
185 fi
186 done
187
188 exit 0
189 &lt;/pre&gt;&lt;/blockquote&gt;
190
191 Aktuelt ID-område 1-874 var riktig i datakatalogen da jeg laget
192 scriptet. Det vil endre seg over tid. Skriptet listet så opp
193 aktuelle typer i og rundt skibrua:
194
195 &lt;blockquote&gt;&lt;pre&gt;
196 5
197 &amp;lt;navn&gt;Rekkverk&amp;lt;/navn&gt;
198 14
199 &amp;lt;navn&gt;Rekkverksende&amp;lt;/navn&gt;
200 47
201 &amp;lt;navn&gt;Trafikklomme&amp;lt;/navn&gt;
202 49
203 &amp;lt;navn&gt;Trafikkøy&amp;lt;/navn&gt;
204 60
205 &amp;lt;navn&gt;Bru&amp;lt;/navn&gt;
206 79
207 &amp;lt;navn&gt;Stikkrenne/Kulvert&amp;lt;/navn&gt;
208 80
209 &amp;lt;navn&gt;Grøft, åpen&amp;lt;/navn&gt;
210 86
211 &amp;lt;navn&gt;Belysningsstrekning&amp;lt;/navn&gt;
212 95
213 &amp;lt;navn&gt;Skiltpunkt&amp;lt;/navn&gt;
214 96
215 &amp;lt;navn&gt;Skiltplate&amp;lt;/navn&gt;
216 98
217 &amp;lt;navn&gt;Referansestolpe&amp;lt;/navn&gt;
218 99
219 &amp;lt;navn&gt;Vegoppmerking, langsgående&amp;lt;/navn&gt;
220 105
221 &amp;lt;navn&gt;Fartsgrense&amp;lt;/navn&gt;
222 106
223 &amp;lt;navn&gt;Vinterdriftsstrategi&amp;lt;/navn&gt;
224 172
225 &amp;lt;navn&gt;Trafikkdeler&amp;lt;/navn&gt;
226 241
227 &amp;lt;navn&gt;Vegdekke&amp;lt;/navn&gt;
228 293
229 &amp;lt;navn&gt;Breddemåling&amp;lt;/navn&gt;
230 301
231 &amp;lt;navn&gt;Kantklippareal&amp;lt;/navn&gt;
232 318
233 &amp;lt;navn&gt;Snø-/isrydding&amp;lt;/navn&gt;
234 445
235 &amp;lt;navn&gt;Skred&amp;lt;/navn&gt;
236 446
237 &amp;lt;navn&gt;Dokumentasjon&amp;lt;/navn&gt;
238 452
239 &amp;lt;navn&gt;Undergang&amp;lt;/navn&gt;
240 528
241 &amp;lt;navn&gt;Tverrprofil&amp;lt;/navn&gt;
242 532
243 &amp;lt;navn&gt;Vegreferanse&amp;lt;/navn&gt;
244 534
245 &amp;lt;navn&gt;Region&amp;lt;/navn&gt;
246 535
247 &amp;lt;navn&gt;Fylke&amp;lt;/navn&gt;
248 536
249 &amp;lt;navn&gt;Kommune&amp;lt;/navn&gt;
250 538
251 &amp;lt;navn&gt;Gate&amp;lt;/navn&gt;
252 539
253 &amp;lt;navn&gt;Transportlenke&amp;lt;/navn&gt;
254 540
255 &amp;lt;navn&gt;Trafikkmengde&amp;lt;/navn&gt;
256 570
257 &amp;lt;navn&gt;Trafikkulykke&amp;lt;/navn&gt;
258 571
259 &amp;lt;navn&gt;Ulykkesinvolvert enhet&amp;lt;/navn&gt;
260 572
261 &amp;lt;navn&gt;Ulykkesinvolvert person&amp;lt;/navn&gt;
262 579
263 &amp;lt;navn&gt;Politidistrikt&amp;lt;/navn&gt;
264 583
265 &amp;lt;navn&gt;Vegbredde&amp;lt;/navn&gt;
266 591
267 &amp;lt;navn&gt;Høydebegrensning&amp;lt;/navn&gt;
268 592
269 &amp;lt;navn&gt;Nedbøyningsmåling&amp;lt;/navn&gt;
270 597
271 &amp;lt;navn&gt;Støy-luft, Strekningsdata&amp;lt;/navn&gt;
272 601
273 &amp;lt;navn&gt;Oppgravingsdata&amp;lt;/navn&gt;
274 602
275 &amp;lt;navn&gt;Oppgravingslag&amp;lt;/navn&gt;
276 603
277 &amp;lt;navn&gt;PMS-parsell&amp;lt;/navn&gt;
278 604
279 &amp;lt;navn&gt;Vegnormalstrekning&amp;lt;/navn&gt;
280 605
281 &amp;lt;navn&gt;Værrelatert strekning&amp;lt;/navn&gt;
282 616
283 &amp;lt;navn&gt;Feltstrekning&amp;lt;/navn&gt;
284 617
285 &amp;lt;navn&gt;Adressepunkt&amp;lt;/navn&gt;
286 626
287 &amp;lt;navn&gt;Friksjonsmåleserie&amp;lt;/navn&gt;
288 629
289 &amp;lt;navn&gt;Vegdekke, flatelapping&amp;lt;/navn&gt;
290 639
291 &amp;lt;navn&gt;Kurvatur, horisontalelement&amp;lt;/navn&gt;
292 640
293 &amp;lt;navn&gt;Kurvatur, vertikalelement&amp;lt;/navn&gt;
294 642
295 &amp;lt;navn&gt;Kurvatur, vertikalpunkt&amp;lt;/navn&gt;
296 643
297 &amp;lt;navn&gt;Statistikk, trafikkmengde&amp;lt;/navn&gt;
298 647
299 &amp;lt;navn&gt;Statistikk, vegbredde&amp;lt;/navn&gt;
300 774
301 &amp;lt;navn&gt;Nedbøyningsmåleserie&amp;lt;/navn&gt;
302 775
303 &amp;lt;navn&gt;ATK, influensstrekning&amp;lt;/navn&gt;
304 794
305 &amp;lt;navn&gt;Systemobjekt&amp;lt;/navn&gt;
306 810
307 &amp;lt;navn&gt;Vinterdriftsklasse&amp;lt;/navn&gt;
308 821
309 &amp;lt;navn&gt;Funksjonell vegklasse&amp;lt;/navn&gt;
310 825
311 &amp;lt;navn&gt;Kurvatur, stigning&amp;lt;/navn&gt;
312 838
313 &amp;lt;navn&gt;Vegbredde, beregnet&amp;lt;/navn&gt;
314 862
315 &amp;lt;navn&gt;Reisetidsregistreringspunkt&amp;lt;/navn&gt;
316 871
317 &amp;lt;navn&gt;Bruksklasse&amp;lt;/navn&gt;
318 &lt;/pre&gt;&lt;/blockquote&gt;
319
320 &lt;p&gt;Av disse ser ID 775 og 862 mest relevant ut. ID 775 antar jeg
321 refererer til fotoboksen som står like ved brua, mens
322 «Reisetidsregistreringspunkt» kanskje kan være boksen som henger der.
323 Hvordan finner jeg så ut hva dette kan være for noe. En titt på
324 &lt;a href=&quot;http://labs.vegdata.no/nvdb-datakatalog/862-Reisetidsregistreringspunkt/&quot;&gt;datakatalogsiden
325 for ID 862/Reisetidsregistreringspunkt&lt;/a&gt; viser at det er finnes 53
326 slike målere i Norge, og hvor de er plassert, men gir ellers få
327 detaljer. Det er plassert 40 på østlandet og 13 i Trondheimsregionen.
328 Men siden nevner «AutoPASS», og hvis en slår opp oppføringen på
329 Sollihøgda nevner den «Ciber AS» som ID for eksternt system. (Kan det
330 være snakk om
331 &lt;a href=&quot;http://www.proff.no/selskap/ciber-norge-as/oslo/internettdesign-og-programmering/Z0I3KMF4/&quot;&gt;Ciber
332 Norge AS&lt;/a&gt;, et selskap eid av Ciber Europe Bv?) Et nettsøk på
333 «Ciber AS autopass» fører meg til en artikkel fra NRK Trøndelag i
334 2013 med tittel
335 «&lt;a href=&quot;http://www.nrk.no/trondelag/sjekk-dette-hvis-du-vil-unnga-ko-1.11327947&quot;&gt;Sjekk
336 dette hvis du vil unngå kø&lt;/a&gt;». Artikkelen henviser til vegvesenets
337 nettside
338 &lt;a href=&quot;http://www.reisetider.no/reisetid/forside.html&quot;&gt;reisetider.no&lt;/a&gt;
339 som har en
340 &lt;a href=&quot;http://www.reisetider.no/reisetid/omrade.html?omrade=5&quot;&gt;kartside
341 for Østlandet&lt;/a&gt; som viser at det måles mellom Sandvika og Sollihøgda.
342 Det kan dermed se ut til at jeg har funnet ut hva boksene gjør.&lt;/p&gt;
343
344 &lt;p&gt;Hvis det stemmer, så er dette bokser som leser av AutoPASS-ID-en
345 til alle passerende biler med AutoPASS-brikke, og dermed gjør det mulig
346 for de som kontrollerer boksene å holde rede på hvor en gitt bil er
347 når den passerte et slikt målepunkt. NRK-artikkelen forteller at
348 denne informasjonen i dag kun brukes til å koble to
349 AutoPASS-brikkepasseringer passeringer sammen for å beregne
350 reisetiden, og at bruken er godkjent av Datatilsynet. Det er desverre
351 ikke mulig for en sjåfør som passerer under en slik boks å kontrollere
352 at AutoPASS-ID-en kun brukes til dette i dag og i fremtiden.&lt;/p&gt;
353
354 &lt;p&gt;I tillegg til denne type AutoPASS-sniffere vet jeg at det også
355 finnes mange automatiske stasjoner som tar betalt pr. passering (aka
356 bomstasjoner), og der lagres informasjon om tid, sted og bilnummer i
357 10 år. Finnes det andre slike sniffere plassert ut på veiene?&lt;/p&gt;
358
359 &lt;p&gt;Personlig har jeg valgt å ikke bruke AutoPASS-brikke, for å gjøre
360 det vanskeligere og mer kostbart for de som vil invadere privatsfæren
361 og holde rede på hvor bilen min beveger seg til enhver tid. Jeg håper
362 flere vil gjøre det samme, selv om det gir litt høyere private
363 utgifter (dyrere bompassering). Vern om privatsfæren koster i disse
364 dager.&lt;/p&gt;
365
366 &lt;p&gt;Takk til Jan Kristian Jensen i Statens Vegvesen for tips om
367 dokumentasjon på vegvesenets REST-API.&lt;/p&gt;
368 </description>
369 </item>
370
371 <item>
372 <title>Speeding up the Debian installer using eatmydata and dpkg-divert</title>
373 <link>http://people.skolelinux.org/pere/blog/Speeding_up_the_Debian_installer_using_eatmydata_and_dpkg_divert.html</link>
374 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Speeding_up_the_Debian_installer_using_eatmydata_and_dpkg_divert.html</guid>
375 <pubDate>Tue, 16 Sep 2014 14:00:00 +0200</pubDate>
376 <description>&lt;p&gt;The &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian&lt;/a&gt; installer could be
377 a lot quicker. When we install more than 2000 packages in
378 &lt;a href=&quot;http://www.skolelinux.org/&quot;&gt;Skolelinux / Debian Edu&lt;/a&gt; using
379 tasksel in the installer, unpacking the binary packages take forever.
380 A part of the slow I/O issue was discussed in
381 &lt;a href=&quot;https://bugs.debian.org/613428&quot;&gt;bug #613428&lt;/a&gt; about too
382 much file system sync-ing done by dpkg, which is the package
383 responsible for unpacking the binary packages. Other parts (like code
384 executed by postinst scripts) might also sync to disk during
385 installation. All this sync-ing to disk do not really make sense to
386 me. If the machine crash half-way through, I start over, I do not try
387 to salvage the half installed system. So the failure sync-ing is
388 supposed to protect against, hardware or system crash, is not really
389 relevant while the installer is running.&lt;/p&gt;
390
391 &lt;p&gt;A few days ago, I thought of a way to get rid of all the file
392 system sync()-ing in a fairly non-intrusive way, without the need to
393 change the code in several packages. The idea is not new, but I have
394 not heard anyone propose the approach using dpkg-divert before. It
395 depend on the small and clever package
396 &lt;a href=&quot;https://packages.qa.debian.org/eatmydata&quot;&gt;eatmydata&lt;/a&gt;, which
397 uses LD_PRELOAD to replace the system functions for syncing data to
398 disk with functions doing nothing, thus allowing programs to live
399 dangerous while speeding up disk I/O significantly. Instead of
400 modifying the implementation of dpkg, apt and tasksel (which are the
401 packages responsible for selecting, fetching and installing packages),
402 it occurred to me that we could just divert the programs away, replace
403 them with a simple shell wrapper calling
404 &quot;eatmydata&amp;nbsp;$program&amp;nbsp;$@&quot;, to get the same effect.
405 Two days ago I decided to test the idea, and wrapped up a simple
406 implementation for the Debian Edu udeb.&lt;/p&gt;
407
408 &lt;p&gt;The effect was stunning. In my first test it reduced the running
409 time of the pkgsel step (installing tasks) from 64 to less than 44
410 minutes (20 minutes shaved off the installation) on an old Dell
411 Latitude D505 machine. I am not quite sure what the optimised time
412 would have been, as I messed up the testing a bit, causing the debconf
413 priority to get low enough for two questions to pop up during
414 installation. As soon as I saw the questions I moved the installation
415 along, but do not know how long the question were holding up the
416 installation. I did some more measurements using Debian Edu Jessie,
417 and got these results. The time measured is the time stamp in
418 /var/log/syslog between the &quot;pkgsel: starting tasksel&quot; and the
419 &quot;pkgsel: finishing up&quot; lines, if you want to do the same measurement
420 yourself. In Debian Edu, the tasksel dialog do not show up, and the
421 timing thus do not depend on how quickly the user handle the tasksel
422 dialog.&lt;/p&gt;
423
424 &lt;p&gt;&lt;table&gt;
425
426 &lt;tr&gt;
427 &lt;th&gt;Machine/setup&lt;/th&gt;
428 &lt;th&gt;Original tasksel&lt;/th&gt;
429 &lt;th&gt;Optimised tasksel&lt;/th&gt;
430 &lt;th&gt;Reduction&lt;/th&gt;
431 &lt;/tr&gt;
432
433 &lt;tr&gt;
434 &lt;td&gt;Latitude D505 Main+LTSP LXDE&lt;/td&gt;
435 &lt;td&gt;64 min (07:46-08:50)&lt;/td&gt;
436 &lt;td&gt;&lt;44 min (11:27-12:11)&lt;/td&gt;
437 &lt;td&gt;&gt;20 min 18%&lt;/td&gt;
438 &lt;/tr&gt;
439
440 &lt;tr&gt;
441 &lt;td&gt;Latitude D505 Roaming LXDE&lt;/td&gt;
442 &lt;td&gt;57 min (08:48-09:45)&lt;/td&gt;
443 &lt;td&gt;34 min (07:43-08:17)&lt;/td&gt;
444 &lt;td&gt;23 min 40%&lt;/td&gt;
445 &lt;/tr&gt;
446
447 &lt;tr&gt;
448 &lt;td&gt;Latitude D505 Minimal&lt;/td&gt;
449 &lt;td&gt;22 min (10:37-10:59)&lt;/td&gt;
450 &lt;td&gt;11 min (11:16-11:27)&lt;/td&gt;
451 &lt;td&gt;11 min 50%&lt;/td&gt;
452 &lt;/tr&gt;
453
454 &lt;tr&gt;
455 &lt;td&gt;Thinkpad X200 Minimal&lt;/td&gt;
456 &lt;td&gt;6 min (08:19-08:25)&lt;/td&gt;
457 &lt;td&gt;4 min (08:04-08:08)&lt;/td&gt;
458 &lt;td&gt;2 min 33%&lt;/td&gt;
459 &lt;/tr&gt;
460
461 &lt;tr&gt;
462 &lt;td&gt;Thinkpad X200 Roaming KDE&lt;/td&gt;
463 &lt;td&gt;19 min (09:21-09:40)&lt;/td&gt;
464 &lt;td&gt;15 min (10:25-10:40)&lt;/td&gt;
465 &lt;td&gt;4 min 21%&lt;/td&gt;
466 &lt;/tr&gt;
467
468 &lt;/table&gt;&lt;/p&gt;
469
470 &lt;p&gt;The test is done using a netinst ISO on a USB stick, so some of the
471 time is spent downloading packages. The connection to the Internet
472 was 100Mbit/s during testing, so downloading should not be a
473 significant factor in the measurement. Download typically took a few
474 seconds to a few minutes, depending on the amount of packages being
475 installed.&lt;/p&gt;
476
477 &lt;p&gt;The speedup is implemented by using two hooks in
478 &lt;a href=&quot;https://www.debian.org/devel/debian-installer/&quot;&gt;Debian
479 Installer&lt;/a&gt;, the pre-pkgsel.d hook to set up the diverts, and the
480 finish-install.d hook to remove the divert at the end of the
481 installation. I picked the pre-pkgsel.d hook instead of the
482 post-base-installer.d hook because I test using an ISO without the
483 eatmydata package included, and the post-base-installer.d hook in
484 Debian Edu can only operate on packages included in the ISO. The
485 negative effect of this is that I am unable to activate this
486 optimization for the kernel installation step in d-i. If the code is
487 moved to the post-base-installer.d hook, the speedup would be larger
488 for the entire installation.&lt;/p&gt;
489
490 &lt;p&gt;I&#39;ve implemented this in the
491 &lt;a href=&quot;https://packages.qa.debian.org/debian-edu-install&quot;&gt;debian-edu-install&lt;/a&gt;
492 git repository, and plan to provide the optimization as part of the
493 Debian Edu installation. If you want to test this yourself, you can
494 create two files in the installer (or in an udeb). One shell script
495 need do go into /usr/lib/pre-pkgsel.d/, with content like this:&lt;/p&gt;
496
497 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
498 #!/bin/sh
499 set -e
500 . /usr/share/debconf/confmodule
501 info() {
502 logger -t my-pkgsel &quot;info: $*&quot;
503 }
504 error() {
505 logger -t my-pkgsel &quot;error: $*&quot;
506 }
507 override_install() {
508 apt-install eatmydata || true
509 if [ -x /target/usr/bin/eatmydata ] ; then
510 for bin in dpkg apt-get aptitude tasksel ; do
511 file=/usr/bin/$bin
512 # Test that the file exist and have not been diverted already.
513 if [ -f /target$file ] ; then
514 info &quot;diverting $file using eatmydata&quot;
515 printf &quot;#!/bin/sh\neatmydata $bin.distrib \&quot;\$@\&quot;\n&quot; \
516 &gt; /target$file.edu
517 chmod 755 /target$file.edu
518 in-target dpkg-divert --package debian-edu-config \
519 --rename --quiet --add $file
520 ln -sf ./$bin.edu /target$file
521 else
522 error &quot;unable to divert $file, as it is missing.&quot;
523 fi
524 done
525 else
526 error &quot;unable to find /usr/bin/eatmydata after installing the eatmydata pacage&quot;
527 fi
528 }
529
530 override_install
531 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
532
533 &lt;p&gt;To clean up, another shell script should go into
534 /usr/lib/finish-install.d/ with code like this:
535
536 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
537 #! /bin/sh -e
538 . /usr/share/debconf/confmodule
539 error() {
540 logger -t my-finish-install &quot;error: $@&quot;
541 }
542 remove_install_override() {
543 for bin in dpkg apt-get aptitude tasksel ; do
544 file=/usr/bin/$bin
545 if [ -x /target$file.edu ] ; then
546 rm /target$file
547 in-target dpkg-divert --package debian-edu-config \
548 --rename --quiet --remove $file
549 rm /target$file.edu
550 else
551 error &quot;Missing divert for $file.&quot;
552 fi
553 done
554 sync # Flush file buffers before continuing
555 }
556
557 remove_install_override
558 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
559
560 &lt;p&gt;In Debian Edu, I placed both code fragments in a separate script
561 edu-eatmydata-install and call it from the pre-pkgsel.d and
562 finish-install.d scripts.&lt;/p&gt;
563
564 &lt;p&gt;By now you might ask if this change should get into the normal
565 Debian installer too? I suspect it should, but am not sure the
566 current debian-installer coordinators find it useful enough. It also
567 depend on the side effects of the change. I&#39;m not aware of any, but I
568 guess we will see if the change is safe after some more testing.
569 Perhaps there is some package in Debian depending on sync() and
570 fsync() having effect? Perhaps it should go into its own udeb, to
571 allow those of us wanting to enable it to do so without affecting
572 everyone.&lt;/p&gt;
573
574 &lt;p&gt;Update 2014-09-24: Since a few days ago, enabling this optimization
575 will break installation of all programs using gnutls because of
576 &lt;a href=&quot;https://bugs.debian.org/702711&quot;&gt;bug #702711&lt;/a&gt;. An updated
577 eatmydata package in Debian will solve it.&lt;/p&gt;
578
579 &lt;p&gt;Update 2014-10-17: The bug mentioned above is fixed in testing and
580 the optimization work again. And I have discovered that the
581 dpkg-divert trick is not really needed and implemented a slightly
582 simpler approach as part of the debian-edu-install package. See
583 tools/edu-eatmydata-install in the source package.&lt;/p&gt;
584 </description>
585 </item>
586
587 <item>
588 <title>Good bye subkeys.pgp.net, welcome pool.sks-keyservers.net</title>
589 <link>http://people.skolelinux.org/pere/blog/Good_bye_subkeys_pgp_net__welcome_pool_sks_keyservers_net.html</link>
590 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Good_bye_subkeys_pgp_net__welcome_pool_sks_keyservers_net.html</guid>
591 <pubDate>Wed, 10 Sep 2014 13:10:00 +0200</pubDate>
592 <description>&lt;p&gt;Yesterday, I had the pleasure of attending a talk with the
593 &lt;a href=&quot;http://www.nuug.no/&quot;&gt;Norwegian Unix User Group&lt;/a&gt; about
594 &lt;a href=&quot;http://www.nuug.no/aktiviteter/20140909-sks-keyservers/&quot;&gt;the
595 OpenPGP keyserver pool sks-keyservers.net&lt;/a&gt;, and was very happy to
596 learn that there is a large set of publicly available key servers to
597 use when looking for peoples public key. So far I have used
598 subkeys.pgp.net, and some times wwwkeys.nl.pgp.net when the former
599 were misbehaving, but those days are ended. The servers I have used
600 up until yesterday have been slow and some times unavailable. I hope
601 those problems are gone now.&lt;/p&gt;
602
603 &lt;p&gt;Behind the round robin DNS entry of the
604 &lt;a href=&quot;https://sks-keyservers.net/&quot;&gt;sks-keyservers.net&lt;/a&gt; service
605 there is a pool of more than 100 keyservers which are checked every
606 day to ensure they are well connected and up to date. It must be
607 better than what I have used so far. :)&lt;/p&gt;
608
609 &lt;p&gt;Yesterdays speaker told me that the service is the default
610 keyserver provided by the default configuration in GnuPG, but this do
611 not seem to be used in Debian. Perhaps it should?&lt;/p&gt;
612
613 &lt;p&gt;Anyway, I&#39;ve updated my ~/.gnupg/options file to now include this
614 line:&lt;/p&gt;
615
616 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
617 keyserver pool.sks-keyservers.net
618 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
619
620 &lt;p&gt;With GnuPG version 2 one can also locate the keyserver using SRV
621 entries in DNS. Just for fun, I did just that at work, so now every
622 user of GnuPG at the University of Oslo should find a OpenGPG
623 keyserver automatically should their need it:&lt;/p&gt;
624
625 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
626 % host -t srv _pgpkey-http._tcp.uio.no
627 _pgpkey-http._tcp.uio.no has SRV record 0 100 11371 pool.sks-keyservers.net.
628 %
629 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
630
631 &lt;p&gt;Now if only
632 &lt;a href=&quot;http://ietfreport.isoc.org/idref/draft-shaw-openpgp-hkp/&quot;&gt;the
633 HKP lookup protocol&lt;/a&gt; supported finding signature paths, I would be
634 very happy. It can look up a given key or search for a user ID, but I
635 normally do not want that, but to find a trust path from my key to
636 another key. Given a user ID or key ID, I would like to find (and
637 download) the keys representing a signature path from my key to the
638 key in question, to be able to get a trust path between the two keys.
639 This is as far as I can tell not possible today. Perhaps something
640 for a future version of the protocol?&lt;/p&gt;
641 </description>
642 </item>
643
644 </channel>
645 </rss>