]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
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">
3 <channel>
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" />
8
9 <item>
10 <title>UsingQR - &quot;Electronic&quot; paper invoices using JSON and QR codes</title>
11 <link>http://people.skolelinux.org/pere/blog/UsingQR____Electronic__paper_invoices_using_JSON_and_QR_codes.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/UsingQR____Electronic__paper_invoices_using_JSON_and_QR_codes.html</guid>
13 <pubDate>Sat, 19 Mar 2016 09:40:00 +0100</pubDate>
14 <description>&lt;p&gt;Back in 2013 I proposed
15 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/_Electronic__paper_invoices___using_vCard_in_a_QR_code.html&quot;&gt;a
16 way to make paper and PDF invoices easier to process electronically by
17 adding a QR code with the key information about the invoice&lt;/a&gt;. I
18 suggested using vCard field definition, to get some standard format
19 for name and address, but any format would work. I did not do
20 anything about the proposal, but hoped someone one day would make
21 something like it. It would make it possible to efficiently send
22 machine readable invoices directly between seller and buyer.&lt;/p&gt;
23
24 &lt;p&gt;This was the background when I came across a proposal and
25 specification from the web based accounting and invoicing supplier
26 &lt;a href=&quot;http://www.visma.com/&quot;&gt;Visma&lt;/a&gt; in Sweden called
27 &lt;a href=&quot;http://usingqr.com/&quot;&gt;UsingQR&lt;/a&gt;. Their PDF invoices contain
28 a QR code with the key information of the invoice in JSON format.
29 This is the typical content of a QR code following the UsingQR
30 specification (based on a real world example, some numbers replaced to
31 get a more bogus entry). I&#39;ve reformatted the JSON to make it easier
32 to read. Normally this is all on one long line:
33
34 &lt;p&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2016-03-19-qr-invoice.png&quot; align=&quot;right&quot;&gt;&lt;pre&gt;
35 {
36 &quot;vh&quot;:500.00,
37 &quot;vm&quot;:0,
38 &quot;vl&quot;:0,
39 &quot;uqr&quot;:1,
40 &quot;tp&quot;:1,
41 &quot;nme&quot;:&quot;Din Leverandør&quot;,
42 &quot;cc&quot;:&quot;NO&quot;,
43 &quot;cid&quot;:&quot;997912345 MVA&quot;,
44 &quot;iref&quot;:&quot;12300001&quot;,
45 &quot;idt&quot;:&quot;20151022&quot;,
46 &quot;ddt&quot;:&quot;20151105&quot;,
47 &quot;due&quot;:2500.0000,
48 &quot;cur&quot;:&quot;NOK&quot;,
49 &quot;pt&quot;:&quot;BBAN&quot;,
50 &quot;acc&quot;:&quot;17202612345&quot;,
51 &quot;bc&quot;:&quot;BIENNOK1&quot;,
52 &quot;adr&quot;:&quot;0313 OSLO&quot;
53 }
54 &lt;/pre&gt;&lt;/p&gt;
55
56 &lt;/p&gt;The interpretation of the fields can be found in the
57 &lt;a href=&quot;http://usingqr.com/wp-content/uploads/2014/06/UsingQR_specification1.pdf&quot;&gt;format
58 specification&lt;/a&gt; (revision 2 from june 2014). The format seem to
59 have most of the information needed to handle accounting and payment
60 of invoices, at least the fields I have needed so far here in
61 Norway.&lt;/p&gt;
62
63 &lt;p&gt;Unfortunately, the site and document do not mention anything about
64 the patent, trademark and copyright status of the format and the
65 specification. Because of this, I asked the people behind it back in
66 November to clarify. Ann-Christine Savlid (ann-christine.savlid (at)
67 visma.com) replied that Visma had not applied for patent or trademark
68 protection for this format, and that there were no copyright based
69 usage limitations for the format. I urged her to make sure this was
70 explicitly written on the web pages and in the specification, but
71 unfortunately this has not happened yet. So I guess if there is
72 submarine patents, hidden trademarks or a will to sue for copyright
73 infringements, those starting to use the UsingQR format might be at
74 risk, but if this happen there is some legal defense in the fact that
75 the people behind the format claimed it was safe to do so. At least
76 with patents, there is always
77 &lt;a href=&quot;http://www.paperspecs.com/paper-news/beware-the-qr-code-patent-trap/&quot;&gt;a
78 chance of getting sued...&lt;/a&gt;
79
80 &lt;p&gt;I also asked if they planned to maintain the format in an
81 independent standard organization to give others more confidence that
82 they would participate in the standardization process on equal terms
83 with Visma, but they had no immediate plans for this. Their plan was
84 to work with banks to try to get more users of the format, and
85 evaluate the way forward if the format proved to be popular. I hope
86 they conclude that using an open standard organisation like
87 &lt;a href=&quot;http://www.ietf.org/&quot;&gt;IETF&lt;/a&gt; is the correct place to
88 maintain such specification.&lt;/p&gt;
89 </description>
90 </item>
91
92 <item>
93 <title>Making battery measurements a little easier in Debian</title>
94 <link>http://people.skolelinux.org/pere/blog/Making_battery_measurements_a_little_easier_in_Debian.html</link>
95 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Making_battery_measurements_a_little_easier_in_Debian.html</guid>
96 <pubDate>Tue, 15 Mar 2016 15:00:00 +0100</pubDate>
97 <description>&lt;p&gt;Back in September, I blogged about
98 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html&quot;&gt;the
99 system I wrote to collect statistics about my laptop battery&lt;/a&gt;, and
100 how it showed the decay and death of this battery (now replaced). I
101 created a simple deb package to handle the collection and graphing,
102 but did not want to upload it to Debian as there were already
103 &lt;a href=&quot;https://tracker.debian.org/pkg/battery-stats&quot;&gt;a battery-stats
104 package in Debian&lt;/a&gt; that should do the same thing, and I did not see
105 a point of uploading a competing package when battery-stats could be
106 fixed instead. I reported a few bugs about its non-function, and
107 hoped someone would step in and fix it. But no-one did.&lt;/p&gt;
108
109 &lt;p&gt;I got tired of waiting a few days ago, and took matters in my own
110 hands. The end result is that I am now the new upstream developer of
111 battery stats (&lt;a href=&quot;https://github.com/petterreinholdtsen/battery-stats&quot;&gt;available from github&lt;/a&gt;) and part of the team maintaining
112 battery-stats in Debian, and the package in Debian unstable is finally
113 able to collect battery status using the &lt;tt&gt;/sys/class/power_supply/&lt;/tt&gt;
114 information provided by the Linux kernel. If you install the
115 battery-stats package from unstable now, you will be able to get a
116 graph of the current battery fill level, to get some idea about the
117 status of the battery. The source package build and work just fine in
118 Debian testing and stable (and probably oldstable too, but I have not
119 tested). The default graph you get for that system look like this:&lt;/p&gt;
120
121 &lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2016-03-15-battery-stats-graph-example.png&quot; width=&quot;70%&quot; align=&quot;center&quot;&gt;&lt;/p&gt;
122
123 &lt;p&gt;My plans for the future is to merge my old scripts into the
124 battery-stats package, as my old scripts collected a lot more details
125 about the battery. The scripts are merged into the upstream
126 battery-stats git repository already, but I am not convinced they work
127 yet, as I changed a lot of paths along the way. Will have to test a
128 bit more before I make a new release.&lt;/p&gt;
129
130 &lt;p&gt;I will also consider changing the file format slightly, as I
131 suspect the way I combine several values into one field might make it
132 impossible to know the type of the value when using it for processing
133 and graphing.&lt;/p&gt;
134
135 &lt;p&gt;If you would like I would like to keep an close eye on your laptop
136 battery, check out the battery-stats package in
137 &lt;a href=&quot;https://tracker.debian.org/pkg/battery-stats&quot;&gt;Debian&lt;/a&gt; and
138 on
139 &lt;a href=&quot;https://github.com/petterreinholdtsen/battery-stats&quot;&gt;github&lt;/a&gt;.
140 I would love some help to improve the system further.&lt;/p&gt;
141 </description>
142 </item>
143
144 <item>
145 <title>Creating, updating and checking debian/copyright semi-automatically</title>
146 <link>http://people.skolelinux.org/pere/blog/Creating__updating_and_checking_debian_copyright_semi_automatically.html</link>
147 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Creating__updating_and_checking_debian_copyright_semi_automatically.html</guid>
148 <pubDate>Fri, 19 Feb 2016 15:00:00 +0100</pubDate>
149 <description>&lt;p&gt;Making packages for Debian requires quite a lot of attention to
150 details. And one of the details is the content of the
151 debian/copyright file, which should list all relevant licenses used by
152 the code in the package in question, preferably in
153 &lt;a href=&quot;https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/&quot;&gt;machine
154 readable DEP5 format&lt;/a&gt;.&lt;/p&gt;
155
156 &lt;p&gt;For large packages with lots of contributors it is hard to write
157 and update this file manually, and if you get some detail wrong, the
158 package is normally rejected by the ftpmasters. So getting it right
159 the first time around get the package into Debian faster, and save
160 both you and the ftpmasters some work.. Today, while trying to figure
161 out what was wrong with
162 &lt;a href=&quot;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686447&quot;&gt;the
163 zfsonlinux copyright file&lt;/a&gt;, I decided to spend some time on
164 figuring out the options for doing this job automatically, or at least
165 semi-automatically.&lt;/p&gt;
166
167 &lt;p&gt;Lucikly, there are at least two tools available for generating the
168 file based on the code in the source package,
169 &lt;tt&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/debmake&quot;&gt;debmake&lt;/a&gt;&lt;/tt&gt;
170 and &lt;tt&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/cme&quot;&gt;cme&lt;/a&gt;&lt;/tt&gt;. I&#39;m
171 not sure which one of them came first, but both seem to be able to
172 create a sensible draft file. As far as I can tell, none of them can
173 be trusted to get the result just right, so the content need to be
174 polished a bit before the file is OK to upload. I found the debmake
175 option in
176 &lt;a href=&quot;http://goofying-with-debian.blogspot.com/2014/07/debmake-checking-source-against-dep-5.html&quot;&gt;a
177 blog posts from 2014&lt;/a&gt;.
178
179 &lt;p&gt;To generate using debmake, use the -cc option:
180
181 &lt;p&gt;&lt;pre&gt;
182 debmake -cc &gt; debian/copyright
183 &lt;/pre&gt;&lt;/p&gt;
184
185 &lt;p&gt;Note there are some problems with python and non-ASCII names, so
186 this might not be the best option.&lt;/p&gt;
187
188 &lt;p&gt;The cme option is based on a config parsing library, and I found
189 this approach in
190 &lt;a href=&quot;https://ddumont.wordpress.com/2015/04/05/improving-creation-of-debian-copyright-file/&quot;&gt;a
191 blog post from 2015&lt;/a&gt;. To generate using cme, use the &#39;update
192 dpkg-copyright&#39; option:
193
194 &lt;p&gt;&lt;pre&gt;
195 cme update dpkg-copyright
196 &lt;/pre&gt;&lt;/p&gt;
197
198 &lt;p&gt;This will create or update debian/copyright. The cme tool seem to
199 handle UTF-8 names better than debmake.&lt;/p&gt;
200
201 &lt;p&gt;When the copyright file is created, I would also like some help to
202 check if the file is correct. For this I found two good options,
203 &lt;tt&gt;debmake -k&lt;/tt&gt; and &lt;tt&gt;license-reconcile&lt;/tt&gt;. The former seem
204 to focus on license types and file matching, and is able to detect
205 ineffective blocks in the copyright file. The latter reports missing
206 copyright holders and years, but was confused by inconsistent license
207 names (like CDDL vs. CDDL-1.0). I suspect it is good to use both and
208 fix all issues reported by them before uploading. But I do not know
209 if the tools and the ftpmasters agree on what is important to fix in a
210 copyright file, so the package might still be rejected.&lt;/p&gt;
211
212 &lt;p&gt;The devscripts tool &lt;tt&gt;licensecheck&lt;/tt&gt; deserve mentioning. It
213 will read through the source and try to find all copyright statements.
214 It is not comparing the result to the content of debian/copyright, but
215 can be useful when verifying the content of the copyright file.&lt;/p&gt;
216
217 &lt;p&gt;Are you aware of better tools in Debian to create and update
218 debian/copyright file. Please let me know, or blog about it on
219 planet.debian.org.&lt;/p&gt;
220
221 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
222 activities, please send Bitcoin donations to my address
223 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
224
225 &lt;p&gt;&lt;strong&gt;Update 2016-02-20&lt;/strong&gt;: I got a tip from Mike Gabriel
226 on how to use licensecheck and cdbs to create a draft copyright file
227
228 &lt;p&gt;&lt;pre&gt;
229 licensecheck --copyright -r `find * -type f` | \
230 /usr/lib/cdbs/licensecheck2dep5 &gt; debian/copyright.auto
231 &lt;/pre&gt;&lt;/p&gt;
232
233 &lt;p&gt;He mentioned that he normally check the generated file into the
234 version control system to make it easier to discover license and
235 copyright changes in the upstream source. I will try to do the same
236 with my packages in the future.&lt;/p&gt;
237
238 &lt;p&gt;&lt;strong&gt;Update 2016-02-21&lt;/strong&gt;: The cme author recommended
239 against using -quiet for new users, so I removed it from the proposed
240 command line.&lt;/p&gt;
241 </description>
242 </item>
243
244 <item>
245 <title>Using appstream in Debian to locate packages with firmware and mime type support</title>
246 <link>http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html</link>
247 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_appstream_in_Debian_to_locate_packages_with_firmware_and_mime_type_support.html</guid>
248 <pubDate>Thu, 4 Feb 2016 16:40:00 +0100</pubDate>
249 <description>&lt;p&gt;The &lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;appstream system&lt;/a&gt;
250 is taking shape in Debian, and one provided feature is a very
251 convenient way to tell you which package to install to make a given
252 firmware file available when the kernel is looking for it. This can
253 be done using apt-file too, but that is for someone else to blog
254 about. :)&lt;/p&gt;
255
256 &lt;p&gt;Here is a small recipe to find the package with a given firmware
257 file, in this example I am looking for ctfw-3.2.3.0.bin, randomly
258 picked from the set of firmware announced using appstream in Debian
259 unstable. In general you would be looking for the firmware requested
260 by the kernel during kernel module loading. To find the package
261 providing the example file, do like this:&lt;/p&gt;
262
263 &lt;blockquote&gt;&lt;pre&gt;
264 % apt install appstream
265 [...]
266 % apt update
267 [...]
268 % appstreamcli what-provides firmware:runtime ctfw-3.2.3.0.bin | \
269 awk &#39;/Package:/ {print $2}&#39;
270 firmware-qlogic
271 %
272 &lt;/pre&gt;&lt;/blockquote&gt;
273
274 &lt;p&gt;See &lt;a href=&quot;https://wiki.debian.org/AppStream/Guidelines&quot;&gt;the
275 appstream wiki&lt;/a&gt; page to learn how to embed the package metadata in
276 a way appstream can use.&lt;/p&gt;
277
278 &lt;p&gt;This same approach can be used to find any package supporting a
279 given MIME type. This is very useful when you get a file you do not
280 know how to handle. First find the mime type using &lt;tt&gt;file
281 --mime-type&lt;/tt&gt;, and next look up the package providing support for
282 it. Lets say you got an SVG file. Its MIME type is image/svg+xml,
283 and you can find all packages handling this type like this:&lt;/p&gt;
284
285 &lt;blockquote&gt;&lt;pre&gt;
286 % apt install appstream
287 [...]
288 % apt update
289 [...]
290 % appstreamcli what-provides mimetype image/svg+xml | \
291 awk &#39;/Package:/ {print $2}&#39;
292 bkchem
293 phototonic
294 inkscape
295 shutter
296 tetzle
297 geeqie
298 xia
299 pinta
300 gthumb
301 karbon
302 comix
303 mirage
304 viewnior
305 postr
306 ristretto
307 kolourpaint4
308 eog
309 eom
310 gimagereader
311 midori
312 %
313 &lt;/pre&gt;&lt;/blockquote&gt;
314
315 &lt;p&gt;I believe the MIME types are fetched from the desktop file for
316 packages providing appstream metadata.&lt;/p&gt;
317 </description>
318 </item>
319
320 <item>
321 <title>Creepy, visualise geotagged social media information - nice free software</title>
322 <link>http://people.skolelinux.org/pere/blog/Creepy__visualise_geotagged_social_media_information___nice_free_software.html</link>
323 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Creepy__visualise_geotagged_social_media_information___nice_free_software.html</guid>
324 <pubDate>Sun, 24 Jan 2016 10:50:00 +0100</pubDate>
325 <description>&lt;p&gt;Most people seem not to realise that every time they walk around
326 with the computerised radio beacon known as a mobile phone their
327 position is tracked by the phone company and often stored for a long
328 time (like every time a SMS is received or sent). And if their
329 computerised radio beacon is capable of running programs (often called
330 mobile apps) downloaded from the Internet, these programs are often
331 also capable of tracking their location (if the app requested access
332 during installation). And when these programs send out information to
333 central collection points, the location is often included, unless
334 extra care is taken to not send the location. The provided
335 information is used by several entities, for good and bad (what is
336 good and bad, depend on your point of view). What is certain, is that
337 the private sphere and the right to free movement is challenged and
338 perhaps even eradicated for those announcing their location this way,
339 when they share their whereabouts with private and public
340 entities.&lt;/p&gt;
341
342 &lt;p align=&quot;center&quot;&gt;&lt;img width=&quot;70%&quot; src=&quot;http://people.skolelinux.org/pere/blog/images/2016-01-24-nice-creepy-desktop-window.png&quot;&gt;&lt;/p&gt;
343
344 &lt;p&gt;The phone company logs provide a register of locations to check out
345 when one want to figure out what the tracked person was doing. It is
346 unavailable for most of us, but provided to selected government
347 officials, company staff, those illegally buying information from
348 unfaithful servants and crackers stealing the information. But the
349 public information can be collected and analysed, and a free software
350 tool to do so is called
351 &lt;a href=&quot;http://www.geocreepy.com/&quot;&gt;Creepy or Cree.py&lt;/a&gt;. I
352 discovered it when I read
353 &lt;a href=&quot;http://www.aftenposten.no/kultur/Slik-kan-du-bli-overvaket-pa-Twitter-og-Instagram-uten-a-ane-det-7787884.html&quot;&gt;an
354 article about Creepy&lt;/a&gt; in the Norwegian newspaper Aftenposten i
355 November 2014, and decided to check if it was available in Debian.
356 The python program was in Debian, but
357 &lt;a href=&quot;https://tracker.debian.org/pkg/creepy&quot;&gt;the version in
358 Debian&lt;/a&gt; was completely broken and practically unmaintained. I
359 uploaded a new version which did not work quite right, but did not
360 have time to fix it then. This Christmas I decided to finally try to
361 get Creepy operational in Debian. Now a fixed version is available in
362 Debian unstable and testing, and almost all Debian specific patches
363 are now included
364 &lt;a href=&quot;https://github.com/jkakavas/creepy&quot;&gt;upstream&lt;/a&gt;.&lt;/p&gt;
365
366 &lt;p&gt;The Creepy program visualises geolocation information fetched from
367 Twitter, Instagram, Flickr and Google+, and allow one to get a
368 complete picture of every social media message posted recently in a
369 given area, or track the movement of a given individual across all
370 these services. Earlier it was possible to use the search API of at
371 least some of these services without identifying oneself, but these
372 days it is impossible. This mean that to use Creepy, you need to
373 configure it to log in as yourself on these services, and provide
374 information to them about your search interests. This should be taken
375 into account when using Creepy, as it will also share information
376 about yourself with the services.&lt;/p&gt;
377
378 &lt;p&gt;The picture above show the twitter messages sent from (or at least
379 geotagged with a position from) the city centre of Oslo, the capital
380 of Norway. One useful way to use Creepy is to first look at
381 information tagged with an area of interest, and next look at all the
382 information provided by one or more individuals who was in the area.
383 I tested it by checking out which celebrity provide their location in
384 twitter messages by checkout out who sent twitter messages near a
385 Norwegian TV station, and next could track their position over time,
386 making it possible to locate their home and work place, among other
387 things. A similar technique have been
388 &lt;a href=&quot;http://www.buzzfeed.com/maxseddon/does-this-soldiers-instagram-account-prove-russia-is-covertl&quot;&gt;used
389 to locate Russian soldiers in Ukraine&lt;/a&gt;, and it is both a powerful
390 tool to discover lying governments, and a useful tool to help people
391 understand the value of the private information they provide to the
392 public.&lt;/p&gt;
393
394 &lt;p&gt;The package is not trivial to backport to Debian Stable/Jessie, as
395 it depend on several python modules currently missing in Jessie (at
396 least python-instagram, python-flickrapi and
397 python-requests-toolbelt).&lt;/p&gt;
398
399 &lt;p&gt;(I have uploaded
400 &lt;a href=&quot;https://screenshots.debian.net/package/creepy&quot;&gt;the image to
401 screenshots.debian.net&lt;/a&gt; and licensed it under the same terms as the
402 Creepy program in Debian.)&lt;/p&gt;
403 </description>
404 </item>
405
406 <item>
407 <title>Always download Debian packages using Tor - the simple recipe</title>
408 <link>http://people.skolelinux.org/pere/blog/Always_download_Debian_packages_using_Tor___the_simple_recipe.html</link>
409 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Always_download_Debian_packages_using_Tor___the_simple_recipe.html</guid>
410 <pubDate>Fri, 15 Jan 2016 00:30:00 +0100</pubDate>
411 <description>&lt;p&gt;During his DebConf15 keynote, Jacob Appelbaum
412 &lt;a href=&quot;https://summit.debconf.org/debconf15/meeting/331/what-is-to-be-done/&quot;&gt;observed
413 that those listening on the Internet lines would have good reason to
414 believe a computer have a given security hole&lt;/a&gt; if it download a
415 security fix from a Debian mirror. This is a good reason to always
416 use encrypted connections to the Debian mirror, to make sure those
417 listening do not know which IP address to attack. In August, Richard
418 Hartmann observed that encryption was not enough, when it was possible
419 to interfere download size to security patches or the fact that
420 download took place shortly after a security fix was released, and
421 &lt;a href=&quot;http://richardhartmann.de/blog/posts/2015/08/24-Tor-enabled_Debian_mirror/&quot;&gt;proposed
422 to always use Tor to download packages from the Debian mirror&lt;/a&gt;. He
423 was not the first to propose this, as the
424 &lt;tt&gt;&lt;a href=&quot;https://tracker.debian.org/pkg/apt-transport-tor&quot;&gt;apt-transport-tor&lt;/a&gt;&lt;/tt&gt;
425 package by Tim Retout already existed to make it easy to convince apt
426 to use &lt;a href=&quot;https://www.torproject.org/&quot;&gt;Tor&lt;/a&gt;, but I was not
427 aware of that package when I read the blog post from Richard.&lt;/p&gt;
428
429 &lt;p&gt;Richard discussed the idea with Peter Palfrader, one of the Debian
430 sysadmins, and he set up a Tor hidden service on one of the central
431 Debian mirrors using the address vwakviie2ienjx6t.onion, thus making
432 it possible to download packages directly between two tor nodes,
433 making sure the network traffic always were encrypted.&lt;/p&gt;
434
435 &lt;p&gt;Here is a short recipe for enabling this on your machine, by
436 installing &lt;tt&gt;apt-transport-tor&lt;/tt&gt; and replacing http and https
437 urls with tor+http and tor+https, and using the hidden service instead
438 of the official Debian mirror site. I recommend installing
439 &lt;tt&gt;etckeeper&lt;/tt&gt; before you start to have a history of the changes
440 done in /etc/.&lt;/p&gt;
441
442 &lt;blockquote&gt;&lt;pre&gt;
443 apt install apt-transport-tor
444 sed -i &#39;s% http://ftp.debian.org/% tor+http://vwakviie2ienjx6t.onion/%&#39; /etc/apt/sources.list
445 sed -i &#39;s% http% tor+http%&#39; /etc/apt/sources.list
446 &lt;/pre&gt;&lt;/blockquote&gt;
447
448 &lt;p&gt;If you have more sources listed in /etc/apt/sources.list.d/, run
449 the sed commands for these too. The sed command is assuming your are
450 using the ftp.debian.org Debian mirror. Adjust the command (or just
451 edit the file manually) to match your mirror.&lt;/p&gt;
452
453 &lt;p&gt;This work in Debian Jessie and later. Note that tools like
454 &lt;tt&gt;apt-file&lt;/tt&gt; only recently started using the apt transport
455 system, and do not work with these tor+http URLs. For
456 &lt;tt&gt;apt-file&lt;/tt&gt; you need the version currently in experimental,
457 which need a recent apt version currently only in unstable. So if you
458 need a working &lt;tt&gt;apt-file&lt;/tt&gt;, this is not for you.&lt;/p&gt;
459
460 &lt;p&gt;Another advantage from this change is that your machine will start
461 using Tor regularly and at fairly random intervals (every time you
462 update the package lists or upgrade or install a new package), thus
463 masking other Tor traffic done from the same machine. Using Tor will
464 become normal for the machine in question.&lt;/p&gt;
465
466 &lt;p&gt;On &lt;a href=&quot;https://wiki.debian.org/FreedomBox&quot;&gt;Freedombox&lt;/a&gt;, APT
467 is set up by default to use &lt;tt&gt;apt-transport-tor&lt;/tt&gt; when Tor is
468 enabled. It would be great if it was the default on any Debian
469 system.&lt;/p&gt;
470 </description>
471 </item>
472
473 <item>
474 <title>Nedlasting fra NRK, som Matroska med undertekster</title>
475 <link>http://people.skolelinux.org/pere/blog/Nedlasting_fra_NRK__som_Matroska_med_undertekster.html</link>
476 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Nedlasting_fra_NRK__som_Matroska_med_undertekster.html</guid>
477 <pubDate>Sat, 2 Jan 2016 13:50:00 +0100</pubDate>
478 <description>&lt;p&gt;Det kommer stadig nye løsninger for å ta lagre unna innslag fra NRK
479 for å se på det senere. For en stund tilbake kom jeg over et script
480 nrkopptak laget av Ingvar Hagelund. Han fjernet riktignok sitt script
481 etter forespørsel fra Erik Bolstad i NRK, men noen tok heldigvis og
482 gjorde det &lt;a href=&quot;https://github.com/liangqi/nrkopptak&quot;&gt;tilgjengelig
483 via github&lt;/a&gt;.&lt;/p&gt;
484
485 &lt;p&gt;Scriptet kan lagre som MPEG4 eller Matroska, og bake inn
486 undertekster i fila på et vis som blant annet VLC forstår. For å
487 bruke scriptet, kopier ned git-arkivet og kjør&lt;/p&gt;
488
489 &lt;p&gt;&lt;pre&gt;
490 nrkopptak/bin/nrk-opptak k &lt;ahref=&quot;https://tv.nrk.no/serie/bmi-turne/MUHH45000115/sesong-1/episode-1&quot;&gt;https://tv.nrk.no/serie/bmi-turne/MUHH45000115/sesong-1/episode-1&lt;/a&gt;
491 &lt;/pre&gt;&lt;/p&gt;
492
493 &lt;p&gt;URL-eksemplet er dagens toppsak på tv.nrk.no. Argument &#39;k&#39; ber
494 scriptet laste ned og lagre som Matroska. Det finnes en rekke andre
495 muligheter for valg av kvalitet og format.&lt;/p&gt;
496
497 &lt;p&gt;Jeg foretrekker dette scriptet fremfor youtube-dl, som
498 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK_med_den__nye__l_sningen.html&quot;&gt;
499 nevnt i 2014 støtter NRK&lt;/a&gt; og en rekke andre videokilder, på grunn
500 av at nrkopptak samler undertekster og video i en enkelt fil, hvilket
501 gjør håndtering enklere på disk.&lt;/p&gt;
502 </description>
503 </item>
504
505 <item>
506 <title>OpenALPR, find car license plates in video streams - nice free software</title>
507 <link>http://people.skolelinux.org/pere/blog/OpenALPR__find_car_license_plates_in_video_streams___nice_free_software.html</link>
508 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/OpenALPR__find_car_license_plates_in_video_streams___nice_free_software.html</guid>
509 <pubDate>Wed, 23 Dec 2015 01:00:00 +0100</pubDate>
510 <description>&lt;p&gt;When I was a kid, we used to collect &quot;car numbers&quot;, as we used to
511 call the car license plate numbers in those days. I would write the
512 numbers down in my little book and compare notes with the other kids
513 to see how many region codes we had seen and if we had seen some
514 exotic or special region codes and numbers. It was a fun game to pass
515 time, as we kids have plenty of it.&lt;/p&gt;
516
517 &lt;p&gt;A few days I came across
518 &lt;a href=&quot;https://github.com/openalpr/openalpr&quot;&gt;the OpenALPR
519 project&lt;/a&gt;, a free software project to automatically discover and
520 report license plates in images and video streams, and provide the
521 &quot;car numbers&quot; in a machine readable format. I&#39;ve been looking for
522 such system for a while now, because I believe it is a bad idea that the
523 &lt;a href=&quot;https://en.wikipedia.org/wiki/Automatic_number_plate_recognition&quot;&gt;automatic
524 number plate recognition&lt;/a&gt; tool only is available in the hands of
525 the powerful, and want it to be available also for the powerless to
526 even the score when it comes to surveillance and sousveillance. I
527 discovered the developer
528 &lt;a href=&quot;https://bugs.debian.org/747509&quot;&gt;wanted to get the tool into
529 Debian&lt;/a&gt;, and as I too wanted it to be in Debian, I volunteered to
530 help him get it into shape to get the package uploaded into the Debian
531 archive.&lt;/p&gt;
532
533 &lt;p&gt;Today we finally managed to get the package into shape and uploaded
534 it into Debian, where it currently
535 &lt;a href=&quot;https://ftp-master.debian.org//new/openalpr_2.2.1-1.html&quot;&gt;waits
536 in the NEW queue&lt;/a&gt; for review by the Debian ftpmasters.&lt;/p&gt;
537
538 &lt;p&gt;I guess you are wondering why on earth such tool would be useful
539 for the common folks, ie those not running a large government
540 surveillance system? Well, I plan to put it in a computer on my bike
541 and in my car, tracking the cars nearby and allowing me to be notified
542 when number plates on my watch list are discovered. Another use case
543 was suggested by a friend of mine, who wanted to set it up at his home
544 to open the car port automatically when it discovered the plate on his
545 car. When I mentioned it perhaps was a bit foolhardy to allow anyone
546 capable of placing his license plate number of a piece of cardboard to
547 open his car port, men replied that it was always unlocked anyway. I
548 guess for such use case it make sense. I am sure there are other use
549 cases too, for those with imagination and a vision.&lt;/p&gt;
550
551 &lt;p&gt;If you want to build your own version of the Debian package, check
552 out the upstream git source and symlink ./distros/debian to ./debian/
553 before running &quot;debuild&quot; to build the source. Or wait a bit until the
554 package show up in unstable.&lt;/p&gt;
555 </description>
556 </item>
557
558 <item>
559 <title>Using appstream with isenkram to install hardware related packages in Debian</title>
560 <link>http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</link>
561 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_appstream_with_isenkram_to_install_hardware_related_packages_in_Debian.html</guid>
562 <pubDate>Sun, 20 Dec 2015 12:20:00 +0100</pubDate>
563 <description>&lt;p&gt;Around three years ago, I created
564 &lt;a href=&quot;http://packages.qa.debian.org/isenkram&quot;&gt;the isenkram
565 system&lt;/a&gt; to get a more practical solution in Debian for handing
566 hardware related packages. A GUI system in the isenkram package will
567 present a pop-up dialog when some hardware dongle supported by
568 relevant packages in Debian is inserted into the machine. The same
569 lookup mechanism to detect packages is available as command line
570 tools in the isenkram-cli package. In addition to mapping hardware,
571 it will also map kernel firmware files to packages and make it easy to
572 install needed firmware packages automatically. The key for this
573 system to work is a good way to map hardware to packages, in other
574 words, allow packages to announce what hardware they will work
575 with.&lt;/p&gt;
576
577 &lt;p&gt;I started by providing data files in the isenkram source, and
578 adding code to download the latest version of these data files at run
579 time, to ensure every user had the most up to date mapping available.
580 I also added support for storing the mapping in the Packages file in
581 the apt repositories, but did not push this approach because while I
582 was trying to figure out how to best store hardware/package mappings,
583 &lt;a href=&quot;http://www.freedesktop.org/software/appstream/docs/&quot;&gt;the
584 appstream system&lt;/a&gt; was announced. I got in touch and suggested to
585 add the hardware mapping into that data set to be able to use
586 appstream as a data source, and this was accepted at least for the
587 Debian version of appstream.&lt;/p&gt;
588
589 &lt;p&gt;A few days ago using appstream in Debian for this became possible,
590 and today I uploaded a new version 0.20 of isenkram adding support for
591 appstream as a data source for mapping hardware to packages. The only
592 package so far using appstream to announce its hardware support is my
593 pymissile package. I got help from Matthias Klumpp with figuring out
594 how do add the required
595 &lt;a href=&quot;https://appstream.debian.org/html/sid/main/metainfo/pymissile.html&quot;&gt;metadata
596 in pymissile&lt;/a&gt;. I added a file debian/pymissile.metainfo.xml with
597 this content:&lt;/p&gt;
598
599 &lt;blockquote&gt;&lt;pre&gt;
600 &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;
601 &amp;lt;component&amp;gt;
602 &amp;lt;id&amp;gt;pymissile&amp;lt;/id&amp;gt;
603 &amp;lt;metadata_license&amp;gt;MIT&amp;lt;/metadata_license&amp;gt;
604 &amp;lt;name&amp;gt;pymissile&amp;lt;/name&amp;gt;
605 &amp;lt;summary&amp;gt;Control original Striker USB Missile Launcher&amp;lt;/summary&amp;gt;
606 &amp;lt;description&amp;gt;
607 &amp;lt;p&amp;gt;
608 Pymissile provides a curses interface to control an original
609 Marks and Spencer / Striker USB Missile Launcher, as well as a
610 motion control script to allow a webcamera to control the
611 launcher.
612 &amp;lt;/p&amp;gt;
613 &amp;lt;/description&amp;gt;
614 &amp;lt;provides&amp;gt;
615 &amp;lt;modalias&amp;gt;usb:v1130p0202d*&amp;lt;/modalias&amp;gt;
616 &amp;lt;/provides&amp;gt;
617 &amp;lt;/component&amp;gt;
618 &lt;/pre&gt;&lt;/blockquote&gt;
619
620 &lt;p&gt;The key for isenkram is the component/provides/modalias value,
621 which is a glob style match rule for hardware specific strings
622 (modalias strings) provided by the Linux kernel. In this case, it
623 will map to all USB devices with vendor code 1130 and product code
624 0202.&lt;/p&gt;
625
626 &lt;p&gt;Note, it is important that the license of all the metadata files
627 are compatible to have permissions to aggregate them into archive wide
628 appstream files. Matthias suggested to use MIT or BSD licenses for
629 these files. A challenge is figuring out a good id for the data, as
630 it is supposed to be globally unique and shared across distributions
631 (in other words, best to coordinate with upstream what to use). But
632 it can be changed later or, so we went with the package name as
633 upstream for this project is dormant.&lt;/p&gt;
634
635 &lt;p&gt;To get the metadata file installed in the correct location for the
636 mirror update scripts to pick it up and include its content the
637 appstream data source, the file must be installed in the binary
638 package under /usr/share/appdata/. I did this by adding the following
639 line to debian/pymissile.install:&lt;/p&gt;
640
641 &lt;blockquote&gt;&lt;pre&gt;
642 debian/pymissile.metainfo.xml usr/share/appdata
643 &lt;/pre&gt;&lt;/blockquote&gt;
644
645 &lt;p&gt;With that in place, the command line tool isenkram-lookup will list
646 all packages useful on the current computer automatically, and the GUI
647 pop-up handler will propose to install the package not already
648 installed if a hardware dongle is inserted into the machine in
649 question.&lt;/p&gt;
650
651 &lt;p&gt;Details of the modalias field in appstream is available from the
652 &lt;a href=&quot;https://wiki.debian.org/DEP-11&quot;&gt;DEP-11&lt;/a&gt; proposal.&lt;/p&gt;
653
654 &lt;p&gt;To locate the modalias values of all hardware present in a machine,
655 try running this command on the command line:&lt;/p&gt;
656
657 &lt;blockquote&gt;&lt;pre&gt;
658 cat $(find /sys/devices/|grep modalias)
659 &lt;/pre&gt;&lt;/blockquote&gt;
660
661 &lt;p&gt;To learn more about the isenkram system, please check out
662 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/tags/isenkram/&quot;&gt;my
663 blog posts tagged isenkram&lt;/a&gt;.&lt;/p&gt;
664 </description>
665 </item>
666
667 <item>
668 <title>Bokhandeldistribusjon av boken Fri kultur av Lawrence Lessig</title>
669 <link>http://people.skolelinux.org/pere/blog/Bokhandeldistribusjon_av_boken_Fri_kultur_av_Lawrence_Lessig.html</link>
670 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Bokhandeldistribusjon_av_boken_Fri_kultur_av_Lawrence_Lessig.html</guid>
671 <pubDate>Mon, 14 Dec 2015 12:10:00 +0100</pubDate>
672 <description>&lt;p&gt;&lt;strong&gt;Besøk
673 &lt;a href=&quot;https://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-22441576.html&quot;&gt;lulu.com&lt;/a&gt;
674 eller
675 &lt;a href=&quot;https://www.amazon.com/Fri-kultur-Norwegian-Lawrence-Lessig/dp/8269018236/&quot;&gt;Amazon&lt;/a&gt;
676 for å kjøpe boken på papir, eller last ned ebook som
677 &lt;a href=&quot;https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/archive/freeculture.nb.pdf&quot;&gt;PDF&lt;/a&gt;,
678 &lt;a href=&quot;https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/archive/freeculture.nb.epub&quot;&gt;ePub&lt;/a&gt;
679 eller
680 &lt;a href=&quot;https://github.com/petterreinholdtsen/free-culture-lessig/raw/master/archive/freeculture.nb.mobi&quot;&gt;MOBI&lt;/a&gt;
681 fra
682 &lt;a href=&quot;https://github.com/petterreinholdtsen/free-culture-lessig/&quot;&gt;github&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
683
684 &lt;p&gt;Jeg ble gledelig overrasket i dag da jeg oppdaget at boken jeg har
685 gitt ut
686 &lt;a href=&quot;https://www.amazon.com/Fri-kultur-Norwegian-Lawrence-Lessig/dp/8269018236/&quot;&gt;hadde
687 dukket opp i Amazon&lt;/a&gt;. Jeg hadde trodd det skulle ta lenger tid, da
688 jeg fikk beskjed om at det skulle ta seks til åtte uker.
689 Amazonoppføringen er et resultat av at jeg for noen uker siden
690 diskuterte prissetting og håndtering av profitt med forfatteren. Det
691 måtte avklares da bruksvilkårene til boken har krav om
692 ikke-kommersiell bruk. Vi ble enige om at overskuddet fra salg av
693 boken skal sendes til
694 &lt;a href=&quot;https://creativecommons.org/&quot;&gt;Creative Commons-stiftelsen&lt;/a&gt;.
695 Med det på plass kunne jeg be
696 &lt;a href=&quot;https://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-22441576.html&quot;&gt;lulu.com&lt;/a&gt;
697 om å gi boken «utvidet» distribusjon. Årsaken til at
698 bokhandeldistribusjon var litt utfordrende er at bokhandlere krever
699 mulighet for profitt på bøkene de selger (selvfølgelig), og dermed
700 måtte de få lov til å selge til høyere pris enn lulu.com. I tillegg
701 er det krav om samme pris på lulu.com og i bokhandlene, dermed blir
702 prisen økt også hos lulu.com. Hva skulle jeg gjøre med den profitten
703 uten å bryte med klausulen om ikkekommersiell? Løsningen var å gi
704 bort profitten til CC-stiftelsen. Prisen på boken ble nesten
705 tredoblet, til $19.99 (ca. 160,-) pluss frakt, men synligheten øker
706 betraktelig når den kan finnes i katalogene til store nettbokhandlere.
707 Det betyr at hvis du allerede har kjøpt boken har du fått den veldig
708 billig, og kjøper du den nå, får du den fortsatt billig samt donerer i
709 tillegg noen tiere til fremme av Creative Commons.&lt;/p&gt;
710
711 &lt;p&gt;Mens jeg var i gang med å titte etter informasjon om boken
712 oppdaget jeg at den også var dukket opp på
713 &lt;a href=&quot;https://books.google.no/books?id=uKUGCwAAQBAJ&quot;&gt;Google
714 Books&lt;/a&gt;, der en kan lese den på web. PDF-utgaven har ennå ikke
715 dukket opp hos &lt;a href=&quot;https://www.nb.no/&quot;&gt;Nasjonalbiblioteket&lt;/a&gt;,
716 men det regner jeg med kommer på plass i løpet av noen uker. Boken er
717 heller ikke dukket opp hos
718 &lt;a href=&quot;https://www.barnesandnoble.com/&quot;&gt;Barnes &amp; Noble&lt;/a&gt; ennå, men
719 jeg antar det bare er et tidsspørsmål før dette er på plass.&lt;/p&gt;
720
721 &lt;p&gt;Boken er dessverre ikke tilgjengelig fra norske bokhandlere, og
722 kommer neppe til å bli det med det første. Årsaken er at for å få det
723 til måtte jeg personlig håndtere bestilling av bøker, hvilket jeg ikke
724 er interessert i å bruke tid på. Jeg kunne betalt ca 2000,- til
725 &lt;a href=&quot;http://www.bokbasen.no/&quot;&gt;den norske bokbasen&lt;/a&gt;, en felles
726 database over bøker tilgjengelig for norske bokhandlere, for å få en
727 oppføring der, men da måtte jeg tatt imot bestillinger på epost og
728 sendt ut bøker selv. Det ville krevd at jeg var klar til å
729 sende ut bøker på kort varsel, dvs. holdt meg med ekstra bøker,
730 konvolutter og frimerker. Bokbasen har visst ikke opplegg for å be
731 bokhandlene bestille direkte via web, så jeg droppet oppføring der.
732 Jeg har spurt Haugen bok og Tronsmo direkte på epost om de er
733 interessert i å ta inn boken i sin bestillingskatalog, men ikke fått
734 svar, så jeg antar de ikke er interessert. Derimot har jeg fått en
735 hyggelig henvendelse fra Biblioteksentralen som fortalte at de har
736 lagt den inn i sin database slik at deres bibliotekskunder enkelt kan
737 bestille den via dem.&lt;/p&gt;
738
739 &lt;p&gt;Boken er i følge
740 &lt;a href=&quot;http://bibsys-almaprimo.hosted.exlibrisgroup.com/primo_library/libweb/action/display.do?tabs=detailsTab&amp;ct=display&amp;fn=search&amp;doc=BIBSYS_ILS71518423420002201&amp;indx=1&amp;recIds=BIBSYS_ILS71518423420002201&amp;recIdxs=0&amp;elementId=0&amp;renderMode=poppedOut&amp;displayMode=full&amp;frbrVersion=&amp;dscnt=0&amp;tab=library_catalogue&amp;dstmp=1448543801124&amp;vl(freeText0)=fri%20kultur&amp;vid=UBO&amp;mode=Basic&quot;&gt;Bibsys/Oria&lt;/a&gt;
741 og bokdatabasen til
742 &lt;a href=&quot;https://www.deich.folkebibl.no/cgi-bin/websok?tnr=1819617&quot;&gt;Deichmanske&lt;/a&gt;
743 tilgjengelig fra flere biblioteker allerede, og alle eksemplarer er
744 visst allerede utlånt med ventetid. Det synes jeg er veldig gledelig
745 å se. Jeg håper mange kommer til å lese boken. Jeg tror den er
746 spesielt egnet for foreldre og bekjente av oss nerder for å forklare
747 hva slags problemer vi ser med dagens opphavsrettsregime.&lt;/p&gt;
748 </description>
749 </item>
750
751 </channel>
752 </rss>