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