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 and improved sqlcipher in Debian for accessing Signal database
</title>
11 <link>https://people.skolelinux.org/pere/blog/New_and_improved_sqlcipher_in_Debian_for_accessing_Signal_database.html
</link>
12 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/New_and_improved_sqlcipher_in_Debian_for_accessing_Signal_database.html
</guid>
13 <pubDate>Sun,
12 Nov
2023 12:
00:
00 +
0100</pubDate>
14 <description><p
>For a while now I wanted to have direct access to the
15 <a href=
"https://signal.org/
">Signal
</a
> database of messages and
16 channels of my Desktop edition of Signal. I prefer the enforced end
17 to end encryption of Signal these days for my communication with
18 friends and family, to increase the level of safety and privacy as
19 well as raising the cost of the mass surveillance government and
20 non-government entities practice these days. In August I came across
22 <a href=
"https://www.yoranbrondsema.com/post/the-guide-to-extracting-statistics-from-your-signal-conversations/
">recipe
23 on how to use sqlcipher to extract statistics from the Signal
24 database
</a
> explaining how to do this. Unfortunately this did not
25 work with the version of sqlcipher in Debian. The
26 <a href=
"http://tracker.debian.org/sqlcipher/
">sqlcipher
</a
>
27 package is a
"fork
" of the sqlite package with added support for
28 encrypted databases. Sadly the current Debian maintainer
29 <a href=
"https://bugs.debian.org/
961598">announced more than three
30 years ago that he did not have time to maintain sqlcipher
</a
>, so it
31 seemed unlikely to be upgraded by the maintainer. I was reluctant to
32 take on the job myself, as I have very limited experience maintaining
33 shared libraries in Debian. After waiting and hoping for a few
34 months, I gave up the last week, and set out to update the package. In
35 the process I orphaned it to make it more obvious for the next person
36 looking at it that the package need proper maintenance.
</p
>
38 <p
>The version in Debian was around five years old, and quite a lot of
39 changes had taken place upstream into the Debian maintenance git
40 repository. After spending a few days importing the new upstream
41 versions, realising that upstream did not care much for SONAME
42 versioning as I saw library symbols being both added and removed with
43 minor version number changes to the project, I concluded that I had to
44 do a SONAME bump of the library package to avoid surprising the
45 reverse dependencies. I even added a simple
46 autopkgtest script to ensure the package work as intended. Dug deep
47 into the hole of learning shared library maintenance, I set out a few
48 days ago to upload the new version to Debian experimental to see what
49 the quality assurance framework in Debian had to say about the result.
50 The feedback told me the pacakge was not too shabby, and yesterday I
51 uploaded the latest version to Debian unstable. It should enter
52 testing today or tomorrow, perhaps delayed by
53 <a href=
"https://bugs.debian.org/
1055812">a small library
54 transition
</a
>.
</p
>
56 <p
>Armed with a new version of sqlcipher, I can now have a look at the
57 SQL database in ~/.config/Signal/sql/db.sqlite. First, one need to
58 fetch the encryption key from the Signal configuration using this
59 simple JSON extraction command:
</p
>
61 <pre
>/usr/bin/jq -r
'.
"key
"' ~/.config/Signal/config.json
</pre
>
63 <p
>Assuming the result from that command is
'secretkey
', which is a
64 hexadecimal number representing the key used to encrypt the database.
65 Next, one can now connect to the database and inject the encryption
66 key for access via SQL to fetch information from the database. Here
67 is an example dumping the database structure:
</p
>
70 % sqlcipher ~/.config/Signal/sql/db.sqlite
71 sqlite
> PRAGMA key =
"x
'secretkey
'";
73 CREATE TABLE sqlite_stat1(tbl,idx,stat);
74 CREATE TABLE conversations(
75 id STRING PRIMARY KEY ASC,
83 , profileFamilyName TEXT, profileFullName TEXT, e164 TEXT, serviceId TEXT, groupId TEXT, profileLastFetchedAt INTEGER);
84 CREATE TABLE identityKeys(
85 id STRING PRIMARY KEY ASC,
89 id STRING PRIMARY KEY ASC,
92 CREATE TABLE sessions(
96 , ourServiceId STRING, serviceId STRING);
97 CREATE TABLE attachment_downloads(
98 id STRING primary key,
103 CREATE TABLE sticker_packs(
108 coverStickerId INTEGER,
110 downloadAttempts INTEGER,
114 stickerCount INTEGER,
116 , attemptedStatus STRING, position INTEGER DEFAULT
0 NOT NULL, storageID STRING, storageVersion INTEGER, storageUnknownFields BLOB, storageNeedsSync
117 INTEGER DEFAULT
0 NOT NULL);
118 CREATE TABLE stickers(
120 packId TEXT NOT NULL,
129 PRIMARY KEY (id, packId),
130 CONSTRAINT stickers_fk
132 REFERENCES sticker_packs(id)
135 CREATE TABLE sticker_references(
138 CONSTRAINT sticker_references_fk
140 REFERENCES sticker_packs(id)
144 shortName TEXT PRIMARY KEY,
147 CREATE TABLE messages(
148 rowid INTEGER PRIMARY KEY ASC,
154 schemaVersion INTEGER,
155 conversationId STRING,
158 hasAttachments INTEGER,
159 hasFileAttachments INTEGER,
160 hasVisualMediaAttachments INTEGER,
162 expirationStartTimestamp INTEGER,
165 messageTimer INTEGER,
166 messageTimerStart INTEGER,
167 messageTimerExpiresAt INTEGER,
170 sourceServiceId TEXT, serverGuid STRING NULL, sourceDevice INTEGER, storyId STRING, isStory INTEGER
171 GENERATED ALWAYS AS (type IS
'story
'), isChangeCreatedByUs INTEGER NOT NULL DEFAULT
0, isTimerChangeFromSync INTEGER
172 GENERATED ALWAYS AS (
173 json_extract(json,
'$.expirationTimerUpdate.fromSync
') IS
1
174 ), seenStatus NUMBER default
0, storyDistributionListId STRING, expiresAt INT
177 expirationStartTimestamp + (expireTimer *
1000),
179 )), shouldAffectActivity INTEGER
180 GENERATED ALWAYS AS (
184 'change-number-notification
',
185 'contact-removed-notification
',
186 'conversation-merge
',
187 'group-v1-migration
',
189 'message-history-unsynced
',
190 'profile-change
',
192 'universal-timer-notification
',
193 'verified-change
'
195 ), shouldAffectPreview INTEGER
196 GENERATED ALWAYS AS (
200 'change-number-notification
',
201 'contact-removed-notification
',
202 'conversation-merge
',
203 'group-v1-migration
',
205 'message-history-unsynced
',
206 'profile-change
',
208 'universal-timer-notification
',
209 'verified-change
'
211 ), isUserInitiatedMessage INTEGER
212 GENERATED ALWAYS AS (
216 'change-number-notification
',
217 'contact-removed-notification
',
218 'conversation-merge
',
219 'group-v1-migration
',
220 'group-v2-change
',
222 'message-history-unsynced
',
223 'profile-change
',
225 'universal-timer-notification
',
226 'verified-change
'
228 ), mentionsMe INTEGER NOT NULL DEFAULT
0, isGroupLeaveEvent INTEGER
229 GENERATED ALWAYS AS (
230 type IS
'group-v2-change
' AND
231 json_array_length(json_extract(json,
'$.groupV2Change.details
')) IS
1 AND
232 json_extract(json,
'$.groupV2Change.details[
0].type
') IS
'member-remove
' AND
233 json_extract(json,
'$.groupV2Change.from
') IS NOT NULL AND
234 json_extract(json,
'$.groupV2Change.from
') IS json_extract(json,
'$.groupV2Change.details[
0].aci
')
235 ), isGroupLeaveEventFromOther INTEGER
236 GENERATED ALWAYS AS (
237 isGroupLeaveEvent IS
1
239 isChangeCreatedByUs IS
0
241 GENERATED ALWAYS AS (
242 json_extract(json,
'$.callId
')
244 CREATE TABLE sqlite_stat4(tbl,idx,neq,nlt,ndlt,sample);
247 queueType TEXT STRING NOT NULL,
248 timestamp INTEGER NOT NULL,
251 CREATE TABLE reactions(
252 conversationId STRING,
255 messageReceivedAt INTEGER,
256 targetAuthorAci STRING,
257 targetTimestamp INTEGER,
260 CREATE TABLE senderKeys(
261 id TEXT PRIMARY KEY NOT NULL,
262 senderId TEXT NOT NULL,
263 distributionId TEXT NOT NULL,
265 lastUpdatedDate NUMBER NOT NULL
267 CREATE TABLE unprocessed(
268 id STRING PRIMARY KEY ASC,
275 serverTimestamp INTEGER,
276 sourceServiceId STRING
277 , serverGuid STRING NULL, sourceDevice INTEGER, receivedAtCounter INTEGER, urgent INTEGER, story INTEGER);
278 CREATE TABLE sendLogPayloads(
279 id INTEGER PRIMARY KEY ASC,
281 timestamp INTEGER NOT NULL,
282 contentHint INTEGER NOT NULL,
284 , urgent INTEGER, hasPniSignatureMessage INTEGER DEFAULT
0 NOT NULL);
285 CREATE TABLE sendLogRecipients(
286 payloadId INTEGER NOT NULL,
288 recipientServiceId STRING NOT NULL,
289 deviceId INTEGER NOT NULL,
291 PRIMARY KEY (payloadId, recipientServiceId, deviceId),
293 CONSTRAINT sendLogRecipientsForeignKey
294 FOREIGN KEY (payloadId)
295 REFERENCES sendLogPayloads(id)
298 CREATE TABLE sendLogMessageIds(
299 payloadId INTEGER NOT NULL,
301 messageId STRING NOT NULL,
303 PRIMARY KEY (payloadId, messageId),
305 CONSTRAINT sendLogMessageIdsForeignKey
306 FOREIGN KEY (payloadId)
307 REFERENCES sendLogPayloads(id)
310 CREATE TABLE preKeys(
311 id STRING PRIMARY KEY ASC,
313 , ourServiceId NUMBER
314 GENERATED ALWAYS AS (json_extract(json,
'$.ourServiceId
')));
315 CREATE TABLE signedPreKeys(
316 id STRING PRIMARY KEY ASC,
318 , ourServiceId NUMBER
319 GENERATED ALWAYS AS (json_extract(json,
'$.ourServiceId
')));
322 category TEXT NOT NULL,
324 descriptionTemplate TEXT NOT NULL
326 CREATE TABLE badgeImageFiles(
327 badgeId TEXT REFERENCES badges(id)
330 'order
' INTEGER NOT NULL,
335 CREATE TABLE storyReads (
336 authorId STRING NOT NULL,
337 conversationId STRING NOT NULL,
338 storyId STRING NOT NULL,
339 storyReadDate NUMBER NOT NULL,
341 PRIMARY KEY (authorId, storyId)
343 CREATE TABLE storyDistributions(
344 id STRING PRIMARY KEY NOT NULL,
347 senderKeyInfoJson STRING
348 , deletedAtTimestamp INTEGER, allowsReplies INTEGER, isBlockList INTEGER, storageID STRING, storageVersion INTEGER, storageUnknownFields BLOB, storageNeedsSync INTEGER);
349 CREATE TABLE storyDistributionMembers(
350 listId STRING NOT NULL REFERENCES storyDistributions(id)
353 serviceId STRING NOT NULL,
355 PRIMARY KEY (listId, serviceId)
357 CREATE TABLE uninstalled_sticker_packs (
358 id STRING NOT NULL PRIMARY KEY,
359 uninstalledAt NUMBER NOT NULL,
361 storageVersion NUMBER,
362 storageUnknownFields BLOB,
363 storageNeedsSync INTEGER NOT NULL
365 CREATE TABLE groupCallRingCancellations(
366 ringId INTEGER PRIMARY KEY,
367 createdAt INTEGER NOT NULL
369 CREATE TABLE IF NOT EXISTS
'messages_fts_data
'(id INTEGER PRIMARY KEY, block BLOB);
370 CREATE TABLE IF NOT EXISTS
'messages_fts_idx
'(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID;
371 CREATE TABLE IF NOT EXISTS
'messages_fts_content
'(id INTEGER PRIMARY KEY, c0);
372 CREATE TABLE IF NOT EXISTS
'messages_fts_docsize
'(id INTEGER PRIMARY KEY, sz BLOB);
373 CREATE TABLE IF NOT EXISTS
'messages_fts_config
'(k PRIMARY KEY, v) WITHOUT ROWID;
374 CREATE TABLE edited_messages(
375 messageId STRING REFERENCES messages(id)
379 , conversationId STRING);
380 CREATE TABLE mentions (
381 messageId REFERENCES messages(id) ON DELETE CASCADE,
386 CREATE TABLE kyberPreKeys(
387 id STRING PRIMARY KEY NOT NULL,
388 json TEXT NOT NULL, ourServiceId NUMBER
389 GENERATED ALWAYS AS (json_extract(json,
'$.ourServiceId
')));
390 CREATE TABLE callsHistory (
391 callId TEXT PRIMARY KEY,
392 peerId TEXT NOT NULL, -- conversation id (legacy) | uuid | groupId | roomId
393 ringerId TEXT DEFAULT NULL, -- ringer uuid
394 mode TEXT NOT NULL, -- enum
"Direct
" |
"Group
"
395 type TEXT NOT NULL, -- enum
"Audio
" |
"Video
" |
"Group
"
396 direction TEXT NOT NULL, -- enum
"Incoming
" |
"Outgoing
397 -- Direct: enum
"Pending
" |
"Missed
" |
"Accepted
" |
"Deleted
"
398 -- Group: enum
"GenericGroupCall
" |
"OutgoingRing
" |
"Ringing
" |
"Joined
" |
"Missed
" |
"Declined
" |
"Accepted
" |
"Deleted
"
399 status TEXT NOT NULL,
400 timestamp INTEGER NOT NULL,
401 UNIQUE (callId, peerId) ON CONFLICT FAIL
403 [ dropped all indexes to save space in this blog post ]
404 CREATE TRIGGER messages_on_view_once_update AFTER UPDATE ON messages
406 new.body IS NOT NULL AND new.isViewOnce =
1
408 DELETE FROM messages_fts WHERE rowid = old.rowid;
410 CREATE TRIGGER messages_on_insert AFTER INSERT ON messages
411 WHEN new.isViewOnce IS NOT
1 AND new.storyId IS NULL
413 INSERT INTO messages_fts
416 (new.rowid, new.body);
418 CREATE TRIGGER messages_on_delete AFTER DELETE ON messages BEGIN
419 DELETE FROM messages_fts WHERE rowid = old.rowid;
420 DELETE FROM sendLogPayloads WHERE id IN (
421 SELECT payloadId FROM sendLogMessageIds
422 WHERE messageId = old.id
424 DELETE FROM reactions WHERE rowid IN (
425 SELECT rowid FROM reactions
426 WHERE messageId = old.id
428 DELETE FROM storyReads WHERE storyId = old.storyId;
430 CREATE VIRTUAL TABLE messages_fts USING fts5(
432 tokenize =
'signal_tokenizer
'
434 CREATE TRIGGER messages_on_update AFTER UPDATE ON messages
436 (new.body IS NULL OR old.body IS NOT new.body) AND
437 new.isViewOnce IS NOT
1 AND new.storyId IS NULL
439 DELETE FROM messages_fts WHERE rowid = old.rowid;
440 INSERT INTO messages_fts
443 (new.rowid, new.body);
445 CREATE TRIGGER messages_on_insert_insert_mentions AFTER INSERT ON messages
447 INSERT INTO mentions (messageId, mentionAci, start, length)
449 SELECT messages.id, bodyRanges.value -
>> 'mentionAci
' as mentionAci,
450 bodyRanges.value -
>> 'start
' as start,
451 bodyRanges.value -
>> 'length
' as length
452 FROM messages, json_each(messages.json -
>> 'bodyRanges
') as bodyRanges
453 WHERE bodyRanges.value -
>> 'mentionAci
' IS NOT NULL
455 AND messages.id = new.id;
457 CREATE TRIGGER messages_on_update_update_mentions AFTER UPDATE ON messages
459 DELETE FROM mentions WHERE messageId = new.id;
460 INSERT INTO mentions (messageId, mentionAci, start, length)
462 SELECT messages.id, bodyRanges.value -
>> 'mentionAci
' as mentionAci,
463 bodyRanges.value -
>> 'start
' as start,
464 bodyRanges.value -
>> 'length
' as length
465 FROM messages, json_each(messages.json -
>> 'bodyRanges
') as bodyRanges
466 WHERE bodyRanges.value -
>> 'mentionAci
' IS NOT NULL
468 AND messages.id = new.id;
473 <p
>Finally I have the tool needed to inspect and process Signal
474 messages that I need, without using the vendor provided client. Now
475 on to transforming it to a more useful format.
</p
>
477 <p
>As usual, if you use Bitcoin and want to show your support of my
478 activities, please send Bitcoin donations to my address
479 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
484 <title>New chrpath release
0.17</title>
485 <link>https://people.skolelinux.org/pere/blog/New_chrpath_release_0_17.html
</link>
486 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/New_chrpath_release_0_17.html
</guid>
487 <pubDate>Fri,
10 Nov
2023 07:
30:
00 +
0100</pubDate>
488 <description><p
>The chrpath package provide a simple command line tool to remove or
489 modify the rpath or runpath of compiled ELF program. It is almost
10
490 years since I updated the code base, but I stumbled over the tool
491 today, and decided it was time to move the code base from Subversion
492 to git and find a new home for it, as the previous one (Debian Alioth)
493 has been shut down. I decided to go with
494 <a href=
"https://codeberg.org/
">Codeberg
</a
> this time, as it is my git
495 service of choice these days, did a quick and dirty migration to git
496 and updated the code with a few patches I found in the Debian bug
497 tracker. These are the release notes:
</p
>
499 <p
>New in
0.17 released
2023-
11-
10:
</p
>
502 <li
>Moved project to Codeberg, as Alioth is shut down.
</li
>
503 <li
>Add Solaris support (use
&lt;sys/byteorder.h
> instead of
&lt;byteswap.h
>).
504 Patch from Rainer Orth.
</li
>
505 <li
>Added missing newline from printf() line. Patch from Frank Dana.
</li
>
506 <li
>Corrected handling of multiple ELF sections. Patch from Frank Dana.
</li
>
507 <li
>Updated build rules for .deb. Partly based on patch from djcj.
</li
>
510 <p
>The latest edition is tagged and available from
511 <a href=
"https://codeberg.org/pere/chrpath
">https://codeberg.org/pere/chrpath
</a
>.
513 <p
>As usual, if you use Bitcoin and want to show your support of my
514 activities, please send Bitcoin donations to my address
515 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
520 <title>Test framework for DocBook processors / formatters
</title>
521 <link>https://people.skolelinux.org/pere/blog/Test_framework_for_DocBook_processors___formatters.html
</link>
522 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Test_framework_for_DocBook_processors___formatters.html
</guid>
523 <pubDate>Sun,
5 Nov
2023 13:
00:
00 +
0100</pubDate>
524 <description><p
>All the books I have published so far has been using
525 <a href=
"https://docbook.org/
">DocBook
</a
> somewhere in the process.
526 For the first book, the source format was DocBook, while for every
527 later book it was an intermediate format used as the stepping stone to
528 be able to present the same manuscript in several formats, on paper,
529 as ebook in ePub format, as a HTML page and as a PDF file either for
530 paper production or for Internet consumption. This is made possible
531 with a wide variety of free software tools with DocBook support in
532 Debian. The source format of later books have been docx via rst,
533 Markdown, Filemaker and Asciidoc, and for all of these I was able to
534 generate a suitable DocBook file for further processing using
535 <a href=
"https://tracker.debian.org/pkg/pandoc
">pandoc
</a
>,
536 <a href=
"https://tracker.debian.org/pkg/asciidoc
">a2x
</a
> and
537 <a href=
"https://tracker.debian.org/pkg/asciidoctor
">asciidoctor
</a
>,
538 as well as rendering using
539 <a href=
"https://tracker.debian.org/pkg/xmlto
">xmlto
</a
>,
540 <a href=
"https://tracker.debian.org/pkg/dbtoepub
">dbtoepub
</a
>,
541 <a href=
"https://tracker.debian.org/pkg/dblatex
">dblatex
</a
>,
542 <a href=
"https://tracker.debian.org/pkg/docbook-xsl
">docbook-xsl
</a
> and
543 <a href=
"https://tracker.debian.org/pkg/fop
">fop
</a
>.
</p
>
545 <p
>Most of the
<a href=
"http://www.hungry.com/~pere/publisher/
">books I
546 have published
</a
> are translated books, with English as the source
548 <a href=
"https://tracker.debian.org/pkg/po4a
">po4a
</a
> to
549 handle translations using the gettext PO format has been a blessing,
550 but publishing translated books had triggered the need to ensure the
551 DocBook tools handle relevant languages correctly. For every new
552 language I have published, I had to submit patches dblatex, dbtoepub
553 and docbook-xsl fixing incorrect language and country specific issues
554 in the framework themselves. Typically this has been missing keywords
555 like
'figure
' or sort ordering of index entries. After a while it
556 became tiresome to only discover issues like this by accident, and I
557 decided to write a DocBook
"test framework
" exercising various
558 features of DocBook and allowing me to see all features exercised for
559 a given language. It consist of a set of DocBook files, a version
4
560 book, a version
5 book, a v4 book set, a v4 selection of problematic
561 tables, one v4 testing sidefloat and finally one v4 testing a book of
562 articles. The DocBook files are accompanied with a set of build rules
563 for building PDF using dblatex and docbook-xsl/fop, HTML using xmlto
564 or docbook-xsl and epub using dbtoepub. The result is a set of files
565 visualizing footnotes, indexes, table of content list, figures,
566 formulas and other DocBook features, allowing for a quick review on
567 the completeness of the given locale settings. To build with a
568 different language setting, all one need to do is edit the lang= value
569 in the .xml file to pick a different ISO
639 code value and run
570 'make
'.
</p
>
572 <p
>The
<a href=
"https://codeberg.org/pere/docbook-example/
">test framework
573 source code
</a
> is available from Codeberg, and a generated set of
574 presentations of the various examples is available as Codeberg static
576 <a href=
"https://pere.codeberg.page/docbook-example/
">https://pere.codeberg.page/docbook-example/
</a
>.
577 Using this test framework I have been able to discover and report
578 several bugs and missing features in various tools, and got a lot of
579 them fixed. For example I got Northern Sami keywords added to both
580 docbook-xsl and dblatex, fixed several typos in Norwegian bokmål and
581 Norwegian Nynorsk, support for non-ascii title IDs added to pandoc,
582 Norwegian index sorting support fixed in xindy and initial Norwegian
583 Bokmål support added to dblatex. Some issues still remains, though.
584 Default index sorting rules are still broken in several tools, so the
585 Norwegian letters æ, ø and å are more often than not sorted properly
586 in the book index.
</p
>
588 <p
>The test framework recently received some more polish, as part of
589 publishing my latest book. This book contained a lot of fairly
590 complex tables, which exposed bugs in some of the tools. This made me
591 add a new test file with various tables, as well as spend some time to
592 brush up the build rules. My goal is for the test framework to
593 exercise all DocBook features to make it easier to see which features
594 work with different processors, and hopefully get them all to support
595 the full set of DocBook features. Feel free to send patches to extend
596 the test set, and test it with your favorite DocBook processor.
597 Please visit these two URLs to learn more:
</p
>
600 <li
><a href=
"https://codeberg.org/pere/docbook-example/
">https://codeberg.org/pere/docbook-example/
</a
></li
>
601 <li
><a href=
"https://pere.codeberg.page/docbook-example/
">https://pere.codeberg.page/docbook-example/
</a
></li
>
604 <p
>If you want to learn more on Docbook and translations, I recommend
605 having a look at the
<a href=
"https://docbook.org/
">the DocBook
607 <a href=
"https://doccookbook.sourceforge.net/html/en/
">the DoCookBook
608 site
<a/
> and my earlier blog post on
609 <a href=
"https://people.skolelinux.org/pere/blog/From_English_wiki_to_translated_PDF_and_epub_via_Docbook.html
">how
610 the Skolelinux project process and translate documentation
</a
>, a talk I gave earlier this year on
611 <a href=
"https://www.nuug.no/aktiviteter/
20230314-oversetting-og-publisering-av-b%c3%b8ker-med-fri-programvare/
">how
612 to translate and publish books using free software
</a
> (Norwegian
617 https://github.com/docbook/xslt10-stylesheets/issues/
205 (docbook-xsl: sme support)
618 https://bugs.debian.org/
968437 (xindy: index sorting rules for nb/nn)
619 https://bugs.debian.org/
856123 (pandoc: markdown to docbook with non-english titles)
620 https://bugs.debian.org/
864813 (dblatex: missing nb words)
621 https://bugs.debian.org/
756386 (dblatex: index sorting rules for nb/nn)
622 https://bugs.debian.org/
796871 (dbtoepub: index sorting rules for nb/nn)
623 https://bugs.debian.org/
792616 (dblatex: PDF metadata)
624 https://bugs.debian.org/
686908 (docbook-xsl: index sorting rules for nb/nn)
625 https://sourceforge.net/tracker/?func=detail
&atid=
373747&aid=
3556630&group_id=
21935 (docbook-xsl: nb/nn support)
626 https://bugs.debian.org/
684391 (dblatex: initial nb support)
630 <p
>As usual, if you use Bitcoin and want to show your support of my
631 activities, please send Bitcoin donations to my address
632 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
637 <title>«Virkninger av angrefristloven», hovedfagsoppgaven som fikk endret en lov
</title>
638 <link>https://people.skolelinux.org/pere/blog/_Virkninger_av_angrefristloven___hovedfagsoppgaven_som_fikk_endret_en_lov.html
</link>
639 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/_Virkninger_av_angrefristloven___hovedfagsoppgaven_som_fikk_endret_en_lov.html
</guid>
640 <pubDate>Sun,
29 Oct
2023 22:
00:
00 +
0100</pubDate>
641 <description><img src=
"http://people.skolelinux.org/pere/blog/images/
2023-
10-
29-bok-angrefrist.svg
" width=
"20%
" align=
"center
"></a
>
643 <p
>I
1979 leverte Ole-Erik Yrvin en hovedfagsoppgave for Cand. Scient.
644 ved Institutt for sosiologi på Universitetet i Oslo på oppdrag fra
645 Forbruker- og administrasjonsdepartementet. Oppgaven evaluerte
646 Angrefristloven fra
1972, og det han oppdaget førte til at loven ble
647 endret fire år senere.
</p
>
649 <p
>Jeg har kjent Ole-Erik en stund, og synes det var trist at hans
650 oppgave ikke lenger er tilgjengelig, hverken fra oppdragsgiver
651 eller fra universitetet. Hans forsøk på å få den avbildet og lagt
652 ut på Internett har vist seg fånyttes, så derfor tilbød jeg meg for
653 en stund tilbake å publisere den og gjøre den tilgjengelig med
654 fribruksvilkår på Internett. Det er nå klart, og hovedfagsoppgaven
655 er tilgjengelig blant annet via
<a
656 href=
"http://www.hungry.com/~pere/publisher/
">min liste over
657 publiserte bøker
</a
>, både som nettside,
658 <a href=
"https://www.lulu.com/search?contributor=Ole-Erik+Yrvin
">digital
659 bok i ePub-format og på papir fra lulu.com
</a
>. Jeg regner med at
660 den også vil dukke opp på nettbokhandlere i løpet av en måned eller
663 <p
>Alle tabeller og figurer er gjenskapt for bedre lesbarhet, noen
664 skrivefeil rettet opp og mange referanser har fått flere detaljer
665 som ISBN-nummer og DOI-referanse. Selv om jeg ikke regner med at
666 dette blir en kioskvelter, så håper jeg denne nye utgaven kan komme
667 fremtiden til glede.
</p
>
669 <p
>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
670 det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
672 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>. Merk,
673 betaling med bitcoin er ikke anonymt. :)
</p
>
678 <title>«underordnet tjenestemann blir inhabil fordi en overordnet er inhabil».
</title>
679 <link>https://people.skolelinux.org/pere/blog/_underordnet_tjenestemann_blir_inhabil_fordi_en_overordnet_er_inhabil__.html
</link>
680 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/_underordnet_tjenestemann_blir_inhabil_fordi_en_overordnet_er_inhabil__.html
</guid>
681 <pubDate>Thu,
7 Sep
2023 09:
10:
00 +
0200</pubDate>
682 <description><p
>Medlemmene av Norges regjering har demonstert de siste månedene at
683 habilitetsvureringer ikke er deres sterke side og det gjelder både
684 Arbeiderpartiets og Senterpartiers representater. Det er heldigvis
685 enklere i det private, da inhabilitetsreglene kun gjelder de som
686 jobber for folket, ikke seg selv. Sist ut er utenriksminister
687 Huitfeldt. I går kom nyheten om at
688 <a href=
"https://www.nrk.no/nyheter/riksadvokaten_-okokrim-nestsjef-kan-behandle-huitfeldt-saken-
1.16545162">Riksadvokaten
689 har konkludert med at nestsjefen i Økokrim kan behandle sak om
690 habilitet og innsidekunnskap
</a
> for Huitfeldt, på tross av at hans
691 overordnede, sjefen for Økokrim, har meldt seg inhabil i saken. Dette
692 er litt rart. I veilednigen
693 «
<a href=
"https://www.regjeringen.no/globalassets/upload/krd/vedlegg/komm/veiledere/habilitet_i_kommuner_og_fylkeskommuner.pdf
">Habilitet
694 i kommuner og fylkeskommuner
</a
>» av Kommunal- og regionaldepartementet
695 forteller de hva som gjelder, riktig nok gjelder veiledningen ikke for
696 Økokrim som jo ikke er kommune eller fylkeskommune, men jeg får ikke
697 inntrykk av at dette er regler som kun gjelder for kommune og
701 <p
>«
<strong
>2.1 Oversikt over inhabilitetsgrunnlagene
</strong
>
703 <p
>De alminnelige reglene om inhabilitet for den offentlige
704 forvaltningen er gitt i
705 <a href=
"https://lovdata.no/dokument/NL/lov/
1967-
02-
10/KAPITTEL_2#KAPITTEL_2
">forvaltningsloven
706 §§
6 til
10</a
>. Forvaltningslovens hovedregel om inhabilitet framgår
707 av §
6. Her er det gitt tre ulike grunnlag som kan føre til at en
708 tjenestemann eller folkevalgt blir inhabil. I §
6 første ledd
709 bokstavene a til e er det oppstilt konkrete tilknytningsforhold mellom
710 tjenestemannen og saken eller sakens parter som automatisk fører til
711 inhabilitet. Annet ledd oppstiller en skjønnsmessig regel om at
712 tjenestemannen også kan bli inhabil etter en konkret vurdering av
713 inhabilitetsspørsmålet, der en lang rekke momenter kan være
714 relevante. I tredje ledd er det regler om såkalt avledet
715 inhabilitet. Det vil si at en underordnet tjenestemann blir inhabil
716 fordi en overordnet er inhabil.»
</p
>
719 <p
>Loven sier ganske enkelt «Er den overordnede tjenestemann ugild,
720 kan avgjørelse i saken heller ikke treffes av en direkte underordnet
721 tjenestemann i samme forvaltningsorgan.» Jeg antar tanken er at en
722 underordnet vil stå i fare for å tilpasse sine konklusjoner til det
723 overordnet vil ha fordel av, for å fortsatt ha et godt forhold til sin
724 overordnede. Men jeg er ikke jurist og forstår nok ikke kompliserte
725 juridiske vurderinger. For å sitere «Kamerat Napoleon» av George
726 Orwell: «Alle dyr er like, men noen dyr er likere enn andre».
731 <title>Invidious add-on for Kodi
20</title>
732 <link>https://people.skolelinux.org/pere/blog/Invidious_add_on_for_Kodi_20.html
</link>
733 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/Invidious_add_on_for_Kodi_20.html
</guid>
734 <pubDate>Thu,
10 Aug
2023 19:
50:
00 +
0200</pubDate>
735 <description><p
>I still enjoy
<a href=
"https://kodi.tv/
">Kodi
</a
> and
736 <a href=
"https://libreelec.tv/
">LibreELEC
</a
> as my multimedia center
737 at home. Sadly two of the services I really would like to use from
738 within Kodi are not easily available. The most wanted add-on would be
739 one making
<a href=
"https://archive.org/
">The Internet Archive
</a
>
740 available, and it has
741 <a href=
"https://kodi.wiki/view/Add-on:Internet_Archive
">not been
742 working
</a
> for many years. The second most wanted add-on is one
743 using
<a href=
"https://invidious.io/
">the Invidious privacy enhanced
744 Youtube frontent
</a
>. A plugin for this has been partly working, but
745 not been kept up to date in the Kodi add-on repository, and its
746 upstream seem to have given it up in April this year, when the git
747 repository was closed. A few days ago I got tired of this sad state
748 of affairs and decided to
749 <a href=
"https://github.com/petterreinholdtsen/kodi-invidious-plugin
">have
750 a go at improving the Invidious add-on
</a
>. As
751 <a href=
"https://github.com/iv-org/invidious/issues/
3872">Google has
752 already attacked
</a
> the Invidious concept, so it need all the support
753 if can get. My small contribution here is to improve the service
754 status on Kodi.
</p
>
756 <p
>I added support to the Invidious add-on for automatically picking a
757 working Invidious instance, instead of requiring the user to specify
758 the URL to a specific instance after installation. I also had a look
759 at the set of patches floating around in the various forks on github,
760 and decided to clean up at least some of the features I liked and
761 integrate them into my new release branch. Now the plugin can handle
762 channel and short video items in search results. Earlier it could
763 only handle single video instances in the search response. I also
764 brushed up the set of metadata displayed a bit, but hope I can figure
765 out how to get more relevant metadata displayed.
</p
>
767 <p
>Because I only use Kodi
20 myself, I only test on version
20 and am
768 only motivated to ensure version
20 is working. Because of API changes
769 between version
19 and
20, I suspect it will fail with earlier Kodi
773 <a href=
"https://github.com/xbmc/repo-plugins/pull/
4363">asked to have
774 the add-on added
</a
> to the official Kodi
20 repository, and is
775 waiting to heard back from the repo maintainers.
</p
>
777 <p
>As usual, if you use Bitcoin and want to show your support of my
778 activities, please send Bitcoin donations to my address
779 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
784 <title>What did I learn from OpenSnitch this summer?
</title>
785 <link>https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html
</link>
786 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/What_did_I_learn_from_OpenSnitch_this_summer_.html
</guid>
787 <pubDate>Sun,
11 Jun
2023 08:
30:
00 +
0200</pubDate>
788 <description><p
>With yesterdays
789 <a href=
"https://www.debian.org/News/
2023/
20230610">release of Debian
790 12 Bookworm
</a
>, I am happy to know the
791 <a href=
"https://tracker.debian.org/pkg/opensnitch
">the interactive
792 application firewall OpenSnitch
</a
> is available for a wider audience.
793 I have been running it for a few weeks now, and have been surprised
794 about some of the programs connecting to the Internet. Some programs
795 are obviously calling out from my machine, like the NTP network based
796 clock adjusting system and Tor to reach other Tor clients, but others
797 were more dubious. For example, the KDE Window manager try to look up
798 the host name in DNS, for no apparent reason, but if this lookup is
799 blocked the KDE desktop get periodically stuck when I use it. Another
800 surprise was how much Firefox call home directly to mozilla.com,
801 mozilla.net and googleapis.com, to mention a few, when I visit other
802 web pages. This direct connection happen even if I told Firefox to
803 always use a proxy, and the proxy setting is ignored for this traffic.
804 Other surprising connections come from audacity and dirmngr (I do not
805 use Gnome). It took some trial and error to get a good default set of
806 permissions. Without it, I would get popups asking for permissions at
807 any time, also the most inconvenient ones where I am in the middle of
808 a time sensitive gaming session.
</p
>
810 <p
>I suspect some application developers should rethink when then need
811 to use network connections or DNS lookups, and recommend testing
812 OpenSnitch (only
<tt
>apt install opensnitch
</tt
> away in Debian
813 Bookworm) to locate and report any surprising Internet connections on
814 your desktop machine.
</p
>
816 <p
>At the moment the upstream developer and Debian package maintainer
817 is working on making the system more reliable in Debian, by enabling
818 the eBPF kernel module to track processes and connections instead of
819 depending in content in /proc/. This should enter unstable fairly
822 <p
>As usual, if you use Bitcoin and want to show your support of my
823 activities, please send Bitcoin donations to my address
824 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
826 <p
><strong
>Update
2023-
06-
12</strong
>: I got a tip about
827 <a href=
"https://wiki.debian.org/PrivacyIssues
">a list of privacy
828 issues in Free Software
</a
> and the
829 <a href=
"irc://irc.debian.org/%
23debian-privacy
">#debian-privacy IRC
830 channel
</a
> discussing these topics.
</p
>
836 <title>wmbusmeters, parse data from your utility meter - nice free software
</title>
837 <link>https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html
</link>
838 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/wmbusmeters__parse_data_from_your_utility_meter___nice_free_software.html
</guid>
839 <pubDate>Fri,
19 May
2023 21:
50:
00 +
0200</pubDate>
840 <description><p
>There is a European standard for reading utility meters like water,
841 gas, electricity or heat distribution meters. The
842 <a href=
"https://en.wikipedia.org/wiki/Meter-Bus
">Meter-Bus standard
843 (EN
13757-
2, EN
13757-
3 and EN
13757–
4)
</a
> provide a cross vendor way
844 to talk to and collect meter data. I ran into this standard when I
845 wanted to monitor some heat distribution meters, and managed to find
846 free software that could do the job. The meters in question broadcast
847 encrypted messages with meter information via radio, and the hardest
848 part was to track down the encryption keys from the vendor. With this
849 in place I could set up a MQTT gateway to submit the meter data for
852 <p
>The free software systems in question,
853 <a href=
"https://tracker.debian.org/pkg/rtl-wmbus
">rtl-wmbus
</a
> to
854 read the messages from a software defined radio, and
855 <a href=
"https://tracker.debian.org/pkg/wmbusmeters
">wmbusmeters
</a
> to
856 decrypt and decode the content of the messages, is working very well
857 and allowe me to get frequent updates from my meters. I got in touch
858 with upstream last year to see if there was any interest in publishing
859 the packages via Debian. I was very happy to learn that Fredrik
860 Öhrström volunteered to maintain the packages, and I have since
861 assisted him in getting Debian package build rules in place as well as
862 sponsoring the packages into the Debian archive. Sadly we completed
863 it too late for them to become part of the next stable Debian release
864 (Bookworm). The wmbusmeters package just cleared the NEW queue. It
865 will need some work to fix a built problem, but I expect Fredrik will
866 find a solution soon.
</p
>
868 <p
>If you got a infrastructure meter supporting the Meter Bus
869 standard, I strongly recommend having a look at these nice
872 <p
>As usual, if you use Bitcoin and want to show your support of my
873 activities, please send Bitcoin donations to my address
874 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
879 <title>The
2023 LinuxCNC Norwegian developer gathering
</title>
880 <link>https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html
</link>
881 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/The_2023_LinuxCNC_Norwegian_developer_gathering.html
</guid>
882 <pubDate>Sun,
14 May
2023 20:
30:
00 +
0200</pubDate>
883 <description><p
>The LinuxCNC project is making headway these days. A lot of
884 patches and issues have seen activity on
885 <a href=
"https://github.com/LinuxCNC/linuxcnc/
">the project github
886 pages
</a
> recently. A few weeks ago there was a developer gathering
887 over at the
<a href=
"https://tormach.com/
">Tormach
</a
> headquarter in
888 Wisconsin, and now we are planning a new gathering in Norway. If you
889 wonder what LinuxCNC is, lets quote Wikipedia:
</p
>
892 "LinuxCNC is a software system for numerical control of
893 machines such as milling machines, lathes, plasma cutters, routers,
894 cutting machines, robots and hexapods. It can control up to
9 axes or
895 joints of a CNC machine using G-code (RS-
274NGC) as input. It has
896 several GUIs suited to specific kinds of usage (touch screen,
897 interactive development).
"
900 <p
>The Norwegian developer gathering take place the weekend June
16th
901 to
18th this year, and is open for everyone interested in contributing
902 to LinuxCNC. Up to date information about the gathering can be found
904 <a href=
"https://sourceforge.net/p/emc/mailman/emc-developers/thread/sa64jp06nob.fsf%
40hjemme.reinholdtsen.name/#msg37837251
">the
905 developer mailing list thread
</a
> where the gathering was announced.
906 Thanks to the good people at
907 <a href=
"https://www.debian.org/
">Debian
</a
>,
908 <a href=
"https://www.redpill-linpro.com/
">Redpill-Linpro
</a
> and
909 <a href=
"https://www.nuugfoundation.no/no/
">NUUG Foundation
</a
>, we
910 have enough sponsor funds to pay for food, and shelter for the people
911 traveling from afar to join us. If you would like to join the
912 gathering, get in touch.
</p
>
914 <p
>As usual, if you use Bitcoin and want to show your support of my
915 activities, please send Bitcoin donations to my address
916 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
921 <title>OpenSnitch in Debian ready for prime time
</title>
922 <link>https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html
</link>
923 <guid isPermaLink=
"true">https://people.skolelinux.org/pere/blog/OpenSnitch_in_Debian_ready_for_prime_time.html
</guid>
924 <pubDate>Sat,
13 May
2023 12:
10:
00 +
0200</pubDate>
925 <description><p
>A bit delayed,
926 <a href=
"https://tracker.debian.org/pkg/opensnitch
">the interactive
927 application firewall OpenSnitch
</a
> package in Debian now got the
928 latest fixes ready for Debian Bookworm. Because it depend on a
929 package missing on some architectures, the autopkgtest check of the
930 testing migration script did not understand that the tests were
931 actually working, so the migration was delayed. A bug in the package
932 dependencies is also fixed, so those installing the firewall package
933 (opensnitch) now also get the GUI admin tool (python3-opensnitch-ui)
934 installed by default. I am very grateful to Gustavo Iñiguez Goya for
935 his work on getting the package ready for Debian Bookworm.
</p
>
937 <p
>Armed with this package I have discovered some surprising
938 connections from programs I believed were able to work completly
939 offline, and it has already proven its worth, at least to me. If you
940 too want to get more familiar with the kind of programs using
941 Internett connections on your machine, I recommend testing
<tt
>apt
942 install opensnitch
</tt
> in Bookworm and see what you think.
</p
>
944 <p
>The package is still not able to build its eBPF module within
945 Debian. Not sure how much work it would be to get it working, but
946 suspect some kernel related packages need to be extended with more
947 header files to get it working.
</p
>
949 <p
>As usual, if you use Bitcoin and want to show your support of my
950 activities, please send Bitcoin donations to my address
951 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>