1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries from December
2015</title>
5 <description>Entries from December
2015</description>
6 <link>http://www.hungry.com/~pere/blog/
</link>
10 <title>OpenALPR, find car license plates in video streams - nice free software
</title>
11 <link>http://www.hungry.com/~pere/blog/OpenALPR__find_car_license_plates_in_video_streams___nice_free_software.html
</link>
12 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/OpenALPR__find_car_license_plates_in_video_streams___nice_free_software.html
</guid>
13 <pubDate>Wed,
23 Dec
2015 01:
00:
00 +
0100</pubDate>
14 <description><p
>When I was a kid, we used to collect
"car numbers
", as we used to
15 call the car license plate numbers in those days. I would write the
16 numbers down in my little book and compare notes with the other kids
17 to see how many region codes we had seen and if we had seen some
18 exotic or special region codes and numbers. It was a fun game to pass
19 time, as we kids have plenty of it.
</p
>
21 <p
>A few days I came across
22 <a href=
"https://github.com/openalpr/openalpr
">the OpenALPR
23 project
</a
>, a free software project to automatically discover and
24 report license plates in images and video streams, and provide the
25 "car numbers
" in a machine readable format. I
've been looking for
26 such system for a while now, because I believe it is a bad idea that the
27 <a href=
"https://en.wikipedia.org/wiki/Automatic_number_plate_recognition
">automatic
28 number plate recognition
</a
> tool only is available in the hands of
29 the powerful, and want it to be available also for the powerless to
30 even the score when it comes to surveillance and sousveillance. I
31 discovered the developer
32 <a href=
"https://bugs.debian.org/
747509">wanted to get the tool into
33 Debian
</a
>, and as I too wanted it to be in Debian, I volunteered to
34 help him get it into shape to get the package uploaded into the Debian
37 <p
>Today we finally managed to get the package into shape and uploaded
38 it into Debian, where it currently
39 <a href=
"https://ftp-master.debian.org//new/openalpr_2.2
.1-
1.html
">waits
40 in the NEW queue
</a
> for review by the Debian ftpmasters.
</p
>
42 <p
>I guess you are wondering why on earth such tool would be useful
43 for the common folks, ie those not running a large government
44 surveillance system? Well, I plan to put it in a computer on my bike
45 and in my car, tracking the cars nearby and allowing me to be notified
46 when number plates on my watch list are discovered. Another use case
47 was suggested by a friend of mine, who wanted to set it up at his home
48 to open the car port automatically when it discovered the plate on his
49 car. When I mentioned it perhaps was a bit foolhardy to allow anyone
50 capable of placing his license plate number of a piece of cardboard to
51 open his car port, men replied that it was always unlocked anyway. I
52 guess for such use case it make sense. I am sure there are other use
53 cases too, for those with imagination and a vision.
</p
>
55 <p
>If you want to build your own version of the Debian package, check
56 out the upstream git source and symlink ./distros/debian to ./debian/
57 before running
"debuild
" to build the source. Or wait a bit until the
58 package show up in unstable.
</p
>
63 <title>Using appstream with isenkram to install hardware related packages in Debian
</title>
64 <link>http://www.hungry.com/~pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html
</link>
65 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html
</guid>
66 <pubDate>Sun,
20 Dec
2015 12:
20:
00 +
0100</pubDate>
67 <description><p
>Around three years ago, I created
68 <a href=
"http://packages.qa.debian.org/isenkram
">the isenkram
69 system
</a
> to get a more practical solution in Debian for handing
70 hardware related packages. A GUI system in the isenkram package will
71 present a pop-up dialog when some hardware dongle supported by
72 relevant packages in Debian is inserted into the machine. The same
73 lookup mechanism to detect packages is available as command line
74 tools in the isenkram-cli package. In addition to mapping hardware,
75 it will also map kernel firmware files to packages and make it easy to
76 install needed firmware packages automatically. The key for this
77 system to work is a good way to map hardware to packages, in other
78 words, allow packages to announce what hardware they will work
81 <p
>I started by providing data files in the isenkram source, and
82 adding code to download the latest version of these data files at run
83 time, to ensure every user had the most up to date mapping available.
84 I also added support for storing the mapping in the Packages file in
85 the apt repositories, but did not push this approach because while I
86 was trying to figure out how to best store hardware/package mappings,
87 <a href=
"http://www.freedesktop.org/software/appstream/docs/
">the
88 appstream system
</a
> was announced. I got in touch and suggested to
89 add the hardware mapping into that data set to be able to use
90 appstream as a data source, and this was accepted at least for the
91 Debian version of appstream.
</p
>
93 <p
>A few days ago using appstream in Debian for this became possible,
94 and today I uploaded a new version
0.20 of isenkram adding support for
95 appstream as a data source for mapping hardware to packages. The only
96 package so far using appstream to announce its hardware support is my
97 pymissile package. I got help from Matthias Klumpp with figuring out
98 how do add the required
99 <a href=
"https://appstream.debian.org/html/sid/main/metainfo/pymissile.html
">metadata
100 in pymissile
</a
>. I added a file debian/pymissile.metainfo.xml with
101 this content:
</p
>
103 <blockquote
><pre
>
104 &lt;?xml version=
"1.0" encoding=
"UTF-
8"?
&gt;
105 &lt;component
&gt;
106 &lt;id
&gt;pymissile
&lt;/id
&gt;
107 &lt;metadata_license
&gt;MIT
&lt;/metadata_license
&gt;
108 &lt;name
&gt;pymissile
&lt;/name
&gt;
109 &lt;summary
&gt;Control original Striker USB Missile Launcher
&lt;/summary
&gt;
110 &lt;description
&gt;
112 Pymissile provides a curses interface to control an original
113 Marks and Spencer / Striker USB Missile Launcher, as well as a
114 motion control script to allow a webcamera to control the
117 &lt;/description
&gt;
118 &lt;provides
&gt;
119 &lt;modalias
&gt;usb:v1130p0202d*
&lt;/modalias
&gt;
120 &lt;/provides
&gt;
121 &lt;/component
&gt;
122 </pre
></blockquote
>
124 <p
>The key for isenkram is the component/provides/modalias value,
125 which is a glob style match rule for hardware specific strings
126 (modalias strings) provided by the Linux kernel. In this case, it
127 will map to all USB devices with vendor code
1130 and product code
130 <p
>Note, it is important that the license of all the metadata files
131 are compatible to have permissions to aggregate them into archive wide
132 appstream files. Matthias suggested to use MIT or BSD licenses for
133 these files. A challenge is figuring out a good id for the data, as
134 it is supposed to be globally unique and shared across distributions
135 (in other words, best to coordinate with upstream what to use). But
136 it can be changed later or, so we went with the package name as
137 upstream for this project is dormant.
</p
>
139 <p
>To get the metadata file installed in the correct location for the
140 mirror update scripts to pick it up and include its content the
141 appstream data source, the file must be installed in the binary
142 package under /usr/share/appdata/. I did this by adding the following
143 line to debian/pymissile.install:
</p
>
145 <blockquote
><pre
>
146 debian/pymissile.metainfo.xml usr/share/appdata
147 </pre
></blockquote
>
149 <p
>With that in place, the command line tool isenkram-lookup will list
150 all packages useful on the current computer automatically, and the GUI
151 pop-up handler will propose to install the package not already
152 installed if a hardware dongle is inserted into the machine in
155 <p
>Details of the modalias field in appstream is available from the
156 <a href=
"https://wiki.debian.org/DEP-
11">DEP-
11</a
> proposal.
</p
>
158 <p
>To locate the modalias values of all hardware present in a machine,
159 try running this command on the command line:
</p
>
161 <blockquote
><pre
>
162 cat $(find /sys/devices/|grep modalias)
163 </pre
></blockquote
>
165 <p
>To learn more about the isenkram system, please check out
166 <a href=
"https://people.skolelinux.org/pere/blog/tags/isenkram/
">my
167 blog posts tagged isenkram
</a
>.
</p
>
172 <title>Bokhandeldistribusjon av boken Fri kultur av Lawrence Lessig
</title>
173 <link>http://www.hungry.com/~pere/blog/Bokhandeldistribusjon_av_boken_Fri_kultur_av_Lawrence_Lessig.html
</link>
174 <guid isPermaLink=
"true">http://www.hungry.com/~pere/blog/Bokhandeldistribusjon_av_boken_Fri_kultur_av_Lawrence_Lessig.html
</guid>
175 <pubDate>Mon,
14 Dec
2015 12:
10:
00 +
0100</pubDate>
176 <description><p
><strong
>Besøk
177 <a href=
"https://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-
22441576.html
">lulu.com
</a
>
179 <a href=
"https://www.amazon.com/Fri-kultur-Norwegian-Lawrence-Lessig/dp/
8269018236/
">Amazon
</a
>
180 for å kjøpe boken på papir, eller last ned ebook som
181 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/archive/freeculture.nb.pdf
">PDF
</a
>,
182 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/archive/freeculture.nb.epub
">ePub
</a
>
184 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/archive/freeculture.nb.mobi
">MOBI
</a
>
186 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig/
">github
</a
>.
</strong
></p
>
188 <p
>Jeg ble gledelig overrasket i dag da jeg oppdaget at boken jeg har
190 <a href=
"https://www.amazon.com/Fri-kultur-Norwegian-Lawrence-Lessig/dp/
8269018236/
">hadde
191 dukket opp i Amazon
</a
>. Jeg hadde trodd det skulle ta lenger tid, da
192 jeg fikk beskjed om at det skulle ta seks til åtte uker.
193 Amazonoppføringen er et resultat av at jeg for noen uker siden
194 diskuterte prissetting og håndtering av profitt med forfatteren. Det
195 måtte avklares da bruksvilkårene til boken har krav om
196 ikke-kommersiell bruk. Vi ble enige om at overskuddet fra salg av
197 boken skal sendes til
198 <a href=
"https://creativecommons.org/
">Creative Commons-stiftelsen
</a
>.
199 Med det på plass kunne jeg be
200 <a href=
"https://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-
22441576.html
">lulu.com
</a
>
201 om å gi boken «utvidet» distribusjon. Årsaken til at
202 bokhandeldistribusjon var litt utfordrende er at bokhandlere krever
203 mulighet for profitt på bøkene de selger (selvfølgelig), og dermed
204 måtte de få lov til å selge til høyere pris enn lulu.com. I tillegg
205 er det krav om samme pris på lulu.com og i bokhandlene, dermed blir
206 prisen økt også hos lulu.com. Hva skulle jeg gjøre med den profitten
207 uten å bryte med klausulen om ikkekommersiell? Løsningen var å gi
208 bort profitten til CC-stiftelsen. Prisen på boken ble nesten
209 tredoblet, til $
19.99 (ca.
160,-) pluss frakt, men synligheten øker
210 betraktelig når den kan finnes i katalogene til store nettbokhandlere.
211 Det betyr at hvis du allerede har kjøpt boken har du fått den veldig
212 billig, og kjøper du den nå, får du den fortsatt billig samt donerer i
213 tillegg noen tiere til fremme av Creative Commons.
</p
>
215 <p
>Mens jeg var i gang med å titte etter informasjon om boken
216 oppdaget jeg at den også var dukket opp på
217 <a href=
"https://books.google.no/books?id=uKUGCwAAQBAJ
">Google
218 Books
</a
>, der en kan lese den på web. PDF-utgaven har ennå ikke
219 dukket opp hos
<a href=
"https://www.nb.no/
">Nasjonalbiblioteket
</a
>,
220 men det regner jeg med kommer på plass i løpet av noen uker. Boken er
221 heller ikke dukket opp hos
222 <a href=
"https://www.barnesandnoble.com/
">Barnes
& Noble
</a
> ennå, men
223 jeg antar det bare er et tidsspørsmål før dette er på plass.
</p
>
225 <p
>Boken er dessverre ikke tilgjengelig fra norske bokhandlere, og
226 kommer neppe til å bli det med det første. Årsaken er at for å få det
227 til måtte jeg personlig håndtere bestilling av bøker, hvilket jeg ikke
228 er interessert i å bruke tid på. Jeg kunne betalt ca
2000,- til
229 <a href=
"http://www.bokbasen.no/
">den norske bokbasen
</a
>, en felles
230 database over bøker tilgjengelig for norske bokhandlere, for å få en
231 oppføring der, men da måtte jeg tatt imot bestillinger på epost og
232 sendt ut bøker selv. Det ville krevd at jeg var klar til å
233 sende ut bøker på kort varsel, dvs. holdt meg med ekstra bøker,
234 konvolutter og frimerker. Bokbasen har visst ikke opplegg for å be
235 bokhandlene bestille direkte via web, så jeg droppet oppføring der.
236 Jeg har spurt Haugen bok og Tronsmo direkte på epost om de er
237 interessert i å ta inn boken i sin bestillingskatalog, men ikke fått
238 svar, så jeg antar de ikke er interessert. Derimot har jeg fått en
239 hyggelig henvendelse fra Biblioteksentralen som fortalte at de har
240 lagt den inn i sin database slik at deres bibliotekskunder enkelt kan
241 bestille den via dem.
</p
>
243 <p
>Boken er i følge
244 <a href=
"http://bibsys-almaprimo.hosted.exlibrisgroup.com/primo_library/libweb/action/display.do?tabs=detailsTab
&ct=display
&fn=search
&doc=BIBSYS_ILS71518423420002201
&indx=
1&recIds=BIBSYS_ILS71518423420002201
&recIdxs=
0&elementId=
0&renderMode=poppedOut
&displayMode=full
&frbrVersion=
&dscnt=
0&tab=library_catalogue
&dstmp=
1448543801124&vl(freeText0)=fri%
20kultur
&vid=UBO
&mode=Basic
">Bibsys/Oria
</a
>
246 <a href=
"https://www.deich.folkebibl.no/cgi-bin/websok?tnr=
1819617">Deichmanske
</a
>
247 tilgjengelig fra flere biblioteker allerede, og alle eksemplarer er
248 visst allerede utlånt med ventetid. Det synes jeg er veldig gledelig
249 å se. Jeg håper mange kommer til å lese boken. Jeg tror den er
250 spesielt egnet for foreldre og bekjente av oss nerder for å forklare
251 hva slags problemer vi ser med dagens opphavsrettsregime.
</p
>