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