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