]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
2fe876a6b695a36c84f09b9ccee1b902a817e1fb
[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>Non-blocking bittorrent plugin for vlc</title>
11 <link>http://people.skolelinux.org/pere/blog/Non_blocking_bittorrent_plugin_for_vlc.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Non_blocking_bittorrent_plugin_for_vlc.html</guid>
13 <pubDate>Wed, 12 Dec 2018 07:20:00 +0100</pubDate>
14 <description>&lt;p&gt;A few hours ago, a new and improved version (2.4) of
15 &lt;a href=&quot;https://tracker.debian.org/pkg/vlc-plugin-bittorrent&quot;&gt;the VLC
16 bittorrent plugin&lt;/a&gt; was uploaded to Debian. This new version
17 include a complete rewrite of the bittorrent related code, which seem
18 to make the plugin non-blocking. This mean you can actually exit VLC
19 even when the plugin seem to be unable to get the bittorrent streaming
20 started. The new version also include support for filtering playlist
21 by file extension using command line options, if you want to avoid
22 processing audio, video or images. The package is currently in Debian
23 unstable, but should be available in Debian testing in two days. To
24 test it, simply install it like this:&lt;/p&gt;
25
26 &lt;p&gt;&lt;pre&gt;
27 apt install vlc-plugin-bittorrent
28 &lt;/pre&gt;&lt;/p&gt;
29
30 &lt;p&gt;After it is installed, you can try to use it to play a file
31 downloaded live via bittorrent like this:
32
33 &lt;p&gt;&lt;pre&gt;
34 vlc https://archive.org/download/Glass_201703/Glass_201703_archive.torrent
35 &lt;/pre&gt;&lt;/p&gt;
36
37 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
38 activities, please send Bitcoin donations to my address
39 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
40 </description>
41 </item>
42
43 <item>
44 <title>Retten til kontant betaling er en rettighet som må brukes for å beholdes</title>
45 <link>http://people.skolelinux.org/pere/blog/Retten_til_kontant_betaling_er_en_rettighet_som_m__brukes_for___beholdes.html</link>
46 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Retten_til_kontant_betaling_er_en_rettighet_som_m__brukes_for___beholdes.html</guid>
47 <pubDate>Tue, 11 Dec 2018 10:00:00 +0100</pubDate>
48 <description>&lt;p&gt;&lt;a href=&quot;https://www.fn.no/Om-FN/Avtaler/Menneskerettigheter/FNs-verdenserklaering-om-menneskerettigheter&quot;&gt;FNs
49 menneskerettighetserklæring&lt;/a&gt; artikkel 13 første punkt lyder som
50 følger:&lt;/p&gt;
51
52 &lt;p&gt;&lt;blockquote&gt;
53 Enhver har rett til å bevege seg fritt og til fritt å velge
54 oppholdssted innenfor en stats grenser.
55 &lt;/blockquote&gt;&lt;/p&gt;
56
57 &lt;p&gt;Det er altså en menneskerett å kunne bevege seg fritt i landet.
58 For å bevege seg fritt i landet, så må en kunne bevege seg uten å bli
59 sporet. Det vil i dagens samfunn innebære å bevege seg uten å legge
60 igjen digitale spor og uten å være radiomerket. Hvis en vet at ens
61 bevegelser, hvor en befinner seg når, og hvem som befinner seg i
62 nærheten, blir samlet inn og gjort tilgjengelig for fremmede, det være
63 seg myndighetene eller private organisasjoner, så kan en ikke lenger
64 bevege seg fritt. Dette gjør at det er en forutsetning for å ha glede
65 av retten til å bevege seg fritt i landet at en motstår fristelsen til
66 å legge igjen digitale spor når en betaler for seg. Rettigheter som
67 ikke blir brukt, blir fjernet. Den eneste måten i dag å unngå å legge
68 igjen digitale spor når en betaler for seg, er å betale med kontanter,
69 samt takke nei til å legge igjen navn og adresse (slik f.eks. Elkjøp
70 ber om &amp;mdash; jeg sier de kan legge inn «anonym anonym» når
71 datasystemet deres trenger et navn). Personlig anbefaler jeg å
72 konsekvent bruke kontant betaling når man beveger seg rundt, for å
73 bidra til forsvaret av menneskerettighetene i Norge. Kanskje noe også
74 for deg? Merk at det ikke er tilstrekkelig for å unngå sporing å
75 betale med kontanter, men det er et lite steg i riktig retning.&lt;/p&gt;
76
77 &lt;p&gt;Det er flere andre argumenter i tillegg til
78 menneskerettighetsargumentet for å bruke kontanter. I går hadde
79 Dagbladet en utmerket kommentar av sin journalist John Olav Egeland om
80 hvilket
81 &lt;a href=&quot;https://www.dagbladet.no/kultur/kontantlost-diktatur/70543434&quot;&gt;kontantløst
82 diktatur&lt;/a&gt; som venter oss hvis mange nok slutter å insistere på å
83 betale med kontanter. Jeg anbefaler deg å lese den.&lt;/p&gt;
84
85 &lt;p&gt;Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
86 det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
87 til min adresse
88 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.
89 Merk, betaling med bitcoin er ikke anonymt. :)&lt;/p&gt;
90 </description>
91 </item>
92
93 <item>
94 <title>Why is your site not using Content Security Policy / CSP?</title>
95 <link>http://people.skolelinux.org/pere/blog/Why_is_your_site_not_using_Content_Security_Policy___CSP_.html</link>
96 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Why_is_your_site_not_using_Content_Security_Policy___CSP_.html</guid>
97 <pubDate>Sun, 9 Dec 2018 15:00:00 +0100</pubDate>
98 <description>&lt;p&gt;Yesterday, I had the pleasure of watching on Frikanalen the OWASP
99 talk by Scott Helme titled
100 &quot;&lt;a href=&quot;https://frikanalen.no/video/626080/&quot;&gt;What We’ve Learned From
101 Billions of Security Reports&lt;/a&gt;&quot;. I had not heard of the
102 &lt;a href=&quot;https://en.wikipedia.org/wiki/Content_Security_Policy&quot;&gt;Content
103 Security Policy standard&lt;/a&gt; nor its ability to &quot;call home&quot; when a
104 browser detect a policy breach (I do not follow web page design
105 development much these days), and found the talk very illuminating.&lt;/p&gt;
106
107 &lt;p&gt;The mechanism allow a web site owner to use HTTP headers to tell
108 visitors web browser which sources (internal and external) are allowed to
109 be used on the web site. Thus it become possible to enforce a &quot;only
110 local content&quot; policy despite web designers urge to fetch programs
111 from random sites on the Internet, like the one
112 &lt;a href=&quot;https://securityaffairs.co/wordpress/68966/hacking/browsealoud-plugin-hack.html&quot;&gt;enabling
113 the attack&lt;/a&gt; reported by Scott Helme earlier this year.&lt;/p&gt;
114
115 &lt;p&gt;Using CSP seem like an obvious thing for a site admin to implement
116 to take some control over the information leak that occur when
117 external sources are used to render web pages, it is a mystery more
118 sites are not using CSP? It is being
119 &lt;a href=&quot;https://www.w3.org/TR/CSP/&quot;&gt;standardized under W3C&lt;/a&gt; these
120 days, and is supposed by most web browsers&lt;/p&gt;
121
122 &lt;p&gt;I managed to find &lt;a href=&quot;https://github.com/mozilla/django-csp&quot;&gt;a
123 Django middleware for implementing CSP&lt;/a&gt; and was happy to discover
124 it was already in Debian. I plan to use it to add CSP support to the
125 Frikanalen web site soon.&lt;/p&gt;
126
127 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
128 activities, please send Bitcoin donations to my address
129 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
130 </description>
131 </item>
132
133 <item>
134 <title>New and improved Frikanalen Kodi addon version 0.0.3</title>
135 <link>http://people.skolelinux.org/pere/blog/New_and_improved_Frikanalen_Kodi_addon_version_0_0_3.html</link>
136 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/New_and_improved_Frikanalen_Kodi_addon_version_0_0_3.html</guid>
137 <pubDate>Thu, 8 Nov 2018 10:30:00 +0100</pubDate>
138 <description>&lt;p&gt;If you read my blog regularly, you probably know I am involved in
139 running and developing the &lt;a href=&quot;https://frikanalen.no/&quot;&gt;Norwegian
140 TV channel Frikanalen&lt;/a&gt;. It is an open channel, allowing everyone
141 in Norway to publish videos on a TV channel with national coverage.
142 You can think of it as Youtube for national television.
143 In addition to distribution on RiksTV and Uninett, Frikanalen is also
144 available as a Kodi addon. The last few days I have updated the code
145 to add more features. A
146 &lt;a href=&quot;https://kodi.tv/addon/plugins-video-add-ons/frikanalen-nett-tv&quot;&gt;new
147 and improved version 0.0.3 Frikanalen addon&lt;/a&gt; was just made
148 available via the Kodi repositories. This new version include a
149 option to browse videos by category, as well as free text search
150 in the video archive. It will now also show the video duration in the
151 video lists, which were missing earlier. A new and experimental
152 link to the HD video stream currently being worked on is provided, for
153 those that want to see what the &lt;a href=&quot;https://casparcg.com/&quot;&gt;CasparCG&lt;/a&gt;
154 output look like. The alternative is the SD video stream, generated
155 using MLT. CasparCG is controlled by our
156 &lt;a href=&quot;https://github.com/Frikanalen/mltplayout/&quot;&gt;mltplayout
157 server&lt;/a&gt; which instead of talking to mlt is giving PLAY instructions
158 to the CasparCG server when it is time to start a new program.&lt;/p&gt;
159
160 &lt;p&gt;By now, you are probably wondering what kind of content is being
161 played on the channel. These days, it is filled with technical
162 presentations like those from &lt;a href=&quot;https://www.nuug.no/&quot;&gt;NUUG&lt;/a&gt;,
163 &lt;a href=&quot;https://www.debconf.org/&quot;&gt;Debconf&lt;/a&gt;, Makercon, and TED,
164 but there are also some periods with
165 &lt;a href=&quot;https://www.empo.no/&quot;&gt;EMPT TV&lt;/a&gt; and
166 &lt;a href=&quot;https://www.p7.no/&quot;&gt;P7&lt;/a&gt;.
167
168 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
169 activities, please send Bitcoin donations to my address
170 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
171 </description>
172 </item>
173
174 <item>
175 <title>Time for an official MIME type for patches?</title>
176 <link>http://people.skolelinux.org/pere/blog/Time_for_an_official_MIME_type_for_patches_.html</link>
177 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Time_for_an_official_MIME_type_for_patches_.html</guid>
178 <pubDate>Thu, 1 Nov 2018 08:15:00 +0100</pubDate>
179 <description>&lt;p&gt;As part of my involvement in
180 &lt;a href=&quot;https://gitlab.com/OsloMet-ABI/nikita-noark5-core&quot;&gt;the Nikita
181 archive API project&lt;/a&gt;, I&#39;ve been importing a fairly large lump of
182 emails into a test instance of the archive to see how well this would
183 go. I picked a subset of &lt;a href=&quot;https://notmuchmail.org/&quot;&gt;my
184 notmuch email database&lt;/a&gt;, all public emails sent to me via
185 @lists.debian.org, giving me a set of around 216 000 emails to import.
186 In the process, I had a look at the various attachments included in
187 these emails, to figure out what to do with attachments, and noticed
188 that one of the most common attachment formats do not have
189 &lt;a href=&quot;https://www.iana.org/assignments/media-types/media-types.xhtml&quot;&gt;an
190 official MIME type&lt;/a&gt; registered with IANA/IETF. The output from
191 diff, ie the input for patch, is on the top 10 list of formats
192 included in these emails. At the moment people seem to use either
193 text/x-patch or text/x-diff, but neither is officially registered. It
194 would be better if one official MIME type were registered and used
195 everywhere.&lt;/p&gt;
196
197 &lt;p&gt;To try to get one official MIME type for these files, I&#39;ve brought
198 up the topic on
199 &lt;a href=&quot;https://www.ietf.org/mailman/listinfo/media-types&quot;&gt;the
200 media-types mailing list&lt;/a&gt;. If you are interested in discussion
201 which MIME type to use as the official for patch files, or involved in
202 making software using a MIME type for patches, perhaps you would like
203 to join the discussion?&lt;/p&gt;
204
205 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
206 activities, please send Bitcoin donations to my address
207 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
208 </description>
209 </item>
210
211 <item>
212 <title>Measuring the speaker frequency response using the AUDMES free software GUI - nice free software</title>
213 <link>http://people.skolelinux.org/pere/blog/Measuring_the_speaker_frequency_response_using_the_AUDMES_free_software_GUI___nice_free_software.html</link>
214 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Measuring_the_speaker_frequency_response_using_the_AUDMES_free_software_GUI___nice_free_software.html</guid>
215 <pubDate>Mon, 22 Oct 2018 08:40:00 +0200</pubDate>
216 <description>&lt;p&gt;&lt;img src=&quot;http://people.skolelinux.org/pere/blog/images/2018-10-22-audmes-measure-speakers.png&quot; align=&quot;right&quot; width=&quot;40%&quot;/&gt;&lt;/p&gt;
217
218 &lt;p&gt;My current home stereo is a patchwork of various pieces I got on
219 flee markeds over the years. It is amazing what kind of equipment
220 show up there. I&#39;ve been wondering for a while if it was possible to
221 measure how well this equipment is working together, and decided to
222 see how far I could get using free software. After trawling the web I
223 came across an article from DIY Audio and Video on
224 &lt;a href=&quot;https://www.diyaudioandvideo.com/Tutorial/SpeakerResponseTesting/&quot;&gt;Speaker
225 Testing and Analysis&lt;/a&gt; describing how to test speakers, and it listing
226 several software options, among them
227 &lt;a href=&quot;https://sourceforge.net/projects/audmes/&quot;&gt;AUDio MEasurement
228 System (AUDMES)&lt;/a&gt;. It is the only free software system I could find
229 focusing on measuring speakers and audio frequency response. In the
230 process I also found an interesting article from NOVO on
231 &lt;a href=&quot;http://novo.press/understanding-speaker-specifications-and-frequency-response/&quot;&gt;Understanding
232 Speaker Specifications and Frequency Response&lt;/a&gt; and an article from
233 ecoustics on
234 &lt;a href=&quot;https://www.ecoustics.com/articles/understanding-speaker-frequency-response/&quot;&gt;Understanding
235 Speaker Frequency Response&lt;/a&gt;, with a lot of information on what to
236 look for and how to interpret the graphs. Armed with this knowledge,
237 I set out to measure the state of my speakers.&lt;/p&gt;
238
239 &lt;p&gt;The first hurdle was that AUDMES hadn&#39;t seen a commit for 10 years
240 and did not build with current compilers and libraries. I got in
241 touch with its author, who no longer was spending time on the program
242 but gave me write access to the subversion repository on Sourceforge.
243 The end result is that now the code build on Linux and is capable of
244 saving and loading the collected frequency response data in CSV
245 format. The application is quite nice and flexible, and I was able to
246 select the input and output audio interfaces independently. This made
247 it possible to use a USB mixer as the input source, while sending
248 output via my laptop headphone connection. I lacked the hardware and
249 cabling to figure out a different way to get independent cabling to
250 speakers and microphone.&lt;/p&gt;
251
252 &lt;p&gt;Using this setup I could see how a large range of high frequencies
253 apparently were not making it out of my speakers. The picture show
254 the frequency response measurement of one of the speakers. Note the
255 frequency lines seem to be slightly misaligned, compared to the CSV
256 output from the program. I can not hear several of these are high
257 frequencies, according to measurement from
258 &lt;a href=&quot;http://freehearingtestsoftware.com&quot;&gt;Free Hearing Test
259 Software&lt;/a&gt;, an freeware system to measure your hearing (still
260 looking for a free software alternative), so I do not know if they are
261 coming out out the speakers. I thus do not quite know how to figure
262 out if the missing frequencies is a problem with the microphone, the
263 amplifier or the speakers, but I managed to rule out the audio card in my
264 PC by measuring my Bose noise canceling headset using its own
265 microphone. This setup was able to see the high frequency tones, so
266 the problem with my stereo had to be in the amplifier or speakers.&lt;/p&gt;
267
268 &lt;p&gt;Anyway, to try to role out one factor I ended up picking up a new
269 set of speakers at a flee marked, and these work a lot better than the
270 old speakers, so I guess the microphone and amplifier is OK. If you
271 need to measure your own speakers, check out AUDMES. If more people
272 get involved, perhaps the project could become good enough to
273 &lt;a href=&quot;https://bugs.debian.org/910876&quot;&gt;include in Debian&lt;/a&gt;? And if
274 you know of some other free software to measure speakers and amplifier
275 performance, please let me know. I am aware of the freeware option
276 &lt;a href=&quot;https://www.roomeqwizard.com/&quot;&gt;REW&lt;/a&gt;, but I want something
277 that can be developed also when the vendor looses interest.&lt;/p&gt;
278
279 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
280 activities, please send Bitcoin donations to my address
281 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
282 </description>
283 </item>
284
285 <item>
286 <title>Web browser integration of VLC with Bittorrent support</title>
287 <link>http://people.skolelinux.org/pere/blog/Web_browser_integration_of_VLC_with_Bittorrent_support.html</link>
288 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Web_browser_integration_of_VLC_with_Bittorrent_support.html</guid>
289 <pubDate>Sun, 21 Oct 2018 09:50:00 +0200</pubDate>
290 <description>&lt;p&gt;Bittorrent is as far as I know, currently the most efficient way to
291 distribute content on the Internet. It is used all by all sorts of
292 content providers, from national TV stations like
293 &lt;a href=&quot;https://www.nrk.no/&quot;&gt;NRK&lt;/a&gt;, Linux distributors like
294 &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian&lt;/a&gt; and
295 &lt;a href=&quot;https://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt;, and of course the
296 &lt;a href=&quot;https://archive.org/&quot;&gt;Internet archive&lt;/A&gt;.
297
298 &lt;p&gt;Almost a month ago
299 &lt;a href=&quot;https://tracker.debian.org/pkg/vlc-plugin-bittorrent&quot;&gt;a new
300 package adding Bittorrent support to VLC&lt;/a&gt; became available in
301 Debian testing and unstable. To test it, simply install it like
302 this:&lt;/p&gt;
303
304 &lt;p&gt;&lt;pre&gt;
305 apt install vlc-plugin-bittorrent
306 &lt;/pre&gt;&lt;/p&gt;
307
308 &lt;p&gt;Since the plugin was made available for the first time in Debian,
309 several improvements have been made to it. In version 2.2-4, now
310 available in both testing and unstable, a desktop file is provided to
311 teach browsers to start VLC when the user click on torrent files or
312 magnet links. The last part is thanks to me finally understanding
313 what the strange x-scheme-handler style MIME types in desktop files
314 are used for. By adding x-scheme-handler/magnet to the MimeType entry
315 in the desktop file, at least the browsers Firefox and Chromium will
316 suggest to start VLC when selecting a magnet URI on a web page. The
317 end result is that now, with the plugin installed in Buster and Sid,
318 one can visit any
319 &lt;a href=&quot;https://archive.org/details/CopyingIsNotTheft1080p&quot;&gt;Internet
320 Archive page with movies&lt;/a&gt; using a web browser and click on the
321 torrent link to start streaming the movie.&lt;/p&gt;
322
323 &lt;p&gt;Note, there is still some misfeatures in the plugin. One is the
324 fact that it will hang and
325 &lt;a href=&quot;https://github.com/johang/vlc-bittorrent/issues/13&quot;&gt;block VLC
326 from exiting until the torrent streaming starts&lt;/a&gt;. Another is the
327 fact that it
328 &lt;a href=&quot;https://github.com/johang/vlc-bittorrent/issues/9&quot;&gt;will pick
329 and play a random file in a multi file torrent&lt;/a&gt;. This is not
330 always the video file you want. Combined with the first it can be a
331 bit hard to get the video streaming going. But when it work, it seem
332 to do a good job.&lt;/p&gt;
333
334 &lt;p&gt;For the Debian packaging, I would love to find a good way to test
335 if the plugin work with VLC using autopkgtest. I tried, but do not
336 know enough of the inner workings of VLC to get it working. For now
337 the autopkgtest script is only checking if the .so file was
338 successfully loaded by VLC. If you have any suggestions, please
339 submit a patch to the Debian bug tracking system.&lt;/p&gt;
340
341 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
342 activities, please send Bitcoin donations to my address
343 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
344 </description>
345 </item>
346
347 <item>
348 <title>Release 0.2 of free software archive system Nikita announced</title>
349 <link>http://people.skolelinux.org/pere/blog/Release_0_2_of_free_software_archive_system_Nikita_announced.html</link>
350 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Release_0_2_of_free_software_archive_system_Nikita_announced.html</guid>
351 <pubDate>Thu, 18 Oct 2018 14:40:00 +0200</pubDate>
352 <description>&lt;p&gt;This morning, the new release of the
353 &lt;a href=&quot;https://gitlab.com/OsloMet-ABI/nikita-noark5-core/&quot;&gt;Nikita
354 Noark 5 core project&lt;/a&gt; was
355 &lt;a href=&quot;https://lists.nuug.no/pipermail/nikita-noark/2018-October/000406.html&quot;&gt;announced
356 on the project mailing list&lt;/a&gt;. The free software solution is an
357 implementation of the Norwegian archive standard Noark 5 used by
358 government offices in Norway. These were the changes in version 0.2
359 since version 0.1.1 (from NEWS.md):
360
361 &lt;ul&gt;
362 &lt;li&gt;Fix typos in REL names&lt;/li&gt;
363 &lt;li&gt;Tidy up error message reporting&lt;/li&gt;
364 &lt;li&gt;Fix issue where we used Integer.valueOf(), not Integer.getInteger()&lt;/li&gt;
365 &lt;li&gt;Change some String handling to StringBuffer&lt;/li&gt;
366 &lt;li&gt;Fix error reporting&lt;/li&gt;
367 &lt;li&gt;Code tidy-up&lt;/li&gt;
368 &lt;li&gt;Fix issue using static non-synchronized SimpleDateFormat to avoid
369 race conditions&lt;/li&gt;
370 &lt;li&gt;Fix problem where deserialisers were treating integers as strings&lt;/li&gt;
371 &lt;li&gt;Update methods to make them null-safe&lt;/li&gt;
372 &lt;li&gt;Fix many issues reported by coverity&lt;/li&gt;
373 &lt;li&gt;Improve equals(), compareTo() and hash() in domain model&lt;/li&gt;
374 &lt;li&gt;Improvements to the domain model for metadata classes&lt;/li&gt;
375 &lt;li&gt;Fix CORS issues when downloading document&lt;/li&gt;
376 &lt;li&gt;Implementation of case-handling with registryEntry and document upload&lt;/li&gt;
377 &lt;li&gt;Better support in Javascript for OPTIONS&lt;/li&gt;
378 &lt;li&gt;Adding concept description of mail integration&lt;/li&gt;
379 &lt;li&gt;Improve setting of default values for GET on ny-journalpost&lt;/li&gt;
380 &lt;li&gt;Better handling of required values during deserialisation &lt;/li&gt;
381 &lt;li&gt;Changed tilknyttetDato (M620) from date to dateTime&lt;/li&gt;
382 &lt;li&gt;Corrected some opprettetDato (M600) (de)serialisation errors.&lt;/li&gt;
383 &lt;li&gt;Improve parse error reporting.&lt;/li&gt;
384 &lt;li&gt;Started on OData search and filtering.&lt;/li&gt;
385 &lt;li&gt;Added Contributor Covenant Code of Conduct to project.&lt;/li&gt;
386 &lt;li&gt;Moved repository and project from Github to Gitlab.&lt;/li&gt;
387 &lt;li&gt;Restructured repository, moved code into src/ and web/.&lt;/li&gt;
388 &lt;li&gt;Updated code to use Spring Boot version 2.&lt;/li&gt;
389 &lt;li&gt;Added support for OAuth2 authentication.&lt;/li&gt;
390 &lt;li&gt;Fixed several bugs discovered by Coverity.&lt;/li&gt;
391 &lt;li&gt;Corrected handling of date/datetime fields.&lt;/li&gt;
392 &lt;li&gt;Improved error reporting when rejecting during deserializatoin.&lt;/li&gt;
393 &lt;li&gt;Adjusted default values provided for ny-arkivdel, ny-mappe,
394 ny-saksmappe, ny-journalpost and ny-dokumentbeskrivelse.&lt;/li&gt;
395 &lt;li&gt;Several fixes for korrespondansepart*.&lt;/li&gt;
396 &lt;li&gt;Updated web GUI:
397 &lt;ul&gt;
398 &lt;li&gt;Now handle both file upload and download.&lt;/li&gt;
399 &lt;li&gt;Uses new OAuth2 authentication for login.&lt;/li&gt;
400 &lt;li&gt;Forms now fetches default values from API using GET.&lt;/li&gt;
401 &lt;li&gt;Added RFC 822 (email), TIFF and JPEG to list of possible file formats.&lt;/li&gt;
402 &lt;/ul&gt;&lt;/li&gt;
403 &lt;/ul&gt;
404
405 &lt;p&gt;The changes and improvements are extensive. Running diffstat on
406 the changes between git tab 0.1.1 and 0.2 show 1098 files changed,
407 108666 insertions(+), 54066 deletions(-).&lt;/p&gt;
408
409 &lt;p&gt;If free and open standardized archiving API sound interesting to
410 you, please contact us on IRC
411 (&lt;a href=&quot;irc://irc.freenode.net/%23nikita&quot;&gt;#nikita on
412 irc.freenode.net&lt;/a&gt;) or email
413 (&lt;a href=&quot;https://lists.nuug.no/mailman/listinfo/nikita-noark&quot;&gt;nikita-noark
414 mailing list&lt;/a&gt;).&lt;/p&gt;
415
416 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
417 activities, please send Bitcoin donations to my address
418 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
419 </description>
420 </item>
421
422 <item>
423 <title>Fetching trusted timestamps using the rfc3161ng python module</title>
424 <link>http://people.skolelinux.org/pere/blog/Fetching_trusted_timestamps_using_the_rfc3161ng_python_module.html</link>
425 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Fetching_trusted_timestamps_using_the_rfc3161ng_python_module.html</guid>
426 <pubDate>Mon, 8 Oct 2018 12:30:00 +0200</pubDate>
427 <description>&lt;p&gt;I have earlier covered the basics of trusted timestamping using the
428 &#39;openssl ts&#39; client. See blog post for
429 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Public_Trusted_Timestamping_services_for_everyone.html&quot;&gt;2014&lt;/a&gt;,
430 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/syslog_trusted_timestamp___chain_of_trusted_timestamps_for_your_syslog.html&quot;&gt;2016&lt;/a&gt;
431 and
432 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Idea_for_storing_trusted_timestamps_in_a_Noark_5_archive.html&quot;&gt;2017&lt;/a&gt;
433 for those stories. But some times I want to integrate the timestamping
434 in other code, and recently I needed to integrate it into Python.
435 After searching a bit, I found
436 &lt;a href=&quot;https://dev.entrouvert.org/projects/python-rfc3161&quot;&gt;the
437 rfc3161 library&lt;/a&gt; which seemed like a good fit, but I soon
438 discovered it only worked for python version 2, and I needed something
439 that work with python version 3. Luckily I next came across
440 &lt;a href=&quot;https://github.com/trbs/rfc3161ng/&quot;&gt;the rfc3161ng library&lt;/a&gt;,
441 a fork of the original rfc3161 library. Not only is it working with
442 python 3, it have fixed a few of the bugs in the original library, and
443 it has an active maintainer. I decided to wrap it up and make it
444 &lt;a href=&quot;https://tracker.debian.org/pkg/python-rfc3161ng&quot;&gt;available in
445 Debian&lt;/a&gt;, and a few days ago it entered Debian unstable and testing.&lt;/p&gt;
446
447 &lt;p&gt;Using the library is fairly straight forward. The only slightly
448 problematic step is to fetch the required certificates to verify the
449 timestamp. For some services it is straight forward, while for others
450 I have not yet figured out how to do it. Here is a small standalone
451 code example based on of the integration tests in the library code:&lt;/p&gt;
452
453 &lt;pre&gt;
454 #!/usr/bin/python3
455
456 &quot;&quot;&quot;
457
458 Python 3 script demonstrating how to use the rfc3161ng module to
459 get trusted timestamps.
460
461 The license of this code is the same as the license of the rfc3161ng
462 library, ie MIT/BSD.
463
464 &quot;&quot;&quot;
465
466 import os
467 import pyasn1.codec.der
468 import rfc3161ng
469 import subprocess
470 import tempfile
471 import urllib.request
472
473 def store(f, data):
474 f.write(data)
475 f.flush()
476 f.seek(0)
477
478 def fetch(url, f=None):
479 response = urllib.request.urlopen(url)
480 data = response.read()
481 if f:
482 store(f, data)
483 return data
484
485 def main():
486 with tempfile.NamedTemporaryFile() as cert_f,\
487 tempfile.NamedTemporaryFile() as ca_f,\
488 tempfile.NamedTemporaryFile() as msg_f,\
489 tempfile.NamedTemporaryFile() as tsr_f:
490
491 # First fetch certificates used by service
492 certificate_data = fetch(&#39;https://freetsa.org/files/tsa.crt&#39;, cert_f)
493 ca_data_data = fetch(&#39;https://freetsa.org/files/cacert.pem&#39;, ca_f)
494
495 # Then timestamp the message
496 timestamper = \
497 rfc3161ng.RemoteTimestamper(&#39;http://freetsa.org/tsr&#39;,
498 certificate=certificate_data)
499 data = b&quot;Python forever!\n&quot;
500 tsr = timestamper(data=data, return_tsr=True)
501
502 # Finally, convert message and response to something &#39;openssl ts&#39; can verify
503 store(msg_f, data)
504 store(tsr_f, pyasn1.codec.der.encoder.encode(tsr))
505 args = [&quot;openssl&quot;, &quot;ts&quot;, &quot;-verify&quot;,
506 &quot;-data&quot;, msg_f.name,
507 &quot;-in&quot;, tsr_f.name,
508 &quot;-CAfile&quot;, ca_f.name,
509 &quot;-untrusted&quot;, cert_f.name]
510 subprocess.check_call(args)
511
512 if &#39;__main__&#39; == __name__:
513 main()
514 &lt;/pre&gt;
515
516 &lt;p&gt;The code fetches the required certificates, store them as temporary
517 files, timestamp a simple message, store the message and timestamp to
518 disk and ask &#39;openssl ts&#39; to verify the timestamp. A timestamp is
519 around 1.5 kiB in size, and should be fairly easy to store for future
520 use.&lt;/p&gt;
521
522 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
523 activities, please send Bitcoin donations to my address
524 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
525 </description>
526 </item>
527
528 <item>
529 <title>Automatic Google Drive sync using grive in Debian</title>
530 <link>http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html</link>
531 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html</guid>
532 <pubDate>Thu, 4 Oct 2018 15:20:00 +0200</pubDate>
533 <description>&lt;p&gt;A few days, I rescued a Windows victim over to Debian. To try to
534 rescue the remains, I helped set up automatic sync with Google Drive.
535 I did not find any sensible Debian package handling this
536 automatically, so I rebuild the grive2 source from
537 &lt;a href=&quot;http://www.webupd8.org/&quot;&gt;the Ubuntu UPD8 PPA&lt;/a&gt; to do the
538 task and added a autostart desktop entry and a small shell script to
539 run in the background while the user is logged in to do the sync.
540 Here is a sketch of the setup for future reference.&lt;/p&gt;
541
542 &lt;p&gt;I first created &lt;tt&gt;~/googledrive&lt;/tt&gt;, entered the directory and
543 ran &#39;&lt;tt&gt;grive -a&lt;/tt&gt;&#39; to authenticate the machine/user. Next, I
544 created a autostart hook in &lt;tt&gt;~/.config/autostart/grive.desktop&lt;/tt&gt;
545 to start the sync when the user log in:&lt;/p&gt;
546
547 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
548 [Desktop Entry]
549 Name=Google drive autosync
550 Type=Application
551 Exec=/home/user/bin/grive-sync
552 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
553
554 &lt;p&gt;Finally, I wrote the &lt;tt&gt;~/bin/grive-sync&lt;/tt&gt; script to sync
555 ~/googledrive/ with the files in Google Drive.&lt;/p&gt;
556
557 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
558 #!/bin/sh
559 set -e
560 cd ~/
561 cleanup() {
562 if [ &quot;$syncpid&quot; ] ; then
563 kill $syncpid
564 fi
565 }
566 trap cleanup EXIT INT QUIT
567 /usr/lib/grive/grive-sync.sh listen googledrive 2&gt;&amp;1 | sed &quot;s%^%$0:%&quot; &amp;
568 syncpdi=$!
569 while true; do
570 if ! xhost &gt;/dev/null 2&gt;&amp;1 ; then
571 echo &quot;no DISPLAY, exiting as the user probably logged out&quot;
572 exit 1
573 fi
574 if [ ! -e /run/user/1000/grive-sync.sh_googledrive ] ; then
575 /usr/lib/grive/grive-sync.sh sync googledrive
576 fi
577 sleep 300
578 done 2&gt;&amp;1 | sed &quot;s%^%$0:%&quot;
579 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
580
581 &lt;p&gt;Feel free to use the setup if you want. It can be assumed to be
582 GNU GPL v2 licensed (or any later version, at your leisure), but I
583 doubt this code is possible to claim copyright on.&lt;/p&gt;
584
585 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
586 activities, please send Bitcoin donations to my address
587 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
588 </description>
589 </item>
590
591 </channel>
592 </rss>