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">
4 <title>Petter Reinholdtsen
</title>
5 <description></description>
6 <link>https://people.skolelinux.org/pere/blog/
</link>
7 <atom:link href=
"https://people.skolelinux.org/pere/blog/index.rss" rel=
"self" type=
"application/rss+xml" />
10 <title>Test framework for DocBook processors / formatters
</title>
11 <link>https://people.skolelinux.org/pere/blog/Test_framework_for_DocBook_processors___formatters.html
</link>
12 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Test_framework_for_DocBook_processors___formatters.html
</guid>
13 <pubDate>Sun,
5 Nov
2023 13:
00:
00 +
0100</pubDate>
14 <description><p
>All the books I have published so far has been using
15 <a href=
"https://docbook.org/
">DocBook
</a
> somewhere in the process.
16 For the first book, the source format was DocBook, while for every
17 later book it was an intermediate format used as the stepping stone to
18 be able to present the same manuscript in several formats, on paper,
19 as ebook in ePub format, as a HTML page and as a PDF file either for
20 paper production or for Internet consumption. This is made possible
21 with a wide variety of free software tools with DocBook support in
22 Debian. The source format of later books have been docx via rst,
23 Markdown, Filemaker and Asciidoc, and for all of these I was able to
24 generate a suitable DocBook file for further processing using
25 <a href=
"https://tracker.debian.org/pkg/pandoc
">pandoc
</a
>,
26 <a href=
"https://tracker.debian.org/pkg/asciidoc
">a2x
</a
> and
27 <a href=
"https://tracker.debian.org/pkg/asciidoctor
">asciidoctor
</a
>,
28 as well as rendering using
29 <a href=
"https://tracker.debian.org/pkg/xmlto
">xmlto
</a
>,
30 <a href=
"https://tracker.debian.org/pkg/dbtoepub
">dbtoepub
</a
>,
31 <a href=
"https://tracker.debian.org/pkg/dblatex
">dblatex
</a
>,
32 <a href=
"https://tracker.debian.org/pkg/docbook-xsl
">docbook-xsl
</a
> and
33 <a href=
"https://tracker.debian.org/pkg/fop
">fop
</a
>.
</p
>
35 <p
>Most of the
<a href=
"http://www.hungry.com/~pere/publisher/
">books I
36 have published
</a
> are translated books, with English as the source
38 <a href=
"https://tracker.debian.org/pkg/po4a
">po4a
</a
> to
39 handle translations using the gettext PO format has been a blessing,
40 but publishing translated books had triggered the need to ensure the
41 DocBook tools handle relevant languages correctly. For every new
42 language I have published, I had to submit patches dblatex, dbtoepub
43 and docbook-xsl fixing incorrect language and country specific issues
44 in the framework themselves. Typically this has been missing keywords
45 like
'figure
' or sort ordering of index entries. After a while it
46 became tiresome to only discover issues like this by accident, and I
47 decided to write a DocBook
"test framework
" exercising various
48 features of DocBook and allowing me to see all features exercised for
49 a given language. It consist of a set of DocBook files, a version
4
50 book, a version
5 book, a v4 book set, a v4 selection of problematic
51 tables, one v4 testing sidefloat and finally one v4 testing a book of
52 articles. The DocBook files are accompanied with a set of build rules
53 for building PDF using dblatex and docbook-xsl/fop, HTML using xmlto
54 or docbook-xsl and epub using dbtoepub. The result is a set of files
55 visualizing footnotes, indexes, table of content list, figures,
56 formulas and other DocBook features, allowing for a quick review on
57 the completeness of the given locale settings. To build with a
58 different language setting, all one need to do is edit the lang= value
59 in the .xml file to pick a different ISO
639 code value and run
60 'make
'.
</p
>
62 <p
>The
<a href=
"https://codeberg.org/pere/docbook-example/
">test framework
63 source code
</a
> is available from Codeberg, and a generated set of
64 presentations of the various examples is available as Codeberg static
66 <a href=
"https://pere.codeberg.page/docbook-example/
">https://pere.codeberg.page/docbook-example/
</a
>.
67 Using this test framework I have been able to discover and report
68 several bugs and missing features in various tools, and got a lot of
69 them fixed. For example I got Northern Sami keywords added to both
70 docbook-xsl and dblatex, fixed several typos in Norwegian bokmål and
71 Norwegian Nynorsk, support for non-ascii title IDs added to pandoc,
72 Norwegian index sorting support fixed in xindy and initial Norwegian
73 Bokmål support added to dblatex. Some issues still remains, though.
74 Default index sorting rules are still broken in several tools, so the
75 Norwegian letters æ, ø and å are more often than not sorted properly
76 in the book index.
</p
>
78 <p
>The test framework recently received some more polish, as part of
79 publishing my latest book. This book contained a lot of fairly
80 complex tables, which exposed bugs in some of the tools. This made me
81 add a new test file with various tables, as well as spend some time to
82 brush up the build rules. My goal is for the test framework to
83 exercise all DocBook features to make it easier to see which features
84 work with different processors, and hopefully get them all to support
85 the full set of DocBook features. Feel free to send patches to extend
86 the test set, and test it with your favorite DocBook processor.
87 Please visit these two URLs to learn more:
</p
>
90 <li
><a href=
"https://codeberg.org/pere/docbook-example/
">https://codeberg.org/pere/docbook-example/
</a
></li
>
91 <li
><a href=
"https://pere.codeberg.page/docbook-example/
">https://pere.codeberg.page/docbook-example/
</a
></li
>
94 <p
>If you want to learn more on Docbook and translations, I recommend
95 having a look at the
<a href=
"https://docbook.org/
">the DocBook
97 <a href=
"https://doccookbook.sourceforge.net/html/en/
">the DoCookBook
98 site
<a/
> and my earlier blog post on
99 <a href=
"https://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html
">how
100 the Skolelinux project process and translate documentation
</a
>, a talk I gave earlier this year on
101 <a href=
"https://www.nuug.no/aktiviteter/
20230314-oversetting-og-publisering-av-b%c3%b8ker-med-fri-programvare/
">how
102 to translate and publish books using free software
</a
> (Norwegian
107 https://github.com/docbook/xslt10-stylesheets/issues/
205 (docbook-xsl: sme support)
108 https://bugs.debian.org/
968437 (xindy: index sorting rules for nb/nn)
109 https://bugs.debian.org/
856123 (pandoc: markdown to docbook with non-english titles)
110 https://bugs.debian.org/
864813 (dblatex: missing nb words)
111 https://bugs.debian.org/
756386 (dblatex: index sorting rules for nb/nn)
112 https://bugs.debian.org/
796871 (dbtoepub: index sorting rules for nb/nn)
113 https://bugs.debian.org/
792616 (dblatex: PDF metadata)
114 https://bugs.debian.org/
686908 (docbook-xsl: index sorting rules for nb/nn)
115 https://sourceforge.net/tracker/?func=detail
&atid=
373747&aid=
3556630&group_id=
21935 (docbook-xsl: nb/nn support)
116 https://bugs.debian.org/
684391 (dblatex: initial nb support)
120 <p
>As usual, if you use Bitcoin and want to show your support of my
121 activities, please send Bitcoin donations to my address
122 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
127 <title>«Virkninger av angrefristloven», hovedfagsoppgaven som fikk endret en lov
</title>
128 <link>https://people.skolelinux.org/pere/blog/_Virkninger_av_angrefristloven___hovedfagsoppgaven_som_fikk_endret_en_lov.html
</link>
129 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/_Virkninger_av_angrefristloven___hovedfagsoppgaven_som_fikk_endret_en_lov.html
</guid>
130 <pubDate>Sun,
29 Oct
2023 22:
00:
00 +
0100</pubDate>
131 <description><img src=
"http://people.skolelinux.org/pere/blog/images/
2023-
10-
29-bok-angrefrist.svg
" width=
"20%
" align=
"center
"></a
>
133 <p
>I
1979 leverte Ole-Erik Yrvin en hovedfagsoppgave for Cand. Scient.
134 ved Institutt for sosiologi på Universitetet i Oslo på oppdrag fra
135 Forbruker- og administrasjonsdepartementet. Oppgaven evaluerte
136 Angrefristloven fra
1972, og det han oppdaget førte til at loven ble
137 endret fire år senere.
</p
>
139 <p
>Jeg har kjent Ole-Erik en stund, og synes det var trist at hans
140 oppgave ikke lenger er tilgjengelig, hverken fra oppdragsgiver
141 eller fra universitetet. Hans forsøk på å få den avbildet og lagt
142 ut på Internett har vist seg fånyttes, så derfor tilbød jeg meg for
143 en stund tilbake å publisere den og gjøre den tilgjengelig med
144 fribruksvilkår på Internett. Det er nå klart, og hovedfagsoppgaven
145 er tilgjengelig blant annet via
<a
146 href=
"http://www.hungry.com/~pere/publisher/
">min liste over
147 publiserte bøker
</a
>, både som nettside,
148 <a href=
"https://www.lulu.com/search?contributor=Ole-Erik+Yrvin
">digital
149 bok i ePub-format og på papir fra lulu.com
</a
>. Jeg regner med at
150 den også vil dukke opp på nettbokhandlere i løpet av en måned eller
153 <p
>Alle tabeller og figurer er gjenskapt for bedre lesbarhet, noen
154 skrivefeil rettet opp og mange referanser har fått flere detaljer
155 som ISBN-nummer og DOI-referanse. Selv om jeg ikke regner med at
156 dette blir en kioskvelter, så håper jeg denne nye utgaven kan komme
157 fremtiden til glede.
</p
>
159 <p
>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
160 det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
162 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>. Merk,
163 betaling med bitcoin er ikke anonymt. :)
</p
>
168 <title>«underordnet tjenestemann blir inhabil fordi en overordnet er inhabil».
</title>
169 <link>https://people.skolelinux.org/pere/blog/_underordnet_tjenestemann_blir_inhabil_fordi_en_overordnet_er_inhabil__.html
</link>
170 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/_underordnet_tjenestemann_blir_inhabil_fordi_en_overordnet_er_inhabil__.html
</guid>
171 <pubDate>Thu,
7 Sep
2023 09:
10:
00 +
0200</pubDate>
172 <description><p
>Medlemmene av Norges regjering har demonstert de siste månedene at
173 habilitetsvureringer ikke er deres sterke side og det gjelder både
174 Arbeiderpartiets og Senterpartiers representater. Det er heldigvis
175 enklere i det private, da inhabilitetsreglene kun gjelder de som
176 jobber for folket, ikke seg selv. Sist ut er utenriksminister
177 Huitfeldt. I går kom nyheten om at
178 <a href=
"https://www.nrk.no/nyheter/riksadvokaten_-okokrim-nestsjef-kan-behandle-huitfeldt-saken-
1.16545162">Riksadvokaten
179 har konkludert med at nestsjefen i Økokrim kan behandle sak om
180 habilitet og innsidekunnskap
</a
> for Huitfeldt, på tross av at hans
181 overordnede, sjefen for Økokrim, har meldt seg inhabil i saken. Dette
182 er litt rart. I veilednigen
183 «
<a href=
"https://www.regjeringen.no/globalassets/upload/krd/vedlegg/komm/veiledere/habilitet_i_kommuner_og_fylkeskommuner.pdf
">Habilitet
184 i kommuner og fylkeskommuner
</a
>» av Kommunal- og regionaldepartementet
185 forteller de hva som gjelder, riktig nok gjelder veiledningen ikke for
186 Økokrim som jo ikke er kommune eller fylkeskommune, men jeg får ikke
187 inntrykk av at dette er regler som kun gjelder for kommune og
191 <p
>«
<strong
>2.1 Oversikt over inhabilitetsgrunnlagene
</strong
>
193 <p
>De alminnelige reglene om inhabilitet for den offentlige
194 forvaltningen er gitt i
195 <a href=
"https://lovdata.no/dokument/NL/lov/
1967-
02-
10/KAPITTEL_2#KAPITTEL_2
">forvaltningsloven
196 §§
6 til
10</a
>. Forvaltningslovens hovedregel om inhabilitet framgår
197 av §
6. Her er det gitt tre ulike grunnlag som kan føre til at en
198 tjenestemann eller folkevalgt blir inhabil. I §
6 første ledd
199 bokstavene a til e er det oppstilt konkrete tilknytningsforhold mellom
200 tjenestemannen og saken eller sakens parter som automatisk fører til
201 inhabilitet. Annet ledd oppstiller en skjønnsmessig regel om at
202 tjenestemannen også kan bli inhabil etter en konkret vurdering av
203 inhabilitetsspørsmålet, der en lang rekke momenter kan være
204 relevante. I tredje ledd er det regler om såkalt avledet
205 inhabilitet. Det vil si at en underordnet tjenestemann blir inhabil
206 fordi en overordnet er inhabil.»
</p
>
209 <p
>Loven sier ganske enkelt «Er den overordnede tjenestemann ugild,
210 kan avgjørelse i saken heller ikke treffes av en direkte underordnet
211 tjenestemann i samme forvaltningsorgan.» Jeg antar tanken er at en
212 underordnet vil stå i fare for å tilpasse sine konklusjoner til det
213 overordnet vil ha fordel av, for å fortsatt ha et godt forhold til sin
214 overordnede. Men jeg er ikke jurist og forstår nok ikke kompliserte
215 juridiske vurderinger. For å sitere «Kamerat Napoleon» av George
216 Orwell: «Alle dyr er like, men noen dyr er likere enn andre».
221 <title>Invidious add-on for Kodi
20</title>
222 <link>https://people.skolelinux.org/pere/blog/Invidious_add_on_for_Kodi_20.html
</link>
223 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Invidious_add_on_for_Kodi_20.html
</guid>
224 <pubDate>Thu,
10 Aug
2023 19:
50:
00 +
0200</pubDate>
225 <description><p
>I still enjoy
<a href=
"https://kodi.tv/
">Kodi
</a
> and
226 <a href=
"https://libreelec.tv/
">LibreELEC
</a
> as my multimedia center
227 at home. Sadly two of the services I really would like to use from
228 within Kodi are not easily available. The most wanted add-on would be
229 one making
<a href=
"https://archive.org/
">The Internet Archive
</a
>
230 available, and it has
231 <a href=
"https://kodi.wiki/view/Add-on:Internet_Archive
">not been
232 working
</a
> for many years. The second most wanted add-on is one
233 using
<a href=
"https://invidious.io/
">the Invidious privacy enhanced
234 Youtube frontent
</a
>. A plugin for this has been partly working, but
235 not been kept up to date in the Kodi add-on repository, and its
236 upstream seem to have given it up in April this year, when the git
237 repository was closed. A few days ago I got tired of this sad state
238 of affairs and decided to
239 <a href=
"https://github.com/petterreinholdtsen/kodi-invidious-plugin
">have
240 a go at improving the Invidious add-on
</a
>. As
241 <a href=
"https://github.com/iv-org/invidious/issues/
3872">Google has
242 already attacked
</a
> the Invidious concept, so it need all the support
243 if can get. My small contribution here is to improve the service
244 status on Kodi.
</p
>
246 <p
>I added support to the Invidious add-on for automatically picking a
247 working Invidious instance, instead of requiring the user to specify
248 the URL to a specific instance after installation. I also had a look
249 at the set of patches floating around in the various forks on github,
250 and decided to clean up at least some of the features I liked and
251 integrate them into my new release branch. Now the plugin can handle
252 channel and short video items in search results. Earlier it could
253 only handle single video instances in the search response. I also
254 brushed up the set of metadata displayed a bit, but hope I can figure
255 out how to get more relevant metadata displayed.
</p
>
257 <p
>Because I only use Kodi
20 myself, I only test on version
20 and am
258 only motivated to ensure version
20 is working. Because of API changes
259 between version
19 and
20, I suspect it will fail with earlier Kodi
263 <a href=
"https://github.com/xbmc/repo-plugins/pull/
4363">asked to have
264 the add-on added
</a
> to the official Kodi
20 repository, and is
265 waiting to heard back from the repo maintainers.
</p
>
267 <p
>As usual, if you use Bitcoin and want to show your support of my
268 activities, please send Bitcoin donations to my address
269 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
274 <title>What did I learn from OpenSnitch this summer?
</title>
275 <link>https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html
</link>
276 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html
</guid>
277 <pubDate>Sun,
11 Jun
2023 08:
30:
00 +
0200</pubDate>
278 <description><p
>With yesterdays
279 <a href=
"https://www.debian.org/News/
2023/
20230610">release of Debian
280 12 Bookworm
</a
>, I am happy to know the
281 <a href=
"https://tracker.debian.org/pkg/opensnitch
">the interactive
282 application firewall OpenSnitch
</a
> is available for a wider audience.
283 I have been running it for a few weeks now, and have been surprised
284 about some of the programs connecting to the Internet. Some programs
285 are obviously calling out from my machine, like the NTP network based
286 clock adjusting system and Tor to reach other Tor clients, but others
287 were more dubious. For example, the KDE Window manager try to look up
288 the host name in DNS, for no apparent reason, but if this lookup is
289 blocked the KDE desktop get periodically stuck when I use it. Another
290 surprise was how much Firefox call home directly to mozilla.com,
291 mozilla.net and googleapis.com, to mention a few, when I visit other
292 web pages. This direct connection happen even if I told Firefox to
293 always use a proxy, and the proxy setting is ignored for this traffic.
294 Other surprising connections come from audacity and dirmngr (I do not
295 use Gnome). It took some trial and error to get a good default set of
296 permissions. Without it, I would get popups asking for permissions at
297 any time, also the most inconvenient ones where I am in the middle of
298 a time sensitive gaming session.
</p
>
300 <p
>I suspect some application developers should rethink when then need
301 to use network connections or DNS lookups, and recommend testing
302 OpenSnitch (only
<tt
>apt install opensnitch
</tt
> away in Debian
303 Bookworm) to locate and report any surprising Internet connections on
304 your desktop machine.
</p
>
306 <p
>At the moment the upstream developer and Debian package maintainer
307 is working on making the system more reliable in Debian, by enabling
308 the eBPF kernel module to track processes and connections instead of
309 depending in content in /proc/. This should enter unstable fairly
312 <p
>As usual, if you use Bitcoin and want to show your support of my
313 activities, please send Bitcoin donations to my address
314 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
316 <p
><strong
>Update
2023-
06-
12</strong
>: I got a tip about
317 <a href=
"https://wiki.debian.org/PrivacyIssues
">a list of privacy
318 issues in Free Software
</a
> and the
319 <a href=
"irc://irc.debian.org/%
23debian-privacy
">#debian-privacy IRC
320 channel
</a
> discussing these topics.
</p
>
326 <title>wmbusmeters, parse data from your utility meter - nice free software
</title>
327 <link>https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html
</link>
328 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html
</guid>
329 <pubDate>Fri,
19 May
2023 21:
50:
00 +
0200</pubDate>
330 <description><p
>There is a European standard for reading utility meters like water,
331 gas, electricity or heat distribution meters. The
332 <a href=
"https://en.wikipedia.org/wiki/Meter-Bus
">Meter-Bus standard
333 (EN
13757-
2, EN
13757-
3 and EN
13757–
4)
</a
> provide a cross vendor way
334 to talk to and collect meter data. I ran into this standard when I
335 wanted to monitor some heat distribution meters, and managed to find
336 free software that could do the job. The meters in question broadcast
337 encrypted messages with meter information via radio, and the hardest
338 part was to track down the encryption keys from the vendor. With this
339 in place I could set up a MQTT gateway to submit the meter data for
342 <p
>The free software systems in question,
343 <a href=
"https://tracker.debian.org/pkg/rtl-wmbus
">rtl-wmbus
</a
> to
344 read the messages from a software defined radio, and
345 <a href=
"https://tracker.debian.org/pkg/wmbusmeters
">wmbusmeters
</a
> to
346 decrypt and decode the content of the messages, is working very well
347 and allowe me to get frequent updates from my meters. I got in touch
348 with upstream last year to see if there was any interest in publishing
349 the packages via Debian. I was very happy to learn that Fredrik
350 Öhrström volunteered to maintain the packages, and I have since
351 assisted him in getting Debian package build rules in place as well as
352 sponsoring the packages into the Debian archive. Sadly we completed
353 it too late for them to become part of the next stable Debian release
354 (Bookworm). The wmbusmeters package just cleared the NEW queue. It
355 will need some work to fix a built problem, but I expect Fredrik will
356 find a solution soon.
</p
>
358 <p
>If you got a infrastructure meter supporting the Meter Bus
359 standard, I strongly recommend having a look at these nice
362 <p
>As usual, if you use Bitcoin and want to show your support of my
363 activities, please send Bitcoin donations to my address
364 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
369 <title>The
2023 LinuxCNC Norwegian developer gathering
</title>
370 <link>https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html
</link>
371 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html
</guid>
372 <pubDate>Sun,
14 May
2023 20:
30:
00 +
0200</pubDate>
373 <description><p
>The LinuxCNC project is making headway these days. A lot of
374 patches and issues have seen activity on
375 <a href=
"https://github.com/LinuxCNC/linuxcnc/
">the project github
376 pages
</a
> recently. A few weeks ago there was a developer gathering
377 over at the
<a href=
"https://tormach.com/
">Tormach
</a
> headquarter in
378 Wisconsin, and now we are planning a new gathering in Norway. If you
379 wonder what LinuxCNC is, lets quote Wikipedia:
</p
>
382 "LinuxCNC is a software system for numerical control of
383 machines such as milling machines, lathes, plasma cutters, routers,
384 cutting machines, robots and hexapods. It can control up to
9 axes or
385 joints of a CNC machine using G-code (RS-
274NGC) as input. It has
386 several GUIs suited to specific kinds of usage (touch screen,
387 interactive development).
"
390 <p
>The Norwegian developer gathering take place the weekend June
16th
391 to
18th this year, and is open for everyone interested in contributing
392 to LinuxCNC. Up to date information about the gathering can be found
394 <a href=
"https://sourceforge.net/p/emc/mailman/emc-developers/thread/sa64jp06nob.fsf%
40hjemme.reinholdtsen.name/#msg37837251
">the
395 developer mailing list thread
</a
> where the gathering was announced.
396 Thanks to the good people at
397 <a href=
"https://www.debian.org/
">Debian
</a
>,
398 <a href=
"https://www.redpill-linpro.com/
">Redpill-Linpro
</a
> and
399 <a href=
"https://www.nuugfoundation.no/no/
">NUUG Foundation
</a
>, we
400 have enough sponsor funds to pay for food, and shelter for the people
401 traveling from afar to join us. If you would like to join the
402 gathering, get in touch.
</p
>
404 <p
>As usual, if you use Bitcoin and want to show your support of my
405 activities, please send Bitcoin donations to my address
406 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
411 <title>OpenSnitch in Debian ready for prime time
</title>
412 <link>https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html
</link>
413 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html
</guid>
414 <pubDate>Sat,
13 May
2023 12:
10:
00 +
0200</pubDate>
415 <description><p
>A bit delayed,
416 <a href=
"https://tracker.debian.org/pkg/opensnitch
">the interactive
417 application firewall OpenSnitch
</a
> package in Debian now got the
418 latest fixes ready for Debian Bookworm. Because it depend on a
419 package missing on some architectures, the autopkgtest check of the
420 testing migration script did not understand that the tests were
421 actually working, so the migration was delayed. A bug in the package
422 dependencies is also fixed, so those installing the firewall package
423 (opensnitch) now also get the GUI admin tool (python3-opensnitch-ui)
424 installed by default. I am very grateful to Gustavo Iñiguez Goya for
425 his work on getting the package ready for Debian Bookworm.
</p
>
427 <p
>Armed with this package I have discovered some surprising
428 connections from programs I believed were able to work completly
429 offline, and it has already proven its worth, at least to me. If you
430 too want to get more familiar with the kind of programs using
431 Internett connections on your machine, I recommend testing
<tt
>apt
432 install opensnitch
</tt
> in Bookworm and see what you think.
</p
>
434 <p
>The package is still not able to build its eBPF module within
435 Debian. Not sure how much work it would be to get it working, but
436 suspect some kernel related packages need to be extended with more
437 header files to get it working.
</p
>
439 <p
>As usual, if you use Bitcoin and want to show your support of my
440 activities, please send Bitcoin donations to my address
441 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
446 <title>Speech to text, she APTly whispered, how hard can it be?
</title>
447 <link>https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html
</link>
448 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Speech_to_text__she_APTly_whispered__how_hard_can_it_be_.html
</guid>
449 <pubDate>Sun,
23 Apr
2023 09:
40:
00 +
0200</pubDate>
450 <description><p
>While visiting a convention during Easter, it occurred to me that
451 it would be great if I could have a digital Dictaphone with
452 transcribing capabilities, providing me with texts to cut-n-paste into
453 stuff I need to write. The background is that long drives often bring
454 up the urge to write on texts I am working on, which of course is out
455 of the question while driving. With the release of
456 <a href=
"https://github.com/openai/whisper/
">OpenAI Whisper
</a
>, this
457 seem to be within reach with Free Software, so I decided to give it a
458 go. OpenAI Whisper is a Linux based neural network system to read in
459 audio files and provide text representation of the speech in that
460 audio recording. It handle multiple languages and according to its
461 creators even can translate into a different language than the spoken
462 one. I have not tested the latter feature. It can either use the CPU
463 or a GPU with CUDA support. As far as I can tell, CUDA in practice
464 limit that feature to NVidia graphics cards. I have few of those, as
465 they do not work great with free software drivers, and have not tested
466 the GPU option. While looking into the matter, I did discover some
467 work to provide CUDA support on non-NVidia GPUs, and some work with
468 the library used by Whisper to port it to other GPUs, but have not
469 spent much time looking into GPU support yet. I
've so far used an old
470 X220 laptop as my test machine, and only transcribed using its
473 <p
>As it from a privacy standpoint is unthinkable to use computers
474 under control of someone else (aka a
"cloud
" service) to transcribe
475 ones thoughts and personal notes, I want to run the transcribing
476 system locally on my own computers. The only sensible approach to me
477 is to make the effort I put into this available for any Linux user and
478 to upload the needed packages into Debian. Looking at Debian Bookworm, I
479 discovered that only three packages were missing,
480 <a href=
"https://bugs.debian.org/
1034307">tiktoken
</a
>,
481 <a href=
"https://bugs.debian.org/
1034144">triton
</a
>, and
482 <a href=
"https://bugs.debian.org/
1034091">openai-whisper
</a
>. For a while
484 <a href=
"https://bugs.debian.org/
1034286">ffmpeg-python
</a
> was
486 <a href=
"https://github.com/kkroening/ffmpeg-python/issues/
760">upstream
487 seem to have vanished
</a
> I found it safer
488 <a href=
"https://github.com/openai/whisper/pull/
1242">to rewrite
489 whisper
</a
> to stop depending on in than to introduce ffmpeg-python
490 into Debian. I decided to place these packages under the umbrella of
491 <a href=
"https://salsa.debian.org/deeplearning-team
">the Debian Deep
492 Learning Team
</a
>, which seem like the best team to look after such
493 packages. Discussing the topic within the group also made me aware
494 that the triton package was already a future dependency of newer
495 versions of the torch package being planned, and would be needed after
496 Bookworm is released.
</p
>
498 <p
>All required code packages have been now waiting in
499 <a href=
"https://ftp-master.debian.org/new.html
">the Debian NEW
500 queue
</a
> since Wednesday, heading for Debian Experimental until
501 Bookworm is released. An unsolved issue is how to handle the neural
502 network models used by Whisper. The default behaviour of Whisper is
503 to require Internet connectivity and download the model requested to
504 <tt
>~/.cache/whisper/
</tt
> on first invocation. This obviously would
505 fail
<a href=
"https://people.debian.org/~bap/dfsg-faq.html
">the
506 deserted island test of free software
</a
> as the Debian packages would
507 be unusable for someone stranded with only the Debian archive and solar
508 powered computer on a deserted island.
</p
>
510 <p
>Because of this, I would love to include the models in the Debian
511 mirror system. This is problematic, as the models are very large
512 files, which would put a heavy strain on the Debian mirror
513 infrastructure around the globe. The strain would be even higher if
514 the models change often, which luckily as far as I can tell they do
515 not. The small model, which according to its creator is most useful
516 for English and in my experience is not doing a great job there
517 either, is
462 MiB (deb is
414 MiB). The medium model, which to me
518 seem to handle English speech fairly well is
1.5 GiB (deb is
1.3 GiB)
519 and the large model is
2.9 GiB (deb is
2.6 GiB). I would assume
520 everyone with enough resources would prefer to use the large model for
521 highest quality. I believe the models themselves would have to go
522 into the non-free part of the Debian archive, as they are not really
523 including any useful source code for updating the models. The
524 "source
", aka the model training set, according to the creators
525 consist of
"680,
000 hours of multilingual and multitask supervised
526 data collected from the web
", which to me reads material with both
527 unknown copyright terms, unavailable to the general public. In other
528 words, the source is not available according to the Debian Free
529 Software Guidelines and the model should be considered non-free.
</p
>
531 <p
>I asked the Debian FTP masters for advice regarding uploading a
532 model package on their IRC channel, and based on the feedback there it
533 is still unclear to me if such package would be accepted into the
534 archive. In any case I wrote build rules for a
535 <a href=
"https://salsa.debian.org/deeplearning-team/openai-whisper-model
">OpenAI
536 Whisper model package
</a
> and
537 <a href=
"https://github.com/openai/whisper/pull/
1257">modified the
538 Whisper code base
</a
> to prefer shared files under
<tt
>/usr/
</tt
> and
539 <tt
>/var/
</tt
> over user specific files in
<tt
>~/.cache/whisper/
</tt
>
540 to be able to use these model packages, to prepare for such
541 possibility. One solution might be to include only one of the models
542 (small or medium, I guess) in the Debian archive, and ask people to
543 download the others from the Internet. Not quite sure what to do
544 here, and advice is most welcome (use the debian-ai mailing list).
</p
>
546 <p
>To make it easier to test the new packages while I wait for them to
547 clear the NEW queue, I created an APT source targeting bookworm. I
548 selected Bookworm instead of Bullseye, even though I know the latter
549 would reach more users, is that some of the required dependencies are
550 missing from Bullseye and I during this phase of testing did not want
551 to backport a lot of packages just to get up and running.
</p
>
553 <p
>Here is a recipe to run as user root if you want to test OpenAI
554 Whisper using Debian packages on your Debian Bookworm installation,
555 first adding the APT repository GPG key to the list of trusted keys,
556 then setting up the APT repository and finally installing the packages
557 and one of the models:
</p
>
560 curl https://geekbay.nuug.no/~pere/openai-whisper/D78F5C4796F353D211B119E28200D9B589641240.asc \
561 -o /etc/apt/trusted.gpg.d/pere-whisper.asc
562 mkdir -p /etc/apt/sources.list.d
563 cat
> /etc/apt/sources.list.d/pere-whisper.list
&lt;
&lt;EOF
564 deb https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
565 deb-src https://geekbay.nuug.no/~pere/openai-whisper/ bookworm main
568 apt install openai-whisper
569 </pre
></p
>
571 <p
>The package work for me, but have not yet been tested on any other
572 computer than my own. With it, I have been able to (badly) transcribe
573 a
2 minute
40 second Norwegian audio clip to test using the small
574 model. This took
11 minutes and around
2.2 GiB of RAM. Transcribing
575 the same file with the medium model gave a accurate text in
77 minutes
576 using around
5.2 GiB of RAM. My test machine had too little memory to
577 test the large model, which I believe require
11 GiB of RAM. In
578 short, this now work for me using Debian packages, and I hope it will
579 for you and everyone else once the packages enter Debian.
</p
>
581 <p
>Now I can start on the audio recording part of this project.
</p
>
583 <p
>As usual, if you use Bitcoin and want to show your support of my
584 activities, please send Bitcoin donations to my address
585 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
590 <title>rtlsdr-scanner, software defined radio frequency scanner for Linux - nice free software
</title>
591 <link>https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html
</link>
592 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/rtlsdr_scanner__software_defined_radio_frequency_scanner_for_Linux____nice_free_software.html
</guid>
593 <pubDate>Fri,
7 Apr
2023 23:
10:
00 +
0200</pubDate>
594 <description><p
>Today I finally found time to track down a useful radio frequency
595 scanner for my software defined radio. Just for fun I tried to locate
596 the radios used in the areas, and a good start would be to scan all
597 the frequencies to see what is in use. I
've tried to find a useful
598 program earlier, but ran out of time before I managed to find a useful
599 tool. This time I was more successful, and after a few false leads I
600 found a description of
601 <a href=
"https://www.kali.org/tools/rtlsdr-scanner/
">rtlsdr-scanner
602 over at the Kali site
</a
>, and was able to track down
603 <a href=
"https://gitlab.com/kalilinux/packages/rtlsdr-scanner.git
">the
604 Kali package git repository
</a
> to build a deb package for the
605 scanner. Sadly the package is missing from the Debian project itself,
606 at least in Debian Bullseye. Two runtime dependencies,
607 <a href=
"https://gitlab.com/kalilinux/packages/python-visvis.git
">python-visvis
</a
>
609 <a href=
"https://gitlab.com/kalilinux/packages/python-rtlsdr.git
">python-rtlsdr
</a
>
610 had to be built and installed separately. Luckily
'<tt
>gbp
611 buildpackage
</tt
>' handled them just fine and no further packages had
612 to be manually built. The end result worked out of the box after
613 installation.
</p
>
615 <p
>My initial scans for FM channels worked just fine, so I knew the
616 scanner was functioning. But when I tried to scan every frequency
617 from
100 to
1000 MHz, the program stopped unexpectedly near the
618 completion. After some debugging I discovered USB software radio I
619 used rejected frequencies above
948 MHz, triggering a unreported
620 exception breaking the scan. Changing the scan to end at
957 worked
621 better. I similarly found the lower limit to be around
15, and ended
622 up with the following full scan:
</p
>
624 <p
><a href=
"https://people.skolelinux.org/pere/blog/images/
2023-
04-
07-radio-freq-scanning.png
"><img src=
"https://people.skolelinux.org/pere/blog/images/
2023-
04-
07-radio-freq-scanning.png
" width=
"100%
"></a
></p
>
626 <p
>Saving the scan did not work, but exporting it as a CSV file worked
627 just fine. I ended up with around
477k CVS lines with dB level for
628 the given frequency.
</p
>
630 <p
>The save failure seem to be a missing UTF-
8 encoding issue in the
631 python code. Will see if I can find time to send a patch
632 <a href=
"https://github.com/CdeMills/RTLSDR-Scanner/
">upstream
</a
>
633 later to fix this exception:
</p
>
636 Traceback (most recent call last):
637 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py
", line
485, in __on_save
638 save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
639 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py
", line
408, in save_plot
640 handle.write(json.dumps(data, indent=
4))
641 TypeError: a bytes-like object is required, not
'str
'
642 Traceback (most recent call last):
643 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/main_window.py
", line
485, in __on_save
644 save_plot(fullName, self.scanInfo, self.spectrum, self.locations)
645 File
"/usr/lib/python3/dist-packages/rtlsdr_scanner/file.py
", line
408, in save_plot
646 handle.write(json.dumps(data, indent=
4))
647 TypeError: a bytes-like object is required, not
'str
'
650 <p
>As usual, if you use Bitcoin and want to show your support of my
651 activities, please send Bitcoin donations to my address
652 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>