1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/' xmlns:
atom=
"http://www.w3.org/2005/Atom">
4 <title>Petter Reinholdtsen
</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
7 <atom:link href=
"http://people.skolelinux.org/pere/blog/index.rss" rel=
"self" type=
"application/rss+xml" />
10 <title>New chrpath release
0.15</title>
11 <link>http://people.skolelinux.org/pere/blog/New_chrpath_release_0_15.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/New_chrpath_release_0_15.html
</guid>
13 <pubDate>Sun,
24 Nov
2013 09:
30:
00 +
0100</pubDate>
14 <description><p
>After many years break from the package and a vain hope that
15 development would be continued by someone else, I finally pulled my
16 acts together this morning and wrapped up a new release of chrpath,
17 the command line tool to modify the rpath and runpath of already
18 compiled ELF programs. The update was triggered by the persistence of
19 Isha Vishnoi at IBM, which needed a new config.guess file to get
20 support for the ppc64le architecture (powerpc
64-bit Little Endian) he
21 is working on. I checked the
22 <a href=
"http://packages.qa.debian.org/chrpath
">Debian
</a
>,
23 <a href=
"https://launchpad.net/ubuntu/+source/chrpath
">Ubuntu
</a
> and
24 <a href=
"https://admin.fedoraproject.org/pkgdb/acls/name/chrpath
">Fedora
</a
>
25 packages for interesting patches (failed to find the source from
26 OpenSUSE and Mandriva packages), and found quite a few nice fixes.
27 These are the release notes:
</p
>
29 <p
>New in
0.15 released
2013-
11-
24:
</p
>
33 <li
>Updated config.sub and config.guess from the GNU project to work
34 with newer architectures. Thanks to isha vishnoi for the heads
37 <li
>Updated README with current URLs.
</li
>
39 <li
>Added byteswap fix found in Ubuntu, credited Jeremy Kerr and
40 Matthias Klose.
</li
>
42 <li
>Added missing help for -k|--keepgoing option, using patch by
43 Petr Machata found in Fedora.
</li
>
45 <li
>Rewrite removal of RPATH/RUNPATH to make sure the entry in
46 .dynamic is a NULL terminated string. Based on patch found in
47 Fedora credited Axel Thimm and Christian Krause.
</li
>
52 <a href=
"https://alioth.debian.org/frs/?group_id=
31052">download the
53 new version
0.15 from alioth
</a
>. Please let us know via the Alioth
54 project if something is wrong with the new release. The test suite
55 did not discover any old errors, so if you find a new one, please also
56 include a testsuite check.
</p
>
61 <title>RSS-kilde for fritekstsøk i offentlige anbud hos Doffin
</title>
62 <link>http://people.skolelinux.org/pere/blog/RSS_kilde_for_friteksts_k_i_offentlige_anbud_hos_Doffin.html
</link>
63 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/RSS_kilde_for_friteksts_k_i_offentlige_anbud_hos_Doffin.html
</guid>
64 <pubDate>Fri,
22 Nov
2013 13:
40:
00 +
0100</pubDate>
65 <description><p
>I fjor sommer lagde jeg en
66 <a href=
"http://people.skolelinux.org/pere/blog/SQL_database_med_anbud_publisert_p__Doffin.html
">offentlig
67 tilgjengelig SQL-database over offentlig anbud
</a
> basert på skraping
68 av HTML-data fra Doffin. Den har stått og gått siden da, og har nå
69 ca.
28000 oppføringer. Jeg oppdaget da jeg tittet innom at noen
70 oppføringer var ikke blitt med, antagelig på grunn av at de fikk
71 tildelt sekvensnummer i Doffin en godt stund før de ble publisert,
72 slik at min nettsideskraper som fortsatte skrapingen der den slapp
73 sist ikke fikk dem med seg. Jeg har fikset litt slik at skraperen nå
74 ser litt tilbake i tid for å se om den har gått glipp av noen
75 oppføringer, og har skrapet på nytt fra midten av september
2013 og
76 fremover. Det bør dermed bli en mer komplett database for kommende
77 måneder. Hvis jeg får tid skal jeg forsøke å skrape
"glemte
" data fra
78 før midten av september
2013, men tør ikke garantere at det blir
79 prioritert med det første.
</p
>
81 <p
>Men målet med denne bloggposten er å vise hvordan denne
82 Doffin-databasen kan brukes og integreres med en RSS-leser, slik at en
83 kan la datamaskinen holde et øye med Doffin-annonseringer etter
84 nøkkelord. En kan lage sitt eget søk ved å besøke
85 <ahref=
"https://classic.scraperwiki.com/docs/api?name=norwegian-doffin#sqlite
">API-et
86 hos Scraperwiki
</a
>, velge format rss2 og så legge inn noe ala dette i
87 "query in SQL
":
</p
>
90 select title, scrapedurl as link, abstract as description,
91 publishdate as pubDate from
'swdata
'
92 where abstract like
'%linux%
' or title like
'%linux%
'
93 order by seq desc limit
20
94 </pre
></p
>
96 <p
>Dette vil søke opp alle anbud med ordet linux i oppsummering eller
97 tittel. En kan lage mer avanserte søk hvis en ønsker det. URL-en som
98 dukker opp nederst på siden kan en så gi til sin RSS-leser (jeg bruker
99 akregator selv), og så automatisk få beskjed hvis det dukker opp anbud
100 med det aktuelle nøkkelordet i teksten. Merk at kapasiteten og
101 ytelsen hos Scraperwiki er begrenset, så ikke be RSS-leseren hente ned
102 oftere enn en gang hver dag.
</p
>
104 <p
>Du lurer kanskje på hva slags informasjon en kan få ut fra denne
105 databasen. Her er to RSS-kilder, med søkeordet
106 "<a href=
"https://api.scraperwiki.com/api/
1.0/datastore/sqlite?format=rss2
&name=norwegian-doffin
&query=select%
20title%
2C%
20scrapedurl%
20as%
20link%
2C%
20abstract%
20as%
20description%
2C%
0A%
20%
20%
20%
20%
20%
20%
20publishdate%
20as%
20pubDate%
20from%
20'swdata
'%
0A%
20%
20%
20where%
20abstract%
20like%
20'%
25linux%
25'%
20or%
20title%
20like%
20'%
25linux%
25'%
0A%
20%
20%
20order%
20by%
20seq%
20desc%
20limit%
2020">linux
</a
>",
108 "<a href=
"https://api.scraperwiki.com/api/
1.0/datastore/sqlite?format=rss2
&name=norwegian-doffin
&query=select%
20title%
2C%
20scrapedurl%
20as%
20link%
2C%
20abstract%
20as%
20description%
2C%
0A%
20%
20%
20%
20%
20%
20%
20publishdate%
20as%
20pubDate%
20from%
20'swdata
'%
0A%
20%
20%
20where%
20abstract%
20like%
20'%
25fri%
20programvare%
25'%
20or%
20title%
20like%
20'%
25fri%
20programvare%
25'%
0A%
20%
20%
20order%
20by%
20seq%
20desc%
20limit%
2020">fri
109 programvare
</a
>"
111 "<a href=
"https://api.scraperwiki.com/api/
1.0/datastore/sqlite?format=rss2
&name=norwegian-doffin
&query=select%
20title%
2C%
20scrapedurl%
20as%
20link%
2C%
20abstract%
20as%
20description%
2C%
0A%
20%
20%
20%
20%
20%
20%
20publishdate%
20as%
20pubDate%
20from%
20'swdata
'%
0A%
20%
20%
20where%
20abstract%
20like%
20'%
25odf%
25'%
20or%
20title%
20like%
20'%
25odf%
25'%
0A%
20%
20%
20order%
20by%
20seq%
20desc%
20limit%
2020">odf
</a
>".
112 Det er bare å søke på det en er interessert i. Kopier gjerne
113 datasettet og sett opp din egen tjeneste hvis du vil gjøre mer
114 avanserte søk. SQLite-filen med Doffin-oppføringer kan lastes med fra
115 Scraperwiki for de som vil grave dypere.
</p
>
120 <title>All drones should be radio marked with what they do and who they belong to
</title>
121 <link>http://people.skolelinux.org/pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html
</link>
122 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html
</guid>
123 <pubDate>Thu,
21 Nov
2013 15:
40:
00 +
0100</pubDate>
124 <description><p
>Drones, flying robots, are getting more and more popular. The most
125 know ones are the killer drones used by some government to murder
126 people they do not like without giving them the chance of a fair
127 trial, but the technology have many good uses too, from mapping and
128 forest maintenance to photography and search and rescue. I am sure it
129 is just a question of time before
"bad drones
" are in the hands of
130 private enterprises and not only state criminals but petty criminals
131 too. The drone technology is very useful and very dangerous. To have
132 some control over the use of drones, I agree with Daniel Suarez in his
134 "<a href=
"https://archive.org/details/DanielSuarez_2013G
">The kill
135 decision shouldn
't belong to a robot
</a
>", where he suggested this
136 little gem to keep the good while limiting the bad use of drones:
</p
>
140 <p
>Each robot and drone should have a cryptographically signed
141 I.D. burned in at the factory that can be used to track its movement
142 through public spaces. We have license plates on cars, tail numbers on
143 aircraft. This is no different. And every citizen should be able to
144 download an app that shows the population of drones and autonomous
145 vehicles moving through public spaces around them, both right now and
146 historically. And civic leaders should deploy sensors and civic drones
147 to detect rogue drones, and instead of sending killer drones of their
148 own up to shoot them down, they should notify humans to their
149 presence. And in certain very high-security areas, perhaps civic
150 drones would snare them and drag them off to a bomb disposal facility.
</p
>
152 <p
>But notice, this is more an immune system than a weapons system. It
153 would allow us to avail ourselves of the use of autonomous vehicles
154 and drones while still preserving our open, civil society.
</p
>
158 <p
>The key is that
<em
>every citizen
</em
> should be able to read the
159 radio beacons sent from the drones in the area, to be able to check
160 both the government and others use of drones. For such control to be
161 effective, everyone must be able to do it. What should such beacon
162 contain? At least formal owner, purpose, contact information and GPS
163 location. Probably also the origin and target position of the current
164 flight. And perhaps some registration number to be able to look up
165 the drone in a central database tracking their movement. Robots
166 should not have privacy. It is people who need privacy.
</p
>
171 <title>Lets make a wireless community network in Oslo!
</title>
172 <link>http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html
</link>
173 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Lets_make_a_wireless_community_network_in_Oslo_.html
</guid>
174 <pubDate>Wed,
13 Nov
2013 21:
00:
00 +
0100</pubDate>
175 <description><p
>Today NUUG and Hackeriet announced
176 <a href=
"http://www.nuug.no/news/Bli_med___bygge_dugnadsnett_for_alle_i_Oslo.shtml
">our
177 plans to join forces and create a wireless community network in
178 Oslo
</a
>. The workshop to help people get started will take place
179 Thursday
2013-
11-
28, but we already are collecting the geolocation of
180 people joining forces to make this happen. We have
181 <a href=
"https://github.com/petterreinholdtsen/meshfx-node/blob/master/oslo-nodes.geojson
">9
182 locations plotted on the map
</a
>, but we will need more before we have
183 a connected mesh spread across Oslo. If this sound interesting to
184 you, please join us at the workshop. If you are too impatient to wait
185 15 days, please join us on the IRC channel
186 <a href=
"irc://irc.freenode.net/%
23nuug
">#nuug on irc.freenode.net
</a
>
187 right away. :)
</p
>
192 <title>Running TP-Link MR3040 as a batman-adv mesh node using openwrt
</title>
193 <link>http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html
</link>
194 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html
</guid>
195 <pubDate>Sun,
10 Nov
2013 23:
00:
00 +
0100</pubDate>
196 <description><p
>Continuing my research into mesh networking, I was recommended to
197 use TP-Link
3040 and
3600 access points as mesh nodes, and the pair I
198 bought arrived on Friday. Here are my notes on how to set up the
199 MR3040 as a mesh node using
200 <a href=
"http://www.openwrt.org/
">OpenWrt
</a
>.
</p
>
202 <p
>I started by following the instructions on the OpenWRT wiki for
203 <a href=
"http://wiki.openwrt.org/toh/tp-link/tl-mr3040
">TL-MR3040
</a
>,
205 <a href=
"http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin
">the
206 recommended firmware image
</a
>
207 (openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and
208 uploaded it into the original web interface. The flashing went fine,
209 and the machine was available via telnet on the ethernet port. After
210 logging in and setting the root password, ssh was available and I
211 could start to set it up as a batman-adv mesh node.
</p
>
213 <p
>I started off by reading the instructions from
214 <a href=
"http://wirelessafrica.meraka.org.za/wiki/index.php?title=Antoine
's_Research
">Wireless
215 Africa
</a
>, which had quite a lot of useful information, but
216 eventually I followed the recipe from the Open Mesh wiki for
217 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config
">using
218 batman-adv on OpenWrt
</a
>. A small snag was the fact that the
219 <tt
>opkg install kmod-batman-adv
</tt
> command did not work as it
220 should. The batman-adv kernel module would fail to load because its
221 dependency crc16 was not already loaded. I
222 <a href=
"https://dev.openwrt.org/ticket/
14452">reported the bug
</a
> to
223 the openwrt project and hope it will be fixed soon. But the problem
224 only seem to affect initial testing of batman-adv, as configuration
225 seem to work when booting from scratch.
</p
>
227 <p
>The setup is done using files in /etc/config/. I did not bridge
228 the Ethernet and mesh interfaces this time, to be able to hook up the
229 box on my local network and log into it for configuration updates.
230 The following files were changed and look like this after modifying
233 <p
><tt
>/etc/config/network
</tt
></p
>
237 config interface
'loopback
'
238 option ifname
'lo
'
239 option proto
'static
'
240 option ipaddr
'127.0.0.1'
241 option netmask
'255.0.0.0'
243 config globals
'globals
'
244 option ula_prefix
'fdbf:
4c12:
3fed::/
48'
246 config interface
'lan
'
247 option ifname
'eth0
'
248 option type
'bridge
'
249 option proto
'dhcp
'
250 option ipaddr
'192.168.1.1'
251 option netmask
'255.255.255.0'
252 option hostname
'tl-mr3040
'
253 option ip6assign
'60'
255 config interface
'mesh
'
256 option ifname
'adhoc0
'
257 option mtu
'1528'
258 option proto
'batadv
'
259 option mesh
'bat0
'
262 <p
><tt
>/etc/config/wireless
</tt
></p
>
265 config wifi-device
'radio0
'
266 option type
'mac80211
'
267 option channel
'11'
268 option hwmode
'11ng
'
269 option path
'platform/ar933x_wmac
'
270 option htmode
'HT20
'
271 list ht_capab
'SHORT-GI-
20'
272 list ht_capab
'SHORT-GI-
40'
273 list ht_capab
'RX-STBC1
'
274 list ht_capab
'DSSS_CCK-
40'
275 option disabled
'0'
277 config wifi-iface
'wmesh
'
278 option device
'radio0
'
279 option ifname
'adhoc0
'
280 option network
'mesh
'
281 option encryption
'none
'
282 option mode
'adhoc
'
283 option bssid
'02:BA:
00:
00:
00:
01'
284 option ssid
'meshfx@hackeriet
'
286 <p
><tt
>/etc/config/batman-adv
</tt
></p
>
289 config
'mesh
' 'bat0
'
290 option interfaces
'adhoc0
'
291 option
'aggregated_ogms
'
292 option
'ap_isolation
'
293 option
'bonding
'
294 option
'fragmentation
'
295 option
'gw_bandwidth
'
296 option
'gw_mode
'
297 option
'gw_sel_class
'
298 option
'log_level
'
299 option
'orig_interval
'
300 option
'vis_mode
'
301 option
'bridge_loop_avoidance
'
302 option
'distributed_arp_table
'
303 option
'network_coding
'
304 option
'hop_penalty
'
306 # yet another batX instance
307 # config
'mesh
' 'bat5
'
308 # option
'interfaces
' 'second_mesh
'
311 <p
>The mesh node is now operational. I have yet to test its range,
312 but I hope it is good. I have not yet tested the TP-Link
3600 box
313 still wrapped up in plastic.
</p
>
318 <title>Debian init.d boot script example for rsyslog
</title>
319 <link>http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</link>
320 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</guid>
321 <pubDate>Sat,
2 Nov
2013 22:
40:
00 +
0100</pubDate>
322 <description><p
>If one of the points of switching to a new init system in Debian is
323 <a href=
"http://thomas.goirand.fr/blog/?p=
147">to get rid of huge
324 init.d scripts
</a
>, I doubt we need to switch away from sysvinit and
325 init.d scripts at all. Here is an example init.d script, ie a rewrite
326 of /etc/init.d/rsyslog:
</p
>
329 #!/lib/init/init-d-script
332 # Required-Start: $remote_fs $time
333 # Required-Stop: umountnfs $time
334 # X-Stop-After: sendsigs
335 # Default-Start:
2 3 4 5
336 # Default-Stop:
0 1 6
337 # Short-Description: enhanced syslogd
338 # Description: Rsyslog is an enhanced multi-threaded syslogd.
339 # It is quite compatible to stock sysklogd and can be
340 # used as a drop-in replacement.
342 DESC=
"enhanced syslogd
"
343 DAEMON=/usr/sbin/rsyslogd
344 </pre
></p
>
346 <p
>Pretty minimalistic to me... For the record, the original sysv-rc
347 script was
137 lines, and the above is just
15 lines, most of it meta
348 info/comments.
</p
>
350 <p
>How to do this, you ask? Well, one create a new script
351 /lib/init/init-d-script looking something like this:
356 # Define LSB log_* functions.
357 # Depend on lsb-base (
>=
3.2-
14) to ensure that this file is present
358 # and status_of_proc is working.
359 . /lib/lsb/init-functions
362 # Function that starts the daemon/service
368 #
0 if daemon has been started
369 #
1 if daemon was already running
370 #
2 if daemon could not be started
371 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test
> /dev/null \
373 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
376 # Add code here, if necessary, that waits for the process to be ready
377 # to handle requests from services started subsequently which depend
378 # on this one. As a last resort, sleep for some time.
382 # Function that stops the daemon/service
387 #
0 if daemon has been stopped
388 #
1 if daemon was already stopped
389 #
2 if daemon could not be stopped
390 # other if a failure occurred
391 start-stop-daemon --stop --quiet --retry=TERM/
30/KILL/
5 --pidfile $PIDFILE --name $NAME
392 RETVAL=
"$?
"
393 [
"$RETVAL
" =
2 ]
&& return
2
394 # Wait for children to finish too if this is a daemon that forks
395 # and if the daemon is only ever run from this initscript.
396 # If the above conditions are not satisfied then add some other code
397 # that waits for the process to drop all resources that could be
398 # needed by services started subsequently. A last resort is to
399 # sleep for some time.
400 start-stop-daemon --stop --quiet --oknodo --retry=
0/
30/KILL/
5 --exec $DAEMON
401 [
"$?
" =
2 ]
&& return
2
402 # Many daemons don
't delete their pidfiles when they exit.
404 return
"$RETVAL
"
408 # Function that sends a SIGHUP to the daemon/service
412 # If the daemon can reload its configuration without
413 # restarting (for example, when it is sent a SIGHUP),
414 # then implement that here.
416 start-stop-daemon --stop --signal
1 --quiet --pidfile $PIDFILE --name $NAME
421 scriptbasename=
"$(basename $
1)
"
422 echo
"SN: $scriptbasename
"
423 if [
"$scriptbasename
" !=
"init-d-library
" ] ; then
424 script=
"$
1"
431 NAME=$(basename $DAEMON)
432 PIDFILE=/var/run/$NAME.pid
434 # Exit if the package is not installed
435 #[ -x
"$DAEMON
" ] || exit
0
437 # Read configuration variable file if it is present
438 [ -r /etc/default/$NAME ]
&& . /etc/default/$NAME
440 # Load the VERBOSE setting and other rcS variables
443 case
"$
1" in
445 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Starting $DESC
" "$NAME
"
447 case
"$?
" in
448 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
449 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
453 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Stopping $DESC
" "$NAME
"
455 case
"$?
" in
456 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
457 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
461 status_of_proc
"$DAEMON
" "$NAME
" && exit
0 || exit $?
463 #reload|force-reload)
465 # If do_reload() is not implemented then leave this commented out
466 # and leave
'force-reload
' as an alias for
'restart
'.
468 #log_daemon_msg
"Reloading $DESC
" "$NAME
"
472 restart|force-reload)
474 # If the
"reload
" option is implemented then remove the
475 #
'force-reload
' alias
477 log_daemon_msg
"Restarting $DESC
" "$NAME
"
479 case
"$?
" in
482 case
"$?
" in
484 1) log_end_msg
1 ;; # Old process is still running
485 *) log_end_msg
1 ;; # Failed to start
495 echo
"Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}
" >&2
501 </pre
></p
>
503 <p
>It is based on /etc/init.d/skeleton, and could be improved quite a
504 lot. I did not really polish the approach, so it might not always
505 work out of the box, but you get the idea. I did not try very hard to
506 optimize it nor make it more robust either.
</p
>
508 <p
>A better argument for switching init system in Debian than reducing
509 the size of init scripts (which is a good thing to do anyway), is to
510 get boot system that is able to handle the kernel events sensibly and
511 robustly, and do not depend on the boot to run sequentially. The boot
512 and the kernel have not behaved sequentially in years.
</p
>
517 <title>Browser plugin for SPICE (spice-xpi) uploaded to Debian
</title>
518 <link>http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html
</link>
519 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Browser_plugin_for_SPICE__spice_xpi__uploaded_to_Debian.html
</guid>
520 <pubDate>Fri,
1 Nov
2013 11:
00:
00 +
0100</pubDate>
521 <description><p
><a href=
"http://www.spice-space.org/
">The SPICE protocol
</a
> for
522 remote display access is the preferred solution with oVirt and RedHat
523 Enterprise Virtualization, and I was sad to discover the other day
524 that the browser plugin needed to use these systems seamlessly was
525 missing in Debian. The
<a href=
"http://bugs.debian.org/
668284">request
526 for a package
</a
> was from
2012-
04-
10 with no progress since
527 2013-
04-
01, so I decided to wrap up a package based on the great work
528 from Cajus Pollmeier and put it in a collab-maint maintained git
529 repository to get a package I could use. I would very much like
530 others to help me maintain the package (or just take over, I do not
531 mind), but as no-one had volunteered so far, I just uploaded it to
532 NEW. I hope it will be available in Debian in a few days.
</p
>
534 <p
>The source is now available from
535 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary
">http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary
</a
>.
</p
>
540 <title>Teaching vmdebootstrap to create Raspberry Pi SD card images
</title>
541 <link>http://people.skolelinux.org/pere/blog/Teaching_vmdebootstrap_to_create_Raspberry_Pi_SD_card_images.html
</link>
542 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Teaching_vmdebootstrap_to_create_Raspberry_Pi_SD_card_images.html
</guid>
543 <pubDate>Sun,
27 Oct
2013 17:
00:
00 +
0100</pubDate>
544 <description><p
>The
545 <a href=
"http://packages.qa.debian.org/v/vmdebootstrap.html
">vmdebootstrap
</a
>
546 program is a a very nice system to create virtual machine images. It
547 create a image file, add a partition table, mount it and run
548 debootstrap in the mounted directory to create a Debian system on a
549 stick. Yesterday, I decided to try to teach it how to make images for
550 <a href=
"https://wiki.debian.org/RaspberryPi
">Raspberry Pi
</a
>, as part
551 of a plan to simplify the build system for
552 <a href=
"https://wiki.debian.org/FreedomBox
">the FreedomBox
553 project
</a
>. The FreedomBox project already uses vmdebootstrap for
554 the virtualbox images, but its current build system made multistrap
555 based system for Dreamplug images, and it is lacking support for
556 Raspberry Pi.
</p
>
558 <p
>Armed with the knowledge on how to build
"foreign
" (aka non-native
559 architecture) chroots for Raspberry Pi, I dived into the vmdebootstrap
560 code and adjusted it to be able to build armel images on my amd64
561 Debian laptop. I ended up giving vmdebootstrap five new options,
562 allowing me to replicate the image creation process I use to make
563 <a href=
"http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
">Debian
564 Jessie based mesh node images for the Raspberry Pi
</a
>. First, the
565 <tt
>--foreign /path/to/binfm_handler
</tt
> option tell vmdebootstrap to
566 call debootstrap with --foreign and to copy the handler into the
567 generated chroot before running the second stage. This allow
568 vmdebootstrap to create armel images on an amd64 host. Next I added
569 two new options
<tt
>--bootsize size
</tt
> and
<tt
>--boottype
570 fstype
</tt
> to teach it to create a separate /boot/ partition with the
571 given file system type, allowing me to create an image with a vfat
572 partition for the /boot/ stuff. I also added a
<tt
>--variant
573 variant
</tt
> option to allow me to create smaller images without the
574 Debian base system packages installed. Finally, I added an option
575 <tt
>--no-extlinux
</tt
> to tell vmdebootstrap to not install extlinux
576 as a boot loader. It is not needed on the Raspberry Pi and probably
577 most other non-x86 architectures. The changes were accepted by the
578 upstream author of vmdebootstrap yesterday and today, and is now
580 <a href=
"http://git.liw.fi/cgi-bin/cgit/cgit.cgi/vmdebootstrap/
">the
581 upstream project page
</a
>.
</p
>
583 <p
>To use it to build a Raspberry Pi image using Debian Jessie, first
584 create a small script (the customize script) to add the non-free
585 binary blob needed to boot the Raspberry Pi and the APT source
590 set -e # Exit on first error
591 rootdir=
"$
1"
592 cd
"$rootdir
"
593 cat
&lt;
&lt;EOF
> etc/apt/sources.list
594 deb http://http.debian.net/debian/ jessie main contrib non-free
596 # Install non-free binary blob needed to boot Raspberry Pi. This
597 # install a kernel somewhere too.
598 wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update \
599 -O $rootdir/usr/bin/rpi-update
600 chmod a+x $rootdir/usr/bin/rpi-update
601 mkdir -p $rootdir/lib/modules
602 touch $rootdir/boot/start.elf
603 chroot $rootdir rpi-update
604 </pre
></p
>
606 <p
>Next, fetch the latest vmdebootstrap script and call it like this
607 to build the image:
</p
>
610 sudo ./vmdebootstrap \
613 --distribution jessie \
614 --mirror http://http.debian.net/debian \
623 --root-password raspberry \
624 --hostname raspberrypi \
625 --foreign /usr/bin/qemu-arm-static \
626 --customize `pwd`/customize \
630 --package ca-certificates \
633 </pre
></p
>
635 <p
>The list of packages being installed are the ones needed by
636 rpi-update to make the image bootable on the Raspberry Pi, with the
637 exception of netbase, which is needed by debootstrap to find
638 /etc/hosts with the minbase variant. I really wish there was a way to
639 set up an Raspberry Pi using only packages in the Debian archive, but
640 that is not possible as far as I know, because it boots from the GPU
641 using a non-free binary blob.
</p
>
643 <p
>The build host need debootstrap, kpartx and qemu-user-static and
644 probably a few others installed. I have not checked the complete
645 build dependency list.
</p
>
647 <p
>The resulting image will not use the hardware floating point unit
648 on the Raspberry PI, because the armel architecture in Debian is not
649 optimized for that use. So the images created will be a bit slower
650 than
<a href=
"http://www.raspbian.org/
">Raspbian
</a
> based images.
</p
>
655 <title>Det er jo makta som er mest sårbar ved massiv overvåkning av Internett
</title>
656 <link>http://people.skolelinux.org/pere/blog/Det_er_jo_makta_som_er_mest_s_rbar_ved_massiv_overv_kning_av_Internett.html
</link>
657 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Det_er_jo_makta_som_er_mest_s_rbar_ved_massiv_overv_kning_av_Internett.html
</guid>
658 <pubDate>Sat,
26 Oct
2013 20:
30:
00 +
0200</pubDate>
659 <description><p
>De siste måneders eksponering av
660 <a href=
"http://www.aftenposten.no/nyheter/uriks/Her-er-Edvard-Snowdens-mest-omtalte-avsloringer-
7351734.html
">den
661 totale overvåkningen som foregår i den vestlige verden dokumenterer
662 hvor sårbare vi er
</a
>. Men det slår meg at de som er mest sårbare
663 for dette, myndighetspersoner på alle nivåer, neppe har innsett at de
664 selv er de mest interessante personene å lage profiler på, for å kunne
665 påvirke dem.
</p
>
667 <p
>For å ta et lite eksempel: Stortingets nettsted,
668 <a href=
"http://www.stortinget.no/
">www.stortinget.no
</a
> (og
670 <a href=
"http://data.stortinget.no/
">data.stortinget.no
</a
>),
671 inneholder informasjon om det som foregår på Stortinget, og jeg antar
672 de største brukerne av informasjonen der er representanter og
673 rådgivere på Stortinget. Intet overraskende med det. Det som derimot
674 er mer skjult er at Stortingets nettsted bruker
675 <a href=
"http://en.wikipedia.org/wiki/Google_Analytics
">Google
676 Analytics
</a
>, hvilket gjør at enhver som besøker nettsidene der også
677 rapporterer om besøket via Internett-linjer som passerer Sverige,
678 England og videre til USA. Det betyr at informasjon om ethvert besøk
679 på stortingets nettsider kan snappes opp av svensk, britisk og USAs
680 etterretningsvesen. De kan dermed holde et øye med hvilke
681 Stortingssaker stortingsrepresentantene synes er interessante å sjekke
682 ut, og hvilke sider rådgivere og andre på stortinget synes er
683 interessant å besøke, når de gjør det og hvilke andre representanter
684 som sjekker de samme sidene omtrent samtidig. Stortingets bruk av
685 Google Analytics gjør det dermed enkelt for utenlands etteretning å
686 spore representantenes aktivitet og interesse. Hvis noen av
687 representantene bruker Google Mail eller noen andre tjenestene som
688 krever innlogging, så vil det være enda enklere å finne ut nøyaktig
689 hvilke personer som bruker hvilke nettlesere og dermed knytte
690 informasjonen opp til enkeltpersoner på Stortinget.
</p
>
692 <p
>Og jo flere nettsteder som bruker Google Analytics, jo bedre
693 oversikt over stortingsrepresentantenes lesevaner og interesse blir
694 tilgjengelig for svensk, britisk og USAs etterretning. Hva de kan
695 bruke den informasjonen til overlater jeg til leseren å undres
701 <title>A Raspberry Pi based batman-adv Mesh network node
</title>
702 <link>http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
</link>
703 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
</guid>
704 <pubDate>Mon,
21 Oct
2013 11:
40:
00 +
0200</pubDate>
705 <description><p
>The last few days I have been experimenting with
706 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki
">the
707 batman-adv mesh technology
</a
>. I want to gain some experience to see
708 if it will fit
<a href=
"https://wiki.debian.org/FreedomBox
">the
709 Freedombox project
</a
>, and together with my neighbors try to build a
710 mesh network around the park where I live. Batman-adv is a layer
2
711 mesh system (
"ethernet
" in other words), where the mesh network appear
712 as if all the mesh clients are connected to the same switch.
</p
>
714 <p
>My hardware of choice was the Linksys WRT54GL routers I had lying
715 around, but I
've been unable to get them working with batman-adv. So
716 instead, I started playing with a
717 <a href=
"http://www.raspberrypi.org/
">Raspberry Pi
</a
>, and tried to
718 get it working as a mesh node. My idea is to use it to create a mesh
719 node which function as a switch port, where everything connected to
720 the Raspberry Pi ethernet plug is connected (bridged) to the mesh
721 network. This allow me to hook a wifi base station like the Linksys
722 WRT54GL to the mesh by plugging it into a Raspberry Pi, and allow
723 non-mesh clients to hook up to the mesh. This in turn is useful for
724 Android phones using
<a href=
"http://servalproject.org/
">the Serval
725 Project
</a
> voip client, allowing every one around the playground to
726 phone and message each other for free. The reason is that Android
727 phones do not see ad-hoc wifi networks (they are filtered away from
728 the GUI view), and can not join the mesh without being rooted. But if
729 they are connected using a normal wifi base station, they can talk to
730 every client on the local network.
</p
>
732 <p
>To get this working, I
've created a debian package
733 <a href=
"https://github.com/petterreinholdtsen/meshfx-node
">meshfx-node
</a
>
735 <a href=
"https://github.com/petterreinholdtsen/meshfx-node/blob/master/build-rpi-mesh-node
">build-rpi-mesh-node
</a
>
736 to create the Raspberry Pi boot image. I
'm using Debian Jessie (and
737 not Raspbian), to get more control over the packages available.
738 Unfortunately a huge binary blob need to be inserted into the boot
739 image to get it booting, but I
'll ignore that for now. Also, as
740 Debian lack support for the CPU features available in the Raspberry
741 Pi, the system do not use the hardware floating point unit. I hope
742 the routing performance isn
't affected by the lack of hardware FPU
745 <p
>To create an image, run the following with a sudo enabled user
746 after inserting the target SD card into the build machine:
</p
>
749 % wget -O build-rpi-mesh-node \
750 https://raw.github.com/petterreinholdtsen/meshfx-node/master/build-rpi-mesh-node
751 % sudo bash -x ./build-rpi-mesh-node
> build.log
2>&1
752 % dd if=/root/rpi/rpi_basic_jessie_$(date +%Y%m%d).img of=/dev/mmcblk0 bs=
1M
754 </pre
></p
>
756 <p
>Booting with the resulting SD card on a Raspberry PI with a USB
757 wifi card inserted should give you a mesh node. At least it does for
758 me with a the wifi card I am using. The default mesh settings are the
759 ones used by the Oslo mesh project at Hackeriet, as I mentioned in
760 <a href=
"http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html
">an
761 earlier blog post about this mesh testing
</a
>.
</p
>
763 <p
>The mesh node was not horribly expensive either. I bought
764 everything over the counter in shops nearby. If I had ordered online
765 from the lowest bidder, the price should be significantly lower:
</p
>
767 <p
><table
>
769 <tr
><th
>Supplier
</th
><th
>Model
</th
><th
>NOK
</th
></tr
>
770 <tr
><td
>Teknikkmagasinet
</td
><td
>Raspberry Pi model B
</td
><td
>349.90</td
></tr
>
771 <tr
><td
>Teknikkmagasinet
</td
><td
>Raspberry Pi type B case
</td
><td
>99.90</td
></tr
>
772 <tr
><td
>Lefdal
</td
><td
>Jensen Air:Link
25150</td
><td
>295.-
</td
></tr
>
773 <tr
><td
>Clas Ohlson
</td
><td
>Kingston
16 GB SD card
</td
><td
>199.-
</td
></tr
>
774 <tr
><td
>Total cost
</td
><td
></td
><td
>943.80</td
></tr
>
776 </table
></p
>
778 <p
>Now my mesh network at home consist of one laptop in the basement
779 connected to my production network, one Raspberry Pi node on the
1th
780 floor that can be seen by my neighbor across the park, and one
781 play-node I use to develop the image building script. And some times
782 I hook up my work horse laptop to the mesh to test it. I look forward
783 to figuring out what kind of latency the batman-adv setup will give,
784 and how much packet loss we will experience around the park. :)
</p
>